phyrx_vht_sig_a.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. /*
  2. * Copyright (c) 2019 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. #ifndef _PHYRX_VHT_SIG_A_H_
  19. #define _PHYRX_VHT_SIG_A_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #include "vht_sig_a_info.h"
  23. // ################ START SUMMARY #################
  24. //
  25. // Dword Fields
  26. // 0-1 struct vht_sig_a_info phyrx_vht_sig_a_info_details;
  27. //
  28. // ################ END SUMMARY #################
  29. #define NUM_OF_DWORDS_PHYRX_VHT_SIG_A 2
  30. struct phyrx_vht_sig_a {
  31. struct vht_sig_a_info phyrx_vht_sig_a_info_details;
  32. };
  33. /*
  34. struct vht_sig_a_info phyrx_vht_sig_a_info_details
  35. See detailed description of the STRUCT
  36. */
  37. /* EXTERNAL REFERENCE : struct vht_sig_a_info phyrx_vht_sig_a_info_details */
  38. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH
  39. Packet bandwidth
  40. <enum 0 20_MHZ_11AC>
  41. <enum 1 40_MHZ_11AC>
  42. <enum 2 80_MHZ_11AC>
  43. <enum 3 160_MHZ_11AC>
  44. <legal 0-3>
  45. */
  46. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_OFFSET 0x00000000
  47. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_LSB 0
  48. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_MASK 0x00000003
  49. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0
  50. Reserved. Set to 1 by MAC, PHY should ignore
  51. <legal 1>
  52. */
  53. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_OFFSET 0x00000000
  54. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_LSB 2
  55. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_MASK 0x00000004
  56. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC
  57. Space time block coding:
  58. <enum 0 stbc_disabled> Indicates STBC is disabled
  59. <enum 1 stbc_enabled> Indicates STBC is enabled on
  60. all streams
  61. <legal 0-1>
  62. */
  63. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_OFFSET 0x00000000
  64. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_LSB 3
  65. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_MASK 0x00000008
  66. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID
  67. In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed
  68. to an AP or to a mesh STA, the Group ID field is set to 0,
  69. otherwise it is set to 63. In an NDP PPDU the Group ID is
  70. set according to IEEE 802.11ac_D1.0 Section 9.30.6
  71. (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group ID
  72. is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group ID).
  73. <legal all>
  74. */
  75. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_OFFSET 0x00000000
  76. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_LSB 4
  77. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_MASK 0x000003f0
  78. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS
  79. For MU:
  80. 3 bits/user with maximum of 4 users (user u uses
  81. vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2,
  82. 3)
  83. Set to 0 for 0 space time streams
  84. Set to 1 for 1 space time stream
  85. Set to 2 for 2 space time streams
  86. Set to 3 for 3 space time streams
  87. Set to 4 for 4 space time streams (not supported in Wifi
  88. 3.0)
  89. Values 5-7 are reserved
  90. In this field, references to user u should be
  91. interpreted as MU user u. As described in the previous
  92. chapter in this document (see chapter on User number), the
  93. MU user value for a given client is defined for each MU
  94. group that the client participates in. The MU user number is
  95. not related to the internal user number that is used within
  96. the BFer.
  97. For SU:
  98. vht_sig_a[0][12:10]
  99. Set to 0 for 1 space time stream
  100. Set to 1 for 2 space time streams
  101. Set to 2 for 3 space time streams
  102. Set to 3 for 4 space time streams
  103. Set to 4 for 5 space time streams
  104. Set to 5 for 6 space time streams
  105. Set to 6 for 7 space time streams
  106. Set to 7 for 8 space time streams
  107. vht_sig_a[0][21:13]
  108. Partial AID:
  109. Set to the value of the TXVECTOR parameter PARTIAL_AID.
  110. Partial AID provides an abbreviated indication of the
  111. intended recipient(s) of the frame (see IEEE802.11ac_D1.0
  112. Section 9.17a (Partial AID in VHT PPDUs)).
  113. <legal all>
  114. */
  115. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_OFFSET 0x00000000
  116. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_LSB 10
  117. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_MASK 0x003ffc00
  118. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED
  119. E_num 0 txop_ps_allowed Not supported: If set to by
  120. VHT AP if it allows non-AP VHT STAs in TXOP power save mode
  121. to enter Doze state during a TXOP
  122. <enum 1 no_txop_ps_allowed> Otherwise
  123. <legal 1>
  124. */
  125. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_OFFSET 0x00000000
  126. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_LSB 22
  127. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_MASK 0x00400000
  128. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B
  129. Reserved: Should be set to 1 by the MAC and ignored by
  130. the PHY <legal 1>
  131. */
  132. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_OFFSET 0x00000000
  133. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_LSB 23
  134. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_MASK 0x00800000
  135. /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0
  136. This field is not part of HT-SIG:
  137. Reserved: Should be set to 0 by the MAC and ignored by
  138. the PHY <legal 0>
  139. */
  140. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_OFFSET 0x00000000
  141. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_LSB 24
  142. #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_MASK 0xff000000
  143. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING
  144. <enum 0 normal_gi> Indicates short guard interval
  145. is not used in the data field
  146. <enum 1 short_gi> Indicates short guard interval is
  147. used in the data field
  148. <enum 3 short_gi_ambiguity> Indicates short guard
  149. interval is used in the data field and NSYM mod 10 = 9
  150. NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3
  151. (TXTIME and PSDU_LENGTH calculation).
  152. <legal 0,1,3>
  153. */
  154. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_OFFSET 0x00000004
  155. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_LSB 0
  156. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_MASK 0x00000003
  157. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING
  158. For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For
  159. an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then
  160. B2 indicates the coding used for user 0; set to 0 for BCC
  161. and 1 for LDPC. If the MU[0] NSTS field is 0, then this
  162. field is reserved and set to 1
  163. */
  164. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_OFFSET 0x00000004
  165. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_LSB 2
  166. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_MASK 0x00000004
  167. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL
  168. Set to 1 if the LDPC PPDU encoding process (if an SU
  169. PPDU), or at least one LDPC user's PPDU encoding process (if
  170. an MU PPDU), results in an extra OFDM symbol (or symbols) as
  171. described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5
  172. (Encoding process for MU PPDUs). Set to 0 otherwise.
  173. */
  174. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004
  175. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_LSB 3
  176. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_MASK 0x00000008
  177. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS
  178. For SU:
  179. Set to 0 for BPSK 1/2
  180. Set to 1 for QPSK 1/2
  181. Set to 2 for QPSK 3/4
  182. Set to 3 for 16-QAM 1/2
  183. Set to 4 for 16-QAM 3/4
  184. Set to 5 for 64-QAM 2/3
  185. Set to 6 for 64-QAM 3/4
  186. Set to 7 for 64-QAM 5/6
  187. Set to 8 for 256-QAM 3/4
  188. Set to 9 for 256-QAM 5/6
  189. For MU:
  190. If NSTS for user 1 is non-zero, then vht_sig_a[1][4]
  191. indicates coding for user 1: set to 0 for BCC, 1 for LDPC.
  192. If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is
  193. reserved and set to 1.
  194. If NSTS for user 2 is non-zero, then vht_sig_a[1][5]
  195. indicates coding for user 2: set to 0 for BCC, 1 for LDPC.
  196. If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is
  197. reserved and set to 1.
  198. If NSTS for user 3 is non-zero, then vht_sig_a[1][6]
  199. indicates coding for user 3: set to 0 for BCC, 1 for LDPC.
  200. If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is
  201. reserved and set to 1.
  202. vht_sig_a[1][7] is reserved and set to 1
  203. <legal 0-15>
  204. */
  205. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_OFFSET 0x00000004
  206. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_LSB 4
  207. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_MASK 0x000000f0
  208. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED
  209. For SU:
  210. Set to 1 if a Beamforming steering matrix is applied to
  211. the waveform in an SU transmission as described in
  212. IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping),
  213. set to 0 otherwise.
  214. For MU:
  215. Reserved and set to 1
  216. <legal 0-1>
  217. */
  218. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_OFFSET 0x00000004
  219. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_LSB 8
  220. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_MASK 0x00000100
  221. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1
  222. Reserved and set to 1. <legal 1>
  223. */
  224. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_OFFSET 0x00000004
  225. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_LSB 9
  226. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_MASK 0x00000200
  227. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC
  228. CRC calculated as in IEEE802.11ac_D1.0 Section
  229. 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in
  230. vht_sig_a[1][10], etc. <legal all>
  231. */
  232. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_OFFSET 0x00000004
  233. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_LSB 10
  234. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_MASK 0x0003fc00
  235. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL
  236. Used to terminate the trellis of the convolutional
  237. decoder. Set to 0. <legal 0>
  238. */
  239. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_OFFSET 0x00000004
  240. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_LSB 18
  241. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_MASK 0x00fc0000
  242. /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1
  243. This field is not part of HT-SIG:
  244. Reserved: Should be set to 0 by the MAC and ignored by
  245. the PHY <legal 0>
  246. */
  247. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_OFFSET 0x00000004
  248. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_LSB 24
  249. #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_MASK 0xff000000
  250. #endif // _PHYRX_VHT_SIG_A_H_