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