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