receive_user_info.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. /*
  2. * Copyright (c) 2021 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _RECEIVE_USER_INFO_H_
  21. #define _RECEIVE_USER_INFO_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 phy_ppdu_id[15:0], user_rssi[23:16], pkt_type[27:24], stbc[28], reception_type[31:29]
  28. // 1 rate_mcs[3:0], sgi[5:4], receive_bandwidth[7:6], mimo_ss_bitmap[15:8], ofdma_ru_allocation[23:16], ofdma_user_index[30:24], ofdma_content_channel[31]
  29. // 2 ldpc[0], reserved_2a[31:1]
  30. //
  31. // ################ END SUMMARY #################
  32. #define NUM_OF_DWORDS_RECEIVE_USER_INFO 3
  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. reception_type : 3; //[31:29]
  39. uint32_t rate_mcs : 4, //[3:0]
  40. sgi : 2, //[5:4]
  41. receive_bandwidth : 2, //[7:6]
  42. mimo_ss_bitmap : 8, //[15:8]
  43. ofdma_ru_allocation : 8, //[23:16]
  44. ofdma_user_index : 7, //[30:24]
  45. ofdma_content_channel : 1; //[31]
  46. uint32_t ldpc : 1, //[0]
  47. reserved_2a : 31; //[31:1]
  48. };
  49. /*
  50. phy_ppdu_id
  51. A ppdu counter value that PHY increments for every PPDU
  52. received. The counter value wraps around
  53. <legal all>
  54. user_rssi
  55. RSSI for this user
  56. Frequency domain RSSI measurement for this user. Based
  57. on the channel estimate.
  58. <legal all>
  59. pkt_type
  60. Packet type:
  61. <enum 0 dot11a>802.11a PPDU type
  62. <enum 1 dot11b>802.11b PPDU type
  63. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  64. <enum 3 dot11ac>802.11ac PPDU type
  65. <enum 4 dot11ax>802.11ax PPDU type
  66. stbc
  67. When set, use STBC transmission rates
  68. reception_type
  69. Indicates what type of reception this is.
  70. <enum 0 reception_type_SU > Basic SU reception (not
  71. part of OFDMA or MIMO)
  72. <enum 1 reception_type_MU_MIMO > This is related to
  73. DL type of reception
  74. <enum 2 reception_type_MU_OFDMA > This is related
  75. to DL type of reception
  76. <enum 3 reception_type_MU_OFDMA_MIMO > This is
  77. related to DL type of reception
  78. <enum 4 reception_type_UL_MU_MIMO > This is related
  79. to UL type of reception
  80. <enum 5 reception_type_UL_MU_OFDMA > This is
  81. related to UL type of reception
  82. <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is
  83. related to UL type of reception
  84. <legal 0-6>
  85. rate_mcs
  86. For details, refer to MCS_TYPE description
  87. <legal all>
  88. sgi
  89. Field only valid when pkt type is HT, VHT or HE.
  90. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  91. used for HE
  92. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  93. used for HE
  94. <enum 2 gi_1_6_us > HE related GI
  95. <enum 3 gi_3_2_us > HE related GI
  96. <legal 0 - 3>
  97. receive_bandwidth
  98. Full receive Bandwidth
  99. <enum 0 full_rx_bw_20_mhz>
  100. <enum 1 full_rx_bw_40_mhz>
  101. <enum 2 full_rx_bw_80_mhz>
  102. <enum 3 full_rx_bw_160_mhz>
  103. <legal 0-3>
  104. mimo_ss_bitmap
  105. Field only valid in case of MIMO type reception
  106. Bitmap, with each bit indicating if the related spatial
  107. stream is used for this STA
  108. LSB related to SS 0
  109. 0: spatial stream not used for this reception
  110. 1: spatial stream used for this reception
  111. <legal all>
  112. ofdma_ru_allocation
  113. Field only valid in case of OFDMA type receptions (DL
  114. and UL)
  115. Indicates the RU number associated with this user.
  116. In case of reception where the transmission was DL MU
  117. OFDMA, this field provides the RU pattern. Note that fields
  118. ofdma_user_index and Content_channel are needed to determine
  119. which RU was actually assigned to this user.
  120. In case of reception where the transmission was UL MU
  121. OFDMA, this field contains everything needed to determine
  122. the actual RU
  123. <legal all>
  124. ofdma_user_index
  125. Field only valid in the of DL MU OFDMA reception
  126. The user number within the RU_allocation.
  127. This is needed for SW to determine the exact RU position
  128. within the reception.
  129. <legal all>
  130. ofdma_content_channel
  131. Field only valid in the of DL MU OFDMA/MIMO reception
  132. In case of DL MU reception, this field indicates the
  133. content channel number where PHY found the RU information
  134. for this user
  135. This is needed for SW to determine the exact RU position
  136. within the reception.
  137. <enum 0 content_channel_1>
  138. <enum 1 content_channel_2>
  139. <legal all>
  140. ldpc
  141. When set, use LDPC transmission rates were used.
  142. <legal all>
  143. reserved_2a
  144. <legal 0>
  145. */
  146. /* Description RECEIVE_USER_INFO_0_PHY_PPDU_ID
  147. A ppdu counter value that PHY increments for every PPDU
  148. received. The counter value wraps around
  149. <legal all>
  150. */
  151. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_OFFSET 0x00000000
  152. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_LSB 0
  153. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_MASK 0x0000ffff
  154. /* Description RECEIVE_USER_INFO_0_USER_RSSI
  155. RSSI for this user
  156. Frequency domain RSSI measurement for this user. Based
  157. on the channel estimate.
  158. <legal all>
  159. */
  160. #define RECEIVE_USER_INFO_0_USER_RSSI_OFFSET 0x00000000
  161. #define RECEIVE_USER_INFO_0_USER_RSSI_LSB 16
  162. #define RECEIVE_USER_INFO_0_USER_RSSI_MASK 0x00ff0000
  163. /* Description RECEIVE_USER_INFO_0_PKT_TYPE
  164. Packet type:
  165. <enum 0 dot11a>802.11a PPDU type
  166. <enum 1 dot11b>802.11b PPDU type
  167. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  168. <enum 3 dot11ac>802.11ac PPDU type
  169. <enum 4 dot11ax>802.11ax PPDU type
  170. */
  171. #define RECEIVE_USER_INFO_0_PKT_TYPE_OFFSET 0x00000000
  172. #define RECEIVE_USER_INFO_0_PKT_TYPE_LSB 24
  173. #define RECEIVE_USER_INFO_0_PKT_TYPE_MASK 0x0f000000
  174. /* Description RECEIVE_USER_INFO_0_STBC
  175. When set, use STBC transmission rates
  176. */
  177. #define RECEIVE_USER_INFO_0_STBC_OFFSET 0x00000000
  178. #define RECEIVE_USER_INFO_0_STBC_LSB 28
  179. #define RECEIVE_USER_INFO_0_STBC_MASK 0x10000000
  180. /* Description RECEIVE_USER_INFO_0_RECEPTION_TYPE
  181. Indicates what type of reception this is.
  182. <enum 0 reception_type_SU > Basic SU reception (not
  183. part of OFDMA or MIMO)
  184. <enum 1 reception_type_MU_MIMO > This is related to
  185. DL type of reception
  186. <enum 2 reception_type_MU_OFDMA > This is related
  187. to DL type of reception
  188. <enum 3 reception_type_MU_OFDMA_MIMO > This is
  189. related to DL type of reception
  190. <enum 4 reception_type_UL_MU_MIMO > This is related
  191. to UL type of reception
  192. <enum 5 reception_type_UL_MU_OFDMA > This is
  193. related to UL type of reception
  194. <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is
  195. related to UL type of reception
  196. <legal 0-6>
  197. */
  198. #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_OFFSET 0x00000000
  199. #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_LSB 29
  200. #define RECEIVE_USER_INFO_0_RECEPTION_TYPE_MASK 0xe0000000
  201. /* Description RECEIVE_USER_INFO_1_RATE_MCS
  202. For details, refer to MCS_TYPE description
  203. <legal all>
  204. */
  205. #define RECEIVE_USER_INFO_1_RATE_MCS_OFFSET 0x00000004
  206. #define RECEIVE_USER_INFO_1_RATE_MCS_LSB 0
  207. #define RECEIVE_USER_INFO_1_RATE_MCS_MASK 0x0000000f
  208. /* Description RECEIVE_USER_INFO_1_SGI
  209. Field only valid when pkt type is HT, VHT or HE.
  210. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  211. used for HE
  212. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  213. used for HE
  214. <enum 2 gi_1_6_us > HE related GI
  215. <enum 3 gi_3_2_us > HE related GI
  216. <legal 0 - 3>
  217. */
  218. #define RECEIVE_USER_INFO_1_SGI_OFFSET 0x00000004
  219. #define RECEIVE_USER_INFO_1_SGI_LSB 4
  220. #define RECEIVE_USER_INFO_1_SGI_MASK 0x00000030
  221. /* Description RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH
  222. Full receive Bandwidth
  223. <enum 0 full_rx_bw_20_mhz>
  224. <enum 1 full_rx_bw_40_mhz>
  225. <enum 2 full_rx_bw_80_mhz>
  226. <enum 3 full_rx_bw_160_mhz>
  227. <legal 0-3>
  228. */
  229. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_OFFSET 0x00000004
  230. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_LSB 6
  231. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_MASK 0x000000c0
  232. /* Description RECEIVE_USER_INFO_1_MIMO_SS_BITMAP
  233. Field only valid in case of MIMO type reception
  234. Bitmap, with each bit indicating if the related spatial
  235. stream is used for this STA
  236. LSB related to SS 0
  237. 0: spatial stream not used for this reception
  238. 1: spatial stream used for this reception
  239. <legal all>
  240. */
  241. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_OFFSET 0x00000004
  242. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_LSB 8
  243. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_MASK 0x0000ff00
  244. /* Description RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION
  245. Field only valid in case of OFDMA type receptions (DL
  246. and UL)
  247. Indicates the RU number associated with this user.
  248. In case of reception where the transmission was DL MU
  249. OFDMA, this field provides the RU pattern. Note that fields
  250. ofdma_user_index and Content_channel are needed to determine
  251. which RU was actually assigned to this user.
  252. In case of reception where the transmission was UL MU
  253. OFDMA, this field contains everything needed to determine
  254. the actual RU
  255. <legal all>
  256. */
  257. #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_OFFSET 0x00000004
  258. #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_LSB 16
  259. #define RECEIVE_USER_INFO_1_OFDMA_RU_ALLOCATION_MASK 0x00ff0000
  260. /* Description RECEIVE_USER_INFO_1_OFDMA_USER_INDEX
  261. Field only valid in the of DL MU OFDMA reception
  262. The user number within the RU_allocation.
  263. This is needed for SW to determine the exact RU position
  264. within the reception.
  265. <legal all>
  266. */
  267. #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_OFFSET 0x00000004
  268. #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_LSB 24
  269. #define RECEIVE_USER_INFO_1_OFDMA_USER_INDEX_MASK 0x7f000000
  270. /* Description RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL
  271. Field only valid in the of DL MU OFDMA/MIMO reception
  272. In case of DL MU reception, this field indicates the
  273. content channel number where PHY found the RU information
  274. for this user
  275. This is needed for SW to determine the exact RU position
  276. within the reception.
  277. <enum 0 content_channel_1>
  278. <enum 1 content_channel_2>
  279. <legal all>
  280. */
  281. #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_OFFSET 0x00000004
  282. #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_LSB 31
  283. #define RECEIVE_USER_INFO_1_OFDMA_CONTENT_CHANNEL_MASK 0x80000000
  284. /* Description RECEIVE_USER_INFO_2_LDPC
  285. When set, use LDPC transmission rates were used.
  286. <legal all>
  287. */
  288. #define RECEIVE_USER_INFO_2_LDPC_OFFSET 0x00000008
  289. #define RECEIVE_USER_INFO_2_LDPC_LSB 0
  290. #define RECEIVE_USER_INFO_2_LDPC_MASK 0x00000001
  291. /* Description RECEIVE_USER_INFO_2_RESERVED_2A
  292. <legal 0>
  293. */
  294. #define RECEIVE_USER_INFO_2_RESERVED_2A_OFFSET 0x00000008
  295. #define RECEIVE_USER_INFO_2_RESERVED_2A_LSB 1
  296. #define RECEIVE_USER_INFO_2_RESERVED_2A_MASK 0xfffffffe
  297. #endif // _RECEIVE_USER_INFO_H_