xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_api.h (revision 8ddef7dd9a290d4a9b1efd5d3efacf51d78a1a0d)
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
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(wmi_unified_t wmi_handle,
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_send_get_user_position_cmd(void *wmi_hdl, uint32_t value);
863 
864 QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value);
865 
866 QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl,
867 				uint32_t value);
868 
869 QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
870 				struct btcoex_cfg_params *param);
871 
872 QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
873 				struct btcoex_cfg_params *param);
874 
875 QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
876 				coex_ver_cfg_t *param);
877 
878 QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
879 					    struct coex_config_params *param);
880 
881 QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
882 				struct fips_params *param);
883 
884 QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
885 				struct wlan_profile_params *param);
886 
887 QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
888 				struct wlan_profile_params *param);
889 
890 QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
891 				struct channel_param *param);
892 
893 QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
894 				struct ratepwr_table_params *param);
895 
896 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl);
897 
898 QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
899 				struct ratepwr_chainmsk_params *param);
900 
901 QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
902 				struct macaddr_params *param);
903 
904 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl);
905 
906 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl);
907 
908 QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
909 				struct acparams_params *param);
910 
911 QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
912 				struct vap_dscp_tid_map_params *param);
913 
914 QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
915 				struct proxy_ast_reserve_params *param);
916 
917 /**
918  *  wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
919  *  @param wmi_hdl      : handle to WMI.
920  *  @param param        : pointer to hold bridge mac addr param
921  *
922  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
923  */
924 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
925 				struct set_bridge_mac_addr_params *param);
926 
927 
928 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
929 
930 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
931 
932 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl);
933 
934 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
935 			struct smart_ant_enable_tx_feedback_params *param);
936 
937 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
938 				struct vdev_spectral_configure_params *param);
939 
940 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
941 				struct vdev_spectral_enable_params *param);
942 
943 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
944 				struct bss_chan_info_request_params *param);
945 
946 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
947 				struct thermal_mitigation_params *param);
948 
949 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
950 				struct set_fwtest_params *param);
951 
952 /**
953  *  wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
954  *						       size command
955  *  @param wmi_hdl      : handle to WMI.
956  *  @param param        : pointer to hold custom aggr size param
957  *
958  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
959  */
960 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
961 				struct set_custom_aggr_size_params *param);
962 
963 /**
964  *  wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
965  *  @param wmi_hdl      : handle to WMI.
966  *  @param param        : pointer to hold set qdepth thresh param
967  *
968  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
969  */
970 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
971 				struct set_qdepth_thresh_params *param);
972 
973 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
974 				struct pdev_set_regdomain_params *param);
975 
976 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
977 				struct set_beacon_filter_params *param);
978 
979 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
980 				struct remove_beacon_filter_params *param);
981 
982 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
983 				uint8_t macaddr[IEEE80211_ADDR_LEN],
984 				struct addba_clearresponse_params *param);
985 
986 QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
987 				uint8_t macaddr[IEEE80211_ADDR_LEN],
988 				struct addba_send_params *param);
989 
990 QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
991 				uint8_t macaddr[IEEE80211_ADDR_LEN],
992 				struct delba_send_params *param);
993 
994 QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
995 				uint8_t macaddr[IEEE80211_ADDR_LEN],
996 				struct addba_setresponse_params *param);
997 
998 QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
999 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1000 				struct singleamsdu_params *param);
1001 
1002 QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
1003 				struct mu_scan_params *param);
1004 
1005 QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
1006 				struct lteu_config_params *param);
1007 
1008 QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
1009 				struct set_ps_mode_params *param);
1010 
1011 QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
1012 				struct wmi_init_cmd_param *param);
1013 
1014 bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id);
1015 
1016 /**
1017  * wmi_save_service_bitmap() - save service bitmap
1018  * @wmi_handle: wmi handle
1019  * @param evt_buf: pointer to event buffer
1020  *
1021  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1022  */
1023 QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
1024 				   void *bitmap_buf);
1025 
1026 /**
1027  * wmi_save_ext_service_bitmap() - save extended service bitmap
1028  * @wmi_handle: wmi handle
1029  * @param evt_buf: pointer to event buffer
1030  *
1031  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1032  */
1033 QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
1034 				   void *bitmap_buf);
1035 
1036 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
1037 
1038 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
1039 				void *evt_buf,
1040 				struct wlan_psoc_target_capability_info *ev);
1041 
1042 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
1043 			struct wlan_psoc_hal_reg_capability *hal_reg_cap);
1044 
1045 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
1046 				void *evt_buf, uint8_t *num_entries);
1047 
1048 uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
1049 
1050 QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
1051 				void *ev, uint8_t *macaddr);
1052 
1053 wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
1054 					      uint8_t *num_mac_addr);
1055 
1056 /**
1057  * wmi_extract_ready_params() - Extract data from ready event apart from
1058  *                     status, macaddr and version.
1059  * @wmi_handle: Pointer to WMI handle.
1060  * @evt_buf: Pointer to Ready event buffer.
1061  * @ev_param: Pointer to host defined struct to copy the data from event.
1062  *
1063  * Return: QDF_STATUS_SUCCESS on success.
1064  */
1065 QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
1066 		void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
1067 
1068 QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
1069 				void *ev, struct wmi_host_fw_ver *fw_ver);
1070 
1071 QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
1072 				void *ev, struct wmi_host_fw_abi_ver *fw_ver);
1073 
1074 QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev);
1075 
1076 uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl,
1077 				void *evt_b, uint32_t *len);
1078 
1079 QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
1080 				wmi_host_ext_resource_config *ext_cfg);
1081 
1082 QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
1083 				struct rtt_meas_req_test_params *param);
1084 
1085 QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
1086 				struct rtt_meas_req_params *param);
1087 
1088 QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
1089 				struct rtt_keepalive_req_params *param);
1090 
1091 QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
1092 				struct lci_set_params *param);
1093 
1094 QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
1095 				struct lcr_set_params *param);
1096 
1097 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
1098 			struct periodic_chan_stats_params *param);
1099 
1100 /* Extract APIs */
1101 
1102 QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
1103 		struct wmi_host_fips_event_param *param);
1104 
1105 QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
1106 		struct mgmt_rx_event_params *hdr, uint8_t **bufp);
1107 
1108 QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
1109 		wmi_host_roam_event *ev);
1110 
1111 QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
1112 		struct scan_event *param);
1113 
1114 QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
1115 		wmi_host_mu_report_event *param);
1116 
1117 QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
1118 		uint8_t idx, wmi_host_mu_db_entry *param);
1119 
1120 QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
1121 		wmi_host_peer_txmu_cnt_event *param);
1122 
1123 QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
1124 		void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
1125 
1126 QDF_STATUS
1127 wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
1128 				  struct esp_estimation_event *param);
1129 
1130 QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
1131 		void *evt_buf, uint32_t *gpio_num);
1132 
1133 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
1134 		void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
1135 
1136 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
1137 		void *evt_buf,
1138 		wmi_host_pdev_generic_buffer_event *param);
1139 
1140 QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
1141 		uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
1142 
1143 QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
1144 		 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
1145 
1146 QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
1147 		wmi_host_rtt_event_hdr *ev);
1148 
1149 QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
1150 		wmi_host_rtt_meas_event *ev, uint8_t *hdump,
1151 		uint16_t hdump_len);
1152 
1153 QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
1154 		wmi_host_rtt_error_report_event *ev);
1155 
1156 QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
1157 		uint32_t index, wmi_host_chan_stats *chan_stats);
1158 
1159 QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
1160 		uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
1161 
1162 QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
1163 		uint8_t idx, uint32_t *levelcount, uint32_t *dccount);
1164 
1165 QDF_STATUS wmi_extract_comb_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_single_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_composite_phyerr(void *wmi_hdl, void *evt_buf,
1174 			uint16_t datalen, wmi_host_phyerr_t *phyerr);
1175 
1176 QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
1177 			wmi_host_wlan_profile_ctx_t *profile_ctx);
1178 
1179 QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
1180 			wmi_host_wlan_profile_t *profile_data);
1181 
1182 QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
1183 					   wmi_host_stats_event *stats_param);
1184 
1185 QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
1186 					 uint32_t index,
1187 					 wmi_host_pdev_stats *pdev_stats);
1188 
1189 QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
1190 			wmi_unit_test_event *unit_test, uint32_t maxspace);
1191 
1192 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
1193 			uint32_t index,
1194 			wmi_host_pdev_ext_stats *pdev_ext_stats);
1195 
1196 QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
1197 			uint32_t index,
1198 			wmi_host_peer_extd_stats *peer_extd_stats);
1199 
1200 QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
1201 			wmi_host_pdev_bss_chan_info_event *bss_chan_info);
1202 
1203 QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
1204 		uint32_t index, wmi_host_peer_stats *peer_stats);
1205 
1206 QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
1207 		wmi_host_tx_data_traffic_ctrl_event *ev);
1208 
1209 QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
1210 		uint32_t index, wmi_host_vdev_stats *vdev_stats);
1211 
1212 QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
1213 	uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats);
1214 
1215 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
1216 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
1217 
1218 QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
1219 		uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
1220 
1221 /**
1222  * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
1223  * @wmi_handle: wmi handle
1224  * @param evt_buf: pointer to event buffer
1225  * @param vdev_extd_stats: Pointer to hold nac rssi stats
1226  *
1227  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1228  */
1229 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
1230 		struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
1231 
1232 /**
1233  * wmi_extract_peer_retry_stats() - extract peer retry stats from event
1234  * @wmi_handle: wmi handle
1235  * @evt_buf: pointer to event buffer
1236  * @index: Index into peer retry stats
1237  * @peer_retry_stats: Pointer to hold  peer retry stats
1238  *
1239  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1240  */
1241 QDF_STATUS wmi_extract_peer_retry_stats(void *wmi_hdl, void *evt_buf,
1242 	uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats);
1243 
1244 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
1245 				struct wmi_power_dbg_params *param);
1246 
1247 /**
1248  * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from
1249  *					     FW service ready event
1250  * @wmi_hdl: wmi handle
1251  * @evt_buf: event buffer received from firmware
1252  * @ext_param: extended target info
1253  *
1254  * Return: QDF_STATUS_SUCCESS for success or error code
1255  */
1256 QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
1257 			void *wmi_hdl,
1258 			uint8_t *evt_buf,
1259 			struct wlan_psoc_host_service_ext_param *ext_param);
1260 
1261 QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
1262 				   struct set_fwtest_params *wmi_fwtest);
1263 
1264 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
1265 					struct rx_reorder_queue_setup_params *param);
1266 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
1267 					struct rx_reorder_queue_remove_params *param);
1268 
1269 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
1270 		struct wlan_psoc_host_service_ext_param *param);
1271 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
1272 			void *wmi_hdl,
1273 			uint8_t *evt_buf, uint8_t hw_mode_idx,
1274 			struct wlan_psoc_host_hw_mode_caps *param);
1275 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
1276 			void *wmi_hdl,
1277 			uint8_t *evt_buf,
1278 			uint8_t hw_mode_id,
1279 			uint8_t phy_id,
1280 			struct wlan_psoc_host_mac_phy_caps *param);
1281 QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
1282 			void *wmi_hdl,
1283 			uint8_t *evt_buf, uint8_t phy_idx,
1284 			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
1285 
1286 /**
1287  * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
1288  *                                             capability received through
1289  *                                             extended service ready event
1290  * @wmi_hdl: WMI handle
1291  * @evt_buf: Event buffer
1292  * @idx: Index of the module for which capability is received
1293  * @param: Pointer to direct buffer rx ring cap struct
1294  *
1295  * Return: QDF status of operation
1296  */
1297 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
1298 			void *wmi_hdl,
1299 			uint8_t *evt_buf, uint8_t idx,
1300 			struct wlan_psoc_host_dbr_ring_caps *param);
1301 
1302 /**
1303  * wmi_extract_spectral_scaling_params_service_ready_ext: Extract Spectral
1304  *                                             scaling params received through
1305  *                                             extended service ready event
1306  * @wmi_hdl: WMI handle
1307  * @evt_buf: Event buffer
1308  * @idx: Index
1309  * @param: Pointer to Spectral scaling params
1310  *
1311  * Return: QDF status of operation
1312  */
1313 QDF_STATUS wmi_extract_spectral_scaling_params_service_ready_ext(
1314 			void *wmi_hdl,
1315 			uint8_t *evt_buf, uint8_t idx,
1316 			struct wlan_psoc_host_spectral_scaling_params *param);
1317 
1318 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
1319 				      uint8_t *evt_buf,
1320 				      struct wmi_host_pdev_utf_event *param);
1321 
1322 QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
1323 				      uint8_t *evt_buf,
1324 				      struct wmi_host_pdev_qvit_event *param);
1325 
1326 QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
1327 		struct wlan_psoc_host_chainmask_table *chainmask_table);
1328 /**
1329  * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
1330  * @wmi_handle: wmi handle
1331  * @pdev_id: pdev id
1332  *
1333  * Return: QDF_STATUS
1334  */
1335 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
1336 		uint32_t pdev_id);
1337 
1338 /**
1339  * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
1340  * @wmi_handle: wmi handle
1341  * @pdev_id: pdev id
1342  *
1343  * Return: QDF_STATUS
1344  */
1345 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
1346 		uint32_t pdev_id);
1347 
1348 QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
1349 				struct set_country *param);
1350 
1351 #ifdef WLAN_FEATURE_ACTION_OUI
1352 /**
1353  * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw
1354  * @wmi_hdl: wma handle
1355  * @req: wmi action oui message to be send
1356  *
1357  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1358  */
1359 QDF_STATUS
1360 wmi_unified_send_action_oui_cmd(void *wmi_hdl,
1361 				struct action_oui_request *req);
1362 #endif /* WLAN_FEATURE_ACTION_OUI */
1363 
1364 /**
1365  * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
1366  * @wmi_hdl: wma handle
1367  * @get_rcpi_param: rcpi params
1368  *
1369  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1370  */
1371 QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
1372 					struct rcpi_req *get_rcpi_param);
1373 
1374 /**
1375  * wmi_extract_rcpi_response_event - api to extract RCPI event params
1376  * @wmi_handle: wma handle
1377  * @evt_buf: pointer to event buffer
1378  * @res: pointer to hold rcpi response from firmware
1379  *
1380  * Return: QDF_STATUS_SUCCESS for successful event parse
1381  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1382  */
1383 QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
1384 					   struct rcpi_res *res);
1385 
1386 #ifdef WMI_INTERFACE_EVENT_LOGGING
1387 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
1388 		       qdf_abstract_print *print, void *print_priv);
1389 
1390 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1391 			      qdf_abstract_print *print, void *print_priv);
1392 
1393 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
1394 			    qdf_abstract_print *print, void *print_priv);
1395 
1396 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1397 				   qdf_abstract_print *print, void *print_priv);
1398 
1399 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
1400 			 qdf_abstract_print *print, void *print_priv);
1401 
1402 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
1403 			    qdf_abstract_print *print, void *print_priv);
1404 
1405 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
1406 			      qdf_abstract_print *print, void *print_priv);
1407 
1408 #endif /* WMI_INTERFACE_EVENT_LOGGING */
1409 
1410 /**
1411  * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
1412  *  wds entries from FW
1413  * @wmi_hdl: wmi handle
1414  *
1415  * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
1416  *
1417  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
1418  */
1419 
1420 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl);
1421 
1422 /**
1423  * wmi_extract_wds_entry - api to extract wds entry
1424  * @wmi_hdl: wmi handle
1425  * @evt_buf: pointer to event buffer
1426  * @wds_entry: wds entry
1427  * @idx: index to point wds entry in event buffer
1428  *
1429  * Return: QDF_STATUS_SUCCESS for successful event parse
1430  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1431  */
1432 
1433 QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
1434 			struct wdsentry *wds_entry, u_int32_t idx);
1435 
1436 /**
1437  * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss
1438  *  detection configuration to FW.
1439  * @wmi_hdl: wmi handle
1440  * @cfg: obss detection configuration
1441  *
1442  * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw.
1443  *
1444  * Return: QDF_STATUS
1445  */
1446 
1447 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
1448 			struct wmi_obss_detection_cfg_param *cfg);
1449 
1450 /**
1451  * wmi_unified_extract_obss_detection_info() - WMI function to extract obss
1452  *  detection info from FW.
1453  * @wmi_hdl: wmi handle
1454  * @data: event data from firmware
1455  * @info: Pointer to hold obss detection info
1456  *
1457  * This function is used to extract obss info from firmware.
1458  *
1459  * Return: QDF_STATUS
1460  */
1461 
1462 QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
1463 						   uint8_t *data,
1464 						   struct wmi_obss_detect_info
1465 						   *info);
1466 
1467 #ifdef WLAN_SUPPORT_GREEN_AP
1468 QDF_STATUS wmi_extract_green_ap_egap_status_info(
1469 		void *wmi_hdl, uint8_t *evt_buf,
1470 		struct wlan_green_ap_egap_status_info *egap_status_info_params);
1471 #endif
1472 
1473 /**
1474  * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats
1475  * @wmi_hdl: wmi handle
1476  * @params: request params
1477  *
1478  * This function is used to send the roam scan stats request command to
1479  * firmware.
1480  *
1481  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1482  */
1483 QDF_STATUS
1484 wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl,
1485 				     struct wmi_roam_scan_stats_req *params);
1486 
1487 /**
1488  * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res
1489  * @wmi: wmi handle
1490  * @evt_buf: pointer to the event buffer
1491  * @vdev_id: output pointer to hold vdev id
1492  * @res_param: output pointer to hold extracted memory
1493  *
1494  * Return: QDF_STATUS
1495  */
1496 QDF_STATUS
1497 wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
1498 				    uint32_t *vdev_id,
1499 				    struct wmi_roam_scan_stats_res **res_param);
1500 
1501 /**
1502  * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event
1503  * @wmi: wmi handle
1504  * @evt_buf: pointer to the event buffer
1505  * @vdev_id: output pointer to hold vdev id
1506  * @tx_status: output pointer to hold bcn tx status
1507  *
1508  * Return: QDF_STATUS
1509  */
1510 QDF_STATUS
1511 wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf,
1512 				      uint32_t *vdev_id, uint32_t *tx_status);
1513 
1514 /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width
1515  * @wmi_hdl: wmi handle
1516  * @phymode: phy mode
1517  *
1518  * Return: wmi channel width
1519  */
1520 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
1521 					WMI_HOST_WLAN_PHY_MODE phymode);
1522 
1523 #ifdef QCA_SUPPORT_CP_STATS
1524 /**
1525  * wmi_extract_cca_stats() - api to extract congestion stats from event buffer
1526  * @wmi_handle: wma handle
1527  * @evt_buf: event buffer
1528  * @datalen: length of buffer
1529  * @stats: buffer to populated after stats extraction
1530  *
1531  * Return: status of operation
1532  */
1533 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
1534 				 struct wmi_host_congestion_stats *stats);
1535 #endif /* QCA_SUPPORT_CP_STATS */
1536 
1537 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
1538 /**
1539  * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd.
1540  * @wmi_hdl: wmi handle
1541  * @params: radar found params
1542  *
1543  * This function passes the average radar parameters to fw
1544  *
1545  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1546  */
1547 QDF_STATUS
1548 wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
1549 				    struct dfs_radar_found_params *params);
1550 
1551 /**
1552  * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw.
1553  * @wmi_hdl: wmi handle
1554  * @evt_buf: pointer to event buffer
1555  * @dfs_status_check: pointer to the host dfs status
1556  *
1557  * This function extracts the result of host dfs from fw
1558  *
1559  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1560  */
1561 QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
1562 					  uint32_t  *dfs_status_check);
1563 #endif
1564 #ifdef OL_ATH_SMART_LOGGING
1565 /**
1566  * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd
1567  * @wmi_hdl: wmi handle
1568  * @params: enable/disable
1569  *
1570  * This function enables/disable the smart logging feature
1571  *
1572  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1573  */
1574 QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
1575 						     uint32_t param);
1576 
1577 /**
1578  * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd
1579  * @wmi_hdl: wmi handle
1580  * @param:  Fatal event
1581  *
1582  * This function sends the smart log fatal events to the FW
1583  *
1584  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1585  */
1586 QDF_STATUS wmi_unified_send_smart_logging_fatal_cmd
1587 					(void *wmi_hdl,
1588 					struct wmi_debug_fatal_events *param);
1589 
1590 /**
1591  * wmi_extract_smartlog_ev() - extract smartlog event info from event
1592  * @wmi_handle: wmi handle
1593  * @param evt_buf: pointer to event buffer
1594  * @param ev: Pointer to hold fatal events
1595  *
1596  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1597  */
1598 QDF_STATUS wmi_extract_smartlog_ev
1599 				(void *wmi_hdl, void *evt_buf,
1600 				struct wmi_debug_fatal_events *ev);
1601 
1602 #endif /* OL_ATH_SMART_LOGGING */
1603 
1604 /**
1605  * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context
1606  * @wmi_handle: handle to wmi
1607  * @evt_buf: pointer to event buffer
1608  *
1609  * Event process by below function will be in worker thread context.
1610  * Use this method for events which are not critical and not
1611  * handled in protocol stack.
1612  *
1613  * Return: none
1614  */
1615 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
1616 					    void *evt_buf);
1617 
1618 /**
1619  * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe
1620  * status from event
1621  * @wmi_handle: wmi handle
1622  * @param evt_buf: pointer to event buffer
1623  * @param ev: Pointer to hold ctl status
1624  *
1625  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1626  */
1627 QDF_STATUS
1628 wmi_extract_ctl_failsafe_check_ev_param(void *wmi_hdl,
1629 					void *evt_buf,
1630 					struct wmi_host_pdev_ctl_failsafe_event
1631 					*param);
1632 
1633 #ifdef OBSS_PD
1634 /**
1635  * wmi_unified_send_obss_spatial_reuse_set_cmd() - send obss pd offset
1636  * @wmi_handle: wmi handle
1637  * @oobss_spatial_reuse_param: Pointer to obsspd min max offset
1638  *
1639  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1640  */
1641 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_handle,
1642 	struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param);
1643 
1644 /**
1645  * wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd() - send def thresh
1646  * @wmi_handle: wmi handle
1647  * @thresh: Pointer to def thresh
1648  *
1649  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1650  */
1651 QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl,
1652 	struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh);
1653 
1654 #endif /* OBSS_PD */
1655 
1656 /**
1657  * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target
1658  * defines. For legacy there is not conversion required. Just return pdev_id as
1659  * it is.
1660  * @wmi_hdl: wmi handle
1661  * @host_pdev_id: host pdev_id to be converted.
1662  * @target_pdev_id: Output target pdev id.
1663  *
1664  * Return: QDF_STATUS
1665  */
1666 QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl,
1667 					      uint32_t host_pdev_id,
1668 					      uint32_t *target_pdev_id);
1669 
1670 /**
1671  * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss
1672  *  color change enable to FW.
1673  * @wmi_hdl: wmi handle
1674  * @vdev_id: vdev ID
1675  * @enable: enable or disable color change handeling within firmware
1676  *
1677  * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw,
1678  * thereby firmware updates bss color when AP announces bss color change.
1679  *
1680  * Return: QDF_STATUS
1681  */
1682 QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
1683 							uint32_t vdev_id,
1684 							bool enable);
1685 
1686 /**
1687  * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss
1688  *  color collision detection configuration to FW.
1689  * @wmi_hdl: wmi handle
1690  * @cfg: obss color collision detection configuration
1691  *
1692  * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw.
1693  *
1694  * Return: QDF_STATUS
1695  */
1696 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
1697 		struct wmi_obss_color_collision_cfg_param *cfg);
1698 
1699 /**
1700  * wmi_unified_extract_obss_color_collision_info() - WMI function to extract
1701  *  obss color collision info from FW.
1702  * @wmi_hdl: wmi handle
1703  * @data: event data from firmware
1704  * @info: Pointer to hold bss color collision info
1705  *
1706  * This function is used to extract bss collision info from firmware.
1707  *
1708  * Return: QDF_STATUS
1709  */
1710 QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
1711 		uint8_t *data, struct wmi_obss_color_collision_info *info);
1712 
1713 #ifdef CRYPTO_SET_KEY_CONVERGED
1714 /**
1715  * wlan_crypto_cipher_to_wmi_cipher() - Convert crypto cipher to WMI cipher
1716  * @crypto_cipher: cipher type in crypto format
1717  *
1718  * Return: cipher type in WMI cipher type
1719  */
1720 uint8_t wlan_crypto_cipher_to_wmi_cipher(
1721 		enum wlan_crypto_cipher_type crypto_cipher);
1722 
1723 /**
1724  * wlan_crypto_cipher_to_cdp_sec_type() - Convert crypto cipher to CDP type
1725  * @crypto_cipher: cipher type in crypto format
1726  *
1727  * Return: security type in cdp_sec_type data format type
1728  */
1729 enum cdp_sec_type wlan_crypto_cipher_to_cdp_sec_type(
1730 		enum wlan_crypto_cipher_type crypto_cipher);
1731 
1732 #endif
1733 
1734 #ifdef WLAN_CFR_ENABLE
1735 /**
1736  * wmi_unified_send_peer_cfr_capture_cmd() - WMI function to start CFR capture
1737  * for a peer
1738  * @wmi_hdl: WMI handle
1739  * @param: configuration params for capture
1740  *
1741  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
1742  */
1743 QDF_STATUS
1744 wmi_unified_send_peer_cfr_capture_cmd(void *wmi_hdl,
1745 				      struct peer_cfr_params *param);
1746 #endif /* WLAN_CFR_ENABLE */
1747 #endif /* _WMI_UNIFIED_API_H_ */
1748