l_sig_a_info.h 8.3 KB

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