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