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