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