xref: /wlan-driver/fw-api/hw/qca9574/rxpt_classify_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 // $ATH_LICENSE_HW_HDR_C$
18 //
19 // DO NOT EDIT!  This file is automatically generated
20 //               These definitions are tied to a particular hardware layout
21 
22 
23 #ifndef _RXPT_CLASSIFY_INFO_H_
24 #define _RXPT_CLASSIFY_INFO_H_
25 #if !defined(__ASSEMBLER__)
26 #endif
27 
28 
29 // ################ START SUMMARY #################
30 //
31 //	Dword	Fields
32 //	0	reo_destination_indication[4:0], reserved_0a[6:5], use_flow_id_toeplitz_clfy[7], pkt_selection_fp_ucast_data[8], pkt_selection_fp_mcast_data[9], pkt_selection_fp_1000[10], rxdma0_source_ring_selection[12:11], rxdma0_destination_ring_selection[14:13], reserved_0b[31:15]
33 //
34 // ################ END SUMMARY #################
35 
36 #define NUM_OF_DWORDS_RXPT_CLASSIFY_INFO 1
37 
38 struct rxpt_classify_info {
39              uint32_t reo_destination_indication      :  5, //[4:0]
40                       reserved_0a                     :  2, //[6:5]
41                       use_flow_id_toeplitz_clfy       :  1, //[7]
42                       pkt_selection_fp_ucast_data     :  1, //[8]
43                       pkt_selection_fp_mcast_data     :  1, //[9]
44                       pkt_selection_fp_1000           :  1, //[10]
45                       rxdma0_source_ring_selection    :  2, //[12:11]
46                       rxdma0_destination_ring_selection:  2, //[14:13]
47                       reserved_0b                     : 17; //[31:15]
48 };
49 
50 /*
51 
52 reo_destination_indication
53 
54 			The ID of the REO exit ring where the MSDU frame shall
55 			push after (MPDU level) reordering has finished.
56 
57 
58 
59 			<enum 0 reo_destination_tcl> Reo will push the frame
60 			into the REO2TCL ring
61 
62 			<enum 1 reo_destination_sw1> Reo will push the frame
63 			into the REO2SW1 ring
64 
65 			<enum 2 reo_destination_sw2> Reo will push the frame
66 			into the REO2SW1 ring
67 
68 			<enum 3 reo_destination_sw3> Reo will push the frame
69 			into the REO2SW1 ring
70 
71 			<enum 4 reo_destination_sw4> Reo will push the frame
72 			into the REO2SW1 ring
73 
74 			<enum 5 reo_destination_release> Reo will push the frame
75 			into the REO_release ring
76 
77 			<enum 6 reo_destination_fw> Reo will push the frame into
78 			the REO2FW ring
79 
80 			<enum 7 reo_destination_7> REO remaps this
81 
82 			<enum 8 reo_destination_8> REO remaps this <enum 9
83 			reo_destination_9> REO remaps this <enum 10
84 			reo_destination_10> REO remaps this
85 
86 			<enum 11 reo_destination_11> REO remaps this
87 
88 			<enum 12 reo_destination_12> REO remaps this <enum 13
89 			reo_destination_13> REO remaps this
90 
91 			<enum 14 reo_destination_14> REO remaps this
92 
93 			<enum 15 reo_destination_15> REO remaps this
94 
95 			<enum 16 reo_destination_16> REO remaps this
96 
97 			<enum 17 reo_destination_17> REO remaps this
98 
99 			<enum 18 reo_destination_18> REO remaps this
100 
101 			<enum 19 reo_destination_19> REO remaps this
102 
103 			<enum 20 reo_destination_20> REO remaps this
104 
105 			<enum 21 reo_destination_21> REO remaps this
106 
107 			<enum 22 reo_destination_22> REO remaps this
108 
109 			<enum 23 reo_destination_23> REO remaps this
110 
111 			<enum 24 reo_destination_24> REO remaps this
112 
113 			<enum 25 reo_destination_25> REO remaps this
114 
115 			<enum 26 reo_destination_26> REO remaps this
116 
117 			<enum 27 reo_destination_27> REO remaps this
118 
119 			<enum 28 reo_destination_28> REO remaps this
120 
121 			<enum 29 reo_destination_29> REO remaps this
122 
123 			<enum 30 reo_destination_30> REO remaps this
124 
125 			<enum 31 reo_destination_31> REO remaps this
126 
127 
128 
129 			<legal all>
130 
131 reserved_0a
132 
133 			<legal 0>
134 
135 use_flow_id_toeplitz_clfy
136 
137 			Field is used to enable classification based on the
138 			chosen Toeplitz hash from Common Parser (without reference
139 			to each hash type).
140 
141 			<legal all>
142 
143 pkt_selection_fp_ucast_data
144 
145 			Filter pass ucast data frame routing selection.
146 
147 
148 
149 			1'b0: source and destination rings are selected from the
150 			RxOLE register settings for the packet type
151 
152 
153 
154 			1'b1: source ring and destination ring is selected from
155 			the rxdma0_source_ring_selection and
156 			rxdma0_destination_ring_selection fields in this STRUCT
157 
158 			<legal all>
159 
160 pkt_selection_fp_mcast_data
161 
162 			Filter pass multicase data frame routing selection.
163 
164 
165 
166 			1'b0: source and destination rings are selected from the
167 			RxOLE register settings for the packet type
168 
169 
170 
171 			1'b1: source ring and destination ring is selected from
172 			the rxdma0_source_ring_selection and
173 			rxdma0_destination_ring_selection fields in this STRUCT
174 
175 			<legal all>
176 
177 pkt_selection_fp_1000
178 
179 			Filter pass control bar frame routing selection.
180 
181 
182 
183 			1'b0: source and destination rings are selected from the
184 			RxOLE register settings for the packet type
185 
186 
187 
188 			1'b1: source ring and destination ring is selected from
189 			the rxdma0_source_ring_selection and
190 			rxdma0_destination_ring_selection fields in this STRUCT
191 
192 			<legal all>
193 
194 rxdma0_source_ring_selection
195 
196 			Field only valid when for the received frame type the
197 			corresponding pkt_selection_fp_... bit is set
198 
199 
200 
201 			<enum 0 wbm2rxdma_buf_source_ring> The data buffer for
202 			this frame shall be sourced by wbm2rxdma buffer source ring
203 
204 			<enum 1 fw2rxdma_buf_source_ring> The data buffer for
205 			this frame shall be sourced by fw2rxdma buffer source ring
206 
207 			<enum 2 sw2rxdma_buf_source_ring> The data buffer for
208 			this frame shall be sourced by sw2rxdma buffer source ring
209 
210 			<enum 3 no_buffer_ring> The frame shall not be written
211 			to any data buffer
212 
213 			<legal all>
214 
215 rxdma0_destination_ring_selection
216 
217 			Field only valid when for the received frame type the
218 			corresponding pkt_selection_fp_... bit is set
219 
220 
221 
222 			<enum 0  rxdma_release_ring >  RXDMA0 shall push the
223 			frame to the Release ring. Effectively this means the frame
224 			needs to be dropped.
225 
226 
227 
228 			<enum 1  rxdma2fw_ring >  RXDMA0 shall push the frame to
229 			the FW ring
230 
231 
232 
233 			<enum 2  rxdma2sw_ring >  RXDMA0 shall push the frame to
234 			the SW ring
235 
236 
237 
238 			<enum 3  rxdma2reo_ring >  RXDMA0 shall push the frame
239 			to the REO entrance ring
240 
241 			<legal all>
242 
243 reserved_0b
244 
245 			<legal 0>
246 */
247 
248 
249 /* Description		RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION
250 
251 			The ID of the REO exit ring where the MSDU frame shall
252 			push after (MPDU level) reordering has finished.
253 
254 
255 
256 			<enum 0 reo_destination_tcl> Reo will push the frame
257 			into the REO2TCL ring
258 
259 			<enum 1 reo_destination_sw1> Reo will push the frame
260 			into the REO2SW1 ring
261 
262 			<enum 2 reo_destination_sw2> Reo will push the frame
263 			into the REO2SW1 ring
264 
265 			<enum 3 reo_destination_sw3> Reo will push the frame
266 			into the REO2SW1 ring
267 
268 			<enum 4 reo_destination_sw4> Reo will push the frame
269 			into the REO2SW1 ring
270 
271 			<enum 5 reo_destination_release> Reo will push the frame
272 			into the REO_release ring
273 
274 			<enum 6 reo_destination_fw> Reo will push the frame into
275 			the REO2FW ring
276 
277 			<enum 7 reo_destination_7> REO remaps this
278 
279 			<enum 8 reo_destination_8> REO remaps this <enum 9
280 			reo_destination_9> REO remaps this <enum 10
281 			reo_destination_10> REO remaps this
282 
283 			<enum 11 reo_destination_11> REO remaps this
284 
285 			<enum 12 reo_destination_12> REO remaps this <enum 13
286 			reo_destination_13> REO remaps this
287 
288 			<enum 14 reo_destination_14> REO remaps this
289 
290 			<enum 15 reo_destination_15> REO remaps this
291 
292 			<enum 16 reo_destination_16> REO remaps this
293 
294 			<enum 17 reo_destination_17> REO remaps this
295 
296 			<enum 18 reo_destination_18> REO remaps this
297 
298 			<enum 19 reo_destination_19> REO remaps this
299 
300 			<enum 20 reo_destination_20> REO remaps this
301 
302 			<enum 21 reo_destination_21> REO remaps this
303 
304 			<enum 22 reo_destination_22> REO remaps this
305 
306 			<enum 23 reo_destination_23> REO remaps this
307 
308 			<enum 24 reo_destination_24> REO remaps this
309 
310 			<enum 25 reo_destination_25> REO remaps this
311 
312 			<enum 26 reo_destination_26> REO remaps this
313 
314 			<enum 27 reo_destination_27> REO remaps this
315 
316 			<enum 28 reo_destination_28> REO remaps this
317 
318 			<enum 29 reo_destination_29> REO remaps this
319 
320 			<enum 30 reo_destination_30> REO remaps this
321 
322 			<enum 31 reo_destination_31> REO remaps this
323 
324 
325 
326 			<legal all>
327 */
328 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_OFFSET       0x00000000
329 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_LSB          0
330 #define RXPT_CLASSIFY_INFO_0_REO_DESTINATION_INDICATION_MASK         0x0000001f
331 
332 /* Description		RXPT_CLASSIFY_INFO_0_RESERVED_0A
333 
334 			<legal 0>
335 */
336 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_OFFSET                      0x00000000
337 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_LSB                         5
338 #define RXPT_CLASSIFY_INFO_0_RESERVED_0A_MASK                        0x00000060
339 
340 /* Description		RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY
341 
342 			Field is used to enable classification based on the
343 			chosen Toeplitz hash from Common Parser (without reference
344 			to each hash type).
345 
346 			<legal all>
347 */
348 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_OFFSET        0x00000000
349 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_LSB           7
350 #define RXPT_CLASSIFY_INFO_0_USE_FLOW_ID_TOEPLITZ_CLFY_MASK          0x00000080
351 
352 /* Description		RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA
353 
354 			Filter pass ucast data frame routing selection.
355 
356 
357 
358 			1'b0: source and destination rings are selected from the
359 			RxOLE register settings for the packet type
360 
361 
362 
363 			1'b1: source ring and destination ring is selected from
364 			the rxdma0_source_ring_selection and
365 			rxdma0_destination_ring_selection fields in this STRUCT
366 
367 			<legal all>
368 */
369 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_OFFSET      0x00000000
370 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_LSB         8
371 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_UCAST_DATA_MASK        0x00000100
372 
373 /* Description		RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA
374 
375 			Filter pass multicase data frame routing selection.
376 
377 
378 
379 			1'b0: source and destination rings are selected from the
380 			RxOLE register settings for the packet type
381 
382 
383 
384 			1'b1: source ring and destination ring is selected from
385 			the rxdma0_source_ring_selection and
386 			rxdma0_destination_ring_selection fields in this STRUCT
387 
388 			<legal all>
389 */
390 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_OFFSET      0x00000000
391 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_LSB         9
392 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_MCAST_DATA_MASK        0x00000200
393 
394 /* Description		RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000
395 
396 			Filter pass control bar frame routing selection.
397 
398 
399 
400 			1'b0: source and destination rings are selected from the
401 			RxOLE register settings for the packet type
402 
403 
404 
405 			1'b1: source ring and destination ring is selected from
406 			the rxdma0_source_ring_selection and
407 			rxdma0_destination_ring_selection fields in this STRUCT
408 
409 			<legal all>
410 */
411 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_OFFSET            0x00000000
412 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_LSB               10
413 #define RXPT_CLASSIFY_INFO_0_PKT_SELECTION_FP_1000_MASK              0x00000400
414 
415 /* Description		RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION
416 
417 			Field only valid when for the received frame type the
418 			corresponding pkt_selection_fp_... bit is set
419 
420 
421 
422 			<enum 0 wbm2rxdma_buf_source_ring> The data buffer for
423 			this frame shall be sourced by wbm2rxdma buffer source ring
424 
425 			<enum 1 fw2rxdma_buf_source_ring> The data buffer for
426 			this frame shall be sourced by fw2rxdma buffer source ring
427 
428 			<enum 2 sw2rxdma_buf_source_ring> The data buffer for
429 			this frame shall be sourced by sw2rxdma buffer source ring
430 
431 			<enum 3 no_buffer_ring> The frame shall not be written
432 			to any data buffer
433 
434 			<legal all>
435 */
436 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_OFFSET     0x00000000
437 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_LSB        11
438 #define RXPT_CLASSIFY_INFO_0_RXDMA0_SOURCE_RING_SELECTION_MASK       0x00001800
439 
440 /* Description		RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION
441 
442 			Field only valid when for the received frame type the
443 			corresponding pkt_selection_fp_... bit is set
444 
445 
446 
447 			<enum 0  rxdma_release_ring >  RXDMA0 shall push the
448 			frame to the Release ring. Effectively this means the frame
449 			needs to be dropped.
450 
451 
452 
453 			<enum 1  rxdma2fw_ring >  RXDMA0 shall push the frame to
454 			the FW ring
455 
456 
457 
458 			<enum 2  rxdma2sw_ring >  RXDMA0 shall push the frame to
459 			the SW ring
460 
461 
462 
463 			<enum 3  rxdma2reo_ring >  RXDMA0 shall push the frame
464 			to the REO entrance ring
465 
466 			<legal all>
467 */
468 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_OFFSET 0x00000000
469 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_LSB   13
470 #define RXPT_CLASSIFY_INFO_0_RXDMA0_DESTINATION_RING_SELECTION_MASK  0x00006000
471 
472 /* Description		RXPT_CLASSIFY_INFO_0_RESERVED_0B
473 
474 			<legal 0>
475 */
476 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_OFFSET                      0x00000000
477 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_LSB                         15
478 #define RXPT_CLASSIFY_INFO_0_RESERVED_0B_MASK                        0xffff8000
479 
480 
481 #endif // _RXPT_CLASSIFY_INFO_H_
482