phyrx_ht_sig.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #ifndef _PHYRX_HT_SIG_H_
  17. #define _PHYRX_HT_SIG_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "ht_sig_info.h"
  21. #define NUM_OF_DWORDS_PHYRX_HT_SIG 2
  22. #define NUM_OF_QWORDS_PHYRX_HT_SIG 1
  23. struct phyrx_ht_sig {
  24. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  25. struct ht_sig_info phyrx_ht_sig_info_details;
  26. #else
  27. struct ht_sig_info phyrx_ht_sig_info_details;
  28. #endif
  29. };
  30. /* Description PHYRX_HT_SIG_INFO_DETAILS
  31. See detailed description of the STRUCT
  32. */
  33. /* Description MCS
  34. Modulation Coding Scheme:
  35. 0-7 are used for single stream
  36. 8-15 are used for 2 streams
  37. 16-23 are used for 3 streams
  38. 24-31 are used for 4 streams
  39. 32 is used for duplicate HT20 (unsupported)
  40. 33-76 is used for unequal modulation (unsupported)
  41. 77-127 is reserved.
  42. <legal 0-31>
  43. */
  44. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_MCS_OFFSET 0x0000000000000000
  45. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_MCS_LSB 0
  46. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_MCS_MSB 6
  47. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_MCS_MASK 0x000000000000007f
  48. /* Description CBW
  49. Packet bandwidth:
  50. <enum 0 ht_20_mhz>
  51. <enum 1 ht_40_mhz>
  52. <legal 0-1>
  53. */
  54. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CBW_OFFSET 0x0000000000000000
  55. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CBW_LSB 7
  56. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CBW_MSB 7
  57. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CBW_MASK 0x0000000000000080
  58. /* Description LENGTH
  59. This is the MPDU or A-MPDU length in octets of the PPDU
  60. <legal all>
  61. */
  62. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_OFFSET 0x0000000000000000
  63. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_LSB 8
  64. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_MSB 23
  65. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_MASK 0x0000000000ffff00
  66. /* Description RESERVED_0
  67. This field is not part of HT-SIG
  68. Reserved: Should be set to 0 by the MAC and ignored by the
  69. PHY <legal 0>
  70. */
  71. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_OFFSET 0x0000000000000000
  72. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_LSB 24
  73. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_MSB 31
  74. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_MASK 0x00000000ff000000
  75. /* Description SMOOTHING
  76. Field indicates if smoothing is needed
  77. E_num 0 do_smoothing Unsupported setting: indicates
  78. smoothing is often used for beamforming
  79. <enum 1 no_smoothing> Indicates no smoothing is used
  80. <legal 1>
  81. */
  82. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_OFFSET 0x0000000000000000
  83. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_LSB 32
  84. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_MSB 32
  85. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_MASK 0x0000000100000000
  86. /* Description NOT_SOUNDING
  87. E_num 0 sounding Unsupported setting: indicates sounding
  88. is used
  89. <enum 1 no_sounding> Indicates no sounding is used
  90. <legal 1>
  91. */
  92. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_OFFSET 0x0000000000000000
  93. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_LSB 33
  94. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MSB 33
  95. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MASK 0x0000000200000000
  96. /* Description HT_RESERVED
  97. Reserved: Should be set to 1 by the MAC and ignored by the
  98. PHY
  99. <legal 1>
  100. */
  101. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_OFFSET 0x0000000000000000
  102. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_LSB 34
  103. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_MSB 34
  104. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_MASK 0x0000000400000000
  105. /* Description AGGREGATION
  106. <enum 0 mpdu> Indicates MPDU format
  107. <enum 1 a_mpdu> Indicates A-MPDU format
  108. <legal 0-1>
  109. */
  110. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_OFFSET 0x0000000000000000
  111. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_LSB 35
  112. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_MSB 35
  113. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_MASK 0x0000000800000000
  114. /* Description STBC
  115. <enum 0 no_stbc> Indicates no STBC
  116. <enum 1 1_str_stbc> Indicates 1 stream STBC
  117. E_num 2 2_str_stbc Indicates 2 stream STBC (Unsupported)
  118. <legal 0-1>
  119. */
  120. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_STBC_OFFSET 0x0000000000000000
  121. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_STBC_LSB 36
  122. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_STBC_MSB 37
  123. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_STBC_MASK 0x0000003000000000
  124. /* Description FEC_CODING
  125. <enum 0 ht_bcc> Indicates BCC coding
  126. <enum 1 ht_ldpc> Indicates LDPC coding
  127. <legal 0-1>
  128. */
  129. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_OFFSET 0x0000000000000000
  130. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_LSB 38
  131. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_MSB 38
  132. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_MASK 0x0000004000000000
  133. /* Description SHORT_GI
  134. <enum 0 ht_normal_gi> Indicates normal guard interval
  135. <enum 1 ht_short_gi> Indicates short guard interval
  136. <legal 0-1>
  137. */
  138. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_OFFSET 0x0000000000000000
  139. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_LSB 39
  140. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_MSB 39
  141. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_MASK 0x0000008000000000
  142. /* Description NUM_EXT_SP_STR
  143. Number of extension spatial streams: (Used for TxBF)
  144. <enum 0 0_ext_sp_str> No extension spatial streams
  145. E_num 1 1_ext_sp_str Not supported: 1 extension spatial
  146. streams
  147. E_num 2 2_ext_sp_str Not supported: 2 extension spatial
  148. streams
  149. <legal 0>
  150. */
  151. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_OFFSET 0x0000000000000000
  152. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_LSB 40
  153. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MSB 41
  154. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MASK 0x0000030000000000
  155. /* Description CRC
  156. The CRC protects the HT-SIG (HT-SIG[0][23:0] and HT-SIG[1][9:0].
  157. The generator polynomial is G(D) = D8 + D2 + D + 1. <legal
  158. all>
  159. */
  160. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CRC_OFFSET 0x0000000000000000
  161. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CRC_LSB 42
  162. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CRC_MSB 49
  163. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_CRC_MASK 0x0003fc0000000000
  164. /* Description SIGNAL_TAIL
  165. The 6 bits of tail is always set to 0 is used to flush the
  166. BCC encoder and decoder. <legal 0>
  167. */
  168. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_OFFSET 0x0000000000000000
  169. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_LSB 50
  170. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MSB 55
  171. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MASK 0x00fc000000000000
  172. /* Description RESERVED_1
  173. This field is not part of HT-SIG:
  174. Reserved: Should be set to 0 by the MAC and ignored by the
  175. PHY. <legal 0>
  176. */
  177. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_OFFSET 0x0000000000000000
  178. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_LSB 56
  179. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_MSB 62
  180. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_MASK 0x7f00000000000000
  181. /* Description RX_INTEGRITY_CHECK_PASSED
  182. TX side: Set to 0
  183. RX side: Set to 1 if PHY determines the HT-SIG CRC check
  184. has passed, else set to 0
  185. <legal all>
  186. */
  187. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
  188. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 63
  189. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 63
  190. #define PHYRX_HT_SIG_PHYRX_HT_SIG_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x8000000000000000
  191. #endif // PHYRX_HT_SIG