phyrx_user_info.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. /*
  2. * Copyright (c) 2020 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 _PHYRX_USER_INFO_H_
  22. #define _PHYRX_USER_INFO_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. #include "receive_user_info.h"
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0-2 struct receive_user_info receive_user_info_details;
  30. //
  31. // ################ END SUMMARY #################
  32. #define NUM_OF_DWORDS_PHYRX_USER_INFO 3
  33. struct phyrx_user_info {
  34. struct receive_user_info receive_user_info_details;
  35. };
  36. /*
  37. struct receive_user_info receive_user_info_details
  38. Overview of receive parameters that the MAC needs to
  39. prepend to every received MSDU/MPDU.
  40. PHY RX gathers this info for the MAC
  41. */
  42. /* EXTERNAL REFERENCE : struct receive_user_info receive_user_info_details */
  43. /* Description PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID
  44. A ppdu counter value that PHY increments for every PPDU
  45. received. The counter value wraps around
  46. <legal all>
  47. */
  48. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_OFFSET 0x00000000
  49. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_LSB 0
  50. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PHY_PPDU_ID_MASK 0x0000ffff
  51. /* Description PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI
  52. RSSI for this user
  53. Frequency domain RSSI measurement for this user. Based
  54. on the channel estimate.
  55. <legal all>
  56. */
  57. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_OFFSET 0x00000000
  58. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_LSB 16
  59. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_USER_RSSI_MASK 0x00ff0000
  60. /* Description PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE
  61. Packet type:
  62. <enum 0 dot11a>802.11a PPDU type
  63. <enum 1 dot11b>802.11b PPDU type
  64. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  65. <enum 3 dot11ac>802.11ac PPDU type
  66. <enum 4 dot11ax>802.11ax PPDU type
  67. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  68. */
  69. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_OFFSET 0x00000000
  70. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_LSB 24
  71. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_PKT_TYPE_MASK 0x0f000000
  72. /* Description PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC
  73. When set, use STBC transmission rates
  74. */
  75. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_OFFSET 0x00000000
  76. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_LSB 28
  77. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_STBC_MASK 0x10000000
  78. /* Description PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE
  79. Indicates what type of reception this is.
  80. <enum 0 reception_type_SU > Basic SU reception (not
  81. part of OFDMA or MU-MIMO)
  82. <enum 1 reception_type_MU_MIMO > This is related to
  83. DL type of reception
  84. <enum 2 reception_type_MU_OFDMA > This is related
  85. to DL type of reception
  86. <enum 3 reception_type_MU_OFDMA_MIMO > This is
  87. related to DL type of reception
  88. <enum 4 reception_type_UL_MU_MIMO > This is related
  89. to UL type of reception
  90. <enum 5 reception_type_UL_MU_OFDMA > This is
  91. related to UL type of reception
  92. <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is
  93. related to UL type of reception
  94. <legal 0-6>
  95. */
  96. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_OFFSET 0x00000000
  97. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_LSB 29
  98. #define PHYRX_USER_INFO_0_RECEIVE_USER_INFO_DETAILS_RECEPTION_TYPE_MASK 0xe0000000
  99. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS
  100. For details, refer to MCS_TYPE description
  101. <legal all>
  102. */
  103. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_OFFSET 0x00000004
  104. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_LSB 0
  105. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RATE_MCS_MASK 0x0000000f
  106. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI
  107. Field only valid when pkt type is HT, VHT or HE.
  108. <enum 0 gi_0_8_us > Legacy normal GI. Can also be
  109. used for HE
  110. <enum 1 gi_0_4_us > Legacy short GI. Can also be
  111. used for HE
  112. <enum 2 gi_1_6_us > HE related GI
  113. <enum 3 gi_3_2_us > HE related GI
  114. <legal 0 - 3>
  115. */
  116. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_OFFSET 0x00000004
  117. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_LSB 4
  118. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_SGI_MASK 0x00000030
  119. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH
  120. Full receive Bandwidth
  121. <enum 0 full_rx_bw_20_mhz>
  122. <enum 1 full_rx_bw_40_mhz>
  123. <enum 2 full_rx_bw_80_mhz>
  124. <enum 3 full_rx_bw_160_mhz>
  125. <legal 0-3>
  126. */
  127. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_OFFSET 0x00000004
  128. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_LSB 6
  129. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_RECEIVE_BANDWIDTH_MASK 0x000000c0
  130. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP
  131. Bitmap, with each bit indicating if the related spatial
  132. stream is used for this STA
  133. LSB related to SS 0
  134. 0: spatial stream not used for this reception
  135. 1: spatial stream used for this reception
  136. <legal all>
  137. */
  138. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_OFFSET 0x00000004
  139. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_LSB 8
  140. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_MIMO_SS_BITMAP_MASK 0x0000ff00
  141. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION
  142. Field only valid in case of OFDMA type receptions (DL
  143. and UL)
  144. Indicates the RU number associated with this user.
  145. In case of reception where the transmission was DL MU
  146. OFDMA, this field provides the RU pattern. Note that fields
  147. ofdma_user_index and ofdma_content_channel are needed to
  148. determine which RU (within a 40 MHz channel) was actually
  149. assigned to this user, but this does not give info on which
  150. 40 MHz channel was assigned to this user. Please refer
  151. DL_ofdma_ru_* in PHYRX_PKT_END_INFO for complete RU info for
  152. this user.
  153. In case of reception where the transmission was UL MU
  154. OFDMA, PHY is recommended to insert the RU start index in
  155. this field. Note that PHY may insert the RU width in
  156. Reserved_2a[6:0].
  157. <legal all>
  158. */
  159. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_OFFSET 0x00000004
  160. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_LSB 16
  161. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_RU_ALLOCATION_MASK 0x00ff0000
  162. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX
  163. Field only valid in the of DL MU OFDMA reception
  164. The user number within the RU_allocation.
  165. This is needed for SW to determine the exact RU position
  166. within the reception.
  167. <legal all>
  168. */
  169. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_OFFSET 0x00000004
  170. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_LSB 24
  171. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_USER_INDEX_MASK 0x7f000000
  172. /* Description PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL
  173. Field only valid in the of DL MU OFDMA/MIMO reception
  174. In case of DL MU reception, this field indicates the
  175. content channel number where PHY found the RU information
  176. for this user
  177. This is needed for SW to determine the exact RU position
  178. within the reception.
  179. <enum 0 content_channel_1>
  180. <enum 1 content_channel_2>
  181. <legal all>
  182. */
  183. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_OFFSET 0x00000004
  184. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_LSB 31
  185. #define PHYRX_USER_INFO_1_RECEIVE_USER_INFO_DETAILS_OFDMA_CONTENT_CHANNEL_MASK 0x80000000
  186. /* Description PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC
  187. When set, use LDPC transmission rates were used.
  188. <legal all>
  189. */
  190. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_OFFSET 0x00000008
  191. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_LSB 0
  192. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_LDPC_MASK 0x00000001
  193. /* Description PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH
  194. In case of UL OFDMA reception, PHY is recommended to
  195. insert the RU width
  196. In Hastings80: was using Reserved_2a[6:0].
  197. <legal 1 - 74>
  198. */
  199. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_OFFSET 0x00000008
  200. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_LSB 1
  201. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RU_WIDTH_MASK 0x000000fe
  202. /* Description PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A
  203. <legal 0>
  204. */
  205. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_OFFSET 0x00000008
  206. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_LSB 8
  207. #define PHYRX_USER_INFO_2_RECEIVE_USER_INFO_DETAILS_RESERVED_2A_MASK 0xffffff00
  208. #endif // _PHYRX_USER_INFO_H_