xref: /wlan-driver/fw-api/hw/qca6290/11ax/v1/reo_destination_ring.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name #ifndef _REO_DESTINATION_RING_H_
20*5113495bSYour Name #define _REO_DESTINATION_RING_H_
21*5113495bSYour Name #if !defined(__ASSEMBLER__)
22*5113495bSYour Name #endif
23*5113495bSYour Name 
24*5113495bSYour Name #include "buffer_addr_info.h"
25*5113495bSYour Name #include "rx_mpdu_desc_info.h"
26*5113495bSYour Name #include "rx_msdu_desc_info.h"
27*5113495bSYour Name 
28*5113495bSYour Name // ################ START SUMMARY #################
29*5113495bSYour Name //
30*5113495bSYour Name //	Dword	Fields
31*5113495bSYour Name //	0-1	struct buffer_addr_info buf_or_link_desc_addr_info;
32*5113495bSYour Name //	2-3	struct rx_mpdu_desc_info rx_mpdu_desc_info_details;
33*5113495bSYour Name //	4-5	struct rx_msdu_desc_info rx_msdu_desc_info_details;
34*5113495bSYour Name //	6	rx_reo_queue_desc_addr_31_0[31:0]
35*5113495bSYour Name //	7	rx_reo_queue_desc_addr_39_32[7:0], reo_dest_buffer_type[8], reo_push_reason[10:9], reo_error_code[15:11], receive_queue_number[31:16]
36*5113495bSYour Name //	8	soft_reorder_info_valid[0], reorder_opcode[4:1], reorder_slot_index[12:5], reserved_8a[31:13]
37*5113495bSYour Name //	9	reserved_9a[31:0]
38*5113495bSYour Name //	10	reserved_10a[31:0]
39*5113495bSYour Name //	11	reserved_11a[31:0]
40*5113495bSYour Name //	12	reserved_12a[31:0]
41*5113495bSYour Name //	13	reserved_13a[31:0]
42*5113495bSYour Name //	14	reserved_14a[31:0]
43*5113495bSYour Name //	15	reserved_15[19:0], ring_id[27:20], looping_count[31:28]
44*5113495bSYour Name //
45*5113495bSYour Name // ################ END SUMMARY #################
46*5113495bSYour Name 
47*5113495bSYour Name #define NUM_OF_DWORDS_REO_DESTINATION_RING 16
48*5113495bSYour Name 
49*5113495bSYour Name struct reo_destination_ring {
50*5113495bSYour Name     struct            buffer_addr_info                       buf_or_link_desc_addr_info;
51*5113495bSYour Name     struct            rx_mpdu_desc_info                       rx_mpdu_desc_info_details;
52*5113495bSYour Name     struct            rx_msdu_desc_info                       rx_msdu_desc_info_details;
53*5113495bSYour Name              uint32_t rx_reo_queue_desc_addr_31_0     : 32; //[31:0]
54*5113495bSYour Name              uint32_t rx_reo_queue_desc_addr_39_32    :  8, //[7:0]
55*5113495bSYour Name                       reo_dest_buffer_type            :  1, //[8]
56*5113495bSYour Name                       reo_push_reason                 :  2, //[10:9]
57*5113495bSYour Name                       reo_error_code                  :  5, //[15:11]
58*5113495bSYour Name                       receive_queue_number            : 16; //[31:16]
59*5113495bSYour Name              uint32_t soft_reorder_info_valid         :  1, //[0]
60*5113495bSYour Name                       reorder_opcode                  :  4, //[4:1]
61*5113495bSYour Name                       reorder_slot_index              :  8, //[12:5]
62*5113495bSYour Name                       reserved_8a                     : 19; //[31:13]
63*5113495bSYour Name              uint32_t reserved_9a                     : 32; //[31:0]
64*5113495bSYour Name              uint32_t reserved_10a                    : 32; //[31:0]
65*5113495bSYour Name              uint32_t reserved_11a                    : 32; //[31:0]
66*5113495bSYour Name              uint32_t reserved_12a                    : 32; //[31:0]
67*5113495bSYour Name              uint32_t reserved_13a                    : 32; //[31:0]
68*5113495bSYour Name              uint32_t reserved_14a                    : 32; //[31:0]
69*5113495bSYour Name              uint32_t reserved_15                     : 20, //[19:0]
70*5113495bSYour Name                       ring_id                         :  8, //[27:20]
71*5113495bSYour Name                       looping_count                   :  4; //[31:28]
72*5113495bSYour Name };
73*5113495bSYour Name 
74*5113495bSYour Name /*
75*5113495bSYour Name 
76*5113495bSYour Name struct buffer_addr_info buf_or_link_desc_addr_info
77*5113495bSYour Name 
78*5113495bSYour Name 			Consumer: REO/SW/FW
79*5113495bSYour Name 
80*5113495bSYour Name 			Producer: RXDMA
81*5113495bSYour Name 
82*5113495bSYour Name 
83*5113495bSYour Name 
84*5113495bSYour Name 			Details of the physical address of the a buffer or MSDU
85*5113495bSYour Name 			link descriptor
86*5113495bSYour Name 
87*5113495bSYour Name struct rx_mpdu_desc_info rx_mpdu_desc_info_details
88*5113495bSYour Name 
89*5113495bSYour Name 			Consumer: REO/SW/FW
90*5113495bSYour Name 
91*5113495bSYour Name 			Producer: RXDMA
92*5113495bSYour Name 
93*5113495bSYour Name 
94*5113495bSYour Name 
95*5113495bSYour Name 			General information related to the MPDU that is passed
96*5113495bSYour Name 			on from REO entrance ring to the REO destination ring
97*5113495bSYour Name 
98*5113495bSYour Name struct rx_msdu_desc_info rx_msdu_desc_info_details
99*5113495bSYour Name 
100*5113495bSYour Name 			General information related to the MSDU that is passed
101*5113495bSYour Name 			on from RXDMA all the way to to the REO destination ring.
102*5113495bSYour Name 
103*5113495bSYour Name rx_reo_queue_desc_addr_31_0
104*5113495bSYour Name 
105*5113495bSYour Name 			Consumer: REO
106*5113495bSYour Name 
107*5113495bSYour Name 			Producer: RXDMA
108*5113495bSYour Name 
109*5113495bSYour Name 
110*5113495bSYour Name 
111*5113495bSYour Name 			Address (lower 32 bits) of the REO queue descriptor.
112*5113495bSYour Name 
113*5113495bSYour Name 			<legal all>
114*5113495bSYour Name 
115*5113495bSYour Name rx_reo_queue_desc_addr_39_32
116*5113495bSYour Name 
117*5113495bSYour Name 			Consumer: REO
118*5113495bSYour Name 
119*5113495bSYour Name 			Producer: RXDMA
120*5113495bSYour Name 
121*5113495bSYour Name 
122*5113495bSYour Name 
123*5113495bSYour Name 			Address (upper 8 bits) of the REO queue descriptor.
124*5113495bSYour Name 
125*5113495bSYour Name 			<legal all>
126*5113495bSYour Name 
127*5113495bSYour Name reo_dest_buffer_type
128*5113495bSYour Name 
129*5113495bSYour Name 			Indicates the type of address provided in the
130*5113495bSYour Name 			'Buf_or_link_desc_addr_info'
131*5113495bSYour Name 
132*5113495bSYour Name 
133*5113495bSYour Name 
134*5113495bSYour Name 			<enum 0 MSDU_buf_address> The address of an MSDU buffer
135*5113495bSYour Name 
136*5113495bSYour Name 			<enum 1 MSDU_link_desc_address> The address of the MSDU
137*5113495bSYour Name 			link descriptor.
138*5113495bSYour Name 
139*5113495bSYour Name 
140*5113495bSYour Name 
141*5113495bSYour Name 			<legal all>
142*5113495bSYour Name 
143*5113495bSYour Name reo_push_reason
144*5113495bSYour Name 
145*5113495bSYour Name 			Indicates why REO pushed the frame to this exit ring
146*5113495bSYour Name 
147*5113495bSYour Name 
148*5113495bSYour Name 
149*5113495bSYour Name 			<enum 0 reo_error_detected> Reo detected an error an
150*5113495bSYour Name 			pushed this frame to this queue
151*5113495bSYour Name 
152*5113495bSYour Name 			<enum 1 reo_routing_instruction> Reo pushed the frame to
153*5113495bSYour Name 			this queue per received routing instructions. No error
154*5113495bSYour Name 			within REO was detected
155*5113495bSYour Name 
156*5113495bSYour Name 
157*5113495bSYour Name 
158*5113495bSYour Name 
159*5113495bSYour Name 
160*5113495bSYour Name 			<legal 0 - 1>
161*5113495bSYour Name 
162*5113495bSYour Name reo_error_code
163*5113495bSYour Name 
164*5113495bSYour Name 			Field only valid when 'Reo_push_reason' set to
165*5113495bSYour Name 			'reo_error_detected'.
166*5113495bSYour Name 
167*5113495bSYour Name 
168*5113495bSYour Name 
169*5113495bSYour Name 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
170*5113495bSYour Name 			provided in the REO_ENTRANCE ring is set to 0
171*5113495bSYour Name 
172*5113495bSYour Name 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
173*5113495bSYour Name 			valid bit is NOT set
174*5113495bSYour Name 
175*5113495bSYour Name 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
176*5113495bSYour Name 			session having been setup.
177*5113495bSYour Name 
178*5113495bSYour Name 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
179*5113495bSYour Name 			SSN, Retry bit set: duplicate frame
180*5113495bSYour Name 
181*5113495bSYour Name 			<enum 4 ba_duplicate> BA session, duplicate frame
182*5113495bSYour Name 
183*5113495bSYour Name 			<enum 5 regular_frame_2k_jump> A normal (management/data
184*5113495bSYour Name 			frame) received with 2K jump in SN
185*5113495bSYour Name 
186*5113495bSYour Name 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
187*5113495bSYour Name 			in SSN
188*5113495bSYour Name 
189*5113495bSYour Name 			<enum 7 regular_frame_OOR> A normal (management/data
190*5113495bSYour Name 			frame) received with SN falling within the OOR window
191*5113495bSYour Name 
192*5113495bSYour Name 			<enum 8 bar_frame_OOR> A bar received with SSN falling
193*5113495bSYour Name 			within the OOR window
194*5113495bSYour Name 
195*5113495bSYour Name 			<enum 9 bar_frame_no_ba_session> A bar received without
196*5113495bSYour Name 			a BA session
197*5113495bSYour Name 
198*5113495bSYour Name 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
199*5113495bSYour Name 			SSN equal to SN
200*5113495bSYour Name 
201*5113495bSYour Name 			<enum 11 pn_check_failed> PN Check Failed packet.
202*5113495bSYour Name 
203*5113495bSYour Name 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
204*5113495bSYour Name 			as a result of the 'Seq_2k_error_detected_flag' been set in
205*5113495bSYour Name 			the REO Queue descriptor
206*5113495bSYour Name 
207*5113495bSYour Name 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
208*5113495bSYour Name 			as a result of the 'pn_error_detected_flag' been set in the
209*5113495bSYour Name 			REO Queue descriptor
210*5113495bSYour Name 
211*5113495bSYour Name 			<enum 14 queue_descriptor_blocked_set> Frame is
212*5113495bSYour Name 			forwarded as a result of the queue descriptor(address) being
213*5113495bSYour Name 			blocked as SW/FW seems to be currently in the process of
214*5113495bSYour Name 			making updates to this descriptor...
215*5113495bSYour Name 
216*5113495bSYour Name 
217*5113495bSYour Name 
218*5113495bSYour Name 			<legal 0-14>
219*5113495bSYour Name 
220*5113495bSYour Name receive_queue_number
221*5113495bSYour Name 
222*5113495bSYour Name 			This field indicates the REO MPDU reorder queue ID from
223*5113495bSYour Name 			which this frame originated. This field is populated from a
224*5113495bSYour Name 			field with the same name in the RX_REO_QUEUE descriptor.
225*5113495bSYour Name 
226*5113495bSYour Name 			<legal all>
227*5113495bSYour Name 
228*5113495bSYour Name soft_reorder_info_valid
229*5113495bSYour Name 
230*5113495bSYour Name 			When set, REO has been instructed to not perform the
231*5113495bSYour Name 			actual re-ordering of frames for this queue, but just to
232*5113495bSYour Name 			insert the reorder opcodes
233*5113495bSYour Name 
234*5113495bSYour Name 			<legal all>
235*5113495bSYour Name 
236*5113495bSYour Name reorder_opcode
237*5113495bSYour Name 
238*5113495bSYour Name 			Field is valid when 'Soft_reorder_info_valid' is set.
239*5113495bSYour Name 			This field is always valid for debug purpose as well.
240*5113495bSYour Name 
241*5113495bSYour Name 			Details are in the MLD.
242*5113495bSYour Name 
243*5113495bSYour Name 
244*5113495bSYour Name 
245*5113495bSYour Name 			<enum 0 invalid>
246*5113495bSYour Name 
247*5113495bSYour Name 			<enum 1 fwdcur_fwdbuf>
248*5113495bSYour Name 
249*5113495bSYour Name 			<enum 2 fwdbuf_fwdcur>
250*5113495bSYour Name 
251*5113495bSYour Name 			<enum 3 qcur>
252*5113495bSYour Name 
253*5113495bSYour Name 			<enum 4 fwdbuf_qcur>
254*5113495bSYour Name 
255*5113495bSYour Name 			<enum 5 fwdbuf_drop>
256*5113495bSYour Name 
257*5113495bSYour Name 			<enum 6 fwdall_drop>
258*5113495bSYour Name 
259*5113495bSYour Name 			<enum 7 fwdall_qcur>
260*5113495bSYour Name 
261*5113495bSYour Name 			<enum 8 reserved_reo_opcode_1>
262*5113495bSYour Name 
263*5113495bSYour Name 			<enum 9 dropcur>  the error reason code is in
264*5113495bSYour Name 			reo_error_code field.
265*5113495bSYour Name 
266*5113495bSYour Name 			<enum 10 reserved_reo_opcode_2>
267*5113495bSYour Name 
268*5113495bSYour Name 			<enum 11 reserved_reo_opcode_3>
269*5113495bSYour Name 
270*5113495bSYour Name 			<enum 12 reserved_reo_opcode_4>
271*5113495bSYour Name 
272*5113495bSYour Name 			<enum 13 reserved_reo_opcode_5>
273*5113495bSYour Name 
274*5113495bSYour Name 			<enum 14 reserved_reo_opcode_6>
275*5113495bSYour Name 
276*5113495bSYour Name 			<enum 15 reserved_reo_opcode_7>
277*5113495bSYour Name 
278*5113495bSYour Name 
279*5113495bSYour Name 
280*5113495bSYour Name 			<legal all>
281*5113495bSYour Name 
282*5113495bSYour Name reorder_slot_index
283*5113495bSYour Name 
284*5113495bSYour Name 			Field only valid when 'Soft_reorder_info_valid' is set.
285*5113495bSYour Name 
286*5113495bSYour Name 
287*5113495bSYour Name 
288*5113495bSYour Name 			TODO: add description
289*5113495bSYour Name 
290*5113495bSYour Name 
291*5113495bSYour Name 
292*5113495bSYour Name 			<legal all>
293*5113495bSYour Name 
294*5113495bSYour Name reserved_8a
295*5113495bSYour Name 
296*5113495bSYour Name 			<legal 0>
297*5113495bSYour Name 
298*5113495bSYour Name reserved_9a
299*5113495bSYour Name 
300*5113495bSYour Name 			<legal 0>
301*5113495bSYour Name 
302*5113495bSYour Name reserved_10a
303*5113495bSYour Name 
304*5113495bSYour Name 			<legal 0>
305*5113495bSYour Name 
306*5113495bSYour Name reserved_11a
307*5113495bSYour Name 
308*5113495bSYour Name 			<legal 0>
309*5113495bSYour Name 
310*5113495bSYour Name reserved_12a
311*5113495bSYour Name 
312*5113495bSYour Name 			<legal 0>
313*5113495bSYour Name 
314*5113495bSYour Name reserved_13a
315*5113495bSYour Name 
316*5113495bSYour Name 			<legal 0>
317*5113495bSYour Name 
318*5113495bSYour Name reserved_14a
319*5113495bSYour Name 
320*5113495bSYour Name 			<legal 0>
321*5113495bSYour Name 
322*5113495bSYour Name reserved_15
323*5113495bSYour Name 
324*5113495bSYour Name 			<legal 0>
325*5113495bSYour Name 
326*5113495bSYour Name ring_id
327*5113495bSYour Name 
328*5113495bSYour Name 			The buffer pointer ring ID.
329*5113495bSYour Name 
330*5113495bSYour Name 			0 refers to the IDLE ring
331*5113495bSYour Name 
332*5113495bSYour Name 			1 - N refers to other rings
333*5113495bSYour Name 
334*5113495bSYour Name 
335*5113495bSYour Name 
336*5113495bSYour Name 			Helps with debugging when dumping ring contents.
337*5113495bSYour Name 
338*5113495bSYour Name 			<legal all>
339*5113495bSYour Name 
340*5113495bSYour Name looping_count
341*5113495bSYour Name 
342*5113495bSYour Name 			A count value that indicates the number of times the
343*5113495bSYour Name 			producer of entries into this Ring has looped around the
344*5113495bSYour Name 			ring.
345*5113495bSYour Name 
346*5113495bSYour Name 			At initialization time, this value is set to 0. On the
347*5113495bSYour Name 			first loop, this value is set to 1. After the max value is
348*5113495bSYour Name 			reached allowed by the number of bits for this field, the
349*5113495bSYour Name 			count value continues with 0 again.
350*5113495bSYour Name 
351*5113495bSYour Name 			In case SW is the consumer of the ring entries, it can
352*5113495bSYour Name 			use this field to figure out up to where the producer of
353*5113495bSYour Name 			entries has created new entries. This eliminates the need to
354*5113495bSYour Name 			check where the head pointer' of the ring is located once
355*5113495bSYour Name 			the SW starts processing an interrupt indicating that new
356*5113495bSYour Name 			entries have been put into this ring...
357*5113495bSYour Name 
358*5113495bSYour Name 
359*5113495bSYour Name 
360*5113495bSYour Name 			Also note that SW if it wants only needs to look at the
361*5113495bSYour Name 			LSB bit of this count value.
362*5113495bSYour Name 
363*5113495bSYour Name 			<legal all>
364*5113495bSYour Name */
365*5113495bSYour Name 
366*5113495bSYour Name #define REO_DESTINATION_RING_0_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_OFFSET 0x00000000
367*5113495bSYour Name #define REO_DESTINATION_RING_0_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_LSB 28
368*5113495bSYour Name #define REO_DESTINATION_RING_0_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_MASK 0xffffffff
369*5113495bSYour Name #define REO_DESTINATION_RING_1_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_OFFSET 0x00000004
370*5113495bSYour Name #define REO_DESTINATION_RING_1_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_LSB 28
371*5113495bSYour Name #define REO_DESTINATION_RING_1_BUFFER_ADDR_INFO_BUF_OR_LINK_DESC_ADDR_INFO_MASK 0xffffffff
372*5113495bSYour Name #define REO_DESTINATION_RING_2_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_OFFSET 0x00000008
373*5113495bSYour Name #define REO_DESTINATION_RING_2_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_LSB 28
374*5113495bSYour Name #define REO_DESTINATION_RING_2_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_MASK 0xffffffff
375*5113495bSYour Name #define REO_DESTINATION_RING_3_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_OFFSET 0x0000000c
376*5113495bSYour Name #define REO_DESTINATION_RING_3_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_LSB 28
377*5113495bSYour Name #define REO_DESTINATION_RING_3_RX_MPDU_DESC_INFO_RX_MPDU_DESC_INFO_DETAILS_MASK 0xffffffff
378*5113495bSYour Name #define REO_DESTINATION_RING_4_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_OFFSET 0x00000010
379*5113495bSYour Name #define REO_DESTINATION_RING_4_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_LSB 28
380*5113495bSYour Name #define REO_DESTINATION_RING_4_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_MASK 0xffffffff
381*5113495bSYour Name #define REO_DESTINATION_RING_5_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_OFFSET 0x00000014
382*5113495bSYour Name #define REO_DESTINATION_RING_5_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_LSB 28
383*5113495bSYour Name #define REO_DESTINATION_RING_5_RX_MSDU_DESC_INFO_RX_MSDU_DESC_INFO_DETAILS_MASK 0xffffffff
384*5113495bSYour Name 
385*5113495bSYour Name /* Description		REO_DESTINATION_RING_6_RX_REO_QUEUE_DESC_ADDR_31_0
386*5113495bSYour Name 
387*5113495bSYour Name 			Consumer: REO
388*5113495bSYour Name 
389*5113495bSYour Name 			Producer: RXDMA
390*5113495bSYour Name 
391*5113495bSYour Name 
392*5113495bSYour Name 
393*5113495bSYour Name 			Address (lower 32 bits) of the REO queue descriptor.
394*5113495bSYour Name 
395*5113495bSYour Name 			<legal all>
396*5113495bSYour Name */
397*5113495bSYour Name #define REO_DESTINATION_RING_6_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET    0x00000018
398*5113495bSYour Name #define REO_DESTINATION_RING_6_RX_REO_QUEUE_DESC_ADDR_31_0_LSB       0
399*5113495bSYour Name #define REO_DESTINATION_RING_6_RX_REO_QUEUE_DESC_ADDR_31_0_MASK      0xffffffff
400*5113495bSYour Name 
401*5113495bSYour Name /* Description		REO_DESTINATION_RING_7_RX_REO_QUEUE_DESC_ADDR_39_32
402*5113495bSYour Name 
403*5113495bSYour Name 			Consumer: REO
404*5113495bSYour Name 
405*5113495bSYour Name 			Producer: RXDMA
406*5113495bSYour Name 
407*5113495bSYour Name 
408*5113495bSYour Name 
409*5113495bSYour Name 			Address (upper 8 bits) of the REO queue descriptor.
410*5113495bSYour Name 
411*5113495bSYour Name 			<legal all>
412*5113495bSYour Name */
413*5113495bSYour Name #define REO_DESTINATION_RING_7_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET   0x0000001c
414*5113495bSYour Name #define REO_DESTINATION_RING_7_RX_REO_QUEUE_DESC_ADDR_39_32_LSB      0
415*5113495bSYour Name #define REO_DESTINATION_RING_7_RX_REO_QUEUE_DESC_ADDR_39_32_MASK     0x000000ff
416*5113495bSYour Name 
417*5113495bSYour Name /* Description		REO_DESTINATION_RING_7_REO_DEST_BUFFER_TYPE
418*5113495bSYour Name 
419*5113495bSYour Name 			Indicates the type of address provided in the
420*5113495bSYour Name 			'Buf_or_link_desc_addr_info'
421*5113495bSYour Name 
422*5113495bSYour Name 
423*5113495bSYour Name 
424*5113495bSYour Name 			<enum 0 MSDU_buf_address> The address of an MSDU buffer
425*5113495bSYour Name 
426*5113495bSYour Name 			<enum 1 MSDU_link_desc_address> The address of the MSDU
427*5113495bSYour Name 			link descriptor.
428*5113495bSYour Name 
429*5113495bSYour Name 
430*5113495bSYour Name 
431*5113495bSYour Name 			<legal all>
432*5113495bSYour Name */
433*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_DEST_BUFFER_TYPE_OFFSET           0x0000001c
434*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_DEST_BUFFER_TYPE_LSB              8
435*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_DEST_BUFFER_TYPE_MASK             0x00000100
436*5113495bSYour Name 
437*5113495bSYour Name /* Description		REO_DESTINATION_RING_7_REO_PUSH_REASON
438*5113495bSYour Name 
439*5113495bSYour Name 			Indicates why REO pushed the frame to this exit ring
440*5113495bSYour Name 
441*5113495bSYour Name 
442*5113495bSYour Name 
443*5113495bSYour Name 			<enum 0 reo_error_detected> Reo detected an error an
444*5113495bSYour Name 			pushed this frame to this queue
445*5113495bSYour Name 
446*5113495bSYour Name 			<enum 1 reo_routing_instruction> Reo pushed the frame to
447*5113495bSYour Name 			this queue per received routing instructions. No error
448*5113495bSYour Name 			within REO was detected
449*5113495bSYour Name 
450*5113495bSYour Name 
451*5113495bSYour Name 
452*5113495bSYour Name 
453*5113495bSYour Name 
454*5113495bSYour Name 			<legal 0 - 1>
455*5113495bSYour Name */
456*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_PUSH_REASON_OFFSET                0x0000001c
457*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_PUSH_REASON_LSB                   9
458*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_PUSH_REASON_MASK                  0x00000600
459*5113495bSYour Name 
460*5113495bSYour Name /* Description		REO_DESTINATION_RING_7_REO_ERROR_CODE
461*5113495bSYour Name 
462*5113495bSYour Name 			Field only valid when 'Reo_push_reason' set to
463*5113495bSYour Name 			'reo_error_detected'.
464*5113495bSYour Name 
465*5113495bSYour Name 
466*5113495bSYour Name 
467*5113495bSYour Name 			<enum 0 reo_queue_desc_addr_zero> Reo queue descriptor
468*5113495bSYour Name 			provided in the REO_ENTRANCE ring is set to 0
469*5113495bSYour Name 
470*5113495bSYour Name 			<enum 1 reo_queue_desc_not_valid> Reo queue descriptor
471*5113495bSYour Name 			valid bit is NOT set
472*5113495bSYour Name 
473*5113495bSYour Name 			<enum 2 ampdu_in_non_ba> AMPDU frame received without BA
474*5113495bSYour Name 			session having been setup.
475*5113495bSYour Name 
476*5113495bSYour Name 			<enum 3 non_ba_duplicate> Non-BA session, SN equal to
477*5113495bSYour Name 			SSN, Retry bit set: duplicate frame
478*5113495bSYour Name 
479*5113495bSYour Name 			<enum 4 ba_duplicate> BA session, duplicate frame
480*5113495bSYour Name 
481*5113495bSYour Name 			<enum 5 regular_frame_2k_jump> A normal (management/data
482*5113495bSYour Name 			frame) received with 2K jump in SN
483*5113495bSYour Name 
484*5113495bSYour Name 			<enum 6 bar_frame_2k_jump> A bar received with 2K jump
485*5113495bSYour Name 			in SSN
486*5113495bSYour Name 
487*5113495bSYour Name 			<enum 7 regular_frame_OOR> A normal (management/data
488*5113495bSYour Name 			frame) received with SN falling within the OOR window
489*5113495bSYour Name 
490*5113495bSYour Name 			<enum 8 bar_frame_OOR> A bar received with SSN falling
491*5113495bSYour Name 			within the OOR window
492*5113495bSYour Name 
493*5113495bSYour Name 			<enum 9 bar_frame_no_ba_session> A bar received without
494*5113495bSYour Name 			a BA session
495*5113495bSYour Name 
496*5113495bSYour Name 			<enum 10 bar_frame_sn_equals_ssn> A bar received with
497*5113495bSYour Name 			SSN equal to SN
498*5113495bSYour Name 
499*5113495bSYour Name 			<enum 11 pn_check_failed> PN Check Failed packet.
500*5113495bSYour Name 
501*5113495bSYour Name 			<enum 12 2k_error_handling_flag_set> Frame is forwarded
502*5113495bSYour Name 			as a result of the 'Seq_2k_error_detected_flag' been set in
503*5113495bSYour Name 			the REO Queue descriptor
504*5113495bSYour Name 
505*5113495bSYour Name 			<enum 13 pn_error_handling_flag_set> Frame is forwarded
506*5113495bSYour Name 			as a result of the 'pn_error_detected_flag' been set in the
507*5113495bSYour Name 			REO Queue descriptor
508*5113495bSYour Name 
509*5113495bSYour Name 			<enum 14 queue_descriptor_blocked_set> Frame is
510*5113495bSYour Name 			forwarded as a result of the queue descriptor(address) being
511*5113495bSYour Name 			blocked as SW/FW seems to be currently in the process of
512*5113495bSYour Name 			making updates to this descriptor...
513*5113495bSYour Name 
514*5113495bSYour Name 
515*5113495bSYour Name 
516*5113495bSYour Name 			<legal 0-14>
517*5113495bSYour Name */
518*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_ERROR_CODE_OFFSET                 0x0000001c
519*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_ERROR_CODE_LSB                    11
520*5113495bSYour Name #define REO_DESTINATION_RING_7_REO_ERROR_CODE_MASK                   0x0000f800
521*5113495bSYour Name 
522*5113495bSYour Name /* Description		REO_DESTINATION_RING_7_RECEIVE_QUEUE_NUMBER
523*5113495bSYour Name 
524*5113495bSYour Name 			This field indicates the REO MPDU reorder queue ID from
525*5113495bSYour Name 			which this frame originated. This field is populated from a
526*5113495bSYour Name 			field with the same name in the RX_REO_QUEUE descriptor.
527*5113495bSYour Name 
528*5113495bSYour Name 			<legal all>
529*5113495bSYour Name */
530*5113495bSYour Name #define REO_DESTINATION_RING_7_RECEIVE_QUEUE_NUMBER_OFFSET           0x0000001c
531*5113495bSYour Name #define REO_DESTINATION_RING_7_RECEIVE_QUEUE_NUMBER_LSB              16
532*5113495bSYour Name #define REO_DESTINATION_RING_7_RECEIVE_QUEUE_NUMBER_MASK             0xffff0000
533*5113495bSYour Name 
534*5113495bSYour Name /* Description		REO_DESTINATION_RING_8_SOFT_REORDER_INFO_VALID
535*5113495bSYour Name 
536*5113495bSYour Name 			When set, REO has been instructed to not perform the
537*5113495bSYour Name 			actual re-ordering of frames for this queue, but just to
538*5113495bSYour Name 			insert the reorder opcodes
539*5113495bSYour Name 
540*5113495bSYour Name 			<legal all>
541*5113495bSYour Name */
542*5113495bSYour Name #define REO_DESTINATION_RING_8_SOFT_REORDER_INFO_VALID_OFFSET        0x00000020
543*5113495bSYour Name #define REO_DESTINATION_RING_8_SOFT_REORDER_INFO_VALID_LSB           0
544*5113495bSYour Name #define REO_DESTINATION_RING_8_SOFT_REORDER_INFO_VALID_MASK          0x00000001
545*5113495bSYour Name 
546*5113495bSYour Name /* Description		REO_DESTINATION_RING_8_REORDER_OPCODE
547*5113495bSYour Name 
548*5113495bSYour Name 			Field is valid when 'Soft_reorder_info_valid' is set.
549*5113495bSYour Name 			This field is always valid for debug purpose as well.
550*5113495bSYour Name 
551*5113495bSYour Name 			Details are in the MLD.
552*5113495bSYour Name 
553*5113495bSYour Name 
554*5113495bSYour Name 
555*5113495bSYour Name 			<enum 0 invalid>
556*5113495bSYour Name 
557*5113495bSYour Name 			<enum 1 fwdcur_fwdbuf>
558*5113495bSYour Name 
559*5113495bSYour Name 			<enum 2 fwdbuf_fwdcur>
560*5113495bSYour Name 
561*5113495bSYour Name 			<enum 3 qcur>
562*5113495bSYour Name 
563*5113495bSYour Name 			<enum 4 fwdbuf_qcur>
564*5113495bSYour Name 
565*5113495bSYour Name 			<enum 5 fwdbuf_drop>
566*5113495bSYour Name 
567*5113495bSYour Name 			<enum 6 fwdall_drop>
568*5113495bSYour Name 
569*5113495bSYour Name 			<enum 7 fwdall_qcur>
570*5113495bSYour Name 
571*5113495bSYour Name 			<enum 8 reserved_reo_opcode_1>
572*5113495bSYour Name 
573*5113495bSYour Name 			<enum 9 dropcur>  the error reason code is in
574*5113495bSYour Name 			reo_error_code field.
575*5113495bSYour Name 
576*5113495bSYour Name 			<enum 10 reserved_reo_opcode_2>
577*5113495bSYour Name 
578*5113495bSYour Name 			<enum 11 reserved_reo_opcode_3>
579*5113495bSYour Name 
580*5113495bSYour Name 			<enum 12 reserved_reo_opcode_4>
581*5113495bSYour Name 
582*5113495bSYour Name 			<enum 13 reserved_reo_opcode_5>
583*5113495bSYour Name 
584*5113495bSYour Name 			<enum 14 reserved_reo_opcode_6>
585*5113495bSYour Name 
586*5113495bSYour Name 			<enum 15 reserved_reo_opcode_7>
587*5113495bSYour Name 
588*5113495bSYour Name 
589*5113495bSYour Name 
590*5113495bSYour Name 			<legal all>
591*5113495bSYour Name */
592*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_OPCODE_OFFSET                 0x00000020
593*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_OPCODE_LSB                    1
594*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_OPCODE_MASK                   0x0000001e
595*5113495bSYour Name 
596*5113495bSYour Name /* Description		REO_DESTINATION_RING_8_REORDER_SLOT_INDEX
597*5113495bSYour Name 
598*5113495bSYour Name 			Field only valid when 'Soft_reorder_info_valid' is set.
599*5113495bSYour Name 
600*5113495bSYour Name 
601*5113495bSYour Name 
602*5113495bSYour Name 			TODO: add description
603*5113495bSYour Name 
604*5113495bSYour Name 
605*5113495bSYour Name 
606*5113495bSYour Name 			<legal all>
607*5113495bSYour Name */
608*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_SLOT_INDEX_OFFSET             0x00000020
609*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_SLOT_INDEX_LSB                5
610*5113495bSYour Name #define REO_DESTINATION_RING_8_REORDER_SLOT_INDEX_MASK               0x00001fe0
611*5113495bSYour Name 
612*5113495bSYour Name /* Description		REO_DESTINATION_RING_8_RESERVED_8A
613*5113495bSYour Name 
614*5113495bSYour Name 			<legal 0>
615*5113495bSYour Name */
616*5113495bSYour Name #define REO_DESTINATION_RING_8_RESERVED_8A_OFFSET                    0x00000020
617*5113495bSYour Name #define REO_DESTINATION_RING_8_RESERVED_8A_LSB                       13
618*5113495bSYour Name #define REO_DESTINATION_RING_8_RESERVED_8A_MASK                      0xffffe000
619*5113495bSYour Name 
620*5113495bSYour Name /* Description		REO_DESTINATION_RING_9_RESERVED_9A
621*5113495bSYour Name 
622*5113495bSYour Name 			<legal 0>
623*5113495bSYour Name */
624*5113495bSYour Name #define REO_DESTINATION_RING_9_RESERVED_9A_OFFSET                    0x00000024
625*5113495bSYour Name #define REO_DESTINATION_RING_9_RESERVED_9A_LSB                       0
626*5113495bSYour Name #define REO_DESTINATION_RING_9_RESERVED_9A_MASK                      0xffffffff
627*5113495bSYour Name 
628*5113495bSYour Name /* Description		REO_DESTINATION_RING_10_RESERVED_10A
629*5113495bSYour Name 
630*5113495bSYour Name 			<legal 0>
631*5113495bSYour Name */
632*5113495bSYour Name #define REO_DESTINATION_RING_10_RESERVED_10A_OFFSET                  0x00000028
633*5113495bSYour Name #define REO_DESTINATION_RING_10_RESERVED_10A_LSB                     0
634*5113495bSYour Name #define REO_DESTINATION_RING_10_RESERVED_10A_MASK                    0xffffffff
635*5113495bSYour Name 
636*5113495bSYour Name /* Description		REO_DESTINATION_RING_11_RESERVED_11A
637*5113495bSYour Name 
638*5113495bSYour Name 			<legal 0>
639*5113495bSYour Name */
640*5113495bSYour Name #define REO_DESTINATION_RING_11_RESERVED_11A_OFFSET                  0x0000002c
641*5113495bSYour Name #define REO_DESTINATION_RING_11_RESERVED_11A_LSB                     0
642*5113495bSYour Name #define REO_DESTINATION_RING_11_RESERVED_11A_MASK                    0xffffffff
643*5113495bSYour Name 
644*5113495bSYour Name /* Description		REO_DESTINATION_RING_12_RESERVED_12A
645*5113495bSYour Name 
646*5113495bSYour Name 			<legal 0>
647*5113495bSYour Name */
648*5113495bSYour Name #define REO_DESTINATION_RING_12_RESERVED_12A_OFFSET                  0x00000030
649*5113495bSYour Name #define REO_DESTINATION_RING_12_RESERVED_12A_LSB                     0
650*5113495bSYour Name #define REO_DESTINATION_RING_12_RESERVED_12A_MASK                    0xffffffff
651*5113495bSYour Name 
652*5113495bSYour Name /* Description		REO_DESTINATION_RING_13_RESERVED_13A
653*5113495bSYour Name 
654*5113495bSYour Name 			<legal 0>
655*5113495bSYour Name */
656*5113495bSYour Name #define REO_DESTINATION_RING_13_RESERVED_13A_OFFSET                  0x00000034
657*5113495bSYour Name #define REO_DESTINATION_RING_13_RESERVED_13A_LSB                     0
658*5113495bSYour Name #define REO_DESTINATION_RING_13_RESERVED_13A_MASK                    0xffffffff
659*5113495bSYour Name 
660*5113495bSYour Name /* Description		REO_DESTINATION_RING_14_RESERVED_14A
661*5113495bSYour Name 
662*5113495bSYour Name 			<legal 0>
663*5113495bSYour Name */
664*5113495bSYour Name #define REO_DESTINATION_RING_14_RESERVED_14A_OFFSET                  0x00000038
665*5113495bSYour Name #define REO_DESTINATION_RING_14_RESERVED_14A_LSB                     0
666*5113495bSYour Name #define REO_DESTINATION_RING_14_RESERVED_14A_MASK                    0xffffffff
667*5113495bSYour Name 
668*5113495bSYour Name /* Description		REO_DESTINATION_RING_15_RESERVED_15
669*5113495bSYour Name 
670*5113495bSYour Name 			<legal 0>
671*5113495bSYour Name */
672*5113495bSYour Name #define REO_DESTINATION_RING_15_RESERVED_15_OFFSET                   0x0000003c
673*5113495bSYour Name #define REO_DESTINATION_RING_15_RESERVED_15_LSB                      0
674*5113495bSYour Name #define REO_DESTINATION_RING_15_RESERVED_15_MASK                     0x000fffff
675*5113495bSYour Name 
676*5113495bSYour Name /* Description		REO_DESTINATION_RING_15_RING_ID
677*5113495bSYour Name 
678*5113495bSYour Name 			The buffer pointer ring ID.
679*5113495bSYour Name 
680*5113495bSYour Name 			0 refers to the IDLE ring
681*5113495bSYour Name 
682*5113495bSYour Name 			1 - N refers to other rings
683*5113495bSYour Name 
684*5113495bSYour Name 
685*5113495bSYour Name 
686*5113495bSYour Name 			Helps with debugging when dumping ring contents.
687*5113495bSYour Name 
688*5113495bSYour Name 			<legal all>
689*5113495bSYour Name */
690*5113495bSYour Name #define REO_DESTINATION_RING_15_RING_ID_OFFSET                       0x0000003c
691*5113495bSYour Name #define REO_DESTINATION_RING_15_RING_ID_LSB                          20
692*5113495bSYour Name #define REO_DESTINATION_RING_15_RING_ID_MASK                         0x0ff00000
693*5113495bSYour Name 
694*5113495bSYour Name /* Description		REO_DESTINATION_RING_15_LOOPING_COUNT
695*5113495bSYour Name 
696*5113495bSYour Name 			A count value that indicates the number of times the
697*5113495bSYour Name 			producer of entries into this Ring has looped around the
698*5113495bSYour Name 			ring.
699*5113495bSYour Name 
700*5113495bSYour Name 			At initialization time, this value is set to 0. On the
701*5113495bSYour Name 			first loop, this value is set to 1. After the max value is
702*5113495bSYour Name 			reached allowed by the number of bits for this field, the
703*5113495bSYour Name 			count value continues with 0 again.
704*5113495bSYour Name 
705*5113495bSYour Name 			In case SW is the consumer of the ring entries, it can
706*5113495bSYour Name 			use this field to figure out up to where the producer of
707*5113495bSYour Name 			entries has created new entries. This eliminates the need to
708*5113495bSYour Name 			check where the head pointer' of the ring is located once
709*5113495bSYour Name 			the SW starts processing an interrupt indicating that new
710*5113495bSYour Name 			entries have been put into this ring...
711*5113495bSYour Name 
712*5113495bSYour Name 
713*5113495bSYour Name 
714*5113495bSYour Name 			Also note that SW if it wants only needs to look at the
715*5113495bSYour Name 			LSB bit of this count value.
716*5113495bSYour Name 
717*5113495bSYour Name 			<legal all>
718*5113495bSYour Name */
719*5113495bSYour Name #define REO_DESTINATION_RING_15_LOOPING_COUNT_OFFSET                 0x0000003c
720*5113495bSYour Name #define REO_DESTINATION_RING_15_LOOPING_COUNT_LSB                    28
721*5113495bSYour Name #define REO_DESTINATION_RING_15_LOOPING_COUNT_MASK                   0xf0000000
722*5113495bSYour Name 
723*5113495bSYour Name 
724*5113495bSYour Name #endif // _REO_DESTINATION_RING_H_
725