ht_sig_info.h 11 KB

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