blob: fb3da5de26f0ddbb7c6238da2541b8d04fc1abae [file] [log] [blame]
Govind Singh5eb51532016-03-09 11:34:12 +05301/*
2 * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27#include "athdefs.h"
28#include "osapi_linux.h"
29#include "a_types.h"
30#include "a_debug.h"
31#include "ol_if_athvar.h"
32#include "ol_defines.h"
Govind Singh5eb51532016-03-09 11:34:12 +053033#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053034#include "wmi_unified_param.h"
35
36/**
37 * wmi_unified_vdev_create_send() - send VDEV create command to fw
38 * @wmi_handle: wmi handle
39 * @param: pointer to hold vdev create parameter
40 * @macaddr: vdev mac address
41 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053042 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053043 */
Govind Singhb53420c2016-03-09 14:32:57 +053044QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053045 uint8_t macaddr[IEEE80211_ADDR_LEN],
46 struct vdev_create_params *param)
47{
48 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
49
50 if (wmi_handle->ops->send_vdev_create_cmd)
51 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
52 macaddr, param);
53
Govind Singhb53420c2016-03-09 14:32:57 +053054 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053055}
56
57/**
58 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
59 * @wmi_handle: wmi handle
60 * @if_id: vdev id
61 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053062 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053063 */
Govind Singhb53420c2016-03-09 14:32:57 +053064QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053065 uint8_t if_id)
66{
67 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
68
69 if (wmi_handle->ops->send_vdev_delete_cmd)
70 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
71 if_id);
72
Govind Singhb53420c2016-03-09 14:32:57 +053073 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053074}
75
76/**
77 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
78 * @wmi: wmi handle
79 * @vdev_id: vdev id
80 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053081 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053082 */
Govind Singhb53420c2016-03-09 14:32:57 +053083QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053084 uint8_t vdev_id)
85{
86 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
87
88 if (wmi_handle->ops->send_vdev_stop_cmd)
89 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
90 vdev_id);
91
Govind Singhb53420c2016-03-09 14:32:57 +053092 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053093}
94
95/**
96 * wmi_unified_vdev_down_send() - send vdev down command to fw
97 * @wmi: wmi handle
98 * @vdev_id: vdev id
99 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530100 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530101 */
Govind Singhb53420c2016-03-09 14:32:57 +0530102QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530103{
104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
105
106 if (wmi_handle->ops->send_vdev_down_cmd)
107 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
108
Govind Singhb53420c2016-03-09 14:32:57 +0530109 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530110}
111
112/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530113 * wmi_unified_vdev_start_send() - send vdev start command to fw
114 * @wmi: wmi handle
115 * @vdev_id: vdev id
116 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530117 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530118 */
119QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
120 struct vdev_start_params *req)
121{
122 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
123
124 if (wmi_handle->ops->send_vdev_start_cmd)
125 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
126
127 return QDF_STATUS_E_FAILURE;
128}
129
130/**
131 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
132 * @wmi: wmi handle
133 * @restart_params: vdev restart params
134 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530135 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530136 */
137QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
138 struct hidden_ssid_vdev_restart_params *restart_params)
139{
140 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
141
142 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
143 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
144 wmi_handle, restart_params);
145
146 return QDF_STATUS_E_FAILURE;
147}
148
149/**
Govind Singh5eb51532016-03-09 11:34:12 +0530150 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
151 * @wmi: wmi handle
152 * @peer_addr: peer mac address
153 * @param: pointer to hold peer flush tid parameter
154 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530155 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530156 */
Govind Singhb53420c2016-03-09 14:32:57 +0530157QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530158 uint8_t peer_addr[IEEE80211_ADDR_LEN],
159 struct peer_flush_params *param)
160{
161 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
162
163 if (wmi_handle->ops->send_peer_flush_tids_cmd)
164 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
165 peer_addr, param);
166
Govind Singhb53420c2016-03-09 14:32:57 +0530167 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530168}
169
170/**
171 * wmi_unified_peer_delete_send() - send PEER delete command to fw
172 * @wmi: wmi handle
173 * @peer_addr: peer mac addr
174 * @vdev_id: vdev id
175 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530176 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530177 */
Govind Singhb53420c2016-03-09 14:32:57 +0530178QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530179 uint8_t
180 peer_addr[IEEE80211_ADDR_LEN],
181 uint8_t vdev_id)
182{
183 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
184
185 if (wmi_handle->ops->send_peer_delete_cmd)
186 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
187 peer_addr, vdev_id);
188
Govind Singhb53420c2016-03-09 14:32:57 +0530189 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530190}
191
192/**
193 * wmi_set_peer_param() - set peer parameter in fw
194 * @wmi_ctx: wmi handle
195 * @peer_addr: peer mac address
196 * @param : pointer to hold peer set parameter
197 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530198 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530199 */
Govind Singhb53420c2016-03-09 14:32:57 +0530200QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530201 uint8_t peer_addr[IEEE80211_ADDR_LEN],
202 struct peer_set_params *param)
203{
204 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
205
206 if (wmi_handle->ops->send_peer_param_cmd)
207 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
208 peer_addr, param);
209
Govind Singhb53420c2016-03-09 14:32:57 +0530210 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530211}
212
213/**
214 * wmi_unified_vdev_up_send() - send vdev up command in fw
215 * @wmi: wmi handle
216 * @bssid: bssid
217 * @vdev_up_params: pointer to hold vdev up parameter
218 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530219 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530220 */
Govind Singhb53420c2016-03-09 14:32:57 +0530221QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530222 uint8_t bssid[IEEE80211_ADDR_LEN],
223 struct vdev_up_params *params)
224{
225 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
226
227 if (wmi_handle->ops->send_vdev_up_cmd)
228 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
229 params);
230
Govind Singhb53420c2016-03-09 14:32:57 +0530231 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530232}
233
234/**
235 * wmi_unified_peer_create_send() - send peer create command to fw
236 * @wmi: wmi handle
237 * @peer_addr: peer mac address
238 * @peer_type: peer type
239 * @vdev_id: vdev id
240 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530241 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530242 */
Govind Singhb53420c2016-03-09 14:32:57 +0530243QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530244 struct peer_create_params *param)
245{
246 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
247
248 if (wmi_handle->ops->send_peer_create_cmd)
249 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
250
Govind Singhb53420c2016-03-09 14:32:57 +0530251 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530252}
253
254#ifdef FEATURE_GREEN_AP
255/**
256 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
257 * @wmi_handle: wmi handle
258 * @value: value
259 * @mac_id: mac id to have radio context
260 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530261 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530262 */
Govind Singhb53420c2016-03-09 14:32:57 +0530263QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530264 uint32_t value, uint8_t mac_id)
265{
266 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
267
268 if (wmi_handle->ops->send_green_ap_ps_cmd)
269 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
270 mac_id);
271
Govind Singhb53420c2016-03-09 14:32:57 +0530272 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530273}
274#else
Govind Singhb53420c2016-03-09 14:32:57 +0530275QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530276 uint32_t value, uint8_t mac_id)
277{
278 return 0;
279}
280#endif /* FEATURE_GREEN_AP */
281
282/**
283 * wmi_unified_pdev_utf_cmd() - send utf command to fw
284 * @wmi_handle: wmi handle
285 * @param: pointer to pdev_utf_params
286 * @mac_id: mac id to have radio context
287 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530288 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530289 */
Govind Singhb53420c2016-03-09 14:32:57 +0530290QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530291wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
292 struct pdev_utf_params *param,
293 uint8_t mac_id)
294{
295 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
296
297 if (wmi_handle->ops->send_pdev_utf_cmd)
298 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
299 mac_id);
300
Govind Singhb53420c2016-03-09 14:32:57 +0530301 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530302}
303
304/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530305 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530306 * @wmi_handle: wmi handle
307 * @param: pointer to pdev parameter
308 * @mac_id: radio context
309 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
311 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530312 */
Govind Singhb53420c2016-03-09 14:32:57 +0530313QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530314wmi_unified_pdev_param_send(void *wmi_hdl,
315 struct pdev_params *param,
316 uint8_t mac_id)
317{
318 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
319
320 if (wmi_handle->ops->send_pdev_param_cmd)
321 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
322 mac_id);
323
Govind Singhb53420c2016-03-09 14:32:57 +0530324 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530325}
326
327/**
328 * wmi_unified_suspend_send() - WMI suspend function
329 * @param wmi_handle : handle to WMI.
330 * @param param : pointer to hold suspend parameter
331 * @mac_id: radio context
332 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530333 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530334 */
Govind Singhb53420c2016-03-09 14:32:57 +0530335QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530336 struct suspend_params *param,
337 uint8_t mac_id)
338{
339 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
340
341 if (wmi_handle->ops->send_suspend_cmd)
342 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
343 mac_id);
344
Govind Singhb53420c2016-03-09 14:32:57 +0530345 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530346}
347
348/**
349 * wmi_unified_resume_send - WMI resume function
350 * @param wmi_handle : handle to WMI.
351 * @mac_id: radio context
352 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530353 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530354 */
Govind Singhb53420c2016-03-09 14:32:57 +0530355QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530356 uint8_t mac_id)
357{
358 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
359
360 if (wmi_handle->ops->send_resume_cmd)
361 return wmi_handle->ops->send_resume_cmd(wmi_handle,
362 mac_id);
363
Govind Singhb53420c2016-03-09 14:32:57 +0530364 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530365}
366
367/**
368 * wmi_unified_wow_enable_send() - WMI wow enable function
369 * @param wmi_handle : handle to WMI.
370 * @param param : pointer to hold wow enable parameter
371 * @mac_id: radio context
372 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530373 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530374 */
Govind Singhb53420c2016-03-09 14:32:57 +0530375QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530376 struct wow_cmd_params *param,
377 uint8_t mac_id)
378{
379 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
380
381 if (wmi_handle->ops->send_wow_enable_cmd)
382 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
383 mac_id);
384
Govind Singhb53420c2016-03-09 14:32:57 +0530385 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530386}
387
388/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530389 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
390 * @param wmi_hdl : handle to WMI.
391 *
392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
393 */
394QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
395{
396 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
397
398 if (wmi_handle->ops->send_wow_wakeup_cmd)
399 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
400
401 return QDF_STATUS_E_FAILURE;
402}
403
404/**
405 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
406 * @param wmi_handle : handle to WMI.
407 * @param: pointer to wow wakeup event parameter structure
408 *
409 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
410 */
411QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
412 struct wow_add_wakeup_params *param)
413{
414 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
415
416 if (wmi->ops->send_wow_add_wakeup_event_cmd)
417 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
418 param);
419
420 return QDF_STATUS_E_FAILURE;
421}
422
423/**
424 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
425 * @param wmi_handle : handle to WMI.
426 * @param: pointer to wow wakeup pattern parameter structure
427 *
428 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
429 */
430QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
431 struct wow_add_wakeup_pattern_params *param)
432{
433 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
434
435 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
436 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
437
438 return QDF_STATUS_E_FAILURE;
439}
440
441/**
442 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
443 * @param wmi_handle : handle to WMI.
444 * @param: pointer to wow wakeup pattern parameter structure
445 *
446 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
447 */
448QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
449 struct wow_remove_wakeup_pattern_params *param)
450{
451 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
452
453 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
454 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
455
456 return QDF_STATUS_E_FAILURE;
457}
458
459/**
Govind Singh5eb51532016-03-09 11:34:12 +0530460 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
461 * @wma_ctx: wma context
462 * @peer_addr: peer mac address
463 * @param: pointer to ap_ps parameter structure
464 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530465 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530466 */
Govind Singhb53420c2016-03-09 14:32:57 +0530467QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530468 uint8_t *peer_addr,
469 struct ap_ps_params *param)
470{
471 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
472
473 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
474 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
475 peer_addr,
476 param);
477
Govind Singhb53420c2016-03-09 14:32:57 +0530478 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530479}
480
481/**
482 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
483 * @wma_ctx: wma context
484 * @peer_addr: peer mac address
485 * @param: pointer to sta_ps parameter structure
486 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530487 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530488 */
Govind Singhb53420c2016-03-09 14:32:57 +0530489QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530490 struct sta_ps_params *param)
491{
492 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
493
494 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
495 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
496 param);
497
Govind Singhb53420c2016-03-09 14:32:57 +0530498 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530499}
500
501/**
502 * wmi_crash_inject() - inject fw crash
503 * @wma_handle: wma handle
504 * @param: ponirt to crash inject paramter structure
505 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530506 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530507 */
Govind Singhb53420c2016-03-09 14:32:57 +0530508QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530509 struct crash_inject *param)
510{
511 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
512
513 if (wmi_handle->ops->send_crash_inject_cmd)
514 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
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_dbglog_cmd_send() - set debug log level
522 * @param wmi_handle : handle to WMI.
523 * @param param : pointer to hold dbglog level parameter
524 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530525 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530526 */
Govind Singhb53420c2016-03-09 14:32:57 +0530527QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530528wmi_unified_dbglog_cmd_send(void *wmi_hdl,
529 struct dbglog_params *dbglog_param)
530{
531 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
532
533 if (wmi_handle->ops->send_dbglog_cmd)
534 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
535 dbglog_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_unified_vdev_set_param_send() - WMI vdev set parameter function
542 * @param wmi_handle : handle to WMI.
543 * @param macaddr : MAC address
544 * @param param : pointer to hold vdev set parameter
545 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530546 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530547 */
Govind Singhb53420c2016-03-09 14:32:57 +0530548QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530549 struct vdev_set_params *param)
550{
551 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
552
553 if (wmi_handle->ops->send_vdev_set_param_cmd)
554 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
555 param);
556
Govind Singhb53420c2016-03-09 14:32:57 +0530557 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530558}
559
560/**
561 * wmi_unified_stats_request_send() - WMI request stats function
562 * @param wmi_handle : handle to WMI.
563 * @param macaddr : MAC address
564 * @param param : pointer to hold stats request parameter
565 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530566 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530567 */
Govind Singhb53420c2016-03-09 14:32:57 +0530568QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530569 uint8_t macaddr[IEEE80211_ADDR_LEN],
570 struct stats_request_params *param)
571{
572 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
573
574 if (wmi_handle->ops->send_stats_request_cmd)
575 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
576 macaddr, param);
577
Govind Singhb53420c2016-03-09 14:32:57 +0530578 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530579}
580
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530581#ifndef WMI_NON_TLV_SUPPORT
Govind Singh5eb51532016-03-09 11:34:12 +0530582/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530583 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530584 * @param wmi_handle : handle to WMI.
585 * @param macaddr : MAC address
586 * @param param : pointer to hold stats request parameter
587 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530588 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530589 */
Govind Singhb53420c2016-03-09 14:32:57 +0530590QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530591 uint8_t macaddr[IEEE80211_ADDR_LEN],
592 struct packet_enable_params *param)
593{
594 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
595
596 if (wmi_handle->ops->send_packet_log_enable_cmd)
597 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
598 macaddr, param);
599
Govind Singhb53420c2016-03-09 14:32:57 +0530600 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530601}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530602#else
603/**
604 * wmi_unified_packet_log_enable_send() - WMI request stats function
605 * @param wmi_handle : handle to WMI.
606 * @param macaddr : MAC address
607 * @param param : pointer to hold stats request parameter
608 *
609 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
610 */
611QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
612 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT)
613{
614 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
615
616 if (wmi_handle->ops->send_packet_log_enable_cmd)
617 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
618 PKTLOG_EVENT);
619
620 return QDF_STATUS_E_FAILURE;
621}
622
623#endif
624/**
625 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
626 * @param wmi_handle : handle to WMI.
627 * @param PKTLOG_EVENT : packet log event
628 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
629 */
630QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl)
631{
632 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
633
634 if (wmi_handle->ops->send_packet_log_disable_cmd)
635 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle);
636
637 return QDF_STATUS_E_FAILURE;
638}
Govind Singh5eb51532016-03-09 11:34:12 +0530639
640/**
641 * wmi_unified_beacon_send_cmd() - WMI beacon send function
642 * @param wmi_handle : handle to WMI.
643 * @param macaddr : MAC address
644 * @param param : pointer to hold beacon send cmd parameter
645 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530646 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530647 */
Govind Singhb53420c2016-03-09 14:32:57 +0530648QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530649 struct beacon_params *param)
650{
651 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
652
653 if (wmi_handle->ops->send_beacon_send_cmd)
654 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530655 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530656
Govind Singhb53420c2016-03-09 14:32:57 +0530657 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530658}
659
660/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530661 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
662 * @param wmi_handle : handle to WMI.
663 * @param macaddr : MAC address
664 * @param param : pointer to hold beacon send cmd parameter
665 *
666 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
667 */
668QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
669 struct beacon_tmpl_params *param)
670{
671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
672
673 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
674 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
675 param);
676
677 return QDF_STATUS_E_FAILURE;
678}
679/**
Govind Singh5eb51532016-03-09 11:34:12 +0530680 * wmi_unified_peer_assoc_send() - WMI peer assoc function
681 * @param wmi_handle : handle to WMI.
682 * @param macaddr : MAC address
683 * @param param : pointer to peer assoc parameter
684 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530685 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530686 */
Govind Singhb53420c2016-03-09 14:32:57 +0530687QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530688 struct peer_assoc_params *param)
689{
690 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
691
692 if (wmi_handle->ops->send_peer_assoc_cmd)
693 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530694 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530695
Govind Singhb53420c2016-03-09 14:32:57 +0530696 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530697}
698
699/**
700 * wmi_unified_scan_start_cmd_send() - WMI scan start function
701 * @param wmi_handle : handle to WMI.
702 * @param macaddr : MAC address
703 * @param param : pointer to hold scan start cmd parameter
704 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530705 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530706 */
Govind Singhb53420c2016-03-09 14:32:57 +0530707QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530708 struct scan_start_params *param)
709{
710 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
711
712 if (wmi_handle->ops->send_scan_start_cmd)
713 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530714 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530715
Govind Singhb53420c2016-03-09 14:32:57 +0530716 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530717}
718
719/**
720 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
721 * @param wmi_handle : handle to WMI.
722 * @param macaddr : MAC address
723 * @param param : pointer to hold scan start cmd 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_scan_stop_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530728 struct scan_stop_params *param)
729{
730 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
731
732 if (wmi_handle->ops->send_scan_stop_cmd)
733 return wmi_handle->ops->send_scan_stop_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_chan_list_cmd_send() - WMI scan channel list function
741 * @param wmi_handle : handle to WMI.
742 * @param macaddr : MAC address
743 * @param param : pointer to hold scan channel list 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_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530748 struct scan_chan_list_params *param)
749{
750 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
751
752 if (wmi_handle->ops->send_scan_chan_list_cmd)
753 return wmi_handle->ops->send_scan_chan_list_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}
Govind Singh427ee5a2016-02-26 18:09:36 +0530758
759/**
760 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
761 * @wmi_hdl : handle to WMI.
762 * @param : pointer to hold mgmt cmd parameter
763 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530764 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530765 */
Govind Singhb53420c2016-03-09 14:32:57 +0530766QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530767 struct wmi_mgmt_params *param)
768{
769 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
770
771 if (wmi_handle->ops->send_mgmt_cmd)
772 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
773 param);
774
Govind Singhb53420c2016-03-09 14:32:57 +0530775 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530776}
777
778/**
779 * wmi_unified_modem_power_state() - set modem power state to fw
780 * @wmi_hdl: wmi handle
781 * @param_value: parameter value
782 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530783 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530784 */
Govind Singhb53420c2016-03-09 14:32:57 +0530785QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530786 uint32_t param_value)
787{
788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
789
790 if (wmi_handle->ops->send_modem_power_state_cmd)
791 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
792 param_value);
793
Govind Singhb53420c2016-03-09 14:32:57 +0530794 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530795}
796
797/**
798 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
799 * @wmi_hdl: wmi handle
800 * @vdev_id: vdev id
801 * @val: value
802 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530803 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530804 */
Govind Singhb53420c2016-03-09 14:32:57 +0530805QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530806 uint32_t vdev_id, uint8_t val)
807{
808 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
809
810 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
811 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
812 vdev_id, val);
813
Govind Singhb53420c2016-03-09 14:32:57 +0530814 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530815}
816
817/**
818 * wmi_set_mimops() - set MIMO powersave
819 * @wmi_hdl: wmi handle
820 * @vdev_id: vdev id
821 * @value: value
822 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530823 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530824 */
Govind Singhb53420c2016-03-09 14:32:57 +0530825QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530826{
827 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
828
829 if (wmi_handle->ops->send_set_mimops_cmd)
830 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
831 vdev_id, value);
832
Govind Singhb53420c2016-03-09 14:32:57 +0530833 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530834}
835
836/**
837 * wmi_set_smps_params() - set smps params
838 * @wmi_hdl: wmi handle
839 * @vdev_id: vdev id
840 * @value: 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_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530845 int value)
846{
847 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
848
849 if (wmi_handle->ops->send_set_smps_params_cmd)
850 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
851 vdev_id, 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/**
858 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
859 * @wmi_hdl: wmi handle
860 * @opps: p2p opp power save parameters
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_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530865 struct p2p_ps_params *oppps)
866{
867 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
868
869 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
870 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
871 oppps);
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_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
878 * @wmi_hdl: wmi handle
879 * @noa: p2p power save parameters
880 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530881 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530882 */
Govind Singhb53420c2016-03-09 14:32:57 +0530883QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530884 struct p2p_ps_params *noa)
885{
886 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
887
888 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
889 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
890 noa);
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_get_temperature() - get pdev temperature req
897 * @wmi_hdl: wmi handle
898 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530899 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530900 */
Govind Singhb53420c2016-03-09 14:32:57 +0530901QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +0530902{
903 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
904
905 if (wmi_handle->ops->send_get_temperature_cmd)
906 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
907
Govind Singhb53420c2016-03-09 14:32:57 +0530908 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530909}
910
911/**
912 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
913 * @wmi_hdl: wmi handle
914 * @end_set_sta_ps_mode_cmd: cmd paramter strcture
915 *
916 * This function sets the trigger
917 * uapsd params such as service interval, delay interval
918 * and suspend interval which will be used by the firmware
919 * to send trigger frames periodically when there is no
920 * traffic on the transmit side.
921 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530922 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530923 */
Govind Singhb53420c2016-03-09 14:32:57 +0530924QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +0530925wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
926 struct sta_uapsd_trig_params *param)
927{
928 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
929
930 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
931 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
932 param);
933
Govind Singhb53420c2016-03-09 14:32:57 +0530934 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530935}
Govind Singh2edc80f2016-03-01 15:30:53 +0530936
937/**
938 * wmi_unified_ocb_start_timing_advert() - start sending the timing advertisement
939 * frames on a channel
940 * @wmi_handle: pointer to the wmi handle
941 * @timing_advert: pointer to the timing advertisement struct
942 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530943 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530944 */
Govind Singhb53420c2016-03-09 14:32:57 +0530945QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530946 struct ocb_timing_advert_param *timing_advert)
947{
948 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
949
950 if (wmi_handle->ops->send_ocb_start_timing_advert_cmd)
951 return wmi_handle->ops->send_ocb_start_timing_advert_cmd(wmi_handle,
952 timing_advert);
953
Govind Singhb53420c2016-03-09 14:32:57 +0530954 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530955}
956
957/**
958 * wmi_unified_ocb_stop_timing_advert() - stop sending the timing advertisement
959 * frames on a channel
960 * @wmi_handle: pointer to the wmi handle
961 * @timing_advert: pointer to the timing advertisement struct
962 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530964 */
Govind Singhb53420c2016-03-09 14:32:57 +0530965QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530966 struct ocb_timing_advert_param *timing_advert)
967{
968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
969
970 if (wmi_handle->ops->send_ocb_stop_timing_advert_cmd)
971 return wmi_handle->ops->send_ocb_stop_timing_advert_cmd(wmi_handle,
972 timing_advert);
973
Govind Singhb53420c2016-03-09 14:32:57 +0530974 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530975}
976
977/**
978 * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
979 * @wmi_handle: pointer to the wmi handle
980 * @vdev_id: vdev id
981 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530982 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530983 */
Govind Singhb53420c2016-03-09 14:32:57 +0530984QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530985 struct ocb_utc_param *utc)
986{
987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
988
989 if (wmi_handle->ops->send_ocb_set_utc_time_cmd)
990 return wmi_handle->ops->send_ocb_set_utc_time_cmd(wmi_handle,
991 utc);
992
Govind Singhb53420c2016-03-09 14:32:57 +0530993 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530994}
995
996/**
997 * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
998 * @wmi_handle: pointer to the wmi handle
999 * @vdev_id: vdev id
1000 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301001 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301002 */
Govind Singhb53420c2016-03-09 14:32:57 +05301003QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301004 uint8_t vdev_id)
1005{
1006 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1007
1008 if (wmi_handle->ops->send_ocb_get_tsf_timer_cmd)
1009 return wmi_handle->ops->send_ocb_get_tsf_timer_cmd(wmi_handle,
1010 vdev_id);
1011
Govind Singhb53420c2016-03-09 14:32:57 +05301012 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301013}
1014
1015/**
1016 * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
1017 * @wmi_handle: pointer to the wmi handle
1018 * @get_stats_param: pointer to the dcc stats
1019 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301020 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301021 */
Govind Singhb53420c2016-03-09 14:32:57 +05301022QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301023 struct dcc_get_stats_param *get_stats_param)
1024{
1025 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1026
1027 if (wmi_handle->ops->send_dcc_get_stats_cmd)
1028 return wmi_handle->ops->send_dcc_get_stats_cmd(wmi_handle,
1029 get_stats_param);
1030
Govind Singhb53420c2016-03-09 14:32:57 +05301031 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301032}
1033
1034/**
1035 * wmi_unified_dcc_clear_stats() - command to clear the DCC stats
1036 * @wmi_handle: pointer to the wmi handle
1037 * @clear_stats_param: parameters to the command
1038 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301039 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301040 */
Govind Singhb53420c2016-03-09 14:32:57 +05301041QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301042 uint32_t vdev_id, uint32_t dcc_stats_bitmap)
1043{
1044 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1045
1046 if (wmi_handle->ops->send_dcc_clear_stats_cmd)
1047 return wmi_handle->ops->send_dcc_clear_stats_cmd(wmi_handle,
1048 vdev_id, dcc_stats_bitmap);
1049
Govind Singhb53420c2016-03-09 14:32:57 +05301050 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301051}
1052
1053/**
1054 * wmi_unified_dcc_update_ndl() - command to update the NDL data
1055 * @wmi_handle: pointer to the wmi handle
1056 * @update_ndl_param: pointer to the request parameters
1057 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301058 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301059 */
Govind Singhb53420c2016-03-09 14:32:57 +05301060QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301061 struct dcc_update_ndl_param *update_ndl_param)
1062{
1063 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1064
1065 if (wmi_handle->ops->send_dcc_update_ndl_cmd)
1066 return wmi_handle->ops->send_dcc_update_ndl_cmd(wmi_handle,
1067 update_ndl_param);
1068
Govind Singhb53420c2016-03-09 14:32:57 +05301069 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301070}
1071
1072/**
1073 * wmi_unified_ocb_set_config() - send the OCB config to the FW
1074 * @wmi_handle: pointer to the wmi handle
1075 * @config: the OCB configuration
1076 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301077 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301078 */
Govind Singhb53420c2016-03-09 14:32:57 +05301079QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301080 struct ocb_config_param *config, uint32_t *ch_mhz)
1081{
1082 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1083
1084 if (wmi_handle->ops->send_ocb_set_config_cmd)
1085 return wmi_handle->ops->send_ocb_set_config_cmd(wmi_handle,
1086 config, ch_mhz);
1087
Govind Singhb53420c2016-03-09 14:32:57 +05301088 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301089}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301090
1091/**
1092 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1093 * @wmi_handle: wmi handle
1094 * @mcc_adaptive_scheduler: enable/disable
1095 *
1096 * This function enable/disable mcc adaptive scheduler in fw.
1097 *
Govind Singhb53420c2016-03-09 14:32:57 +05301098 * Return: QDF_STATUS_SUCCESS for sucess or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301099 */
Govind Singhb53420c2016-03-09 14:32:57 +05301100QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001101 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1102 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301103{
1104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1105
1106 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1107 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001108 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301109
Govind Singhb53420c2016-03-09 14:32:57 +05301110 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301111}
1112
1113/**
1114 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1115 * @wmi: wmi handle
1116 * @mcc_channel: mcc channel
1117 * @mcc_channel_time_latency: MCC channel time latency.
1118 *
1119 * Currently used to set time latency for an MCC vdev/adapter using operating
1120 * channel of it and channel number. The info is provided run time using
1121 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1122 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301123 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301124 */
Govind Singhb53420c2016-03-09 14:32:57 +05301125QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301126 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1127{
1128 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1129
1130 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1131 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1132 mcc_channel_freq,
1133 mcc_channel_time_latency);
1134
Govind Singhb53420c2016-03-09 14:32:57 +05301135 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301136}
1137
1138/**
1139 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1140 * @wmi: wmi handle
1141 * @adapter_1_chan_number: adapter 1 channel number
1142 * @adapter_1_quota: adapter 1 quota
1143 * @adapter_2_chan_number: adapter 2 channel number
1144 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301145 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301146 */
Govind Singhb53420c2016-03-09 14:32:57 +05301147QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301148 uint32_t adapter_1_chan_freq,
1149 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301150{
1151 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1152
1153 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1154 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1155 adapter_1_chan_freq,
1156 adapter_1_quota,
1157 adapter_2_chan_freq);
1158
Govind Singhb53420c2016-03-09 14:32:57 +05301159 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301160}
1161
1162/**
1163 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1164 * @wmi_handle: Pointer to wmi handle
1165 * @thermal_info: Thermal command information
1166 *
1167 * This function sends the thermal management command
1168 * to the firmware
1169 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301170 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301171 */
Govind Singhb53420c2016-03-09 14:32:57 +05301172QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301173 struct thermal_cmd_params *thermal_info)
1174{
1175 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1176
1177 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1178 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1179 thermal_info);
1180
Govind Singhb53420c2016-03-09 14:32:57 +05301181 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301182}
1183
1184
1185/**
1186 * wmi_unified_lro_config_cmd() - process the LRO config command
1187 * @wmi: Pointer to wmi handle
1188 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1189 *
1190 * This function sends down the LRO configuration parameters to
1191 * the firmware to enable LRO, sets the TCP flags and sets the
1192 * seed values for the toeplitz hash generation
1193 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301194 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301195 */
Govind Singhb53420c2016-03-09 14:32:57 +05301196QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301197 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1198{
1199 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1200
1201 if (wmi_handle->ops->send_lro_config_cmd)
1202 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1203 wmi_lro_cmd);
1204
Govind Singhb53420c2016-03-09 14:32:57 +05301205 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301206}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301207
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301208#ifndef WMI_NON_TLV_SUPPORT
Govind Singh4eacd2b2016-03-07 14:24:22 +05301209/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301210 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1211 * @wmi_hdl: Pointer to wmi handle
1212 * @rate_report_params: Pointer to peer rate report parameters
1213 *
1214 *
1215 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1216 */
1217QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1218 struct wmi_peer_rate_report_params *rate_report_params)
1219{
1220 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1221
1222 if (wmi_handle->ops->send_peer_rate_report_cmd)
1223 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1224 rate_report_params);
1225
1226 return QDF_STATUS_E_FAILURE;
1227}
1228
1229/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301230 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1231 * @wmi_hdl: wmi handle
1232 * @param: bcn ll cmd parameter
1233 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301234 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301235 */
Govind Singhb53420c2016-03-09 14:32:57 +05301236QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301237 wmi_bcn_send_from_host_cmd_fixed_param *param)
1238{
1239 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1240
1241 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1242 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1243 param);
1244
Govind Singhb53420c2016-03-09 14:32:57 +05301245 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301246}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301247#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301248
1249/**
1250 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1251 * @wmi_hdl: wmi handle
1252 * @vdev_id: vdev id
1253 * @max_retries: max retries
1254 * @retry_interval: retry interval
1255 * This function sets sta query related parameters in fw.
1256 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301257 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301258 */
1259
Govind Singhb53420c2016-03-09 14:32:57 +05301260QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301261 uint8_t vdev_id, uint32_t max_retries,
1262 uint32_t retry_interval)
1263{
1264 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1265
1266 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1267 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1268 vdev_id, max_retries,
1269 retry_interval);
1270
Govind Singhb53420c2016-03-09 14:32:57 +05301271 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301272}
1273
1274/**
1275 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1276 * @wmi_hdl: wmi handle
1277 * @params: sta keep alive parameter
1278 *
1279 * This function sets keep alive related parameters in fw.
1280 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301281 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301282 */
Govind Singhb53420c2016-03-09 14:32:57 +05301283QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301284 struct sta_params *params)
1285{
1286 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1287
1288 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1289 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1290 params);
1291
Govind Singhb53420c2016-03-09 14:32:57 +05301292 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301293}
1294
1295/**
1296 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1297 * @wmi_hdl: wmi handle
1298 * @if_id: vdev id
1299 * @gtx_info: GTX config params
1300 *
1301 * This function set GTX related params in firmware.
1302 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301303 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301304 */
Govind Singhb53420c2016-03-09 14:32:57 +05301305QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301306 struct wmi_gtx_config *gtx_info)
1307{
1308 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1309
1310 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1311 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1312 if_id, gtx_info);
1313
Govind Singhb53420c2016-03-09 14:32:57 +05301314 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301315}
1316
1317/**
1318 * wmi_unified_process_update_edca_param() - update EDCA params
1319 * @wmi_hdl: wmi handle
1320 * @edca_params: edca parameters
1321 *
1322 * This function updates EDCA parameters to the target
1323 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301324 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301325 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301326#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05301327QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301328 uint8_t vdev_id,
1329 wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC])
1330{
1331 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1332
1333 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1334 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
1335 vdev_id, gwmm_param);
1336
Govind Singhb53420c2016-03-09 14:32:57 +05301337 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301338}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301339#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301340
1341/**
1342 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1343 * @wmi_hdl: wmi handle
1344 * @vdev_id: vdev id
1345 * @probe_rsp_info: probe response info
1346 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301347 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301348 */
Govind Singhb53420c2016-03-09 14:32:57 +05301349QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301350 uint8_t vdev_id,
1351 struct wmi_probe_resp_params *probe_rsp_info,
1352 uint8_t *frm)
1353{
1354 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1355
1356 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1357 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
1358 vdev_id, probe_rsp_info,
1359 frm);
1360
Govind Singhb53420c2016-03-09 14:32:57 +05301361 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301362}
1363
1364/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301365 * wmi_unified_setup_install_key_cmd - send key to install to fw
1366 * @wmi_hdl: wmi handle
1367 * @key_params: key parameters
1368 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301369 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301370 */
1371QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1372 struct set_key_params *key_params)
1373{
1374 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1375
1376 if (wmi_handle->ops->send_setup_install_key_cmd)
1377 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1378 key_params);
1379
1380 return QDF_STATUS_E_FAILURE;
1381}
1382
1383/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301384 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1385 * @wma_handle: wma handle
1386 * @vdev_id: vdev id
1387 * @p2p_ie: p2p IE
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_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301392 A_UINT32 vdev_id, uint8_t *p2p_ie)
1393{
1394 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1395
1396 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1397 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1398 vdev_id, p2p_ie);
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_set_gateway_params_cmd() - set gateway parameters
1405 * @wmi_hdl: wmi handle
1406 * @req: gateway parameter update request structure
1407 *
1408 * This function reads the incoming @req and fill in the destination
1409 * WMI structure and sends down the gateway configs down to the firmware
1410 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301411 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1412 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301413 */
Govind Singhb53420c2016-03-09 14:32:57 +05301414QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301415 struct gateway_update_req_param *req)
1416{
1417 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1418
1419 if (wmi_handle->ops->send_set_gateway_params_cmd)
1420 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1421 req);
1422
Govind Singhb53420c2016-03-09 14:32:57 +05301423 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301424}
1425
1426/**
1427 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1428 * @wmi_hdl: wmi handle
1429 * @req: rssi monitoring request structure
1430 *
1431 * This function reads the incoming @req and fill in the destination
1432 * WMI structure and send down the rssi monitoring configs down to the firmware
1433 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301434 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1435 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301436 */
Govind Singhb53420c2016-03-09 14:32:57 +05301437QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301438 struct rssi_monitor_param *req)
1439{
1440 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1441
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301442 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301443 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1444 req);
1445
Govind Singhb53420c2016-03-09 14:32:57 +05301446 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301447}
1448
1449/**
1450 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1451 * @wmi_hdl: wmi handle
1452 * @psetoui: OUI parameters
1453 *
1454 * set scan probe OUI parameters in firmware
1455 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301456 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301457 */
Govind Singhb53420c2016-03-09 14:32:57 +05301458QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301459 struct scan_mac_oui *psetoui)
1460{
1461 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1462
1463 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1464 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1465 psetoui);
1466
Govind Singhb53420c2016-03-09 14:32:57 +05301467 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301468}
1469
1470/**
1471 * wmi_unified_reset_passpoint_network_list_cmd() - reset passpoint network list
1472 * @wmi_hdl: wmi handle
1473 * @req: passpoint network request structure
1474 *
1475 * This function sends down WMI command with network id set to wildcard id.
1476 * firmware shall clear all the config entries
1477 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301478 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301479 */
Govind Singhb53420c2016-03-09 14:32:57 +05301480QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301481 struct wifi_passpoint_req_param *req)
1482{
1483 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1484
1485 if (wmi_handle->ops->send_reset_passpoint_network_list_cmd)
1486 return wmi_handle->ops->send_reset_passpoint_network_list_cmd(wmi_handle,
1487 req);
1488
Govind Singhb53420c2016-03-09 14:32:57 +05301489 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301490}
1491
1492/**
1493 * wmi_unified_set_passpoint_network_list_cmd() - set passpoint network list
1494 * @wmi_hdl: wmi handle
1495 * @req: passpoint network request structure
1496 *
1497 * This function reads the incoming @req and fill in the destination
1498 * WMI structure and send down the passpoint configs down to the firmware
1499 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301500 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301501 */
Govind Singhb53420c2016-03-09 14:32:57 +05301502QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301503 struct wifi_passpoint_req_param *req)
1504{
1505 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1506
1507 if (wmi_handle->ops->send_set_passpoint_network_list_cmd)
1508 return wmi_handle->ops->send_set_passpoint_network_list_cmd(wmi_handle,
1509 req);
1510
Govind Singhb53420c2016-03-09 14:32:57 +05301511 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301512}
1513
1514/** wmi_unified_set_epno_network_list_cmd() - set epno network list
1515 * @wmi_hdl: wmi handle
1516 * @req: epno config params request structure
1517 *
1518 * This function reads the incoming epno config request structure
1519 * and constructs the WMI message to the firmware.
1520 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301521 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1522 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301523 */
Govind Singhb53420c2016-03-09 14:32:57 +05301524QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301525 struct wifi_enhanched_pno_params *req)
1526{
1527 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1528
1529 if (wmi_handle->ops->send_set_epno_network_list_cmd)
1530 return wmi_handle->ops->send_set_epno_network_list_cmd(wmi_handle,
1531 req);
1532
Govind Singhb53420c2016-03-09 14:32:57 +05301533 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301534}
1535
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301536#ifndef WMI_NON_TLV_SUPPORT
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301537/**
1538 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1539 * @wmi_hdl: wmi handle
1540 * @scan_cmd_fp: scan related parameters
1541 * @roam_req: roam related parameters
1542 *
1543 * This function reads the incoming @roam_req and fill in the destination
1544 * WMI structure and send down the roam scan configs down to the firmware
1545 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301546 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301547 */
1548QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1549 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1550 struct roam_offload_scan_params *roam_req)
1551{
1552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1553
1554 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1555 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1556 wmi_handle, scan_cmd_fp, roam_req);
1557
1558 return QDF_STATUS_E_FAILURE;
1559}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301560#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301561
1562/**
1563 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1564 * parameters
1565 * @wmi_hdl: wmi handle
1566 * @roam_req: roam rssi related parameters
1567 *
1568 * This function reads the incoming @roam_req and fill in the destination
1569 * WMI structure and send down the roam scan rssi configs down to the firmware
1570 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301571 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301572 */
1573QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1574 struct roam_offload_scan_rssi_params
1575 *roam_req)
1576{
1577 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1578
1579 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1580 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1581 wmi_handle, roam_req);
1582
1583 return QDF_STATUS_E_FAILURE;
1584}
1585
1586/**
1587 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1588 * blacklist and preferred list
1589 * @wmi_hdl: wmi handle
1590 * @roam_req: roam scan lists related parameters
1591 *
1592 * This function reads the incoming @roam_req and fill in the destination
1593 * WMI structure and send down the different roam scan lists down to the fw
1594 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301595 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301596 */
1597QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1598 struct roam_scan_filter_params *roam_req)
1599{
1600 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1601
1602 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1603 return wmi_handle->ops->send_roam_scan_filter_cmd(
1604 wmi_handle, roam_req);
1605
1606 return QDF_STATUS_E_FAILURE;
1607}
1608
Govind Singh4eacd2b2016-03-07 14:24:22 +05301609/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1610 * @wmi_hdl: wmi handle
1611 * @ipa_offload: ipa offload control parameter
1612 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301613 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1614 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301615 */
Govind Singhb53420c2016-03-09 14:32:57 +05301616QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301617 struct ipa_offload_control_params *ipa_offload)
1618{
1619 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1620
1621 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1622 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1623 ipa_offload);
1624
Govind Singhb53420c2016-03-09 14:32:57 +05301625 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301626}
1627
1628/**
1629 * wmi_unified_extscan_get_capabilities_cmd() - extscan get capabilities
1630 * @wmi_hdl: wmi handle
1631 * @pgetcapab: get capabilities params
1632 *
1633 * This function send request to fw to get extscan capabilities.
1634 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301635 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301636 */
Govind Singhb53420c2016-03-09 14:32:57 +05301637QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301638 struct extscan_capabilities_params *pgetcapab)
1639{
1640 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1641
1642 if (wmi_handle->ops->send_extscan_get_capabilities_cmd)
1643 return wmi_handle->ops->send_extscan_get_capabilities_cmd(wmi_handle,
1644 pgetcapab);
1645
Govind Singhb53420c2016-03-09 14:32:57 +05301646 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301647}
1648
1649/**
1650 * wmi_unified_extscan_get_cached_results_cmd() - extscan get cached results
1651 * @wmi_hdl: wmi handle
1652 * @pcached_results: cached results parameters
1653 *
1654 * This function send request to fw to get cached results.
1655 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301656 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301657 */
Govind Singhb53420c2016-03-09 14:32:57 +05301658QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301659 struct extscan_cached_result_params *pcached_results)
1660{
1661 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1662
1663 if (wmi_handle->ops->send_extscan_get_cached_results_cmd)
1664 return wmi_handle->ops->send_extscan_get_cached_results_cmd(wmi_handle,
1665 pcached_results);
1666
Govind Singhb53420c2016-03-09 14:32:57 +05301667 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301668}
1669
1670/**
1671 * wmi_unified_extscan_stop_change_monitor_cmd() - send stop change monitor cmd
1672 * @wmi_hdl: wmi handle
1673 * @reset_req: Reset change request params
1674 *
1675 * This function sends stop change monitor request to fw.
1676 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301677 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301678 */
Govind Singhb53420c2016-03-09 14:32:57 +05301679QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301680 struct extscan_capabilities_reset_params *reset_req)
1681{
1682 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1683
1684 if (wmi_handle->ops->send_extscan_stop_change_monitor_cmd)
1685 return wmi_handle->ops->send_extscan_stop_change_monitor_cmd(wmi_handle,
1686 reset_req);
1687
Govind Singhb53420c2016-03-09 14:32:57 +05301688 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301689}
1690
1691
1692
1693/**
1694 * wmi_unified_extscan_start_change_monitor_cmd() - start change monitor cmd
1695 * @wmi_hdl: wmi handle
1696 * @psigchange: change monitor request params
1697 *
1698 * This function sends start change monitor request to fw.
1699 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301700 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301701 */
Govind Singhb53420c2016-03-09 14:32:57 +05301702QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301703 struct extscan_set_sig_changereq_params *
1704 psigchange)
1705{
1706 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1707
1708 if (wmi_handle->ops->send_extscan_start_change_monitor_cmd)
1709 return wmi_handle->ops->send_extscan_start_change_monitor_cmd(wmi_handle,
1710 psigchange);
1711
Govind Singhb53420c2016-03-09 14:32:57 +05301712 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301713}
1714
1715/**
1716 * wmi_unified_extscan_stop_hotlist_monitor_cmd() - stop hotlist monitor
1717 * @wmi_hdl: wmi handle
1718 * @photlist_reset: hotlist reset params
1719 *
1720 * This function configures hotlist monitor to stop in fw.
1721 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301722 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301723 */
Govind Singhb53420c2016-03-09 14:32:57 +05301724QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301725 struct extscan_bssid_hotlist_reset_params *photlist_reset)
1726{
1727 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1728
1729 if (wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd)
1730 return wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd(wmi_handle,
1731 photlist_reset);
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_stop_extscan_cmd() - stop extscan command to fw.
1738 * @wmi_hdl: wmi handle
1739 * @pstopcmd: stop scan command request params
1740 *
1741 * This function sends stop extscan request to fw.
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_stop_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301746 struct extscan_stop_req_params *pstopcmd)
1747{
1748 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1749
1750 if (wmi_handle->ops->send_stop_extscan_cmd)
1751 return wmi_handle->ops->send_stop_extscan_cmd(wmi_handle,
1752 pstopcmd);
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_start_extscan_cmd() - start extscan command to fw.
1759 * @wmi_hdl: wmi handle
1760 * @pstart: scan command request params
1761 *
1762 * This function sends start extscan request to fw.
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_start_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301767 struct wifi_scan_cmd_req_params *pstart)
1768{
1769 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1770
1771 if (wmi_handle->ops->send_start_extscan_cmd)
1772 return wmi_handle->ops->send_start_extscan_cmd(wmi_handle,
1773 pstart);
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_plm_stop_cmd() - plm stop request
1780 * @wmi_hdl: wmi handle
1781 * @plm: plm request parameters
1782 *
1783 * This function request FW to stop PLM.
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_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301788 const struct plm_req_params *plm)
1789{
1790 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1791
1792 if (wmi_handle->ops->send_plm_stop_cmd)
1793 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1794 plm);
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 * wmi_unified_plm_start_cmd() - plm start request
1801 * @wmi_hdl: wmi handle
1802 * @plm: plm request parameters
1803 *
1804 * This function request FW to start PLM.
1805 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301806 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301807 */
Govind Singhb53420c2016-03-09 14:32:57 +05301808QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301809 const struct plm_req_params *plm,
1810 uint32_t *gchannel_list)
1811{
1812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1813
1814 if (wmi_handle->ops->send_plm_start_cmd)
1815 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1816 plm, gchannel_list);
1817
Govind Singhb53420c2016-03-09 14:32:57 +05301818 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301819}
1820
1821/**
1822 * send_pno_stop_cmd() - PNO stop request
1823 * @wmi_hdl: wmi handle
1824 * @vdev_id: vdev id
1825 *
1826 * This function request FW to stop ongoing PNO operation.
1827 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301828 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301829 */
Govind Singhb53420c2016-03-09 14:32:57 +05301830QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301831{
1832 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1833
1834 if (wmi_handle->ops->send_pno_stop_cmd)
1835 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1836 vdev_id);
1837
Govind Singhb53420c2016-03-09 14:32:57 +05301838 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301839}
1840
1841/**
1842 * wmi_unified_pno_start_cmd() - PNO start request
1843 * @wmi_hdl: wmi handle
1844 * @pno: PNO request
1845 * @gchannel_freq_list: channel frequency list
1846 *
1847 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301848 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301849 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301850#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301851QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 struct pno_scan_req_params *pno,
1853 uint32_t *gchannel_freq_list)
1854{
1855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1856
1857 if (wmi_handle->ops->send_pno_start_cmd)
1858 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
1859 pno, gchannel_freq_list);
1860
Govind Singhb53420c2016-03-09 14:32:57 +05301861 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301862}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301863#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301864
1865/* wmi_unified_set_ric_req_cmd() - set ric request element
1866 * @wmi_hdl: wmi handle
1867 * @msg: message
1868 * @is_add_ts: is addts required
1869 *
1870 * This function sets ric request element for 11r roaming.
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_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301875 uint8_t is_add_ts)
1876{
1877 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1878
1879 if (wmi_handle->ops->send_set_ric_req_cmd)
1880 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
1881 is_add_ts);
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_process_ll_stats_clear_cmd() - clear link layer stats
1888 * @wmi_hdl: wmi handle
1889 * @clear_req: ll stats clear request command params
1890 * @addr: mac address
1891 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301892 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301893 */
Govind Singhb53420c2016-03-09 14:32:57 +05301894QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301895 const struct ll_stats_clear_params *clear_req,
1896 uint8_t addr[IEEE80211_ADDR_LEN])
1897{
1898 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1899
1900 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1901 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1902 clear_req, addr);
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_process_ll_stats_get_cmd() - link layer stats get request
1909 * @wmi_hdl:wmi handle
1910 * @get_req:ll stats get request command params
1911 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301912 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301913 */
Govind Singhb53420c2016-03-09 14:32:57 +05301914QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301915 const struct ll_stats_get_params *get_req,
1916 uint8_t addr[IEEE80211_ADDR_LEN])
1917{
1918 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1919
1920 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1921 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1922 get_req, addr);
1923
Govind Singhb53420c2016-03-09 14:32:57 +05301924 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301925}
1926
1927/**
1928 * wmi_unified_get_stats_cmd() - get stats request
1929 * @wmi_hdl: wma handle
1930 * @get_stats_param: stats params
1931 * @addr: mac address
1932 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301933 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301934 */
Govind Singhb53420c2016-03-09 14:32:57 +05301935QDF_STATUS wmi_unified_get_stats_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301936 struct pe_stats_req *get_stats_param,
1937 uint8_t addr[IEEE80211_ADDR_LEN])
1938{
1939 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1940
1941 if (wmi_handle->ops->send_get_stats_cmd)
1942 return wmi_handle->ops->send_get_stats_cmd(wmi_handle,
1943 get_stats_param, addr);
1944
Govind Singhb53420c2016-03-09 14:32:57 +05301945 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301946}
1947
1948/**
1949 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1950 * @wmi_handle: wmi handle
1951 * @set_req: ll stats set request command params
1952 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301953 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301954 */
Govind Singhb53420c2016-03-09 14:32:57 +05301955QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301956 const struct ll_stats_set_params *set_req)
1957{
1958 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1959
1960 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1961 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1962 set_req);
1963
Govind Singhb53420c2016-03-09 14:32:57 +05301964 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301965}
Govind Singh20c5dac2016-03-07 15:33:31 +05301966
1967/**
1968 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1969 * @wmi_handle: wmi handle
1970 * @rssi_req: get RSSI request
1971 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301972 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301973 */
Govind Singhb53420c2016-03-09 14:32:57 +05301974QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301975{
1976 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1977
1978 if (wmi_handle->ops->send_snr_request_cmd)
1979 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1980
Govind Singhb53420c2016-03-09 14:32:57 +05301981 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301982}
1983
1984/**
1985 * wmi_unified_snr_cmd() - get RSSI from fw
1986 * @wmi_handle: wmi handle
1987 * @vdev_id: vdev id
1988 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301989 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301990 */
Govind Singhb53420c2016-03-09 14:32:57 +05301991QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301992{
1993 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1994
1995 if (wmi_handle->ops->send_snr_cmd)
1996 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1997 vdev_id);
1998
Govind Singhb53420c2016-03-09 14:32:57 +05301999 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302000}
2001
2002/**
2003 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
2004 * @wmi_handle: wmi handle
2005 * @link_status: get link params
2006 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302007 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302008 */
Govind Singhb53420c2016-03-09 14:32:57 +05302009QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302010 struct link_status_params *link_status)
2011{
2012 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2013
2014 if (wmi_handle->ops->send_link_status_req_cmd)
2015 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
2016 link_status);
2017
Govind Singhb53420c2016-03-09 14:32:57 +05302018 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302019}
2020
2021#ifdef FEATURE_WLAN_LPHB
2022
2023/**
2024 * wmi_unified_lphb_config_hbenable_cmd() - enable command of LPHB configuration requests
2025 * @wmi_handle: wmi handle
2026 * @lphb_conf_req: configuration info
2027 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302028 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302029 */
Govind Singhb53420c2016-03-09 14:32:57 +05302030QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302031 wmi_hb_set_enable_cmd_fixed_param *params)
2032{
2033 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2034
2035 if (wmi_handle->ops->send_lphb_config_hbenable_cmd)
2036 return wmi_handle->ops->send_lphb_config_hbenable_cmd(wmi_handle,
2037 params);
2038
Govind Singhb53420c2016-03-09 14:32:57 +05302039 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302040}
2041
2042/**
2043 * wmi_unified_lphb_config_tcp_params_cmd() - set tcp params of LPHB configuration requests
2044 * @wmi_handle: wmi handle
2045 * @lphb_conf_req: lphb config request
2046 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302047 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302048 */
Govind Singhb53420c2016-03-09 14:32:57 +05302049QDF_STATUS wmi_unified_lphb_config_tcp_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302050 wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req)
2051{
2052 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2053
2054 if (wmi_handle->ops->send_lphb_config_tcp_params_cmd)
2055 return wmi_handle->ops->send_lphb_config_tcp_params_cmd(wmi_handle,
2056 lphb_conf_req);
2057
Govind Singhb53420c2016-03-09 14:32:57 +05302058 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302059}
2060
2061/**
2062 * wmi_unified_lphb_config_tcp_pkt_filter_cmd() - configure tcp packet filter command of LPHB
2063 * @wmi_handle: wmi handle
2064 * @lphb_conf_req: lphb config request
2065 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302066 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302067 */
Govind Singhb53420c2016-03-09 14:32:57 +05302068QDF_STATUS wmi_unified_lphb_config_tcp_pkt_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302069 wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp)
2070{
2071 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2072
2073 if (wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd)
2074 return wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd(wmi_handle,
2075 g_hb_tcp_filter_fp);
2076
Govind Singhb53420c2016-03-09 14:32:57 +05302077 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302078}
2079
2080/**
2081 * wmi_unified_lphb_config_udp_params_cmd() - configure udp param command of LPHB
2082 * @wmi_handle: wmi handle
2083 * @lphb_conf_req: lphb config request
2084 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302085 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302086 */
Govind Singhb53420c2016-03-09 14:32:57 +05302087QDF_STATUS wmi_unified_lphb_config_udp_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302088 wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req)
2089{
2090 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2091
2092 if (wmi_handle->ops->send_lphb_config_udp_params_cmd)
2093 return wmi_handle->ops->send_lphb_config_udp_params_cmd(wmi_handle,
2094 lphb_conf_req);
2095
Govind Singhb53420c2016-03-09 14:32:57 +05302096 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302097}
2098
2099/**
2100 * wmi_unified_lphb_config_udp_pkt_filter_cmd() - configure udp pkt filter command of LPHB
2101 * @wmi_handle: wmi handle
2102 * @lphb_conf_req: lphb config request
2103 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302104 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302105 */
Govind Singhb53420c2016-03-09 14:32:57 +05302106QDF_STATUS wmi_unified_lphb_config_udp_pkt_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302107 wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req)
2108{
2109 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2110
2111 if (wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd)
2112 return wmi_handle->ops->send_lphb_config_udp_pkt_filter_cmd(wmi_handle,
2113 lphb_conf_req);
2114
Govind Singhb53420c2016-03-09 14:32:57 +05302115 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302116}
2117#endif /* FEATURE_WLAN_LPHB */
2118
2119/**
2120 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
2121 * @wmi_handle: wmi handle
2122 * @ta_dhcp_ind: DHCP indication parameter
2123 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302125 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302126#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05302127QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302128 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2129{
2130 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2131
2132 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2133 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2134 ta_dhcp_ind);
2135
Govind Singhb53420c2016-03-09 14:32:57 +05302136 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302137}
2138
2139/**
2140 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2141 * @wmi_handle: wmi handle
2142 * @pLinkSpeed: link speed info
2143 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302144 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302145 */
Govind Singhb53420c2016-03-09 14:32:57 +05302146QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302147 wmi_mac_addr peer_macaddr)
2148{
2149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2150
2151 if (wmi_handle->ops->send_get_link_speed_cmd)
2152 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2153 peer_macaddr);
2154
Govind Singhb53420c2016-03-09 14:32:57 +05302155 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302156}
2157
2158/**
2159 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2160 * @wmi_handle: wmi handler
2161 * @egap_params: pointer to egap_params
2162 *
2163 * Return: 0 for success, otherwise appropriate error code
2164 */
Govind Singhb53420c2016-03-09 14:32:57 +05302165QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302166 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params)
2167{
2168 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2169
2170 if (wmi_handle->ops->send_egap_conf_params_cmd)
2171 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2172 egap_params);
2173
Govind Singhb53420c2016-03-09 14:32:57 +05302174 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302175}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302176#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302177
2178/**
2179 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2180 * @wmi_handl: wmi handle
2181 * @cmd: Profiling command index
2182 * @value1: parameter1 value
2183 * @value2: parameter2 value
2184 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302185 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302186 */
Govind Singhb53420c2016-03-09 14:32:57 +05302187QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302188 uint32_t cmd, uint32_t value1, uint32_t value2)
2189{
2190 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2191
2192 if (wmi_handle->ops->send_fw_profiling_cmd)
2193 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2194 cmd, value1, value2);
2195
Govind Singhb53420c2016-03-09 14:32:57 +05302196 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302197}
2198
2199#ifdef FEATURE_WLAN_RA_FILTERING
2200/**
2201 * wmi_unified_wow_sta_ra_filter_cmd() - set RA filter pattern in fw
2202 * @wmi_handle: wmi handle
2203 * @vdev_id: vdev id
2204 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302205 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302206 */
Govind Singhb53420c2016-03-09 14:32:57 +05302207QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302208 uint8_t vdev_id, uint8_t default_pattern,
2209 uint16_t rate_limit_interval)
2210{
2211
2212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2213
2214 if (wmi_handle->ops->send_wow_sta_ra_filter_cmd)
2215 return wmi_handle->ops->send_wow_sta_ra_filter_cmd(wmi_handle,
Krunal Soni58d87602016-05-10 17:22:11 -07002216 vdev_id, default_pattern, rate_limit_interval);
Govind Singh20c5dac2016-03-07 15:33:31 +05302217
Govind Singhb53420c2016-03-09 14:32:57 +05302218 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302219
2220}
2221#endif /* FEATURE_WLAN_RA_FILTERING */
2222
2223/**
2224 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2225 * @wmi_handle: wmi handle
2226 * @vdev_id: vdev id
2227 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302228 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302229 */
Govind Singhb53420c2016-03-09 14:32:57 +05302230QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302231{
2232 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2233
2234 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2235 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2236 vdev_id);
2237
Govind Singhb53420c2016-03-09 14:32:57 +05302238 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302239}
2240
2241/**
2242 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2243 * @wmi_hdl: wmi handle
2244 * @vdev_id: vdev id
2245 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302246 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302247 */
Govind Singhb53420c2016-03-09 14:32:57 +05302248QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302249{
2250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2251
2252 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2253 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2254 vdev_id);
2255
Govind Singhb53420c2016-03-09 14:32:57 +05302256 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302257}
2258/**
2259 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2260 * @wmi_handle: wmi handle
2261 * @startOemDataReq: start request params
2262 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302263 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302264 */
Govind Singhb53420c2016-03-09 14:32:57 +05302265QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002266 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302267 uint8_t *data)
2268{
2269 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2270
2271 if (wmi_handle->ops->send_start_oem_data_cmd)
2272 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2273 data_len, data);
2274
Govind Singhb53420c2016-03-09 14:32:57 +05302275 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302276}
2277
2278/**
2279 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2280 * @wmi_handle: wmi handle
2281 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2282 *
2283 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2284 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2285 * to firmware based on phyerr filtering
2286 * offload status.
2287 *
2288 * Return: 1 success, 0 failure
2289 */
Govind Singhb53420c2016-03-09 14:32:57 +05302290QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302291wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2292 bool dfs_phyerr_filter_offload)
2293{
2294 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2295
2296 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2297 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2298 dfs_phyerr_filter_offload);
2299
Govind Singhb53420c2016-03-09 14:32:57 +05302300 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302301}
2302
2303#if !defined(REMOVE_PKT_LOG)
2304/**
2305 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2306 * @wmi_handle: wmi handle
2307 * @pktlog_event: pktlog event
2308 * @cmd_id: pktlog cmd id
2309 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302311 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302312#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05302313QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302314 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302315 uint32_t cmd_id,
2316 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302317{
2318 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2319
2320 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2321 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302322 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302323
Govind Singhb53420c2016-03-09 14:32:57 +05302324 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302325}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302326#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302327#endif /* REMOVE_PKT_LOG */
2328
2329/**
2330 * wmi_unified_add_wow_wakeup_event_cmd() - Configures wow wakeup events.
2331 * @wmi_handle: wmi handle
2332 * @vdev_id: vdev id
2333 * @bitmap: Event bitmap
2334 * @enable: enable/disable
2335 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302336 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302337 */
Govind Singhb53420c2016-03-09 14:32:57 +05302338QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302339 uint32_t vdev_id,
2340 uint32_t bitmap,
2341 bool enable)
2342{
2343 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2344
2345 if (wmi_handle->ops->send_add_wow_wakeup_event_cmd)
Krunal Soni58d87602016-05-10 17:22:11 -07002346 return wmi_handle->ops->send_add_wow_wakeup_event_cmd(
2347 wmi_handle, vdev_id, bitmap, enable);
Govind Singh20c5dac2016-03-07 15:33:31 +05302348
Govind Singhb53420c2016-03-09 14:32:57 +05302349 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302350}
2351
2352/**
2353 * wmi_unified_wow_patterns_to_fw_cmd() - Sends WOW patterns to FW.
2354 * @wmi_handle: wmi handle
2355 * @vdev_id: vdev id
2356 * @ptrn_id: pattern id
2357 * @ptrn: pattern
2358 * @ptrn_len: pattern length
2359 * @ptrn_offset: pattern offset
2360 * @mask: mask
2361 * @mask_len: mask length
2362 * @user: true for user configured pattern and false for default pattern
2363 * @default_patterns: default patterns
2364 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302365 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302366 */
Govind Singhb53420c2016-03-09 14:32:57 +05302367QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302368 uint8_t vdev_id, uint8_t ptrn_id,
2369 const uint8_t *ptrn, uint8_t ptrn_len,
2370 uint8_t ptrn_offset, const uint8_t *mask,
2371 uint8_t mask_len, bool user,
2372 uint8_t default_patterns)
2373{
2374 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2375
2376 if (wmi_handle->ops->send_wow_patterns_to_fw_cmd)
2377 return wmi_handle->ops->send_wow_patterns_to_fw_cmd(wmi_handle,
2378 vdev_id, ptrn_id, ptrn,
2379 ptrn_len, ptrn_offset, mask,
2380 mask_len, user, default_patterns);
2381
Govind Singhb53420c2016-03-09 14:32:57 +05302382 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302383}
2384
2385/**
2386 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2387 * @wmi_handle: wmi handle
2388 * @ptrn_id: pattern id
2389 * @vdev_id: vdev id
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_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302394 uint8_t vdev_id)
2395{
2396 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2397
2398 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2399 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2400 ptrn_id, vdev_id);
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_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2407 * @wmi_handle: wmi handle
2408 *
2409 * Sends host wakeup indication to FW. On receiving this indication,
2410 * FW will come out of WOW.
2411 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302412 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302413 */
Govind Singhb53420c2016-03-09 14:32:57 +05302414QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302415{
2416 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2417
2418 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2419 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2420
Govind Singhb53420c2016-03-09 14:32:57 +05302421 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302422}
2423
2424/**
2425 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2426 * @wmi_handle: wmi handle
2427 * @msg: delts params
2428 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302429 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302430 */
Govind Singhb53420c2016-03-09 14:32:57 +05302431QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302432 uint8_t ac)
2433{
2434 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2435
2436 if (wmi_handle->ops->send_del_ts_cmd)
2437 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2438 vdev_id, ac);
2439
Govind Singhb53420c2016-03-09 14:32:57 +05302440 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302441}
2442
2443/**
2444 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2445 * @wmi_handle: handle to wmi
2446 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2447 *
Govind Singhb53420c2016-03-09 14:32:57 +05302448 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302449 * ADD_TS requestes to firmware in loop for all the ACs with
2450 * active flow.
2451 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302452 * Return: 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_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302455 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2456{
2457 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2458
2459 if (wmi_handle->ops->send_aggr_qos_cmd)
2460 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2461 aggr_qos_rsp_msg);
2462
Govind Singhb53420c2016-03-09 14:32:57 +05302463 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302464}
2465
2466/**
2467 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2468 * @wmi_handle: wmi handle
2469 * @msg: ADDTS params
2470 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302471 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302472 */
Govind Singhb53420c2016-03-09 14:32:57 +05302473QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302474 struct add_ts_param *msg)
2475{
2476 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2477
2478 if (wmi_handle->ops->send_add_ts_cmd)
2479 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2480 msg);
2481
Govind Singhb53420c2016-03-09 14:32:57 +05302482 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302483}
2484
2485/**
2486 * wmi_unified_enable_disable_packet_filter_cmd() - enable/disable packet filter in target
2487 * @wmi_handle: wmi handle
2488 * @vdev_id: vdev id
2489 * @enable: Flag to enable/disable packet filter
2490 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302492 */
Govind Singhb53420c2016-03-09 14:32:57 +05302493QDF_STATUS wmi_unified_enable_disable_packet_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302494 uint8_t vdev_id, bool enable)
2495{
2496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2497
2498 if (wmi_handle->ops->send_enable_disable_packet_filter_cmd)
Krunal Soni58d87602016-05-10 17:22:11 -07002499 return wmi_handle->ops->send_enable_disable_packet_filter_cmd(
2500 wmi_handle, vdev_id, enable);
Govind Singh20c5dac2016-03-07 15:33:31 +05302501
Govind Singhb53420c2016-03-09 14:32:57 +05302502 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302503}
2504
2505/**
2506 * wmi_unified_config_packet_filter_cmd() - configure packet filter in target
2507 * @wmi_handle: wmi handle
2508 * @vdev_id: vdev id
2509 * @rcv_filter_param: Packet filter parameters
2510 * @filter_id: Filter id
2511 * @enable: Flag to add/delete packet filter configuration
2512 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302513 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302514 */
Govind Singhb53420c2016-03-09 14:32:57 +05302515QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302516 uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
2517 uint8_t filter_id, bool enable)
2518{
2519 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2520
2521 if (wmi_handle->ops->send_config_packet_filter_cmd)
2522 return wmi_handle->ops->send_config_packet_filter_cmd(wmi_handle,
2523 vdev_id, rcv_filter_param,
2524 filter_id, enable);
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_add_clear_mcbc_filter_cmd() - set mcast filter command to fw
2531 * @wmi_handle: wmi handle
2532 * @vdev_id: vdev id
2533 * @multicastAddr: mcast address
2534 * @clearList: clear list flag
2535 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302536 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302537 */
Govind Singhb53420c2016-03-09 14:32:57 +05302538QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302539 uint8_t vdev_id,
Govind Singhb53420c2016-03-09 14:32:57 +05302540 struct qdf_mac_addr multicast_addr,
Govind Singh20c5dac2016-03-07 15:33:31 +05302541 bool clearList)
2542{
2543 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2544
2545 if (wmi_handle->ops->send_add_clear_mcbc_filter_cmd)
2546 return wmi_handle->ops->send_add_clear_mcbc_filter_cmd(wmi_handle,
2547 vdev_id, multicast_addr, clearList);
2548
Govind Singhb53420c2016-03-09 14:32:57 +05302549 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302550}
2551
2552/**
2553 * wmi_unified_send_gtk_offload_cmd() - send GTK offload command to fw
2554 * @wmi_handle: wmi handle
2555 * @vdev_id: vdev id
2556 * @params: GTK offload parameters
2557 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302558 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302559 */
Govind Singhb53420c2016-03-09 14:32:57 +05302560QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302561 struct gtk_offload_params *params,
2562 bool enable_offload,
2563 uint32_t gtk_offload_opcode)
2564{
2565 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2566
2567 if (wmi_handle->ops->send_gtk_offload_cmd)
2568 return wmi_handle->ops->send_gtk_offload_cmd(wmi_handle,
2569 vdev_id, params,
2570 enable_offload, gtk_offload_opcode);
2571
Govind Singhb53420c2016-03-09 14:32:57 +05302572 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302573}
2574
2575/**
2576 * wmi_unified_process_gtk_offload_getinfo_cmd() - send GTK offload cmd to fw
2577 * @wmi_handle: wmi handle
2578 * @params: GTK offload params
2579 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302580 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302581 */
Govind Singhb53420c2016-03-09 14:32:57 +05302582QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302583 uint8_t vdev_id,
2584 uint64_t offload_req_opcode)
2585{
2586 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2587
2588 if (wmi_handle->ops->send_process_gtk_offload_getinfo_cmd)
2589 return wmi_handle->ops->send_process_gtk_offload_getinfo_cmd(wmi_handle,
2590 vdev_id,
2591 offload_req_opcode);
2592
Govind Singhb53420c2016-03-09 14:32:57 +05302593 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302594}
2595
2596/**
2597 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2598 * @wmi_handle: wmi handle
2599 * @pAddPeriodicTxPtrnParams: tx ptrn params
2600 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302601 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302602 */
Govind Singhb53420c2016-03-09 14:32:57 +05302603QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302604 struct periodic_tx_pattern *
2605 pAddPeriodicTxPtrnParams,
2606 uint8_t vdev_id)
2607{
2608 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2609
2610 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2611 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2612 pAddPeriodicTxPtrnParams,
2613 vdev_id);
2614
Govind Singhb53420c2016-03-09 14:32:57 +05302615 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302616}
2617
2618/**
2619 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2620 * @wmi_handle: wmi handle
2621 * @vdev_id: vdev id
2622 * @pattern_id: pattern id
2623 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302624 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302625 */
Govind Singhb53420c2016-03-09 14:32:57 +05302626QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302627 uint8_t vdev_id,
2628 uint8_t pattern_id)
2629{
2630 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2631
2632 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2633 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2634 vdev_id,
2635 pattern_id);
2636
Govind Singhb53420c2016-03-09 14:32:57 +05302637 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302638}
2639
2640/**
2641 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2642 * @wmi_handle: wmi handle
2643 * @preq: stats ext params
2644 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302645 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302646 */
Govind Singhb53420c2016-03-09 14:32:57 +05302647QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302648 struct stats_ext_params *preq)
2649{
2650 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2651
2652 if (wmi_handle->ops->send_stats_ext_req_cmd)
2653 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2654 preq);
2655
Govind Singhb53420c2016-03-09 14:32:57 +05302656 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302657}
2658
2659/**
2660 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2661 * @wmi_handle: wmi handle
2662 * @params: ext wow params
2663 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302664 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302665 */
Govind Singhb53420c2016-03-09 14:32:57 +05302666QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302667 struct ext_wow_params *params)
2668{
2669 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2670
2671 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2672 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2673 params);
2674
Govind Singhb53420c2016-03-09 14:32:57 +05302675 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302676}
2677
2678/**
2679 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2680 * @wmi_handle: wmi handle
2681 * @appType2Params: app type2 params
2682 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302683 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302684 */
Govind Singhb53420c2016-03-09 14:32:57 +05302685QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302686 struct app_type2_params *appType2Params)
2687{
2688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2689
2690 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2691 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2692 appType2Params);
2693
Govind Singhb53420c2016-03-09 14:32:57 +05302694 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302695
2696}
2697
2698/**
2699 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2700 * @wmi_handle: wmi handle
2701 * @timer_val: auto shutdown timer value
2702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302703 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302704 */
Govind Singhb53420c2016-03-09 14:32:57 +05302705QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302706 uint32_t timer_val)
2707{
2708 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2709
2710 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2711 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2712 timer_val);
2713
Govind Singhb53420c2016-03-09 14:32:57 +05302714 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302715}
2716
2717/**
2718 * wmi_unified_nan_req_cmd() - to send nan request to target
2719 * @wmi_handle: wmi handle
2720 * @nan_req: request data which will be non-null
2721 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302722 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302723 */
Govind Singhb53420c2016-03-09 14:32:57 +05302724QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302725 struct nan_req_params *nan_req)
2726{
2727 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2728
2729 if (wmi_handle->ops->send_nan_req_cmd)
2730 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2731 nan_req);
2732
Govind Singhb53420c2016-03-09 14:32:57 +05302733 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302734}
2735
2736/**
2737 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2738 * @wmi_handle: wmi handle
2739 * @pDhcpSrvOffloadInfo: DHCP server offload info
2740 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302741 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302742 */
Govind Singhb53420c2016-03-09 14:32:57 +05302743QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302744 struct dhcp_offload_info_params *pDhcpSrvOffloadInfo)
2745{
2746 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2747
2748 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2749 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
2750 pDhcpSrvOffloadInfo);
2751
Govind Singhb53420c2016-03-09 14:32:57 +05302752 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302753}
2754
2755/**
2756 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2757 * @wmi_handle: wmi handle
2758 * @ch_avoid_update_req: channel avoid update params
2759 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302760 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302761 */
Govind Singhb53420c2016-03-09 14:32:57 +05302762QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302763{
2764 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2765
2766 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2767 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2768
Govind Singhb53420c2016-03-09 14:32:57 +05302769 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302770}
2771
2772/**
2773 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2774 * @wmi_handle: wmi handle
2775 * @reg_dmn: reg domain
2776 * @regdmn2G: 2G reg domain
2777 * @regdmn5G: 5G reg domain
2778 * @ctl2G: 2G test limit
2779 * @ctl5G: 5G test limit
2780 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302781 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302782 */
Govind Singhb53420c2016-03-09 14:32:57 +05302783QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302784 uint32_t reg_dmn, uint16_t regdmn2G,
2785 uint16_t regdmn5G, int8_t ctl2G,
2786 int8_t ctl5G)
2787{
2788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2789
2790 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2791 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2792 reg_dmn, regdmn2G,
2793 regdmn5G, ctl2G,
2794 ctl5G);
2795
Govind Singhb53420c2016-03-09 14:32:57 +05302796 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302797}
2798
2799
2800/**
2801 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2802 * @wmi_handle: wmi handle
2803 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2804 *
2805 * This function sets tdls off channel mode
2806 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2808 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302809 */
Govind Singhb53420c2016-03-09 14:32:57 +05302810QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302811 struct tdls_channel_switch_params *chan_switch_params)
2812{
2813 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2814
2815 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2816 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2817 chan_switch_params);
2818
Govind Singhb53420c2016-03-09 14:32:57 +05302819 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302820}
2821
2822/**
2823 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2824 * @wmi_handle: wmi handle
2825 * @pwmaTdlsparams: TDLS params
2826 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302827 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302828 */
Govind Singhb53420c2016-03-09 14:32:57 +05302829QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302830 void *tdls_param, uint8_t tdls_state)
2831{
2832 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2833
2834 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2835 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2836 tdls_param, tdls_state);
2837
Govind Singhb53420c2016-03-09 14:32:57 +05302838 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302839}
2840
2841/**
2842 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2843 * @wmi_handle: wmi handle
2844 * @peerStateParams: TDLS peer state params
2845 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302846 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302847 */
Govind Singhb53420c2016-03-09 14:32:57 +05302848QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302849 struct tdls_peer_state_params *peerStateParams,
2850 uint32_t *ch_mhz)
2851{
2852 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2853
2854 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2855 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2856 peerStateParams, ch_mhz);
2857
Govind Singhb53420c2016-03-09 14:32:57 +05302858 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302859}
2860
2861/**
2862 * wmi_unified_process_fw_mem_dump_cmd() - Function to request fw memory dump from
2863 * firmware
2864 * @wmi_handle: Pointer to wmi handle
2865 * @mem_dump_req: Pointer for mem_dump_req
2866 *
2867 * This function sends memory dump request to firmware
2868 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302869 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302870 *
2871 */
Govind Singhb53420c2016-03-09 14:32:57 +05302872QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302873 struct fw_dump_req_param *mem_dump_req)
2874{
2875 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2876
2877 if (wmi_handle->ops->send_process_fw_mem_dump_cmd)
2878 return wmi_handle->ops->send_process_fw_mem_dump_cmd(wmi_handle,
2879 mem_dump_req);
2880
Govind Singhb53420c2016-03-09 14:32:57 +05302881 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302882}
2883
2884/**
2885 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2886 * @wmi_handle: Pointer to WMi handle
2887 * @ie_data: Pointer for ie data
2888 *
2889 * This function sends IE information to firmware
2890 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302891 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302892 *
2893 */
Govind Singhb53420c2016-03-09 14:32:57 +05302894QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302895 struct vdev_ie_info_param *ie_info)
2896{
2897 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2898
2899 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2900 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2901 ie_info);
2902
Govind Singhb53420c2016-03-09 14:32:57 +05302903 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302904}
Himanshu Agarwal7c83dcd2016-07-19 15:41:51 +05302905#ifdef CONFIG_MCL
Govind Singh9ddd5162016-03-07 16:30:32 +05302906/**
2907 * wmi_unified_send_init_cmd() - wmi init command
2908 * @wmi_handle: pointer to wmi handle
2909 * @res_cfg: resource config
2910 * @num_mem_chunks: no of mem chunck
2911 * @mem_chunk: pointer to mem chunck structure
2912 *
2913 * This function sends IE information to firmware
2914 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302915 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302916 *
2917 */
Govind Singhb53420c2016-03-09 14:32:57 +05302918QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302919 wmi_resource_config *res_cfg,
2920 uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
2921 bool action)
2922{
2923 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2924
2925 if (wmi_handle->ops->send_init_cmd)
2926 return wmi_handle->ops->send_init_cmd(wmi_handle,
2927 res_cfg, num_mem_chunks, mem_chunk, action);
2928
Govind Singhb53420c2016-03-09 14:32:57 +05302929 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302930}
Himanshu Agarwal7c83dcd2016-07-19 15:41:51 +05302931#endif
Govind Singh9ddd5162016-03-07 16:30:32 +05302932/**
2933 * wmi_unified_send_saved_init_cmd() - wmi init command
2934 * @wmi_handle: pointer to wmi handle
2935 *
2936 * This function sends IE information to firmware
2937 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302938 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302939 *
2940 */
Govind Singhb53420c2016-03-09 14:32:57 +05302941QDF_STATUS wmi_unified_send_saved_init_cmd(void *wmi_hdl)
Govind Singh9ddd5162016-03-07 16:30:32 +05302942{
2943 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2944
2945 if (wmi_handle->ops->send_saved_init_cmd)
2946 return wmi_handle->ops->send_saved_init_cmd(wmi_handle);
2947
Govind Singhb53420c2016-03-09 14:32:57 +05302948 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302949}
2950
2951/**
2952 * wmi_unified_save_fw_version_cmd() - save fw version
2953 * @wmi_handle: pointer to wmi handle
2954 * @res_cfg: resource config
2955 * @num_mem_chunks: no of mem chunck
2956 * @mem_chunk: pointer to mem chunck structure
2957 *
2958 * This function sends IE information to firmware
2959 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302960 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302961 *
2962 */
Govind Singhb53420c2016-03-09 14:32:57 +05302963QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302964 void *evt_buf)
2965{
2966 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2967
2968 if (wmi_handle->ops->save_fw_version_cmd)
2969 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2970 evt_buf);
2971
Govind Singhb53420c2016-03-09 14:32:57 +05302972 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302973}
Govind Singha4836fd2016-03-07 16:45:38 +05302974
2975/**
2976 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2977 * @wmi_hdl: wmi handle
2978 * @custom_addr: base mac address
2979 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302980 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302981 */
Govind Singhb53420c2016-03-09 14:32:57 +05302982QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302983 uint8_t *custom_addr)
2984{
2985 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2986
2987 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2988 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2989 custom_addr);
2990
Govind Singhb53420c2016-03-09 14:32:57 +05302991 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302992}
2993
2994/**
2995 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2996 * @wmi_hdl: wmi handle
2997 * @event: Event received from FW
2998 * @len: Length of the event
2999 *
3000 * Enables the low frequency events and disables the high frequency
3001 * events. Bit 17 indicates if the event if low/high frequency.
3002 * 1 - high frequency, 0 - low frequency
3003 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303004 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05303005 */
Govind Singhb53420c2016-03-09 14:32:57 +05303006QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303007 uint8_t *event,
3008 uint32_t len)
3009{
3010 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3011
3012 if (wmi_handle->ops->send_log_supported_evt_cmd)
3013 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
3014 event, len);
3015
Govind Singhb53420c2016-03-09 14:32:57 +05303016 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303017}
3018
3019/**
3020 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
3021 * @wmi_hdl: wmi handle
3022 * @start_log: Start logging related parameters
3023 *
3024 * Send the command to the FW based on which specific logging of diag
3025 * event/log id can be started/stopped
3026 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303027 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303028 */
Govind Singhb53420c2016-03-09 14:32:57 +05303029QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303030 struct wmi_wifi_start_log *start_log)
3031{
3032 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3033
3034 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
3035 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
3036 start_log);
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_flush_logs_to_fw_cmd() - Send log flush command to FW
3043 * @wmi_hdl: WMI handle
3044 *
3045 * This function is used to send the flush command to the FW,
3046 * that will flush the fw logs that are residue in the 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_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05303051{
3052 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3053
3054 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
3055 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
3056
Govind Singhb53420c2016-03-09 14:32:57 +05303057 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303058}
3059
3060/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303061 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05303062 * @wmi_hdl: wmi handle
3063 * @msg: PCL structure containing the PCL and the number of channels
3064 *
3065 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
3066 * firmware. The DBS Manager is the consumer of this information in the WLAN
3067 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
3068 * to migrate to a new channel without host driver involvement. An example of
3069 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
3070 * manage the channel selection without firmware involvement.
3071 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303072 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303073 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303074QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
3075 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05303076{
3077 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3078
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303079 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
3080 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05303081
Govind Singhb53420c2016-03-09 14:32:57 +05303082 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303083}
3084
3085/**
3086 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
3087 * @wmi_hdl: wmi handle
3088 * @msg: Structure containing the following parameters
3089 *
3090 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
3091 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
3092 *
3093 * Provides notification to the WLAN firmware that host driver is requesting a
3094 * HardWare (HW) Mode change. This command is needed to support iHelium in the
3095 * configurations that include the Dual Band Simultaneous (DBS) feature.
3096 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303097 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303098 */
Govind Singhb53420c2016-03-09 14:32:57 +05303099QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303100 uint32_t hw_mode_index)
3101{
3102 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3103
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05303104 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
3105 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05303106 hw_mode_index);
3107
Govind Singhb53420c2016-03-09 14:32:57 +05303108 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303109}
3110
3111/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303112 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05303113 * @wmi_hdl: wmi handle
3114 * @msg: Dual MAC config parameters
3115 *
3116 * Configures WLAN firmware with the dual MAC features
3117 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303118 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05303119 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303120QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303121 struct wmi_dual_mac_config *msg)
3122{
3123 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3124
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303125 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
3126 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05303127 msg);
3128
Govind Singhb53420c2016-03-09 14:32:57 +05303129 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303130}
3131
3132/**
3133 * wmi_unified_enable_arp_ns_offload_cmd() - enable ARP NS offload
3134 * @wmi_hdl: wmi handle
3135 * @param: offload request
3136 * @arp_only: flag
3137 *
3138 * To configure ARP NS off load data to firmware
3139 * when target goes to wow mode.
3140 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303141 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303142 */
Govind Singhb53420c2016-03-09 14:32:57 +05303143QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303144 struct host_offload_req_param *param, bool arp_only,
3145 uint8_t vdev_id)
3146{
3147 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3148
3149 if (wmi_handle->ops->send_enable_arp_ns_offload_cmd)
3150 return wmi_handle->ops->send_enable_arp_ns_offload_cmd(wmi_handle,
3151 param, arp_only,
3152 vdev_id);
3153
Govind Singhb53420c2016-03-09 14:32:57 +05303154 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303155}
3156
3157/**
3158 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
3159 * @wmi_hdl: wmi handle
3160 * @flashing: flashing request
3161 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303162 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303163 */
Govind Singhb53420c2016-03-09 14:32:57 +05303164QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303165 struct flashing_req_params *flashing)
3166{
3167 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3168
3169 if (wmi_handle->ops->send_set_led_flashing_cmd)
3170 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
3171 flashing);
3172
Govind Singhb53420c2016-03-09 14:32:57 +05303173 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303174}
3175
3176/**
3177 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
3178 * @wmi_hdl: wmi handle
3179 * @appType1Params: app type1 params
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_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303184 struct app_type1_params *app_type1_params)
3185{
3186 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3187
3188 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
3189 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
3190 app_type1_params);
3191
Govind Singhb53420c2016-03-09 14:32:57 +05303192 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303193}
3194
3195/**
3196 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
3197 * @wmi_hdl: wmi handle
3198 * @request: SSID hotlist set request
3199 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303200 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303201 */
Govind Singhb53420c2016-03-09 14:32:57 +05303202QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05303203wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
3204 struct ssid_hotlist_request_params *request)
3205{
3206 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3207
3208 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
3209 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
3210 request);
3211
Govind Singhb53420c2016-03-09 14:32:57 +05303212 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303213}
3214
3215/**
3216 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
3217 * @wmi_hdl: wmi handle
3218 * @vdev_id: vdev id
3219 *
3220 * This function sends roam synch complete event to fw.
3221 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303222 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303223 */
Govind Singhb53420c2016-03-09 14:32:57 +05303224QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303225 uint8_t vdev_id)
3226{
3227 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3228
3229 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
3230 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
3231 vdev_id);
3232
Govind Singhb53420c2016-03-09 14:32:57 +05303233 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303234}
3235
3236/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05303237 * wmi_unified_fw_test_cmd() - send fw test command to fw.
3238 * @wmi_hdl: wmi handle
3239 * @wmi_fwtest: fw test command
3240 *
3241 * This function sends fw test command to fw.
3242 *
3243 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3244 */
3245QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
3246 struct set_fwtest_params *wmi_fwtest)
3247{
3248 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3249
3250 if (wmi_handle->ops->send_fw_test_cmd)
3251 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
3252 wmi_fwtest);
3253
3254 return QDF_STATUS_E_FAILURE;
3255
3256}
3257
3258/**
Govind Singha4836fd2016-03-07 16:45:38 +05303259 * wmi_unified_unit_test_cmd() - send unit test command to fw.
3260 * @wmi_hdl: wmi handle
3261 * @wmi_utest: unit test command
3262 *
3263 * This function send unit test command to fw.
3264 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303265 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303266 */
Govind Singhb53420c2016-03-09 14:32:57 +05303267QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303268 struct wmi_unit_test_cmd *wmi_utest)
3269{
3270 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3271
3272 if (wmi_handle->ops->send_unit_test_cmd)
3273 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
3274 wmi_utest);
3275
Govind Singhb53420c2016-03-09 14:32:57 +05303276 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303277}
3278
3279/**
3280 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
3281 * @wmi_hdl: wmi handle
3282 * @roaminvoke: roam invoke command
3283 *
3284 * Send roam invoke command to fw for fastreassoc.
3285 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303286 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303287 */
Govind Singhb53420c2016-03-09 14:32:57 +05303288QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303289 struct wmi_roam_invoke_cmd *roaminvoke,
3290 uint32_t ch_hz)
3291{
3292 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3293
3294 if (wmi_handle->ops->send_roam_invoke_cmd)
3295 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
3296 roaminvoke, ch_hz);
3297
Govind Singhb53420c2016-03-09 14:32:57 +05303298 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303299}
3300
3301/**
3302 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
3303 * @wmi_hdl: wmi handle
3304 * @command: command
3305 * @vdev_id: vdev id
3306 *
3307 * This function set roam offload command to fw.
3308 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303309 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303310 */
Govind Singhb53420c2016-03-09 14:32:57 +05303311QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303312 uint32_t command, uint32_t vdev_id)
3313{
3314 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3315
3316 if (wmi_handle->ops->send_roam_scan_offload_cmd)
3317 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
3318 command, vdev_id);
3319
Govind Singhb53420c2016-03-09 14:32:57 +05303320 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303321}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303322#ifndef WMI_NON_TLV_SUPPORT
Govind Singha4836fd2016-03-07 16:45:38 +05303323/**
3324 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
3325 * @wmi_hdl: wmi handle
3326 * @ap_profile_p: ap profile
3327 * @vdev_id: vdev id
3328 *
3329 * Send WMI_ROAM_AP_PROFILE to firmware
3330 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303331 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303332 */
Govind Singhb53420c2016-03-09 14:32:57 +05303333QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303334 wmi_ap_profile *ap_profile_p,
3335 uint32_t vdev_id)
3336{
3337 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3338
3339 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
3340 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(wmi_handle,
3341 ap_profile_p, vdev_id);
3342
Govind Singhb53420c2016-03-09 14:32:57 +05303343 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303344}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303345#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303346/**
3347 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3348 * @wmi_handle: wmi handle
3349 * @scan_period: scan period
3350 * @scan_age: scan age
3351 * @vdev_id: vdev id
3352 *
3353 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3354 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303355 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303356 */
Govind Singhb53420c2016-03-09 14:32:57 +05303357QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303358 uint32_t scan_period,
3359 uint32_t scan_age,
3360 uint32_t vdev_id)
3361{
3362 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3363
3364 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3365 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3366 scan_period, scan_age, vdev_id);
3367
Govind Singhb53420c2016-03-09 14:32:57 +05303368 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303369}
3370
3371/**
3372 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3373 * @wmi_handle: wmi handle
3374 * @chan_count: channel count
3375 * @chan_list: channel list
3376 * @list_type: list type
3377 * @vdev_id: vdev id
3378 *
3379 * Set roam offload channel list.
3380 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303381 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303382 */
Govind Singhb53420c2016-03-09 14:32:57 +05303383QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303384 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003385 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303386 uint8_t list_type, uint32_t vdev_id)
3387{
3388 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3389
3390 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3391 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3392 chan_count, chan_list,
3393 list_type, vdev_id);
3394
Govind Singhb53420c2016-03-09 14:32:57 +05303395 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303396}
3397
3398/**
3399 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3400 * @wmi_hdl: wmi handle
3401 * @rssi_change_thresh: RSSI Change threshold
3402 * @bcn_rssi_weight: beacon RSSI weight
3403 * @vdev_id: vdev id
3404 *
3405 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3406 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303407 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303408 */
Govind Singhb53420c2016-03-09 14:32:57 +05303409QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303410 uint32_t vdev_id,
3411 int32_t rssi_change_thresh,
3412 uint32_t bcn_rssi_weight,
3413 uint32_t hirssi_delay_btw_scans)
3414{
3415 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3416
3417 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3418 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3419 vdev_id, rssi_change_thresh,
3420 bcn_rssi_weight, hirssi_delay_btw_scans);
3421
Govind Singhb53420c2016-03-09 14:32:57 +05303422 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303423}
3424
3425/**
3426 * wmi_unified_get_buf_extscan_hotlist_cmd() - prepare hotlist command
3427 * @wmi_hdl: wmi handle
3428 * @photlist: hotlist command params
3429 * @buf_len: buffer length
3430 *
3431 * This function fills individual elements for hotlist request and
3432 * TLV for bssid entries
3433 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303434 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singha4836fd2016-03-07 16:45:38 +05303435 */
Govind Singhb53420c2016-03-09 14:32:57 +05303436QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303437 struct ext_scan_setbssi_hotlist_params *
3438 photlist, int *buf_len)
3439{
3440 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3441
3442 if (wmi_handle->ops->send_get_buf_extscan_hotlist_cmd)
3443 return wmi_handle->ops->send_get_buf_extscan_hotlist_cmd(wmi_handle,
3444 photlist, buf_len);
3445
Govind Singhb53420c2016-03-09 14:32:57 +05303446 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303447}
3448
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303449/**
3450 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3451 * @param wmi_handle : handle to WMI.
3452 * @param param : tpc config param
3453 *
3454 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3455 */
3456QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3457 uint32_t param)
3458{
3459 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3460
3461 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3462 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3463 param);
3464
3465 return QDF_STATUS_E_FAILURE;
3466}
3467
3468/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303469 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3470 * @param wmi_handle : handle to WMI.
3471 * @param param : pointer to set bwf param
3472 *
3473 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3474 */
3475QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3476 struct set_bwf_params *param)
3477{
3478 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3479
3480 if (wmi_handle->ops->send_set_bwf_cmd)
3481 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3482
3483 return QDF_STATUS_E_FAILURE;
3484}
3485
3486/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303487 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3488 * @param wmi_handle : handle to WMI.
3489 * @param param : pointer to set atf param
3490 *
3491 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3492 */
3493QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3494 struct set_atf_params *param)
3495{
3496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3497
3498 if (wmi_handle->ops->send_set_atf_cmd)
3499 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3500
3501 return QDF_STATUS_E_FAILURE;
3502}
3503
3504/**
3505 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3506 * @param wmi_handle : handle to WMI.
3507 * @param param : pointer to hold pdev fips param
3508 *
3509 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3510 */
3511QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3512 struct fips_params *param)
3513{
3514 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3515
3516 if (wmi_handle->ops->send_pdev_fips_cmd)
3517 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3518
3519 return QDF_STATUS_E_FAILURE;
3520}
3521
3522/**
3523 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3524 * @param wmi_handle : handle to WMI.
3525 * @param param : pointer to hold wlan profile param
3526 *
3527 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3528 */
3529QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3530 struct wlan_profile_params *param)
3531{
3532 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3533
3534 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3535 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3536 param);
3537
3538 return QDF_STATUS_E_FAILURE;
3539}
3540
3541/**
3542 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3543 * @param wmi_handle : handle to WMI.
3544 * @param param : pointer to hold wlan profile param
3545 *
3546 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3547 */
3548QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3549 struct wlan_profile_params *param)
3550{
3551 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3552
3553 if (wmi->ops->send_wlan_profile_trigger_cmd)
3554 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3555 param);
3556
3557 return QDF_STATUS_E_FAILURE;
3558}
3559
3560/**
3561 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3562 * @param wmi_handle : handle to WMI.
3563 * @param param : pointer to hold channel param
3564 *
3565 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3566 */
3567QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3568 struct channel_param *param)
3569{
3570 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3571
3572 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3573 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3574 param);
3575
3576 return QDF_STATUS_E_FAILURE;
3577}
3578
3579/**
3580 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3581 * @param wmi_handle : handle to WMI.
3582 * @param param : pointer to hold channel param
3583 *
3584 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3585 */
3586QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3587 struct ht_ie_params *param)
3588{
3589 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3590
3591 if (wmi_handle->ops->send_set_ht_ie_cmd)
3592 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3593
3594 return QDF_STATUS_E_FAILURE;
3595}
3596
3597/**
3598 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3599 * @param wmi_handle : handle to WMI.
3600 * @param param : pointer to hold channel param
3601 *
3602 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3603 */
3604QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3605 struct vht_ie_params *param)
3606{
3607 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3608
3609 if (wmi_handle->ops->send_set_vht_ie_cmd)
3610 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3611
3612 return QDF_STATUS_E_FAILURE;
3613}
3614
3615/**
3616 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3617 * @param wmi_handle : handle to WMI.
3618 * @param param : pointer to hold wmm param
3619 *
3620 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3621 */
3622QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3623 struct wmm_update_params *param)
3624{
3625 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3626
3627 if (wmi_handle->ops->send_wmm_update_cmd)
3628 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3629
3630 return QDF_STATUS_E_FAILURE;
3631}
3632
3633/**
3634 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3635 * @param wmi_handle : handle to WMI.
3636 * @param param : pointer to hold ant switch tbl param
3637 *
3638 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3639 */
3640QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3641 struct ant_switch_tbl_params *param)
3642{
3643 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3644
3645 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3646 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3647 param);
3648
3649 return QDF_STATUS_E_FAILURE;
3650}
3651
3652/**
3653 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3654 * @param wmi_handle : handle to WMI.
3655 * @param param : pointer to hold ratepwr table param
3656 *
3657 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3658 */
3659QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3660 struct ratepwr_table_params *param)
3661{
3662 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3663
3664 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3665 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3666 param);
3667
3668 return QDF_STATUS_E_FAILURE;
3669}
3670
3671/**
3672 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3673 * @param wmi_handle : handle to WMI.
3674 *
3675 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3676 */
3677QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3678{
3679 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3680
3681 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3682 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3683
3684 return QDF_STATUS_E_FAILURE;
3685}
3686
3687/**
3688 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3689 * @param wmi_handle : handle to WMI.
3690 * @param param : pointer to hold ctl table param
3691 *
3692 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3693 */
3694QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3695 struct ctl_table_params *param)
3696{
3697 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3698
3699 if (wmi_handle->ops->send_set_ctl_table_cmd)
3700 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3701 param);
3702
3703 return QDF_STATUS_E_FAILURE;
3704}
3705
3706/**
3707 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3708 * @param wmi_handle : handle to WMI.
3709 * @param param : pointer to hold mimogain param
3710 *
3711 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3712 */
3713QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3714 struct mimogain_table_params *param)
3715{
3716 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3717
3718 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3719 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3720 param);
3721
3722 return QDF_STATUS_E_FAILURE;
3723}
3724
3725/**
3726 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3727 * chainmsk cmd function
3728 * @param wmi_handle : handle to WMI.
3729 * @param param : pointer to hold ratepwr chainmsk param
3730 *
3731 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3732 */
3733QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3734 struct ratepwr_chainmsk_params *param)
3735{
3736 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3737
3738 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3739 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3740
3741 return QDF_STATUS_E_FAILURE;
3742}
3743
3744/**
3745 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3746 * @param wmi_handle : handle to WMI.
3747 * @param param : pointer to hold macaddr param
3748 *
3749 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3750 */
3751QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3752 struct macaddr_params *param)
3753{
3754 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3755
3756 if (wmi_handle->ops->send_set_macaddr_cmd)
3757 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3758
3759 return QDF_STATUS_E_FAILURE;
3760}
3761
3762/**
3763 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3764 * @param wmi_handle : handle to WMI.
3765 *
3766 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3767 */
3768QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3769{
3770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3771
3772 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3773 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3774
3775 return QDF_STATUS_E_FAILURE;
3776}
3777
3778/**
3779 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3780 * @param wmi_handle : handle to WMI.
3781 *
3782 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3783 */
3784QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3785{
3786 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3787
3788 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3789 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3790
3791 return QDF_STATUS_E_FAILURE;
3792}
3793
3794/**
3795 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3796 * @param wmi_handle : handle to WMI.
3797 * @param param : pointer to hold acparams param
3798 *
3799 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3800 */
3801QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3802 struct acparams_params *param)
3803{
3804 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3805
3806 if (wmi_handle->ops->send_set_acparams_cmd)
3807 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3808 param);
3809
3810 return QDF_STATUS_E_FAILURE;
3811}
3812
3813/**
3814 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3815 * tid map cmd function
3816 * @param wmi_handle : handle to WMI.
3817 * @param param : pointer to hold dscp param
3818 *
3819 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3820 */
3821QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3822 struct vap_dscp_tid_map_params *param)
3823{
3824 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3825
3826 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3827 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3828
3829 return QDF_STATUS_E_FAILURE;
3830}
3831
3832/**
3833 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3834 * reserve cmd function
3835 * @param wmi_handle : handle to WMI.
3836 * @param param : pointer to hold ast param
3837 *
3838 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3839 */
3840QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3841 struct proxy_ast_reserve_params *param)
3842{
3843 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3844
3845 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3846 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3847 param);
3848
3849 return QDF_STATUS_E_FAILURE;
3850}
3851
3852/**
3853 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3854 * @param wmi_handle : handle to WMI.
3855 * @param param : pointer to hold qvit param
3856 *
3857 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3858 */
3859QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3860 struct pdev_qvit_params *param)
3861{
3862 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3863
3864 if (wmi_handle->ops->send_pdev_qvit_cmd)
3865 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3866
3867 return QDF_STATUS_E_FAILURE;
3868}
3869
3870/**
3871 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3872 * @param wmi_handle : handle to WMI.
3873 * @param param : pointer to hold mcast grp param
3874 *
3875 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3876 */
3877QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3878 struct mcast_group_update_params *param)
3879{
3880 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3881
3882 if (wmi_handle->ops->send_mcast_group_update_cmd)
3883 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3884 param);
3885
3886 return QDF_STATUS_E_FAILURE;
3887}
3888
3889/**
3890 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3891 * @param wmi_handle : handle to WMI.
3892 * @param param : pointer to hold wds entry param
3893 *
3894 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3895 */
3896QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3897 struct peer_add_wds_entry_params *param)
3898{
3899 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3900
3901 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3902 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3903 param);
3904
3905 return QDF_STATUS_E_FAILURE;
3906}
3907
3908/**
3909 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3910 * @param wmi_handle : handle to WMI.
3911 * @param param : pointer to hold wds entry param
3912 *
3913 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3914 */
3915QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3916 struct peer_del_wds_entry_params *param)
3917{
3918 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3919
3920 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3921 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3922 param);
3923
3924 return QDF_STATUS_E_FAILURE;
3925}
3926
3927/**
3928 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3929 * @param wmi_handle : handle to WMI.
3930 * @param param : pointer to hold wds entry param
3931 *
3932 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3933 */
3934QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3935 struct peer_update_wds_entry_params *param)
3936{
3937 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3938
3939 if (wmi->ops->send_peer_update_wds_entry_cmd)
3940 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3941
3942 return QDF_STATUS_E_FAILURE;
3943}
3944
3945/**
3946 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3947 * @param wmi_handle : handle to WMI.
3948 * @param param : pointer to hold phyerr enable param
3949 *
3950 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3951 */
3952QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3953{
3954 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3955
3956 if (wmi_handle->ops->send_phyerr_enable_cmd)
3957 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3958
3959 return QDF_STATUS_E_FAILURE;
3960}
3961
3962/**
3963 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3964 * @param wmi_handle : handle to WMI.
3965 * @param param : pointer to hold phyerr disable param
3966 *
3967 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3968 */
3969QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3970{
3971 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3972
3973 if (wmi_handle->ops->send_phyerr_disable_cmd)
3974 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3975
3976 return QDF_STATUS_E_FAILURE;
3977}
3978
3979/**
3980 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3981 * @param wmi_handle : handle to WMI.
3982 * @param param : pointer to hold antenna param
3983 *
3984 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3985 */
3986QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3987 struct smart_ant_enable_params *param)
3988{
3989 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3990
3991 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3992 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3993 param);
3994
3995 return QDF_STATUS_E_FAILURE;
3996}
3997
3998/**
3999 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
4000 * @param wmi_handle : handle to WMI.
4001 * @param param : pointer to hold antenna param
4002 *
4003 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4004 */
4005QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
4006 struct smart_ant_rx_ant_params *param)
4007{
4008 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4009
4010 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
4011 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
4012
4013 return QDF_STATUS_E_FAILURE;
4014}
4015
4016/**
4017 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
4018 * @param wmi_handle : handle to WMI.
4019 * @param param : pointer to hold antenna param
4020 *
4021 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4022 */
4023QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
4024 uint8_t macaddr[IEEE80211_ADDR_LEN],
4025 struct smart_ant_tx_ant_params *param)
4026{
4027 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4028
4029 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
4030 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
4031 param);
4032
4033 return QDF_STATUS_E_FAILURE;
4034}
4035
4036/**
4037 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
4038 * @param wmi_handle : handle to WMI.
4039 * @param param : pointer to hold antenna param
4040 *
4041 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4042 */
4043QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
4044 uint8_t macaddr[IEEE80211_ADDR_LEN],
4045 struct smart_ant_training_info_params *param)
4046{
4047 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4048
4049 if (wmi->ops->send_smart_ant_set_training_info_cmd)
4050 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
4051 macaddr, param);
4052
4053 return QDF_STATUS_E_FAILURE;
4054}
4055
4056/**
4057 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
4058 * @param wmi_handle : handle to WMI.
4059 * @param macaddr : MAC address
4060 * @param param : pointer to hold node parameter
4061 *
4062 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4063 */
4064QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
4065 uint8_t macaddr[IEEE80211_ADDR_LEN],
4066 struct smart_ant_node_config_params *param)
4067{
4068 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4069
4070 if (wmi->ops->send_smart_ant_set_node_config_cmd)
4071 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
4072 macaddr, param);
4073
4074 return QDF_STATUS_E_FAILURE;
4075}
4076
4077/**
4078 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
4079 * @param wmi_handle : handle to WMI.
4080 * @param param : pointer to hold antenna param
4081 *
4082 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4083 */
4084QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
4085 struct smart_ant_enable_tx_feedback_params *param)
4086{
4087 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4088
4089 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
4090 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
4091 param);
4092
4093 return QDF_STATUS_E_FAILURE;
4094}
4095
4096/**
4097 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
4098 * @param wmi_handle : handle to WMI.
4099 * @param param : pointer to hold spectral config param
4100 *
4101 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4102 */
4103QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
4104 struct vdev_spectral_configure_params *param)
4105{
4106 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4107
4108 if (wmi->ops->send_vdev_spectral_configure_cmd)
4109 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
4110
4111 return QDF_STATUS_E_FAILURE;
4112}
4113
4114/**
4115 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
4116 * @param wmi_handle : handle to WMI.
4117 * @param param : pointer to hold enable spectral param
4118 *
4119 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4120 */
4121QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
4122 struct vdev_spectral_enable_params *param)
4123{
4124 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4125
4126 if (wmi->ops->send_vdev_spectral_enable_cmd)
4127 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
4128
4129 return QDF_STATUS_E_FAILURE;
4130}
4131
4132/**
4133 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
4134 * @param wmi_handle : handle to WMI.
4135 * @param param : pointer to hold chan info param
4136 *
4137 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4138 */
4139QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
4140 struct bss_chan_info_request_params *param)
4141{
4142 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4143
4144 if (wmi->ops->send_bss_chan_info_request_cmd)
4145 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
4146
4147 return QDF_STATUS_E_FAILURE;
4148}
4149
4150/**
4151 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
4152 * @param wmi_handle : handle to WMI.
4153 * @param param : pointer to hold thermal mitigation param
4154 *
4155 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4156 */
4157QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
4158 struct thermal_mitigation_params *param)
4159{
4160 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4161
4162 if (wmi->ops->send_thermal_mitigation_param_cmd)
4163 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
4164
4165 return QDF_STATUS_E_FAILURE;
4166}
4167
4168/**
4169 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
4170 * @param wmi_handle : handle to WMI.
4171 * @param macaddr : MAC address
4172 * @param param : pointer to hold neighbour rx parameter
4173 *
4174 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4175 */
4176QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
4177 uint8_t macaddr[IEEE80211_ADDR_LEN],
4178 struct set_neighbour_rx_params *param)
4179{
4180 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4181
4182 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
4183 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
4184 macaddr, param);
4185
4186 return QDF_STATUS_E_FAILURE;
4187}
4188
4189/**
4190 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
4191 * @param wmi_handle : handle to WMI.
4192 * @param param : pointer to hold fwtest param
4193 *
4194 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4195 */
4196QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
4197 struct set_fwtest_params *param)
4198{
4199 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4200
4201 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
4202 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
4203
4204 return QDF_STATUS_E_FAILURE;
4205}
4206
4207/**
4208 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4209 * @param wmi_handle : handle to WMI.
4210 * @param param : pointer to hold config ratemask param
4211 *
4212 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4213 */
4214QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4215 struct config_ratemask_params *param)
4216{
4217 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4218
4219 if (wmi->ops->send_vdev_config_ratemask_cmd)
4220 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4221
4222 return QDF_STATUS_E_FAILURE;
4223}
4224
4225/**
4226 * wmi_unified_vdev_install_key_cmd_send() - WMI install key function
4227 * @param wmi_handle : handle to WMI.
4228 * @param macaddr : MAC address
4229 * @param param : pointer to hold key parameter
4230 *
4231 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4232 */
4233QDF_STATUS wmi_unified_vdev_install_key_cmd_send(void *wmi_hdl,
4234 uint8_t macaddr[IEEE80211_ADDR_LEN],
4235 struct vdev_install_key_params *param)
4236{
4237 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4238
4239 if (wmi_handle->ops->send_vdev_install_key_cmd)
4240 return wmi_handle->ops->send_vdev_install_key_cmd(wmi_handle,
4241 macaddr, param);
4242
4243 return QDF_STATUS_E_FAILURE;
4244}
4245
4246/**
4247 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4248 * @param wmi_handle : handle to WMI.
4249 * @param param : pointer to hold regdomain param
4250 *
4251 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4252 */
4253QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4254 struct pdev_set_regdomain_params *param)
4255{
4256 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4257
4258 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4259 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4260 param);
4261
4262 return QDF_STATUS_E_FAILURE;
4263}
4264
4265/**
4266 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4267 * @param wmi_handle : handle to WMI.
4268 * @param param : pointer to hold quiet mode param
4269 *
4270 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4271 */
4272QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4273 struct set_quiet_mode_params *param)
4274{
4275 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4276
4277 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4278 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4279 param);
4280
4281 return QDF_STATUS_E_FAILURE;
4282}
4283
4284/**
4285 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4286 * @param wmi_handle : handle to WMI.
4287 * @param param : pointer to hold beacon filter param
4288 *
4289 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4290 */
4291QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4292 struct set_beacon_filter_params *param)
4293{
4294 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4295
4296 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4297 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4298 param);
4299
4300 return QDF_STATUS_E_FAILURE;
4301}
4302
4303/**
4304 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4305 * @param wmi_handle : handle to WMI.
4306 * @param param : pointer to hold beacon filter param
4307 *
4308 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4309 */
4310QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4311 struct remove_beacon_filter_params *param)
4312{
4313 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4314
4315 if (wmi->ops->send_remove_beacon_filter_cmd)
4316 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4317
4318 return QDF_STATUS_E_FAILURE;
4319}
4320
4321/**
4322 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4323 * @param wmi_handle : handle to WMI.
4324 * @param macaddr : MAC address
4325 * @param param : pointer to hold mgmt parameter
4326 *
4327 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4328 */
4329#if 0
4330QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4331 uint8_t macaddr[IEEE80211_ADDR_LEN],
4332 struct mgmt_params *param)
4333{
4334 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4335
4336 if (wmi_handle->ops->send_mgmt_cmd)
4337 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4338 macaddr, param);
4339
4340 return QDF_STATUS_E_FAILURE;
4341}
4342#endif
4343
4344/**
4345 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4346 * @param wmi_handle : handle to WMI.
4347 * @param macaddr : MAC address
4348 * @param param : pointer to hold addba resp parameter
4349 *
4350 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4351 */
4352QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4353 uint8_t macaddr[IEEE80211_ADDR_LEN],
4354 struct addba_clearresponse_params *param)
4355{
4356 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4357
4358 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4359 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4360 macaddr, param);
4361
4362 return QDF_STATUS_E_FAILURE;
4363}
4364
4365/**
4366 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4367 * @param wmi_handle : handle to WMI.
4368 * @param macaddr : MAC address
4369 * @param param : pointer to hold addba parameter
4370 *
4371 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4372 */
4373QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4374 uint8_t macaddr[IEEE80211_ADDR_LEN],
4375 struct addba_send_params *param)
4376{
4377 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4378
4379 if (wmi_handle->ops->send_addba_send_cmd)
4380 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4381 macaddr, param);
4382
4383 return QDF_STATUS_E_FAILURE;
4384}
4385
4386/**
4387 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4388 * @param wmi_handle : handle to WMI.
4389 * @param macaddr : MAC address
4390 * @param param : pointer to hold delba parameter
4391 *
4392 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4393 */
4394QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4395 uint8_t macaddr[IEEE80211_ADDR_LEN],
4396 struct delba_send_params *param)
4397{
4398 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4399
4400 if (wmi_handle->ops->send_delba_send_cmd)
4401 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4402 macaddr, param);
4403
4404 return QDF_STATUS_E_FAILURE;
4405}
4406
4407/**
4408 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4409 * @param wmi_handle : handle to WMI.
4410 * @param macaddr : MAC address
4411 * @param param : pointer to hold addba set resp parameter
4412 *
4413 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4414 */
4415QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4416 uint8_t macaddr[IEEE80211_ADDR_LEN],
4417 struct addba_setresponse_params *param)
4418{
4419 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4420
4421 if (wmi_handle->ops->send_addba_setresponse_cmd)
4422 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4423 macaddr, param);
4424
4425 return QDF_STATUS_E_FAILURE;
4426}
4427
4428/**
4429 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4430 * @param wmi_handle : handle to WMI.
4431 * @param macaddr : MAC address
4432 * @param param : pointer to hold singleamsdu parameter
4433 *
4434 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4435 */
4436QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4437 uint8_t macaddr[IEEE80211_ADDR_LEN],
4438 struct singleamsdu_params *param)
4439{
4440 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4441
4442 if (wmi_handle->ops->send_singleamsdu_cmd)
4443 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4444 macaddr, param);
4445
4446 return QDF_STATUS_E_FAILURE;
4447}
4448
4449/**
4450 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4451 * @param wmi_handle : handle to WMI.
4452 * @param macaddr : MAC address
4453 * @param param : pointer to hold set_qboost parameter
4454 *
4455 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4456 */
4457QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4458 uint8_t macaddr[IEEE80211_ADDR_LEN],
4459 struct set_qboost_params *param)
4460{
4461 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4462
4463 if (wmi_handle->ops->send_set_qboost_param_cmd)
4464 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4465 macaddr, param);
4466
4467 return QDF_STATUS_E_FAILURE;
4468}
4469
4470/**
4471 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4472 * @param wmi_handle : handle to WMI.
4473 * @param param : pointer to hold mu scan param
4474 *
4475 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4476 */
4477QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4478 struct mu_scan_params *param)
4479{
4480 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4481
4482 if (wmi_handle->ops->send_mu_scan_cmd)
4483 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4484
4485 return QDF_STATUS_E_FAILURE;
4486}
4487
4488/**
4489 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4490 * @param wmi_handle : handle to WMI.
4491 * @param param : pointer to hold mu scan param
4492 *
4493 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4494 */
4495QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4496 struct lteu_config_params *param)
4497{
4498 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4499
4500 if (wmi_handle->ops->send_lteu_config_cmd)
4501 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4502
4503 return QDF_STATUS_E_FAILURE;
4504}
4505
4506/**
4507 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4508 * @param wmi_handle : handle to WMI.
4509 * @param param : pointer to hold mu scan param
4510 *
4511 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4512 */
4513QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4514 struct set_ps_mode_params *param)
4515{
4516 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4517
4518 if (wmi_handle->ops->send_set_ps_mode_cmd)
4519 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4520
4521 return QDF_STATUS_E_FAILURE;
4522}
4523
4524/**
4525 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4526 * @wmi_handle: wmi handle
4527 * @param tgt_res_cfg: pointer to target resource configuration
4528 * @param num_mem_chunks: Number of memory chunks
4529 * @param mem_chunks: pointer to target memory chunks
4530 *
4531 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4532 */
4533QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
4534 target_resource_config *res_cfg, uint8_t num_mem_chunks,
4535 struct wmi_host_mem_chunk *mem_chunk)
4536{
4537 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4538
4539 if (wmi_handle->ops->init_cmd_send)
4540 return wmi_handle->ops->init_cmd_send(wmi_handle, res_cfg,
4541 num_mem_chunks, mem_chunk);
4542
4543 return QDF_STATUS_E_FAILURE;
4544}
4545
4546/**
4547 * wmi_save_service_bitmap() - save service bitmap
4548 * @wmi_handle: wmi handle
4549 * @param evt_buf: pointer to event buffer
4550 *
4551 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4552 */
4553QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf)
4554{
4555 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4556
4557 if (wmi_handle->ops->save_service_bitmap) {
4558 wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf);
4559 return 0;
4560 }
4561 return QDF_STATUS_E_FAILURE;
4562}
4563
4564/**
4565 * wmi_save_fw_version() - Save fw version
4566 * @wmi_handle: wmi handle
4567 * @param evt_buf: pointer to event buffer
4568 *
4569 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4570 */
4571QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4572{
4573 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4574
4575 if (wmi_handle->ops->save_fw_version) {
4576 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4577 return 0;
4578 }
4579 return QDF_STATUS_E_FAILURE;
4580
4581}
4582
4583/**
4584 * wmi_check_and_update_fw_version() - Ready and fw version check
4585 * @wmi_handle: wmi handle
4586 * @param evt_buf: pointer to event buffer
4587 *
4588 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4589 */
4590QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4591{
4592 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4593
4594 if (wmi_handle->ops->check_and_update_fw_version)
4595 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4596 evt_buf);
4597
4598 return QDF_STATUS_E_FAILURE;
4599
4600}
4601
4602/**
4603 * wmi_service_enabled() - Check if service enabled
4604 * @param wmi_handle: wmi handle
4605 * @param service_id: service identifier
4606 *
4607 * Return: 1 enabled, 0 disabled
4608 */
4609#ifdef WMI_NON_TLV_SUPPORT
4610bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4611{
4612 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4613
4614 if ((service_id < wmi_services_max) &&
4615 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4616 if (wmi_handle->ops->is_service_enabled) {
4617 return wmi_handle->ops->is_service_enabled(wmi_handle,
4618 wmi_handle->services[service_id]);
4619 }
4620 } else {
4621 qdf_print("Support not added yet for Service %d\n", service_id);
4622 }
4623 return false;
4624}
4625#endif
4626
4627/**
4628 * wmi_get_target_cap_from_service_ready() - extract service ready event
4629 * @wmi_handle: wmi handle
4630 * @param evt_buf: pointer to received event buffer
4631 * @param ev: pointer to hold target capability information extracted from even
4632 *
4633 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4634 */
4635QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
4636 void *evt_buf, target_capability_info *ev)
4637{
4638 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4639
4640 if (wmi->ops->get_target_cap_from_service_ready)
4641 return wmi->ops->get_target_cap_from_service_ready(wmi,
4642 evt_buf, ev);
4643
4644 return QDF_STATUS_E_FAILURE;
4645}
4646
4647/**
4648 * wmi_extract_fw_version() - extract fw version
4649 * @wmi_handle: wmi handle
4650 * @param evt_buf: pointer to event buffer
4651 * @param fw_ver: Pointer to hold fw version
4652 *
4653 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4654 */
4655QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4656 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4657{
4658 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4659
4660 if (wmi_handle->ops->extract_fw_version)
4661 return wmi_handle->ops->extract_fw_version(wmi_handle,
4662 evt_buf, fw_ver);
4663
4664 return QDF_STATUS_E_FAILURE;
4665}
4666
4667/**
4668 * wmi_extract_fw_abi_version() - extract fw abi version
4669 * @wmi_handle: wmi handle
4670 * @param evt_buf: Pointer to event buffer
4671 * @param fw_ver: Pointer to hold fw abi version
4672 *
4673 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4674 */
4675QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4676 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4677{
4678 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4679
4680 if (wmi_handle->ops->extract_fw_abi_version)
4681 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4682 evt_buf, fw_ver);
4683
4684 return QDF_STATUS_E_FAILURE;
4685}
4686
4687/**
4688 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4689 * @wmi_handle: wmi handle
4690 * @param evt_buf: Pointer to event buffer
4691 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4692 *
4693 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4694 */
4695QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
4696 TARGET_HAL_REG_CAPABILITIES *hal_reg_cap)
4697{
4698 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4699
4700 if (wmi_handle->ops->extract_hal_reg_cap)
4701 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4702 evt_buf, hal_reg_cap);
4703
4704 return QDF_STATUS_E_FAILURE;
4705}
4706
4707/**
4708 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4709 * request event
4710 * @wmi_handle: wmi handle
4711 * @param evt_buf: pointer to event buffer
4712 * @param num_entries: pointer to hold number of entries requested
4713 *
4714 * Return: Number of entries requested
4715 */
4716host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4717 void *evt_buf, uint8_t *num_entries)
4718{
4719 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4720
4721 if (wmi_handle->ops->extract_host_mem_req)
4722 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4723 evt_buf, num_entries);
4724
4725 *num_entries = 0;
4726 return NULL;
4727}
4728
4729/**
4730 * wmi_ready_extract_init_status() - Extract init status from ready event
4731 * @wmi_handle: wmi handle
4732 * @param ev: Pointer to event buffer
4733 *
4734 * Return: ready status
4735 */
4736uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4737{
4738 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4739
4740 if (wmi_handle->ops->ready_extract_init_status)
4741 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4742 ev);
4743
4744
4745 return 1;
4746
4747}
4748
4749/**
4750 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4751 * @wmi_handle: wmi handle
4752 * @param ev: pointer to event buffer
4753 * @param macaddr: Pointer to hold MAC address
4754 *
4755 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4756 */
4757QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4758{
4759 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4760
4761 if (wmi_handle->ops->ready_extract_mac_addr)
4762 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4763 ev, macaddr);
4764
4765
4766 return QDF_STATUS_E_FAILURE;
4767}
4768
4769/**
4770 * wmi_extract_dbglog_data_len() - extract debuglog data length
4771 * @wmi_handle: wmi handle
4772 * @param evt_buf: pointer to event buffer
4773 * @param len: length of buffer
4774 *
4775 * Return: length
4776 */
4777uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
4778 uint16_t *len)
4779{
4780 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4781
4782 if (wmi_handle->ops->extract_dbglog_data_len)
4783 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4784 evt_buf, len);
4785
4786
4787 return NULL;
4788}
4789
4790/**
4791 * wmi_send_ext_resource_config() - send extended resource configuration
4792 * @wmi_handle: wmi handle
4793 * @param ext_cfg: pointer to extended resource configuration
4794 *
4795 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4796 */
4797QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4798 wmi_host_ext_resource_config *ext_cfg)
4799{
4800 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4801
4802 if (wmi_handle->ops->send_ext_resource_config)
4803 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4804 ext_cfg);
4805
4806 return QDF_STATUS_E_FAILURE;
4807}
4808
4809/**
4810 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4811 * @param wmi_handle : handle to WMI.
4812 *
4813 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4814 */
4815QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl)
4816{
4817 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4818
4819 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
4820 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi);
4821
4822 return QDF_STATUS_E_FAILURE;
4823}
4824
4825/**
4826 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4827 * @param wmi_handle : handle to WMI.
4828 * @param param : pointer to hold packet power info param
4829 *
4830 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4831 */
4832QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4833 struct packet_power_info_params *param)
4834{
4835 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4836
4837 if (wmi->ops->send_packet_power_info_get_cmd)
4838 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4839
4840 return QDF_STATUS_E_FAILURE;
4841}
4842
4843/**
4844 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4845 * @param wmi_handle : handle to WMI.
4846 * @param param : pointer to hold gpio config param
4847 *
4848 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4849 */
4850QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4851 struct gpio_config_params *param)
4852{
4853 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4854
4855 if (wmi_handle->ops->send_gpio_config_cmd)
4856 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4857
4858 return QDF_STATUS_E_FAILURE;
4859}
4860
4861/**
4862 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4863 * @param wmi_handle : handle to WMI.
4864 * @param param : pointer to hold gpio config param
4865 *
4866 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4867 */
4868QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4869 struct gpio_output_params *param)
4870{
4871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4872
4873 if (wmi_handle->ops->send_gpio_output_cmd)
4874 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4875
4876 return QDF_STATUS_E_FAILURE;
4877}
4878
4879/**
4880 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4881 * @param wmi_handle : handle to WMI.
4882 * @param param : pointer to hold rtt meas req test param
4883 *
4884 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4885 */
4886QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4887 struct rtt_meas_req_test_params *param)
4888{
4889 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4890
4891 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4892 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4893 param);
4894
4895 return QDF_STATUS_E_FAILURE;
4896}
4897
4898/**
4899 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4900 * @param wmi_handle : handle to WMI.
4901 * @param param : pointer to hold rtt meas req param
4902 *
4903 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4904 */
4905QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4906 struct rtt_meas_req_params *param)
4907{
4908 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4909
4910 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4911 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4912 param);
4913
4914 return QDF_STATUS_E_FAILURE;
4915}
4916
4917/**
4918 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4919 * @param wmi_handle : handle to WMI.
4920 * @param param : pointer to hold lci param
4921 *
4922 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4923 */
4924QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4925 struct lci_set_params *param)
4926{
4927 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4928
4929 if (wmi_handle->ops->send_lci_set_cmd)
4930 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4931
4932 return QDF_STATUS_E_FAILURE;
4933}
4934
4935/**
4936 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4937 * @param wmi_handle : handle to WMI.
4938 * @param param : pointer to hold lcr param
4939 *
4940 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4941 */
4942QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4943 struct lcr_set_params *param)
4944{
4945 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4946
4947 if (wmi_handle->ops->send_lcr_set_cmd)
4948 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4949
4950 return QDF_STATUS_E_FAILURE;
4951}
4952
4953/**
4954 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4955 * @param wmi_handle : handle to WMI.
4956 * @param param : pointer to hold rtt meas req test param
4957 *
4958 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4959 */
4960QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4961 struct rtt_keepalive_req_params *param)
4962{
4963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4964
4965 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4966 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4967 param);
4968
4969 return QDF_STATUS_E_FAILURE;
4970}
4971
4972/**
4973 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4974 * to fw
4975 * @wmi_handle: wmi handle
4976 * @param: pointer to hold periodic chan stats param
4977 *
4978 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4979 */
4980QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4981 struct periodic_chan_stats_params *param)
4982{
4983 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4984
4985 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4986 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4987 param);
4988
4989 return QDF_STATUS_E_FAILURE;
4990}
4991
4992/**
4993 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4994 * @wmi_handle: wmi handle
4995 * @param: pointer to atf peer request param
4996 *
4997 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4998 */
4999QDF_STATUS
5000wmi_send_atf_peer_request_cmd(void *wmi_hdl,
5001 struct atf_peer_request_params *param)
5002{
5003 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5004
5005 if (wmi_handle->ops->send_atf_peer_request_cmd)
5006 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
5007 param);
5008
5009 return QDF_STATUS_E_FAILURE;
5010}
5011
5012/**
5013 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
5014 * @wmi_handle: wmi handle
5015 * @param: pointer to set atf grouping param
5016 *
5017 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5018 */
5019QDF_STATUS
5020wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
5021 struct atf_grouping_params *param)
5022{
5023 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5024
5025 if (wmi_handle->ops->send_set_atf_grouping_cmd)
5026 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
5027 param);
5028
5029 return QDF_STATUS_E_FAILURE;
5030
5031}
5032
5033
5034/* Extract - APIs */
5035/**
5036 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
5037 *
5038 * @param wmi_handle : handle to WMI.
5039 * @param evt_buf : pointer to event buffer
5040 * @param len : length of the event buffer
5041 * @param wds_ev: pointer to strct to extract
5042 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5043 */
5044QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
5045 uint16_t len, wds_addr_event_t *wds_ev)
5046{
5047 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5048
5049 if (wmi_handle->ops->extract_wds_addr_event) {
5050 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
5051 evt_buf, len, wds_ev);
5052 }
5053 return QDF_STATUS_E_FAILURE;
5054}
5055
5056/**
5057 * wmi_extract_dcs_interference_type() - extract dcs interference type
5058 * @wmi_handle: wmi handle
5059 * @param evt_buf: pointer to event buffer
5060 * @param interference_type: Pointer to hold interference type
5061 *
5062 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5063 */
5064QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
5065 void *evt_buf, uint32_t *interference_type)
5066{
5067 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5068
5069 if (wmi->ops->extract_dcs_interference_type) {
5070 return wmi->ops->extract_dcs_interference_type(wmi,
5071 evt_buf, interference_type);
5072 }
5073 return QDF_STATUS_E_FAILURE;
5074}
5075
5076/*
5077 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5078 * @wmi_handle: wmi handle
5079 * @param evt_buf: pointer to event buffer
5080 * @param cw_int: Pointer to hold cw interference
5081 *
5082 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5083 */
5084QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5085 wmi_host_ath_dcs_cw_int *cw_int)
5086{
5087 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5088
5089 if (wmi_handle->ops->extract_dcs_cw_int) {
5090 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5091 evt_buf, cw_int);
5092 }
5093 return QDF_STATUS_E_FAILURE;
5094}
5095
5096/**
5097 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5098 * @wmi_handle: wmi handle
5099 * @param evt_buf: pointer to event buffer
5100 * @param wlan_stat: Pointer to hold wlan stats
5101 *
5102 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5103 */
5104QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5105 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5106{
5107 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5108
5109 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5110 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5111 evt_buf, wlan_stat);
5112 }
5113 return QDF_STATUS_E_FAILURE;
5114}
5115
5116/**
5117 * wmi_extract_fips_event_error_status() - extract fips event error status
5118 * @wmi_handle: wmi handle
5119 * @param evt_buf: pointer to event buffer
5120 * @param err_status: Pointer to hold error status
5121 *
5122 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5123 */
5124QDF_STATUS wmi_extract_fips_event_error_status(void *wmi_hdl, void *evt_buf,
5125 uint32_t *err_status)
5126{
5127 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5128
5129 if (wmi->ops->extract_fips_event_error_status) {
5130 return wmi->ops->extract_fips_event_error_status(wmi,
5131 evt_buf, err_status);
5132 }
5133 return QDF_STATUS_E_FAILURE;
5134}
5135
5136/**
5137 * wmi_extract_fips_event_data() - extract fips event data
5138 * @wmi_handle: wmi handle
5139 * @param evt_buf: pointer to event buffer
5140 * @param data_len: Pointer to hold fips data length
5141 * @param data: Double pointer to hold fips data
5142 *
5143 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5144 */
5145QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
5146 uint32_t *data_len, uint32_t **data)
5147{
5148 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5149
5150 if (wmi_handle->ops->extract_fips_event_data) {
5151 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
5152 evt_buf, data_len, data);
5153 }
5154 return QDF_STATUS_E_FAILURE;
5155}
5156
5157/**
5158 * wmi_extract_vdev_start_resp() - extract vdev start response
5159 * @wmi_handle: wmi handle
5160 * @param evt_buf: pointer to event buffer
5161 * @param vdev_rsp: Pointer to hold vdev response
5162 *
5163 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5164 */
5165QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5166 wmi_host_vdev_start_resp *vdev_rsp)
5167{
5168 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5169
5170 if (wmi_handle->ops->extract_vdev_start_resp)
5171 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5172 evt_buf, vdev_rsp);
5173
5174 return QDF_STATUS_E_FAILURE;
5175}
5176
5177/**
5178 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5179 * @wmi_handle: wmi handle
5180 * @param evt_buf: pointer to event buffer
5181 * @param vdev_map: Pointer to hold vdev map
5182 * @param tbttoffset_list: Pointer to tbtt offset list
5183 *
5184 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5185 */
5186QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
5187 uint32_t *vdev_map, uint32_t **tbttoffset_list)
5188{
5189 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5190
5191 if (wmi->ops->extract_tbttoffset_update_params)
5192 return wmi->ops->extract_tbttoffset_update_params(wmi,
5193 evt_buf, vdev_map, tbttoffset_list);
5194
5195 return QDF_STATUS_E_FAILURE;
5196}
5197
5198/**
5199 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5200 * @wmi_handle: wmi handle
5201 * @param evt_buf: pointer to event buffer
5202 * @param hdr: Pointer to hold header
5203 * @param bufp: Pointer to hold pointer to rx param buffer
5204 *
5205 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5206 */
5207QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
5208 wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
5209{
5210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5211
5212 if (wmi_handle->ops->extract_mgmt_rx_params)
5213 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5214 evt_buf, hdr, bufp);
5215
5216 return QDF_STATUS_E_FAILURE;
5217}
5218
5219/**
5220 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5221 * @wmi_handle: wmi handle
5222 * @param evt_buf: pointer to event buffer
5223 * @param vdev_id: Pointer to hold vdev identifier
5224 *
5225 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5226 */
5227QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5228 uint32_t *vdev_id)
5229{
5230 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5231
5232 if (wmi_handle->ops->extract_vdev_stopped_param)
5233 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5234 evt_buf, vdev_id);
5235
5236 return QDF_STATUS_E_FAILURE;
5237}
5238
5239/**
5240 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5241 * @wmi_handle: wmi handle
5242 * @param evt_buf: pointer to event buffer
5243 * @param param: Pointer to hold roam param
5244 *
5245 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5246 */
5247QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5248 wmi_host_roam_event *param)
5249{
5250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5251
5252 if (wmi_handle->ops->extract_vdev_roam_param)
5253 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5254 evt_buf, param);
5255
5256 return QDF_STATUS_E_FAILURE;
5257}
5258
5259/**
5260 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5261 * @wmi_handle: wmi handle
5262 * @param evt_buf: pointer to event buffer
5263 * @param param: Pointer to hold vdev scan param
5264 *
5265 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5266 */
5267QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
5268 wmi_host_scan_event *param)
5269{
5270 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5271
5272 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5273 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5274 evt_buf, param);
5275
5276 return QDF_STATUS_E_FAILURE;
5277}
5278
5279/**
5280 * wmi_extract_mu_ev_param() - extract mu param from event
5281 * @wmi_handle: wmi handle
5282 * @param evt_buf: pointer to event buffer
5283 * @param param: Pointer to hold mu report
5284 *
5285 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5286 */
5287QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5288 wmi_host_mu_report_event *param)
5289{
5290 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5291
5292 if (wmi_handle->ops->extract_mu_ev_param)
5293 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5294 param);
5295
5296 return QDF_STATUS_E_FAILURE;
5297}
5298
5299/**
5300 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5301 * param from event
5302 * @wmi_handle: wmi handle
5303 * @param evt_buf: pointer to event buffer
5304 * @param param: Pointer to hold tpc configuration
5305 *
5306 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5307 */
5308QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5309 wmi_host_pdev_tpc_config_event *param)
5310{
5311 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5312
5313 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5314 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5315 evt_buf, param);
5316
5317 return QDF_STATUS_E_FAILURE;
5318
5319}
5320
5321/**
5322 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5323 * @wmi_handle: wmi handle
5324 * @param evt_buf: pointer to event buffer
5325 * @param gpio_num: Pointer to hold gpio number
5326 *
5327 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5328 */
5329QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5330 void *evt_buf, uint32_t *gpio_num)
5331{
5332 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5333
5334 if (wmi_handle->ops->extract_gpio_input_ev_param)
5335 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5336 evt_buf, gpio_num);
5337
5338 return QDF_STATUS_E_FAILURE;
5339}
5340
5341/**
5342 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5343 * param from event
5344 * @wmi_handle: wmi handle
5345 * @param evt_buf: pointer to event buffer
5346 * @param result: Pointer to hold reserve ast entry param
5347 *
5348 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5349 */
5350QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
5351 void *evt_buf, uint32_t *result)
5352{
5353 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5354
5355 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5356 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
5357 evt_buf, result);
5358
5359 return QDF_STATUS_E_FAILURE;
5360}
5361
5362/**
5363 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5364 * power param from event
5365 * @wmi_handle: wmi handle
5366 * @param evt_buf: pointer to event buffer
5367 * @param param: Pointer to hold nf cal power param
5368 *
5369 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5370 */
5371QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5372 wmi_host_pdev_nfcal_power_all_channels_event *param)
5373{
5374 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5375
5376 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5377 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5378 evt_buf, param);
5379
5380 return QDF_STATUS_E_FAILURE;
5381
5382}
5383
5384/**
5385 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5386 * @wmi_handle: wmi handle
5387 * @param evt_buf: pointer to event buffer
5388 * @param param: Pointer to hold tpc param
5389 *
5390 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5391 */
5392QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5393 wmi_host_pdev_tpc_event *param)
5394{
5395 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5396
5397 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5398 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5399 evt_buf, param);
5400
5401 return QDF_STATUS_E_FAILURE;
5402
5403}
5404
5405/**
5406 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5407 * from event
5408 * @wmi_handle: wmi handle
5409 * @param evt_buf: pointer to event buffer
5410 * @param param: Pointer to generic buffer param
5411 *
5412 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5413 */
5414QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5415 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5416{
5417 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5418
5419 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5420 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5421 evt_buf, param);
5422
5423 return QDF_STATUS_E_FAILURE;
5424
5425}
5426
5427/**
5428 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5429 * from event
5430 * @wmi_handle: wmi handle
5431 * @param evt_buf: pointer to event buffer
5432 * @param param: Pointer to mgmt tx completion param
5433 *
5434 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5435 */
5436QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5437 wmi_host_mgmt_tx_compl_event *param)
5438{
5439 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5440
5441 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5442 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5443 evt_buf, param);
5444
5445
5446 return QDF_STATUS_E_FAILURE;
5447}
5448
5449/**
5450 * wmi_extract_swba_vdev_map() - extract swba vdev map from event
5451 * @wmi_handle: wmi handle
5452 * @param evt_buf: pointer to event buffer
5453 * @param vdev_map: Pointer to hold vdev map
5454 *
5455 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5456 */
5457QDF_STATUS wmi_extract_swba_vdev_map(void *wmi_hdl, void *evt_buf,
5458 uint32_t *vdev_map)
5459{
5460 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5461
5462 if (wmi_handle->ops->extract_swba_vdev_map)
5463 return wmi_handle->ops->extract_swba_vdev_map(wmi_handle,
5464 evt_buf, vdev_map);
5465
5466 return QDF_STATUS_E_FAILURE;
5467}
5468
5469/**
5470 * wmi_extract_swba_tim_info() - extract swba tim info from event
5471 * @wmi_handle: wmi handle
5472 * @param evt_buf: pointer to event buffer
5473 * @param idx: Index to bcn info
5474 * @param tim_info: Pointer to hold tim info
5475 *
5476 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5477 */
5478QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5479 uint32_t idx, wmi_host_tim_info *tim_info)
5480{
5481 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5482
5483 if (wmi_handle->ops->extract_swba_tim_info)
5484 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5485 evt_buf, idx, tim_info);
5486
5487 return QDF_STATUS_E_FAILURE;
5488}
5489
5490/**
5491 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5492 * @wmi_handle: wmi handle
5493 * @param evt_buf: pointer to event buffer
5494 * @param idx: Index to bcn info
5495 * @param p2p_desc: Pointer to hold p2p NoA info
5496 *
5497 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5498 */
5499QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5500 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5501{
5502 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5503
5504 if (wmi_handle->ops->extract_swba_noa_info)
5505 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5506 evt_buf, idx, p2p_desc);
5507
5508 return QDF_STATUS_E_FAILURE;
5509}
5510
5511/**
5512 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5513 * from event
5514 * @wmi_handle: wmi handle
5515 * @param evt_buf: pointer to event buffer
5516 * @param ev: Pointer to hold peer param and ps state
5517 *
5518 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5519 */
5520QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5521 wmi_host_peer_sta_ps_statechange_event *ev)
5522{
5523 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5524
5525 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5526 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5527 evt_buf, ev);
5528
5529 return QDF_STATUS_E_FAILURE;
5530}
5531
5532/**
5533 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5534 * @wmi_handle: wmi handle
5535 * @param evt_buf: pointer to event buffer
5536 * @param ev: Pointer to hold peer param
5537 *
5538 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5539 */
5540QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5541 wmi_host_peer_sta_kickout_event *ev)
5542{
5543 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5544
5545 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5546 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5547 evt_buf, ev);
5548
5549 return QDF_STATUS_E_FAILURE;
5550}
5551
5552/**
5553 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5554 * @wmi_handle: wmi handle
5555 * @param evt_buf: pointer to event buffer
5556 * @param peer_mac: Pointer to hold peer mac address
5557 * @param rate_cap: Pointer to hold ratecode
5558 *
5559 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5560 */
5561QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5562 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5563{
5564 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5565
5566 if (wmi->ops->extract_peer_ratecode_list_ev)
5567 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5568 evt_buf, peer_mac, rate_cap);
5569
5570 return QDF_STATUS_E_FAILURE;
5571
5572}
5573
5574/**
5575 * wmi_extract_comb_phyerr() - extract comb phy error from event
5576 * @wmi_handle: wmi handle
5577 * @param evt_buf: pointer to event buffer
5578 * @param datalen: data length of event buffer
5579 * @param buf_offset: Pointer to hold value of current event buffer offset
5580 * post extraction
5581 * @param phyer: Pointer to hold phyerr
5582 *
5583 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5584 */
5585QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5586 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5587{
5588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5589
5590 if (wmi_handle->ops->extract_comb_phyerr)
5591 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5592 evt_buf, datalen, buf_offset, phyerr);
5593
5594 return QDF_STATUS_E_FAILURE;
5595
5596}
5597
5598/**
5599 * wmi_extract_single_phyerr() - extract single phy error from event
5600 * @wmi_handle: wmi handle
5601 * @param evt_buf: pointer to event buffer
5602 * @param datalen: data length of event buffer
5603 * @param buf_offset: Pointer to hold value of current event buffer offset
5604 * post extraction
5605 * @param phyerr: Pointer to hold phyerr
5606 *
5607 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5608 */
5609QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5610 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5611{
5612 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5613
5614 if (wmi_handle->ops->extract_single_phyerr)
5615 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5616 evt_buf, datalen, buf_offset, phyerr);
5617
5618 return QDF_STATUS_E_FAILURE;
5619
5620}
5621
5622/**
5623 * wmi_extract_composite_phyerr() - extract composite phy error from event
5624 * @wmi_handle: wmi handle
5625 * @param evt_buf: pointer to event buffer
5626 * @param datalen: Length of event buffer
5627 * @param phyerr: Pointer to hold phy error
5628 *
5629 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5630 */
5631QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5632 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5633{
5634 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5635
5636 if (wmi_handle->ops->extract_composite_phyerr)
5637 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5638 evt_buf, datalen, phyerr);
5639
5640 return QDF_STATUS_E_FAILURE;
5641
5642}
5643
5644/**
5645 * wmi_extract_stats_param() - extract all stats count from event
5646 * @wmi_handle: wmi handle
5647 * @param evt_buf: pointer to event buffer
5648 * @param stats_param: Pointer to hold stats count
5649 *
5650 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5651 */
5652QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5653 wmi_host_stats_event *stats_param)
5654{
5655 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5656
5657 if (wmi_handle->ops->extract_all_stats_count)
5658 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5659 evt_buf, stats_param);
5660
5661 return QDF_STATUS_E_FAILURE;
5662}
5663
5664/**
5665 * wmi_extract_pdev_stats() - extract pdev stats from event
5666 * @wmi_handle: wmi handle
5667 * @param evt_buf: pointer to event buffer
5668 * @param index: Index into pdev stats
5669 * @param pdev_stats: Pointer to hold pdev stats
5670 *
5671 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5672 */
5673QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
5674 uint32_t index, wmi_host_pdev_stats *pdev_stats)
5675{
5676 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5677
5678 if (wmi_handle->ops->extract_pdev_stats)
5679 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
5680 evt_buf, index, pdev_stats);
5681
5682 return QDF_STATUS_E_FAILURE;
5683}
5684
5685/**
5686 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
5687 * @wmi_handle: wmi handle
5688 * @param evt_buf: pointer to event buffer
5689 * @param index: Index into extended pdev stats
5690 * @param pdev_ext_stats: Pointer to hold extended pdev stats
5691 *
5692 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5693 */
5694QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
5695 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
5696{
5697 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5698
5699 if (wmi_handle->ops->extract_pdev_ext_stats)
5700 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
5701 evt_buf, index, pdev_ext_stats);
5702
5703 return QDF_STATUS_E_FAILURE;
5704}
5705
5706/**
5707 * wmi_extract_peer_stats() - extract peer stats from event
5708 * @wmi_handle: wmi handle
5709 * @param evt_buf: pointer to event buffer
5710 * @param index: Index into peer stats
5711 * @param peer_stats: Pointer to hold peer stats
5712 *
5713 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5714 */
5715QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
5716 uint32_t index, wmi_host_peer_stats *peer_stats)
5717{
5718 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5719
5720 if (wmi_handle->ops->extract_peer_stats)
5721 return wmi_handle->ops->extract_peer_stats(wmi_handle,
5722 evt_buf, index, peer_stats);
5723
5724 return QDF_STATUS_E_FAILURE;
5725}
5726
5727/**
5728 * wmi_extract_vdev_stats() - extract vdev stats from event
5729 * @wmi_handle: wmi handle
5730 * @param evt_buf: pointer to event buffer
5731 * @param index: Index into vdev stats
5732 * @param vdev_stats: Pointer to hold vdev stats
5733 *
5734 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5735 */
5736QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
5737 uint32_t index, wmi_host_vdev_stats *vdev_stats)
5738{
5739 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5740
5741 if (wmi_handle->ops->extract_vdev_stats)
5742 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
5743 evt_buf, index, vdev_stats);
5744
5745 return QDF_STATUS_E_FAILURE;
5746}
5747
5748/**
5749 * wmi_extract_rtt_hdr() - extract rtt header from event
5750 * @wmi_handle: wmi handle
5751 * @param evt_buf: pointer to event buffer
5752 * @param ev: Pointer to hold rtt header
5753 *
5754 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5755 */
5756QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
5757 wmi_host_rtt_event_hdr *ev)
5758{
5759 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5760
5761 if (wmi_handle->ops->extract_rtt_hdr)
5762 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
5763 evt_buf, ev);
5764
5765 return QDF_STATUS_E_FAILURE;
5766}
5767
5768/**
5769 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
5770 * @wmi_handle: wmi handle
5771 * @param evt_buf: pointer to event buffer
5772 * @param index: Index into bcn fault stats
5773 * @param bcnflt_stats: Pointer to hold bcn fault stats
5774 *
5775 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5776 */
5777QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
5778 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
5779{
5780 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5781
5782 if (wmi_handle->ops->extract_bcnflt_stats)
5783 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
5784 evt_buf, index, bcnflt_stats);
5785
5786 return QDF_STATUS_E_FAILURE;
5787}
5788
5789/**
5790 * wmi_extract_rtt_ev() - extract rtt event
5791 * @wmi_handle: wmi handle
5792 * @param evt_buf: Pointer to event buffer
5793 * @param ev: Pointer to hold rtt event
5794 * @param hdump: Pointer to hold hex dump
5795 * @param hdump_len: hex dump length
5796 *
5797 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5798 */
5799QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
5800 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
5801{
5802 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5803
5804 if (wmi_handle->ops->extract_rtt_ev)
5805 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
5806 evt_buf, ev, hdump, hdump_len);
5807
5808 return QDF_STATUS_E_FAILURE;
5809}
5810
5811/**
5812 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
5813 * @wmi_handle: wmi handle
5814 * @param evt_buf: pointer to event buffer
5815 * @param index: Index into extended peer stats
5816 * @param peer_extd_stats: Pointer to hold extended peer stats
5817 *
5818 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5819 */
5820QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
5821 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
5822{
5823 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5824
5825 if (wmi_handle->ops->extract_peer_extd_stats)
5826 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
5827 evt_buf, index, peer_extd_stats);
5828
5829 return QDF_STATUS_E_FAILURE;
5830}
5831
5832/**
5833 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
5834 * @wmi_handle: wmi handle
5835 * @param evt_buf: pointer to event buffer
5836 * @param wds_ev: Pointer to hold rtt error report
5837 *
5838 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5839 */
5840QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
5841 wmi_host_rtt_error_report_event *ev)
5842{
5843 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5844
5845 if (wmi_handle->ops->extract_rtt_error_report_ev)
5846 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
5847 evt_buf, ev);
5848
5849 return QDF_STATUS_E_FAILURE;
5850}
5851
5852/**
5853 * wmi_extract_chan_stats() - extract chan stats from event
5854 * @wmi_handle: wmi handle
5855 * @param evt_buf: pointer to event buffer
5856 * @param index: Index into chan stats
5857 * @param chanstats: Pointer to hold chan stats
5858 *
5859 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5860 */
5861QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
5862 uint32_t index, wmi_host_chan_stats *chan_stats)
5863{
5864 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5865
5866 if (wmi_handle->ops->extract_chan_stats)
5867 return wmi_handle->ops->extract_chan_stats(wmi_handle,
5868 evt_buf, index, chan_stats);
5869
5870 return QDF_STATUS_E_FAILURE;
5871}
5872
5873/**
5874 * wmi_extract_thermal_stats() - extract thermal stats from event
5875 * @wmi_handle: wmi handle
5876 * @param evt_buf: Pointer to event buffer
5877 * @param temp: Pointer to hold extracted temperature
5878 * @param level: Pointer to hold extracted level
5879 *
5880 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5881 */
5882QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
5883 uint32_t *temp, uint32_t *level)
5884{
5885 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5886
5887 if (wmi_handle->ops->extract_thermal_stats)
5888 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
5889 evt_buf, temp, level);
5890
5891 return QDF_STATUS_E_FAILURE;
5892}
5893
5894/**
5895 * wmi_extract_profile_ctx() - extract profile context from event
5896 * @wmi_handle: wmi handle
5897 * @param evt_buf: pointer to event buffer
5898 * @param profile_ctx: Pointer to hold profile context
5899 *
5900 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5901 */
5902QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
5903 wmi_host_wlan_profile_ctx_t *profile_ctx)
5904{
5905 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5906
5907 if (wmi_handle->ops->extract_profile_ctx)
5908 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
5909 evt_buf, profile_ctx);
5910
5911 return QDF_STATUS_E_FAILURE;
5912}
5913
5914/**
5915 * wmi_extract_thermal_level_stats() - extract thermal level stats from
5916 * event
5917 * @wmi_handle: wmi handle
5918 * @param evt_buf: pointer to event buffer
5919 * @param idx: Index to level stats
5920 * @param levelcount: Pointer to hold levelcount
5921 * @param dccount: Pointer to hold dccount
5922 *
5923 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5924 */
5925QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
5926 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
5927{
5928 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5929
5930 if (wmi_handle->ops->extract_thermal_level_stats)
5931 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
5932 evt_buf, idx, levelcount, dccount);
5933
5934 return QDF_STATUS_E_FAILURE;
5935}
5936
5937/**
5938 * wmi_extract_profile_data() - extract profile data from event
5939 * @wmi_handle: wmi handle
5940 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05305941 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305942 * @param profile_data: Pointer to hold profile data
5943 *
5944 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5945 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05305946QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305947 wmi_host_wlan_profile_t *profile_data)
5948{
5949 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5950
5951 if (wmi_handle->ops->extract_profile_data)
5952 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05305953 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305954
5955 return QDF_STATUS_E_FAILURE;
5956}
5957
5958/**
5959 * wmi_extract_chan_info_event() - extract chan information from event
5960 * @wmi_handle: wmi handle
5961 * @param evt_buf: pointer to event buffer
5962 * @param chan_info: Pointer to hold chan information
5963 *
5964 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5965 */
5966QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
5967 wmi_host_chan_info_event *chan_info)
5968{
5969 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5970
5971 if (wmi_handle->ops->extract_chan_info_event)
5972 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
5973 evt_buf, chan_info);
5974
5975 return QDF_STATUS_E_FAILURE;
5976}
5977
5978/**
5979 * wmi_extract_channel_hopping_event() - extract channel hopping param
5980 * from event
5981 * @wmi_handle: wmi handle
5982 * @param evt_buf: pointer to event buffer
5983 * @param ch_hopping: Pointer to hold channel hopping param
5984 *
5985 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5986 */
5987QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
5988 wmi_host_pdev_channel_hopping_event *ch_hopping)
5989{
5990 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5991
5992 if (wmi->ops->extract_channel_hopping_event)
5993 return wmi->ops->extract_channel_hopping_event(wmi,
5994 evt_buf, ch_hopping);
5995
5996 return QDF_STATUS_E_FAILURE;
5997}
5998
5999/**
6000 * wmi_extract_bss_chan_info_event() - extract bss channel information
6001 * from event
6002 * @wmi_handle: wmi handle
6003 * @param evt_buf: pointer to event buffer
6004 * @param bss_chan_info: Pointer to hold bss channel information
6005 *
6006 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6007 */
6008QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6009 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6010{
6011 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6012
6013 if (wmi_handle->ops->extract_bss_chan_info_event)
6014 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6015 evt_buf, bss_chan_info);
6016
6017 return QDF_STATUS_E_FAILURE;
6018}
6019
6020/**
6021 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6022 * @wmi_handle: wmi handle
6023 * @param evt_buf: pointer to event buffer
6024 * @param inst_rssi_resp: Pointer to hold inst rssi response
6025 *
6026 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6027 */
6028QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6029 wmi_host_inst_stats_resp *inst_rssi_resp)
6030{
6031 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6032
6033 if (wmi->ops->extract_inst_rssi_stats_event)
6034 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6035 evt_buf, inst_rssi_resp);
6036
6037 return QDF_STATUS_E_FAILURE;
6038}
6039
6040/**
6041 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6042 * from event
6043 * @wmi_handle: wmi handle
6044 * @param evt_buf: pointer to event buffer
6045 * @param index: Index into chan stats
6046 * @param ev: Pointer to hold data traffic control
6047 *
6048 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6049 */
6050QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6051 wmi_host_tx_data_traffic_ctrl_event *ev)
6052{
6053 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6054
6055 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6056 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6057 evt_buf, ev);
6058
6059 return QDF_STATUS_E_FAILURE;
6060}
6061
6062/**
6063 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6064 * @wmi_handle: wmi handle
6065 * @param evt_buf: pointer to event buffer
6066 * @param index: Index into extended vdev stats
6067 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6068 *
6069 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6070 */
6071QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6072 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6073{
6074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6075
6076 if (wmi_handle->ops->extract_vdev_extd_stats)
6077 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6078 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306079 return QDF_STATUS_E_FAILURE;
6080}
6081
6082/**
6083 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6084 * adaptive dwelltime configuration params
6085 * @wma_handle: wma handler
6086 * @dwelltime_params: pointer to dwelltime_params
6087 *
6088 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6089 */
6090QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6091 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6092{
6093 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6094
6095 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6096 return wmi_handle->ops->
6097 send_adapt_dwelltime_params_cmd(wmi_handle,
6098 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306099
6100 return QDF_STATUS_E_FAILURE;
6101}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306102
6103/**
6104 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6105 * @wmi_handle: wmi handle
6106 * @param: wmi power debug parameter
6107 *
6108 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6109 *
6110 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6111 */
6112QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6113 struct wmi_power_dbg_params *param)
6114{
6115 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6116
6117 if (wmi_handle->ops->send_power_dbg_cmd)
6118 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6119 param);
6120
6121 return QDF_STATUS_E_FAILURE;
6122}