xref: /wlan-driver/fw-api/hw/qca6750/v1/wbm_release_ring.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 _WBM_RELEASE_RING_H_
25 #define _WBM_RELEASE_RING_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 #include "buffer_addr_info.h"
30 #include "tx_rate_stats_info.h"
31 
32 // ################ START SUMMARY #################
33 //
34 //	Dword	Fields
35 //	0-1	struct buffer_addr_info released_buff_or_desc_addr_info;
36 //	2	release_source_module[2:0], bm_action[5:3], buffer_or_desc_type[8:6], first_msdu_index[12:9], tqm_release_reason[16:13], rxdma_push_reason[18:17], rxdma_error_code[23:19], reo_push_reason[25:24], reo_error_code[30:26], wbm_internal_error[31]
37 //	3	tqm_status_number[23:0], transmit_count[30:24], msdu_continuation[31]
38 //	4	ack_frame_rssi[7:0], sw_release_details_valid[8], first_msdu[9], last_msdu[10], msdu_part_of_amsdu[11], fw_tx_notify_frame[12], buffer_timestamp[31:13]
39 //	5-6	struct tx_rate_stats_info tx_rate_stats;
40 //	7	sw_peer_id[15:0], tid[19:16], ring_id[27:20], looping_count[31:28]
41 //
42 // ################ END SUMMARY #################
43 
44 #define NUM_OF_DWORDS_WBM_RELEASE_RING 8
45 
46 struct wbm_release_ring {
47     struct            buffer_addr_info                       released_buff_or_desc_addr_info;
48              uint32_t release_source_module           :  3, //[2:0]
49                       bm_action                       :  3, //[5:3]
50                       buffer_or_desc_type             :  3, //[8:6]
51                       first_msdu_index                :  4, //[12:9]
52                       tqm_release_reason              :  4, //[16:13]
53                       rxdma_push_reason               :  2, //[18:17]
54                       rxdma_error_code                :  5, //[23:19]
55                       reo_push_reason                 :  2, //[25:24]
56                       reo_error_code                  :  5, //[30:26]
57                       wbm_internal_error              :  1; //[31]
58              uint32_t tqm_status_number               : 24, //[23:0]
59                       transmit_count                  :  7, //[30:24]
60                       msdu_continuation               :  1; //[31]
61              uint32_t ack_frame_rssi                  :  8, //[7:0]
62                       sw_release_details_valid        :  1, //[8]
63                       first_msdu                      :  1, //[9]
64                       last_msdu                       :  1, //[10]
65                       msdu_part_of_amsdu              :  1, //[11]
66                       fw_tx_notify_frame              :  1, //[12]
67                       buffer_timestamp                : 19; //[31:13]
68     struct            tx_rate_stats_info                       tx_rate_stats;
69              uint32_t sw_peer_id                      : 16, //[15:0]
70                       tid                             :  4, //[19:16]
71                       ring_id                         :  8, //[27:20]
72                       looping_count                   :  4; //[31:28]
73 };
74 
75 /*
76 
77 struct buffer_addr_info released_buff_or_desc_addr_info
78 
79 			Consumer: WBM/SW/FW
80 
81 			Producer: SW/TQM/RXDMA/REO/SWITCH
82 
83 
84 
85 			Details of the physical address of the buffer or link
86 			descriptor that is being released. Note that within this
87 			descriptor, WBM will look at the 'owner' of the released
88 			buffer/descriptor and forward it to SW/FW is WBM is not the
89 			owner.
90 
91 
92 
93 			In case of TQM releasing Tx MSDU link descriptors with
94 			Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
95 			WBM can optionally release the MSDU buffers pointed to by
96 			the MSDU link descriptors to FW and override the
97 			tx_rate_stats field, for FW reinjection of these MSDUs
98 			(FR54309). This is not supported in Pine.
99 
100 release_source_module
101 
102 			Indicates which module initiated the release of this
103 			buffer or descriptor
104 
105 
106 
107 			<enum 0 release_source_TQM> TQM released this buffer or
108 			descriptor
109 
110 			<enum 1 release_source_RXDMA> RXDMA released this buffer
111 			or descriptor
112 
113 			<enum 2 release_source_REO> REO released this buffer or
114 			descriptor
115 
116 			<enum 3 release_source_FW> FW released this buffer or
117 			descriptor
118 
119 			<enum 4 release_source_SW> SW released this buffer or
120 			descriptor
121 
122 			<legal 0-4>
123 
124 bm_action
125 
126 			Consumer: WBM/SW/FW
127 
128 			Producer: SW/TQM/RXDMA/REO/SWITCH
129 
130 
131 
132 			Field only valid when the field return_buffer_manager in
133 			the Released_buff_or_desc_addr_info indicates:
134 
135 			WBM_IDLE_BUF_LIST or
136 
137 			WBM_IDLE_DESC_LIST
138 
139 
140 
141 			An MSDU extension descriptor shall never be marked as
142 
143 
144 
145 			<enum 0 Put_in_idle_list> Put the buffer or descriptor
146 			back in the idle list. In case of MSDU or MDPU link
147 			descriptor, BM does not need to check to release any
148 			individual MSDU buffers
149 
150 
151 
152 			<enum 1 release_msdu_list > This BM action can only be
153 			used in combination with buffer_or_desc_type being
154 			msdu_link_descriptor. Field first_msdu_index points out
155 			which MSDU pointer in the MSDU link descriptor is the first
156 			of an MPDU that is released.
157 
158 			BM shall release all the MSDU buffers linked to this
159 			first MSDU buffer pointer. All related MSDU buffer pointer
160 			entries shall be set to value 0, which represents the 'NULL
161 			pointer. When all MSDU buffer pointers in the MSDU link
162 			descriptor are 'NULL', the MSDU link descriptor itself shall
163 			also be released.
164 
165 
166 
167 			<enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
168 			IMPLEMENTED....
169 
170 			Put the buffer or descriptor back in the idle list. Only
171 			valid in combination with buffer_or_desc_type indicating
172 			MDPU_link_descriptor.
173 
174 			BM shall release the MPDU link descriptor as well as all
175 			MSDUs that are linked to the MPDUs in this descriptor.
176 
177 
178 
179 			<legal 0-2>
180 
181 buffer_or_desc_type
182 
183 			Consumer: WBM/SW/FW
184 
185 			Producer: SW/TQM/RXDMA/REO/SWITCH
186 
187 
188 
189 			Field only valid when WBM is marked as the
190 			return_buffer_manager in the Released_Buffer_address_info
191 
192 
193 
194 			Indicates that type of buffer or descriptor is being
195 			released
196 
197 
198 
199 			<enum 0 MSDU_rel_buffer> The address points to an MSDU
200 			buffer
201 
202 			<enum 1 msdu_link_descriptor> The address points to an
203 			TX MSDU link descriptor
204 
205 			<enum 2 mpdu_link_descriptor> The address points to an
206 			MPDU link descriptor
207 
208 			<enum 3 msdu_ext_descriptor > The address points to an
209 			MSDU extension descriptor.
210 
211 			In case BM finds this one in a release ring, it passes
212 			it on to FW...
213 
214 			<enum 4 queue_ext_descriptor> The address points to an
215 			TQM queue extension descriptor. WBM should treat this is the
216 			same way as a link descriptor. That is, put the 128 byte
217 			buffer back in the link buffer idle list.
218 
219 
220 
221 			<legal 0-4>
222 
223 first_msdu_index
224 
225 			Consumer: WBM/SW/FW
226 
227 			Producer: SW/TQM/RXDMA/REO/SWITCH
228 
229 
230 
231 			Field only valid for the bm_action release_msdu_list.
232 
233 
234 
235 			The index of the first MSDU in an MSDU link descriptor
236 			all belonging to the same MPDU.
237 
238 
239 
240 			<legal 0-6>
241 
242 tqm_release_reason
243 
244 			Consumer: WBM/SW/FW
245 
246 			Producer: TQM
247 
248 
249 
250 			Field only valid when Release_source_module is set to
251 			release_source_TQM
252 
253 
254 
255 			(rr = Release Reason)
256 
257 			<enum 0 tqm_rr_frame_acked> frame is removed because an
258 			ACK of BA for it was received
259 
260 			<enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
261 			remove command of type Remove_mpdus initiated by SW
262 
263 			<enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
264 			remove command of type Remove_transmitted_mpdus initiated by
265 			SW
266 
267 			<enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
268 			remove command of type Remove_untransmitted_mpdus initiated
269 			by SW
270 
271 			<enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
272 			remove command of type Remove_aged_mpdus or
273 			Remove_aged_msdus initiated by SW
274 
275 			<enum 5 tqm_fw_reason1> frame is removed because a
276 			remove command where fw indicated that remove reason is
277 			fw_reason1
278 
279 			<enum 6 tqm_fw_reason2> frame is removed because a
280 			remove command where fw indicated that remove reason is
281 			fw_reason1
282 
283 			<enum 7 tqm_fw_reason3> frame is removed because a
284 			remove command where fw indicated that remove reason is
285 			fw_reason1
286 
287 			<enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed
288 			because a remove command of type
289 			remove_mpdus_and_disable_queue or
290 			remove_msdus_and_disable_flow initiated by SW
291 
292 
293 
294 			<legal 0-8>
295 
296 
297 
298 			In case of TQM releasing Tx MSDU link descriptors with
299 			Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
300 			WBM can optionally release the MSDU buffers pointed to by
301 			the MSDU link descriptors to FW and override the
302 			tx_rate_stats field, for FW reinjection of these MSDUs
303 			(FR54309). This is not supported in Pine.
304 
305 rxdma_push_reason
306 
307 			Field only valid when Release_source_module is set to
308 			release_source_RXDMA
309 
310 
311 
312 			Indicates why rxdma pushed the frame to this ring
313 
314 
315 
316 			<enum 0 rxdma_error_detected> RXDMA detected an error an
317 			pushed this frame to this queue
318 
319 			<enum 1 rxdma_routing_instruction> RXDMA pushed the
320 			frame to this queue per received routing instructions. No
321 			error within RXDMA was detected
322 
323 			<enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
324 			result the MSDU link descriptor might not have the
325 			last_msdu_in_mpdu_flag set, but instead WBM might just see a
326 			NULL pointer in the MSDU link descriptor. This is to be
327 			considered a normal condition for this scenario.
328 
329 
330 
331 			<legal 0 - 2>
332 
333 rxdma_error_code
334 
335 			Field only valid when 'rxdma_push_reason' set to
336 			'rxdma_error_detected'.
337 
338 
339 
340 			<enum 0 rxdma_overflow_err>MPDU frame is not complete
341 			due to a FIFO overflow error in RXPCU.
342 
343 			<enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
344 			due to receiving incomplete MPDU from the PHY
345 
346 
347 			<enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
348 			error or CRYPTO received an encrypted frame, but did not get
349 			a valid corresponding key id in the peer entry.
350 
351 			<enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
352 			error
353 
354 			<enum 5 rxdma_unecrypted_err>CRYPTO reported an
355 			unencrypted frame error when encrypted was expected
356 
357 			<enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
358 			length error
359 
360 			<enum 7 rxdma_msdu_limit_err>RX OLE reported that max
361 			number of MSDUs allowed in an MPDU got exceeded
362 
363 			<enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
364 			error
365 
366 			<enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
367 			parsing error
368 
369 			<enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
370 			during SA search
371 
372 			<enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
373 			during DA search
374 
375 			<enum 12 rxdma_flow_timeout_err>RX OLE reported a
376 			timeout during flow search
377 
378 			<enum 13 rxdma_flush_request>RXDMA received a flush
379 			request
380 
381 			<enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
382 			present as well as a fragmented MPDU. A-MSDU defragmentation
383 			is not supported in Lithium SW so this is treated as an
384 			error.
385 
386 reo_push_reason
387 
388 			Field only valid when Release_source_module is set to
389 			release_source_REO
390 
391 
392 
393 			Indicates why REO pushed the frame to this release ring
394 
395 
396 
397 			<enum 0 reo_error_detected> Reo detected an error an
398 			pushed this frame to this queue
399 
400 			<enum 1 reo_routing_instruction> Reo pushed the frame to
401 			this queue per received routing instructions. No error
402 			within REO was detected
403 
404 
405 
406 			<legal 0 - 1>
407 
408 reo_error_code
409 
410 			Field only valid when 'Reo_push_reason' set to
411 			'reo_error_detected'.
412 
413 
414 
415 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
416 			provided in the REO_ENTRANCE ring is set to 0
417 
418 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
419 			valid bit is NOT set
420 
421 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
422 			session having been setup.
423 
424 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
425 			SSN, Retry bit set: duplicate frame
426 
427 			<enum 4 ba_duplicate> BA session, duplicate frame
428 
429 			<enum 5 regular_frame_2k_jump> A normal (management/data
430 			frame) received with 2K jump in SN
431 
432 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
433 			in SSN
434 
435 			<enum 7 regular_frame_OOR> A normal (management/data
436 			frame) received with SN falling within the OOR window
437 
438 			<enum 8 bar_frame_OOR> A bar received with SSN falling
439 			within the OOR window
440 
441 			<enum 9 bar_frame_no_ba_session> A bar received without
442 			a BA session
443 
444 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
445 			SSN equal to SN
446 
447 			<enum 11 pn_check_failed> PN Check Failed packet.
448 
449 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
450 			as a result of the 'Seq_2k_error_detected_flag' been set in
451 			the REO Queue descriptor
452 
453 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
454 			as a result of the 'pn_error_detected_flag' been set in the
455 			REO Queue descriptor
456 
457 			<enum 14 queue_descriptor_blocked_set> Frame is
458 			forwarded as a result of the queue descriptor(address) being
459 			blocked as SW/FW seems to be currently in the process of
460 			making updates to this descriptor...
461 
462 
463 
464 			<legal 0-14>
465 
466 wbm_internal_error
467 
468 			Can only be set by WBM.
469 
470 
471 
472 			Is set when WBM got a buffer pointer but the action was
473 			to push it to the idle link descriptor ring or do link
474 			related activity
475 
476 			OR
477 
478 			Is set when WBM got a link buffer pointer but the action
479 			was to push it to the buffer  descriptor ring
480 
481 
482 
483 			<legal all>
484 
485 tqm_status_number
486 
487 			Field only valid when Release_source_module is set to
488 			release_source_TQM
489 
490 
491 
492 			The value in this field is equal to value of the
493 			'TQM_CMD_Number' field the TQM command or the
494 			'TQM_add_cmd_Number' field from the TQM entrance ring
495 			descriptor
496 
497 
498 
499 			This field helps to correlate the statuses with the TQM
500 			commands.
501 
502 
503 
504 			NOTE that SW could program this number to be equal to
505 			the PPDU_ID number in case direct correlation with the PPDU
506 			ID is desired
507 
508 
509 
510 			<legal all>
511 
512 transmit_count
513 
514 			Field only valid when Release_source_module is set to
515 			release_source_TQM
516 
517 
518 
519 			The number of times this frame has been transmitted
520 
521 msdu_continuation
522 
523 			FR53947 requests MSDU_continuation reporting for Rx
524 			MSDUs in Pine and HastingsPrime for which
525 			SW_release_details_valid may not be set.
526 
527 			<legal all>
528 
529 ack_frame_rssi
530 
531 			This field is only valid when the source is TQM.
532 
533 
534 
535 			If this frame is removed as the result of the reception
536 			of an ACK or BA, this field indicates the RSSI of the
537 			received ACK or BA frame.
538 
539 
540 
541 			When the frame is removed as result of a direct remove
542 			command from the SW,  this field is set to 0x0 (which is
543 			never a valid value when real RSSI is available)
544 
545 
546 
547 			<legal all>
548 
549 sw_release_details_valid
550 
551 			Consumer: SW
552 
553 			Producer: WBM
554 
555 
556 
557 			When set, some WBM specific release info for SW is
558 			valid.
559 
560 			This is set when WMB got a 'release_msdu_list' command
561 			from TQM and the return buffer manager is not WMB. WBM will
562 			then de-aggregate all the MSDUs and pass them one at a time
563 			on to the 'buffer owner'
564 
565 
566 
567 			<legal all>
568 
569 first_msdu
570 
571 			Field only valid when SW_release_details_valid is set.
572 
573 
574 
575 			Consumer: SW
576 
577 			Producer: WBM
578 
579 
580 
581 			When set, this MSDU is the first MSDU pointed to in the
582 			'release_msdu_list' command.
583 
584 
585 
586 			FR53947 extends this to Rx MSDUs in Pine and
587 			HastingsPrime for which SW_release_details_valid may not be
588 			set.
589 
590 			<legal all>
591 
592 last_msdu
593 
594 			Field only valid when SW_release_details_valid is set.
595 
596 
597 
598 			Consumer: SW
599 
600 			Producer: WBM
601 
602 
603 
604 			When set, this MSDU is the last MSDU pointed to in the
605 			'release_msdu_list' command.
606 
607 
608 
609 			FR53947 extends this to Rx MSDUs in Pine and
610 			HastingsPrime for which SW_release_details_valid may not be
611 			set.
612 
613 			<legal all>
614 
615 msdu_part_of_amsdu
616 
617 			Field only valid when SW_release_details_valid is set.
618 
619 
620 
621 			Consumer: SW
622 
623 			Producer: WBM
624 
625 
626 
627 			When set, this MSDU was part of an A-MSDU in MPDU
628 
629 			<legal all>
630 
631 fw_tx_notify_frame
632 
633 			Field only valid when SW_release_details_valid is set.
634 
635 
636 
637 			Consumer: SW
638 
639 			Producer: WBM
640 
641 
642 
643 			This is the FW_tx_notify_frame field from the
644 
645 			<legal all>
646 
647 buffer_timestamp
648 
649 			Field only valid when SW_release_details_valid is set.
650 
651 
652 
653 			Consumer: SW
654 
655 			Producer: WBM
656 
657 
658 
659 			This is the Buffer_timestamp field from the
660 			TX_MSDU_DETAILS for this frame from the MSDU link
661 			descriptor.
662 
663 
664 
665 			Timestamp in units of 1024 µs
666 
667 			<legal all>
668 
669 struct tx_rate_stats_info tx_rate_stats
670 
671 			Consumer: TQM
672 
673 			Producer: SW/SCH(from TXPCU, PDG)
674 
675 
676 
677 			Details for command execution tracking purposes.
678 
679 
680 
681 			In case of TQM releasing Tx MSDU link descriptors with
682 			Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
683 			WBM can optionally release the MSDU buffers pointed to by
684 			the MSDU link descriptors to FW and override the
685 			tx_rate_stats field with words 2 and 3 of the
686 			'TX_MSDU_DETAILS' structure, for FW reinjection of these
687 			MSDUs (FR54309). This is not supported in Pine.
688 
689 sw_peer_id
690 
691 			Field only valid when Release_source_module is set to
692 			release_source_TQM
693 
694 
695 
696 			1) Release of msdu buffer due to drop_frame = 1. Flow is
697 			not fetched and hence sw_peer_id and tid = 0
698 
699 			buffer_or_desc_type = e_num 0
700 			MSDU_rel_buffertqm_release_reason = e_num 1
701 			tqm_rr_rem_cmd_rem
702 
703 
704 
705 
706 
707 			2) Release of msdu buffer due to Flow is not fetched and
708 			hence sw_peer_id and tid = 0
709 
710 			buffer_or_desc_type = e_num 0
711 			MSDU_rel_buffertqm_release_reason = e_num 1
712 			tqm_rr_rem_cmd_rem
713 
714 
715 
716 
717 
718 			3) Release of msdu link due to remove_mpdu or acked_mpdu
719 			command.
720 
721 			buffer_or_desc_type = e_num1
722 			msdu_link_descriptortqm_release_reason can be:e_num 1
723 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
724 
725 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
726 
727 
728 
729 			Sw_peer_id from the TX_MSDU_FLOW descriptor or
730 			TX_MPDU_QUEUE descriptor
731 
732 			<legal all>
733 
734 tid
735 
736 			Field only valid when Release_source_module is set to
737 			release_source_TQM
738 
739 
740 
741 			1) Release of msdu buffer due to drop_frame = 1. Flow is
742 			not fetched and hence sw_peer_id and tid = 0
743 
744 			buffer_or_desc_type = e_num 0
745 			MSDU_rel_buffertqm_release_reason = e_num 1
746 			tqm_rr_rem_cmd_rem
747 
748 
749 
750 
751 
752 			2) Release of msdu buffer due to Flow is not fetched and
753 			hence sw_peer_id and tid = 0
754 
755 			buffer_or_desc_type = e_num 0
756 			MSDU_rel_buffertqm_release_reason = e_num 1
757 			tqm_rr_rem_cmd_rem
758 
759 
760 
761 
762 
763 			3) Release of msdu link due to remove_mpdu or acked_mpdu
764 			command.
765 
766 			buffer_or_desc_type = e_num1
767 			msdu_link_descriptortqm_release_reason can be:e_num 1
768 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
769 
770 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
771 
772 
773 
774 
775 
776 			This field represents the TID from the TX_MSDU_FLOW
777 			descriptor or TX_MPDU_QUEUE descriptor
778 
779 
780 
781 			 <legal all>
782 
783 ring_id
784 
785 			Consumer: TQM/REO/RXDMA/SW
786 
787 			Producer: SRNG (of RXDMA)
788 
789 
790 
791 			For debugging.
792 
793 			This field is filled in by the SRNG module.
794 
795 			It help to identify the ring that is being looked <legal
796 			all>
797 
798 looping_count
799 
800 			Consumer: WBM/SW/FW
801 
802 			Producer: SW/TQM/RXDMA/REO/SWITCH
803 
804 
805 
806 			A count value that indicates the number of times the
807 			producer of entries into the Buffer Manager Ring has looped
808 			around the ring.
809 
810 			At initialization time, this value is set to 0. On the
811 			first loop, this value is set to 1. After the max value is
812 			reached allowed by the number of bits for this field, the
813 			count value continues with 0 again.
814 
815 
816 
817 			In case SW is the consumer of the ring entries, it can
818 			use this field to figure out up to where the producer of
819 			entries has created new entries. This eliminates the need to
820 			check where the head pointer' of the ring is located once
821 			the SW starts processing an interrupt indicating that new
822 			entries have been put into this ring...
823 
824 
825 
826 			Also note that SW if it wants only needs to look at the
827 			LSB bit of this count value.
828 
829 			<legal all>
830 */
831 
832 
833  /* EXTERNAL REFERENCE : struct buffer_addr_info released_buff_or_desc_addr_info */
834 
835 
836 /* Description		WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0
837 
838 			Address (lower 32 bits) of the MSDU buffer OR
839 			MSDU_EXTENSION descriptor OR Link Descriptor
840 
841 
842 
843 			In case of 'NULL' pointer, this field is set to 0
844 
845 			<legal all>
846 */
847 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
848 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
849 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
850 
851 /* Description		WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32
852 
853 			Address (upper 8 bits) of the MSDU buffer OR
854 			MSDU_EXTENSION descriptor OR Link Descriptor
855 
856 
857 
858 			In case of 'NULL' pointer, this field is set to 0
859 
860 			<legal all>
861 */
862 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
863 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
864 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
865 
866 /* Description		WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER
867 
868 			Consumer: WBM
869 
870 			Producer: SW/FW
871 
872 
873 
874 			In case of 'NULL' pointer, this field is set to 0
875 
876 
877 
878 			Indicates to which buffer manager the buffer OR
879 			MSDU_EXTENSION descriptor OR link descriptor that is being
880 			pointed to shall be returned after the frame has been
881 			processed. It is used by WBM for routing purposes.
882 
883 
884 
885 			<enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
886 			to the WMB buffer idle list
887 
888 			<enum 1 WBM_IDLE_DESC_LIST> This buffer shall be
889 			returned to the WMB idle link descriptor idle list
890 
891 			<enum 2 FW_BM> This buffer shall be returned to the FW
892 
893 			<enum 3 SW0_BM> This buffer shall be returned to the SW,
894 			ring 0
895 
896 			<enum 4 SW1_BM> This buffer shall be returned to the SW,
897 			ring 1
898 
899 			<enum 5 SW2_BM> This buffer shall be returned to the SW,
900 			ring 2
901 
902 			<enum 6 SW3_BM> This buffer shall be returned to the SW,
903 			ring 3
904 
905 			<enum 7 SW4_BM> This buffer shall be returned to the SW,
906 			ring 4
907 
908 
909 
910 			<legal all>
911 */
912 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
913 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
914 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
915 
916 /* Description		WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE
917 
918 			Cookie field exclusively used by SW.
919 
920 
921 
922 			In case of 'NULL' pointer, this field is set to 0
923 
924 
925 
926 			HW ignores the contents, accept that it passes the
927 			programmed value on to other descriptors together with the
928 			physical address
929 
930 
931 
932 			Field can be used by SW to for example associate the
933 			buffers physical address with the virtual address
934 
935 			The bit definitions as used by SW are within SW HLD
936 			specification
937 
938 
939 
940 			NOTE:
941 
942 			The three most significant bits can have a special
943 			meaning in case this struct is embedded in a TX_MPDU_DETAILS
944 			STRUCT, and field transmit_bw_restriction is set
945 
946 
947 
948 			In case of NON punctured transmission:
949 
950 			Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only
951 
952 			Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only
953 
954 			Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only
955 
956 			Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only
957 
958 
959 
960 			In case of punctured transmission:
961 
962 			Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only
963 
964 			Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only
965 
966 			Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only
967 
968 			Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only
969 
970 			Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only
971 
972 			Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only
973 
974 			Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only
975 
976 			Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only
977 
978 
979 
980 			Note: a punctured transmission is indicated by the
981 			presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler
982 			TLV
983 
984 
985 
986 			<legal all>
987 */
988 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
989 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
990 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
991 
992 /* Description		WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE
993 
994 			Indicates which module initiated the release of this
995 			buffer or descriptor
996 
997 
998 
999 			<enum 0 release_source_TQM> TQM released this buffer or
1000 			descriptor
1001 
1002 			<enum 1 release_source_RXDMA> RXDMA released this buffer
1003 			or descriptor
1004 
1005 			<enum 2 release_source_REO> REO released this buffer or
1006 			descriptor
1007 
1008 			<enum 3 release_source_FW> FW released this buffer or
1009 			descriptor
1010 
1011 			<enum 4 release_source_SW> SW released this buffer or
1012 			descriptor
1013 
1014 			<legal 0-4>
1015 */
1016 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET              0x00000008
1017 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB                 0
1018 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK                0x00000007
1019 
1020 /* Description		WBM_RELEASE_RING_2_BM_ACTION
1021 
1022 			Consumer: WBM/SW/FW
1023 
1024 			Producer: SW/TQM/RXDMA/REO/SWITCH
1025 
1026 
1027 
1028 			Field only valid when the field return_buffer_manager in
1029 			the Released_buff_or_desc_addr_info indicates:
1030 
1031 			WBM_IDLE_BUF_LIST or
1032 
1033 			WBM_IDLE_DESC_LIST
1034 
1035 
1036 
1037 			An MSDU extension descriptor shall never be marked as
1038 
1039 
1040 
1041 			<enum 0 Put_in_idle_list> Put the buffer or descriptor
1042 			back in the idle list. In case of MSDU or MDPU link
1043 			descriptor, BM does not need to check to release any
1044 			individual MSDU buffers
1045 
1046 
1047 
1048 			<enum 1 release_msdu_list > This BM action can only be
1049 			used in combination with buffer_or_desc_type being
1050 			msdu_link_descriptor. Field first_msdu_index points out
1051 			which MSDU pointer in the MSDU link descriptor is the first
1052 			of an MPDU that is released.
1053 
1054 			BM shall release all the MSDU buffers linked to this
1055 			first MSDU buffer pointer. All related MSDU buffer pointer
1056 			entries shall be set to value 0, which represents the 'NULL
1057 			pointer. When all MSDU buffer pointers in the MSDU link
1058 			descriptor are 'NULL', the MSDU link descriptor itself shall
1059 			also be released.
1060 
1061 
1062 
1063 			<enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
1064 			IMPLEMENTED....
1065 
1066 			Put the buffer or descriptor back in the idle list. Only
1067 			valid in combination with buffer_or_desc_type indicating
1068 			MDPU_link_descriptor.
1069 
1070 			BM shall release the MPDU link descriptor as well as all
1071 			MSDUs that are linked to the MPDUs in this descriptor.
1072 
1073 
1074 
1075 			<legal 0-2>
1076 */
1077 #define WBM_RELEASE_RING_2_BM_ACTION_OFFSET                          0x00000008
1078 #define WBM_RELEASE_RING_2_BM_ACTION_LSB                             3
1079 #define WBM_RELEASE_RING_2_BM_ACTION_MASK                            0x00000038
1080 
1081 /* Description		WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE
1082 
1083 			Consumer: WBM/SW/FW
1084 
1085 			Producer: SW/TQM/RXDMA/REO/SWITCH
1086 
1087 
1088 
1089 			Field only valid when WBM is marked as the
1090 			return_buffer_manager in the Released_Buffer_address_info
1091 
1092 
1093 
1094 			Indicates that type of buffer or descriptor is being
1095 			released
1096 
1097 
1098 
1099 			<enum 0 MSDU_rel_buffer> The address points to an MSDU
1100 			buffer
1101 
1102 			<enum 1 msdu_link_descriptor> The address points to an
1103 			TX MSDU link descriptor
1104 
1105 			<enum 2 mpdu_link_descriptor> The address points to an
1106 			MPDU link descriptor
1107 
1108 			<enum 3 msdu_ext_descriptor > The address points to an
1109 			MSDU extension descriptor.
1110 
1111 			In case BM finds this one in a release ring, it passes
1112 			it on to FW...
1113 
1114 			<enum 4 queue_ext_descriptor> The address points to an
1115 			TQM queue extension descriptor. WBM should treat this is the
1116 			same way as a link descriptor. That is, put the 128 byte
1117 			buffer back in the link buffer idle list.
1118 
1119 
1120 
1121 			<legal 0-4>
1122 */
1123 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET                0x00000008
1124 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB                   6
1125 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK                  0x000001c0
1126 
1127 /* Description		WBM_RELEASE_RING_2_FIRST_MSDU_INDEX
1128 
1129 			Consumer: WBM/SW/FW
1130 
1131 			Producer: SW/TQM/RXDMA/REO/SWITCH
1132 
1133 
1134 
1135 			Field only valid for the bm_action release_msdu_list.
1136 
1137 
1138 
1139 			The index of the first MSDU in an MSDU link descriptor
1140 			all belonging to the same MPDU.
1141 
1142 
1143 
1144 			<legal 0-6>
1145 */
1146 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_OFFSET                   0x00000008
1147 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_LSB                      9
1148 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_MASK                     0x00001e00
1149 
1150 /* Description		WBM_RELEASE_RING_2_TQM_RELEASE_REASON
1151 
1152 			Consumer: WBM/SW/FW
1153 
1154 			Producer: TQM
1155 
1156 
1157 
1158 			Field only valid when Release_source_module is set to
1159 			release_source_TQM
1160 
1161 
1162 
1163 			(rr = Release Reason)
1164 
1165 			<enum 0 tqm_rr_frame_acked> frame is removed because an
1166 			ACK of BA for it was received
1167 
1168 			<enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
1169 			remove command of type Remove_mpdus initiated by SW
1170 
1171 			<enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
1172 			remove command of type Remove_transmitted_mpdus initiated by
1173 			SW
1174 
1175 			<enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
1176 			remove command of type Remove_untransmitted_mpdus initiated
1177 			by SW
1178 
1179 			<enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
1180 			remove command of type Remove_aged_mpdus or
1181 			Remove_aged_msdus initiated by SW
1182 
1183 			<enum 5 tqm_fw_reason1> frame is removed because a
1184 			remove command where fw indicated that remove reason is
1185 			fw_reason1
1186 
1187 			<enum 6 tqm_fw_reason2> frame is removed because a
1188 			remove command where fw indicated that remove reason is
1189 			fw_reason1
1190 
1191 			<enum 7 tqm_fw_reason3> frame is removed because a
1192 			remove command where fw indicated that remove reason is
1193 			fw_reason1
1194 
1195 			<enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed
1196 			because a remove command of type
1197 			remove_mpdus_and_disable_queue or
1198 			remove_msdus_and_disable_flow initiated by SW
1199 
1200 
1201 
1202 			<legal 0-8>
1203 
1204 
1205 
1206 			In case of TQM releasing Tx MSDU link descriptors with
1207 			Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime
1208 			WBM can optionally release the MSDU buffers pointed to by
1209 			the MSDU link descriptors to FW and override the
1210 			tx_rate_stats field, for FW reinjection of these MSDUs
1211 			(FR54309). This is not supported in Pine.
1212 */
1213 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET                 0x00000008
1214 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB                    13
1215 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK                   0x0001e000
1216 
1217 /* Description		WBM_RELEASE_RING_2_RXDMA_PUSH_REASON
1218 
1219 			Field only valid when Release_source_module is set to
1220 			release_source_RXDMA
1221 
1222 
1223 
1224 			Indicates why rxdma pushed the frame to this ring
1225 
1226 
1227 
1228 			<enum 0 rxdma_error_detected> RXDMA detected an error an
1229 			pushed this frame to this queue
1230 
1231 			<enum 1 rxdma_routing_instruction> RXDMA pushed the
1232 			frame to this queue per received routing instructions. No
1233 			error within RXDMA was detected
1234 
1235 			<enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
1236 			result the MSDU link descriptor might not have the
1237 			last_msdu_in_mpdu_flag set, but instead WBM might just see a
1238 			NULL pointer in the MSDU link descriptor. This is to be
1239 			considered a normal condition for this scenario.
1240 
1241 
1242 
1243 			<legal 0 - 2>
1244 */
1245 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_OFFSET                  0x00000008
1246 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_LSB                     17
1247 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_MASK                    0x00060000
1248 
1249 /* Description		WBM_RELEASE_RING_2_RXDMA_ERROR_CODE
1250 
1251 			Field only valid when 'rxdma_push_reason' set to
1252 			'rxdma_error_detected'.
1253 
1254 
1255 
1256 			<enum 0 rxdma_overflow_err>MPDU frame is not complete
1257 			due to a FIFO overflow error in RXPCU.
1258 
1259 			<enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
1260 			due to receiving incomplete MPDU from the PHY
1261 
1262 
1263 			<enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
1264 			error or CRYPTO received an encrypted frame, but did not get
1265 			a valid corresponding key id in the peer entry.
1266 
1267 			<enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
1268 			error
1269 
1270 			<enum 5 rxdma_unecrypted_err>CRYPTO reported an
1271 			unencrypted frame error when encrypted was expected
1272 
1273 			<enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
1274 			length error
1275 
1276 			<enum 7 rxdma_msdu_limit_err>RX OLE reported that max
1277 			number of MSDUs allowed in an MPDU got exceeded
1278 
1279 			<enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
1280 			error
1281 
1282 			<enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
1283 			parsing error
1284 
1285 			<enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
1286 			during SA search
1287 
1288 			<enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
1289 			during DA search
1290 
1291 			<enum 12 rxdma_flow_timeout_err>RX OLE reported a
1292 			timeout during flow search
1293 
1294 			<enum 13 rxdma_flush_request>RXDMA received a flush
1295 			request
1296 
1297 			<enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
1298 			present as well as a fragmented MPDU. A-MSDU defragmentation
1299 			is not supported in Lithium SW so this is treated as an
1300 			error.
1301 */
1302 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_OFFSET                   0x00000008
1303 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_LSB                      19
1304 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_MASK                     0x00f80000
1305 
1306 /* Description		WBM_RELEASE_RING_2_REO_PUSH_REASON
1307 
1308 			Field only valid when Release_source_module is set to
1309 			release_source_REO
1310 
1311 
1312 
1313 			Indicates why REO pushed the frame to this release ring
1314 
1315 
1316 
1317 			<enum 0 reo_error_detected> Reo detected an error an
1318 			pushed this frame to this queue
1319 
1320 			<enum 1 reo_routing_instruction> Reo pushed the frame to
1321 			this queue per received routing instructions. No error
1322 			within REO was detected
1323 
1324 
1325 
1326 			<legal 0 - 1>
1327 */
1328 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_OFFSET                    0x00000008
1329 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_LSB                       24
1330 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_MASK                      0x03000000
1331 
1332 /* Description		WBM_RELEASE_RING_2_REO_ERROR_CODE
1333 
1334 			Field only valid when 'Reo_push_reason' set to
1335 			'reo_error_detected'.
1336 
1337 
1338 
1339 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
1340 			provided in the REO_ENTRANCE ring is set to 0
1341 
1342 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
1343 			valid bit is NOT set
1344 
1345 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
1346 			session having been setup.
1347 
1348 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
1349 			SSN, Retry bit set: duplicate frame
1350 
1351 			<enum 4 ba_duplicate> BA session, duplicate frame
1352 
1353 			<enum 5 regular_frame_2k_jump> A normal (management/data
1354 			frame) received with 2K jump in SN
1355 
1356 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
1357 			in SSN
1358 
1359 			<enum 7 regular_frame_OOR> A normal (management/data
1360 			frame) received with SN falling within the OOR window
1361 
1362 			<enum 8 bar_frame_OOR> A bar received with SSN falling
1363 			within the OOR window
1364 
1365 			<enum 9 bar_frame_no_ba_session> A bar received without
1366 			a BA session
1367 
1368 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
1369 			SSN equal to SN
1370 
1371 			<enum 11 pn_check_failed> PN Check Failed packet.
1372 
1373 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
1374 			as a result of the 'Seq_2k_error_detected_flag' been set in
1375 			the REO Queue descriptor
1376 
1377 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
1378 			as a result of the 'pn_error_detected_flag' been set in the
1379 			REO Queue descriptor
1380 
1381 			<enum 14 queue_descriptor_blocked_set> Frame is
1382 			forwarded as a result of the queue descriptor(address) being
1383 			blocked as SW/FW seems to be currently in the process of
1384 			making updates to this descriptor...
1385 
1386 
1387 
1388 			<legal 0-14>
1389 */
1390 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_OFFSET                     0x00000008
1391 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_LSB                        26
1392 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_MASK                       0x7c000000
1393 
1394 /* Description		WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR
1395 
1396 			Can only be set by WBM.
1397 
1398 
1399 
1400 			Is set when WBM got a buffer pointer but the action was
1401 			to push it to the idle link descriptor ring or do link
1402 			related activity
1403 
1404 			OR
1405 
1406 			Is set when WBM got a link buffer pointer but the action
1407 			was to push it to the buffer  descriptor ring
1408 
1409 
1410 
1411 			<legal all>
1412 */
1413 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET                 0x00000008
1414 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB                    31
1415 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK                   0x80000000
1416 
1417 /* Description		WBM_RELEASE_RING_3_TQM_STATUS_NUMBER
1418 
1419 			Field only valid when Release_source_module is set to
1420 			release_source_TQM
1421 
1422 
1423 
1424 			The value in this field is equal to value of the
1425 			'TQM_CMD_Number' field the TQM command or the
1426 			'TQM_add_cmd_Number' field from the TQM entrance ring
1427 			descriptor
1428 
1429 
1430 
1431 			This field helps to correlate the statuses with the TQM
1432 			commands.
1433 
1434 
1435 
1436 			NOTE that SW could program this number to be equal to
1437 			the PPDU_ID number in case direct correlation with the PPDU
1438 			ID is desired
1439 
1440 
1441 
1442 			<legal all>
1443 */
1444 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_OFFSET                  0x0000000c
1445 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_LSB                     0
1446 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_MASK                    0x00ffffff
1447 
1448 /* Description		WBM_RELEASE_RING_3_TRANSMIT_COUNT
1449 
1450 			Field only valid when Release_source_module is set to
1451 			release_source_TQM
1452 
1453 
1454 
1455 			The number of times this frame has been transmitted
1456 */
1457 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_OFFSET                     0x0000000c
1458 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_LSB                        24
1459 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_MASK                       0x7f000000
1460 
1461 /* Description		WBM_RELEASE_RING_3_MSDU_CONTINUATION
1462 
1463 			FR53947 requests MSDU_continuation reporting for Rx
1464 			MSDUs in Pine and HastingsPrime for which
1465 			SW_release_details_valid may not be set.
1466 
1467 			<legal all>
1468 */
1469 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_OFFSET                  0x0000000c
1470 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_LSB                     31
1471 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_MASK                    0x80000000
1472 
1473 /* Description		WBM_RELEASE_RING_4_ACK_FRAME_RSSI
1474 
1475 			This field is only valid when the source is TQM.
1476 
1477 
1478 
1479 			If this frame is removed as the result of the reception
1480 			of an ACK or BA, this field indicates the RSSI of the
1481 			received ACK or BA frame.
1482 
1483 
1484 
1485 			When the frame is removed as result of a direct remove
1486 			command from the SW,  this field is set to 0x0 (which is
1487 			never a valid value when real RSSI is available)
1488 
1489 
1490 
1491 			<legal all>
1492 */
1493 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_OFFSET                     0x00000010
1494 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_LSB                        0
1495 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_MASK                       0x000000ff
1496 
1497 /* Description		WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID
1498 
1499 			Consumer: SW
1500 
1501 			Producer: WBM
1502 
1503 
1504 
1505 			When set, some WBM specific release info for SW is
1506 			valid.
1507 
1508 			This is set when WMB got a 'release_msdu_list' command
1509 			from TQM and the return buffer manager is not WMB. WBM will
1510 			then de-aggregate all the MSDUs and pass them one at a time
1511 			on to the 'buffer owner'
1512 
1513 
1514 
1515 			<legal all>
1516 */
1517 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_OFFSET           0x00000010
1518 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_LSB              8
1519 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_MASK             0x00000100
1520 
1521 /* Description		WBM_RELEASE_RING_4_FIRST_MSDU
1522 
1523 			Field only valid when SW_release_details_valid is set.
1524 
1525 
1526 
1527 			Consumer: SW
1528 
1529 			Producer: WBM
1530 
1531 
1532 
1533 			When set, this MSDU is the first MSDU pointed to in the
1534 			'release_msdu_list' command.
1535 
1536 
1537 
1538 			FR53947 extends this to Rx MSDUs in Pine and
1539 			HastingsPrime for which SW_release_details_valid may not be
1540 			set.
1541 
1542 			<legal all>
1543 */
1544 #define WBM_RELEASE_RING_4_FIRST_MSDU_OFFSET                         0x00000010
1545 #define WBM_RELEASE_RING_4_FIRST_MSDU_LSB                            9
1546 #define WBM_RELEASE_RING_4_FIRST_MSDU_MASK                           0x00000200
1547 
1548 /* Description		WBM_RELEASE_RING_4_LAST_MSDU
1549 
1550 			Field only valid when SW_release_details_valid is set.
1551 
1552 
1553 
1554 			Consumer: SW
1555 
1556 			Producer: WBM
1557 
1558 
1559 
1560 			When set, this MSDU is the last MSDU pointed to in the
1561 			'release_msdu_list' command.
1562 
1563 
1564 
1565 			FR53947 extends this to Rx MSDUs in Pine and
1566 			HastingsPrime for which SW_release_details_valid may not be
1567 			set.
1568 
1569 			<legal all>
1570 */
1571 #define WBM_RELEASE_RING_4_LAST_MSDU_OFFSET                          0x00000010
1572 #define WBM_RELEASE_RING_4_LAST_MSDU_LSB                             10
1573 #define WBM_RELEASE_RING_4_LAST_MSDU_MASK                            0x00000400
1574 
1575 /* Description		WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU
1576 
1577 			Field only valid when SW_release_details_valid is set.
1578 
1579 
1580 
1581 			Consumer: SW
1582 
1583 			Producer: WBM
1584 
1585 
1586 
1587 			When set, this MSDU was part of an A-MSDU in MPDU
1588 
1589 			<legal all>
1590 */
1591 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_OFFSET                 0x00000010
1592 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_LSB                    11
1593 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_MASK                   0x00000800
1594 
1595 /* Description		WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME
1596 
1597 			Field only valid when SW_release_details_valid is set.
1598 
1599 
1600 
1601 			Consumer: SW
1602 
1603 			Producer: WBM
1604 
1605 
1606 
1607 			This is the FW_tx_notify_frame field from the
1608 
1609 			<legal all>
1610 */
1611 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_OFFSET                 0x00000010
1612 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_LSB                    12
1613 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_MASK                   0x00001000
1614 
1615 /* Description		WBM_RELEASE_RING_4_BUFFER_TIMESTAMP
1616 
1617 			Field only valid when SW_release_details_valid is set.
1618 
1619 
1620 
1621 			Consumer: SW
1622 
1623 			Producer: WBM
1624 
1625 
1626 
1627 			This is the Buffer_timestamp field from the
1628 			TX_MSDU_DETAILS for this frame from the MSDU link
1629 			descriptor.
1630 
1631 
1632 
1633 			Timestamp in units of 1024 µs
1634 
1635 			<legal all>
1636 */
1637 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_OFFSET                   0x00000010
1638 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_LSB                      13
1639 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_MASK                     0xffffe000
1640 
1641  /* EXTERNAL REFERENCE : struct tx_rate_stats_info tx_rate_stats */
1642 
1643 
1644 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID
1645 
1646 			When set all other fields in this STRUCT contain valid
1647 			info.
1648 
1649 
1650 
1651 
1652 			<legal all>
1653 */
1654 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_OFFSET 0x00000014
1655 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_LSB 0
1656 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_MASK 0x00000001
1657 
1658 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW
1659 
1660 			Field only valid when Tx_rate_stats_info_valid is set
1661 
1662 
1663 
1664 			Indicates the BW of the upcoming transmission that shall
1665 			likely start in about 3 -4 us on the medium
1666 
1667 
1668 
1669 			<enum 0 transmit_bw_20_MHz>
1670 
1671 			<enum 1 transmit_bw_40_MHz>
1672 
1673 			<enum 2 transmit_bw_80_MHz>
1674 
1675 			<enum 3 transmit_bw_160_MHz>
1676 
1677 
1678 
1679 			<legal all>
1680 */
1681 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_OFFSET          0x00000014
1682 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_LSB             1
1683 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_MASK            0x00000006
1684 
1685 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE
1686 
1687 			Field only valid when Tx_rate_stats_info_valid is set
1688 
1689 
1690 
1691 			Field filled in by PDG.
1692 
1693 			Not valid when in SW transmit mode
1694 
1695 
1696 
1697 			The packet type
1698 
1699 			<enum 0 dot11a>802.11a PPDU type
1700 
1701 			<enum 1 dot11b>802.11b PPDU type
1702 
1703 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
1704 
1705 			<enum 3 dot11ac>802.11ac PPDU type
1706 
1707 			<enum 4 dot11ax>802.11ax PPDU type
1708 
1709 			<enum 5 dot11ba>802.11ba (WUR) PPDU type
1710 */
1711 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_OFFSET    0x00000014
1712 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_LSB       3
1713 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_MASK      0x00000078
1714 
1715 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC
1716 
1717 			Field only valid when Tx_rate_stats_info_valid is set
1718 
1719 
1720 
1721 			Field filled in by PDG.
1722 
1723 			Not valid when in SW transmit mode
1724 
1725 
1726 
1727 			When set, STBC transmission rate was used.
1728 */
1729 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_OFFSET        0x00000014
1730 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_LSB           7
1731 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_MASK          0x00000080
1732 
1733 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC
1734 
1735 			Field only valid when Tx_rate_stats_info_valid is set
1736 
1737 
1738 
1739 			Field filled in by PDG.
1740 
1741 			Not valid when in SW transmit mode
1742 
1743 
1744 
1745 			When set, use LDPC transmission rates
1746 */
1747 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_OFFSET        0x00000014
1748 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_LSB           8
1749 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_MASK          0x00000100
1750 
1751 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI
1752 
1753 			Field only valid when Tx_rate_stats_info_valid is set
1754 
1755 
1756 
1757 			Field filled in by PDG.
1758 
1759 			Not valid when in SW transmit mode
1760 
1761 
1762 
1763 			<enum 0     0_8_us_sgi > Legacy normal GI. Can also be
1764 			used for HE
1765 
1766 			<enum 1     0_4_us_sgi > Legacy short GI. Can also be
1767 			used for HE
1768 
1769 			<enum 2     1_6_us_sgi > HE related GI
1770 
1771 			<enum 3     3_2_us_sgi > HE related GI
1772 
1773 			<legal 0 - 3>
1774 */
1775 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_OFFSET         0x00000014
1776 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_LSB            9
1777 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_MASK           0x00000600
1778 
1779 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS
1780 
1781 			Field only valid when Tx_rate_stats_info_valid is set
1782 
1783 
1784 
1785 			Field filled in by PDG.
1786 
1787 			Not valid when in SW transmit mode
1788 
1789 
1790 
1791 			For details, refer to  MCS_TYPE description
1792 
1793 			<legal all>
1794 */
1795 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_OFFSET         0x00000014
1796 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_LSB            11
1797 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_MASK           0x00007800
1798 
1799 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION
1800 
1801 			Field only valid when Tx_rate_stats_info_valid is set
1802 
1803 
1804 
1805 			Field filled in by PDG.
1806 
1807 
1808 
1809 			Set when the transmission was an OFDMA transmission (DL
1810 			or UL).
1811 
1812 			<legal all>
1813 */
1814 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_OFFSET   0x00000014
1815 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_LSB      15
1816 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_MASK     0x00008000
1817 
1818 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU
1819 
1820 			Field only valid when Tx_rate_stats_info_valid is set
1821 
1822 
1823 
1824 			Field filled in by PDG.
1825 
1826 			Not valid when in SW transmit mode
1827 
1828 
1829 
1830 			The number of tones in the RU used.
1831 
1832 			<legal all>
1833 */
1834 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_OFFSET          0x00000014
1835 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_LSB             16
1836 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_MASK            0x0fff0000
1837 
1838 /* Description		WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A
1839 
1840 			<legal 0>
1841 */
1842 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_OFFSET          0x00000014
1843 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_LSB             28
1844 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_MASK            0xf0000000
1845 
1846 /* Description		WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF
1847 
1848 			Field only valid when Tx_rate_stats_info_valid is set
1849 
1850 
1851 
1852 			Based on a HWSCH configuration register setting, this
1853 			field either contains:
1854 
1855 
1856 
1857 			Lower 32 bits of the TSF, snapshot of this value when
1858 			transmission of the PPDU containing the frame finished.
1859 
1860 			OR
1861 
1862 			Lower 32 bits of the TSF, snapshot of this value when
1863 			transmission of the PPDU containing the frame started
1864 
1865 
1866 
1867 			<legal all>
1868 */
1869 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_OFFSET 0x00000018
1870 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_LSB   0
1871 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_MASK  0xffffffff
1872 
1873 /* Description		WBM_RELEASE_RING_7_SW_PEER_ID
1874 
1875 			Field only valid when Release_source_module is set to
1876 			release_source_TQM
1877 
1878 
1879 
1880 			1) Release of msdu buffer due to drop_frame = 1. Flow is
1881 			not fetched and hence sw_peer_id and tid = 0
1882 
1883 			buffer_or_desc_type = e_num 0
1884 			MSDU_rel_buffertqm_release_reason = e_num 1
1885 			tqm_rr_rem_cmd_rem
1886 
1887 
1888 
1889 
1890 
1891 			2) Release of msdu buffer due to Flow is not fetched and
1892 			hence sw_peer_id and tid = 0
1893 
1894 			buffer_or_desc_type = e_num 0
1895 			MSDU_rel_buffertqm_release_reason = e_num 1
1896 			tqm_rr_rem_cmd_rem
1897 
1898 
1899 
1900 
1901 
1902 			3) Release of msdu link due to remove_mpdu or acked_mpdu
1903 			command.
1904 
1905 			buffer_or_desc_type = e_num1
1906 			msdu_link_descriptortqm_release_reason can be:e_num 1
1907 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
1908 
1909 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
1910 
1911 
1912 
1913 			Sw_peer_id from the TX_MSDU_FLOW descriptor or
1914 			TX_MPDU_QUEUE descriptor
1915 
1916 			<legal all>
1917 */
1918 #define WBM_RELEASE_RING_7_SW_PEER_ID_OFFSET                         0x0000001c
1919 #define WBM_RELEASE_RING_7_SW_PEER_ID_LSB                            0
1920 #define WBM_RELEASE_RING_7_SW_PEER_ID_MASK                           0x0000ffff
1921 
1922 /* Description		WBM_RELEASE_RING_7_TID
1923 
1924 			Field only valid when Release_source_module is set to
1925 			release_source_TQM
1926 
1927 
1928 
1929 			1) Release of msdu buffer due to drop_frame = 1. Flow is
1930 			not fetched and hence sw_peer_id and tid = 0
1931 
1932 			buffer_or_desc_type = e_num 0
1933 			MSDU_rel_buffertqm_release_reason = e_num 1
1934 			tqm_rr_rem_cmd_rem
1935 
1936 
1937 
1938 
1939 
1940 			2) Release of msdu buffer due to Flow is not fetched and
1941 			hence sw_peer_id and tid = 0
1942 
1943 			buffer_or_desc_type = e_num 0
1944 			MSDU_rel_buffertqm_release_reason = e_num 1
1945 			tqm_rr_rem_cmd_rem
1946 
1947 
1948 
1949 
1950 
1951 			3) Release of msdu link due to remove_mpdu or acked_mpdu
1952 			command.
1953 
1954 			buffer_or_desc_type = e_num1
1955 			msdu_link_descriptortqm_release_reason can be:e_num 1
1956 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
1957 
1958 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
1959 
1960 
1961 
1962 
1963 
1964 			This field represents the TID from the TX_MSDU_FLOW
1965 			descriptor or TX_MPDU_QUEUE descriptor
1966 
1967 
1968 
1969 			 <legal all>
1970 */
1971 #define WBM_RELEASE_RING_7_TID_OFFSET                                0x0000001c
1972 #define WBM_RELEASE_RING_7_TID_LSB                                   16
1973 #define WBM_RELEASE_RING_7_TID_MASK                                  0x000f0000
1974 
1975 /* Description		WBM_RELEASE_RING_7_RING_ID
1976 
1977 			Consumer: TQM/REO/RXDMA/SW
1978 
1979 			Producer: SRNG (of RXDMA)
1980 
1981 
1982 
1983 			For debugging.
1984 
1985 			This field is filled in by the SRNG module.
1986 
1987 			It help to identify the ring that is being looked <legal
1988 			all>
1989 */
1990 #define WBM_RELEASE_RING_7_RING_ID_OFFSET                            0x0000001c
1991 #define WBM_RELEASE_RING_7_RING_ID_LSB                               20
1992 #define WBM_RELEASE_RING_7_RING_ID_MASK                              0x0ff00000
1993 
1994 /* Description		WBM_RELEASE_RING_7_LOOPING_COUNT
1995 
1996 			Consumer: WBM/SW/FW
1997 
1998 			Producer: SW/TQM/RXDMA/REO/SWITCH
1999 
2000 
2001 
2002 			A count value that indicates the number of times the
2003 			producer of entries into the Buffer Manager Ring has looped
2004 			around the ring.
2005 
2006 			At initialization time, this value is set to 0. On the
2007 			first loop, this value is set to 1. After the max value is
2008 			reached allowed by the number of bits for this field, the
2009 			count value continues with 0 again.
2010 
2011 
2012 
2013 			In case SW is the consumer of the ring entries, it can
2014 			use this field to figure out up to where the producer of
2015 			entries has created new entries. This eliminates the need to
2016 			check where the head pointer' of the ring is located once
2017 			the SW starts processing an interrupt indicating that new
2018 			entries have been put into this ring...
2019 
2020 
2021 
2022 			Also note that SW if it wants only needs to look at the
2023 			LSB bit of this count value.
2024 
2025 			<legal all>
2026 */
2027 #define WBM_RELEASE_RING_7_LOOPING_COUNT_OFFSET                      0x0000001c
2028 #define WBM_RELEASE_RING_7_LOOPING_COUNT_LSB                         28
2029 #define WBM_RELEASE_RING_7_LOOPING_COUNT_MASK                        0xf0000000
2030 
2031 
2032 #endif // _WBM_RELEASE_RING_H_
2033