phyrx_l_sig_a.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /*
  2. * Copyright (c) 2020, 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_L_SIG_A_H_
  17. #define _PHYRX_L_SIG_A_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #include "l_sig_a_info.h"
  21. // ################ START SUMMARY #################
  22. //
  23. // Dword Fields
  24. // 0 struct l_sig_a_info phyrx_l_sig_a_info_details;
  25. //
  26. // ################ END SUMMARY #################
  27. #define NUM_OF_DWORDS_PHYRX_L_SIG_A 1
  28. struct phyrx_l_sig_a {
  29. struct l_sig_a_info phyrx_l_sig_a_info_details;
  30. };
  31. /*
  32. struct l_sig_a_info phyrx_l_sig_a_info_details
  33. See detailed description of the STRUCT
  34. */
  35. /* EXTERNAL REFERENCE : struct l_sig_a_info phyrx_l_sig_a_info_details */
  36. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE
  37. This format is originally defined for OFDM as a 4 bit
  38. field but the 5th bit was added to indicate 11b formatted
  39. frames. In the standard bit [4] is specified as reserved.
  40. For 11b frames this L-SIG is transformed in the PHY into the
  41. 11b preamble format. The following are the rates:
  42. <enum 8 ofdm_48_mbps> 64-QAM 2/3 (48 Mbps)
  43. <enum 9 ofdm_24_mbps> 16-QAM 1/2 (24 Mbps)
  44. <enum 10 ofdm_12_mbps> QPSK 1/2 (12 Mbps)
  45. <enum 11 ofdm_6_mbps> BPSK 1/2 (6 Mbps)
  46. <enum 12 ofdm_54_mbps> 64-QAM 3/4 (54 Mbps)
  47. <enum 13 ofdm_36_mbps> 16-QAM 3/4 (36 Mbps)
  48. <enum 14 ofdm_18_mbps> QPSK 1/2 (18 Mbps)
  49. <enum 15 ofdm_9_mbps> BPSK 3/4 (9 Mbps)
  50. <legal 8-15>
  51. */
  52. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_OFFSET 0x00000000
  53. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_LSB 0
  54. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RATE_MASK 0x0000000f
  55. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED
  56. Reserved: Should be set to 0 by the MAC and ignored by
  57. the PHY
  58. <legal 0>
  59. */
  60. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_OFFSET 0x00000000
  61. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_LSB 4
  62. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LSIG_RESERVED_MASK 0x00000010
  63. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH
  64. The length indicates the number of octets in this MPDU.
  65. Note that when using mixed mode 11n preamble this length
  66. provides the spoofed length for the PPDU. This length
  67. provides part of the information to derive the actually PPDU
  68. length. For legacy OFDM and 11B frames the maximum length
  69. is
  70. <legal all>
  71. */
  72. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_OFFSET 0x00000000
  73. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_LSB 5
  74. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_LENGTH_MASK 0x0001ffe0
  75. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY
  76. 11a/n/ac TX: This field provides even parity over the
  77. first 18 bits of the signal field which means that the sum
  78. of 1s in the signal field will always be even on
  79. 11a/n/ac RX: this field contains the received parity
  80. field from the L-SIG symbol for the current packet.
  81. <legal 0-1>
  82. */
  83. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_OFFSET 0x00000000
  84. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_LSB 17
  85. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PARITY_MASK 0x00020000
  86. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL
  87. The 6 bits of tail is always set to 0 is used to flush
  88. the BCC encoder and decoder. <legal 0>
  89. */
  90. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_OFFSET 0x00000000
  91. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_LSB 18
  92. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_TAIL_MASK 0x00fc0000
  93. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE
  94. Only used on the RX side.
  95. Note: This is not really part of L-SIG
  96. Packet type:
  97. <enum 0 dot11a>802.11a PPDU type
  98. <enum 1 dot11b>802.11b PPDU type
  99. <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
  100. <enum 3 dot11ac>802.11ac PPDU type
  101. <enum 4 dot11ax>802.11ax PPDU type
  102. <enum 5 dot11ba>802.11ba (WUR) PPDU type
  103. */
  104. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_OFFSET 0x00000000
  105. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_LSB 24
  106. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_PKT_TYPE_MASK 0x0f000000
  107. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING
  108. Only used on the RX side.
  109. Note: This is not really part of L-SIG
  110. This indicates that the PHY has captured implicit
  111. sounding.
  112. */
  113. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_OFFSET 0x00000000
  114. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_LSB 28
  115. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_CAPTURED_IMPLICIT_SOUNDING_MASK 0x10000000
  116. /* Description PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED
  117. Reserved: Should be set to 0 by the transmitting MAC and
  118. ignored by the PHY <legal 0>
  119. */
  120. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_OFFSET 0x00000000
  121. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_LSB 29
  122. #define PHYRX_L_SIG_A_0_PHYRX_L_SIG_A_INFO_DETAILS_RESERVED_MASK 0xe0000000
  123. #endif // _PHYRX_L_SIG_A_H_