xref: /wlan-driver/fw-api/hw/qca5332/rx_frame_bitmap_req.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, 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_FRAME_BITMAP_REQ_H_
27 #define _RX_FRAME_BITMAP_REQ_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_RX_FRAME_BITMAP_REQ 2
32 
33 #define NUM_OF_QWORDS_RX_FRAME_BITMAP_REQ 1
34 
35 
36 struct rx_frame_bitmap_req {
37 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
38              uint32_t explicit_user_request                                   :  1, // [0:0]
39                       user_request_type                                       :  1, // [1:1]
40                       user_number                                             :  6, // [7:2]
41                       sw_peer_id                                              : 16, // [23:8]
42                       tid_specific_request                                    :  1, // [24:24]
43                       requested_tid                                           :  4, // [28:25]
44                       reserved_0                                              :  3; // [31:29]
45              uint32_t tlv64_padding                                           : 32; // [31:0]
46 #else
47              uint32_t reserved_0                                              :  3, // [31:29]
48                       requested_tid                                           :  4, // [28:25]
49                       tid_specific_request                                    :  1, // [24:24]
50                       sw_peer_id                                              : 16, // [23:8]
51                       user_number                                             :  6, // [7:2]
52                       user_request_type                                       :  1, // [1:1]
53                       explicit_user_request                                   :  1; // [0:0]
54              uint32_t tlv64_padding                                           : 32; // [31:0]
55 #endif
56 };
57 
58 
59 /* Description		EXPLICIT_USER_REQUEST
60 
61 			Note: TXCPU is allowed to interleave requests of the two
62 			 different types
63 
64 			Also, for either request, RXPCU shall clear the internal
65 			 flag that linked the bitmap to the just received frame
66 
67 
68 			When set, TXPCU is asking for the bitmap for an explicit
69 			 user. This is typically only to be used after an MU OFDMA
70 			 or MU MIMO  reception. Note that this request can be used
71 			 to retrieve bitmaps that do not necessarily belong to the
72 			 just received PPDU, but might have been generated a while
73 			 ago.
74 
75 			When not set, it is up to RXPCU to decide which bitmap it
76 			 wants to give to TXPCU based on what is available (and
77 			has not been passed on the TXPCU in a previous request,
78 			which might have included a request in the 'Explicit_user_request'
79 			format). This type of request is typically (but not required
80 			 to be) used  in case of a non OFDMA reception, where a
81 			BA needs to be send back as response.
82 			It is mode is typically (but not required to be) used by
83 			 TXPCU in case of sending a Multi STA BA
84 			Note that this request can only be used to retrieve bitmaps
85 			 that are generated as result of the just received PPDU,
86 			and can not be used to retrieve bitmaps of earlier received
87 			 PPDUs.
88 
89 
90 			<legal all>
91 */
92 
93 #define RX_FRAME_BITMAP_REQ_EXPLICIT_USER_REQUEST_OFFSET                            0x0000000000000000
94 #define RX_FRAME_BITMAP_REQ_EXPLICIT_USER_REQUEST_LSB                               0
95 #define RX_FRAME_BITMAP_REQ_EXPLICIT_USER_REQUEST_MSB                               0
96 #define RX_FRAME_BITMAP_REQ_EXPLICIT_USER_REQUEST_MASK                              0x0000000000000001
97 
98 
99 /* Description		USER_REQUEST_TYPE
100 
101 			Field only valid when Explicit_user_request is set
102 
103 			<enum 0 bitmap_req_user_number_based> The request is based
104 			 on a user_number. This method is typically used in case
105 			 of SIFS response for Multi User BA
106 
107 			<enum 1 bitmap_req_sw_peer_id_based> The request is based
108 			 on the sw_peer_id.  This method is typically used in the
109 			 response to response scenario where TXPCU got a new scheduling
110 			 command for the response to response part, and SW now explicitly
111 			 indicates for which STAs a BA shall be requested.
112 			<legal all>
113 */
114 
115 #define RX_FRAME_BITMAP_REQ_USER_REQUEST_TYPE_OFFSET                                0x0000000000000000
116 #define RX_FRAME_BITMAP_REQ_USER_REQUEST_TYPE_LSB                                   1
117 #define RX_FRAME_BITMAP_REQ_USER_REQUEST_TYPE_MSB                                   1
118 #define RX_FRAME_BITMAP_REQ_USER_REQUEST_TYPE_MASK                                  0x0000000000000002
119 
120 
121 /* Description		USER_NUMBER
122 
123 			Field only valid when Explicit_user_request is set
124 			and User_request_type is set to bitmap_req_user_number_based
125 
126 
127 			The user number for which the bitmap is requested.
128 			<legal all>
129 */
130 
131 #define RX_FRAME_BITMAP_REQ_USER_NUMBER_OFFSET                                      0x0000000000000000
132 #define RX_FRAME_BITMAP_REQ_USER_NUMBER_LSB                                         2
133 #define RX_FRAME_BITMAP_REQ_USER_NUMBER_MSB                                         7
134 #define RX_FRAME_BITMAP_REQ_USER_NUMBER_MASK                                        0x00000000000000fc
135 
136 
137 /* Description		SW_PEER_ID
138 
139 			Field only valid when Explicit_user_request is set
140 			and User_request_type is set to bitmap_req_sw_peer_id_based
141 
142 
143 			The sw_peer_id for which the bitmap is requested.
144 			<legal all>
145 */
146 
147 #define RX_FRAME_BITMAP_REQ_SW_PEER_ID_OFFSET                                       0x0000000000000000
148 #define RX_FRAME_BITMAP_REQ_SW_PEER_ID_LSB                                          8
149 #define RX_FRAME_BITMAP_REQ_SW_PEER_ID_MSB                                          23
150 #define RX_FRAME_BITMAP_REQ_SW_PEER_ID_MASK                                         0x0000000000ffff00
151 
152 
153 /* Description		TID_SPECIFIC_REQUEST
154 
155 			Field only valid when Explicit_user_request is set
156 
157 			When set, the request is going out for a specific TID, indicated
158 			 in field TID
159 
160 			When clear, it is up to RXPCU to determine in which order
161 			 it wants to return bitmaps to TXPCU. Note that these bitmaps
162 			 do need to all belong the the requested user, as Explicit_user_request
163 			 has also been set.
164 			<legal all>
165 */
166 
167 #define RX_FRAME_BITMAP_REQ_TID_SPECIFIC_REQUEST_OFFSET                             0x0000000000000000
168 #define RX_FRAME_BITMAP_REQ_TID_SPECIFIC_REQUEST_LSB                                24
169 #define RX_FRAME_BITMAP_REQ_TID_SPECIFIC_REQUEST_MSB                                24
170 #define RX_FRAME_BITMAP_REQ_TID_SPECIFIC_REQUEST_MASK                               0x0000000001000000
171 
172 
173 /* Description		REQUESTED_TID
174 
175 			Field only valid when Explicit_user_request is set
176 			and User_request_type is set to bitmap_req_sw_peer_id_based
177 
178 			and Tid_specific_request is set
179 
180 			The TID for which a BA bitmap is requested
181 			<legal all>
182 */
183 
184 #define RX_FRAME_BITMAP_REQ_REQUESTED_TID_OFFSET                                    0x0000000000000000
185 #define RX_FRAME_BITMAP_REQ_REQUESTED_TID_LSB                                       25
186 #define RX_FRAME_BITMAP_REQ_REQUESTED_TID_MSB                                       28
187 #define RX_FRAME_BITMAP_REQ_REQUESTED_TID_MASK                                      0x000000001e000000
188 
189 
190 /* Description		RESERVED_0
191 
192 			<legal 0>
193 */
194 
195 #define RX_FRAME_BITMAP_REQ_RESERVED_0_OFFSET                                       0x0000000000000000
196 #define RX_FRAME_BITMAP_REQ_RESERVED_0_LSB                                          29
197 #define RX_FRAME_BITMAP_REQ_RESERVED_0_MSB                                          31
198 #define RX_FRAME_BITMAP_REQ_RESERVED_0_MASK                                         0x00000000e0000000
199 
200 
201 /* Description		TLV64_PADDING
202 
203 			Automatic DWORD padding inserted while converting TLV32
204 			to TLV64 for 64 bit ARCH
205 			<legal 0>
206 */
207 
208 #define RX_FRAME_BITMAP_REQ_TLV64_PADDING_OFFSET                                    0x0000000000000000
209 #define RX_FRAME_BITMAP_REQ_TLV64_PADDING_LSB                                       32
210 #define RX_FRAME_BITMAP_REQ_TLV64_PADDING_MSB                                       63
211 #define RX_FRAME_BITMAP_REQ_TLV64_PADDING_MASK                                      0xffffffff00000000
212 
213 
214 
215 #endif   // RX_FRAME_BITMAP_REQ
216