xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_api.h (revision 92d87f51612f6c3b2285266215edee8911647c2f)
1 /*
2  * Copyright (c) 2013-2018 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_PMO_ENABLE
37 #include "wmi_unified_pmo_api.h"
38 #endif
39 #ifdef CONVERGED_P2P_ENABLE
40 #include "wlan_p2p_public_struct.h"
41 #endif
42 #include "wlan_scan_public_structs.h"
43 #ifdef WLAN_FEATURE_DISA
44 #include "wlan_disa_public_struct.h"
45 #endif
46 
47 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
48 #include "nan_public_structs.h"
49 #endif
50 #ifdef WLAN_SUPPORT_GREEN_AP
51 #include "wlan_green_ap_api.h"
52 #endif
53 #ifdef WLAN_FEATURE_DSRC
54 #include "wlan_ocb_public_structs.h"
55 #endif
56 #ifdef WLAN_SUPPORT_TWT
57 #include "wmi_unified_twt_param.h"
58 #include "wmi_unified_twt_api.h"
59 #endif
60 
61 #ifdef FEATURE_WLAN_EXTSCAN
62 #include "wmi_unified_extscan_api.h"
63 #endif
64 
65 #ifdef IPA_OFFLOAD
66 #include "wlan_ipa_public_struct.h"
67 #endif
68 
69 typedef qdf_nbuf_t wmi_buf_t;
70 #define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
71 
72 #define WMI_LOGD(args ...) \
73 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args)
74 #define WMI_LOGI(args ...) \
75 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args)
76 #define WMI_LOGW(args ...) \
77 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args)
78 #define WMI_LOGE(args ...) \
79 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args)
80 #define WMI_LOGP(args ...) \
81 	QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args)
82 
83 
84 
85 #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000
86 
87 struct wmi_soc;
88 struct policy_mgr_dual_mac_config;
89 /**
90  * struct wmi_ops - service callbacks to upper layer
91  * @service_ready_cbk: service ready callback
92  * @service_ready_ext_cbk: service ready ext callback
93  * @ready_cbk: ready calback
94  * @wma_process_fw_event_handler_cbk: generic event handler callback
95  */
96 struct wmi_rx_ops {
97 
98 	int (*wma_process_fw_event_handler_cbk)(void *ctx,
99 				  void *ev, uint8_t rx_ctx);
100 };
101 
102 /**
103  * enum wmi_target_type - type of supported wmi command
104  * @WMI_TLV_TARGET: tlv based target
105  * @WMI_NON_TLV_TARGET: non-tlv based target
106  *
107  */
108 enum wmi_target_type {
109 	WMI_TLV_TARGET,
110 	WMI_NON_TLV_TARGET,
111 	WMI_MAX_TARGET_TYPE
112 };
113 
114 /**
115  * enum wmi_rx_exec_ctx - wmi rx execution context
116  * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
117  * @WMI_RX_UMAC_CTX: execution context provided by umac layer
118  *
119  */
120 enum wmi_rx_exec_ctx {
121 	WMI_RX_WORK_CTX,
122 	WMI_RX_UMAC_CTX
123 };
124 
125 /**
126  * struct wmi_unified_attach_params - wmi init parameters
127  *  @param osdev            : NIC device
128  *  @param target_type      : type of supported wmi command
129  *  @param use_cookie       : flag to indicate cookie based allocation
130  *  @param ops              : handle to wmi ops
131  *  @psoc                   : objmgr psoc
132  *  @max_commands           : max commands
133  */
134 struct wmi_unified_attach_params {
135 	osdev_t osdev;
136 	enum wmi_target_type target_type;
137 	bool use_cookie;
138 	struct wmi_rx_ops *rx_ops;
139 	struct wlan_objmgr_psoc *psoc;
140 	uint16_t max_commands;
141 };
142 
143 /**
144  * attach for unified WMI
145  *
146  *  @param scn_handle      : handle to SCN.
147  *  @param params          : attach params for WMI
148  *
149  */
150 void *wmi_unified_attach(void *scn_handle,
151 			 struct wmi_unified_attach_params *params);
152 
153 
154 
155 /**
156  * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro
157  *
158  * @wmi_handle: wmi handle
159  * @cmd: mgmt command
160  * @header: pointer to 802.11 header
161  * @vdev_id: vdev id
162  * @chanfreq: channel frequency
163  *
164  * Return: none
165  */
166 void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
167 			void *header, uint32_t vdev_id, uint32_t chanfreq);
168 
169 /**
170  * detach for unified WMI
171  *
172  *  @param wmi_handle      : handle to WMI.
173  *  @return void.
174  */
175 void wmi_unified_detach(struct wmi_unified *wmi_handle);
176 
177 /**
178  * API to sync time between host and firmware
179  *
180  *  @param wmi_handle      : handle to WMI.
181  *  @return void.
182  */
183 void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl);
184 
185 void
186 wmi_unified_remove_work(struct wmi_unified *wmi_handle);
187 
188 /**
189  * generic function to allocate WMI buffer
190  *
191  *  @param wmi_handle      : handle to WMI.
192  *  @param len             : length of the buffer
193  *  @return wmi_buf_t.
194  */
195 #ifdef NBUF_MEMORY_DEBUG
196 #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __FILE__, __LINE__)
197 wmi_buf_t
198 wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint16_t len,
199 		    uint8_t *file_name, uint32_t line_num);
200 #else
201 wmi_buf_t wmi_buf_alloc(wmi_unified_t wmi_handle, uint16_t len);
202 #endif
203 
204 /**
205  * generic function frees WMI net buffer
206  *
207  *  @param net_buf : Pointer ot net_buf to be freed
208  */
209 void wmi_buf_free(wmi_buf_t net_buf);
210 
211 /**
212  * generic function to send unified WMI command
213  *
214  *  @param wmi_handle      : handle to WMI.
215  *  @param buf             : wmi command buffer
216  *  @param buflen          : wmi command buffer length
217  *  @param cmd_id          : WMI cmd id
218  *  @return 0  on success and -ve on failure.
219  */
220 QDF_STATUS
221 wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
222 			uint32_t cmd_id);
223 
224 /**
225  * wmi_unified_register_event() - WMI event handler
226  * registration function for converged components
227  *
228  * @wmi_handle:   handle to WMI.
229  * @event_id:     WMI event ID
230  * @handler_func: Event handler call back function
231  *
232  *  @return 0  on success and -ve on failure.
233  */
234 int
235 wmi_unified_register_event(wmi_unified_t wmi_handle,
236 				   uint32_t event_id,
237 				   wmi_unified_event_handler handler_func);
238 
239 /**
240  * wmi_unified_register_event_handler() - WMI event handler
241  * registration function
242  *
243  * @wmi_handle:   handle to WMI.
244  * @event_id:     WMI event ID
245  * @handler_func: Event handler call back function
246  * @rx_ctx: rx event processing context
247  *
248  *  @return 0  on success and -ve on failure.
249  */
250 int
251 wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
252 				   wmi_conv_event_id event_id,
253 				   wmi_unified_event_handler handler_func,
254 				   uint8_t rx_ctx);
255 
256 /**
257  * WMI event handler unregister function for converged componets
258  *
259  *  @param wmi_handle      : handle to WMI.
260  *  @param event_id        : WMI event ID
261  *  @return 0  on success and -ve on failure.
262  */
263 int
264 wmi_unified_unregister_event(wmi_unified_t wmi_handle,
265 					 uint32_t event_id);
266 
267 /**
268  * WMI event handler unregister function
269  *
270  *  @param wmi_handle      : handle to WMI.
271  *  @param event_id        : WMI event ID
272  *  @return 0  on success and -ve on failure.
273  */
274 int
275 wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
276 					 wmi_conv_event_id event_id);
277 
278 /**
279  * request wmi to connet its htc service.
280  *  @param wmi_handle      : handle to WMI.
281  *  @param htc_handle      : handle to HTC.
282  *  @return void
283  */
284 QDF_STATUS
285 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
286 				void *htc_handle);
287 
288 /*
289  * WMI API to verify the host has enough credits to suspend
290  *  @param wmi_handle      : handle to WMI.
291  */
292 
293 int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
294 
295 /**
296  *  WMI API to get updated host_credits
297  *  @param wmi_handle      : handle to WMI.
298  */
299 
300 int wmi_get_host_credits(wmi_unified_t wmi_handle);
301 
302 /**
303  *  WMI API to get WMI Pending Commands in the HTC queue
304  *  @param wmi_handle      : handle to WMI.
305  */
306 
307 int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
308 
309 /**
310  *  WMI API to set target suspend state
311  *  @param wmi_handle      : handle to WMI.
312  *  @param val             : suspend state boolean
313  */
314 void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
315 
316 /**
317  * WMI API to set bus suspend state
318  * @param wmi_handle:	handle to WMI.
319  * @param val:		suspend state boolean
320  */
321 void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val);
322 
323 /**
324  * WMI API to set crash injection state
325  * @param wmi_handle:	handle to WMI.
326  * @param val:		crash injection state boolean
327  */
328 void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
329 
330 /**
331  * WMI API to set target assert
332  * @param wmi_handle: 	handle to WMI.
333  * @param val:		target assert config value.
334  *
335  * Return: 		none.
336  */
337 void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
338 
339 /**
340  * generic function to block unified WMI command
341  * @param wmi_handle      : handle to WMI.
342  * @return 0  on success and -ve on failure.
343  */
344 int
345 wmi_stop(wmi_unified_t wmi_handle);
346 
347 /**
348  * API to flush all the previous packets  associated with the wmi endpoint
349  *
350  * @param wmi_handle      : handle to WMI.
351  */
352 void
353 wmi_flush_endpoint(wmi_unified_t wmi_handle);
354 
355 /**
356  * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI
357  *                     By default pdev_id conversion is not done in WMI.
358  *                     This API can be used enable conversion in WMI.
359  * @param wmi_handle   : handle to WMI
360  * Return none
361  */
362 void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle);
363 
364 /**
365  * API to handle wmi rx event after UMAC has taken care of execution
366  * context
367  *
368  * @param wmi_handle      : handle to WMI.
369  * @param evt_buf         : wmi event buffer
370  */
371 void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
372 #ifdef FEATURE_RUNTIME_PM
373 void
374 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
375 bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
376 #else
377 static inline void
378 wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
379 {
380 	return;
381 }
382 static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
383 {
384 	return false;
385 }
386 #endif
387 
388 void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
389 
390 void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
391 
392 /**
393  * UMAC Callback to process fw event.
394  * @param wmi_handle      : handle to WMI.
395  * @param evt_buf         : wmi event buffer
396  */
397 void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
398 uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
399 
400 
401 QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
402 				 uint8_t macaddr[IEEE80211_ADDR_LEN],
403 				 struct vdev_create_params *param);
404 
405 QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
406 					  uint8_t if_id);
407 
408 QDF_STATUS wmi_unified_vdev_restart_send(void *wmi_hdl,
409 				uint8_t macaddr[IEEE80211_ADDR_LEN],
410 				struct vdev_start_params *param);
411 
412 QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
413 					uint8_t vdev_id);
414 
415 QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
416 			     uint8_t bssid[IEEE80211_ADDR_LEN],
417 				 struct vdev_up_params *params);
418 
419 QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl,
420 				uint8_t vdev_id);
421 
422 QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
423 				struct vdev_start_params *req);
424 /**
425  * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
426  * @param wmi_handle   : handle to WMI
427  * @param req          : pointer to hold nac rssi request data
428  *
429  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
430  */
431 QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
432 			struct vdev_scan_nac_rssi_params *req);
433 
434 QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
435 		struct hidden_ssid_vdev_restart_params *restart_params);
436 
437 QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
438 				struct vdev_set_params *param);
439 
440 QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
441 				    uint8_t
442 				    peer_addr[IEEE80211_ADDR_LEN],
443 				    uint8_t vdev_id);
444 
445 QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
446 					 uint8_t peer_addr[IEEE80211_ADDR_LEN],
447 					 struct peer_flush_params *param);
448 
449 QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
450 				uint8_t peer_addr[IEEE80211_ADDR_LEN],
451 				struct peer_set_params *param);
452 
453 QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
454 					struct peer_create_params *param);
455 
456 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
457 				uint8_t macaddr[IEEE80211_ADDR_LEN],
458 				struct stats_request_params *param);
459 
460 QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
461 					uint32_t value, uint8_t pdev_id);
462 
463 #ifdef FEATURE_WLAN_D0WOW
464 QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
465 				uint8_t mac_id);
466 QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
467 				uint8_t mac_id);
468 #endif
469 
470 QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
471 				struct wow_cmd_params *param,
472 				uint8_t mac_id);
473 
474 QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl);
475 
476 QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
477 		struct wow_add_wakeup_params *param);
478 
479 QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
480 		struct wow_add_wakeup_pattern_params *param);
481 
482 QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
483 		struct wow_remove_wakeup_pattern_params *param);
484 
485 #ifndef CONFIG_MCL
486 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
487 			WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id);
488 #else
489 QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
490 				uint8_t macaddr[IEEE80211_ADDR_LEN],
491 				struct packet_enable_params *param);
492 #endif
493 
494 QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id);
495 
496 QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
497 				struct suspend_params *param,
498 				uint8_t mac_id);
499 
500 QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
501 				uint8_t mac_id);
502 
503 QDF_STATUS
504 wmi_unified_pdev_param_send(void *wmi_hdl,
505 			   struct pdev_params *param,
506 				uint8_t mac_id);
507 
508 QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
509 				struct beacon_tmpl_params *param);
510 
511 
512 QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
513 				struct beacon_params *param);
514 
515 QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
516 				struct peer_assoc_params *param);
517 
518 QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
519 				struct sta_ps_params *param);
520 
521 QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
522 				uint8_t macaddr[IEEE80211_ADDR_LEN],
523 				struct ap_ps_params *param);
524 
525 QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
526 				struct scan_req_params *param);
527 
528 QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
529 				struct scan_cancel_param *param);
530 
531 QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
532 				struct scan_chan_list_params *param);
533 
534 
535 QDF_STATUS wmi_crash_inject(void *wmi_hdl,
536 				struct crash_inject *param);
537 
538 QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
539 				struct pdev_utf_params *param,
540 				uint8_t mac_id);
541 
542 #ifdef FEATURE_FW_LOG_PARSING
543 QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl,
544 				       struct dbglog_params *param);
545 #else
546 static inline QDF_STATUS
547 wmi_unified_dbglog_cmd_send(void *wmi_hdl,
548 			    struct dbglog_params *param)
549 {
550 	return QDF_STATUS_SUCCESS;
551 }
552 #endif
553 
554 QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
555 				struct wmi_mgmt_params *param);
556 
557 QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
558 				struct wmi_offchan_data_tx_params *param);
559 
560 QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
561 		uint32_t param_value);
562 
563 QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
564 			       uint32_t vdev_id, uint8_t val);
565 QDF_STATUS
566 wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
567 				struct sta_uapsd_trig_params *param);
568 
569 QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl);
570 
571 QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
572 		struct p2p_ps_params *oppps);
573 
574 QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
575 			struct p2p_ps_params *noa);
576 
577 #ifdef CONVERGED_P2P_ENABLE
578 QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
579 			struct p2p_lo_start *param);
580 
581 QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
582 #endif
583 
584 QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
585 			       int value);
586 
587 QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value);
588 
589 #ifdef WLAN_FEATURE_DSRC
590 /**
591  * wmi_unified_ocb_start_timing_advert() - start sending the timing
592  *  advertisement frames on a channel
593  * @wmi_handle: pointer to the wmi handle
594  * @timing_advert: pointer to the timing advertisement struct
595  *
596  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
597  */
598 QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_handle,
599 	struct ocb_timing_advert_param *timing_advert);
600 
601 /**
602  * wmi_unified_ocb_stop_timing_advert() - stop sending the timing
603  *  advertisement frames on a channel
604  * @wmi_handle: pointer to the wmi handle
605  * @timing_advert: pointer to the timing advertisement struct
606  *
607  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
608  */
609 QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_handle,
610 	struct ocb_timing_advert_param *timing_advert);
611 
612 /**
613  * wmi_unified_ocb_set_config() - send the OCB config to the FW
614  * @wmi_handle: pointer to the wmi handle
615  * @config: the OCB configuration
616  *
617  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
618  */
619 QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_handle,
620 				      struct ocb_config *config);
621 
622 /**
623  * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
624  * @wmi_handle: pointer to the wmi handle
625  * @req: request for tsf timer
626  *
627  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
628  */
629 QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_handle,
630 					 struct ocb_get_tsf_timer_param *req);
631 
632 /**
633  * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
634  * @wmi_handle: pointer to the wmi handle
635  * @vdev_id: vdev id
636  *
637  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
638  */
639 QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_handle,
640 					    struct ocb_utc_param *utc);
641 
642 /**
643  * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
644  * @wmi_handle: pointer to the wmi handle
645  * @get_stats_param: pointer to the dcc stats
646  *
647  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
648  */
649 QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_handle,
650 		     struct ocb_dcc_get_stats_param *get_stats_param);
651 
652 /**
653  * wmi_unified_dcc_clear_stats() - command to clear the DCC stats
654  * @wmi_handle: pointer to the wmi handle
655  * @clear_stats_param: parameters to the command
656  *
657  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
658  */
659 QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_handle,
660 			struct ocb_dcc_clear_stats_param *clear_stats_param);
661 
662 /**
663  * wmi_unified_dcc_update_ndl() - command to update the NDL data
664  * @wmi_handle: pointer to the wmi handle
665  * @update_ndl_param: pointer to the request parameters
666  *
667  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
668  */
669 QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_handle,
670 		       struct ocb_dcc_update_ndl_param *update_ndl_param);
671 
672 /**
673  * wmi_extract_ocb_set_channel_config_resp() - extract status from wmi event
674  * @wmi_handle: wmi handle
675  * @evt_buf: pointer to event buffer
676  * @status: status buffer
677  *
678  * Return: QDF_STATUS_SUCCESS on success
679  */
680 QDF_STATUS
681 wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_handle,
682 					void *evt_buf,
683 					uint32_t *status);
684 
685 /**
686  * wmi_extract_ocb_tsf_timer() - extract tsf timer from wmi event
687  * @wmi_handle: wmi handle
688  * @evt_buf: pointer to event buffer
689  * @resp: tsf timer
690  *
691  * Return: QDF_STATUS_SUCCESS on success
692  */
693 QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_handle,
694 				     void *evt_buf,
695 				     struct ocb_get_tsf_timer_response *resp);
696 
697 /**
698  * wmi_extract_dcc_update_ndl_resp() - extract NDL update from wmi event
699  * @wmi_handle: wmi handle
700  * @evt_buf: pointer to event buffer
701  * @resp: ndl update status
702  *
703  * Return: QDF_STATUS_SUCCESS on success
704  */
705 QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_handle,
706 		void *evt_buf, struct ocb_dcc_update_ndl_response *resp);
707 
708 /**
709  * wmi_extract_dcc_stats() - extract DCC stats from wmi event
710  * @wmi_handle: wmi handle
711  * @evt_buf: pointer to event buffer
712  * @resp: DCC stats
713  *
714  * Since length of the response is variable, response buffer will be allocated.
715  * The caller must free the response buffer.
716  *
717  * Return: QDF_STATUS_SUCCESS on success
718  */
719 QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_handle,
720 				 void *evt_buf,
721 				 struct ocb_dcc_get_stats_response **response);
722 #endif
723 
724 QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
725 	 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
726 
727 QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
728 				struct thermal_cmd_params *thermal_info);
729 
730 QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
731 		struct wmi_peer_rate_report_params *rate_report_params);
732 
733 QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd
734 	(void *wmi_hdl,
735 	uint32_t adapter_1_chan_freq,
736 	uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
737 
738 QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd
739 	(void *wmi_hdl,
740 	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
741 
742 QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
743 		   void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
744 		   uint32_t pdev_id);
745 
746 #ifdef CONFIG_MCL
747 QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
748 			wmi_bcn_send_from_host_cmd_fixed_param *param);
749 #endif
750 
751 QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
752 				       uint8_t vdev_id, uint32_t max_retries,
753 					   uint32_t retry_interval);
754 
755 
756 QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
757 				struct sta_params *params);
758 
759 QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
760 				  struct wmi_gtx_config *gtx_info);
761 
762 QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
763 		     uint8_t vdev_id, bool mu_edca_param,
764 		     struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
765 
766 QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
767 		   uint8_t vdev_id,
768 		   struct wmi_probe_resp_params *probe_rsp_info);
769 
770 QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
771 			struct set_key_params *key_params);
772 
773 #ifdef WLAN_FEATURE_DISA
774 /**
775  * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
776  * @wmi_hdl: wmi handle
777  * @params: encrypt/decrypt params
778  *
779  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
780  */
781 QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
782 			struct disa_encrypt_decrypt_req_params *params);
783 
784 /**
785  * wmi_extract_encrypt_decrypt_resp_params() -
786  *       extract encrypt decrypt resp params from event buffer
787  * @wmi_handle: wmi handle
788  * @evt_buf: pointer to event buffer
789  * @resp: encrypt decrypt resp params
790  *
791  * Return: QDF_STATUS_SUCCESS for success or error code
792  */
793 QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
794 			uint8_t *evt_buf,
795 			struct disa_encrypt_decrypt_resp_params *resp);
796 #endif
797 
798 QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
799 				    uint32_t vdev_id, uint8_t *p2p_ie);
800 
801 
802 QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
803 					struct gateway_update_req_param *req);
804 
805 QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
806 					struct rssi_monitor_param *req);
807 
808 QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
809 			  struct scan_mac_oui *psetoui);
810 
811 #ifdef CONFIG_MCL
812 QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
813 				wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
814 				struct roam_offload_scan_params *roam_req);
815 #endif
816 
817 /**
818  * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters
819  * @wmi_hdl: wmi handle
820  * @params: Parameters to be configured
821  *
822  * Pass the MAWC(Motion Aided wireless connectivity) related roaming
823  * parameters from the host to the target
824  *
825  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
826  */
827 QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
828 			struct wmi_mawc_roam_params *params);
829 
830 QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
831 				struct roam_offload_scan_rssi_params *roam_req);
832 
833 QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
834 				struct roam_scan_filter_params *roam_req);
835 
836 #ifdef IPA_OFFLOAD
837 QDF_STATUS  wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
838 		struct ipa_uc_offload_control_params *ipa_offload);
839 #endif
840 
841 QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
842 			  const struct plm_req_params *plm);
843 
844 QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
845 			  const struct plm_req_params *plm,
846 			  uint32_t *gchannel_list);
847 
848 QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
849 
850 #ifdef FEATURE_WLAN_SCAN_PNO
851 QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
852 		   struct pno_scan_req_params *pno);
853 #endif
854 
855 QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
856 		struct nlo_mawc_params *params);
857 
858 QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
859 			uint8_t is_add_ts);
860 
861 QDF_STATUS wmi_unified_process_ll_stats_clear_cmd
862 	(void *wmi_hdl, const struct ll_stats_clear_params *clear_req,
863 	 uint8_t addr[IEEE80211_ADDR_LEN]);
864 
865 QDF_STATUS wmi_unified_process_ll_stats_set_cmd
866 	(void *wmi_hdl, const struct ll_stats_set_params *set_req);
867 
868 QDF_STATUS wmi_unified_process_ll_stats_get_cmd
869 	(void *wmi_hdl, const struct ll_stats_get_params  *get_req,
870 		 uint8_t addr[IEEE80211_ADDR_LEN]);
871 
872 /**
873  * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
874  * @wmi_hdl: wma handle
875  * @vdev_id: vdev id
876  *
877  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
878  */
879 QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
880 		uint8_t vdev_id);
881 
882 QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl);
883 
884 QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id);
885 
886 QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
887 				 struct link_status_params *link_status);
888 
889 #ifdef CONFIG_MCL
890 QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
891 				wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
892 
893 QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
894 					wmi_mac_addr peer_macaddr);
895 #endif
896 
897 #ifdef WLAN_SUPPORT_GREEN_AP
898 QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
899 		struct wlan_green_ap_egap_params *egap_params);
900 #endif
901 
902 QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
903 			uint32_t cmd, uint32_t value1, uint32_t value2);
904 
905 QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
906 					     uint32_t cookie, uint32_t time);
907 
908 QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id);
909 
910 /**
911  * wmi_unified_set_latency_config_cmd()
912  * @wmi_handle: wmi handle
913  * @param: WLM parameters
914  *
915  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
916  */
917 QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
918 					struct wlm_latency_level_param *param);
919 
920 QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id);
921 
922 #ifdef WLAN_FEATURE_CIF_CFR
923 /**
924  * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings
925  * @wmi_handle: wmi handle
926  * @data_len: len of dma cfg req
927  * @data: dma cfg req
928  *
929  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
930  */
931 QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
932 				wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
933 #endif
934 
935 /**
936  * wmi_unified_dbr_ring_cfg: Configure direct buffer rx rings
937  * @wmi_hdl: WMI handle
938  * @cfg: pointer to direct buffer rx config request
939  *
940  * Return: QDF status of operation
941  */
942 QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
943 				struct direct_buf_rx_cfg_req *cfg);
944 
945 QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
946 			  uint32_t data_len,
947 			  uint8_t *data);
948 
949 QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
950 			bool dfs_phyerr_filter_offload);
951 
952 #ifdef CONFIG_MCL
953 QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
954 				   WMI_PKTLOG_EVENT pktlog_event,
955 				   uint32_t cmd_id,
956 				   uint8_t user_triggered);
957 #endif
958 
959 QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
960 					uint8_t vdev_id);
961 
962 QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl);
963 QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
964 				uint8_t ac);
965 
966 QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
967 		      struct aggr_add_ts_param *aggr_qos_rsp_msg);
968 
969 QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
970 		 struct add_ts_param *msg);
971 
972 QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
973 						struct periodic_tx_pattern  *
974 						pAddPeriodicTxPtrnParams,
975 						uint8_t vdev_id);
976 
977 QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
978 						uint8_t vdev_id,
979 						uint8_t pattern_id);
980 
981 QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
982 			struct stats_ext_params *preq);
983 
984 QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
985 			struct ext_wow_params *params);
986 
987 QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
988 					  struct app_type2_params *appType2Params);
989 
990 QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
991 						  uint32_t timer_val);
992 
993 QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
994 			struct nan_req_params *nan_req);
995 
996 QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
997 				struct dhcp_offload_info_params *params);
998 
999 QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl);
1000 
1001 QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
1002 				   uint32_t reg_dmn, uint16_t regdmn2G,
1003 				   uint16_t regdmn5G, uint8_t ctl2G,
1004 				   uint8_t ctl5G);
1005 
1006 QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
1007 			      struct tdls_channel_switch_params *chan_switch_params);
1008 
1009 QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
1010 					 void *tdls_param, uint8_t tdls_state);
1011 
1012 QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
1013 			       struct tdls_peer_state_params *peerStateParams,
1014 				   uint32_t *ch_mhz);
1015 
1016 QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
1017 					struct fw_dump_req_param *mem_dump_req);
1018 
1019 QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
1020 				   struct vdev_ie_info_param *ie_info);
1021 
1022 QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
1023 		void *evt_buf);
1024 
1025 QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
1026 					 uint8_t *custom_addr);
1027 
1028 QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
1029 		uint8_t *event,
1030 		uint32_t len);
1031 
1032 QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
1033 		struct wmi_wifi_start_log *start_log);
1034 
1035 QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl);
1036 
1037 QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
1038 				struct wmi_pcl_chan_weights *msg);
1039 
1040 QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
1041 				uint32_t hw_mode_index);
1042 
1043 QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
1044 		struct policy_mgr_dual_mac_config *msg);
1045 
1046 QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
1047 				struct flashing_req_params *flashing);
1048 
1049 QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
1050 				   struct app_type1_params *app_type1_params);
1051 
1052 QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
1053 		     struct ssid_hotlist_request_params *request);
1054 
1055 QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
1056 		 uint8_t vdev_id);
1057 
1058 QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
1059 			       struct wmi_unit_test_cmd *wmi_utest);
1060 
1061 QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
1062 		struct wmi_roam_invoke_cmd *roaminvoke,
1063 		uint32_t ch_hz);
1064 
1065 QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
1066 					 uint32_t command, uint32_t vdev_id);
1067 
1068 #ifdef CONFIG_MCL
1069 QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
1070 				   struct ap_profile_params *ap_profile);
1071 #endif
1072 
1073 QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
1074 					     uint32_t scan_period,
1075 					     uint32_t scan_age,
1076 					     uint32_t vdev_id);
1077 
1078 QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
1079 				   uint8_t chan_count,
1080 				   uint32_t *chan_list,
1081 				   uint8_t list_type, uint32_t vdev_id);
1082 
1083 QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
1084 			  uint32_t vdev_id,
1085 			  int32_t rssi_change_thresh,
1086 			  uint32_t bcn_rssi_weight,
1087 			  uint32_t hirssi_delay_btw_scans);
1088 
1089 /**
1090  * wmi_unified_set_per_roam_config() - set PER roam config in FW
1091  * @wmi_hdl: wmi handle
1092  * @req_buf: per roam config request buffer
1093  *
1094  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1095  */
1096 QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
1097 		struct wmi_per_roam_config_req *req_buf);
1098 
1099 /**
1100  * wmi_unified_set_active_bpf_mode_cmd() - config active BPF mode in FW
1101  * @wmi_hdl: the WMI handle
1102  * @vdev_id: the Id of the vdev to apply the configuration to
1103  * @ucast_mode: the active BPF mode to configure for unicast packets
1104  * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast
1105  *	packets
1106  */
1107 QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl,
1108 				uint8_t vdev_id,
1109 				enum wmi_host_active_bpf_mode ucast_mode,
1110 				enum wmi_host_active_bpf_mode mcast_bcast_mode);
1111 
1112 QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
1113 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1114 				struct stats_request_params *param);
1115 
1116 QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
1117 				uint32_t param);
1118 
1119 QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
1120 				struct set_bwf_params *param);
1121 
1122 QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value);
1123 
1124 QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value);
1125 
1126 QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl,
1127 				uint32_t value);
1128 
1129 QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl,
1130 				uint32_t value);
1131 
1132 QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
1133 				struct btcoex_cfg_params *param);
1134 
1135 QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
1136 				struct btcoex_cfg_params *param);
1137 
1138 QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
1139 				coex_ver_cfg_t *param);
1140 
1141 QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
1142 					    struct coex_config_params *param);
1143 
1144 QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
1145 				struct set_atf_params *param);
1146 
1147 QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
1148 				struct fips_params *param);
1149 
1150 QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
1151 				struct wlan_profile_params *param);
1152 
1153 QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
1154 				struct wlan_profile_params *param);
1155 
1156 QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
1157 				struct channel_param *param);
1158 
1159 QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
1160 				struct ht_ie_params *param);
1161 
1162 QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
1163 				struct vht_ie_params *param);
1164 
1165 QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
1166 				struct wmm_update_params *param);
1167 
1168 QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
1169 				struct ant_switch_tbl_params *param);
1170 
1171 QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
1172 				struct ratepwr_table_params *param);
1173 
1174 QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl);
1175 
1176 QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
1177 				struct ctl_table_params *param);
1178 
1179 QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
1180 				struct mimogain_table_params *param);
1181 
1182 QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
1183 				struct ratepwr_chainmsk_params *param);
1184 
1185 QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
1186 				struct macaddr_params *param);
1187 
1188 QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl);
1189 
1190 QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl);
1191 
1192 QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
1193 				struct acparams_params *param);
1194 
1195 QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
1196 				struct vap_dscp_tid_map_params *param);
1197 
1198 QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
1199 				struct proxy_ast_reserve_params *param);
1200 
1201 QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
1202 				struct pdev_qvit_params *param);
1203 
1204 QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
1205 				struct mcast_group_update_params *param);
1206 
1207 QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
1208 				struct peer_add_wds_entry_params *param);
1209 
1210 QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
1211 				struct peer_del_wds_entry_params *param);
1212 
1213 /**
1214  *  wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
1215  *  @param wmi_hdl      : handle to WMI.
1216  *  @param param        : pointer to hold bridge mac addr param
1217  *
1218  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1219  */
1220 QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
1221 				struct set_bridge_mac_addr_params *param);
1222 
1223 
1224 QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
1225 				struct peer_update_wds_entry_params *param);
1226 
1227 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
1228 
1229 QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
1230 
1231 QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl);
1232 
1233 QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
1234 				struct smart_ant_enable_params *param);
1235 
1236 QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
1237 				struct smart_ant_rx_ant_params *param);
1238 
1239 QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
1240 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1241 				struct smart_ant_tx_ant_params *param);
1242 
1243 QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
1244 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1245 				struct smart_ant_training_info_params *param);
1246 
1247 QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
1248 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1249 				struct smart_ant_node_config_params *param);
1250 
1251 QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
1252 			struct smart_ant_enable_tx_feedback_params *param);
1253 
1254 QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
1255 				struct vdev_spectral_configure_params *param);
1256 
1257 QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
1258 				struct vdev_spectral_enable_params *param);
1259 
1260 QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
1261 				struct bss_chan_info_request_params *param);
1262 
1263 QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
1264 				struct thermal_mitigation_params *param);
1265 
1266 QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
1267 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1268 				struct set_neighbour_rx_params *param);
1269 
1270 QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
1271 				struct set_fwtest_params *param);
1272 
1273 QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
1274 				struct config_ratemask_params *param);
1275 
1276 /**
1277  *  wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
1278  *						       size command
1279  *  @param wmi_hdl      : handle to WMI.
1280  *  @param param        : pointer to hold custom aggr size param
1281  *
1282  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1283  */
1284 QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
1285 				struct set_custom_aggr_size_params *param);
1286 
1287 /**
1288  *  wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
1289  *  @param wmi_hdl      : handle to WMI.
1290  *  @param param        : pointer to hold set qdepth thresh param
1291  *
1292  *  @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1293  */
1294 QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
1295 				struct set_qdepth_thresh_params *param);
1296 
1297 QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
1298 				struct pdev_set_regdomain_params *param);
1299 
1300 QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
1301 				struct set_quiet_mode_params *param);
1302 
1303 QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
1304 				struct set_beacon_filter_params *param);
1305 
1306 QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
1307 				struct remove_beacon_filter_params *param);
1308 
1309 QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
1310 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1311 				struct addba_clearresponse_params *param);
1312 
1313 QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
1314 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1315 				struct addba_send_params *param);
1316 
1317 QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
1318 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1319 				struct delba_send_params *param);
1320 
1321 QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
1322 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1323 				struct addba_setresponse_params *param);
1324 
1325 QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
1326 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1327 				struct singleamsdu_params *param);
1328 
1329 QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
1330 				uint8_t macaddr[IEEE80211_ADDR_LEN],
1331 				struct set_qboost_params *param);
1332 
1333 QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
1334 				struct mu_scan_params *param);
1335 
1336 QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
1337 				struct lteu_config_params *param);
1338 
1339 QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
1340 				struct set_ps_mode_params *param);
1341 
1342 QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
1343 				struct wmi_init_cmd_param *param);
1344 
1345 bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id);
1346 
1347 /**
1348  * wmi_save_service_bitmap() - save service bitmap
1349  * @wmi_handle: wmi handle
1350  * @param evt_buf: pointer to event buffer
1351  *
1352  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1353  */
1354 QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
1355 				   void *bitmap_buf);
1356 
1357 /**
1358  * wmi_save_ext_service_bitmap() - save extended service bitmap
1359  * @wmi_handle: wmi handle
1360  * @param evt_buf: pointer to event buffer
1361  *
1362  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code
1363  */
1364 QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
1365 				   void *bitmap_buf);
1366 
1367 QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
1368 
1369 QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
1370 				void *evt_buf,
1371 				struct wlan_psoc_target_capability_info *ev);
1372 
1373 QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
1374 			struct wlan_psoc_hal_reg_capability *hal_reg_cap);
1375 
1376 host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
1377 				void *evt_buf, uint8_t *num_entries);
1378 
1379 uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
1380 
1381 QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
1382 				void *ev, uint8_t *macaddr);
1383 
1384 wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
1385 					      uint8_t *num_mac_addr);
1386 
1387 /**
1388  * wmi_extract_ready_params() - Extract data from ready event apart from
1389  *                     status, macaddr and version.
1390  * @wmi_handle: Pointer to WMI handle.
1391  * @evt_buf: Pointer to Ready event buffer.
1392  * @ev_param: Pointer to host defined struct to copy the data from event.
1393  *
1394  * Return: QDF_STATUS_SUCCESS on success.
1395  */
1396 QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
1397 		void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
1398 
1399 QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
1400 				void *ev, struct wmi_host_fw_ver *fw_ver);
1401 
1402 QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
1403 				void *ev, struct wmi_host_fw_abi_ver *fw_ver);
1404 
1405 QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev);
1406 
1407 uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl,
1408 				void *evt_b, uint32_t *len);
1409 
1410 QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
1411 				wmi_host_ext_resource_config *ext_cfg);
1412 
1413 QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
1414 						    uint8_t mac_id);
1415 
1416 QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
1417 				struct packet_power_info_params *param);
1418 
1419 QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
1420 				struct gpio_config_params *param);
1421 
1422 QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
1423 				struct gpio_output_params *param);
1424 
1425 QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
1426 				struct rtt_meas_req_test_params *param);
1427 
1428 QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
1429 				struct rtt_meas_req_params *param);
1430 
1431 QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
1432 				struct rtt_keepalive_req_params *param);
1433 
1434 QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
1435 				struct lci_set_params *param);
1436 
1437 QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
1438 				struct lcr_set_params *param);
1439 
1440 QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
1441 			struct periodic_chan_stats_params *param);
1442 
1443 QDF_STATUS
1444 wmi_send_atf_peer_request_cmd(void *wmi_hdl,
1445 			struct atf_peer_request_params *param);
1446 
1447 QDF_STATUS
1448 wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
1449 			struct atf_grouping_params *param);
1450 /* Extract APIs */
1451 
1452 QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl,
1453 		void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
1454 
1455 QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
1456 		void *evt_buf, struct wmi_host_dcs_interference_param *param);
1457 
1458 QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
1459 		wmi_host_ath_dcs_cw_int *cw_int);
1460 
1461 QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
1462 		wmi_host_dcs_im_tgt_stats_t *wlan_stat);
1463 
1464 QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
1465 		struct wmi_host_fips_event_param *param);
1466 
1467 QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
1468 		wmi_host_vdev_start_resp *vdev_rsp);
1469 
1470 /**
1471  * wmi_extract_vdev_delete_resp - api to extract vdev delete
1472  * response event params
1473  * @wmi_handle: wma handle
1474  * @evt_buf: pointer to event buffer
1475  * @delele_rsp: pointer to hold delete response from firmware
1476  *
1477  * Return: QDF_STATUS_SUCCESS for successful event parse
1478  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1479  */
1480 QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
1481 		struct wmi_host_vdev_delete_resp *delele_rsp);
1482 
1483 QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
1484 		uint8_t idx, struct tbttoffset_params *tbtt_param);
1485 
1486 QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
1487 		void *evt_buf, uint8_t idx,
1488 		struct tbttoffset_params *tbtt_param);
1489 
1490 QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
1491 					    uint32_t *num_vdevs);
1492 
1493 QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
1494 						uint32_t *num_vdevs);
1495 
1496 QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
1497 		struct mgmt_rx_event_params *hdr, uint8_t **bufp);
1498 
1499 QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
1500 		uint32_t *vdev_id);
1501 
1502 QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
1503 		wmi_host_roam_event *ev);
1504 
1505 QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
1506 		struct scan_event *param);
1507 
1508 #ifdef CONVERGED_TDLS_ENABLE
1509 /**
1510  * wmi_extract_vdev_tdls_ev_param - extract vdev tdls param from event
1511  * @wmi_handle: wmi handle
1512  * @param evt_buf: pointer to event buffer
1513  * @param param: Pointer to hold vdev tdls param
1514  *
1515  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1516  */
1517 QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
1518 					  struct tdls_event_info *param);
1519 #endif
1520 
1521 QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
1522 		wmi_host_mu_report_event *param);
1523 
1524 QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
1525 		uint8_t idx, wmi_host_mu_db_entry *param);
1526 
1527 QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
1528 		wmi_host_peer_txmu_cnt_event *param);
1529 
1530 QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
1531 		void *evt_buf, wmi_host_peer_gid_userpos_list_event *param);
1532 
1533 QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
1534 		void *evt_buf, wmi_host_pdev_check_cal_version_event *param);
1535 
1536 QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
1537 		wmi_host_pdev_tpc_config_event *param);
1538 
1539 QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
1540 		void *evt_buf, uint32_t *gpio_num);
1541 
1542 QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
1543 		void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
1544 
1545 QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
1546 		wmi_host_pdev_nfcal_power_all_channels_event *param);
1547 
1548 QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
1549 		wmi_host_pdev_tpc_event *param);
1550 
1551 QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
1552 		void *evt_buf,
1553 		wmi_host_pdev_generic_buffer_event *param);
1554 
1555 QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
1556 		wmi_host_mgmt_tx_compl_event *param);
1557 
1558 QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
1559 		struct wmi_host_offchan_data_tx_compl_event *param);
1560 
1561 QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
1562 		void *evt_buf,
1563 		struct pdev_csa_switch_count_status *param);
1564 
1565 QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
1566 		uint32_t *num_vdevs);
1567 
1568 QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
1569 		 uint32_t idx, wmi_host_tim_info *tim_info);
1570 
1571 QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
1572 			uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
1573 
1574 #ifdef CONVERGED_P2P_ENABLE
1575 QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl,
1576 		void *evt_buf, struct p2p_lo_event *param);
1577 
1578 QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl,
1579 		void *evt_buf, struct p2p_noa_info *param);
1580 #endif
1581 
1582 QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl,
1583 		void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
1584 
1585 QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
1586 		wmi_host_peer_sta_kickout_event *ev);
1587 
1588 QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
1589 		uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap);
1590 
1591 QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
1592 		 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
1593 
1594 QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
1595 		wmi_host_rtt_event_hdr *ev);
1596 
1597 QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
1598 		wmi_host_rtt_meas_event *ev, uint8_t *hdump,
1599 		uint16_t hdump_len);
1600 
1601 QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
1602 		wmi_host_rtt_error_report_event *ev);
1603 
1604 QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
1605 		uint32_t index, wmi_host_chan_stats *chan_stats);
1606 
1607 QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
1608 		uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
1609 
1610 QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
1611 		uint8_t idx, uint32_t *levelcount, uint32_t *dccount);
1612 
1613 QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
1614 			uint16_t datalen, uint16_t *buf_offset,
1615 			wmi_host_phyerr_t *phyerr);
1616 
1617 QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
1618 			uint16_t datalen, uint16_t *buf_offset,
1619 			wmi_host_phyerr_t *phyerr);
1620 
1621 QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
1622 			uint16_t datalen, wmi_host_phyerr_t *phyerr);
1623 
1624 QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
1625 			wmi_host_wlan_profile_ctx_t *profile_ctx);
1626 
1627 QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
1628 			wmi_host_wlan_profile_t *profile_data);
1629 
1630 QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
1631 			wmi_host_chan_info_event *chan_info);
1632 
1633 QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
1634 			wmi_host_pdev_channel_hopping_event *ch_hopping);
1635 
1636 QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
1637 					   wmi_host_stats_event *stats_param);
1638 
1639 QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
1640 					 uint32_t index,
1641 					 wmi_host_pdev_stats *pdev_stats);
1642 
1643 QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
1644 			wmi_unit_test_event *unit_test, uint32_t maxspace);
1645 
1646 QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
1647 			uint32_t index,
1648 			wmi_host_pdev_ext_stats *pdev_ext_stats);
1649 
1650 QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
1651 			uint32_t index,
1652 			wmi_host_peer_extd_stats *peer_extd_stats);
1653 
1654 QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
1655 			wmi_host_pdev_bss_chan_info_event *bss_chan_info);
1656 
1657 QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
1658 			wmi_host_inst_stats_resp *inst_rssi_resp);
1659 
1660 QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
1661 		uint32_t index, wmi_host_peer_stats *peer_stats);
1662 
1663 QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
1664 		wmi_host_tx_data_traffic_ctrl_event *ev);
1665 
1666 QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
1667 		wmi_host_atf_peer_stats_event *ev);
1668 
1669 QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf,
1670 		uint8_t idx, wmi_host_atf_peer_stats_info *atf_token_info);
1671 
1672 QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
1673 		uint32_t index, wmi_host_vdev_stats *vdev_stats);
1674 
1675 QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
1676 	uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats);
1677 
1678 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
1679 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
1680 
1681 QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
1682 		uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
1683 
1684 /**
1685  * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
1686  * @wmi_handle: wmi handle
1687  * @param evt_buf: pointer to event buffer
1688  * @param vdev_extd_stats: Pointer to hold nac rssi stats
1689  *
1690  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1691  */
1692 QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
1693 		struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats);
1694 
1695 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
1696 				struct wmi_power_dbg_params *param);
1697 
1698 QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
1699 				struct multiple_vdev_restart_params *param);
1700 
1701 /**
1702  * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw
1703  * @wmi_hdl: wmi handle
1704  * @params: sar limit command params
1705  *
1706  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1707  */
1708 QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
1709 					  struct sar_limit_cmd_params *params);
1710 
1711 /**
1712  * wmi_unified_get_sar_limit_cmd() - request current SAR limits from FW
1713  * @wmi_hdl: wmi handle
1714  *
1715  * Return: QDF_STATUS_SUCCESS for success or error code
1716  */
1717 QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl);
1718 
1719 /**
1720  * wmi_unified_extract_sar_limit_event() - extract SAR limits from FW event
1721  * @wmi_hdl: wmi handle
1722  * @evt_buf: event buffer received from firmware
1723  * @event: SAR limit event which is to be populated by data extracted from
1724  *         the @evt_buf buffer
1725  *
1726  * Return: QDF_STATUS_SUCCESS for success or error code
1727  */
1728 QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
1729 					       uint8_t *evt_buf,
1730 					       struct sar_limit_event *event);
1731 
1732 QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
1733 				   struct wmi_adaptive_dwelltime_params *
1734 				   wmi_param);
1735 QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
1736 				   struct set_fwtest_params *wmi_fwtest);
1737 
1738 QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
1739 					struct rx_reorder_queue_setup_params *param);
1740 QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
1741 					struct rx_reorder_queue_remove_params *param);
1742 
1743 QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
1744 		struct wlan_psoc_host_service_ext_param *param);
1745 QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
1746 			void *wmi_hdl,
1747 			uint8_t *evt_buf, uint8_t hw_mode_idx,
1748 			struct wlan_psoc_host_hw_mode_caps *param);
1749 QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
1750 			void *wmi_hdl,
1751 			uint8_t *evt_buf,
1752 			uint8_t hw_mode_id,
1753 			uint8_t phy_id,
1754 			struct wlan_psoc_host_mac_phy_caps *param);
1755 QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
1756 			void *wmi_hdl,
1757 			uint8_t *evt_buf, uint8_t phy_idx,
1758 			struct wlan_psoc_host_hal_reg_capabilities_ext *param);
1759 
1760 /**
1761  * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx
1762  *                                             capability received through
1763  *                                             extended service ready event
1764  * @wmi_hdl: WMI handle
1765  * @evt_buf: Event buffer
1766  * @idx: Index of the module for which capability is received
1767  * @param: Pointer to direct buffer rx ring cap struct
1768  *
1769  * Return: QDF status of operation
1770  */
1771 QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
1772 			void *wmi_hdl,
1773 			uint8_t *evt_buf, uint8_t idx,
1774 			struct wlan_psoc_host_dbr_ring_caps *param);
1775 
1776 /**
1777  * wmi_extract_dbr_buf_release_fixed : Extract direct buffer rx fixed param
1778  *                                     from buffer release event
1779  * @wmi_hdl: WMI handle
1780  * @evt_buf: Event buffer
1781  * @param: Pointer to direct buffer rx response struct
1782  *
1783  * Return: QDF status of operation
1784  */
1785 QDF_STATUS wmi_extract_dbr_buf_release_fixed(
1786 			void *wmi_hdl,
1787 			uint8_t *evt_buf,
1788 			struct direct_buf_rx_rsp *param);
1789 
1790 /**
1791  * wmi_extract_dbr_buf_release_entry: Extract direct buffer rx buffer tlv
1792  *
1793  * @wmi_hdl: WMI handle
1794  * @evt_buf: Event buffer
1795  * @idx: Index of the module for which capability is received
1796  * @param: Pointer to direct buffer rx entry
1797  *
1798  * Return: QDF status of operation
1799  */
1800 QDF_STATUS wmi_extract_dbr_buf_release_entry(
1801 			void *wmi_hdl,
1802 			uint8_t *evt_buf, uint8_t idx,
1803 			struct direct_buf_rx_entry *param);
1804 
1805 /**
1806  * wmi_extract_dbr_buf_metadata: Extract direct buffer metadata
1807  *
1808  * @wmi_hdl: WMI handle
1809  * @evt_buf: Event buffer
1810  * @idx: Index of the module for which capability is received
1811  * @param: Pointer to direct buffer metadata
1812  *
1813  * Return: QDF status of operation
1814  */
1815 QDF_STATUS wmi_extract_dbr_buf_metadata(
1816 			void *wmi_hdl,
1817 			uint8_t *evt_buf, uint8_t idx,
1818 			struct direct_buf_rx_metadata *param);
1819 
1820 QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
1821 				      uint8_t *evt_buf,
1822 				      struct wmi_host_pdev_utf_event *param);
1823 
1824 QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
1825 				      uint8_t *evt_buf,
1826 				      struct wmi_host_pdev_qvit_event *param);
1827 
1828 QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl,
1829 		uint8_t *evt_buf,
1830 		struct wmi_host_peer_delete_response_event *param);
1831 
1832 QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
1833 		struct wlan_psoc_host_chainmask_table *chainmask_table);
1834 /**
1835  * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload
1836  * @wmi_handle: wmi handle
1837  * @pdev_id: pdev id
1838  *
1839  * Return: QDF_STATUS
1840  */
1841 QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
1842 		uint32_t pdev_id);
1843 
1844 /**
1845  * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload
1846  * @wmi_handle: wmi handle
1847  * @pdev_id: pdev id
1848  *
1849  * Return: QDF_STATUS
1850  */
1851 QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
1852 		uint32_t pdev_id);
1853 
1854 QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
1855 				struct set_country *param);
1856 /*
1857  * wmi_unified_set_del_pmkid_cache() - set delete PMKID
1858  * @wmi_hdl: wma handle
1859  * @pmksa: pointer to pmk cache entry
1860  *
1861  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1862  */
1863 QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
1864 					struct wmi_unified_pmk_cache *pmksa);
1865 
1866 #if defined(WLAN_FEATURE_FILS_SK)
1867 /*
1868  * wmi_unified_roam_send_hlp_cmd() -send HLP command info
1869  * @wmi_hdl: wma handle
1870  * @req_buf: Pointer to HLP params
1871  *
1872  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1873  */
1874 QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
1875 					struct hlp_params *req_buf);
1876 #endif
1877 
1878 /**
1879  * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value
1880  * @wmi_hdl: wma handle
1881  * @get_rcpi_param: rcpi params
1882  *
1883  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1884  */
1885 QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
1886 					struct rcpi_req *get_rcpi_param);
1887 
1888 /**
1889  * wmi_extract_rcpi_response_event - api to extract RCPI event params
1890  * @wmi_handle: wma handle
1891  * @evt_buf: pointer to event buffer
1892  * @res: pointer to hold rcpi response from firmware
1893  *
1894  * Return: QDF_STATUS_SUCCESS for successful event parse
1895  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1896  */
1897 QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
1898 					   struct rcpi_res *res);
1899 
1900 #ifdef WMI_INTERFACE_EVENT_LOGGING
1901 void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
1902 		       qdf_abstract_print *print, void *print_priv);
1903 
1904 void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1905 			      qdf_abstract_print *print, void *print_priv);
1906 
1907 void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
1908 			    qdf_abstract_print *print, void *print_priv);
1909 
1910 void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1911 				   qdf_abstract_print *print, void *print_priv);
1912 
1913 void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
1914 			 qdf_abstract_print *print, void *print_priv);
1915 
1916 void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
1917 			    qdf_abstract_print *print, void *print_priv);
1918 
1919 void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
1920 			      qdf_abstract_print *print, void *print_priv);
1921 
1922 #endif /* WMI_INTERFACE_EVENT_LOGGING */
1923 
1924 QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
1925 				struct wmi_dbs_scan_sel_params *wmi_param);
1926 
1927 QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
1928 		struct wmi_limit_off_chan_param *wmi_param);
1929 QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
1930 					 struct set_arp_stats *req_buf);
1931 QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
1932 					 struct get_arp_stats *req_buf);
1933 
1934 /**
1935  * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
1936  * @wmi_hdl: wmi handle
1937  * @bcn_ctrl_param: pointer to bcn_offload_control param
1938  *
1939  * Return: QDF_STATUS_SUCCESS for success or error code
1940  */
1941 QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
1942 			struct bcn_offload_control *bcn_ctrl_param);
1943 /**
1944  * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
1945  *  wds entries from FW
1946  * @wmi_hdl: wmi handle
1947  *
1948  * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
1949  *
1950  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
1951  */
1952 
1953 QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl);
1954 
1955 /**
1956  * wmi_extract_wds_entry - api to extract wds entry
1957  * @wmi_hdl: wmi handle
1958  * @evt_buf: pointer to event buffer
1959  * @wds_entry: wds entry
1960  * @idx: index to point wds entry in event buffer
1961  *
1962  * Return: QDF_STATUS_SUCCESS for successful event parse
1963  *         else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
1964  */
1965 
1966 QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
1967 			struct wdsentry *wds_entry, u_int32_t idx);
1968 
1969 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
1970 /**
1971  * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW
1972  * @wmi_hdl: wmi handle
1973  * @req: pointer to request buffer
1974  *
1975  * Return: status of operation
1976  */
1977 QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
1978 				struct nan_datapath_initiator_req *req);
1979 
1980 /**
1981  * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW
1982  * @wmi_hdl: wmi handle
1983  * @req: pointer to request buffer
1984  *
1985  * Return: status of operation
1986  */
1987 QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
1988 				struct nan_datapath_responder_req *req);
1989 
1990 /**
1991  * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW
1992  * @wmi_hdl: wmi handle
1993  * @req: pointer to request buffer
1994  *
1995  * Return: status of operation
1996  */
1997 QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
1998 				struct nan_datapath_end_req *req);
1999 
2000 /**
2001  * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer
2002  * @wmi_hdl: wmi handle
2003  * @data: event buffer
2004  * @rsp: buffer to populate
2005  *
2006  * Return: status of operation
2007  */
2008 QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
2009 			uint8_t *data, struct nan_datapath_initiator_rsp *rsp);
2010 
2011 /**
2012  * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer
2013  * @wmi_hdl: wmi handle
2014  * @data: event buffer
2015  * @ind: buffer to populate
2016  *
2017  * Return: status of operation
2018  */
2019 QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
2020 			struct nan_datapath_indication_event *ind);
2021 
2022 /**
2023  * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer
2024  * @wmi_hdl: wmi handle
2025  * @data: event buffer
2026  * @ev: buffer to populate
2027  *
2028  * Return: status of operation
2029  */
2030 QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
2031 			struct nan_datapath_confirm_event *ev);
2032 
2033 /**
2034  * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer
2035  * @wmi_hdl: wmi handle
2036  * @data: event buffer
2037  * @rsp: buffer to populate
2038  *
2039  * Return: status of operation
2040  */
2041 QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
2042 			uint8_t *data, struct nan_datapath_responder_rsp *rsp);
2043 
2044 /**
2045  * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer
2046  * @wmi_hdl: wmi handle
2047  * @data: event buffer
2048  * @rsp: buffer to populate
2049  *
2050  * Return: status of operation
2051  */
2052 QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
2053 			struct nan_datapath_end_rsp_event *rsp);
2054 
2055 /**
2056  * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer
2057  * @wmi_hdl: wmi handle
2058  * @data: event buffer
2059  * @ind: buffer to populate
2060  *
2061  * Return: status of operation
2062  */
2063 QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
2064 			struct nan_datapath_end_indication_event **ind);
2065 
2066 /**
2067  * wmi_extract_ndp_sch_update - api to extract ndp sch update from event buffer
2068  * @wmi_hdl: wmi handle
2069  * @data: event buffer
2070  * @ind: buffer to populate
2071  *
2072  * Return: status of operation
2073  */
2074 QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
2075 				struct nan_datapath_sch_update_event *ind);
2076 #endif
2077 
2078 /**
2079  * wmi_unified_send_btm_config() - Send BTM config to fw
2080  * @wmi_hdl:  wmi handle
2081  * @params: pointer to wmi_btm_config
2082  *
2083  * Return: QDF_STATUS
2084  */
2085 QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
2086 				       struct wmi_btm_config *params);
2087 
2088 /**
2089  * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss
2090  *  detection configuration to FW.
2091  * @wmi_hdl: wmi handle
2092  * @cfg: obss detection configuration
2093  *
2094  * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw.
2095  *
2096  * Return: QDF_STATUS
2097  */
2098 
2099 QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
2100 			struct wmi_obss_detection_cfg_param *cfg);
2101 
2102 /**
2103  * wmi_unified_extract_obss_detection_info() - WMI function to extract obss
2104  *  detection info from FW.
2105  * @wmi_hdl: wmi handle
2106  * @data: event data from firmware
2107  * @info: Pointer to hold obss detection info
2108  *
2109  * This function is used to extract obss info from firmware.
2110  *
2111  * Return: QDF_STATUS
2112  */
2113 
2114 QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
2115 						   uint8_t *data,
2116 						   struct wmi_obss_detect_info
2117 						   *info);
2118 /**
2119  * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss
2120  *  color change enable to FW.
2121  * @wmi_hdl: wmi handle
2122  * @vdev_id: vdev ID
2123  * @enable: enable or disable color change handeling within firmware
2124  *
2125  * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw,
2126  * thereby firmware updates bss color when AP announces bss color change.
2127  *
2128  * Return: QDF_STATUS
2129  */
2130 
2131 QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
2132 							uint32_t vdev_id,
2133 							bool enable);
2134 
2135 /**
2136  * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss
2137  *  color collision detection configuration to FW.
2138  * @wmi_hdl: wmi handle
2139  * @cfg: obss color collision detection configuration
2140  *
2141  * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw.
2142  *
2143  * Return: QDF_STATUS
2144  */
2145 
2146 QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
2147 		struct wmi_obss_color_collision_cfg_param *cfg);
2148 
2149 /**
2150  * wmi_unified_extract_obss_color_collision_info() - WMI function to extract
2151  *  obss color collision info from FW.
2152  * @wmi_hdl: wmi handle
2153  * @data: event data from firmware
2154  * @info: Pointer to hold bss color collision info
2155  *
2156  * This function is used to extract bss collision info from firmware.
2157  *
2158  * Return: QDF_STATUS
2159  */
2160 
2161 QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
2162 		uint8_t *data, struct wmi_obss_color_collision_info *info);
2163 
2164 #ifdef WLAN_SUPPORT_GREEN_AP
2165 QDF_STATUS wmi_extract_green_ap_egap_status_info(
2166 		void *wmi_hdl, uint8_t *evt_buf,
2167 		struct wlan_green_ap_egap_status_info *egap_status_info_params);
2168 #endif
2169 
2170 #ifdef WLAN_SUPPORT_FILS
2171 /**
2172  * wmi_unified_fils_vdev_config_send_cmd() - send FILS config cmd to fw
2173  * @wmi_hdl: wmi handle
2174  * @param:   fils config params
2175  *
2176  * Return: QDF_STATUS_SUCCESS for success or error code
2177  */
2178 QDF_STATUS
2179 wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl,
2180 				      struct config_fils_params *param);
2181 
2182 /**
2183  * wmi_extract_swfda_vdev_id() - api to extract vdev id
2184  * @wmi_hdl: wmi handle
2185  * @evt_buf: pointer to event buffer
2186  * @vdev_id: pointer to vdev id
2187  *
2188  * Return: QDF_STATUS_SUCCESS for success or error code
2189  */
2190 QDF_STATUS wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf,
2191 				     uint32_t *vdev_id);
2192 
2193 /**
2194  * wmi_unified_fils_discovery_send_cmd() - send FILS discovery cmd to fw
2195  * @wmi_hdl: wmi handle
2196  * @param:   fils discovery params
2197  *
2198  * Return: QDF_STATUS_SUCCESS for success or error code
2199  */
2200 QDF_STATUS wmi_unified_fils_discovery_send_cmd(void *wmi_hdl,
2201 					       struct fd_params *param);
2202 #endif /* WLAN_SUPPORT_FILS */
2203 
2204 /**
2205  * wmi_unified_offload_11k_cmd() - send 11k offload command
2206  * @wmi_hdl: wmi handle
2207  * @params: 11k offload params
2208  *
2209  * This function passes the 11k offload command params to FW
2210  *
2211  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2212  */
2213 QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
2214 				struct wmi_11k_offload_params *params);
2215 /**
2216  * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd
2217  * @wmi_hdl: wmi handle
2218  * @params: invoke neighbor report params
2219  *
2220  * This function passes the invoke neighbor report command to fw
2221  *
2222  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2223  */
2224 QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
2225 			struct wmi_invoke_neighbor_report_params *params);
2226 
2227 /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width
2228  * @wmi_hdl: wmi handle
2229  * @phymode: phy mode
2230  *
2231  * Return: wmi channel width
2232  */
2233 wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
2234 					WMI_HOST_WLAN_PHY_MODE phymode);
2235 
2236 #ifdef QCA_SUPPORT_CP_STATS
2237 /**
2238  * wmi_extract_cca_stats() - api to extract congestion stats from event buffer
2239  * @wmi_handle: wma handle
2240  * @evt_buf: event buffer
2241  * @datalen: length of buffer
2242  * @stats: buffer to populated after stats extraction
2243  *
2244  * Return: status of operation
2245  */
2246 QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
2247 				 struct wmi_host_congestion_stats *stats);
2248 #endif /* QCA_SUPPORT_CP_STATS */
2249 
2250 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
2251 /**
2252  * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd.
2253  * @wmi_hdl: wmi handle
2254  * @params: radar found params
2255  *
2256  * This function passes the average radar parameters to fw
2257  *
2258  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2259  */
2260 QDF_STATUS
2261 wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
2262 				    struct dfs_radar_found_params *params);
2263 
2264 /**
2265  * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw.
2266  * @wmi_hdl: wmi handle
2267  * @evt_buf: pointer to event buffer
2268  * @dfs_status_check: pointer to the host dfs status
2269  *
2270  * This function extracts the result of host dfs from fw
2271  *
2272  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2273  */
2274 QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
2275 					  uint32_t  *dfs_status_check);
2276 #endif
2277 #endif /* _WMI_UNIFIED_API_H_ */
2278