mactx_ht_sig.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _MACTX_HT_SIG_H_
  16. #define _MACTX_HT_SIG_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "ht_sig_info.h"
  20. #define NUM_OF_DWORDS_MACTX_HT_SIG 2
  21. #define NUM_OF_QWORDS_MACTX_HT_SIG 1
  22. struct mactx_ht_sig {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. struct ht_sig_info mactx_ht_sig_info_details;
  25. #else
  26. struct ht_sig_info mactx_ht_sig_info_details;
  27. #endif
  28. };
  29. /* Description MACTX_HT_SIG_INFO_DETAILS
  30. See detailed description of the STRUCT
  31. */
  32. /* Description MCS
  33. Modulation Coding Scheme:
  34. 0-7 are used for single stream
  35. 8-15 are used for 2 streams
  36. 16-23 are used for 3 streams
  37. 24-31 are used for 4 streams
  38. 32 is used for duplicate HT20 (unsupported)
  39. 33-76 is used for unequal modulation (unsupported)
  40. 77-127 is reserved.
  41. <legal 0-31>
  42. */
  43. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_OFFSET 0x0000000000000000
  44. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_LSB 0
  45. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_MSB 6
  46. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_MCS_MASK 0x000000000000007f
  47. /* Description CBW
  48. Packet bandwidth:
  49. <enum 0 ht_20_mhz>
  50. <enum 1 ht_40_mhz>
  51. <legal 0-1>
  52. */
  53. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_OFFSET 0x0000000000000000
  54. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_LSB 7
  55. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_MSB 7
  56. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CBW_MASK 0x0000000000000080
  57. /* Description LENGTH
  58. This is the MPDU or A-MPDU length in octets of the PPDU
  59. <legal all>
  60. */
  61. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_OFFSET 0x0000000000000000
  62. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_LSB 8
  63. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_MSB 23
  64. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_LENGTH_MASK 0x0000000000ffff00
  65. /* Description RESERVED_0
  66. This field is not part of HT-SIG
  67. Reserved: Should be set to 0 by the MAC and ignored by the
  68. PHY <legal 0>
  69. */
  70. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_OFFSET 0x0000000000000000
  71. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_LSB 24
  72. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_MSB 31
  73. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_0_MASK 0x00000000ff000000
  74. /* Description 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. <enum 1 no_smoothing> Indicates no smoothing is used
  79. <legal 1>
  80. */
  81. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_OFFSET 0x0000000000000000
  82. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_LSB 32
  83. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_MSB 32
  84. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SMOOTHING_MASK 0x0000000100000000
  85. /* Description NOT_SOUNDING
  86. E_num 0 sounding Unsupported setting: indicates sounding
  87. is used
  88. <enum 1 no_sounding> Indicates no sounding is used
  89. <legal 1>
  90. */
  91. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_OFFSET 0x0000000000000000
  92. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_LSB 33
  93. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MSB 33
  94. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MASK 0x0000000200000000
  95. /* Description HT_RESERVED
  96. Reserved: Should be set to 1 by the MAC and ignored by the
  97. PHY
  98. <legal 1>
  99. */
  100. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_OFFSET 0x0000000000000000
  101. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_LSB 34
  102. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_MSB 34
  103. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_HT_RESERVED_MASK 0x0000000400000000
  104. /* Description AGGREGATION
  105. <enum 0 mpdu> Indicates MPDU format
  106. <enum 1 a_mpdu> Indicates A-MPDU format
  107. <legal 0-1>
  108. */
  109. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_OFFSET 0x0000000000000000
  110. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_LSB 35
  111. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_MSB 35
  112. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_AGGREGATION_MASK 0x0000000800000000
  113. /* Description STBC
  114. <enum 0 no_stbc> Indicates no STBC
  115. <enum 1 1_str_stbc> Indicates 1 stream STBC
  116. E_num 2 2_str_stbc Indicates 2 stream STBC (Unsupported)
  117. <legal 0-1>
  118. */
  119. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_OFFSET 0x0000000000000000
  120. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_LSB 36
  121. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_MSB 37
  122. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_STBC_MASK 0x0000003000000000
  123. /* Description FEC_CODING
  124. <enum 0 ht_bcc> Indicates BCC coding
  125. <enum 1 ht_ldpc> Indicates LDPC coding
  126. <legal 0-1>
  127. */
  128. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_OFFSET 0x0000000000000000
  129. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_LSB 38
  130. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_MSB 38
  131. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_FEC_CODING_MASK 0x0000004000000000
  132. /* Description SHORT_GI
  133. <enum 0 ht_normal_gi> Indicates normal guard interval
  134. <enum 1 ht_short_gi> Indicates short guard interval
  135. <legal 0-1>
  136. */
  137. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_OFFSET 0x0000000000000000
  138. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_LSB 39
  139. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_MSB 39
  140. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SHORT_GI_MASK 0x0000008000000000
  141. /* Description NUM_EXT_SP_STR
  142. Number of extension spatial streams: (Used for TxBF)
  143. <enum 0 0_ext_sp_str> No extension spatial streams
  144. E_num 1 1_ext_sp_str Not supported: 1 extension spatial
  145. streams
  146. E_num 2 2_ext_sp_str Not supported: 2 extension spatial
  147. streams
  148. <legal 0>
  149. */
  150. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_OFFSET 0x0000000000000000
  151. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_LSB 40
  152. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MSB 41
  153. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MASK 0x0000030000000000
  154. /* Description CRC
  155. The CRC protects the HT-SIG (HT-SIG[0][23:0] and HT-SIG[1][9:0].
  156. The generator polynomial is G(D) = D8 + D2 + D + 1. <legal
  157. all>
  158. */
  159. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_OFFSET 0x0000000000000000
  160. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_LSB 42
  161. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_MSB 49
  162. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_CRC_MASK 0x0003fc0000000000
  163. /* Description SIGNAL_TAIL
  164. The 6 bits of tail is always set to 0 is used to flush the
  165. BCC encoder and decoder. <legal 0>
  166. */
  167. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_OFFSET 0x0000000000000000
  168. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_LSB 50
  169. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MSB 55
  170. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MASK 0x00fc000000000000
  171. /* Description RESERVED_1
  172. This field is not part of HT-SIG:
  173. Reserved: Should be set to 0 by the MAC and ignored by the
  174. PHY. <legal 0>
  175. */
  176. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_OFFSET 0x0000000000000000
  177. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_LSB 56
  178. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_MSB 62
  179. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RESERVED_1_MASK 0x7f00000000000000
  180. /* Description RX_INTEGRITY_CHECK_PASSED
  181. TX side: Set to 0
  182. RX side: Set to 1 if PHY determines the HT-SIG CRC check
  183. has passed, else set to 0
  184. <legal all>
  185. */
  186. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
  187. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 63
  188. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 63
  189. #define MACTX_HT_SIG_MACTX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x8000000000000000
  190. #endif // MACTX_HT_SIG