vht_sig_a_info.h 18 KB

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