blob: ca99db49e0045762773da68e92af30f7841578fc [file] [log] [blame]
Govind Singh5eb51532016-03-09 11:34:12 +05301/*
Paul Zhangd19abd82017-01-04 16:45:42 +08002 * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
Govind Singh5eb51532016-03-09 11:34:12 +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#include "athdefs.h"
28#include "osapi_linux.h"
29#include "a_types.h"
30#include "a_debug.h"
31#include "ol_if_athvar.h"
Govind Singh5eb51532016-03-09 11:34:12 +053032#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053033#include "wmi_unified_param.h"
34
35/**
36 * wmi_unified_vdev_create_send() - send VDEV create command to fw
37 * @wmi_handle: wmi handle
38 * @param: pointer to hold vdev create parameter
39 * @macaddr: vdev mac address
40 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053041 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053042 */
Govind Singhb53420c2016-03-09 14:32:57 +053043QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053044 uint8_t macaddr[IEEE80211_ADDR_LEN],
45 struct vdev_create_params *param)
46{
47 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
48
49 if (wmi_handle->ops->send_vdev_create_cmd)
50 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
51 macaddr, param);
52
Govind Singhb53420c2016-03-09 14:32:57 +053053 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053054}
55
56/**
57 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
58 * @wmi_handle: wmi handle
59 * @if_id: vdev id
60 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053061 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053062 */
Govind Singhb53420c2016-03-09 14:32:57 +053063QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053064 uint8_t if_id)
65{
66 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
67
68 if (wmi_handle->ops->send_vdev_delete_cmd)
69 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
70 if_id);
71
Govind Singhb53420c2016-03-09 14:32:57 +053072 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053073}
74
75/**
76 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
77 * @wmi: wmi handle
78 * @vdev_id: vdev id
79 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053080 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053081 */
Govind Singhb53420c2016-03-09 14:32:57 +053082QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053083 uint8_t vdev_id)
84{
85 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
86
87 if (wmi_handle->ops->send_vdev_stop_cmd)
88 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
89 vdev_id);
90
Govind Singhb53420c2016-03-09 14:32:57 +053091 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053092}
93
94/**
95 * wmi_unified_vdev_down_send() - send vdev down command to fw
96 * @wmi: wmi handle
97 * @vdev_id: vdev id
98 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053099 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530100 */
Govind Singhb53420c2016-03-09 14:32:57 +0530101QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530102{
103 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
104
105 if (wmi_handle->ops->send_vdev_down_cmd)
106 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
107
Govind Singhb53420c2016-03-09 14:32:57 +0530108 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530109}
110
111/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530112 * wmi_unified_vdev_start_send() - send vdev start command to fw
113 * @wmi: wmi handle
114 * @vdev_id: vdev id
115 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530116 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530117 */
118QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
119 struct vdev_start_params *req)
120{
121 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
122
123 if (wmi_handle->ops->send_vdev_start_cmd)
124 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
125
126 return QDF_STATUS_E_FAILURE;
127}
128
129/**
130 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
131 * @wmi: wmi handle
132 * @restart_params: vdev restart params
133 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530134 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530135 */
136QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
137 struct hidden_ssid_vdev_restart_params *restart_params)
138{
139 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
140
141 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
142 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
143 wmi_handle, restart_params);
144
145 return QDF_STATUS_E_FAILURE;
146}
147
148/**
Govind Singh5eb51532016-03-09 11:34:12 +0530149 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
150 * @wmi: wmi handle
151 * @peer_addr: peer mac address
152 * @param: pointer to hold peer flush tid parameter
153 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530154 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530155 */
Govind Singhb53420c2016-03-09 14:32:57 +0530156QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530157 uint8_t peer_addr[IEEE80211_ADDR_LEN],
158 struct peer_flush_params *param)
159{
160 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
161
162 if (wmi_handle->ops->send_peer_flush_tids_cmd)
163 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
164 peer_addr, param);
165
Govind Singhb53420c2016-03-09 14:32:57 +0530166 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530167}
168
169/**
170 * wmi_unified_peer_delete_send() - send PEER delete command to fw
171 * @wmi: wmi handle
172 * @peer_addr: peer mac addr
173 * @vdev_id: vdev id
174 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530175 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530176 */
Govind Singhb53420c2016-03-09 14:32:57 +0530177QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530178 uint8_t
179 peer_addr[IEEE80211_ADDR_LEN],
180 uint8_t vdev_id)
181{
182 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
183
184 if (wmi_handle->ops->send_peer_delete_cmd)
185 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
186 peer_addr, vdev_id);
187
Govind Singhb53420c2016-03-09 14:32:57 +0530188 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530189}
190
191/**
192 * wmi_set_peer_param() - set peer parameter in fw
193 * @wmi_ctx: wmi handle
194 * @peer_addr: peer mac address
195 * @param : pointer to hold peer set parameter
196 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530197 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530198 */
Govind Singhb53420c2016-03-09 14:32:57 +0530199QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530200 uint8_t peer_addr[IEEE80211_ADDR_LEN],
201 struct peer_set_params *param)
202{
203 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
204
205 if (wmi_handle->ops->send_peer_param_cmd)
206 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
207 peer_addr, param);
208
Govind Singhb53420c2016-03-09 14:32:57 +0530209 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530210}
211
212/**
213 * wmi_unified_vdev_up_send() - send vdev up command in fw
214 * @wmi: wmi handle
215 * @bssid: bssid
216 * @vdev_up_params: pointer to hold vdev up parameter
217 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530218 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530219 */
Govind Singhb53420c2016-03-09 14:32:57 +0530220QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530221 uint8_t bssid[IEEE80211_ADDR_LEN],
222 struct vdev_up_params *params)
223{
224 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
225
226 if (wmi_handle->ops->send_vdev_up_cmd)
227 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
228 params);
229
Govind Singhb53420c2016-03-09 14:32:57 +0530230 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530231}
232
233/**
234 * wmi_unified_peer_create_send() - send peer create command to fw
235 * @wmi: wmi handle
236 * @peer_addr: peer mac address
237 * @peer_type: peer type
238 * @vdev_id: vdev id
239 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530240 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530241 */
Govind Singhb53420c2016-03-09 14:32:57 +0530242QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530243 struct peer_create_params *param)
244{
245 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
246
247 if (wmi_handle->ops->send_peer_create_cmd)
248 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
249
Govind Singhb53420c2016-03-09 14:32:57 +0530250 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530251}
252
Leo Changeee40872016-09-28 13:43:36 -0700253/**
254 * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
255 * setup command to fw
256 * @wmi: wmi handle
257 * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters
258 *
259 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
260 */
261QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
262 struct rx_reorder_queue_setup_params *param)
263{
264 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
265
266 if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd)
267 return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd(
268 wmi_handle, param);
269
270 return QDF_STATUS_E_FAILURE;
271}
272
273/**
274 * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
275 * remove command to fw
276 * @wmi: wmi handle
277 * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters
278 *
279 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
280 */
281QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
282 struct rx_reorder_queue_remove_params *param)
283{
284 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
285
286 if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd)
287 return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd(
288 wmi_handle, param);
289
290 return QDF_STATUS_E_FAILURE;
291}
292
Sathish Kumar01b7ac02016-10-04 14:28:00 +0530293#if defined(FEATURE_GREEN_AP) || defined(ATH_SUPPORT_GREEN_AP)
Govind Singh5eb51532016-03-09 11:34:12 +0530294/**
295 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
296 * @wmi_handle: wmi handle
297 * @value: value
298 * @mac_id: mac id to have radio context
299 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530300 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530301 */
Govind Singhb53420c2016-03-09 14:32:57 +0530302QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530303 uint32_t value, uint8_t mac_id)
304{
305 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
306
307 if (wmi_handle->ops->send_green_ap_ps_cmd)
308 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
309 mac_id);
310
Govind Singhb53420c2016-03-09 14:32:57 +0530311 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530312}
313#else
Govind Singhb53420c2016-03-09 14:32:57 +0530314QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530315 uint32_t value, uint8_t mac_id)
316{
317 return 0;
318}
Sathish Kumar01b7ac02016-10-04 14:28:00 +0530319#endif /* FEATURE_GREEN_AP or ATH_SUPPORT_GREEN_AP*/
Govind Singh5eb51532016-03-09 11:34:12 +0530320
321/**
322 * wmi_unified_pdev_utf_cmd() - send utf command to fw
323 * @wmi_handle: wmi handle
324 * @param: pointer to pdev_utf_params
325 * @mac_id: mac id to have radio context
326 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530327 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530328 */
Govind Singhb53420c2016-03-09 14:32:57 +0530329QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530330wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
331 struct pdev_utf_params *param,
332 uint8_t mac_id)
333{
334 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
335
336 if (wmi_handle->ops->send_pdev_utf_cmd)
337 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
338 mac_id);
339
Govind Singhb53420c2016-03-09 14:32:57 +0530340 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530341}
342
343/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530344 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530345 * @wmi_handle: wmi handle
346 * @param: pointer to pdev parameter
347 * @mac_id: radio context
348 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530349 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
350 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530351 */
Govind Singhb53420c2016-03-09 14:32:57 +0530352QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530353wmi_unified_pdev_param_send(void *wmi_hdl,
354 struct pdev_params *param,
355 uint8_t mac_id)
356{
357 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
358
359 if (wmi_handle->ops->send_pdev_param_cmd)
360 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
361 mac_id);
362
Govind Singhb53420c2016-03-09 14:32:57 +0530363 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530364}
365
366/**
367 * wmi_unified_suspend_send() - WMI suspend function
368 * @param wmi_handle : handle to WMI.
369 * @param param : pointer to hold suspend parameter
370 * @mac_id: radio context
371 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530372 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530373 */
Govind Singhb53420c2016-03-09 14:32:57 +0530374QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530375 struct suspend_params *param,
376 uint8_t mac_id)
377{
378 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
379
380 if (wmi_handle->ops->send_suspend_cmd)
381 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
382 mac_id);
383
Govind Singhb53420c2016-03-09 14:32:57 +0530384 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530385}
386
387/**
388 * wmi_unified_resume_send - WMI resume function
389 * @param wmi_handle : handle to WMI.
390 * @mac_id: radio context
391 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530393 */
Govind Singhb53420c2016-03-09 14:32:57 +0530394QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530395 uint8_t mac_id)
396{
397 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
398
399 if (wmi_handle->ops->send_resume_cmd)
400 return wmi_handle->ops->send_resume_cmd(wmi_handle,
401 mac_id);
402
Govind Singhb53420c2016-03-09 14:32:57 +0530403 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530404}
405
406/**
407 * wmi_unified_wow_enable_send() - WMI wow enable function
408 * @param wmi_handle : handle to WMI.
409 * @param param : pointer to hold wow enable parameter
410 * @mac_id: radio context
411 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530412 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530413 */
Govind Singhb53420c2016-03-09 14:32:57 +0530414QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530415 struct wow_cmd_params *param,
416 uint8_t mac_id)
417{
418 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
419
420 if (wmi_handle->ops->send_wow_enable_cmd)
421 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
422 mac_id);
423
Govind Singhb53420c2016-03-09 14:32:57 +0530424 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530425}
426
427/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530428 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
429 * @param wmi_hdl : handle to WMI.
430 *
431 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
432 */
433QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
434{
435 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
436
437 if (wmi_handle->ops->send_wow_wakeup_cmd)
438 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
439
440 return QDF_STATUS_E_FAILURE;
441}
442
443/**
444 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
445 * @param wmi_handle : handle to WMI.
446 * @param: pointer to wow wakeup event parameter structure
447 *
448 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
449 */
450QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
451 struct wow_add_wakeup_params *param)
452{
453 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
454
455 if (wmi->ops->send_wow_add_wakeup_event_cmd)
456 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
457 param);
458
459 return QDF_STATUS_E_FAILURE;
460}
461
462/**
463 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
464 * @param wmi_handle : handle to WMI.
465 * @param: pointer to wow wakeup pattern parameter structure
466 *
467 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
468 */
469QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
470 struct wow_add_wakeup_pattern_params *param)
471{
472 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
473
474 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
475 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
476
477 return QDF_STATUS_E_FAILURE;
478}
479
480/**
481 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
482 * @param wmi_handle : handle to WMI.
483 * @param: pointer to wow wakeup pattern parameter structure
484 *
485 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
486 */
487QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
488 struct wow_remove_wakeup_pattern_params *param)
489{
490 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
491
492 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
493 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
494
495 return QDF_STATUS_E_FAILURE;
496}
497
498/**
Govind Singh5eb51532016-03-09 11:34:12 +0530499 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
500 * @wma_ctx: wma context
501 * @peer_addr: peer mac address
502 * @param: pointer to ap_ps parameter structure
503 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530504 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530505 */
Govind Singhb53420c2016-03-09 14:32:57 +0530506QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530507 uint8_t *peer_addr,
508 struct ap_ps_params *param)
509{
510 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
511
512 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
513 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
514 peer_addr,
515 param);
516
Govind Singhb53420c2016-03-09 14:32:57 +0530517 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530518}
519
520/**
521 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
522 * @wma_ctx: wma context
523 * @peer_addr: peer mac address
524 * @param: pointer to sta_ps parameter structure
525 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530526 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530527 */
Govind Singhb53420c2016-03-09 14:32:57 +0530528QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530529 struct sta_ps_params *param)
530{
531 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
532
533 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
534 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
535 param);
536
Govind Singhb53420c2016-03-09 14:32:57 +0530537 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530538}
539
540/**
541 * wmi_crash_inject() - inject fw crash
542 * @wma_handle: wma handle
543 * @param: ponirt to crash inject paramter structure
544 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530545 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530546 */
Govind Singhb53420c2016-03-09 14:32:57 +0530547QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530548 struct crash_inject *param)
549{
550 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
551
552 if (wmi_handle->ops->send_crash_inject_cmd)
553 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
554 param);
555
Govind Singhb53420c2016-03-09 14:32:57 +0530556 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530557}
558
559/**
560 * wmi_unified_dbglog_cmd_send() - set debug log level
561 * @param wmi_handle : handle to WMI.
562 * @param param : pointer to hold dbglog level parameter
563 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530564 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530565 */
Govind Singhb53420c2016-03-09 14:32:57 +0530566QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530567wmi_unified_dbglog_cmd_send(void *wmi_hdl,
568 struct dbglog_params *dbglog_param)
569{
570 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
571
572 if (wmi_handle->ops->send_dbglog_cmd)
573 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
574 dbglog_param);
575
Govind Singhb53420c2016-03-09 14:32:57 +0530576 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530577}
578
579/**
580 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
581 * @param wmi_handle : handle to WMI.
582 * @param macaddr : MAC address
583 * @param param : pointer to hold vdev set parameter
584 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530585 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530586 */
Govind Singhb53420c2016-03-09 14:32:57 +0530587QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530588 struct vdev_set_params *param)
589{
590 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
591
592 if (wmi_handle->ops->send_vdev_set_param_cmd)
593 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
594 param);
595
Govind Singhb53420c2016-03-09 14:32:57 +0530596 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530597}
598
599/**
600 * wmi_unified_stats_request_send() - WMI request stats function
601 * @param wmi_handle : handle to WMI.
602 * @param macaddr : MAC address
603 * @param param : pointer to hold stats request parameter
604 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530605 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530606 */
Govind Singhb53420c2016-03-09 14:32:57 +0530607QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530608 uint8_t macaddr[IEEE80211_ADDR_LEN],
609 struct stats_request_params *param)
610{
611 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
612
613 if (wmi_handle->ops->send_stats_request_cmd)
614 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
615 macaddr, param);
616
Govind Singhb53420c2016-03-09 14:32:57 +0530617 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530618}
619
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530620#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530621/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530622 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530623 * @param wmi_handle : handle to WMI.
624 * @param macaddr : MAC address
625 * @param param : pointer to hold stats request parameter
626 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530627 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530628 */
Govind Singhb53420c2016-03-09 14:32:57 +0530629QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530630 uint8_t macaddr[IEEE80211_ADDR_LEN],
631 struct packet_enable_params *param)
632{
633 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
634
635 if (wmi_handle->ops->send_packet_log_enable_cmd)
636 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
637 macaddr, param);
638
Govind Singhb53420c2016-03-09 14:32:57 +0530639 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530640}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530641#else
642/**
643 * wmi_unified_packet_log_enable_send() - WMI request stats function
644 * @param wmi_handle : handle to WMI.
645 * @param macaddr : MAC address
646 * @param param : pointer to hold stats request parameter
647 *
648 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
649 */
650QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700651 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530652{
653 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
654
655 if (wmi_handle->ops->send_packet_log_enable_cmd)
656 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700657 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530658
659 return QDF_STATUS_E_FAILURE;
660}
661
662#endif
663/**
664 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
665 * @param wmi_handle : handle to WMI.
666 * @param PKTLOG_EVENT : packet log event
667 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
668 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700669QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530670{
671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
672
673 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700674 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
675 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530676
677 return QDF_STATUS_E_FAILURE;
678}
Govind Singh5eb51532016-03-09 11:34:12 +0530679
680/**
681 * wmi_unified_beacon_send_cmd() - WMI beacon send function
682 * @param wmi_handle : handle to WMI.
683 * @param macaddr : MAC address
684 * @param param : pointer to hold beacon send cmd parameter
685 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530686 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530687 */
Govind Singhb53420c2016-03-09 14:32:57 +0530688QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530689 struct beacon_params *param)
690{
691 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
692
693 if (wmi_handle->ops->send_beacon_send_cmd)
694 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530695 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530696
Govind Singhb53420c2016-03-09 14:32:57 +0530697 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530698}
699
700/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530701 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
702 * @param wmi_handle : handle to WMI.
703 * @param macaddr : MAC address
704 * @param param : pointer to hold beacon send cmd parameter
705 *
706 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
707 */
708QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
709 struct beacon_tmpl_params *param)
710{
711 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
712
713 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
714 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
715 param);
716
717 return QDF_STATUS_E_FAILURE;
718}
719/**
Govind Singh5eb51532016-03-09 11:34:12 +0530720 * wmi_unified_peer_assoc_send() - WMI peer assoc function
721 * @param wmi_handle : handle to WMI.
722 * @param macaddr : MAC address
723 * @param param : pointer to peer assoc parameter
724 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530725 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530726 */
Govind Singhb53420c2016-03-09 14:32:57 +0530727QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530728 struct peer_assoc_params *param)
729{
730 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
731
732 if (wmi_handle->ops->send_peer_assoc_cmd)
733 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530734 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530735
Govind Singhb53420c2016-03-09 14:32:57 +0530736 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530737}
738
739/**
740 * wmi_unified_scan_start_cmd_send() - WMI scan start function
741 * @param wmi_handle : handle to WMI.
742 * @param macaddr : MAC address
743 * @param param : pointer to hold scan start cmd parameter
744 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530745 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530746 */
Govind Singhb53420c2016-03-09 14:32:57 +0530747QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530748 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530749{
750 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
751
752 if (wmi_handle->ops->send_scan_start_cmd)
753 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530754 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530755
Govind Singhb53420c2016-03-09 14:32:57 +0530756 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530757}
758
759/**
760 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
761 * @param wmi_handle : handle to WMI.
762 * @param macaddr : MAC address
763 * @param param : pointer to hold scan start cmd parameter
764 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530765 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530766 */
Govind Singhb53420c2016-03-09 14:32:57 +0530767QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530768 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530769{
770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
771
772 if (wmi_handle->ops->send_scan_stop_cmd)
773 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530774 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530775
Govind Singhb53420c2016-03-09 14:32:57 +0530776 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530777}
778
779/**
780 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
781 * @param wmi_handle : handle to WMI.
782 * @param macaddr : MAC address
783 * @param param : pointer to hold scan channel list parameter
784 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530785 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530786 */
Govind Singhb53420c2016-03-09 14:32:57 +0530787QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530788 struct scan_chan_list_params *param)
789{
790 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
791
792 if (wmi_handle->ops->send_scan_chan_list_cmd)
793 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530794 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530795
Govind Singhb53420c2016-03-09 14:32:57 +0530796 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530797}
Govind Singh427ee5a2016-02-26 18:09:36 +0530798
799/**
800 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
801 * @wmi_hdl : handle to WMI.
802 * @param : pointer to hold mgmt cmd parameter
803 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530804 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530805 */
Govind Singhb53420c2016-03-09 14:32:57 +0530806QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530807 struct wmi_mgmt_params *param)
808{
809 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
810
811 if (wmi_handle->ops->send_mgmt_cmd)
812 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
813 param);
814
Govind Singhb53420c2016-03-09 14:32:57 +0530815 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530816}
817
818/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530819 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
820 * @wmi_hdl : handle to WMI.
821 * @param : pointer to hold offchan data cmd parameter
822 *
823 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
824 */
825QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
826 struct wmi_offchan_data_tx_params *param)
827{
828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
829
830 if (wmi_handle->ops->send_offchan_data_tx_cmd)
831 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
832 param);
833
834 return QDF_STATUS_E_FAILURE;
835}
836
837/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530838 * wmi_unified_modem_power_state() - set modem power state to fw
839 * @wmi_hdl: wmi handle
840 * @param_value: parameter value
841 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530842 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530843 */
Govind Singhb53420c2016-03-09 14:32:57 +0530844QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530845 uint32_t param_value)
846{
847 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
848
849 if (wmi_handle->ops->send_modem_power_state_cmd)
850 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
851 param_value);
852
Govind Singhb53420c2016-03-09 14:32:57 +0530853 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530854}
855
856/**
857 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
858 * @wmi_hdl: wmi handle
859 * @vdev_id: vdev id
860 * @val: value
861 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530862 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530863 */
Govind Singhb53420c2016-03-09 14:32:57 +0530864QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530865 uint32_t vdev_id, uint8_t val)
866{
867 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
868
869 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
870 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
871 vdev_id, val);
872
Govind Singhb53420c2016-03-09 14:32:57 +0530873 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530874}
875
876/**
877 * wmi_set_mimops() - set MIMO powersave
878 * @wmi_hdl: wmi handle
879 * @vdev_id: vdev id
880 * @value: value
881 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530882 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530883 */
Govind Singhb53420c2016-03-09 14:32:57 +0530884QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530885{
886 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
887
888 if (wmi_handle->ops->send_set_mimops_cmd)
889 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
890 vdev_id, value);
891
Govind Singhb53420c2016-03-09 14:32:57 +0530892 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530893}
894
895/**
896 * wmi_set_smps_params() - set smps params
897 * @wmi_hdl: wmi handle
898 * @vdev_id: vdev id
899 * @value: value
900 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530901 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530902 */
Govind Singhb53420c2016-03-09 14:32:57 +0530903QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530904 int value)
905{
906 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
907
908 if (wmi_handle->ops->send_set_smps_params_cmd)
909 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
910 vdev_id, value);
911
Govind Singhb53420c2016-03-09 14:32:57 +0530912 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530913}
914
915
916/**
917 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
918 * @wmi_hdl: wmi handle
919 * @opps: p2p opp power save parameters
920 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530921 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530922 */
Govind Singhb53420c2016-03-09 14:32:57 +0530923QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530924 struct p2p_ps_params *oppps)
925{
926 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
927
928 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
929 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
930 oppps);
931
Govind Singhb53420c2016-03-09 14:32:57 +0530932 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530933}
934
935/**
936 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
937 * @wmi_hdl: wmi handle
938 * @noa: p2p power save parameters
939 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530940 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530941 */
Govind Singhb53420c2016-03-09 14:32:57 +0530942QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530943 struct p2p_ps_params *noa)
944{
945 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
946
947 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
948 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
949 noa);
950
Govind Singhb53420c2016-03-09 14:32:57 +0530951 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530952}
953
Wu Gaocd3a8512017-03-13 20:17:34 +0800954#ifdef CONVERGED_P2P_ENABLE
955/**
956 * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
957 * @wmi_hdl: wmi handle
958 * @param: p2p listen offload start parameters
959 *
960 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
961 */
962QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
963 struct p2p_lo_start *param)
964{
965 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
966
967 if (!wmi_handle) {
968 WMI_LOGE("wmi handle is null");
969 return QDF_STATUS_E_INVAL;
970 }
971
972 if (wmi_handle->ops->send_p2p_lo_start_cmd)
973 return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
974 param);
975
976 return QDF_STATUS_E_FAILURE;
977}
978
979/**
980 * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
981 * @wmi_hdl: wmi handle
982 * @vdev_id: vdev id
983 *
984 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
985 */
986QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
987{
988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
989
990 if (!wmi_handle) {
991 WMI_LOGE("wmi handle is null");
992 return QDF_STATUS_E_INVAL;
993 }
994
995 if (wmi_handle->ops->send_p2p_lo_start_cmd)
996 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
997 vdev_id);
998
999 return QDF_STATUS_E_FAILURE;
1000}
1001#endif /* End of CONVERGED_P2P_ENABLE */
1002
Govind Singh427ee5a2016-02-26 18:09:36 +05301003/**
1004 * wmi_get_temperature() - get pdev temperature req
1005 * @wmi_hdl: wmi handle
1006 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301007 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301008 */
Govind Singhb53420c2016-03-09 14:32:57 +05301009QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +05301010{
1011 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1012
1013 if (wmi_handle->ops->send_get_temperature_cmd)
1014 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
1015
Govind Singhb53420c2016-03-09 14:32:57 +05301016 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301017}
1018
1019/**
1020 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1021 * @wmi_hdl: wmi handle
1022 * @end_set_sta_ps_mode_cmd: cmd paramter strcture
1023 *
1024 * This function sets the trigger
1025 * uapsd params such as service interval, delay interval
1026 * and suspend interval which will be used by the firmware
1027 * to send trigger frames periodically when there is no
1028 * traffic on the transmit side.
1029 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301030 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301031 */
Govind Singhb53420c2016-03-09 14:32:57 +05301032QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +05301033wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
1034 struct sta_uapsd_trig_params *param)
1035{
1036 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1037
1038 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
1039 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
1040 param);
1041
Govind Singhb53420c2016-03-09 14:32:57 +05301042 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301043}
Govind Singh2edc80f2016-03-01 15:30:53 +05301044
1045/**
1046 * wmi_unified_ocb_start_timing_advert() - start sending the timing advertisement
1047 * frames on a channel
1048 * @wmi_handle: pointer to the wmi handle
1049 * @timing_advert: pointer to the timing advertisement struct
1050 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301051 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301052 */
Govind Singhb53420c2016-03-09 14:32:57 +05301053QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301054 struct ocb_timing_advert_param *timing_advert)
1055{
1056 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1057
1058 if (wmi_handle->ops->send_ocb_start_timing_advert_cmd)
1059 return wmi_handle->ops->send_ocb_start_timing_advert_cmd(wmi_handle,
1060 timing_advert);
1061
Govind Singhb53420c2016-03-09 14:32:57 +05301062 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301063}
1064
1065/**
1066 * wmi_unified_ocb_stop_timing_advert() - stop sending the timing advertisement
1067 * frames on a channel
1068 * @wmi_handle: pointer to the wmi handle
1069 * @timing_advert: pointer to the timing advertisement struct
1070 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301071 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301072 */
Govind Singhb53420c2016-03-09 14:32:57 +05301073QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301074 struct ocb_timing_advert_param *timing_advert)
1075{
1076 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1077
1078 if (wmi_handle->ops->send_ocb_stop_timing_advert_cmd)
1079 return wmi_handle->ops->send_ocb_stop_timing_advert_cmd(wmi_handle,
1080 timing_advert);
1081
Govind Singhb53420c2016-03-09 14:32:57 +05301082 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301083}
1084
1085/**
1086 * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
1087 * @wmi_handle: pointer to the wmi handle
1088 * @vdev_id: vdev id
1089 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301090 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301091 */
Govind Singhb53420c2016-03-09 14:32:57 +05301092QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301093 struct ocb_utc_param *utc)
1094{
1095 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1096
1097 if (wmi_handle->ops->send_ocb_set_utc_time_cmd)
1098 return wmi_handle->ops->send_ocb_set_utc_time_cmd(wmi_handle,
1099 utc);
1100
Govind Singhb53420c2016-03-09 14:32:57 +05301101 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301102}
1103
1104/**
1105 * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
1106 * @wmi_handle: pointer to the wmi handle
1107 * @vdev_id: vdev id
1108 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301109 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301110 */
Govind Singhb53420c2016-03-09 14:32:57 +05301111QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301112 uint8_t vdev_id)
1113{
1114 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1115
1116 if (wmi_handle->ops->send_ocb_get_tsf_timer_cmd)
1117 return wmi_handle->ops->send_ocb_get_tsf_timer_cmd(wmi_handle,
1118 vdev_id);
1119
Govind Singhb53420c2016-03-09 14:32:57 +05301120 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301121}
1122
1123/**
1124 * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
1125 * @wmi_handle: pointer to the wmi handle
1126 * @get_stats_param: pointer to the dcc stats
1127 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301128 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301129 */
Govind Singhb53420c2016-03-09 14:32:57 +05301130QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301131 struct dcc_get_stats_param *get_stats_param)
1132{
1133 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1134
1135 if (wmi_handle->ops->send_dcc_get_stats_cmd)
1136 return wmi_handle->ops->send_dcc_get_stats_cmd(wmi_handle,
1137 get_stats_param);
1138
Govind Singhb53420c2016-03-09 14:32:57 +05301139 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301140}
1141
1142/**
1143 * wmi_unified_dcc_clear_stats() - command to clear the DCC stats
1144 * @wmi_handle: pointer to the wmi handle
1145 * @clear_stats_param: parameters to the command
1146 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301147 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301148 */
Govind Singhb53420c2016-03-09 14:32:57 +05301149QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301150 uint32_t vdev_id, uint32_t dcc_stats_bitmap)
1151{
1152 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1153
1154 if (wmi_handle->ops->send_dcc_clear_stats_cmd)
1155 return wmi_handle->ops->send_dcc_clear_stats_cmd(wmi_handle,
1156 vdev_id, dcc_stats_bitmap);
1157
Govind Singhb53420c2016-03-09 14:32:57 +05301158 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301159}
1160
1161/**
1162 * wmi_unified_dcc_update_ndl() - command to update the NDL data
1163 * @wmi_handle: pointer to the wmi handle
1164 * @update_ndl_param: pointer to the request parameters
1165 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301166 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301167 */
Govind Singhb53420c2016-03-09 14:32:57 +05301168QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301169 struct dcc_update_ndl_param *update_ndl_param)
1170{
1171 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1172
1173 if (wmi_handle->ops->send_dcc_update_ndl_cmd)
1174 return wmi_handle->ops->send_dcc_update_ndl_cmd(wmi_handle,
1175 update_ndl_param);
1176
Govind Singhb53420c2016-03-09 14:32:57 +05301177 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301178}
1179
1180/**
1181 * wmi_unified_ocb_set_config() - send the OCB config to the FW
1182 * @wmi_handle: pointer to the wmi handle
1183 * @config: the OCB configuration
1184 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301185 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301186 */
Govind Singhb53420c2016-03-09 14:32:57 +05301187QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301188 struct ocb_config_param *config, uint32_t *ch_mhz)
1189{
1190 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1191
1192 if (wmi_handle->ops->send_ocb_set_config_cmd)
1193 return wmi_handle->ops->send_ocb_set_config_cmd(wmi_handle,
1194 config, ch_mhz);
1195
Govind Singhb53420c2016-03-09 14:32:57 +05301196 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301197}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301198
1199/**
1200 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1201 * @wmi_handle: wmi handle
1202 * @mcc_adaptive_scheduler: enable/disable
1203 *
1204 * This function enable/disable mcc adaptive scheduler in fw.
1205 *
Govind Singhb53420c2016-03-09 14:32:57 +05301206 * Return: QDF_STATUS_SUCCESS for sucess or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301207 */
Govind Singhb53420c2016-03-09 14:32:57 +05301208QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001209 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1210 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301211{
1212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1213
1214 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1215 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001216 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301217
Govind Singhb53420c2016-03-09 14:32:57 +05301218 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301219}
1220
1221/**
1222 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1223 * @wmi: wmi handle
1224 * @mcc_channel: mcc channel
1225 * @mcc_channel_time_latency: MCC channel time latency.
1226 *
1227 * Currently used to set time latency for an MCC vdev/adapter using operating
1228 * channel of it and channel number. The info is provided run time using
1229 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1230 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301231 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301232 */
Govind Singhb53420c2016-03-09 14:32:57 +05301233QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301234 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1235{
1236 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1237
1238 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1239 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1240 mcc_channel_freq,
1241 mcc_channel_time_latency);
1242
Govind Singhb53420c2016-03-09 14:32:57 +05301243 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301244}
1245
1246/**
1247 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1248 * @wmi: wmi handle
1249 * @adapter_1_chan_number: adapter 1 channel number
1250 * @adapter_1_quota: adapter 1 quota
1251 * @adapter_2_chan_number: adapter 2 channel number
1252 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301253 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301254 */
Govind Singhb53420c2016-03-09 14:32:57 +05301255QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301256 uint32_t adapter_1_chan_freq,
1257 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301258{
1259 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1260
1261 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1262 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1263 adapter_1_chan_freq,
1264 adapter_1_quota,
1265 adapter_2_chan_freq);
1266
Govind Singhb53420c2016-03-09 14:32:57 +05301267 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301268}
1269
1270/**
1271 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1272 * @wmi_handle: Pointer to wmi handle
1273 * @thermal_info: Thermal command information
1274 *
1275 * This function sends the thermal management command
1276 * to the firmware
1277 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301278 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301279 */
Govind Singhb53420c2016-03-09 14:32:57 +05301280QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301281 struct thermal_cmd_params *thermal_info)
1282{
1283 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1284
1285 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1286 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1287 thermal_info);
1288
Govind Singhb53420c2016-03-09 14:32:57 +05301289 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301290}
1291
1292
1293/**
1294 * wmi_unified_lro_config_cmd() - process the LRO config command
1295 * @wmi: Pointer to wmi handle
1296 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1297 *
1298 * This function sends down the LRO configuration parameters to
1299 * the firmware to enable LRO, sets the TCP flags and sets the
1300 * seed values for the toeplitz hash generation
1301 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301302 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301303 */
Govind Singhb53420c2016-03-09 14:32:57 +05301304QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301305 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1306{
1307 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1308
1309 if (wmi_handle->ops->send_lro_config_cmd)
1310 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1311 wmi_lro_cmd);
1312
Govind Singhb53420c2016-03-09 14:32:57 +05301313 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301314}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301315
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301316#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301317/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301318 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1319 * @wmi_hdl: Pointer to wmi handle
1320 * @rate_report_params: Pointer to peer rate report parameters
1321 *
1322 *
1323 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1324 */
1325QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1326 struct wmi_peer_rate_report_params *rate_report_params)
1327{
1328 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1329
1330 if (wmi_handle->ops->send_peer_rate_report_cmd)
1331 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1332 rate_report_params);
1333
1334 return QDF_STATUS_E_FAILURE;
1335}
1336
1337/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301338 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1339 * @wmi_hdl: wmi handle
1340 * @param: bcn ll cmd parameter
1341 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301342 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301343 */
Govind Singhb53420c2016-03-09 14:32:57 +05301344QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301345 wmi_bcn_send_from_host_cmd_fixed_param *param)
1346{
1347 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1348
1349 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1350 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1351 param);
1352
Govind Singhb53420c2016-03-09 14:32:57 +05301353 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301354}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301355#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301356
1357/**
1358 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1359 * @wmi_hdl: wmi handle
1360 * @vdev_id: vdev id
1361 * @max_retries: max retries
1362 * @retry_interval: retry interval
1363 * This function sets sta query related parameters in fw.
1364 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301365 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301366 */
1367
Govind Singhb53420c2016-03-09 14:32:57 +05301368QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301369 uint8_t vdev_id, uint32_t max_retries,
1370 uint32_t retry_interval)
1371{
1372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1373
1374 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1375 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1376 vdev_id, max_retries,
1377 retry_interval);
1378
Govind Singhb53420c2016-03-09 14:32:57 +05301379 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301380}
1381
1382/**
1383 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1384 * @wmi_hdl: wmi handle
1385 * @params: sta keep alive parameter
1386 *
1387 * This function sets keep alive related parameters in fw.
1388 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301389 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301390 */
Govind Singhb53420c2016-03-09 14:32:57 +05301391QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301392 struct sta_params *params)
1393{
1394 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1395
1396 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1397 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1398 params);
1399
Govind Singhb53420c2016-03-09 14:32:57 +05301400 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301401}
1402
1403/**
1404 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1405 * @wmi_hdl: wmi handle
1406 * @if_id: vdev id
1407 * @gtx_info: GTX config params
1408 *
1409 * This function set GTX related params in firmware.
1410 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301411 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301412 */
Govind Singhb53420c2016-03-09 14:32:57 +05301413QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301414 struct wmi_gtx_config *gtx_info)
1415{
1416 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1417
1418 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1419 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1420 if_id, gtx_info);
1421
Govind Singhb53420c2016-03-09 14:32:57 +05301422 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301423}
1424
1425/**
1426 * wmi_unified_process_update_edca_param() - update EDCA params
1427 * @wmi_hdl: wmi handle
1428 * @edca_params: edca parameters
1429 *
1430 * This function updates EDCA parameters to the target
1431 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301432 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301433 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301434#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05301435QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301436 uint8_t vdev_id,
1437 wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC])
1438{
1439 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1440
1441 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1442 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
1443 vdev_id, gwmm_param);
1444
Govind Singhb53420c2016-03-09 14:32:57 +05301445 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301446}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301447#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301448
1449/**
1450 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1451 * @wmi_hdl: wmi handle
1452 * @vdev_id: vdev id
1453 * @probe_rsp_info: probe response info
1454 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301455 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301456 */
Govind Singhb53420c2016-03-09 14:32:57 +05301457QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301458 uint8_t vdev_id,
1459 struct wmi_probe_resp_params *probe_rsp_info,
1460 uint8_t *frm)
1461{
1462 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1463
1464 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1465 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
1466 vdev_id, probe_rsp_info,
1467 frm);
1468
Govind Singhb53420c2016-03-09 14:32:57 +05301469 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301470}
1471
1472/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301473 * wmi_unified_setup_install_key_cmd - send key to install to fw
1474 * @wmi_hdl: wmi handle
1475 * @key_params: key parameters
1476 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301477 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301478 */
1479QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1480 struct set_key_params *key_params)
1481{
1482 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1483
1484 if (wmi_handle->ops->send_setup_install_key_cmd)
1485 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1486 key_params);
1487
1488 return QDF_STATUS_E_FAILURE;
1489}
1490
1491/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301492 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1493 * @wma_handle: wma handle
1494 * @vdev_id: vdev id
1495 * @p2p_ie: p2p IE
1496 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301497 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301498 */
Govind Singhb53420c2016-03-09 14:32:57 +05301499QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301500 A_UINT32 vdev_id, uint8_t *p2p_ie)
1501{
1502 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1503
1504 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1505 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1506 vdev_id, p2p_ie);
1507
Govind Singhb53420c2016-03-09 14:32:57 +05301508 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301509}
1510
1511/**
1512 * wmi_unified_set_gateway_params_cmd() - set gateway parameters
1513 * @wmi_hdl: wmi handle
1514 * @req: gateway parameter update request structure
1515 *
1516 * This function reads the incoming @req and fill in the destination
1517 * WMI structure and sends down the gateway configs down to the firmware
1518 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301519 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1520 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301521 */
Govind Singhb53420c2016-03-09 14:32:57 +05301522QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301523 struct gateway_update_req_param *req)
1524{
1525 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1526
1527 if (wmi_handle->ops->send_set_gateway_params_cmd)
1528 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1529 req);
1530
Govind Singhb53420c2016-03-09 14:32:57 +05301531 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301532}
1533
1534/**
1535 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1536 * @wmi_hdl: wmi handle
1537 * @req: rssi monitoring request structure
1538 *
1539 * This function reads the incoming @req and fill in the destination
1540 * WMI structure and send down the rssi monitoring configs down to the firmware
1541 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301542 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1543 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301544 */
Govind Singhb53420c2016-03-09 14:32:57 +05301545QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301546 struct rssi_monitor_param *req)
1547{
1548 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1549
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301550 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301551 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1552 req);
1553
Govind Singhb53420c2016-03-09 14:32:57 +05301554 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301555}
1556
1557/**
1558 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1559 * @wmi_hdl: wmi handle
1560 * @psetoui: OUI parameters
1561 *
1562 * set scan probe OUI parameters in firmware
1563 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301564 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301565 */
Govind Singhb53420c2016-03-09 14:32:57 +05301566QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301567 struct scan_mac_oui *psetoui)
1568{
1569 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1570
1571 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1572 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1573 psetoui);
1574
Govind Singhb53420c2016-03-09 14:32:57 +05301575 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301576}
1577
1578/**
1579 * wmi_unified_reset_passpoint_network_list_cmd() - reset passpoint network list
1580 * @wmi_hdl: wmi handle
1581 * @req: passpoint network request structure
1582 *
1583 * This function sends down WMI command with network id set to wildcard id.
1584 * firmware shall clear all the config entries
1585 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301586 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301587 */
Govind Singhb53420c2016-03-09 14:32:57 +05301588QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301589 struct wifi_passpoint_req_param *req)
1590{
1591 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1592
1593 if (wmi_handle->ops->send_reset_passpoint_network_list_cmd)
1594 return wmi_handle->ops->send_reset_passpoint_network_list_cmd(wmi_handle,
1595 req);
1596
Govind Singhb53420c2016-03-09 14:32:57 +05301597 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301598}
1599
1600/**
1601 * wmi_unified_set_passpoint_network_list_cmd() - set passpoint network list
1602 * @wmi_hdl: wmi handle
1603 * @req: passpoint network request structure
1604 *
1605 * This function reads the incoming @req and fill in the destination
1606 * WMI structure and send down the passpoint configs down to the firmware
1607 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301608 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301609 */
Govind Singhb53420c2016-03-09 14:32:57 +05301610QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301611 struct wifi_passpoint_req_param *req)
1612{
1613 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1614
1615 if (wmi_handle->ops->send_set_passpoint_network_list_cmd)
1616 return wmi_handle->ops->send_set_passpoint_network_list_cmd(wmi_handle,
1617 req);
1618
Govind Singhb53420c2016-03-09 14:32:57 +05301619 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301620}
1621
1622/** wmi_unified_set_epno_network_list_cmd() - set epno network list
1623 * @wmi_hdl: wmi handle
1624 * @req: epno config params request structure
1625 *
1626 * This function reads the incoming epno config request structure
1627 * and constructs the WMI message to the firmware.
1628 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301629 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1630 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301631 */
Govind Singhb53420c2016-03-09 14:32:57 +05301632QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301633 struct wifi_enhanched_pno_params *req)
1634{
1635 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1636
1637 if (wmi_handle->ops->send_set_epno_network_list_cmd)
1638 return wmi_handle->ops->send_set_epno_network_list_cmd(wmi_handle,
1639 req);
1640
Govind Singhb53420c2016-03-09 14:32:57 +05301641 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301642}
1643
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301644#ifdef CONFIG_MCL
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301645/**
1646 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1647 * @wmi_hdl: wmi handle
1648 * @scan_cmd_fp: scan related parameters
1649 * @roam_req: roam related parameters
1650 *
1651 * This function reads the incoming @roam_req and fill in the destination
1652 * WMI structure and send down the roam scan configs down to the firmware
1653 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301654 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301655 */
1656QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1657 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1658 struct roam_offload_scan_params *roam_req)
1659{
1660 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1661
1662 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1663 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1664 wmi_handle, scan_cmd_fp, roam_req);
1665
1666 return QDF_STATUS_E_FAILURE;
1667}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301668#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301669
1670/**
1671 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1672 * parameters
1673 * @wmi_hdl: wmi handle
1674 * @roam_req: roam rssi related parameters
1675 *
1676 * This function reads the incoming @roam_req and fill in the destination
1677 * WMI structure and send down the roam scan rssi configs down to the firmware
1678 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301679 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301680 */
1681QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1682 struct roam_offload_scan_rssi_params
1683 *roam_req)
1684{
1685 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1686
1687 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1688 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1689 wmi_handle, roam_req);
1690
1691 return QDF_STATUS_E_FAILURE;
1692}
1693
1694/**
1695 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1696 * blacklist and preferred list
1697 * @wmi_hdl: wmi handle
1698 * @roam_req: roam scan lists related parameters
1699 *
1700 * This function reads the incoming @roam_req and fill in the destination
1701 * WMI structure and send down the different roam scan lists down to the fw
1702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301703 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301704 */
1705QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1706 struct roam_scan_filter_params *roam_req)
1707{
1708 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1709
1710 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1711 return wmi_handle->ops->send_roam_scan_filter_cmd(
1712 wmi_handle, roam_req);
1713
1714 return QDF_STATUS_E_FAILURE;
1715}
1716
Govind Singh4eacd2b2016-03-07 14:24:22 +05301717/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1718 * @wmi_hdl: wmi handle
1719 * @ipa_offload: ipa offload control parameter
1720 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301721 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1722 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301723 */
Govind Singhb53420c2016-03-09 14:32:57 +05301724QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301725 struct ipa_offload_control_params *ipa_offload)
1726{
1727 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1728
1729 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1730 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1731 ipa_offload);
1732
Govind Singhb53420c2016-03-09 14:32:57 +05301733 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301734}
1735
1736/**
1737 * wmi_unified_extscan_get_capabilities_cmd() - extscan get capabilities
1738 * @wmi_hdl: wmi handle
1739 * @pgetcapab: get capabilities params
1740 *
1741 * This function send request to fw to get extscan capabilities.
1742 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301743 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301744 */
Govind Singhb53420c2016-03-09 14:32:57 +05301745QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301746 struct extscan_capabilities_params *pgetcapab)
1747{
1748 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1749
1750 if (wmi_handle->ops->send_extscan_get_capabilities_cmd)
1751 return wmi_handle->ops->send_extscan_get_capabilities_cmd(wmi_handle,
1752 pgetcapab);
1753
Govind Singhb53420c2016-03-09 14:32:57 +05301754 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301755}
1756
1757/**
1758 * wmi_unified_extscan_get_cached_results_cmd() - extscan get cached results
1759 * @wmi_hdl: wmi handle
1760 * @pcached_results: cached results parameters
1761 *
1762 * This function send request to fw to get cached results.
1763 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301764 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301765 */
Govind Singhb53420c2016-03-09 14:32:57 +05301766QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301767 struct extscan_cached_result_params *pcached_results)
1768{
1769 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1770
1771 if (wmi_handle->ops->send_extscan_get_cached_results_cmd)
1772 return wmi_handle->ops->send_extscan_get_cached_results_cmd(wmi_handle,
1773 pcached_results);
1774
Govind Singhb53420c2016-03-09 14:32:57 +05301775 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301776}
1777
1778/**
1779 * wmi_unified_extscan_stop_change_monitor_cmd() - send stop change monitor cmd
1780 * @wmi_hdl: wmi handle
1781 * @reset_req: Reset change request params
1782 *
1783 * This function sends stop change monitor request to fw.
1784 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301785 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301786 */
Govind Singhb53420c2016-03-09 14:32:57 +05301787QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301788 struct extscan_capabilities_reset_params *reset_req)
1789{
1790 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1791
1792 if (wmi_handle->ops->send_extscan_stop_change_monitor_cmd)
1793 return wmi_handle->ops->send_extscan_stop_change_monitor_cmd(wmi_handle,
1794 reset_req);
1795
Govind Singhb53420c2016-03-09 14:32:57 +05301796 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301797}
1798
1799
1800
1801/**
1802 * wmi_unified_extscan_start_change_monitor_cmd() - start change monitor cmd
1803 * @wmi_hdl: wmi handle
1804 * @psigchange: change monitor request params
1805 *
1806 * This function sends start change monitor request to fw.
1807 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301808 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301809 */
Govind Singhb53420c2016-03-09 14:32:57 +05301810QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301811 struct extscan_set_sig_changereq_params *
1812 psigchange)
1813{
1814 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1815
1816 if (wmi_handle->ops->send_extscan_start_change_monitor_cmd)
1817 return wmi_handle->ops->send_extscan_start_change_monitor_cmd(wmi_handle,
1818 psigchange);
1819
Govind Singhb53420c2016-03-09 14:32:57 +05301820 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301821}
1822
1823/**
1824 * wmi_unified_extscan_stop_hotlist_monitor_cmd() - stop hotlist monitor
1825 * @wmi_hdl: wmi handle
1826 * @photlist_reset: hotlist reset params
1827 *
1828 * This function configures hotlist monitor to stop in fw.
1829 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301830 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301831 */
Govind Singhb53420c2016-03-09 14:32:57 +05301832QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301833 struct extscan_bssid_hotlist_reset_params *photlist_reset)
1834{
1835 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1836
1837 if (wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd)
1838 return wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd(wmi_handle,
1839 photlist_reset);
1840
Govind Singhb53420c2016-03-09 14:32:57 +05301841 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301842}
1843
1844/**
1845 * wmi_unified_stop_extscan_cmd() - stop extscan command to fw.
1846 * @wmi_hdl: wmi handle
1847 * @pstopcmd: stop scan command request params
1848 *
1849 * This function sends stop extscan request to fw.
1850 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301851 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 */
Govind Singhb53420c2016-03-09 14:32:57 +05301853QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301854 struct extscan_stop_req_params *pstopcmd)
1855{
1856 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1857
1858 if (wmi_handle->ops->send_stop_extscan_cmd)
1859 return wmi_handle->ops->send_stop_extscan_cmd(wmi_handle,
1860 pstopcmd);
1861
Govind Singhb53420c2016-03-09 14:32:57 +05301862 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301863}
1864
1865/**
1866 * wmi_unified_start_extscan_cmd() - start extscan command to fw.
1867 * @wmi_hdl: wmi handle
1868 * @pstart: scan command request params
1869 *
1870 * This function sends start extscan request to fw.
1871 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301872 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301873 */
Govind Singhb53420c2016-03-09 14:32:57 +05301874QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301875 struct wifi_scan_cmd_req_params *pstart)
1876{
1877 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1878
1879 if (wmi_handle->ops->send_start_extscan_cmd)
1880 return wmi_handle->ops->send_start_extscan_cmd(wmi_handle,
1881 pstart);
1882
Govind Singhb53420c2016-03-09 14:32:57 +05301883 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301884}
1885
1886/**
1887 * wmi_unified_plm_stop_cmd() - plm stop request
1888 * @wmi_hdl: wmi handle
1889 * @plm: plm request parameters
1890 *
1891 * This function request FW to stop PLM.
1892 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301893 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301894 */
Govind Singhb53420c2016-03-09 14:32:57 +05301895QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301896 const struct plm_req_params *plm)
1897{
1898 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1899
1900 if (wmi_handle->ops->send_plm_stop_cmd)
1901 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1902 plm);
1903
Govind Singhb53420c2016-03-09 14:32:57 +05301904 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301905}
1906
1907/**
1908 * wmi_unified_plm_start_cmd() - plm start request
1909 * @wmi_hdl: wmi handle
1910 * @plm: plm request parameters
1911 *
1912 * This function request FW to start PLM.
1913 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301914 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301915 */
Govind Singhb53420c2016-03-09 14:32:57 +05301916QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301917 const struct plm_req_params *plm,
1918 uint32_t *gchannel_list)
1919{
1920 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1921
1922 if (wmi_handle->ops->send_plm_start_cmd)
1923 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1924 plm, gchannel_list);
1925
Govind Singhb53420c2016-03-09 14:32:57 +05301926 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301927}
1928
1929/**
1930 * send_pno_stop_cmd() - PNO stop request
1931 * @wmi_hdl: wmi handle
1932 * @vdev_id: vdev id
1933 *
1934 * This function request FW to stop ongoing PNO operation.
1935 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301936 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301937 */
Govind Singhb53420c2016-03-09 14:32:57 +05301938QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301939{
1940 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1941
1942 if (wmi_handle->ops->send_pno_stop_cmd)
1943 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1944 vdev_id);
1945
Govind Singhb53420c2016-03-09 14:32:57 +05301946 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301947}
1948
1949/**
1950 * wmi_unified_pno_start_cmd() - PNO start request
1951 * @wmi_hdl: wmi handle
1952 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301953 *
1954 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301955 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301956 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301957#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301958QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05301959 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301960{
1961 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1962
1963 if (wmi_handle->ops->send_pno_start_cmd)
1964 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05301965 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301966
Govind Singhb53420c2016-03-09 14:32:57 +05301967 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301968}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301969#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301970
1971/* wmi_unified_set_ric_req_cmd() - set ric request element
1972 * @wmi_hdl: wmi handle
1973 * @msg: message
1974 * @is_add_ts: is addts required
1975 *
1976 * This function sets ric request element for 11r roaming.
1977 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301978 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301979 */
Govind Singhb53420c2016-03-09 14:32:57 +05301980QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301981 uint8_t is_add_ts)
1982{
1983 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1984
1985 if (wmi_handle->ops->send_set_ric_req_cmd)
1986 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
1987 is_add_ts);
1988
Govind Singhb53420c2016-03-09 14:32:57 +05301989 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301990}
1991
1992/**
1993 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1994 * @wmi_hdl: wmi handle
1995 * @clear_req: ll stats clear request command params
1996 * @addr: mac address
1997 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301998 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301999 */
Govind Singhb53420c2016-03-09 14:32:57 +05302000QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302001 const struct ll_stats_clear_params *clear_req,
2002 uint8_t addr[IEEE80211_ADDR_LEN])
2003{
2004 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2005
2006 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
2007 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
2008 clear_req, addr);
2009
Govind Singhb53420c2016-03-09 14:32:57 +05302010 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302011}
2012
2013/**
2014 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
2015 * @wmi_hdl:wmi handle
2016 * @get_req:ll stats get request command params
2017 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302018 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302019 */
Govind Singhb53420c2016-03-09 14:32:57 +05302020QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302021 const struct ll_stats_get_params *get_req,
2022 uint8_t addr[IEEE80211_ADDR_LEN])
2023{
2024 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2025
2026 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
2027 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
2028 get_req, addr);
2029
Govind Singhb53420c2016-03-09 14:32:57 +05302030 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302031}
2032
2033/**
2034 * wmi_unified_get_stats_cmd() - get stats request
2035 * @wmi_hdl: wma handle
2036 * @get_stats_param: stats params
2037 * @addr: mac address
2038 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302039 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302040 */
Govind Singhb53420c2016-03-09 14:32:57 +05302041QDF_STATUS wmi_unified_get_stats_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302042 struct pe_stats_req *get_stats_param,
2043 uint8_t addr[IEEE80211_ADDR_LEN])
2044{
2045 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2046
2047 if (wmi_handle->ops->send_get_stats_cmd)
2048 return wmi_handle->ops->send_get_stats_cmd(wmi_handle,
2049 get_stats_param, addr);
2050
Govind Singhb53420c2016-03-09 14:32:57 +05302051 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302052}
2053
2054/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05302055 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
2056 * @wmi_hdl: wma handle
2057 * @vdev_id: vdev id
2058 *
2059 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2060 */
2061QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
2062 uint8_t vdev_id)
2063{
2064 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2065
2066 if (wmi_handle->ops->send_congestion_cmd)
2067 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
2068 vdev_id);
2069
2070 return QDF_STATUS_E_FAILURE;
2071}
2072
2073/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05302074 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
2075 * @wmi_handle: wmi handle
2076 * @set_req: ll stats set request command params
2077 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302078 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302079 */
Govind Singhb53420c2016-03-09 14:32:57 +05302080QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302081 const struct ll_stats_set_params *set_req)
2082{
2083 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2084
2085 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
2086 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
2087 set_req);
2088
Govind Singhb53420c2016-03-09 14:32:57 +05302089 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302090}
Govind Singh20c5dac2016-03-07 15:33:31 +05302091
2092/**
2093 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
2094 * @wmi_handle: wmi handle
2095 * @rssi_req: get RSSI request
2096 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302097 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302098 */
Govind Singhb53420c2016-03-09 14:32:57 +05302099QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302100{
2101 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2102
2103 if (wmi_handle->ops->send_snr_request_cmd)
2104 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
2105
Govind Singhb53420c2016-03-09 14:32:57 +05302106 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302107}
2108
2109/**
2110 * wmi_unified_snr_cmd() - get RSSI from fw
2111 * @wmi_handle: wmi handle
2112 * @vdev_id: vdev id
2113 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302114 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302115 */
Govind Singhb53420c2016-03-09 14:32:57 +05302116QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302117{
2118 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2119
2120 if (wmi_handle->ops->send_snr_cmd)
2121 return wmi_handle->ops->send_snr_cmd(wmi_handle,
2122 vdev_id);
2123
Govind Singhb53420c2016-03-09 14:32:57 +05302124 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302125}
2126
2127/**
2128 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
2129 * @wmi_handle: wmi handle
2130 * @link_status: get link params
2131 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302132 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302133 */
Govind Singhb53420c2016-03-09 14:32:57 +05302134QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302135 struct link_status_params *link_status)
2136{
2137 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2138
2139 if (wmi_handle->ops->send_link_status_req_cmd)
2140 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
2141 link_status);
2142
Govind Singhb53420c2016-03-09 14:32:57 +05302143 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302144}
2145
Govind Singh20c5dac2016-03-07 15:33:31 +05302146/**
2147 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
2148 * @wmi_handle: wmi handle
2149 * @ta_dhcp_ind: DHCP indication parameter
2150 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302151 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302152 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302153#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302154QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302155 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2156{
2157 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2158
2159 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2160 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2161 ta_dhcp_ind);
2162
Govind Singhb53420c2016-03-09 14:32:57 +05302163 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302164}
2165
2166/**
2167 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2168 * @wmi_handle: wmi handle
2169 * @pLinkSpeed: link speed info
2170 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302171 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302172 */
Govind Singhb53420c2016-03-09 14:32:57 +05302173QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302174 wmi_mac_addr peer_macaddr)
2175{
2176 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2177
2178 if (wmi_handle->ops->send_get_link_speed_cmd)
2179 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2180 peer_macaddr);
2181
Govind Singhb53420c2016-03-09 14:32:57 +05302182 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302183}
2184
2185/**
2186 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2187 * @wmi_handle: wmi handler
2188 * @egap_params: pointer to egap_params
2189 *
2190 * Return: 0 for success, otherwise appropriate error code
2191 */
Govind Singhb53420c2016-03-09 14:32:57 +05302192QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302193 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params)
2194{
2195 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2196
2197 if (wmi_handle->ops->send_egap_conf_params_cmd)
2198 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2199 egap_params);
2200
Govind Singhb53420c2016-03-09 14:32:57 +05302201 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302202}
Paul Zhangd19abd82017-01-04 16:45:42 +08002203
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302204#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302205
2206/**
2207 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2208 * @wmi_handl: wmi handle
2209 * @cmd: Profiling command index
2210 * @value1: parameter1 value
2211 * @value2: parameter2 value
2212 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302213 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302214 */
Govind Singhb53420c2016-03-09 14:32:57 +05302215QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302216 uint32_t cmd, uint32_t value1, uint32_t value2)
2217{
2218 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2219
2220 if (wmi_handle->ops->send_fw_profiling_cmd)
2221 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2222 cmd, value1, value2);
2223
Govind Singhb53420c2016-03-09 14:32:57 +05302224 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302225}
2226
Govind Singh20c5dac2016-03-07 15:33:31 +05302227/**
2228 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2229 * @wmi_handle: wmi handle
2230 * @vdev_id: vdev id
2231 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302232 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302233 */
Govind Singhb53420c2016-03-09 14:32:57 +05302234QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302235{
2236 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2237
2238 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2239 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2240 vdev_id);
2241
Govind Singhb53420c2016-03-09 14:32:57 +05302242 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302243}
2244
2245/**
2246 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2247 * @wmi_hdl: wmi handle
2248 * @vdev_id: vdev id
2249 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302250 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302251 */
Govind Singhb53420c2016-03-09 14:32:57 +05302252QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302253{
2254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2255
2256 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2257 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2258 vdev_id);
2259
Govind Singhb53420c2016-03-09 14:32:57 +05302260 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302261}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002262
2263#ifdef WLAN_FEATURE_CIF_CFR
2264QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2265 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2266{
2267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2268
2269 if (wmi_handle->ops->send_start_oem_data_cmd)
2270 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2271
2272 return QDF_STATUS_E_FAILURE;
2273}
2274#endif
2275
Govind Singh20c5dac2016-03-07 15:33:31 +05302276/**
2277 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2278 * @wmi_handle: wmi handle
2279 * @startOemDataReq: start request params
2280 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302281 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302282 */
Govind Singhb53420c2016-03-09 14:32:57 +05302283QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002284 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302285 uint8_t *data)
2286{
2287 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2288
2289 if (wmi_handle->ops->send_start_oem_data_cmd)
2290 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2291 data_len, data);
2292
Govind Singhb53420c2016-03-09 14:32:57 +05302293 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302294}
2295
2296/**
2297 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2298 * @wmi_handle: wmi handle
2299 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2300 *
2301 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2302 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2303 * to firmware based on phyerr filtering
2304 * offload status.
2305 *
2306 * Return: 1 success, 0 failure
2307 */
Govind Singhb53420c2016-03-09 14:32:57 +05302308QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302309wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2310 bool dfs_phyerr_filter_offload)
2311{
2312 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2313
2314 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2315 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2316 dfs_phyerr_filter_offload);
2317
Govind Singhb53420c2016-03-09 14:32:57 +05302318 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302319}
2320
2321#if !defined(REMOVE_PKT_LOG)
2322/**
2323 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2324 * @wmi_handle: wmi handle
2325 * @pktlog_event: pktlog event
2326 * @cmd_id: pktlog cmd id
2327 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302328 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302329 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302330#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302331QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302332 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302333 uint32_t cmd_id,
2334 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302335{
2336 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2337
2338 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2339 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302340 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302341
Govind Singhb53420c2016-03-09 14:32:57 +05302342 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302343}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302344#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302345#endif /* REMOVE_PKT_LOG */
2346
2347/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302348 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2349 * @wmi_handle: wmi handle
2350 * @ptrn_id: pattern id
2351 * @vdev_id: vdev id
2352 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302353 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302354 */
Govind Singhb53420c2016-03-09 14:32:57 +05302355QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302356 uint8_t vdev_id)
2357{
2358 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2359
2360 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2361 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2362 ptrn_id, vdev_id);
2363
Govind Singhb53420c2016-03-09 14:32:57 +05302364 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302365}
2366
2367/**
2368 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2369 * @wmi_handle: wmi handle
2370 *
2371 * Sends host wakeup indication to FW. On receiving this indication,
2372 * FW will come out of WOW.
2373 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302374 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302375 */
Govind Singhb53420c2016-03-09 14:32:57 +05302376QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302377{
2378 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2379
2380 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2381 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2382
Govind Singhb53420c2016-03-09 14:32:57 +05302383 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302384}
2385
2386/**
2387 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2388 * @wmi_handle: wmi handle
2389 * @msg: delts params
2390 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302391 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302392 */
Govind Singhb53420c2016-03-09 14:32:57 +05302393QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302394 uint8_t ac)
2395{
2396 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2397
2398 if (wmi_handle->ops->send_del_ts_cmd)
2399 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2400 vdev_id, ac);
2401
Govind Singhb53420c2016-03-09 14:32:57 +05302402 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302403}
2404
2405/**
2406 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2407 * @wmi_handle: handle to wmi
2408 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2409 *
Govind Singhb53420c2016-03-09 14:32:57 +05302410 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302411 * ADD_TS requestes to firmware in loop for all the ACs with
2412 * active flow.
2413 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302414 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302415 */
Govind Singhb53420c2016-03-09 14:32:57 +05302416QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302417 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2418{
2419 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2420
2421 if (wmi_handle->ops->send_aggr_qos_cmd)
2422 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2423 aggr_qos_rsp_msg);
2424
Govind Singhb53420c2016-03-09 14:32:57 +05302425 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302426}
2427
2428/**
2429 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2430 * @wmi_handle: wmi handle
2431 * @msg: ADDTS params
2432 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302433 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302434 */
Govind Singhb53420c2016-03-09 14:32:57 +05302435QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302436 struct add_ts_param *msg)
2437{
2438 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2439
2440 if (wmi_handle->ops->send_add_ts_cmd)
2441 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2442 msg);
2443
Govind Singhb53420c2016-03-09 14:32:57 +05302444 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302445}
2446
2447/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302448 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2449 * @wmi_handle: wmi handle
2450 * @pAddPeriodicTxPtrnParams: tx ptrn params
2451 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302452 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302453 */
Govind Singhb53420c2016-03-09 14:32:57 +05302454QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302455 struct periodic_tx_pattern *
2456 pAddPeriodicTxPtrnParams,
2457 uint8_t vdev_id)
2458{
2459 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2460
2461 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2462 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2463 pAddPeriodicTxPtrnParams,
2464 vdev_id);
2465
Govind Singhb53420c2016-03-09 14:32:57 +05302466 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302467}
2468
2469/**
2470 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2471 * @wmi_handle: wmi handle
2472 * @vdev_id: vdev id
2473 * @pattern_id: pattern id
2474 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302475 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302476 */
Govind Singhb53420c2016-03-09 14:32:57 +05302477QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302478 uint8_t vdev_id,
2479 uint8_t pattern_id)
2480{
2481 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2482
2483 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2484 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2485 vdev_id,
2486 pattern_id);
2487
Govind Singhb53420c2016-03-09 14:32:57 +05302488 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302489}
2490
2491/**
2492 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2493 * @wmi_handle: wmi handle
2494 * @preq: stats ext params
2495 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302496 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302497 */
Govind Singhb53420c2016-03-09 14:32:57 +05302498QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302499 struct stats_ext_params *preq)
2500{
2501 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2502
2503 if (wmi_handle->ops->send_stats_ext_req_cmd)
2504 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2505 preq);
2506
Govind Singhb53420c2016-03-09 14:32:57 +05302507 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302508}
2509
2510/**
2511 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2512 * @wmi_handle: wmi handle
2513 * @params: ext wow params
2514 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302515 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302516 */
Govind Singhb53420c2016-03-09 14:32:57 +05302517QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302518 struct ext_wow_params *params)
2519{
2520 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2521
2522 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2523 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2524 params);
2525
Govind Singhb53420c2016-03-09 14:32:57 +05302526 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302527}
2528
2529/**
2530 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2531 * @wmi_handle: wmi handle
2532 * @appType2Params: app type2 params
2533 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302534 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302535 */
Govind Singhb53420c2016-03-09 14:32:57 +05302536QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302537 struct app_type2_params *appType2Params)
2538{
2539 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2540
2541 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2542 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2543 appType2Params);
2544
Govind Singhb53420c2016-03-09 14:32:57 +05302545 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302546
2547}
2548
2549/**
2550 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2551 * @wmi_handle: wmi handle
2552 * @timer_val: auto shutdown timer value
2553 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302554 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302555 */
Govind Singhb53420c2016-03-09 14:32:57 +05302556QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302557 uint32_t timer_val)
2558{
2559 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2560
2561 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2562 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2563 timer_val);
2564
Govind Singhb53420c2016-03-09 14:32:57 +05302565 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302566}
2567
2568/**
2569 * wmi_unified_nan_req_cmd() - to send nan request to target
2570 * @wmi_handle: wmi handle
2571 * @nan_req: request data which will be non-null
2572 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302573 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302574 */
Govind Singhb53420c2016-03-09 14:32:57 +05302575QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302576 struct nan_req_params *nan_req)
2577{
2578 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2579
2580 if (wmi_handle->ops->send_nan_req_cmd)
2581 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2582 nan_req);
2583
Govind Singhb53420c2016-03-09 14:32:57 +05302584 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302585}
2586
2587/**
2588 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2589 * @wmi_handle: wmi handle
2590 * @pDhcpSrvOffloadInfo: DHCP server offload info
2591 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302592 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302593 */
Govind Singhb53420c2016-03-09 14:32:57 +05302594QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302595 struct dhcp_offload_info_params *pDhcpSrvOffloadInfo)
2596{
2597 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2598
2599 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2600 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
2601 pDhcpSrvOffloadInfo);
2602
Govind Singhb53420c2016-03-09 14:32:57 +05302603 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302604}
2605
2606/**
2607 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2608 * @wmi_handle: wmi handle
2609 * @ch_avoid_update_req: channel avoid update params
2610 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302611 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302612 */
Govind Singhb53420c2016-03-09 14:32:57 +05302613QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302614{
2615 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2616
2617 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2618 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2619
Govind Singhb53420c2016-03-09 14:32:57 +05302620 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302621}
2622
2623/**
2624 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2625 * @wmi_handle: wmi handle
2626 * @reg_dmn: reg domain
2627 * @regdmn2G: 2G reg domain
2628 * @regdmn5G: 5G reg domain
2629 * @ctl2G: 2G test limit
2630 * @ctl5G: 5G test limit
2631 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302632 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302633 */
Govind Singhb53420c2016-03-09 14:32:57 +05302634QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302635 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302636 uint16_t regdmn5G, uint8_t ctl2G,
2637 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302638{
2639 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2640
2641 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2642 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2643 reg_dmn, regdmn2G,
2644 regdmn5G, ctl2G,
2645 ctl5G);
2646
Govind Singhb53420c2016-03-09 14:32:57 +05302647 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302648}
2649
2650
2651/**
2652 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2653 * @wmi_handle: wmi handle
2654 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2655 *
2656 * This function sets tdls off channel mode
2657 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2659 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302660 */
Govind Singhb53420c2016-03-09 14:32:57 +05302661QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302662 struct tdls_channel_switch_params *chan_switch_params)
2663{
2664 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2665
2666 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2667 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2668 chan_switch_params);
2669
Govind Singhb53420c2016-03-09 14:32:57 +05302670 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302671}
2672
2673/**
2674 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2675 * @wmi_handle: wmi handle
2676 * @pwmaTdlsparams: TDLS params
2677 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302678 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302679 */
Govind Singhb53420c2016-03-09 14:32:57 +05302680QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302681 void *tdls_param, uint8_t tdls_state)
2682{
2683 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2684
2685 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2686 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2687 tdls_param, tdls_state);
2688
Govind Singhb53420c2016-03-09 14:32:57 +05302689 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302690}
2691
2692/**
2693 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2694 * @wmi_handle: wmi handle
2695 * @peerStateParams: TDLS peer state params
2696 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302697 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302698 */
Govind Singhb53420c2016-03-09 14:32:57 +05302699QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302700 struct tdls_peer_state_params *peerStateParams,
2701 uint32_t *ch_mhz)
2702{
2703 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2704
2705 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2706 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2707 peerStateParams, ch_mhz);
2708
Govind Singhb53420c2016-03-09 14:32:57 +05302709 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302710}
2711
2712/**
2713 * wmi_unified_process_fw_mem_dump_cmd() - Function to request fw memory dump from
2714 * firmware
2715 * @wmi_handle: Pointer to wmi handle
2716 * @mem_dump_req: Pointer for mem_dump_req
2717 *
2718 * This function sends memory dump request to firmware
2719 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302720 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302721 *
2722 */
Govind Singhb53420c2016-03-09 14:32:57 +05302723QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302724 struct fw_dump_req_param *mem_dump_req)
2725{
2726 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2727
2728 if (wmi_handle->ops->send_process_fw_mem_dump_cmd)
2729 return wmi_handle->ops->send_process_fw_mem_dump_cmd(wmi_handle,
2730 mem_dump_req);
2731
Govind Singhb53420c2016-03-09 14:32:57 +05302732 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302733}
2734
2735/**
2736 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2737 * @wmi_handle: Pointer to WMi handle
2738 * @ie_data: Pointer for ie data
2739 *
2740 * This function sends IE information to firmware
2741 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302742 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302743 *
2744 */
Govind Singhb53420c2016-03-09 14:32:57 +05302745QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302746 struct vdev_ie_info_param *ie_info)
2747{
2748 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2749
2750 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2751 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2752 ie_info);
2753
Govind Singhb53420c2016-03-09 14:32:57 +05302754 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302755}
Himanshu Agarwal7c83dcd2016-07-19 15:41:51 +05302756#ifdef CONFIG_MCL
Govind Singh9ddd5162016-03-07 16:30:32 +05302757/**
2758 * wmi_unified_send_init_cmd() - wmi init command
2759 * @wmi_handle: pointer to wmi handle
2760 * @res_cfg: resource config
2761 * @num_mem_chunks: no of mem chunck
2762 * @mem_chunk: pointer to mem chunck structure
2763 *
2764 * This function sends IE information to firmware
2765 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302766 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302767 *
2768 */
Govind Singhb53420c2016-03-09 14:32:57 +05302769QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302770 wmi_resource_config *res_cfg,
2771 uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
2772 bool action)
2773{
2774 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2775
2776 if (wmi_handle->ops->send_init_cmd)
2777 return wmi_handle->ops->send_init_cmd(wmi_handle,
2778 res_cfg, num_mem_chunks, mem_chunk, action);
2779
Govind Singhb53420c2016-03-09 14:32:57 +05302780 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302781}
Himanshu Agarwal7c83dcd2016-07-19 15:41:51 +05302782#endif
Govind Singh9ddd5162016-03-07 16:30:32 +05302783/**
2784 * wmi_unified_send_saved_init_cmd() - wmi init command
2785 * @wmi_handle: pointer to wmi handle
2786 *
2787 * This function sends IE information to firmware
2788 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302789 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302790 *
2791 */
Govind Singhb53420c2016-03-09 14:32:57 +05302792QDF_STATUS wmi_unified_send_saved_init_cmd(void *wmi_hdl)
Govind Singh9ddd5162016-03-07 16:30:32 +05302793{
2794 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2795
2796 if (wmi_handle->ops->send_saved_init_cmd)
2797 return wmi_handle->ops->send_saved_init_cmd(wmi_handle);
2798
Govind Singhb53420c2016-03-09 14:32:57 +05302799 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302800}
2801
2802/**
2803 * wmi_unified_save_fw_version_cmd() - save fw version
2804 * @wmi_handle: pointer to wmi handle
2805 * @res_cfg: resource config
2806 * @num_mem_chunks: no of mem chunck
2807 * @mem_chunk: pointer to mem chunck structure
2808 *
2809 * This function sends IE information to firmware
2810 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302811 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302812 *
2813 */
Govind Singhb53420c2016-03-09 14:32:57 +05302814QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302815 void *evt_buf)
2816{
2817 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2818
2819 if (wmi_handle->ops->save_fw_version_cmd)
2820 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2821 evt_buf);
2822
Govind Singhb53420c2016-03-09 14:32:57 +05302823 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302824}
Govind Singha4836fd2016-03-07 16:45:38 +05302825
2826/**
2827 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2828 * @wmi_hdl: wmi handle
2829 * @custom_addr: base mac address
2830 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302831 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302832 */
Govind Singhb53420c2016-03-09 14:32:57 +05302833QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302834 uint8_t *custom_addr)
2835{
2836 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2837
2838 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2839 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2840 custom_addr);
2841
Govind Singhb53420c2016-03-09 14:32:57 +05302842 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302843}
2844
2845/**
2846 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2847 * @wmi_hdl: wmi handle
2848 * @event: Event received from FW
2849 * @len: Length of the event
2850 *
2851 * Enables the low frequency events and disables the high frequency
2852 * events. Bit 17 indicates if the event if low/high frequency.
2853 * 1 - high frequency, 0 - low frequency
2854 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302855 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302856 */
Govind Singhb53420c2016-03-09 14:32:57 +05302857QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302858 uint8_t *event,
2859 uint32_t len)
2860{
2861 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2862
2863 if (wmi_handle->ops->send_log_supported_evt_cmd)
2864 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2865 event, len);
2866
Govind Singhb53420c2016-03-09 14:32:57 +05302867 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302868}
2869
2870/**
2871 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2872 * @wmi_hdl: wmi handle
2873 * @start_log: Start logging related parameters
2874 *
2875 * Send the command to the FW based on which specific logging of diag
2876 * event/log id can be started/stopped
2877 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302878 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302879 */
Govind Singhb53420c2016-03-09 14:32:57 +05302880QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302881 struct wmi_wifi_start_log *start_log)
2882{
2883 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2884
2885 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2886 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2887 start_log);
2888
Govind Singhb53420c2016-03-09 14:32:57 +05302889 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302890}
2891
2892/**
2893 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2894 * @wmi_hdl: WMI handle
2895 *
2896 * This function is used to send the flush command to the FW,
2897 * that will flush the fw logs that are residue in the FW
2898 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302899 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302900 */
Govind Singhb53420c2016-03-09 14:32:57 +05302901QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302902{
2903 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2904
2905 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2906 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2907
Govind Singhb53420c2016-03-09 14:32:57 +05302908 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302909}
2910
2911/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302912 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302913 * @wmi_hdl: wmi handle
2914 * @msg: PCL structure containing the PCL and the number of channels
2915 *
2916 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2917 * firmware. The DBS Manager is the consumer of this information in the WLAN
2918 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2919 * to migrate to a new channel without host driver involvement. An example of
2920 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2921 * manage the channel selection without firmware involvement.
2922 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302923 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302924 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302925QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2926 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302927{
2928 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2929
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302930 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2931 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302932
Govind Singhb53420c2016-03-09 14:32:57 +05302933 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302934}
2935
2936/**
2937 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2938 * @wmi_hdl: wmi handle
2939 * @msg: Structure containing the following parameters
2940 *
2941 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2942 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2943 *
2944 * Provides notification to the WLAN firmware that host driver is requesting a
2945 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2946 * configurations that include the Dual Band Simultaneous (DBS) feature.
2947 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302948 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302949 */
Govind Singhb53420c2016-03-09 14:32:57 +05302950QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302951 uint32_t hw_mode_index)
2952{
2953 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2954
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302955 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2956 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302957 hw_mode_index);
2958
Govind Singhb53420c2016-03-09 14:32:57 +05302959 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302960}
2961
2962/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302963 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302964 * @wmi_hdl: wmi handle
2965 * @msg: Dual MAC config parameters
2966 *
2967 * Configures WLAN firmware with the dual MAC features
2968 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302969 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302970 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302971QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302972 struct wmi_dual_mac_config *msg)
2973{
2974 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2975
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302976 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2977 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302978 msg);
2979
Govind Singhb53420c2016-03-09 14:32:57 +05302980 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302981}
2982
Govind Singha4836fd2016-03-07 16:45:38 +05302983/**
2984 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
2985 * @wmi_hdl: wmi handle
2986 * @flashing: flashing request
2987 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302988 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302989 */
Govind Singhb53420c2016-03-09 14:32:57 +05302990QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302991 struct flashing_req_params *flashing)
2992{
2993 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2994
2995 if (wmi_handle->ops->send_set_led_flashing_cmd)
2996 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
2997 flashing);
2998
Govind Singhb53420c2016-03-09 14:32:57 +05302999 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303000}
3001
3002/**
3003 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
3004 * @wmi_hdl: wmi handle
3005 * @appType1Params: app type1 params
3006 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303007 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303008 */
Govind Singhb53420c2016-03-09 14:32:57 +05303009QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303010 struct app_type1_params *app_type1_params)
3011{
3012 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3013
3014 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
3015 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
3016 app_type1_params);
3017
Govind Singhb53420c2016-03-09 14:32:57 +05303018 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303019}
3020
3021/**
3022 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
3023 * @wmi_hdl: wmi handle
3024 * @request: SSID hotlist set request
3025 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303026 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303027 */
Govind Singhb53420c2016-03-09 14:32:57 +05303028QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05303029wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
3030 struct ssid_hotlist_request_params *request)
3031{
3032 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3033
3034 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
3035 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
3036 request);
3037
Govind Singhb53420c2016-03-09 14:32:57 +05303038 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303039}
3040
3041/**
3042 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
3043 * @wmi_hdl: wmi handle
3044 * @vdev_id: vdev id
3045 *
3046 * This function sends roam synch complete event to fw.
3047 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303048 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303049 */
Govind Singhb53420c2016-03-09 14:32:57 +05303050QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303051 uint8_t vdev_id)
3052{
3053 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3054
3055 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
3056 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
3057 vdev_id);
3058
Govind Singhb53420c2016-03-09 14:32:57 +05303059 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303060}
3061
3062/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05303063 * wmi_unified_fw_test_cmd() - send fw test command to fw.
3064 * @wmi_hdl: wmi handle
3065 * @wmi_fwtest: fw test command
3066 *
3067 * This function sends fw test command to fw.
3068 *
3069 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3070 */
3071QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
3072 struct set_fwtest_params *wmi_fwtest)
3073{
3074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3075
3076 if (wmi_handle->ops->send_fw_test_cmd)
3077 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
3078 wmi_fwtest);
3079
3080 return QDF_STATUS_E_FAILURE;
3081
3082}
3083
3084/**
Govind Singha4836fd2016-03-07 16:45:38 +05303085 * wmi_unified_unit_test_cmd() - send unit test command to fw.
3086 * @wmi_hdl: wmi handle
3087 * @wmi_utest: unit test command
3088 *
3089 * This function send unit test command to fw.
3090 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303091 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303092 */
Govind Singhb53420c2016-03-09 14:32:57 +05303093QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303094 struct wmi_unit_test_cmd *wmi_utest)
3095{
3096 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3097
3098 if (wmi_handle->ops->send_unit_test_cmd)
3099 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
3100 wmi_utest);
3101
Govind Singhb53420c2016-03-09 14:32:57 +05303102 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303103}
3104
3105/**
3106 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
3107 * @wmi_hdl: wmi handle
3108 * @roaminvoke: roam invoke command
3109 *
3110 * Send roam invoke command to fw for fastreassoc.
3111 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303112 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303113 */
Govind Singhb53420c2016-03-09 14:32:57 +05303114QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303115 struct wmi_roam_invoke_cmd *roaminvoke,
3116 uint32_t ch_hz)
3117{
3118 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3119
3120 if (wmi_handle->ops->send_roam_invoke_cmd)
3121 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
3122 roaminvoke, ch_hz);
3123
Govind Singhb53420c2016-03-09 14:32:57 +05303124 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303125}
3126
3127/**
3128 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
3129 * @wmi_hdl: wmi handle
3130 * @command: command
3131 * @vdev_id: vdev id
3132 *
3133 * This function set roam offload command to fw.
3134 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303135 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303136 */
Govind Singhb53420c2016-03-09 14:32:57 +05303137QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303138 uint32_t command, uint32_t vdev_id)
3139{
3140 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3141
3142 if (wmi_handle->ops->send_roam_scan_offload_cmd)
3143 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
3144 command, vdev_id);
3145
Govind Singhb53420c2016-03-09 14:32:57 +05303146 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303147}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05303148#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05303149/**
3150 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
3151 * @wmi_hdl: wmi handle
3152 * @ap_profile_p: ap profile
3153 * @vdev_id: vdev id
3154 *
3155 * Send WMI_ROAM_AP_PROFILE to firmware
3156 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303157 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303158 */
Govind Singhb53420c2016-03-09 14:32:57 +05303159QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303160 wmi_ap_profile *ap_profile_p,
3161 uint32_t vdev_id)
3162{
3163 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3164
3165 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
3166 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(wmi_handle,
3167 ap_profile_p, vdev_id);
3168
Govind Singhb53420c2016-03-09 14:32:57 +05303169 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303170}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303171#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303172/**
3173 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3174 * @wmi_handle: wmi handle
3175 * @scan_period: scan period
3176 * @scan_age: scan age
3177 * @vdev_id: vdev id
3178 *
3179 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3180 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303181 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303182 */
Govind Singhb53420c2016-03-09 14:32:57 +05303183QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303184 uint32_t scan_period,
3185 uint32_t scan_age,
3186 uint32_t vdev_id)
3187{
3188 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3189
3190 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3191 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3192 scan_period, scan_age, vdev_id);
3193
Govind Singhb53420c2016-03-09 14:32:57 +05303194 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303195}
3196
3197/**
3198 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3199 * @wmi_handle: wmi handle
3200 * @chan_count: channel count
3201 * @chan_list: channel list
3202 * @list_type: list type
3203 * @vdev_id: vdev id
3204 *
3205 * Set roam offload channel list.
3206 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303207 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303208 */
Govind Singhb53420c2016-03-09 14:32:57 +05303209QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303210 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003211 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303212 uint8_t list_type, uint32_t vdev_id)
3213{
3214 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3215
3216 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3217 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3218 chan_count, chan_list,
3219 list_type, vdev_id);
3220
Govind Singhb53420c2016-03-09 14:32:57 +05303221 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303222}
3223
3224/**
3225 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3226 * @wmi_hdl: wmi handle
3227 * @rssi_change_thresh: RSSI Change threshold
3228 * @bcn_rssi_weight: beacon RSSI weight
3229 * @vdev_id: vdev id
3230 *
3231 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3232 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303233 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303234 */
Govind Singhb53420c2016-03-09 14:32:57 +05303235QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303236 uint32_t vdev_id,
3237 int32_t rssi_change_thresh,
3238 uint32_t bcn_rssi_weight,
3239 uint32_t hirssi_delay_btw_scans)
3240{
3241 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3242
3243 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3244 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3245 vdev_id, rssi_change_thresh,
3246 bcn_rssi_weight, hirssi_delay_btw_scans);
3247
Govind Singhb53420c2016-03-09 14:32:57 +05303248 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303249}
3250
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303251QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3252 struct wmi_per_roam_config_req *req_buf)
3253{
3254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3255
3256 if (wmi_handle->ops->send_per_roam_config_cmd)
3257 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3258 req_buf);
3259
3260 return QDF_STATUS_E_FAILURE;
3261}
3262
Govind Singha4836fd2016-03-07 16:45:38 +05303263/**
3264 * wmi_unified_get_buf_extscan_hotlist_cmd() - prepare hotlist command
3265 * @wmi_hdl: wmi handle
3266 * @photlist: hotlist command params
3267 * @buf_len: buffer length
3268 *
3269 * This function fills individual elements for hotlist request and
3270 * TLV for bssid entries
3271 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303272 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singha4836fd2016-03-07 16:45:38 +05303273 */
Govind Singhb53420c2016-03-09 14:32:57 +05303274QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303275 struct ext_scan_setbssi_hotlist_params *
3276 photlist, int *buf_len)
3277{
3278 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3279
3280 if (wmi_handle->ops->send_get_buf_extscan_hotlist_cmd)
3281 return wmi_handle->ops->send_get_buf_extscan_hotlist_cmd(wmi_handle,
3282 photlist, buf_len);
3283
Govind Singhb53420c2016-03-09 14:32:57 +05303284 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303285}
3286
Dustin Brown4423f632017-01-13 15:24:07 -08003287QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl,
3288 uint8_t vdev_id,
3289 enum wmi_host_active_bpf_mode ucast_mode,
3290 enum wmi_host_active_bpf_mode mcast_bcast_mode)
3291{
3292 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3293
3294 if (!wmi->ops->send_set_active_bpf_mode_cmd) {
Srinivas Girigowda61e086f2017-06-19 17:20:20 -07003295 WMI_LOGD("send_set_active_bpf_mode_cmd op is NULL");
Dustin Brown4423f632017-01-13 15:24:07 -08003296 return QDF_STATUS_E_FAILURE;
3297 }
3298
3299 return wmi->ops->send_set_active_bpf_mode_cmd(wmi, vdev_id,
3300 ucast_mode,
3301 mcast_bcast_mode);
3302}
3303
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303304/**
3305 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3306 * @param wmi_handle : handle to WMI.
3307 * @param param : tpc config param
3308 *
3309 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3310 */
3311QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3312 uint32_t param)
3313{
3314 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3315
3316 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3317 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3318 param);
3319
3320 return QDF_STATUS_E_FAILURE;
3321}
3322
3323/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303324 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3325 * @param wmi_handle : handle to WMI.
3326 * @param param : pointer to set bwf param
3327 *
3328 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3329 */
3330QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3331 struct set_bwf_params *param)
3332{
3333 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3334
3335 if (wmi_handle->ops->send_set_bwf_cmd)
3336 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3337
3338 return QDF_STATUS_E_FAILURE;
3339}
3340
3341/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303342 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3343 * @param wmi_handle : handle to WMI.
3344 * @param param : pointer to set atf param
3345 *
3346 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3347 */
3348QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3349 struct set_atf_params *param)
3350{
3351 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3352
3353 if (wmi_handle->ops->send_set_atf_cmd)
3354 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3355
3356 return QDF_STATUS_E_FAILURE;
3357}
3358
3359/**
3360 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3361 * @param wmi_handle : handle to WMI.
3362 * @param param : pointer to hold pdev fips param
3363 *
3364 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3365 */
3366QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3367 struct fips_params *param)
3368{
3369 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3370
3371 if (wmi_handle->ops->send_pdev_fips_cmd)
3372 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3373
3374 return QDF_STATUS_E_FAILURE;
3375}
3376
3377/**
3378 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3379 * @param wmi_handle : handle to WMI.
3380 * @param param : pointer to hold wlan profile param
3381 *
3382 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3383 */
3384QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3385 struct wlan_profile_params *param)
3386{
3387 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3388
3389 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3390 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3391 param);
3392
3393 return QDF_STATUS_E_FAILURE;
3394}
3395
3396/**
3397 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3398 * @param wmi_handle : handle to WMI.
3399 * @param param : pointer to hold wlan profile param
3400 *
3401 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3402 */
3403QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3404 struct wlan_profile_params *param)
3405{
3406 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3407
3408 if (wmi->ops->send_wlan_profile_trigger_cmd)
3409 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3410 param);
3411
3412 return QDF_STATUS_E_FAILURE;
3413}
3414
3415/**
3416 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3417 * @param wmi_handle : handle to WMI.
3418 * @param param : pointer to hold channel param
3419 *
3420 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3421 */
3422QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3423 struct channel_param *param)
3424{
3425 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3426
3427 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3428 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3429 param);
3430
3431 return QDF_STATUS_E_FAILURE;
3432}
3433
3434/**
3435 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3436 * @param wmi_handle : handle to WMI.
3437 * @param param : pointer to hold channel param
3438 *
3439 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3440 */
3441QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3442 struct ht_ie_params *param)
3443{
3444 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3445
3446 if (wmi_handle->ops->send_set_ht_ie_cmd)
3447 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3448
3449 return QDF_STATUS_E_FAILURE;
3450}
3451
3452/**
3453 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3454 * @param wmi_handle : handle to WMI.
3455 * @param param : pointer to hold channel param
3456 *
3457 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3458 */
3459QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3460 struct vht_ie_params *param)
3461{
3462 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3463
3464 if (wmi_handle->ops->send_set_vht_ie_cmd)
3465 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3466
3467 return QDF_STATUS_E_FAILURE;
3468}
3469
3470/**
3471 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3472 * @param wmi_handle : handle to WMI.
3473 * @param param : pointer to hold wmm param
3474 *
3475 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3476 */
3477QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3478 struct wmm_update_params *param)
3479{
3480 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3481
3482 if (wmi_handle->ops->send_wmm_update_cmd)
3483 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3484
3485 return QDF_STATUS_E_FAILURE;
3486}
3487
3488/**
3489 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3490 * @param wmi_handle : handle to WMI.
3491 * @param param : pointer to hold ant switch tbl param
3492 *
3493 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3494 */
3495QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3496 struct ant_switch_tbl_params *param)
3497{
3498 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3499
3500 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3501 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3502 param);
3503
3504 return QDF_STATUS_E_FAILURE;
3505}
3506
3507/**
3508 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3509 * @param wmi_handle : handle to WMI.
3510 * @param param : pointer to hold ratepwr table param
3511 *
3512 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3513 */
3514QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3515 struct ratepwr_table_params *param)
3516{
3517 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3518
3519 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3520 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3521 param);
3522
3523 return QDF_STATUS_E_FAILURE;
3524}
3525
3526/**
3527 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3528 * @param wmi_handle : handle to WMI.
3529 *
3530 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3531 */
3532QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3533{
3534 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3535
3536 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3537 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3538
3539 return QDF_STATUS_E_FAILURE;
3540}
3541
3542/**
3543 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3544 * @param wmi_handle : handle to WMI.
3545 * @param param : pointer to hold ctl table param
3546 *
3547 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3548 */
3549QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3550 struct ctl_table_params *param)
3551{
3552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3553
3554 if (wmi_handle->ops->send_set_ctl_table_cmd)
3555 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3556 param);
3557
3558 return QDF_STATUS_E_FAILURE;
3559}
3560
3561/**
3562 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3563 * @param wmi_handle : handle to WMI.
3564 * @param param : pointer to hold mimogain param
3565 *
3566 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3567 */
3568QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3569 struct mimogain_table_params *param)
3570{
3571 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3572
3573 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3574 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3575 param);
3576
3577 return QDF_STATUS_E_FAILURE;
3578}
3579
3580/**
3581 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3582 * chainmsk cmd function
3583 * @param wmi_handle : handle to WMI.
3584 * @param param : pointer to hold ratepwr chainmsk param
3585 *
3586 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3587 */
3588QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3589 struct ratepwr_chainmsk_params *param)
3590{
3591 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3592
3593 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3594 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3595
3596 return QDF_STATUS_E_FAILURE;
3597}
3598
3599/**
3600 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3601 * @param wmi_handle : handle to WMI.
3602 * @param param : pointer to hold macaddr param
3603 *
3604 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3605 */
3606QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3607 struct macaddr_params *param)
3608{
3609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3610
3611 if (wmi_handle->ops->send_set_macaddr_cmd)
3612 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3613
3614 return QDF_STATUS_E_FAILURE;
3615}
3616
3617/**
3618 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3619 * @param wmi_handle : handle to WMI.
3620 *
3621 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3622 */
3623QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3624{
3625 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3626
3627 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3628 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3629
3630 return QDF_STATUS_E_FAILURE;
3631}
3632
3633/**
3634 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3635 * @param wmi_handle : handle to WMI.
3636 *
3637 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3638 */
3639QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3640{
3641 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3642
3643 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3644 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3645
3646 return QDF_STATUS_E_FAILURE;
3647}
3648
3649/**
3650 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3651 * @param wmi_handle : handle to WMI.
3652 * @param param : pointer to hold acparams param
3653 *
3654 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3655 */
3656QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3657 struct acparams_params *param)
3658{
3659 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3660
3661 if (wmi_handle->ops->send_set_acparams_cmd)
3662 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3663 param);
3664
3665 return QDF_STATUS_E_FAILURE;
3666}
3667
3668/**
3669 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3670 * tid map cmd function
3671 * @param wmi_handle : handle to WMI.
3672 * @param param : pointer to hold dscp param
3673 *
3674 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3675 */
3676QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3677 struct vap_dscp_tid_map_params *param)
3678{
3679 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3680
3681 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3682 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3683
3684 return QDF_STATUS_E_FAILURE;
3685}
3686
3687/**
3688 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3689 * reserve cmd function
3690 * @param wmi_handle : handle to WMI.
3691 * @param param : pointer to hold ast param
3692 *
3693 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3694 */
3695QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3696 struct proxy_ast_reserve_params *param)
3697{
3698 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3699
3700 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3701 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3702 param);
3703
3704 return QDF_STATUS_E_FAILURE;
3705}
3706
3707/**
3708 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3709 * @param wmi_handle : handle to WMI.
3710 * @param param : pointer to hold qvit param
3711 *
3712 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3713 */
3714QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3715 struct pdev_qvit_params *param)
3716{
3717 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3718
3719 if (wmi_handle->ops->send_pdev_qvit_cmd)
3720 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3721
3722 return QDF_STATUS_E_FAILURE;
3723}
3724
3725/**
3726 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3727 * @param wmi_handle : handle to WMI.
3728 * @param param : pointer to hold mcast grp param
3729 *
3730 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3731 */
3732QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3733 struct mcast_group_update_params *param)
3734{
3735 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3736
3737 if (wmi_handle->ops->send_mcast_group_update_cmd)
3738 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3739 param);
3740
3741 return QDF_STATUS_E_FAILURE;
3742}
3743
3744/**
3745 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3746 * @param wmi_handle : handle to WMI.
3747 * @param param : pointer to hold wds entry param
3748 *
3749 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3750 */
3751QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3752 struct peer_add_wds_entry_params *param)
3753{
3754 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3755
3756 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3757 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3758 param);
3759
3760 return QDF_STATUS_E_FAILURE;
3761}
3762
3763/**
3764 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3765 * @param wmi_handle : handle to WMI.
3766 * @param param : pointer to hold wds entry param
3767 *
3768 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3769 */
3770QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3771 struct peer_del_wds_entry_params *param)
3772{
3773 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3774
3775 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3776 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3777 param);
3778
3779 return QDF_STATUS_E_FAILURE;
3780}
3781
3782/**
3783 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3784 * @param wmi_handle : handle to WMI.
3785 * @param param : pointer to hold wds entry param
3786 *
3787 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3788 */
3789QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3790 struct peer_update_wds_entry_params *param)
3791{
3792 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3793
3794 if (wmi->ops->send_peer_update_wds_entry_cmd)
3795 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3796
3797 return QDF_STATUS_E_FAILURE;
3798}
3799
3800/**
3801 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3802 * @param wmi_handle : handle to WMI.
3803 * @param param : pointer to hold phyerr enable param
3804 *
3805 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3806 */
3807QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3808{
3809 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3810
3811 if (wmi_handle->ops->send_phyerr_enable_cmd)
3812 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3813
3814 return QDF_STATUS_E_FAILURE;
3815}
3816
3817/**
3818 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3819 * @param wmi_handle : handle to WMI.
3820 * @param param : pointer to hold phyerr disable param
3821 *
3822 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3823 */
3824QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3825{
3826 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3827
3828 if (wmi_handle->ops->send_phyerr_disable_cmd)
3829 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3830
3831 return QDF_STATUS_E_FAILURE;
3832}
3833
3834/**
3835 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3836 * @param wmi_handle : handle to WMI.
3837 * @param param : pointer to hold antenna param
3838 *
3839 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3840 */
3841QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3842 struct smart_ant_enable_params *param)
3843{
3844 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3845
3846 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3847 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3848 param);
3849
3850 return QDF_STATUS_E_FAILURE;
3851}
3852
3853/**
3854 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3855 * @param wmi_handle : handle to WMI.
3856 * @param param : pointer to hold antenna param
3857 *
3858 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3859 */
3860QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3861 struct smart_ant_rx_ant_params *param)
3862{
3863 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3864
3865 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3866 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3867
3868 return QDF_STATUS_E_FAILURE;
3869}
3870
3871/**
3872 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3873 * @param wmi_handle : handle to WMI.
3874 * @param param : pointer to hold antenna param
3875 *
3876 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3877 */
3878QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3879 uint8_t macaddr[IEEE80211_ADDR_LEN],
3880 struct smart_ant_tx_ant_params *param)
3881{
3882 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3883
3884 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3885 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3886 param);
3887
3888 return QDF_STATUS_E_FAILURE;
3889}
3890
3891/**
3892 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3893 * @param wmi_handle : handle to WMI.
3894 * @param param : pointer to hold antenna param
3895 *
3896 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3897 */
3898QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3899 uint8_t macaddr[IEEE80211_ADDR_LEN],
3900 struct smart_ant_training_info_params *param)
3901{
3902 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3903
3904 if (wmi->ops->send_smart_ant_set_training_info_cmd)
3905 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
3906 macaddr, param);
3907
3908 return QDF_STATUS_E_FAILURE;
3909}
3910
3911/**
3912 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
3913 * @param wmi_handle : handle to WMI.
3914 * @param macaddr : MAC address
3915 * @param param : pointer to hold node parameter
3916 *
3917 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3918 */
3919QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
3920 uint8_t macaddr[IEEE80211_ADDR_LEN],
3921 struct smart_ant_node_config_params *param)
3922{
3923 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3924
3925 if (wmi->ops->send_smart_ant_set_node_config_cmd)
3926 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
3927 macaddr, param);
3928
3929 return QDF_STATUS_E_FAILURE;
3930}
3931
3932/**
3933 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
3934 * @param wmi_handle : handle to WMI.
3935 * @param param : pointer to hold antenna param
3936 *
3937 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3938 */
3939QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
3940 struct smart_ant_enable_tx_feedback_params *param)
3941{
3942 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3943
3944 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
3945 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
3946 param);
3947
3948 return QDF_STATUS_E_FAILURE;
3949}
3950
3951/**
3952 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
3953 * @param wmi_handle : handle to WMI.
3954 * @param param : pointer to hold spectral config param
3955 *
3956 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3957 */
3958QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
3959 struct vdev_spectral_configure_params *param)
3960{
3961 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3962
3963 if (wmi->ops->send_vdev_spectral_configure_cmd)
3964 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
3965
3966 return QDF_STATUS_E_FAILURE;
3967}
3968
3969/**
3970 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
3971 * @param wmi_handle : handle to WMI.
3972 * @param param : pointer to hold enable spectral param
3973 *
3974 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3975 */
3976QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
3977 struct vdev_spectral_enable_params *param)
3978{
3979 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3980
3981 if (wmi->ops->send_vdev_spectral_enable_cmd)
3982 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
3983
3984 return QDF_STATUS_E_FAILURE;
3985}
3986
3987/**
3988 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
3989 * @param wmi_handle : handle to WMI.
3990 * @param param : pointer to hold chan info param
3991 *
3992 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3993 */
3994QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
3995 struct bss_chan_info_request_params *param)
3996{
3997 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3998
3999 if (wmi->ops->send_bss_chan_info_request_cmd)
4000 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
4001
4002 return QDF_STATUS_E_FAILURE;
4003}
4004
4005/**
4006 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
4007 * @param wmi_handle : handle to WMI.
4008 * @param param : pointer to hold thermal mitigation param
4009 *
4010 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4011 */
4012QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
4013 struct thermal_mitigation_params *param)
4014{
4015 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4016
4017 if (wmi->ops->send_thermal_mitigation_param_cmd)
4018 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
4019
4020 return QDF_STATUS_E_FAILURE;
4021}
4022
4023/**
4024 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
4025 * @param wmi_handle : handle to WMI.
4026 * @param macaddr : MAC address
4027 * @param param : pointer to hold neighbour rx parameter
4028 *
4029 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4030 */
4031QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
4032 uint8_t macaddr[IEEE80211_ADDR_LEN],
4033 struct set_neighbour_rx_params *param)
4034{
4035 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4036
4037 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
4038 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
4039 macaddr, param);
4040
4041 return QDF_STATUS_E_FAILURE;
4042}
4043
4044/**
4045 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
4046 * @param wmi_handle : handle to WMI.
4047 * @param param : pointer to hold fwtest param
4048 *
4049 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4050 */
4051QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
4052 struct set_fwtest_params *param)
4053{
4054 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4055
4056 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
4057 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
4058
4059 return QDF_STATUS_E_FAILURE;
4060}
4061
4062/**
4063 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4064 * @param wmi_handle : handle to WMI.
4065 * @param param : pointer to hold config ratemask param
4066 *
4067 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4068 */
4069QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4070 struct config_ratemask_params *param)
4071{
4072 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4073
4074 if (wmi->ops->send_vdev_config_ratemask_cmd)
4075 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4076
4077 return QDF_STATUS_E_FAILURE;
4078}
4079
4080/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304081 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4082 * @param wmi_handle : handle to WMI.
4083 * @param param : pointer to hold regdomain param
4084 *
4085 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4086 */
4087QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4088 struct pdev_set_regdomain_params *param)
4089{
4090 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4091
4092 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4093 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4094 param);
4095
4096 return QDF_STATUS_E_FAILURE;
4097}
4098
4099/**
4100 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4101 * @param wmi_handle : handle to WMI.
4102 * @param param : pointer to hold quiet mode param
4103 *
4104 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4105 */
4106QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4107 struct set_quiet_mode_params *param)
4108{
4109 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4110
4111 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4112 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4113 param);
4114
4115 return QDF_STATUS_E_FAILURE;
4116}
4117
4118/**
4119 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4120 * @param wmi_handle : handle to WMI.
4121 * @param param : pointer to hold beacon filter param
4122 *
4123 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4124 */
4125QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4126 struct set_beacon_filter_params *param)
4127{
4128 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4129
4130 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4131 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4132 param);
4133
4134 return QDF_STATUS_E_FAILURE;
4135}
4136
4137/**
4138 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4139 * @param wmi_handle : handle to WMI.
4140 * @param param : pointer to hold beacon filter param
4141 *
4142 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4143 */
4144QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4145 struct remove_beacon_filter_params *param)
4146{
4147 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4148
4149 if (wmi->ops->send_remove_beacon_filter_cmd)
4150 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4151
4152 return QDF_STATUS_E_FAILURE;
4153}
4154
4155/**
4156 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4157 * @param wmi_handle : handle to WMI.
4158 * @param macaddr : MAC address
4159 * @param param : pointer to hold mgmt parameter
4160 *
4161 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4162 */
4163#if 0
4164QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4165 uint8_t macaddr[IEEE80211_ADDR_LEN],
4166 struct mgmt_params *param)
4167{
4168 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4169
4170 if (wmi_handle->ops->send_mgmt_cmd)
4171 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4172 macaddr, param);
4173
4174 return QDF_STATUS_E_FAILURE;
4175}
4176#endif
4177
4178/**
4179 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4180 * @param wmi_handle : handle to WMI.
4181 * @param macaddr : MAC address
4182 * @param param : pointer to hold addba resp parameter
4183 *
4184 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4185 */
4186QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4187 uint8_t macaddr[IEEE80211_ADDR_LEN],
4188 struct addba_clearresponse_params *param)
4189{
4190 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4191
4192 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4193 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4194 macaddr, param);
4195
4196 return QDF_STATUS_E_FAILURE;
4197}
4198
4199/**
4200 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4201 * @param wmi_handle : handle to WMI.
4202 * @param macaddr : MAC address
4203 * @param param : pointer to hold addba parameter
4204 *
4205 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4206 */
4207QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4208 uint8_t macaddr[IEEE80211_ADDR_LEN],
4209 struct addba_send_params *param)
4210{
4211 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4212
4213 if (wmi_handle->ops->send_addba_send_cmd)
4214 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4215 macaddr, param);
4216
4217 return QDF_STATUS_E_FAILURE;
4218}
4219
4220/**
4221 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4222 * @param wmi_handle : handle to WMI.
4223 * @param macaddr : MAC address
4224 * @param param : pointer to hold delba parameter
4225 *
4226 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4227 */
4228QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4229 uint8_t macaddr[IEEE80211_ADDR_LEN],
4230 struct delba_send_params *param)
4231{
4232 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4233
4234 if (wmi_handle->ops->send_delba_send_cmd)
4235 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4236 macaddr, param);
4237
4238 return QDF_STATUS_E_FAILURE;
4239}
4240
4241/**
4242 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4243 * @param wmi_handle : handle to WMI.
4244 * @param macaddr : MAC address
4245 * @param param : pointer to hold addba set resp parameter
4246 *
4247 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4248 */
4249QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4250 uint8_t macaddr[IEEE80211_ADDR_LEN],
4251 struct addba_setresponse_params *param)
4252{
4253 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4254
4255 if (wmi_handle->ops->send_addba_setresponse_cmd)
4256 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4257 macaddr, param);
4258
4259 return QDF_STATUS_E_FAILURE;
4260}
4261
4262/**
4263 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4264 * @param wmi_handle : handle to WMI.
4265 * @param macaddr : MAC address
4266 * @param param : pointer to hold singleamsdu parameter
4267 *
4268 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4269 */
4270QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4271 uint8_t macaddr[IEEE80211_ADDR_LEN],
4272 struct singleamsdu_params *param)
4273{
4274 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4275
4276 if (wmi_handle->ops->send_singleamsdu_cmd)
4277 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4278 macaddr, param);
4279
4280 return QDF_STATUS_E_FAILURE;
4281}
4282
4283/**
4284 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4285 * @param wmi_handle : handle to WMI.
4286 * @param macaddr : MAC address
4287 * @param param : pointer to hold set_qboost parameter
4288 *
4289 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4290 */
4291QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4292 uint8_t macaddr[IEEE80211_ADDR_LEN],
4293 struct set_qboost_params *param)
4294{
4295 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4296
4297 if (wmi_handle->ops->send_set_qboost_param_cmd)
4298 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4299 macaddr, param);
4300
4301 return QDF_STATUS_E_FAILURE;
4302}
4303
4304/**
4305 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4306 * @param wmi_handle : handle to WMI.
4307 * @param param : pointer to hold mu scan param
4308 *
4309 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4310 */
4311QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4312 struct mu_scan_params *param)
4313{
4314 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4315
4316 if (wmi_handle->ops->send_mu_scan_cmd)
4317 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4318
4319 return QDF_STATUS_E_FAILURE;
4320}
4321
4322/**
4323 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4324 * @param wmi_handle : handle to WMI.
4325 * @param param : pointer to hold mu scan param
4326 *
4327 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4328 */
4329QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4330 struct lteu_config_params *param)
4331{
4332 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4333
4334 if (wmi_handle->ops->send_lteu_config_cmd)
4335 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4336
4337 return QDF_STATUS_E_FAILURE;
4338}
4339
4340/**
4341 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4342 * @param wmi_handle : handle to WMI.
4343 * @param param : pointer to hold mu scan param
4344 *
4345 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4346 */
4347QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4348 struct set_ps_mode_params *param)
4349{
4350 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4351
4352 if (wmi_handle->ops->send_set_ps_mode_cmd)
4353 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4354
4355 return QDF_STATUS_E_FAILURE;
4356}
4357
4358/**
4359 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4360 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05304361 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304362 *
4363 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4364 */
4365QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05304366 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304367{
4368 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4369
4370 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05304371 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304372
4373 return QDF_STATUS_E_FAILURE;
4374}
4375
4376/**
4377 * wmi_save_service_bitmap() - save service bitmap
4378 * @wmi_handle: wmi handle
4379 * @param evt_buf: pointer to event buffer
4380 *
4381 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4382 */
Rajeev Kumar77901472017-02-12 02:12:17 -08004383QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
4384 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304385{
4386 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4387
4388 if (wmi_handle->ops->save_service_bitmap) {
Rajeev Kumar77901472017-02-12 02:12:17 -08004389 wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
4390 bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304391 return 0;
4392 }
4393 return QDF_STATUS_E_FAILURE;
4394}
4395
4396/**
4397 * wmi_save_fw_version() - Save fw version
4398 * @wmi_handle: wmi handle
4399 * @param evt_buf: pointer to event buffer
4400 *
4401 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4402 */
4403QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4404{
4405 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4406
4407 if (wmi_handle->ops->save_fw_version) {
4408 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4409 return 0;
4410 }
4411 return QDF_STATUS_E_FAILURE;
4412
4413}
4414
4415/**
4416 * wmi_check_and_update_fw_version() - Ready and fw version check
4417 * @wmi_handle: wmi handle
4418 * @param evt_buf: pointer to event buffer
4419 *
4420 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4421 */
4422QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4423{
4424 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4425
4426 if (wmi_handle->ops->check_and_update_fw_version)
4427 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4428 evt_buf);
4429
4430 return QDF_STATUS_E_FAILURE;
4431
4432}
4433
4434/**
4435 * wmi_service_enabled() - Check if service enabled
4436 * @param wmi_handle: wmi handle
4437 * @param service_id: service identifier
4438 *
4439 * Return: 1 enabled, 0 disabled
4440 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05304441#ifndef CONFIG_MCL
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304442bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4443{
4444 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4445
4446 if ((service_id < wmi_services_max) &&
4447 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4448 if (wmi_handle->ops->is_service_enabled) {
4449 return wmi_handle->ops->is_service_enabled(wmi_handle,
4450 wmi_handle->services[service_id]);
4451 }
4452 } else {
4453 qdf_print("Support not added yet for Service %d\n", service_id);
4454 }
4455 return false;
4456}
4457#endif
4458
4459/**
4460 * wmi_get_target_cap_from_service_ready() - extract service ready event
4461 * @wmi_handle: wmi handle
4462 * @param evt_buf: pointer to received event buffer
4463 * @param ev: pointer to hold target capability information extracted from even
4464 *
4465 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4466 */
4467QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004468 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304469{
4470 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4471
4472 if (wmi->ops->get_target_cap_from_service_ready)
4473 return wmi->ops->get_target_cap_from_service_ready(wmi,
4474 evt_buf, ev);
4475
4476 return QDF_STATUS_E_FAILURE;
4477}
4478
4479/**
4480 * wmi_extract_fw_version() - extract fw version
4481 * @wmi_handle: wmi handle
4482 * @param evt_buf: pointer to event buffer
4483 * @param fw_ver: Pointer to hold fw version
4484 *
4485 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4486 */
4487QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4488 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4489{
4490 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4491
4492 if (wmi_handle->ops->extract_fw_version)
4493 return wmi_handle->ops->extract_fw_version(wmi_handle,
4494 evt_buf, fw_ver);
4495
4496 return QDF_STATUS_E_FAILURE;
4497}
4498
4499/**
4500 * wmi_extract_fw_abi_version() - extract fw abi version
4501 * @wmi_handle: wmi handle
4502 * @param evt_buf: Pointer to event buffer
4503 * @param fw_ver: Pointer to hold fw abi version
4504 *
4505 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4506 */
4507QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4508 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4509{
4510 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4511
4512 if (wmi_handle->ops->extract_fw_abi_version)
4513 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4514 evt_buf, fw_ver);
4515
4516 return QDF_STATUS_E_FAILURE;
4517}
4518
4519/**
4520 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4521 * @wmi_handle: wmi handle
4522 * @param evt_buf: Pointer to event buffer
4523 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4524 *
4525 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4526 */
4527QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004528 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304529{
4530 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4531
4532 if (wmi_handle->ops->extract_hal_reg_cap)
4533 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4534 evt_buf, hal_reg_cap);
4535
4536 return QDF_STATUS_E_FAILURE;
4537}
4538
4539/**
4540 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4541 * request event
4542 * @wmi_handle: wmi handle
4543 * @param evt_buf: pointer to event buffer
4544 * @param num_entries: pointer to hold number of entries requested
4545 *
4546 * Return: Number of entries requested
4547 */
4548host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4549 void *evt_buf, uint8_t *num_entries)
4550{
4551 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4552
4553 if (wmi_handle->ops->extract_host_mem_req)
4554 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4555 evt_buf, num_entries);
4556
4557 *num_entries = 0;
4558 return NULL;
4559}
4560
4561/**
4562 * wmi_ready_extract_init_status() - Extract init status from ready event
4563 * @wmi_handle: wmi handle
4564 * @param ev: Pointer to event buffer
4565 *
4566 * Return: ready status
4567 */
4568uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4569{
4570 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4571
4572 if (wmi_handle->ops->ready_extract_init_status)
4573 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4574 ev);
4575
4576
4577 return 1;
4578
4579}
4580
4581/**
4582 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4583 * @wmi_handle: wmi handle
4584 * @param ev: pointer to event buffer
4585 * @param macaddr: Pointer to hold MAC address
4586 *
4587 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4588 */
4589QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4590{
4591 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4592
4593 if (wmi_handle->ops->ready_extract_mac_addr)
4594 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4595 ev, macaddr);
4596
4597
4598 return QDF_STATUS_E_FAILURE;
4599}
4600
4601/**
4602 * wmi_extract_dbglog_data_len() - extract debuglog data length
4603 * @wmi_handle: wmi handle
4604 * @param evt_buf: pointer to event buffer
4605 * @param len: length of buffer
4606 *
4607 * Return: length
4608 */
4609uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004610 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304611{
4612 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4613
4614 if (wmi_handle->ops->extract_dbglog_data_len)
4615 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4616 evt_buf, len);
4617
4618
4619 return NULL;
4620}
4621
4622/**
4623 * wmi_send_ext_resource_config() - send extended resource configuration
4624 * @wmi_handle: wmi handle
4625 * @param ext_cfg: pointer to extended resource configuration
4626 *
4627 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4628 */
4629QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4630 wmi_host_ext_resource_config *ext_cfg)
4631{
4632 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4633
4634 if (wmi_handle->ops->send_ext_resource_config)
4635 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4636 ext_cfg);
4637
4638 return QDF_STATUS_E_FAILURE;
4639}
4640
4641/**
4642 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4643 * @param wmi_handle : handle to WMI.
4644 *
4645 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4646 */
4647QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl)
4648{
4649 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4650
4651 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
4652 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi);
4653
4654 return QDF_STATUS_E_FAILURE;
4655}
4656
4657/**
4658 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4659 * @param wmi_handle : handle to WMI.
4660 * @param param : pointer to hold packet power info param
4661 *
4662 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4663 */
4664QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4665 struct packet_power_info_params *param)
4666{
4667 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4668
4669 if (wmi->ops->send_packet_power_info_get_cmd)
4670 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4671
4672 return QDF_STATUS_E_FAILURE;
4673}
4674
4675/**
4676 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4677 * @param wmi_handle : handle to WMI.
4678 * @param param : pointer to hold gpio config param
4679 *
4680 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4681 */
4682QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4683 struct gpio_config_params *param)
4684{
4685 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4686
4687 if (wmi_handle->ops->send_gpio_config_cmd)
4688 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4689
4690 return QDF_STATUS_E_FAILURE;
4691}
4692
4693/**
4694 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4695 * @param wmi_handle : handle to WMI.
4696 * @param param : pointer to hold gpio config param
4697 *
4698 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4699 */
4700QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4701 struct gpio_output_params *param)
4702{
4703 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4704
4705 if (wmi_handle->ops->send_gpio_output_cmd)
4706 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4707
4708 return QDF_STATUS_E_FAILURE;
4709}
4710
4711/**
4712 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4713 * @param wmi_handle : handle to WMI.
4714 * @param param : pointer to hold rtt meas req test param
4715 *
4716 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4717 */
4718QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4719 struct rtt_meas_req_test_params *param)
4720{
4721 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4722
4723 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4724 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4725 param);
4726
4727 return QDF_STATUS_E_FAILURE;
4728}
4729
4730/**
4731 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4732 * @param wmi_handle : handle to WMI.
4733 * @param param : pointer to hold rtt meas req param
4734 *
4735 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4736 */
4737QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4738 struct rtt_meas_req_params *param)
4739{
4740 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4741
4742 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4743 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4744 param);
4745
4746 return QDF_STATUS_E_FAILURE;
4747}
4748
4749/**
4750 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4751 * @param wmi_handle : handle to WMI.
4752 * @param param : pointer to hold lci param
4753 *
4754 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4755 */
4756QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4757 struct lci_set_params *param)
4758{
4759 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4760
4761 if (wmi_handle->ops->send_lci_set_cmd)
4762 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4763
4764 return QDF_STATUS_E_FAILURE;
4765}
4766
4767/**
4768 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4769 * @param wmi_handle : handle to WMI.
4770 * @param param : pointer to hold lcr param
4771 *
4772 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4773 */
4774QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4775 struct lcr_set_params *param)
4776{
4777 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4778
4779 if (wmi_handle->ops->send_lcr_set_cmd)
4780 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4781
4782 return QDF_STATUS_E_FAILURE;
4783}
4784
4785/**
4786 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4787 * @param wmi_handle : handle to WMI.
4788 * @param param : pointer to hold rtt meas req test param
4789 *
4790 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4791 */
4792QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4793 struct rtt_keepalive_req_params *param)
4794{
4795 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4796
4797 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4798 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4799 param);
4800
4801 return QDF_STATUS_E_FAILURE;
4802}
4803
4804/**
4805 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4806 * to fw
4807 * @wmi_handle: wmi handle
4808 * @param: pointer to hold periodic chan stats param
4809 *
4810 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4811 */
4812QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4813 struct periodic_chan_stats_params *param)
4814{
4815 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4816
4817 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4818 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4819 param);
4820
4821 return QDF_STATUS_E_FAILURE;
4822}
4823
4824/**
4825 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4826 * @wmi_handle: wmi handle
4827 * @param: pointer to atf peer request param
4828 *
4829 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4830 */
4831QDF_STATUS
4832wmi_send_atf_peer_request_cmd(void *wmi_hdl,
4833 struct atf_peer_request_params *param)
4834{
4835 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4836
4837 if (wmi_handle->ops->send_atf_peer_request_cmd)
4838 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
4839 param);
4840
4841 return QDF_STATUS_E_FAILURE;
4842}
4843
4844/**
4845 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
4846 * @wmi_handle: wmi handle
4847 * @param: pointer to set atf grouping param
4848 *
4849 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4850 */
4851QDF_STATUS
4852wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
4853 struct atf_grouping_params *param)
4854{
4855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4856
4857 if (wmi_handle->ops->send_set_atf_grouping_cmd)
4858 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
4859 param);
4860
4861 return QDF_STATUS_E_FAILURE;
4862
4863}
4864
Sathish Kumar68789382016-11-14 17:44:29 +05304865/**
4866 * wmi_send_get_user_position_cmd() - send get user position command to fw
4867 * @wmi_handle: wmi handle
4868 *
4869 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4870 */
4871QDF_STATUS
4872wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
4873{
4874 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4875
4876 if (wmi_handle->ops->send_get_user_position_cmd)
4877 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
4878 value);
4879
4880 return QDF_STATUS_E_FAILURE;
4881}
4882
4883/**
4884 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
4885 * command to fw
4886 * @wmi_handle: wmi handle
4887 * @value: user pos value
4888 *
4889 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4890 */
4891QDF_STATUS
4892wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4893{
4894 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4895
4896 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
4897 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
4898
4899 return QDF_STATUS_E_FAILURE;
4900}
4901
4902/**
4903 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
4904 * tx count to fw
4905 * @wmi_handle: wmi handle
4906 * @value: reset tx count value
4907 *
4908 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4909 */
4910QDF_STATUS
4911wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4912{
4913 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4914
4915 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
4916 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
4917 value);
4918
4919 return QDF_STATUS_E_FAILURE;
4920}
4921
4922/**
4923 * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo
4924 * tx count to fw
4925 * @wmi_handle: wmi handle
4926 * @value: value
4927 *
4928 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4929 */
4930QDF_STATUS
4931wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value)
4932{
4933 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4934
4935 if (wmi->ops->send_pdev_caldata_version_check_cmd)
4936 return wmi->ops->send_pdev_caldata_version_check_cmd(wmi,
4937 value);
4938
4939 return QDF_STATUS_E_FAILURE;
4940}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304941
4942/* Extract - APIs */
4943/**
4944 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
4945 *
4946 * @param wmi_handle : handle to WMI.
4947 * @param evt_buf : pointer to event buffer
4948 * @param len : length of the event buffer
4949 * @param wds_ev: pointer to strct to extract
4950 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4951 */
4952QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
4953 uint16_t len, wds_addr_event_t *wds_ev)
4954{
4955 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4956
4957 if (wmi_handle->ops->extract_wds_addr_event) {
4958 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
4959 evt_buf, len, wds_ev);
4960 }
4961 return QDF_STATUS_E_FAILURE;
4962}
4963
4964/**
4965 * wmi_extract_dcs_interference_type() - extract dcs interference type
4966 * @wmi_handle: wmi handle
4967 * @param evt_buf: pointer to event buffer
Kiran Venkatappafea8a802016-12-29 18:09:32 +05304968 * @param param: Pointer to hold dcs interference param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304969 *
4970 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4971 */
4972QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05304973 void *evt_buf, struct wmi_host_dcs_interference_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304974{
4975 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4976
4977 if (wmi->ops->extract_dcs_interference_type) {
4978 return wmi->ops->extract_dcs_interference_type(wmi,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05304979 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304980 }
4981 return QDF_STATUS_E_FAILURE;
4982}
4983
4984/*
4985 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
4986 * @wmi_handle: wmi handle
4987 * @param evt_buf: pointer to event buffer
4988 * @param cw_int: Pointer to hold cw interference
4989 *
4990 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4991 */
4992QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
4993 wmi_host_ath_dcs_cw_int *cw_int)
4994{
4995 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4996
4997 if (wmi_handle->ops->extract_dcs_cw_int) {
4998 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
4999 evt_buf, cw_int);
5000 }
5001 return QDF_STATUS_E_FAILURE;
5002}
5003
5004/**
5005 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5006 * @wmi_handle: wmi handle
5007 * @param evt_buf: pointer to event buffer
5008 * @param wlan_stat: Pointer to hold wlan stats
5009 *
5010 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5011 */
5012QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5013 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5014{
5015 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5016
5017 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5018 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5019 evt_buf, wlan_stat);
5020 }
5021 return QDF_STATUS_E_FAILURE;
5022}
5023
5024/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305025 * wmi_extract_fips_event_data() - extract fips event data
5026 * @wmi_handle: wmi handle
5027 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305028 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305029 *
5030 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5031 */
5032QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305033 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305034{
5035 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5036
5037 if (wmi_handle->ops->extract_fips_event_data) {
5038 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305039 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305040 }
5041 return QDF_STATUS_E_FAILURE;
5042}
5043
5044/**
5045 * wmi_extract_vdev_start_resp() - extract vdev start response
5046 * @wmi_handle: wmi handle
5047 * @param evt_buf: pointer to event buffer
5048 * @param vdev_rsp: Pointer to hold vdev response
5049 *
5050 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5051 */
5052QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5053 wmi_host_vdev_start_resp *vdev_rsp)
5054{
5055 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5056
5057 if (wmi_handle->ops->extract_vdev_start_resp)
5058 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5059 evt_buf, vdev_rsp);
5060
5061 return QDF_STATUS_E_FAILURE;
5062}
5063
5064/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305065 * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev
5066 * @wmi_handle: wmi handle
5067 * @param evt_buf: pointer to event buffer
5068 * @param vdev_map: Pointer to hold num vdev
5069 *
5070 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5071 */
5072QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5073 uint32_t *num_vdevs)
5074{
5075 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5076
5077 if (wmi->ops->extract_tbttoffset_num_vdevs)
5078 return wmi->ops->extract_tbttoffset_num_vdevs(wmi,
5079 evt_buf, num_vdevs);
5080
5081 return QDF_STATUS_E_FAILURE;
5082}
5083
5084/**
5085 * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev
5086 * @wmi_handle: wmi handle
5087 * @param evt_buf: pointer to event buffer
5088 * @param vdev_map: Pointer to hold num vdev
5089 *
5090 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5091 */
5092QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5093 uint32_t *num_vdevs)
5094{
5095 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5096
5097 if (wmi->ops->extract_ext_tbttoffset_num_vdevs)
5098 return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi,
5099 evt_buf, num_vdevs);
5100
5101 return QDF_STATUS_E_FAILURE;
5102}
5103
5104/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305105 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5106 * @wmi_handle: wmi handle
5107 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305108 * @param idx: Index refering to a vdev
5109 * @param tbtt_param: Pointer to tbttoffset event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305110 *
5111 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5112 */
5113QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305114 uint8_t idx, struct tbttoffset_params *tbtt_param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305115{
5116 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5117
5118 if (wmi->ops->extract_tbttoffset_update_params)
5119 return wmi->ops->extract_tbttoffset_update_params(wmi,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305120 evt_buf, idx, tbtt_param);
5121
5122 return QDF_STATUS_E_FAILURE;
5123}
5124
5125/**
5126 * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param
5127 * @wmi_handle: wmi handle
5128 * @param evt_buf: pointer to event buffer
5129 * @param idx: Index refering to a vdev
5130 * @param tbtt_param: Pointer to tbttoffset event param
5131 *
5132 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5133 */
5134QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
5135 void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param)
5136{
5137 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5138
5139 if (wmi->ops->extract_ext_tbttoffset_update_params)
5140 return wmi->ops->extract_ext_tbttoffset_update_params(wmi,
5141 evt_buf, idx, tbtt_param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305142
5143 return QDF_STATUS_E_FAILURE;
5144}
5145
5146/**
5147 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5148 * @wmi_handle: wmi handle
5149 * @param evt_buf: pointer to event buffer
5150 * @param hdr: Pointer to hold header
5151 * @param bufp: Pointer to hold pointer to rx param buffer
5152 *
5153 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5154 */
5155QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05305156 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305157{
5158 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5159
5160 if (wmi_handle->ops->extract_mgmt_rx_params)
5161 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5162 evt_buf, hdr, bufp);
5163
5164 return QDF_STATUS_E_FAILURE;
5165}
5166
5167/**
5168 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5169 * @wmi_handle: wmi handle
5170 * @param evt_buf: pointer to event buffer
5171 * @param vdev_id: Pointer to hold vdev identifier
5172 *
5173 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5174 */
5175QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5176 uint32_t *vdev_id)
5177{
5178 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5179
5180 if (wmi_handle->ops->extract_vdev_stopped_param)
5181 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5182 evt_buf, vdev_id);
5183
5184 return QDF_STATUS_E_FAILURE;
5185}
5186
5187/**
5188 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5189 * @wmi_handle: wmi handle
5190 * @param evt_buf: pointer to event buffer
5191 * @param param: Pointer to hold roam param
5192 *
5193 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5194 */
5195QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5196 wmi_host_roam_event *param)
5197{
5198 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5199
5200 if (wmi_handle->ops->extract_vdev_roam_param)
5201 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5202 evt_buf, param);
5203
5204 return QDF_STATUS_E_FAILURE;
5205}
5206
5207/**
5208 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5209 * @wmi_handle: wmi handle
5210 * @param evt_buf: pointer to event buffer
5211 * @param param: Pointer to hold vdev scan param
5212 *
5213 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5214 */
5215QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05305216 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305217{
5218 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5219
5220 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5221 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5222 evt_buf, param);
5223
5224 return QDF_STATUS_E_FAILURE;
5225}
5226
Frank Liu3d5e9992017-03-15 17:51:43 +08005227#ifdef CONVERGED_TDLS_ENABLE
5228QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
5229 struct tdls_event_info *param)
5230{
5231 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5232
5233 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
5234 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
5235 evt_buf, param);
5236
5237 return QDF_STATUS_E_FAILURE;
5238}
5239#endif
5240
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305241/**
5242 * wmi_extract_mu_ev_param() - extract mu param from event
5243 * @wmi_handle: wmi handle
5244 * @param evt_buf: pointer to event buffer
5245 * @param param: Pointer to hold mu report
5246 *
5247 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5248 */
5249QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5250 wmi_host_mu_report_event *param)
5251{
5252 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5253
5254 if (wmi_handle->ops->extract_mu_ev_param)
5255 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5256 param);
5257
5258 return QDF_STATUS_E_FAILURE;
5259}
5260
5261/**
Sathish Kumar68789382016-11-14 17:44:29 +05305262 * wmi_extract_mu_db_entry() - extract mu db entry from event
5263 * @wmi_handle: wmi handle
5264 * @param evt_buf: pointer to event buffer
5265 * @param param: Pointer to hold mu db entry
5266 *
5267 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5268 */
5269QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
5270 uint8_t idx, wmi_host_mu_db_entry *param)
5271{
5272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5273
5274 if (wmi_handle->ops->extract_mu_db_entry)
5275 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
5276 idx, param);
5277
5278 return QDF_STATUS_E_FAILURE;
5279}
5280
5281/**
5282 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
5283 * @wmi_handle: wmi handle
5284 * @param evt_buf: pointer to event buffer
5285 * @param param: Pointer to hold mumimo tx count
5286 *
5287 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5288 */
5289QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
5290 wmi_host_peer_txmu_cnt_event *param)
5291{
5292 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5293
5294 if (wmi->ops->extract_mumimo_tx_count_ev_param)
5295 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
5296 evt_buf, param);
5297
5298 return QDF_STATUS_E_FAILURE;
5299}
5300
5301/**
5302 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
5303 * from event
5304 * @wmi_handle: wmi handle
5305 * @param evt_buf: pointer to event buffer
5306 * @param param: Pointer to hold peer gid userposition list
5307 *
5308 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5309 */
5310QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
5311 void *evt_buf,
5312 wmi_host_peer_gid_userpos_list_event *param)
5313{
5314 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5315
5316 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
5317 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
5318 evt_buf, param);
5319
5320 return QDF_STATUS_E_FAILURE;
5321}
5322
5323/**
5324 * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
5325 * from event
5326 * @wmi_handle: wmi handle
5327 * @param evt_buf: pointer to event buffer
5328 * @param param: Pointer to hold caldata version data
5329 *
5330 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5331 */
5332QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
5333 void *evt_buf,
5334 wmi_host_pdev_check_cal_version_event *param)
5335{
5336 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5337
5338 if (wmi->ops->extract_pdev_caldata_version_check_ev_param)
5339 return wmi->ops->extract_pdev_caldata_version_check_ev_param(
5340 wmi, evt_buf, param);
5341
5342 return QDF_STATUS_E_FAILURE;
5343}
5344
5345/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305346 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5347 * param from event
5348 * @wmi_handle: wmi handle
5349 * @param evt_buf: pointer to event buffer
5350 * @param param: Pointer to hold tpc configuration
5351 *
5352 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5353 */
5354QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5355 wmi_host_pdev_tpc_config_event *param)
5356{
5357 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5358
5359 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5360 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5361 evt_buf, param);
5362
5363 return QDF_STATUS_E_FAILURE;
5364
5365}
5366
5367/**
5368 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5369 * @wmi_handle: wmi handle
5370 * @param evt_buf: pointer to event buffer
5371 * @param gpio_num: Pointer to hold gpio number
5372 *
5373 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5374 */
5375QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5376 void *evt_buf, uint32_t *gpio_num)
5377{
5378 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5379
5380 if (wmi_handle->ops->extract_gpio_input_ev_param)
5381 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5382 evt_buf, gpio_num);
5383
5384 return QDF_STATUS_E_FAILURE;
5385}
5386
5387/**
5388 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5389 * param from event
5390 * @wmi_handle: wmi handle
5391 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305392 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305393 *
5394 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5395 */
5396QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305397 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305398{
5399 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5400
5401 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5402 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305403 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305404
5405 return QDF_STATUS_E_FAILURE;
5406}
5407
5408/**
5409 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5410 * power param from event
5411 * @wmi_handle: wmi handle
5412 * @param evt_buf: pointer to event buffer
5413 * @param param: Pointer to hold nf cal power param
5414 *
5415 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5416 */
5417QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5418 wmi_host_pdev_nfcal_power_all_channels_event *param)
5419{
5420 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5421
5422 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5423 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5424 evt_buf, param);
5425
5426 return QDF_STATUS_E_FAILURE;
5427
5428}
5429
5430/**
5431 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5432 * @wmi_handle: wmi handle
5433 * @param evt_buf: pointer to event buffer
5434 * @param param: Pointer to hold tpc param
5435 *
5436 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5437 */
5438QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5439 wmi_host_pdev_tpc_event *param)
5440{
5441 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5442
5443 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5444 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5445 evt_buf, param);
5446
5447 return QDF_STATUS_E_FAILURE;
5448
5449}
5450
5451/**
5452 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5453 * from event
5454 * @wmi_handle: wmi handle
5455 * @param evt_buf: pointer to event buffer
5456 * @param param: Pointer to generic buffer param
5457 *
5458 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5459 */
5460QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5461 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5462{
5463 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5464
5465 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5466 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5467 evt_buf, param);
5468
5469 return QDF_STATUS_E_FAILURE;
5470
5471}
5472
5473/**
5474 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5475 * from event
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305476 * @wmi_hdl: wmi handle
5477 * @evt_buf: pointer to event buffer
5478 * @param: Pointer to mgmt tx completion param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305479 *
5480 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5481 */
5482QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5483 wmi_host_mgmt_tx_compl_event *param)
5484{
5485 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5486
5487 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5488 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5489 evt_buf, param);
5490
5491
5492 return QDF_STATUS_E_FAILURE;
5493}
5494
5495/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305496 * wmi_extract_offchan_data_tx_compl_param() -
5497 * extract offchan data tx completion param from event
5498 * @wmi_hdl: wmi handle
5499 * @evt_buf: pointer to event buffer
5500 * @param: Pointer to offchan data tx completion param
5501 *
5502 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5503 */
5504QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
5505 struct wmi_host_offchan_data_tx_compl_event *param)
5506{
5507 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5508
5509 if (wmi_handle->ops->extract_offchan_data_tx_compl_param)
5510 return wmi_handle->ops->extract_offchan_data_tx_compl_param(
5511 wmi_handle, evt_buf, param);
5512
5513
5514 return QDF_STATUS_E_FAILURE;
5515}
5516
5517/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05305518 * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
5519 * from event
5520 * @wmi_handle: wmi handle
5521 * @param evt_buf: pointer to event buffer
5522 * @param param: Pointer to CSA switch count status param
5523 *
5524 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5525 */
5526QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
5527 void *evt_buf,
5528 struct pdev_csa_switch_count_status *param)
5529{
5530 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5531
5532 if (wmi_handle->ops->extract_pdev_csa_switch_count_status)
5533 return wmi_handle->ops->extract_pdev_csa_switch_count_status(
5534 wmi_handle,
5535 evt_buf,
5536 param);
5537
5538 return QDF_STATUS_E_FAILURE;
5539}
5540
5541
5542/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305543 * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305544 * @wmi_handle: wmi handle
5545 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305546 * @param num_vdevs: Pointer to hold num vdevs
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305547 *
5548 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5549 */
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305550QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
5551 uint32_t *num_vdevs)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305552{
5553 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5554
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305555 if (wmi_handle->ops->extract_swba_num_vdevs)
5556 return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle,
5557 evt_buf, num_vdevs);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305558
5559 return QDF_STATUS_E_FAILURE;
5560}
5561
5562/**
5563 * wmi_extract_swba_tim_info() - extract swba tim info from event
5564 * @wmi_handle: wmi handle
5565 * @param evt_buf: pointer to event buffer
5566 * @param idx: Index to bcn info
5567 * @param tim_info: Pointer to hold tim info
5568 *
5569 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5570 */
5571QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5572 uint32_t idx, wmi_host_tim_info *tim_info)
5573{
5574 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5575
5576 if (wmi_handle->ops->extract_swba_tim_info)
5577 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5578 evt_buf, idx, tim_info);
5579
5580 return QDF_STATUS_E_FAILURE;
5581}
5582
5583/**
5584 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5585 * @wmi_handle: wmi handle
5586 * @param evt_buf: pointer to event buffer
5587 * @param idx: Index to bcn info
5588 * @param p2p_desc: Pointer to hold p2p NoA info
5589 *
5590 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5591 */
5592QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5593 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5594{
5595 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5596
5597 if (wmi_handle->ops->extract_swba_noa_info)
5598 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5599 evt_buf, idx, p2p_desc);
5600
5601 return QDF_STATUS_E_FAILURE;
5602}
5603
Wu Gaocd3a8512017-03-13 20:17:34 +08005604#ifdef CONVERGED_P2P_ENABLE
5605/**
5606 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
5607 * @wmi_handle: wmi handle
5608 * @evt_buf: pointer to event buffer
5609 * @param: Pointer to hold listen offload stop param
5610 *
5611 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5612 */
5613QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
5614 struct p2p_lo_event *param)
5615{
5616 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5617
5618 if (!wmi_handle) {
5619 WMI_LOGE("wmi handle is null");
5620 return QDF_STATUS_E_INVAL;
5621 }
5622
5623 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
5624 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
5625 wmi_handle, evt_buf, param);
5626
5627 return QDF_STATUS_E_FAILURE;
5628}
5629
5630/**
5631 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
5632 * @wmi_handle: wmi handle
5633 * @evt_buf: pointer to event buffer
5634 * @param: Pointer to hold p2p noa param
5635 *
5636 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5637 */
5638QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
5639 struct p2p_noa_info *param)
5640{
5641 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5642
5643 if (!wmi_handle) {
5644 WMI_LOGE("wmi handle is null");
5645 return QDF_STATUS_E_INVAL;
5646 }
5647
5648 if (wmi_handle->ops->extract_p2p_noa_ev_param)
5649 return wmi_handle->ops->extract_p2p_noa_ev_param(
5650 wmi_handle, evt_buf, param);
5651
5652 return QDF_STATUS_E_FAILURE;
5653}
5654#endif
5655
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305656/**
5657 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5658 * from event
5659 * @wmi_handle: wmi handle
5660 * @param evt_buf: pointer to event buffer
5661 * @param ev: Pointer to hold peer param and ps state
5662 *
5663 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5664 */
5665QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5666 wmi_host_peer_sta_ps_statechange_event *ev)
5667{
5668 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5669
5670 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5671 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5672 evt_buf, ev);
5673
5674 return QDF_STATUS_E_FAILURE;
5675}
5676
5677/**
5678 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5679 * @wmi_handle: wmi handle
5680 * @param evt_buf: pointer to event buffer
5681 * @param ev: Pointer to hold peer param
5682 *
5683 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5684 */
5685QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5686 wmi_host_peer_sta_kickout_event *ev)
5687{
5688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5689
5690 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5691 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5692 evt_buf, ev);
5693
5694 return QDF_STATUS_E_FAILURE;
5695}
5696
5697/**
5698 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5699 * @wmi_handle: wmi handle
5700 * @param evt_buf: pointer to event buffer
5701 * @param peer_mac: Pointer to hold peer mac address
5702 * @param rate_cap: Pointer to hold ratecode
5703 *
5704 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5705 */
5706QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5707 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5708{
5709 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5710
5711 if (wmi->ops->extract_peer_ratecode_list_ev)
5712 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5713 evt_buf, peer_mac, rate_cap);
5714
5715 return QDF_STATUS_E_FAILURE;
5716
5717}
5718
5719/**
5720 * wmi_extract_comb_phyerr() - extract comb phy error from event
5721 * @wmi_handle: wmi handle
5722 * @param evt_buf: pointer to event buffer
5723 * @param datalen: data length of event buffer
5724 * @param buf_offset: Pointer to hold value of current event buffer offset
5725 * post extraction
5726 * @param phyer: Pointer to hold phyerr
5727 *
5728 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5729 */
5730QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5731 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5732{
5733 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5734
5735 if (wmi_handle->ops->extract_comb_phyerr)
5736 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5737 evt_buf, datalen, buf_offset, phyerr);
5738
5739 return QDF_STATUS_E_FAILURE;
5740
5741}
5742
5743/**
5744 * wmi_extract_single_phyerr() - extract single phy error from event
5745 * @wmi_handle: wmi handle
5746 * @param evt_buf: pointer to event buffer
5747 * @param datalen: data length of event buffer
5748 * @param buf_offset: Pointer to hold value of current event buffer offset
5749 * post extraction
5750 * @param phyerr: Pointer to hold phyerr
5751 *
5752 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5753 */
5754QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5755 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5756{
5757 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5758
5759 if (wmi_handle->ops->extract_single_phyerr)
5760 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5761 evt_buf, datalen, buf_offset, phyerr);
5762
5763 return QDF_STATUS_E_FAILURE;
5764
5765}
5766
5767/**
5768 * wmi_extract_composite_phyerr() - extract composite phy error from event
5769 * @wmi_handle: wmi handle
5770 * @param evt_buf: pointer to event buffer
5771 * @param datalen: Length of event buffer
5772 * @param phyerr: Pointer to hold phy error
5773 *
5774 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5775 */
5776QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5777 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5778{
5779 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5780
5781 if (wmi_handle->ops->extract_composite_phyerr)
5782 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5783 evt_buf, datalen, phyerr);
5784
5785 return QDF_STATUS_E_FAILURE;
5786
5787}
5788
5789/**
5790 * wmi_extract_stats_param() - extract all stats count from event
5791 * @wmi_handle: wmi handle
5792 * @param evt_buf: pointer to event buffer
5793 * @param stats_param: Pointer to hold stats count
5794 *
5795 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5796 */
5797QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5798 wmi_host_stats_event *stats_param)
5799{
5800 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5801
5802 if (wmi_handle->ops->extract_all_stats_count)
5803 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5804 evt_buf, stats_param);
5805
5806 return QDF_STATUS_E_FAILURE;
5807}
5808
5809/**
5810 * wmi_extract_pdev_stats() - extract pdev stats from event
5811 * @wmi_handle: wmi handle
5812 * @param evt_buf: pointer to event buffer
5813 * @param index: Index into pdev stats
5814 * @param pdev_stats: Pointer to hold pdev stats
5815 *
5816 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5817 */
5818QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
5819 uint32_t index, wmi_host_pdev_stats *pdev_stats)
5820{
5821 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5822
5823 if (wmi_handle->ops->extract_pdev_stats)
5824 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
5825 evt_buf, index, pdev_stats);
5826
5827 return QDF_STATUS_E_FAILURE;
5828}
5829
5830/**
5831 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
5832 * @wmi_handle: wmi handle
5833 * @param evt_buf: pointer to event buffer
5834 * @param index: Index into extended pdev stats
5835 * @param pdev_ext_stats: Pointer to hold extended pdev stats
5836 *
5837 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5838 */
5839QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
5840 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
5841{
5842 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5843
5844 if (wmi_handle->ops->extract_pdev_ext_stats)
5845 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
5846 evt_buf, index, pdev_ext_stats);
5847
5848 return QDF_STATUS_E_FAILURE;
5849}
5850
5851/**
5852 * wmi_extract_peer_stats() - extract peer stats from event
5853 * @wmi_handle: wmi handle
5854 * @param evt_buf: pointer to event buffer
5855 * @param index: Index into peer stats
5856 * @param peer_stats: Pointer to hold peer stats
5857 *
5858 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5859 */
5860QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
5861 uint32_t index, wmi_host_peer_stats *peer_stats)
5862{
5863 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5864
5865 if (wmi_handle->ops->extract_peer_stats)
5866 return wmi_handle->ops->extract_peer_stats(wmi_handle,
5867 evt_buf, index, peer_stats);
5868
5869 return QDF_STATUS_E_FAILURE;
5870}
5871
5872/**
5873 * wmi_extract_vdev_stats() - extract vdev stats from event
5874 * @wmi_handle: wmi handle
5875 * @param evt_buf: pointer to event buffer
5876 * @param index: Index into vdev stats
5877 * @param vdev_stats: Pointer to hold vdev stats
5878 *
5879 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5880 */
5881QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
5882 uint32_t index, wmi_host_vdev_stats *vdev_stats)
5883{
5884 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5885
5886 if (wmi_handle->ops->extract_vdev_stats)
5887 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
5888 evt_buf, index, vdev_stats);
5889
5890 return QDF_STATUS_E_FAILURE;
5891}
5892
5893/**
5894 * wmi_extract_rtt_hdr() - extract rtt header from event
5895 * @wmi_handle: wmi handle
5896 * @param evt_buf: pointer to event buffer
5897 * @param ev: Pointer to hold rtt header
5898 *
5899 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5900 */
5901QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
5902 wmi_host_rtt_event_hdr *ev)
5903{
5904 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5905
5906 if (wmi_handle->ops->extract_rtt_hdr)
5907 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
5908 evt_buf, ev);
5909
5910 return QDF_STATUS_E_FAILURE;
5911}
5912
5913/**
5914 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
5915 * @wmi_handle: wmi handle
5916 * @param evt_buf: pointer to event buffer
5917 * @param index: Index into bcn fault stats
5918 * @param bcnflt_stats: Pointer to hold bcn fault stats
5919 *
5920 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5921 */
5922QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
5923 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
5924{
5925 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5926
5927 if (wmi_handle->ops->extract_bcnflt_stats)
5928 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
5929 evt_buf, index, bcnflt_stats);
5930
5931 return QDF_STATUS_E_FAILURE;
5932}
5933
5934/**
5935 * wmi_extract_rtt_ev() - extract rtt event
5936 * @wmi_handle: wmi handle
5937 * @param evt_buf: Pointer to event buffer
5938 * @param ev: Pointer to hold rtt event
5939 * @param hdump: Pointer to hold hex dump
5940 * @param hdump_len: hex dump length
5941 *
5942 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5943 */
5944QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
5945 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
5946{
5947 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5948
5949 if (wmi_handle->ops->extract_rtt_ev)
5950 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
5951 evt_buf, ev, hdump, hdump_len);
5952
5953 return QDF_STATUS_E_FAILURE;
5954}
5955
5956/**
5957 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
5958 * @wmi_handle: wmi handle
5959 * @param evt_buf: pointer to event buffer
5960 * @param index: Index into extended peer stats
5961 * @param peer_extd_stats: Pointer to hold extended peer stats
5962 *
5963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5964 */
5965QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
5966 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
5967{
5968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5969
5970 if (wmi_handle->ops->extract_peer_extd_stats)
5971 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
5972 evt_buf, index, peer_extd_stats);
5973
5974 return QDF_STATUS_E_FAILURE;
5975}
5976
5977/**
5978 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
5979 * @wmi_handle: wmi handle
5980 * @param evt_buf: pointer to event buffer
5981 * @param wds_ev: Pointer to hold rtt error report
5982 *
5983 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5984 */
5985QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
5986 wmi_host_rtt_error_report_event *ev)
5987{
5988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5989
5990 if (wmi_handle->ops->extract_rtt_error_report_ev)
5991 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
5992 evt_buf, ev);
5993
5994 return QDF_STATUS_E_FAILURE;
5995}
5996
5997/**
5998 * wmi_extract_chan_stats() - extract chan stats from event
5999 * @wmi_handle: wmi handle
6000 * @param evt_buf: pointer to event buffer
6001 * @param index: Index into chan stats
6002 * @param chanstats: Pointer to hold chan stats
6003 *
6004 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6005 */
6006QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
6007 uint32_t index, wmi_host_chan_stats *chan_stats)
6008{
6009 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6010
6011 if (wmi_handle->ops->extract_chan_stats)
6012 return wmi_handle->ops->extract_chan_stats(wmi_handle,
6013 evt_buf, index, chan_stats);
6014
6015 return QDF_STATUS_E_FAILURE;
6016}
6017
6018/**
6019 * wmi_extract_thermal_stats() - extract thermal stats from event
6020 * @wmi_handle: wmi handle
6021 * @param evt_buf: Pointer to event buffer
6022 * @param temp: Pointer to hold extracted temperature
6023 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306024 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306025 *
6026 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6027 */
6028QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306029 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306030{
6031 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6032
6033 if (wmi_handle->ops->extract_thermal_stats)
6034 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306035 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306036
6037 return QDF_STATUS_E_FAILURE;
6038}
6039
6040/**
6041 * wmi_extract_profile_ctx() - extract profile context from event
6042 * @wmi_handle: wmi handle
6043 * @param evt_buf: pointer to event buffer
6044 * @param profile_ctx: Pointer to hold profile context
6045 *
6046 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6047 */
6048QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
6049 wmi_host_wlan_profile_ctx_t *profile_ctx)
6050{
6051 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6052
6053 if (wmi_handle->ops->extract_profile_ctx)
6054 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
6055 evt_buf, profile_ctx);
6056
6057 return QDF_STATUS_E_FAILURE;
6058}
6059
6060/**
6061 * wmi_extract_thermal_level_stats() - extract thermal level stats from
6062 * event
6063 * @wmi_handle: wmi handle
6064 * @param evt_buf: pointer to event buffer
6065 * @param idx: Index to level stats
6066 * @param levelcount: Pointer to hold levelcount
6067 * @param dccount: Pointer to hold dccount
6068 *
6069 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6070 */
6071QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
6072 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
6073{
6074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6075
6076 if (wmi_handle->ops->extract_thermal_level_stats)
6077 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
6078 evt_buf, idx, levelcount, dccount);
6079
6080 return QDF_STATUS_E_FAILURE;
6081}
6082
6083/**
6084 * wmi_extract_profile_data() - extract profile data from event
6085 * @wmi_handle: wmi handle
6086 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05306087 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306088 * @param profile_data: Pointer to hold profile data
6089 *
6090 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6091 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05306092QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306093 wmi_host_wlan_profile_t *profile_data)
6094{
6095 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6096
6097 if (wmi_handle->ops->extract_profile_data)
6098 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05306099 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306100
6101 return QDF_STATUS_E_FAILURE;
6102}
6103
6104/**
6105 * wmi_extract_chan_info_event() - extract chan information from event
6106 * @wmi_handle: wmi handle
6107 * @param evt_buf: pointer to event buffer
6108 * @param chan_info: Pointer to hold chan information
6109 *
6110 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6111 */
6112QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
6113 wmi_host_chan_info_event *chan_info)
6114{
6115 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6116
6117 if (wmi_handle->ops->extract_chan_info_event)
6118 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
6119 evt_buf, chan_info);
6120
6121 return QDF_STATUS_E_FAILURE;
6122}
6123
6124/**
6125 * wmi_extract_channel_hopping_event() - extract channel hopping param
6126 * from event
6127 * @wmi_handle: wmi handle
6128 * @param evt_buf: pointer to event buffer
6129 * @param ch_hopping: Pointer to hold channel hopping param
6130 *
6131 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6132 */
6133QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
6134 wmi_host_pdev_channel_hopping_event *ch_hopping)
6135{
6136 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6137
6138 if (wmi->ops->extract_channel_hopping_event)
6139 return wmi->ops->extract_channel_hopping_event(wmi,
6140 evt_buf, ch_hopping);
6141
6142 return QDF_STATUS_E_FAILURE;
6143}
6144
6145/**
6146 * wmi_extract_bss_chan_info_event() - extract bss channel information
6147 * from event
6148 * @wmi_handle: wmi handle
6149 * @param evt_buf: pointer to event buffer
6150 * @param bss_chan_info: Pointer to hold bss channel information
6151 *
6152 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6153 */
6154QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6155 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6156{
6157 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6158
6159 if (wmi_handle->ops->extract_bss_chan_info_event)
6160 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6161 evt_buf, bss_chan_info);
6162
6163 return QDF_STATUS_E_FAILURE;
6164}
6165
6166/**
6167 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6168 * @wmi_handle: wmi handle
6169 * @param evt_buf: pointer to event buffer
6170 * @param inst_rssi_resp: Pointer to hold inst rssi response
6171 *
6172 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6173 */
6174QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6175 wmi_host_inst_stats_resp *inst_rssi_resp)
6176{
6177 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6178
6179 if (wmi->ops->extract_inst_rssi_stats_event)
6180 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6181 evt_buf, inst_rssi_resp);
6182
6183 return QDF_STATUS_E_FAILURE;
6184}
6185
6186/**
6187 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6188 * from event
6189 * @wmi_handle: wmi handle
6190 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306191 * @param ev: Pointer to hold data traffic control
6192 *
6193 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6194 */
6195QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6196 wmi_host_tx_data_traffic_ctrl_event *ev)
6197{
6198 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6199
6200 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6201 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6202 evt_buf, ev);
6203
6204 return QDF_STATUS_E_FAILURE;
6205}
6206
6207/**
Sathish Kumar68789382016-11-14 17:44:29 +05306208 * wmi_extract_atf_peer_stats_ev() - extract atf peer stats
6209 * from event
6210 * @wmi_handle: wmi handle
6211 * @param evt_buf: pointer to event buffer
6212 * @param ev: Pointer to hold atf peer stats
6213 *
6214 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6215 */
6216QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
6217 wmi_host_atf_peer_stats_event *ev)
6218{
6219 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6220
6221 if (wmi->ops->extract_atf_peer_stats_ev)
6222 return wmi->ops->extract_atf_peer_stats_ev(wmi,
6223 evt_buf, ev);
6224
6225 return QDF_STATUS_E_FAILURE;
6226}
6227
6228/**
6229 * wmi_extract_atf_token_info_ev() - extract atf token info
6230 * from event
6231 * @wmi_handle: wmi handle
6232 * @param evt_buf: pointer to event buffer
6233 * @param idx: Index indicating the peer number
6234 * @param ev: Pointer to hold atf token info
6235 *
6236 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6237 */
6238QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf,
6239 uint8_t idx, wmi_host_atf_peer_stats_info *ev)
6240{
6241 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6242
6243 if (wmi->ops->extract_atf_token_info_ev)
6244 return wmi->ops->extract_atf_token_info_ev(wmi,
6245 evt_buf, idx, ev);
6246
6247 return QDF_STATUS_E_FAILURE;
6248}
6249
6250/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306251 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6252 * @wmi_handle: wmi handle
6253 * @param evt_buf: pointer to event buffer
6254 * @param index: Index into extended vdev stats
6255 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6256 *
6257 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6258 */
6259QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6260 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6261{
6262 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6263
6264 if (wmi_handle->ops->extract_vdev_extd_stats)
6265 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6266 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306267 return QDF_STATUS_E_FAILURE;
6268}
6269
6270/**
6271 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6272 * adaptive dwelltime configuration params
6273 * @wma_handle: wma handler
6274 * @dwelltime_params: pointer to dwelltime_params
6275 *
6276 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6277 */
6278QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6279 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6280{
6281 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6282
6283 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6284 return wmi_handle->ops->
6285 send_adapt_dwelltime_params_cmd(wmi_handle,
6286 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306287
6288 return QDF_STATUS_E_FAILURE;
6289}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306290
6291/**
6292 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6293 * @wmi_handle: wmi handle
6294 * @param: wmi power debug parameter
6295 *
6296 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6297 *
6298 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6299 */
6300QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6301 struct wmi_power_dbg_params *param)
6302{
6303 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6304
6305 if (wmi_handle->ops->send_power_dbg_cmd)
6306 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6307 param);
6308
6309 return QDF_STATUS_E_FAILURE;
6310}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306311
6312/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05306313 * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart
6314 * @wmi_handle: wmi handle
6315 * @param: multiple vdev restart parameter
6316 *
6317 * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw.
6318 *
6319 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6320 */
6321QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
6322 struct multiple_vdev_restart_params *param)
6323{
6324 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6325
6326 if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd)
6327 return wmi_handle->ops->send_multiple_vdev_restart_req_cmd(
6328 wmi_handle,
6329 param);
6330
6331 return QDF_STATUS_E_FAILURE;
6332}
6333
6334/**
Manikandan Mohan31a13e22016-12-13 13:14:06 -08006335 * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw
6336 * @wmi_hdl: wmi handle
6337 * @params: sar limit command params
6338 *
6339 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6340 */
6341QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
6342 struct sar_limit_cmd_params *params)
6343{
6344 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6345
6346 if (wmi_handle->ops->send_sar_limit_cmd)
6347 return wmi_handle->ops->send_sar_limit_cmd(
6348 wmi_handle,
6349 params);
6350 return QDF_STATUS_E_FAILURE;
6351}
6352
6353/**
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306354 * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
6355 * @wmi_hdl: wmi handle
6356 * @params: encrypt/decrypt params
6357 *
6358 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6359 */
6360QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
6361 struct encrypt_decrypt_req_params *params)
6362{
6363 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6364
6365 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6366 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6367 wmi_handle,
6368 params);
Sathish Kumar68789382016-11-14 17:44:29 +05306369 return QDF_STATUS_E_FAILURE;
6370}
6371
6372/*
6373 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
6374 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05306375 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05306376 *
6377 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6378 *
6379 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6380 */
6381QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306382 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05306383{
6384 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6385
6386 if (wmi->ops->send_btcoex_wlan_priority_cmd)
6387 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306388 param);
6389
6390 return QDF_STATUS_E_FAILURE;
6391}
6392/**
6393 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
6394 * @wmi_handle: wmi handle
6395 * @param: wmi btcoex cfg params
6396 *
6397 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6398 *
6399 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6400 */
6401QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
6402 struct btcoex_cfg_params *param)
6403{
6404 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6405
6406 if (wmi->ops->send_btcoex_duty_cycle_cmd)
6407 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
6408 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306409
6410 return QDF_STATUS_E_FAILURE;
6411}
Kiran Venkatappa06520822016-08-10 23:55:40 +05306412
6413/*
6414 * wmi_extract_service_ready_ext() - extract extended service ready
6415 * @wmi_handle: wmi handle
6416 * @param: wmi power debug parameter
6417 *
6418 *
6419 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6420 */
6421QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006422 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306423{
6424 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6425
6426 if (wmi_handle->ops->extract_service_ready_ext)
6427 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
6428 evt_buf, param);
6429
6430 return QDF_STATUS_E_FAILURE;
6431}
6432
6433/**
6434 * wmi_extract_hw_mode_cap_service_ready_ext() -
6435 * extract HW mode cap from service ready event
6436 * @wmi_handle: wmi handle
6437 * @param evt_buf: pointer to event buffer
6438 * @param param: Pointer to hold evt buf
6439 * @param hw_mode_idx: hw mode idx should be less than num_mode
6440 *
6441 * Return: QDF_STATUS_SUCCESS for success or error code
6442 */
6443QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
6444 void *wmi_hdl,
6445 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006446 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306447{
6448 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6449
6450 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
6451 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
6452 wmi_handle,
6453 evt_buf, hw_mode_idx, param);
6454
6455 return QDF_STATUS_E_FAILURE;
6456}
6457/**
6458 * wmi_extract_mac_phy_cap_service_ready_ext() -
6459 * extract MAC phy cap from service ready event
6460 * @wmi_handle: wmi handle
6461 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306462 * @param hw_mode_id: hw mode id of hw_mode_caps
6463 * @param phy_id: phy_id within hw_mode_cap
6464 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05306465 *
6466 * Return: QDF_STATUS_SUCCESS for success or error code
6467 */
6468QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
6469 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306470 uint8_t *evt_buf,
6471 uint8_t hw_mode_id,
6472 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006473 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306474{
6475 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6476
6477 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
6478 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
6479 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306480 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05306481
6482 return QDF_STATUS_E_FAILURE;
6483}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306484
Kiran Venkatappa06520822016-08-10 23:55:40 +05306485/**
6486 * wmi_extract_reg_cap_service_ready_ext() -
6487 * extract REG cap from service ready event
6488 * @wmi_handle: wmi handle
6489 * @param evt_buf: pointer to event buffer
6490 * @param param: Pointer to hold evt buf
6491 * @param phy_idx: phy idx should be less than num_mode
6492 *
6493 * Return: QDF_STATUS_SUCCESS for success or error code
6494 */
6495QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
6496 void *wmi_hdl,
6497 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006498 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306499{
6500 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6501
6502 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
6503 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
6504 wmi_handle,
6505 evt_buf, phy_idx, param);
6506
6507 return QDF_STATUS_E_FAILURE;
6508}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306509
6510/**
6511 * wmi_extract_pdev_utf_event() -
6512 * extract UTF data from pdev utf event
6513 * @wmi_handle: wmi handle
6514 * @param evt_buf: pointer to event buffer
6515 * @param param: Pointer to hold evt buf
6516 *
6517 * Return: QDF_STATUS_SUCCESS for success or error code
6518 */
6519QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
6520 uint8_t *evt_buf,
6521 struct wmi_host_pdev_utf_event *param)
6522{
6523 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6524
6525 if (wmi_handle->ops->extract_pdev_utf_event)
6526 return wmi_handle->ops->extract_pdev_utf_event(
6527 wmi_handle,
6528 evt_buf, param);
6529
6530 return QDF_STATUS_E_FAILURE;
6531}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306532
6533/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05306534 * wmi_extract_pdev_qvit_event() -
6535 * extract UTF data from pdev qvit event
6536 * @wmi_handle: wmi handle
6537 * @param evt_buf: pointer to event buffer
6538 * @param param: Pointer to hold evt buf
6539 *
6540 * Return: QDF_STATUS_SUCCESS for success or error code
6541 */
6542QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
6543 uint8_t *evt_buf,
6544 struct wmi_host_pdev_qvit_event *param)
6545{
6546 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6547
6548 if (wmi_handle->ops->extract_pdev_qvit_event)
6549 return wmi_handle->ops->extract_pdev_qvit_event(
6550 wmi_handle,
6551 evt_buf, param);
6552
6553 return QDF_STATUS_E_FAILURE;
6554}
6555
6556/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05306557 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
6558 * @wmi_handle: wmi handle
6559 * @param: wmi coex ver cfg params
6560 *
6561 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
6562 *
6563 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6564 */
6565QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
6566 coex_ver_cfg_t *param)
6567{
6568 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6569
6570 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
6571 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
6572 param);
6573
6574 return QDF_STATUS_E_FAILURE;
6575}
6576
6577/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05306578 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
6579 * @wmi_handle: wmi handle
6580 * @param: wmi coex cfg cmd params
6581 *
6582 * Send WMI_COEX_CFG_CMD parameters to fw.
6583 *
6584 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6585 */
6586QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
6587 struct coex_config_params *param)
6588{
6589 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6590
6591 if (wmi_handle->ops->send_coex_config_cmd)
6592 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
6593 param);
6594
6595 return QDF_STATUS_E_FAILURE;
6596}
6597
6598/**
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306599 * wmi_extract_peer_delete_response_event() -
6600 * extract vdev id and peer mac addresse from peer delete response event
6601 * @wmi_handle: wmi handle
6602 * @param evt_buf: pointer to event buffer
6603 * @param param: Pointer to hold evt buf
6604 *
6605 * Return: QDF_STATUS_SUCCESS for success or error code
6606 */
6607QDF_STATUS wmi_extract_peer_delete_response_event(
6608 void *wmi_hdl,
6609 uint8_t *evt_buf,
6610 struct wmi_host_peer_delete_response_event *param)
6611{
6612 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6613
6614 if (wmi_handle->ops->extract_peer_delete_response_event)
6615 return wmi_handle->ops->extract_peer_delete_response_event(
6616 wmi_handle,
6617 evt_buf, param);
6618
6619 return QDF_STATUS_E_FAILURE;
6620}
Arif Hussainf00be1d2017-01-07 18:21:55 -08006621
6622QDF_STATUS
6623wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
6624 uint32_t pdev_id)
6625{
6626 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6627
6628 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
6629 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
6630 wmi_handle, pdev_id);
6631
6632 return QDF_STATUS_E_FAILURE;
6633}
6634
6635QDF_STATUS
6636wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
6637 uint32_t pdev_id)
6638{
6639 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6640
6641 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
6642 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
6643 wmi_handle, pdev_id);
6644
6645 return QDF_STATUS_E_FAILURE;
6646}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05306647
6648/*
6649 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
6650 * @wmi_handle: wmi handle
6651 * @evt_buf: pointer to event buffer.
6652 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
6653 *
6654 *
6655 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6656 */
6657QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
6658 struct wlan_psoc_host_chainmask_table *chainmask_table)
6659{
6660 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6661
6662 if (wmi_handle->ops->extract_chainmask_tables)
6663 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
6664 evt_buf, chainmask_table);
6665
6666 return QDF_STATUS_E_FAILURE;
6667}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07006668/**
6669 * wmi_unified_set_country_cmd_send() - WMI set country function
6670 * @param wmi_handle : handle to WMI.
6671 * @param param : pointer to hold set country cmd parameter
6672 *
6673 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6674 */
6675QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
6676 struct set_country *param)
6677{
6678 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6679
6680 if (wmi_handle->ops->send_set_country_cmd)
6681 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
6682 param);
6683
6684 return QDF_STATUS_E_FAILURE;
6685}
6686
Nitesh Shah52323d02017-05-22 15:49:00 +05306687/**
6688 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
6689 * DBS scan selection configuration params
6690 * @wma_handle: wma handler
6691 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
6692 *
6693 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6694 */
6695QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
6696 struct wmi_dbs_scan_sel_params *dbs_scan_params)
6697{
6698 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6699
6700 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
6701 return wmi_handle->ops->
6702 send_dbs_scan_sel_params_cmd(wmi_handle,
6703 dbs_scan_params);
6704
6705 return QDF_STATUS_E_FAILURE;
6706}