ht_sig_info.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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 _HT_SIG_INFO_H_
  21. #define _HT_SIG_INFO_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 mcs[6:0], cbw[7], length[23:8], reserved_0[31:24]
  28. // 1 smoothing[0], not_sounding[1], ht_reserved[2], aggregation[3], stbc[5:4], fec_coding[6], short_gi[7], num_ext_sp_str[9:8], crc[17:10], signal_tail[23:18], reserved_1[31:24]
  29. //
  30. // ################ END SUMMARY #################
  31. #define NUM_OF_DWORDS_HT_SIG_INFO 2
  32. struct ht_sig_info {
  33. uint32_t mcs : 7, //[6:0]
  34. cbw : 1, //[7]
  35. length : 16, //[23:8]
  36. reserved_0 : 8; //[31:24]
  37. uint32_t smoothing : 1, //[0]
  38. not_sounding : 1, //[1]
  39. ht_reserved : 1, //[2]
  40. aggregation : 1, //[3]
  41. stbc : 2, //[5:4]
  42. fec_coding : 1, //[6]
  43. short_gi : 1, //[7]
  44. num_ext_sp_str : 2, //[9:8]
  45. crc : 8, //[17:10]
  46. signal_tail : 6, //[23:18]
  47. reserved_1 : 8; //[31:24]
  48. };
  49. /*
  50. mcs
  51. Modulation Coding Scheme:
  52. 0-7 are used for single stream
  53. 8-15 are used for 2 streams
  54. 16-23 are used for 3 streams
  55. 24-31 are used for 4 streams
  56. 32 is used for duplicate HT20 (unsupported)
  57. 33-76 is used for unequal modulation (unsupported)
  58. 77-127 is reserved.
  59. <legal 0-31>
  60. cbw
  61. Packet bandwidth:
  62. <enum 0 ht_20_mhz>
  63. <enum 1 ht_40_mhz>
  64. <legal 0-1>
  65. length
  66. This is the MPDU or A-MPDU length in octets of the PPDU
  67. <legal all>
  68. reserved_0
  69. This field is not part of HT-SIG
  70. Reserved: Should be set to 0 by the MAC and ignored by
  71. the PHY <legal 0>
  72. smoothing
  73. Field indicates if smoothing is needed
  74. E_num 0 do_smoothing Unsupported setting: indicates
  75. smoothing is often used for beamforming
  76. <legal 1>
  77. not_sounding
  78. E_num 0 sounding Unsupported setting: indicates
  79. sounding is used
  80. <enum 1 no_sounding> Indicates no sounding is used
  81. <legal 1>
  82. ht_reserved
  83. Reserved: Should be set to 1 by the MAC and ignored by
  84. the PHY
  85. <legal 1>
  86. aggregation
  87. <enum 0 mpdu> Indicates MPDU format
  88. <enum 1 a_mpdu> Indicates A-MPDU format
  89. <legal 0-1>
  90. stbc
  91. <enum 0 no_stbc> Indicates no STBC
  92. <enum 1 1_str_stbc> Indicates 1 stream STBC
  93. E_num 2 2_str_stbc Indicates 2 stream STBC
  94. (Unsupported)
  95. <legal 0-1>
  96. fec_coding
  97. <enum 0 ht_bcc> Indicates BCC coding
  98. <enum 1 ht_ldpc> Indicates LDPC coding
  99. <legal 0-1>
  100. short_gi
  101. <enum 0 ht_normal_gi> Indicates normal guard
  102. interval
  103. <legal 0-1>
  104. num_ext_sp_str
  105. Number of extension spatial streams: (Used for TxBF)
  106. <enum 0 0_ext_sp_str> No extension spatial streams
  107. E_num 1 1_ext_sp_str Not supported: 1 extension
  108. spatial streams
  109. E_num 2 2_ext_sp_str Not supported: 2 extension
  110. spatial streams
  111. <legal 0>
  112. crc
  113. The CRC protects the HT-SIG (HT-SIG[0][23:0] and
  114. HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
  115. D + 1. <legal all>
  116. signal_tail
  117. The 6 bits of tail is always set to 0 is used to flush
  118. the BCC encoder and decoder. <legal 0>
  119. reserved_1
  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. */
  124. /* Description HT_SIG_INFO_0_MCS
  125. Modulation Coding Scheme:
  126. 0-7 are used for single stream
  127. 8-15 are used for 2 streams
  128. 16-23 are used for 3 streams
  129. 24-31 are used for 4 streams
  130. 32 is used for duplicate HT20 (unsupported)
  131. 33-76 is used for unequal modulation (unsupported)
  132. 77-127 is reserved.
  133. <legal 0-31>
  134. */
  135. #define HT_SIG_INFO_0_MCS_OFFSET 0x00000000
  136. #define HT_SIG_INFO_0_MCS_LSB 0
  137. #define HT_SIG_INFO_0_MCS_MASK 0x0000007f
  138. /* Description HT_SIG_INFO_0_CBW
  139. Packet bandwidth:
  140. <enum 0 ht_20_mhz>
  141. <enum 1 ht_40_mhz>
  142. <legal 0-1>
  143. */
  144. #define HT_SIG_INFO_0_CBW_OFFSET 0x00000000
  145. #define HT_SIG_INFO_0_CBW_LSB 7
  146. #define HT_SIG_INFO_0_CBW_MASK 0x00000080
  147. /* Description HT_SIG_INFO_0_LENGTH
  148. This is the MPDU or A-MPDU length in octets of the PPDU
  149. <legal all>
  150. */
  151. #define HT_SIG_INFO_0_LENGTH_OFFSET 0x00000000
  152. #define HT_SIG_INFO_0_LENGTH_LSB 8
  153. #define HT_SIG_INFO_0_LENGTH_MASK 0x00ffff00
  154. /* Description HT_SIG_INFO_0_RESERVED_0
  155. This field is not part of HT-SIG
  156. Reserved: Should be set to 0 by the MAC and ignored by
  157. the PHY <legal 0>
  158. */
  159. #define HT_SIG_INFO_0_RESERVED_0_OFFSET 0x00000000
  160. #define HT_SIG_INFO_0_RESERVED_0_LSB 24
  161. #define HT_SIG_INFO_0_RESERVED_0_MASK 0xff000000
  162. /* Description HT_SIG_INFO_1_SMOOTHING
  163. Field indicates if smoothing is needed
  164. E_num 0 do_smoothing Unsupported setting: indicates
  165. smoothing is often used for beamforming
  166. <legal 1>
  167. */
  168. #define HT_SIG_INFO_1_SMOOTHING_OFFSET 0x00000004
  169. #define HT_SIG_INFO_1_SMOOTHING_LSB 0
  170. #define HT_SIG_INFO_1_SMOOTHING_MASK 0x00000001
  171. /* Description HT_SIG_INFO_1_NOT_SOUNDING
  172. E_num 0 sounding Unsupported setting: indicates
  173. sounding is used
  174. <enum 1 no_sounding> Indicates no sounding is used
  175. <legal 1>
  176. */
  177. #define HT_SIG_INFO_1_NOT_SOUNDING_OFFSET 0x00000004
  178. #define HT_SIG_INFO_1_NOT_SOUNDING_LSB 1
  179. #define HT_SIG_INFO_1_NOT_SOUNDING_MASK 0x00000002
  180. /* Description HT_SIG_INFO_1_HT_RESERVED
  181. Reserved: Should be set to 1 by the MAC and ignored by
  182. the PHY
  183. <legal 1>
  184. */
  185. #define HT_SIG_INFO_1_HT_RESERVED_OFFSET 0x00000004
  186. #define HT_SIG_INFO_1_HT_RESERVED_LSB 2
  187. #define HT_SIG_INFO_1_HT_RESERVED_MASK 0x00000004
  188. /* Description HT_SIG_INFO_1_AGGREGATION
  189. <enum 0 mpdu> Indicates MPDU format
  190. <enum 1 a_mpdu> Indicates A-MPDU format
  191. <legal 0-1>
  192. */
  193. #define HT_SIG_INFO_1_AGGREGATION_OFFSET 0x00000004
  194. #define HT_SIG_INFO_1_AGGREGATION_LSB 3
  195. #define HT_SIG_INFO_1_AGGREGATION_MASK 0x00000008
  196. /* Description HT_SIG_INFO_1_STBC
  197. <enum 0 no_stbc> Indicates no STBC
  198. <enum 1 1_str_stbc> Indicates 1 stream STBC
  199. E_num 2 2_str_stbc Indicates 2 stream STBC
  200. (Unsupported)
  201. <legal 0-1>
  202. */
  203. #define HT_SIG_INFO_1_STBC_OFFSET 0x00000004
  204. #define HT_SIG_INFO_1_STBC_LSB 4
  205. #define HT_SIG_INFO_1_STBC_MASK 0x00000030
  206. /* Description HT_SIG_INFO_1_FEC_CODING
  207. <enum 0 ht_bcc> Indicates BCC coding
  208. <enum 1 ht_ldpc> Indicates LDPC coding
  209. <legal 0-1>
  210. */
  211. #define HT_SIG_INFO_1_FEC_CODING_OFFSET 0x00000004
  212. #define HT_SIG_INFO_1_FEC_CODING_LSB 6
  213. #define HT_SIG_INFO_1_FEC_CODING_MASK 0x00000040
  214. /* Description HT_SIG_INFO_1_SHORT_GI
  215. <enum 0 ht_normal_gi> Indicates normal guard
  216. interval
  217. <legal 0-1>
  218. */
  219. #define HT_SIG_INFO_1_SHORT_GI_OFFSET 0x00000004
  220. #define HT_SIG_INFO_1_SHORT_GI_LSB 7
  221. #define HT_SIG_INFO_1_SHORT_GI_MASK 0x00000080
  222. /* Description HT_SIG_INFO_1_NUM_EXT_SP_STR
  223. Number of extension spatial streams: (Used for TxBF)
  224. <enum 0 0_ext_sp_str> No extension spatial streams
  225. E_num 1 1_ext_sp_str Not supported: 1 extension
  226. spatial streams
  227. E_num 2 2_ext_sp_str Not supported: 2 extension
  228. spatial streams
  229. <legal 0>
  230. */
  231. #define HT_SIG_INFO_1_NUM_EXT_SP_STR_OFFSET 0x00000004
  232. #define HT_SIG_INFO_1_NUM_EXT_SP_STR_LSB 8
  233. #define HT_SIG_INFO_1_NUM_EXT_SP_STR_MASK 0x00000300
  234. /* Description HT_SIG_INFO_1_CRC
  235. The CRC protects the HT-SIG (HT-SIG[0][23:0] and
  236. HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
  237. D + 1. <legal all>
  238. */
  239. #define HT_SIG_INFO_1_CRC_OFFSET 0x00000004
  240. #define HT_SIG_INFO_1_CRC_LSB 10
  241. #define HT_SIG_INFO_1_CRC_MASK 0x0003fc00
  242. /* Description HT_SIG_INFO_1_SIGNAL_TAIL
  243. The 6 bits of tail is always set to 0 is used to flush
  244. the BCC encoder and decoder. <legal 0>
  245. */
  246. #define HT_SIG_INFO_1_SIGNAL_TAIL_OFFSET 0x00000004
  247. #define HT_SIG_INFO_1_SIGNAL_TAIL_LSB 18
  248. #define HT_SIG_INFO_1_SIGNAL_TAIL_MASK 0x00fc0000
  249. /* Description HT_SIG_INFO_1_RESERVED_1
  250. This field is not part of HT-SIG:
  251. Reserved: Should be set to 0 by the MAC and ignored by
  252. the PHY. <legal 0>
  253. */
  254. #define HT_SIG_INFO_1_RESERVED_1_OFFSET 0x00000004
  255. #define HT_SIG_INFO_1_RESERVED_1_LSB 24
  256. #define HT_SIG_INFO_1_RESERVED_1_MASK 0xff000000
  257. #endif // _HT_SIG_INFO_H_