xref: /wlan-driver/fw-api/hw/qca6290/v1/rx_msdu_start.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 // $ATH_LICENSE_HW_HDR_C$
20 //
21 // DO NOT EDIT!  This file is automatically generated
22 //               These definitions are tied to a particular hardware layout
23 
24 
25 #ifndef _RX_MSDU_START_H_
26 #define _RX_MSDU_START_H_
27 #if !defined(__ASSEMBLER__)
28 #endif
29 
30 
31 // ################ START SUMMARY #################
32 //
33 //	Dword	Fields
34 //	0	rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16]
35 //	1	msdu_length[13:0], reserved_1a[14], ipsec_esp[15], l3_offset[22:16], ipsec_ah[23], l4_offset[31:24]
36 //	2	msdu_number[7:0], decap_format[9:8], ipv4_proto[10], ipv6_proto[11], tcp_proto[12], udp_proto[13], ip_frag[14], tcp_only_ack[15], da_is_bcast_mcast[16], toeplitz_hash[17], reserved_2a[23:18], ip4_protocol_ip6_next_header[31:24]
37 //	3	toeplitz_hash_2_or_4[31:0]
38 //	4	flow_id_toeplitz[31:0]
39 //	5	user_rssi[7:0], pkt_type[11:8], stbc[12], sgi[14:13], rate_mcs[18:15], receive_bandwidth[20:19], reception_type[22:21], nss[25:23], reserved_5[31:26]
40 //	6	ppdu_start_timestamp[31:0]
41 //	7	sw_phy_meta_data[31:0]
42 //
43 // ################ END SUMMARY #################
44 
45 #define NUM_OF_DWORDS_RX_MSDU_START 8
46 
47 struct rx_msdu_start {
48              uint32_t rxpcu_mpdu_filter_in_category   :  2, //[1:0]
49                       sw_frame_group_id               :  7, //[8:2]
50                       reserved_0                      :  7, //[15:9]
51                       phy_ppdu_id                     : 16; //[31:16]
52              uint32_t msdu_length                     : 14, //[13:0]
53                       reserved_1a                     :  1, //[14]
54                       ipsec_esp                       :  1, //[15]
55                       l3_offset                       :  7, //[22:16]
56                       ipsec_ah                        :  1, //[23]
57                       l4_offset                       :  8; //[31:24]
58              uint32_t msdu_number                     :  8, //[7:0]
59                       decap_format                    :  2, //[9:8]
60                       ipv4_proto                      :  1, //[10]
61                       ipv6_proto                      :  1, //[11]
62                       tcp_proto                       :  1, //[12]
63                       udp_proto                       :  1, //[13]
64                       ip_frag                         :  1, //[14]
65                       tcp_only_ack                    :  1, //[15]
66                       da_is_bcast_mcast               :  1, //[16]
67                       toeplitz_hash                   :  1, //[17]
68                       reserved_2a                     :  6, //[23:18]
69                       ip4_protocol_ip6_next_header    :  8; //[31:24]
70              uint32_t toeplitz_hash_2_or_4            : 32; //[31:0]
71              uint32_t flow_id_toeplitz                : 32; //[31:0]
72              uint32_t user_rssi                       :  8, //[7:0]
73                       pkt_type                        :  4, //[11:8]
74                       stbc                            :  1, //[12]
75                       sgi                             :  2, //[14:13]
76                       rate_mcs                        :  4, //[18:15]
77                       receive_bandwidth               :  2, //[20:19]
78                       reception_type                  :  2, //[22:21]
79                       nss                             :  3, //[25:23]
80                       reserved_5                      :  6; //[31:26]
81              uint32_t ppdu_start_timestamp            : 32; //[31:0]
82              uint32_t sw_phy_meta_data                : 32; //[31:0]
83 };
84 
85 /*
86 
87 rxpcu_mpdu_filter_in_category
88 
89 			Field indicates what the reason was that this MPDU frame
90 			was allowed to come into the receive path by RXPCU
91 
92 			<enum 0 rxpcu_filter_pass> This MPDU passed the normal
93 			frame filter programming of rxpcu
94 
95 			<enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
96 			regular frame filter and would have been dropped, were it
97 			not for the frame fitting into the 'monitor_client'
98 			category.
99 
100 			<enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
101 			regular frame filter and also did not pass the
102 			rxpcu_monitor_client filter. It would have been dropped
103 			accept that it did pass the 'monitor_other' category.
104 
105 			<legal 0-2>
106 
107 sw_frame_group_id
108 
109 			SW processes frames based on certain classifications.
110 			This field indicates to what sw classification this MPDU is
111 			mapped.
112 
113 			The classification is given in priority order
114 
115 
116 
117 			<enum 0 sw_frame_group_NDP_frame>
118 
119 
120 
121 			<enum 1 sw_frame_group_Multicast_data>
122 
123 			<enum 2 sw_frame_group_Unicast_data>
124 
125 			<enum 3 sw_frame_group_Null_data > This includes mpdus
126 			of type Data Null as well as QoS Data Null
127 
128 
129 
130 			<enum 4 sw_frame_group_mgmt_0000 >
131 
132 			<enum 5 sw_frame_group_mgmt_0001 >
133 
134 			<enum 6 sw_frame_group_mgmt_0010 >
135 
136 			<enum 7 sw_frame_group_mgmt_0011 >
137 
138 			<enum 8 sw_frame_group_mgmt_0100 >
139 
140 			<enum 9 sw_frame_group_mgmt_0101 >
141 
142 			<enum 10 sw_frame_group_mgmt_0110 >
143 
144 			<enum 11 sw_frame_group_mgmt_0111 >
145 
146 			<enum 12 sw_frame_group_mgmt_1000 >
147 
148 			<enum 13 sw_frame_group_mgmt_1001 >
149 
150 			<enum 14 sw_frame_group_mgmt_1010 >
151 
152 			<enum 15 sw_frame_group_mgmt_1011 >
153 
154 			<enum 16 sw_frame_group_mgmt_1100 >
155 
156 			<enum 17 sw_frame_group_mgmt_1101 >
157 
158 			<enum 18 sw_frame_group_mgmt_1110 >
159 
160 			<enum 19 sw_frame_group_mgmt_1111 >
161 
162 
163 
164 			<enum 20 sw_frame_group_ctrl_0000 >
165 
166 			<enum 21 sw_frame_group_ctrl_0001 >
167 
168 			<enum 22 sw_frame_group_ctrl_0010 >
169 
170 			<enum 23 sw_frame_group_ctrl_0011 >
171 
172 			<enum 24 sw_frame_group_ctrl_0100 >
173 
174 			<enum 25 sw_frame_group_ctrl_0101 >
175 
176 			<enum 26 sw_frame_group_ctrl_0110 >
177 
178 			<enum 27 sw_frame_group_ctrl_0111 >
179 
180 			<enum 28 sw_frame_group_ctrl_1000 >
181 
182 			<enum 29 sw_frame_group_ctrl_1001 >
183 
184 			<enum 30 sw_frame_group_ctrl_1010 >
185 
186 			<enum 31 sw_frame_group_ctrl_1011 >
187 
188 			<enum 32 sw_frame_group_ctrl_1100 >
189 
190 			<enum 33 sw_frame_group_ctrl_1101 >
191 
192 			<enum 34 sw_frame_group_ctrl_1110 >
193 
194 			<enum 35 sw_frame_group_ctrl_1111 >
195 
196 
197 
198 			<enum 36 sw_frame_group_unsupported> This covers type 3
199 			and protocol version != 0
200 
201 
202 
203 
204 
205 
206 			<legal 0-37>
207 
208 reserved_0
209 
210 			<legal 0>
211 
212 phy_ppdu_id
213 
214 			A ppdu counter value that PHY increments for every PPDU
215 			received. The counter value wraps around
216 
217 			<legal all>
218 
219 msdu_length
220 
221 			MSDU length in bytes after decapsulation.
222 
223 
224 
225 			This field is still valid for MPDU frames without
226 
227 reserved_1a
228 
229 			<legal 0>
230 
231 ipsec_esp
232 
233 			Set if IPv4/v6 packet is using IPsec ESP
234 
235 l3_offset
236 
237 			Depending upon mode bit, this field either indicates the
238 			L3 offset in bytes from the start of the RX_HEADER or the IP
239 			offset in bytes from the start of the packet after
240 			decapsulation.  The latter is only valid if ipv4_proto or
241 			ipv6_proto is set.
242 
243 ipsec_ah
244 
245 			Set if IPv4/v6 packet is using IPsec AH
246 
247 l4_offset
248 
249 			Depending upon mode bit, this field either indicates the
250 			L4 offset nin bytes from the start of RX_HEADER(only valid
251 			if either ipv4_proto or ipv6_proto is set to 1) or indicates
252 			the offset in bytes to the start of TCP or UDP header from
253 			the start of the IP header after decapsulation(Only valid if
254 			tcp_proto or udp_proto is set).  The value 0 indicates that
255 			the offset is longer than 127 bytes.
256 
257 msdu_number
258 
259 			Indicates the MSDU number within a MPDU.  This value is
260 			reset to zero at the start of each MPDU.  If the number of
261 			MSDU exceeds 255 this number will wrap using modulo 256.
262 
263 decap_format
264 
265 			Indicates the format after decapsulation:
266 
267 
268 
269 			<enum 0 RAW> No encapsulation
270 
271 			<enum 1 Native_WiFi>
272 
273 			<enum 2 Ethernet> Ethernet 2 (DIX)  or 802.3 (uses
274 			SNAP/LLC)
275 
276 			<enum 3 802_3> DO NOT USE. Indicate Ethernet
277 
278 			<legal all>
279 
280 ipv4_proto
281 
282 			Set if L2 layer indicates IPv4 protocol.
283 
284 ipv6_proto
285 
286 			Set if L2 layer indicates IPv6 protocol.
287 
288 tcp_proto
289 
290 			Set if the ipv4_proto or ipv6_proto are set and the IP
291 			protocol indicates TCP.
292 
293 udp_proto
294 
295 			Set if the ipv4_proto or ipv6_proto are set and the IP
296 			protocol indicates UDP.
297 
298 ip_frag
299 
300 			Indicates that either the IP More frag bit is set or IP
301 			frag number is non-zero.  If set indicates that this is a
302 			fragmented IP packet.
303 
304 tcp_only_ack
305 
306 			Set if only the TCP Ack bit is set in the TCP flags and
307 			if the TCP payload is 0.
308 
309 da_is_bcast_mcast
310 
311 			The destination address is broadcast or multicast.
312 
313 toeplitz_hash
314 
315 			Actual choosen Hash.
316 
317 
318 
319 			0 -> Toeplitz hash of 2-tuple (IP source address, IP
320 			destination address)1 -> Toeplitz hash of 4-tuple (IP source
321 			address, IP destination address, L4 (TCP/UDP) source port,
322 			L4 (TCP/UDP) destination port)
323 
324 reserved_2a
325 
326 			<legal 0>
327 
328 ip4_protocol_ip6_next_header
329 
330 			For IPv4 this is the 8 bit protocol field (when
331 			ipv4_proto is set).  For IPv6 this is the 8 bit next_header
332 			field (when ipv6_proto is set).
333 
334 toeplitz_hash_2_or_4
335 
336 			Controlled by RxOLE register - If register bit set to 0,
337 			Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest
338 			addresses; otherwise, toeplitz hash is computed over 4-tuple
339 			IPv4 or IPv6 src/dest addresses and src/dest ports
340 
341 flow_id_toeplitz
342 
343 			Toeplitz hash of 5-tuple
344 
345 			{IP source address, IP destination address, IP source
346 			port, IP destination port, L4 protocol}  in case of
347 			non-IPSec.
348 
349 			In case of IPSec - Toeplitz hash of 4-tuple
350 
351 			{IP source address, IP destination address, SPI, L4
352 			protocol}
353 
354 
355 
356 			The relevant Toeplitz key registers are provided in
357 			RxOLE's instance of common parser module. These registers
358 			are separate from the Toeplitz keys used by ASE/FSE modules
359 			inside RxOLE.The actual value will be passed on from common
360 			parser module to RxOLE in one of the WHO_* TLVs.
361 
362 			<legal all>
363 
364 user_rssi
365 
366 			RSSI for this user
367 
368 			<legal all>
369 
370 pkt_type
371 
372 			Packet type:
373 
374 			<enum 0 dot11a>802.11a PPDU type
375 
376 			<enum 1 dot11b>802.11b PPDU type
377 
378 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
379 
380 			<enum 3 dot11ac>802.11ac PPDU type
381 
382 			<enum 4 dot11ax>802.11ax PPDU type
383 
384 stbc
385 
386 			When set, use STBC transmission rates
387 
388 sgi
389 
390 			Field only valid when pkt type is HT, VHT or HE.
391 
392 
393 
394 			<enum 0     0_8_us_sgi > Legacy normal GI. Can also be
395 			used for HE
396 
397 			<enum 1     0_4_us_sgi > Legacy short GI. Can also be
398 			used for HE
399 
400 			<enum 2     1_6_us_sgi > HE related GI
401 
402 			<enum 3     3_2_us_sgi > HE related GI
403 
404 			<legal 0 - 3>
405 
406 rate_mcs
407 
408 			For details, refer to  MCS_TYPE description
409 
410 			<legal all>
411 
412 receive_bandwidth
413 
414 			Full receive Bandwidth
415 
416 
417 
418 			<enum 0     full_rx_bw_20_mhz>
419 
420 			<enum 1      full_rx_bw_40_mhz>
421 
422 			<enum 2      full_rx_bw_80_mhz>
423 
424 			<enum 3      full_rx_bw_160_mhz>
425 
426 
427 
428 			<legal 0-3>
429 
430 reception_type
431 
432 			Indicates what type of reception this is.
433 
434 			<enum 0     reception_type_SU >
435 
436 			<enum 1     reception_type_MU_MIMO >
437 
438 			<enum 2     reception_type_MU_OFDMA >
439 
440 			<enum 3     reception_type_MU_OFDMA_MIMO >
441 
442 			<legal all>
443 
444 nss
445 
446 			Field only valid when Reception_type =
447 			reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO
448 
449 
450 
451 			Number of Spatial Streams occupied by the User
452 
453 
454 
455 			<enum 0 1_spatial_stream>Single spatial stream
456 
457 			<enum 1 2_spatial_streams>2 spatial streams
458 
459 			<enum 2 3_spatial_streams>3 spatial streams
460 
461 			<enum 3 4_spatial_streams>4 spatial streams
462 
463 			<enum 4 5_spatial_streams>5 spatial streams
464 
465 			<enum 5 6_spatial_streams>6 spatial streams
466 
467 			<enum 6 7_spatial_streams>7 spatial streams
468 
469 			<enum 7 8_spatial_streams>8 spatial streams
470 
471 reserved_5
472 
473 			<legal 0>
474 
475 ppdu_start_timestamp
476 
477 			Timestamp that indicates when the PPDU that contained
478 			this MPDU started on the medium.
479 
480 			<legal all>
481 
482 sw_phy_meta_data
483 
484 			SW programmed Meta data provided by the PHY.
485 
486 
487 
488 			Can be used for SW to indicate the channel the device is
489 			on.
490 
491 			<legal all>
492 */
493 
494 
495 /* Description		RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY
496 
497 			Field indicates what the reason was that this MPDU frame
498 			was allowed to come into the receive path by RXPCU
499 
500 			<enum 0 rxpcu_filter_pass> This MPDU passed the normal
501 			frame filter programming of rxpcu
502 
503 			<enum 1 rxpcu_monitor_client> This MPDU did NOT pass the
504 			regular frame filter and would have been dropped, were it
505 			not for the frame fitting into the 'monitor_client'
506 			category.
507 
508 			<enum 2 rxpcu_monitor_other> This MPDU did NOT pass the
509 			regular frame filter and also did not pass the
510 			rxpcu_monitor_client filter. It would have been dropped
511 			accept that it did pass the 'monitor_other' category.
512 
513 			<legal 0-2>
514 */
515 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET         0x00000000
516 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB            0
517 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK           0x00000003
518 
519 /* Description		RX_MSDU_START_0_SW_FRAME_GROUP_ID
520 
521 			SW processes frames based on certain classifications.
522 			This field indicates to what sw classification this MPDU is
523 			mapped.
524 
525 			The classification is given in priority order
526 
527 
528 
529 			<enum 0 sw_frame_group_NDP_frame>
530 
531 
532 
533 			<enum 1 sw_frame_group_Multicast_data>
534 
535 			<enum 2 sw_frame_group_Unicast_data>
536 
537 			<enum 3 sw_frame_group_Null_data > This includes mpdus
538 			of type Data Null as well as QoS Data Null
539 
540 
541 
542 			<enum 4 sw_frame_group_mgmt_0000 >
543 
544 			<enum 5 sw_frame_group_mgmt_0001 >
545 
546 			<enum 6 sw_frame_group_mgmt_0010 >
547 
548 			<enum 7 sw_frame_group_mgmt_0011 >
549 
550 			<enum 8 sw_frame_group_mgmt_0100 >
551 
552 			<enum 9 sw_frame_group_mgmt_0101 >
553 
554 			<enum 10 sw_frame_group_mgmt_0110 >
555 
556 			<enum 11 sw_frame_group_mgmt_0111 >
557 
558 			<enum 12 sw_frame_group_mgmt_1000 >
559 
560 			<enum 13 sw_frame_group_mgmt_1001 >
561 
562 			<enum 14 sw_frame_group_mgmt_1010 >
563 
564 			<enum 15 sw_frame_group_mgmt_1011 >
565 
566 			<enum 16 sw_frame_group_mgmt_1100 >
567 
568 			<enum 17 sw_frame_group_mgmt_1101 >
569 
570 			<enum 18 sw_frame_group_mgmt_1110 >
571 
572 			<enum 19 sw_frame_group_mgmt_1111 >
573 
574 
575 
576 			<enum 20 sw_frame_group_ctrl_0000 >
577 
578 			<enum 21 sw_frame_group_ctrl_0001 >
579 
580 			<enum 22 sw_frame_group_ctrl_0010 >
581 
582 			<enum 23 sw_frame_group_ctrl_0011 >
583 
584 			<enum 24 sw_frame_group_ctrl_0100 >
585 
586 			<enum 25 sw_frame_group_ctrl_0101 >
587 
588 			<enum 26 sw_frame_group_ctrl_0110 >
589 
590 			<enum 27 sw_frame_group_ctrl_0111 >
591 
592 			<enum 28 sw_frame_group_ctrl_1000 >
593 
594 			<enum 29 sw_frame_group_ctrl_1001 >
595 
596 			<enum 30 sw_frame_group_ctrl_1010 >
597 
598 			<enum 31 sw_frame_group_ctrl_1011 >
599 
600 			<enum 32 sw_frame_group_ctrl_1100 >
601 
602 			<enum 33 sw_frame_group_ctrl_1101 >
603 
604 			<enum 34 sw_frame_group_ctrl_1110 >
605 
606 			<enum 35 sw_frame_group_ctrl_1111 >
607 
608 
609 
610 			<enum 36 sw_frame_group_unsupported> This covers type 3
611 			and protocol version != 0
612 
613 
614 
615 
616 
617 
618 			<legal 0-37>
619 */
620 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_OFFSET                     0x00000000
621 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_LSB                        2
622 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_MASK                       0x000001fc
623 
624 /* Description		RX_MSDU_START_0_RESERVED_0
625 
626 			<legal 0>
627 */
628 #define RX_MSDU_START_0_RESERVED_0_OFFSET                            0x00000000
629 #define RX_MSDU_START_0_RESERVED_0_LSB                               9
630 #define RX_MSDU_START_0_RESERVED_0_MASK                              0x0000fe00
631 
632 /* Description		RX_MSDU_START_0_PHY_PPDU_ID
633 
634 			A ppdu counter value that PHY increments for every PPDU
635 			received. The counter value wraps around
636 
637 			<legal all>
638 */
639 #define RX_MSDU_START_0_PHY_PPDU_ID_OFFSET                           0x00000000
640 #define RX_MSDU_START_0_PHY_PPDU_ID_LSB                              16
641 #define RX_MSDU_START_0_PHY_PPDU_ID_MASK                             0xffff0000
642 
643 /* Description		RX_MSDU_START_1_MSDU_LENGTH
644 
645 			MSDU length in bytes after decapsulation.
646 
647 
648 
649 			This field is still valid for MPDU frames without
650 */
651 #define RX_MSDU_START_1_MSDU_LENGTH_OFFSET                           0x00000004
652 #define RX_MSDU_START_1_MSDU_LENGTH_LSB                              0
653 #define RX_MSDU_START_1_MSDU_LENGTH_MASK                             0x00003fff
654 
655 /* Description		RX_MSDU_START_1_RESERVED_1A
656 
657 			<legal 0>
658 */
659 #define RX_MSDU_START_1_RESERVED_1A_OFFSET                           0x00000004
660 #define RX_MSDU_START_1_RESERVED_1A_LSB                              14
661 #define RX_MSDU_START_1_RESERVED_1A_MASK                             0x00004000
662 
663 /* Description		RX_MSDU_START_1_IPSEC_ESP
664 
665 			Set if IPv4/v6 packet is using IPsec ESP
666 */
667 #define RX_MSDU_START_1_IPSEC_ESP_OFFSET                             0x00000004
668 #define RX_MSDU_START_1_IPSEC_ESP_LSB                                15
669 #define RX_MSDU_START_1_IPSEC_ESP_MASK                               0x00008000
670 
671 /* Description		RX_MSDU_START_1_L3_OFFSET
672 
673 			Depending upon mode bit, this field either indicates the
674 			L3 offset in bytes from the start of the RX_HEADER or the IP
675 			offset in bytes from the start of the packet after
676 			decapsulation.  The latter is only valid if ipv4_proto or
677 			ipv6_proto is set.
678 */
679 #define RX_MSDU_START_1_L3_OFFSET_OFFSET                             0x00000004
680 #define RX_MSDU_START_1_L3_OFFSET_LSB                                16
681 #define RX_MSDU_START_1_L3_OFFSET_MASK                               0x007f0000
682 
683 /* Description		RX_MSDU_START_1_IPSEC_AH
684 
685 			Set if IPv4/v6 packet is using IPsec AH
686 */
687 #define RX_MSDU_START_1_IPSEC_AH_OFFSET                              0x00000004
688 #define RX_MSDU_START_1_IPSEC_AH_LSB                                 23
689 #define RX_MSDU_START_1_IPSEC_AH_MASK                                0x00800000
690 
691 /* Description		RX_MSDU_START_1_L4_OFFSET
692 
693 			Depending upon mode bit, this field either indicates the
694 			L4 offset nin bytes from the start of RX_HEADER(only valid
695 			if either ipv4_proto or ipv6_proto is set to 1) or indicates
696 			the offset in bytes to the start of TCP or UDP header from
697 			the start of the IP header after decapsulation(Only valid if
698 			tcp_proto or udp_proto is set).  The value 0 indicates that
699 			the offset is longer than 127 bytes.
700 */
701 #define RX_MSDU_START_1_L4_OFFSET_OFFSET                             0x00000004
702 #define RX_MSDU_START_1_L4_OFFSET_LSB                                24
703 #define RX_MSDU_START_1_L4_OFFSET_MASK                               0xff000000
704 
705 /* Description		RX_MSDU_START_2_MSDU_NUMBER
706 
707 			Indicates the MSDU number within a MPDU.  This value is
708 			reset to zero at the start of each MPDU.  If the number of
709 			MSDU exceeds 255 this number will wrap using modulo 256.
710 */
711 #define RX_MSDU_START_2_MSDU_NUMBER_OFFSET                           0x00000008
712 #define RX_MSDU_START_2_MSDU_NUMBER_LSB                              0
713 #define RX_MSDU_START_2_MSDU_NUMBER_MASK                             0x000000ff
714 
715 /* Description		RX_MSDU_START_2_DECAP_FORMAT
716 
717 			Indicates the format after decapsulation:
718 
719 
720 
721 			<enum 0 RAW> No encapsulation
722 
723 			<enum 1 Native_WiFi>
724 
725 			<enum 2 Ethernet> Ethernet 2 (DIX)  or 802.3 (uses
726 			SNAP/LLC)
727 
728 			<enum 3 802_3> DO NOT USE. Indicate Ethernet
729 
730 			<legal all>
731 */
732 #define RX_MSDU_START_2_DECAP_FORMAT_OFFSET                          0x00000008
733 #define RX_MSDU_START_2_DECAP_FORMAT_LSB                             8
734 #define RX_MSDU_START_2_DECAP_FORMAT_MASK                            0x00000300
735 
736 /* Description		RX_MSDU_START_2_IPV4_PROTO
737 
738 			Set if L2 layer indicates IPv4 protocol.
739 */
740 #define RX_MSDU_START_2_IPV4_PROTO_OFFSET                            0x00000008
741 #define RX_MSDU_START_2_IPV4_PROTO_LSB                               10
742 #define RX_MSDU_START_2_IPV4_PROTO_MASK                              0x00000400
743 
744 /* Description		RX_MSDU_START_2_IPV6_PROTO
745 
746 			Set if L2 layer indicates IPv6 protocol.
747 */
748 #define RX_MSDU_START_2_IPV6_PROTO_OFFSET                            0x00000008
749 #define RX_MSDU_START_2_IPV6_PROTO_LSB                               11
750 #define RX_MSDU_START_2_IPV6_PROTO_MASK                              0x00000800
751 
752 /* Description		RX_MSDU_START_2_TCP_PROTO
753 
754 			Set if the ipv4_proto or ipv6_proto are set and the IP
755 			protocol indicates TCP.
756 */
757 #define RX_MSDU_START_2_TCP_PROTO_OFFSET                             0x00000008
758 #define RX_MSDU_START_2_TCP_PROTO_LSB                                12
759 #define RX_MSDU_START_2_TCP_PROTO_MASK                               0x00001000
760 
761 /* Description		RX_MSDU_START_2_UDP_PROTO
762 
763 			Set if the ipv4_proto or ipv6_proto are set and the IP
764 			protocol indicates UDP.
765 */
766 #define RX_MSDU_START_2_UDP_PROTO_OFFSET                             0x00000008
767 #define RX_MSDU_START_2_UDP_PROTO_LSB                                13
768 #define RX_MSDU_START_2_UDP_PROTO_MASK                               0x00002000
769 
770 /* Description		RX_MSDU_START_2_IP_FRAG
771 
772 			Indicates that either the IP More frag bit is set or IP
773 			frag number is non-zero.  If set indicates that this is a
774 			fragmented IP packet.
775 */
776 #define RX_MSDU_START_2_IP_FRAG_OFFSET                               0x00000008
777 #define RX_MSDU_START_2_IP_FRAG_LSB                                  14
778 #define RX_MSDU_START_2_IP_FRAG_MASK                                 0x00004000
779 
780 /* Description		RX_MSDU_START_2_TCP_ONLY_ACK
781 
782 			Set if only the TCP Ack bit is set in the TCP flags and
783 			if the TCP payload is 0.
784 */
785 #define RX_MSDU_START_2_TCP_ONLY_ACK_OFFSET                          0x00000008
786 #define RX_MSDU_START_2_TCP_ONLY_ACK_LSB                             15
787 #define RX_MSDU_START_2_TCP_ONLY_ACK_MASK                            0x00008000
788 
789 /* Description		RX_MSDU_START_2_DA_IS_BCAST_MCAST
790 
791 			The destination address is broadcast or multicast.
792 */
793 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_OFFSET                     0x00000008
794 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_LSB                        16
795 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_MASK                       0x00010000
796 
797 /* Description		RX_MSDU_START_2_TOEPLITZ_HASH
798 
799 			Actual choosen Hash.
800 
801 
802 
803 			0 -> Toeplitz hash of 2-tuple (IP source address, IP
804 			destination address)1 -> Toeplitz hash of 4-tuple (IP source
805 			address, IP destination address, L4 (TCP/UDP) source port,
806 			L4 (TCP/UDP) destination port)
807 */
808 #define RX_MSDU_START_2_TOEPLITZ_HASH_OFFSET                         0x00000008
809 #define RX_MSDU_START_2_TOEPLITZ_HASH_LSB                            17
810 #define RX_MSDU_START_2_TOEPLITZ_HASH_MASK                           0x00020000
811 
812 /* Description		RX_MSDU_START_2_RESERVED_2A
813 
814 			<legal 0>
815 */
816 #define RX_MSDU_START_2_RESERVED_2A_OFFSET                           0x00000008
817 #define RX_MSDU_START_2_RESERVED_2A_LSB                              18
818 #define RX_MSDU_START_2_RESERVED_2A_MASK                             0x00fc0000
819 
820 /* Description		RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER
821 
822 			For IPv4 this is the 8 bit protocol field (when
823 			ipv4_proto is set).  For IPv6 this is the 8 bit next_header
824 			field (when ipv6_proto is set).
825 */
826 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_OFFSET          0x00000008
827 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_LSB             24
828 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_MASK            0xff000000
829 
830 /* Description		RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4
831 
832 			Controlled by RxOLE register - If register bit set to 0,
833 			Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest
834 			addresses; otherwise, toeplitz hash is computed over 4-tuple
835 			IPv4 or IPv6 src/dest addresses and src/dest ports
836 */
837 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_OFFSET                  0x0000000c
838 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_LSB                     0
839 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_MASK                    0xffffffff
840 
841 /* Description		RX_MSDU_START_4_FLOW_ID_TOEPLITZ
842 
843 			Toeplitz hash of 5-tuple
844 
845 			{IP source address, IP destination address, IP source
846 			port, IP destination port, L4 protocol}  in case of
847 			non-IPSec.
848 
849 			In case of IPSec - Toeplitz hash of 4-tuple
850 
851 			{IP source address, IP destination address, SPI, L4
852 			protocol}
853 
854 
855 
856 			The relevant Toeplitz key registers are provided in
857 			RxOLE's instance of common parser module. These registers
858 			are separate from the Toeplitz keys used by ASE/FSE modules
859 			inside RxOLE.The actual value will be passed on from common
860 			parser module to RxOLE in one of the WHO_* TLVs.
861 
862 			<legal all>
863 */
864 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_OFFSET                      0x00000010
865 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_LSB                         0
866 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_MASK                        0xffffffff
867 
868 /* Description		RX_MSDU_START_5_USER_RSSI
869 
870 			RSSI for this user
871 
872 			<legal all>
873 */
874 #define RX_MSDU_START_5_USER_RSSI_OFFSET                             0x00000014
875 #define RX_MSDU_START_5_USER_RSSI_LSB                                0
876 #define RX_MSDU_START_5_USER_RSSI_MASK                               0x000000ff
877 
878 /* Description		RX_MSDU_START_5_PKT_TYPE
879 
880 			Packet type:
881 
882 			<enum 0 dot11a>802.11a PPDU type
883 
884 			<enum 1 dot11b>802.11b PPDU type
885 
886 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
887 
888 			<enum 3 dot11ac>802.11ac PPDU type
889 
890 			<enum 4 dot11ax>802.11ax PPDU type
891 */
892 #define RX_MSDU_START_5_PKT_TYPE_OFFSET                              0x00000014
893 #define RX_MSDU_START_5_PKT_TYPE_LSB                                 8
894 #define RX_MSDU_START_5_PKT_TYPE_MASK                                0x00000f00
895 
896 /* Description		RX_MSDU_START_5_STBC
897 
898 			When set, use STBC transmission rates
899 */
900 #define RX_MSDU_START_5_STBC_OFFSET                                  0x00000014
901 #define RX_MSDU_START_5_STBC_LSB                                     12
902 #define RX_MSDU_START_5_STBC_MASK                                    0x00001000
903 
904 /* Description		RX_MSDU_START_5_SGI
905 
906 			Field only valid when pkt type is HT, VHT or HE.
907 
908 
909 
910 			<enum 0     0_8_us_sgi > Legacy normal GI. Can also be
911 			used for HE
912 
913 			<enum 1     0_4_us_sgi > Legacy short GI. Can also be
914 			used for HE
915 
916 			<enum 2     1_6_us_sgi > HE related GI
917 
918 			<enum 3     3_2_us_sgi > HE related GI
919 
920 			<legal 0 - 3>
921 */
922 #define RX_MSDU_START_5_SGI_OFFSET                                   0x00000014
923 #define RX_MSDU_START_5_SGI_LSB                                      13
924 #define RX_MSDU_START_5_SGI_MASK                                     0x00006000
925 
926 /* Description		RX_MSDU_START_5_RATE_MCS
927 
928 			For details, refer to  MCS_TYPE description
929 
930 			<legal all>
931 */
932 #define RX_MSDU_START_5_RATE_MCS_OFFSET                              0x00000014
933 #define RX_MSDU_START_5_RATE_MCS_LSB                                 15
934 #define RX_MSDU_START_5_RATE_MCS_MASK                                0x00078000
935 
936 /* Description		RX_MSDU_START_5_RECEIVE_BANDWIDTH
937 
938 			Full receive Bandwidth
939 
940 
941 
942 			<enum 0     full_rx_bw_20_mhz>
943 
944 			<enum 1      full_rx_bw_40_mhz>
945 
946 			<enum 2      full_rx_bw_80_mhz>
947 
948 			<enum 3      full_rx_bw_160_mhz>
949 
950 
951 
952 			<legal 0-3>
953 */
954 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_OFFSET                     0x00000014
955 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_LSB                        19
956 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_MASK                       0x00180000
957 
958 /* Description		RX_MSDU_START_5_RECEPTION_TYPE
959 
960 			Indicates what type of reception this is.
961 
962 			<enum 0     reception_type_SU >
963 
964 			<enum 1     reception_type_MU_MIMO >
965 
966 			<enum 2     reception_type_MU_OFDMA >
967 
968 			<enum 3     reception_type_MU_OFDMA_MIMO >
969 
970 			<legal all>
971 */
972 #define RX_MSDU_START_5_RECEPTION_TYPE_OFFSET                        0x00000014
973 #define RX_MSDU_START_5_RECEPTION_TYPE_LSB                           21
974 #define RX_MSDU_START_5_RECEPTION_TYPE_MASK                          0x00600000
975 
976 /* Description		RX_MSDU_START_5_NSS
977 
978 			Field only valid when Reception_type =
979 			reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO
980 
981 
982 
983 			Number of Spatial Streams occupied by the User
984 
985 
986 
987 			<enum 0 1_spatial_stream>Single spatial stream
988 
989 			<enum 1 2_spatial_streams>2 spatial streams
990 
991 			<enum 2 3_spatial_streams>3 spatial streams
992 
993 			<enum 3 4_spatial_streams>4 spatial streams
994 
995 			<enum 4 5_spatial_streams>5 spatial streams
996 
997 			<enum 5 6_spatial_streams>6 spatial streams
998 
999 			<enum 6 7_spatial_streams>7 spatial streams
1000 
1001 			<enum 7 8_spatial_streams>8 spatial streams
1002 */
1003 #define RX_MSDU_START_5_NSS_OFFSET                                   0x00000014
1004 #define RX_MSDU_START_5_NSS_LSB                                      23
1005 #define RX_MSDU_START_5_NSS_MASK                                     0x03800000
1006 
1007 /* Description		RX_MSDU_START_5_RESERVED_5
1008 
1009 			<legal 0>
1010 */
1011 #define RX_MSDU_START_5_RESERVED_5_OFFSET                            0x00000014
1012 #define RX_MSDU_START_5_RESERVED_5_LSB                               26
1013 #define RX_MSDU_START_5_RESERVED_5_MASK                              0xfc000000
1014 
1015 /* Description		RX_MSDU_START_6_PPDU_START_TIMESTAMP
1016 
1017 			Timestamp that indicates when the PPDU that contained
1018 			this MPDU started on the medium.
1019 
1020 			<legal all>
1021 */
1022 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_OFFSET                  0x00000018
1023 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_LSB                     0
1024 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_MASK                    0xffffffff
1025 
1026 /* Description		RX_MSDU_START_7_SW_PHY_META_DATA
1027 
1028 			SW programmed Meta data provided by the PHY.
1029 
1030 
1031 
1032 			Can be used for SW to indicate the channel the device is
1033 			on.
1034 
1035 			<legal all>
1036 */
1037 #define RX_MSDU_START_7_SW_PHY_META_DATA_OFFSET                      0x0000001c
1038 #define RX_MSDU_START_7_SW_PHY_META_DATA_LSB                         0
1039 #define RX_MSDU_START_7_SW_PHY_META_DATA_MASK                        0xffffffff
1040 
1041 
1042 #endif // _RX_MSDU_START_H_
1043