mactx_l_sig_a.h 8.2 KB

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