xref: /wlan-driver/fw-api/hw/qca6750/v1/rx_msdu_desc_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 _RX_MSDU_DESC_INFO_H_
25 #define _RX_MSDU_DESC_INFO_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 
30 // ################ START SUMMARY #################
31 //
32 //	Dword	Fields
33 //	0	first_msdu_in_mpdu_flag[0], last_msdu_in_mpdu_flag[1], msdu_continuation[2], msdu_length[16:3], reo_destination_indication[21:17], msdu_drop[22], sa_is_valid[23], sa_idx_timeout[24], da_is_valid[25], da_is_mcbc[26], da_idx_timeout[27], reserved_0a[31:28]
34 //	1	reserved_1a[31:0]
35 //
36 // ################ END SUMMARY #################
37 
38 #define NUM_OF_DWORDS_RX_MSDU_DESC_INFO 2
39 
40 struct rx_msdu_desc_info {
41              uint32_t first_msdu_in_mpdu_flag         :  1, //[0]
42                       last_msdu_in_mpdu_flag          :  1, //[1]
43                       msdu_continuation               :  1, //[2]
44                       msdu_length                     : 14, //[16:3]
45                       reo_destination_indication      :  5, //[21:17]
46                       msdu_drop                       :  1, //[22]
47                       sa_is_valid                     :  1, //[23]
48                       sa_idx_timeout                  :  1, //[24]
49                       da_is_valid                     :  1, //[25]
50                       da_is_mcbc                      :  1, //[26]
51                       da_idx_timeout                  :  1, //[27]
52                       reserved_0a                     :  4; //[31:28]
53              uint32_t reserved_1a                     : 32; //[31:0]
54 };
55 
56 /*
57 
58 first_msdu_in_mpdu_flag
59 
60 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
61 			over multiple buffers, this field will be valid in the Last
62 			buffer used by the MSDU
63 
64 
65 
66 			<enum 0 Not_first_msdu> This is not the first MSDU in
67 			the MPDU.
68 
69 			<enum 1 first_msdu> This MSDU is the first one in the
70 			MPDU.
71 
72 
73 
74 			<legal all>
75 
76 last_msdu_in_mpdu_flag
77 
78 			Consumer: WBM/REO/SW/FW
79 
80 			Producer: RXDMA
81 
82 
83 
84 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
85 			over multiple buffers, this field will be valid in the Last
86 			buffer used by the MSDU
87 
88 
89 
90 			<enum 0 Not_last_msdu> There are more MSDUs linked to
91 			this MSDU that belongs to this MPDU
92 
93 			<enum 1 Last_msdu> this MSDU is the last one in the
94 			MPDU. This setting is only allowed in combination with
95 			'Msdu_continuation' set to 0. This implies that when an msdu
96 			is spread out over multiple buffers and thus
97 			msdu_continuation is set, only for the very last buffer of
98 			the msdu, can the 'last_msdu_in_mpdu_flag' be set.
99 
100 
101 
102 			When both first_msdu_in_mpdu_flag and
103 			last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
104 			belongs to only contains a single MSDU.
105 
106 
107 
108 
109 
110 			<legal all>
111 
112 msdu_continuation
113 
114 			When set, this MSDU buffer was not able to hold the
115 			entire MSDU. The next buffer will therefor contain
116 			additional information related to this MSDU.
117 
118 
119 
120 			<legal all>
121 
122 msdu_length
123 
124 			Parsed from RX_MSDU_START TLV . In the case MSDU spans
125 			over multiple buffers, this field will be valid in the First
126 			buffer used by MSDU.
127 
128 
129 
130 			Full MSDU length in bytes after decapsulation.
131 
132 
133 
134 			This field is still valid for MPDU frames without
135 			A-MSDU.  It still represents MSDU length after decapsulation
136 
137 
138 
139 			Or in case of RAW MPDUs, it indicates the length of the
140 			entire MPDU (without FCS field)
141 
142 			<legal all>
143 
144 reo_destination_indication
145 
146 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
147 			over multiple buffers, this field will be valid in the Last
148 			buffer used by the MSDU
149 
150 
151 
152 			The ID of the REO exit ring where the MSDU frame shall
153 			push after (MPDU level) reordering has finished.
154 
155 
156 
157 			<enum 0 reo_destination_tcl> Reo will push the frame
158 			into the REO2TCL ring
159 
160 			<enum 1 reo_destination_sw1> Reo will push the frame
161 			into the REO2SW1 ring
162 
163 			<enum 2 reo_destination_sw2> Reo will push the frame
164 			into the REO2SW2 ring
165 
166 			<enum 3 reo_destination_sw3> Reo will push the frame
167 			into the REO2SW3 ring
168 
169 			<enum 4 reo_destination_sw4> Reo will push the frame
170 			into the REO2SW4 ring
171 
172 			<enum 5 reo_destination_release> Reo will push the frame
173 			into the REO_release ring
174 
175 			<enum 6 reo_destination_fw> Reo will push the frame into
176 			the REO2FW ring
177 
178 			<enum 7 reo_destination_sw5> Reo will push the frame
179 			into the REO2SW5 ring (REO remaps this in chips without
180 			REO2SW5 ring, e.g. Pine)
181 
182 			<enum 8 reo_destination_sw6> Reo will push the frame
183 			into the REO2SW6 ring (REO remaps this in chips without
184 			REO2SW6 ring, e.g. Pine)
185 
186 			 <enum 9 reo_destination_9> REO remaps this <enum 10
187 			reo_destination_10> REO remaps this
188 
189 			<enum 11 reo_destination_11> REO remaps this
190 
191 			<enum 12 reo_destination_12> REO remaps this <enum 13
192 			reo_destination_13> REO remaps this
193 
194 			<enum 14 reo_destination_14> REO remaps this
195 
196 			<enum 15 reo_destination_15> REO remaps this
197 
198 			<enum 16 reo_destination_16> REO remaps this
199 
200 			<enum 17 reo_destination_17> REO remaps this
201 
202 			<enum 18 reo_destination_18> REO remaps this
203 
204 			<enum 19 reo_destination_19> REO remaps this
205 
206 			<enum 20 reo_destination_20> REO remaps this
207 
208 			<enum 21 reo_destination_21> REO remaps this
209 
210 			<enum 22 reo_destination_22> REO remaps this
211 
212 			<enum 23 reo_destination_23> REO remaps this
213 
214 			<enum 24 reo_destination_24> REO remaps this
215 
216 			<enum 25 reo_destination_25> REO remaps this
217 
218 			<enum 26 reo_destination_26> REO remaps this
219 
220 			<enum 27 reo_destination_27> REO remaps this
221 
222 			<enum 28 reo_destination_28> REO remaps this
223 
224 			<enum 29 reo_destination_29> REO remaps this
225 
226 			<enum 30 reo_destination_30> REO remaps this
227 
228 			<enum 31 reo_destination_31> REO remaps this
229 
230 
231 
232 			<legal all>
233 
234 msdu_drop
235 
236 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
237 			over multiple buffers, this field will be valid in the Last
238 			buffer used by the MSDU
239 
240 
241 
242 			When set, REO shall drop this MSDU and not forward it to
243 			any other ring...
244 
245 			<legal all>
246 
247 sa_is_valid
248 
249 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
250 			over multiple buffers, this field will be valid in the Last
251 			buffer used by the MSDU
252 
253 
254 
255 			Indicates that OLE found a valid SA entry for this MSDU
256 
257 			<legal all>
258 
259 sa_idx_timeout
260 
261 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
262 			over multiple buffers, this field will be valid in the Last
263 			buffer used by the MSDU
264 
265 
266 
267 			Indicates an unsuccessful MAC source address search due
268 			to the expiring of the search timer for this MSDU
269 
270 			<legal all>
271 
272 da_is_valid
273 
274 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
275 			over multiple buffers, this field will be valid in the Last
276 			buffer used by the MSDU
277 
278 
279 
280 			Indicates that OLE found a valid DA entry for this MSDU
281 
282 			<legal all>
283 
284 da_is_mcbc
285 
286 			Field Only valid if da_is_valid is set
287 
288 
289 
290 			Indicates the DA address was a Multicast of Broadcast
291 			address for this MSDU
292 
293 			<legal all>
294 
295 da_idx_timeout
296 
297 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
298 			over multiple buffers, this field will be valid in the Last
299 			buffer used by the MSDU
300 
301 
302 
303 			Indicates an unsuccessful MAC destination address search
304 			due to the expiring of the search timer for this MSDU
305 
306 			<legal all>
307 
308 reserved_0a
309 
310 			<legal 0>
311 
312 reserved_1a
313 
314 			<legal 0>
315 */
316 
317 
318 /* Description		RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG
319 
320 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
321 			over multiple buffers, this field will be valid in the Last
322 			buffer used by the MSDU
323 
324 
325 
326 			<enum 0 Not_first_msdu> This is not the first MSDU in
327 			the MPDU.
328 
329 			<enum 1 first_msdu> This MSDU is the first one in the
330 			MPDU.
331 
332 
333 
334 			<legal all>
335 */
336 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_OFFSET           0x00000000
337 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_LSB              0
338 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_MASK             0x00000001
339 
340 /* Description		RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG
341 
342 			Consumer: WBM/REO/SW/FW
343 
344 			Producer: RXDMA
345 
346 
347 
348 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
349 			over multiple buffers, this field will be valid in the Last
350 			buffer used by the MSDU
351 
352 
353 
354 			<enum 0 Not_last_msdu> There are more MSDUs linked to
355 			this MSDU that belongs to this MPDU
356 
357 			<enum 1 Last_msdu> this MSDU is the last one in the
358 			MPDU. This setting is only allowed in combination with
359 			'Msdu_continuation' set to 0. This implies that when an msdu
360 			is spread out over multiple buffers and thus
361 			msdu_continuation is set, only for the very last buffer of
362 			the msdu, can the 'last_msdu_in_mpdu_flag' be set.
363 
364 
365 
366 			When both first_msdu_in_mpdu_flag and
367 			last_msdu_in_mpdu_flag are set, the MPDU that this MSDU
368 			belongs to only contains a single MSDU.
369 
370 
371 
372 
373 
374 			<legal all>
375 */
376 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_OFFSET            0x00000000
377 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_LSB               1
378 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_MASK              0x00000002
379 
380 /* Description		RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION
381 
382 			When set, this MSDU buffer was not able to hold the
383 			entire MSDU. The next buffer will therefor contain
384 			additional information related to this MSDU.
385 
386 
387 
388 			<legal all>
389 */
390 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_OFFSET                 0x00000000
391 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_LSB                    2
392 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_MASK                   0x00000004
393 
394 /* Description		RX_MSDU_DESC_INFO_0_MSDU_LENGTH
395 
396 			Parsed from RX_MSDU_START TLV . In the case MSDU spans
397 			over multiple buffers, this field will be valid in the First
398 			buffer used by MSDU.
399 
400 
401 
402 			Full MSDU length in bytes after decapsulation.
403 
404 
405 
406 			This field is still valid for MPDU frames without
407 			A-MSDU.  It still represents MSDU length after decapsulation
408 
409 
410 
411 			Or in case of RAW MPDUs, it indicates the length of the
412 			entire MPDU (without FCS field)
413 
414 			<legal all>
415 */
416 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_OFFSET                       0x00000000
417 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_LSB                          3
418 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_MASK                         0x0001fff8
419 
420 /* Description		RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION
421 
422 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
423 			over multiple buffers, this field will be valid in the Last
424 			buffer used by the MSDU
425 
426 
427 
428 			The ID of the REO exit ring where the MSDU frame shall
429 			push after (MPDU level) reordering has finished.
430 
431 
432 
433 			<enum 0 reo_destination_tcl> Reo will push the frame
434 			into the REO2TCL ring
435 
436 			<enum 1 reo_destination_sw1> Reo will push the frame
437 			into the REO2SW1 ring
438 
439 			<enum 2 reo_destination_sw2> Reo will push the frame
440 			into the REO2SW2 ring
441 
442 			<enum 3 reo_destination_sw3> Reo will push the frame
443 			into the REO2SW3 ring
444 
445 			<enum 4 reo_destination_sw4> Reo will push the frame
446 			into the REO2SW4 ring
447 
448 			<enum 5 reo_destination_release> Reo will push the frame
449 			into the REO_release ring
450 
451 			<enum 6 reo_destination_fw> Reo will push the frame into
452 			the REO2FW ring
453 
454 			<enum 7 reo_destination_sw5> Reo will push the frame
455 			into the REO2SW5 ring (REO remaps this in chips without
456 			REO2SW5 ring, e.g. Pine)
457 
458 			<enum 8 reo_destination_sw6> Reo will push the frame
459 			into the REO2SW6 ring (REO remaps this in chips without
460 			REO2SW6 ring, e.g. Pine)
461 
462 			 <enum 9 reo_destination_9> REO remaps this <enum 10
463 			reo_destination_10> REO remaps this
464 
465 			<enum 11 reo_destination_11> REO remaps this
466 
467 			<enum 12 reo_destination_12> REO remaps this <enum 13
468 			reo_destination_13> REO remaps this
469 
470 			<enum 14 reo_destination_14> REO remaps this
471 
472 			<enum 15 reo_destination_15> REO remaps this
473 
474 			<enum 16 reo_destination_16> REO remaps this
475 
476 			<enum 17 reo_destination_17> REO remaps this
477 
478 			<enum 18 reo_destination_18> REO remaps this
479 
480 			<enum 19 reo_destination_19> REO remaps this
481 
482 			<enum 20 reo_destination_20> REO remaps this
483 
484 			<enum 21 reo_destination_21> REO remaps this
485 
486 			<enum 22 reo_destination_22> REO remaps this
487 
488 			<enum 23 reo_destination_23> REO remaps this
489 
490 			<enum 24 reo_destination_24> REO remaps this
491 
492 			<enum 25 reo_destination_25> REO remaps this
493 
494 			<enum 26 reo_destination_26> REO remaps this
495 
496 			<enum 27 reo_destination_27> REO remaps this
497 
498 			<enum 28 reo_destination_28> REO remaps this
499 
500 			<enum 29 reo_destination_29> REO remaps this
501 
502 			<enum 30 reo_destination_30> REO remaps this
503 
504 			<enum 31 reo_destination_31> REO remaps this
505 
506 
507 
508 			<legal all>
509 */
510 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_OFFSET        0x00000000
511 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_LSB           17
512 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_MASK          0x003e0000
513 
514 /* Description		RX_MSDU_DESC_INFO_0_MSDU_DROP
515 
516 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
517 			over multiple buffers, this field will be valid in the Last
518 			buffer used by the MSDU
519 
520 
521 
522 			When set, REO shall drop this MSDU and not forward it to
523 			any other ring...
524 
525 			<legal all>
526 */
527 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_OFFSET                         0x00000000
528 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_LSB                            22
529 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_MASK                           0x00400000
530 
531 /* Description		RX_MSDU_DESC_INFO_0_SA_IS_VALID
532 
533 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
534 			over multiple buffers, this field will be valid in the Last
535 			buffer used by the MSDU
536 
537 
538 
539 			Indicates that OLE found a valid SA entry for this MSDU
540 
541 			<legal all>
542 */
543 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_OFFSET                       0x00000000
544 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_LSB                          23
545 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_MASK                         0x00800000
546 
547 /* Description		RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT
548 
549 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
550 			over multiple buffers, this field will be valid in the Last
551 			buffer used by the MSDU
552 
553 
554 
555 			Indicates an unsuccessful MAC source address search due
556 			to the expiring of the search timer for this MSDU
557 
558 			<legal all>
559 */
560 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET                    0x00000000
561 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB                       24
562 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK                      0x01000000
563 
564 /* Description		RX_MSDU_DESC_INFO_0_DA_IS_VALID
565 
566 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
567 			over multiple buffers, this field will be valid in the Last
568 			buffer used by the MSDU
569 
570 
571 
572 			Indicates that OLE found a valid DA entry for this MSDU
573 
574 			<legal all>
575 */
576 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_OFFSET                       0x00000000
577 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_LSB                          25
578 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_MASK                         0x02000000
579 
580 /* Description		RX_MSDU_DESC_INFO_0_DA_IS_MCBC
581 
582 			Field Only valid if da_is_valid is set
583 
584 
585 
586 			Indicates the DA address was a Multicast of Broadcast
587 			address for this MSDU
588 
589 			<legal all>
590 */
591 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_OFFSET                        0x00000000
592 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_LSB                           26
593 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_MASK                          0x04000000
594 
595 /* Description		RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT
596 
597 			Parsed from RX_MSDU_END TLV . In the case MSDU spans
598 			over multiple buffers, this field will be valid in the Last
599 			buffer used by the MSDU
600 
601 
602 
603 			Indicates an unsuccessful MAC destination address search
604 			due to the expiring of the search timer for this MSDU
605 
606 			<legal all>
607 */
608 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET                    0x00000000
609 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB                       27
610 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK                      0x08000000
611 
612 /* Description		RX_MSDU_DESC_INFO_0_RESERVED_0A
613 
614 			<legal 0>
615 */
616 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_OFFSET                       0x00000000
617 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_LSB                          28
618 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_MASK                         0xf0000000
619 
620 /* Description		RX_MSDU_DESC_INFO_1_RESERVED_1A
621 
622 			<legal 0>
623 */
624 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_OFFSET                       0x00000004
625 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_LSB                          0
626 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_MASK                         0xffffffff
627 
628 
629 #endif // _RX_MSDU_DESC_INFO_H_
630