l_sig_a_info.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. /*
  2. * Copyright (c) 2021 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. // $ATH_LICENSE_HW_HDR_C$
  17. //
  18. // DO NOT EDIT! This file is automatically generated
  19. // These definitions are tied to a particular hardware layout
  20. #ifndef _L_SIG_A_INFO_H_
  21. #define _L_SIG_A_INFO_H_
  22. #if !defined(__ASSEMBLER__)
  23. #endif
  24. // ################ START SUMMARY #################
  25. //
  26. // Dword Fields
  27. // 0 rate[3:0], lsig_reserved[4], length[16:5], parity[17], tail[23:18], pkt_type[27:24], captured_implicit_sounding[28], reserved[31:29]
  28. //
  29. // ################ END SUMMARY #################
  30. #define NUM_OF_DWORDS_L_SIG_A_INFO 1
  31. struct l_sig_a_info {
  32. uint32_t rate : 4, //[3:0]
  33. lsig_reserved : 1, //[4]
  34. length : 12, //[16:5]
  35. parity : 1, //[17]
  36. tail : 6, //[23:18]
  37. pkt_type : 4, //[27:24]
  38. captured_implicit_sounding : 1, //[28]
  39. reserved : 3; //[31:29]
  40. };
  41. /*
  42. rate
  43. This format is originally defined for OFDM as a 4 bit
  44. field but the 5th bit was added to indicate 11b formatted
  45. frames. In the standard bit [4] is specified as reserved.
  46. For 11b frames this L-SIG is transformed in the PHY into the
  47. 11b preamble format. The following are the rates:
  48. <enum 8 ofdm_48_mbps> 64-QAM 2/3 (48 Mbps)
  49. <enum 9 ofdm_24_mbps> 16-QAM 1/2 (24 Mbps)
  50. <enum 10 ofdm_12_mbps> QPSK 1/2 (12 Mbps)
  51. <enum 11 ofdm_6_mbps> BPSK 1/2 (6 Mbps)
  52. <enum 12 ofdm_54_mbps> 64-QAM 3/4 (54 Mbps)
  53. <enum 13 ofdm_36_mbps> 16-QAM 3/4 (36 Mbps)
  54. <enum 14 ofdm_18_mbps> QPSK 1/2 (18 Mbps)
  55. <enum 15 ofdm_9_mbps> BPSK 3/4 (9 Mbps)
  56. <legal 8-15>
  57. lsig_reserved
  58. Reserved: Should be set to 0 by the MAC and ignored by
  59. the PHY
  60. <legal 0>
  61. length
  62. The length indicates the number of octets in this MPDU.
  63. Note that when using mixed mode 11n preamble this length
  64. provides the spoofed length for the PPDU. This length
  65. provides part of the information to derive the actually PPDU
  66. length. For legacy OFDM and 11B frames the maximum length
  67. is
  68. <legal all>
  69. parity
  70. 11a/n/ac TX: This field provides even parity over the
  71. first 18 bits of the signal field which means that the sum
  72. of 1s in the signal field will always be even on
  73. 11a/n/ac RX: this field contains the received parity
  74. field from the L-SIG symbol for the current packet.
  75. <legal 0-1>
  76. tail
  77. The 6 bits of tail is always set to 0 is used to flush
  78. the BCC encoder and decoder. <legal 0>
  79. pkt_type
  80. Only used on the RX side.
  81. Note: This is not really part of L-SIG
  82. Packet type:
  83. <enum 0 dot11a>802.11a PPDU type
  84. <enum 1 dot11b>802.11b PPDU type
  85. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  86. <enum 3 dot11ac>802.11ac PPDU type
  87. <enum 4 dot11ax>802.11ax PPDU type
  88. captured_implicit_sounding
  89. Only used on the RX side.
  90. Note: This is not really part of L-SIG
  91. This indicates that the PHY has captured implicit
  92. sounding.
  93. reserved
  94. Reserved: Should be set to 0 by the transmitting MAC and
  95. ignored by the PHY <legal 0>
  96. */
  97. /* Description L_SIG_A_INFO_0_RATE
  98. This format is originally defined for OFDM as a 4 bit
  99. field but the 5th bit was added to indicate 11b formatted
  100. frames. In the standard bit [4] is specified as reserved.
  101. For 11b frames this L-SIG is transformed in the PHY into the
  102. 11b preamble format. The following are the rates:
  103. <enum 8 ofdm_48_mbps> 64-QAM 2/3 (48 Mbps)
  104. <enum 9 ofdm_24_mbps> 16-QAM 1/2 (24 Mbps)
  105. <enum 10 ofdm_12_mbps> QPSK 1/2 (12 Mbps)
  106. <enum 11 ofdm_6_mbps> BPSK 1/2 (6 Mbps)
  107. <enum 12 ofdm_54_mbps> 64-QAM 3/4 (54 Mbps)
  108. <enum 13 ofdm_36_mbps> 16-QAM 3/4 (36 Mbps)
  109. <enum 14 ofdm_18_mbps> QPSK 1/2 (18 Mbps)
  110. <enum 15 ofdm_9_mbps> BPSK 3/4 (9 Mbps)
  111. <legal 8-15>
  112. */
  113. #define L_SIG_A_INFO_0_RATE_OFFSET 0x00000000
  114. #define L_SIG_A_INFO_0_RATE_LSB 0
  115. #define L_SIG_A_INFO_0_RATE_MASK 0x0000000f
  116. /* Description L_SIG_A_INFO_0_LSIG_RESERVED
  117. Reserved: Should be set to 0 by the MAC and ignored by
  118. the PHY
  119. <legal 0>
  120. */
  121. #define L_SIG_A_INFO_0_LSIG_RESERVED_OFFSET 0x00000000
  122. #define L_SIG_A_INFO_0_LSIG_RESERVED_LSB 4
  123. #define L_SIG_A_INFO_0_LSIG_RESERVED_MASK 0x00000010
  124. /* Description L_SIG_A_INFO_0_LENGTH
  125. The length indicates the number of octets in this MPDU.
  126. Note that when using mixed mode 11n preamble this length
  127. provides the spoofed length for the PPDU. This length
  128. provides part of the information to derive the actually PPDU
  129. length. For legacy OFDM and 11B frames the maximum length
  130. is
  131. <legal all>
  132. */
  133. #define L_SIG_A_INFO_0_LENGTH_OFFSET 0x00000000
  134. #define L_SIG_A_INFO_0_LENGTH_LSB 5
  135. #define L_SIG_A_INFO_0_LENGTH_MASK 0x0001ffe0
  136. /* Description L_SIG_A_INFO_0_PARITY
  137. 11a/n/ac TX: This field provides even parity over the
  138. first 18 bits of the signal field which means that the sum
  139. of 1s in the signal field will always be even on
  140. 11a/n/ac RX: this field contains the received parity
  141. field from the L-SIG symbol for the current packet.
  142. <legal 0-1>
  143. */
  144. #define L_SIG_A_INFO_0_PARITY_OFFSET 0x00000000
  145. #define L_SIG_A_INFO_0_PARITY_LSB 17
  146. #define L_SIG_A_INFO_0_PARITY_MASK 0x00020000
  147. /* Description L_SIG_A_INFO_0_TAIL
  148. The 6 bits of tail is always set to 0 is used to flush
  149. the BCC encoder and decoder. <legal 0>
  150. */
  151. #define L_SIG_A_INFO_0_TAIL_OFFSET 0x00000000
  152. #define L_SIG_A_INFO_0_TAIL_LSB 18
  153. #define L_SIG_A_INFO_0_TAIL_MASK 0x00fc0000
  154. /* Description L_SIG_A_INFO_0_PKT_TYPE
  155. Only used on the RX side.
  156. Note: This is not really part of L-SIG
  157. Packet type:
  158. <enum 0 dot11a>802.11a PPDU type
  159. <enum 1 dot11b>802.11b PPDU type
  160. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  161. <enum 3 dot11ac>802.11ac PPDU type
  162. <enum 4 dot11ax>802.11ax PPDU type
  163. */
  164. #define L_SIG_A_INFO_0_PKT_TYPE_OFFSET 0x00000000
  165. #define L_SIG_A_INFO_0_PKT_TYPE_LSB 24
  166. #define L_SIG_A_INFO_0_PKT_TYPE_MASK 0x0f000000
  167. /* Description L_SIG_A_INFO_0_CAPTURED_IMPLICIT_SOUNDING
  168. Only used on the RX side.
  169. Note: This is not really part of L-SIG
  170. This indicates that the PHY has captured implicit
  171. sounding.
  172. */
  173. #define L_SIG_A_INFO_0_CAPTURED_IMPLICIT_SOUNDING_OFFSET 0x00000000
  174. #define L_SIG_A_INFO_0_CAPTURED_IMPLICIT_SOUNDING_LSB 28
  175. #define L_SIG_A_INFO_0_CAPTURED_IMPLICIT_SOUNDING_MASK 0x10000000
  176. /* Description L_SIG_A_INFO_0_RESERVED
  177. Reserved: Should be set to 0 by the transmitting MAC and
  178. ignored by the PHY <legal 0>
  179. */
  180. #define L_SIG_A_INFO_0_RESERVED_OFFSET 0x00000000
  181. #define L_SIG_A_INFO_0_RESERVED_LSB 29
  182. #define L_SIG_A_INFO_0_RESERVED_MASK 0xe0000000
  183. #endif // _L_SIG_A_INFO_H_