xref: /wlan-driver/fw-api/hw/peach/v2/rx_mpdu_end.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name 
18*5113495bSYour Name #ifndef _RX_MPDU_END_H_
19*5113495bSYour Name #define _RX_MPDU_END_H_
20*5113495bSYour Name 
21*5113495bSYour Name #define NUM_OF_DWORDS_RX_MPDU_END 4
22*5113495bSYour Name 
23*5113495bSYour Name struct rx_mpdu_end {
24*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
25*5113495bSYour Name              uint32_t rxpcu_mpdu_filter_in_category                           :  2,
26*5113495bSYour Name                       sw_frame_group_id                                       :  7,
27*5113495bSYour Name                       reserved_0                                              :  7,
28*5113495bSYour Name                       phy_ppdu_id                                             : 16;
29*5113495bSYour Name              uint32_t reserved_1a                                             : 11,
30*5113495bSYour Name                       unsup_ktype_short_frame                                 :  1,
31*5113495bSYour Name                       rx_in_tx_decrypt_byp                                    :  1,
32*5113495bSYour Name                       overflow_err                                            :  1,
33*5113495bSYour Name                       mpdu_length_err                                         :  1,
34*5113495bSYour Name                       tkip_mic_err                                            :  1,
35*5113495bSYour Name                       decrypt_err                                             :  1,
36*5113495bSYour Name                       unencrypted_frame_err                                   :  1,
37*5113495bSYour Name                       pn_fields_contain_valid_info                            :  1,
38*5113495bSYour Name                       fcs_err                                                 :  1,
39*5113495bSYour Name                       msdu_length_err                                         :  1,
40*5113495bSYour Name                       rxdma0_destination_ring                                 :  3,
41*5113495bSYour Name                       rxdma1_destination_ring                                 :  3,
42*5113495bSYour Name                       decrypt_status_code                                     :  3,
43*5113495bSYour Name                       rx_bitmap_not_updated                                   :  1,
44*5113495bSYour Name                       reserved_1b                                             :  1;
45*5113495bSYour Name              uint32_t reserved_2a                                             : 15,
46*5113495bSYour Name                       rxpcu_mgmt_sequence_nr_valid                            :  1,
47*5113495bSYour Name                       rxpcu_mgmt_sequence_nr                                  : 16;
48*5113495bSYour Name              uint32_t __reserved_g_0002                                       : 32;
49*5113495bSYour Name #else
50*5113495bSYour Name              uint32_t phy_ppdu_id                                             : 16,
51*5113495bSYour Name                       reserved_0                                              :  7,
52*5113495bSYour Name                       sw_frame_group_id                                       :  7,
53*5113495bSYour Name                       rxpcu_mpdu_filter_in_category                           :  2;
54*5113495bSYour Name              uint32_t reserved_1b                                             :  1,
55*5113495bSYour Name                       rx_bitmap_not_updated                                   :  1,
56*5113495bSYour Name                       decrypt_status_code                                     :  3,
57*5113495bSYour Name                       rxdma1_destination_ring                                 :  3,
58*5113495bSYour Name                       rxdma0_destination_ring                                 :  3,
59*5113495bSYour Name                       msdu_length_err                                         :  1,
60*5113495bSYour Name                       fcs_err                                                 :  1,
61*5113495bSYour Name                       pn_fields_contain_valid_info                            :  1,
62*5113495bSYour Name                       unencrypted_frame_err                                   :  1,
63*5113495bSYour Name                       decrypt_err                                             :  1,
64*5113495bSYour Name                       tkip_mic_err                                            :  1,
65*5113495bSYour Name                       mpdu_length_err                                         :  1,
66*5113495bSYour Name                       overflow_err                                            :  1,
67*5113495bSYour Name                       rx_in_tx_decrypt_byp                                    :  1,
68*5113495bSYour Name                       unsup_ktype_short_frame                                 :  1,
69*5113495bSYour Name                       reserved_1a                                             : 11;
70*5113495bSYour Name              uint32_t rxpcu_mgmt_sequence_nr                                  : 16,
71*5113495bSYour Name                       rxpcu_mgmt_sequence_nr_valid                            :  1,
72*5113495bSYour Name                       reserved_2a                                             : 15;
73*5113495bSYour Name              uint32_t __reserved_g_0002                                       : 32;
74*5113495bSYour Name #endif
75*5113495bSYour Name };
76*5113495bSYour Name 
77*5113495bSYour Name #define RX_MPDU_END_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET                            0x00000000
78*5113495bSYour Name #define RX_MPDU_END_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB                               0
79*5113495bSYour Name #define RX_MPDU_END_RXPCU_MPDU_FILTER_IN_CATEGORY_MSB                               1
80*5113495bSYour Name #define RX_MPDU_END_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK                              0x00000003
81*5113495bSYour Name 
82*5113495bSYour Name #define RX_MPDU_END_SW_FRAME_GROUP_ID_OFFSET                                        0x00000000
83*5113495bSYour Name #define RX_MPDU_END_SW_FRAME_GROUP_ID_LSB                                           2
84*5113495bSYour Name #define RX_MPDU_END_SW_FRAME_GROUP_ID_MSB                                           8
85*5113495bSYour Name #define RX_MPDU_END_SW_FRAME_GROUP_ID_MASK                                          0x000001fc
86*5113495bSYour Name 
87*5113495bSYour Name #define RX_MPDU_END_RESERVED_0_OFFSET                                               0x00000000
88*5113495bSYour Name #define RX_MPDU_END_RESERVED_0_LSB                                                  9
89*5113495bSYour Name #define RX_MPDU_END_RESERVED_0_MSB                                                  15
90*5113495bSYour Name #define RX_MPDU_END_RESERVED_0_MASK                                                 0x0000fe00
91*5113495bSYour Name 
92*5113495bSYour Name #define RX_MPDU_END_PHY_PPDU_ID_OFFSET                                              0x00000000
93*5113495bSYour Name #define RX_MPDU_END_PHY_PPDU_ID_LSB                                                 16
94*5113495bSYour Name #define RX_MPDU_END_PHY_PPDU_ID_MSB                                                 31
95*5113495bSYour Name #define RX_MPDU_END_PHY_PPDU_ID_MASK                                                0xffff0000
96*5113495bSYour Name 
97*5113495bSYour Name #define RX_MPDU_END_RESERVED_1A_OFFSET                                              0x00000004
98*5113495bSYour Name #define RX_MPDU_END_RESERVED_1A_LSB                                                 0
99*5113495bSYour Name #define RX_MPDU_END_RESERVED_1A_MSB                                                 10
100*5113495bSYour Name #define RX_MPDU_END_RESERVED_1A_MASK                                                0x000007ff
101*5113495bSYour Name 
102*5113495bSYour Name #define RX_MPDU_END_UNSUP_KTYPE_SHORT_FRAME_OFFSET                                  0x00000004
103*5113495bSYour Name #define RX_MPDU_END_UNSUP_KTYPE_SHORT_FRAME_LSB                                     11
104*5113495bSYour Name #define RX_MPDU_END_UNSUP_KTYPE_SHORT_FRAME_MSB                                     11
105*5113495bSYour Name #define RX_MPDU_END_UNSUP_KTYPE_SHORT_FRAME_MASK                                    0x00000800
106*5113495bSYour Name 
107*5113495bSYour Name #define RX_MPDU_END_RX_IN_TX_DECRYPT_BYP_OFFSET                                     0x00000004
108*5113495bSYour Name #define RX_MPDU_END_RX_IN_TX_DECRYPT_BYP_LSB                                        12
109*5113495bSYour Name #define RX_MPDU_END_RX_IN_TX_DECRYPT_BYP_MSB                                        12
110*5113495bSYour Name #define RX_MPDU_END_RX_IN_TX_DECRYPT_BYP_MASK                                       0x00001000
111*5113495bSYour Name 
112*5113495bSYour Name #define RX_MPDU_END_OVERFLOW_ERR_OFFSET                                             0x00000004
113*5113495bSYour Name #define RX_MPDU_END_OVERFLOW_ERR_LSB                                                13
114*5113495bSYour Name #define RX_MPDU_END_OVERFLOW_ERR_MSB                                                13
115*5113495bSYour Name #define RX_MPDU_END_OVERFLOW_ERR_MASK                                               0x00002000
116*5113495bSYour Name 
117*5113495bSYour Name #define RX_MPDU_END_MPDU_LENGTH_ERR_OFFSET                                          0x00000004
118*5113495bSYour Name #define RX_MPDU_END_MPDU_LENGTH_ERR_LSB                                             14
119*5113495bSYour Name #define RX_MPDU_END_MPDU_LENGTH_ERR_MSB                                             14
120*5113495bSYour Name #define RX_MPDU_END_MPDU_LENGTH_ERR_MASK                                            0x00004000
121*5113495bSYour Name 
122*5113495bSYour Name #define RX_MPDU_END_TKIP_MIC_ERR_OFFSET                                             0x00000004
123*5113495bSYour Name #define RX_MPDU_END_TKIP_MIC_ERR_LSB                                                15
124*5113495bSYour Name #define RX_MPDU_END_TKIP_MIC_ERR_MSB                                                15
125*5113495bSYour Name #define RX_MPDU_END_TKIP_MIC_ERR_MASK                                               0x00008000
126*5113495bSYour Name 
127*5113495bSYour Name #define RX_MPDU_END_DECRYPT_ERR_OFFSET                                              0x00000004
128*5113495bSYour Name #define RX_MPDU_END_DECRYPT_ERR_LSB                                                 16
129*5113495bSYour Name #define RX_MPDU_END_DECRYPT_ERR_MSB                                                 16
130*5113495bSYour Name #define RX_MPDU_END_DECRYPT_ERR_MASK                                                0x00010000
131*5113495bSYour Name 
132*5113495bSYour Name #define RX_MPDU_END_UNENCRYPTED_FRAME_ERR_OFFSET                                    0x00000004
133*5113495bSYour Name #define RX_MPDU_END_UNENCRYPTED_FRAME_ERR_LSB                                       17
134*5113495bSYour Name #define RX_MPDU_END_UNENCRYPTED_FRAME_ERR_MSB                                       17
135*5113495bSYour Name #define RX_MPDU_END_UNENCRYPTED_FRAME_ERR_MASK                                      0x00020000
136*5113495bSYour Name 
137*5113495bSYour Name #define RX_MPDU_END_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET                             0x00000004
138*5113495bSYour Name #define RX_MPDU_END_PN_FIELDS_CONTAIN_VALID_INFO_LSB                                18
139*5113495bSYour Name #define RX_MPDU_END_PN_FIELDS_CONTAIN_VALID_INFO_MSB                                18
140*5113495bSYour Name #define RX_MPDU_END_PN_FIELDS_CONTAIN_VALID_INFO_MASK                               0x00040000
141*5113495bSYour Name 
142*5113495bSYour Name #define RX_MPDU_END_FCS_ERR_OFFSET                                                  0x00000004
143*5113495bSYour Name #define RX_MPDU_END_FCS_ERR_LSB                                                     19
144*5113495bSYour Name #define RX_MPDU_END_FCS_ERR_MSB                                                     19
145*5113495bSYour Name #define RX_MPDU_END_FCS_ERR_MASK                                                    0x00080000
146*5113495bSYour Name 
147*5113495bSYour Name #define RX_MPDU_END_MSDU_LENGTH_ERR_OFFSET                                          0x00000004
148*5113495bSYour Name #define RX_MPDU_END_MSDU_LENGTH_ERR_LSB                                             20
149*5113495bSYour Name #define RX_MPDU_END_MSDU_LENGTH_ERR_MSB                                             20
150*5113495bSYour Name #define RX_MPDU_END_MSDU_LENGTH_ERR_MASK                                            0x00100000
151*5113495bSYour Name 
152*5113495bSYour Name #define RX_MPDU_END_RXDMA0_DESTINATION_RING_OFFSET                                  0x00000004
153*5113495bSYour Name #define RX_MPDU_END_RXDMA0_DESTINATION_RING_LSB                                     21
154*5113495bSYour Name #define RX_MPDU_END_RXDMA0_DESTINATION_RING_MSB                                     23
155*5113495bSYour Name #define RX_MPDU_END_RXDMA0_DESTINATION_RING_MASK                                    0x00e00000
156*5113495bSYour Name 
157*5113495bSYour Name #define RX_MPDU_END_RXDMA1_DESTINATION_RING_OFFSET                                  0x00000004
158*5113495bSYour Name #define RX_MPDU_END_RXDMA1_DESTINATION_RING_LSB                                     24
159*5113495bSYour Name #define RX_MPDU_END_RXDMA1_DESTINATION_RING_MSB                                     26
160*5113495bSYour Name #define RX_MPDU_END_RXDMA1_DESTINATION_RING_MASK                                    0x07000000
161*5113495bSYour Name 
162*5113495bSYour Name #define RX_MPDU_END_DECRYPT_STATUS_CODE_OFFSET                                      0x00000004
163*5113495bSYour Name #define RX_MPDU_END_DECRYPT_STATUS_CODE_LSB                                         27
164*5113495bSYour Name #define RX_MPDU_END_DECRYPT_STATUS_CODE_MSB                                         29
165*5113495bSYour Name #define RX_MPDU_END_DECRYPT_STATUS_CODE_MASK                                        0x38000000
166*5113495bSYour Name 
167*5113495bSYour Name #define RX_MPDU_END_RX_BITMAP_NOT_UPDATED_OFFSET                                    0x00000004
168*5113495bSYour Name #define RX_MPDU_END_RX_BITMAP_NOT_UPDATED_LSB                                       30
169*5113495bSYour Name #define RX_MPDU_END_RX_BITMAP_NOT_UPDATED_MSB                                       30
170*5113495bSYour Name #define RX_MPDU_END_RX_BITMAP_NOT_UPDATED_MASK                                      0x40000000
171*5113495bSYour Name 
172*5113495bSYour Name #define RX_MPDU_END_RESERVED_1B_OFFSET                                              0x00000004
173*5113495bSYour Name #define RX_MPDU_END_RESERVED_1B_LSB                                                 31
174*5113495bSYour Name #define RX_MPDU_END_RESERVED_1B_MSB                                                 31
175*5113495bSYour Name #define RX_MPDU_END_RESERVED_1B_MASK                                                0x80000000
176*5113495bSYour Name 
177*5113495bSYour Name #define RX_MPDU_END_RESERVED_2A_OFFSET                                              0x00000008
178*5113495bSYour Name #define RX_MPDU_END_RESERVED_2A_LSB                                                 0
179*5113495bSYour Name #define RX_MPDU_END_RESERVED_2A_MSB                                                 14
180*5113495bSYour Name #define RX_MPDU_END_RESERVED_2A_MASK                                                0x00007fff
181*5113495bSYour Name 
182*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_VALID_OFFSET                             0x00000008
183*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_VALID_LSB                                15
184*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_VALID_MSB                                15
185*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_VALID_MASK                               0x00008000
186*5113495bSYour Name 
187*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_OFFSET                                   0x00000008
188*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_LSB                                      16
189*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_MSB                                      31
190*5113495bSYour Name #define RX_MPDU_END_RXPCU_MGMT_SEQUENCE_NR_MASK                                     0xffff0000
191*5113495bSYour Name 
192*5113495bSYour Name #endif
193