xref: /wlan-driver/fw-api/hw/qca6750/v1/ht_sig_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020 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 _HT_SIG_INFO_H_
25 #define _HT_SIG_INFO_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 
30 // ################ START SUMMARY #################
31 //
32 //	Dword	Fields
33 //	0	mcs[6:0], cbw[7], length[23:8], reserved_0[31:24]
34 //	1	smoothing[0], not_sounding[1], ht_reserved[2], aggregation[3], stbc[5:4], fec_coding[6], short_gi[7], num_ext_sp_str[9:8], crc[17:10], signal_tail[23:18], reserved_1[31:24]
35 //
36 // ################ END SUMMARY #################
37 
38 #define NUM_OF_DWORDS_HT_SIG_INFO 2
39 
40 struct ht_sig_info {
41              uint32_t mcs                             :  7, //[6:0]
42                       cbw                             :  1, //[7]
43                       length                          : 16, //[23:8]
44                       reserved_0                      :  8; //[31:24]
45              uint32_t smoothing                       :  1, //[0]
46                       not_sounding                    :  1, //[1]
47                       ht_reserved                     :  1, //[2]
48                       aggregation                     :  1, //[3]
49                       stbc                            :  2, //[5:4]
50                       fec_coding                      :  1, //[6]
51                       short_gi                        :  1, //[7]
52                       num_ext_sp_str                  :  2, //[9:8]
53                       crc                             :  8, //[17:10]
54                       signal_tail                     :  6, //[23:18]
55                       reserved_1                      :  8; //[31:24]
56 };
57 
58 /*
59 
60 mcs
61 
62 			Modulation Coding Scheme:
63 
64 			0-7 are used for single stream
65 
66 			8-15 are used for 2 streams
67 
68 			16-23 are used for 3 streams
69 
70 			24-31 are used for 4 streams
71 
72 			32 is used for duplicate HT20 (unsupported)
73 
74 			33-76 is used for unequal modulation (unsupported)
75 
76 			77-127 is reserved.
77 
78 			<legal 0-31>
79 
80 cbw
81 
82 			Packet bandwidth:
83 
84 			<enum 0     ht_20_mhz>
85 
86 			<enum 1     ht_40_mhz>
87 
88 			<legal 0-1>
89 
90 length
91 
92 			This is the MPDU or A-MPDU length in octets of the PPDU
93 
94 			<legal all>
95 
96 reserved_0
97 
98 			This field is not part of HT-SIG
99 
100 			Reserved: Should be set to 0 by the MAC and ignored by
101 			the PHY <legal 0>
102 
103 smoothing
104 
105 			Field indicates if smoothing is needed
106 
107 			E_num 0     do_smoothing Unsupported setting: indicates
108 			smoothing is often used for beamforming
109 
110 
111 			<legal 1>
112 
113 not_sounding
114 
115 			E_num 0     sounding Unsupported setting: indicates
116 			sounding is used
117 
118 			<enum 1     no_sounding>  Indicates no sounding is used
119 
120 			<legal 1>
121 
122 ht_reserved
123 
124 			Reserved: Should be set to 1 by the MAC and ignored by
125 			the PHY
126 
127 			<legal 1>
128 
129 aggregation
130 
131 			<enum 0     mpdu> Indicates MPDU format
132 
133 			<enum 1     a_mpdu> Indicates A-MPDU format
134 
135 			<legal 0-1>
136 
137 stbc
138 
139 			<enum 0     no_stbc> Indicates no STBC
140 
141 			<enum 1     1_str_stbc> Indicates 1 stream STBC
142 
143 			E_num 2     2_str_stbc Indicates 2 stream STBC
144 			(Unsupported)
145 
146 			<legal 0-1>
147 
148 fec_coding
149 
150 			<enum 0     ht_bcc>  Indicates BCC coding
151 
152 			<enum 1     ht_ldpc>  Indicates LDPC coding
153 
154 			<legal 0-1>
155 
156 short_gi
157 
158 			<enum 0     ht_normal_gi>  Indicates normal guard
159 			interval
160 
161 
162 			<legal 0-1>
163 
164 num_ext_sp_str
165 
166 			Number of extension spatial streams: (Used for TxBF)
167 
168 			<enum 0     0_ext_sp_str>  No extension spatial streams
169 
170 			E_num 1     1_ext_sp_str  Not supported: 1 extension
171 			spatial streams
172 
173 			E_num 2     2_ext_sp_str  Not supported:  2 extension
174 			spatial streams
175 
176 			<legal 0>
177 
178 crc
179 
180 			The CRC protects the HT-SIG (HT-SIG[0][23:0] and
181 			HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
182 			D + 1.  <legal all>
183 
184 signal_tail
185 
186 			The 6 bits of tail is always set to 0 is used to flush
187 			the BCC encoder and decoder.  <legal 0>
188 
189 reserved_1
190 
191 			This field is not part of HT-SIG:
192 
193 			Reserved: Should be set to 0 by the MAC and ignored by
194 			the PHY.  <legal 0>
195 */
196 
197 
198 /* Description		HT_SIG_INFO_0_MCS
199 
200 			Modulation Coding Scheme:
201 
202 			0-7 are used for single stream
203 
204 			8-15 are used for 2 streams
205 
206 			16-23 are used for 3 streams
207 
208 			24-31 are used for 4 streams
209 
210 			32 is used for duplicate HT20 (unsupported)
211 
212 			33-76 is used for unequal modulation (unsupported)
213 
214 			77-127 is reserved.
215 
216 			<legal 0-31>
217 */
218 #define HT_SIG_INFO_0_MCS_OFFSET                                     0x00000000
219 #define HT_SIG_INFO_0_MCS_LSB                                        0
220 #define HT_SIG_INFO_0_MCS_MASK                                       0x0000007f
221 
222 /* Description		HT_SIG_INFO_0_CBW
223 
224 			Packet bandwidth:
225 
226 			<enum 0     ht_20_mhz>
227 
228 			<enum 1     ht_40_mhz>
229 
230 			<legal 0-1>
231 */
232 #define HT_SIG_INFO_0_CBW_OFFSET                                     0x00000000
233 #define HT_SIG_INFO_0_CBW_LSB                                        7
234 #define HT_SIG_INFO_0_CBW_MASK                                       0x00000080
235 
236 /* Description		HT_SIG_INFO_0_LENGTH
237 
238 			This is the MPDU or A-MPDU length in octets of the PPDU
239 
240 			<legal all>
241 */
242 #define HT_SIG_INFO_0_LENGTH_OFFSET                                  0x00000000
243 #define HT_SIG_INFO_0_LENGTH_LSB                                     8
244 #define HT_SIG_INFO_0_LENGTH_MASK                                    0x00ffff00
245 
246 /* Description		HT_SIG_INFO_0_RESERVED_0
247 
248 			This field is not part of HT-SIG
249 
250 			Reserved: Should be set to 0 by the MAC and ignored by
251 			the PHY <legal 0>
252 */
253 #define HT_SIG_INFO_0_RESERVED_0_OFFSET                              0x00000000
254 #define HT_SIG_INFO_0_RESERVED_0_LSB                                 24
255 #define HT_SIG_INFO_0_RESERVED_0_MASK                                0xff000000
256 
257 /* Description		HT_SIG_INFO_1_SMOOTHING
258 
259 			Field indicates if smoothing is needed
260 
261 			E_num 0     do_smoothing Unsupported setting: indicates
262 			smoothing is often used for beamforming
263 
264 
265 			<legal 1>
266 */
267 #define HT_SIG_INFO_1_SMOOTHING_OFFSET                               0x00000004
268 #define HT_SIG_INFO_1_SMOOTHING_LSB                                  0
269 #define HT_SIG_INFO_1_SMOOTHING_MASK                                 0x00000001
270 
271 /* Description		HT_SIG_INFO_1_NOT_SOUNDING
272 
273 			E_num 0     sounding Unsupported setting: indicates
274 			sounding is used
275 
276 			<enum 1     no_sounding>  Indicates no sounding is used
277 
278 			<legal 1>
279 */
280 #define HT_SIG_INFO_1_NOT_SOUNDING_OFFSET                            0x00000004
281 #define HT_SIG_INFO_1_NOT_SOUNDING_LSB                               1
282 #define HT_SIG_INFO_1_NOT_SOUNDING_MASK                              0x00000002
283 
284 /* Description		HT_SIG_INFO_1_HT_RESERVED
285 
286 			Reserved: Should be set to 1 by the MAC and ignored by
287 			the PHY
288 
289 			<legal 1>
290 */
291 #define HT_SIG_INFO_1_HT_RESERVED_OFFSET                             0x00000004
292 #define HT_SIG_INFO_1_HT_RESERVED_LSB                                2
293 #define HT_SIG_INFO_1_HT_RESERVED_MASK                               0x00000004
294 
295 /* Description		HT_SIG_INFO_1_AGGREGATION
296 
297 			<enum 0     mpdu> Indicates MPDU format
298 
299 			<enum 1     a_mpdu> Indicates A-MPDU format
300 
301 			<legal 0-1>
302 */
303 #define HT_SIG_INFO_1_AGGREGATION_OFFSET                             0x00000004
304 #define HT_SIG_INFO_1_AGGREGATION_LSB                                3
305 #define HT_SIG_INFO_1_AGGREGATION_MASK                               0x00000008
306 
307 /* Description		HT_SIG_INFO_1_STBC
308 
309 			<enum 0     no_stbc> Indicates no STBC
310 
311 			<enum 1     1_str_stbc> Indicates 1 stream STBC
312 
313 			E_num 2     2_str_stbc Indicates 2 stream STBC
314 			(Unsupported)
315 
316 			<legal 0-1>
317 */
318 #define HT_SIG_INFO_1_STBC_OFFSET                                    0x00000004
319 #define HT_SIG_INFO_1_STBC_LSB                                       4
320 #define HT_SIG_INFO_1_STBC_MASK                                      0x00000030
321 
322 /* Description		HT_SIG_INFO_1_FEC_CODING
323 
324 			<enum 0     ht_bcc>  Indicates BCC coding
325 
326 			<enum 1     ht_ldpc>  Indicates LDPC coding
327 
328 			<legal 0-1>
329 */
330 #define HT_SIG_INFO_1_FEC_CODING_OFFSET                              0x00000004
331 #define HT_SIG_INFO_1_FEC_CODING_LSB                                 6
332 #define HT_SIG_INFO_1_FEC_CODING_MASK                                0x00000040
333 
334 /* Description		HT_SIG_INFO_1_SHORT_GI
335 
336 			<enum 0     ht_normal_gi>  Indicates normal guard
337 			interval
338 
339 
340 			<legal 0-1>
341 */
342 #define HT_SIG_INFO_1_SHORT_GI_OFFSET                                0x00000004
343 #define HT_SIG_INFO_1_SHORT_GI_LSB                                   7
344 #define HT_SIG_INFO_1_SHORT_GI_MASK                                  0x00000080
345 
346 /* Description		HT_SIG_INFO_1_NUM_EXT_SP_STR
347 
348 			Number of extension spatial streams: (Used for TxBF)
349 
350 			<enum 0     0_ext_sp_str>  No extension spatial streams
351 
352 			E_num 1     1_ext_sp_str  Not supported: 1 extension
353 			spatial streams
354 
355 			E_num 2     2_ext_sp_str  Not supported:  2 extension
356 			spatial streams
357 
358 			<legal 0>
359 */
360 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_OFFSET                          0x00000004
361 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_LSB                             8
362 #define HT_SIG_INFO_1_NUM_EXT_SP_STR_MASK                            0x00000300
363 
364 /* Description		HT_SIG_INFO_1_CRC
365 
366 			The CRC protects the HT-SIG (HT-SIG[0][23:0] and
367 			HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
368 			D + 1.  <legal all>
369 */
370 #define HT_SIG_INFO_1_CRC_OFFSET                                     0x00000004
371 #define HT_SIG_INFO_1_CRC_LSB                                        10
372 #define HT_SIG_INFO_1_CRC_MASK                                       0x0003fc00
373 
374 /* Description		HT_SIG_INFO_1_SIGNAL_TAIL
375 
376 			The 6 bits of tail is always set to 0 is used to flush
377 			the BCC encoder and decoder.  <legal 0>
378 */
379 #define HT_SIG_INFO_1_SIGNAL_TAIL_OFFSET                             0x00000004
380 #define HT_SIG_INFO_1_SIGNAL_TAIL_LSB                                18
381 #define HT_SIG_INFO_1_SIGNAL_TAIL_MASK                               0x00fc0000
382 
383 /* Description		HT_SIG_INFO_1_RESERVED_1
384 
385 			This field is not part of HT-SIG:
386 
387 			Reserved: Should be set to 0 by the MAC and ignored by
388 			the PHY.  <legal 0>
389 */
390 #define HT_SIG_INFO_1_RESERVED_1_OFFSET                              0x00000004
391 #define HT_SIG_INFO_1_RESERVED_1_LSB                                 24
392 #define HT_SIG_INFO_1_RESERVED_1_MASK                                0xff000000
393 
394 
395 #endif // _HT_SIG_INFO_H_
396