xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_api.h (revision 1f55ed1a9f5050d8da228aa8dd3fff7c0242aa71)
1 /*
2  * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /*
20  * This file contains the API definitions for the Unified Wireless Module
21  * Interface (WMI).
22  */
23 
24 #ifndef _WMI_UNIFIED_API_H_
25 #define _WMI_UNIFIED_API_H_
26 
27 #include <osdep.h>
28 #ifdef CONFIG_MCL
29 #include "wmi.h"
30 #endif
31 #include "htc_api.h"
32 #include "wmi_unified_param.h"
33 #include "service_ready_param.h"
34 #include "wlan_objmgr_psoc_obj.h"
35 #include "wlan_mgmt_txrx_utils_api.h"
36 #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD
37 #include "wmi_unified_pmo_api.h"
38 #endif
39 #include "wlan_scan_public_structs.h"
40 #ifdef WLAN_FEATURE_DISA
41 #include "wlan_disa_public_struct.h"
42 #endif
43 #ifdef WLAN_FEATURE_ACTION_OUI
44 #include "wlan_action_oui_public_struct.h"
45 #endif
46 #ifdef WLAN_SUPPORT_GREEN_AP
47 #include "wlan_green_ap_api.h"
48 #endif
49 #ifdef WLAN_FEATURE_DSRC
50 #include "wlan_ocb_public_structs.h"
51 #endif
52 #ifdef WLAN_SUPPORT_TWT
53 #include "wmi_unified_twt_param.h"
54 #include "wmi_unified_twt_api.h"
55 #endif
56 
57 #ifdef FEATURE_WLAN_EXTSCAN
58 #include "wmi_unified_extscan_api.h"
59 #endif
60 
61 #ifdef IPA_OFFLOAD
62 #include "wlan_ipa_public_struct.h"
63 #endif
64 
65 #ifdef WMI_SMART_ANT_SUPPORT
66 #include "wmi_unified_smart_ant_api.h"
67 #endif
68 
69 #ifdef WMI_DBR_SUPPORT
70 #include "wmi_unified_dbr_api.h"
71 #endif
72 
73 #ifdef WMI_ATF_SUPPORT
74 #include "wmi_unified_atf_api.h"
75 #endif
76 
77 #ifdef WMI_AP_SUPPORT
78 #include "wmi_unified_ap_api.h"
79 #endif
80 
81 #ifdef WLAN_FEATURE_DSRC
82 #include "wmi_unified_ocb_api.h"
83 #endif
84 
85 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
86 #include "wmi_unified_nan_api.h"
87 #endif
88 
89 #ifdef CONVERGED_P2P_ENABLE
90 #include <wmi_unified_p2p_api.h>
91 #endif
92 
93 #ifdef WMI_ROAM_SUPPORT
94 #include "wmi_unified_roam_api.h"
95 #endif
96 
97 #ifdef WMI_CONCURRENCY_SUPPORT
98 #include "wmi_unified_concurrency_api.h"
99 #endif
100 
101 #ifdef WMI_STA_SUPPORT
102 #include "wmi_unified_sta_api.h"
103 #endif
104 
105 typedef qdf_nbuf_t wmi_buf_t;
106 #define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
107 
108 #define WMI_LOGD(args ...) \
109 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args)
110 #define WMI_LOGI(args ...) \
111 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args)
112 #define WMI_LOGW(args ...) \
113 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args)
114 #define WMI_LOGE(args ...) \
115 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args)
116 #define WMI_LOGP(args ...) \
117 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args)
118 
119 
120 
121 #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000
122 
123 struct wmi_soc;
124 struct policy_mgr_dual_mac_config;
125 /**
126  * struct wmi_ops - service callbacks to upper layer
127  * @service_ready_cbk: service ready callback
128  * @service_ready_ext_cbk: service ready ext callback
129  * @ready_cbk: ready calback
130  * @wma_process_fw_event_handler_cbk: generic event handler callback
131  */
132 struct wmi_rx_ops {
133 
134 	int (*wma_process_fw_event_handler_cbk)(void *ctx,
135 				  void *ev, uint8_t rx_ctx);
136 };
137 
138 /**
139  * enum wmi_target_type - type of supported wmi command
140  * @WMI_TLV_TARGET: tlv based target
141  * @WMI_NON_TLV_TARGET: non-tlv based target
142  *
143  */
144 enum wmi_target_type {
145 	WMI_TLV_TARGET,
146 	WMI_NON_TLV_TARGET,
147 	WMI_MAX_TARGET_TYPE
148 };
149 
150 /**
151  * enum wmi_rx_exec_ctx - wmi rx execution context
152  * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
153  * @WMI_RX_UMAC_CTX: execution context provided by umac layer
154  *
155  */
156 enum wmi_rx_exec_ctx {
157 	WMI_RX_WORK_CTX,
158 	WMI_RX_UMAC_CTX
159 };
160 
161 /**
162  * struct wmi_unified_attach_params - wmi init parameters
163  *  @param osdev            : NIC device
164  *  @param target_type      : type of supported wmi command
165  *  @param use_cookie       : flag to indicate cookie based allocation
166  *  @param ops              : handle to wmi ops
167  *  @psoc                   : objmgr psoc
168  *  @max_commands           : max commands
169  */
170 struct wmi_unified_attach_params {
171 	osdev_t osdev;
172 	enum wmi_target_type target_type;
173 	bool use_cookie;
174 	bool is_async_ep;
175 	struct wmi_rx_ops *rx_ops;
176 	struct wlan_objmgr_psoc *psoc;
177 	uint16_t max_commands;
178 	uint32_t soc_id;
179 };
180 
181 /**
182  * attach for unified WMI
183  *
184  *  @param scn_handle      : handle to SCN.
185  *  @param params          : attach params for WMI
186  *
187  */
188 void *wmi_unified_attach(void *scn_handle,
189 			 struct wmi_unified_attach_params *params);
190 
191 
192 
193 /**
194  * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
195  *
196  * @wmi_handle: wmi handle
197  * @cmd: mgmt command
198  * @header: pointer to 802.11 header
199  * @vdev_id: vdev id
200  * @chanfreq: channel frequency
201  *
202  * Return: none
203  */
204 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
205 			void *header, uint32_t vdev_id, uint32_t chanfreq);
206 
207 /**
208  * detach for unified WMI
209  *
210  *  @param wmi_handle      : handle to WMI.
211  *  @return void.
212  */
213 void wmi_unified_detach(struct wmi_unified *wmi_handle);
214 
215 /**
216  * API to sync time between host and firmware
217  *
218  *  @param wmi_handle      : handle to WMI.
219  *  @return void.
220  */
221 void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl);
222 
223 void
224 wmi_unified_remove_work(struct wmi_unified *wmi_handle);
225 
226 /**
227  * generic function to allocate WMI buffer
228  *
229  *  @param wmi_handle      : handle to WMI.
230  *  @param len             : length of the buffer
231  *  @return wmi_buf_t.
232  */
233 #ifdef NBUF_MEMORY_DEBUG
234 #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __func__, __LINE__)
235 wmi_buf_t
236 wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len,
237 		    const char *func_name, uint32_t line_num);
238 #else
239 /**
240  * wmi_buf_alloc() - generic function to allocate WMI buffer
241  * @wmi_handle: handle to WMI.
242  * @len: length of the buffer
243  *
244  * Return: return wmi_buf_t or null if memory alloc fails
245  */
246 #define wmi_buf_alloc(wmi_handle, len) \
247 	wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__)
248 
249 wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
250 			   const char *func, uint32_t line);
251 #endif
252 
253 /**
254  * generic function frees WMI net buffer
255  *
256  *  @param net_buf : Pointer ot net_buf to be freed
257  */
258 void wmi_buf_free(wmi_buf_t net_buf);
259 
260 /**
261  * wmi_unified_cmd_send() -  generic function to send unified WMI command
262  * @wmi_handle: handle to WMI.
263  * @buf: wmi command buffer
264  * @buflen: wmi command buffer length
265  * @cmd_id: WMI cmd id
266  *
267  * Note, it is NOT safe to access buf after calling this function!
268  *
269  * Return: QDF_STATUS
270  */
271 #define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \
272 	wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \
273 				cmd_id, __func__, __LINE__)
274 
275 QDF_STATUS
276 wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf,
277 			uint32_t buflen, uint32_t cmd_id,
278 			const char *func, uint32_t line);
279 
280 /**
281  * wmi_unified_register_event() - WMI event handler
282  * registration function for converged components
283  *
284  * @wmi_handle:   handle to WMI.
285  * @event_id:     WMI event ID
286  * @handler_func: Event handler call back function
287  *
288  *  @return 0  on success and -ve on failure.
289  */
290 int
291 wmi_unified_register_event(wmi_unified_t wmi_handle,
292 				   uint32_t event_id,
293 				   wmi_unified_event_handler handler_func);
294 
295 /**
296  * wmi_unified_register_event_handler() - WMI event handler
297  * registration function
298  *
299  * @wmi_handle:   handle to WMI.
300  * @event_id:     WMI event ID
301  * @handler_func: Event handler call back function
302  * @rx_ctx: rx event processing context
303  *
304  *  @return 0  on success and -ve on failure.
305  */
306 int
307 wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
308 				   wmi_conv_event_id event_id,
309 				   wmi_unified_event_handler handler_func,
310 				   uint8_t rx_ctx);
311 
312 /**
313  * WMI event handler unregister function for converged componets
314  *
315  *  @param wmi_handle      : handle to WMI.
316  *  @param event_id        : WMI event ID
317  *  @return 0  on success and -ve on failure.
318  */
319 int
320 wmi_unified_unregister_event(wmi_unified_t wmi_handle,
321 					 uint32_t event_id);
322 
323 /**
324  * WMI event handler unregister function
325  *
326  *  @param wmi_handle      : handle to WMI.
327  *  @param event_id        : WMI event ID
328  *  @return 0  on success and -ve on failure.
329  */
330 int
331 wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
332 					 wmi_conv_event_id event_id);
333 
334 /**
335  * request wmi to connet its htc service.
336  *  @param wmi_handle      : handle to WMI.
337  *  @param htc_handle      : handle to HTC.
338  *  @return void
339  */
340 QDF_STATUS
341 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
342 				void *htc_handle);
343 
344 /*
345  * WMI API to verify the host has enough credits to suspend
346  *  @param wmi_handle      : handle to WMI.
347  */
348 
349 int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
350 
351 /**
352  *  WMI API to get updated host_credits
353  *  @param wmi_handle      : handle to WMI.
354  */
355 
356 int wmi_get_host_credits(wmi_unified_t wmi_handle);
357 
358 /**
359  *  WMI API to get WMI Pending Commands in the HTC queue
360  *  @param wmi_handle      : handle to WMI.
361  */
362 
363 int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
364 
365 /**
366  *  WMI API to set target suspend state
367  *  @param wmi_handle      : handle to WMI.
368  *  @param val             : suspend state boolean
369  */
370 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
371 
372 /**
373  * WMI API to set bus suspend state
374  * @param wmi_handle:	handle to WMI.
375  * @param val:		suspend state boolean
376  */
377 void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
378 
379 /**
380  * WMI API to set crash injection state
381  * @param wmi_handle:	handle to WMI.
382  * @param val:		crash injection state boolean
383  */
384 void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
385 
386 /**
387  * WMI API to set target assert
388  * @param wmi_handle: 	handle to WMI.
389  * @param val:		target assert config value.
390  *
391  * Return: 		none.
392  */
393 void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
394 
395 /**
396  * generic function to block unified WMI command
397  * @param wmi_handle      : handle to WMI.
398  * @return 0  on success and -ve on failure.
399  */
400 int
401 wmi_stop(wmi_unified_t wmi_handle);
402 
403 /**
404  * API to flush all the previous packets  associated with the wmi endpoint
405  *
406  * @param wmi_handle      : handle to WMI.
407  */
408 void
409 wmi_flush_endpoint(wmi_unified_t wmi_handle);
410 
411 /**
412  * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
413  *                     By default pdev_id conversion is not done in WMI.
414  *                     This API can be used enable conversion in WMI.
415  * @param wmi_handle   : handle to WMI
416  * Return none
417  */
418 void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle);
419 
420 /**
421  * API to handle wmi rx event after UMAC has taken care of execution
422  * context
423  *
424  * @param wmi_handle      : handle to WMI.
425  * @param evt_buf         : wmi event buffer
426  */
427 void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
428 #ifdef FEATURE_RUNTIME_PM
429 void
430 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
431 bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
432 #else
433 static inline void
434 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
435 {
436 	return;
437 }
438 static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
439 {
440 	return false;
441 }
442 #endif
443 
444 void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
445 
446 void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
447 
448 /**
449  * UMAC Callback to process fw event.
450  * @param wmi_handle      : handle to WMI.
451  * @param evt_buf         : wmi event buffer
452  */
453 void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
454 uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
455 
456 
457 QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
458 				 uint8_t macaddr[IEEE80211_ADDR_LEN],
459 				 struct vdev_create_params *param);
460 
461 QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
462 					  uint8_t if_id);
463 
464 /**
465  * wmi_unified_vdev_nss_chain_params_send() - send VDEV nss chain params to fw
466  * @wmi_handle: wmi handle
467  * @vdev_id: vdev id
468  * @nss_chains_user_cfg: user configured params to send
469  *
470  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
471  */
472 QDF_STATUS wmi_unified_vdev_nss_chain_params_send(void *wmi_hdl,
473 			uint8_t vdev_id,
474 			struct vdev_nss_chains *nss_chains_user_cfg);
475 
476 QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
477 					uint8_t vdev_id);
478 
479 QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
480 			     uint8_t bssid[IEEE80211_ADDR_LEN],
481 				 struct vdev_up_params *params);
482 
483 QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl,
484 				uint8_t vdev_id);
485 
486 QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
487 				struct vdev_start_params *req);
488 /**
489  * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
490  * @param wmi_handle   : handle to WMI
491  * @param req          : pointer to hold nac rssi request data
492  *
493  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
494  */
495 QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
496 			struct vdev_scan_nac_rssi_params *req);
497 
498 QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
499 		struct hidden_ssid_vdev_restart_params *restart_params);
500 
501 QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
502 				struct vdev_set_params *param);
503 
504 QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl,
505 					 struct sifs_trigger_param *param);
506 
507 QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
508 				    uint8_t
509 				    peer_addr[IEEE80211_ADDR_LEN],
510 				    uint8_t vdev_id);
511 
512 QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
513 					 uint8_t peer_addr[IEEE80211_ADDR_LEN],
514 					 struct peer_flush_params *param);
515 
516 QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
517 				uint8_t peer_addr[IEEE80211_ADDR_LEN],
518 				struct peer_set_params *param);
519 
520 QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
521 					struct peer_create_params *param);
522 
523 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
524 				uint8_t macaddr[IEEE80211_ADDR_LEN],
525 				struct stats_request_params *param);
526 
527 QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
528 					uint32_t value, uint8_t pdev_id);
529 
530 QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
531 				struct wow_cmd_params *param,
532 				uint8_t mac_id);
533 
534 QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl);
535 
536 QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
537 		struct wow_add_wakeup_params *param);
538 
539 QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
540 		struct wow_add_wakeup_pattern_params *param);
541 
542 QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
543 		struct wow_remove_wakeup_pattern_params *param);
544 
545 #ifndef CONFIG_MCL
546 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
547 			WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id);
548 
549 /**
550  *  wmi_unified_peer_based_pktlog_send() - WMI request enable peer
551  *  based filtering
552  *  @wmi_handle: handle to WMI.
553  *  @macaddr: PEER mac address to be filtered
554  *  @mac_id: Mac id
555  *  @enb_dsb: Enable or Disable peer based pktlog
556  *            filtering
557  *
558  *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
559  */
560 QDF_STATUS wmi_unified_peer_based_pktlog_send(void *wmi_hdl,
561 					      uint8_t *macaddr,
562 					      uint8_t mac_id,
563 					      uint8_t enb_dsb);
564 #else
565 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
566 				uint8_t macaddr[IEEE80211_ADDR_LEN],
567 				struct packet_enable_params *param);
568 #endif
569 
570 QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id);
571 
572 QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
573 				struct suspend_params *param,
574 				uint8_t mac_id);
575 
576 QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
577 				uint8_t mac_id);
578 
579 QDF_STATUS
580 wmi_unified_pdev_param_send(void *wmi_hdl,
581 			   struct pdev_params *param,
582 				uint8_t mac_id);
583 
584 QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
585 				struct beacon_tmpl_params *param);
586 
587 
588 QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
589 				struct peer_assoc_params *param);
590 
591 QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
592 				struct sta_ps_params *param);
593 
594 QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
595 				uint8_t macaddr[IEEE80211_ADDR_LEN],
596 				struct ap_ps_params *param);
597 
598 QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
599 				struct scan_req_params *param);
600 
601 QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
602 				struct scan_cancel_param *param);
603 
604 QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
605 				struct scan_chan_list_params *param);
606 
607 
608 QDF_STATUS wmi_crash_inject(void *wmi_hdl,
609 				struct crash_inject *param);
610 
611 QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
612 				struct pdev_utf_params *param,
613 				uint8_t mac_id);
614 
615 #ifdef FEATURE_FW_LOG_PARSING
616 QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl,
617 				       struct dbglog_params *param);
618 #else
619 static inline QDF_STATUS
620 wmi_unified_dbglog_cmd_send(void *wmi_hdl,
621 			    struct dbglog_params *param)
622 {
623 	return QDF_STATUS_SUCCESS;
624 }
625 #endif
626 
627 QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
628 				struct wmi_mgmt_params *param);
629 
630 QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
631 				struct wmi_offchan_data_tx_params *param);
632 
633 QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
634 		uint32_t param_value);
635 
636 QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
637 			       uint32_t vdev_id, uint8_t val);
638 QDF_STATUS
639 wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
640 				struct sta_uapsd_trig_params *param);
641 
642 QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl);
643 
644 QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
645 			       int value);
646 
647 QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value);
648 
649 QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
650 	 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
651 
652 QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
653 				struct thermal_cmd_params *thermal_info);
654 
655 QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
656 		struct wmi_peer_rate_report_params *rate_report_params);
657 
658 QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
659 		     uint8_t vdev_id, bool mu_edca_param,
660 		     struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
661 
662 QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
663 		   uint8_t vdev_id,
664 		   struct wmi_probe_resp_params *probe_rsp_info);
665 
666 QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
667 			struct set_key_params *key_params);
668 
669 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
670 				    uint32_t vdev_id, uint8_t *p2p_ie);
671 
672 QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
673 			  struct scan_mac_oui *psetoui);
674 
675 #ifdef IPA_OFFLOAD
676 QDF_STATUS  wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
677 		struct ipa_uc_offload_control_params *ipa_offload);
678 #endif
679 
680 QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
681 
682 #ifdef FEATURE_WLAN_SCAN_PNO
683 QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
684 		   struct pno_scan_req_params *pno);
685 #endif
686 
687 QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
688 		struct nlo_mawc_params *params);
689 
690 QDF_STATUS wmi_unified_process_ll_stats_clear_cmd
691 	(void *wmi_hdl, const struct ll_stats_clear_params *clear_req,
692 	 uint8_t addr[IEEE80211_ADDR_LEN]);
693 
694 QDF_STATUS wmi_unified_process_ll_stats_set_cmd
695 	(void *wmi_hdl, const struct ll_stats_set_params *set_req);
696 
697 QDF_STATUS wmi_unified_process_ll_stats_get_cmd
698 	(void *wmi_hdl, const struct ll_stats_get_params  *get_req,
699 		 uint8_t addr[IEEE80211_ADDR_LEN]);
700 
701 /**
702  * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
703  * @wmi_hdl: wma handle
704  * @vdev_id: vdev id
705  *
706  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
707  */
708 QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
709 		uint8_t vdev_id);
710 
711 QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl);
712 
713 QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id);
714 
715 QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
716 				 struct link_status_params *link_status);
717 
718 #ifdef WLAN_SUPPORT_GREEN_AP
719 QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
720 		struct wlan_green_ap_egap_params *egap_params);
721 #endif
722 
723 QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id);
724 
725 #ifdef WLAN_FEATURE_CIF_CFR
726 /**
727  * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings
728  * @wmi_handle: wmi handle
729  * @data_len: len of dma cfg req
730  * @data: dma cfg req
731  *
732  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
733  */
734 QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
735 				wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
736 #endif
737 
738 QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
739 			  uint32_t data_len,
740 			  uint8_t *data);
741 
742 QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
743 			bool dfs_phyerr_filter_offload);
744 
745 #ifdef CONFIG_MCL
746 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
747 				   WMI_PKTLOG_EVENT pktlog_event,
748 				   uint32_t cmd_id,
749 				   uint8_t user_triggered);
750 #endif
751 
752 QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
753 			struct stats_ext_params *preq);
754 
755 QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
756 				struct dhcp_offload_info_params *params);
757 
758 QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
759 				   uint32_t reg_dmn, uint16_t regdmn2G,
760 				   uint16_t regdmn5G, uint8_t ctl2G,
761 				   uint8_t ctl5G);
762 
763 QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
764 					struct fw_dump_req_param *mem_dump_req);
765 
766 QDF_STATUS wmi_unified_cfg_action_frm_tb_ppdu_cmd(void *wmi_hdl,
767 				struct cfg_action_frm_tb_ppdu_param *cfg_info);
768 
769 QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
770 		void *evt_buf);
771 
772 QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
773 		uint8_t *event,
774 		uint32_t len);
775 
776 QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
777 		struct wmi_wifi_start_log *start_log);
778 
779 QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl);
780 
781 QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
782 			       struct wmi_unit_test_cmd *wmi_utest);
783 
784 #ifdef FEATURE_WLAN_APF
785 /**
786  * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW
787  * @wmi: the WMI handle
788  * @vdev_id: the Id of the vdev to apply the configuration to
789  * @ucast_mode: the active APF mode to configure for unicast packets
790  * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast
791  *	packets
792  */
793 QDF_STATUS
794 wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
795 				    enum wmi_host_active_apf_mode ucast_mode,
796 				    enum wmi_host_active_apf_mode
797 							      mcast_bcast_mode);
798 
799 /**
800  * wmi_unified_send_apf_enable_cmd() - send apf enable/disable cmd
801  * @wmi: wmi handle
802  * @vdev_id: VDEV id
803  * @enable: true: enable, false: disable
804  *
805  * This function passes the apf enable command to fw
806  *
807  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
808  */
809 QDF_STATUS wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
810 					   uint32_t vdev_id, bool enable);
811 
812 /**
813  * wmi_unified_send_apf_write_work_memory_cmd() - send cmd to write into the APF
814  *	work memory.
815  * @wmi: wmi handle
816  * @write_params: parameters and buffer pointer for the write
817  *
818  * This function passes the write apf work mem command to fw
819  *
820  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
821  */
822 QDF_STATUS wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
823 			struct wmi_apf_write_memory_params *write_params);
824 
825 /**
826  * wmi_unified_send_apf_read_work_memory_cmd() - send cmd to read part of APF
827  *	work memory
828  * @wmi: wmi handle
829  * @read_params: contains relative address and length to read from
830  *
831  * This function passes the read apf work mem command to fw
832  *
833  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
834  */
835 QDF_STATUS wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
836 				struct wmi_apf_read_memory_params *read_params);
837 
838 /**
839  * wmi_extract_apf_read_memory_resp_event() - exctract read mem resp event
840  * @wmi: wmi handle
841  * @evt_buf: Pointer to the event buffer
842  * @resp: pointer to memory to extract event parameters into
843  *
844  * This function exctracts read mem response event into the given structure ptr
845  *
846  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
847  */
848 QDF_STATUS
849 wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
850 				struct wmi_apf_read_memory_resp_event_params
851 								*read_mem_evt);
852 #endif /* FEATURE_WLAN_APF */
853 
854 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
855 				uint8_t macaddr[IEEE80211_ADDR_LEN],
856 				struct stats_request_params *param);
857 
858 QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value);
859 
860 QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value);
861 
862 QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl,
863 				uint32_t value);
864 
865 QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
866 				struct btcoex_cfg_params *param);
867 
868 QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
869 				struct btcoex_cfg_params *param);
870 
871 QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
872 				coex_ver_cfg_t *param);
873 
874 QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
875 					    struct coex_config_params *param);
876 
877 QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
878 				struct fips_params *param);
879 
880 QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
881 				struct wlan_profile_params *param);
882 
883 QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
884 				struct wlan_profile_params *param);
885 
886 QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
887 				struct channel_param *param);
888 
889 QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
890 				struct ratepwr_table_params *param);
891 
892 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl);
893 
894 QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
895 				struct ratepwr_chainmsk_params *param);
896 
897 QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
898 				struct macaddr_params *param);
899 
900 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl);
901 
902 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl);
903 
904 QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
905 				struct acparams_params *param);
906 
907 QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
908 				struct vap_dscp_tid_map_params *param);
909 
910 QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
911 				struct proxy_ast_reserve_params *param);
912 
913 /**
914  *  wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
915  *  @param wmi_hdl      : handle to WMI.
916  *  @param param        : pointer to hold bridge mac addr param
917  *
918  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
919  */
920 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
921 				struct set_bridge_mac_addr_params *param);
922 
923 
924 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
925 
926 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
927 
928 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl);
929 
930 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
931 			struct smart_ant_enable_tx_feedback_params *param);
932 
933 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
934 				struct vdev_spectral_configure_params *param);
935 
936 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
937 				struct vdev_spectral_enable_params *param);
938 
939 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
940 				struct bss_chan_info_request_params *param);
941 
942 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
943 				struct thermal_mitigation_params *param);
944 
945 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
946 				struct set_fwtest_params *param);
947 
948 /**
949  *  wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
950  *						       size command
951  *  @param wmi_hdl      : handle to WMI.
952  *  @param param        : pointer to hold custom aggr size param
953  *
954  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
955  */
956 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
957 				struct set_custom_aggr_size_params *param);
958 
959 /**
960  *  wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
961  *  @param wmi_hdl      : handle to WMI.
962  *  @param param        : pointer to hold set qdepth thresh param
963  *
964  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
965  */
966 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
967 				struct set_qdepth_thresh_params *param);
968 
969 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
970 				struct pdev_set_regdomain_params *param);
971 
972 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
973 				struct set_beacon_filter_params *param);
974 
975 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
976 				struct remove_beacon_filter_params *param);
977 
978 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
979 				uint8_t macaddr[IEEE80211_ADDR_LEN],
980 				struct addba_clearresponse_params *param);
981 
982 QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
983 				uint8_t macaddr[IEEE80211_ADDR_LEN],
984 				struct addba_send_params *param);
985 
986 QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
987 				uint8_t macaddr[IEEE80211_ADDR_LEN],
988 				struct delba_send_params *param);
989 
990 QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
991 				uint8_t macaddr[IEEE80211_ADDR_LEN],
992 				struct addba_setresponse_params *param);
993 
994 QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
995 				uint8_t macaddr[IEEE80211_ADDR_LEN],
996 				struct singleamsdu_params *param);
997 
998 QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
999 				struct mu_scan_params *param);
1000 
1001 QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
1002 				struct lteu_config_params *param);
1003 
1004 QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
1005 				struct set_ps_mode_params *param);
1006 
1007 QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
1008 				struct wmi_init_cmd_param *param);
1009 
1010 bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id);
1011 
1012 /**
1013  * wmi_save_service_bitmap() - save service bitmap
1014  * @wmi_handle: wmi handle
1015  * @param evt_buf: pointer to event buffer
1016  *
1017  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1018  */
1019 QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
1020 				   void *bitmap_buf);
1021 
1022 /**
1023  * wmi_save_ext_service_bitmap() - save extended service bitmap
1024  * @wmi_handle: wmi handle
1025  * @param evt_buf: pointer to event buffer
1026  *
1027  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1028  */
1029 QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
1030 				   void *bitmap_buf);
1031 
1032 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
1033 
1034 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
1035 				void *evt_buf,
1036 				struct wlan_psoc_target_capability_info *ev);
1037 
1038 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
1039 			struct wlan_psoc_hal_reg_capability *hal_reg_cap);
1040 
1041 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
1042 				void *evt_buf, uint8_t *num_entries);
1043 
1044 uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
1045 
1046 QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
1047 				void *ev, uint8_t *macaddr);
1048 
1049 wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
1050 					      uint8_t *num_mac_addr);
1051 
1052 /**
1053  * wmi_extract_ready_params() - Extract data from ready event apart from
1054  *                     status, macaddr and version.
1055  * @wmi_handle: Pointer to WMI handle.
1056  * @evt_buf: Pointer to Ready event buffer.
1057  * @ev_param: Pointer to host defined struct to copy the data from event.
1058  *
1059  * Return: QDF_STATUS_SUCCESS on success.
1060  */
1061 QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
1062 		void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
1063 
1064 QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
1065 				void *ev, struct wmi_host_fw_ver *fw_ver);
1066 
1067 QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
1068 				void *ev, struct wmi_host_fw_abi_ver *fw_ver);
1069 
1070 QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev);
1071 
1072 uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl,
1073 				void *evt_b, uint32_t *len);
1074 
1075 QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
1076 				wmi_host_ext_resource_config *ext_cfg);
1077 
1078 QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
1079 				struct rtt_meas_req_test_params *param);
1080 
1081 QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
1082 				struct rtt_meas_req_params *param);
1083 
1084 QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
1085 				struct rtt_keepalive_req_params *param);
1086 
1087 QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
1088 				struct lci_set_params *param);
1089 
1090 QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
1091 				struct lcr_set_params *param);
1092 
1093 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
1094 			struct periodic_chan_stats_params *param);
1095 
1096 /* Extract APIs */
1097 
1098 QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
1099 		struct wmi_host_fips_event_param *param);
1100 
1101 QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
1102 		struct mgmt_rx_event_params *hdr, uint8_t **bufp);
1103 
1104 QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
1105 		wmi_host_roam_event *ev);
1106 
1107 QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
1108 		struct scan_event *param);
1109 
1110 QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
1111 		wmi_host_mu_report_event *param);
1112 
1113 QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
1114 		uint8_t idx, wmi_host_mu_db_entry *param);
1115 
1116 QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
1117 		wmi_host_peer_txmu_cnt_event *param);
1118 
1119 QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
1120 		void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
1121 
1122 QDF_STATUS
1123 wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
1124 				  struct esp_estimation_event *param);
1125 
1126 QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
1127 		void *evt_buf, uint32_t *gpio_num);
1128 
1129 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
1130 		void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
1131 
1132 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
1133 		void *evt_buf,
1134 		wmi_host_pdev_generic_buffer_event *param);
1135 
1136 QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
1137 		uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
1138 
1139 QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
1140 		 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
1141 
1142 QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
1143 		wmi_host_rtt_event_hdr *ev);
1144 
1145 QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
1146 		wmi_host_rtt_meas_event *ev, uint8_t *hdump,
1147 		uint16_t hdump_len);
1148 
1149 QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
1150 		wmi_host_rtt_error_report_event *ev);
1151 
1152 QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
1153 		uint32_t index, wmi_host_chan_stats *chan_stats);
1154 
1155 QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
1156 		uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
1157 
1158 QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
1159 		uint8_t idx, uint32_t *levelcount, uint32_t *dccount);
1160 
1161 QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
1162 			uint16_t datalen, uint16_t *buf_offset,
1163 			wmi_host_phyerr_t *phyerr);
1164 
1165 QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
1166 			uint16_t datalen, uint16_t *buf_offset,
1167 			wmi_host_phyerr_t *phyerr);
1168 
1169 QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
1170 			uint16_t datalen, wmi_host_phyerr_t *phyerr);
1171 
1172 QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
1173 			wmi_host_wlan_profile_ctx_t *profile_ctx);
1174 
1175 QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
1176 			wmi_host_wlan_profile_t *profile_data);
1177 
1178 QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
1179 					   wmi_host_stats_event *stats_param);
1180 
1181 QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
1182 					 uint32_t index,
1183 					 wmi_host_pdev_stats *pdev_stats);
1184 
1185 QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
1186 			wmi_unit_test_event *unit_test, uint32_t maxspace);
1187 
1188 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
1189 			uint32_t index,
1190 			wmi_host_pdev_ext_stats *pdev_ext_stats);
1191 
1192 QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
1193 			uint32_t index,
1194 			wmi_host_peer_extd_stats *peer_extd_stats);
1195 
1196 QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
1197 			wmi_host_pdev_bss_chan_info_event *bss_chan_info);
1198 
1199 QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
1200 		uint32_t index, wmi_host_peer_stats *peer_stats);
1201 
1202 QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
1203 		wmi_host_tx_data_traffic_ctrl_event *ev);
1204 
1205 QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
1206 		uint32_t index, wmi_host_vdev_stats *vdev_stats);
1207 
1208 QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
1209 	uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats);
1210 
1211 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
1212 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
1213 
1214 QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
1215 		uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
1216 
1217 /**
1218  * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
1219  * @wmi_handle: wmi handle
1220  * @param evt_buf: pointer to event buffer
1221  * @param vdev_extd_stats: Pointer to hold nac rssi stats
1222  *
1223  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1224  */
1225 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
1226 		struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
1227 
1228 /**
1229  * wmi_extract_peer_retry_stats() - extract peer retry stats from event
1230  * @wmi_handle: wmi handle
1231  * @evt_buf: pointer to event buffer
1232  * @index: Index into peer retry stats
1233  * @peer_retry_stats: Pointer to hold  peer retry stats
1234  *
1235  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1236  */
1237 QDF_STATUS wmi_extract_peer_retry_stats(void *wmi_hdl, void *evt_buf,
1238 	uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats);
1239 
1240 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
1241 				struct wmi_power_dbg_params *param);
1242 
1243 /**
1244  * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from
1245  *					     FW service ready event
1246  * @wmi_hdl: wmi handle
1247  * @evt_buf: event buffer received from firmware
1248  * @ext_param: extended target info
1249  *
1250  * Return: QDF_STATUS_SUCCESS for success or error code
1251  */
1252 QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
1253 			void *wmi_hdl,
1254 			uint8_t *evt_buf,
1255 			struct wlan_psoc_host_service_ext_param *ext_param);
1256 
1257 QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
1258 				   struct set_fwtest_params *wmi_fwtest);
1259 
1260 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
1261 					struct rx_reorder_queue_setup_params *param);
1262 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
1263 					struct rx_reorder_queue_remove_params *param);
1264 
1265 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
1266 		struct wlan_psoc_host_service_ext_param *param);
1267 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
1268 			void *wmi_hdl,
1269 			uint8_t *evt_buf, uint8_t hw_mode_idx,
1270 			struct wlan_psoc_host_hw_mode_caps *param);
1271 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
1272 			void *wmi_hdl,
1273 			uint8_t *evt_buf,
1274 			uint8_t hw_mode_id,
1275 			uint8_t phy_id,
1276 			struct wlan_psoc_host_mac_phy_caps *param);
1277 QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
1278 			void *wmi_hdl,
1279 			uint8_t *evt_buf, uint8_t phy_idx,
1280 			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
1281 
1282 /**
1283  * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
1284  *                                             capability received through
1285  *                                             extended service ready event
1286  * @wmi_hdl: WMI handle
1287  * @evt_buf: Event buffer
1288  * @idx: Index of the module for which capability is received
1289  * @param: Pointer to direct buffer rx ring cap struct
1290  *
1291  * Return: QDF status of operation
1292  */
1293 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
1294 			void *wmi_hdl,
1295 			uint8_t *evt_buf, uint8_t idx,
1296 			struct wlan_psoc_host_dbr_ring_caps *param);
1297 
1298 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
1299 				      uint8_t *evt_buf,
1300 				      struct wmi_host_pdev_utf_event *param);
1301 
1302 QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
1303 				      uint8_t *evt_buf,
1304 				      struct wmi_host_pdev_qvit_event *param);
1305 
1306 QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
1307 		struct wlan_psoc_host_chainmask_table *chainmask_table);
1308 /**
1309  * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
1310  * @wmi_handle: wmi handle
1311  * @pdev_id: pdev id
1312  *
1313  * Return: QDF_STATUS
1314  */
1315 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
1316 		uint32_t pdev_id);
1317 
1318 /**
1319  * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
1320  * @wmi_handle: wmi handle
1321  * @pdev_id: pdev id
1322  *
1323  * Return: QDF_STATUS
1324  */
1325 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
1326 		uint32_t pdev_id);
1327 
1328 QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
1329 				struct set_country *param);
1330 
1331 #ifdef WLAN_FEATURE_ACTION_OUI
1332 /**
1333  * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw
1334  * @wmi_hdl: wma handle
1335  * @req: wmi action oui message to be send
1336  *
1337  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1338  */
1339 QDF_STATUS
1340 wmi_unified_send_action_oui_cmd(void *wmi_hdl,
1341 				struct action_oui_request *req);
1342 #endif /* WLAN_FEATURE_ACTION_OUI */
1343 
1344 /**
1345  * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
1346  * @wmi_hdl: wma handle
1347  * @get_rcpi_param: rcpi params
1348  *
1349  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1350  */
1351 QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
1352 					struct rcpi_req *get_rcpi_param);
1353 
1354 /**
1355  * wmi_extract_rcpi_response_event - api to extract RCPI event params
1356  * @wmi_handle: wma handle
1357  * @evt_buf: pointer to event buffer
1358  * @res: pointer to hold rcpi response from firmware
1359  *
1360  * Return: QDF_STATUS_SUCCESS for successful event parse
1361  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1362  */
1363 QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
1364 					   struct rcpi_res *res);
1365 
1366 #ifdef WMI_INTERFACE_EVENT_LOGGING
1367 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
1368 		       qdf_abstract_print *print, void *print_priv);
1369 
1370 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1371 			      qdf_abstract_print *print, void *print_priv);
1372 
1373 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
1374 			    qdf_abstract_print *print, void *print_priv);
1375 
1376 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1377 				   qdf_abstract_print *print, void *print_priv);
1378 
1379 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
1380 			 qdf_abstract_print *print, void *print_priv);
1381 
1382 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
1383 			    qdf_abstract_print *print, void *print_priv);
1384 
1385 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
1386 			      qdf_abstract_print *print, void *print_priv);
1387 
1388 #endif /* WMI_INTERFACE_EVENT_LOGGING */
1389 
1390 /**
1391  * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
1392  *  wds entries from FW
1393  * @wmi_hdl: wmi handle
1394  *
1395  * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
1396  *
1397  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
1398  */
1399 
1400 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl);
1401 
1402 /**
1403  * wmi_extract_wds_entry - api to extract wds entry
1404  * @wmi_hdl: wmi handle
1405  * @evt_buf: pointer to event buffer
1406  * @wds_entry: wds entry
1407  * @idx: index to point wds entry in event buffer
1408  *
1409  * Return: QDF_STATUS_SUCCESS for successful event parse
1410  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1411  */
1412 
1413 QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
1414 			struct wdsentry *wds_entry, u_int32_t idx);
1415 
1416 /**
1417  * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss
1418  *  detection configuration to FW.
1419  * @wmi_hdl: wmi handle
1420  * @cfg: obss detection configuration
1421  *
1422  * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw.
1423  *
1424  * Return: QDF_STATUS
1425  */
1426 
1427 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
1428 			struct wmi_obss_detection_cfg_param *cfg);
1429 
1430 /**
1431  * wmi_unified_extract_obss_detection_info() - WMI function to extract obss
1432  *  detection info from FW.
1433  * @wmi_hdl: wmi handle
1434  * @data: event data from firmware
1435  * @info: Pointer to hold obss detection info
1436  *
1437  * This function is used to extract obss info from firmware.
1438  *
1439  * Return: QDF_STATUS
1440  */
1441 
1442 QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
1443 						   uint8_t *data,
1444 						   struct wmi_obss_detect_info
1445 						   *info);
1446 
1447 #ifdef WLAN_SUPPORT_GREEN_AP
1448 QDF_STATUS wmi_extract_green_ap_egap_status_info(
1449 		void *wmi_hdl, uint8_t *evt_buf,
1450 		struct wlan_green_ap_egap_status_info *egap_status_info_params);
1451 #endif
1452 
1453 /**
1454  * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats
1455  * @wmi_hdl: wmi handle
1456  * @params: request params
1457  *
1458  * This function is used to send the roam scan stats request command to
1459  * firmware.
1460  *
1461  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1462  */
1463 QDF_STATUS
1464 wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl,
1465 				     struct wmi_roam_scan_stats_req *params);
1466 
1467 /**
1468  * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res
1469  * @wmi: wmi handle
1470  * @evt_buf: pointer to the event buffer
1471  * @vdev_id: output pointer to hold vdev id
1472  * @res_param: output pointer to hold extracted memory
1473  *
1474  * Return: QDF_STATUS
1475  */
1476 QDF_STATUS
1477 wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
1478 				    uint32_t *vdev_id,
1479 				    struct wmi_roam_scan_stats_res **res_param);
1480 
1481 /**
1482  * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event
1483  * @wmi: wmi handle
1484  * @evt_buf: pointer to the event buffer
1485  * @vdev_id: output pointer to hold vdev id
1486  * @tx_status: output pointer to hold bcn tx status
1487  *
1488  * Return: QDF_STATUS
1489  */
1490 QDF_STATUS
1491 wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf,
1492 				      uint32_t *vdev_id, uint32_t *tx_status);
1493 
1494 /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width
1495  * @wmi_hdl: wmi handle
1496  * @phymode: phy mode
1497  *
1498  * Return: wmi channel width
1499  */
1500 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
1501 					WMI_HOST_WLAN_PHY_MODE phymode);
1502 
1503 #ifdef QCA_SUPPORT_CP_STATS
1504 /**
1505  * wmi_extract_cca_stats() - api to extract congestion stats from event buffer
1506  * @wmi_handle: wma handle
1507  * @evt_buf: event buffer
1508  * @datalen: length of buffer
1509  * @stats: buffer to populated after stats extraction
1510  *
1511  * Return: status of operation
1512  */
1513 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
1514 				 struct wmi_host_congestion_stats *stats);
1515 #endif /* QCA_SUPPORT_CP_STATS */
1516 
1517 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
1518 /**
1519  * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd.
1520  * @wmi_hdl: wmi handle
1521  * @params: radar found params
1522  *
1523  * This function passes the average radar parameters to fw
1524  *
1525  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1526  */
1527 QDF_STATUS
1528 wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
1529 				    struct dfs_radar_found_params *params);
1530 
1531 /**
1532  * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw.
1533  * @wmi_hdl: wmi handle
1534  * @evt_buf: pointer to event buffer
1535  * @dfs_status_check: pointer to the host dfs status
1536  *
1537  * This function extracts the result of host dfs from fw
1538  *
1539  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1540  */
1541 QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
1542 					  uint32_t  *dfs_status_check);
1543 #endif
1544 #ifdef OL_ATH_SMART_LOGGING
1545 /**
1546  * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd
1547  * @wmi_hdl: wmi handle
1548  * @params: enable/disable
1549  *
1550  * This function enables/disable the smart logging feature
1551  *
1552  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1553  */
1554 QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
1555 						     uint32_t param);
1556 
1557 /**
1558  * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd
1559  * @wmi_hdl: wmi handle
1560  * @param:  Fatal event
1561  *
1562  * This function sends the smart log fatal events to the FW
1563  *
1564  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1565  */
1566 QDF_STATUS wmi_unified_send_smart_logging_fatal_cmd
1567 					(void *wmi_hdl,
1568 					struct wmi_debug_fatal_events *param);
1569 
1570 /**
1571  * wmi_extract_smartlog_ev() - extract smartlog event info from event
1572  * @wmi_handle: wmi handle
1573  * @param evt_buf: pointer to event buffer
1574  * @param ev: Pointer to hold fatal events
1575  *
1576  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1577  */
1578 QDF_STATUS wmi_extract_smartlog_ev
1579 				(void *wmi_hdl, void *evt_buf,
1580 				struct wmi_debug_fatal_events *ev);
1581 
1582 #endif /* OL_ATH_SMART_LOGGING */
1583 
1584 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
1585 					    HTC_PACKET * htc_packet);
1586 
1587 /**
1588  * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe
1589  * status from event
1590  * @wmi_handle: wmi handle
1591  * @param evt_buf: pointer to event buffer
1592  * @param ev: Pointer to hold ctl status
1593  *
1594  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1595  */
1596 QDF_STATUS
1597 wmi_extract_ctl_failsafe_check_ev_param(void *wmi_hdl,
1598 					void *evt_buf,
1599 					struct wmi_host_pdev_ctl_failsafe_event
1600 					*param);
1601 
1602 #ifdef OBSS_PD
1603 /**
1604  * wmi_unified_send_obss_spatial_reuse_set_cmd() - send obss pd offset
1605  * @wmi_handle: wmi handle
1606  * @oobss_spatial_reuse_param: Pointer to obsspd min max offset
1607  *
1608  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1609  */
1610 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_handle,
1611 	struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param);
1612 
1613 /**
1614  * wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd() - send def thresh
1615  * @wmi_handle: wmi handle
1616  * @thresh: Pointer to def thresh
1617  *
1618  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1619  */
1620 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl,
1621 	struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh);
1622 
1623 #endif /* OBSS_PD */
1624 
1625 /**
1626  * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target
1627  * defines. For legacy there is not conversion required. Just return pdev_id as
1628  * it is.
1629  * @wmi_hdl: wmi handle
1630  * @host_pdev_id: host pdev_id to be converted.
1631  * @target_pdev_id: Output target pdev id.
1632  *
1633  * Return: QDF_STATUS
1634  */
1635 QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl,
1636 					      uint32_t host_pdev_id,
1637 					      uint32_t *target_pdev_id);
1638 
1639 /**
1640  * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss
1641  *  color change enable to FW.
1642  * @wmi_hdl: wmi handle
1643  * @vdev_id: vdev ID
1644  * @enable: enable or disable color change handeling within firmware
1645  *
1646  * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw,
1647  * thereby firmware updates bss color when AP announces bss color change.
1648  *
1649  * Return: QDF_STATUS
1650  */
1651 QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
1652 							uint32_t vdev_id,
1653 							bool enable);
1654 
1655 /**
1656  * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss
1657  *  color collision detection configuration to FW.
1658  * @wmi_hdl: wmi handle
1659  * @cfg: obss color collision detection configuration
1660  *
1661  * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw.
1662  *
1663  * Return: QDF_STATUS
1664  */
1665 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
1666 		struct wmi_obss_color_collision_cfg_param *cfg);
1667 
1668 /**
1669  * wmi_unified_extract_obss_color_collision_info() - WMI function to extract
1670  *  obss color collision info from FW.
1671  * @wmi_hdl: wmi handle
1672  * @data: event data from firmware
1673  * @info: Pointer to hold bss color collision info
1674  *
1675  * This function is used to extract bss collision info from firmware.
1676  *
1677  * Return: QDF_STATUS
1678  */
1679 QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
1680 		uint8_t *data, struct wmi_obss_color_collision_info *info);
1681 
1682 #ifdef CRYPTO_SET_KEY_CONVERGED
1683 /**
1684  * wlan_crypto_cipher_to_wmi_cipher() - Convert crypto cipher to WMI cipher
1685  * @crypto_cipher: cipher type in crypto format
1686  *
1687  * Return: cipher type in WMI cipher type
1688  */
1689 uint8_t wlan_crypto_cipher_to_wmi_cipher(
1690 		enum wlan_crypto_cipher_type crypto_cipher);
1691 
1692 /**
1693  * wlan_crypto_cipher_to_cdp_sec_type() - Convert crypto cipher to CDP type
1694  * @crypto_cipher: cipher type in crypto format
1695  *
1696  * Return: security type in cdp_sec_type data format type
1697  */
1698 enum cdp_sec_type wlan_crypto_cipher_to_cdp_sec_type(
1699 		enum wlan_crypto_cipher_type crypto_cipher);
1700 
1701 #endif
1702 #endif /* _WMI_UNIFIED_API_H_ */
1703