1
2
3
4
5#include "core.h"
6
7#ifndef ATH11K_HAL_DESC_H
8#define ATH11K_HAL_DESC_H
9
10#define BUFFER_ADDR_INFO0_ADDR GENMASK(31, 0)
11
12#define BUFFER_ADDR_INFO1_ADDR GENMASK(7, 0)
13#define BUFFER_ADDR_INFO1_RET_BUF_MGR GENMASK(10, 8)
14#define BUFFER_ADDR_INFO1_SW_COOKIE GENMASK(31, 11)
15
16struct ath11k_buffer_addr {
17 u32 info0;
18 u32 info1;
19} __packed;
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50enum hal_tlv_tag {
51 HAL_MACTX_CBF_START = 0 ,
52 HAL_PHYRX_DATA = 1 ,
53 HAL_PHYRX_CBF_DATA_RESP = 2 ,
54 HAL_PHYRX_ABORT_REQUEST = 3 ,
55 HAL_PHYRX_USER_ABORT_NOTIFICATION = 4 ,
56 HAL_MACTX_DATA_RESP = 5 ,
57 HAL_MACTX_CBF_DATA = 6 ,
58 HAL_MACTX_CBF_DONE = 7 ,
59 HAL_MACRX_CBF_READ_REQUEST = 8 ,
60 HAL_MACRX_CBF_DATA_REQUEST = 9 ,
61 HAL_MACRX_EXPECT_NDP_RECEPTION = 10 ,
62 HAL_MACRX_FREEZE_CAPTURE_CHANNEL = 11 ,
63 HAL_MACRX_NDP_TIMEOUT = 12 ,
64 HAL_MACRX_ABORT_ACK = 13 ,
65 HAL_MACRX_REQ_IMPLICIT_FB = 14 ,
66 HAL_MACRX_CHAIN_MASK = 15 ,
67 HAL_MACRX_NAP_USER = 16 ,
68 HAL_MACRX_ABORT_REQUEST = 17 ,
69 HAL_PHYTX_OTHER_TRANSMIT_INFO16 = 18 ,
70 HAL_PHYTX_ABORT_ACK = 19 ,
71 HAL_PHYTX_ABORT_REQUEST = 20 ,
72 HAL_PHYTX_PKT_END = 21 ,
73 HAL_PHYTX_PPDU_HEADER_INFO_REQUEST = 22 ,
74 HAL_PHYTX_REQUEST_CTRL_INFO = 23 ,
75 HAL_PHYTX_DATA_REQUEST = 24 ,
76 HAL_PHYTX_BF_CV_LOADING_DONE = 25 ,
77 HAL_PHYTX_NAP_ACK = 26 ,
78 HAL_PHYTX_NAP_DONE = 27 ,
79 HAL_PHYTX_OFF_ACK = 28 ,
80 HAL_PHYTX_ON_ACK = 29 ,
81 HAL_PHYTX_SYNTH_OFF_ACK = 30 ,
82 HAL_PHYTX_DEBUG16 = 31 ,
83 HAL_MACTX_ABORT_REQUEST = 32 ,
84 HAL_MACTX_ABORT_ACK = 33 ,
85 HAL_MACTX_PKT_END = 34 ,
86 HAL_MACTX_PRE_PHY_DESC = 35 ,
87 HAL_MACTX_BF_PARAMS_COMMON = 36 ,
88 HAL_MACTX_BF_PARAMS_PER_USER = 37 ,
89 HAL_MACTX_PREFETCH_CV = 38 ,
90 HAL_MACTX_USER_DESC_COMMON = 39 ,
91 HAL_MACTX_USER_DESC_PER_USER = 40 ,
92 HAL_EXAMPLE_USER_TLV_16 = 41 ,
93 HAL_EXAMPLE_TLV_16 = 42 ,
94 HAL_MACTX_PHY_OFF = 43 ,
95 HAL_MACTX_PHY_ON = 44 ,
96 HAL_MACTX_SYNTH_OFF = 45 ,
97 HAL_MACTX_EXPECT_CBF_COMMON = 46 ,
98 HAL_MACTX_EXPECT_CBF_PER_USER = 47 ,
99 HAL_MACTX_PHY_DESC = 48 ,
100 HAL_MACTX_L_SIG_A = 49 ,
101 HAL_MACTX_L_SIG_B = 50 ,
102 HAL_MACTX_HT_SIG = 51 ,
103 HAL_MACTX_VHT_SIG_A = 52 ,
104 HAL_MACTX_VHT_SIG_B_SU20 = 53 ,
105 HAL_MACTX_VHT_SIG_B_SU40 = 54 ,
106 HAL_MACTX_VHT_SIG_B_SU80 = 55 ,
107 HAL_MACTX_VHT_SIG_B_SU160 = 56 ,
108 HAL_MACTX_VHT_SIG_B_MU20 = 57 ,
109 HAL_MACTX_VHT_SIG_B_MU40 = 58 ,
110 HAL_MACTX_VHT_SIG_B_MU80 = 59 ,
111 HAL_MACTX_VHT_SIG_B_MU160 = 60 ,
112 HAL_MACTX_SERVICE = 61 ,
113 HAL_MACTX_HE_SIG_A_SU = 62 ,
114 HAL_MACTX_HE_SIG_A_MU_DL = 63 ,
115 HAL_MACTX_HE_SIG_A_MU_UL = 64 ,
116 HAL_MACTX_HE_SIG_B1_MU = 65 ,
117 HAL_MACTX_HE_SIG_B2_MU = 66 ,
118 HAL_MACTX_HE_SIG_B2_OFDMA = 67 ,
119 HAL_MACTX_DELETE_CV = 68 ,
120 HAL_MACTX_MU_UPLINK_COMMON = 69 ,
121 HAL_MACTX_MU_UPLINK_USER_SETUP = 70 ,
122 HAL_MACTX_OTHER_TRANSMIT_INFO = 71 ,
123 HAL_MACTX_PHY_NAP = 72 ,
124 HAL_MACTX_DEBUG = 73 ,
125 HAL_PHYRX_ABORT_ACK = 74 ,
126 HAL_PHYRX_GENERATED_CBF_DETAILS = 75 ,
127 HAL_PHYRX_RSSI_LEGACY = 76 ,
128 HAL_PHYRX_RSSI_HT = 77 ,
129 HAL_PHYRX_USER_INFO = 78 ,
130 HAL_PHYRX_PKT_END = 79 ,
131 HAL_PHYRX_DEBUG = 80 ,
132 HAL_PHYRX_CBF_TRANSFER_DONE = 81 ,
133 HAL_PHYRX_CBF_TRANSFER_ABORT = 82 ,
134 HAL_PHYRX_L_SIG_A = 83 ,
135 HAL_PHYRX_L_SIG_B = 84 ,
136 HAL_PHYRX_HT_SIG = 85 ,
137 HAL_PHYRX_VHT_SIG_A = 86 ,
138 HAL_PHYRX_VHT_SIG_B_SU20 = 87 ,
139 HAL_PHYRX_VHT_SIG_B_SU40 = 88 ,
140 HAL_PHYRX_VHT_SIG_B_SU80 = 89 ,
141 HAL_PHYRX_VHT_SIG_B_SU160 = 90 ,
142 HAL_PHYRX_VHT_SIG_B_MU20 = 91 ,
143 HAL_PHYRX_VHT_SIG_B_MU40 = 92 ,
144 HAL_PHYRX_VHT_SIG_B_MU80 = 93 ,
145 HAL_PHYRX_VHT_SIG_B_MU160 = 94 ,
146 HAL_PHYRX_HE_SIG_A_SU = 95 ,
147 HAL_PHYRX_HE_SIG_A_MU_DL = 96 ,
148 HAL_PHYRX_HE_SIG_A_MU_UL = 97 ,
149 HAL_PHYRX_HE_SIG_B1_MU = 98 ,
150 HAL_PHYRX_HE_SIG_B2_MU = 99 ,
151 HAL_PHYRX_HE_SIG_B2_OFDMA = 100 ,
152 HAL_PHYRX_OTHER_RECEIVE_INFO = 101 ,
153 HAL_PHYRX_COMMON_USER_INFO = 102 ,
154 HAL_PHYRX_DATA_DONE = 103 ,
155 HAL_RECEIVE_RSSI_INFO = 104 ,
156 HAL_RECEIVE_USER_INFO = 105 ,
157 HAL_MIMO_CONTROL_INFO = 106 ,
158 HAL_RX_LOCATION_INFO = 107 ,
159 HAL_COEX_TX_REQ = 108 ,
160 HAL_DUMMY = 109 ,
161 HAL_RX_TIMING_OFFSET_INFO = 110 ,
162 HAL_EXAMPLE_TLV_32_NAME = 111 ,
163 HAL_MPDU_LIMIT = 112 ,
164 HAL_NA_LENGTH_END = 113 ,
165 HAL_OLE_BUF_STATUS = 114 ,
166 HAL_PCU_PPDU_SETUP_DONE = 115 ,
167 HAL_PCU_PPDU_SETUP_END = 116 ,
168 HAL_PCU_PPDU_SETUP_INIT = 117 ,
169 HAL_PCU_PPDU_SETUP_START = 118 ,
170 HAL_PDG_FES_SETUP = 119 ,
171 HAL_PDG_RESPONSE = 120 ,
172 HAL_PDG_TX_REQ = 121 ,
173 HAL_SCH_WAIT_INSTR = 122 ,
174 HAL_SCHEDULER_TLV = 123 ,
175 HAL_TQM_FLOW_EMPTY_STATUS = 124 ,
176 HAL_TQM_FLOW_NOT_EMPTY_STATUS = 125 ,
177 HAL_TQM_GEN_MPDU_LENGTH_LIST = 126 ,
178 HAL_TQM_GEN_MPDU_LENGTH_LIST_STATUS = 127 ,
179 HAL_TQM_GEN_MPDUS = 128 ,
180 HAL_TQM_GEN_MPDUS_STATUS = 129 ,
181 HAL_TQM_REMOVE_MPDU = 130 ,
182 HAL_TQM_REMOVE_MPDU_STATUS = 131 ,
183 HAL_TQM_REMOVE_MSDU = 132 ,
184 HAL_TQM_REMOVE_MSDU_STATUS = 133 ,
185 HAL_TQM_UPDATE_TX_MPDU_COUNT = 134 ,
186 HAL_TQM_WRITE_CMD = 135 ,
187 HAL_OFDMA_TRIGGER_DETAILS = 136 ,
188 HAL_TX_DATA = 137 ,
189 HAL_TX_FES_SETUP = 138 ,
190 HAL_RX_PACKET = 139 ,
191 HAL_EXPECTED_RESPONSE = 140 ,
192 HAL_TX_MPDU_END = 141 ,
193 HAL_TX_MPDU_START = 142 ,
194 HAL_TX_MSDU_END = 143 ,
195 HAL_TX_MSDU_START = 144 ,
196 HAL_TX_SW_MODE_SETUP = 145 ,
197 HAL_TXPCU_BUFFER_STATUS = 146 ,
198 HAL_TXPCU_USER_BUFFER_STATUS = 147 ,
199 HAL_DATA_TO_TIME_CONFIG = 148 ,
200 HAL_EXAMPLE_USER_TLV_32 = 149 ,
201 HAL_MPDU_INFO = 150 ,
202 HAL_PDG_USER_SETUP = 151 ,
203 HAL_TX_11AH_SETUP = 152 ,
204 HAL_REO_UPDATE_RX_REO_QUEUE_STATUS = 153 ,
205 HAL_TX_PEER_ENTRY = 154 ,
206 HAL_TX_RAW_OR_NATIVE_FRAME_SETUP = 155 ,
207 HAL_EXAMPLE_STRUCT_NAME = 156 ,
208 HAL_PCU_PPDU_SETUP_END_INFO = 157 ,
209 HAL_PPDU_RATE_SETTING = 158 ,
210 HAL_PROT_RATE_SETTING = 159 ,
211 HAL_RX_MPDU_DETAILS = 160 ,
212 HAL_EXAMPLE_USER_TLV_42 = 161 ,
213 HAL_RX_MSDU_LINK = 162 ,
214 HAL_RX_REO_QUEUE = 163 ,
215 HAL_ADDR_SEARCH_ENTRY = 164 ,
216 HAL_SCHEDULER_CMD = 165 ,
217 HAL_TX_FLUSH = 166 ,
218 HAL_TQM_ENTRANCE_RING = 167 ,
219 HAL_TX_DATA_WORD = 168 ,
220 HAL_TX_MPDU_DETAILS = 169 ,
221 HAL_TX_MPDU_LINK = 170 ,
222 HAL_TX_MPDU_LINK_PTR = 171 ,
223 HAL_TX_MPDU_QUEUE_HEAD = 172 ,
224 HAL_TX_MPDU_QUEUE_EXT = 173 ,
225 HAL_TX_MPDU_QUEUE_EXT_PTR = 174 ,
226 HAL_TX_MSDU_DETAILS = 175 ,
227 HAL_TX_MSDU_EXTENSION = 176 ,
228 HAL_TX_MSDU_FLOW = 177 ,
229 HAL_TX_MSDU_LINK = 178 ,
230 HAL_TX_MSDU_LINK_ENTRY_PTR = 179 ,
231 HAL_RESPONSE_RATE_SETTING = 180 ,
232 HAL_TXPCU_BUFFER_BASICS = 181 ,
233 HAL_UNIFORM_DESCRIPTOR_HEADER = 182 ,
234 HAL_UNIFORM_TQM_CMD_HEADER = 183 ,
235 HAL_UNIFORM_TQM_STATUS_HEADER = 184 ,
236 HAL_USER_RATE_SETTING = 185 ,
237 HAL_WBM_BUFFER_RING = 186 ,
238 HAL_WBM_LINK_DESCRIPTOR_RING = 187 ,
239 HAL_WBM_RELEASE_RING = 188 ,
240 HAL_TX_FLUSH_REQ = 189 ,
241 HAL_RX_MSDU_DETAILS = 190 ,
242 HAL_TQM_WRITE_CMD_STATUS = 191 ,
243 HAL_TQM_GET_MPDU_QUEUE_STATS = 192 ,
244 HAL_TQM_GET_MSDU_FLOW_STATS = 193 ,
245 HAL_EXAMPLE_USER_CTLV_32 = 194 ,
246 HAL_TX_FES_STATUS_START = 195 ,
247 HAL_TX_FES_STATUS_USER_PPDU = 196 ,
248 HAL_TX_FES_STATUS_USER_RESPONSE = 197 ,
249 HAL_TX_FES_STATUS_END = 198 ,
250 HAL_RX_TRIG_INFO = 199 ,
251 HAL_RXPCU_TX_SETUP_CLEAR = 200 ,
252 HAL_RX_FRAME_BITMAP_REQ = 201 ,
253 HAL_RX_FRAME_BITMAP_ACK = 202 ,
254 HAL_COEX_RX_STATUS = 203 ,
255 HAL_RX_START_PARAM = 204 ,
256 HAL_RX_PPDU_START = 205 ,
257 HAL_RX_PPDU_END = 206 ,
258 HAL_RX_MPDU_START = 207 ,
259 HAL_RX_MPDU_END = 208 ,
260 HAL_RX_MSDU_START = 209 ,
261 HAL_RX_MSDU_END = 210 ,
262 HAL_RX_ATTENTION = 211 ,
263 HAL_RECEIVED_RESPONSE_INFO = 212 ,
264 HAL_RX_PHY_SLEEP = 213 ,
265 HAL_RX_HEADER = 214 ,
266 HAL_RX_PEER_ENTRY = 215 ,
267 HAL_RX_FLUSH = 216 ,
268 HAL_RX_RESPONSE_REQUIRED_INFO = 217 ,
269 HAL_RX_FRAMELESS_BAR_DETAILS = 218 ,
270 HAL_TQM_GET_MPDU_QUEUE_STATS_STATUS = 219 ,
271 HAL_TQM_GET_MSDU_FLOW_STATS_STATUS = 220 ,
272 HAL_TX_CBF_INFO = 221 ,
273 HAL_PCU_PPDU_SETUP_USER = 222 ,
274 HAL_RX_MPDU_PCU_START = 223 ,
275 HAL_RX_PM_INFO = 224 ,
276 HAL_RX_USER_PPDU_END = 225 ,
277 HAL_RX_PRE_PPDU_START = 226 ,
278 HAL_RX_PREAMBLE = 227 ,
279 HAL_TX_FES_SETUP_COMPLETE = 228 ,
280 HAL_TX_LAST_MPDU_FETCHED = 229 ,
281 HAL_TXDMA_STOP_REQUEST = 230 ,
282 HAL_RXPCU_SETUP = 231 ,
283 HAL_RXPCU_USER_SETUP = 232 ,
284 HAL_TX_FES_STATUS_ACK_OR_BA = 233 ,
285 HAL_TQM_ACKED_MPDU = 234 ,
286 HAL_COEX_TX_RESP = 235 ,
287 HAL_COEX_TX_STATUS = 236 ,
288 HAL_MACTX_COEX_PHY_CTRL = 237 ,
289 HAL_COEX_STATUS_BROADCAST = 238 ,
290 HAL_RESPONSE_START_STATUS = 239 ,
291 HAL_RESPONSE_END_STATUS = 240 ,
292 HAL_CRYPTO_STATUS = 241 ,
293 HAL_RECEIVED_TRIGGER_INFO = 242 ,
294 HAL_REO_ENTRANCE_RING = 243 ,
295 HAL_RX_MPDU_LINK = 244 ,
296 HAL_COEX_TX_STOP_CTRL = 245 ,
297 HAL_RX_PPDU_ACK_REPORT = 246 ,
298 HAL_RX_PPDU_NO_ACK_REPORT = 247 ,
299 HAL_SCH_COEX_STATUS = 248 ,
300 HAL_SCHEDULER_COMMAND_STATUS = 249 ,
301 HAL_SCHEDULER_RX_PPDU_NO_RESPONSE_STATUS = 250 ,
302 HAL_TX_FES_STATUS_PROT = 251 ,
303 HAL_TX_FES_STATUS_START_PPDU = 252 ,
304 HAL_TX_FES_STATUS_START_PROT = 253 ,
305 HAL_TXPCU_PHYTX_DEBUG32 = 254 ,
306 HAL_TXPCU_PHYTX_OTHER_TRANSMIT_INFO32 = 255 ,
307 HAL_TX_MPDU_COUNT_TRANSFER_END = 256 ,
308 HAL_WHO_ANCHOR_OFFSET = 257 ,
309 HAL_WHO_ANCHOR_VALUE = 258 ,
310 HAL_WHO_CCE_INFO = 259 ,
311 HAL_WHO_COMMIT = 260 ,
312 HAL_WHO_COMMIT_DONE = 261 ,
313 HAL_WHO_FLUSH = 262 ,
314 HAL_WHO_L2_LLC = 263 ,
315 HAL_WHO_L2_PAYLOAD = 264 ,
316 HAL_WHO_L3_CHECKSUM = 265 ,
317 HAL_WHO_L3_INFO = 266 ,
318 HAL_WHO_L4_CHECKSUM = 267 ,
319 HAL_WHO_L4_INFO = 268 ,
320 HAL_WHO_MSDU = 269 ,
321 HAL_WHO_MSDU_MISC = 270 ,
322 HAL_WHO_PACKET_DATA = 271 ,
323 HAL_WHO_PACKET_HDR = 272 ,
324 HAL_WHO_PPDU_END = 273 ,
325 HAL_WHO_PPDU_START = 274 ,
326 HAL_WHO_TSO = 275 ,
327 HAL_WHO_WMAC_HEADER_PV0 = 276 ,
328 HAL_WHO_WMAC_HEADER_PV1 = 277 ,
329 HAL_WHO_WMAC_IV = 278 ,
330 HAL_MPDU_INFO_END = 279 ,
331 HAL_MPDU_INFO_BITMAP = 280 ,
332 HAL_TX_QUEUE_EXTENSION = 281 ,
333 HAL_RX_PEER_ENTRY_DETAILS = 282 ,
334 HAL_RX_REO_QUEUE_REFERENCE = 283 ,
335 HAL_RX_REO_QUEUE_EXT = 284 ,
336 HAL_SCHEDULER_SELFGEN_RESPONSE_STATUS = 285 ,
337 HAL_TQM_UPDATE_TX_MPDU_COUNT_STATUS = 286 ,
338 HAL_TQM_ACKED_MPDU_STATUS = 287 ,
339 HAL_TQM_ADD_MSDU_STATUS = 288 ,
340 HAL_RX_MPDU_LINK_PTR = 289 ,
341 HAL_REO_DESTINATION_RING = 290 ,
342 HAL_TQM_LIST_GEN_DONE = 291 ,
343 HAL_WHO_TERMINATE = 292 ,
344 HAL_TX_LAST_MPDU_END = 293 ,
345 HAL_TX_CV_DATA = 294 ,
346 HAL_TCL_ENTRANCE_FROM_PPE_RING = 295 ,
347 HAL_PPDU_TX_END = 296 ,
348 HAL_PROT_TX_END = 297 ,
349 HAL_PDG_RESPONSE_RATE_SETTING = 298 ,
350 HAL_MPDU_INFO_GLOBAL_END = 299 ,
351 HAL_TQM_SCH_INSTR_GLOBAL_END = 300 ,
352 HAL_RX_PPDU_END_USER_STATS = 301 ,
353 HAL_RX_PPDU_END_USER_STATS_EXT = 302 ,
354 HAL_NO_ACK_REPORT = 303 ,
355 HAL_ACK_REPORT = 304 ,
356 HAL_UNIFORM_REO_CMD_HEADER = 305 ,
357 HAL_REO_GET_QUEUE_STATS = 306 ,
358 HAL_REO_FLUSH_QUEUE = 307 ,
359 HAL_REO_FLUSH_CACHE = 308 ,
360 HAL_REO_UNBLOCK_CACHE = 309 ,
361 HAL_UNIFORM_REO_STATUS_HEADER = 310 ,
362 HAL_REO_GET_QUEUE_STATS_STATUS = 311 ,
363 HAL_REO_FLUSH_QUEUE_STATUS = 312 ,
364 HAL_REO_FLUSH_CACHE_STATUS = 313 ,
365 HAL_REO_UNBLOCK_CACHE_STATUS = 314 ,
366 HAL_TQM_FLUSH_CACHE = 315 ,
367 HAL_TQM_UNBLOCK_CACHE = 316 ,
368 HAL_TQM_FLUSH_CACHE_STATUS = 317 ,
369 HAL_TQM_UNBLOCK_CACHE_STATUS = 318 ,
370 HAL_RX_PPDU_END_STATUS_DONE = 319 ,
371 HAL_RX_STATUS_BUFFER_DONE = 320 ,
372 HAL_BUFFER_ADDR_INFO = 321 ,
373 HAL_RX_MSDU_DESC_INFO = 322 ,
374 HAL_RX_MPDU_DESC_INFO = 323 ,
375 HAL_TCL_DATA_CMD = 324 ,
376 HAL_TCL_GSE_CMD = 325 ,
377 HAL_TCL_EXIT_BASE = 326 ,
378 HAL_TCL_COMPACT_EXIT_RING = 327 ,
379 HAL_TCL_REGULAR_EXIT_RING = 328 ,
380 HAL_TCL_EXTENDED_EXIT_RING = 329 ,
381 HAL_UPLINK_COMMON_INFO = 330 ,
382 HAL_UPLINK_USER_SETUP_INFO = 331 ,
383 HAL_TX_DATA_SYNC = 332 ,
384 HAL_PHYRX_CBF_READ_REQUEST_ACK = 333 ,
385 HAL_TCL_STATUS_RING = 334 ,
386 HAL_TQM_GET_MPDU_HEAD_INFO = 335 ,
387 HAL_TQM_SYNC_CMD = 336 ,
388 HAL_TQM_GET_MPDU_HEAD_INFO_STATUS = 337 ,
389 HAL_TQM_SYNC_CMD_STATUS = 338 ,
390 HAL_TQM_THRESHOLD_DROP_NOTIFICATION_STATUS = 339 ,
391 HAL_TQM_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 340 ,
392 HAL_REO_FLUSH_TIMEOUT_LIST = 341 ,
393 HAL_REO_FLUSH_TIMEOUT_LIST_STATUS = 342 ,
394 HAL_REO_TO_PPE_RING = 343 ,
395 HAL_RX_MPDU_INFO = 344 ,
396 HAL_REO_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 345 ,
397 HAL_SCHEDULER_RX_SIFS_RESPONSE_TRIGGER_STATUS = 346 ,
398 HAL_EXAMPLE_USER_TLV_32_NAME = 347 ,
399 HAL_RX_PPDU_START_USER_INFO = 348 ,
400 HAL_RX_RXPCU_CLASSIFICATION_OVERVIEW = 349 ,
401 HAL_RX_RING_MASK = 350 ,
402 HAL_WHO_CLASSIFY_INFO = 351 ,
403 HAL_TXPT_CLASSIFY_INFO = 352 ,
404 HAL_RXPT_CLASSIFY_INFO = 353 ,
405 HAL_TX_FLOW_SEARCH_ENTRY = 354 ,
406 HAL_RX_FLOW_SEARCH_ENTRY = 355 ,
407 HAL_RECEIVED_TRIGGER_INFO_DETAILS = 356 ,
408 HAL_COEX_MAC_NAP = 357 ,
409 HAL_MACRX_ABORT_REQUEST_INFO = 358 ,
410 HAL_MACTX_ABORT_REQUEST_INFO = 359 ,
411 HAL_PHYRX_ABORT_REQUEST_INFO = 360 ,
412 HAL_PHYTX_ABORT_REQUEST_INFO = 361 ,
413 HAL_RXPCU_PPDU_END_INFO = 362 ,
414 HAL_WHO_MESH_CONTROL = 363 ,
415 HAL_L_SIG_A_INFO = 364 ,
416 HAL_L_SIG_B_INFO = 365 ,
417 HAL_HT_SIG_INFO = 366 ,
418 HAL_VHT_SIG_A_INFO = 367 ,
419 HAL_VHT_SIG_B_SU20_INFO = 368 ,
420 HAL_VHT_SIG_B_SU40_INFO = 369 ,
421 HAL_VHT_SIG_B_SU80_INFO = 370 ,
422 HAL_VHT_SIG_B_SU160_INFO = 371 ,
423 HAL_VHT_SIG_B_MU20_INFO = 372 ,
424 HAL_VHT_SIG_B_MU40_INFO = 373 ,
425 HAL_VHT_SIG_B_MU80_INFO = 374 ,
426 HAL_VHT_SIG_B_MU160_INFO = 375 ,
427 HAL_SERVICE_INFO = 376 ,
428 HAL_HE_SIG_A_SU_INFO = 377 ,
429 HAL_HE_SIG_A_MU_DL_INFO = 378 ,
430 HAL_HE_SIG_A_MU_UL_INFO = 379 ,
431 HAL_HE_SIG_B1_MU_INFO = 380 ,
432 HAL_HE_SIG_B2_MU_INFO = 381 ,
433 HAL_HE_SIG_B2_OFDMA_INFO = 382 ,
434 HAL_PDG_SW_MODE_BW_START = 383 ,
435 HAL_PDG_SW_MODE_BW_END = 384 ,
436 HAL_PDG_WAIT_FOR_MAC_REQUEST = 385 ,
437 HAL_PDG_WAIT_FOR_PHY_REQUEST = 386 ,
438 HAL_SCHEDULER_END = 387 ,
439 HAL_PEER_TABLE_ENTRY = 388 ,
440 HAL_SW_PEER_INFO = 389 ,
441 HAL_RXOLE_CCE_CLASSIFY_INFO = 390 ,
442 HAL_TCL_CCE_CLASSIFY_INFO = 391 ,
443 HAL_RXOLE_CCE_INFO = 392 ,
444 HAL_TCL_CCE_INFO = 393 ,
445 HAL_TCL_CCE_SUPERRULE = 394 ,
446 HAL_CCE_RULE = 395 ,
447 HAL_RX_PPDU_START_DROPPED = 396 ,
448 HAL_RX_PPDU_END_DROPPED = 397 ,
449 HAL_RX_PPDU_END_STATUS_DONE_DROPPED = 398 ,
450 HAL_RX_MPDU_START_DROPPED = 399 ,
451 HAL_RX_MSDU_START_DROPPED = 400 ,
452 HAL_RX_MSDU_END_DROPPED = 401 ,
453 HAL_RX_MPDU_END_DROPPED = 402 ,
454 HAL_RX_ATTENTION_DROPPED = 403 ,
455 HAL_TXPCU_USER_SETUP = 404 ,
456 HAL_RXPCU_USER_SETUP_EXT = 405 ,
457 HAL_CE_SRC_DESC = 406 ,
458 HAL_CE_STAT_DESC = 407 ,
459 HAL_RXOLE_CCE_SUPERRULE = 408 ,
460 HAL_TX_RATE_STATS_INFO = 409 ,
461 HAL_CMD_PART_0_END = 410 ,
462 HAL_MACTX_SYNTH_ON = 411 ,
463 HAL_SCH_CRITICAL_TLV_REFERENCE = 412 ,
464 HAL_TQM_MPDU_GLOBAL_START = 413 ,
465 HAL_EXAMPLE_TLV_32 = 414 ,
466 HAL_TQM_UPDATE_TX_MSDU_FLOW = 415 ,
467 HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD = 416 ,
468 HAL_TQM_UPDATE_TX_MSDU_FLOW_STATUS = 417 ,
469 HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD_STATUS = 418 ,
470 HAL_REO_UPDATE_RX_REO_QUEUE = 419 ,
471 HAL_CE_DST_DESC = 420 ,
472 HAL_TLV_BASE = 511 ,
473};
474
475#define HAL_TLV_HDR_TAG GENMASK(9, 1)
476#define HAL_TLV_HDR_LEN GENMASK(25, 10)
477
478#define HAL_TLV_ALIGN 4
479
480struct hal_tlv_hdr {
481 u32 tl;
482 u8 value[];
483} __packed;
484
485#define RX_MPDU_DESC_INFO0_MSDU_COUNT GENMASK(7, 0)
486#define RX_MPDU_DESC_INFO0_SEQ_NUM GENMASK(19, 8)
487#define RX_MPDU_DESC_INFO0_FRAG_FLAG BIT(20)
488#define RX_MPDU_DESC_INFO0_MPDU_RETRY BIT(21)
489#define RX_MPDU_DESC_INFO0_AMPDU_FLAG BIT(22)
490#define RX_MPDU_DESC_INFO0_BAR_FRAME BIT(23)
491#define RX_MPDU_DESC_INFO0_VALID_PN BIT(24)
492#define RX_MPDU_DESC_INFO0_VALID_SA BIT(25)
493#define RX_MPDU_DESC_INFO0_SA_IDX_TIMEOUT BIT(26)
494#define RX_MPDU_DESC_INFO0_VALID_DA BIT(27)
495#define RX_MPDU_DESC_INFO0_DA_MCBC BIT(28)
496#define RX_MPDU_DESC_INFO0_DA_IDX_TIMEOUT BIT(29)
497#define RX_MPDU_DESC_INFO0_RAW_MPDU BIT(30)
498
499struct rx_mpdu_desc {
500 u32 info0;
501 u32 meta_data;
502} __packed;
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560enum hal_rx_msdu_desc_reo_dest_ind {
561 HAL_RX_MSDU_DESC_REO_DEST_IND_TCL,
562 HAL_RX_MSDU_DESC_REO_DEST_IND_SW1,
563 HAL_RX_MSDU_DESC_REO_DEST_IND_SW2,
564 HAL_RX_MSDU_DESC_REO_DEST_IND_SW3,
565 HAL_RX_MSDU_DESC_REO_DEST_IND_SW4,
566 HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE,
567 HAL_RX_MSDU_DESC_REO_DEST_IND_FW,
568};
569
570#define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU BIT(0)
571#define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU BIT(1)
572#define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION BIT(2)
573#define RX_MSDU_DESC_INFO0_MSDU_LENGTH GENMASK(16, 3)
574#define RX_MSDU_DESC_INFO0_REO_DEST_IND GENMASK(21, 17)
575#define RX_MSDU_DESC_INFO0_MSDU_DROP BIT(22)
576#define RX_MSDU_DESC_INFO0_VALID_SA BIT(23)
577#define RX_MSDU_DESC_INFO0_SA_IDX_TIMEOUT BIT(24)
578#define RX_MSDU_DESC_INFO0_VALID_DA BIT(25)
579#define RX_MSDU_DESC_INFO0_DA_MCBC BIT(26)
580#define RX_MSDU_DESC_INFO0_DA_IDX_TIMEOUT BIT(27)
581
582#define HAL_RX_MSDU_PKT_LENGTH_GET(val) \
583 (FIELD_GET(RX_MSDU_DESC_INFO0_MSDU_LENGTH, (val)))
584
585struct rx_msdu_desc {
586 u32 info0;
587 u32 rsvd0;
588} __packed;
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646enum hal_reo_dest_ring_buffer_type {
647 HAL_REO_DEST_RING_BUFFER_TYPE_MSDU,
648 HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC,
649};
650
651enum hal_reo_dest_ring_push_reason {
652 HAL_REO_DEST_RING_PUSH_REASON_ERR_DETECTED,
653 HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION,
654};
655
656enum hal_reo_dest_ring_error_code {
657 HAL_REO_DEST_RING_ERROR_CODE_DESC_ADDR_ZERO,
658 HAL_REO_DEST_RING_ERROR_CODE_DESC_INVALID,
659 HAL_REO_DEST_RING_ERROR_CODE_AMPDU_IN_NON_BA,
660 HAL_REO_DEST_RING_ERROR_CODE_NON_BA_DUPLICATE,
661 HAL_REO_DEST_RING_ERROR_CODE_BA_DUPLICATE,
662 HAL_REO_DEST_RING_ERROR_CODE_FRAME_2K_JUMP,
663 HAL_REO_DEST_RING_ERROR_CODE_BAR_2K_JUMP,
664 HAL_REO_DEST_RING_ERROR_CODE_FRAME_OOR,
665 HAL_REO_DEST_RING_ERROR_CODE_BAR_OOR,
666 HAL_REO_DEST_RING_ERROR_CODE_NO_BA_SESSION,
667 HAL_REO_DEST_RING_ERROR_CODE_FRAME_SN_EQUALS_SSN,
668 HAL_REO_DEST_RING_ERROR_CODE_PN_CHECK_FAILED,
669 HAL_REO_DEST_RING_ERROR_CODE_2K_ERR_FLAG_SET,
670 HAL_REO_DEST_RING_ERROR_CODE_PN_ERR_FLAG_SET,
671 HAL_REO_DEST_RING_ERROR_CODE_DESC_BLOCKED,
672 HAL_REO_DEST_RING_ERROR_CODE_MAX,
673};
674
675#define HAL_REO_DEST_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
676#define HAL_REO_DEST_RING_INFO0_BUFFER_TYPE BIT(8)
677#define HAL_REO_DEST_RING_INFO0_PUSH_REASON GENMASK(10, 9)
678#define HAL_REO_DEST_RING_INFO0_ERROR_CODE GENMASK(15, 11)
679#define HAL_REO_DEST_RING_INFO0_RX_QUEUE_NUM GENMASK(31, 16)
680
681#define HAL_REO_DEST_RING_INFO1_REORDER_INFO_VALID BIT(0)
682#define HAL_REO_DEST_RING_INFO1_REORDER_OPCODE GENMASK(4, 1)
683#define HAL_REO_DEST_RING_INFO1_REORDER_SLOT_IDX GENMASK(12, 5)
684
685#define HAL_REO_DEST_RING_INFO2_RING_ID GENMASK(27, 20)
686#define HAL_REO_DEST_RING_INFO2_LOOPING_COUNT GENMASK(31, 28)
687
688struct hal_reo_dest_ring {
689 struct ath11k_buffer_addr buf_addr_info;
690 struct rx_mpdu_desc rx_mpdu_info;
691 struct rx_msdu_desc rx_msdu_info;
692 u32 queue_addr_lo;
693 u32 info0;
694 u32 info1;
695 u32 rsvd0;
696 u32 rsvd1;
697 u32 rsvd2;
698 u32 rsvd3;
699 u32 rsvd4;
700 u32 rsvd5;
701 u32 info2;
702} __packed;
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765enum hal_reo_entr_rxdma_ecode {
766 HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR,
767 HAL_REO_ENTR_RING_RXDMA_ECODE_MPDU_LEN_ERR,
768 HAL_REO_ENTR_RING_RXDMA_ECODE_FCS_ERR,
769 HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR,
770 HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR,
771 HAL_REO_ENTR_RING_RXDMA_ECODE_UNECRYPTED_ERR,
772 HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LEN_ERR,
773 HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LIMIT_ERR,
774 HAL_REO_ENTR_RING_RXDMA_ECODE_WIFI_PARSE_ERR,
775 HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_PARSE_ERR,
776 HAL_REO_ENTR_RING_RXDMA_ECODE_SA_TIMEOUT_ERR,
777 HAL_REO_ENTR_RING_RXDMA_ECODE_DA_TIMEOUT_ERR,
778 HAL_REO_ENTR_RING_RXDMA_ECODE_FLOW_TIMEOUT_ERR,
779 HAL_REO_ENTR_RING_RXDMA_ECODE_FLUSH_REQUEST_ERR,
780 HAL_REO_ENTR_RING_RXDMA_ECODE_MAX,
781};
782
783#define HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
784#define HAL_REO_ENTR_RING_INFO0_MPDU_BYTE_COUNT GENMASK(21, 8)
785#define HAL_REO_ENTR_RING_INFO0_DEST_IND GENMASK(26, 22)
786#define HAL_REO_ENTR_RING_INFO0_FRAMELESS_BAR BIT(27)
787
788#define HAL_REO_ENTR_RING_INFO1_RXDMA_PUSH_REASON GENMASK(1, 0)
789#define HAL_REO_ENTR_RING_INFO1_RXDMA_ERROR_CODE GENMASK(6, 2)
790
791struct hal_reo_entrance_ring {
792 struct ath11k_buffer_addr buf_addr_info;
793 struct rx_mpdu_desc rx_mpdu_info;
794 u32 queue_addr_lo;
795 u32 info0;
796 u32 info1;
797 u32 info2;
798
799} __packed;
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859#define HAL_REO_CMD_HDR_INFO0_CMD_NUMBER GENMASK(15, 0)
860#define HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED BIT(16)
861
862struct hal_reo_cmd_hdr {
863 u32 info0;
864} __packed;
865
866#define HAL_REO_GET_QUEUE_STATS_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
867#define HAL_REO_GET_QUEUE_STATS_INFO0_CLEAR_STATS BIT(8)
868
869struct hal_reo_get_queue_stats {
870 struct hal_reo_cmd_hdr cmd;
871 u32 queue_addr_lo;
872 u32 info0;
873 u32 rsvd0[6];
874} __packed;
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907#define HAL_REO_FLUSH_QUEUE_INFO0_DESC_ADDR_HI GENMASK(7, 0)
908#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_DESC_ADDR BIT(8)
909#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_RESRC_IDX GENMASK(10, 9)
910
911struct hal_reo_flush_queue {
912 struct hal_reo_cmd_hdr cmd;
913 u32 desc_addr_lo;
914 u32 info0;
915 u32 rsvd0[6];
916} __packed;
917
918#define HAL_REO_FLUSH_CACHE_INFO0_CACHE_ADDR_HI GENMASK(7, 0)
919#define HAL_REO_FLUSH_CACHE_INFO0_FWD_ALL_MPDUS BIT(8)
920#define HAL_REO_FLUSH_CACHE_INFO0_RELEASE_BLOCK_IDX BIT(9)
921#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_RESRC_IDX GENMASK(11, 10)
922#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_WO_INVALIDATE BIT(12)
923#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_CACHE_USAGE BIT(13)
924#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_ALL BIT(14)
925
926struct hal_reo_flush_cache {
927 struct hal_reo_cmd_hdr cmd;
928 u32 cache_addr_lo;
929 u32 info0;
930 u32 rsvd0[6];
931} __packed;
932
933#define HAL_TCL_DATA_CMD_INFO0_DESC_TYPE BIT(0)
934#define HAL_TCL_DATA_CMD_INFO0_EPD BIT(1)
935#define HAL_TCL_DATA_CMD_INFO0_ENCAP_TYPE GENMASK(3, 2)
936#define HAL_TCL_DATA_CMD_INFO0_ENCRYPT_TYPE GENMASK(7, 4)
937#define HAL_TCL_DATA_CMD_INFO0_SRC_BUF_SWAP BIT(8)
938#define HAL_TCL_DATA_CMD_INFO0_LNK_META_SWAP BIT(9)
939#define HAL_TCL_DATA_CMD_INFO0_SEARCH_TYPE GENMASK(13, 12)
940#define HAL_TCL_DATA_CMD_INFO0_ADDR_EN GENMASK(15, 14)
941#define HAL_TCL_DATA_CMD_INFO0_CMD_NUM GENMASK(31, 16)
942
943#define HAL_TCL_DATA_CMD_INFO1_DATA_LEN GENMASK(15, 0)
944#define HAL_TCL_DATA_CMD_INFO1_IP4_CKSUM_EN BIT(16)
945#define HAL_TCL_DATA_CMD_INFO1_UDP4_CKSUM_EN BIT(17)
946#define HAL_TCL_DATA_CMD_INFO1_UDP6_CKSUM_EN BIT(18)
947#define HAL_TCL_DATA_CMD_INFO1_TCP4_CKSUM_EN BIT(19)
948#define HAL_TCL_DATA_CMD_INFO1_TCP6_CKSUM_EN BIT(20)
949#define HAL_TCL_DATA_CMD_INFO1_TO_FW BIT(21)
950#define HAL_TCL_DATA_CMD_INFO1_PKT_OFFSET GENMASK(31, 23)
951
952#define HAL_TCL_DATA_CMD_INFO2_BUF_TIMESTAMP GENMASK(18, 0)
953#define HAL_TCL_DATA_CMD_INFO2_BUF_T_VALID BIT(19)
954#define HAL_IPQ8074_TCL_DATA_CMD_INFO2_MESH_ENABLE BIT(20)
955#define HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE BIT(21)
956#define HAL_TCL_DATA_CMD_INFO2_TID GENMASK(25, 22)
957#define HAL_TCL_DATA_CMD_INFO2_LMAC_ID GENMASK(27, 26)
958
959#define HAL_TCL_DATA_CMD_INFO3_DSCP_TID_TABLE_IDX GENMASK(5, 0)
960#define HAL_TCL_DATA_CMD_INFO3_SEARCH_INDEX GENMASK(25, 6)
961#define HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM GENMASK(29, 26)
962#define HAL_QCN9074_TCL_DATA_CMD_INFO3_MESH_ENABLE GENMASK(31, 30)
963
964#define HAL_TCL_DATA_CMD_INFO4_RING_ID GENMASK(27, 20)
965#define HAL_TCL_DATA_CMD_INFO4_LOOPING_COUNT GENMASK(31, 28)
966
967enum hal_encrypt_type {
968 HAL_ENCRYPT_TYPE_WEP_40,
969 HAL_ENCRYPT_TYPE_WEP_104,
970 HAL_ENCRYPT_TYPE_TKIP_NO_MIC,
971 HAL_ENCRYPT_TYPE_WEP_128,
972 HAL_ENCRYPT_TYPE_TKIP_MIC,
973 HAL_ENCRYPT_TYPE_WAPI,
974 HAL_ENCRYPT_TYPE_CCMP_128,
975 HAL_ENCRYPT_TYPE_OPEN,
976 HAL_ENCRYPT_TYPE_CCMP_256,
977 HAL_ENCRYPT_TYPE_GCMP_128,
978 HAL_ENCRYPT_TYPE_AES_GCMP_256,
979 HAL_ENCRYPT_TYPE_WAPI_GCM_SM4,
980};
981
982enum hal_tcl_encap_type {
983 HAL_TCL_ENCAP_TYPE_RAW,
984 HAL_TCL_ENCAP_TYPE_NATIVE_WIFI,
985 HAL_TCL_ENCAP_TYPE_ETHERNET,
986 HAL_TCL_ENCAP_TYPE_802_3 = 3,
987};
988
989enum hal_tcl_desc_type {
990 HAL_TCL_DESC_TYPE_BUFFER,
991 HAL_TCL_DESC_TYPE_EXT_DESC,
992};
993
994enum hal_wbm_htt_tx_comp_status {
995 HAL_WBM_REL_HTT_TX_COMP_STATUS_OK,
996 HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP,
997 HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL,
998 HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ,
999 HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT,
1000 HAL_WBM_REL_HTT_TX_COMP_STATUS_MEC_NOTIFY,
1001};
1002
1003struct hal_tcl_data_cmd {
1004 struct ath11k_buffer_addr buf_addr_info;
1005 u32 info0;
1006 u32 info1;
1007 u32 info2;
1008 u32 info3;
1009 u32 info4;
1010} __packed;
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150#define HAL_TCL_DESC_LEN sizeof(struct hal_tcl_data_cmd)
1151
1152enum hal_tcl_gse_ctrl {
1153 HAL_TCL_GSE_CTRL_RD_STAT,
1154 HAL_TCL_GSE_CTRL_SRCH_DIS,
1155 HAL_TCL_GSE_CTRL_WR_BK_SINGLE,
1156 HAL_TCL_GSE_CTRL_WR_BK_ALL,
1157 HAL_TCL_GSE_CTRL_INVAL_SINGLE,
1158 HAL_TCL_GSE_CTRL_INVAL_ALL,
1159 HAL_TCL_GSE_CTRL_WR_BK_INVAL_SINGLE,
1160 HAL_TCL_GSE_CTRL_WR_BK_INVAL_ALL,
1161 HAL_TCL_GSE_CTRL_CLR_STAT_SINGLE,
1162};
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186#define HAL_TCL_GSE_CMD_INFO0_CTRL_BUF_ADDR_HI GENMASK(7, 0)
1187#define HAL_TCL_GSE_CMD_INFO0_GSE_CTRL GENMASK(11, 8)
1188#define HAL_TCL_GSE_CMD_INFO0_GSE_SEL BIT(12)
1189#define HAL_TCL_GSE_CMD_INFO0_STATUS_DEST_RING_ID BIT(13)
1190#define HAL_TCL_GSE_CMD_INFO0_SWAP BIT(14)
1191
1192#define HAL_TCL_GSE_CMD_INFO1_RING_ID GENMASK(27, 20)
1193#define HAL_TCL_GSE_CMD_INFO1_LOOPING_COUNT GENMASK(31, 28)
1194
1195struct hal_tcl_gse_cmd {
1196 u32 ctrl_buf_addr_lo;
1197 u32 info0;
1198 u32 meta_data[2];
1199 u32 rsvd0[2];
1200 u32 info1;
1201} __packed;
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228enum hal_tcl_cache_op_res {
1229 HAL_TCL_CACHE_OP_RES_DONE,
1230 HAL_TCL_CACHE_OP_RES_NOT_FOUND,
1231 HAL_TCL_CACHE_OP_RES_TIMEOUT,
1232};
1233
1234#define HAL_TCL_STATUS_RING_INFO0_GSE_CTRL GENMASK(3, 0)
1235#define HAL_TCL_STATUS_RING_INFO0_GSE_SEL BIT(4)
1236#define HAL_TCL_STATUS_RING_INFO0_CACHE_OP_RES GENMASK(6, 5)
1237#define HAL_TCL_STATUS_RING_INFO0_MSDU_CNT GENMASK(31, 8)
1238
1239#define HAL_TCL_STATUS_RING_INFO1_HASH_IDX GENMASK(19, 0)
1240
1241#define HAL_TCL_STATUS_RING_INFO2_RING_ID GENMASK(27, 20)
1242#define HAL_TCL_STATUS_RING_INFO2_LOOPING_COUNT GENMASK(31, 28)
1243
1244struct hal_tcl_status_ring {
1245 u32 info0;
1246 u32 msdu_byte_count;
1247 u32 msdu_timestamp;
1248 u32 meta_data[2];
1249 u32 info1;
1250 u32 rsvd0;
1251 u32 info2;
1252} __packed;
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277#define HAL_CE_SRC_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)
1278#define HAL_CE_SRC_DESC_ADDR_INFO_HASH_EN BIT(8)
1279#define HAL_CE_SRC_DESC_ADDR_INFO_BYTE_SWAP BIT(9)
1280#define HAL_CE_SRC_DESC_ADDR_INFO_DEST_SWAP BIT(10)
1281#define HAL_CE_SRC_DESC_ADDR_INFO_GATHER BIT(11)
1282#define HAL_CE_SRC_DESC_ADDR_INFO_LEN GENMASK(31, 16)
1283
1284#define HAL_CE_SRC_DESC_META_INFO_DATA GENMASK(15, 0)
1285
1286#define HAL_CE_SRC_DESC_FLAGS_RING_ID GENMASK(27, 20)
1287#define HAL_CE_SRC_DESC_FLAGS_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
1288
1289struct hal_ce_srng_src_desc {
1290 u32 buffer_addr_low;
1291 u32 buffer_addr_info;
1292 u32 meta_info;
1293 u32 flags;
1294} __packed;
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374#define HAL_CE_DEST_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)
1375#define HAL_CE_DEST_DESC_ADDR_INFO_RING_ID GENMASK(27, 20)
1376#define HAL_CE_DEST_DESC_ADDR_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
1377
1378struct hal_ce_srng_dest_desc {
1379 u32 buffer_addr_low;
1380 u32 buffer_addr_info;
1381} __packed;
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423#define HAL_CE_DST_STATUS_DESC_FLAGS_HASH_EN BIT(8)
1424#define HAL_CE_DST_STATUS_DESC_FLAGS_BYTE_SWAP BIT(9)
1425#define HAL_CE_DST_STATUS_DESC_FLAGS_DEST_SWAP BIT(10)
1426#define HAL_CE_DST_STATUS_DESC_FLAGS_GATHER BIT(11)
1427#define HAL_CE_DST_STATUS_DESC_FLAGS_LEN GENMASK(31, 16)
1428
1429#define HAL_CE_DST_STATUS_DESC_META_INFO_DATA GENMASK(15, 0)
1430#define HAL_CE_DST_STATUS_DESC_META_INFO_RING_ID GENMASK(27, 20)
1431#define HAL_CE_DST_STATUS_DESC_META_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
1432
1433struct hal_ce_srng_dst_status_desc {
1434 u32 flags;
1435 u32 toeplitz_hash0;
1436 u32 toeplitz_hash1;
1437 u32 meta_info;
1438} __packed;
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505#define HAL_TX_RATE_STATS_INFO0_VALID BIT(0)
1506#define HAL_TX_RATE_STATS_INFO0_BW GENMASK(2, 1)
1507#define HAL_TX_RATE_STATS_INFO0_PKT_TYPE GENMASK(6, 3)
1508#define HAL_TX_RATE_STATS_INFO0_STBC BIT(7)
1509#define HAL_TX_RATE_STATS_INFO0_LDPC BIT(8)
1510#define HAL_TX_RATE_STATS_INFO0_SGI GENMASK(10, 9)
1511#define HAL_TX_RATE_STATS_INFO0_MCS GENMASK(14, 11)
1512#define HAL_TX_RATE_STATS_INFO0_OFDMA_TX BIT(15)
1513#define HAL_TX_RATE_STATS_INFO0_TONES_IN_RU GENMASK(27, 16)
1514
1515enum hal_tx_rate_stats_bw {
1516 HAL_TX_RATE_STATS_BW_20,
1517 HAL_TX_RATE_STATS_BW_40,
1518 HAL_TX_RATE_STATS_BW_80,
1519 HAL_TX_RATE_STATS_BW_160,
1520};
1521
1522enum hal_tx_rate_stats_pkt_type {
1523 HAL_TX_RATE_STATS_PKT_TYPE_11A,
1524 HAL_TX_RATE_STATS_PKT_TYPE_11B,
1525 HAL_TX_RATE_STATS_PKT_TYPE_11N,
1526 HAL_TX_RATE_STATS_PKT_TYPE_11AC,
1527 HAL_TX_RATE_STATS_PKT_TYPE_11AX,
1528};
1529
1530enum hal_tx_rate_stats_sgi {
1531 HAL_TX_RATE_STATS_SGI_08US,
1532 HAL_TX_RATE_STATS_SGI_04US,
1533 HAL_TX_RATE_STATS_SGI_16US,
1534 HAL_TX_RATE_STATS_SGI_32US,
1535};
1536
1537struct hal_tx_rate_stats {
1538 u32 info0;
1539 u32 tsf;
1540} __packed;
1541
1542struct hal_wbm_link_desc {
1543 struct ath11k_buffer_addr buf_addr_info;
1544} __packed;
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556enum hal_wbm_rel_src_module {
1557 HAL_WBM_REL_SRC_MODULE_TQM,
1558 HAL_WBM_REL_SRC_MODULE_RXDMA,
1559 HAL_WBM_REL_SRC_MODULE_REO,
1560 HAL_WBM_REL_SRC_MODULE_FW,
1561 HAL_WBM_REL_SRC_MODULE_SW,
1562};
1563
1564enum hal_wbm_rel_desc_type {
1565 HAL_WBM_REL_DESC_TYPE_REL_MSDU,
1566 HAL_WBM_REL_DESC_TYPE_MSDU_LINK,
1567 HAL_WBM_REL_DESC_TYPE_MPDU_LINK,
1568 HAL_WBM_REL_DESC_TYPE_MSDU_EXT,
1569 HAL_WBM_REL_DESC_TYPE_QUEUE_EXT,
1570};
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591enum hal_wbm_rel_bm_act {
1592 HAL_WBM_REL_BM_ACT_PUT_IN_IDLE,
1593 HAL_WBM_REL_BM_ACT_REL_MSDU,
1594};
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614#define HAL_WBM_RELEASE_INFO0_REL_SRC_MODULE GENMASK(2, 0)
1615#define HAL_WBM_RELEASE_INFO0_BM_ACTION GENMASK(5, 3)
1616#define HAL_WBM_RELEASE_INFO0_DESC_TYPE GENMASK(8, 6)
1617#define HAL_WBM_RELEASE_INFO0_FIRST_MSDU_IDX GENMASK(12, 9)
1618#define HAL_WBM_RELEASE_INFO0_TQM_RELEASE_REASON GENMASK(16, 13)
1619#define HAL_WBM_RELEASE_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)
1620#define HAL_WBM_RELEASE_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)
1621#define HAL_WBM_RELEASE_INFO0_REO_PUSH_REASON GENMASK(25, 24)
1622#define HAL_WBM_RELEASE_INFO0_REO_ERROR_CODE GENMASK(30, 26)
1623#define HAL_WBM_RELEASE_INFO0_WBM_INTERNAL_ERROR BIT(31)
1624
1625#define HAL_WBM_RELEASE_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0)
1626#define HAL_WBM_RELEASE_INFO1_TRANSMIT_COUNT GENMASK(30, 24)
1627
1628#define HAL_WBM_RELEASE_INFO2_ACK_FRAME_RSSI GENMASK(7, 0)
1629#define HAL_WBM_RELEASE_INFO2_SW_REL_DETAILS_VALID BIT(8)
1630#define HAL_WBM_RELEASE_INFO2_FIRST_MSDU BIT(9)
1631#define HAL_WBM_RELEASE_INFO2_LAST_MSDU BIT(10)
1632#define HAL_WBM_RELEASE_INFO2_MSDU_IN_AMSDU BIT(11)
1633#define HAL_WBM_RELEASE_INFO2_FW_TX_NOTIF_FRAME BIT(12)
1634#define HAL_WBM_RELEASE_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13)
1635
1636#define HAL_WBM_RELEASE_INFO3_PEER_ID GENMASK(15, 0)
1637#define HAL_WBM_RELEASE_INFO3_TID GENMASK(19, 16)
1638#define HAL_WBM_RELEASE_INFO3_RING_ID GENMASK(27, 20)
1639#define HAL_WBM_RELEASE_INFO3_LOOPING_COUNT GENMASK(31, 28)
1640
1641#define HAL_WBM_REL_HTT_TX_COMP_INFO0_STATUS GENMASK(12, 9)
1642#define HAL_WBM_REL_HTT_TX_COMP_INFO0_REINJ_REASON GENMASK(16, 13)
1643#define HAL_WBM_REL_HTT_TX_COMP_INFO0_EXP_FRAME BIT(17)
1644
1645struct hal_wbm_release_ring {
1646 struct ath11k_buffer_addr buf_addr_info;
1647 u32 info0;
1648 u32 info1;
1649 u32 info2;
1650 struct hal_tx_rate_stats rate_stats;
1651 u32 info3;
1652} __packed;
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824enum hal_wbm_tqm_rel_reason {
1825 HAL_WBM_TQM_REL_REASON_FRAME_ACKED,
1826 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU,
1827 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX,
1828 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX,
1829 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES,
1830 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1,
1831 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2,
1832 HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3,
1833};
1834
1835struct hal_wbm_buffer_ring {
1836 struct ath11k_buffer_addr buf_addr_info;
1837};
1838
1839enum hal_desc_owner {
1840 HAL_DESC_OWNER_WBM,
1841 HAL_DESC_OWNER_SW,
1842 HAL_DESC_OWNER_TQM,
1843 HAL_DESC_OWNER_RXDMA,
1844 HAL_DESC_OWNER_REO,
1845 HAL_DESC_OWNER_SWITCH,
1846};
1847
1848enum hal_desc_buf_type {
1849 HAL_DESC_BUF_TYPE_TX_MSDU_LINK,
1850 HAL_DESC_BUF_TYPE_TX_MPDU_LINK,
1851 HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_HEAD,
1852 HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_EXT,
1853 HAL_DESC_BUF_TYPE_TX_FLOW,
1854 HAL_DESC_BUF_TYPE_TX_BUFFER,
1855 HAL_DESC_BUF_TYPE_RX_MSDU_LINK,
1856 HAL_DESC_BUF_TYPE_RX_MPDU_LINK,
1857 HAL_DESC_BUF_TYPE_RX_REO_QUEUE,
1858 HAL_DESC_BUF_TYPE_RX_REO_QUEUE_EXT,
1859 HAL_DESC_BUF_TYPE_RX_BUFFER,
1860 HAL_DESC_BUF_TYPE_IDLE_LINK,
1861};
1862
1863#define HAL_DESC_REO_OWNED 4
1864#define HAL_DESC_REO_QUEUE_DESC 8
1865#define HAL_DESC_REO_QUEUE_EXT_DESC 9
1866#define HAL_DESC_REO_NON_QOS_TID 16
1867
1868#define HAL_DESC_HDR_INFO0_OWNER GENMASK(3, 0)
1869#define HAL_DESC_HDR_INFO0_BUF_TYPE GENMASK(7, 4)
1870#define HAL_DESC_HDR_INFO0_DBG_RESERVED GENMASK(31, 8)
1871
1872struct hal_desc_header {
1873 u32 info0;
1874} __packed;
1875
1876struct hal_rx_mpdu_link_ptr {
1877 struct ath11k_buffer_addr addr_info;
1878} __packed;
1879
1880struct hal_rx_msdu_details {
1881 struct ath11k_buffer_addr buf_addr_info;
1882 struct rx_msdu_desc rx_msdu_info;
1883} __packed;
1884
1885#define HAL_RX_MSDU_LNK_INFO0_RX_QUEUE_NUMBER GENMASK(15, 0)
1886#define HAL_RX_MSDU_LNK_INFO0_FIRST_MSDU_LNK BIT(16)
1887
1888struct hal_rx_msdu_link {
1889 struct hal_desc_header desc_hdr;
1890 struct ath11k_buffer_addr buf_addr_info;
1891 u32 info0;
1892 u32 pn[4];
1893 struct hal_rx_msdu_details msdu_link[6];
1894} __packed;
1895
1896struct hal_rx_reo_queue_ext {
1897 struct hal_desc_header desc_hdr;
1898 u32 rsvd;
1899 struct hal_rx_mpdu_link_ptr mpdu_link[15];
1900} __packed;
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913enum hal_rx_reo_queue_pn_size {
1914 HAL_RX_REO_QUEUE_PN_SIZE_24,
1915 HAL_RX_REO_QUEUE_PN_SIZE_48,
1916 HAL_RX_REO_QUEUE_PN_SIZE_128,
1917};
1918
1919#define HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER GENMASK(15, 0)
1920
1921#define HAL_RX_REO_QUEUE_INFO0_VLD BIT(0)
1922#define HAL_RX_REO_QUEUE_INFO0_ASSOC_LNK_DESC_COUNTER GENMASK(2, 1)
1923#define HAL_RX_REO_QUEUE_INFO0_DIS_DUP_DETECTION BIT(3)
1924#define HAL_RX_REO_QUEUE_INFO0_SOFT_REORDER_EN BIT(4)
1925#define HAL_RX_REO_QUEUE_INFO0_AC GENMASK(6, 5)
1926#define HAL_RX_REO_QUEUE_INFO0_BAR BIT(7)
1927#define HAL_RX_REO_QUEUE_INFO0_RETRY BIT(8)
1928#define HAL_RX_REO_QUEUE_INFO0_CHECK_2K_MODE BIT(9)
1929#define HAL_RX_REO_QUEUE_INFO0_OOR_MODE BIT(10)
1930#define HAL_RX_REO_QUEUE_INFO0_BA_WINDOW_SIZE GENMASK(18, 11)
1931#define HAL_RX_REO_QUEUE_INFO0_PN_CHECK BIT(19)
1932#define HAL_RX_REO_QUEUE_INFO0_EVEN_PN BIT(20)
1933#define HAL_RX_REO_QUEUE_INFO0_UNEVEN_PN BIT(21)
1934#define HAL_RX_REO_QUEUE_INFO0_PN_HANDLE_ENABLE BIT(22)
1935#define HAL_RX_REO_QUEUE_INFO0_PN_SIZE GENMASK(24, 23)
1936#define HAL_RX_REO_QUEUE_INFO0_IGNORE_AMPDU_FLG BIT(25)
1937
1938#define HAL_RX_REO_QUEUE_INFO1_SVLD BIT(0)
1939#define HAL_RX_REO_QUEUE_INFO1_SSN GENMASK(12, 1)
1940#define HAL_RX_REO_QUEUE_INFO1_CURRENT_IDX GENMASK(20, 13)
1941#define HAL_RX_REO_QUEUE_INFO1_SEQ_2K_ERR BIT(21)
1942#define HAL_RX_REO_QUEUE_INFO1_PN_ERR BIT(22)
1943#define HAL_RX_REO_QUEUE_INFO1_PN_VALID BIT(31)
1944
1945#define HAL_RX_REO_QUEUE_INFO2_MPDU_COUNT GENMASK(6, 0)
1946#define HAL_RX_REO_QUEUE_INFO2_MSDU_COUNT (31, 7)
1947
1948#define HAL_RX_REO_QUEUE_INFO3_TIMEOUT_COUNT GENMASK(9, 4)
1949#define HAL_RX_REO_QUEUE_INFO3_FWD_DUE_TO_BAR_CNT GENMASK(15, 10)
1950#define HAL_RX_REO_QUEUE_INFO3_DUPLICATE_COUNT GENMASK(31, 16)
1951
1952#define HAL_RX_REO_QUEUE_INFO4_FRAME_IN_ORD_COUNT GENMASK(23, 0)
1953#define HAL_RX_REO_QUEUE_INFO4_BAR_RECVD_COUNT GENMASK(31, 24)
1954
1955#define HAL_RX_REO_QUEUE_INFO5_LATE_RX_MPDU_COUNT GENMASK(11, 0)
1956#define HAL_RX_REO_QUEUE_INFO5_WINDOW_JUMP_2K GENMASK(15, 12)
1957#define HAL_RX_REO_QUEUE_INFO5_HOLE_COUNT GENMASK(31, 16)
1958
1959struct hal_rx_reo_queue {
1960 struct hal_desc_header desc_hdr;
1961 u32 rx_queue_num;
1962 u32 info0;
1963 u32 info1;
1964 u32 pn[4];
1965 u32 last_rx_enqueue_timestamp;
1966 u32 last_rx_dequeue_timestamp;
1967 u32 next_aging_queue[2];
1968 u32 prev_aging_queue[2];
1969 u32 rx_bitmap[8];
1970 u32 info2;
1971 u32 info3;
1972 u32 info4;
1973 u32 processed_mpdus;
1974 u32 processed_msdus;
1975 u32 processed_total_bytes;
1976 u32 info5;
1977 u32 rsvd[3];
1978 struct hal_rx_reo_queue_ext ext_desc[];
1979} __packed;
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047#define HAL_REO_UPD_RX_QUEUE_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
2048#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RX_QUEUE_NUM BIT(8)
2049#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_VLD BIT(9)
2050#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_ASSOC_LNK_DESC_CNT BIT(10)
2051#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_DIS_DUP_DETECTION BIT(11)
2052#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SOFT_REORDER_EN BIT(12)
2053#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_AC BIT(13)
2054#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BAR BIT(14)
2055#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RETRY BIT(15)
2056#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_CHECK_2K_MODE BIT(16)
2057#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_OOR_MODE BIT(17)
2058#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BA_WINDOW_SIZE BIT(18)
2059#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_CHECK BIT(19)
2060#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_EVEN_PN BIT(20)
2061#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_UNEVEN_PN BIT(21)
2062#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_HANDLE_ENABLE BIT(22)
2063#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_SIZE BIT(23)
2064#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_IGNORE_AMPDU_FLG BIT(24)
2065#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SVLD BIT(25)
2066#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SSN BIT(26)
2067#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SEQ_2K_ERR BIT(27)
2068#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_ERR BIT(28)
2069#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_VALID BIT(29)
2070#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN BIT(30)
2071
2072#define HAL_REO_UPD_RX_QUEUE_INFO1_RX_QUEUE_NUMBER GENMASK(15, 0)
2073#define HAL_REO_UPD_RX_QUEUE_INFO1_VLD BIT(16)
2074#define HAL_REO_UPD_RX_QUEUE_INFO1_ASSOC_LNK_DESC_COUNTER GENMASK(18, 17)
2075#define HAL_REO_UPD_RX_QUEUE_INFO1_DIS_DUP_DETECTION BIT(19)
2076#define HAL_REO_UPD_RX_QUEUE_INFO1_SOFT_REORDER_EN BIT(20)
2077#define HAL_REO_UPD_RX_QUEUE_INFO1_AC GENMASK(22, 21)
2078#define HAL_REO_UPD_RX_QUEUE_INFO1_BAR BIT(23)
2079#define HAL_REO_UPD_RX_QUEUE_INFO1_RETRY BIT(24)
2080#define HAL_REO_UPD_RX_QUEUE_INFO1_CHECK_2K_MODE BIT(25)
2081#define HAL_REO_UPD_RX_QUEUE_INFO1_OOR_MODE BIT(26)
2082#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_CHECK BIT(27)
2083#define HAL_REO_UPD_RX_QUEUE_INFO1_EVEN_PN BIT(28)
2084#define HAL_REO_UPD_RX_QUEUE_INFO1_UNEVEN_PN BIT(29)
2085#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_HANDLE_ENABLE BIT(30)
2086#define HAL_REO_UPD_RX_QUEUE_INFO1_IGNORE_AMPDU_FLG BIT(31)
2087
2088#define HAL_REO_UPD_RX_QUEUE_INFO2_BA_WINDOW_SIZE GENMASK(7, 0)
2089#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE GENMASK(9, 8)
2090#define HAL_REO_UPD_RX_QUEUE_INFO2_SVLD BIT(10)
2091#define HAL_REO_UPD_RX_QUEUE_INFO2_SSN GENMASK(22, 11)
2092#define HAL_REO_UPD_RX_QUEUE_INFO2_SEQ_2K_ERR BIT(23)
2093#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_ERR BIT(24)
2094#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_VALID BIT(25)
2095
2096struct hal_reo_update_rx_queue {
2097 struct hal_reo_cmd_hdr cmd;
2098 u32 queue_addr_lo;
2099 u32 info0;
2100 u32 info1;
2101 u32 info2;
2102 u32 pn[4];
2103} __packed;
2104
2105#define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE BIT(0)
2106#define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX GENMASK(2, 1)
2107
2108struct hal_reo_unblock_cache {
2109 struct hal_reo_cmd_hdr cmd;
2110 u32 info0;
2111 u32 rsvd[7];
2112} __packed;
2113
2114enum hal_reo_exec_status {
2115 HAL_REO_EXEC_STATUS_SUCCESS,
2116 HAL_REO_EXEC_STATUS_BLOCKED,
2117 HAL_REO_EXEC_STATUS_FAILED,
2118 HAL_REO_EXEC_STATUS_RESOURCE_BLOCKED,
2119};
2120
2121#define HAL_REO_STATUS_HDR_INFO0_STATUS_NUM GENMASK(15, 0)
2122#define HAL_REO_STATUS_HDR_INFO0_EXEC_TIME GENMASK(25, 16)
2123#define HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS GENMASK(27, 26)
2124
2125struct hal_reo_status_hdr {
2126 u32 info0;
2127 u32 timestamp;
2128} __packed;
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN GENMASK(11, 0)
2149#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX GENMASK(19, 12)
2150
2151#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT GENMASK(6, 0)
2152#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT GENMASK(31, 7)
2153
2154#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT GENMASK(9, 4)
2155#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT GENMASK(15, 10)
2156#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT GENMASK(31, 16)
2157
2158#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT GENMASK(23, 0)
2159#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT GENMASK(31, 24)
2160
2161#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU GENMASK(11, 0)
2162#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_WINDOW_JMP2K GENMASK(15, 12)
2163#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT GENMASK(31, 16)
2164
2165#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT GENMASK(31, 28)
2166
2167struct hal_reo_get_queue_stats_status {
2168 struct hal_reo_status_hdr hdr;
2169 u32 info0;
2170 u32 pn[4];
2171 u32 last_rx_enqueue_timestamp;
2172 u32 last_rx_dequeue_timestamp;
2173 u32 rx_bitmap[8];
2174 u32 info1;
2175 u32 info2;
2176 u32 info3;
2177 u32 num_mpdu_frames;
2178 u32 num_msdu_frames;
2179 u32 total_bytes;
2180 u32 info4;
2181 u32 info5;
2182} __packed;
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256#define HAL_REO_STATUS_LOOP_CNT GENMASK(31, 28)
2257
2258#define HAL_REO_FLUSH_QUEUE_INFO0_ERR_DETECTED BIT(0)
2259#define HAL_REO_FLUSH_QUEUE_INFO0_RSVD GENMASK(31, 1)
2260#define HAL_REO_FLUSH_QUEUE_INFO1_RSVD GENMASK(27, 0)
2261
2262struct hal_reo_flush_queue_status {
2263 struct hal_reo_status_hdr hdr;
2264 u32 info0;
2265 u32 rsvd0[21];
2266 u32 info1;
2267} __packed;
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_IS_ERR BIT(0)
2290#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_BLOCK_ERR_CODE GENMASK(2, 1)
2291#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_STATUS_HIT BIT(8)
2292#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_DESC_TYPE GENMASK(11, 9)
2293#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_CLIENT_ID GENMASK(15, 12)
2294#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_ERR GENMASK(17, 16)
2295#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_COUNT GENMASK(25, 18)
2296
2297struct hal_reo_flush_cache_status {
2298 struct hal_reo_status_hdr hdr;
2299 u32 info0;
2300 u32 rsvd0[21];
2301 u32 info1;
2302} __packed;
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_IS_ERR BIT(0)
2357#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_TYPE BIT(1)
2358
2359struct hal_reo_unblock_cache_status {
2360 struct hal_reo_status_hdr hdr;
2361 u32 info0;
2362 u32 rsvd0[21];
2363 u32 info1;
2364} __packed;
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_IS_ERR BIT(0)
2390#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_LIST_EMPTY BIT(1)
2391
2392#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_REL_DESC_COUNT GENMASK(15, 0)
2393#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_FWD_BUF_COUNT GENMASK(31, 16)
2394
2395struct hal_reo_flush_timeout_list_status {
2396 struct hal_reo_status_hdr hdr;
2397 u32 info0;
2398 u32 info1;
2399 u32 rsvd0[20];
2400 u32 info2;
2401} __packed;
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432#define HAL_REO_DESC_THRESH_STATUS_INFO0_THRESH_INDEX GENMASK(1, 0)
2433#define HAL_REO_DESC_THRESH_STATUS_INFO1_LINK_DESC_COUNTER0 GENMASK(23, 0)
2434#define HAL_REO_DESC_THRESH_STATUS_INFO2_LINK_DESC_COUNTER1 GENMASK(23, 0)
2435#define HAL_REO_DESC_THRESH_STATUS_INFO3_LINK_DESC_COUNTER2 GENMASK(23, 0)
2436#define HAL_REO_DESC_THRESH_STATUS_INFO4_LINK_DESC_COUNTER_SUM GENMASK(25, 0)
2437
2438struct hal_reo_desc_thresh_reached_status {
2439 struct hal_reo_status_hdr hdr;
2440 u32 info0;
2441 u32 info1;
2442 u32 info2;
2443 u32 info3;
2444 u32 info4;
2445 u32 rsvd0[17];
2446 u32 info5;
2447} __packed;
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471#endif
2472