1 /*
2  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  * This file contains the API definitions for the Unified Wireless Module
22  * Interface (WMI).
23  */
24 
25 #ifndef _WMI_UNIFIED_API_H_
26 #define _WMI_UNIFIED_API_H_
27 
28 #include <osdep.h>
29 #include "htc_api.h"
30 #include "wmi_unified_param.h"
31 #include "service_ready_param.h"
32 #include "wlan_objmgr_psoc_obj.h"
33 #include "wlan_mgmt_txrx_utils_api.h"
34 #include <wlan_dfs_public_struct.h>
35 #include <wlan_crypto_global_def.h>
36 #include "wlan_thermal_public_struct.h"
37 #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
38 #include "wmi_unified_pmo_api.h"
39 #endif
40 #ifdef WLAN_FEATURE_MIB_STATS
41 #include "wlan_cp_stats_mc_defs.h"
42 #endif
43 #include "wlan_scan_public_structs.h"
44 #ifdef WLAN_FEATURE_ACTION_OUI
45 #include "wlan_action_oui_public_struct.h"
46 #endif
47 #ifdef WLAN_SUPPORT_GREEN_AP
48 #include "wlan_green_ap_api.h"
49 #endif
50 #ifdef WLAN_FEATURE_DSRC
51 #include "wlan_ocb_public_structs.h"
52 #endif
53 #ifdef WLAN_SUPPORT_TWT
54 #include "wmi_unified_twt_param.h"
55 #include "wmi_unified_twt_api.h"
56 #endif
57 #ifdef WDS_CONV_TARGET_IF_OPS_ENABLE
58 #include "wmi_unified_wds_api.h"
59 #endif
60 #ifdef FEATURE_WLAN_EXTSCAN
61 #include "wmi_unified_extscan_api.h"
62 #endif
63 
64 #ifdef IPA_OFFLOAD
65 #include "wlan_ipa_public_struct.h"
66 #endif
67 
68 #ifdef WMI_SMART_ANT_SUPPORT
69 #include "wmi_unified_smart_ant_api.h"
70 #endif
71 
72 #ifdef WMI_DBR_SUPPORT
73 #include "wmi_unified_dbr_api.h"
74 #endif
75 
76 #ifdef WMI_ATF_SUPPORT
77 #include "wmi_unified_atf_api.h"
78 #endif
79 
80 #ifdef WMI_AP_SUPPORT
81 #include "wmi_unified_ap_api.h"
82 #endif
83 
84 #ifdef WLAN_FEATURE_DSRC
85 #include "wmi_unified_ocb_api.h"
86 #endif
87 
88 #ifdef WLAN_FEATURE_NAN
89 #include "wmi_unified_nan_api.h"
90 #endif
91 
92 #ifdef CONVERGED_P2P_ENABLE
93 #include <wmi_unified_p2p_api.h>
94 #endif
95 
96 #ifdef WMI_ROAM_SUPPORT
97 #include "wmi_unified_roam_api.h"
98 #endif
99 
100 #ifdef WMI_CONCURRENCY_SUPPORT
101 #include "wmi_unified_concurrency_api.h"
102 #endif
103 
104 #ifdef WMI_STA_SUPPORT
105 #include "wmi_unified_sta_api.h"
106 #endif
107 
108 #ifdef WLAN_FW_OFFLOAD
109 #include "wmi_unified_fwol_api.h"
110 #endif
111 
112 #ifdef WLAN_FEATURE_PKT_CAPTURE
113 #include "wlan_pkt_capture_public_structs.h"
114 #endif
115 
116 #ifdef WLAN_IOT_SIM_SUPPORT
117 #include "wlan_iot_sim_public_structs.h"
118 #endif
119 
120 #include "wmi_unified_cp_stats_api.h"
121 
122 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
123 #include "wmi_unified_11be_setup_api.h"
124 #endif
125 
126 #ifdef WLAN_FEATURE_DBAM_CONFIG
127 #include "wlan_coex_public_structs.h"
128 #endif
129 
130 typedef qdf_nbuf_t wmi_buf_t;
131 #define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
132 
133 /* Number of bits to shift to combine 32 bit integer to 64 bit */
134 #define WMI_LOWER_BITS_SHIFT_32	0x20
135 
136 #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000
137 
138 struct wmi_soc;
139 struct policy_mgr_dual_mac_config;
140 
141 /**
142  * enum wmi_target_type - type of supported wmi command
143  * @WMI_TLV_TARGET: tlv based target
144  * @WMI_NON_TLV_TARGET: non-tlv based target
145  * @WMI_MAX_TARGET_TYPE: max value
146  *
147  */
148 enum wmi_target_type {
149 	WMI_TLV_TARGET,
150 	WMI_NON_TLV_TARGET,
151 	WMI_MAX_TARGET_TYPE
152 };
153 
154 /**
155  * enum wmi_rx_exec_ctx - wmi rx execution context
156  * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
157  * @WMI_RX_UMAC_CTX: execution context provided by umac layer
158  * @WMI_RX_TASKLET_CTX: legacy name for UMAC context
159  * @WMI_RX_SERIALIZER_CTX: Execution context is serialized thread context
160  * @WMI_RX_DIAG_WORK_CTX: work queue execution context for FW diag events
161  */
162 enum wmi_rx_exec_ctx {
163 	WMI_RX_WORK_CTX,
164 	WMI_RX_UMAC_CTX,
165 	WMI_RX_TASKLET_CTX = WMI_RX_UMAC_CTX,
166 	WMI_RX_SERIALIZER_CTX = 2,
167 	WMI_RX_DIAG_WORK_CTX
168 };
169 
170 /**
171  * enum wmi_rx_buff_type - wmi rx event buffer type
172  * @WMI_RX_PROCESSED_BUFF: processed event buffer provided by WMI layer
173  * @WMI_RX_RAW_BUFF:       raw event buffer provided by WMI layer
174  *
175  */
176 enum wmi_rx_buff_type {
177 	WMI_RX_PROCESSED_BUFF,
178 	WMI_RX_RAW_BUFF
179 };
180 
181 /**
182  * enum wmi_fw_mem_prio - defines FW Memory requirement type
183  * @WMI_FW_MEM_HIGH_PRIORITY:   Memory requires contiguous memory allocation
184  * @WMI_FW_MEM_LOW_PRIORITY:    Memory can be fragmented
185  * @WMI_FW_PRIORITY_MAX:        Invalid type
186  */
187 enum wmi_fw_mem_prio {
188 	WMI_FW_MEM_HIGH_PRIORITY = 0,
189 	WMI_FW_MEM_LOW_PRIORITY,
190 	WMI_FW_PRIORITY_MAX
191 };
192 
193 /**
194  * struct wmi_unified_attach_params - wmi init parameters
195  *  @osdev: NIC device
196  *  @target_type: type of supported wmi command
197  *  @use_cookie: flag to indicate cookie based allocation
198  *  @is_async_ep: queueing interrupt or non-interrupt endpoint
199  *  @rx_ops: handle to wmi ops
200  *  @psoc: objmgr psoc
201  *  @max_commands: max commands
202  *  @soc_id: SoC device instance id
203  */
204 struct wmi_unified_attach_params {
205 	osdev_t osdev;
206 	enum wmi_target_type target_type;
207 	bool use_cookie;
208 	bool is_async_ep;
209 	struct wlan_objmgr_psoc *psoc;
210 	uint16_t max_commands;
211 	uint32_t soc_id;
212 };
213 
214 /**
215  *  struct wmi_unified_exec_ctx - wmi execution ctx and handler buff
216  *  @exec_ctx:  execution context of event
217  *  @buff_type: buffer type for event handler
218  */
219 struct wmi_unified_exec_ctx {
220 	enum wmi_rx_exec_ctx exec_ctx;
221 	enum wmi_rx_buff_type buff_type;
222 };
223 
224 /**
225  * wmi_unified_attach() - attach for unified WMI
226  *  @scn_handle: handle to SCN.
227  *  @params: attach params for WMI
228  *
229  */
230 void *wmi_unified_attach(void *scn_handle,
231 			 struct wmi_unified_attach_params *params);
232 
233 
234 
235 /**
236  * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
237  *
238  * @wmi_handle: wmi handle
239  * @cmd: mgmt command
240  * @header: pointer to 802.11 header
241  * @vdev_id: vdev id
242  * @chanfreq: channel frequency
243  *
244  * Return: none
245  */
246 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
247 			void *header, uint32_t vdev_id, uint32_t chanfreq);
248 
249 /**
250  * wmi_unified_detach() - detach for unified WMI
251  * @wmi_handle: handle to WMI.
252  *
253  *  Return: void.
254  */
255 void wmi_unified_detach(struct wmi_unified *wmi_handle);
256 
257 /**
258  * wmi_send_time_stamp_sync_cmd_tlv() - API to sync time between host and
259  *                                      firmware
260  * @wmi_handle: handle to WMI.
261  *
262  * Return: none
263  */
264 void wmi_send_time_stamp_sync_cmd_tlv(wmi_unified_t wmi_handle);
265 
266 /**
267  * wmi_unified_remove_work() - detach for WMI work
268  * @wmi_handle: handle to WMI
269  *
270  * A function that does not fully detach WMI, but just remove work
271  * queue items associated with it. This is used to make sure that
272  * before any other processing code that may destroy related contexts
273  * (HTC, etc), work queue processing on WMI has already been stopped.
274  *
275  * Return: None
276  */
277 void
278 wmi_unified_remove_work(struct wmi_unified *wmi_handle);
279 
280 /**
281  * wmi_buf_alloc() - generic function to allocate WMI buffer
282  * @wmi_handle: handle to WMI.
283  * @len: length of the buffer
284  *
285  * Return: return wmi_buf_t or null if memory alloc fails
286  */
287 #ifdef NBUF_MEMORY_DEBUG
288 #define wmi_buf_alloc(wmi_handle, len) \
289 	wmi_buf_alloc_debug(wmi_handle, len, __func__, __LINE__)
290 
291 wmi_buf_t
292 wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len,
293 		    const char *func_name, uint32_t line_num);
294 #else
295 #define wmi_buf_alloc(wmi_handle, len) \
296 	wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__)
297 
298 wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
299 			   const char *func, uint32_t line);
300 #endif
301 
302 /**
303  * wmi_buf_free() - generic function frees WMI net buffer
304  *
305  *  @net_buf : Pointer to net_buf to be freed
306  */
307 void wmi_buf_free(wmi_buf_t net_buf);
308 
309 /**
310  * wmi_unified_cmd_send() -  generic function to send unified WMI command
311  * @wmi_handle: handle to WMI.
312  * @buf: wmi command buffer
313  * @buflen: wmi command buffer length
314  * @cmd_id: WMI cmd id
315  *
316  * Note, it is NOT safe to access buf after calling this function!
317  *
318  * Return: QDF_STATUS
319  */
320 #define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \
321 	wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \
322 				cmd_id, __func__, __LINE__)
323 
324 QDF_STATUS
325 wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
326 			uint32_t buflen, uint32_t cmd_id,
327 			const char *func, uint32_t line);
328 
329 #ifdef WLAN_FEATURE_WMI_SEND_RECV_QMI
330 /**
331  * wmi_unified_cmd_send_over_qmi() -  generic function to send unified WMI command
332  *                               over QMI
333  * @wmi_handle: handle to WMI.
334  * @buf: wmi command buffer
335  * @buflen: wmi command buffer length
336  * @cmd_id: WMI cmd id
337  *
338  * Return: QDF_STATUS
339  */
340 QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
341 				    wmi_buf_t buf, uint32_t buflen,
342 				    uint32_t cmd_id);
343 
344 /**
345  * wmi_process_qmi_fw_event() - Process WMI event received over QMI
346  * @wmi_cb_ctx: WMI handle received as call back context
347  * @buf: Pointer to WMI event buffer
348  * @len: Len of WMI buffer received
349  *
350  * Return: None
351  */
352 int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len);
353 #else
354 static inline
wmi_unified_cmd_send_over_qmi(struct wmi_unified * wmi_handle,wmi_buf_t buf,uint32_t buflen,uint32_t cmd_id)355 QDF_STATUS wmi_unified_cmd_send_over_qmi(struct wmi_unified *wmi_handle,
356 				    wmi_buf_t buf, uint32_t buflen,
357 				    uint32_t cmd_id)
358 {
359 	return QDF_STATUS_E_NOSUPPORT;
360 }
361 
wmi_process_qmi_fw_event(void * wmi_cb_ctx,void * buf,int len)362 static inline int wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len)
363 {
364 	return -EINVAL;
365 }
366 #endif
367 
368 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE
369 /**
370  * wmi_unified_green_ap_ll_ps_send() - Send unified WMI command to
371  * enable/disable green ap low latency power save mode
372  * @wmi_handle: handle to WMI.
373  * @green_ap_ll_ps_params: low latency power save mode parameter
374  *
375  * Return: None
376  */
377 QDF_STATUS wmi_unified_green_ap_ll_ps_send(wmi_unified_t wmi_handle,
378 					   struct green_ap_ll_ps_cmd_param *green_ap_ll_ps_params);
379 #endif
380 
381 /**
382  * wmi_unified_cmd_send_pm_chk() - send unified WMI command with PM check,
383  * if target is in suspended state, WMI command will be sent over QMI.
384  * @wmi_handle: handle to WMI.
385  * @buf: wmi command buffer
386  * @buflen: wmi command buffer length
387  * @cmd_id: WMI cmd id
388  * @is_qmi_send_support:send by qmi is supported
389  *
390  * Note, it is NOT safe to access buf after calling this function!
391  *
392  * Return: QDF_STATUS
393  */
394 QDF_STATUS wmi_unified_cmd_send_pm_chk(struct wmi_unified *wmi_handle,
395 				       wmi_buf_t buf, uint32_t buflen,
396 				       uint32_t cmd_id,
397 				       bool is_qmi_send_support);
398 
399 /**
400  * wmi_unified_register_event() - WMI event handler
401  * registration function for converged components
402  * @wmi_handle:   handle to WMI.
403  * @event_id:     WMI event ID
404  * @handler_func: Event handler call back function
405  *
406  * Return: QDF_STATUS
407  */
408 QDF_STATUS
409 wmi_unified_register_event(wmi_unified_t wmi_handle,
410 				   uint32_t event_id,
411 				   wmi_unified_event_handler handler_func);
412 
413 /**
414  * wmi_unified_register_event_handler() - WMI event handler
415  * registration function
416  * @wmi_handle:   handle to WMI.
417  * @event_id:     WMI event ID
418  * @handler_func: Event handler call back function
419  * @rx_ctx: rx event processing context
420  *
421  * Return: QDF_STATUS
422  */
423 QDF_STATUS
424 wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
425 				   wmi_conv_event_id event_id,
426 				   wmi_unified_event_handler handler_func,
427 				   uint8_t rx_ctx);
428 
429 /**
430  * wmi_unified_unregister_event() - WMI event handler unregister function
431  * for converged components
432  * @wmi_handle:    handle to WMI.
433  * @event_id:      WMI event ID
434  *
435  * Return: QDF_STATUS
436  */
437 QDF_STATUS
438 wmi_unified_unregister_event(wmi_unified_t wmi_handle,
439 			     uint32_t event_id);
440 
441 /**
442  * wmi_unified_register_raw_event_handler() - WMI event handler
443  * registration function.
444  * @wmi_handle:   handle to WMI.
445  * @event_id:     WMI event ID
446  * @handler_func: Event handler call back function
447  * @rx_ctx:       rx event processing context
448  *
449  * Register event handler to get struct wmi_raw_event_buffer as arg
450  *
451  * Return: QDF_STATUS
452  */
453 QDF_STATUS
454 wmi_unified_register_raw_event_handler(wmi_unified_t wmi_handle,
455 				       wmi_conv_event_id event_id,
456 				       wmi_unified_event_handler handler_func,
457 				       enum wmi_rx_exec_ctx rx_ctx);
458 
459 /**
460  * wmi_unified_unregister_event_handler() - WMI event handler unregister
461  * function
462  * @wmi_handle:  handle to WMI.
463  * @event_id:    WMI event ID
464  *
465  * Return: QDF_STATUS
466  */
467 QDF_STATUS
468 wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
469 				     wmi_conv_event_id event_id);
470 
471 /**
472  * wmi_unified_connect_htc_service() -  WMI API to get connect to HTC service
473  * @wmi_handle: handle to WMI.
474  * @htc_handle: handle to HTC.
475  *
476  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
477  */
478 QDF_STATUS
479 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
480 				HTC_HANDLE htc_handle);
481 
482 #if defined(WLAN_FEATURE_WMI_DIAG_OVER_CE7) || \
483 	defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
484 /**
485  * wmi_diag_connect_pdev_htc_service()
486  * WMI DIAG API to get connect to HTC service
487  * @wmi_handle: handle to WMI.
488  * @htc_handle: handle to HTC.
489  *
490  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
491  */
492 QDF_STATUS
493 wmi_diag_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
494 				  HTC_HANDLE htc_handle);
495 #else
496 static inline QDF_STATUS
wmi_diag_connect_pdev_htc_service(struct wmi_unified * wmi_handle,HTC_HANDLE htc_handle)497 wmi_diag_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
498 				  HTC_HANDLE htc_handle)
499 {
500 	return QDF_STATUS_SUCCESS;
501 }
502 #endif
503 
504 #if defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
505 /**
506  * wmi_dbr_connect_pdev_htc_service() - WMI DBR API to connect to HTC service
507  * @wmi_handle: handle to WMI.
508  * @htc_handle: handle to HTC.
509  *
510  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAULT for failure
511  */
512 QDF_STATUS
513 wmi_dbr_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
514 				 HTC_HANDLE htc_handle);
515 #else
516 static inline QDF_STATUS
wmi_dbr_connect_pdev_htc_service(struct wmi_unified * wmi_handle,HTC_HANDLE htc_handle)517 wmi_dbr_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
518 				 HTC_HANDLE htc_handle)
519 {
520 	return QDF_STATUS_SUCCESS;
521 }
522 #endif
523 
524 /**
525  * wmi_is_suspend_ready() - WMI API to verify the host has enough credits
526  *                          to suspend
527  * @wmi_handle: handle to WMI.
528  */
529 
530 int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
531 
532 /**
533  * wmi_get_host_credits() - WMI API to get updated host_credits
534  * @wmi_handle      : handle to WMI.
535  */
536 
537 int wmi_get_host_credits(wmi_unified_t wmi_handle);
538 
539 /**
540  * wmi_get_pending_cmds() - WMI API to get WMI Pending Commands in the HTC
541  *                          queue
542  * @wmi_handle: handle to WMI.
543  */
544 
545 int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
546 
547 /**
548  * wmi_set_target_suspend() - WMI API to set target suspend state
549  * @wmi_handle: handle to WMI.
550  * @val: suspend state boolean
551  */
552 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
553 
554 /**
555  * wmi_set_target_suspend_acked() - WMI API to set target suspend command
556  *                                  acked flag
557  * @wmi_handle: handle to WMI.
558  * @val: suspend command acked flag boolean
559  */
560 void wmi_set_target_suspend_acked(wmi_unified_t wmi_handle, bool val);
561 
562 /**
563  * wmi_is_target_suspended() - WMI API to check target suspend state
564  * @wmi_handle: handle to WMI.
565  *
566  * WMI API to check target suspend state
567  *
568  * Return: true if target is suspended, else false.
569  */
570 bool wmi_is_target_suspended(struct wmi_unified *wmi_handle);
571 
572 /**
573  * wmi_is_target_suspend_acked() - WMI API to check target suspend command is
574  *                                 acked or not
575  * @wmi_handle: handle to WMI.
576  *
577  * WMI API to check whether the target suspend command is acked or not
578  *
579  * Return: true if target suspend command is acked, else false.
580  */
581 bool wmi_is_target_suspend_acked(struct wmi_unified *wmi_handle);
582 
583 #ifdef WLAN_FEATURE_WMI_SEND_RECV_QMI
584 /**
585  * wmi_set_qmi_stats() - WMI API to set qmi stats enabled/disabled
586  * @wmi_handle: handle to WMI.
587  * @val: suspend state boolean
588  */
589 void wmi_set_qmi_stats(wmi_unified_t wmi_handle, bool val);
590 
591 /**
592  * wmi_is_qmi_stats_enabled() - WMI API to check if periodic stats
593  * over qmi is enableid
594  * @wmi_handle: handle to WMI.
595  *
596  * WMI API to check if periodic stats over qmi is enabled
597  *
598  * Return: true if qmi stats is enabled, else false.
599  */
600 bool wmi_is_qmi_stats_enabled(struct wmi_unified *wmi_handle);
601 #else
602 static inline
wmi_set_qmi_stats(wmi_unified_t wmi_handle,bool val)603 void wmi_set_qmi_stats(wmi_unified_t wmi_handle, bool val)
604 {}
605 
606 static inline
wmi_is_qmi_stats_enabled(struct wmi_unified * wmi_handle)607 bool wmi_is_qmi_stats_enabled(struct wmi_unified *wmi_handle)
608 {
609 	return false;
610 }
611 #endif /* end if of WLAN_FEATURE_WMI_SEND_RECV_QMI */
612 
613 /**
614  * wmi_set_is_wow_bus_suspended() - WMI API to set bus suspend state
615  * @wmi_handle:	handle to WMI.
616  * @val: suspend state boolean
617  */
618 void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
619 
620 /**
621  * wmi_tag_crash_inject() - WMI API to set crash injection state
622  * @wmi_handle:	handle to WMI.
623  * @flag: crash injection state boolean
624  */
625 void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
626 
627 /**
628  * wmi_set_tgt_assert() - WMI API to set target assert
629  * @wmi_handle: handle to WMI.
630  * @val: target assert config value.
631  *
632  * Return: none.
633  */
634 void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
635 
636 /**
637  * wmi_stop() - generic function to block unified WMI command
638  * @wmi_handle: handle to WMI.
639  *
640  * Return: 0  on success and -ve on failure.
641  */
642 int
643 wmi_stop(wmi_unified_t wmi_handle);
644 
645 /**
646  * wmi_start() - generic function to start unified WMI command
647  * @wmi_handle: handle to WMI.
648  *
649  * Return: 0  on success and -ve on failure.
650  */
651 int
652 wmi_start(wmi_unified_t wmi_handle);
653 
654 /**
655  * wmi_is_blocked() - generic function to check if WMI is blocked
656  * @wmi_handle: handle to WMI.
657  *
658  * Return: true, if blocked, false if not blocked
659  */
660 bool
661 wmi_is_blocked(wmi_unified_t wmi_handle);
662 
663 /**
664  * wmi_flush_endpoint() - API to flush all the previous packets associated
665  *                        with the wmi endpoint
666  *
667  * @wmi_handle: handle to WMI.
668  */
669 void
670 wmi_flush_endpoint(wmi_unified_t wmi_handle);
671 
672 /**
673  * wmi_get_endpoint() - API to get endpoint ID
674  * @wmi_handle: handle to WMI.
675  *
676  * Return Handle to endpoint
677  */
678 HTC_ENDPOINT_ID
679 wmi_get_endpoint(wmi_unified_t wmi_handle);
680 
681 /**
682  * wmi_interface_sequence_stop() - API to stop wmi sequence check
683  *
684  * @wmi_handle: handle to WMI.
685  */
686 void
687 wmi_interface_sequence_stop(wmi_unified_t wmi_handle);
688 
689 /**
690  * wmi_pdev_id_conversion_enable() - API to enable pdev_id and phy_id
691  *                     conversion in WMI. By default pdev_id and
692  *                     phyid conversion is not done in WMI.
693  *                     This API can be used enable conversion in WMI.
694  * @wmi_handle: handle to WMI
695  * @pdev_id_map: pdev conversion map
696  * @size: size of pdev_id_map
697  *
698  * Return: none
699  */
700 void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle,
701 				   uint32_t *pdev_id_map,
702 				   uint8_t size);
703 
704 /**
705  * __wmi_control_rx() - API to handle wmi rx event after UMAC has taken care
706  *                      of execution context
707  *
708  * @wmi_handle: handle to WMI.
709  * @evt_buf: wmi event buffer
710  */
711 void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
712 #ifdef FEATURE_RUNTIME_PM
713 /**
714  * wmi_set_runtime_pm_inprogress() - set runtime pm progress flag
715  * @wmi_handle: wmi context
716  * @val: runtime pm progress flag
717  */
718 void
719 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
720 
721 /**
722  * wmi_get_runtime_pm_inprogress() - get runtime pm progress flag
723  * @wmi_handle: wmi context
724  *
725  * Return: value of runtime pm progress flag
726  */
727 bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
728 #else
729 static inline void
wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle,bool val)730 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
731 {
732 	return;
733 }
wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)734 static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
735 {
736 	return false;
737 }
738 #endif
739 
740 /**
741  * wmi_set_wow_enable_ack_failed() - set wow enable ack failed status
742  *     if wow enable ack failed, which means host and fw have some problem
743  *     to exchange wmi cmd. set indication here and block wmi cmds.
744  *     the cmds can be sent again after wmi re-init in subsystem recovery.
745  * @wmi_handle: wmi context
746  *
747  * return: none
748  */
749 void wmi_set_wow_enable_ack_failed(wmi_unified_t wmi_handle);
750 
751 /**
752  * wmi_clear_wow_enable_ack_failed() - clear wow enable ack failed status
753  *     explicitly clear this status when wmi close of SSR
754  * @wmi_handle: wmi context
755  *
756  * return: none
757  */
758 void wmi_clear_wow_enable_ack_failed(wmi_unified_t wmi_handle);
759 
760 /**
761  * wmi_has_wow_enable_ack_failed() - get wow enable ack failed status
762  * @wmi_handle: wmi context
763  *
764  * Return: true if wow enable ack already failed. other false
765  */
766 bool wmi_has_wow_enable_ack_failed(wmi_unified_t wmi_handle);
767 
768 /**
769  * wmi_unified_get_soc_handle: Get WMI SoC handle
770  * @wmi_handle: WMI context got from wmi_attach
771  *
772  * Return: Pointer to Soc handle
773  */
774 void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
775 
776 /**
777  * wmi_unified_get_pdev_handle: Get WMI SoC handle
778  * @soc: Pointer to wmi soc object
779  * @pdev_idx: pdev index
780  *
781  * Return: Pointer to wmi handle or NULL on failure
782  */
783 void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
784 
785 /**
786  * wmi_process_fw_event() - UMAC Callback to process fw event.
787  * @wmi_handle: handle to WMI.
788  * @evt_buf: wmi event buffer
789  *
790  * This function process fw event in caller context
791  *
792  * Return: none
793  */
794 void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
795 
796 /**
797  * wmi_get_max_msg_len() - get maximum WMI message length
798  * @wmi_handle: WMI handle.
799  *
800  * This function returns the maximum WMI message length
801  *
802  * Return: maximum WMI message length
803  */
804 uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
805 
806 /**
807  * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
808  * @wmi_handle: wmi handle
809  * @hw_mode_index: The HW_Mode field is a enumerated type that is selected
810  * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
811  *
812  * Request HardWare (HW) Mode change to WLAN firmware
813  *
814  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
815  */
816 QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(wmi_unified_t wmi_handle,
817 					   uint32_t hw_mode_index);
818 
819 /**
820  * wmi_unified_soc_set_rf_path_cmd() - WMI_PDEV_SET_RF_PATH_CMDID to FW
821  * @wmi_handle: wmi handle
822  * @rf_path_index: RF path index to switch to
823  * @pdev_id: pdev id
824  *
825  * Request RF path change to WLAN firmware
826  *
827  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
828  */
829 QDF_STATUS wmi_unified_soc_set_rf_path_cmd(wmi_unified_t wmi_handle,
830 					   uint32_t rf_path_index,
831 					   uint8_t pdev_id);
832 
833 /**
834  * wmi_unified_extract_hw_mode_resp() - Extract HW mode change response
835  * @wmi: WMI handle
836  * @evt_buf: Buffer holding event data
837  * @cmd_status: command status
838  *
839  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
840  */
841 QDF_STATUS
842 wmi_unified_extract_hw_mode_resp(wmi_unified_t wmi,
843 				 void *evt_buf,
844 				 uint32_t *cmd_status);
845 
846 /**
847  * wmi_unified_extract_rf_path_resp() - Extract RF path change response
848  * @wmi: WMI handle
849  * @evt_buf: Buffer holding event data
850  * @cmd_status: command status
851  *
852  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
853  */
854 QDF_STATUS
855 wmi_unified_extract_rf_path_resp(wmi_unified_t wmi,
856 				 void *evt_buf,
857 				 uint32_t *cmd_status);
858 
859 /**
860  * wmi_unified_extract_roam_trigger_stats() - Extract roam trigger related
861  * stats
862  * @wmi:        wmi handle
863  * @evt_buf:    Pointer to the event buffer
864  * @trig:       Pointer to destination structure to fill data
865  * @idx:        TLV id
866  * @btm_idx:    BTM candidates index
867  *
868  * Return: QDF_STATUS
869  */
870 QDF_STATUS
871 wmi_unified_extract_roam_trigger_stats(wmi_unified_t wmi, void *evt_buf,
872 				       struct wmi_roam_trigger_info *trig,
873 				       uint8_t idx, uint8_t btm_idx);
874 
875 /**
876  * wmi_unified_extract_roam_scan_stats() - Extract roam scan stats from
877  * firmware
878  * @wmi:        wmi handle
879  * @evt_buf:    Pointer to the event buffer
880  * @dst:        Pointer to destination structure to fill data
881  * @idx:        TLV id
882  * @chan_idx:   Index of the channel frequency for this roam trigger
883  * @ap_idx:     Index of the candidate AP for this roam trigger
884  *
885  * Return: QDF_STATUS
886  */
887 QDF_STATUS
888 wmi_unified_extract_roam_scan_stats(wmi_unified_t wmi, void *evt_buf,
889 				    struct wmi_roam_scan_data *dst, uint8_t idx,
890 				    uint8_t chan_idx, uint8_t ap_idx);
891 
892 /**
893  * wmi_unified_extract_roam_result_stats() - Extract roam result related stats
894  * @wmi:        wmi handle
895  * @evt_buf:    Pointer to the event buffer
896  * @dst:        Pointer to destination structure to fill data
897  * @idx:        TLV id
898  *
899  * Return: QDF_STATUS
900  */
901 QDF_STATUS
902 wmi_unified_extract_roam_result_stats(wmi_unified_t wmi, void *evt_buf,
903 				      struct wmi_roam_result *dst,
904 				      uint8_t idx);
905 
906 /**
907  * wmi_unified_extract_roam_11kv_stats() - Extract BTM/Neigh report stats
908  * @wmi:       wmi handle
909  * @evt_buf:   Pointer to the event buffer
910  * @dst:       Pointer to destination structure to fill data
911  * @idx:       TLV id
912  * @rpt_idx:   index of the current channel
913  *
914  * Return: QDF_STATUS
915  */
916 QDF_STATUS
917 wmi_unified_extract_roam_11kv_stats(wmi_unified_t wmi, void *evt_buf,
918 				    struct wmi_neighbor_report_data *dst,
919 				    uint8_t idx, uint8_t rpt_idx);
920 
921 /**
922  * wmi_unified_vdev_create_send() - send VDEV create command to fw
923  * @wmi_handle: wmi handle
924  * @param: pointer to hold vdev create parameter
925  * @macaddr: vdev mac address
926  *
927  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
928  */
929 QDF_STATUS wmi_unified_vdev_create_send(wmi_unified_t wmi_handle,
930 					uint8_t macaddr[QDF_MAC_ADDR_SIZE],
931 					struct vdev_create_params *param);
932 
933 /**
934  * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
935  * @wmi_handle: wmi handle
936  * @if_id: vdev id
937  *
938  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
939  */
940 QDF_STATUS wmi_unified_vdev_delete_send(wmi_unified_t wmi_handle,
941 					uint8_t if_id);
942 
943 /**
944  * wmi_unified_vdev_nss_chain_params_send() - send VDEV nss chain params to fw
945  * @wmi_handle: wmi handle
946  * @vdev_id: vdev id
947  * @nss_chains_user_cfg: user configured params to send
948  *
949  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
950  */
951 QDF_STATUS
952 wmi_unified_vdev_nss_chain_params_send(
953 		wmi_unified_t wmi_handle,
954 		uint8_t vdev_id,
955 		struct vdev_nss_chains *nss_chains_user_cfg);
956 
957 /**
958  * wmi_unified_vdev_stop_send() - send vdev stop command to fw
959  * @wmi_handle: wmi handle
960  * @params: VDEV stop params
961  *
962  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
963  */
964 QDF_STATUS wmi_unified_vdev_stop_send(wmi_unified_t wmi_handle,
965 				      struct vdev_stop_params *params);
966 
967 /**
968  * wmi_unified_vdev_up_send() - send vdev up command in fw
969  * @wmi_handle: wmi handle
970  * @bssid: bssid
971  * @params: pointer to hold vdev up parameter
972  *
973  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
974  */
975 QDF_STATUS wmi_unified_vdev_up_send(wmi_unified_t wmi_handle,
976 				    uint8_t bssid[QDF_MAC_ADDR_SIZE],
977 				    struct vdev_up_params *params);
978 
979 /**
980  * wmi_unified_vdev_down_send() - send vdev down command to fw
981  * @wmi_handle: wmi handle
982  * @vdev_id: vdev id
983  *
984  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
985  */
986 QDF_STATUS wmi_unified_vdev_down_send(wmi_unified_t wmi_handle,
987 				      uint8_t vdev_id);
988 
989 /**
990  * wmi_unified_vdev_start_send() - send vdev start command to fw
991  * @wmi_handle: wmi handle
992  * @req: pointer to hold vdev start parameters
993  *
994  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
995  */
996 QDF_STATUS wmi_unified_vdev_start_send(wmi_unified_t wmi_handle,
997 				       struct vdev_start_params *req);
998 
999 /**
1000  * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
1001  * @wmi_handle: handle to WMI
1002  * @req: pointer to hold nac rssi request data
1003  *
1004  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1005  */
1006 QDF_STATUS
1007 wmi_unified_vdev_set_nac_rssi_send(wmi_unified_t wmi_handle,
1008 				   struct vdev_scan_nac_rssi_params *req);
1009 
1010 /**
1011  * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
1012  * @wmi_handle: handle to WMI.
1013  * @param: pointer to hold vdev set parameter
1014  *
1015  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1016  */
1017 QDF_STATUS
1018 wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle,
1019 				struct vdev_set_params *param);
1020 
1021 /**
1022  * wmi_unified_multiple_vdev_param_send() - sends multiple vdev set params
1023  * @wmi_handle: handle to WMI.
1024  * @params: pointer to hold set_multiple_pdev_vdev_param info.
1025  *
1026  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1027  */
1028 QDF_STATUS
1029 wmi_unified_multiple_vdev_param_send(wmi_unified_t wmi_handle,
1030 				     struct set_multiple_pdev_vdev_param *params);
1031 
1032 /**
1033  * wmi_unified_set_mac_addr_rx_filter() - set mac addr rx filter cmd
1034  * @wmi_handle: wmi handle
1035  * @param: Pointer to set mac filter struct
1036  *
1037  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1038  */
1039 QDF_STATUS
1040 wmi_unified_set_mac_addr_rx_filter(wmi_unified_t wmi_handle,
1041 				   struct set_rx_mac_filter *param);
1042 /**
1043  * wmi_unified_multiple_pdev_param_send() - sends multiple pdev set params
1044  * @wmi_handle: handle to WMI.
1045  * @params: pointer to hold set_multiple_pdev_vdev_param info
1046  *
1047  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1048  */
1049 QDF_STATUS
1050 wmi_unified_multiple_pdev_param_send(wmi_unified_t wmi_handle,
1051 				     struct set_multiple_pdev_vdev_param *params);
1052 
1053 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
1054 /**
1055  * wmi_unified_roam_set_param_send() - WMI roam set parameter function
1056  * @wmi_handle: handle to WMI.
1057  * @roam_param: pointer to hold roam set parameter
1058  *
1059  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1060  */
1061 QDF_STATUS
1062 wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,
1063 				struct vdev_set_params *roam_param);
1064 #else
1065 static inline QDF_STATUS
wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,struct vdev_set_params * roam_param)1066 wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,
1067 				struct vdev_set_params *roam_param)
1068 {
1069 	return QDF_STATUS_SUCCESS;
1070 }
1071 #endif
1072 
1073 /**
1074  * wmi_unified_vdev_set_mu_snif_send() - Set vdev MU sniffer parameters
1075  * @wmi_handle: handle to WMI.
1076  * @param: vdev MU sniffer parameters
1077  *
1078  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1079  */
1080 QDF_STATUS
1081 wmi_unified_vdev_set_mu_snif_send(wmi_unified_t wmi_handle,
1082 				  struct vdev_set_mu_snif_param *param);
1083 
1084 /**
1085  * wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
1086  * @wmi_handle: handle to WMI.
1087  * @param: pointer to hold sifs trigger parameter
1088  *
1089  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1090  */
1091 QDF_STATUS wmi_unified_sifs_trigger_send(wmi_unified_t wmi_handle,
1092 					 struct sifs_trigger_param *param);
1093 
1094 /**
1095  * wmi_unified_peer_delete_send() - send PEER delete command to fw
1096  * @wmi_handle: wmi handle
1097  * @peer_addr: peer mac addr
1098  * @param: pointer to hold peer delete parameters
1099  *
1100  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1101  */
1102 QDF_STATUS
1103 wmi_unified_peer_delete_send(wmi_unified_t wmi_handle,
1104 			     uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
1105 			     struct peer_delete_cmd_params *param);
1106 
1107 /**
1108  * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
1109  * @wmi_handle: wmi handle
1110  * @peer_addr: peer mac address
1111  * @param: pointer to hold peer flush tid parameter
1112  *
1113  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1114  */
1115 QDF_STATUS
1116 wmi_unified_peer_flush_tids_send(wmi_unified_t wmi_handle,
1117 				 uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
1118 				 struct peer_flush_params *param);
1119 #ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
1120 /**
1121  * wmi_unified_peer_txq_flush_config_send() - peer txq flush policy config in fw
1122  * @wmi_handle: wmi handle
1123  * @pr: peer txq flush config parameters
1124  *
1125  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1126  */
1127 QDF_STATUS
1128 wmi_unified_peer_txq_flush_config_send(wmi_unified_t wmi_handle,
1129 				       struct peer_txq_flush_config_params *pr);
1130 #endif
1131 
1132 /**
1133  * wmi_unified_peer_delete_all_send() - send PEER delete all command to fw
1134  * @wmi_hdl: wmi handle
1135  * @param: pointer to hold peer delete all parameters
1136  *
1137  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1138  */
1139 QDF_STATUS wmi_unified_peer_delete_all_send(
1140 					wmi_unified_t wmi_hdl,
1141 					struct peer_delete_all_params *param);
1142 
1143 /**
1144  * wmi_set_peer_param_send() - set peer parameter in fw
1145  * @wmi_handle: wmi handle
1146  * @peer_addr: peer mac address
1147  * @param: pointer to hold peer set parameter
1148  *
1149  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1150  */
1151 QDF_STATUS
1152 wmi_set_peer_param_send(wmi_unified_t wmi_handle,
1153 			uint8_t peer_addr[QDF_MAC_ADDR_SIZE],
1154 			struct peer_set_params *param);
1155 
1156 /**
1157  * wmi_unified_peer_create_send() - send peer create command to fw
1158  * @wmi_handle: wmi handle
1159  * @param: peer create parameters
1160  *
1161  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1162  */
1163 QDF_STATUS wmi_unified_peer_create_send(wmi_unified_t wmi_handle,
1164 					struct peer_create_params *param);
1165 
1166 /**
1167  * wmi_unified_green_ap_ps_send() - enable green ap powersave command
1168  * @wmi_handle: wmi handle
1169  * @value: value
1170  * @pdev_id: pdev id to have radio context
1171  *
1172  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1173  */
1174 QDF_STATUS wmi_unified_green_ap_ps_send(wmi_unified_t wmi_handle,
1175 					uint32_t value, uint8_t pdev_id);
1176 
1177 /**
1178  * wmi_unified_wow_enable_send() - WMI wow enable function
1179  * @wmi_handle: handle to WMI.
1180  * @param: pointer to hold wow enable parameter
1181  * @mac_id: radio context
1182  *
1183  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1184  */
1185 QDF_STATUS wmi_unified_wow_enable_send(wmi_unified_t wmi_handle,
1186 				       struct wow_cmd_params *param,
1187 				       uint8_t mac_id);
1188 
1189 /**
1190  * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
1191  * @wmi_handle: handle to WMI.
1192  *
1193  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1194  */
1195 QDF_STATUS wmi_unified_wow_wakeup_send(wmi_unified_t wmi_handle);
1196 
1197 /**
1198  * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
1199  * @wmi_handle: handle to WMI.
1200  * @param: pointer to wow wakeup event parameter structure
1201  *
1202  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1203  */
1204 QDF_STATUS
1205 wmi_unified_wow_add_wakeup_event_send(wmi_unified_t wmi_handle,
1206 				      struct wow_add_wakeup_params *param);
1207 
1208 /**
1209  * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
1210  * @wmi_handle: handle to WMI.
1211  * @param: pointer to wow wakeup pattern parameter structure
1212  *
1213  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1214  */
1215 QDF_STATUS
1216 wmi_unified_wow_add_wakeup_pattern_send(
1217 		wmi_unified_t wmi_handle,
1218 		struct wow_add_wakeup_pattern_params *param);
1219 
1220 /**
1221  * wmi_unified_wow_remove_wakeup_pattern_send() - wow wakeup pattern function
1222  * @wmi_handle: handle to WMI.
1223  * @param: pointer to wow wakeup pattern parameter structure
1224  *
1225  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1226  */
1227 QDF_STATUS
1228 wmi_unified_wow_remove_wakeup_pattern_send(
1229 		wmi_unified_t wmi_handle,
1230 		struct wow_remove_wakeup_pattern_params *param);
1231 
1232 /**
1233  * wmi_unified_packet_log_enable_send() - WMI request stats function
1234  * @wmi_handle : handle to WMI.
1235  * @PKTLOG_EVENT : PKTLOG Event
1236  * @mac_id : MAC id corresponds to pdev id
1237  *
1238  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1239  */
1240 QDF_STATUS
1241 wmi_unified_packet_log_enable_send(wmi_unified_t wmi_handle,
1242 				   WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT,
1243 				   uint8_t mac_id);
1244 
1245 /**
1246  * wmi_unified_peer_based_pktlog_send() - WMI request enable peer
1247  * based filtering
1248  * @wmi_handle: handle to WMI.
1249  * @macaddr: PEER mac address to be filtered
1250  * @mac_id: Mac id
1251  * @enb_dsb: Enable or Disable peer based pktlog
1252  *           filtering
1253  *
1254  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1255  */
1256 QDF_STATUS wmi_unified_peer_based_pktlog_send(wmi_unified_t wmi_handle,
1257 					      uint8_t *macaddr,
1258 					      uint8_t mac_id,
1259 					      uint8_t enb_dsb);
1260 
1261 /**
1262  * wmi_unified_packet_log_disable_send() - WMI pktlog disable function
1263  * @wmi_handle: handle to WMI.
1264  * @mac_id: Mac id
1265  *
1266  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1267  */
1268 QDF_STATUS wmi_unified_packet_log_disable_send(wmi_unified_t wmi_handle,
1269 					       uint8_t mac_id);
1270 
1271 /**
1272  * wmi_unified_suspend_send() - WMI suspend function
1273  * @wmi_handle: handle to WMI.
1274  * @param: pointer to hold suspend parameter
1275  * @mac_id: radio context
1276  *
1277  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1278  */
1279 QDF_STATUS wmi_unified_suspend_send(wmi_unified_t wmi_handle,
1280 				    struct suspend_params *param,
1281 				    uint8_t mac_id);
1282 
1283 /**
1284  * wmi_unified_resume_send - WMI resume function
1285  * @wmi_handle      : handle to WMI.
1286  * @mac_id: radio context
1287  *
1288  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1289  */
1290 QDF_STATUS wmi_unified_resume_send(wmi_unified_t wmi_handle,
1291 				   uint8_t mac_id);
1292 
1293 /**
1294  * wmi_unified_pdev_param_send() - set pdev parameters
1295  * @wmi_handle: wmi handle
1296  * @param: pointer to pdev parameter
1297  * @mac_id: radio context
1298  *
1299  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1300  *         errno on failure
1301  */
1302 QDF_STATUS
1303 wmi_unified_pdev_param_send(wmi_unified_t wmi_handle,
1304 			    struct pdev_params *param,
1305 			    uint8_t mac_id);
1306 
1307 /**
1308  * wmi_unified_fd_tmpl_send_cmd() - WMI FILS Discovery send function
1309  * @wmi_handle: handle to WMI.
1310  * @param: pointer to hold FILS Discovery send cmd parameter
1311  *
1312  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1313  */
1314 QDF_STATUS
1315 wmi_unified_fd_tmpl_send_cmd(wmi_unified_t wmi_handle,
1316 			     struct fils_discovery_tmpl_params *param);
1317 
1318 /**
1319  * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
1320  * @wmi_handle: handle to WMI.
1321  * @param: pointer to hold beacon send cmd parameter
1322  *
1323  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1324  */
1325 QDF_STATUS
1326 wmi_unified_beacon_tmpl_send_cmd(wmi_unified_t wmi_handle,
1327 				 struct beacon_tmpl_params *param);
1328 
1329 /**
1330  * wmi_unified_peer_assoc_send() - WMI peer assoc function
1331  * @wmi_handle: handle to WMI.
1332  * @param: pointer to peer assoc parameter
1333  *
1334  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1335  */
1336 QDF_STATUS wmi_unified_peer_assoc_send(wmi_unified_t wmi_handle,
1337 				       struct peer_assoc_params *param);
1338 
1339 /**
1340  * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
1341  * @wmi_handle: wmi handle
1342  * @param: pointer to sta_ps parameter structure
1343  *
1344  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1345  */
1346 QDF_STATUS wmi_unified_sta_ps_cmd_send(wmi_unified_t wmi_handle,
1347 				       struct sta_ps_params *param);
1348 
1349 /**
1350  * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
1351  * @wmi_handle: wmi handle
1352  * @macaddr: peer mac address
1353  * @param: pointer to ap_ps parameter structure
1354  *
1355  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1356  */
1357 QDF_STATUS wmi_unified_ap_ps_cmd_send(wmi_unified_t wmi_handle,
1358 				      uint8_t *macaddr,
1359 				      struct ap_ps_params *param);
1360 
1361 /**
1362  * wmi_unified_scan_start_cmd_send() - WMI scan start function
1363  * @wmi_handle: handle to WMI.
1364  * @param: pointer to hold scan start cmd parameter
1365  *
1366  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1367  */
1368 QDF_STATUS
1369 wmi_unified_scan_start_cmd_send(wmi_unified_t wmi_handle,
1370 				struct scan_req_params *param);
1371 
1372 /**
1373  * wmi_unified_scan_stop_cmd_send() - WMI scan start function
1374  * @wmi_handle: handle to WMI.
1375  * @param: pointer to hold scan start cmd parameter
1376  *
1377  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1378  */
1379 QDF_STATUS
1380 wmi_unified_scan_stop_cmd_send(wmi_unified_t wmi_handle,
1381 			       struct scan_cancel_param *param);
1382 
1383 /**
1384  * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
1385  * @wmi_handle: handle to WMI.
1386  * @param: pointer to hold scan channel list parameter
1387  *
1388  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1389  */
1390 QDF_STATUS
1391 wmi_unified_scan_chan_list_cmd_send(wmi_unified_t wmi_handle,
1392 				    struct scan_chan_list_params *param);
1393 
1394 
1395 /**
1396  * wmi_crash_inject() - inject fw crash
1397  * @wmi_handle: wmi handle
1398  * @param: pointer to crash inject parameter structure
1399  *
1400  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1401  */
1402 QDF_STATUS wmi_crash_inject(wmi_unified_t wmi_handle,
1403 			    struct crash_inject *param);
1404 
1405 /**
1406  * wmi_unified_pdev_utf_cmd_send() - send utf command to fw
1407  * @wmi_handle: wmi handle
1408  * @param: pointer to pdev_utf_params
1409  * @mac_id: mac id to have radio context
1410  *
1411  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1412  */
1413 QDF_STATUS wmi_unified_pdev_utf_cmd_send(wmi_unified_t wmi_handle,
1414 					 struct pdev_utf_params *param,
1415 					 uint8_t mac_id);
1416 
1417 /**
1418  * wmi_unified_dbglog_cmd_send() - set debug log level
1419  * @wmi_handle: handle to WMI.
1420  * @param: pointer to hold dbglog level parameter
1421  *
1422  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1423  */
1424 QDF_STATUS wmi_unified_dbglog_cmd_send(wmi_unified_t wmi_handle,
1425 				       struct dbglog_params *param);
1426 
1427 /**
1428  *  wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
1429  *  @wmi_handle: handle to WMI.
1430  *  @param: pointer to hold mgmt cmd parameter
1431  *
1432  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1433  */
1434 QDF_STATUS wmi_mgmt_unified_cmd_send(wmi_unified_t wmi_handle,
1435 				     struct wmi_mgmt_params *param);
1436 
1437 /**
1438  *  wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
1439  *  @wmi_handle: handle to WMI.
1440  *  @param: pointer to hold offchan data cmd parameter
1441  *
1442  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1443  */
1444 QDF_STATUS wmi_offchan_data_tx_cmd_send(
1445 		wmi_unified_t wmi_handle,
1446 		struct wmi_offchan_data_tx_params *param);
1447 
1448 /**
1449  * wmi_unified_modem_power_state() - set modem power state to fw
1450  * @wmi_handle: wmi handle
1451  * @param_value: parameter value
1452  *
1453  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1454  */
1455 QDF_STATUS wmi_unified_modem_power_state(wmi_unified_t wmi_handle,
1456 					 uint32_t param_value);
1457 
1458 /**
1459  * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
1460  * @wmi_handle: wmi handle
1461  * @vdev_id: vdev id
1462  * @val: value
1463  *
1464  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
1465  */
1466 QDF_STATUS wmi_unified_set_sta_ps_mode(wmi_unified_t wmi_handle,
1467 				       uint32_t vdev_id,
1468 				       uint8_t val);
1469 
1470 /**
1471  * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1472  * @wmi_handle: wmi handle
1473  * @param: uapsd cmd parameter structure
1474  *
1475  * This function sets the trigger
1476  * uapsd params such as service interval, delay interval
1477  * and suspend interval which will be used by the firmware
1478  * to send trigger frames periodically when there is no
1479  * traffic on the transmit side.
1480  *
1481  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
1482  */
1483 QDF_STATUS
1484 wmi_unified_set_sta_uapsd_auto_trig_cmd(wmi_unified_t wmi_handle,
1485 					struct sta_uapsd_trig_params *param);
1486 
1487 /**
1488  * wmi_unified_get_temperature() - get pdev temperature req
1489  * @wmi_handle: wmi handle
1490  *
1491  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
1492  */
1493 QDF_STATUS wmi_unified_get_temperature(wmi_unified_t wmi_handle);
1494 
1495 /**
1496  * wmi_unified_set_smps_params() - set smps params
1497  * @wmi_handle: wmi handle
1498  * @vdev_id: vdev id
1499  * @value: value
1500  *
1501  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
1502  */
1503 QDF_STATUS wmi_unified_set_smps_params(wmi_unified_t wmi_handle,
1504 				       uint8_t vdev_id,
1505 				       int value);
1506 
1507 /**
1508  * wmi_unified_set_mimops() - set MIMO powersave
1509  * @wmi_handle: wmi handle
1510  * @vdev_id: vdev id
1511  * @value: value
1512  *
1513  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
1514  */
1515 QDF_STATUS wmi_unified_set_mimops(wmi_unified_t wmi_handle,
1516 				  uint8_t vdev_id, int value);
1517 
1518 /**
1519  * wmi_unified_lro_config_cmd() - process the LRO config command
1520  * @wmi_handle: Pointer to wmi handle
1521  * @wmi_lro_cmd: Pointer to LRO configuration parameters
1522  *
1523  * This function sends down the LRO configuration parameters to
1524  * the firmware to enable LRO, sets the TCP flags and sets the
1525  * seed values for the toeplitz hash generation
1526  *
1527  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1528  */
1529 QDF_STATUS
1530 wmi_unified_lro_config_cmd(wmi_unified_t wmi_handle,
1531 			   struct wmi_lro_config_cmd_t *wmi_lro_cmd);
1532 
1533 /**
1534  * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1535  * @wmi_handle: Pointer to wmi handle
1536  * @thermal_info: Thermal command information
1537  *
1538  * This function sends the thermal management command
1539  * to the firmware
1540  *
1541  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1542  */
1543 QDF_STATUS
1544 wmi_unified_set_thermal_mgmt_cmd(wmi_unified_t wmi_handle,
1545 				 struct thermal_cmd_params *thermal_info);
1546 
1547 /**
1548  * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1549  * @wmi_handle: Pointer to wmi handle
1550  * @rate_report_params: Pointer to peer rate report parameters
1551  *
1552  *
1553  * Return: QDF_STATUS_SUCCESS for success otherwise failure
1554  */
1555 QDF_STATUS
1556 wmi_unified_peer_rate_report_cmd(
1557 		wmi_unified_t wmi_handle,
1558 		struct wmi_peer_rate_report_params *rate_report_params);
1559 
1560 /**
1561  * wmi_unified_process_update_edca_param() - update EDCA params
1562  * @wmi_handle: wmi handle
1563  * @vdev_id: vdev id.
1564  * @mu_edca_param: mu_edca_param.
1565  * @wmm_vparams: edca parameters
1566  *
1567  * This function updates EDCA parameters to the target
1568  *
1569  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1570  */
1571 QDF_STATUS
1572 wmi_unified_process_update_edca_param(
1573 		wmi_unified_t wmi_handle,
1574 		uint8_t vdev_id,
1575 		bool mu_edca_param,
1576 		struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
1577 
1578 /**
1579  * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1580  * @wmi_handle: wmi handle
1581  * @vdev_id: vdev id
1582  * @probe_rsp_info: probe response info
1583  *
1584  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1585  */
1586 QDF_STATUS
1587 wmi_unified_probe_rsp_tmpl_send_cmd(
1588 		wmi_unified_t wmi_handle,
1589 		uint8_t vdev_id,
1590 		struct wmi_probe_resp_params *probe_rsp_info);
1591 
1592 /**
1593  * wmi_unified_setup_install_key_cmd - send key to install to fw
1594  * @wmi_handle: wmi handle
1595  * @key_params: key parameters
1596  *
1597  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1598  */
1599 QDF_STATUS
1600 wmi_unified_setup_install_key_cmd(wmi_unified_t wmi_handle,
1601 				  struct set_key_params *key_params);
1602 
1603 /**
1604  * wmi_unified_get_pn_send_cmd() - send command to fw get PN for peer
1605  * @wmi_hdl: wmi handle
1606  * @pn_params: PN parameters
1607  *
1608  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1609  */
1610 QDF_STATUS
1611 wmi_unified_get_pn_send_cmd(wmi_unified_t wmi_hdl,
1612 			    struct peer_request_pn_param *pn_params);
1613 
1614 /**
1615  * wmi_unified_get_rxpn_send_cmd() - send command to fw get Rx PN for peer
1616  * @wmi_hdl: wmi handle
1617  * @pn_params: PN parameters
1618  *
1619  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1620  */
1621 QDF_STATUS
1622 wmi_unified_get_rxpn_send_cmd(wmi_unified_t wmi_hdl,
1623 			      struct peer_request_rxpn_param *pn_params);
1624 
1625 /**
1626  * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1627  * @wmi_hdl: wmi handle
1628  * @vdev_id: vdev id
1629  * @p2p_ie: p2p IE
1630  *
1631  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1632  */
1633 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(wmi_unified_t wmi_hdl,
1634 						uint32_t vdev_id,
1635 						uint8_t *p2p_ie);
1636 
1637 /**
1638  * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1639  * @wmi_handle: wmi handle
1640  * @psetoui: OUI parameters
1641  *
1642  * set scan probe OUI parameters in firmware
1643  *
1644  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1645  */
1646 QDF_STATUS wmi_unified_scan_probe_setoui_cmd(wmi_unified_t wmi_handle,
1647 					     struct scan_mac_oui *psetoui);
1648 
1649 #ifdef IPA_OFFLOAD
1650 /**
1651  * wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1652  * @wmi_handle: wmi handle
1653  * @ipa_offload: ipa offload control parameter
1654  *
1655  * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1656  *          error number otherwise
1657  */
1658 QDF_STATUS
1659 wmi_unified_ipa_offload_control_cmd(
1660 		wmi_unified_t wmi_handle,
1661 		struct ipa_uc_offload_control_params *ipa_offload);
1662 #endif
1663 
1664 /**
1665  * wmi_unified_pno_stop_cmd() - PNO stop request
1666  * @wmi_handle: wmi handle
1667  * @vdev_id: vdev id
1668  *
1669  * This function request FW to stop ongoing PNO operation.
1670  *
1671  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1672  */
1673 QDF_STATUS wmi_unified_pno_stop_cmd(wmi_unified_t wmi_handle, uint8_t vdev_id);
1674 
1675 /**
1676  * wmi_unified_obss_disable_cmd() - disable obss scan request
1677  * @wmi_handle: wmi handle
1678  * @vdev_id: vdev id
1679  *
1680  * This function request FW to disable obss scan.
1681  *
1682  * Return: QDF_STATUS_SUCCESS on success and others for failure
1683  */
1684 QDF_STATUS wmi_unified_obss_disable_cmd(wmi_unified_t wmi_handle,
1685 					uint8_t vdev_id);
1686 
1687 #ifdef FEATURE_WLAN_SCAN_PNO
1688 /**
1689  * wmi_unified_pno_start_cmd() - PNO start request
1690  * @wmi_handle: wmi handle
1691  * @pno: PNO request
1692  *
1693  * This function request FW to start PNO request.
1694  * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1695  */
1696 QDF_STATUS wmi_unified_pno_start_cmd(wmi_unified_t wmi_handle,
1697 				     struct pno_scan_req_params *pno);
1698 #endif
1699 
1700 /**
1701  * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
1702  * @wmi_handle: wmi handle
1703  * @params: Configuration parameters
1704  *
1705  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1706  */
1707 QDF_STATUS wmi_unified_nlo_mawc_cmd(wmi_unified_t wmi_handle,
1708 				    struct nlo_mawc_params *params);
1709 
1710 #ifdef WLAN_FEATURE_LINK_LAYER_STATS
1711 /**
1712  * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1713  * @wmi_handle: wmi handle
1714  * @clear_req: ll stats clear request command params
1715  *
1716  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1717  */
1718 QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(wmi_unified_t wmi_handle,
1719 				 const struct ll_stats_clear_params *clear_req);
1720 
1721 /**
1722  * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1723  * @wmi_handle: wmi handle
1724  * @set_req: ll stats set request command params
1725  *
1726  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1727  */
1728 QDF_STATUS wmi_unified_process_ll_stats_set_cmd(wmi_unified_t wmi_handle,
1729 				 const struct ll_stats_set_params *set_req);
1730 
1731 /**
1732  * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1733  * @wmi_handle: wmi handle
1734  * @get_req: ll stats get request command params
1735  *
1736  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1737  */
1738 QDF_STATUS wmi_unified_process_ll_stats_get_cmd(wmi_unified_t wmi_handle,
1739 				 const struct ll_stats_get_params *get_req);
1740 
1741 #ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
1742 /**
1743  * wmi_process_unified_ll_stats_get_sta_cmd() - unified link layer stats and
1744  *                                              get station request
1745  * @wmi_handle: wmi handle
1746  * @get_req: unified ll stats and get station request command params
1747  *
1748  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1749  */
1750 QDF_STATUS wmi_process_unified_ll_stats_get_sta_cmd(
1751 				wmi_unified_t wmi_handle,
1752 				const struct ll_stats_get_params *get_req);
1753 #endif /* FEATURE_CLUB_LL_STATS_AND_GET_STATION */
1754 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */
1755 
1756 /**
1757  * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1758  * @wmi_handle: wma handle
1759  * @vdev_id: vdev id
1760  *
1761  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1762  */
1763 QDF_STATUS wmi_unified_congestion_request_cmd(wmi_unified_t wmi_handle,
1764 					      uint8_t vdev_id);
1765 
1766 /**
1767  * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1768  * @wmi_handle: wmi handle
1769  *
1770  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1771  */
1772 QDF_STATUS wmi_unified_snr_request_cmd(wmi_unified_t wmi_handle);
1773 
1774 /**
1775  * wmi_unified_snr_cmd() - get RSSI from fw
1776  * @wmi_handle: wmi handle
1777  * @vdev_id: vdev id
1778  *
1779  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1780  */
1781 QDF_STATUS wmi_unified_snr_cmd(wmi_unified_t wmi_handle, uint8_t vdev_id);
1782 
1783 /**
1784  * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1785  * @wmi_handle: wmi handle
1786  * @params: get link status params
1787  *
1788  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1789  */
1790 QDF_STATUS wmi_unified_link_status_req_cmd(wmi_unified_t wmi_handle,
1791 					   struct link_status_params *params);
1792 
1793 #ifdef WLAN_SUPPORT_GREEN_AP
1794 /**
1795  * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap config params
1796  * @wmi_handle: wmi handler
1797  * @egap_params: pointer to egap_params
1798  *
1799  * Return:	 0 for success, otherwise appropriate error code
1800  */
1801 QDF_STATUS
1802 wmi_unified_egap_conf_params_cmd(
1803 		wmi_unified_t wmi_handle,
1804 		struct wlan_green_ap_egap_params *egap_params);
1805 #endif
1806 
1807 /**
1808  * wmi_unified_csa_offload_enable() - send CSA offload enable command
1809  * @wmi_handle: wmi handle
1810  * @vdev_id: vdev id
1811  *
1812  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1813  */
1814 QDF_STATUS wmi_unified_csa_offload_enable(wmi_unified_t wmi_handle,
1815 					  uint8_t vdev_id);
1816 
1817 #ifdef WLAN_FEATURE_CIF_CFR
1818 /**
1819  * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings
1820  * @wmi_handle: wmi handle
1821  * @cfg: dma cfg req
1822  *
1823  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1824  */
1825 QDF_STATUS
1826 wmi_unified_oem_dma_ring_cfg(wmi_unified_t wmi_handle,
1827 			     wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
1828 #endif
1829 
1830 /**
1831  * wmi_unified_start_oem_data_cmd() - start oem data request to target
1832  * @wmi_handle: wmi handle
1833  * @data_len: the length of @data
1834  * @data: the pointer to data buf
1835  *
1836  * This is legacy api for oem data request, using wmi command
1837  * WMI_OEM_REQ_CMDID.
1838  *
1839  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1840  */
1841 QDF_STATUS wmi_unified_start_oem_data_cmd(wmi_unified_t wmi_handle,
1842 					  uint32_t data_len,
1843 					  uint8_t *data);
1844 
1845 #ifdef FEATURE_OEM_DATA
1846 /**
1847  * wmi_unified_start_oemv2_data_cmd() - start oem data cmd to target
1848  * @wmi_handle: wmi handle
1849  * @params: oem data params
1850  *
1851  * This is common api for oem data, using wmi command WMI_OEM_DATA_CMDID.
1852  *
1853  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1854  */
1855 QDF_STATUS wmi_unified_start_oemv2_data_cmd(wmi_unified_t wmi_handle,
1856 					    struct oem_data *params);
1857 #endif
1858 
1859 /**
1860  * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
1861  * @wmi_handle: wmi handle
1862  * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
1863  *
1864  * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
1865  * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
1866  * to firmware based on phyerr filtering
1867  * offload status.
1868  *
1869  * Return: 1 success, 0 failure
1870  */
1871 QDF_STATUS
1872 wmi_unified_dfs_phyerr_filter_offload_en_cmd(wmi_unified_t wmi_handle,
1873 					     bool dfs_phyerr_filter_offload);
1874 
1875 #if !defined(REMOVE_PKT_LOG) && defined(FEATURE_PKTLOG)
1876 /**
1877  * wmi_unified_pktlog_wmi_send_cmd() - send pktlog event command to target
1878  * @wmi_handle: wmi handle
1879  * @pktlog_event: pktlog event
1880  * @cmd_id: pktlog cmd id
1881  * @user_triggered: user triggered input for PKTLOG enable mode
1882  *
1883  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1884  */
1885 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(wmi_unified_t wmi_handle,
1886 					   WMI_PKTLOG_EVENT pktlog_event,
1887 					   uint32_t cmd_id,
1888 					   uint8_t user_triggered);
1889 #endif
1890 
1891 /**
1892  * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
1893  * @wmi_handle: wmi handle
1894  * @preq: stats ext params
1895  *
1896  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1897  */
1898 QDF_STATUS wmi_unified_stats_ext_req_cmd(wmi_unified_t wmi_handle,
1899 					 struct stats_ext_params *preq);
1900 
1901 /**
1902  * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
1903  * @wmi_handle: wmi handle
1904  * @params: DHCP server offload info
1905  *
1906  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1907  */
1908 QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(
1909 		wmi_unified_t wmi_handle,
1910 		struct dhcp_offload_info_params *params);
1911 
1912 /**
1913  * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
1914  * @wmi_handle: wmi handle
1915  * @reg_dmn: reg domain
1916  * @regdmn2G: 2G reg domain
1917  * @regdmn5G: 5G reg domain
1918  * @ctl2G: 2G test limit
1919  * @ctl5G: 5G test limit
1920  *
1921  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1922  */
1923 QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(wmi_unified_t wmi_handle,
1924 						     uint32_t reg_dmn,
1925 						     uint16_t regdmn2G,
1926 						     uint16_t regdmn5G,
1927 						     uint8_t ctl2G,
1928 						     uint8_t ctl5G);
1929 
1930 QDF_STATUS
1931 wmi_unified_process_fw_mem_dump_cmd(wmi_unified_t wmi_hdl,
1932 				    struct fw_dump_req_param *mem_dump_req);
1933 
1934 /**
1935  * wmi_unified_cfg_action_frm_tb_ppdu_cmd()-send action frame TB PPDU cfg to FW
1936  * @wmi_handle: Pointer to WMi handle
1937  * @cfg_info: Pointer to cfg msg
1938  *
1939  * This function sends action frame TB PPDU cfg to firmware
1940  *
1941  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1942  *
1943  */
1944 QDF_STATUS
1945 wmi_unified_cfg_action_frm_tb_ppdu_cmd(
1946 		wmi_unified_t wmi_handle,
1947 		struct cfg_action_frm_tb_ppdu_param *cfg_info);
1948 
1949 /**
1950  * wmi_unified_save_fw_version_cmd() - save fw version
1951  * @wmi_handle: pointer to wmi handle
1952  * @evt_buf: Event buffer
1953  *
1954  *
1955  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1956  *
1957  */
1958 QDF_STATUS wmi_unified_save_fw_version_cmd(wmi_unified_t wmi_handle,
1959 					   void *evt_buf);
1960 
1961 /**
1962  * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
1963  * @wmi_handle: wmi handle
1964  * @event: Event received from FW
1965  * @len: Length of the event
1966  *
1967  * Enables the low frequency events and disables the high frequency
1968  * events. Bit 17 indicates if the event if low/high frequency.
1969  * 1 - high frequency, 0 - low frequency
1970  *
1971  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
1972  */
1973 QDF_STATUS wmi_unified_log_supported_evt_cmd(wmi_unified_t wmi_handle,
1974 					     uint8_t *event,
1975 					     uint32_t len);
1976 
1977 /**
1978  * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
1979  * @wmi_handle: wmi handle
1980  * @start_log: Start logging related parameters
1981  *
1982  * Send the command to the FW based on which specific logging of diag
1983  * event/log id can be started/stopped
1984  *
1985  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1986  */
1987 QDF_STATUS
1988 wmi_unified_enable_specific_fw_logs_cmd(wmi_unified_t wmi_handle,
1989 					struct wmi_wifi_start_log *start_log);
1990 
1991 /**
1992  * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
1993  * @wmi_handle: WMI handle
1994  *
1995  * This function is used to send the flush command to the FW,
1996  * that will flush the fw logs that are residue in the FW
1997  *
1998  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1999  */
2000 QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(wmi_unified_t wmi_handle);
2001 
2002 /**
2003  * wmi_unified_unit_test_cmd() - send unit test command to fw.
2004  * @wmi_handle: wmi handle
2005  * @wmi_utest: unit test command
2006  *
2007  * This function send unit test command to fw.
2008  *
2009  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2010  */
2011 QDF_STATUS wmi_unified_unit_test_cmd(wmi_unified_t wmi_handle,
2012 				     struct wmi_unit_test_cmd *wmi_utest);
2013 
2014 #ifdef FEATURE_WLAN_APF
2015 /**
2016  * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW
2017  * @wmi: the WMI handle
2018  * @vdev_id: the Id of the vdev to apply the configuration to
2019  * @ucast_mode: the active APF mode to configure for unicast packets
2020  * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast
2021  *	packets
2022  */
2023 QDF_STATUS
2024 wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
2025 				    enum wmi_host_active_apf_mode ucast_mode,
2026 				    enum wmi_host_active_apf_mode
2027 							      mcast_bcast_mode);
2028 
2029 /**
2030  * wmi_unified_send_apf_enable_cmd() - send apf enable/disable cmd
2031  * @wmi: wmi handle
2032  * @vdev_id: VDEV id
2033  * @enable: true: enable, false: disable
2034  *
2035  * This function passes the apf enable command to fw
2036  *
2037  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2038  */
2039 QDF_STATUS wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
2040 					   uint32_t vdev_id, bool enable);
2041 
2042 /**
2043  * wmi_unified_send_apf_write_work_memory_cmd() - send cmd to write into the APF
2044  *	work memory.
2045  * @wmi: wmi handle
2046  * @write_params: parameters and buffer pointer for the write
2047  *
2048  * This function passes the write apf work mem command to fw
2049  *
2050  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2051  */
2052 QDF_STATUS wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
2053 			struct wmi_apf_write_memory_params *write_params);
2054 
2055 /**
2056  * wmi_unified_send_apf_read_work_memory_cmd() - send cmd to read part of APF
2057  *	work memory
2058  * @wmi: wmi handle
2059  * @read_params: contains relative address and length to read from
2060  *
2061  * This function passes the read apf work mem command to fw
2062  *
2063  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2064  */
2065 QDF_STATUS wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
2066 				struct wmi_apf_read_memory_params *read_params);
2067 
2068 /**
2069  * wmi_extract_apf_read_memory_resp_event() - extract read mem resp event
2070  * @wmi: wmi handle
2071  * @evt_buf: Pointer to the event buffer
2072  * @read_mem_evt: pointer to memory to extract event parameters into
2073  *
2074  * This function extracts read mem response event into the given structure ptr
2075  *
2076  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2077  */
2078 QDF_STATUS
2079 wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
2080 				struct wmi_apf_read_memory_resp_event_params
2081 								*read_mem_evt);
2082 #endif /* FEATURE_WLAN_APF */
2083 
2084 /**
2085  * wmi_send_get_user_position_cmd() - send get user position command to fw
2086  * @wmi_handle: wmi handle
2087  * @value: user pos value
2088  *
2089  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2090  */
2091 QDF_STATUS
2092 wmi_send_get_user_position_cmd(wmi_unified_t wmi_handle, uint32_t value);
2093 
2094 /**
2095  * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
2096  *                                           command to fw
2097  * @wmi_handle: wmi handle
2098  * @value: user pos value
2099  *
2100  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2101  */
2102 QDF_STATUS
2103 wmi_send_get_peer_mumimo_tx_count_cmd(wmi_unified_t wmi_handle,
2104 				      uint32_t value);
2105 
2106 /**
2107  * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
2108  *                                             tx count to fw
2109  * @wmi_handle: wmi handle
2110  * @value: reset tx count value
2111  *
2112  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2113  */
2114 QDF_STATUS
2115 wmi_send_reset_peer_mumimo_tx_count_cmd(wmi_unified_t wmi_handle,
2116 					uint32_t value);
2117 
2118 /**
2119  * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
2120  * @wmi_handle: wmi handle
2121  * @param: wmi btcoex cfg params
2122  *
2123  * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
2124  *
2125  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2126  */
2127 QDF_STATUS
2128 wmi_unified_send_btcoex_wlan_priority_cmd(wmi_unified_t wmi_handle,
2129 					  struct btcoex_cfg_params *param);
2130 
2131 /**
2132  *  wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
2133  * @wmi_handle: wmi handle
2134  * @param: wmi btcoex cfg params
2135  *
2136  * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
2137  *
2138  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2139  */
2140 QDF_STATUS
2141 wmi_unified_send_btcoex_duty_cycle_cmd(wmi_unified_t wmi_handle,
2142 				       struct btcoex_cfg_params *param);
2143 /**
2144  *  wmi_unified_send_egid_info_cmd() - send ESL egid_info commands
2145  * @wmi_handle: wmi handle
2146  * @param: esl_egid params
2147  *
2148  * Send WMI_ESL_EGID_CMDID parameters to fw.
2149  *
2150  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2151  */
2152 QDF_STATUS
2153 wmi_unified_send_egid_info_cmd(wmi_unified_t wmi_handle,
2154 			       struct esl_egid_params *param);
2155 
2156 /**
2157  * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
2158  * @wmi_handle: wmi handle
2159  * @param: wmi coex ver cfg params
2160  *
2161  * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
2162  *
2163  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2164  */
2165 QDF_STATUS
2166 wmi_unified_send_coex_ver_cfg_cmd(wmi_unified_t wmi_handle,
2167 				  coex_ver_cfg_t *param);
2168 
2169 /**
2170  * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
2171  * @wmi_handle: wmi handle
2172  * @param: wmi coex cfg cmd params
2173  *
2174  * Send WMI_COEX_CFG_CMD parameters to fw.
2175  *
2176  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2177  */
2178 QDF_STATUS
2179 wmi_unified_send_coex_config_cmd(wmi_unified_t wmi_handle,
2180 				 struct coex_config_params *param);
2181 
2182 /**
2183  * wmi_unified_send_coex_multi_config_cmd() - send multiple coex config
2184  * @wmi_handle: wmi handle
2185  * @param: wmi coex multiple cfg cmd params
2186  *
2187  * Send WMI_COEX_MULTIPLE_CONFIG_CMDID parameters to fw.
2188  *
2189  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2190  */
2191 QDF_STATUS
2192 wmi_unified_send_coex_multi_config_cmd(wmi_unified_t wmi_handle,
2193 				       struct coex_multi_config *param);
2194 
2195 #ifdef WLAN_FEATURE_DBAM_CONFIG
2196 /**
2197  * wmi_unified_send_dbam_config_cmd() - send dbam config command
2198  * @wmi_handle: wmi handle
2199  * @param: dbam config mode param
2200  *
2201  * Send WMI_COEX_DBAM_CMD param to fw.
2202  *
2203  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2204  */
2205 QDF_STATUS
2206 wmi_unified_send_dbam_config_cmd(wmi_unified_t wmi_handle,
2207 				 struct coex_dbam_config_params *param);
2208 
2209 /**
2210  * wmi_extract_dbam_config_response() - extract dbam config resp sent by FW
2211  * @wmi_handle: wmi handle
2212  * @evt_buf: pointer to event buffer
2213  * @resp: struct containing dbam config response sent by FW
2214  *
2215  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
2216  */
2217 QDF_STATUS
2218 wmi_extract_dbam_config_response(wmi_unified_t wmi_handle, void *evt_buf,
2219 				 struct coex_dbam_config_resp *resp);
2220 #endif
2221 
2222 /**
2223  *  wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
2224  *  @wmi_handle: handle to WMI.
2225  *  @param: pointer to hold pdev fips param
2226  *
2227  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2228  */
2229 QDF_STATUS
2230 wmi_unified_pdev_fips_cmd_send(wmi_unified_t wmi_handle,
2231 			       struct fips_params *param);
2232 
2233 #ifdef WLAN_FEATURE_FIPS_BER_CCMGCM
2234 /**
2235  *  wmi_unified_pdev_fips_extend_cmd_send() - WMI pdev fips extend cmd function
2236  *  @wmi_handle: handle to WMI.
2237  *  @param: pointer to hold pdev fips extend param
2238  *
2239  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2240  */
2241 QDF_STATUS
2242 wmi_unified_pdev_fips_extend_cmd_send(wmi_unified_t wmi_handle,
2243 				      struct fips_extend_params *param);
2244 
2245 /**
2246  *  wmi_unified_pdev_fips_mode_set_cmd() - WMI pdev fips mode enable cmd
2247  *  @wmi_handle: handle to WMI.
2248  *  @param: pointer to hold pdev fips mode param
2249  *
2250  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2251  */
2252 QDF_STATUS
2253 wmi_unified_pdev_fips_mode_set_cmd(wmi_unified_t wmi_handle,
2254 				   struct fips_mode_set_params *param);
2255 
2256 /**
2257  * wmi_extract_fips_extend_event_data() - extract fips extend event data
2258  * @wmi_handle: wmi handle
2259  * @evt_buf: pointer to event buffer
2260  * @param: pointer to FIPS extend event param
2261  *
2262  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2263  */
2264 QDF_STATUS
2265 wmi_extract_fips_extend_event_data(wmi_unified_t wmi_handle, void *evt_buf,
2266 				   struct wmi_host_fips_extend_event_param
2267 				   *param);
2268 #endif
2269 
2270 #ifdef WLAN_FEATURE_DISA
2271 /**
2272  * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
2273  * @wmi_hdl: wmi handle
2274  * @params: encrypt/decrypt params
2275  *
2276  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2277  */
2278 QDF_STATUS
2279 wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
2280 				     struct disa_encrypt_decrypt_req_params
2281 				     *params);
2282 #endif /* WLAN_FEATURE_DISA */
2283 
2284 /**
2285  *  wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable
2286  *						 cmd function
2287  *  @wmi_handle: handle to WMI.
2288  *  @param: pointer to hold wlan profile param
2289  *
2290  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2291  */
2292 QDF_STATUS
2293 wmi_unified_wlan_profile_enable_cmd_send(wmi_unified_t wmi_handle,
2294 					 struct wlan_profile_params *param);
2295 
2296 /**
2297  *  wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger
2298  *						  cmd function
2299  *  @wmi_handle: handle to WMI.
2300  *  @param: pointer to hold wlan profile param
2301  *
2302  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2303  */
2304 QDF_STATUS
2305 wmi_unified_wlan_profile_trigger_cmd_send(wmi_unified_t wmi_handle,
2306 					  struct wlan_profile_params *param);
2307 
2308 /**
2309  *  wmi_unified_wlan_profile_hist_intvl_cmd_send() - WMI wlan profile history
2310  *						  cmd function
2311  *  @wmi_handle: handle to WMI.
2312  *  @param: pointer to hold wlan profile param
2313  *
2314  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2315  */
2316 QDF_STATUS
2317 wmi_unified_wlan_profile_hist_intvl_cmd_send(wmi_unified_t wmi_handle,
2318 					     struct wlan_profile_params *param);
2319 
2320 /**
2321  *  wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
2322  *  @wmi_handle: handle to WMI.
2323  *  @param: pointer to hold channel param
2324  *
2325  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2326  */
2327 QDF_STATUS
2328 wmi_unified_set_chan_cmd_send(wmi_unified_t wmi_handle,
2329 			      struct channel_param *param);
2330 
2331 /**
2332  *  wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
2333  *  @wmi_handle: handle to WMI.
2334  *  @param: pointer to hold ratepwr table param
2335  *
2336  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2337  */
2338 QDF_STATUS
2339 wmi_unified_set_ratepwr_table_cmd_send(wmi_unified_t wmi_handle,
2340 				       struct ratepwr_table_params *param);
2341 
2342 /**
2343  *  wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
2344  *  @wmi_handle: handle to WMI.
2345  *
2346  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2347  */
2348 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(wmi_unified_t wmi_handle);
2349 
2350 /**
2351  *  wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
2352  *  chainmsk cmd function
2353  *  @wmi_handle: handle to WMI.
2354  *  @param: pointer to hold ratepwr chainmsk param
2355  *
2356  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2357  */
2358 QDF_STATUS
2359 wmi_unified_set_ratepwr_chainmsk_cmd_send(wmi_unified_t wmi_handle,
2360 					  struct ratepwr_chainmsk_params
2361 					  *param);
2362 
2363 /**
2364  *  wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
2365  *  @wmi_handle: handle to WMI.
2366  *  @param: pointer to hold macaddr param
2367  *
2368  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2369  */
2370 QDF_STATUS wmi_unified_set_macaddr_cmd_send(wmi_unified_t wmi_handle,
2371 					    struct macaddr_params *param);
2372 
2373 /**
2374  *  wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
2375  *  @wmi_handle: handle to WMI.
2376  *
2377  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2378  */
2379 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(wmi_unified_t wmi_handle);
2380 
2381 /**
2382  *  wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
2383  *  @wmi_handle: handle to WMI.
2384  *
2385  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2386  */
2387 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(wmi_unified_t wmi_handle);
2388 
2389 /**
2390  *  wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
2391  *  @wmi_handle: handle to WMI.
2392  *  @param: pointer to hold acparams param
2393  *
2394  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2395  */
2396 QDF_STATUS
2397 wmi_unified_set_acparams_cmd_send(wmi_unified_t wmi_handle,
2398 				  struct acparams_params *param);
2399 
2400 /**
2401  *  wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
2402  *  tid map cmd function
2403  *  @wmi_handle: handle to WMI.
2404  *  @param: pointer to hold dscp param
2405  *
2406  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2407  */
2408 QDF_STATUS
2409 wmi_unified_set_vap_dscp_tid_map_cmd_send(
2410 			wmi_unified_t wmi_handle,
2411 			struct vap_dscp_tid_map_params *param);
2412 
2413 /**
2414  *  wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
2415  *  reserve cmd function
2416  *  @wmi_handle: handle to WMI.
2417  *  @param: pointer to hold ast param
2418  *
2419  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2420  */
2421 QDF_STATUS
2422 wmi_unified_proxy_ast_reserve_cmd_send(wmi_unified_t wmi_handle,
2423 				       struct proxy_ast_reserve_params *param);
2424 
2425 /**
2426  *  wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac
2427  *  addr cmd function
2428  *  @wmi_handle: handle to WMI.
2429  *  @param: pointer to hold bridge mac addr param
2430  *
2431  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2432  */
2433 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(
2434 			wmi_unified_t wmi_handle,
2435 			struct set_bridge_mac_addr_params *param);
2436 
2437 /**
2438  *  wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
2439  *  @wmi_handle: handle to WMI.
2440  *
2441  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2442  */
2443 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(wmi_unified_t wmi_handle);
2444 
2445 /**
2446  *  wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
2447  *  @wmi_handle: handle to WMI.
2448  *
2449  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2450  */
2451 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(wmi_unified_t wmi_handle);
2452 
2453 /**
2454  *  wmi_unified_smart_ant_enable_tx_feedback_cmd_send() -
2455  *					WMI set tx antenna function
2456  *  @wmi_handle: handle to WMI.
2457  *  @param: pointer to hold antenna param
2458  *
2459  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2460  */
2461 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(
2462 			wmi_unified_t wmi_handle,
2463 			struct smart_ant_enable_tx_feedback_params *param);
2464 
2465 #ifdef WLAN_IOT_SIM_SUPPORT
2466 /**
2467  *  wmi_unified_simulation_test_cmd_send() -
2468  *  WMI simulation test command
2469  *  @wmi_handle: handle to WMI.
2470  *  @param: pointer to hold simulation test param
2471  *
2472  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2473  */
2474 QDF_STATUS wmi_unified_simulation_test_cmd_send(wmi_unified_t wmi_handle,
2475 						struct simulation_test_params
2476 						*param);
2477 #endif
2478 
2479 /**
2480  *  wmi_unified_vdev_spectral_configure_cmd_send() -
2481  *					WMI set spectral config function
2482  *  @wmi_handle: handle to WMI.
2483  *  @param: pointer to hold spectral config param
2484  *
2485  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2486  */
2487 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(
2488 			wmi_unified_t wmi_handle,
2489 			struct vdev_spectral_configure_params *param);
2490 
2491 /**
2492  *  wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
2493  *  @wmi_handle: handle to WMI.
2494  *  @param: pointer to hold enable spectral param
2495  *
2496  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2497  */
2498 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(
2499 			wmi_unified_t wmi_handle,
2500 			struct vdev_spectral_enable_params *param);
2501 
2502 #ifdef WLAN_CONV_SPECTRAL_ENABLE
2503 /**
2504  *  wmi_extract_pdev_sscan_fw_cmd_fixed_param() - Extract fixed params
2505  *  from start scan response event
2506  *  @wmi_handle: handle to WMI.
2507  *  @evt_buf: Event buffer
2508  *  @param: pointer to hold fixed params from fw params event
2509  *
2510  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2511  */
2512 QDF_STATUS wmi_extract_pdev_sscan_fw_cmd_fixed_param(
2513 			wmi_unified_t wmi_handle,
2514 			uint8_t *evt_buf,
2515 			struct spectral_startscan_resp_params *param);
2516 
2517 /**
2518  *  wmi_extract_pdev_sscan_fft_bin_index() - Extract FFT bin indexes
2519  *  from start scan response event
2520  *  @wmi_handle: handle to WMI.
2521  *  @evt_buf: Event buffer
2522  *  @param: pointer to hold FFT bin indexes from fw params event
2523  *
2524  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2525  */
2526 QDF_STATUS wmi_extract_pdev_sscan_fft_bin_index(
2527 			wmi_unified_t wmi_handle,
2528 			uint8_t *evt_buf,
2529 			struct spectral_fft_bin_markers_160_165mhz *param);
2530 
2531 /**
2532  * wmi_extract_pdev_spectral_session_chan_info() - Extract channel information
2533  * for a spectral scan session
2534  * @wmi_handle: handle to WMI.
2535  * @event: Event buffer
2536  * @chan_info: Spectral session channel information data structure to be filled
2537  * by this API
2538  *
2539  * Return: QDF_STATUS of operation
2540  */
2541 QDF_STATUS wmi_extract_pdev_spectral_session_chan_info(
2542 			wmi_unified_t wmi_handle, void *event,
2543 			struct spectral_session_chan_info *chan_info);
2544 
2545 /**
2546  * wmi_extract_pdev_spectral_session_detector_info() - Extract detector
2547  * information for a spectral scan session
2548  * @wmi_handle: handle to WMI.
2549  * @event: Event buffer
2550  * @det_info: Spectral session detector information data structure to be filled
2551  * by this API
2552  * @det_info_idx: index in the array of spectral scan detector info TLVs
2553  *
2554  * Return: QDF_STATUS of operation
2555  */
2556 QDF_STATUS wmi_extract_pdev_spectral_session_detector_info(
2557 		wmi_unified_t wmi_handle, void *event,
2558 		struct spectral_session_det_info *det_info,
2559 		uint8_t det_info_idx);
2560 
2561 /**
2562  * wmi_extract_spectral_caps_fixed_param() - Extract fixed params from Spectral
2563  * capabilities WMI event
2564  * @wmi_handle: handle to WMI.
2565  * @event: Event buffer
2566  * @param: Spectral capabilities event parameters data structure to be filled
2567  * by this API
2568  *
2569  * Return: QDF_STATUS of operation
2570  */
2571 QDF_STATUS wmi_extract_spectral_caps_fixed_param(
2572 		wmi_unified_t wmi_handle, void *event,
2573 		struct spectral_capabilities_event_params *param);
2574 
2575 /**
2576  * wmi_extract_spectral_scan_bw_caps() - Extract bandwidth caps from
2577  * Spectral capabilities WMI event
2578  * @wmi_handle: handle to WMI.
2579  * @event: Event buffer
2580  * @bw_caps: Data structure to be populated by this API after extraction
2581  *
2582  * Return: QDF_STATUS of operation
2583  */
2584 QDF_STATUS wmi_extract_spectral_scan_bw_caps(
2585 		wmi_unified_t wmi_handle, void *event,
2586 		struct spectral_scan_bw_capabilities *bw_caps);
2587 
2588 /**
2589  * wmi_extract_spectral_fft_size_caps() - Extract FFT size caps from
2590  * Spectral capabilities WMI event
2591  * @wmi_handle: handle to WMI.
2592  * @event: Event buffer
2593  * @fft_size_caps: Data structure to be populated by this API after extraction
2594  *
2595  * Return: QDF_STATUS of operation
2596  */
2597 QDF_STATUS wmi_extract_spectral_fft_size_caps(
2598 		wmi_unified_t wmi_handle, void *event,
2599 		struct spectral_fft_size_capabilities *fft_size_caps);
2600 #endif /* WLAN_CONV_SPECTRAL_ENABLE */
2601 
2602 #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
2603 /**
2604  *  wmi_unified_vdev_fils_enable_cmd_send() - WMI send fils enable command
2605  *  @wmi_handle: handle to WMI.
2606  *  @param: fils enable parameters
2607  *
2608  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2609  */
2610 QDF_STATUS
2611 wmi_unified_vdev_fils_enable_cmd_send(struct wmi_unified *wmi_handle,
2612 				      struct config_fils_params *param);
2613 #endif
2614 
2615 /**
2616  *  wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info
2617  *  request function
2618  *  @wmi_handle: handle to WMI.
2619  *  @param: pointer to hold chan info param
2620  *
2621  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2622  */
2623 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(
2624 			wmi_unified_t wmi_handle,
2625 			struct bss_chan_info_request_params *param);
2626 
2627 /**
2628  *  wmi_unified_thermal_mitigation_param_cmd_send() -
2629  *					WMI thermal mitigation function
2630  *  @wmi_handle: handle to WMI.
2631  *  @param: pointer to hold thermal mitigation param
2632  *
2633  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2634  */
2635 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(
2636 			wmi_unified_t wmi_handle,
2637 			struct thermal_mitigation_params *param);
2638 
2639 /**
2640  *  wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
2641  *  @wmi_handle: handle to WMI.
2642  *  @param: pointer to hold fwtest param
2643  *
2644  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2645  */
2646 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(
2647 			wmi_unified_t wmi_handle,
2648 			struct set_fwtest_params *param);
2649 
2650 /**
2651  *  wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
2652  *						       size command
2653  *  @wmi_handle: handle to WMI.
2654  *  @param: pointer to hold custom aggr size param
2655  *
2656  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2657  */
2658 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(
2659 		wmi_unified_t wmi_handle,
2660 		struct set_custom_aggr_size_params *param);
2661 
2662 /**
2663  *  wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
2664  *  @wmi_handle: handle to WMI.
2665  *  @param: pointer to hold set qdepth thresh param
2666  *
2667  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2668  */
2669 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(
2670 		wmi_unified_t wmi_handle,
2671 		struct set_qdepth_thresh_params *param);
2672 
2673 #ifdef WLAN_REG_PARTIAL_OFFLOAD
2674 /**
2675  *  wmi_unified_pdev_set_regdomain_cmd_send() - WMI set regdomain function
2676  *  @wmi_handle: handle to WMI.
2677  *  @param: pointer to hold regdomain param
2678  *
2679  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2680  */
2681 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(
2682 			wmi_unified_t wmi_handle,
2683 			struct pdev_set_regdomain_params *param);
2684 #endif
2685 
2686 /**
2687  *  wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
2688  *  @wmi_handle: handle to WMI.
2689  *  @param: pointer to hold beacon filter param
2690  *
2691  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2692  */
2693 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(
2694 			wmi_unified_t wmi_handle,
2695 			struct set_beacon_filter_params *param);
2696 
2697 /**
2698  *  wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
2699  *  @wmi_handle: handle to WMI.
2700  *  @param: pointer to hold beacon filter param
2701  *
2702  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2703  */
2704 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(
2705 			wmi_unified_t wmi_handle,
2706 			struct remove_beacon_filter_params *param);
2707 
2708 /**
2709  *  wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
2710  *  @wmi_handle: handle to WMI.
2711  *  @macaddr: MAC address
2712  *  @param: pointer to hold addba resp parameter
2713  *
2714  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2715  */
2716 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(
2717 			wmi_unified_t wmi_handle,
2718 			uint8_t macaddr[QDF_MAC_ADDR_SIZE],
2719 			struct addba_clearresponse_params *param);
2720 
2721 /**
2722  *  wmi_unified_addba_send_cmd_send() - WMI addba send function
2723  *  @wmi_handle: handle to WMI.
2724  *  @macaddr: MAC address
2725  *  @param: pointer to hold addba parameter
2726  *
2727  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2728  */
2729 QDF_STATUS
2730 wmi_unified_addba_send_cmd_send(wmi_unified_t wmi_handle,
2731 				uint8_t macaddr[QDF_MAC_ADDR_SIZE],
2732 				struct addba_send_params *param);
2733 
2734 /**
2735  *  wmi_unified_delba_send_cmd_send() - WMI delba cmd function
2736  *  @wmi_handle: handle to WMI.
2737  *  @macaddr: MAC address
2738  *  @param: pointer to hold delba parameter
2739  *
2740  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2741  */
2742 QDF_STATUS
2743 wmi_unified_delba_send_cmd_send(wmi_unified_t wmi_handle,
2744 				uint8_t macaddr[QDF_MAC_ADDR_SIZE],
2745 				struct delba_send_params *param);
2746 
2747 /**
2748  *  wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
2749  *  @wmi_handle: handle to WMI.
2750  *  @macaddr: MAC address
2751  *  @param: pointer to hold addba set resp parameter
2752  *
2753  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2754  */
2755 QDF_STATUS
2756 wmi_unified_addba_setresponse_cmd_send(wmi_unified_t wmi_handle,
2757 				       uint8_t macaddr[QDF_MAC_ADDR_SIZE],
2758 				       struct addba_setresponse_params *param);
2759 
2760 /**
2761  *  wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
2762  *  @wmi_handle: handle to WMI.
2763  *  @macaddr: MAC address
2764  *  @param: pointer to hold singleamsdu parameter
2765  *
2766  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2767  */
2768 QDF_STATUS
2769 wmi_unified_singleamsdu_cmd_send(wmi_unified_t wmi_handle,
2770 				 uint8_t macaddr[QDF_MAC_ADDR_SIZE],
2771 				 struct singleamsdu_params *param);
2772 
2773 /**
2774  *  wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
2775  *  @wmi_handle: handle to WMI.
2776  *  @param: pointer to hold mu scan param
2777  *
2778  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2779  */
2780 QDF_STATUS
2781 wmi_unified_mu_scan_cmd_send(wmi_unified_t wmi_handle,
2782 			     struct mu_scan_params *param);
2783 
2784 /**
2785  *  wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
2786  *  @wmi_handle: handle to WMI.
2787  *  @param: pointer to hold mu scan param
2788  *
2789  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2790  */
2791 QDF_STATUS
2792 wmi_unified_lteu_config_cmd_send(wmi_unified_t wmi_handle,
2793 				 struct lteu_config_params *param);
2794 
2795 /**
2796  *  wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
2797  *  @wmi_handle: handle to WMI.
2798  *  @param: pointer to hold mu scan param
2799  *
2800  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2801  */
2802 QDF_STATUS
2803 wmi_unified_set_psmode_cmd_send(wmi_unified_t wmi_handle,
2804 				struct set_ps_mode_params *param);
2805 
2806 /**
2807  * wmi_unified_init_cmd_send() - send initialization cmd to fw
2808  * @wmi_handle: wmi handle
2809  * @param: pointer to wmi init param
2810  *
2811  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2812  */
2813 QDF_STATUS
2814 wmi_unified_init_cmd_send(wmi_unified_t wmi_handle,
2815 			  struct wmi_init_cmd_param *param);
2816 
2817 /**
2818  * wmi_service_enabled() - Check if service enabled
2819  * @wmi_handle: wmi handle
2820  * @service_id: service identifier
2821  *
2822  * Return: 1 enabled, 0 disabled
2823  */
2824 bool wmi_service_enabled(wmi_unified_t wmi_handle, uint32_t service_id);
2825 
2826 /**
2827  * wmi_save_service_bitmap() - save service bitmap
2828  * @wmi_handle: wmi handle
2829  * @evt_buf: pointer to event buffer
2830  * @bitmap_buf: bitmap buffer
2831  *
2832  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
2833  */
2834 QDF_STATUS wmi_save_service_bitmap(wmi_unified_t wmi_handle, void *evt_buf,
2835 				   void *bitmap_buf);
2836 
2837 /**
2838  * wmi_save_ext_service_bitmap() - save extended service bitmap
2839  * @wmi_handle: wmi handle
2840  * @bitmap_buf: pointer to event buffer
2841  * @evt_buf: pointer to event buffer
2842  *
2843  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
2844  */
2845 QDF_STATUS wmi_save_ext_service_bitmap(wmi_unified_t wmi_handle, void *evt_buf,
2846 				       void *bitmap_buf);
2847 
2848 /**
2849  * wmi_save_fw_version() - Save fw version
2850  * @wmi_handle: wmi handle
2851  * @evt_buf: pointer to event buffer
2852  *
2853  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2854  */
2855 QDF_STATUS wmi_save_fw_version(wmi_unified_t wmi_handle, void *evt_buf);
2856 
2857 /**
2858  * wmi_get_target_cap_from_service_ready() - extract service ready event
2859  * @wmi_handle: wmi handle
2860  * @evt_buf: pointer to received event buffer
2861  * @ev: pointer to hold target capability information extracted from even
2862  *
2863  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2864  */
2865 QDF_STATUS wmi_get_target_cap_from_service_ready(
2866 		wmi_unified_t wmi_handle, void *evt_buf,
2867 		struct wlan_psoc_target_capability_info *ev);
2868 
2869 /**
2870  * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
2871  * @wmi_handle: wmi handle
2872  * @evt_buf: Pointer to event buffer
2873  * @hal_reg_cap: pointer to hold HAL reg capabilities
2874  *
2875  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2876  */
2877 QDF_STATUS
2878 wmi_extract_hal_reg_cap(wmi_unified_t wmi_handle, void *evt_buf,
2879 			struct wlan_psoc_hal_reg_capability *hal_reg_cap);
2880 
2881 /**
2882  * wmi_extract_hal_reg_cap_ext2() - Extract HAL reg capabilities from service
2883  * ready ext2 event
2884  * @wmi_handle: wmi handle
2885  * @evt_buf: Pointer to event buffer
2886  * @phy_idx: Phy id
2887  * @hal_reg_cap: pointer to hold HAL reg capabilities ext2 structure
2888  *
2889  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2890  */
2891 QDF_STATUS
2892 wmi_extract_hal_reg_cap_ext2(
2893 		wmi_unified_t wmi_handle, void *evt_buf, uint8_t phy_idx,
2894 		struct wlan_psoc_host_hal_reg_capabilities_ext2 *hal_reg_cap);
2895 
2896 /**
2897  * wmi_extract_num_mem_reqs_from_service_ready() - Extract number of memory
2898  *                                                 entries requested
2899  * @wmi_handle: wmi handle
2900  * @evt_buf: pointer to event buffer
2901  *
2902  * Return: Number of entries requested
2903  */
2904 uint32_t wmi_extract_num_mem_reqs_from_service_ready(
2905 		wmi_unified_t wmi_handle,
2906 		void *evt_buf);
2907 
2908 /**
2909  * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
2910  *                                                 request event
2911  * @wmi_handle: wmi handle
2912  * @evt_buf: pointer to event buffer
2913  * @mem_reqs: pointer to host memory request structure
2914  * @num_active_peers: number of active peers for peer cache
2915  * @num_peers: number of peers
2916  * @fw_prio: FW priority
2917  * @idx: Index for memory request
2918  *
2919  * Return: Host memory request parameters requested by target
2920  */
2921 QDF_STATUS wmi_extract_host_mem_req_from_service_ready(
2922 		wmi_unified_t wmi_handle, void *evt_buf, host_mem_req *mem_reqs,
2923 		uint32_t num_active_peers, uint32_t num_peers,
2924 		enum wmi_fw_mem_prio fw_prio, uint16_t idx);
2925 
2926 /**
2927  * wmi_ready_extract_init_status() - Extract init status from ready event
2928  * @wmi_handle: wmi handle
2929  * @ev: Pointer to event buffer
2930  *
2931  * Return: ready status
2932  */
2933 uint32_t wmi_ready_extract_init_status(wmi_unified_t wmi_handle, void *ev);
2934 
2935 /**
2936  * wmi_ready_extract_mac_addr() - extract mac address from ready event
2937  * @wmi_handle: wmi handle
2938  * @ev: pointer to event buffer
2939  * @macaddr: Pointer to hold MAC address
2940  *
2941  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2942  */
2943 QDF_STATUS wmi_ready_extract_mac_addr(wmi_unified_t wmi_handle,
2944 				      void *ev, uint8_t *macaddr);
2945 
2946 /**
2947  * wmi_ready_extract_mac_addr_list() - extract MAC address list from ready event
2948  * @wmi_handle: wmi handle
2949  * @ev: pointer to event buffer
2950  * @num_mac_addr: Pointer to number of entries
2951  *
2952  * Return: address to start of mac addr list
2953  */
2954 wmi_host_mac_addr
2955 *wmi_ready_extract_mac_addr_list(wmi_unified_t wmi_handle, void *ev,
2956 				 uint8_t *num_mac_addr);
2957 
2958 /**
2959  * wmi_extract_ready_event_params() - Extract data from ready event apart from
2960  *                                    status, macaddr and version.
2961  * @wmi_handle: Pointer to WMI handle.
2962  * @evt_buf: Pointer to Ready event buffer.
2963  * @ev_param: Pointer to host defined struct to copy the data from event.
2964  *
2965  * Return: QDF_STATUS_SUCCESS on success.
2966  */
2967 QDF_STATUS wmi_extract_ready_event_params(
2968 		wmi_unified_t wmi_handle, void *evt_buf,
2969 		struct wmi_host_ready_ev_param *ev_param);
2970 
2971 /**
2972  * wmi_extract_fw_version() - extract fw version
2973  * @wmi_handle: wmi handle
2974  * @ev: pointer to event buffer
2975  * @fw_ver: Pointer to hold fw version
2976  *
2977  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2978  */
2979 QDF_STATUS wmi_extract_fw_version(wmi_unified_t wmi_handle, void *ev,
2980 				  struct wmi_host_fw_ver *fw_ver);
2981 
2982 /**
2983  * wmi_extract_fw_abi_version() - extract fw abi version
2984  * @wmi_handle: wmi handle
2985  * @ev: Pointer to event buffer
2986  * @fw_ver: Pointer to hold fw abi version
2987  *
2988  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2989  */
2990 QDF_STATUS wmi_extract_fw_abi_version(wmi_unified_t wmi_handle, void *ev,
2991 				      struct wmi_host_fw_abi_ver *fw_ver);
2992 
2993 /**
2994  * wmi_check_and_update_fw_version() - Ready and fw version check
2995  * @wmi_handle: wmi handle
2996  * @ev: pointer to event buffer
2997  *
2998  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2999  */
3000 QDF_STATUS wmi_check_and_update_fw_version(wmi_unified_t wmi_handle, void *ev);
3001 
3002 /**
3003  * wmi_extract_dbglog_data_len() - extract debuglog data length
3004  * @wmi_handle: wmi handle
3005  * @evt_b: pointer to event buffer
3006  * @len:  length of buffer
3007  *
3008  * Return: length
3009  */
3010 uint8_t *wmi_extract_dbglog_data_len(wmi_unified_t wmi_handle,
3011 				     void *evt_b, uint32_t *len);
3012 
3013 /**
3014  * wmi_send_ext_resource_config() - send extended resource configuration
3015  * @wmi_handle: wmi handle
3016  * @ext_cfg: pointer to extended resource configuration
3017  *
3018  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3019  */
3020 QDF_STATUS wmi_send_ext_resource_config(wmi_unified_t wmi_handle,
3021 					wmi_host_ext_resource_config *ext_cfg);
3022 
3023 /**
3024  *  wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
3025  *  @wmi_handle: handle to WMI.
3026  *  @param: pointer to hold rtt meas req test param
3027  *
3028  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3029  */
3030 QDF_STATUS
3031 wmi_unified_rtt_meas_req_test_cmd_send(wmi_unified_t wmi_handle,
3032 				       struct rtt_meas_req_test_params *param);
3033 
3034 /**
3035  *  wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
3036  *  @wmi_handle: handle to WMI.
3037  *  @param: pointer to hold rtt meas req param
3038  *
3039  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3040  */
3041 QDF_STATUS
3042 wmi_unified_rtt_meas_req_cmd_send(wmi_unified_t wmi_handle,
3043 				  struct rtt_meas_req_params *param);
3044 
3045 /**
3046  *  wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
3047  *  @wmi_handle: handle to WMI.
3048  *  @param: pointer to hold rtt meas req test param
3049  *
3050  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3051  */
3052 QDF_STATUS
3053 wmi_unified_rtt_keepalive_req_cmd_send(wmi_unified_t wmi_handle,
3054 				       struct rtt_keepalive_req_params *param);
3055 
3056 /**
3057  *  wmi_unified_lci_set_cmd_send() - WMI lci set function
3058  *  @wmi_handle: handle to WMI.
3059  *  @param: pointer to hold lci param
3060  *
3061  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3062  */
3063 QDF_STATUS wmi_unified_lci_set_cmd_send(wmi_unified_t wmi_handle,
3064 					struct lci_set_params *param);
3065 
3066 /**
3067  *  wmi_unified_lcr_set_cmd_send() - WMI lcr set function
3068  *  @wmi_handle: handle to WMI.
3069  *  @param: pointer to hold lcr param
3070  *
3071  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3072  */
3073 QDF_STATUS wmi_unified_lcr_set_cmd_send(wmi_unified_t wmi_handle,
3074 					struct lcr_set_params *param);
3075 
3076 /**
3077  * wmi_unified_extract_pn() - extract pn event data
3078  * @wmi_hdl: wmi handle
3079  * @evt_buf: pointer to event buffer
3080  * @param: pointer to get pn event param
3081  *
3082  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3083  */
3084 QDF_STATUS wmi_unified_extract_pn(wmi_unified_t wmi_hdl, void *evt_buf,
3085 			  struct wmi_host_get_pn_event *param);
3086 
3087 /**
3088  * wmi_unified_extract_rxpn() - extract Rx PN event data
3089  * @wmi_hdl: wmi handle
3090  * @evt_buf: pointer to event buffer
3091  * @param: pointer to get Rx PN event param
3092  *
3093  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3094  */
3095 QDF_STATUS wmi_unified_extract_rxpn(wmi_unified_t wmi_hdl, void *evt_buf,
3096 				    struct wmi_host_get_rxpn_event *param);
3097 
3098 /**
3099  * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan
3100  * stats cmd to fw
3101  * @wmi_handle: wmi handle
3102  * @param: pointer to hold periodic chan stats param
3103  *
3104  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3105  */
3106 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(
3107 		wmi_unified_t wmi_handle,
3108 		struct periodic_chan_stats_params *param);
3109 
3110 /* Extract APIs */
3111 
3112 /**
3113  * wmi_extract_fips_event_data() - extract fips event data
3114  * @wmi_handle: wmi handle
3115  * @evt_buf: pointer to event buffer
3116  * @param: pointer to FIPS event param
3117  *
3118  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3119  */
3120 QDF_STATUS
3121 wmi_extract_fips_event_data(wmi_unified_t wmi_handle, void *evt_buf,
3122 			    struct wmi_host_fips_event_param *param);
3123 
3124 #ifdef WLAN_FEATURE_DISA
3125 /**
3126  * wmi_extract_encrypt_decrypt_resp_params() -
3127  *       extract encrypt decrypt resp params from event buffer
3128  * @wmi_hdl: wmi handle
3129  * @evt_buf: pointer to event buffer
3130  * @param: encrypt decrypt resp params
3131  *
3132  * Return: QDF_STATUS_SUCCESS for success or error code
3133  */
3134 QDF_STATUS
3135 wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, void *evt_buf,
3136 					struct disa_encrypt_decrypt_resp_params
3137 					*param);
3138 #endif /* WLAN_FEATURE_DISA */
3139 
3140 /**
3141  * wmi_extract_mgmt_rx_params() - extract management rx params from event
3142  * @wmi_handle: wmi handle
3143  * @evt_buf: pointer to event buffer
3144  * @hdr: Pointer to hold header
3145  * @bufp: Pointer to hold pointer to rx param buffer
3146  *
3147  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3148  */
3149 QDF_STATUS
3150 wmi_extract_mgmt_rx_params(wmi_unified_t wmi_handle, void *evt_buf,
3151 			   struct mgmt_rx_event_params *hdr, uint8_t **bufp);
3152 
3153 /**
3154  * wmi_extract_mgmt_rx_ext_params() - extract extended rx params from event
3155  * @wmi_handle: wmi handle
3156  * @evt_buf: pointer to event buffer
3157  * @params: Pointer to hold ext params
3158  *
3159  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3160  */
3161 QDF_STATUS
3162 wmi_extract_mgmt_rx_ext_params(wmi_unified_t wmi_handle, void *evt_buf,
3163 			       struct mgmt_rx_event_ext_params *params);
3164 
3165 #ifdef WLAN_MGMT_RX_REO_SUPPORT
3166 /**
3167  * wmi_extract_mgmt_rx_fw_consumed() - extract MGMT Rx FW consumed event
3168  * @wmi_handle: wmi handle
3169  * @evt_buf: pointer to event buffer
3170  * @params: Pointer to MGMT Rx REO parameters
3171  *
3172  * Return: QDF_STATUS_SUCCESS for success or error code
3173  */
3174 QDF_STATUS
3175 wmi_extract_mgmt_rx_fw_consumed(wmi_unified_t wmi_handle, void *evt_buf,
3176 				struct mgmt_rx_reo_params *params);
3177 
3178 /**
3179  * wmi_extract_mgmt_rx_reo_params() - extract MGMT Rx REO params from
3180  * MGMT_RX_EVENT_ID
3181  * @wmi_handle: wmi handle
3182  * @evt_buf: pointer to event buffer
3183  * @params: Pointer to MGMT Rx REO parameters
3184  *
3185  * Return: QDF_STATUS_SUCCESS for success or error code
3186  */
3187 QDF_STATUS
3188 wmi_extract_mgmt_rx_reo_params(wmi_unified_t wmi_handle, void *evt_buf,
3189 			       struct mgmt_rx_reo_params *params);
3190 
3191 /**
3192  * wmi_unified_mgmt_rx_reo_filter_config_cmd() - Send MGMT Rx REO filter
3193  * configuration command
3194  * @wmi_handle: wmi handle
3195  * @pdev_id: pdev ID of the radio
3196  * @filter: Pointer to MGMT Rx REO filter
3197  *
3198  * Return: QDF_STATUS_SUCCESS for success or error code
3199  */
3200 QDF_STATUS wmi_unified_mgmt_rx_reo_filter_config_cmd(
3201 					wmi_unified_t wmi_handle,
3202 					uint8_t pdev_id,
3203 					struct mgmt_rx_reo_filter *filter);
3204 #endif
3205 
3206 /**
3207  * wmi_extract_frame_pn_params() - extract PN params from event
3208  * @wmi_handle: wmi handle
3209  * @evt_buf: pointer to event buffer
3210  * @pn_params: Pointer to Frame PN params
3211  *
3212  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3213  */
3214 QDF_STATUS
3215 wmi_extract_frame_pn_params(wmi_unified_t wmi_handle, void *evt_buf,
3216 			    struct frame_pn_params *pn_params);
3217 
3218 /**
3219  * wmi_extract_is_conn_ap_frame() - extract is_conn_ap_frame param from event
3220  * @wmi_handle: wmi handle
3221  * @evt_buf: pointer to event buffer
3222  * @is_conn_ap: is_conn_ap param
3223  *
3224  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3225  */
3226 QDF_STATUS
3227 wmi_extract_is_conn_ap_frame(wmi_unified_t wmi_handle, void *evt_buf,
3228 			     struct frm_conn_ap *is_conn_ap);
3229 
3230 /**
3231  * wmi_extract_vdev_roam_param() - extract vdev roam param from event
3232  * @wmi_handle: wmi handle
3233  * @evt_buf: pointer to event buffer
3234  * @ev: Pointer to hold roam param
3235  *
3236  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3237  */
3238 QDF_STATUS
3239 wmi_extract_vdev_roam_param(wmi_unified_t wmi_handle, void *evt_buf,
3240 			    wmi_host_roam_event *ev);
3241 
3242 /**
3243  * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
3244  * @wmi_handle: wmi handle
3245  * @evt_buf: pointer to event buffer
3246  * @param: Pointer to hold vdev scan param
3247  *
3248  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3249  */
3250 QDF_STATUS
3251 wmi_extract_vdev_scan_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3252 			       struct scan_event *param);
3253 
3254 #ifdef FEATURE_WLAN_SCAN_PNO
3255 /**
3256  * wmi_extract_nlo_match_ev_param() - extract NLO match param from event
3257  * @wmi_handle: pointer to WMI handle
3258  * @evt_buf: pointer to WMI event buffer
3259  * @param: pointer to scan event param for NLO match
3260  *
3261  * Return: QDF_STATUS_SUCCESS for success or error code
3262  */
3263 QDF_STATUS
3264 wmi_extract_nlo_match_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3265 			       struct scan_event *param);
3266 
3267 /**
3268  * wmi_extract_nlo_complete_ev_param() - extract NLO complete param from event
3269  * @wmi_handle: pointer to WMI handle
3270  * @evt_buf: pointer to WMI event buffer
3271  * @param: pointer to scan event param for NLO complete
3272  *
3273  * Return: QDF_STATUS_SUCCESS for success or error code
3274  */
3275 QDF_STATUS
3276 wmi_extract_nlo_complete_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3277 				  struct scan_event *param);
3278 #endif
3279 
3280 /**
3281  * wmi_extract_mu_ev_param() - extract mu param from event
3282  * @wmi_handle: wmi handle
3283  * @evt_buf: pointer to event buffer
3284  * @param: Pointer to hold mu report
3285  *
3286  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3287  */
3288 QDF_STATUS
3289 wmi_extract_mu_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3290 			wmi_host_mu_report_event *param);
3291 
3292 /**
3293  * wmi_extract_mu_db_entry() - extract mu db entry from event
3294  * @wmi_handle: wmi handle
3295  * @evt_buf: pointer to event buffer
3296  * @idx: index
3297  * @param: Pointer to hold mu db entry
3298  *
3299  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3300  */
3301 QDF_STATUS
3302 wmi_extract_mu_db_entry(wmi_unified_t wmi_handle, void *evt_buf,
3303 			uint8_t idx, wmi_host_mu_db_entry *param);
3304 
3305 /**
3306  * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
3307  * @wmi_handle: wmi handle
3308  * @evt_buf: pointer to event buffer
3309  * @param: Pointer to hold mumimo tx count
3310  *
3311  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3312  */
3313 QDF_STATUS
3314 wmi_extract_mumimo_tx_count_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3315 				     wmi_host_peer_txmu_cnt_event *param);
3316 
3317 /**
3318  * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
3319  *                                                from event
3320  * @wmi_handle: wmi handle
3321  * @evt_buf: pointer to event buffer
3322  * @param: Pointer to hold peer gid userposition list
3323  *
3324  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3325  */
3326 QDF_STATUS
3327 wmi_extract_peer_gid_userpos_list_ev_param(
3328 		wmi_unified_t wmi_handle,
3329 		void *evt_buf,
3330 		wmi_host_peer_gid_userpos_list_event *param);
3331 
3332 /**
3333  * wmi_extract_esp_estimate_ev_param() - extract air time from event
3334  * @wmi_handle: wmi handle
3335  * @evt_buf: pointer to event buffer
3336  * @param: Pointer to hold esp event
3337  *
3338  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3339  */
3340 QDF_STATUS
3341 wmi_extract_esp_estimate_ev_param(wmi_unified_t wmi_handle, void *evt_buf,
3342 				  struct esp_estimation_event *param);
3343 
3344 /**
3345  * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
3346  * @wmi_handle: wmi handle
3347  * @evt_buf: pointer to event buffer
3348  * @gpio_num: Pointer to hold gpio number
3349  *
3350  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3351  */
3352 QDF_STATUS wmi_extract_gpio_input_ev_param(wmi_unified_t wmi_handle,
3353 					   void *evt_buf, uint32_t *gpio_num);
3354 
3355 /**
3356  * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
3357  * param from event
3358  * @wmi_handle: wmi handle
3359  * @evt_buf: pointer to event buffer
3360  * @param: Pointer to hold reserve ast entry param
3361  *
3362  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3363  */
3364 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(
3365 		wmi_unified_t wmi_handle, void *evt_buf,
3366 		struct wmi_host_proxy_ast_reserve_param *param);
3367 /**
3368  * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
3369  * from event
3370  * @wmi_handle: wmi handle
3371  * @evt_buf: pointer to event buffer
3372  * @param: Pointer to generic buffer param
3373  *
3374  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3375  */
3376 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(
3377 		wmi_unified_t wmi_handle, void *evt_buf,
3378 		wmi_host_pdev_generic_buffer_event *param);
3379 
3380 /**
3381  * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
3382  * @wmi_handle: wmi handle
3383  * @evt_buf: pointer to event buffer
3384  * @peer_mac: Pointer to hold peer mac address
3385  * @pdev_id: Pointer to hold pdev_id
3386  * @rate_cap: Pointer to hold ratecode
3387  *
3388  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3389  */
3390 QDF_STATUS wmi_extract_peer_ratecode_list_ev(
3391 		wmi_unified_t wmi_handle, void *evt_buf,
3392 		uint8_t *peer_mac, uint32_t *pdev_id,
3393 		wmi_sa_rate_cap *rate_cap);
3394 
3395 /**
3396  * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
3397  * @wmi_handle: wmi handle
3398  * @evt_buf: pointer to event buffer
3399  * @index: Index into bcn fault stats
3400  * @bcnflt_stats: Pointer to hold bcn fault stats
3401  *
3402  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3403  */
3404 QDF_STATUS wmi_extract_bcnflt_stats(
3405 		wmi_unified_t wmi_handle, void *evt_buf,
3406 		uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
3407 
3408 /**
3409  * wmi_extract_rtt_hdr() - extract rtt header from event
3410  * @wmi_handle: wmi handle
3411  * @evt_buf: pointer to event buffer
3412  * @ev: Pointer to hold rtt header
3413  *
3414  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3415  */
3416 QDF_STATUS wmi_extract_rtt_hdr(wmi_unified_t wmi_handle, void *evt_buf,
3417 			       wmi_host_rtt_event_hdr *ev);
3418 
3419 /**
3420  * wmi_extract_rtt_ev() - extract rtt event
3421  * @wmi_handle: wmi handle
3422  * @evt_buf: Pointer to event buffer
3423  * @ev: Pointer to hold rtt event
3424  * @hdump: Pointer to hold hex dump
3425  * @hdump_len: hex dump length
3426  *
3427  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3428  */
3429 QDF_STATUS wmi_extract_rtt_ev(wmi_unified_t wmi_handle, void *evt_buf,
3430 			      wmi_host_rtt_meas_event *ev,
3431 			      uint8_t *hdump, uint16_t hdump_len);
3432 
3433 /**
3434  * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
3435  * @wmi_handle: wmi handle
3436  * @evt_buf: pointer to event buffer
3437  * @ev: Pointer to hold rtt error report
3438  *
3439  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3440  */
3441 QDF_STATUS
3442 wmi_extract_rtt_error_report_ev(wmi_unified_t wmi_handle, void *evt_buf,
3443 				wmi_host_rtt_error_report_event *ev);
3444 
3445 /**
3446  * wmi_extract_chan_stats() - extract chan stats from event
3447  * @wmi_handle: wmi handle
3448  * @evt_buf: pointer to event buffer
3449  * @index: Index into chan stats
3450  * @chan_stats: Pointer to hold chan stats
3451  *
3452  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3453  */
3454 QDF_STATUS
3455 wmi_extract_chan_stats(wmi_unified_t wmi_handle, void *evt_buf,
3456 		       uint32_t index, wmi_host_chan_stats *chan_stats);
3457 
3458 /**
3459  * wmi_extract_thermal_stats() - extract thermal stats from event
3460  * @wmi_handle: wmi handle
3461  * @evt_buf: Pointer to event buffer
3462  * @temp: Pointer to hold extracted temperature
3463  * @level: Pointer to hold extracted level in host enum
3464  * @therm_throt_levels: Pointer to hold extracted number of level in thermal
3465  *                      stats
3466  * @tt_stats: Pointer to hold extracted thermal stats for each level
3467  * @pdev_id: Pointer to hold extracted pdev_id
3468  *
3469  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3470  */
3471 QDF_STATUS wmi_extract_thermal_stats(wmi_unified_t wmi_handle, void *evt_buf,
3472 				     uint32_t *temp,
3473 				     enum thermal_throttle_level *level,
3474 				     uint32_t *therm_throt_levels,
3475 				     struct thermal_throt_level_stats *tt_stats,
3476 				     uint32_t *pdev_id);
3477 
3478 /**
3479  * wmi_extract_thermal_level_stats() - extract thermal level stats from
3480  * event
3481  * @wmi_handle: wmi handle
3482  * @evt_buf: pointer to event buffer
3483  * @idx: Index to level stats
3484  * @levelcount: Pointer to hold levelcount
3485  * @dccount: Pointer to hold dccount
3486  *
3487  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3488  */
3489 QDF_STATUS
3490 wmi_extract_thermal_level_stats(wmi_unified_t wmi_handle, void *evt_buf,
3491 				uint8_t idx, uint32_t *levelcount,
3492 				uint32_t *dccount);
3493 
3494 /**
3495  * wmi_extract_comb_phyerr() - extract comb phy error from event
3496  * @wmi_handle: wmi handle
3497  * @evt_buf: pointer to event buffer
3498  * @datalen: data length of event buffer
3499  * @buf_offset: Pointer to hold value of current event buffer offset
3500  * post extraction
3501  * @phyerr: Pointer to hold phyerr
3502  *
3503  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3504  */
3505 QDF_STATUS
3506 wmi_extract_comb_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
3507 			uint16_t datalen, uint16_t *buf_offset,
3508 			wmi_host_phyerr_t *phyerr);
3509 
3510 /**
3511  * wmi_extract_single_phyerr() - extract single phy error from event
3512  * @wmi_handle: wmi handle
3513  * @evt_buf: pointer to event buffer
3514  * @datalen: data length of event buffer
3515  * @buf_offset: Pointer to hold value of current event buffer offset
3516  * post extraction
3517  * @phyerr: Pointer to hold phyerr
3518  *
3519  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3520  */
3521 QDF_STATUS
3522 wmi_extract_single_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
3523 			  uint16_t datalen, uint16_t *buf_offset,
3524 			  wmi_host_phyerr_t *phyerr);
3525 
3526 /**
3527  * wmi_extract_composite_phyerr() - extract composite phy error from event
3528  * @wmi_handle: wmi handle
3529  * @evt_buf: pointer to event buffer
3530  * @datalen: Length of event buffer
3531  * @phyerr: Pointer to hold phy error
3532  *
3533  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3534  */
3535 QDF_STATUS
3536 wmi_extract_composite_phyerr(wmi_unified_t wmi_handle, void *evt_buf,
3537 			     uint16_t datalen, wmi_host_phyerr_t *phyerr);
3538 
3539 /**
3540  * wmi_extract_profile_ctx() - extract profile context from event
3541  * @wmi_handle: wmi handle
3542  * @evt_buf: pointer to event buffer
3543  * @profile_ctx: Pointer to hold profile context
3544  *
3545  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3546  */
3547 QDF_STATUS
3548 wmi_extract_profile_ctx(wmi_unified_t wmi_handle, void *evt_buf,
3549 			wmi_host_wlan_profile_ctx_t *profile_ctx);
3550 
3551 /**
3552  * wmi_extract_profile_data() - extract profile data from event
3553  * @wmi_handle: wmi handle
3554  * @evt_buf: pointer to event buffer
3555  * @idx: index of profile data
3556  * @profile_data: Pointer to hold profile data
3557  *
3558  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3559  */
3560 QDF_STATUS
3561 wmi_extract_profile_data(wmi_unified_t wmi_handle, void *evt_buf, uint8_t idx,
3562 			 wmi_host_wlan_profile_t *profile_data);
3563 
3564 /**
3565  * wmi_extract_pmf_bcn_protect_stats() - extract pmf bcn stats from event
3566  * @wmi_handle: wmi handle
3567  * @evt_buf: pointer to event buffer
3568  * @bcn_stats: Pointer to hold pmf bcn protect stats
3569  *
3570  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3571  */
3572 QDF_STATUS
3573 wmi_extract_pmf_bcn_protect_stats(wmi_unified_t wmi_handle, void *evt_buf,
3574 				  wmi_host_pmf_bcn_protect_stats *bcn_stats);
3575 
3576 /**
3577  * wmi_extract_unit_test() - extract unit test from event
3578  * @wmi_handle: wmi handle
3579  * @evt_buf: pointer to event buffer
3580  * @unit_test: Pointer to hold unit-test header
3581  * @maxspace: The amount of space in evt_buf
3582  *
3583  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3584  */
3585 QDF_STATUS
3586 wmi_extract_unit_test(wmi_unified_t wmi_handle, void *evt_buf,
3587 		      wmi_unit_test_event *unit_test, uint32_t maxspace);
3588 
3589 /**
3590  * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
3591  * @wmi_handle: wmi handle
3592  * @evt_buf: pointer to event buffer
3593  * @index: Index into extended pdev stats
3594  * @pdev_ext_stats: Pointer to hold extended pdev stats
3595  *
3596  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3597  */
3598 QDF_STATUS
3599 wmi_extract_pdev_ext_stats(wmi_unified_t wmi_handle, void *evt_buf,
3600 			   uint32_t index,
3601 			   wmi_host_pdev_ext_stats *pdev_ext_stats);
3602 
3603 /**
3604  * wmi_extract_bss_chan_info_event() - extract bss channel information
3605  * from event
3606  * @wmi_handle: wmi handle
3607  * @evt_buf: pointer to event buffer
3608  * @bss_chan_info: Pointer to hold bss channel information
3609  *
3610  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3611  */
3612 QDF_STATUS wmi_extract_bss_chan_info_event(
3613 		wmi_unified_t wmi_handle, void *evt_buf,
3614 		wmi_host_pdev_bss_chan_info_event *bss_chan_info);
3615 
3616 /**
3617  * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
3618  * from event
3619  * @wmi_handle: wmi handle
3620  * @evt_buf: pointer to event buffer
3621  * @ev: Pointer to hold data traffic control
3622  *
3623  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3624  */
3625 QDF_STATUS
3626 wmi_extract_tx_data_traffic_ctrl_ev(wmi_unified_t wmi_handle, void *evt_buf,
3627 				    wmi_host_tx_data_traffic_ctrl_event *ev);
3628 
3629 /**
3630  * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
3631  * @wmi_handle: wmi handle
3632  * @evt_buf: pointer to event buffer
3633  * @index: Index into extended vdev stats
3634  * @vdev_extd_stats: Pointer to hold extended vdev stats
3635  *
3636  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3637  */
3638 QDF_STATUS
3639 wmi_extract_vdev_extd_stats(wmi_unified_t wmi_handle, void *evt_buf,
3640 			    uint32_t index,
3641 			    wmi_host_vdev_extd_stats *vdev_extd_stats);
3642 
3643 /**
3644  * wmi_extract_bcn_stats() - extract beacon stats from event
3645  * @wmi_handle: wmi handle
3646  * @evt_buf: pointer to event buffer
3647  * @index: Index into beacon stats
3648  * @vdev_bcn_stats: Pointer to hold beacon stats
3649  *
3650  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3651  */
3652 QDF_STATUS
3653 wmi_extract_bcn_stats(wmi_unified_t wmi_handle, void *evt_buf,
3654 		      uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
3655 
3656 /**
3657  * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
3658  * @wmi_handle: wmi handle
3659  * @evt_buf: pointer to event buffer
3660  * @vdev_nac_rssi_stats: Pointer to hold nac rssi stats
3661  *
3662  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3663  */
3664 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(
3665 		wmi_unified_t wmi_handle, void *evt_buf,
3666 		struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
3667 
3668 /**
3669  * wmi_extract_vdev_prb_fils_stats() - extract probe and fils vdev
3670  * stats from event
3671  * @wmi_handle: wmi handle
3672  * @evt_buf: pointer to event buffer
3673  * @index: Index into extended vdev stats
3674  * @vdev_prb_fils_stats: Pointer to hold probe and fils vdev stats
3675  *
3676  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3677  */
3678 QDF_STATUS wmi_extract_vdev_prb_fils_stats(
3679 		wmi_unified_t wmi_handle, void *evt_buf,
3680 		uint32_t index,
3681 		struct wmi_host_vdev_prb_fils_stats *vdev_prb_fils_stats);
3682 
3683 /**
3684  * wmi_extract_peer_retry_stats() - extract peer retry stats from event
3685  * @wmi_handle: wmi handle
3686  * @evt_buf: pointer to event buffer
3687  * @index: Index into peer retry stats
3688  * @peer_retry_stats: Pointer to hold  peer retry stats
3689  *
3690  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3691  */
3692 QDF_STATUS wmi_extract_peer_retry_stats(
3693 	wmi_unified_t wmi_handle, void *evt_buf,
3694 	uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats);
3695 
3696 /**
3697  * wmi_unified_send_power_dbg_cmd() - send power debug commands
3698  * @wmi_handle: wmi handle
3699  * @param: wmi power debug parameter
3700  *
3701  * Send WMI_POWER_DEBUG_CMDID parameters to fw.
3702  *
3703  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3704  */
3705 QDF_STATUS wmi_unified_send_power_dbg_cmd(wmi_unified_t wmi_handle,
3706 					  struct wmi_power_dbg_params *param);
3707 
3708 /**
3709  * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from
3710  *					     FW service ready event
3711  * @wmi_handle: wmi handle
3712  * @evt_buf: event buffer received from firmware
3713  * @ext_param: extended target info
3714  *
3715  * Return: QDF_STATUS_SUCCESS for success or error code
3716  */
3717 QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
3718 			wmi_unified_t wmi_handle,
3719 			uint8_t *evt_buf,
3720 			struct wlan_psoc_host_service_ext_param *ext_param);
3721 
3722 /**
3723  * wmi_unified_fw_test_cmd() - send fw test command to fw.
3724  * @wmi_handle: wmi handle
3725  * @wmi_fwtest: fw test command
3726  *
3727  * This function sends fw test command to fw.
3728  *
3729  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3730  */
3731 QDF_STATUS wmi_unified_fw_test_cmd(wmi_unified_t wmi_handle,
3732 				   struct set_fwtest_params *wmi_fwtest);
3733 
3734 /**
3735  * wmi_unified_wfa_test_cmd() - send wfa test command to fw.
3736  * @wmi_handle: wmi handle
3737  * @wmi_wfatest: wfa test param
3738  *
3739  * This function send wfa test command to fw.
3740  *
3741  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3742  */
3743 QDF_STATUS wmi_unified_wfa_test_cmd(wmi_unified_t wmi_handle,
3744 				    struct set_wfatest_params *wmi_wfatest);
3745 
3746 /**
3747  * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
3748  *      setup command to fw
3749  * @wmi_handle: wmi handle
3750  * @param: Rx reorder queue setup parameters
3751  *
3752  * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
3753  */
3754 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(
3755 		wmi_unified_t wmi_handle,
3756 		struct rx_reorder_queue_setup_params *param);
3757 
3758 /**
3759  * wmi_unified_peer_multi_rx_reorder_queue_setup_send() - send
3760  *        multi rx reorder queue setup command to fw
3761  * @wmi_handle: wmi handle
3762  * @param: Multi rx reorder queue setup parameters
3763  *
3764  * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
3765  */
3766 QDF_STATUS wmi_unified_peer_multi_rx_reorder_queue_setup_send(
3767 		wmi_unified_t wmi_handle,
3768 		struct multi_rx_reorder_queue_setup_params *param);
3769 
3770 /**
3771  * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
3772  *      remove command to fw
3773  * @wmi_handle: wmi handle
3774  * @param: Rx reorder queue remove parameters
3775  *
3776  * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
3777  */
3778 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(
3779 		wmi_unified_t wmi_handle,
3780 		struct rx_reorder_queue_remove_params *param);
3781 
3782 /**
3783  * wmi_extract_service_ready_ext() - extract extended service ready
3784  * @wmi_handle: wmi handle
3785  * @evt_buf: pointer to event buffer
3786  * @param: wmi power debug parameter
3787  *
3788  *
3789  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3790  */
3791 QDF_STATUS wmi_extract_service_ready_ext(
3792 		wmi_unified_t wmi_handle, uint8_t *evt_buf,
3793 		struct wlan_psoc_host_service_ext_param *param);
3794 
3795 /**
3796  * wmi_extract_service_ready_ext2() - extract extended2 service ready
3797  * @wmi_handle: wmi handle
3798  * @evt_buf: pointer to event buffer
3799  * @param: wmi ext2 base parameters
3800  *
3801  *
3802  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3803  */
3804 QDF_STATUS wmi_extract_service_ready_ext2(
3805 		struct wmi_unified *wmi_handle, uint8_t *evt_buf,
3806 		struct wlan_psoc_host_service_ext2_param *param);
3807 
3808 /**
3809  * wmi_extract_dbs_or_sbs_cap_service_ready_ext2() - extract dbs_or_sbs cap from
3810  *                                                   service ready ext 2
3811  *
3812  * @wmi_handle: wmi handle
3813  * @evt_buf: pointer to event buffer
3814  * @sbs_lower_band_end_freq: If sbs_lower_band_end_freq is set to non-zero,
3815  *                           it indicates async SBS mode is supported, and
3816  *                           lower-band/higher band to MAC mapping is
3817  *                           switch-able. unit: mhz. examples 5180, 5320
3818  *
3819  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3820  */
3821 QDF_STATUS wmi_extract_dbs_or_sbs_cap_service_ready_ext2(
3822 			wmi_unified_t wmi_handle,
3823 			uint8_t *evt_buf, uint32_t *sbs_lower_band_end_freq);
3824 
3825 /**
3826  * wmi_extract_hw_mode_cap_service_ready_ext() -
3827  *       extract HW mode cap from service ready event
3828  * @wmi_handle: wmi handle
3829  * @evt_buf: pointer to event buffer
3830  * @hw_mode_idx: hw mode idx should be less than num_mode
3831  * @param: Pointer to hold evt buf
3832  *
3833  * Return: QDF_STATUS_SUCCESS for success or error code
3834  */
3835 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
3836 			wmi_unified_t wmi_handle,
3837 			uint8_t *evt_buf, uint8_t hw_mode_idx,
3838 			struct wlan_psoc_host_hw_mode_caps *param);
3839 
3840 /**
3841  * wmi_extract_mac_phy_cap_service_ready_ext() -
3842  *       extract MAC phy cap from service ready event
3843  * @wmi_handle: wmi handle
3844  * @evt_buf: pointer to event buffer
3845  * @hw_mode_id: hw mode id of hw_mode_caps
3846  * @phy_id: phy_id within hw_mode_cap
3847  * @param: pointer to mac phy caps structure to hold the values from event
3848  *
3849  * Return: QDF_STATUS_SUCCESS for success or error code
3850  */
3851 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
3852 			wmi_unified_t wmi_handle,
3853 			uint8_t *evt_buf,
3854 			uint8_t hw_mode_id,
3855 			uint8_t phy_id,
3856 			struct wlan_psoc_host_mac_phy_caps *param);
3857 
3858 /**
3859  * wmi_extract_mac_phy_cap_service_ready_ext2() - Extract MAC phy cap from
3860  * service ready ext2 event.
3861  * @wmi_handle: wmi handle
3862  * @evt_buf: pointer to event buffer
3863  * @hw_mode_id: hw mode id of hw_mode_caps
3864  * @phy_id: phy_id within hw_mode_cap
3865  * @phy_idx: index to hw_mode_cap for the given hw_mode_id and phy_id
3866  * @mac_phy_cap: Pointer to mac_phy_cap_ext2 structure
3867  *
3868  * Return: QDF_STATUS_SUCCESS for success or error code
3869  */
3870 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext2(
3871 			wmi_unified_t wmi_handle,
3872 			uint8_t *evt_buf,
3873 			uint8_t hw_mode_id,
3874 			uint8_t phy_id,
3875 			uint8_t phy_idx,
3876 			struct wlan_psoc_host_mac_phy_caps_ext2 *mac_phy_cap);
3877 
3878 /**
3879  * wmi_extract_reg_cap_service_ready_ext() -
3880  *       extract REG cap from service ready event
3881  * @wmi_handle: wmi handle
3882  * @evt_buf: pointer to event buffer
3883  * @phy_idx: phy idx should be less than num_mode
3884  * @param: Pointer to hold evt buf
3885  *
3886  * Return: QDF_STATUS_SUCCESS for success or error code
3887  */
3888 QDF_STATUS
3889 wmi_extract_reg_cap_service_ready_ext(
3890 			wmi_unified_t wmi_handle,
3891 			uint8_t *evt_buf, uint8_t phy_idx,
3892 			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
3893 
3894 /**
3895  * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
3896  *                                             capability received through
3897  *                                             extended service ready event
3898  * @wmi_handle: WMI handle
3899  * @evt_buf: Event buffer
3900  * @idx: Index of the module for which capability is received
3901  * @param: Pointer to direct buffer rx ring cap struct
3902  *
3903  * Return: QDF status of operation
3904  */
3905 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
3906 			wmi_unified_t wmi_handle,
3907 			uint8_t *evt_buf, uint8_t idx,
3908 			struct wlan_psoc_host_dbr_ring_caps *param);
3909 
3910 /**
3911  * wmi_extract_dbr_ring_cap_service_ready_ext2: Extract direct buffer rx
3912  *                                              capability received through
3913  *                                              extended service ready2 event
3914  * @wmi_handle: WMI handle
3915  * @evt_buf: Event buffer
3916  * @idx: Index of the module for which capability is received
3917  * @param: Pointer to direct buffer rx ring cap struct
3918  *
3919  * Return: QDF status of operation
3920  */
3921 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext2(
3922 			wmi_unified_t wmi_handle,
3923 			uint8_t *evt_buf, uint8_t idx,
3924 			struct wlan_psoc_host_dbr_ring_caps *param);
3925 
3926 /**
3927  * wmi_extract_scan_radio_cap_service_ready_ext2: Extract scan radio capability
3928  * received through extended service ready2 event
3929  * @wmi_handle: WMI handle
3930  * @evt_buf: Event buffer
3931  * @idx: Index of the module for which capability is received
3932  * @param: Pointer to scan radio cap struct
3933  *
3934  * Return: QDF status of operation
3935  */
3936 QDF_STATUS wmi_extract_scan_radio_cap_service_ready_ext2(
3937 			wmi_unified_t wmi_handle,
3938 			uint8_t *evt_buf, uint8_t idx,
3939 			struct wlan_psoc_host_scan_radio_caps *param);
3940 
3941 /**
3942  * wmi_extract_msdu_idx_qtype_map_service_ready_ext2: Extract HTT MSDU index
3943  *                                                    to qtype map received
3944  *                                                    through extended service
3945  *                                                    ready2 event
3946  * @wmi_handle: WMI handle
3947  * @evt_buf: Event buffer
3948  * @idx: HTT MSDU index in array
3949  * @msdu_qtype: MSDU Qtype pointer
3950  *
3951  * Return: QDF status of operation
3952  */
3953 QDF_STATUS wmi_extract_msdu_idx_qtype_map_service_ready_ext2(
3954 			wmi_unified_t wmi_handle,
3955 			uint8_t *evt_buf, uint8_t idx,
3956 			uint8_t *msdu_qtype);
3957 
3958 /**
3959  * wmi_extract_sw_cal_ver_ext2: Extract sw cal version received through
3960  *                              extended service ready2 event
3961  * @wmi_handle: WMI handle
3962  * @event: Event buffer
3963  * @cal: Pointer to sw cal ver struct
3964  *
3965  * Return: QDF status of operation
3966  */
3967 QDF_STATUS wmi_extract_sw_cal_ver_ext2(wmi_unified_t wmi_handle,
3968 				       uint8_t *event,
3969 				       struct wmi_host_sw_cal_ver *cal);
3970 
3971 /**
3972  * wmi_extract_spectral_scaling_params_service_ready_ext: Extract Spectral
3973  *                                             scaling params received through
3974  *                                             extended service ready event
3975  * @wmi_handle: WMI handle
3976  * @evt_buf: Event buffer
3977  * @idx: Index
3978  * @param: Pointer to Spectral scaling params
3979  *
3980  * Return: QDF status of operation
3981  */
3982 QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
3983 			wmi_unified_t wmi_handle,
3984 			uint8_t *evt_buf, uint8_t idx,
3985 			struct wlan_psoc_host_spectral_scaling_params *param);
3986 
3987 #ifdef WLAN_RCC_ENHANCED_AOA_SUPPORT
3988 /**
3989  * wmi_extract_aoa_caps_service_ready_ext2: Extract AoA capabilities received
3990  *                                          through extended service ready event
3991  * @wmi_handle: WMI handle
3992  * @evt_buf: Event buffer
3993  * @aoa_cap: Pointer to aoa cap
3994  *
3995  * Return: QDF status of operation
3996  */
3997 QDF_STATUS wmi_extract_aoa_caps_service_ready_ext2(
3998 			wmi_unified_t wmi_handle, uint8_t *evt_buf,
3999 			struct wlan_psoc_host_rcc_enh_aoa_caps_ext2 *aoa_cap);
4000 #endif /* WLAN_RCC_ENHANCED_AOA_SUPPORT */
4001 
4002 /**
4003  * wmi_extract_pdev_utf_event() -
4004  *       extract UTF data from pdev utf event
4005  * @wmi_handle: wmi handle
4006  * @evt_buf: pointer to event buffer
4007  * @param: Pointer to hold evt buf
4008  *
4009  * Return: QDF_STATUS_SUCCESS for success or error code
4010  */
4011 QDF_STATUS wmi_extract_pdev_utf_event(wmi_unified_t wmi_handle,
4012 				      uint8_t *evt_buf,
4013 				      struct wmi_host_pdev_utf_event *param);
4014 
4015 /**
4016  * wmi_extract_pdev_qvit_event() -
4017  *       extract UTF data from pdev qvit event
4018  * @wmi_handle: wmi handle
4019  * @evt_buf: pointer to event buffer
4020  * @param: Pointer to hold evt buf
4021  *
4022  * Return: QDF_STATUS_SUCCESS for success or error code
4023  */
4024 QDF_STATUS wmi_extract_pdev_qvit_event(wmi_unified_t wmi_handle,
4025 				       uint8_t *evt_buf,
4026 				       struct wmi_host_pdev_qvit_event *param);
4027 
4028 #ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
4029 /**
4030  * wmi_extract_num_rf_characterization_entries - Extract number of RF
4031  * characterization metrics received from the RF characterization event.
4032  * @wmi_hdl: WMI handle
4033  * @evt_buf: Event buffer
4034  * @num_rf_characterization_entries: Number of RF characterization metrics
4035  *
4036  * Return: QDF status of operation
4037  */
4038 QDF_STATUS wmi_extract_num_rf_characterization_entries(wmi_unified_t wmi_hdl,
4039 				uint8_t *evt_buf,
4040 				uint32_t *num_rf_characterization_entries);
4041 
4042 /**
4043  * wmi_extract_rf_characterization_entries - Extract RF characterization
4044  *			metrics received from the RF characterization event.
4045  * @wmi_hdl: WMI handle
4046  * @evt_buf: Event buffer
4047  * @num_rf_characterization_entries: Number of RF characterization metrics
4048  * @rf_characterization_entries: Pointer to RF characterization metrics
4049  *
4050  * Return: QDF status of operation
4051  */
4052 QDF_STATUS wmi_extract_rf_characterization_entries(wmi_unified_t wmi_hdl,
4053 	uint8_t *evt_buf,
4054 	uint32_t num_rf_characterization_entries,
4055 	struct wmi_host_rf_characterization_event_param *rf_characterization_entries);
4056 #endif
4057 
4058 /**
4059  * wmi_extract_chainmask_tables() - extract chain mask tables
4060  * @wmi_handle: wmi handle
4061  * @evt_buf: pointer to event buffer.
4062  * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
4063  *
4064  *
4065  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4066  */
4067 QDF_STATUS wmi_extract_chainmask_tables(
4068 		wmi_unified_t wmi_handle, uint8_t *evt_buf,
4069 		struct wlan_psoc_host_chainmask_table *chainmask_table);
4070 
4071 /**
4072  * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
4073  * @wmi_handle: wmi handle
4074  * @pdev_id: pdev id
4075  *
4076  * Return: QDF_STATUS
4077  */
4078 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(wmi_unified_t wmi_handle,
4079 						 uint32_t pdev_id);
4080 
4081 /**
4082  * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
4083  * @wmi_handle: wmi handle
4084  * @pdev_id: pdev id
4085  *
4086  * Return: QDF_STATUS
4087  */
4088 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(wmi_unified_t wmi_handle,
4089 						  uint32_t pdev_id);
4090 
4091 #ifdef QCA_SUPPORT_AGILE_DFS
4092 /**
4093  * wmi_unified_send_vdev_adfs_ch_cfg_cmd() - send adfs channel config command
4094  * @wmi_handle: wmi handle
4095  * @param: adfs channel config params
4096  *
4097  * Return: QDF_STATUS
4098  */
4099 QDF_STATUS
4100 wmi_unified_send_vdev_adfs_ch_cfg_cmd(wmi_unified_t wmi_handle,
4101 				      struct vdev_adfs_ch_cfg_params *param);
4102 
4103 /**
4104  * wmi_unified_send_vdev_adfs_ocac_abort_cmd() - send adfs o-cac abort command
4105  * @wmi_handle: wmi handle
4106  * @param: adfs channel o-cac abort params
4107  *
4108  * Return: QDF_STATUS
4109  */
4110 QDF_STATUS
4111 wmi_unified_send_vdev_adfs_ocac_abort_cmd(wmi_unified_t wmi_handle,
4112 					  struct vdev_adfs_abort_params *param);
4113 #endif
4114 
4115 /**
4116  *  wmi_unified_set_country_cmd_send() - WMI set country function
4117  *  @wmi_handle: handle to WMI.
4118  *  @param: pointer to hold set country cmd parameter
4119  *
4120  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4121  */
4122 QDF_STATUS wmi_unified_set_country_cmd_send(wmi_unified_t wmi_handle,
4123 					    struct set_country *param);
4124 
4125 #ifdef WLAN_FEATURE_ACTION_OUI
4126 /**
4127  * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw
4128  * @wmi_handle: wma handle
4129  * @req: wmi action oui message to be send
4130  *
4131  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4132  */
4133 QDF_STATUS
4134 wmi_unified_send_action_oui_cmd(wmi_unified_t wmi_handle,
4135 				struct action_oui_request *req);
4136 #endif /* WLAN_FEATURE_ACTION_OUI */
4137 
4138 /**
4139  * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
4140  * @wmi_handle: wma handle
4141  * @get_rcpi_param: rcpi params
4142  *
4143  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4144  */
4145 QDF_STATUS
4146 wmi_unified_send_request_get_rcpi_cmd(wmi_unified_t wmi_handle,
4147 				      struct rcpi_req *get_rcpi_param);
4148 
4149 /**
4150  * wmi_extract_rcpi_response_event - api to extract RCPI event params
4151  * @wmi_handle: wma handle
4152  * @evt_buf: pointer to event buffer
4153  * @res: pointer to hold rcpi response from firmware
4154  *
4155  * Return: QDF_STATUS_SUCCESS for successful event parse
4156  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
4157  */
4158 QDF_STATUS
4159 wmi_extract_rcpi_response_event(wmi_unified_t wmi_handle, void *evt_buf,
4160 				struct rcpi_res *res);
4161 
4162 #ifdef WMI_INTERFACE_EVENT_LOGGING
4163 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
4164 		       qdf_abstract_print *print, void *print_priv);
4165 
4166 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
4167 			      qdf_abstract_print *print, void *print_priv);
4168 
4169 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
4170 			    qdf_abstract_print *print, void *print_priv);
4171 
4172 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
4173 				   qdf_abstract_print *print, void *print_priv);
4174 
4175 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
4176 			 qdf_abstract_print *print, void *print_priv);
4177 
4178 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
4179 			    qdf_abstract_print *print, void *print_priv);
4180 
4181 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
4182 			      qdf_abstract_print *print, void *print_priv);
4183 
4184 #endif /* WMI_INTERFACE_EVENT_LOGGING */
4185 
4186 /**
4187  * wmi_unified_send_dump_wds_table_cmd() - WMI function to get list of
4188  *  wds entries from FW
4189  * @wmi_handle: wmi handle
4190  *
4191  * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
4192  *
4193  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4194  */
4195 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(wmi_unified_t wmi_handle);
4196 
4197 /**
4198  * wmi_extract_wds_entry - api to extract wds entry
4199  * @wmi_handle: wmi handle
4200  * @evt_buf: pointer to event buffer
4201  * @wds_entry: wds entry
4202  * @idx: index to point wds entry in event buffer
4203  *
4204  * Return: QDF_STATUS_SUCCESS for successful event parse
4205  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
4206  */
4207 QDF_STATUS
4208 wmi_extract_wds_entry(wmi_unified_t wmi_handle, uint8_t *evt_buf,
4209 		      struct wdsentry *wds_entry, u_int32_t idx);
4210 
4211 /**
4212  * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss
4213  *  detection configuration to FW.
4214  * @wmi_handle: wmi handle
4215  * @cfg: obss detection configuration
4216  *
4217  * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw.
4218  *
4219  * Return: QDF_STATUS
4220  */
4221 
4222 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(
4223 		wmi_unified_t wmi_handle,
4224 		struct wmi_obss_detection_cfg_param *cfg);
4225 
4226 /**
4227  * wmi_unified_extract_obss_detection_info() - WMI function to extract obss
4228  *  detection info from FW.
4229  * @wmi_handle: wmi handle
4230  * @data: event data from firmware
4231  * @info: Pointer to hold obss detection info
4232  *
4233  * This function is used to extract obss info from firmware.
4234  *
4235  * Return: QDF_STATUS
4236  */
4237 
4238 QDF_STATUS wmi_unified_extract_obss_detection_info(
4239 			wmi_unified_t wmi_handle,
4240 			uint8_t *data,
4241 			struct wmi_obss_detect_info *info);
4242 
4243 #ifdef WLAN_SUPPORT_GREEN_AP
4244 QDF_STATUS wmi_extract_green_ap_egap_status_info(
4245 	wmi_unified_t wmi_hdl, uint8_t *evt_buf,
4246 	struct wlan_green_ap_egap_status_info *egap_status_info_params);
4247 #endif
4248 
4249 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE
4250 /**
4251  * wmi_unified_extract_green_ap_ll_ps_param() - API to extract Green AP low
4252  * latency power save event parameter
4253  * @wmi_handle: wmi handle
4254  * @evt_buf: pointer to the event buffer
4255  * @green_ap_ll_ps_event_param: Event parameter
4256  *
4257  * Return: QDF_STATUS
4258  */
4259 QDF_STATUS wmi_unified_extract_green_ap_ll_ps_param(
4260 	wmi_unified_t wmi_handle, uint8_t *evt_buf,
4261 	struct wlan_green_ap_ll_ps_event_param *green_ap_ll_ps_event_param);
4262 #endif
4263 
4264 /**
4265  * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats
4266  * @wmi_handle: wmi handle
4267  * @params: request params
4268  *
4269  * This function is used to send the roam scan stats request command to
4270  * firmware.
4271  *
4272  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4273  */
4274 QDF_STATUS
4275 wmi_unified_send_roam_scan_stats_cmd(wmi_unified_t wmi_handle,
4276 				     struct wmi_roam_scan_stats_req *params);
4277 
4278 /**
4279  * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res
4280  * @wmi: wmi handle
4281  * @evt_buf: pointer to the event buffer
4282  * @vdev_id: output pointer to hold vdev id
4283  * @res_param: output pointer to hold extracted memory
4284  *
4285  * Return: QDF_STATUS
4286  */
4287 QDF_STATUS
4288 wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
4289 				    uint32_t *vdev_id,
4290 				    struct wmi_roam_scan_stats_res **res_param);
4291 
4292 /**
4293  * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event
4294  * @wmi_handle: wmi handle
4295  * @evt_buf: pointer to the event buffer
4296  * @vdev_id: output pointer to hold vdev id
4297  * @tx_status: output pointer to hold bcn tx status
4298  *
4299  * Return: QDF_STATUS
4300  */
4301 QDF_STATUS
4302 wmi_extract_offload_bcn_tx_status_evt(wmi_unified_t wmi_handle, void *evt_buf,
4303 				      uint32_t *vdev_id, uint32_t *tx_status);
4304 
4305 /**
4306  * wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width
4307  * @wmi_handle: wmi handle
4308  * @phymode: phy mode
4309  *
4310  * Return: wmi channel width
4311  */
4312 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(
4313 	wmi_unified_t wmi_handle, WMI_HOST_WLAN_PHY_MODE phymode);
4314 
4315 #ifdef QCA_SUPPORT_CP_STATS
4316 /**
4317  * wmi_extract_cca_stats() - api to extract congestion stats from event buffer
4318  * @wmi_handle: wma handle
4319  * @evt_buf: event buffer
4320  * @stats: buffer to populated after stats extraction
4321  *
4322  * Return: status of operation
4323  */
4324 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
4325 				 struct wmi_host_congestion_stats *stats);
4326 #endif /* QCA_SUPPORT_CP_STATS */
4327 
4328 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
4329 /**
4330  * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd.
4331  * @wmi_handle: wmi handle
4332  * @params: radar found params
4333  *
4334  * This function passes the average radar parameters to fw
4335  *
4336  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4337  */
4338 QDF_STATUS
4339 wmi_unified_dfs_send_avg_params_cmd(wmi_unified_t wmi_handle,
4340 				    struct dfs_radar_found_params *params);
4341 
4342 /**
4343  * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw.
4344  * @wmi_handle: wmi handle
4345  * @evt_buf: pointer to event buffer
4346  * @dfs_status_check: pointer to the host dfs status
4347  *
4348  * This function extracts the result of host dfs from fw
4349  *
4350  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4351  */
4352 QDF_STATUS wmi_extract_dfs_status_from_fw(wmi_unified_t wmi_handle,
4353 					  void *evt_buf,
4354 					  uint32_t  *dfs_status_check);
4355 #endif
4356 #ifdef OL_ATH_SMART_LOGGING
4357 /**
4358  * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd
4359  * @wmi_handle: wmi handle
4360  * @param: enable/disable
4361  *
4362  * This function enables/disable the smart logging feature
4363  *
4364  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4365  */
4366 QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(wmi_unified_t wmi_handle,
4367 						     uint32_t param);
4368 
4369 /**
4370  * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd
4371  * @wmi_handle: wmi handle
4372  * @param:  Fatal event
4373  *
4374  * This function sends the smart log fatal events to the FW
4375  *
4376  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4377  */
4378 QDF_STATUS
4379 wmi_unified_send_smart_logging_fatal_cmd(wmi_unified_t wmi_handle,
4380 					 struct wmi_debug_fatal_events *param);
4381 
4382 /**
4383  * wmi_extract_smartlog_ev() - extract smartlog event info from event
4384  * @wmi_handle: wmi handle
4385  * @evt_buf: pointer to event buffer
4386  * @ev: Pointer to hold fatal events
4387  *
4388  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4389  */
4390 QDF_STATUS
4391 wmi_extract_smartlog_ev(wmi_unified_t wmi_handle, void *evt_buf,
4392 			struct wmi_debug_fatal_events *ev);
4393 
4394 #endif /* OL_ATH_SMART_LOGGING */
4395 
4396 /**
4397  * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context
4398  * @wmi_handle: handle to wmi
4399  * @evt_buf: pointer to event buffer
4400  *
4401  * Event process by below function will be in worker thread context.
4402  * Use this method for events which are not critical and not
4403  * handled in protocol stack.
4404  *
4405  * Return: none
4406  */
4407 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
4408 					    void *evt_buf);
4409 
4410 /**
4411  * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe
4412  * status from event
4413  * @wmi_handle: wmi handle
4414  * @evt_buf: pointer to event buffer
4415  * @param: Pointer to hold ctl status
4416  *
4417  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4418  */
4419 QDF_STATUS wmi_extract_ctl_failsafe_check_ev_param(
4420 		wmi_unified_t wmi_handle,
4421 		void *evt_buf,
4422 		struct wmi_host_pdev_ctl_failsafe_event *param);
4423 
4424 #ifdef OBSS_PD
4425 /**
4426  * wmi_unified_send_obss_spatial_reuse_set_cmd() - send obss pd offset
4427  * @wmi_handle: wmi handle
4428  * @obss_spatial_reuse_param: Pointer to obsspd min max offset
4429  *
4430  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4431  */
4432 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(
4433 	wmi_unified_t wmi_handle,
4434 	struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param);
4435 
4436 /**
4437  * wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd() - send def thresh
4438  * @wmi_handle: wmi handle
4439  * @thresh: Pointer to def thresh
4440  *
4441  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4442  */
4443 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(
4444 	wmi_unified_t wmi_handle,
4445 	struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh);
4446 
4447 /**
4448  * wmi_unified_send_self_srg_bss_color_bitmap_set_cmd() - Send 64-bit BSS color
4449  * bitmap to be used by SRG based Spatial Reuse feature
4450  * @wmi_handle: wmi handle
4451  * @bitmap_0: lower 32 bits in BSS color bitmap
4452  * @bitmap_1: upper 32 bits in BSS color bitmap
4453  * @pdev_id: pdev ID
4454  *
4455  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4456  */
4457 QDF_STATUS wmi_unified_send_self_srg_bss_color_bitmap_set_cmd(
4458 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4459 	uint32_t bitmap_1, uint8_t pdev_id);
4460 
4461 /**
4462  * wmi_unified_send_self_srg_partial_bssid_bitmap_set_cmd() - Send 64-bit
4463  * partial BSSID bitmap to be used by SRG based Spatial Reuse feature
4464  * @wmi_handle: wmi handle
4465  * @bitmap_0: lower 32 bits in partial BSSID bitmap
4466  * @bitmap_1: upper 32 bits in partial BSSID bitmap
4467  * @pdev_id: pdev ID
4468  *
4469  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4470  */
4471 QDF_STATUS wmi_unified_send_self_srg_partial_bssid_bitmap_set_cmd(
4472 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4473 	uint32_t bitmap_1, uint8_t pdev_id);
4474 
4475 /**
4476  * wmi_unified_send_self_srg_obss_color_enable_bitmap_cmd() - Send 64-bit BSS
4477  * color enable bitmap to be used by SRG based Spatial Reuse feature to the FW
4478  * @wmi_handle: wmi handle
4479  * @bitmap_0: lower 32 bits in BSS color enable bitmap
4480  * @bitmap_1: upper 32 bits in BSS color enable bitmap
4481  * @pdev_id: pdev ID
4482  *
4483  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4484  */
4485 QDF_STATUS wmi_unified_send_self_srg_obss_color_enable_bitmap_cmd(
4486 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4487 	uint32_t bitmap_1, uint8_t pdev_id);
4488 
4489 /**
4490  * wmi_unified_send_self_srg_obss_bssid_enable_bitmap_cmd() - Send 64-bit OBSS
4491  * BSSID enable bitmap to be used by SRG based Spatial Reuse feature to the FW
4492  * @wmi_handle: wmi handle
4493  * @bitmap_0: lower 32 bits in BSSID enable bitmap
4494  * @bitmap_1: upper 32 bits in BSSID enable bitmap
4495  * @pdev_id: pdev ID
4496  *
4497  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4498  */
4499 QDF_STATUS wmi_unified_send_self_srg_obss_bssid_enable_bitmap_cmd(
4500 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4501 	uint32_t bitmap_1, uint8_t pdev_id);
4502 
4503 /**
4504  * wmi_unified_send_self_non_srg_obss_color_enable_bitmap_cmd() - Send 64-bit
4505  * BSS color enable bitmap to be used by Non-SRG based Spatial Reuse
4506  * feature to the FW
4507  * @wmi_handle: wmi handle
4508  * @bitmap_0: lower 32 bits in BSS color enable bitmap
4509  * @bitmap_1: upper 32 bits in BSS color enable bitmap
4510  * @pdev_id: pdev ID
4511  *
4512  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4513  */
4514 QDF_STATUS wmi_unified_send_self_non_srg_obss_color_enable_bitmap_cmd(
4515 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4516 	uint32_t bitmap_1, uint8_t pdev_id);
4517 
4518 /**
4519  * wmi_unified_send_self_non_srg_obss_bssid_enable_bitmap_cmd() - Send 64-bit
4520  * OBSS BSSID enable bitmap to be used by Non-SRG based Spatial Reuse
4521  * feature to the FW
4522  * @wmi_handle: wmi handle
4523  * @bitmap_0: lower 32 bits in BSSID enable bitmap
4524  * @bitmap_1: upper 32 bits in BSSID enable bitmap
4525  * @pdev_id: pdev ID
4526  *
4527  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4528  */
4529 QDF_STATUS wmi_unified_send_self_non_srg_obss_bssid_enable_bitmap_cmd(
4530 	wmi_unified_t wmi_handle,  uint32_t bitmap_0,
4531 	uint32_t bitmap_1, uint8_t pdev_id);
4532 #endif /* OBSS_PD */
4533 
4534 /**
4535  * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target
4536  * defines. For legacy there is not conversion required. Just return pdev_id as
4537  * it is.
4538  * @wmi_handle: wmi handle
4539  * @host_pdev_id: host pdev_id to be converted.
4540  * @target_pdev_id: Output target pdev id.
4541  *
4542  * Return: QDF_STATUS
4543  */
4544 QDF_STATUS wmi_convert_pdev_id_host_to_target(wmi_unified_t wmi_handle,
4545 					      uint32_t host_pdev_id,
4546 					      uint32_t *target_pdev_id);
4547 
4548 #ifndef CNSS_GENL
4549 /**
4550  * wmi_convert_pdev_id_target_to_host() - Convert pdev_id from target to host
4551  * defines. For legacy there is not conversion required. Just return pdev_id as
4552  * it is.
4553  * @wmi_handle: wmi handle
4554  * @target_pdev_id: target pdev_id to be converted.
4555  * @host_pdev_id: Output host pdev id.
4556  *
4557  * Return: QDF_STATUS
4558  */
4559 QDF_STATUS wmi_convert_pdev_id_target_to_host(wmi_unified_t wmi_handle,
4560 					      uint32_t target_pdev_id,
4561 					      uint32_t *host_pdev_id);
4562 
4563 #ifdef WLAN_RTT_MEASUREMENT_NOTIFICATION
4564 /**
4565  * wmi_unified_extract_measreq_chan_info() - Extract the channel info from the
4566  * LOWI measurement request buffer.
4567  * @wmi_handle: wmi handle
4568  * @data_len: the length of @data
4569  * @data: the pointer to data buf
4570  * @chinfo: Pointer to a structure to save channel info
4571  */
4572 QDF_STATUS wmi_unified_extract_measreq_chan_info(
4573 		wmi_unified_t wmi_handle, uint32_t data_len, uint8_t *data,
4574 		struct rtt_channel_info *chinfo);
4575 #endif /* WLAN_RTT_MEASUREMENT_NOTIFICATION */
4576 #endif /* CNSS_GENL */
4577 
4578 /**
4579  * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss
4580  *  color change enable to FW.
4581  * @wmi_handle: wmi handle
4582  * @vdev_id: vdev ID
4583  * @enable: enable or disable color change handling within firmware
4584  *
4585  * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw,
4586  * thereby firmware updates bss color when AP announces bss color change.
4587  *
4588  * Return: QDF_STATUS
4589  */
4590 QDF_STATUS
4591 wmi_unified_send_bss_color_change_enable_cmd(wmi_unified_t wmi_handle,
4592 					     uint32_t vdev_id,
4593 					     bool enable);
4594 
4595 /**
4596  * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss
4597  *  color collision detection configuration to FW.
4598  * @wmi_handle: wmi handle
4599  * @cfg: obss color collision detection configuration
4600  *
4601  * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw.
4602  *
4603  * Return: QDF_STATUS
4604  */
4605 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(
4606 		wmi_unified_t wmi_handle,
4607 		struct wmi_obss_color_collision_cfg_param *cfg);
4608 
4609 /**
4610  * wmi_unified_extract_obss_color_collision_info() - WMI function to extract
4611  *  obss color collision info from FW.
4612  * @wmi_handle: wmi handle
4613  * @data: event data from firmware
4614  * @info: Pointer to hold bss color collision info
4615  *
4616  * This function is used to extract bss collision info from firmware.
4617  *
4618  * Return: QDF_STATUS
4619  */
4620 QDF_STATUS wmi_unified_extract_obss_color_collision_info(
4621 		wmi_unified_t wmi_handle,
4622 		uint8_t *data, struct wmi_obss_color_collision_info *info);
4623 
4624 #ifdef CRYPTO_SET_KEY_CONVERGED
4625 /**
4626  * wlan_crypto_cipher_to_wmi_cipher() - Convert crypto cipher to WMI cipher
4627  * @crypto_cipher: cipher type in crypto format
4628  *
4629  * Return: cipher type in WMI cipher type
4630  */
4631 uint8_t wlan_crypto_cipher_to_wmi_cipher(
4632 		enum wlan_crypto_cipher_type crypto_cipher);
4633 
4634 /**
4635  * wlan_crypto_cipher_to_cdp_sec_type() - Convert crypto cipher to CDP type
4636  * @crypto_cipher: cipher type in crypto format
4637  *
4638  * Return: security type in cdp_sec_type data format type
4639  */
4640 enum cdp_sec_type wlan_crypto_cipher_to_cdp_sec_type(
4641 		enum wlan_crypto_cipher_type crypto_cipher);
4642 
4643 #endif
4644 
4645 /**
4646  * wmi_unified_send_mws_coex_req_cmd() - WMI function to send coex req cmd
4647  * @wmi_handle: wmi handle
4648  * @vdev_id: Vdev Id
4649  * @cmd_id: Coex cmd for which info is required
4650  *
4651  * Send wmi coex command to fw.
4652  *
4653  * Return: QDF_STATUS
4654  */
4655 QDF_STATUS wmi_unified_send_mws_coex_req_cmd(struct wmi_unified *wmi_handle,
4656 					     uint32_t vdev_id, uint32_t cmd_id);
4657 
4658 /**
4659  * wmi_unified_send_idle_trigger_monitor() - send idle trigger monitor command
4660  * @wmi_handle: WMI handle
4661  * @val: idle trigger monitor value - 1 for idle monitor on, 0 for idle monitor
4662  * off
4663  *
4664  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
4665  */
4666 QDF_STATUS
4667 wmi_unified_send_idle_trigger_monitor(wmi_unified_t wmi_handle, uint8_t val);
4668 
4669 
4670 #ifdef WIFI_POS_CONVERGED
4671 /**
4672  * wmi_extract_oem_response_param() - WMI function to extract OEM response param
4673  * @wmi_hdl: WMI handle
4674  * @resp_buf: Buffer holding response data
4675  * @oem_resp_param: zero-filled structure pointer to hold oem response data
4676  *
4677  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
4678  */
4679 QDF_STATUS
4680 wmi_extract_oem_response_param(wmi_unified_t wmi_hdl, void *resp_buf,
4681 			       struct wmi_oem_response_param *oem_resp_param);
4682 #endif /* WIFI_POS_CONVERGED */
4683 
4684 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
4685 /**
4686  * wmi_extract_pasn_peer_create_req() - Extract peer create request event
4687  * @wmi: WMI handle
4688  * @evt_buf: Event buffer
4689  * @dst: Destination buffer
4690  *
4691  * Return: QDF_STATUS
4692  */
4693 QDF_STATUS
4694 wmi_extract_pasn_peer_create_req(wmi_unified_t wmi, void *evt_buf,
4695 				 struct wifi_pos_pasn_peer_data *dst);
4696 
4697 /**
4698  * wmi_extract_pasn_peer_delete_req() - Extract PASN peer delete request
4699  * @wmi: WMI handle
4700  * @evt_buf: Event buffer
4701  * @dst: Destination buffer pointer
4702  *
4703  * Return: QDF_STATUS
4704  */
4705 QDF_STATUS
4706 wmi_extract_pasn_peer_delete_req(wmi_unified_t wmi, void *evt_buf,
4707 				 struct wifi_pos_pasn_peer_data *dst);
4708 
4709 /**
4710  * wmi_send_rtt_pasn_auth_status_cmd  - Send PASN authentication status of all
4711  * the PASN peers.
4712  * @wmi: WMI handle
4713  * @data: Auth status data
4714  *
4715  * Return: QDF_STATUS
4716  */
4717 QDF_STATUS
4718 wmi_send_rtt_pasn_auth_status_cmd(wmi_unified_t wmi,
4719 				  struct wlan_pasn_auth_status *data);
4720 
4721 /**
4722  * wmi_send_rtt_pasn_deauth_cmd  - Send RTT pasn deauthentication command
4723  * @wmi: WMI handle
4724  * @peer_mac: peer mac address
4725  *
4726  * Return: QDF_STATUS
4727  */
4728 QDF_STATUS
4729 wmi_send_rtt_pasn_deauth_cmd(wmi_unified_t wmi, struct qdf_mac_addr *peer_mac);
4730 #endif
4731 
4732 /**
4733  * wmi_critical_events_in_flight() - get the number of critical events in flight
4734  *
4735  * @wmi: WMI handle
4736  *
4737  * Return: the number of critical events in flight.
4738  */
4739 uint32_t wmi_critical_events_in_flight(struct wmi_unified *wmi);
4740 
4741 
4742 #ifdef FEATURE_ANI_LEVEL_REQUEST
4743 /**
4744  * wmi_unified_ani_level_cmd_send() - WMI function to send get ani level cmd
4745  * @wmi_handle: WMI handle
4746  * @freqs: pointer to list of freqs for which ANI levels are to be fetched
4747  * @num_freqs: number of freqs in the above parameter
4748  *
4749  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
4750  */
4751 QDF_STATUS wmi_unified_ani_level_cmd_send(wmi_unified_t wmi_handle,
4752 					  uint32_t *freqs,
4753 					  uint8_t num_freqs);
4754 
4755 /**
4756  * wmi_unified_extract_ani_level() - WMI function to receive ani level cmd
4757  * @wmi_handle: WMI handle
4758  * @data: event data
4759  * @info: pointer to ANI data received from the FW and stored in HOST
4760  * @num_freqs: number of freqs in the above parameter
4761  *
4762  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
4763  */
4764 QDF_STATUS wmi_unified_extract_ani_level(wmi_unified_t wmi_handle,
4765 					 uint8_t *data,
4766 					 struct wmi_host_ani_level_event **info,
4767 					 uint32_t *num_freqs);
4768 #endif /* FEATURE_ANI_LEVEL_REQUEST */
4769 
4770 #ifdef WLAN_FEATURE_PKT_CAPTURE
4771 /**
4772  * wmi_unified_extract_vdev_mgmt_offload_event() - Extract mgmt offload params
4773  * @wmi: WMI handle
4774  * @evt_buf: Event buffer
4775  * @params: Management offload event params
4776  *
4777  * WMI function to extract management offload event params
4778  *
4779  * Return: QDF_STATUS
4780  */
4781 QDF_STATUS
4782 wmi_unified_extract_vdev_mgmt_offload_event(wmi_unified_t wmi, void *evt_buf,
4783 				struct mgmt_offload_event_params *params);
4784 #endif
4785 
4786 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
4787 /**
4788  * wmi_unified_extract_smart_monitor_event() - Extract smu event params
4789  * @wmi: WMI handle
4790  * @evt_buf: Event buffer
4791  * @params: Smart monitor event params
4792  *
4793  * Return: QDF_STATUS
4794  */
4795 QDF_STATUS
4796 wmi_unified_extract_smart_monitor_event(wmi_unified_t wmi, void *evt_buf,
4797 					struct smu_event_params *params);
4798 #endif
4799 
4800 #ifdef FEATURE_WLAN_TIME_SYNC_FTM
4801 /**
4802  * wmi_unified_send_wlan_time_sync_ftm_trigger() - send ftm timesync trigger cmd
4803  * @wmi_handle: wmi handle
4804  * @vdev_id: vdev id
4805  * @burst_mode: mode reg getting time sync relation from FW
4806  *
4807  * This function indicates the FW to trigger wlan time sync using FTM
4808  *
4809  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4810  */
4811 QDF_STATUS
4812 wmi_unified_send_wlan_time_sync_ftm_trigger(wmi_unified_t wmi_handle,
4813 					    uint32_t vdev_id,
4814 					    bool burst_mode);
4815 
4816 /**
4817  * wmi_unified_send_wlan_time_sync_qtime() - send ftm time sync qtime cmd.
4818  * @wmi_handle: wmi handle
4819  * @vdev_id: vdev id
4820  * @lpass_ts: audio qtime
4821  *
4822  * This function sends the wmi cmd to FW having audio qtime
4823  *
4824  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4825  */
4826 QDF_STATUS
4827 wmi_unified_send_wlan_time_sync_qtime(wmi_unified_t wmi_handle,
4828 				      uint32_t vdev_id, uint64_t lpass_ts);
4829 
4830 /**
4831  * wmi_unified_extract_time_sync_ftm_start_stop_params() - extract FTM time sync
4832  *							   params
4833  * @wmi_handle: wmi handle
4834  * @evt_buf: event buffer
4835  * @param: params received in start stop ftm timesync event
4836  *
4837  * This function extracts the params from ftm timesync start stop event
4838  *
4839  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4840  */
4841 QDF_STATUS
4842 wmi_unified_extract_time_sync_ftm_start_stop_params(
4843 				wmi_unified_t wmi_handle, void *evt_buf,
4844 				struct ftm_time_sync_start_stop_params *param);
4845 
4846 /**
4847  * wmi_unified_extract_time_sync_ftm_offset() - extract timesync FTM offset
4848  * @wmi_handle: wmi handle
4849  * @evt_buf: event buffer
4850  * @param: params received in ftm timesync offset event
4851  *
4852  * This function extracts the params from ftm timesync offset event
4853  *
4854  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4855  */
4856 QDF_STATUS
4857 wmi_unified_extract_time_sync_ftm_offset(wmi_unified_t wmi_handle,
4858 					 void *evt_buf,
4859 					 struct ftm_time_sync_offset *param);
4860 #endif /* FEATURE_WLAN_TIME_SYNC_FTM */
4861 
4862 /**
4863  * wmi_unified_send_injector_frame_config_cmd() - configure injector frame
4864  * @wmi_handle: wmi handle
4865  * @param: params received in the injector frame configure command
4866  *
4867  * This function configures the AP to send out injector frames
4868  *
4869  * Return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4870  */
4871 QDF_STATUS
4872 wmi_unified_send_injector_frame_config_cmd(wmi_unified_t wmi_handle,
4873 				struct wmi_host_injector_frame_params *param);
4874 
4875 /**
4876  * wmi_unified_send_cp_stats_cmd() - Send cp stats command
4877  * @wmi_handle: wmi handle
4878  * @buf_ptr: buf_ptr received from wifistats
4879  * @buf_len: length of buffer received from wifistats
4880  *
4881  * This function sends cp stats cmd to get cp stats.
4882  *
4883  * Return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4884  */
4885 QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
4886 					 void *buf_ptr, uint32_t buf_len);
4887 
4888 
4889 /**
4890  * wmi_unified_send_halphy_stats_cmd() - Send halphy stats command
4891  * @wmi_handle: wmi handle
4892  * @buf_ptr: buf_ptr received from wifistats
4893  * @buf_len: length of buffer received from wifistats
4894  *
4895  * This function sends halphy stats cmd to get halphy stats.
4896  *
4897  * Return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4898  */
4899 QDF_STATUS wmi_unified_send_halphy_stats_cmd(wmi_unified_t wmi_handle,
4900 					     void *buf_ptr, uint32_t buf_len);
4901 
4902 /**
4903  * wmi_unified_extract_cp_stats_more_pending() - extract more flag
4904  * @wmi_handle: wmi handle
4905  * @evt_buf: event buffer
4906  * @more_flag: more flag
4907  *
4908  * This function extracts the more_flag from fixed param
4909  *
4910  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4911  */
4912 QDF_STATUS
4913 wmi_unified_extract_cp_stats_more_pending(wmi_unified_t wmi_handle,
4914 					  void *evt_buf, uint32_t *more_flag);
4915 
4916 /**
4917  * wmi_unified_extract_halphy_stats_end_of_event() - extract end_of_event flag
4918  * @wmi_handle: wmi handle
4919  * @evt_buf: event buffer
4920  * @end_of_event_flag: end_of_event flag
4921  *
4922  * This function extracts the end_of_event_flag from fixed param
4923  *
4924  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4925  */
4926 QDF_STATUS
4927 wmi_unified_extract_halphy_stats_end_of_event(wmi_unified_t wmi_handle,
4928 					      void *evt_buf,
4929 					      uint32_t *end_of_event_flag);
4930 
4931 /**
4932  * wmi_unified_extract_halphy_stats_event_count() - extract event_count flag
4933  * @wmi_handle: wmi handle
4934  * @evt_buf: event buffer
4935  * @event_count_flag: event count flag
4936  *
4937  * This function extracts the event_count_flag from fixed param
4938  *
4939  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4940  */
4941 QDF_STATUS
4942 wmi_unified_extract_halphy_stats_event_count(wmi_unified_t wmi_handle,
4943 					     void *evt_buf,
4944 					     uint32_t *event_count_flag);
4945 
4946 /**
4947  * wmi_unified_send_vdev_tsf_tstamp_action_cmd() - send vdev tsf action command
4948  * @wmi_hdl: wmi handle
4949  * @vdev_id: vdev id
4950  *
4951  * TSF_TSTAMP_READ_VALUE is the only operation supported
4952  * Return: QDF_STATUS_SUCCESS for success or error code
4953  */
4954 QDF_STATUS wmi_unified_send_vdev_tsf_tstamp_action_cmd(wmi_unified_t wmi_hdl,
4955 						       uint8_t vdev_id);
4956 
4957 /**
4958  * wmi_extract_vdev_tsf_report_event() - extract vdev tsf report from event
4959  * @wmi_hdl: wmi handle
4960  * @evt_buf: pointer to event buffer
4961  * @param: Pointer to hold event info
4962  *
4963  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4964  */
4965 QDF_STATUS wmi_extract_vdev_tsf_report_event(wmi_unified_t wmi_hdl,
4966 					     uint8_t *evt_buf,
4967 					     struct wmi_host_tsf_event *param);
4968 
4969 /**
4970  * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
4971  * from event
4972  * @wmi_handle: wmi handle
4973  * @evt_buf: pointer to event buffer
4974  * @param: Pointer to CSA switch count status param
4975  *
4976  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4977  */
4978 QDF_STATUS wmi_extract_pdev_csa_switch_count_status(
4979 		wmi_unified_t wmi_handle,
4980 		void *evt_buf,
4981 		struct pdev_csa_switch_count_status *param);
4982 
4983 /**
4984  * wmi_validate_handle() - Validate WMI handle
4985  * @wmi_handle: wmi handle
4986  *
4987  * This function will log on error and hence caller should not log on error
4988  *
4989  * Return: errno if WMI handle is NULL; 0 otherwise
4990  */
4991 #define wmi_validate_handle(wmi_handle) \
4992         __wmi_validate_handle(wmi_handle, __func__)
4993 int __wmi_validate_handle(wmi_unified_t wmi_handle, const char *func);
4994 
4995 #ifdef CONFIG_AFC_SUPPORT
4996 /**
4997  * wmi_unified_send_afc_cmd() - send afc indication info
4998  * @wmi_handle: wmi handle
4999  * @pdev_id: pdev id
5000  * @param: regulatory AFC indication info
5001  *
5002  * Return: QDF_STATUS_SUCCESS for success or error code
5003  */
5004 QDF_STATUS
5005 wmi_unified_send_afc_cmd(wmi_unified_t wmi_handle,
5006 			 uint8_t pdev_id,
5007 			 struct reg_afc_resp_rx_ind_info *param);
5008 #endif
5009 
5010 /**
5011  * wmi_unified_send_set_tpc_power_cmd() - send set transmit power info
5012  * @wmi_handle: wmi handle
5013  * @vdev_id: vdev id
5014  * @param: regulatory TPC info
5015  *
5016  * Return: QDF_STATUS_SUCCESS for success or error code
5017  */
5018 QDF_STATUS wmi_unified_send_set_tpc_power_cmd(wmi_unified_t wmi_handle,
5019 					      uint8_t vdev_id,
5020 					      struct reg_tpc_power_info *param);
5021 
5022 /**
5023  * wmi_extract_dpd_status_ev_param() - extract dpd status from FW event
5024  * @wmi_handle: wmi handle
5025  * @evt_buf: pointer to event buf
5026  * @param: dpd status info
5027  *
5028  * Return: QDF_STATUS_SUCCESS for success or error code
5029  */
5030 QDF_STATUS wmi_extract_dpd_status_ev_param(wmi_unified_t wmi_handle,
5031 					   void *evt_buf,
5032 					   struct wmi_host_pdev_get_dpd_status_event *param);
5033 
5034 /**
5035  * wmi_extract_halphy_cal_status_ev_param() - extract halphy cal status from FW event
5036  * @wmi_handle: wmi handle
5037  * @evt_buf: pointer to event buf
5038  * @param: halphy cal status info
5039  *
5040  * Return: QDF_STATUS_SUCCESS for success or error code
5041  */
5042 QDF_STATUS
5043 wmi_extract_halphy_cal_status_ev_param(wmi_unified_t wmi_handle,
5044 				       void *evt_buf,
5045 				       struct wmi_host_pdev_get_halphy_cal_status_event *param);
5046 
5047 /**
5048  * wmi_unified_send_set_halphy_cal() - send set halphy cal bmap
5049  * @wmi_handle: wmi handle
5050  * @param: set halphy cal input info
5051  *
5052  * Return: QDF_STATUS_SUCCESS for success or error code
5053  */
5054 QDF_STATUS wmi_unified_send_set_halphy_cal(wmi_unified_t wmi_handle,
5055 					   struct wmi_host_send_set_halphy_cal_info *param);
5056 
5057 /**
5058  * wmi_extract_halphy_cal_ev_param() - extract halphy cal status from FW event
5059  * @wmi_handle: wmi handle
5060  * @evt_buf: pointer to event buf
5061  * @param: halphy cal status info
5062  *
5063  * Return: QDF_STATUS_SUCCESS for success or error code
5064  */
5065 QDF_STATUS
5066 wmi_extract_halphy_cal_ev_param(wmi_unified_t wmi_handle,
5067 				void *evt_buf,
5068 				struct wmi_host_pdev_set_halphy_cal_event *param);
5069 
5070 #ifdef FEATURE_MEC_OFFLOAD
5071 /**
5072  * wmi_unified_pdev_set_mec_timer() - set mec timer value
5073  * @wmi_handle: wmi handle
5074  * @param: params needed for mec timer config
5075  *
5076  * Return: QDF_STATUS_SUCCESS for success or error code
5077  */
5078 QDF_STATUS
5079 wmi_unified_pdev_set_mec_timer(struct wmi_unified *wmi_handle,
5080 			       struct set_mec_timer_params *param);
5081 #endif
5082 
5083 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
5084 /**
5085  * wmi_unified_send_set_mac_addr() - Send VDEV set MAC address command to FW
5086  * @wmi_handle: WMI handle
5087  * @params: Set MAC address command params
5088  *
5089  * Return: QDF_STATUS_SUCCESS for success or error code
5090  */
5091 QDF_STATUS wmi_unified_send_set_mac_addr(struct wmi_unified *wmi_handle,
5092 					 struct set_mac_addr_params *params);
5093 
5094 /**
5095  * wmi_extract_update_mac_address_event() - Extract update MAC address event
5096  * @wmi_handle: WMI handle
5097  * @evt_buf: event buffer
5098  * @vdev_id: VDEV ID
5099  * @status: FW status for the set MAC address operation
5100  *
5101  * Return: QDF_STATUS_SUCCESS for success or error code
5102  */
5103 QDF_STATUS wmi_extract_update_mac_address_event(wmi_unified_t wmi_handle,
5104 						void *evt_buf, uint8_t *vdev_id,
5105 						uint8_t *status);
5106 #endif
5107 
5108 #ifdef WLAN_FEATURE_11BE_MLO
5109 /**
5110  * wmi_extract_quiet_offload_event() - Extra mlo sta quiet IE offload event
5111  * @wmi_handle: WMI handle
5112  * @evt_buf: event buffer
5113  * @quiet_event: pointer to struct vdev_sta_quiet_event
5114  *
5115  * Return: QDF_STATUS_SUCCESS for success or error code
5116  */
5117 QDF_STATUS wmi_extract_quiet_offload_event(
5118 				struct wmi_unified *wmi_handle, void *evt_buf,
5119 				struct vdev_sta_quiet_event *quiet_event);
5120 #endif
5121 
5122 #ifdef WLAN_SUPPORT_PPEDS
5123 /**
5124  * wmi_unified_peer_ppe_ds_param_send - Set the PPEDS configs
5125  * @wmi_handle: WMI handle
5126  * @param: Peer PPE DS param
5127  *
5128  * Return: QDF_STATUS_SUCCESS for success or error code.
5129  */
5130 QDF_STATUS
5131 wmi_unified_peer_ppe_ds_param_send(wmi_unified_t wmi_handle,
5132 				   struct peer_ppe_ds_param *param);
5133 #endif /* WLAN_SUPPORT_PPEDS */
5134 
5135 /**
5136  * wmi_extract_pktlog_decode_info_event() - Extract pktlog decode info
5137  * @wmi_handle: WMI handle
5138  * @evt_buf: event buffer
5139  * @pdev_id: pdev_id
5140  * @software_image: software image version
5141  * @chip_info: chip info
5142  * @pktlog_json_version: pktlog json version
5143  *
5144  * Return: QDF_STATUS_SUCCESS for success or error code
5145  */
5146 QDF_STATUS
5147 wmi_extract_pktlog_decode_info_event(wmi_unified_t wmi_handle,
5148 				     void *evt_buf,
5149 				     uint8_t *pdev_id,
5150 				     uint8_t *software_image,
5151 				     uint8_t *chip_info,
5152 				     uint32_t *pktlog_json_version);
5153 
5154 /**
5155  * wmi_unified_pn_mgmt_rxfilter_send_cmd() - Send PN mgmt RxFilter command to FW
5156  * @wmi_handle: WMI handle
5157  * @params: RxFilter params
5158  *
5159  * Return: QDF_STATUS_SUCCESS for success or error code
5160  */
5161 QDF_STATUS wmi_unified_pn_mgmt_rxfilter_send_cmd(
5162 		struct wmi_unified *wmi_handle,
5163 		struct vdev_pn_mgmt_rxfilter_params *params);
5164 
5165 /**
5166  * wmi_extract_pdev_telemetry_stats - extract pdev telemetry stats
5167  * @wmi_handle: wmi handle
5168  * @evt_buf: pointer to event buffer
5169  * @pdev_stats: Pointer to hold pdev telemetry stats
5170  *
5171  * Return: QDF_STATUS_SUCCESS for success or error code
5172  */
5173 QDF_STATUS wmi_extract_pdev_telemetry_stats(
5174 		wmi_unified_t wmi_handle, void *evt_buf,
5175 		struct wmi_host_pdev_telemetry_stats *pdev_stats);
5176 
5177 #ifdef FEATURE_SET
5178 /**
5179  * wmi_feature_set_cmd_send - Send feature set command to fw
5180  * @wmi_handle: wmi handle
5181  * @feature_set: pointer feature set info which needs to be send to fw
5182  *
5183  * Return: QDF_STATUS_SUCCESS for success or error code
5184  */
5185 QDF_STATUS wmi_feature_set_cmd_send(
5186 			wmi_unified_t wmi_handle,
5187 			struct target_feature_set *feature_set);
5188 #endif
5189 
5190 #ifdef HEALTH_MON_SUPPORT
5191 /**
5192  * wmi_extract_health_mon_event - extract health monitor params
5193  * @wmi_handle: wmi handle
5194  * @ev: pointer to event buffer
5195  * @param: health monitor params
5196  *
5197  * Return: QDF_STATUS_SUCCESS for success or error code
5198  */
5199 
5200 QDF_STATUS wmi_extract_health_mon_event(
5201 		wmi_unified_t wmi_handle,
5202 		void *ev,
5203 		struct wmi_health_mon_params *param);
5204 #endif /* HEALTH_MON_SUPPORT */
5205 
5206 /**
5207  * wmi_unified_update_edca_pifs_param() - update EDCA/PIFS params
5208  * @wmi_handle: wmi handle
5209  * @edca_pifs_param: pointer to edca_pifs_vparam struct
5210  *
5211  * This function updates EDCA/PIFS parameters to the target
5212  *
5213  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5214  */
5215 QDF_STATUS
5216 wmi_unified_update_edca_pifs_param(
5217 			wmi_unified_t wmi_handle,
5218 			struct edca_pifs_vparam *edca_pifs_param);
5219 
5220 /**
5221  * wmi_extract_sap_coex_cap_service_ready_ext2() - extract sap coex capability
5222  * @wmi_handle: wmi handle
5223  * @evt_buf: pointer to event buffer
5224  * @cap: It's set to 1 if fixed chan SAP is supported by firmware even when the
5225  *       channel is unsafe due to coex.
5226  *
5227  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5228  */
5229 QDF_STATUS wmi_extract_sap_coex_cap_service_ready_ext2(
5230 			wmi_unified_t wmi_handle,
5231 			uint8_t *evt_buf,
5232 			struct wmi_host_coex_fix_chan_cap *cap);
5233 
5234 /**
5235  * wmi_extract_aux_dev_cap_service_ready_ext2() - extract aux dev capability
5236  * @wmi_handle: wmi handle
5237  * @evt_buf: pointer to event buffer
5238  * @idx: capability index
5239  * @param: psoc aux dev capability struct
5240  *
5241  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5242  */
5243 QDF_STATUS wmi_extract_aux_dev_cap_service_ready_ext2(
5244 		wmi_unified_t wmi_handle,
5245 		uint8_t *evt_buf, uint8_t idx,
5246 		struct wlan_psoc_host_aux_dev_caps *param);
5247 
5248 /**
5249  * wmi_extract_csa_ie_received_event() - extract csa IE received event
5250  * @wmi_handle: wmi handle
5251  * @evt_buf: pointer to event buffer
5252  * @vdev_id: VDEV ID
5253  * @csa_event: csa event data
5254  *
5255  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5256  */
5257 QDF_STATUS
5258 wmi_extract_csa_ie_received_event(wmi_unified_t wmi_handle,
5259 				  void *evt_buf, uint8_t *vdev_id,
5260 				  struct csa_offload_params *csa_event);
5261 #endif /* _WMI_UNIFIED_API_H_ */
5262