xref: /wlan-driver/fw-api/hw/qca6490/v1/rx_mpdu_desc_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2019 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 //
20 // DO NOT EDIT!  This file is automatically generated
21 //               These definitions are tied to a particular hardware layout
22 
23 
24 #ifndef _RX_MPDU_DESC_INFO_H_
25 #define _RX_MPDU_DESC_INFO_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 
30 // ################ START SUMMARY #################
31 //
32 //	Dword	Fields
33 //	0	msdu_count[7:0], mpdu_sequence_number[19:8], fragment_flag[20], mpdu_retry_bit[21], ampdu_flag[22], bar_frame[23], pn_fields_contain_valid_info[24], sa_is_valid[25], sa_idx_timeout[26], da_is_valid[27], da_is_mcbc[28], da_idx_timeout[29], raw_mpdu[30], more_fragment_flag[31]
34 //	1	peer_meta_data[31:0]
35 //
36 // ################ END SUMMARY #################
37 
38 #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2
39 
40 struct rx_mpdu_desc_info {
41              uint32_t msdu_count                      :  8, //[7:0]
42                       mpdu_sequence_number            : 12, //[19:8]
43                       fragment_flag                   :  1, //[20]
44                       mpdu_retry_bit                  :  1, //[21]
45                       ampdu_flag                      :  1, //[22]
46                       bar_frame                       :  1, //[23]
47                       pn_fields_contain_valid_info    :  1, //[24]
48                       sa_is_valid                     :  1, //[25]
49                       sa_idx_timeout                  :  1, //[26]
50                       da_is_valid                     :  1, //[27]
51                       da_is_mcbc                      :  1, //[28]
52                       da_idx_timeout                  :  1, //[29]
53                       raw_mpdu                        :  1, //[30]
54                       more_fragment_flag              :  1; //[31]
55              uint32_t peer_meta_data                  : 32; //[31:0]
56 };
57 
58 /*
59 
60 msdu_count
61 
62 			Consumer: REO/SW/FW
63 
64 			Producer: RXDMA
65 
66 
67 
68 			The number of MSDUs within the MPDU
69 
70 			<legal all>
71 
72 mpdu_sequence_number
73 
74 			Consumer: REO/SW/FW
75 
76 			Producer: RXDMA
77 
78 
79 
80 			The field can have two different meanings based on the
81 			setting of field 'BAR_frame':
82 
83 
84 
85 			'BAR_frame' is NOT set:
86 
87 			The MPDU sequence number of the received frame.
88 
89 
90 
91 			'BAR_frame' is set.
92 
93 			The MPDU Start sequence number from the BAR frame
94 
95 			<legal all>
96 
97 fragment_flag
98 
99 			Consumer: REO/SW/FW
100 
101 			Producer: RXDMA
102 
103 
104 
105 			When set, this MPDU is a fragment and REO should forward
106 			this fragment MPDU to the REO destination ring without any
107 			reorder checks, pn checks or bitmap update. This implies
108 			that REO is forwarding the pointer to the MSDU link
109 			descriptor. The destination ring is coming from a
110 			programmable register setting in REO
111 
112 
113 
114 			<legal all>
115 
116 mpdu_retry_bit
117 
118 			Consumer: REO/SW/FW
119 
120 			Producer: RXDMA
121 
122 
123 
124 			The retry bit setting from the MPDU header of the
125 			received frame
126 
127 			<legal all>
128 
129 ampdu_flag
130 
131 			Consumer: REO/SW/FW
132 
133 			Producer: RXDMA
134 
135 
136 
137 			When set, the MPDU was received as part of an A-MPDU.
138 
139 			<legal all>
140 
141 bar_frame
142 
143 			Consumer: REO/SW/FW
144 
145 			Producer: RXDMA
146 
147 
148 
149 			When set, the received frame is a BAR frame. After
150 			processing, this frame shall be pushed to SW or deleted.
151 
152 			<legal all>
153 
154 pn_fields_contain_valid_info
155 
156 			Consumer: REO/SW/FW
157 
158 			Producer: RXDMA
159 
160 
161 
162 			Copied here by RXDMA from RX_MPDU_END
163 
164 			When not set, REO will Not perform a PN sequence number
165 			check
166 
167 sa_is_valid
168 
169 			When set, OLE found a valid SA entry for all MSDUs in
170 			this MPDU
171 
172 			<legal all>
173 
174 sa_idx_timeout
175 
176 			When set, at least 1 MSDU within the MPDU has an
177 			unsuccessful MAC source address search due to the expiration
178 			of the search timer.
179 
180 			<legal all>
181 
182 da_is_valid
183 
184 			When set, OLE found a valid DA entry for all MSDUs in
185 			this MPDU
186 
187 			<legal all>
188 
189 da_is_mcbc
190 
191 			Field Only valid if da_is_valid is set
192 
193 
194 
195 			When set, at least one of the DA addresses is a
196 			Multicast or Broadcast address.
197 
198 			<legal all>
199 
200 da_idx_timeout
201 
202 			When set, at least 1 MSDU within the MPDU has an
203 			unsuccessful MAC destination address search due to the
204 			expiration of the search timer.
205 
206 			<legal all>
207 
208 raw_mpdu
209 
210 			Field only valid when first_msdu_in_mpdu_flag is set.
211 
212 
213 
214 			When set, the contents in the MSDU buffer contains a
215 			'RAW' MPDU. This 'RAW' MPDU might be spread out over
216 			multiple MSDU buffers.
217 
218 			<legal all>
219 
220 more_fragment_flag
221 
222 			The More Fragment bit setting from the MPDU header of
223 			the received frame
224 
225 
226 
227 			<legal all>
228 
229 peer_meta_data
230 
231 			Meta data that SW has programmed in the Peer table entry
232 			of the transmitting STA.
233 
234 			<legal all>
235 */
236 
237 
238 /* Description		RX_MPDU_DESC_INFO_0_MSDU_COUNT
239 
240 			Consumer: REO/SW/FW
241 
242 			Producer: RXDMA
243 
244 
245 
246 			The number of MSDUs within the MPDU
247 
248 			<legal all>
249 */
250 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET                        0x00000000
251 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB                           0
252 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK                          0x000000ff
253 
254 /* Description		RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER
255 
256 			Consumer: REO/SW/FW
257 
258 			Producer: RXDMA
259 
260 
261 
262 			The field can have two different meanings based on the
263 			setting of field 'BAR_frame':
264 
265 
266 
267 			'BAR_frame' is NOT set:
268 
269 			The MPDU sequence number of the received frame.
270 
271 
272 
273 			'BAR_frame' is set.
274 
275 			The MPDU Start sequence number from the BAR frame
276 
277 			<legal all>
278 */
279 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET              0x00000000
280 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB                 8
281 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK                0x000fff00
282 
283 /* Description		RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG
284 
285 			Consumer: REO/SW/FW
286 
287 			Producer: RXDMA
288 
289 
290 
291 			When set, this MPDU is a fragment and REO should forward
292 			this fragment MPDU to the REO destination ring without any
293 			reorder checks, pn checks or bitmap update. This implies
294 			that REO is forwarding the pointer to the MSDU link
295 			descriptor. The destination ring is coming from a
296 			programmable register setting in REO
297 
298 
299 
300 			<legal all>
301 */
302 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET                     0x00000000
303 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB                        20
304 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK                       0x00100000
305 
306 /* Description		RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT
307 
308 			Consumer: REO/SW/FW
309 
310 			Producer: RXDMA
311 
312 
313 
314 			The retry bit setting from the MPDU header of the
315 			received frame
316 
317 			<legal all>
318 */
319 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET                    0x00000000
320 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB                       21
321 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK                      0x00200000
322 
323 /* Description		RX_MPDU_DESC_INFO_0_AMPDU_FLAG
324 
325 			Consumer: REO/SW/FW
326 
327 			Producer: RXDMA
328 
329 
330 
331 			When set, the MPDU was received as part of an A-MPDU.
332 
333 			<legal all>
334 */
335 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET                        0x00000000
336 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB                           22
337 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK                          0x00400000
338 
339 /* Description		RX_MPDU_DESC_INFO_0_BAR_FRAME
340 
341 			Consumer: REO/SW/FW
342 
343 			Producer: RXDMA
344 
345 
346 
347 			When set, the received frame is a BAR frame. After
348 			processing, this frame shall be pushed to SW or deleted.
349 
350 			<legal all>
351 */
352 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET                         0x00000000
353 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB                            23
354 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK                           0x00800000
355 
356 /* Description		RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO
357 
358 			Consumer: REO/SW/FW
359 
360 			Producer: RXDMA
361 
362 
363 
364 			Copied here by RXDMA from RX_MPDU_END
365 
366 			When not set, REO will Not perform a PN sequence number
367 			check
368 */
369 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET      0x00000000
370 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB         24
371 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK        0x01000000
372 
373 /* Description		RX_MPDU_DESC_INFO_0_SA_IS_VALID
374 
375 			When set, OLE found a valid SA entry for all MSDUs in
376 			this MPDU
377 
378 			<legal all>
379 */
380 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET                       0x00000000
381 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB                          25
382 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK                         0x02000000
383 
384 /* Description		RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT
385 
386 			When set, at least 1 MSDU within the MPDU has an
387 			unsuccessful MAC source address search due to the expiration
388 			of the search timer.
389 
390 			<legal all>
391 */
392 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET                    0x00000000
393 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB                       26
394 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK                      0x04000000
395 
396 /* Description		RX_MPDU_DESC_INFO_0_DA_IS_VALID
397 
398 			When set, OLE found a valid DA entry for all MSDUs in
399 			this MPDU
400 
401 			<legal all>
402 */
403 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET                       0x00000000
404 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB                          27
405 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK                         0x08000000
406 
407 /* Description		RX_MPDU_DESC_INFO_0_DA_IS_MCBC
408 
409 			Field Only valid if da_is_valid is set
410 
411 
412 
413 			When set, at least one of the DA addresses is a
414 			Multicast or Broadcast address.
415 
416 			<legal all>
417 */
418 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET                        0x00000000
419 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB                           28
420 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK                          0x10000000
421 
422 /* Description		RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT
423 
424 			When set, at least 1 MSDU within the MPDU has an
425 			unsuccessful MAC destination address search due to the
426 			expiration of the search timer.
427 
428 			<legal all>
429 */
430 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET                    0x00000000
431 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB                       29
432 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK                      0x20000000
433 
434 /* Description		RX_MPDU_DESC_INFO_0_RAW_MPDU
435 
436 			Field only valid when first_msdu_in_mpdu_flag is set.
437 
438 
439 
440 			When set, the contents in the MSDU buffer contains a
441 			'RAW' MPDU. This 'RAW' MPDU might be spread out over
442 			multiple MSDU buffers.
443 
444 			<legal all>
445 */
446 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET                          0x00000000
447 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB                             30
448 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK                            0x40000000
449 
450 /* Description		RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG
451 
452 			The More Fragment bit setting from the MPDU header of
453 			the received frame
454 
455 
456 
457 			<legal all>
458 */
459 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_OFFSET                0x00000000
460 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_LSB                   31
461 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_MASK                  0x80000000
462 
463 /* Description		RX_MPDU_DESC_INFO_1_PEER_META_DATA
464 
465 			Meta data that SW has programmed in the Peer table entry
466 			of the transmitting STA.
467 
468 			<legal all>
469 */
470 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET                    0x00000004
471 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB                       0
472 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK                      0xffffffff
473 
474 
475 #endif // _RX_MPDU_DESC_INFO_H_
476