xref: /wlan-driver/fw-api/hw/qca6290/11ax/v1/reo_get_queue_stats.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _REO_GET_QUEUE_STATS_H_
20 #define _REO_GET_QUEUE_STATS_H_
21 #if !defined(__ASSEMBLER__)
22 #endif
23 
24 #include "uniform_reo_cmd_header.h"
25 
26 // ################ START SUMMARY #################
27 //
28 //	Dword	Fields
29 //	0	struct uniform_reo_cmd_header cmd_header;
30 //	1	rx_reo_queue_desc_addr_31_0[31:0]
31 //	2	rx_reo_queue_desc_addr_39_32[7:0], clear_stats[8], reserved_2a[31:9]
32 //	3	reserved_3a[31:0]
33 //	4	reserved_4a[31:0]
34 //	5	reserved_5a[31:0]
35 //	6	reserved_6a[31:0]
36 //	7	reserved_7a[31:0]
37 //	8	reserved_8a[31:0]
38 //
39 // ################ END SUMMARY #################
40 
41 #define NUM_OF_DWORDS_REO_GET_QUEUE_STATS 9
42 
43 struct reo_get_queue_stats {
44     struct            uniform_reo_cmd_header                       cmd_header;
45              uint32_t rx_reo_queue_desc_addr_31_0     : 32; //[31:0]
46              uint32_t rx_reo_queue_desc_addr_39_32    :  8, //[7:0]
47                       clear_stats                     :  1, //[8]
48                       reserved_2a                     : 23; //[31:9]
49              uint32_t reserved_3a                     : 32; //[31:0]
50              uint32_t reserved_4a                     : 32; //[31:0]
51              uint32_t reserved_5a                     : 32; //[31:0]
52              uint32_t reserved_6a                     : 32; //[31:0]
53              uint32_t reserved_7a                     : 32; //[31:0]
54              uint32_t reserved_8a                     : 32; //[31:0]
55 };
56 
57 /*
58 
59 struct uniform_reo_cmd_header cmd_header
60 
61 			Consumer: REO
62 
63 			Producer: SW
64 
65 
66 
67 			Details for command execution tracking purposes.
68 
69 rx_reo_queue_desc_addr_31_0
70 
71 			Consumer: REO
72 
73 			Producer: SW
74 
75 
76 
77 			Address (lower 32 bits) of the REO queue descriptor
78 
79 			<legal all>
80 
81 rx_reo_queue_desc_addr_39_32
82 
83 			Consumer: REO
84 
85 			Producer: SW
86 
87 
88 
89 			Address (upper 8 bits) of the REO queue descriptor
90 
91 			<legal all>
92 
93 clear_stats
94 
95 			Clear stat settings....
96 
97 
98 
99 			<enum 0 no_clear> Do NOT clear the stats after
100 			generating the status
101 
102 			<enum 1 clear_the_stats> Clear the stats after
103 			generating the status.
104 
105 
106 
107 			The stats actually cleared are:
108 
109 			Timeout_count
110 
111 			Forward_due_to_bar_count
112 
113 			Duplicate_count
114 
115 			Frames_in_order_count
116 
117 			BAR_received_count
118 
119 			MPDU_Frames_processed_count
120 
121 			MSDU_Frames_processed_count
122 
123 			Total_processed_byte_count
124 
125 			Late_receive_MPDU_count
126 
127 			window_jump_2k
128 
129 			Hole_count
130 
131 			<legal 0-1>
132 
133 reserved_2a
134 
135 			<legal 0>
136 
137 reserved_3a
138 
139 			<legal 0>
140 
141 reserved_4a
142 
143 			<legal 0>
144 
145 reserved_5a
146 
147 			<legal 0>
148 
149 reserved_6a
150 
151 			<legal 0>
152 
153 reserved_7a
154 
155 			<legal 0>
156 
157 reserved_8a
158 
159 			<legal 0>
160 */
161 
162 #define REO_GET_QUEUE_STATS_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_OFFSET 0x00000000
163 #define REO_GET_QUEUE_STATS_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_LSB  0
164 #define REO_GET_QUEUE_STATS_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_MASK 0xffffffff
165 
166 /* Description		REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0
167 
168 			Consumer: REO
169 
170 			Producer: SW
171 
172 
173 
174 			Address (lower 32 bits) of the REO queue descriptor
175 
176 			<legal all>
177 */
178 #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_OFFSET     0x00000004
179 #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_LSB        0
180 #define REO_GET_QUEUE_STATS_1_RX_REO_QUEUE_DESC_ADDR_31_0_MASK       0xffffffff
181 
182 /* Description		REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32
183 
184 			Consumer: REO
185 
186 			Producer: SW
187 
188 
189 
190 			Address (upper 8 bits) of the REO queue descriptor
191 
192 			<legal all>
193 */
194 #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_OFFSET    0x00000008
195 #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_LSB       0
196 #define REO_GET_QUEUE_STATS_2_RX_REO_QUEUE_DESC_ADDR_39_32_MASK      0x000000ff
197 
198 /* Description		REO_GET_QUEUE_STATS_2_CLEAR_STATS
199 
200 			Clear stat settings....
201 
202 
203 
204 			<enum 0 no_clear> Do NOT clear the stats after
205 			generating the status
206 
207 			<enum 1 clear_the_stats> Clear the stats after
208 			generating the status.
209 
210 
211 
212 			The stats actually cleared are:
213 
214 			Timeout_count
215 
216 			Forward_due_to_bar_count
217 
218 			Duplicate_count
219 
220 			Frames_in_order_count
221 
222 			BAR_received_count
223 
224 			MPDU_Frames_processed_count
225 
226 			MSDU_Frames_processed_count
227 
228 			Total_processed_byte_count
229 
230 			Late_receive_MPDU_count
231 
232 			window_jump_2k
233 
234 			Hole_count
235 
236 			<legal 0-1>
237 */
238 #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_OFFSET                     0x00000008
239 #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_LSB                        8
240 #define REO_GET_QUEUE_STATS_2_CLEAR_STATS_MASK                       0x00000100
241 
242 /* Description		REO_GET_QUEUE_STATS_2_RESERVED_2A
243 
244 			<legal 0>
245 */
246 #define REO_GET_QUEUE_STATS_2_RESERVED_2A_OFFSET                     0x00000008
247 #define REO_GET_QUEUE_STATS_2_RESERVED_2A_LSB                        9
248 #define REO_GET_QUEUE_STATS_2_RESERVED_2A_MASK                       0xfffffe00
249 
250 /* Description		REO_GET_QUEUE_STATS_3_RESERVED_3A
251 
252 			<legal 0>
253 */
254 #define REO_GET_QUEUE_STATS_3_RESERVED_3A_OFFSET                     0x0000000c
255 #define REO_GET_QUEUE_STATS_3_RESERVED_3A_LSB                        0
256 #define REO_GET_QUEUE_STATS_3_RESERVED_3A_MASK                       0xffffffff
257 
258 /* Description		REO_GET_QUEUE_STATS_4_RESERVED_4A
259 
260 			<legal 0>
261 */
262 #define REO_GET_QUEUE_STATS_4_RESERVED_4A_OFFSET                     0x00000010
263 #define REO_GET_QUEUE_STATS_4_RESERVED_4A_LSB                        0
264 #define REO_GET_QUEUE_STATS_4_RESERVED_4A_MASK                       0xffffffff
265 
266 /* Description		REO_GET_QUEUE_STATS_5_RESERVED_5A
267 
268 			<legal 0>
269 */
270 #define REO_GET_QUEUE_STATS_5_RESERVED_5A_OFFSET                     0x00000014
271 #define REO_GET_QUEUE_STATS_5_RESERVED_5A_LSB                        0
272 #define REO_GET_QUEUE_STATS_5_RESERVED_5A_MASK                       0xffffffff
273 
274 /* Description		REO_GET_QUEUE_STATS_6_RESERVED_6A
275 
276 			<legal 0>
277 */
278 #define REO_GET_QUEUE_STATS_6_RESERVED_6A_OFFSET                     0x00000018
279 #define REO_GET_QUEUE_STATS_6_RESERVED_6A_LSB                        0
280 #define REO_GET_QUEUE_STATS_6_RESERVED_6A_MASK                       0xffffffff
281 
282 /* Description		REO_GET_QUEUE_STATS_7_RESERVED_7A
283 
284 			<legal 0>
285 */
286 #define REO_GET_QUEUE_STATS_7_RESERVED_7A_OFFSET                     0x0000001c
287 #define REO_GET_QUEUE_STATS_7_RESERVED_7A_LSB                        0
288 #define REO_GET_QUEUE_STATS_7_RESERVED_7A_MASK                       0xffffffff
289 
290 /* Description		REO_GET_QUEUE_STATS_8_RESERVED_8A
291 
292 			<legal 0>
293 */
294 #define REO_GET_QUEUE_STATS_8_RESERVED_8A_OFFSET                     0x00000020
295 #define REO_GET_QUEUE_STATS_8_RESERVED_8A_LSB                        0
296 #define REO_GET_QUEUE_STATS_8_RESERVED_8A_MASK                       0xffffffff
297 
298 
299 #endif // _REO_GET_QUEUE_STATS_H_
300