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