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