phyrx_vht_sig_a.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #ifndef _PHYRX_VHT_SIG_A_H_
  17. #define _PHYRX_VHT_SIG_A_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "vht_sig_a_info.h"
  21. #define NUM_OF_DWORDS_PHYRX_VHT_SIG_A 2
  22. #define NUM_OF_QWORDS_PHYRX_VHT_SIG_A 1
  23. struct phyrx_vht_sig_a {
  24. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  25. struct vht_sig_a_info phyrx_vht_sig_a_info_details;
  26. #else
  27. struct vht_sig_a_info phyrx_vht_sig_a_info_details;
  28. #endif
  29. };
  30. /* Description PHYRX_VHT_SIG_A_INFO_DETAILS
  31. See detailed description of the STRUCT
  32. */
  33. /* Description BANDWIDTH
  34. Packet bandwidth
  35. <enum 0 20_MHZ_11AC>
  36. <enum 1 40_MHZ_11AC>
  37. <enum 2 80_MHZ_11AC>
  38. <enum 3 160_MHZ_11AC>
  39. <legal 0-3>
  40. */
  41. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_OFFSET 0x0000000000000000
  42. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_LSB 0
  43. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_MSB 1
  44. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_MASK 0x0000000000000003
  45. /* Description VHTA_RESERVED_0
  46. Reserved. Set to 1 by MAC, PHY should ignore
  47. <legal 1>
  48. */
  49. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_OFFSET 0x0000000000000000
  50. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_LSB 2
  51. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_MSB 2
  52. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_MASK 0x0000000000000004
  53. /* Description STBC
  54. Space time block coding:
  55. <enum 0 stbc_disabled> Indicates STBC is disabled
  56. <enum 1 stbc_enabled> Indicates STBC is enabled on
  57. all streams
  58. <legal 0-1>
  59. */
  60. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_OFFSET 0x0000000000000000
  61. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_LSB 3
  62. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_MSB 3
  63. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_MASK 0x0000000000000008
  64. /* Description GROUP_ID
  65. In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed
  66. to an AP or to a mesh STA, the Group ID field is set to
  67. 0, otherwise it is set to 63. In an NDP PPDU the Group
  68. ID is set according to IEEE 802.11ac_D1.0 Section 9.30.6
  69. (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group
  70. ID is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group
  71. ID). <legal all>
  72. */
  73. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_OFFSET 0x0000000000000000
  74. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_LSB 4
  75. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_MSB 9
  76. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_MASK 0x00000000000003f0
  77. /* Description N_STS
  78. For MU:
  79. 3 bits/user with maximum of 4 users (user u uses
  80. vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2,
  81. 3)
  82. Set to 0 for 0 space time streams
  83. Set to 1 for 1 space time stream
  84. Set to 2 for 2 space time streams
  85. Set to 3 for 3 space time streams
  86. Set to 4 for 4 space time streams (not supported in Wifi
  87. 3.0)
  88. Values 5-7 are reserved
  89. In this field, references to user "u" should be interpreted
  90. as MU user "u". As described in the previous chapter in
  91. this document (see chapter on User number), the MU user
  92. value for a given client is defined for each MU group that
  93. the client participates in. The MU user number is not related
  94. to the internal user number that is used within the BFer.
  95. For SU:
  96. vht_sig_a[0][12:10]
  97. Set to 0 for 1 space time stream
  98. Set to 1 for 2 space time streams
  99. Set to 2 for 3 space time streams
  100. Set to 3 for 4 space time streams
  101. Set to 4 for 5 space time streams
  102. Set to 5 for 6 space time streams
  103. Set to 6 for 7 space time streams
  104. Set to 7 for 8 space time streams
  105. vht_sig_a[0][21:13]
  106. Partial AID:
  107. Set to the value of the TXVECTOR parameter PARTIAL_AID.
  108. Partial AID provides an abbreviated indication of the intended
  109. recipient(s) of the frame (see IEEE802.11ac_D1.0 Section
  110. 9.17a (Partial AID in VHT PPDUs)).
  111. <legal all>
  112. */
  113. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_OFFSET 0x0000000000000000
  114. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_LSB 10
  115. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_MSB 21
  116. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_MASK 0x00000000003ffc00
  117. /* Description TXOP_PS_NOT_ALLOWED
  118. E_num 0 txop_ps_allowed Not supported: If set to by
  119. VHT AP if it allows non-AP VHT STAs in TXOP power save
  120. mode to enter Doze state during a TXOP
  121. <enum 1 no_txop_ps_allowed> Otherwise
  122. <legal 1>
  123. */
  124. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_OFFSET 0x0000000000000000
  125. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_LSB 22
  126. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_MSB 22
  127. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_MASK 0x0000000000400000
  128. /* Description VHTA_RESERVED_0B
  129. Reserved: Should be set to 1 by the MAC and ignored by the
  130. PHY <legal 1>
  131. */
  132. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_OFFSET 0x0000000000000000
  133. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_LSB 23
  134. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_MSB 23
  135. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_MASK 0x0000000000800000
  136. /* Description RESERVED_0
  137. This field is not part of HT-SIG:
  138. Reserved: Should be set to 0 by the MAC and ignored by the
  139. PHY <legal 0>
  140. */
  141. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_OFFSET 0x0000000000000000
  142. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_LSB 24
  143. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_MSB 31
  144. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_MASK 0x00000000ff000000
  145. /* Description GI_SETTING
  146. <enum 0 normal_gi> Indicates short guard interval is
  147. not used in the data field
  148. <enum 1 short_gi> Indicates short guard interval is
  149. used in the data field
  150. <enum 3 short_gi_ambiguity> Indicates short guard interval
  151. is used in the data field and NSYM mod 10 = 9
  152. NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3 (TXTIME
  153. and PSDU_LENGTH calculation).
  154. <legal 0,1,3>
  155. */
  156. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_OFFSET 0x0000000000000000
  157. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_LSB 32
  158. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_MSB 33
  159. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_MASK 0x0000000300000000
  160. /* Description SU_MU_CODING
  161. For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For an
  162. MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then
  163. B2 indicates the coding used for user 0; set to 0 for BCC
  164. and 1 for LDPC. If the MU[0] NSTS field is 0, then this
  165. field is reserved and set to 1
  166. */
  167. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_OFFSET 0x0000000000000000
  168. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_LSB 34
  169. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_MSB 34
  170. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_MASK 0x0000000400000000
  171. /* Description LDPC_EXTRA_SYMBOL
  172. Set to 1 if the LDPC PPDU encoding process (if an SU PPDU),
  173. or at least one LDPC user's PPDU encoding process (if an
  174. MU PPDU), results in an extra OFDM symbol (or symbols)
  175. as described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5
  176. (Encoding process for MU PPDUs). Set to 0 otherwise.
  177. */
  178. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_OFFSET 0x0000000000000000
  179. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_LSB 35
  180. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_MSB 35
  181. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_MASK 0x0000000800000000
  182. /* Description MCS
  183. For SU:
  184. Set to 0 for BPSK 1/2
  185. Set to 1 for QPSK 1/2
  186. Set to 2 for QPSK 3/4
  187. Set to 3 for 16-QAM 1/2
  188. Set to 4 for 16-QAM 3/4
  189. Set to 5 for 64-QAM 2/3
  190. Set to 6 for 64-QAM 3/4
  191. Set to 7 for 64-QAM 5/6
  192. Set to 8 for 256-QAM 3/4
  193. Set to 9 for 256-QAM 5/6
  194. For MU:
  195. If NSTS for user 1 is non-zero, then vht_sig_a[1][4] indicates
  196. coding for user 1: set to 0 for BCC, 1 for LDPC.
  197. If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is
  198. reserved and set to 1.
  199. If NSTS for user 2 is non-zero, then vht_sig_a[1][5] indicates
  200. coding for user 2: set to 0 for BCC, 1 for LDPC.
  201. If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is
  202. reserved and set to 1.
  203. If NSTS for user 3 is non-zero, then vht_sig_a[1][6] indicates
  204. coding for user 3: set to 0 for BCC, 1 for LDPC.
  205. If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is
  206. reserved and set to 1.
  207. vht_sig_a[1][7] is reserved and set to 1
  208. <legal 0-15>
  209. */
  210. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_OFFSET 0x0000000000000000
  211. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_LSB 36
  212. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_MSB 39
  213. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_MASK 0x000000f000000000
  214. /* Description BEAMFORMED
  215. For SU:
  216. Set to 1 if a Beamforming steering matrix is applied to
  217. the waveform in an SU transmission as described in IEEE802.11ac_D1.0
  218. Section 19.3.11.11.2 (Spatial mapping), set to 0 otherwise.
  219. For MU:
  220. Reserved and set to 1
  221. <legal 0-1>
  222. */
  223. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_OFFSET 0x0000000000000000
  224. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_LSB 40
  225. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_MSB 40
  226. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_MASK 0x0000010000000000
  227. /* Description VHTA_RESERVED_1
  228. Reserved and set to 1. <legal 1>
  229. */
  230. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_OFFSET 0x0000000000000000
  231. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_LSB 41
  232. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_MSB 41
  233. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_MASK 0x0000020000000000
  234. /* Description CRC
  235. CRC calculated as in IEEE802.11ac_D1.0 Section 19.3.9.4.4
  236. (CRC calculation for HTSIG) with C7 in vht_sig_a[1][10],
  237. etc. <legal all>
  238. */
  239. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_OFFSET 0x0000000000000000
  240. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_LSB 42
  241. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_MSB 49
  242. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_MASK 0x0003fc0000000000
  243. /* Description TAIL
  244. Used to terminate the trellis of the convolutional decoder.
  245. Set to 0. <legal 0>
  246. */
  247. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_OFFSET 0x0000000000000000
  248. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_LSB 50
  249. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_MSB 55
  250. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_MASK 0x00fc000000000000
  251. /* Description RESERVED_1
  252. This field is not part of HT-SIG:
  253. Reserved: Should be set to 0 by the MAC and ignored by the
  254. PHY <legal 0>
  255. */
  256. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_OFFSET 0x0000000000000000
  257. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_LSB 56
  258. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_MSB 62
  259. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_MASK 0x7f00000000000000
  260. /* Description RX_INTEGRITY_CHECK_PASSED
  261. TX side: Set to 0
  262. RX side: Set to 1 if PHY determines the VHT-SIG-A CRC check
  263. has passed, else set to 0
  264. <legal all>
  265. */
  266. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
  267. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 63
  268. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 63
  269. #define PHYRX_VHT_SIG_A_PHYRX_VHT_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x8000000000000000
  270. #endif // PHYRX_VHT_SIG_A