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