vht_sig_a_info.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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 _VHT_SIG_A_INFO_H_
  21. #define _VHT_SIG_A_INFO_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 bandwidth[1:0], vhta_reserved_0[2], stbc[3], group_id[9:4], n_sts[21:10], txop_ps_not_allowed[22], vhta_reserved_0b[23], reserved_0[31:24]
  28. // 1 gi_setting[1:0], su_mu_coding[2], ldpc_extra_symbol[3], mcs[7:4], beamformed[8], vhta_reserved_1[9], crc[17:10], tail[23:18], reserved_1[31:24]
  29. //
  30. // ################ END SUMMARY #################
  31. #define NUM_OF_DWORDS_VHT_SIG_A_INFO 2
  32. struct vht_sig_a_info {
  33. uint32_t bandwidth : 2, //[1:0]
  34. vhta_reserved_0 : 1, //[2]
  35. stbc : 1, //[3]
  36. group_id : 6, //[9:4]
  37. n_sts : 12, //[21:10]
  38. txop_ps_not_allowed : 1, //[22]
  39. vhta_reserved_0b : 1, //[23]
  40. reserved_0 : 8; //[31:24]
  41. uint32_t gi_setting : 2, //[1:0]
  42. su_mu_coding : 1, //[2]
  43. ldpc_extra_symbol : 1, //[3]
  44. mcs : 4, //[7:4]
  45. beamformed : 1, //[8]
  46. vhta_reserved_1 : 1, //[9]
  47. crc : 8, //[17:10]
  48. tail : 6, //[23:18]
  49. reserved_1 : 8; //[31:24]
  50. };
  51. /*
  52. bandwidth
  53. Packet bandwidth
  54. <enum 0 20_MHZ_11AC>
  55. <enum 1 40_MHZ_11AC>
  56. <enum 2 80_MHZ_11AC>
  57. <enum 3 160_MHZ_11AC>
  58. <legal 0-3>
  59. vhta_reserved_0
  60. Reserved. Set to 1 by MAC, PHY should ignore
  61. <legal 1>
  62. stbc
  63. Space time block coding:
  64. <enum 0 stbc_disabled> Indicates STBC is disabled
  65. <enum 1 stbc_enabled> Indicates STBC is enabled on
  66. all streams
  67. <legal 0-1>
  68. group_id
  69. In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed
  70. to an AP or to a mesh STA, the Group ID field is set to 0,
  71. otherwise it is set to 63. In an NDP PPDU the Group ID is
  72. set according to IEEE 802.11ac_D1.0 Section 9.30.6
  73. (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group ID
  74. is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group ID).
  75. <legal all>
  76. n_sts
  77. For MU:
  78. 3 bits/user with maximum of 4 users (user u uses
  79. vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2,
  80. 3)
  81. Set to 0 for 0 space time streams
  82. Set to 1 for 1 space time stream
  83. Set to 2 for 2 space time streams
  84. Set to 3 for 3 space time streams
  85. Set to 4 for 4 space time streams (not supported in Wifi
  86. 3.0)
  87. Values 5-7 are reserved
  88. In this field, references to user u should be
  89. interpreted as MU user u. As described in the previous
  90. chapter in this document (see chapter on User number), the
  91. MU user value for a given client is defined for each MU
  92. group that the client participates in. The MU user number is
  93. not related to the internal user number that is used within
  94. 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
  109. intended recipient(s) of the frame (see IEEE802.11ac_D1.0
  110. Section 9.17a (Partial AID in VHT PPDUs)).
  111. <legal all>
  112. txop_ps_not_allowed
  113. E_num 0 txop_ps_allowed Not supported: If set to by
  114. VHT AP if it allows non-AP VHT STAs in TXOP power save mode
  115. to enter Doze state during a TXOP
  116. <enum 1 no_txop_ps_allowed> Otherwise
  117. <legal 1>
  118. vhta_reserved_0b
  119. Reserved: Should be set to 1 by the MAC and ignored by
  120. the PHY <legal 1>
  121. reserved_0
  122. This field is not part of HT-SIG:
  123. Reserved: Should be set to 0 by the MAC and ignored by
  124. the PHY <legal 0>
  125. gi_setting
  126. <enum 0 normal_gi> Indicates short guard interval
  127. is not used in the data field
  128. <enum 1 short_gi> Indicates short guard interval is
  129. used in the data field
  130. <enum 3 short_gi_ambiguity> Indicates short guard
  131. interval is used in the data field and NSYM mod 10 = 9
  132. NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3
  133. (TXTIME and PSDU_LENGTH calculation).
  134. <legal 0,1,3>
  135. su_mu_coding
  136. For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For
  137. an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then
  138. B2 indicates the coding used for user 0; set to 0 for BCC
  139. and 1 for LDPC. If the MU[0] NSTS field is 0, then this
  140. field is reserved and set to 1
  141. ldpc_extra_symbol
  142. Set to 1 if the LDPC PPDU encoding process (if an SU
  143. PPDU), or at least one LDPC user's PPDU encoding process (if
  144. an MU PPDU), results in an extra OFDM symbol (or symbols) as
  145. described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5
  146. (Encoding process for MU PPDUs). Set to 0 otherwise.
  147. mcs
  148. For SU:
  149. Set to 0 for BPSK 1/2
  150. Set to 1 for QPSK 1/2
  151. Set to 2 for QPSK 3/4
  152. Set to 3 for 16-QAM 1/2
  153. Set to 4 for 16-QAM 3/4
  154. Set to 5 for 64-QAM 2/3
  155. Set to 6 for 64-QAM 3/4
  156. Set to 7 for 64-QAM 5/6
  157. Set to 8 for 256-QAM 3/4
  158. Set to 9 for 256-QAM 5/6
  159. For MU:
  160. If NSTS for user 1 is non-zero, then vht_sig_a[1][4]
  161. indicates coding for user 1: set to 0 for BCC, 1 for LDPC.
  162. If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is
  163. reserved and set to 1.
  164. If NSTS for user 2 is non-zero, then vht_sig_a[1][5]
  165. indicates coding for user 2: set to 0 for BCC, 1 for LDPC.
  166. If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is
  167. reserved and set to 1.
  168. If NSTS for user 3 is non-zero, then vht_sig_a[1][6]
  169. indicates coding for user 3: set to 0 for BCC, 1 for LDPC.
  170. If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is
  171. reserved and set to 1.
  172. vht_sig_a[1][7] is reserved and set to 1
  173. <legal 0-15>
  174. beamformed
  175. For SU:
  176. Set to 1 if a Beamforming steering matrix is applied to
  177. the waveform in an SU transmission as described in
  178. IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping),
  179. set to 0 otherwise.
  180. For MU:
  181. Reserved and set to 1
  182. <legal 0-1>
  183. vhta_reserved_1
  184. Reserved and set to 1. <legal 1>
  185. crc
  186. CRC calculated as in IEEE802.11ac_D1.0 Section
  187. 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in
  188. vht_sig_a[1][10], etc. <legal all>
  189. tail
  190. Used to terminate the trellis of the convolutional
  191. decoder. Set to 0. <legal 0>
  192. reserved_1
  193. This field is not part of HT-SIG:
  194. Reserved: Should be set to 0 by the MAC and ignored by
  195. the PHY <legal 0>
  196. */
  197. /* Description VHT_SIG_A_INFO_0_BANDWIDTH
  198. Packet bandwidth
  199. <enum 0 20_MHZ_11AC>
  200. <enum 1 40_MHZ_11AC>
  201. <enum 2 80_MHZ_11AC>
  202. <enum 3 160_MHZ_11AC>
  203. <legal 0-3>
  204. */
  205. #define VHT_SIG_A_INFO_0_BANDWIDTH_OFFSET 0x00000000
  206. #define VHT_SIG_A_INFO_0_BANDWIDTH_LSB 0
  207. #define VHT_SIG_A_INFO_0_BANDWIDTH_MASK 0x00000003
  208. /* Description VHT_SIG_A_INFO_0_VHTA_RESERVED_0
  209. Reserved. Set to 1 by MAC, PHY should ignore
  210. <legal 1>
  211. */
  212. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_OFFSET 0x00000000
  213. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_LSB 2
  214. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_MASK 0x00000004
  215. /* Description VHT_SIG_A_INFO_0_STBC
  216. Space time block coding:
  217. <enum 0 stbc_disabled> Indicates STBC is disabled
  218. <enum 1 stbc_enabled> Indicates STBC is enabled on
  219. all streams
  220. <legal 0-1>
  221. */
  222. #define VHT_SIG_A_INFO_0_STBC_OFFSET 0x00000000
  223. #define VHT_SIG_A_INFO_0_STBC_LSB 3
  224. #define VHT_SIG_A_INFO_0_STBC_MASK 0x00000008
  225. /* Description VHT_SIG_A_INFO_0_GROUP_ID
  226. In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed
  227. to an AP or to a mesh STA, the Group ID field is set to 0,
  228. otherwise it is set to 63. In an NDP PPDU the Group ID is
  229. set according to IEEE 802.11ac_D1.0 Section 9.30.6
  230. (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group ID
  231. is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group ID).
  232. <legal all>
  233. */
  234. #define VHT_SIG_A_INFO_0_GROUP_ID_OFFSET 0x00000000
  235. #define VHT_SIG_A_INFO_0_GROUP_ID_LSB 4
  236. #define VHT_SIG_A_INFO_0_GROUP_ID_MASK 0x000003f0
  237. /* Description VHT_SIG_A_INFO_0_N_STS
  238. For MU:
  239. 3 bits/user with maximum of 4 users (user u uses
  240. vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2,
  241. 3)
  242. Set to 0 for 0 space time streams
  243. Set to 1 for 1 space time stream
  244. Set to 2 for 2 space time streams
  245. Set to 3 for 3 space time streams
  246. Set to 4 for 4 space time streams (not supported in Wifi
  247. 3.0)
  248. Values 5-7 are reserved
  249. In this field, references to user u should be
  250. interpreted as MU user u. As described in the previous
  251. chapter in this document (see chapter on User number), the
  252. MU user value for a given client is defined for each MU
  253. group that the client participates in. The MU user number is
  254. not related to the internal user number that is used within
  255. the BFer.
  256. For SU:
  257. vht_sig_a[0][12:10]
  258. Set to 0 for 1 space time stream
  259. Set to 1 for 2 space time streams
  260. Set to 2 for 3 space time streams
  261. Set to 3 for 4 space time streams
  262. Set to 4 for 5 space time streams
  263. Set to 5 for 6 space time streams
  264. Set to 6 for 7 space time streams
  265. Set to 7 for 8 space time streams
  266. vht_sig_a[0][21:13]
  267. Partial AID:
  268. Set to the value of the TXVECTOR parameter PARTIAL_AID.
  269. Partial AID provides an abbreviated indication of the
  270. intended recipient(s) of the frame (see IEEE802.11ac_D1.0
  271. Section 9.17a (Partial AID in VHT PPDUs)).
  272. <legal all>
  273. */
  274. #define VHT_SIG_A_INFO_0_N_STS_OFFSET 0x00000000
  275. #define VHT_SIG_A_INFO_0_N_STS_LSB 10
  276. #define VHT_SIG_A_INFO_0_N_STS_MASK 0x003ffc00
  277. /* Description VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED
  278. E_num 0 txop_ps_allowed Not supported: If set to by
  279. VHT AP if it allows non-AP VHT STAs in TXOP power save mode
  280. to enter Doze state during a TXOP
  281. <enum 1 no_txop_ps_allowed> Otherwise
  282. <legal 1>
  283. */
  284. #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_OFFSET 0x00000000
  285. #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_LSB 22
  286. #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_MASK 0x00400000
  287. /* Description VHT_SIG_A_INFO_0_VHTA_RESERVED_0B
  288. Reserved: Should be set to 1 by the MAC and ignored by
  289. the PHY <legal 1>
  290. */
  291. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_OFFSET 0x00000000
  292. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_LSB 23
  293. #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_MASK 0x00800000
  294. /* Description VHT_SIG_A_INFO_0_RESERVED_0
  295. This field is not part of HT-SIG:
  296. Reserved: Should be set to 0 by the MAC and ignored by
  297. the PHY <legal 0>
  298. */
  299. #define VHT_SIG_A_INFO_0_RESERVED_0_OFFSET 0x00000000
  300. #define VHT_SIG_A_INFO_0_RESERVED_0_LSB 24
  301. #define VHT_SIG_A_INFO_0_RESERVED_0_MASK 0xff000000
  302. /* Description VHT_SIG_A_INFO_1_GI_SETTING
  303. <enum 0 normal_gi> Indicates short guard interval
  304. is not used in the data field
  305. <enum 1 short_gi> Indicates short guard interval is
  306. used in the data field
  307. <enum 3 short_gi_ambiguity> Indicates short guard
  308. interval is used in the data field and NSYM mod 10 = 9
  309. NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3
  310. (TXTIME and PSDU_LENGTH calculation).
  311. <legal 0,1,3>
  312. */
  313. #define VHT_SIG_A_INFO_1_GI_SETTING_OFFSET 0x00000004
  314. #define VHT_SIG_A_INFO_1_GI_SETTING_LSB 0
  315. #define VHT_SIG_A_INFO_1_GI_SETTING_MASK 0x00000003
  316. /* Description VHT_SIG_A_INFO_1_SU_MU_CODING
  317. For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For
  318. an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then
  319. B2 indicates the coding used for user 0; set to 0 for BCC
  320. and 1 for LDPC. If the MU[0] NSTS field is 0, then this
  321. field is reserved and set to 1
  322. */
  323. #define VHT_SIG_A_INFO_1_SU_MU_CODING_OFFSET 0x00000004
  324. #define VHT_SIG_A_INFO_1_SU_MU_CODING_LSB 2
  325. #define VHT_SIG_A_INFO_1_SU_MU_CODING_MASK 0x00000004
  326. /* Description VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL
  327. Set to 1 if the LDPC PPDU encoding process (if an SU
  328. PPDU), or at least one LDPC user's PPDU encoding process (if
  329. an MU PPDU), results in an extra OFDM symbol (or symbols) as
  330. described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5
  331. (Encoding process for MU PPDUs). Set to 0 otherwise.
  332. */
  333. #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004
  334. #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_LSB 3
  335. #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_MASK 0x00000008
  336. /* Description VHT_SIG_A_INFO_1_MCS
  337. For SU:
  338. Set to 0 for BPSK 1/2
  339. Set to 1 for QPSK 1/2
  340. Set to 2 for QPSK 3/4
  341. Set to 3 for 16-QAM 1/2
  342. Set to 4 for 16-QAM 3/4
  343. Set to 5 for 64-QAM 2/3
  344. Set to 6 for 64-QAM 3/4
  345. Set to 7 for 64-QAM 5/6
  346. Set to 8 for 256-QAM 3/4
  347. Set to 9 for 256-QAM 5/6
  348. For MU:
  349. If NSTS for user 1 is non-zero, then vht_sig_a[1][4]
  350. indicates coding for user 1: set to 0 for BCC, 1 for LDPC.
  351. If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is
  352. reserved and set to 1.
  353. If NSTS for user 2 is non-zero, then vht_sig_a[1][5]
  354. indicates coding for user 2: set to 0 for BCC, 1 for LDPC.
  355. If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is
  356. reserved and set to 1.
  357. If NSTS for user 3 is non-zero, then vht_sig_a[1][6]
  358. indicates coding for user 3: set to 0 for BCC, 1 for LDPC.
  359. If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is
  360. reserved and set to 1.
  361. vht_sig_a[1][7] is reserved and set to 1
  362. <legal 0-15>
  363. */
  364. #define VHT_SIG_A_INFO_1_MCS_OFFSET 0x00000004
  365. #define VHT_SIG_A_INFO_1_MCS_LSB 4
  366. #define VHT_SIG_A_INFO_1_MCS_MASK 0x000000f0
  367. /* Description VHT_SIG_A_INFO_1_BEAMFORMED
  368. For SU:
  369. Set to 1 if a Beamforming steering matrix is applied to
  370. the waveform in an SU transmission as described in
  371. IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping),
  372. set to 0 otherwise.
  373. For MU:
  374. Reserved and set to 1
  375. <legal 0-1>
  376. */
  377. #define VHT_SIG_A_INFO_1_BEAMFORMED_OFFSET 0x00000004
  378. #define VHT_SIG_A_INFO_1_BEAMFORMED_LSB 8
  379. #define VHT_SIG_A_INFO_1_BEAMFORMED_MASK 0x00000100
  380. /* Description VHT_SIG_A_INFO_1_VHTA_RESERVED_1
  381. Reserved and set to 1. <legal 1>
  382. */
  383. #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_OFFSET 0x00000004
  384. #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_LSB 9
  385. #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_MASK 0x00000200
  386. /* Description VHT_SIG_A_INFO_1_CRC
  387. CRC calculated as in IEEE802.11ac_D1.0 Section
  388. 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in
  389. vht_sig_a[1][10], etc. <legal all>
  390. */
  391. #define VHT_SIG_A_INFO_1_CRC_OFFSET 0x00000004
  392. #define VHT_SIG_A_INFO_1_CRC_LSB 10
  393. #define VHT_SIG_A_INFO_1_CRC_MASK 0x0003fc00
  394. /* Description VHT_SIG_A_INFO_1_TAIL
  395. Used to terminate the trellis of the convolutional
  396. decoder. Set to 0. <legal 0>
  397. */
  398. #define VHT_SIG_A_INFO_1_TAIL_OFFSET 0x00000004
  399. #define VHT_SIG_A_INFO_1_TAIL_LSB 18
  400. #define VHT_SIG_A_INFO_1_TAIL_MASK 0x00fc0000
  401. /* Description VHT_SIG_A_INFO_1_RESERVED_1
  402. This field is not part of HT-SIG:
  403. Reserved: Should be set to 0 by the MAC and ignored by
  404. the PHY <legal 0>
  405. */
  406. #define VHT_SIG_A_INFO_1_RESERVED_1_OFFSET 0x00000004
  407. #define VHT_SIG_A_INFO_1_RESERVED_1_LSB 24
  408. #define VHT_SIG_A_INFO_1_RESERVED_1_MASK 0xff000000
  409. #endif // _VHT_SIG_A_INFO_H_