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