xref: /wlan-driver/fw-api/hw/qca6390/v1/wbm_release_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018 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 #ifndef _WBM_RELEASE_RING_H_
20 #define _WBM_RELEASE_RING_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 #include "buffer_addr_info.h"
25 #include "tx_rate_stats_info.h"
26 
27 // ################ START SUMMARY #################
28 //
29 //	Dword	Fields
30 //	0-1	struct buffer_addr_info released_buff_or_desc_addr_info;
31 //	2	release_source_module[2:0], bm_action[5:3], buffer_or_desc_type[8:6], first_msdu_index[12:9], tqm_release_reason[15:13], rxdma_push_reason[17:16], rxdma_error_code[22:18], reo_push_reason[24:23], reo_error_code[29:25], wbm_internal_error[30], reserved_2[31]
32 //	3	tqm_status_number[23:0], transmit_count[30:24], reserved_3a[31]
33 //	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]
34 //	5-6	struct tx_rate_stats_info tx_rate_stats;
35 //	7	sw_peer_id[15:0], tid[19:16], ring_id[27:20], looping_count[31:28]
36 //
37 // ################ END SUMMARY #################
38 
39 #define NUM_OF_DWORDS_WBM_RELEASE_RING 8
40 
41 struct wbm_release_ring {
42     struct            buffer_addr_info                       released_buff_or_desc_addr_info;
43              uint32_t release_source_module           :  3, //[2:0]
44                       bm_action                       :  3, //[5:3]
45                       buffer_or_desc_type             :  3, //[8:6]
46                       first_msdu_index                :  4, //[12:9]
47                       tqm_release_reason              :  3, //[15:13]
48                       rxdma_push_reason               :  2, //[17:16]
49                       rxdma_error_code                :  5, //[22:18]
50                       reo_push_reason                 :  2, //[24:23]
51                       reo_error_code                  :  5, //[29:25]
52                       wbm_internal_error              :  1, //[30]
53                       reserved_2                      :  1; //[31]
54              uint32_t tqm_status_number               : 24, //[23:0]
55                       transmit_count                  :  7, //[30:24]
56                       reserved_3a                     :  1; //[31]
57              uint32_t ack_frame_rssi                  :  8, //[7:0]
58                       sw_release_details_valid        :  1, //[8]
59                       first_msdu                      :  1, //[9]
60                       last_msdu                       :  1, //[10]
61                       msdu_part_of_amsdu              :  1, //[11]
62                       fw_tx_notify_frame              :  1, //[12]
63                       buffer_timestamp                : 19; //[31:13]
64     struct            tx_rate_stats_info                       tx_rate_stats;
65              uint32_t sw_peer_id                      : 16, //[15:0]
66                       tid                             :  4, //[19:16]
67                       ring_id                         :  8, //[27:20]
68                       looping_count                   :  4; //[31:28]
69 };
70 
71 /*
72 
73 struct buffer_addr_info released_buff_or_desc_addr_info
74 
75 			Consumer: WBM/SW/FW
76 
77 			Producer: SW/TQM/RXDMA/REO/SWITCH
78 
79 
80 
81 			Details of the physical address of the buffer or link
82 			descriptor that is being released. Note that within this
83 			descriptor, WBM will look at the 'owner' of the released
84 			buffer/descriptor and forward it to SW/FW is WBM is not the
85 			owner.
86 
87 release_source_module
88 
89 			Indicates which module initiated the release of this
90 			buffer or descriptor
91 
92 
93 
94 			<enum 0 release_source_TQM> TQM released this buffer or
95 			descriptor
96 
97 			<enum 1 release_source_RXDMA> RXDMA released this buffer
98 			or descriptor
99 
100 			<enum 2 release_source_REO> REO released this buffer or
101 			descriptor
102 
103 			<enum 3 release_source_FW> FW released this buffer or
104 			descriptor
105 
106 			<enum 4 release_source_SW> SW released this buffer or
107 			descriptor
108 
109 			<legal 0-4>
110 
111 bm_action
112 
113 			Consumer: WBM/SW/FW
114 
115 			Producer: SW/TQM/RXDMA/REO/SWITCH
116 
117 
118 
119 			Field only valid when the field return_buffer_manager in
120 			the Released_buff_or_desc_addr_info indicates:
121 
122 			WBM_IDLE_BUF_LIST or
123 
124 			WBM_IDLE_DESC_LIST
125 
126 
127 
128 			An MSDU extension descriptor shall never be marked as
129 
130 
131 
132 			<enum 0 Put_in_idle_list> Put the buffer or descriptor
133 			back in the idle list. In case of MSDU or MDPU link
134 			descriptor, BM does not need to check to release any
135 			individual MSDU buffers
136 
137 
138 
139 			<enum 1 release_msdu_list > This BM action can only be
140 			used in combination with buffer_or_desc_type being
141 			msdu_link_descriptor. Field first_msdu_index points out
142 			which MSDU pointer in the MSDU link descriptor is the first
143 			of an MPDU that is released.
144 
145 			BM shall release all the MSDU buffers linked to this
146 			first MSDU buffer pointer. All related MSDU buffer pointer
147 			entries shall be set to value 0, which represents the 'NULL
148 			pointer. When all MSDU buffer pointers in the MSDU link
149 			descriptor are 'NULL', the MSDU link descriptor itself shall
150 			also be released.
151 
152 
153 
154 			<enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
155 			IMPLEMENTED....
156 
157 			Put the buffer or descriptor back in the idle list. Only
158 			valid in combination with buffer_or_desc_type indicating
159 			MDPU_link_descriptor.
160 
161 			BM shall release the MPDU link descriptor as well as all
162 			MSDUs that are linked to the MPDUs in this descriptor.
163 
164 
165 
166 			<legal 0-2>
167 
168 buffer_or_desc_type
169 
170 			Consumer: WBM/SW/FW
171 
172 			Producer: SW/TQM/RXDMA/REO/SWITCH
173 
174 
175 
176 			Field only valid when WBM is marked as the
177 			return_buffer_manager in the Released_Buffer_address_info
178 
179 
180 
181 			Indicates that type of buffer or descriptor is being
182 			released
183 
184 
185 
186 			<enum 0 MSDU_rel_buffer> The address points to an MSDU
187 			buffer
188 
189 			<enum 1 msdu_link_descriptor> The address points to an
190 			TX MSDU link descriptor
191 
192 			<enum 2 mpdu_link_descriptor> The address points to an
193 			MPDU link descriptor
194 
195 			<enum 3 msdu_ext_descriptor > The address points to an
196 			MSDU extension descriptor.
197 
198 			In case BM finds this one in a release ring, it passes
199 			it on to FW...
200 
201 			<enum 4 queue_ext_descriptor> The address points to an
202 			TQM queue extension descriptor. WBM should treat this is the
203 			same way as a link descriptor. That is, put the 128 byte
204 			buffer back in the link buffer idle list.
205 
206 
207 
208 			<legal 0-4>
209 
210 first_msdu_index
211 
212 			Consumer: WBM/SW/FW
213 
214 			Producer: SW/TQM/RXDMA/REO/SWITCH
215 
216 
217 
218 			Field only valid for the bm_action release_msdu_list.
219 
220 
221 
222 			The index of the first MSDU in an MSDU link descriptor
223 			all belonging to the same MPDU.
224 
225 
226 
227 			<legal 0-6>
228 
229 tqm_release_reason
230 
231 			Consumer: WBM/SW/FW
232 
233 			Producer: TQM
234 
235 
236 
237 			Field only valid when Release_source_module is set to
238 			release_source_TQM
239 
240 
241 
242 			(rr = Release Reason)
243 
244 			<enum 0 tqm_rr_frame_acked> frame is removed because an
245 			ACK of BA for it was received
246 
247 			<enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
248 			remove command of type Remove_mpdus initiated by SW
249 
250 			<enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
251 			remove command of type Remove_transmitted_mpdus initiated by
252 			SW
253 
254 			<enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
255 			remove command of type Remove_untransmitted_mpdus initiated
256 			by SW
257 
258 			<enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
259 			remove command of type Remove_aged_mpdus or
260 			Remove_aged_msdus initiated by SW
261 
262 			<enum 5 tqm_fw_reason1> frame is removed because a
263 			remove command where fw indicated that remove reason is
264 			fw_reason1
265 
266 			<enum 6 tqm_fw_reason2> frame is removed because a
267 			remove command where fw indicated that remove reason is
268 			fw_reason1
269 
270 			<enum 7 tqm_fw_reason3> frame is removed because a
271 			remove command where fw indicated that remove reason is
272 			fw_reason1
273 
274 
275 
276 			<legal 0-7>
277 
278 rxdma_push_reason
279 
280 			Field only valid when Release_source_module is set to
281 			release_source_RXDMA
282 
283 
284 
285 			Indicates why rxdma pushed the frame to this ring
286 
287 
288 
289 			<enum 0 rxdma_error_detected> RXDMA detected an error an
290 			pushed this frame to this queue
291 
292 			<enum 1 rxdma_routing_instruction> RXDMA pushed the
293 			frame to this queue per received routing instructions. No
294 			error within RXDMA was detected
295 
296 			<enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
297 			result the MSDU link descriptor might not have the
298 			last_msdu_in_mpdu_flag set, but instead WBM might just see a
299 			NULL pointer in the MSDU link descriptor. This is to be
300 			considered a normal condition for this scenario.
301 
302 
303 
304 			<legal 0 - 2>
305 
306 rxdma_error_code
307 
308 			Field only valid when 'rxdma_push_reason' set to
309 			'rxdma_error_detected'.
310 
311 
312 
313 			<enum 0 rxdma_overflow_err>MPDU frame is not complete
314 			due to a FIFO overflow error in RXPCU.
315 
316 			<enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
317 			due to receiving incomplete MPDU from the PHY
318 
319 
320 			<enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
321 			error or CRYPTO received an encrypted frame, but did not get
322 			a valid corresponding key id in the peer entry.
323 
324 			<enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
325 			error
326 
327 			<enum 5 rxdma_unecrypted_err>CRYPTO reported an
328 			unencrypted frame error when encrypted was expected
329 
330 			<enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
331 			length error
332 
333 			<enum 7 rxdma_msdu_limit_err>RX OLE reported that max
334 			number of MSDUs allowed in an MPDU got exceeded
335 
336 			<enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
337 			error
338 
339 			<enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
340 			parsing error
341 
342 			<enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
343 			during SA search
344 
345 			<enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
346 			during DA search
347 
348 			<enum 12 rxdma_flow_timeout_err>RX OLE reported a
349 			timeout during flow search
350 
351 			<enum 13 rxdma_flush_request>RXDMA received a flush
352 			request
353 
354 			<enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
355 			present as well as a fragmented MPDU. A-MSDU defragmentation
356 			is not supported in Lithium SW so this is treated as an
357 			error.
358 
359 reo_push_reason
360 
361 			Field only valid when Release_source_module is set to
362 			release_source_REO
363 
364 
365 
366 			Indicates why REO pushed the frame to this release ring
367 
368 
369 
370 			<enum 0 reo_error_detected> Reo detected an error an
371 			pushed this frame to this queue
372 
373 			<enum 1 reo_routing_instruction> Reo pushed the frame to
374 			this queue per received routing instructions. No error
375 			within REO was detected
376 
377 
378 
379 			<legal 0 - 1>
380 
381 reo_error_code
382 
383 			Field only valid when 'Reo_push_reason' set to
384 			'reo_error_detected'.
385 
386 
387 
388 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
389 			provided in the REO_ENTRANCE ring is set to 0
390 
391 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
392 			valid bit is NOT set
393 
394 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
395 			session having been setup.
396 
397 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
398 			SSN, Retry bit set: duplicate frame
399 
400 			<enum 4 ba_duplicate> BA session, duplicate frame
401 
402 			<enum 5 regular_frame_2k_jump> A normal (management/data
403 			frame) received with 2K jump in SN
404 
405 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
406 			in SSN
407 
408 			<enum 7 regular_frame_OOR> A normal (management/data
409 			frame) received with SN falling within the OOR window
410 
411 			<enum 8 bar_frame_OOR> A bar received with SSN falling
412 			within the OOR window
413 
414 			<enum 9 bar_frame_no_ba_session> A bar received without
415 			a BA session
416 
417 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
418 			SSN equal to SN
419 
420 			<enum 11 pn_check_failed> PN Check Failed packet.
421 
422 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
423 			as a result of the 'Seq_2k_error_detected_flag' been set in
424 			the REO Queue descriptor
425 
426 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
427 			as a result of the 'pn_error_detected_flag' been set in the
428 			REO Queue descriptor
429 
430 			<enum 14 queue_descriptor_blocked_set> Frame is
431 			forwarded as a result of the queue descriptor(address) being
432 			blocked as SW/FW seems to be currently in the process of
433 			making updates to this descriptor...
434 
435 
436 
437 			<legal 0-14>
438 
439 wbm_internal_error
440 
441 			Can only be set by WBM.
442 
443 
444 
445 			Is set when WBM got a buffer pointer but the action was
446 			to push it to the idle link descriptor ring or do link
447 			related activity
448 
449 			OR
450 
451 			Is set when WBM got a link buffer pointer but the action
452 			was to push it to the buffer  descriptor ring
453 
454 
455 
456 			<legal all>
457 
458 reserved_2
459 
460 			<legal 0>
461 
462 tqm_status_number
463 
464 			Field only valid when Release_source_module is set to
465 			release_source_TQM
466 
467 
468 
469 			The value in this field is equal to value of the
470 			'TQM_CMD_Number' field the TQM command or the
471 			'TQM_add_cmd_Number' field from the TQM entrance ring
472 			descriptor
473 
474 
475 
476 			This field helps to correlate the statuses with the TQM
477 			commands.
478 
479 
480 
481 			NOTE that SW could program this number to be equal to
482 			the PPDU_ID number in case direct correlation with the PPDU
483 			ID is desired
484 
485 
486 
487 			<legal all>
488 
489 transmit_count
490 
491 			Field only valid when Release_source_module is set to
492 			release_source_TQM
493 
494 
495 
496 			The number of times this frame has been transmitted
497 
498 reserved_3a
499 
500 			<legal 0>
501 
502 ack_frame_rssi
503 
504 			This field is only valid when the source is TQM.
505 
506 
507 
508 			If this frame is removed as the result of the reception
509 			of an ACK or BA, this field indicates the RSSI of the
510 			received ACK or BA frame.
511 
512 
513 
514 			When the frame is removed as result of a direct remove
515 			command from the SW,  this field is set to 0x0 (which is
516 			never a valid value when real RSSI is available)
517 
518 
519 
520 			<legal all>
521 
522 sw_release_details_valid
523 
524 			Consumer: SW
525 
526 			Producer: WBM
527 
528 
529 
530 			When set, some WBM specific release info for SW is
531 			valid.
532 
533 			This is set when WMB got a 'release_msdu_list' command
534 			from TQM and the return buffer manager is not WMB. WBM will
535 			then de-aggregate all the MSDUs and pass them one at a time
536 			on to the 'buffer owner'
537 
538 
539 
540 			<legal all>
541 
542 first_msdu
543 
544 			Field only valid when SW_release_details_valid is set.
545 
546 
547 
548 			Consumer: SW
549 
550 			Producer: WBM
551 
552 
553 
554 			When set, this MSDU is the first MSDU pointed to in the
555 			'release_msdu_list' command.
556 
557 
558 
559 			<legal all>
560 
561 last_msdu
562 
563 			Field only valid when SW_release_details_valid is set.
564 
565 
566 
567 			Consumer: SW
568 
569 			Producer: WBM
570 
571 
572 
573 			When set, this MSDU is the last MSDU pointed to in the
574 			'release_msdu_list' command.
575 
576 
577 
578 			<legal all>
579 
580 msdu_part_of_amsdu
581 
582 			Field only valid when SW_release_details_valid is set.
583 
584 
585 
586 			Consumer: SW
587 
588 			Producer: WBM
589 
590 
591 
592 			When set, this MSDU was part of an A-MSDU in MPDU
593 
594 			<legal all>
595 
596 fw_tx_notify_frame
597 
598 			Field only valid when SW_release_details_valid is set.
599 
600 
601 
602 			Consumer: SW
603 
604 			Producer: WBM
605 
606 
607 
608 			This is the FW_tx_notify_frame field from the
609 
610 			<legal all>
611 
612 buffer_timestamp
613 
614 			Field only valid when SW_release_details_valid is set.
615 
616 
617 
618 			Consumer: SW
619 
620 			Producer: WBM
621 
622 
623 
624 			This is the Buffer_timestamp field from the
625 
626 			<legal all>
627 
628 struct tx_rate_stats_info tx_rate_stats
629 
630 			Consumer: TQM
631 
632 			Producer: SW/SCH(from TXPCU, PDG)
633 
634 
635 
636 			Details for command execution tracking purposes.
637 
638 sw_peer_id
639 
640 			Field only valid when Release_source_module is set to
641 			release_source_TQM
642 
643 
644 
645 			1) Release of msdu buffer due to drop_frame = 1. Flow is
646 			not fetched and hence sw_peer_id and tid = 0
647 
648 			buffer_or_desc_type = e_num 0
649 			MSDU_rel_buffertqm_release_reason = e_num 1
650 			tqm_rr_rem_cmd_rem
651 
652 
653 
654 
655 
656 			2) Release of msdu buffer due to Flow is not fetched and
657 			hence sw_peer_id and tid = 0
658 
659 			buffer_or_desc_type = e_num 0
660 			MSDU_rel_buffertqm_release_reason = e_num 1
661 			tqm_rr_rem_cmd_rem
662 
663 
664 
665 
666 
667 			3) Release of msdu link due to remove_mpdu or acked_mpdu
668 			command.
669 
670 			buffer_or_desc_type = e_num1
671 			msdu_link_descriptortqm_release_reason can be:e_num 1
672 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
673 
674 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
675 
676 
677 
678 			Sw_peer_id from the TX_MSDU_FLOW descriptor or
679 			TX_MPDU_QUEUE descriptor
680 
681 			<legal all>
682 
683 tid
684 
685 			Field only valid when Release_source_module is set to
686 			release_source_TQM
687 
688 
689 
690 			1) Release of msdu buffer due to drop_frame = 1. Flow is
691 			not fetched and hence sw_peer_id and tid = 0
692 
693 			buffer_or_desc_type = e_num 0
694 			MSDU_rel_buffertqm_release_reason = e_num 1
695 			tqm_rr_rem_cmd_rem
696 
697 
698 
699 
700 
701 			2) Release of msdu buffer due to Flow is not fetched and
702 			hence sw_peer_id and tid = 0
703 
704 			buffer_or_desc_type = e_num 0
705 			MSDU_rel_buffertqm_release_reason = e_num 1
706 			tqm_rr_rem_cmd_rem
707 
708 
709 
710 
711 
712 			3) Release of msdu link due to remove_mpdu or acked_mpdu
713 			command.
714 
715 			buffer_or_desc_type = e_num1
716 			msdu_link_descriptortqm_release_reason can be:e_num 1
717 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
718 
719 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
720 
721 
722 
723 
724 
725 			This field represents the TID from the TX_MSDU_FLOW
726 			descriptor or TX_MPDU_QUEUE descriptor
727 
728 
729 
730 			 <legal all>
731 
732 ring_id
733 
734 			Consumer: TQM/REO/RXDMA/SW
735 
736 			Producer: SRNG (of RXDMA)
737 
738 
739 
740 			For debugging.
741 
742 			This field is filled in by the SRNG module.
743 
744 			It help to identify the ring that is being looked <legal
745 			all>
746 
747 looping_count
748 
749 			Consumer: WBM/SW/FW
750 
751 			Producer: SW/TQM/RXDMA/REO/SWITCH
752 
753 
754 
755 			A count value that indicates the number of times the
756 			producer of entries into the Buffer Manager Ring has looped
757 			around the ring.
758 
759 			At initialization time, this value is set to 0. On the
760 			first loop, this value is set to 1. After the max value is
761 			reached allowed by the number of bits for this field, the
762 			count value continues with 0 again.
763 
764 
765 
766 			In case SW is the consumer of the ring entries, it can
767 			use this field to figure out up to where the producer of
768 			entries has created new entries. This eliminates the need to
769 			check where the head pointer' of the ring is located once
770 			the SW starts processing an interrupt indicating that new
771 			entries have been put into this ring...
772 
773 
774 
775 			Also note that SW if it wants only needs to look at the
776 			LSB bit of this count value.
777 
778 			<legal all>
779 */
780 
781 #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_OFFSET 0x00000000
782 #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_LSB 28
783 #define WBM_RELEASE_RING_0_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_MASK 0xffffffff
784 #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_OFFSET 0x00000004
785 #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_LSB 28
786 #define WBM_RELEASE_RING_1_BUFFER_ADDR_INFO_RELEASED_BUFF_OR_DESC_ADDR_INFO_MASK 0xffffffff
787 
788 /* Description		WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE
789 
790 			Indicates which module initiated the release of this
791 			buffer or descriptor
792 
793 
794 
795 			<enum 0 release_source_TQM> TQM released this buffer or
796 			descriptor
797 
798 			<enum 1 release_source_RXDMA> RXDMA released this buffer
799 			or descriptor
800 
801 			<enum 2 release_source_REO> REO released this buffer or
802 			descriptor
803 
804 			<enum 3 release_source_FW> FW released this buffer or
805 			descriptor
806 
807 			<enum 4 release_source_SW> SW released this buffer or
808 			descriptor
809 
810 			<legal 0-4>
811 */
812 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET              0x00000008
813 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB                 0
814 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK                0x00000007
815 
816 /* Description		WBM_RELEASE_RING_2_BM_ACTION
817 
818 			Consumer: WBM/SW/FW
819 
820 			Producer: SW/TQM/RXDMA/REO/SWITCH
821 
822 
823 
824 			Field only valid when the field return_buffer_manager in
825 			the Released_buff_or_desc_addr_info indicates:
826 
827 			WBM_IDLE_BUF_LIST or
828 
829 			WBM_IDLE_DESC_LIST
830 
831 
832 
833 			An MSDU extension descriptor shall never be marked as
834 
835 
836 
837 			<enum 0 Put_in_idle_list> Put the buffer or descriptor
838 			back in the idle list. In case of MSDU or MDPU link
839 			descriptor, BM does not need to check to release any
840 			individual MSDU buffers
841 
842 
843 
844 			<enum 1 release_msdu_list > This BM action can only be
845 			used in combination with buffer_or_desc_type being
846 			msdu_link_descriptor. Field first_msdu_index points out
847 			which MSDU pointer in the MSDU link descriptor is the first
848 			of an MPDU that is released.
849 
850 			BM shall release all the MSDU buffers linked to this
851 			first MSDU buffer pointer. All related MSDU buffer pointer
852 			entries shall be set to value 0, which represents the 'NULL
853 			pointer. When all MSDU buffer pointers in the MSDU link
854 			descriptor are 'NULL', the MSDU link descriptor itself shall
855 			also be released.
856 
857 
858 
859 			<enum 2 Put_in_idle_list_expanded> CURRENTLY NOT
860 			IMPLEMENTED....
861 
862 			Put the buffer or descriptor back in the idle list. Only
863 			valid in combination with buffer_or_desc_type indicating
864 			MDPU_link_descriptor.
865 
866 			BM shall release the MPDU link descriptor as well as all
867 			MSDUs that are linked to the MPDUs in this descriptor.
868 
869 
870 
871 			<legal 0-2>
872 */
873 #define WBM_RELEASE_RING_2_BM_ACTION_OFFSET                          0x00000008
874 #define WBM_RELEASE_RING_2_BM_ACTION_LSB                             3
875 #define WBM_RELEASE_RING_2_BM_ACTION_MASK                            0x00000038
876 
877 /* Description		WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE
878 
879 			Consumer: WBM/SW/FW
880 
881 			Producer: SW/TQM/RXDMA/REO/SWITCH
882 
883 
884 
885 			Field only valid when WBM is marked as the
886 			return_buffer_manager in the Released_Buffer_address_info
887 
888 
889 
890 			Indicates that type of buffer or descriptor is being
891 			released
892 
893 
894 
895 			<enum 0 MSDU_rel_buffer> The address points to an MSDU
896 			buffer
897 
898 			<enum 1 msdu_link_descriptor> The address points to an
899 			TX MSDU link descriptor
900 
901 			<enum 2 mpdu_link_descriptor> The address points to an
902 			MPDU link descriptor
903 
904 			<enum 3 msdu_ext_descriptor > The address points to an
905 			MSDU extension descriptor.
906 
907 			In case BM finds this one in a release ring, it passes
908 			it on to FW...
909 
910 			<enum 4 queue_ext_descriptor> The address points to an
911 			TQM queue extension descriptor. WBM should treat this is the
912 			same way as a link descriptor. That is, put the 128 byte
913 			buffer back in the link buffer idle list.
914 
915 
916 
917 			<legal 0-4>
918 */
919 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET                0x00000008
920 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB                   6
921 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK                  0x000001c0
922 
923 /* Description		WBM_RELEASE_RING_2_FIRST_MSDU_INDEX
924 
925 			Consumer: WBM/SW/FW
926 
927 			Producer: SW/TQM/RXDMA/REO/SWITCH
928 
929 
930 
931 			Field only valid for the bm_action release_msdu_list.
932 
933 
934 
935 			The index of the first MSDU in an MSDU link descriptor
936 			all belonging to the same MPDU.
937 
938 
939 
940 			<legal 0-6>
941 */
942 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_OFFSET                   0x00000008
943 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_LSB                      9
944 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_MASK                     0x00001e00
945 
946 /* Description		WBM_RELEASE_RING_2_TQM_RELEASE_REASON
947 
948 			Consumer: WBM/SW/FW
949 
950 			Producer: TQM
951 
952 
953 
954 			Field only valid when Release_source_module is set to
955 			release_source_TQM
956 
957 
958 
959 			(rr = Release Reason)
960 
961 			<enum 0 tqm_rr_frame_acked> frame is removed because an
962 			ACK of BA for it was received
963 
964 			<enum 1 tqm_rr_rem_cmd_rem> frame is removed because a
965 			remove command of type Remove_mpdus initiated by SW
966 
967 			<enum 2 tqm_rr_rem_cmd_tx> frame is removed because a
968 			remove command of type Remove_transmitted_mpdus initiated by
969 			SW
970 
971 			<enum 3 tqm_rr_rem_cmd_notx> frame is removed because a
972 			remove command of type Remove_untransmitted_mpdus initiated
973 			by SW
974 
975 			<enum 4 tqm_rr_rem_cmd_aged> frame is removed because a
976 			remove command of type Remove_aged_mpdus or
977 			Remove_aged_msdus initiated by SW
978 
979 			<enum 5 tqm_fw_reason1> frame is removed because a
980 			remove command where fw indicated that remove reason is
981 			fw_reason1
982 
983 			<enum 6 tqm_fw_reason2> frame is removed because a
984 			remove command where fw indicated that remove reason is
985 			fw_reason1
986 
987 			<enum 7 tqm_fw_reason3> frame is removed because a
988 			remove command where fw indicated that remove reason is
989 			fw_reason1
990 
991 
992 
993 			<legal 0-7>
994 */
995 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET                 0x00000008
996 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB                    13
997 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK                   0x0000e000
998 
999 /* Description		WBM_RELEASE_RING_2_RXDMA_PUSH_REASON
1000 
1001 			Field only valid when Release_source_module is set to
1002 			release_source_RXDMA
1003 
1004 
1005 
1006 			Indicates why rxdma pushed the frame to this ring
1007 
1008 
1009 
1010 			<enum 0 rxdma_error_detected> RXDMA detected an error an
1011 			pushed this frame to this queue
1012 
1013 			<enum 1 rxdma_routing_instruction> RXDMA pushed the
1014 			frame to this queue per received routing instructions. No
1015 			error within RXDMA was detected
1016 
1017 			<enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
1018 			result the MSDU link descriptor might not have the
1019 			last_msdu_in_mpdu_flag set, but instead WBM might just see a
1020 			NULL pointer in the MSDU link descriptor. This is to be
1021 			considered a normal condition for this scenario.
1022 
1023 
1024 
1025 			<legal 0 - 2>
1026 */
1027 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_OFFSET                  0x00000008
1028 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_LSB                     16
1029 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_MASK                    0x00030000
1030 
1031 /* Description		WBM_RELEASE_RING_2_RXDMA_ERROR_CODE
1032 
1033 			Field only valid when 'rxdma_push_reason' set to
1034 			'rxdma_error_detected'.
1035 
1036 
1037 
1038 			<enum 0 rxdma_overflow_err>MPDU frame is not complete
1039 			due to a FIFO overflow error in RXPCU.
1040 
1041 			<enum 1 rxdma_mpdu_length_err>MPDU frame is not complete
1042 			due to receiving incomplete MPDU from the PHY
1043 
1044 
1045 			<enum 3 rxdma_decrypt_err>CRYPTO reported a decryption
1046 			error or CRYPTO received an encrypted frame, but did not get
1047 			a valid corresponding key id in the peer entry.
1048 
1049 			<enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC
1050 			error
1051 
1052 			<enum 5 rxdma_unecrypted_err>CRYPTO reported an
1053 			unencrypted frame error when encrypted was expected
1054 
1055 			<enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU
1056 			length error
1057 
1058 			<enum 7 rxdma_msdu_limit_err>RX OLE reported that max
1059 			number of MSDUs allowed in an MPDU got exceeded
1060 
1061 			<enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing
1062 			error
1063 
1064 			<enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU
1065 			parsing error
1066 
1067 			<enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout
1068 			during SA search
1069 
1070 			<enum 11 rxdma_da_timeout_err>RX OLE reported a timeout
1071 			during DA search
1072 
1073 			<enum 12 rxdma_flow_timeout_err>RX OLE reported a
1074 			timeout during flow search
1075 
1076 			<enum 13 rxdma_flush_request>RXDMA received a flush
1077 			request
1078 
1079 			<enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU
1080 			present as well as a fragmented MPDU. A-MSDU defragmentation
1081 			is not supported in Lithium SW so this is treated as an
1082 			error.
1083 */
1084 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_OFFSET                   0x00000008
1085 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_LSB                      18
1086 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_MASK                     0x007c0000
1087 
1088 /* Description		WBM_RELEASE_RING_2_REO_PUSH_REASON
1089 
1090 			Field only valid when Release_source_module is set to
1091 			release_source_REO
1092 
1093 
1094 
1095 			Indicates why REO pushed the frame to this release ring
1096 
1097 
1098 
1099 			<enum 0 reo_error_detected> Reo detected an error an
1100 			pushed this frame to this queue
1101 
1102 			<enum 1 reo_routing_instruction> Reo pushed the frame to
1103 			this queue per received routing instructions. No error
1104 			within REO was detected
1105 
1106 
1107 
1108 			<legal 0 - 1>
1109 */
1110 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_OFFSET                    0x00000008
1111 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_LSB                       23
1112 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_MASK                      0x01800000
1113 
1114 /* Description		WBM_RELEASE_RING_2_REO_ERROR_CODE
1115 
1116 			Field only valid when 'Reo_push_reason' set to
1117 			'reo_error_detected'.
1118 
1119 
1120 
1121 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
1122 			provided in the REO_ENTRANCE ring is set to 0
1123 
1124 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
1125 			valid bit is NOT set
1126 
1127 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
1128 			session having been setup.
1129 
1130 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
1131 			SSN, Retry bit set: duplicate frame
1132 
1133 			<enum 4 ba_duplicate> BA session, duplicate frame
1134 
1135 			<enum 5 regular_frame_2k_jump> A normal (management/data
1136 			frame) received with 2K jump in SN
1137 
1138 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
1139 			in SSN
1140 
1141 			<enum 7 regular_frame_OOR> A normal (management/data
1142 			frame) received with SN falling within the OOR window
1143 
1144 			<enum 8 bar_frame_OOR> A bar received with SSN falling
1145 			within the OOR window
1146 
1147 			<enum 9 bar_frame_no_ba_session> A bar received without
1148 			a BA session
1149 
1150 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
1151 			SSN equal to SN
1152 
1153 			<enum 11 pn_check_failed> PN Check Failed packet.
1154 
1155 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
1156 			as a result of the 'Seq_2k_error_detected_flag' been set in
1157 			the REO Queue descriptor
1158 
1159 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
1160 			as a result of the 'pn_error_detected_flag' been set in the
1161 			REO Queue descriptor
1162 
1163 			<enum 14 queue_descriptor_blocked_set> Frame is
1164 			forwarded as a result of the queue descriptor(address) being
1165 			blocked as SW/FW seems to be currently in the process of
1166 			making updates to this descriptor...
1167 
1168 
1169 
1170 			<legal 0-14>
1171 */
1172 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_OFFSET                     0x00000008
1173 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_LSB                        25
1174 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_MASK                       0x3e000000
1175 
1176 /* Description		WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR
1177 
1178 			Can only be set by WBM.
1179 
1180 
1181 
1182 			Is set when WBM got a buffer pointer but the action was
1183 			to push it to the idle link descriptor ring or do link
1184 			related activity
1185 
1186 			OR
1187 
1188 			Is set when WBM got a link buffer pointer but the action
1189 			was to push it to the buffer  descriptor ring
1190 
1191 
1192 
1193 			<legal all>
1194 */
1195 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET                 0x00000008
1196 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB                    30
1197 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK                   0x40000000
1198 
1199 /* Description		WBM_RELEASE_RING_2_RESERVED_2
1200 
1201 			<legal 0>
1202 */
1203 #define WBM_RELEASE_RING_2_RESERVED_2_OFFSET                         0x00000008
1204 #define WBM_RELEASE_RING_2_RESERVED_2_LSB                            31
1205 #define WBM_RELEASE_RING_2_RESERVED_2_MASK                           0x80000000
1206 
1207 /* Description		WBM_RELEASE_RING_3_TQM_STATUS_NUMBER
1208 
1209 			Field only valid when Release_source_module is set to
1210 			release_source_TQM
1211 
1212 
1213 
1214 			The value in this field is equal to value of the
1215 			'TQM_CMD_Number' field the TQM command or the
1216 			'TQM_add_cmd_Number' field from the TQM entrance ring
1217 			descriptor
1218 
1219 
1220 
1221 			This field helps to correlate the statuses with the TQM
1222 			commands.
1223 
1224 
1225 
1226 			NOTE that SW could program this number to be equal to
1227 			the PPDU_ID number in case direct correlation with the PPDU
1228 			ID is desired
1229 
1230 
1231 
1232 			<legal all>
1233 */
1234 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_OFFSET                  0x0000000c
1235 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_LSB                     0
1236 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_MASK                    0x00ffffff
1237 
1238 /* Description		WBM_RELEASE_RING_3_TRANSMIT_COUNT
1239 
1240 			Field only valid when Release_source_module is set to
1241 			release_source_TQM
1242 
1243 
1244 
1245 			The number of times this frame has been transmitted
1246 */
1247 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_OFFSET                     0x0000000c
1248 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_LSB                        24
1249 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_MASK                       0x7f000000
1250 
1251 /* Description		WBM_RELEASE_RING_3_RESERVED_3A
1252 
1253 			<legal 0>
1254 */
1255 #define WBM_RELEASE_RING_3_RESERVED_3A_OFFSET                        0x0000000c
1256 #define WBM_RELEASE_RING_3_RESERVED_3A_LSB                           31
1257 #define WBM_RELEASE_RING_3_RESERVED_3A_MASK                          0x80000000
1258 
1259 /* Description		WBM_RELEASE_RING_4_ACK_FRAME_RSSI
1260 
1261 			This field is only valid when the source is TQM.
1262 
1263 
1264 
1265 			If this frame is removed as the result of the reception
1266 			of an ACK or BA, this field indicates the RSSI of the
1267 			received ACK or BA frame.
1268 
1269 
1270 
1271 			When the frame is removed as result of a direct remove
1272 			command from the SW,  this field is set to 0x0 (which is
1273 			never a valid value when real RSSI is available)
1274 
1275 
1276 
1277 			<legal all>
1278 */
1279 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_OFFSET                     0x00000010
1280 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_LSB                        0
1281 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_MASK                       0x000000ff
1282 
1283 /* Description		WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID
1284 
1285 			Consumer: SW
1286 
1287 			Producer: WBM
1288 
1289 
1290 
1291 			When set, some WBM specific release info for SW is
1292 			valid.
1293 
1294 			This is set when WMB got a 'release_msdu_list' command
1295 			from TQM and the return buffer manager is not WMB. WBM will
1296 			then de-aggregate all the MSDUs and pass them one at a time
1297 			on to the 'buffer owner'
1298 
1299 
1300 
1301 			<legal all>
1302 */
1303 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_OFFSET           0x00000010
1304 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_LSB              8
1305 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_MASK             0x00000100
1306 
1307 /* Description		WBM_RELEASE_RING_4_FIRST_MSDU
1308 
1309 			Field only valid when SW_release_details_valid is set.
1310 
1311 
1312 
1313 			Consumer: SW
1314 
1315 			Producer: WBM
1316 
1317 
1318 
1319 			When set, this MSDU is the first MSDU pointed to in the
1320 			'release_msdu_list' command.
1321 
1322 
1323 
1324 			<legal all>
1325 */
1326 #define WBM_RELEASE_RING_4_FIRST_MSDU_OFFSET                         0x00000010
1327 #define WBM_RELEASE_RING_4_FIRST_MSDU_LSB                            9
1328 #define WBM_RELEASE_RING_4_FIRST_MSDU_MASK                           0x00000200
1329 
1330 /* Description		WBM_RELEASE_RING_4_LAST_MSDU
1331 
1332 			Field only valid when SW_release_details_valid is set.
1333 
1334 
1335 
1336 			Consumer: SW
1337 
1338 			Producer: WBM
1339 
1340 
1341 
1342 			When set, this MSDU is the last MSDU pointed to in the
1343 			'release_msdu_list' command.
1344 
1345 
1346 
1347 			<legal all>
1348 */
1349 #define WBM_RELEASE_RING_4_LAST_MSDU_OFFSET                          0x00000010
1350 #define WBM_RELEASE_RING_4_LAST_MSDU_LSB                             10
1351 #define WBM_RELEASE_RING_4_LAST_MSDU_MASK                            0x00000400
1352 
1353 /* Description		WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU
1354 
1355 			Field only valid when SW_release_details_valid is set.
1356 
1357 
1358 
1359 			Consumer: SW
1360 
1361 			Producer: WBM
1362 
1363 
1364 
1365 			When set, this MSDU was part of an A-MSDU in MPDU
1366 
1367 			<legal all>
1368 */
1369 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_OFFSET                 0x00000010
1370 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_LSB                    11
1371 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_MASK                   0x00000800
1372 
1373 /* Description		WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME
1374 
1375 			Field only valid when SW_release_details_valid is set.
1376 
1377 
1378 
1379 			Consumer: SW
1380 
1381 			Producer: WBM
1382 
1383 
1384 
1385 			This is the FW_tx_notify_frame field from the
1386 
1387 			<legal all>
1388 */
1389 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_OFFSET                 0x00000010
1390 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_LSB                    12
1391 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_MASK                   0x00001000
1392 
1393 /* Description		WBM_RELEASE_RING_4_BUFFER_TIMESTAMP
1394 
1395 			Field only valid when SW_release_details_valid is set.
1396 
1397 
1398 
1399 			Consumer: SW
1400 
1401 			Producer: WBM
1402 
1403 
1404 
1405 			This is the Buffer_timestamp field from the
1406 
1407 			<legal all>
1408 */
1409 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_OFFSET                   0x00000010
1410 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_LSB                      13
1411 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_MASK                     0xffffe000
1412 #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_OFFSET   0x00000014
1413 #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_LSB      13
1414 #define WBM_RELEASE_RING_5_TX_RATE_STATS_INFO_TX_RATE_STATS_MASK     0xffffffff
1415 #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_OFFSET   0x00000018
1416 #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_LSB      13
1417 #define WBM_RELEASE_RING_6_TX_RATE_STATS_INFO_TX_RATE_STATS_MASK     0xffffffff
1418 
1419 /* Description		WBM_RELEASE_RING_7_SW_PEER_ID
1420 
1421 			Field only valid when Release_source_module is set to
1422 			release_source_TQM
1423 
1424 
1425 
1426 			1) Release of msdu buffer due to drop_frame = 1. Flow is
1427 			not fetched and hence sw_peer_id and tid = 0
1428 
1429 			buffer_or_desc_type = e_num 0
1430 			MSDU_rel_buffertqm_release_reason = e_num 1
1431 			tqm_rr_rem_cmd_rem
1432 
1433 
1434 
1435 
1436 
1437 			2) Release of msdu buffer due to Flow is not fetched and
1438 			hence sw_peer_id and tid = 0
1439 
1440 			buffer_or_desc_type = e_num 0
1441 			MSDU_rel_buffertqm_release_reason = e_num 1
1442 			tqm_rr_rem_cmd_rem
1443 
1444 
1445 
1446 
1447 
1448 			3) Release of msdu link due to remove_mpdu or acked_mpdu
1449 			command.
1450 
1451 			buffer_or_desc_type = e_num1
1452 			msdu_link_descriptortqm_release_reason can be:e_num 1
1453 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
1454 
1455 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
1456 
1457 
1458 
1459 			Sw_peer_id from the TX_MSDU_FLOW descriptor or
1460 			TX_MPDU_QUEUE descriptor
1461 
1462 			<legal all>
1463 */
1464 #define WBM_RELEASE_RING_7_SW_PEER_ID_OFFSET                         0x0000001c
1465 #define WBM_RELEASE_RING_7_SW_PEER_ID_LSB                            0
1466 #define WBM_RELEASE_RING_7_SW_PEER_ID_MASK                           0x0000ffff
1467 
1468 /* Description		WBM_RELEASE_RING_7_TID
1469 
1470 			Field only valid when Release_source_module is set to
1471 			release_source_TQM
1472 
1473 
1474 
1475 			1) Release of msdu buffer due to drop_frame = 1. Flow is
1476 			not fetched and hence sw_peer_id and tid = 0
1477 
1478 			buffer_or_desc_type = e_num 0
1479 			MSDU_rel_buffertqm_release_reason = e_num 1
1480 			tqm_rr_rem_cmd_rem
1481 
1482 
1483 
1484 
1485 
1486 			2) Release of msdu buffer due to Flow is not fetched and
1487 			hence sw_peer_id and tid = 0
1488 
1489 			buffer_or_desc_type = e_num 0
1490 			MSDU_rel_buffertqm_release_reason = e_num 1
1491 			tqm_rr_rem_cmd_rem
1492 
1493 
1494 
1495 
1496 
1497 			3) Release of msdu link due to remove_mpdu or acked_mpdu
1498 			command.
1499 
1500 			buffer_or_desc_type = e_num1
1501 			msdu_link_descriptortqm_release_reason can be:e_num 1
1502 			tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx
1503 
1504 			e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged
1505 
1506 
1507 
1508 
1509 
1510 			This field represents the TID from the TX_MSDU_FLOW
1511 			descriptor or TX_MPDU_QUEUE descriptor
1512 
1513 
1514 
1515 			 <legal all>
1516 */
1517 #define WBM_RELEASE_RING_7_TID_OFFSET                                0x0000001c
1518 #define WBM_RELEASE_RING_7_TID_LSB                                   16
1519 #define WBM_RELEASE_RING_7_TID_MASK                                  0x000f0000
1520 
1521 /* Description		WBM_RELEASE_RING_7_RING_ID
1522 
1523 			Consumer: TQM/REO/RXDMA/SW
1524 
1525 			Producer: SRNG (of RXDMA)
1526 
1527 
1528 
1529 			For debugging.
1530 
1531 			This field is filled in by the SRNG module.
1532 
1533 			It help to identify the ring that is being looked <legal
1534 			all>
1535 */
1536 #define WBM_RELEASE_RING_7_RING_ID_OFFSET                            0x0000001c
1537 #define WBM_RELEASE_RING_7_RING_ID_LSB                               20
1538 #define WBM_RELEASE_RING_7_RING_ID_MASK                              0x0ff00000
1539 
1540 /* Description		WBM_RELEASE_RING_7_LOOPING_COUNT
1541 
1542 			Consumer: WBM/SW/FW
1543 
1544 			Producer: SW/TQM/RXDMA/REO/SWITCH
1545 
1546 
1547 
1548 			A count value that indicates the number of times the
1549 			producer of entries into the Buffer Manager Ring has looped
1550 			around the ring.
1551 
1552 			At initialization time, this value is set to 0. On the
1553 			first loop, this value is set to 1. After the max value is
1554 			reached allowed by the number of bits for this field, the
1555 			count value continues with 0 again.
1556 
1557 
1558 
1559 			In case SW is the consumer of the ring entries, it can
1560 			use this field to figure out up to where the producer of
1561 			entries has created new entries. This eliminates the need to
1562 			check where the head pointer' of the ring is located once
1563 			the SW starts processing an interrupt indicating that new
1564 			entries have been put into this ring...
1565 
1566 
1567 
1568 			Also note that SW if it wants only needs to look at the
1569 			LSB bit of this count value.
1570 
1571 			<legal all>
1572 */
1573 #define WBM_RELEASE_RING_7_LOOPING_COUNT_OFFSET                      0x0000001c
1574 #define WBM_RELEASE_RING_7_LOOPING_COUNT_LSB                         28
1575 #define WBM_RELEASE_RING_7_LOOPING_COUNT_MASK                        0xf0000000
1576 
1577 
1578 #endif // _WBM_RELEASE_RING_H_
1579