phyrx_ht_sig.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. /*
  2. * Copyright (c) 2019, 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. #ifndef _PHYRX_HT_SIG_H_
  17. #define _PHYRX_HT_SIG_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "ht_sig_info.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0-1 struct ht_sig_info phyrx_ht_sig_info_details;
  25. //
  26. // ################ END SUMMARY #################
  27. #define NUM_OF_DWORDS_PHYRX_HT_SIG 2
  28. struct phyrx_ht_sig {
  29. struct ht_sig_info phyrx_ht_sig_info_details;
  30. };
  31. /*
  32. struct ht_sig_info phyrx_ht_sig_info_details
  33. See detailed description of the STRUCT
  34. */
  35. /* EXTERNAL REFERENCE : struct ht_sig_info phyrx_ht_sig_info_details */
  36. /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS
  37. Modulation Coding Scheme:
  38. 0-7 are used for single stream
  39. 8-15 are used for 2 streams
  40. 16-23 are used for 3 streams
  41. 24-31 are used for 4 streams
  42. 32 is used for duplicate HT20 (unsupported)
  43. 33-76 is used for unequal modulation (unsupported)
  44. 77-127 is reserved.
  45. <legal 0-31>
  46. */
  47. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_OFFSET 0x00000000
  48. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_LSB 0
  49. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_MCS_MASK 0x0000007f
  50. /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW
  51. Packet bandwidth:
  52. <enum 0 ht_20_mhz>
  53. <enum 1 ht_40_mhz>
  54. <legal 0-1>
  55. */
  56. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_OFFSET 0x00000000
  57. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_LSB 7
  58. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_CBW_MASK 0x00000080
  59. /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH
  60. This is the MPDU or A-MPDU length in octets of the PPDU
  61. <legal all>
  62. */
  63. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_OFFSET 0x00000000
  64. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_LSB 8
  65. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_LENGTH_MASK 0x00ffff00
  66. /* Description PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0
  67. This field is not part of HT-SIG
  68. Reserved: Should be set to 0 by the MAC and ignored by
  69. the PHY <legal 0>
  70. */
  71. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_OFFSET 0x00000000
  72. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_LSB 24
  73. #define PHYRX_HT_SIG_0_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_0_MASK 0xff000000
  74. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_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. */
  80. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_OFFSET 0x00000004
  81. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_LSB 0
  82. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SMOOTHING_MASK 0x00000001
  83. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING
  84. E_num 0 sounding Unsupported setting: indicates
  85. sounding is used
  86. <enum 1 no_sounding> Indicates no sounding is used
  87. <legal 1>
  88. */
  89. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_OFFSET 0x00000004
  90. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_LSB 1
  91. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NOT_SOUNDING_MASK 0x00000002
  92. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED
  93. Reserved: Should be set to 1 by the MAC and ignored by
  94. the PHY
  95. <legal 1>
  96. */
  97. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_OFFSET 0x00000004
  98. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_LSB 2
  99. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_HT_RESERVED_MASK 0x00000004
  100. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION
  101. <enum 0 mpdu> Indicates MPDU format
  102. <enum 1 a_mpdu> Indicates A-MPDU format
  103. <legal 0-1>
  104. */
  105. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_OFFSET 0x00000004
  106. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_LSB 3
  107. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_AGGREGATION_MASK 0x00000008
  108. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC
  109. <enum 0 no_stbc> Indicates no STBC
  110. <enum 1 1_str_stbc> Indicates 1 stream STBC
  111. E_num 2 2_str_stbc Indicates 2 stream STBC
  112. (Unsupported)
  113. <legal 0-1>
  114. */
  115. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_OFFSET 0x00000004
  116. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_LSB 4
  117. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_STBC_MASK 0x00000030
  118. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING
  119. <enum 0 ht_bcc> Indicates BCC coding
  120. <enum 1 ht_ldpc> Indicates LDPC coding
  121. <legal 0-1>
  122. */
  123. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_OFFSET 0x00000004
  124. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_LSB 6
  125. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_FEC_CODING_MASK 0x00000040
  126. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI
  127. <enum 0 ht_normal_gi> Indicates normal guard
  128. interval
  129. <legal 0-1>
  130. */
  131. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_OFFSET 0x00000004
  132. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_LSB 7
  133. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SHORT_GI_MASK 0x00000080
  134. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR
  135. Number of extension spatial streams: (Used for TxBF)
  136. <enum 0 0_ext_sp_str> No extension spatial streams
  137. E_num 1 1_ext_sp_str Not supported: 1 extension
  138. spatial streams
  139. E_num 2 2_ext_sp_str Not supported: 2 extension
  140. spatial streams
  141. <legal 0>
  142. */
  143. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_OFFSET 0x00000004
  144. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_LSB 8
  145. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_NUM_EXT_SP_STR_MASK 0x00000300
  146. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC
  147. The CRC protects the HT-SIG (HT-SIG[0][23:0] and
  148. HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
  149. D + 1. <legal all>
  150. */
  151. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_OFFSET 0x00000004
  152. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_LSB 10
  153. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_CRC_MASK 0x0003fc00
  154. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL
  155. The 6 bits of tail is always set to 0 is used to flush
  156. the BCC encoder and decoder. <legal 0>
  157. */
  158. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_OFFSET 0x00000004
  159. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_LSB 18
  160. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_SIGNAL_TAIL_MASK 0x00fc0000
  161. /* Description PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1
  162. This field is not part of HT-SIG:
  163. Reserved: Should be set to 0 by the MAC and ignored by
  164. the PHY. <legal 0>
  165. */
  166. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_OFFSET 0x00000004
  167. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_LSB 24
  168. #define PHYRX_HT_SIG_1_PHYRX_HT_SIG_INFO_DETAILS_RESERVED_1_MASK 0xff000000
  169. #endif // _PHYRX_HT_SIG_H_