vht_sig_a_info.h 18 KB

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