mactx_l_sig_a.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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_L_SIG_A_H_
  16. #define _MACTX_L_SIG_A_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "l_sig_a_info.h"
  20. #define NUM_OF_DWORDS_MACTX_L_SIG_A 2
  21. #define NUM_OF_QWORDS_MACTX_L_SIG_A 1
  22. struct mactx_l_sig_a {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. struct l_sig_a_info mactx_l_sig_a_info_details;
  25. uint32_t tlv64_padding : 32; // [31:0]
  26. #else
  27. struct l_sig_a_info mactx_l_sig_a_info_details;
  28. uint32_t tlv64_padding : 32; // [31:0]
  29. #endif
  30. };
  31. /* Description MACTX_L_SIG_A_INFO_DETAILS
  32. See detailed description of the STRUCT
  33. */
  34. /* Description RATE
  35. This format is originally defined for OFDM as a 4 bit field
  36. but the 5th bit was added to indicate 11b formatted frames.
  37. In the standard bit [4] is specified as reserved. For
  38. 11b frames this L-SIG is transformed in the PHY into the
  39. 11b preamble format. The following are the rates:
  40. <enum 8 ofdm_48_mbps> 64-QAM 2/3 (48 Mbps)
  41. <enum 9 ofdm_24_mbps> 16-QAM 1/2 (24 Mbps)
  42. <enum 10 ofdm_12_mbps> QPSK 1/2 (12 Mbps)
  43. <enum 11 ofdm_6_mbps> BPSK 1/2 (6 Mbps)
  44. <enum 12 ofdm_54_mbps> 64-QAM 3/4 (54 Mbps)
  45. <enum 13 ofdm_36_mbps> 16-QAM 3/4 (36 Mbps)
  46. <enum 14 ofdm_18_mbps> QPSK 1/2 (18 Mbps)
  47. <enum 15 ofdm_9_mbps> BPSK 3/4 (9 Mbps)
  48. <legal 8-15>
  49. */
  50. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RATE_OFFSET 0x0000000000000000
  51. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RATE_LSB 0
  52. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RATE_MSB 3
  53. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RATE_MASK 0x000000000000000f
  54. /* Description LSIG_RESERVED
  55. Reserved: Should be set to 0 by the MAC and ignored by the
  56. PHY
  57. <legal 0>
  58. */
  59. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_OFFSET 0x0000000000000000
  60. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_LSB 4
  61. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_MSB 4
  62. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_MASK 0x0000000000000010
  63. /* Description LENGTH
  64. The length indicates the number of octets in this MPDU.
  65. Note that when using mixed mode .11n preamble or .11ac/.11ax/.11ba/.11be
  66. this length provides the spoofed length for the PPDU.
  67. This length provides part of the information (viz. PPDU
  68. duration) to derive the actually PSDU length. For legacy
  69. OFDM and 11B frames the maximum length is 4095.
  70. <legal all>
  71. */
  72. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LENGTH_OFFSET 0x0000000000000000
  73. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LENGTH_LSB 5
  74. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LENGTH_MSB 16
  75. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_LENGTH_MASK 0x000000000001ffe0
  76. /* Description PARITY
  77. 11a/n/ac TX: This field provides even parity over the first
  78. 18 bits of the signal field which means that the sum of
  79. 1s in the signal field will always be even on transmission.
  80. The value of the field is computed by the MAC.
  81. 11a/n/ac RX: this field contains the received parity field
  82. from the L-SIG symbol for the current packet.
  83. <legal 0-1>
  84. */
  85. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PARITY_OFFSET 0x0000000000000000
  86. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PARITY_LSB 17
  87. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PARITY_MSB 17
  88. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PARITY_MASK 0x0000000000020000
  89. /* Description TAIL
  90. The 6 bits of tail is always set to 0 is used to flush the
  91. BCC encoder and decoder. <legal 0>
  92. */
  93. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_TAIL_OFFSET 0x0000000000000000
  94. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_TAIL_LSB 18
  95. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_TAIL_MSB 23
  96. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_TAIL_MASK 0x0000000000fc0000
  97. /* Description PKT_TYPE
  98. Only used on the RX side.
  99. Note: This is not really part of L-SIG
  100. Packet type:
  101. <enum 0 dot11a>802.11a PPDU type
  102. <enum 1 dot11b>802.11b PPDU type
  103. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  104. <enum 3 dot11ac>802.11ac PPDU type
  105. <enum 4 dot11ax>802.11ax PPDU type
  106. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  107. <enum 6 dot11be>802.11be PPDU type
  108. <enum 7 dot11az>802.11az (ranging) PPDU type
  109. <enum 8 dot11n_gf>802.11n Green Field PPDU type (unsupported
  110. & aborted)
  111. */
  112. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PKT_TYPE_OFFSET 0x0000000000000000
  113. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PKT_TYPE_LSB 24
  114. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PKT_TYPE_MSB 27
  115. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_PKT_TYPE_MASK 0x000000000f000000
  116. /* Description CAPTURED_IMPLICIT_SOUNDING
  117. Only used on the RX side.
  118. Note: This is not really part of L-SIG
  119. This indicates that the PHY has captured implicit sounding.
  120. */
  121. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_OFFSET 0x0000000000000000
  122. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_LSB 28
  123. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_MSB 28
  124. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_MASK 0x0000000010000000
  125. /* Description RESERVED
  126. Reserved: Should be set to 0 by the transmitting MAC and
  127. ignored by the PHY <legal 0>
  128. */
  129. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RESERVED_OFFSET 0x0000000000000000
  130. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RESERVED_LSB 29
  131. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RESERVED_MSB 30
  132. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RESERVED_MASK 0x0000000060000000
  133. /* Description RX_INTEGRITY_CHECK_PASSED
  134. TX side: Set to 0
  135. RX side: Set to 1 if PHY determines the L-SIG integrity
  136. check has passed, else set to 0
  137. <legal all>
  138. */
  139. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x0000000000000000
  140. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_LSB 31
  141. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MSB 31
  142. #define MACTX_L_SIG_A_MACTX_L_SIG_A_INFO_DETAILS_RX_INTEGRITY_CHECK_PASSED_MASK 0x0000000080000000
  143. /* Description TLV64_PADDING
  144. Automatic DWORD padding inserted while converting TLV32
  145. to TLV64 for 64 bit ARCH
  146. <legal 0>
  147. */
  148. #define MACTX_L_SIG_A_TLV64_PADDING_OFFSET 0x0000000000000000
  149. #define MACTX_L_SIG_A_TLV64_PADDING_LSB 32
  150. #define MACTX_L_SIG_A_TLV64_PADDING_MSB 63
  151. #define MACTX_L_SIG_A_TLV64_PADDING_MASK 0xffffffff00000000
  152. #endif // MACTX_L_SIG_A