vht_sig_a_info.h 18 KB

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