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 //
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], reserved[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                       reserved                        :  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 reserved
221 
222 			<legal 0>
223 
224 peer_meta_data
225 
226 			Meta data that SW has programmed in the Peer table entry
227 			of the transmitting STA.
228 
229 			<legal all>
230 */
231 
232 
233 /* Description		RX_MPDU_DESC_INFO_0_MSDU_COUNT
234 
235 			Consumer: REO/SW/FW
236 
237 			Producer: RXDMA
238 
239 
240 
241 			The number of MSDUs within the MPDU
242 
243 			<legal all>
244 */
245 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET                        0x00000000
246 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB                           0
247 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK                          0x000000ff
248 
249 /* Description		RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER
250 
251 			Consumer: REO/SW/FW
252 
253 			Producer: RXDMA
254 
255 
256 
257 			The field can have two different meanings based on the
258 			setting of field 'BAR_frame':
259 
260 
261 
262 			'BAR_frame' is NOT set:
263 
264 			The MPDU sequence number of the received frame.
265 
266 
267 
268 			'BAR_frame' is set.
269 
270 			The MPDU Start sequence number from the BAR frame
271 
272 			<legal all>
273 */
274 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET              0x00000000
275 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB                 8
276 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK                0x000fff00
277 
278 /* Description		RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG
279 
280 			Consumer: REO/SW/FW
281 
282 			Producer: RXDMA
283 
284 
285 
286 			When set, this MPDU is a fragment and REO should forward
287 			this fragment MPDU to the REO destination ring without any
288 			reorder checks, pn checks or bitmap update. This implies
289 			that REO is forwarding the pointer to the MSDU link
290 			descriptor. The destination ring is coming from a
291 			programmable register setting in REO
292 
293 
294 
295 			<legal all>
296 */
297 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET                     0x00000000
298 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB                        20
299 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK                       0x00100000
300 
301 /* Description		RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT
302 
303 			Consumer: REO/SW/FW
304 
305 			Producer: RXDMA
306 
307 
308 
309 			The retry bit setting from the MPDU header of the
310 			received frame
311 
312 			<legal all>
313 */
314 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET                    0x00000000
315 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB                       21
316 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK                      0x00200000
317 
318 /* Description		RX_MPDU_DESC_INFO_0_AMPDU_FLAG
319 
320 			Consumer: REO/SW/FW
321 
322 			Producer: RXDMA
323 
324 
325 
326 			When set, the MPDU was received as part of an A-MPDU.
327 
328 			<legal all>
329 */
330 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET                        0x00000000
331 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB                           22
332 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK                          0x00400000
333 
334 /* Description		RX_MPDU_DESC_INFO_0_BAR_FRAME
335 
336 			Consumer: REO/SW/FW
337 
338 			Producer: RXDMA
339 
340 
341 
342 			When set, the received frame is a BAR frame. After
343 			processing, this frame shall be pushed to SW or deleted.
344 
345 			<legal all>
346 */
347 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET                         0x00000000
348 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB                            23
349 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK                           0x00800000
350 
351 /* Description		RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO
352 
353 			Consumer: REO/SW/FW
354 
355 			Producer: RXDMA
356 
357 
358 
359 			Copied here by RXDMA from RX_MPDU_END
360 
361 			When not set, REO will Not perform a PN sequence number
362 			check
363 */
364 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET      0x00000000
365 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB         24
366 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK        0x01000000
367 
368 /* Description		RX_MPDU_DESC_INFO_0_SA_IS_VALID
369 
370 			When set, OLE found a valid SA entry for all MSDUs in
371 			this MPDU
372 
373 			<legal all>
374 */
375 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET                       0x00000000
376 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB                          25
377 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK                         0x02000000
378 
379 /* Description		RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT
380 
381 			When set, at least 1 MSDU within the MPDU has an
382 			unsuccessful MAC source address search due to the expiration
383 			of the search timer.
384 
385 			<legal all>
386 */
387 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET                    0x00000000
388 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB                       26
389 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK                      0x04000000
390 
391 /* Description		RX_MPDU_DESC_INFO_0_DA_IS_VALID
392 
393 			When set, OLE found a valid DA entry for all MSDUs in
394 			this MPDU
395 
396 			<legal all>
397 */
398 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET                       0x00000000
399 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB                          27
400 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK                         0x08000000
401 
402 /* Description		RX_MPDU_DESC_INFO_0_DA_IS_MCBC
403 
404 			Field Only valid if da_is_valid is set
405 
406 
407 
408 			When set, at least one of the DA addresses is a
409 			Multicast or Broadcast address.
410 
411 			<legal all>
412 */
413 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET                        0x00000000
414 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB                           28
415 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK                          0x10000000
416 
417 /* Description		RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT
418 
419 			When set, at least 1 MSDU within the MPDU has an
420 			unsuccessful MAC destination address search due to the
421 			expiration of the search timer.
422 
423 			<legal all>
424 */
425 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET                    0x00000000
426 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB                       29
427 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK                      0x20000000
428 
429 /* Description		RX_MPDU_DESC_INFO_0_RAW_MPDU
430 
431 			Field only valid when first_msdu_in_mpdu_flag is set.
432 
433 
434 
435 			When set, the contents in the MSDU buffer contains a
436 			'RAW' MPDU. This 'RAW' MPDU might be spread out over
437 			multiple MSDU buffers.
438 
439 			<legal all>
440 */
441 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET                          0x00000000
442 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB                             30
443 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK                            0x40000000
444 
445 /* Description		RX_MPDU_DESC_INFO_0_RESERVED
446 
447 			<legal 0>
448 */
449 #define RX_MPDU_DESC_INFO_0_RESERVED_OFFSET                          0x00000000
450 #define RX_MPDU_DESC_INFO_0_RESERVED_LSB                             31
451 #define RX_MPDU_DESC_INFO_0_RESERVED_MASK                            0x80000000
452 
453 /* Description		RX_MPDU_DESC_INFO_1_PEER_META_DATA
454 
455 			Meta data that SW has programmed in the Peer table entry
456 			of the transmitting STA.
457 
458 			<legal all>
459 */
460 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET                    0x00000004
461 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB                       0
462 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK                      0xffffffff
463 
464 
465 #endif // _RX_MPDU_DESC_INFO_H_
466