ht_sig_info.h 11 KB

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