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