vht_sig_a_info.h 18 KB

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