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