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