blob: 1789bc7f258e8e207a7eb6c1ddcb56c810ad2f5c [file] [log] [blame]
Govind Singhd475ea92016-03-06 19:55:02 +05301/*
Naveen Rawat79a787c2017-12-14 13:24:31 -08002 * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
Govind Singhd475ea92016-03-06 19:55:02 +05303 *
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/*
Govind Singh6ad6ada2016-02-04 18:42:30 +053029 * This file contains the API definitions for the Unified Wireless Module
30 * Interface (WMI).
Govind Singhd475ea92016-03-06 19:55:02 +053031 */
32
33#ifndef _WMI_UNIFIED_API_H_
34#define _WMI_UNIFIED_API_H_
35
36#include <osdep.h>
Himanshu Agarwal56c292f2016-07-19 15:41:51 +053037#ifdef CONFIG_MCL
Govind Singhd475ea92016-03-06 19:55:02 +053038#include "wmi.h"
Himanshu Agarwal56c292f2016-07-19 15:41:51 +053039#endif
Govind Singhd475ea92016-03-06 19:55:02 +053040#include "htc_api.h"
Govind Singh3ddda1f2016-03-09 11:34:12 +053041#include "wmi_unified_param.h"
Srinivas Pitla83aad502018-01-08 16:55:36 +053042#include "service_ready_param.h"
Mukul Sharma36d159b2017-01-30 19:55:40 +053043#include "wlan_objmgr_psoc_obj.h"
Himanshu Agarwal53d526b2017-01-05 14:23:18 +053044#include "wlan_mgmt_txrx_utils_api.h"
Mukul Sharmaba196f52017-02-25 01:50:47 +053045#ifdef WLAN_PMO_ENABLE
46#include "wmi_unified_pmo_api.h"
47#endif
Wu Gao07ba6b42017-03-13 20:17:34 +080048#ifdef CONVERGED_P2P_ENABLE
49#include "wlan_p2p_public_struct.h"
50#endif
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +053051#include "wlan_scan_public_structs.h"
Nachiket Kukadea6ffaab2017-12-15 12:36:58 +053052#ifdef WLAN_FEATURE_DISA
53#include "wlan_disa_public_struct.h"
54#endif
Govind Singhd475ea92016-03-06 19:55:02 +053055
Naveen Rawat79a787c2017-12-14 13:24:31 -080056#ifdef WLAN_FEATURE_NAN_CONVERGENCE
57#include "nan_public_structs.h"
58#endif
Himanshu Agarwal0d578ff2018-01-10 14:21:53 +053059#ifdef WLAN_SUPPORT_GREEN_AP
60#include "wlan_green_ap_api.h"
61#endif
Zhang Qian74a66aa2018-01-05 16:50:53 +080062#ifdef WLAN_FEATURE_DSRC
63#include "wlan_ocb_public_structs.h"
64#endif
Naveen Rawat79a787c2017-12-14 13:24:31 -080065
Govind Singhd7468a52016-03-09 14:32:57 +053066typedef 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
Govind Singhd475ea92016-03-06 19:55:02 +053088
Arif Hussainf6b0c992018-03-01 14:40:59 -080089#define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000
90
Kiran Venkatappa929dd292017-02-10 16:57:59 +053091struct wmi_soc;
Govind Singhd475ea92016-03-06 19:55:02 +053092/**
Govind Singh6ad6ada2016-02-04 18:42:30 +053093 * 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 */
Govind Singh3ddda1f2016-03-09 11:34:12 +053099struct wmi_rx_ops {
Govind Singh4ec6ff92016-03-09 12:03:29 +0530100
Govind Singh6ad6ada2016-02-04 18:42:30 +0530101 int (*wma_process_fw_event_handler_cbk)(void *ctx,
Govind Singh4ec6ff92016-03-09 12:03:29 +0530102 void *ev, uint8_t rx_ctx);
Govind Singh6ad6ada2016-02-04 18:42:30 +0530103};
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 */
111enum wmi_target_type {
112 WMI_TLV_TARGET,
Pratik Gandhi073fa002018-01-30 19:05:41 +0530113 WMI_NON_TLV_TARGET,
114 WMI_MAX_TARGET_TYPE
Govind Singh6ad6ada2016-02-04 18:42:30 +0530115};
116
117/**
Govind Singh4ec6ff92016-03-09 12:03:29 +0530118 * 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 */
123enum wmi_rx_exec_ctx {
124 WMI_RX_WORK_CTX,
125 WMI_RX_UMAC_CTX
126};
127
128/**
Govind Singhd475ea92016-03-06 19:55:02 +0530129 * attach for unified WMI
130 *
131 * @param scn_handle : handle to SCN.
Govind Singh89727882016-04-15 13:58:27 +0530132 * @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
Mukul Sharma36d159b2017-01-30 19:55:40 +0530135 * @psoc : objmgr psoc
Govind Singhd475ea92016-03-06 19:55:02 +0530136 * @return opaque handle.
137 */
138void *wmi_unified_attach(void *scn_handle,
Govind Singh6ad6ada2016-02-04 18:42:30 +0530139 osdev_t osdev, enum wmi_target_type target_type,
Mukul Sharma36d159b2017-01-30 19:55:40 +0530140 bool use_cookie, struct wmi_rx_ops *ops,
141 struct wlan_objmgr_psoc *psoc);
142
Govind Singh6ad6ada2016-02-04 18:42:30 +0530143
Sandeep Puligilla38a294f2016-06-13 15:42:55 -0700144
Sandeep Puligilla20fb76b2016-07-19 13:20:57 -0700145/**
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 */
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530156void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd,
Sandeep Puligilla20fb76b2016-07-19 13:20:57 -0700157 void *header, uint32_t vdev_id, uint32_t chanfreq);
Sandeep Puligilla38a294f2016-06-13 15:42:55 -0700158
Govind Singhd475ea92016-03-06 19:55:02 +0530159/**
160 * detach for unified WMI
161 *
162 * @param wmi_handle : handle to WMI.
163 * @return void.
164 */
165void wmi_unified_detach(struct wmi_unified *wmi_handle);
166
gaurank kathpaliaa2a2c712018-02-21 18:58:29 +0530167/**
168 * API to sync time between host and firmware
169 *
170 * @param wmi_handle : handle to WMI.
171 * @return void.
172 */
173void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl);
174
Govind Singhd475ea92016-03-06 19:55:02 +0530175void
176wmi_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__)
187wmi_buf_t
188wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint16_t len,
189 uint8_t *file_name, uint32_t line_num);
190#else
191wmi_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 */
199void 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
Govind Singh89727882016-04-15 13:58:27 +0530207 * @param cmd_id : WMI cmd id
Govind Singhd475ea92016-03-06 19:55:02 +0530208 * @return 0 on success and -ve on failure.
209 */
Houston Hoffman09f96f92016-09-27 23:29:49 -0700210QDF_STATUS
Govind Singh6ad6ada2016-02-04 18:42:30 +0530211wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
Himanshu Agarwal56c292f2016-07-19 15:41:51 +0530212 uint32_t cmd_id);
Govind Singhd475ea92016-03-06 19:55:02 +0530213
214/**
Soumya Bhat49a84812017-03-22 14:41:01 +0530215 * 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 */
224int
225wmi_unified_register_event(wmi_unified_t wmi_handle,
226 uint32_t event_id,
227 wmi_unified_event_handler handler_func);
228
229/**
Govind Singh4ec6ff92016-03-09 12:03:29 +0530230 * wmi_unified_register_event_handler() - WMI event handler
231 * registration function
Govind Singhd475ea92016-03-06 19:55:02 +0530232 *
Govind Singh4ec6ff92016-03-09 12:03:29 +0530233 * @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 *
Govind Singhd475ea92016-03-06 19:55:02 +0530238 * @return 0 on success and -ve on failure.
239 */
240int
241wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
Mukul Sharma6faf5a82017-11-03 19:26:54 +0530242 wmi_conv_event_id event_id,
Govind Singh4ec6ff92016-03-09 12:03:29 +0530243 wmi_unified_event_handler handler_func,
244 uint8_t rx_ctx);
Govind Singhd475ea92016-03-06 19:55:02 +0530245
246/**
Soumya Bhat070cd052017-03-27 12:26:56 +0530247 * 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 */
253int
254wmi_unified_unregister_event(wmi_unified_t wmi_handle,
255 uint32_t event_id);
256
257/**
Govind Singhd475ea92016-03-06 19:55:02 +0530258 * 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 */
264int
265wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle,
Mukul Sharma6faf5a82017-11-03 19:26:54 +0530266 wmi_conv_event_id event_id);
Govind Singhd475ea92016-03-06 19:55:02 +0530267
268/**
269 * request wmi to connet its htc service.
270 * @param wmi_handle : handle to WMI.
Govind Singh89727882016-04-15 13:58:27 +0530271 * @param htc_handle : handle to HTC.
Govind Singhd475ea92016-03-06 19:55:02 +0530272 * @return void
273 */
Kiran Venkatappa929dd292017-02-10 16:57:59 +0530274QDF_STATUS
Govind Singhd475ea92016-03-06 19:55:02 +0530275wmi_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
Govind Singh89727882016-04-15 13:58:27 +0530280 * @param wmi_handle : handle to WMI.
Govind Singhd475ea92016-03-06 19:55:02 +0530281 */
282
283int wmi_is_suspend_ready(wmi_unified_t wmi_handle);
284
285/**
Govind Singh89727882016-04-15 13:58:27 +0530286 * WMI API to get updated host_credits
287 * @param wmi_handle : handle to WMI.
Govind Singhd475ea92016-03-06 19:55:02 +0530288 */
289
290int wmi_get_host_credits(wmi_unified_t wmi_handle);
291
292/**
Govind Singh89727882016-04-15 13:58:27 +0530293 * WMI API to get WMI Pending Commands in the HTC queue
294 * @param wmi_handle : handle to WMI.
Govind Singhd475ea92016-03-06 19:55:02 +0530295 */
296
297int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
298
299/**
Govind Singh89727882016-04-15 13:58:27 +0530300 * WMI API to set target suspend state
301 * @param wmi_handle : handle to WMI.
302 * @param val : suspend state boolean
Govind Singhd475ea92016-03-06 19:55:02 +0530303 */
Govind Singhd475ea92016-03-06 19:55:02 +0530304void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
305
Govind Singh89727882016-04-15 13:58:27 +0530306/**
Sarada Prasanna Garnayakd49444c2017-01-05 19:30:07 +0530307 * WMI API to set bus suspend state
308 * @param wmi_handle: handle to WMI.
309 * @param val: suspend state boolean
310 */
311void 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 */
318void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag);
319
320/**
Ravi Kumar Bokkadf1f3ea2016-11-09 18:07:56 +0530321 * 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 */
327void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val);
328
329/**
Govind Singh89727882016-04-15 13:58:27 +0530330 * generic function to block unified WMI command
331 * @param wmi_handle : handle to WMI.
332 * @return 0 on success and -ve on failure.
333 */
334int
335wmi_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 */
342void
343wmi_flush_endpoint(wmi_unified_t wmi_handle);
344
345/**
Kiran Venkatappa49341042017-05-10 16:24:51 +0530346 * 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 */
352void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle);
353
354/**
Govind Singh89727882016-04-15 13:58:27 +0530355 * 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 */
361void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
Govind Singhd475ea92016-03-06 19:55:02 +0530362#ifdef FEATURE_RUNTIME_PM
363void
364wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val);
365bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle);
366#else
367static inline void
368wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val)
369{
370 return;
371}
372static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
373{
374 return false;
375}
376#endif
377
Kiran Venkatappa929dd292017-02-10 16:57:59 +0530378void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle);
379
380void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx);
381
Govind Singhd475ea92016-03-06 19:55:02 +0530382/**
Govind Singhd7468a52016-03-09 14:32:57 +0530383 * UMAC Callback to process fw event.
Govind Singh89727882016-04-15 13:58:27 +0530384 * @param wmi_handle : handle to WMI.
385 * @param evt_buf : wmi event buffer
Govind Singhd475ea92016-03-06 19:55:02 +0530386 */
Govind Singhd475ea92016-03-06 19:55:02 +0530387void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
388uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530389
390
Govind Singhd7468a52016-03-09 14:32:57 +0530391QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530392 uint8_t macaddr[IEEE80211_ADDR_LEN],
393 struct vdev_create_params *param);
394
Govind Singhd7468a52016-03-09 14:32:57 +0530395QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530396 uint8_t if_id);
397
Govind Singhd7468a52016-03-09 14:32:57 +0530398QDF_STATUS wmi_unified_vdev_restart_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530399 uint8_t macaddr[IEEE80211_ADDR_LEN],
400 struct vdev_start_params *param);
401
Govind Singhd7468a52016-03-09 14:32:57 +0530402QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530403 uint8_t vdev_id);
404
Govind Singhd7468a52016-03-09 14:32:57 +0530405QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530406 uint8_t bssid[IEEE80211_ADDR_LEN],
407 struct vdev_up_params *params);
408
Govind Singhd7468a52016-03-09 14:32:57 +0530409QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530410 uint8_t vdev_id);
411
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530412QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
413 struct vdev_start_params *req);
Chaithanya Garrepalli140a0532018-01-18 14:19:41 +0530414/**
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 */
421QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
422 struct vdev_scan_nac_rssi_params *req);
Himanshu Agarwal7e4f4bc2016-03-09 16:49:38 +0530423
424QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
425 struct hidden_ssid_vdev_restart_params *restart_params);
426
Govind Singhd7468a52016-03-09 14:32:57 +0530427QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530428 struct vdev_set_params *param);
429
Govind Singhd7468a52016-03-09 14:32:57 +0530430QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530431 uint8_t
432 peer_addr[IEEE80211_ADDR_LEN],
433 uint8_t vdev_id);
434
Govind Singhd7468a52016-03-09 14:32:57 +0530435QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530436 uint8_t peer_addr[IEEE80211_ADDR_LEN],
437 struct peer_flush_params *param);
438
Govind Singhd7468a52016-03-09 14:32:57 +0530439QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530440 uint8_t peer_addr[IEEE80211_ADDR_LEN],
441 struct peer_set_params *param);
442
Govind Singhd7468a52016-03-09 14:32:57 +0530443QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530444 struct peer_create_params *param);
445
Govind Singhd7468a52016-03-09 14:32:57 +0530446QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530447 uint8_t macaddr[IEEE80211_ADDR_LEN],
448 struct stats_request_params *param);
449
Govind Singhd7468a52016-03-09 14:32:57 +0530450QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal0d578ff2018-01-10 14:21:53 +0530451 uint32_t value, uint8_t pdev_id);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530452
Will Huang5325c7c2017-11-17 13:19:16 +0800453#ifdef FEATURE_WLAN_D0WOW
454QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
455 uint8_t mac_id);
456QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
457 uint8_t mac_id);
458#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +0530459
Govind Singhd7468a52016-03-09 14:32:57 +0530460QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530461 struct wow_cmd_params *param,
462 uint8_t mac_id);
463
Jeff Johnson6b8bda42016-10-07 13:03:02 -0700464QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl);
465
466QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
467 struct wow_add_wakeup_params *param);
468
469QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
470 struct wow_add_wakeup_pattern_params *param);
471
472QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
473 struct wow_remove_wakeup_pattern_params *param);
474
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530475#ifndef CONFIG_MCL
Govind Singh89727882016-04-15 13:58:27 +0530476QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh483138e2017-05-07 08:54:47 -0700477 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id);
Govind Singh89727882016-04-15 13:58:27 +0530478#else
Govind Singhd7468a52016-03-09 14:32:57 +0530479QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530480 uint8_t macaddr[IEEE80211_ADDR_LEN],
481 struct packet_enable_params *param);
Govind Singh89727882016-04-15 13:58:27 +0530482#endif
Govind Singh3ddda1f2016-03-09 11:34:12 +0530483
Keyur Parekh483138e2017-05-07 08:54:47 -0700484QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530485
Govind Singhd7468a52016-03-09 14:32:57 +0530486QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530487 struct suspend_params *param,
488 uint8_t mac_id);
489
Govind Singhd7468a52016-03-09 14:32:57 +0530490QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530491 uint8_t mac_id);
492
Govind Singhd7468a52016-03-09 14:32:57 +0530493QDF_STATUS
Govind Singh3ddda1f2016-03-09 11:34:12 +0530494wmi_unified_pdev_param_send(void *wmi_hdl,
495 struct pdev_params *param,
496 uint8_t mac_id);
497
Govind Singh89727882016-04-15 13:58:27 +0530498QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
499 struct beacon_tmpl_params *param);
500
501
Govind Singhd7468a52016-03-09 14:32:57 +0530502QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530503 struct beacon_params *param);
504
Govind Singhd7468a52016-03-09 14:32:57 +0530505QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530506 struct peer_assoc_params *param);
507
Govind Singhd7468a52016-03-09 14:32:57 +0530508QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530509 struct sta_ps_params *param);
510
Govind Singhd7468a52016-03-09 14:32:57 +0530511QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530512 uint8_t macaddr[IEEE80211_ADDR_LEN],
513 struct ap_ps_params *param);
514
Govind Singhd7468a52016-03-09 14:32:57 +0530515QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +0530516 struct scan_req_params *param);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530517
Govind Singhd7468a52016-03-09 14:32:57 +0530518QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +0530519 struct scan_cancel_param *param);
Govind Singh3ddda1f2016-03-09 11:34:12 +0530520
Govind Singhd7468a52016-03-09 14:32:57 +0530521QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530522 struct scan_chan_list_params *param);
523
524
Govind Singhd7468a52016-03-09 14:32:57 +0530525QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530526 struct crash_inject *param);
527
Govind Singhd7468a52016-03-09 14:32:57 +0530528QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530529 struct pdev_utf_params *param,
530 uint8_t mac_id);
531
Govind Singhd7468a52016-03-09 14:32:57 +0530532QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl,
Govind Singh3ddda1f2016-03-09 11:34:12 +0530533 struct dbglog_params *param);
534
Govind Singhd7468a52016-03-09 14:32:57 +0530535QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh50988cc2016-02-26 18:09:36 +0530536 struct wmi_mgmt_params *param);
537
Kiran Venkatappa25c47022017-03-19 22:58:09 +0530538QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
539 struct wmi_offchan_data_tx_params *param);
540
Govind Singhd7468a52016-03-09 14:32:57 +0530541QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh50988cc2016-02-26 18:09:36 +0530542 uint32_t param_value);
543
Govind Singhd7468a52016-03-09 14:32:57 +0530544QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh50988cc2016-02-26 18:09:36 +0530545 uint32_t vdev_id, uint8_t val);
Govind Singhd7468a52016-03-09 14:32:57 +0530546QDF_STATUS
Govind Singh50988cc2016-02-26 18:09:36 +0530547wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
548 struct sta_uapsd_trig_params *param);
549
Govind Singhd7468a52016-03-09 14:32:57 +0530550QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl);
Govind Singh50988cc2016-02-26 18:09:36 +0530551
Govind Singhd7468a52016-03-09 14:32:57 +0530552QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh50988cc2016-02-26 18:09:36 +0530553 struct p2p_ps_params *oppps);
554
Govind Singhd7468a52016-03-09 14:32:57 +0530555QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh50988cc2016-02-26 18:09:36 +0530556 struct p2p_ps_params *noa);
557
Wu Gao07ba6b42017-03-13 20:17:34 +0800558#ifdef CONVERGED_P2P_ENABLE
559QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
560 struct p2p_lo_start *param);
561
562QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
563#endif
564
Govind Singhd7468a52016-03-09 14:32:57 +0530565QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh50988cc2016-02-26 18:09:36 +0530566 int value);
567
Govind Singhd7468a52016-03-09 14:32:57 +0530568QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value);
Govind Singhe7b800c2016-03-01 15:30:53 +0530569
Zhang Qian74a66aa2018-01-05 16:50:53 +0800570#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 */
579QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530580 struct ocb_timing_advert_param *timing_advert);
581
Zhang Qian74a66aa2018-01-05 16:50:53 +0800582/**
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 */
590QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_handle,
Govind Singhe7b800c2016-03-01 15:30:53 +0530591 struct ocb_timing_advert_param *timing_advert);
592
Zhang Qian74a66aa2018-01-05 16:50:53 +0800593/**
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 */
600QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_handle,
601 struct ocb_config *config);
Govind Singhe7b800c2016-03-01 15:30:53 +0530602
Zhang Qian74a66aa2018-01-05 16:50:53 +0800603/**
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 */
610QDF_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 */
620QDF_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 */
630QDF_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 */
640QDF_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 */
650QDF_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 */
661QDF_STATUS
662wmi_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 */
674QDF_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 */
686QDF_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 */
700QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_handle,
701 void *evt_buf,
702 struct ocb_dcc_get_stats_response **response);
703#endif
Govind Singhe7b800c2016-03-01 15:30:53 +0530704
Govind Singhd7468a52016-03-09 14:32:57 +0530705QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh9bad0002016-03-01 15:54:59 +0530706 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
707
Govind Singhd7468a52016-03-09 14:32:57 +0530708QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh9bad0002016-03-01 15:54:59 +0530709 struct thermal_cmd_params *thermal_info);
710
Poddar, Siddarth794b9962016-04-28 15:49:11 +0530711QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
712 struct wmi_peer_rate_report_params *rate_report_params);
713
Govind Singhd7468a52016-03-09 14:32:57 +0530714QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd
Govind Singh9bad0002016-03-01 15:54:59 +0530715 (void *wmi_hdl,
716 uint32_t adapter_1_chan_freq,
717 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
718
Govind Singhd7468a52016-03-09 14:32:57 +0530719QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd
Govind Singh9bad0002016-03-01 15:54:59 +0530720 (void *wmi_hdl,
721 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
722
Govind Singhd7468a52016-03-09 14:32:57 +0530723QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh608e8892016-04-16 19:24:23 -0700724 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
725 uint32_t pdev_id);
Govind Singhae855362016-03-07 14:24:22 +0530726
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530727#ifdef CONFIG_MCL
Govind Singhd7468a52016-03-09 14:32:57 +0530728QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530729 wmi_bcn_send_from_host_cmd_fixed_param *param);
Govind Singh89727882016-04-15 13:58:27 +0530730#endif
Govind Singhae855362016-03-07 14:24:22 +0530731
Govind Singhd7468a52016-03-09 14:32:57 +0530732QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530733 uint8_t vdev_id, uint32_t max_retries,
734 uint32_t retry_interval);
735
736
Govind Singhd7468a52016-03-09 14:32:57 +0530737QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530738 struct sta_params *params);
739
Govind Singhd7468a52016-03-09 14:32:57 +0530740QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singhae855362016-03-07 14:24:22 +0530741 struct wmi_gtx_config *gtx_info);
742
Govind Singhd7468a52016-03-09 14:32:57 +0530743QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530744 uint8_t vdev_id,
Vikram Kandukurid2e75802017-06-01 16:47:51 +0530745 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]);
Govind Singhae855362016-03-07 14:24:22 +0530746
Govind Singhd7468a52016-03-09 14:32:57 +0530747QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530748 uint8_t vdev_id,
Krunal Soni36f17d42017-11-14 15:42:48 -0800749 struct wmi_probe_resp_params *probe_rsp_info);
Govind Singhae855362016-03-07 14:24:22 +0530750
Himanshu Agarwal9efd9bf2016-03-09 18:49:18 +0530751QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
752 struct set_key_params *key_params);
753
Nachiket Kukadee42cd4b2017-12-20 17:28:29 +0530754#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 */
Padma, Santhosh Kumar73524052016-09-11 18:24:59 +0530762QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukadee42cd4b2017-12-20 17:28:29 +0530763 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 */
774QDF_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
Padma, Santhosh Kumar73524052016-09-11 18:24:59 +0530778
Govind Singhd7468a52016-03-09 14:32:57 +0530779QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530780 A_UINT32 vdev_id, uint8_t *p2p_ie);
781
782
Govind Singhd7468a52016-03-09 14:32:57 +0530783QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530784 struct gateway_update_req_param *req);
785
Govind Singhd7468a52016-03-09 14:32:57 +0530786QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530787 struct rssi_monitor_param *req);
788
Govind Singhd7468a52016-03-09 14:32:57 +0530789QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530790 struct scan_mac_oui *psetoui);
791
Govind Singhd7468a52016-03-09 14:32:57 +0530792QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530793 struct wifi_passpoint_req_param *req);
794
Govind Singhd7468a52016-03-09 14:32:57 +0530795QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530796 struct wifi_passpoint_req_param *req);
797
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530798#ifdef CONFIG_MCL
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +0530799QDF_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);
Govind Singh89727882016-04-15 13:58:27 +0530802#endif
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +0530803
Varun Reddy Yeturu4cae4292017-07-20 09:45:01 -0700804/**
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 */
814QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl,
815 struct wmi_mawc_roam_params *params);
816
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +0530817QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
818 struct roam_offload_scan_rssi_params *roam_req);
819
820QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
821 struct roam_scan_filter_params *roam_req);
822
Govind Singhd7468a52016-03-09 14:32:57 +0530823QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530824 struct wifi_enhanched_pno_params *req);
825
Govind Singhd7468a52016-03-09 14:32:57 +0530826QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530827 struct ipa_offload_control_params *ipa_offload);
828
Govind Singhd7468a52016-03-09 14:32:57 +0530829QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530830 struct extscan_capabilities_params *pgetcapab);
831
Govind Singhd7468a52016-03-09 14:32:57 +0530832QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530833 struct extscan_cached_result_params *pcached_results);
834
835
Govind Singhd7468a52016-03-09 14:32:57 +0530836QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530837 struct extscan_capabilities_reset_params *reset_req);
838
839
Govind Singhd7468a52016-03-09 14:32:57 +0530840QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530841 struct extscan_set_sig_changereq_params *
842 psigchange);
843
Govind Singhd7468a52016-03-09 14:32:57 +0530844QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530845 struct extscan_bssid_hotlist_reset_params *photlist_reset);
846
Govind Singhd7468a52016-03-09 14:32:57 +0530847QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530848 struct extscan_stop_req_params *pstopcmd);
849
Govind Singhd7468a52016-03-09 14:32:57 +0530850QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530851 struct wifi_scan_cmd_req_params *pstart);
852
Govind Singhd7468a52016-03-09 14:32:57 +0530853QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530854 const struct plm_req_params *plm);
855
Govind Singhd7468a52016-03-09 14:32:57 +0530856QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singhae855362016-03-07 14:24:22 +0530857 const struct plm_req_params *plm,
858 uint32_t *gchannel_list);
859
Govind Singhd7468a52016-03-09 14:32:57 +0530860QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id);
Govind Singhae855362016-03-07 14:24:22 +0530861
Govind Singh89727882016-04-15 13:58:27 +0530862#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhd7468a52016-03-09 14:32:57 +0530863QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singhd4184662017-03-03 22:09:07 +0530864 struct pno_scan_req_params *pno);
Govind Singh89727882016-04-15 13:58:27 +0530865#endif
Govind Singhae855362016-03-07 14:24:22 +0530866
Varun Reddy Yeturu4fa519b2017-07-24 16:11:22 -0700867QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
868 struct nlo_mawc_params *params);
869
Govind Singhd7468a52016-03-09 14:32:57 +0530870QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singhae855362016-03-07 14:24:22 +0530871 uint8_t is_add_ts);
872
Govind Singhd7468a52016-03-09 14:32:57 +0530873QDF_STATUS wmi_unified_process_ll_stats_clear_cmd
Govind Singhae855362016-03-07 14:24:22 +0530874 (void *wmi_hdl, const struct ll_stats_clear_params *clear_req,
875 uint8_t addr[IEEE80211_ADDR_LEN]);
876
Govind Singhd7468a52016-03-09 14:32:57 +0530877QDF_STATUS wmi_unified_process_ll_stats_set_cmd
Govind Singhae855362016-03-07 14:24:22 +0530878 (void *wmi_hdl, const struct ll_stats_set_params *set_req);
879
Govind Singhd7468a52016-03-09 14:32:57 +0530880QDF_STATUS wmi_unified_process_ll_stats_get_cmd
Govind Singhae855362016-03-07 14:24:22 +0530881 (void *wmi_hdl, const struct ll_stats_get_params *get_req,
882 uint8_t addr[IEEE80211_ADDR_LEN]);
883
Padma, Santhosh Kumard3261902017-03-21 19:09:35 +0530884/**
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 */
891QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
892 uint8_t vdev_id);
893
Govind Singhd7468a52016-03-09 14:32:57 +0530894QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl);
Govind Singh229bc0d2016-03-07 15:33:31 +0530895
Govind Singhd7468a52016-03-09 14:32:57 +0530896QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id);
Govind Singh229bc0d2016-03-07 15:33:31 +0530897
Govind Singhd7468a52016-03-09 14:32:57 +0530898QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530899 struct link_status_params *link_status);
900
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530901#ifdef CONFIG_MCL
Govind Singhd7468a52016-03-09 14:32:57 +0530902QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530903 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind);
904
Govind Singhd7468a52016-03-09 14:32:57 +0530905QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh89727882016-04-15 13:58:27 +0530906 wmi_mac_addr peer_macaddr);
Himanshu Agarwal0d578ff2018-01-10 14:21:53 +0530907#endif
Govind Singh229bc0d2016-03-07 15:33:31 +0530908
Himanshu Agarwal0d578ff2018-01-10 14:21:53 +0530909#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singhd7468a52016-03-09 14:32:57 +0530910QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal0d578ff2018-01-10 14:21:53 +0530911 struct wlan_green_ap_egap_params *egap_params);
Govind Singh89727882016-04-15 13:58:27 +0530912#endif
Govind Singh229bc0d2016-03-07 15:33:31 +0530913
Govind Singhd7468a52016-03-09 14:32:57 +0530914QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530915 uint32_t cmd, uint32_t value1, uint32_t value2);
916
Naveen Rawat7f70d662017-10-26 18:50:19 -0700917QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
918 uint32_t cookie, uint32_t time);
919
Govind Singhd7468a52016-03-09 14:32:57 +0530920QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id);
Govind Singh229bc0d2016-03-07 15:33:31 +0530921
Paul Zhang6a857a92017-12-08 16:08:00 +0800922/**
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 */
929QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
930 struct wlm_latency_level_param *param);
931
Govind Singhd7468a52016-03-09 14:32:57 +0530932QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id);
Govind Singh229bc0d2016-03-07 15:33:31 +0530933
Naveen Rawat90bc8fd2017-05-13 15:56:57 -0700934#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 */
943QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
944 wmi_oem_dma_ring_cfg_req_fixed_param *cfg);
945#endif
946
Sathish Kumar3d3cf4f2017-11-17 17:30:41 +0530947/**
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 */
954QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
955 struct direct_buf_rx_cfg_req *cfg);
956
Govind Singhd7468a52016-03-09 14:32:57 +0530957QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajan7a59ca02016-07-21 15:02:44 -0700958 uint32_t data_len,
Govind Singh229bc0d2016-03-07 15:33:31 +0530959 uint8_t *data);
960
Govind Singhd7468a52016-03-09 14:32:57 +0530961QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530962 bool dfs_phyerr_filter_offload);
963
Kiran Venkatappa9da7e042016-08-09 22:52:35 +0530964#ifdef CONFIG_MCL
Govind Singhd7468a52016-03-09 14:32:57 +0530965QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530966 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah9d1f1ac2016-07-27 19:06:13 +0530967 uint32_t cmd_id,
968 uint8_t user_triggered);
Govind Singh89727882016-04-15 13:58:27 +0530969#endif
Govind Singh229bc0d2016-03-07 15:33:31 +0530970
Govind Singhd7468a52016-03-09 14:32:57 +0530971QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh229bc0d2016-03-07 15:33:31 +0530972 uint8_t vdev_id);
973
Govind Singhd7468a52016-03-09 14:32:57 +0530974QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl);
975QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh229bc0d2016-03-07 15:33:31 +0530976 uint8_t ac);
977
Govind Singhd7468a52016-03-09 14:32:57 +0530978QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530979 struct aggr_add_ts_param *aggr_qos_rsp_msg);
980
Govind Singhd7468a52016-03-09 14:32:57 +0530981QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530982 struct add_ts_param *msg);
983
Govind Singhd7468a52016-03-09 14:32:57 +0530984QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530985 struct periodic_tx_pattern *
986 pAddPeriodicTxPtrnParams,
987 uint8_t vdev_id);
988
Govind Singhd7468a52016-03-09 14:32:57 +0530989QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530990 uint8_t vdev_id,
991 uint8_t pattern_id);
992
Govind Singhd7468a52016-03-09 14:32:57 +0530993QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530994 struct stats_ext_params *preq);
995
Govind Singhd7468a52016-03-09 14:32:57 +0530996QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +0530997 struct ext_wow_params *params);
998
Govind Singhd7468a52016-03-09 14:32:57 +0530999QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301000 struct app_type2_params *appType2Params);
1001
Govind Singhd7468a52016-03-09 14:32:57 +05301002QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301003 uint32_t timer_val);
1004
Govind Singhd7468a52016-03-09 14:32:57 +05301005QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301006 struct nan_req_params *nan_req);
1007
Govind Singhd7468a52016-03-09 14:32:57 +05301008QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnson645f7a12017-10-04 19:19:20 -07001009 struct dhcp_offload_info_params *params);
Govind Singh229bc0d2016-03-07 15:33:31 +05301010
Govind Singhd7468a52016-03-09 14:32:57 +05301011QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl);
Govind Singh229bc0d2016-03-07 15:33:31 +05301012
Govind Singhd7468a52016-03-09 14:32:57 +05301013QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301014 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandlaacf22bf2017-06-06 13:27:56 +05301015 uint16_t regdmn5G, uint8_t ctl2G,
1016 uint8_t ctl5G);
Govind Singh229bc0d2016-03-07 15:33:31 +05301017
Govind Singhd7468a52016-03-09 14:32:57 +05301018QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301019 struct tdls_channel_switch_params *chan_switch_params);
1020
Govind Singhd7468a52016-03-09 14:32:57 +05301021QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301022 void *tdls_param, uint8_t tdls_state);
1023
Govind Singhd7468a52016-03-09 14:32:57 +05301024QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301025 struct tdls_peer_state_params *peerStateParams,
1026 uint32_t *ch_mhz);
1027
Govind Singhd7468a52016-03-09 14:32:57 +05301028QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301029 struct fw_dump_req_param *mem_dump_req);
1030
Govind Singhd7468a52016-03-09 14:32:57 +05301031QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh229bc0d2016-03-07 15:33:31 +05301032 struct vdev_ie_info_param *ie_info);
1033
Govind Singhd7468a52016-03-09 14:32:57 +05301034QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh71ee2d72016-03-07 16:30:32 +05301035 void *evt_buf);
1036
Govind Singhd7468a52016-03-09 14:32:57 +05301037QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301038 uint8_t *custom_addr);
1039
Govind Singhd7468a52016-03-09 14:32:57 +05301040QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301041 uint8_t *event,
1042 uint32_t len);
1043
Govind Singhd7468a52016-03-09 14:32:57 +05301044QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301045 struct wmi_wifi_start_log *start_log);
1046
Govind Singhd7468a52016-03-09 14:32:57 +05301047QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl);
Govind Singh2ae94372016-03-07 16:45:38 +05301048
Manishekar Chandrasekaranb8c59382016-04-21 19:16:32 +05301049QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
1050 struct wmi_pcl_chan_weights *msg);
Govind Singh2ae94372016-03-07 16:45:38 +05301051
Govind Singhd7468a52016-03-09 14:32:57 +05301052QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301053 uint32_t hw_mode_index);
1054
Manishekar Chandrasekaran81d7aaa2016-04-27 12:52:51 +05301055QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301056 struct wmi_dual_mac_config *msg);
1057
Govind Singhd7468a52016-03-09 14:32:57 +05301058QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301059 struct flashing_req_params *flashing);
1060
Govind Singhd7468a52016-03-09 14:32:57 +05301061QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301062 struct app_type1_params *app_type1_params);
1063
Govind Singhd7468a52016-03-09 14:32:57 +05301064QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301065 struct ssid_hotlist_request_params *request);
1066
Govind Singhd7468a52016-03-09 14:32:57 +05301067QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301068 uint8_t vdev_id);
1069
Govind Singhd7468a52016-03-09 14:32:57 +05301070QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301071 struct wmi_unit_test_cmd *wmi_utest);
1072
Govind Singhd7468a52016-03-09 14:32:57 +05301073QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301074 struct wmi_roam_invoke_cmd *roaminvoke,
1075 uint32_t ch_hz);
1076
Govind Singhd7468a52016-03-09 14:32:57 +05301077QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301078 uint32_t command, uint32_t vdev_id);
1079
Kiran Venkatappa9da7e042016-08-09 22:52:35 +05301080#ifdef CONFIG_MCL
Govind Singhd7468a52016-03-09 14:32:57 +05301081QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwalf9524e12017-09-28 11:51:35 +05301082 struct ap_profile_params *ap_profile);
Govind Singh89727882016-04-15 13:58:27 +05301083#endif
Govind Singh2ae94372016-03-07 16:45:38 +05301084
Govind Singhd7468a52016-03-09 14:32:57 +05301085QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301086 uint32_t scan_period,
1087 uint32_t scan_age,
1088 uint32_t vdev_id);
1089
Govind Singhd7468a52016-03-09 14:32:57 +05301090QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301091 uint8_t chan_count,
Varun Reddy Yeturub47fa402016-07-07 17:42:49 -07001092 uint32_t *chan_list,
Govind Singh2ae94372016-03-07 16:45:38 +05301093 uint8_t list_type, uint32_t vdev_id);
1094
Govind Singhd7468a52016-03-09 14:32:57 +05301095QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301096 uint32_t vdev_id,
1097 int32_t rssi_change_thresh,
1098 uint32_t bcn_rssi_weight,
1099 uint32_t hirssi_delay_btw_scans);
1100
Kapil Guptaf6eb7312017-02-24 15:50:03 +05301101/**
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 */
1108QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
1109 struct wmi_per_roam_config_req *req_buf);
1110
Govind Singhd7468a52016-03-09 14:32:57 +05301111QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singh2ae94372016-03-07 16:45:38 +05301112 struct ext_scan_setbssi_hotlist_params *
1113 photlist, int *buf_len);
Govind Singh89727882016-04-15 13:58:27 +05301114
Dustin Brown4def3162017-01-13 15:24:07 -08001115/**
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 */
1123QDF_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
Govind Singh89727882016-04-15 13:58:27 +05301128QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
1129 uint8_t macaddr[IEEE80211_ADDR_LEN],
1130 struct stats_request_params *param);
1131
1132QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
1133 uint32_t param);
1134
Sathish Kumar50232d72016-08-09 16:50:46 +05301135QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
1136 struct set_bwf_params *param);
1137
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05301138QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value);
1139
1140QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value);
1141
1142QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl,
1143 uint32_t value);
1144
1145QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl,
1146 uint32_t value);
1147
1148QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar7e566c52016-11-10 15:30:22 +05301149 struct btcoex_cfg_params *param);
1150
1151QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
1152 struct btcoex_cfg_params *param);
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05301153
Sathish Kumar612d0c22017-01-19 14:57:37 +05301154QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
1155 coex_ver_cfg_t *param);
1156
Sathish Kumar125754e2017-04-24 11:36:00 +05301157QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
1158 struct coex_config_params *param);
1159
Govind Singh89727882016-04-15 13:58:27 +05301160QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
1161 struct set_atf_params *param);
1162
1163QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
1164 struct fips_params *param);
1165
1166QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
1167 struct wlan_profile_params *param);
1168
1169QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
1170 struct wlan_profile_params *param);
1171
1172QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
1173 struct channel_param *param);
1174
1175QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
1176 struct ht_ie_params *param);
1177
1178QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
1179 struct vht_ie_params *param);
1180
1181QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
1182 struct wmm_update_params *param);
1183
1184QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
1185 struct ant_switch_tbl_params *param);
1186
1187QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
1188 struct ratepwr_table_params *param);
1189
1190QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl);
1191
1192QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
1193 struct ctl_table_params *param);
1194
1195QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
1196 struct mimogain_table_params *param);
1197
1198QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
1199 struct ratepwr_chainmsk_params *param);
1200
1201QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
1202 struct macaddr_params *param);
1203
1204QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl);
1205
1206QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl);
1207
1208QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
1209 struct acparams_params *param);
1210
1211QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
1212 struct vap_dscp_tid_map_params *param);
1213
1214QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
1215 struct proxy_ast_reserve_params *param);
1216
1217QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
1218 struct pdev_qvit_params *param);
1219
1220QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
1221 struct mcast_group_update_params *param);
1222
1223QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
1224 struct peer_add_wds_entry_params *param);
1225
1226QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
1227 struct peer_del_wds_entry_params *param);
1228
Jeevan Kukkalli28e8a162017-06-16 18:07:28 +05301229/**
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 */
1236QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
1237 struct set_bridge_mac_addr_params *param);
1238
1239
Govind Singh89727882016-04-15 13:58:27 +05301240QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
1241 struct peer_update_wds_entry_params *param);
1242
1243QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
1244
1245QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl);
1246
1247QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl);
1248
1249QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
1250 struct smart_ant_enable_params *param);
1251
1252QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
1253 struct smart_ant_rx_ant_params *param);
1254
1255QDF_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
1259QDF_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
1263QDF_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
1267QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
1268 struct smart_ant_enable_tx_feedback_params *param);
1269
1270QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
1271 struct vdev_spectral_configure_params *param);
1272
1273QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
1274 struct vdev_spectral_enable_params *param);
1275
1276QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
1277 struct bss_chan_info_request_params *param);
1278
1279QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
1280 struct thermal_mitigation_params *param);
1281
1282QDF_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
1286QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
1287 struct set_fwtest_params *param);
1288
1289QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
1290 struct config_ratemask_params *param);
1291
Sathish Kumar6190e772017-11-08 14:49:58 +05301292/**
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 */
1300QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
1301 struct set_custom_aggr_size_params *param);
Govind Singh89727882016-04-15 13:58:27 +05301302
Venkateswara Swamy Bandaru81f40dc2017-12-22 17:16:19 +05301303/**
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 */
1310QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
1311 struct set_qdepth_thresh_params *param);
1312
Govind Singh89727882016-04-15 13:58:27 +05301313QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
1314 struct pdev_set_regdomain_params *param);
1315
1316QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
1317 struct set_quiet_mode_params *param);
1318
1319QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
1320 struct set_beacon_filter_params *param);
1321
1322QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
1323 struct remove_beacon_filter_params *param);
1324
1325QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
1326 uint8_t macaddr[IEEE80211_ADDR_LEN],
1327 struct addba_clearresponse_params *param);
1328
1329QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
1330 uint8_t macaddr[IEEE80211_ADDR_LEN],
1331 struct addba_send_params *param);
1332
1333QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
1334 uint8_t macaddr[IEEE80211_ADDR_LEN],
1335 struct delba_send_params *param);
1336
1337QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
1338 uint8_t macaddr[IEEE80211_ADDR_LEN],
1339 struct addba_setresponse_params *param);
1340
1341QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
1342 uint8_t macaddr[IEEE80211_ADDR_LEN],
1343 struct singleamsdu_params *param);
1344
1345QDF_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
1349QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
1350 struct mu_scan_params *param);
1351
1352QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
1353 struct lteu_config_params *param);
1354
1355QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
1356 struct set_ps_mode_params *param);
1357
1358QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappaaf1dae32016-12-23 19:58:54 +05301359 struct wmi_init_cmd_param *param);
Govind Singh89727882016-04-15 13:58:27 +05301360
1361bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id);
1362
Kiran Venkatappa34bea522017-09-01 17:02:34 +05301363/**
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 */
Rajeev Kumar5d8497b2017-02-12 02:12:17 -08001370QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
1371 void *bitmap_buf);
Govind Singh89727882016-04-15 13:58:27 +05301372
Kiran Venkatappa34bea522017-09-01 17:02:34 +05301373/**
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 */
1380QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
1381 void *bitmap_buf);
1382
Govind Singh89727882016-04-15 13:58:27 +05301383QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf);
1384
1385QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001386 void *evt_buf,
1387 struct wlan_psoc_target_capability_info *ev);
Govind Singh89727882016-04-15 13:58:27 +05301388
1389QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001390 struct wlan_psoc_hal_reg_capability *hal_reg_cap);
Govind Singh89727882016-04-15 13:58:27 +05301391
1392host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
1393 void *evt_buf, uint8_t *num_entries);
1394
1395uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
1396
1397QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
1398 void *ev, uint8_t *macaddr);
1399
Manoj Ekbote66496392017-07-09 23:28:56 -07001400wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
1401 uint8_t *num_mac_addr);
1402
Kiran Venkatappaa40870a2017-11-10 20:50:12 +05301403/**
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 */
1412QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
1413 void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
1414
Govind Singh89727882016-04-15 13:58:27 +05301415QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
1416 void *ev, struct wmi_host_fw_ver *fw_ver);
1417
1418QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
1419 void *ev, struct wmi_host_fw_abi_ver *fw_ver);
1420
1421QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev);
1422
1423uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl,
Rajeev Kumar45fdf7f2017-01-25 12:46:21 -08001424 void *evt_b, uint32_t *len);
Govind Singh89727882016-04-15 13:58:27 +05301425
1426QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
1427 wmi_host_ext_resource_config *ext_cfg);
1428
nobeljd9c2dc82018-01-25 16:35:36 -08001429QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
1430 uint8_t mac_id);
Govind Singh89727882016-04-15 13:58:27 +05301431
1432QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
1433 struct packet_power_info_params *param);
1434
1435QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
1436 struct gpio_config_params *param);
1437
1438QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
1439 struct gpio_output_params *param);
1440
1441QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
1442 struct rtt_meas_req_test_params *param);
1443
1444QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
1445 struct rtt_meas_req_params *param);
1446
1447QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
1448 struct rtt_keepalive_req_params *param);
1449
1450QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
1451 struct lci_set_params *param);
1452
1453QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
1454 struct lcr_set_params *param);
1455
1456QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
1457 struct periodic_chan_stats_params *param);
1458
1459QDF_STATUS
1460wmi_send_atf_peer_request_cmd(void *wmi_hdl,
1461 struct atf_peer_request_params *param);
1462
1463QDF_STATUS
1464wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
1465 struct atf_grouping_params *param);
1466/* Extract APIs */
1467
1468QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl,
1469 void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);
1470
1471QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappa9b7a9592016-12-29 18:09:32 +05301472 void *evt_buf, struct wmi_host_dcs_interference_param *param);
Govind Singh89727882016-04-15 13:58:27 +05301473
1474QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
1475 wmi_host_ath_dcs_cw_int *cw_int);
1476
1477QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
1478 wmi_host_dcs_im_tgt_stats_t *wlan_stat);
1479
Govind Singh89727882016-04-15 13:58:27 +05301480QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappa9f5fcc02016-12-29 22:07:14 +05301481 struct wmi_host_fips_event_param *param);
1482
Govind Singh89727882016-04-15 13:58:27 +05301483QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
1484 wmi_host_vdev_start_resp *vdev_rsp);
Sathish Kumar744fbf72017-05-17 18:05:15 +05301485
Om Prakash Tripathi105b04b2017-11-24 16:53:07 +05301486/**
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 */
1496QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
1497 struct wmi_host_vdev_delete_resp *delele_rsp);
1498
Govind Singh89727882016-04-15 13:58:27 +05301499QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumar744fbf72017-05-17 18:05:15 +05301500 uint8_t idx, struct tbttoffset_params *tbtt_param);
1501
1502QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
1503 void *evt_buf, uint8_t idx,
1504 struct tbttoffset_params *tbtt_param);
1505
1506QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
1507 uint32_t *num_vdevs);
1508
1509QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
1510 uint32_t *num_vdevs);
Govind Singh89727882016-04-15 13:58:27 +05301511
1512QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwal53d526b2017-01-05 14:23:18 +05301513 struct mgmt_rx_event_params *hdr, uint8_t **bufp);
Govind Singh89727882016-04-15 13:58:27 +05301514
1515QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
1516 uint32_t *vdev_id);
1517
1518QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
1519 wmi_host_roam_event *ev);
1520
1521QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi91452bf2017-02-25 15:53:30 +05301522 struct scan_event *param);
Govind Singh89727882016-04-15 13:58:27 +05301523
Frank Liu0ba573b2017-03-15 17:51:43 +08001524#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 */
1533QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
1534 struct tdls_event_info *param);
1535#endif
1536
Govind Singh89727882016-04-15 13:58:27 +05301537QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
1538 wmi_host_mu_report_event *param);
1539
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05301540QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
1541 uint8_t idx, wmi_host_mu_db_entry *param);
1542
1543QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
1544 wmi_host_peer_txmu_cnt_event *param);
1545
1546QDF_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
1549QDF_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
Govind Singh89727882016-04-15 13:58:27 +05301552QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
1553 wmi_host_pdev_tpc_config_event *param);
1554
1555QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
1556 void *evt_buf, uint32_t *gpio_num);
1557
1558QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa3f061a92017-02-08 14:57:16 +05301559 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param);
Govind Singh89727882016-04-15 13:58:27 +05301560
1561QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
1562 wmi_host_pdev_nfcal_power_all_channels_event *param);
1563
1564QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
1565 wmi_host_pdev_tpc_event *param);
1566
1567QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
1568 void *evt_buf,
1569 wmi_host_pdev_generic_buffer_event *param);
1570
1571QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
1572 wmi_host_mgmt_tx_compl_event *param);
1573
Kiran Venkatappa25c47022017-03-19 22:58:09 +05301574QDF_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
Sathish Kumar907a7462017-02-27 10:35:40 +05301577QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
1578 void *evt_buf,
1579 struct pdev_csa_switch_count_status *param);
1580
Sathish Kumar744fbf72017-05-17 18:05:15 +05301581QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
1582 uint32_t *num_vdevs);
Govind Singh89727882016-04-15 13:58:27 +05301583
1584QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
1585 uint32_t idx, wmi_host_tim_info *tim_info);
1586
1587QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
1588 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc);
1589
Wu Gao07ba6b42017-03-13 20:17:34 +08001590#ifdef CONVERGED_P2P_ENABLE
1591QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl,
1592 void *evt_buf, struct p2p_lo_event *param);
1593
1594QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl,
1595 void *evt_buf, struct p2p_noa_info *param);
1596#endif
1597
Govind Singh89727882016-04-15 13:58:27 +05301598QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl,
1599 void *evt_buf, wmi_host_peer_sta_ps_statechange_event *ev);
1600
1601QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
1602 wmi_host_peer_sta_kickout_event *ev);
1603
1604QDF_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
Jeff Johnson6b8bda42016-10-07 13:03:02 -07001607QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
1608 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats);
1609
Govind Singh89727882016-04-15 13:58:27 +05301610QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
1611 wmi_host_rtt_event_hdr *ev);
1612
1613QDF_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
1617QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
1618 wmi_host_rtt_error_report_event *ev);
1619
Jeff Johnson6b8bda42016-10-07 13:03:02 -07001620QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
1621 uint32_t index, wmi_host_chan_stats *chan_stats);
1622
Govind Singh89727882016-04-15 13:58:27 +05301623QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi2f54fbb2017-04-19 16:57:31 +05301624 uint32_t *temp, uint32_t *level, uint32_t *pdev_id);
Govind Singh89727882016-04-15 13:58:27 +05301625
1626QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
1627 uint8_t idx, uint32_t *levelcount, uint32_t *dccount);
1628
1629QDF_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
1633QDF_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
1637QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
1638 uint16_t datalen, wmi_host_phyerr_t *phyerr);
1639
1640QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
1641 wmi_host_wlan_profile_ctx_t *profile_ctx);
1642
Govind Singh41da3152016-05-06 20:20:25 +05301643QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singh89727882016-04-15 13:58:27 +05301644 wmi_host_wlan_profile_t *profile_data);
1645
1646QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
1647 wmi_host_chan_info_event *chan_info);
1648
1649QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
1650 wmi_host_pdev_channel_hopping_event *ch_hopping);
1651
1652QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
1653 wmi_host_stats_event *stats_param);
1654
1655QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
1656 uint32_t index,
1657 wmi_host_pdev_stats *pdev_stats);
1658
Adil Saeed Musthafa0b6c7602017-08-23 17:32:11 -07001659QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
1660 wmi_unit_test_event *unit_test, uint32_t maxspace);
1661
Govind Singh89727882016-04-15 13:58:27 +05301662QDF_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
1666QDF_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
1670QDF_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
1673QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
1674 wmi_host_inst_stats_resp *inst_rssi_resp);
1675
1676QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
1677 uint32_t index, wmi_host_peer_stats *peer_stats);
1678
1679QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
1680 wmi_host_tx_data_traffic_ctrl_event *ev);
1681
Sathish Kumar7e2eaed2016-11-14 17:44:29 +05301682QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
1683 wmi_host_atf_peer_stats_event *ev);
1684
1685QDF_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
Govind Singh89727882016-04-15 13:58:27 +05301688QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
1689 uint32_t index, wmi_host_vdev_stats *vdev_stats);
1690
1691QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
1692 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
Govind Singhc10bde82016-05-02 17:59:24 +05301693
Gurumoorthi Gnanasambandhan18977552017-11-06 22:04:17 +05301694QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
1695 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
1696
Chaithanya Garrepalli140a0532018-01-18 14:19:41 +05301697/**
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 */
1705QDF_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
Govind Singhc10bde82016-05-02 17:59:24 +05301708QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
1709 struct wmi_power_dbg_params *param);
Sathish Kumar907a7462017-02-27 10:35:40 +05301710
1711QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
1712 struct multiple_vdev_restart_params *param);
1713
Jeff Johnsonefb43392017-12-14 15:50:16 -08001714/**
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 */
Manikandan Mohan7e5ad482016-12-13 13:14:06 -08001721QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
Jeff Johnsonefb43392017-12-14 15:50:16 -08001722 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 */
1730QDF_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 */
1741QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
1742 uint8_t *evt_buf,
1743 struct sar_limit_event *event);
1744
Gupta, Kapil7b768002016-04-25 19:14:19 +05301745QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
1746 struct wmi_adaptive_dwelltime_params *
1747 wmi_param);
Anurag Chouhan4d41be72016-07-22 20:19:54 +05301748QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
1749 struct set_fwtest_params *wmi_fwtest);
1750
Leo Chang8184e9c2016-09-28 13:43:36 -07001751QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
1752 struct rx_reorder_queue_setup_params *param);
1753QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
1754 struct rx_reorder_queue_remove_params *param);
Kiran Venkatappa9c71b362016-08-10 23:55:40 +05301755
1756QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001757 struct wlan_psoc_host_service_ext_param *param);
Kiran Venkatappa9c71b362016-08-10 23:55:40 +05301758QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
1759 void *wmi_hdl,
1760 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001761 struct wlan_psoc_host_hw_mode_caps *param);
Kiran Venkatappa9c71b362016-08-10 23:55:40 +05301762QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
1763 void *wmi_hdl,
Kiran Venkatappa176fe6c2016-12-26 15:38:06 +05301764 uint8_t *evt_buf,
1765 uint8_t hw_mode_id,
1766 uint8_t phy_id,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001767 struct wlan_psoc_host_mac_phy_caps *param);
Kiran Venkatappa9c71b362016-08-10 23:55:40 +05301768QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
1769 void *wmi_hdl,
1770 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar0b6b2852017-02-03 00:39:49 -08001771 struct wlan_psoc_host_hal_reg_capabilities_ext *param);
Sathish Kumar3d3cf4f2017-11-17 17:30:41 +05301772
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 */
1784QDF_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 */
1798QDF_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 */
1813QDF_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);
Sathish Kumar617535c2017-01-24 17:51:26 +05301817QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
1818 uint8_t *evt_buf,
1819 struct wmi_host_pdev_utf_event *param);
Vijay Pamidipatiadd0ba72017-01-17 12:53:05 +05301820
Kiran Venkatappa3d514982017-02-28 14:19:17 +05301821QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
1822 uint8_t *evt_buf,
1823 struct wmi_host_pdev_qvit_event *param);
1824
Vijay Pamidipatiadd0ba72017-01-17 12:53:05 +05301825QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl,
1826 uint8_t *evt_buf,
1827 struct wmi_host_peer_delete_response_event *param);
Arif Hussain85604fb2017-01-07 18:21:55 -08001828
Vikram Kandukuric83feb62017-03-07 18:40:13 +05301829QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
1830 struct wlan_psoc_host_chainmask_table *chainmask_table);
Arif Hussain85604fb2017-01-07 18:21:55 -08001831/**
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 */
1838QDF_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 */
1848QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
1849 uint32_t pdev_id);
Dustin Browne58fbc72017-04-03 17:00:07 -07001850
Kiran Kumar Lokeree70e6052017-04-24 00:56:03 -07001851QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
1852 struct set_country *param);
Vignesh Viswanathan90cd7742017-09-25 14:36:38 +05301853/*
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 */
1860QDF_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 */
1871QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
1872 struct hlp_params *req_buf);
1873#endif
Kiran Kumar Lokeree70e6052017-04-24 00:56:03 -07001874
Rajeev Kumar Sirasanagandlacddf6fe2016-11-22 21:28:54 +05301875/**
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 */
1882QDF_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 */
1894QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
1895 struct rcpi_res *res);
1896
Dustin Browne58fbc72017-04-03 17:00:07 -07001897#ifdef WMI_INTERFACE_EVENT_LOGGING
1898void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count,
1899 qdf_abstract_print *print, void *print_priv);
1900
1901void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1902 qdf_abstract_print *print, void *print_priv);
1903
1904void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count,
1905 qdf_abstract_print *print, void *print_priv);
1906
1907void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count,
1908 qdf_abstract_print *print, void *print_priv);
1909
1910void wmi_print_event_log(wmi_unified_t wmi, uint32_t count,
1911 qdf_abstract_print *print, void *print_priv);
1912
1913void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count,
1914 qdf_abstract_print *print, void *print_priv);
1915
1916void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count,
1917 qdf_abstract_print *print, void *print_priv);
Kiran Kumar Lokeree70e6052017-04-24 00:56:03 -07001918
Dustin Browne58fbc72017-04-03 17:00:07 -07001919#endif /* WMI_INTERFACE_EVENT_LOGGING */
1920
Nitesh Shahfb9e88b2017-05-22 15:49:00 +05301921QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
1922 struct wmi_dbs_scan_sel_params *wmi_param);
Ganesh Kondabattini20b086b2017-07-10 11:54:11 +05301923
1924QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
1925 struct wmi_limit_off_chan_param *wmi_param);
Anurag Chouhanc1705422017-09-11 14:56:30 +05301926QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
1927 struct set_arp_stats *req_buf);
1928QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
1929 struct get_arp_stats *req_buf);
Kiran Venkatappaf9b1de32017-11-08 19:32:23 +05301930
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 */
1938QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
1939 struct bcn_offload_control *bcn_ctrl_param);
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05301940/**
1941 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
1942 * wds entries from FW
Arif Hussain2cfde1d2017-12-27 16:23:45 -08001943 * @wmi_hdl: wmi handle
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05301944 *
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
1950QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl);
1951
1952/**
1953 * wmi_extract_wds_entry - api to extract wds entry
Arif Hussain2cfde1d2017-12-27 16:23:45 -08001954 * @wmi_hdl: wmi handle
Rathees kumar Chinannanaff64b02017-11-22 17:03:57 +05301955 * @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
1963QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
1964 struct wdsentry *wds_entry, u_int32_t idx);
Naveen Rawat79a787c2017-12-14 13:24:31 -08001965
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 */
1974QDF_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 */
1984QDF_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 */
1994QDF_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 */
2005QDF_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 */
2016QDF_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 */
2027QDF_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 */
2038QDF_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 */
2049QDF_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 */
2060QDF_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
Subrat Mishra7c9427e2017-09-27 14:41:20 +05302064
yeshwanth sriram guntuka230af892017-09-01 17:56:07 +05302065/**
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 */
2072QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
2073 struct wmi_btm_config *params);
Arif Hussain2cfde1d2017-12-27 16:23:45 -08002074
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
2086QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
2087 struct wmi_obss_detection_cfg_param *cfg);
Arif Hussainf9f26b52018-01-12 13:15:04 -08002088
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
2101QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
2102 uint8_t *data,
2103 struct wmi_obss_detect_info
2104 *info);
Arif Hussainb4da3472018-01-22 01:19:36 -08002105/**
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
2118QDF_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
2133QDF_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
2148QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
2149 uint8_t *data, struct wmi_obss_color_collision_info *info);
Arif Hussainf9f26b52018-01-12 13:15:04 -08002150
Himanshu Agarwal3f5d65a2018-01-24 22:24:17 +05302151#ifdef WLAN_SUPPORT_GREEN_AP
2152QDF_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
Subrat Mishra7c9427e2017-09-27 14:41:20 +05302157#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 */
2165QDF_STATUS
2166wmi_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 */
2177QDF_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 */
2187QDF_STATUS wmi_unified_fils_discovery_send_cmd(void *wmi_hdl,
2188 struct fd_params *param);
2189#endif /* WLAN_SUPPORT_FILS */
Vignesh Viswanathan51994e32018-01-18 19:06:40 +05302190
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 */
2200QDF_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 */
2211QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
2212 struct wmi_invoke_neighbor_report_params *params);
Govind Singhd475ea92016-03-06 19:55:02 +05302213#endif /* _WMI_UNIFIED_API_H_ */