xref: /wlan-driver/qca-wifi-host-cmn/umac/cp_stats/dispatcher/inc/wlan_cp_stats_chipset_stats_events.h (revision 5113495b16420b49004c444715d2daae2066e7dc) !
1 /*
2  * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
3  * SPDX-License-Identifier: ISC
4  */
5 
6 /*
7  * THIS IS AUTO GENERATED FILE.
8  * DO NOT ALTER MANUALLY
9  */
10 
11 #ifndef __WLAN_CP_STATS_CHIPSET_STATS_EVENTS_H
12 #define __WLAN_CP_STATS_CHIPSET_STATS_EVENTS_H
13 
14 #include <qdf_types.h>
15 #include <wmi_unified_param.h>
16 
17 #define CSTATS_MAC_LEN 4
18 
19 #define CHIPSET_STATS_HDR_VERSION  0x0000001
20 
21 enum qca_chipset_stats_event_type {
22 	WLAN_CHIPSET_STATS_MGMT_AUTH_EVENT_ID = 0,
23 	WLAN_CHIPSET_STATS_MGMT_ASSOC_REQ_EVENT_ID,
24 	WLAN_CHIPSET_STATS_MGMT_ASSOC_RESP_EVENT_ID,
25 	WLAN_CHIPSET_STATS_MGMT_REASSOC_REQ_EVENT_ID,
26 	WLAN_CHIPSET_STATS_MGMT_REASSOC_RESP_EVENT_ID,
27 	WLAN_CHIPSET_STATS_MGMT_DEAUTH_EVENT_ID,
28 	WLAN_CHIPSET_STATS_MGMT_DISASSOC_EVENT_ID,
29 	WLAN_CHIPSET_STATS_STA_CONNECTING_EVENT_ID,
30 	WLAN_CHIPSET_STATS_STA_CONNECT_SUCCESS_EVENT_ID,
31 	WLAN_CHIPSET_STATS_STA_CONNECT_FAIL_EVENT_ID,
32 	WLAN_CHIPSET_STATS_STA_DISCONNECT_REQ_EVENT_ID,
33 	WLAN_CHIPSET_STATS_STA_DISCONNECT_DONE_EVENT_ID,
34 	WLAN_CHIPSET_STATS_STA_ROAM_SCAN_START_EVENT_ID,
35 	WLAN_CHIPSET_STATS_STA_ROAM_SCAN_DONE_EVENT_ID,
36 	WLAN_CHIPSET_STATS_STA_ROAM_RESULT_EVENT_ID,
37 	WLAN_CHIPSET_STATS_STA_TDLS_DISCOVERY_REQ_EVENT_ID,
38 	WLAN_CHIPSET_STATS_STA_TDLS_DISCOVERY_RESP_EVENT_ID,
39 	WLAN_CHIPSET_STATS_STA_TDLS_SETUP_REQ_EVENT_ID,
40 	WLAN_CHIPSET_STATS_STA_TDLS_SETUP_RESP_EVENT_ID,
41 	WLAN_CHIPSET_STATS_STA_TDLS_SETUP_CONFIRM_EVENT_ID,
42 	WLAN_CHIPSET_STATS_STA_TDLS_TEARDOWN_EVENT_ID,
43 	WLAN_CHIPSET_STATS_SAP_GO_START_EVENT_ID,
44 	WLAN_CHIPSET_STATS_SAP_GO_STOP_EVENT_ID,
45 	WLAN_CHIPSET_STATS_SAP_GO_CAC_START_EVENT_ID,
46 	WLAN_CHIPSET_STATS_SAP_GO_CAC_END_EVENT_ID,
47 	WLAN_CHIPSET_STATS_SAP_GO_CAC_INTERRUPTED_EVENT_ID,
48 	WLAN_CHIPSET_STATS_SAP_GO_RADAR_DETECTED_EVENT_ID,
49 	WLAN_CHIPSET_STATS_SAP_GO_STA_DISASSOC_EVENT_ID,
50 	WLAN_CHIPSET_STATS_SAP_GO_STA_ASSOC_REASSOC_EVENT_ID,
51 	WLAN_CHIPSET_STATS_NAN_DISCOVERY_ENABLE_REQ_EVENT_ID,
52 	WLAN_CHIPSET_STATS_NAN_DISCOVERY_ENABLE_RESP_EVENT_ID,
53 	WLAN_CHIPSET_STATS_NAN_DISCOVERY_DISABLE_REQ_EVENT_ID,
54 	WLAN_CHIPSET_STATS_NAN_DISCOVERY_DISABLE_RESP_EVENT_ID,
55 	WLAN_CHIPSET_STATS_NAN_NDI_CREATE_EVENT_ID,
56 	WLAN_CHIPSET_STATS_NAN_NDI_CREATE_RESP_EVENT_ID,
57 	WLAN_CHIPSET_STATS_NAN_NDI_DELETE_EVENT_ID,
58 	WLAN_CHIPSET_STATS_NAN_NDI_DELETE_RESP_EVENT_ID,
59 	WLAN_CHIPSET_STATS_NAN_NDP_INITIATOR_REQ_EVENT_ID,
60 	WLAN_CHIPSET_STATS_NAN_NDP_INITIATOR_RSP_EVENT_ID,
61 	WLAN_CHIPSET_STATS_NAN_NDP_RESPONDER_REQ_EVENT_ID,
62 	WLAN_CHIPSET_STATS_NAN_NDP_RESPONDER_RESP_EVENT_ID,
63 	WLAN_CHIPSET_STATS_NAN_NDP_END_REQ_EVENT_ID,
64 	WLAN_CHIPSET_STATS_NAN_NDP_END_RESP_EVENT_ID,
65 	WLAN_CHIPSET_STATS_NAN_NDP_CONFIRM_EVENT_ID,
66 	WLAN_CHIPSET_STATS_NAN_NDP_INDICATION_EVENT_ID,
67 	WLAN_CHIPSET_STATS_NAN_NDP_NEW_PEER_EVENT_ID,
68 	WLAN_CHIPSET_STATS_DATA_PKT_EVENT_ID,
69 	WLAN_CHIPSET_STATS_CSA_EVENT_ID,
70 	WLAN_CHIPSET_STATS_MAX_EVENT_ID,
71 };
72 
73 enum cstats_dir {
74 	CSTATS_DIR_TX = 0,
75 	CSTATS_DIR_RX,
76 	CSTATS_DIR_INVAL,
77 };
78 
79 enum cstats_flag {
80 	CSTATS_FLAG_HT = 1,
81 	CSTATS_FLAG_VHT,
82 	CSTATS_FLAG_HE,
83 	CSTATS_FLAG_EHT,
84 };
85 
86 enum cstats_pkt_type {
87 	CSTATS_PKT_TYPE_INVALID = 0,
88 	CSTATS_EAPOL_M1,
89 	CSTATS_EAPOL_M2,
90 	CSTATS_EAPOL_M3,
91 	CSTATS_EAPOL_M4,
92 	CSTATS_DHCP_DISCOVER,
93 	CSTATS_DHCP_OFFER,
94 	CSTATS_DHCP_REQ,
95 	CSTATS_DHCP_ACK,
96 	CSTATS_DHCP_NACK,
97 	CSTATS_DHCP_RELEASE,
98 	CSTATS_DHCP_INFORM,
99 	CSTATS_DHCP_DECLINE,
100 };
101 
102 enum cstats_pkt_status {
103 	CSTATS_STATUS_INVALID = 0,
104 	CSTATS_TX_STATUS_OK,
105 	CSTATS_TX_STATUS_FW_DISCARD,
106 	CSTATS_TX_STATUS_NO_ACK,
107 	CSTATS_TX_STATUS_DROP,
108 	CSTATS_TX_STATUS_DOWNLOAD_SUCC,
109 	CSTATS_TX_STATUS_DEFAULT,
110 };
111 
112 struct cstats_hdr {
113 	uint16_t evt_id;
114 	uint16_t length;
115 } qdf_packed;
116 
117 struct cstats_cmn {
118 	struct cstats_hdr hdr;
119 	uint8_t opmode;
120 	uint8_t vdev_id;
121 	uint64_t timestamp_us;
122 	uint64_t time_tick;
123 } qdf_packed;
124 
125 struct cstats_sta_roam_scan_cancel {
126 	uint32_t reason_code;
127 	uint8_t data_rssi;
128 	uint8_t data_rssi_threshold;
129 	uint8_t rx_linkspeed_status;
130 } qdf_packed;
131 
132 struct cstats_sta_roam_scan_ap {
133 	uint8_t bssid[CSTATS_MAC_LEN];
134 	uint32_t total_score;
135 	uint32_t rssi;
136 	uint32_t etp;
137 	uint16_t freq;
138 	uint16_t cu_load;
139 	uint8_t is_mlo;
140 	uint8_t type;
141 } qdf_packed;
142 
143 struct cstats_auth_mgmt_frm {
144 	struct cstats_cmn cmn;
145 	uint8_t auth_algo;
146 	uint8_t auth_seq_num;
147 	uint8_t status;
148 	uint8_t direction;
149 } qdf_packed;
150 
151 struct cstats_assoc_req_mgmt_frm {
152 	struct cstats_cmn cmn;
153 	uint8_t ssid_len;
154 	uint8_t ssid[WLAN_SSID_MAX_LEN + 1];
155 	uint8_t bssid[CSTATS_MAC_LEN];
156 	uint8_t sa[CSTATS_MAC_LEN];
157 	uint16_t freq;
158 	uint8_t flags;
159 	uint8_t direction;
160 } qdf_packed;
161 
162 struct cstats_assoc_resp_mgmt_frm {
163 	struct cstats_cmn cmn;
164 	uint8_t dest_mac[CSTATS_MAC_LEN];
165 	uint8_t bssid[CSTATS_MAC_LEN];
166 	uint16_t status_code;
167 	uint16_t aid;
168 	uint8_t direction;
169 	uint8_t flags;
170 } qdf_packed;
171 
172 struct cstats_deauth_mgmt_frm {
173 	struct cstats_cmn cmn;
174 	uint16_t reason;
175 	uint8_t direction;
176 } qdf_packed;
177 
178 struct cstats_disassoc_mgmt_frm {
179 	struct cstats_cmn cmn;
180 	uint16_t reason;
181 	uint8_t direction;
182 } qdf_packed;
183 
184 struct cstats_sta_connect_req {
185 	struct cstats_cmn cmn;
186 	uint8_t ssid_len;
187 	uint8_t ssid[WLAN_SSID_MAX_LEN + 1];
188 	uint8_t bssid[CSTATS_MAC_LEN];
189 	uint16_t freq;
190 } qdf_packed;
191 
192 struct cstats_sta_connect_resp {
193 	struct cstats_cmn cmn;
194 	uint8_t bssid[CSTATS_MAC_LEN];
195 	uint8_t ssid_len;
196 	uint8_t ssid[WLAN_SSID_MAX_LEN + 1];
197 	uint16_t result_code;
198 	uint16_t freq;
199 	uint8_t chnl_bw;
200 	uint8_t dot11mode;
201 	uint8_t qos_capability;
202 	uint8_t encryption_type;
203 	uint8_t auth_type;
204 } qdf_packed;
205 
206 struct cstats_sta_disconnect_req {
207 	struct cstats_cmn cmn;
208 	uint16_t reason_code;
209 	uint8_t is_no_disassoc_disconnect;
210 	uint8_t source;
211 	uint8_t bssid[CSTATS_MAC_LEN];
212 } qdf_packed;
213 
214 struct cstats_sta_disconnect_resp {
215 	struct cstats_cmn cmn;
216 	uint32_t cm_id;
217 	uint16_t reason_code;
218 	uint8_t source;
219 	uint8_t bssid[CSTATS_MAC_LEN];
220 } qdf_packed;
221 
222 struct cstats_sta_roam_scan_start {
223 	struct cstats_cmn cmn;
224 	uint32_t trigger_reason;
225 	uint32_t trigger_sub_reason;
226 	uint32_t rssi;
227 	uint32_t rssi_threshold;
228 	uint32_t timestamp;
229 	uint16_t cu;
230 	uint8_t is_full_scan;
231 	struct cstats_sta_roam_scan_cancel abort_roam;
232 } qdf_packed;
233 
234 struct cstats_sta_roam_scan_done {
235 	struct cstats_cmn cmn;
236 	uint32_t timestamp;
237 	uint16_t cand_ap_count;
238 	uint16_t num_scanned_freq;
239 	uint16_t scanned_freq[MAX_ROAM_SCAN_CHAN];
240 	struct cstats_sta_roam_scan_ap ap[MAX_ROAM_CANDIDATE_AP];
241 	uint8_t is_full_scan;
242 } qdf_packed;
243 
244 struct cstats_sta_roam_result {
245 	struct cstats_cmn cmn;
246 	uint8_t bssid[CSTATS_MAC_LEN];
247 	uint32_t timestamp;
248 	uint32_t status;
249 	uint32_t fail_reason;
250 	struct cstats_sta_roam_scan_cancel roam_abort;
251 	uint32_t roam_cancel_reason;
252 } qdf_packed;
253 
254 struct cstats_tdls_disc_req {
255 	struct cstats_cmn cmn;
256 	uint8_t bssid[CSTATS_MAC_LEN];
257 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
258 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
259 	uint8_t act_category;
260 	uint8_t act;
261 	uint8_t dt;
262 	uint8_t direction;
263 } qdf_packed;
264 
265 struct cstats_tdls_disc_resp {
266 	struct cstats_cmn cmn;
267 	uint8_t bssid[CSTATS_MAC_LEN];
268 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
269 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
270 	uint8_t act_category;
271 	uint8_t act;
272 	uint8_t dt;
273 	uint8_t direction;
274 	uint8_t flags;
275 } qdf_packed;
276 
277 struct cstats_tdls_setup_req {
278 	struct cstats_cmn cmn;
279 	uint8_t bssid[CSTATS_MAC_LEN];
280 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
281 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
282 	uint8_t act_category;
283 	uint8_t act;
284 	uint8_t dt;
285 	uint8_t direction;
286 	uint8_t flags;
287 } qdf_packed;
288 
289 struct cstats_tdls_setup_resp {
290 	struct cstats_cmn cmn;
291 	uint8_t bssid[CSTATS_MAC_LEN];
292 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
293 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
294 	uint16_t status;
295 	uint8_t act_category;
296 	uint8_t act;
297 	uint8_t dt;
298 	uint8_t direction;
299 	uint8_t flags;
300 } qdf_packed;
301 
302 struct cstats_tdls_setup_confirm {
303 	struct cstats_cmn cmn;
304 	uint8_t bssid[CSTATS_MAC_LEN];
305 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
306 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
307 	uint16_t status;
308 	uint8_t act_category;
309 	uint8_t act;
310 	uint8_t dt;
311 	uint8_t direction;
312 	uint8_t flags;
313 } qdf_packed;
314 
315 struct cstats_tdls_tear_down {
316 	struct cstats_cmn cmn;
317 	uint8_t bssid[CSTATS_MAC_LEN];
318 	uint8_t init_sta_addr[CSTATS_MAC_LEN];
319 	uint8_t resp_sta_addr[CSTATS_MAC_LEN];
320 	uint16_t reason;
321 	uint8_t act_category;
322 	uint8_t act;
323 	uint8_t direction;
324 } qdf_packed;
325 
326 struct cstats_sap_go_start {
327 	struct cstats_cmn cmn;
328 	uint8_t status;
329 	uint16_t operating_chan_freq;
330 	uint8_t ch_width;
331 	uint16_t staId;
332 	uint8_t ssid_len;
333 	uint8_t ssid[WLAN_SSID_MAX_LEN + 1];
334 	uint8_t bssid[CSTATS_MAC_LEN];
335 } qdf_packed;
336 
337 struct cstats_sap_go_stop {
338 	struct cstats_cmn cmn;
339 	uint8_t status;
340 	uint8_t bssid[CSTATS_MAC_LEN];
341 } qdf_packed;
342 
343 struct cstats_sap_go_dfs_evt {
344 	struct cstats_cmn cmn;
345 	uint8_t bssid[CSTATS_MAC_LEN];
346 	uint8_t cc[CSTATS_MAC_LEN];
347 	uint16_t freq;
348 } qdf_packed;
349 
350 struct cstats_sap_go_sta_disassoc {
351 	struct cstats_cmn cmn;
352 	uint8_t sta_mac[CSTATS_MAC_LEN];
353 	uint8_t bssid[CSTATS_MAC_LEN];
354 	uint8_t sta_id;
355 	uint8_t status;
356 	uint32_t status_code;
357 	uint8_t reason;
358 	uint32_t reason_code;
359 } qdf_packed;
360 
361 struct cstats_sap_go_sta_assoc_reassoc {
362 	struct cstats_cmn cmn;
363 	uint8_t sta_mac[CSTATS_MAC_LEN];
364 	uint8_t bssid[CSTATS_MAC_LEN];
365 	uint8_t sta_id;
366 	uint8_t status;
367 	uint32_t status_code;
368 } qdf_packed;
369 
370 struct cstats_nan_disc_enable {
371 	struct cstats_cmn cmn;
372 	uint16_t social_chan_2g_freq;
373 	uint16_t social_chan_5g_freq;
374 	uint32_t rtt_cap;
375 	uint8_t disable_6g_nan;
376 } qdf_packed;
377 
378 struct cstats_nan_disc_enable_resp {
379 	struct cstats_cmn cmn;
380 	uint8_t is_enable_success;
381 	uint8_t mac_id;
382 	uint8_t disc_state;
383 } qdf_packed;
384 
385 struct cstats_nan_disc_disable_req {
386 	struct cstats_cmn cmn;
387 	uint8_t disable_2g_discovery;
388 	uint8_t disable_5g_discovery;
389 } qdf_packed;
390 
391 struct cstats_nan_disc_disable_resp {
392 	struct cstats_cmn cmn;
393 	uint8_t disc_state;
394 } qdf_packed;
395 
396 struct cstats_nan_ndi_create_req {
397 	struct cstats_cmn cmn;
398 	uint16_t transaction_id;
399 } qdf_packed;
400 
401 struct cstats_nan_ndi_create_resp {
402 	struct cstats_cmn cmn;
403 	uint16_t transaction_id;
404 	uint8_t status;
405 	uint8_t reason;
406 } qdf_packed;
407 
408 struct cstats_nan_ndi_delete_req {
409 	struct cstats_cmn cmn;
410 	uint16_t transaction_id;
411 } qdf_packed;
412 
413 struct cstats_nan_ndi_delete_resp {
414 	struct cstats_cmn cmn;
415 	uint16_t transaction_id;
416 	uint8_t status;
417 	uint8_t reason;
418 } qdf_packed;
419 
420 struct cstats_nan_ndp_initiator_req {
421 	struct cstats_cmn cmn;
422 	uint16_t transaction_id;
423 	uint16_t channel;
424 	uint32_t channel_cfg;
425 	uint16_t service_instance_id;
426 	uint8_t self_ndi_mac_addr[CSTATS_MAC_LEN];
427 	uint8_t peer_discovery_mac_addr[CSTATS_MAC_LEN];
428 } qdf_packed;
429 
430 struct cstats_nan_ndp_initiator_resp {
431 	struct cstats_cmn cmn;
432 	uint8_t status;
433 	uint8_t reason;
434 	uint16_t transaction_id;
435 	uint16_t service_instance_id;
436 } qdf_packed;
437 
438 struct cstats_nan_ndp_responder_req {
439 	struct cstats_cmn cmn;
440 	uint16_t transaction_id;
441 	uint16_t ndp_instance_id;
442 	uint8_t ndp_rsp;
443 	uint32_t ncs_sk_type;
444 } qdf_packed;
445 
446 struct cstats_nan_ndp_responder_resp {
447 	struct cstats_cmn cmn;
448 	uint16_t transaction_id;
449 	uint8_t status;
450 	uint8_t reason;
451 } qdf_packed;
452 
453 struct cstats_nan_ndp_end_req {
454 	struct cstats_cmn cmn;
455 	uint16_t transaction_id;
456 	uint8_t num_ndp_instances;
457 } qdf_packed;
458 
459 struct cstats_nan_ndp_end_resp {
460 	struct cstats_cmn cmn;
461 	uint8_t status;
462 	uint8_t reason;
463 	uint16_t transaction_id;
464 } qdf_packed;
465 
466 struct cstats_nan_ndp_confirm_ind {
467 	struct cstats_cmn cmn;
468 	uint32_t instance_id;
469 	uint16_t reason_code;
470 	uint8_t peer_addr[CSTATS_MAC_LEN];
471 	uint8_t rsp_code;
472 } qdf_packed;
473 
474 struct cstats_nan_ndp_ind {
475 	struct cstats_cmn cmn;
476 	uint8_t peer_mac[CSTATS_MAC_LEN];
477 	uint8_t peer_discovery_mac_addr[CSTATS_MAC_LEN];
478 	uint16_t ndp_instance_id;
479 	uint32_t service_instance_id;
480 } qdf_packed;
481 
482 struct cstats_nan_ndp_new_peer_ind {
483 	struct cstats_cmn cmn;
484 	uint8_t peer_mac[CSTATS_MAC_LEN];
485 	uint16_t sta_id;
486 } qdf_packed;
487 
488 struct cstats_pkt_info {
489 	struct cstats_cmn cmn;
490 	uint8_t src_mac[CSTATS_MAC_LEN];
491 	uint8_t dst_mac[CSTATS_MAC_LEN];
492 	uint8_t type;
493 	uint8_t dir;
494 	uint8_t status;
495 } qdf_packed;
496 
497 struct cstats_csa_evt {
498 	struct cstats_cmn cmn;
499 	uint8_t direction;
500 	uint16_t target_freq;
501 	uint8_t target_ch_width;
502 	uint16_t current_freq;
503 	uint8_t current_ch_width;
504 	uint8_t switch_mode;
505 } qdf_packed;
506 
507 #endif /* __WLAN_CP_STATS_CHIPSET_STATS_EVENTS_H */
508