xref: /wlan-driver/fw-api/hw/qcn9224/v1/rx_mpdu_desc_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _RX_MPDU_DESC_INFO_H_
27 #define _RX_MPDU_DESC_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2
32 
33 
34 struct rx_mpdu_desc_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint32_t msdu_count                                              :  8,
37                       fragment_flag                                           :  1,
38                       mpdu_retry_bit                                          :  1,
39                       ampdu_flag                                              :  1,
40                       bar_frame                                               :  1,
41                       pn_fields_contain_valid_info                            :  1,
42                       raw_mpdu                                                :  1,
43                       more_fragment_flag                                      :  1,
44                       src_info                                                : 12,
45                       mpdu_qos_control_valid                                  :  1,
46                       tid                                                     :  4;
47              uint32_t peer_meta_data                                          : 32;
48 #else
49              uint32_t tid                                                     :  4,
50                       mpdu_qos_control_valid                                  :  1,
51                       src_info                                                : 12,
52                       more_fragment_flag                                      :  1,
53                       raw_mpdu                                                :  1,
54                       pn_fields_contain_valid_info                            :  1,
55                       bar_frame                                               :  1,
56                       ampdu_flag                                              :  1,
57                       mpdu_retry_bit                                          :  1,
58                       fragment_flag                                           :  1,
59                       msdu_count                                              :  8;
60              uint32_t peer_meta_data                                          : 32;
61 #endif
62 };
63 
64 
65 
66 
67 #define RX_MPDU_DESC_INFO_MSDU_COUNT_OFFSET                                         0x00000000
68 #define RX_MPDU_DESC_INFO_MSDU_COUNT_LSB                                            0
69 #define RX_MPDU_DESC_INFO_MSDU_COUNT_MSB                                            7
70 #define RX_MPDU_DESC_INFO_MSDU_COUNT_MASK                                           0x000000ff
71 
72 
73 
74 
75 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_OFFSET                                      0x00000000
76 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_LSB                                         8
77 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MSB                                         8
78 #define RX_MPDU_DESC_INFO_FRAGMENT_FLAG_MASK                                        0x00000100
79 
80 
81 
82 
83 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_OFFSET                                     0x00000000
84 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_LSB                                        9
85 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MSB                                        9
86 #define RX_MPDU_DESC_INFO_MPDU_RETRY_BIT_MASK                                       0x00000200
87 
88 
89 
90 
91 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_OFFSET                                         0x00000000
92 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_LSB                                            10
93 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MSB                                            10
94 #define RX_MPDU_DESC_INFO_AMPDU_FLAG_MASK                                           0x00000400
95 
96 
97 
98 
99 #define RX_MPDU_DESC_INFO_BAR_FRAME_OFFSET                                          0x00000000
100 #define RX_MPDU_DESC_INFO_BAR_FRAME_LSB                                             11
101 #define RX_MPDU_DESC_INFO_BAR_FRAME_MSB                                             11
102 #define RX_MPDU_DESC_INFO_BAR_FRAME_MASK                                            0x00000800
103 
104 
105 
106 
107 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET                       0x00000000
108 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_LSB                          12
109 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MSB                          12
110 #define RX_MPDU_DESC_INFO_PN_FIELDS_CONTAIN_VALID_INFO_MASK                         0x00001000
111 
112 
113 
114 
115 #define RX_MPDU_DESC_INFO_RAW_MPDU_OFFSET                                           0x00000000
116 #define RX_MPDU_DESC_INFO_RAW_MPDU_LSB                                              13
117 #define RX_MPDU_DESC_INFO_RAW_MPDU_MSB                                              13
118 #define RX_MPDU_DESC_INFO_RAW_MPDU_MASK                                             0x00002000
119 
120 
121 
122 
123 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_OFFSET                                 0x00000000
124 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_LSB                                    14
125 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MSB                                    14
126 #define RX_MPDU_DESC_INFO_MORE_FRAGMENT_FLAG_MASK                                   0x00004000
127 
128 
129 
130 
131 #define RX_MPDU_DESC_INFO_SRC_INFO_OFFSET                                           0x00000000
132 #define RX_MPDU_DESC_INFO_SRC_INFO_LSB                                              15
133 #define RX_MPDU_DESC_INFO_SRC_INFO_MSB                                              26
134 #define RX_MPDU_DESC_INFO_SRC_INFO_MASK                                             0x07ff8000
135 
136 
137 
138 
139 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_OFFSET                             0x00000000
140 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_LSB                                27
141 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MSB                                27
142 #define RX_MPDU_DESC_INFO_MPDU_QOS_CONTROL_VALID_MASK                               0x08000000
143 
144 
145 
146 
147 #define RX_MPDU_DESC_INFO_TID_OFFSET                                                0x00000000
148 #define RX_MPDU_DESC_INFO_TID_LSB                                                   28
149 #define RX_MPDU_DESC_INFO_TID_MSB                                                   31
150 #define RX_MPDU_DESC_INFO_TID_MASK                                                  0xf0000000
151 
152 
153 
154 
155 #define RX_MPDU_DESC_INFO_PEER_META_DATA_OFFSET                                     0x00000004
156 #define RX_MPDU_DESC_INFO_PEER_META_DATA_LSB                                        0
157 #define RX_MPDU_DESC_INFO_PEER_META_DATA_MSB                                        31
158 #define RX_MPDU_DESC_INFO_PEER_META_DATA_MASK                                       0xffffffff
159 
160 
161 
162 #endif
163