receive_user_info.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. // 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], sgi[30:29], reserved_0[31]
  28. // 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]
  29. //
  30. // ################ END SUMMARY #################
  31. #define NUM_OF_DWORDS_RECEIVE_USER_INFO 2
  32. struct receive_user_info {
  33. uint32_t phy_ppdu_id : 16, //[15:0]
  34. user_rssi : 8, //[23:16]
  35. pkt_type : 4, //[27:24]
  36. stbc : 1, //[28]
  37. sgi : 2, //[30:29]
  38. reserved_0 : 1; //[31]
  39. uint32_t rate_mcs : 4, //[3:0]
  40. reception_type : 2, //[5:4]
  41. receive_bandwidth : 2, //[7:6]
  42. mimo_ss_bitmap : 8, //[15:8]
  43. user_ru_allocation : 8, //[23:16]
  44. nss : 3, //[26:24]
  45. reserved_1b : 5; //[31:27]
  46. };
  47. /*
  48. phy_ppdu_id
  49. A ppdu counter value that PHY increments for every PPDU
  50. received. The counter value wraps around
  51. <legal all>
  52. user_rssi
  53. RSSI for this user
  54. Frequency domain RSSI measurement for this user. Based
  55. on the channel estimate.
  56. If PHY implementation runs into difficulties, the backup
  57. is to reuse the previously notified RSSI values.
  58. TODO PHY: request to update the text here based on the
  59. latest design insights
  60. <legal all>
  61. pkt_type
  62. Packet type:
  63. <enum 0 dot11a>802.11a PPDU type
  64. <enum 1 dot11b>802.11b PPDU type
  65. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  66. <enum 3 dot11ac>802.11ac PPDU type
  67. <enum 4 dot11ax>802.11ax PPDU type
  68. stbc
  69. When set, use STBC transmission rates
  70. sgi
  71. Field only valid when pkt type is HT, VHT or HE.
  72. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  73. used for HE
  74. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  75. used for HE
  76. <enum 2 gi_1_6_us > HE related GI
  77. <enum 3 gi_3_2_us > HE related GI
  78. <legal 0 - 3>
  79. reserved_0
  80. <legal 0>
  81. rate_mcs
  82. For details, refer to MCS_TYPE description
  83. <legal all>
  84. reception_type
  85. Indicates what type of reception this is.
  86. <enum 0 reception_type_SU >
  87. <enum 1 reception_type_MU_MIMO >
  88. <enum 2 reception_type_MU_OFDMA >
  89. <enum 3 reception_type_MU_OFDMA_MIMO >
  90. <legal all>
  91. receive_bandwidth
  92. Full receive Bandwidth
  93. <enum 0 full_rx_bw_20_mhz>
  94. <enum 1 full_rx_bw_40_mhz>
  95. <enum 2 full_rx_bw_80_mhz>
  96. <enum 3 full_rx_bw_160_mhz>
  97. <legal 0-3>
  98. mimo_ss_bitmap
  99. Field only valid in case of MIMO type reception
  100. Bitmap, with each bit indicating if the related spatial
  101. stream is used for this STA
  102. LSB related to SS 0
  103. 0: spatial stream not used for this reception
  104. 1: spatial stream used for this reception
  105. <legal all>
  106. user_ru_allocation
  107. Field only valid in case of OFDMA uplink type reception
  108. Indicates the RU number for this user
  109. <legal 0-73>
  110. nss
  111. Number of Spatial Streams occupied by the User
  112. <enum 0 1_spatial_stream>Single spatial stream
  113. <enum 1 2_spatial_streams>2 spatial streams
  114. <enum 2 3_spatial_streams>3 spatial streams
  115. <enum 3 4_spatial_streams>4 spatial streams
  116. <enum 4 5_spatial_streams>5 spatial streams
  117. <enum 5 6_spatial_streams>6 spatial streams
  118. <enum 6 7_spatial_streams>7 spatial streams
  119. <enum 7 8_spatial_streams>8 spatial streams
  120. reserved_1b
  121. <legal 0>
  122. */
  123. /* Description RECEIVE_USER_INFO_0_PHY_PPDU_ID
  124. A ppdu counter value that PHY increments for every PPDU
  125. received. The counter value wraps around
  126. <legal all>
  127. */
  128. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_OFFSET 0x00000000
  129. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_LSB 0
  130. #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_MASK 0x0000ffff
  131. /* Description RECEIVE_USER_INFO_0_USER_RSSI
  132. RSSI for this user
  133. Frequency domain RSSI measurement for this user. Based
  134. on the channel estimate.
  135. If PHY implementation runs into difficulties, the backup
  136. is to reuse the previously notified RSSI values.
  137. TODO PHY: request to update the text here based on the
  138. latest design insights
  139. <legal all>
  140. */
  141. #define RECEIVE_USER_INFO_0_USER_RSSI_OFFSET 0x00000000
  142. #define RECEIVE_USER_INFO_0_USER_RSSI_LSB 16
  143. #define RECEIVE_USER_INFO_0_USER_RSSI_MASK 0x00ff0000
  144. /* Description RECEIVE_USER_INFO_0_PKT_TYPE
  145. Packet type:
  146. <enum 0 dot11a>802.11a PPDU type
  147. <enum 1 dot11b>802.11b PPDU type
  148. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  149. <enum 3 dot11ac>802.11ac PPDU type
  150. <enum 4 dot11ax>802.11ax PPDU type
  151. */
  152. #define RECEIVE_USER_INFO_0_PKT_TYPE_OFFSET 0x00000000
  153. #define RECEIVE_USER_INFO_0_PKT_TYPE_LSB 24
  154. #define RECEIVE_USER_INFO_0_PKT_TYPE_MASK 0x0f000000
  155. /* Description RECEIVE_USER_INFO_0_STBC
  156. When set, use STBC transmission rates
  157. */
  158. #define RECEIVE_USER_INFO_0_STBC_OFFSET 0x00000000
  159. #define RECEIVE_USER_INFO_0_STBC_LSB 28
  160. #define RECEIVE_USER_INFO_0_STBC_MASK 0x10000000
  161. /* Description RECEIVE_USER_INFO_0_SGI
  162. Field only valid when pkt type is HT, VHT or HE.
  163. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  164. used for HE
  165. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  166. used for HE
  167. <enum 2 gi_1_6_us > HE related GI
  168. <enum 3 gi_3_2_us > HE related GI
  169. <legal 0 - 3>
  170. */
  171. #define RECEIVE_USER_INFO_0_SGI_OFFSET 0x00000000
  172. #define RECEIVE_USER_INFO_0_SGI_LSB 29
  173. #define RECEIVE_USER_INFO_0_SGI_MASK 0x60000000
  174. /* Description RECEIVE_USER_INFO_0_RESERVED_0
  175. <legal 0>
  176. */
  177. #define RECEIVE_USER_INFO_0_RESERVED_0_OFFSET 0x00000000
  178. #define RECEIVE_USER_INFO_0_RESERVED_0_LSB 31
  179. #define RECEIVE_USER_INFO_0_RESERVED_0_MASK 0x80000000
  180. /* Description RECEIVE_USER_INFO_1_RATE_MCS
  181. For details, refer to MCS_TYPE description
  182. <legal all>
  183. */
  184. #define RECEIVE_USER_INFO_1_RATE_MCS_OFFSET 0x00000004
  185. #define RECEIVE_USER_INFO_1_RATE_MCS_LSB 0
  186. #define RECEIVE_USER_INFO_1_RATE_MCS_MASK 0x0000000f
  187. /* Description RECEIVE_USER_INFO_1_RECEPTION_TYPE
  188. Indicates what type of reception this is.
  189. <enum 0 reception_type_SU >
  190. <enum 1 reception_type_MU_MIMO >
  191. <enum 2 reception_type_MU_OFDMA >
  192. <enum 3 reception_type_MU_OFDMA_MIMO >
  193. <legal all>
  194. */
  195. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_OFFSET 0x00000004
  196. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_LSB 4
  197. #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_MASK 0x00000030
  198. /* Description RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH
  199. Full receive Bandwidth
  200. <enum 0 full_rx_bw_20_mhz>
  201. <enum 1 full_rx_bw_40_mhz>
  202. <enum 2 full_rx_bw_80_mhz>
  203. <enum 3 full_rx_bw_160_mhz>
  204. <legal 0-3>
  205. */
  206. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_OFFSET 0x00000004
  207. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_LSB 6
  208. #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_MASK 0x000000c0
  209. /* Description RECEIVE_USER_INFO_1_MIMO_SS_BITMAP
  210. Field only valid in case of MIMO type reception
  211. Bitmap, with each bit indicating if the related spatial
  212. stream is used for this STA
  213. LSB related to SS 0
  214. 0: spatial stream not used for this reception
  215. 1: spatial stream used for this reception
  216. <legal all>
  217. */
  218. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_OFFSET 0x00000004
  219. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_LSB 8
  220. #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_MASK 0x0000ff00
  221. /* Description RECEIVE_USER_INFO_1_USER_RU_ALLOCATION
  222. Field only valid in case of OFDMA uplink type reception
  223. Indicates the RU number for this user
  224. <legal 0-73>
  225. */
  226. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_OFFSET 0x00000004
  227. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_LSB 16
  228. #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_MASK 0x00ff0000
  229. /* Description RECEIVE_USER_INFO_1_NSS
  230. Number of Spatial Streams occupied by the User
  231. <enum 0 1_spatial_stream>Single spatial stream
  232. <enum 1 2_spatial_streams>2 spatial streams
  233. <enum 2 3_spatial_streams>3 spatial streams
  234. <enum 3 4_spatial_streams>4 spatial streams
  235. <enum 4 5_spatial_streams>5 spatial streams
  236. <enum 5 6_spatial_streams>6 spatial streams
  237. <enum 6 7_spatial_streams>7 spatial streams
  238. <enum 7 8_spatial_streams>8 spatial streams
  239. */
  240. #define RECEIVE_USER_INFO_1_NSS_OFFSET 0x00000004
  241. #define RECEIVE_USER_INFO_1_NSS_LSB 24
  242. #define RECEIVE_USER_INFO_1_NSS_MASK 0x07000000
  243. /* Description RECEIVE_USER_INFO_1_RESERVED_1B
  244. <legal 0>
  245. */
  246. #define RECEIVE_USER_INFO_1_RESERVED_1B_OFFSET 0x00000004
  247. #define RECEIVE_USER_INFO_1_RESERVED_1B_LSB 27
  248. #define RECEIVE_USER_INFO_1_RESERVED_1B_MASK 0xf8000000
  249. #endif // _RECEIVE_USER_INFO_H_