xref: /wlan-driver/fw-api/hw/qcn6432/sw_monitor_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name #ifndef _SW_MONITOR_RING_H_
18*5113495bSYour Name #define _SW_MONITOR_RING_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name #include "buffer_addr_info.h"
23*5113495bSYour Name #include "rx_mpdu_details.h"
24*5113495bSYour Name #define NUM_OF_DWORDS_SW_MONITOR_RING 8
25*5113495bSYour Name 
26*5113495bSYour Name 
27*5113495bSYour Name struct sw_monitor_ring {
28*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
29*5113495bSYour Name              struct   rx_mpdu_details                                           reo_level_mpdu_frame_info;
30*5113495bSYour Name              struct   buffer_addr_info                                          status_buff_addr_info;
31*5113495bSYour Name              uint32_t rxdma_push_reason                                       :  2, // [1:0]
32*5113495bSYour Name                       rxdma_error_code                                        :  5, // [6:2]
33*5113495bSYour Name                       mpdu_fragment_number                                    :  4, // [10:7]
34*5113495bSYour Name                       frameless_bar                                           :  1, // [11:11]
35*5113495bSYour Name                       status_buf_count                                        :  4, // [15:12]
36*5113495bSYour Name                       end_of_ppdu                                             :  1, // [16:16]
37*5113495bSYour Name                       reserved_6a                                             : 15; // [31:17]
38*5113495bSYour Name              uint32_t phy_ppdu_id                                             : 16, // [15:0]
39*5113495bSYour Name                       reserved_7a                                             :  4, // [19:16]
40*5113495bSYour Name                       ring_id                                                 :  8, // [27:20]
41*5113495bSYour Name                       looping_count                                           :  4; // [31:28]
42*5113495bSYour Name #else
43*5113495bSYour Name              struct   rx_mpdu_details                                           reo_level_mpdu_frame_info;
44*5113495bSYour Name              struct   buffer_addr_info                                          status_buff_addr_info;
45*5113495bSYour Name              uint32_t reserved_6a                                             : 15, // [31:17]
46*5113495bSYour Name                       end_of_ppdu                                             :  1, // [16:16]
47*5113495bSYour Name                       status_buf_count                                        :  4, // [15:12]
48*5113495bSYour Name                       frameless_bar                                           :  1, // [11:11]
49*5113495bSYour Name                       mpdu_fragment_number                                    :  4, // [10:7]
50*5113495bSYour Name                       rxdma_error_code                                        :  5, // [6:2]
51*5113495bSYour Name                       rxdma_push_reason                                       :  2; // [1:0]
52*5113495bSYour Name              uint32_t looping_count                                           :  4, // [31:28]
53*5113495bSYour Name                       ring_id                                                 :  8, // [27:20]
54*5113495bSYour Name                       reserved_7a                                             :  4, // [19:16]
55*5113495bSYour Name                       phy_ppdu_id                                             : 16; // [15:0]
56*5113495bSYour Name #endif
57*5113495bSYour Name };
58*5113495bSYour Name 
59*5113495bSYour Name 
60*5113495bSYour Name /* Description		REO_LEVEL_MPDU_FRAME_INFO
61*5113495bSYour Name 
62*5113495bSYour Name 			Consumer: SW
63*5113495bSYour Name 			Producer: RXDMA
64*5113495bSYour Name 
65*5113495bSYour Name 			Details related to the MPDU being pushed to SW, valid only
66*5113495bSYour Name 			 if end_of_ppdu is set to 0
67*5113495bSYour Name */
68*5113495bSYour Name 
69*5113495bSYour Name 
70*5113495bSYour Name /* Description		MSDU_LINK_DESC_ADDR_INFO
71*5113495bSYour Name 
72*5113495bSYour Name 			Consumer: REO/SW/FW
73*5113495bSYour Name 			Producer: RXDMA
74*5113495bSYour Name 
75*5113495bSYour Name 			Details of the physical address of the MSDU link descriptor
76*5113495bSYour Name 			 that contains pointers to MSDUs related to this MPDU
77*5113495bSYour Name */
78*5113495bSYour Name 
79*5113495bSYour Name 
80*5113495bSYour Name /* Description		BUFFER_ADDR_31_0
81*5113495bSYour Name 
82*5113495bSYour Name 			Address (lower 32 bits) of the MSDU buffer OR MSDU_EXTENSION
83*5113495bSYour Name 			 descriptor OR Link Descriptor
84*5113495bSYour Name 
85*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
86*5113495bSYour Name 			<legal all>
87*5113495bSYour Name */
88*5113495bSYour Name 
89*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
90*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
91*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MSB 31
92*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
93*5113495bSYour Name 
94*5113495bSYour Name 
95*5113495bSYour Name /* Description		BUFFER_ADDR_39_32
96*5113495bSYour Name 
97*5113495bSYour Name 			Address (upper 8 bits) of the MSDU buffer OR MSDU_EXTENSION
98*5113495bSYour Name 			 descriptor OR Link Descriptor
99*5113495bSYour Name 
100*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
101*5113495bSYour Name 			<legal all>
102*5113495bSYour Name */
103*5113495bSYour Name 
104*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
105*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
106*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MSB 7
107*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
108*5113495bSYour Name 
109*5113495bSYour Name 
110*5113495bSYour Name /* Description		RETURN_BUFFER_MANAGER
111*5113495bSYour Name 
112*5113495bSYour Name 			Consumer: WBM
113*5113495bSYour Name 			Producer: SW/FW
114*5113495bSYour Name 
115*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
116*5113495bSYour Name 
117*5113495bSYour Name 			Indicates to which buffer manager the buffer OR MSDU_EXTENSION
118*5113495bSYour Name 			 descriptor OR link descriptor that is being pointed to
119*5113495bSYour Name 			shall be returned after the frame has been processed. It
120*5113495bSYour Name 			 is used by WBM for routing purposes.
121*5113495bSYour Name 
122*5113495bSYour Name 			<enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
123*5113495bSYour Name 			 to the WMB buffer idle list
124*5113495bSYour Name 			<enum 1 WBM_CHIP0_IDLE_DESC_LIST> This buffer shall be returned
125*5113495bSYour Name 			 to the WBM idle link descriptor idle list, where the chip
126*5113495bSYour Name 			 0 WBM is chosen in case of a multi-chip config
127*5113495bSYour Name 			<enum 2 WBM_CHIP1_IDLE_DESC_LIST> This buffer shall be returned
128*5113495bSYour Name 			 to the chip 1 WBM idle link descriptor idle list
129*5113495bSYour Name 			<enum 3 WBM_CHIP2_IDLE_DESC_LIST> This buffer shall be returned
130*5113495bSYour Name 			 to the chip 2 WBM idle link descriptor idle list
131*5113495bSYour Name 			<enum 12 WBM_CHIP3_IDLE_DESC_LIST> This buffer shall be
132*5113495bSYour Name 			returned to chip 3 WBM idle link descriptor idle list
133*5113495bSYour Name 			<enum 4 FW_BM> This buffer shall be returned to the FW
134*5113495bSYour Name 			<enum 5 SW0_BM> This buffer shall be returned to the SW,
135*5113495bSYour Name 			ring 0
136*5113495bSYour Name 			<enum 6 SW1_BM> This buffer shall be returned to the SW,
137*5113495bSYour Name 			ring 1
138*5113495bSYour Name 			<enum 7 SW2_BM> This buffer shall be returned to the SW,
139*5113495bSYour Name 			ring 2
140*5113495bSYour Name 			<enum 8 SW3_BM> This buffer shall be returned to the SW,
141*5113495bSYour Name 			ring 3
142*5113495bSYour Name 			<enum 9 SW4_BM> This buffer shall be returned to the SW,
143*5113495bSYour Name 			ring 4
144*5113495bSYour Name 			<enum 10 SW5_BM> This buffer shall be returned to the SW,
145*5113495bSYour Name 			ring 5
146*5113495bSYour Name 			<enum 11 SW6_BM> This buffer shall be returned to the SW,
147*5113495bSYour Name 			ring 6
148*5113495bSYour Name 
149*5113495bSYour Name 			<legal 0-12>
150*5113495bSYour Name */
151*5113495bSYour Name 
152*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
153*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
154*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MSB 11
155*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000f00
156*5113495bSYour Name 
157*5113495bSYour Name 
158*5113495bSYour Name /* Description		SW_BUFFER_COOKIE
159*5113495bSYour Name 
160*5113495bSYour Name 			Cookie field exclusively used by SW.
161*5113495bSYour Name 
162*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
163*5113495bSYour Name 
164*5113495bSYour Name 			HW ignores the contents, accept that it passes the programmed
165*5113495bSYour Name 			 value on to other descriptors together with the physical
166*5113495bSYour Name 			 address
167*5113495bSYour Name 
168*5113495bSYour Name 			Field can be used by SW to for example associate the buffers
169*5113495bSYour Name 			 physical address with the virtual address
170*5113495bSYour Name 			The bit definitions as used by SW are within SW HLD specification
171*5113495bSYour Name 
172*5113495bSYour Name 
173*5113495bSYour Name 			NOTE1:
174*5113495bSYour Name 			The three most significant bits can have a special meaning
175*5113495bSYour Name 			 in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,
176*5113495bSYour Name 			and field transmit_bw_restriction is set
177*5113495bSYour Name 
178*5113495bSYour Name 			In case of NON punctured transmission:
179*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b000: 20 MHz TX only
180*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b001: 40 MHz TX only
181*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b010: 80 MHz TX only
182*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b011: 160 MHz TX only
183*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b101: 240 MHz TX only
184*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b100: 320 MHz TX only
185*5113495bSYour Name 			Sw_buffer_cookie[19:18] = 2'b11: reserved
186*5113495bSYour Name 
187*5113495bSYour Name 			In case of punctured transmission:
188*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0000: pattern 0 only
189*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0001: pattern 1 only
190*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0010: pattern 2 only
191*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0011: pattern 3 only
192*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0100: pattern 4 only
193*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0101: pattern 5 only
194*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0110: pattern 6 only
195*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0111: pattern 7 only
196*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1000: pattern 8 only
197*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1001: pattern 9 only
198*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1010: pattern 10 only
199*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1011: pattern 11 only
200*5113495bSYour Name 			Sw_buffer_cookie[19:18] = 2'b11: reserved
201*5113495bSYour Name 
202*5113495bSYour Name 			Note: a punctured transmission is indicated by the presence
203*5113495bSYour Name 			 of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV
204*5113495bSYour Name 
205*5113495bSYour Name 			<legal all>
206*5113495bSYour Name */
207*5113495bSYour Name 
208*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
209*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 12
210*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MSB 31
211*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_MSDU_LINK_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff000
212*5113495bSYour Name 
213*5113495bSYour Name 
214*5113495bSYour Name /* Description		RX_MPDU_DESC_INFO_DETAILS
215*5113495bSYour Name 
216*5113495bSYour Name 			Consumer: REO/SW/FW
217*5113495bSYour Name 			Producer: RXDMA
218*5113495bSYour Name 
219*5113495bSYour Name 			General information related to the MPDU that should be passed
220*5113495bSYour Name 			 on from REO entrance ring to the REO destination ring
221*5113495bSYour Name */
222*5113495bSYour Name 
223*5113495bSYour Name 
224*5113495bSYour Name /* Description		MSDU_COUNT
225*5113495bSYour Name 
226*5113495bSYour Name 			Consumer: REO/SW/FW
227*5113495bSYour Name 			Producer: RXDMA
228*5113495bSYour Name 
229*5113495bSYour Name 			The number of MSDUs within the MPDU
230*5113495bSYour Name 			<legal all>
231*5113495bSYour Name */
232*5113495bSYour Name 
233*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_OFFSET 0x00000008
234*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_LSB 0
235*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_MSB 7
236*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MSDU_COUNT_MASK 0x000000ff
237*5113495bSYour Name 
238*5113495bSYour Name 
239*5113495bSYour Name /* Description		FRAGMENT_FLAG
240*5113495bSYour Name 
241*5113495bSYour Name 			Consumer: REO/SW/FW
242*5113495bSYour Name 			Producer: RXDMA
243*5113495bSYour Name 
244*5113495bSYour Name 			When set, this MPDU is a fragment and REO should forward
245*5113495bSYour Name 			 this fragment MPDU to the REO destination ring without
246*5113495bSYour Name 			any reorder checks, pn checks or bitmap update. This implies
247*5113495bSYour Name 			 that REO is forwarding the pointer to the MSDU link descriptor.
248*5113495bSYour Name 			The destination ring is coming from a programmable register
249*5113495bSYour Name 			 setting in REO
250*5113495bSYour Name 
251*5113495bSYour Name 			<legal all>
252*5113495bSYour Name */
253*5113495bSYour Name 
254*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_OFFSET 0x00000008
255*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_LSB 8
256*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_MSB 8
257*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_FRAGMENT_FLAG_MASK 0x00000100
258*5113495bSYour Name 
259*5113495bSYour Name 
260*5113495bSYour Name /* Description		MPDU_RETRY_BIT
261*5113495bSYour Name 
262*5113495bSYour Name 			Consumer: REO/SW/FW
263*5113495bSYour Name 			Producer: RXDMA
264*5113495bSYour Name 
265*5113495bSYour Name 			The retry bit setting from the MPDU header of the received
266*5113495bSYour Name 			 frame
267*5113495bSYour Name 			<legal all>
268*5113495bSYour Name */
269*5113495bSYour Name 
270*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_OFFSET 0x00000008
271*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_LSB 9
272*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_MSB 9
273*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_RETRY_BIT_MASK 0x00000200
274*5113495bSYour Name 
275*5113495bSYour Name 
276*5113495bSYour Name /* Description		AMPDU_FLAG
277*5113495bSYour Name 
278*5113495bSYour Name 			Consumer: REO/SW/FW
279*5113495bSYour Name 			Producer: RXDMA
280*5113495bSYour Name 
281*5113495bSYour Name 			When set, the MPDU was received as part of an A-MPDU.
282*5113495bSYour Name 			<legal all>
283*5113495bSYour Name */
284*5113495bSYour Name 
285*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_OFFSET 0x00000008
286*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_LSB 10
287*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_MSB 10
288*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_AMPDU_FLAG_MASK 0x00000400
289*5113495bSYour Name 
290*5113495bSYour Name 
291*5113495bSYour Name /* Description		BAR_FRAME
292*5113495bSYour Name 
293*5113495bSYour Name 			Consumer: REO/SW/FW
294*5113495bSYour Name 			Producer: RXDMA
295*5113495bSYour Name 
296*5113495bSYour Name 			When set, the received frame is a BAR frame. After processing,
297*5113495bSYour Name 			this frame shall be pushed to SW or deleted.
298*5113495bSYour Name 			<legal all>
299*5113495bSYour Name */
300*5113495bSYour Name 
301*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_OFFSET 0x00000008
302*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_LSB 11
303*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_MSB 11
304*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_BAR_FRAME_MASK 0x00000800
305*5113495bSYour Name 
306*5113495bSYour Name 
307*5113495bSYour Name /* Description		PN_FIELDS_CONTAIN_VALID_INFO
308*5113495bSYour Name 
309*5113495bSYour Name 			Consumer: REO/SW/FW
310*5113495bSYour Name 			Producer: RXDMA
311*5113495bSYour Name 
312*5113495bSYour Name 			Copied here by RXDMA from RX_MPDU_END
313*5113495bSYour Name 			When not set, REO will Not perform a PN sequence number
314*5113495bSYour Name 			check
315*5113495bSYour Name */
316*5113495bSYour Name 
317*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000008
318*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_LSB 12
319*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_MSB 12
320*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x00001000
321*5113495bSYour Name 
322*5113495bSYour Name 
323*5113495bSYour Name /* Description		RAW_MPDU
324*5113495bSYour Name 
325*5113495bSYour Name 			Field only valid when first_msdu_in_mpdu_flag is set.
326*5113495bSYour Name 
327*5113495bSYour Name 			When set, the contents in the MSDU buffer contains a 'RAW'
328*5113495bSYour Name 			MPDU. This 'RAW' MPDU might be spread out over multiple
329*5113495bSYour Name 			MSDU buffers.
330*5113495bSYour Name 			<legal all>
331*5113495bSYour Name */
332*5113495bSYour Name 
333*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_OFFSET 0x00000008
334*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_LSB 13
335*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_MSB 13
336*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_RAW_MPDU_MASK 0x00002000
337*5113495bSYour Name 
338*5113495bSYour Name 
339*5113495bSYour Name /* Description		MORE_FRAGMENT_FLAG
340*5113495bSYour Name 
341*5113495bSYour Name 			The More Fragment bit setting from the MPDU header of the
342*5113495bSYour Name 			 received frame
343*5113495bSYour Name 
344*5113495bSYour Name 			<legal all>
345*5113495bSYour Name */
346*5113495bSYour Name 
347*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_OFFSET 0x00000008
348*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_LSB 14
349*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_MSB 14
350*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MORE_FRAGMENT_FLAG_MASK 0x00004000
351*5113495bSYour Name 
352*5113495bSYour Name 
353*5113495bSYour Name 
354*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_OFFSET 0x00000008
355*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_LSB 15
356*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_MSB 26
357*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_SRC_INFO_MASK 0x07ff8000
358*5113495bSYour Name 
359*5113495bSYour Name 
360*5113495bSYour Name /* Description		MPDU_QOS_CONTROL_VALID
361*5113495bSYour Name 
362*5113495bSYour Name 			When set, the MPDU has a QoS control field.
363*5113495bSYour Name 
364*5113495bSYour Name 			In case of ndp or phy_err, this field will never be set.
365*5113495bSYour Name 
366*5113495bSYour Name 			<legal all>
367*5113495bSYour Name */
368*5113495bSYour Name 
369*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_OFFSET 0x00000008
370*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_LSB 27
371*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_MSB 27
372*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_MPDU_QOS_CONTROL_VALID_MASK 0x08000000
373*5113495bSYour Name 
374*5113495bSYour Name 
375*5113495bSYour Name /* Description		TID
376*5113495bSYour Name 
377*5113495bSYour Name 			Field only valid when mpdu_qos_control_valid is set
378*5113495bSYour Name 
379*5113495bSYour Name 			The TID field in the QoS control field
380*5113495bSYour Name 			<legal all>
381*5113495bSYour Name */
382*5113495bSYour Name 
383*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_TID_OFFSET 0x00000008
384*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_TID_LSB 28
385*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_TID_MSB 31
386*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_TID_MASK 0xf0000000
387*5113495bSYour Name 
388*5113495bSYour Name 
389*5113495bSYour Name /* Description		PEER_META_DATA
390*5113495bSYour Name 
391*5113495bSYour Name 			Meta data that SW has programmed in the Peer table entry
392*5113495bSYour Name 			 of the transmitting STA.
393*5113495bSYour Name 			<legal all>
394*5113495bSYour Name */
395*5113495bSYour Name 
396*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_OFFSET 0x0000000c
397*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_LSB 0
398*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_MSB 31
399*5113495bSYour Name #define SW_MONITOR_RING_REO_LEVEL_MPDU_FRAME_INFO_RX_MPDU_DESC_INFO_DETAILS_PEER_META_DATA_MASK 0xffffffff
400*5113495bSYour Name 
401*5113495bSYour Name 
402*5113495bSYour Name /* Description		STATUS_BUFF_ADDR_INFO
403*5113495bSYour Name 
404*5113495bSYour Name 			Consumer: SW
405*5113495bSYour Name 			Producer: RXDMA
406*5113495bSYour Name 
407*5113495bSYour Name 			Details of the physical address of the first status buffer
408*5113495bSYour Name 			 used for the PPDU (either the PPDU that included the MPDU
409*5113495bSYour Name 			 being pushed to SW if end_of_ppdu = 0, or the PPDU whose
410*5113495bSYour Name 			 end is indicated through end_of_ppdu = 1)
411*5113495bSYour Name */
412*5113495bSYour Name 
413*5113495bSYour Name 
414*5113495bSYour Name /* Description		BUFFER_ADDR_31_0
415*5113495bSYour Name 
416*5113495bSYour Name 			Address (lower 32 bits) of the MSDU buffer OR MSDU_EXTENSION
417*5113495bSYour Name 			 descriptor OR Link Descriptor
418*5113495bSYour Name 
419*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
420*5113495bSYour Name 			<legal all>
421*5113495bSYour Name */
422*5113495bSYour Name 
423*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET               0x00000010
424*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_31_0_LSB                  0
425*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_31_0_MSB                  31
426*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_31_0_MASK                 0xffffffff
427*5113495bSYour Name 
428*5113495bSYour Name 
429*5113495bSYour Name /* Description		BUFFER_ADDR_39_32
430*5113495bSYour Name 
431*5113495bSYour Name 			Address (upper 8 bits) of the MSDU buffer OR MSDU_EXTENSION
432*5113495bSYour Name 			 descriptor OR Link Descriptor
433*5113495bSYour Name 
434*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
435*5113495bSYour Name 			<legal all>
436*5113495bSYour Name */
437*5113495bSYour Name 
438*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET              0x00000014
439*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_39_32_LSB                 0
440*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_39_32_MSB                 7
441*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_BUFFER_ADDR_39_32_MASK                0x000000ff
442*5113495bSYour Name 
443*5113495bSYour Name 
444*5113495bSYour Name /* Description		RETURN_BUFFER_MANAGER
445*5113495bSYour Name 
446*5113495bSYour Name 			Consumer: WBM
447*5113495bSYour Name 			Producer: SW/FW
448*5113495bSYour Name 
449*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
450*5113495bSYour Name 
451*5113495bSYour Name 			Indicates to which buffer manager the buffer OR MSDU_EXTENSION
452*5113495bSYour Name 			 descriptor OR link descriptor that is being pointed to
453*5113495bSYour Name 			shall be returned after the frame has been processed. It
454*5113495bSYour Name 			 is used by WBM for routing purposes.
455*5113495bSYour Name 
456*5113495bSYour Name 			<enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned
457*5113495bSYour Name 			 to the WMB buffer idle list
458*5113495bSYour Name 			<enum 1 WBM_CHIP0_IDLE_DESC_LIST> This buffer shall be returned
459*5113495bSYour Name 			 to the WBM idle link descriptor idle list, where the chip
460*5113495bSYour Name 			 0 WBM is chosen in case of a multi-chip config
461*5113495bSYour Name 			<enum 2 WBM_CHIP1_IDLE_DESC_LIST> This buffer shall be returned
462*5113495bSYour Name 			 to the chip 1 WBM idle link descriptor idle list
463*5113495bSYour Name 			<enum 3 WBM_CHIP2_IDLE_DESC_LIST> This buffer shall be returned
464*5113495bSYour Name 			 to the chip 2 WBM idle link descriptor idle list
465*5113495bSYour Name 			<enum 12 WBM_CHIP3_IDLE_DESC_LIST> This buffer shall be
466*5113495bSYour Name 			returned to chip 3 WBM idle link descriptor idle list
467*5113495bSYour Name 			<enum 4 FW_BM> This buffer shall be returned to the FW
468*5113495bSYour Name 			<enum 5 SW0_BM> This buffer shall be returned to the SW,
469*5113495bSYour Name 			ring 0
470*5113495bSYour Name 			<enum 6 SW1_BM> This buffer shall be returned to the SW,
471*5113495bSYour Name 			ring 1
472*5113495bSYour Name 			<enum 7 SW2_BM> This buffer shall be returned to the SW,
473*5113495bSYour Name 			ring 2
474*5113495bSYour Name 			<enum 8 SW3_BM> This buffer shall be returned to the SW,
475*5113495bSYour Name 			ring 3
476*5113495bSYour Name 			<enum 9 SW4_BM> This buffer shall be returned to the SW,
477*5113495bSYour Name 			ring 4
478*5113495bSYour Name 			<enum 10 SW5_BM> This buffer shall be returned to the SW,
479*5113495bSYour Name 			ring 5
480*5113495bSYour Name 			<enum 11 SW6_BM> This buffer shall be returned to the SW,
481*5113495bSYour Name 			ring 6
482*5113495bSYour Name 
483*5113495bSYour Name 			<legal 0-12>
484*5113495bSYour Name */
485*5113495bSYour Name 
486*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET          0x00000014
487*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB             8
488*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_RETURN_BUFFER_MANAGER_MSB             11
489*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK            0x00000f00
490*5113495bSYour Name 
491*5113495bSYour Name 
492*5113495bSYour Name /* Description		SW_BUFFER_COOKIE
493*5113495bSYour Name 
494*5113495bSYour Name 			Cookie field exclusively used by SW.
495*5113495bSYour Name 
496*5113495bSYour Name 			In case of 'NULL' pointer, this field is set to 0
497*5113495bSYour Name 
498*5113495bSYour Name 			HW ignores the contents, accept that it passes the programmed
499*5113495bSYour Name 			 value on to other descriptors together with the physical
500*5113495bSYour Name 			 address
501*5113495bSYour Name 
502*5113495bSYour Name 			Field can be used by SW to for example associate the buffers
503*5113495bSYour Name 			 physical address with the virtual address
504*5113495bSYour Name 			The bit definitions as used by SW are within SW HLD specification
505*5113495bSYour Name 
506*5113495bSYour Name 
507*5113495bSYour Name 			NOTE1:
508*5113495bSYour Name 			The three most significant bits can have a special meaning
509*5113495bSYour Name 			 in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,
510*5113495bSYour Name 			and field transmit_bw_restriction is set
511*5113495bSYour Name 
512*5113495bSYour Name 			In case of NON punctured transmission:
513*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b000: 20 MHz TX only
514*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b001: 40 MHz TX only
515*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b010: 80 MHz TX only
516*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b011: 160 MHz TX only
517*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b101: 240 MHz TX only
518*5113495bSYour Name 			Sw_buffer_cookie[19:17] = 3'b100: 320 MHz TX only
519*5113495bSYour Name 			Sw_buffer_cookie[19:18] = 2'b11: reserved
520*5113495bSYour Name 
521*5113495bSYour Name 			In case of punctured transmission:
522*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0000: pattern 0 only
523*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0001: pattern 1 only
524*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0010: pattern 2 only
525*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0011: pattern 3 only
526*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0100: pattern 4 only
527*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0101: pattern 5 only
528*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0110: pattern 6 only
529*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b0111: pattern 7 only
530*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1000: pattern 8 only
531*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1001: pattern 9 only
532*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1010: pattern 10 only
533*5113495bSYour Name 			Sw_buffer_cookie[19:16] = 4'b1011: pattern 11 only
534*5113495bSYour Name 			Sw_buffer_cookie[19:18] = 2'b11: reserved
535*5113495bSYour Name 
536*5113495bSYour Name 			Note: a punctured transmission is indicated by the presence
537*5113495bSYour Name 			 of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV
538*5113495bSYour Name 
539*5113495bSYour Name 			<legal all>
540*5113495bSYour Name */
541*5113495bSYour Name 
542*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET               0x00000014
543*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_SW_BUFFER_COOKIE_LSB                  12
544*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_SW_BUFFER_COOKIE_MSB                  31
545*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUFF_ADDR_INFO_SW_BUFFER_COOKIE_MASK                 0xfffff000
546*5113495bSYour Name 
547*5113495bSYour Name 
548*5113495bSYour Name /* Description		RXDMA_PUSH_REASON
549*5113495bSYour Name 
550*5113495bSYour Name 			Indicates why RXDMA pushed the frame to this ring
551*5113495bSYour Name 
552*5113495bSYour Name 			<enum 0 rxdma_error_detected> RXDMA detected an error an
553*5113495bSYour Name 			 pushed this frame to this queue
554*5113495bSYour Name 			<enum 1 rxdma_routing_instruction> RXDMA pushed the frame
555*5113495bSYour Name 			 to this queue per received routing instructions. No error
556*5113495bSYour Name 			 within RXDMA was detected
557*5113495bSYour Name 			<enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a
558*5113495bSYour Name 			 result the MSDU link descriptor might not have the "last_msdu_in_mpdu_flag"
559*5113495bSYour Name 			set, but instead WBM might just see a NULL pointer in the
560*5113495bSYour Name 			 MSDU link descriptor. This is to be considered a normal
561*5113495bSYour Name 			 condition for this scenario.
562*5113495bSYour Name 
563*5113495bSYour Name 			<legal 0 - 2>
564*5113495bSYour Name */
565*5113495bSYour Name 
566*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_PUSH_REASON_OFFSET                                    0x00000018
567*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_PUSH_REASON_LSB                                       0
568*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_PUSH_REASON_MSB                                       1
569*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_PUSH_REASON_MASK                                      0x00000003
570*5113495bSYour Name 
571*5113495bSYour Name 
572*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_ERROR_CODE_LSB                                        2
573*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_ERROR_CODE_MSB                                        6
574*5113495bSYour Name #define SW_MONITOR_RING_RXDMA_ERROR_CODE_MASK                                       0x0000007c
575*5113495bSYour Name 
576*5113495bSYour Name 
577*5113495bSYour Name /* Description		MPDU_FRAGMENT_NUMBER
578*5113495bSYour Name 
579*5113495bSYour Name 			Field only valid when Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details.Fragment_flag
580*5113495bSYour Name 			 is set and end_of_ppdu is set to 0.
581*5113495bSYour Name 
582*5113495bSYour Name 			The fragment number from the 802.11 header.
583*5113495bSYour Name 
584*5113495bSYour Name 			Note that the sequence number is embedded in the field:
585*5113495bSYour Name 			Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details. Mpdu_sequence_number
586*5113495bSYour Name 
587*5113495bSYour Name 
588*5113495bSYour Name 			<legal all>
589*5113495bSYour Name */
590*5113495bSYour Name 
591*5113495bSYour Name #define SW_MONITOR_RING_MPDU_FRAGMENT_NUMBER_OFFSET                                 0x00000018
592*5113495bSYour Name #define SW_MONITOR_RING_MPDU_FRAGMENT_NUMBER_LSB                                    7
593*5113495bSYour Name #define SW_MONITOR_RING_MPDU_FRAGMENT_NUMBER_MSB                                    10
594*5113495bSYour Name #define SW_MONITOR_RING_MPDU_FRAGMENT_NUMBER_MASK                                   0x00000780
595*5113495bSYour Name 
596*5113495bSYour Name 
597*5113495bSYour Name /* Description		FRAMELESS_BAR
598*5113495bSYour Name 
599*5113495bSYour Name 			When set, this SW monitor ring struct contains BAR info
600*5113495bSYour Name 			from a multi TID BAR frame. The original multi TID BAR frame
601*5113495bSYour Name 			 itself contained all the REO info for the first TID, but
602*5113495bSYour Name 			 all the subsequent TID info and their linkage to the REO
603*5113495bSYour Name 			 descriptors is passed down as 'frameless' BAR info.
604*5113495bSYour Name 
605*5113495bSYour Name 			The only fields valid in this descriptor when this bit is
606*5113495bSYour Name 			 within the
607*5113495bSYour Name 			Reo_level_mpdu_frame_info:
608*5113495bSYour Name 			   Within Rx_mpdu_desc_info_details:
609*5113495bSYour Name 			Mpdu_Sequence_number
610*5113495bSYour Name 			BAR_frame
611*5113495bSYour Name 			Peer_meta_data
612*5113495bSYour Name 			All other fields shall be set to 0.
613*5113495bSYour Name 
614*5113495bSYour Name 			<legal all>
615*5113495bSYour Name */
616*5113495bSYour Name 
617*5113495bSYour Name #define SW_MONITOR_RING_FRAMELESS_BAR_OFFSET                                        0x00000018
618*5113495bSYour Name #define SW_MONITOR_RING_FRAMELESS_BAR_LSB                                           11
619*5113495bSYour Name #define SW_MONITOR_RING_FRAMELESS_BAR_MSB                                           11
620*5113495bSYour Name #define SW_MONITOR_RING_FRAMELESS_BAR_MASK                                          0x00000800
621*5113495bSYour Name 
622*5113495bSYour Name 
623*5113495bSYour Name /* Description		STATUS_BUF_COUNT
624*5113495bSYour Name 
625*5113495bSYour Name 			A count of status buffers used so far for the PPDU (either
626*5113495bSYour Name 			 the PPDU that included the MPDU being pushed to SW if end_of_ppdu
627*5113495bSYour Name 			 = 0, or the PPDU whose end is indicated through end_of_ppdu
628*5113495bSYour Name 			 = 1)
629*5113495bSYour Name */
630*5113495bSYour Name 
631*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUF_COUNT_OFFSET                                     0x00000018
632*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUF_COUNT_LSB                                        12
633*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUF_COUNT_MSB                                        15
634*5113495bSYour Name #define SW_MONITOR_RING_STATUS_BUF_COUNT_MASK                                       0x0000f000
635*5113495bSYour Name 
636*5113495bSYour Name 
637*5113495bSYour Name /* Description		END_OF_PPDU
638*5113495bSYour Name 
639*5113495bSYour Name 			RXDMA can be configured to generate a separate 'SW_MONITOR_RING'
640*5113495bSYour Name 			descriptor at the end of a PPDU (either through an 'RX_PPDU_END'
641*5113495bSYour Name 			TLV or through an 'RX_FLUSH') to demarcate PPDUs.
642*5113495bSYour Name 
643*5113495bSYour Name 			For such a descriptor, this bit is set to 1 and fields Reo_level_mpdu_frame_info,
644*5113495bSYour Name 			mpdu_fragment_number and Frameless_bar are all set to 0.
645*5113495bSYour Name 
646*5113495bSYour Name 
647*5113495bSYour Name 			Otherwise this bit is set to 0.
648*5113495bSYour Name */
649*5113495bSYour Name 
650*5113495bSYour Name #define SW_MONITOR_RING_END_OF_PPDU_OFFSET                                          0x00000018
651*5113495bSYour Name #define SW_MONITOR_RING_END_OF_PPDU_LSB                                             16
652*5113495bSYour Name #define SW_MONITOR_RING_END_OF_PPDU_MSB                                             16
653*5113495bSYour Name #define SW_MONITOR_RING_END_OF_PPDU_MASK                                            0x00010000
654*5113495bSYour Name 
655*5113495bSYour Name 
656*5113495bSYour Name /* Description		RESERVED_6A
657*5113495bSYour Name 
658*5113495bSYour Name 			<legal 0>
659*5113495bSYour Name */
660*5113495bSYour Name 
661*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_6A_OFFSET                                          0x00000018
662*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_6A_LSB                                             17
663*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_6A_MSB                                             31
664*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_6A_MASK                                            0xfffe0000
665*5113495bSYour Name 
666*5113495bSYour Name 
667*5113495bSYour Name /* Description		PHY_PPDU_ID
668*5113495bSYour Name 
669*5113495bSYour Name 			A PPDU counter value that PHY increments for every PPDU
670*5113495bSYour Name 			received
671*5113495bSYour Name 			The counter value wraps around. RXDMA can be configured
672*5113495bSYour Name 			 to copy this from the RX_PPDU_START TLV for every output
673*5113495bSYour Name 			 descriptor.
674*5113495bSYour Name 
675*5113495bSYour Name 			<legal all>
676*5113495bSYour Name */
677*5113495bSYour Name 
678*5113495bSYour Name #define SW_MONITOR_RING_PHY_PPDU_ID_OFFSET                                          0x0000001c
679*5113495bSYour Name #define SW_MONITOR_RING_PHY_PPDU_ID_LSB                                             0
680*5113495bSYour Name #define SW_MONITOR_RING_PHY_PPDU_ID_MSB                                             15
681*5113495bSYour Name #define SW_MONITOR_RING_PHY_PPDU_ID_MASK                                            0x0000ffff
682*5113495bSYour Name 
683*5113495bSYour Name 
684*5113495bSYour Name /* Description		RESERVED_7A
685*5113495bSYour Name 
686*5113495bSYour Name 			<legal 0>
687*5113495bSYour Name */
688*5113495bSYour Name 
689*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_7A_OFFSET                                          0x0000001c
690*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_7A_LSB                                             16
691*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_7A_MSB                                             19
692*5113495bSYour Name #define SW_MONITOR_RING_RESERVED_7A_MASK                                            0x000f0000
693*5113495bSYour Name 
694*5113495bSYour Name 
695*5113495bSYour Name /* Description		RING_ID
696*5113495bSYour Name 
697*5113495bSYour Name 			Consumer: SW/REO/DEBUG
698*5113495bSYour Name 			Producer: SRNG (of RXDMA)
699*5113495bSYour Name 
700*5113495bSYour Name 			For debugging.
701*5113495bSYour Name 			This field is filled in by the SRNG module.
702*5113495bSYour Name 			It help to identify the ring that is being looked <legal
703*5113495bSYour Name 			 all>
704*5113495bSYour Name */
705*5113495bSYour Name 
706*5113495bSYour Name #define SW_MONITOR_RING_RING_ID_OFFSET                                              0x0000001c
707*5113495bSYour Name #define SW_MONITOR_RING_RING_ID_LSB                                                 20
708*5113495bSYour Name #define SW_MONITOR_RING_RING_ID_MSB                                                 27
709*5113495bSYour Name #define SW_MONITOR_RING_RING_ID_MASK                                                0x0ff00000
710*5113495bSYour Name 
711*5113495bSYour Name 
712*5113495bSYour Name /* Description		LOOPING_COUNT
713*5113495bSYour Name 
714*5113495bSYour Name 			Consumer: SW/REO/DEBUG
715*5113495bSYour Name 			Producer: SRNG (of RXDMA)
716*5113495bSYour Name 
717*5113495bSYour Name 			For debugging.
718*5113495bSYour Name 			This field is filled in by the SRNG module.
719*5113495bSYour Name 
720*5113495bSYour Name 			A count value that indicates the number of times the producer
721*5113495bSYour Name 			 of entries into this Ring has looped around the ring.
722*5113495bSYour Name 			At initialization time, this value is set to 0. On the first
723*5113495bSYour Name 			 loop, this value is set to 1. After the max value is reached
724*5113495bSYour Name 			 allowed by the number of bits for this field, the count
725*5113495bSYour Name 			 value continues with 0 again.
726*5113495bSYour Name 
727*5113495bSYour Name 			In case SW is the consumer of the ring entries, it can use
728*5113495bSYour Name 			 this field to figure out up to where the producer of entries
729*5113495bSYour Name 			 has created new entries. This eliminates the need to check
730*5113495bSYour Name 			 where the "head pointer' of the ring is located once the
731*5113495bSYour Name 			 SW starts processing an interrupt indicating that new entries
732*5113495bSYour Name 			 have been put into this ring...
733*5113495bSYour Name 
734*5113495bSYour Name 			Also note that SW if it wants only needs to look at the
735*5113495bSYour Name 			LSB bit of this count value.
736*5113495bSYour Name 			<legal all>
737*5113495bSYour Name */
738*5113495bSYour Name 
739*5113495bSYour Name #define SW_MONITOR_RING_LOOPING_COUNT_OFFSET                                        0x0000001c
740*5113495bSYour Name #define SW_MONITOR_RING_LOOPING_COUNT_LSB                                           28
741*5113495bSYour Name #define SW_MONITOR_RING_LOOPING_COUNT_MSB                                           31
742*5113495bSYour Name #define SW_MONITOR_RING_LOOPING_COUNT_MASK                                          0xf0000000
743*5113495bSYour Name 
744*5113495bSYour Name 
745*5113495bSYour Name 
746*5113495bSYour Name #endif   // SW_MONITOR_RING
747