receive_user_info.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. /*
  2. * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. //
  19. // DO NOT EDIT! This file is automatically generated
  20. // These definitions are tied to a particular hardware layout
  21. #ifndef _RECEIVE_USER_INFO_H_
  22. #define _RECEIVE_USER_INFO_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. // ################ START SUMMARY #################
  26. //
  27. // Dword Fields
  28. // 0 phy_ppdu_id[15:0], user_rssi[23:16], pkt_type[27:24], stbc[28], sgi[30:29], reserved_0[31]
  29. // 1 rate_mcs[3:0], reception_type[5:4], receive_bandwidth[7:6], mimo_ss_bitmap[15:8], user_ru_allocation[23:16], nss[26:24], reserved_1b[31:27]
  30. //
  31. // ################ END SUMMARY #################
  32. #define NUM_OF_DWORDS_RECEIVE_USER_INFO 2
  33. struct receive_user_info {
  34. uint32_t phy_ppdu_id : 16, //[15:0]
  35. user_rssi : 8, //[23:16]
  36. pkt_type : 4, //[27:24]
  37. stbc : 1, //[28]
  38. sgi : 2, //[30:29]
  39. reserved_0 : 1; //[31]
  40. uint32_t rate_mcs : 4, //[3:0]
  41. reception_type : 2, //[5:4]
  42. receive_bandwidth : 2, //[7:6]
  43. mimo_ss_bitmap : 8, //[15:8]
  44. user_ru_allocation : 8, //[23:16]
  45. nss : 3, //[26:24]
  46. reserved_1b : 5; //[31:27]
  47. };
  48. /*
  49. phy_ppdu_id
  50. A ppdu counter value that PHY increments for every PPDU
  51. received. The counter value wraps around
  52. <legal all>
  53. user_rssi
  54. RSSI for this user
  55. Frequency domain RSSI measurement for this user. Based
  56. on the channel estimate.
  57. <legal all>
  58. pkt_type
  59. Packet type:
  60. <enum 0 dot11a>802.11a PPDU type
  61. <enum 1 dot11b>802.11b PPDU type
  62. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  63. <enum 3 dot11ac>802.11ac PPDU type
  64. <enum 4 dot11ax>802.11ax PPDU type
  65. stbc
  66. When set, use STBC transmission rates
  67. sgi
  68. Field only valid when pkt type is HT, VHT or HE.
  69. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  70. used for HE
  71. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  72. used for HE
  73. <enum 2 gi_1_6_us > HE related GI
  74. <enum 3 gi_3_2_us > HE related GI
  75. <legal 0 - 3>
  76. reserved_0
  77. <legal 0>
  78. rate_mcs
  79. For details, refer to MCS_TYPE description
  80. <legal all>
  81. reception_type
  82. Indicates what type of reception this is.
  83. <enum 0 reception_type_SU >
  84. <enum 1 reception_type_MU_MIMO >
  85. <enum 2 reception_type_MU_OFDMA >
  86. <enum 3 reception_type_MU_OFDMA_MIMO >
  87. <legal all>
  88. receive_bandwidth
  89. Full receive Bandwidth
  90. <enum 0 full_rx_bw_20_mhz>
  91. <enum 1 full_rx_bw_40_mhz>
  92. <enum 2 full_rx_bw_80_mhz>
  93. <enum 3 full_rx_bw_160_mhz>
  94. <legal 0-3>
  95. mimo_ss_bitmap
  96. Field only valid in case of MIMO type reception
  97. Bitmap, with each bit indicating if the related spatial
  98. stream is used for this STA
  99. LSB related to SS 0
  100. 0: spatial stream not used for this reception
  101. 1: spatial stream used for this reception
  102. <legal all>
  103. user_ru_allocation
  104. Field only valid in case of OFDMA uplink type reception
  105. Indicates the RU number for this user
  106. <legal 0-73>
  107. nss
  108. Number of Spatial Streams occupied by the User
  109. <enum 0 1_spatial_stream>Single spatial stream
  110. <enum 1 2_spatial_streams>2 spatial streams
  111. <enum 2 3_spatial_streams>3 spatial streams
  112. <enum 3 4_spatial_streams>4 spatial streams
  113. <enum 4 5_spatial_streams>5 spatial streams
  114. <enum 5 6_spatial_streams>6 spatial streams
  115. <enum 6 7_spatial_streams>7 spatial streams
  116. <enum 7 8_spatial_streams>8 spatial streams
  117. reserved_1b
  118. <legal 0>
  119. */
  120. /* Description RECEIVE_USER_INFO_0_PHY_PPDU_ID
  121. A ppdu counter value that PHY increments for every PPDU
  122. received. The counter value wraps around
  123. <legal all>
  124. */
  125. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_OFFSET 0x00000000
  126. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_LSB 0
  127. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_MASK 0x0000ffff
  128. /* Description RECEIVE_USER_INFO_0_USER_RSSI
  129. RSSI for this user
  130. Frequency domain RSSI measurement for this user. Based
  131. on the channel estimate.
  132. <legal all>
  133. */
  134. #define RECEIVE_USER_INFO_0_USER_RSSI_OFFSET 0x00000000
  135. #define RECEIVE_USER_INFO_0_USER_RSSI_LSB 16
  136. #define RECEIVE_USER_INFO_0_USER_RSSI_MASK 0x00ff0000
  137. /* Description RECEIVE_USER_INFO_0_PKT_TYPE
  138. Packet type:
  139. <enum 0 dot11a>802.11a PPDU type
  140. <enum 1 dot11b>802.11b PPDU type
  141. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  142. <enum 3 dot11ac>802.11ac PPDU type
  143. <enum 4 dot11ax>802.11ax PPDU type
  144. */
  145. #define RECEIVE_USER_INFO_0_PKT_TYPE_OFFSET 0x00000000
  146. #define RECEIVE_USER_INFO_0_PKT_TYPE_LSB 24
  147. #define RECEIVE_USER_INFO_0_PKT_TYPE_MASK 0x0f000000
  148. /* Description RECEIVE_USER_INFO_0_STBC
  149. When set, use STBC transmission rates
  150. */
  151. #define RECEIVE_USER_INFO_0_STBC_OFFSET 0x00000000
  152. #define RECEIVE_USER_INFO_0_STBC_LSB 28
  153. #define RECEIVE_USER_INFO_0_STBC_MASK 0x10000000
  154. /* Description RECEIVE_USER_INFO_0_SGI
  155. Field only valid when pkt type is HT, VHT or HE.
  156. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  157. used for HE
  158. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  159. used for HE
  160. <enum 2 gi_1_6_us > HE related GI
  161. <enum 3 gi_3_2_us > HE related GI
  162. <legal 0 - 3>
  163. */
  164. #define RECEIVE_USER_INFO_0_SGI_OFFSET 0x00000000
  165. #define RECEIVE_USER_INFO_0_SGI_LSB 29
  166. #define RECEIVE_USER_INFO_0_SGI_MASK 0x60000000
  167. /* Description RECEIVE_USER_INFO_0_RESERVED_0
  168. <legal 0>
  169. */
  170. #define RECEIVE_USER_INFO_0_RESERVED_0_OFFSET 0x00000000
  171. #define RECEIVE_USER_INFO_0_RESERVED_0_LSB 31
  172. #define RECEIVE_USER_INFO_0_RESERVED_0_MASK 0x80000000
  173. /* Description RECEIVE_USER_INFO_1_RATE_MCS
  174. For details, refer to MCS_TYPE description
  175. <legal all>
  176. */
  177. #define RECEIVE_USER_INFO_1_RATE_MCS_OFFSET 0x00000004
  178. #define RECEIVE_USER_INFO_1_RATE_MCS_LSB 0
  179. #define RECEIVE_USER_INFO_1_RATE_MCS_MASK 0x0000000f
  180. /* Description RECEIVE_USER_INFO_1_RECEPTION_TYPE
  181. Indicates what type of reception this is.
  182. <enum 0 reception_type_SU >
  183. <enum 1 reception_type_MU_MIMO >
  184. <enum 2 reception_type_MU_OFDMA >
  185. <enum 3 reception_type_MU_OFDMA_MIMO >
  186. <legal all>
  187. */
  188. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_OFFSET 0x00000004
  189. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_LSB 4
  190. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_MASK 0x00000030
  191. /* Description RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH
  192. Full receive Bandwidth
  193. <enum 0 full_rx_bw_20_mhz>
  194. <enum 1 full_rx_bw_40_mhz>
  195. <enum 2 full_rx_bw_80_mhz>
  196. <enum 3 full_rx_bw_160_mhz>
  197. <legal 0-3>
  198. */
  199. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_OFFSET 0x00000004
  200. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_LSB 6
  201. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_MASK 0x000000c0
  202. /* Description RECEIVE_USER_INFO_1_MIMO_SS_BITMAP
  203. Field only valid in case of MIMO type reception
  204. Bitmap, with each bit indicating if the related spatial
  205. stream is used for this STA
  206. LSB related to SS 0
  207. 0: spatial stream not used for this reception
  208. 1: spatial stream used for this reception
  209. <legal all>
  210. */
  211. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_OFFSET 0x00000004
  212. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_LSB 8
  213. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_MASK 0x0000ff00
  214. /* Description RECEIVE_USER_INFO_1_USER_RU_ALLOCATION
  215. Field only valid in case of OFDMA uplink type reception
  216. Indicates the RU number for this user
  217. <legal 0-73>
  218. */
  219. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_OFFSET 0x00000004
  220. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_LSB 16
  221. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_MASK 0x00ff0000
  222. /* Description RECEIVE_USER_INFO_1_NSS
  223. Number of Spatial Streams occupied by the User
  224. <enum 0 1_spatial_stream>Single spatial stream
  225. <enum 1 2_spatial_streams>2 spatial streams
  226. <enum 2 3_spatial_streams>3 spatial streams
  227. <enum 3 4_spatial_streams>4 spatial streams
  228. <enum 4 5_spatial_streams>5 spatial streams
  229. <enum 5 6_spatial_streams>6 spatial streams
  230. <enum 6 7_spatial_streams>7 spatial streams
  231. <enum 7 8_spatial_streams>8 spatial streams
  232. */
  233. #define RECEIVE_USER_INFO_1_NSS_OFFSET 0x00000004
  234. #define RECEIVE_USER_INFO_1_NSS_LSB 24
  235. #define RECEIVE_USER_INFO_1_NSS_MASK 0x07000000
  236. /* Description RECEIVE_USER_INFO_1_RESERVED_1B
  237. <legal 0>
  238. */
  239. #define RECEIVE_USER_INFO_1_RESERVED_1B_OFFSET 0x00000004
  240. #define RECEIVE_USER_INFO_1_RESERVED_1B_LSB 27
  241. #define RECEIVE_USER_INFO_1_RESERVED_1B_MASK 0xf8000000
  242. #endif // _RECEIVE_USER_INFO_H_