xref: /wlan-driver/fw-api/hw/qcn6432/vht_sig_b_mu160_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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 #ifndef _VHT_SIG_B_MU160_INFO_H_
18 #define _VHT_SIG_B_MU160_INFO_H_
19 #if !defined(__ASSEMBLER__)
20 #endif
21 
22 #define NUM_OF_DWORDS_VHT_SIG_B_MU160_INFO 8
23 
24 
25 struct vht_sig_b_mu160_info {
26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
27              uint32_t length                                                  : 19, // [18:0]
28                       mcs                                                     :  4, // [22:19]
29                       tail                                                    :  6, // [28:23]
30                       reserved_0                                              :  3; // [31:29]
31              uint32_t length_copy_a                                           : 19, // [18:0]
32                       mcs_copy_a                                              :  4, // [22:19]
33                       tail_copy_a                                             :  6, // [28:23]
34                       reserved_1                                              :  3; // [31:29]
35              uint32_t length_copy_b                                           : 19, // [18:0]
36                       mcs_copy_b                                              :  4, // [22:19]
37                       tail_copy_b                                             :  6, // [28:23]
38                       reserved_2                                              :  3; // [31:29]
39              uint32_t length_copy_c                                           : 19, // [18:0]
40                       mcs_copy_c                                              :  4, // [22:19]
41                       tail_copy_c                                             :  6, // [28:23]
42                       reserved_3                                              :  3; // [31:29]
43              uint32_t length_copy_d                                           : 19, // [18:0]
44                       mcs_copy_d                                              :  4, // [22:19]
45                       tail_copy_d                                             :  6, // [28:23]
46                       reserved_4                                              :  3; // [31:29]
47              uint32_t length_copy_e                                           : 19, // [18:0]
48                       mcs_copy_e                                              :  4, // [22:19]
49                       tail_copy_e                                             :  6, // [28:23]
50                       reserved_5                                              :  3; // [31:29]
51              uint32_t length_copy_f                                           : 19, // [18:0]
52                       mcs_copy_f                                              :  4, // [22:19]
53                       tail_copy_f                                             :  6, // [28:23]
54                       mu_user_number                                          :  3; // [31:29]
55              uint32_t length_copy_g                                           : 19, // [18:0]
56                       mcs_copy_g                                              :  4, // [22:19]
57                       tail_copy_g                                             :  6, // [28:23]
58                       reserved_7                                              :  3; // [31:29]
59 #else
60              uint32_t reserved_0                                              :  3, // [31:29]
61                       tail                                                    :  6, // [28:23]
62                       mcs                                                     :  4, // [22:19]
63                       length                                                  : 19; // [18:0]
64              uint32_t reserved_1                                              :  3, // [31:29]
65                       tail_copy_a                                             :  6, // [28:23]
66                       mcs_copy_a                                              :  4, // [22:19]
67                       length_copy_a                                           : 19; // [18:0]
68              uint32_t reserved_2                                              :  3, // [31:29]
69                       tail_copy_b                                             :  6, // [28:23]
70                       mcs_copy_b                                              :  4, // [22:19]
71                       length_copy_b                                           : 19; // [18:0]
72              uint32_t reserved_3                                              :  3, // [31:29]
73                       tail_copy_c                                             :  6, // [28:23]
74                       mcs_copy_c                                              :  4, // [22:19]
75                       length_copy_c                                           : 19; // [18:0]
76              uint32_t reserved_4                                              :  3, // [31:29]
77                       tail_copy_d                                             :  6, // [28:23]
78                       mcs_copy_d                                              :  4, // [22:19]
79                       length_copy_d                                           : 19; // [18:0]
80              uint32_t reserved_5                                              :  3, // [31:29]
81                       tail_copy_e                                             :  6, // [28:23]
82                       mcs_copy_e                                              :  4, // [22:19]
83                       length_copy_e                                           : 19; // [18:0]
84              uint32_t mu_user_number                                          :  3, // [31:29]
85                       tail_copy_f                                             :  6, // [28:23]
86                       mcs_copy_f                                              :  4, // [22:19]
87                       length_copy_f                                           : 19; // [18:0]
88              uint32_t reserved_7                                              :  3, // [31:29]
89                       tail_copy_g                                             :  6, // [28:23]
90                       mcs_copy_g                                              :  4, // [22:19]
91                       length_copy_g                                           : 19; // [18:0]
92 #endif
93 };
94 
95 
96 /* Description		LENGTH
97 
98 			VHT-SIG-B Length (in units of 4 octets) = ceiling (LENGTH/4)
99 			 <legal all>
100 */
101 
102 #define VHT_SIG_B_MU160_INFO_LENGTH_OFFSET                                          0x00000000
103 #define VHT_SIG_B_MU160_INFO_LENGTH_LSB                                             0
104 #define VHT_SIG_B_MU160_INFO_LENGTH_MSB                                             18
105 #define VHT_SIG_B_MU160_INFO_LENGTH_MASK                                            0x0007ffff
106 
107 
108 /* Description		MCS
109 
110 			Modulation as described in vht_sig_a mcs field  <legal 0-11>
111 
112 */
113 
114 #define VHT_SIG_B_MU160_INFO_MCS_OFFSET                                             0x00000000
115 #define VHT_SIG_B_MU160_INFO_MCS_LSB                                                19
116 #define VHT_SIG_B_MU160_INFO_MCS_MSB                                                22
117 #define VHT_SIG_B_MU160_INFO_MCS_MASK                                               0x00780000
118 
119 
120 /* Description		TAIL
121 
122 			Used to terminate the trellis of the convolutional decoder.
123 
124 			Set to 0.  <legal 0>
125 */
126 
127 #define VHT_SIG_B_MU160_INFO_TAIL_OFFSET                                            0x00000000
128 #define VHT_SIG_B_MU160_INFO_TAIL_LSB                                               23
129 #define VHT_SIG_B_MU160_INFO_TAIL_MSB                                               28
130 #define VHT_SIG_B_MU160_INFO_TAIL_MASK                                              0x1f800000
131 
132 
133 /* Description		RESERVED_0
134 
135 			Not part of VHT-SIG-B.
136 			Reserved: Set to 0 and ignored on receive  <legal 0>
137 */
138 
139 #define VHT_SIG_B_MU160_INFO_RESERVED_0_OFFSET                                      0x00000000
140 #define VHT_SIG_B_MU160_INFO_RESERVED_0_LSB                                         29
141 #define VHT_SIG_B_MU160_INFO_RESERVED_0_MSB                                         31
142 #define VHT_SIG_B_MU160_INFO_RESERVED_0_MASK                                        0xe0000000
143 
144 
145 /* Description		LENGTH_COPY_A
146 
147 			Same as "length". This field is not valid for RX packets
148 			 <legal all>
149 */
150 
151 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_A_OFFSET                                   0x00000004
152 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_A_LSB                                      0
153 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_A_MSB                                      18
154 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_A_MASK                                     0x0007ffff
155 
156 
157 /* Description		MCS_COPY_A
158 
159 			Same as "mcs". This field is not valid for RX packets  <legal
160 			 0-11>
161 */
162 
163 #define VHT_SIG_B_MU160_INFO_MCS_COPY_A_OFFSET                                      0x00000004
164 #define VHT_SIG_B_MU160_INFO_MCS_COPY_A_LSB                                         19
165 #define VHT_SIG_B_MU160_INFO_MCS_COPY_A_MSB                                         22
166 #define VHT_SIG_B_MU160_INFO_MCS_COPY_A_MASK                                        0x00780000
167 
168 
169 /* Description		TAIL_COPY_A
170 
171 			Same as "tail". This field is not valid for RX packets  <legal
172 			 0>
173 */
174 
175 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_A_OFFSET                                     0x00000004
176 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_A_LSB                                        23
177 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_A_MSB                                        28
178 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_A_MASK                                       0x1f800000
179 
180 
181 /* Description		RESERVED_1
182 
183 			Not part of VHT-SIG-B.
184 			Reserved: Set to 0 and ignored on receive  <legal 0>
185 */
186 
187 #define VHT_SIG_B_MU160_INFO_RESERVED_1_OFFSET                                      0x00000004
188 #define VHT_SIG_B_MU160_INFO_RESERVED_1_LSB                                         29
189 #define VHT_SIG_B_MU160_INFO_RESERVED_1_MSB                                         31
190 #define VHT_SIG_B_MU160_INFO_RESERVED_1_MASK                                        0xe0000000
191 
192 
193 /* Description		LENGTH_COPY_B
194 
195 			Same as "length". This field is not valid for RX packets. <legal
196 			 all>
197 */
198 
199 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_B_OFFSET                                   0x00000008
200 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_B_LSB                                      0
201 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_B_MSB                                      18
202 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_B_MASK                                     0x0007ffff
203 
204 
205 /* Description		MCS_COPY_B
206 
207 			Same as "mcs". This field is not valid for RX packets.
208 
209 			<legal 0-11>
210 */
211 
212 #define VHT_SIG_B_MU160_INFO_MCS_COPY_B_OFFSET                                      0x00000008
213 #define VHT_SIG_B_MU160_INFO_MCS_COPY_B_LSB                                         19
214 #define VHT_SIG_B_MU160_INFO_MCS_COPY_B_MSB                                         22
215 #define VHT_SIG_B_MU160_INFO_MCS_COPY_B_MASK                                        0x00780000
216 
217 
218 /* Description		TAIL_COPY_B
219 
220 			Same as "tail". This field is not valid for RX packets.
221 			 <legal 0>
222 */
223 
224 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_B_OFFSET                                     0x00000008
225 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_B_LSB                                        23
226 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_B_MSB                                        28
227 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_B_MASK                                       0x1f800000
228 
229 
230 /* Description		RESERVED_2
231 
232 			Not part of VHT-SIG-B.
233 			Reserved: Set to 0 and ignored on receive  <legal 0>
234 */
235 
236 #define VHT_SIG_B_MU160_INFO_RESERVED_2_OFFSET                                      0x00000008
237 #define VHT_SIG_B_MU160_INFO_RESERVED_2_LSB                                         29
238 #define VHT_SIG_B_MU160_INFO_RESERVED_2_MSB                                         31
239 #define VHT_SIG_B_MU160_INFO_RESERVED_2_MASK                                        0xe0000000
240 
241 
242 /* Description		LENGTH_COPY_C
243 
244 			Same as "length". This field is not valid for RX packets. <legal
245 			 all>
246 */
247 
248 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_C_OFFSET                                   0x0000000c
249 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_C_LSB                                      0
250 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_C_MSB                                      18
251 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_C_MASK                                     0x0007ffff
252 
253 
254 /* Description		MCS_COPY_C
255 
256 			Same as "mcs". This field is not valid for RX packets.
257 
258 			<legal 0-11>
259 */
260 
261 #define VHT_SIG_B_MU160_INFO_MCS_COPY_C_OFFSET                                      0x0000000c
262 #define VHT_SIG_B_MU160_INFO_MCS_COPY_C_LSB                                         19
263 #define VHT_SIG_B_MU160_INFO_MCS_COPY_C_MSB                                         22
264 #define VHT_SIG_B_MU160_INFO_MCS_COPY_C_MASK                                        0x00780000
265 
266 
267 /* Description		TAIL_COPY_C
268 
269 			Same as "tail". This field is not valid for RX packets.
270 			 <legal 0>
271 */
272 
273 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_C_OFFSET                                     0x0000000c
274 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_C_LSB                                        23
275 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_C_MSB                                        28
276 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_C_MASK                                       0x1f800000
277 
278 
279 /* Description		RESERVED_3
280 
281 			Not part of VHT-SIG-B.
282 			Reserved: Set to 0 and ignored on receive  <legal 0>
283 */
284 
285 #define VHT_SIG_B_MU160_INFO_RESERVED_3_OFFSET                                      0x0000000c
286 #define VHT_SIG_B_MU160_INFO_RESERVED_3_LSB                                         29
287 #define VHT_SIG_B_MU160_INFO_RESERVED_3_MSB                                         31
288 #define VHT_SIG_B_MU160_INFO_RESERVED_3_MASK                                        0xe0000000
289 
290 
291 /* Description		LENGTH_COPY_D
292 
293 			Same as "length". This field is not valid for RX packets. <legal
294 			 all>
295 */
296 
297 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_D_OFFSET                                   0x00000010
298 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_D_LSB                                      0
299 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_D_MSB                                      18
300 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_D_MASK                                     0x0007ffff
301 
302 
303 /* Description		MCS_COPY_D
304 
305 			Same as "mcs". This field is not valid for RX packets.
306 
307 			<legal 0-11>
308 */
309 
310 #define VHT_SIG_B_MU160_INFO_MCS_COPY_D_OFFSET                                      0x00000010
311 #define VHT_SIG_B_MU160_INFO_MCS_COPY_D_LSB                                         19
312 #define VHT_SIG_B_MU160_INFO_MCS_COPY_D_MSB                                         22
313 #define VHT_SIG_B_MU160_INFO_MCS_COPY_D_MASK                                        0x00780000
314 
315 
316 /* Description		TAIL_COPY_D
317 
318 			Same as "tail". This field is not valid for RX packets.
319 			 <legal 0>
320 */
321 
322 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_D_OFFSET                                     0x00000010
323 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_D_LSB                                        23
324 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_D_MSB                                        28
325 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_D_MASK                                       0x1f800000
326 
327 
328 /* Description		RESERVED_4
329 
330 			Not part of VHT-SIG-B.
331 			Reserved: Set to 0 and ignored on receive  <legal 0>
332 */
333 
334 #define VHT_SIG_B_MU160_INFO_RESERVED_4_OFFSET                                      0x00000010
335 #define VHT_SIG_B_MU160_INFO_RESERVED_4_LSB                                         29
336 #define VHT_SIG_B_MU160_INFO_RESERVED_4_MSB                                         31
337 #define VHT_SIG_B_MU160_INFO_RESERVED_4_MASK                                        0xe0000000
338 
339 
340 /* Description		LENGTH_COPY_E
341 
342 			Same as "length". This field is not valid for RX packets. <legal
343 			 all>
344 */
345 
346 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_E_OFFSET                                   0x00000014
347 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_E_LSB                                      0
348 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_E_MSB                                      18
349 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_E_MASK                                     0x0007ffff
350 
351 
352 /* Description		MCS_COPY_E
353 
354 			Same as "mcs". This field is not valid for RX packets.
355 
356 			<legal 0-11>
357 */
358 
359 #define VHT_SIG_B_MU160_INFO_MCS_COPY_E_OFFSET                                      0x00000014
360 #define VHT_SIG_B_MU160_INFO_MCS_COPY_E_LSB                                         19
361 #define VHT_SIG_B_MU160_INFO_MCS_COPY_E_MSB                                         22
362 #define VHT_SIG_B_MU160_INFO_MCS_COPY_E_MASK                                        0x00780000
363 
364 
365 /* Description		TAIL_COPY_E
366 
367 			Same as "tail". This field is not valid for RX packets.
368 			 <legal 0>
369 */
370 
371 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_E_OFFSET                                     0x00000014
372 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_E_LSB                                        23
373 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_E_MSB                                        28
374 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_E_MASK                                       0x1f800000
375 
376 
377 /* Description		RESERVED_5
378 
379 			Not part of VHT-SIG-B.
380 			Reserved: Set to 0 and ignored on receive  <legal 0>
381 */
382 
383 #define VHT_SIG_B_MU160_INFO_RESERVED_5_OFFSET                                      0x00000014
384 #define VHT_SIG_B_MU160_INFO_RESERVED_5_LSB                                         29
385 #define VHT_SIG_B_MU160_INFO_RESERVED_5_MSB                                         31
386 #define VHT_SIG_B_MU160_INFO_RESERVED_5_MASK                                        0xe0000000
387 
388 
389 /* Description		LENGTH_COPY_F
390 
391 			Same as "length". This field is not valid for RX packets. <legal
392 			 all>
393 */
394 
395 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_F_OFFSET                                   0x00000018
396 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_F_LSB                                      0
397 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_F_MSB                                      18
398 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_F_MASK                                     0x0007ffff
399 
400 
401 /* Description		MCS_COPY_F
402 
403 			Same as "mcs". This field is not valid for RX packets.
404 
405 			<legal 0-11>
406 */
407 
408 #define VHT_SIG_B_MU160_INFO_MCS_COPY_F_OFFSET                                      0x00000018
409 #define VHT_SIG_B_MU160_INFO_MCS_COPY_F_LSB                                         19
410 #define VHT_SIG_B_MU160_INFO_MCS_COPY_F_MSB                                         22
411 #define VHT_SIG_B_MU160_INFO_MCS_COPY_F_MASK                                        0x00780000
412 
413 
414 /* Description		TAIL_COPY_F
415 
416 			Same as "tail". This field is not valid for RX packets.
417 			 <legal 0>
418 */
419 
420 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_F_OFFSET                                     0x00000018
421 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_F_LSB                                        23
422 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_F_MSB                                        28
423 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_F_MASK                                       0x1f800000
424 
425 
426 /* Description		MU_USER_NUMBER
427 
428 			Not part of VHT-SIG-B.
429 			Mapping from user number (BFer hardware specific) to mu_user_number.
430 			The reader is directed to the previous chapter (User Number)
431 			for a definition of the terms user and mu_user.   <legal
432 			 0-3>
433 */
434 
435 #define VHT_SIG_B_MU160_INFO_MU_USER_NUMBER_OFFSET                                  0x00000018
436 #define VHT_SIG_B_MU160_INFO_MU_USER_NUMBER_LSB                                     29
437 #define VHT_SIG_B_MU160_INFO_MU_USER_NUMBER_MSB                                     31
438 #define VHT_SIG_B_MU160_INFO_MU_USER_NUMBER_MASK                                    0xe0000000
439 
440 
441 /* Description		LENGTH_COPY_G
442 
443 			Same as "length". This field is not valid for RX packets. <legal
444 			 all>
445 */
446 
447 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_G_OFFSET                                   0x0000001c
448 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_G_LSB                                      0
449 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_G_MSB                                      18
450 #define VHT_SIG_B_MU160_INFO_LENGTH_COPY_G_MASK                                     0x0007ffff
451 
452 
453 /* Description		MCS_COPY_G
454 
455 			Same as "mcs". This field is not valid for RX packets.
456 
457 			<legal 0-11>
458 */
459 
460 #define VHT_SIG_B_MU160_INFO_MCS_COPY_G_OFFSET                                      0x0000001c
461 #define VHT_SIG_B_MU160_INFO_MCS_COPY_G_LSB                                         19
462 #define VHT_SIG_B_MU160_INFO_MCS_COPY_G_MSB                                         22
463 #define VHT_SIG_B_MU160_INFO_MCS_COPY_G_MASK                                        0x00780000
464 
465 
466 /* Description		TAIL_COPY_G
467 
468 			Same as "tail". This field is not valid for RX packets.
469 			 <legal 0>
470 */
471 
472 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_G_OFFSET                                     0x0000001c
473 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_G_LSB                                        23
474 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_G_MSB                                        28
475 #define VHT_SIG_B_MU160_INFO_TAIL_COPY_G_MASK                                       0x1f800000
476 
477 
478 /* Description		RESERVED_7
479 
480 			<legal 0>
481 */
482 
483 #define VHT_SIG_B_MU160_INFO_RESERVED_7_OFFSET                                      0x0000001c
484 #define VHT_SIG_B_MU160_INFO_RESERVED_7_LSB                                         29
485 #define VHT_SIG_B_MU160_INFO_RESERVED_7_MSB                                         31
486 #define VHT_SIG_B_MU160_INFO_RESERVED_7_MASK                                        0xe0000000
487 
488 
489 
490 #endif   // VHT_SIG_B_MU160_INFO
491