blob: 3d9e1854b23ef58e2448993966970cfa0f25c461 [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
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530581#ifdef CONFIG_MCL
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
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301208#ifdef CONFIG_MCL
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 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301326#ifdef CONFIG_MCL
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
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301536#ifdef CONFIG_MCL
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 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302126#ifdef CONFIG_MCL
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 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302312#ifdef CONFIG_MCL
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,
Mukul Sharma3a5eedb2016-09-07 20:31:47 +05303144 struct host_offload_req_param *arp_offload_req,
3145 struct host_offload_req_param *ns_offload_req,
3146 bool arp_only,
Govind Singha4836fd2016-03-07 16:45:38 +05303147 uint8_t vdev_id)
3148{
3149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3150
3151 if (wmi_handle->ops->send_enable_arp_ns_offload_cmd)
3152 return wmi_handle->ops->send_enable_arp_ns_offload_cmd(wmi_handle,
Mukul Sharma3a5eedb2016-09-07 20:31:47 +05303153 arp_offload_req, ns_offload_req, arp_only,
Govind Singha4836fd2016-03-07 16:45:38 +05303154 vdev_id);
3155
Govind Singhb53420c2016-03-09 14:32:57 +05303156 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303157}
3158
3159/**
3160 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
3161 * @wmi_hdl: wmi handle
3162 * @flashing: flashing request
3163 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303164 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303165 */
Govind Singhb53420c2016-03-09 14:32:57 +05303166QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303167 struct flashing_req_params *flashing)
3168{
3169 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3170
3171 if (wmi_handle->ops->send_set_led_flashing_cmd)
3172 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
3173 flashing);
3174
Govind Singhb53420c2016-03-09 14:32:57 +05303175 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303176}
3177
3178/**
3179 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
3180 * @wmi_hdl: wmi handle
3181 * @appType1Params: app type1 params
3182 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303183 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303184 */
Govind Singhb53420c2016-03-09 14:32:57 +05303185QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303186 struct app_type1_params *app_type1_params)
3187{
3188 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3189
3190 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
3191 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
3192 app_type1_params);
3193
Govind Singhb53420c2016-03-09 14:32:57 +05303194 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303195}
3196
3197/**
3198 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
3199 * @wmi_hdl: wmi handle
3200 * @request: SSID hotlist set request
3201 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303202 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303203 */
Govind Singhb53420c2016-03-09 14:32:57 +05303204QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05303205wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
3206 struct ssid_hotlist_request_params *request)
3207{
3208 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3209
3210 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
3211 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
3212 request);
3213
Govind Singhb53420c2016-03-09 14:32:57 +05303214 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303215}
3216
3217/**
3218 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
3219 * @wmi_hdl: wmi handle
3220 * @vdev_id: vdev id
3221 *
3222 * This function sends roam synch complete event to fw.
3223 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303224 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303225 */
Govind Singhb53420c2016-03-09 14:32:57 +05303226QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303227 uint8_t vdev_id)
3228{
3229 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3230
3231 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
3232 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
3233 vdev_id);
3234
Govind Singhb53420c2016-03-09 14:32:57 +05303235 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303236}
3237
3238/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05303239 * wmi_unified_fw_test_cmd() - send fw test command to fw.
3240 * @wmi_hdl: wmi handle
3241 * @wmi_fwtest: fw test command
3242 *
3243 * This function sends fw test command to fw.
3244 *
3245 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3246 */
3247QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
3248 struct set_fwtest_params *wmi_fwtest)
3249{
3250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3251
3252 if (wmi_handle->ops->send_fw_test_cmd)
3253 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
3254 wmi_fwtest);
3255
3256 return QDF_STATUS_E_FAILURE;
3257
3258}
3259
3260/**
Govind Singha4836fd2016-03-07 16:45:38 +05303261 * wmi_unified_unit_test_cmd() - send unit test command to fw.
3262 * @wmi_hdl: wmi handle
3263 * @wmi_utest: unit test command
3264 *
3265 * This function send unit test command to fw.
3266 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303267 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303268 */
Govind Singhb53420c2016-03-09 14:32:57 +05303269QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303270 struct wmi_unit_test_cmd *wmi_utest)
3271{
3272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3273
3274 if (wmi_handle->ops->send_unit_test_cmd)
3275 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
3276 wmi_utest);
3277
Govind Singhb53420c2016-03-09 14:32:57 +05303278 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303279}
3280
3281/**
3282 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
3283 * @wmi_hdl: wmi handle
3284 * @roaminvoke: roam invoke command
3285 *
3286 * Send roam invoke command to fw for fastreassoc.
3287 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303288 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303289 */
Govind Singhb53420c2016-03-09 14:32:57 +05303290QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303291 struct wmi_roam_invoke_cmd *roaminvoke,
3292 uint32_t ch_hz)
3293{
3294 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3295
3296 if (wmi_handle->ops->send_roam_invoke_cmd)
3297 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
3298 roaminvoke, ch_hz);
3299
Govind Singhb53420c2016-03-09 14:32:57 +05303300 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303301}
3302
3303/**
3304 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
3305 * @wmi_hdl: wmi handle
3306 * @command: command
3307 * @vdev_id: vdev id
3308 *
3309 * This function set roam offload command to fw.
3310 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303311 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303312 */
Govind Singhb53420c2016-03-09 14:32:57 +05303313QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303314 uint32_t command, uint32_t vdev_id)
3315{
3316 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3317
3318 if (wmi_handle->ops->send_roam_scan_offload_cmd)
3319 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
3320 command, vdev_id);
3321
Govind Singhb53420c2016-03-09 14:32:57 +05303322 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303323}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05303324#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05303325/**
3326 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
3327 * @wmi_hdl: wmi handle
3328 * @ap_profile_p: ap profile
3329 * @vdev_id: vdev id
3330 *
3331 * Send WMI_ROAM_AP_PROFILE to firmware
3332 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303333 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303334 */
Govind Singhb53420c2016-03-09 14:32:57 +05303335QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303336 wmi_ap_profile *ap_profile_p,
3337 uint32_t vdev_id)
3338{
3339 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3340
3341 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
3342 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(wmi_handle,
3343 ap_profile_p, vdev_id);
3344
Govind Singhb53420c2016-03-09 14:32:57 +05303345 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303346}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303347#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303348/**
3349 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3350 * @wmi_handle: wmi handle
3351 * @scan_period: scan period
3352 * @scan_age: scan age
3353 * @vdev_id: vdev id
3354 *
3355 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3356 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303357 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303358 */
Govind Singhb53420c2016-03-09 14:32:57 +05303359QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303360 uint32_t scan_period,
3361 uint32_t scan_age,
3362 uint32_t vdev_id)
3363{
3364 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3365
3366 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3367 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3368 scan_period, scan_age, vdev_id);
3369
Govind Singhb53420c2016-03-09 14:32:57 +05303370 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303371}
3372
3373/**
3374 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3375 * @wmi_handle: wmi handle
3376 * @chan_count: channel count
3377 * @chan_list: channel list
3378 * @list_type: list type
3379 * @vdev_id: vdev id
3380 *
3381 * Set roam offload channel list.
3382 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303383 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303384 */
Govind Singhb53420c2016-03-09 14:32:57 +05303385QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303386 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003387 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303388 uint8_t list_type, uint32_t vdev_id)
3389{
3390 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3391
3392 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3393 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3394 chan_count, chan_list,
3395 list_type, vdev_id);
3396
Govind Singhb53420c2016-03-09 14:32:57 +05303397 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303398}
3399
3400/**
3401 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3402 * @wmi_hdl: wmi handle
3403 * @rssi_change_thresh: RSSI Change threshold
3404 * @bcn_rssi_weight: beacon RSSI weight
3405 * @vdev_id: vdev id
3406 *
3407 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3408 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303409 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303410 */
Govind Singhb53420c2016-03-09 14:32:57 +05303411QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303412 uint32_t vdev_id,
3413 int32_t rssi_change_thresh,
3414 uint32_t bcn_rssi_weight,
3415 uint32_t hirssi_delay_btw_scans)
3416{
3417 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3418
3419 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3420 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3421 vdev_id, rssi_change_thresh,
3422 bcn_rssi_weight, hirssi_delay_btw_scans);
3423
Govind Singhb53420c2016-03-09 14:32:57 +05303424 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303425}
3426
3427/**
3428 * wmi_unified_get_buf_extscan_hotlist_cmd() - prepare hotlist command
3429 * @wmi_hdl: wmi handle
3430 * @photlist: hotlist command params
3431 * @buf_len: buffer length
3432 *
3433 * This function fills individual elements for hotlist request and
3434 * TLV for bssid entries
3435 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303436 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singha4836fd2016-03-07 16:45:38 +05303437 */
Govind Singhb53420c2016-03-09 14:32:57 +05303438QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303439 struct ext_scan_setbssi_hotlist_params *
3440 photlist, int *buf_len)
3441{
3442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3443
3444 if (wmi_handle->ops->send_get_buf_extscan_hotlist_cmd)
3445 return wmi_handle->ops->send_get_buf_extscan_hotlist_cmd(wmi_handle,
3446 photlist, buf_len);
3447
Govind Singhb53420c2016-03-09 14:32:57 +05303448 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303449}
3450
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303451/**
3452 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3453 * @param wmi_handle : handle to WMI.
3454 * @param param : tpc config param
3455 *
3456 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3457 */
3458QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3459 uint32_t param)
3460{
3461 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3462
3463 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3464 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3465 param);
3466
3467 return QDF_STATUS_E_FAILURE;
3468}
3469
3470/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303471 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3472 * @param wmi_handle : handle to WMI.
3473 * @param param : pointer to set bwf param
3474 *
3475 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3476 */
3477QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3478 struct set_bwf_params *param)
3479{
3480 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3481
3482 if (wmi_handle->ops->send_set_bwf_cmd)
3483 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3484
3485 return QDF_STATUS_E_FAILURE;
3486}
3487
3488/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303489 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3490 * @param wmi_handle : handle to WMI.
3491 * @param param : pointer to set atf param
3492 *
3493 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3494 */
3495QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3496 struct set_atf_params *param)
3497{
3498 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3499
3500 if (wmi_handle->ops->send_set_atf_cmd)
3501 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3502
3503 return QDF_STATUS_E_FAILURE;
3504}
3505
3506/**
3507 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3508 * @param wmi_handle : handle to WMI.
3509 * @param param : pointer to hold pdev fips param
3510 *
3511 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3512 */
3513QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3514 struct fips_params *param)
3515{
3516 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3517
3518 if (wmi_handle->ops->send_pdev_fips_cmd)
3519 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3520
3521 return QDF_STATUS_E_FAILURE;
3522}
3523
3524/**
3525 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3526 * @param wmi_handle : handle to WMI.
3527 * @param param : pointer to hold wlan profile param
3528 *
3529 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3530 */
3531QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3532 struct wlan_profile_params *param)
3533{
3534 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3535
3536 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3537 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3538 param);
3539
3540 return QDF_STATUS_E_FAILURE;
3541}
3542
3543/**
3544 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3545 * @param wmi_handle : handle to WMI.
3546 * @param param : pointer to hold wlan profile param
3547 *
3548 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3549 */
3550QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3551 struct wlan_profile_params *param)
3552{
3553 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3554
3555 if (wmi->ops->send_wlan_profile_trigger_cmd)
3556 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3557 param);
3558
3559 return QDF_STATUS_E_FAILURE;
3560}
3561
3562/**
3563 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3564 * @param wmi_handle : handle to WMI.
3565 * @param param : pointer to hold channel param
3566 *
3567 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3568 */
3569QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3570 struct channel_param *param)
3571{
3572 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3573
3574 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3575 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3576 param);
3577
3578 return QDF_STATUS_E_FAILURE;
3579}
3580
3581/**
3582 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3583 * @param wmi_handle : handle to WMI.
3584 * @param param : pointer to hold channel param
3585 *
3586 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3587 */
3588QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3589 struct ht_ie_params *param)
3590{
3591 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3592
3593 if (wmi_handle->ops->send_set_ht_ie_cmd)
3594 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3595
3596 return QDF_STATUS_E_FAILURE;
3597}
3598
3599/**
3600 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3601 * @param wmi_handle : handle to WMI.
3602 * @param param : pointer to hold channel param
3603 *
3604 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3605 */
3606QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3607 struct vht_ie_params *param)
3608{
3609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3610
3611 if (wmi_handle->ops->send_set_vht_ie_cmd)
3612 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3613
3614 return QDF_STATUS_E_FAILURE;
3615}
3616
3617/**
3618 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3619 * @param wmi_handle : handle to WMI.
3620 * @param param : pointer to hold wmm param
3621 *
3622 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3623 */
3624QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3625 struct wmm_update_params *param)
3626{
3627 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3628
3629 if (wmi_handle->ops->send_wmm_update_cmd)
3630 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3631
3632 return QDF_STATUS_E_FAILURE;
3633}
3634
3635/**
3636 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3637 * @param wmi_handle : handle to WMI.
3638 * @param param : pointer to hold ant switch tbl param
3639 *
3640 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3641 */
3642QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3643 struct ant_switch_tbl_params *param)
3644{
3645 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3646
3647 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3648 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3649 param);
3650
3651 return QDF_STATUS_E_FAILURE;
3652}
3653
3654/**
3655 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3656 * @param wmi_handle : handle to WMI.
3657 * @param param : pointer to hold ratepwr table param
3658 *
3659 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3660 */
3661QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3662 struct ratepwr_table_params *param)
3663{
3664 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3665
3666 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3667 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3668 param);
3669
3670 return QDF_STATUS_E_FAILURE;
3671}
3672
3673/**
3674 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3675 * @param wmi_handle : handle to WMI.
3676 *
3677 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3678 */
3679QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3680{
3681 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3682
3683 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3684 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3685
3686 return QDF_STATUS_E_FAILURE;
3687}
3688
3689/**
3690 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3691 * @param wmi_handle : handle to WMI.
3692 * @param param : pointer to hold ctl table param
3693 *
3694 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3695 */
3696QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3697 struct ctl_table_params *param)
3698{
3699 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3700
3701 if (wmi_handle->ops->send_set_ctl_table_cmd)
3702 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3703 param);
3704
3705 return QDF_STATUS_E_FAILURE;
3706}
3707
3708/**
3709 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3710 * @param wmi_handle : handle to WMI.
3711 * @param param : pointer to hold mimogain param
3712 *
3713 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3714 */
3715QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3716 struct mimogain_table_params *param)
3717{
3718 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3719
3720 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3721 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3722 param);
3723
3724 return QDF_STATUS_E_FAILURE;
3725}
3726
3727/**
3728 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3729 * chainmsk cmd function
3730 * @param wmi_handle : handle to WMI.
3731 * @param param : pointer to hold ratepwr chainmsk param
3732 *
3733 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3734 */
3735QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3736 struct ratepwr_chainmsk_params *param)
3737{
3738 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3739
3740 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3741 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3742
3743 return QDF_STATUS_E_FAILURE;
3744}
3745
3746/**
3747 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3748 * @param wmi_handle : handle to WMI.
3749 * @param param : pointer to hold macaddr param
3750 *
3751 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3752 */
3753QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3754 struct macaddr_params *param)
3755{
3756 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3757
3758 if (wmi_handle->ops->send_set_macaddr_cmd)
3759 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3760
3761 return QDF_STATUS_E_FAILURE;
3762}
3763
3764/**
3765 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3766 * @param wmi_handle : handle to WMI.
3767 *
3768 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3769 */
3770QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3771{
3772 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3773
3774 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3775 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3776
3777 return QDF_STATUS_E_FAILURE;
3778}
3779
3780/**
3781 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3782 * @param wmi_handle : handle to WMI.
3783 *
3784 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3785 */
3786QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3787{
3788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3789
3790 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3791 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3792
3793 return QDF_STATUS_E_FAILURE;
3794}
3795
3796/**
3797 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3798 * @param wmi_handle : handle to WMI.
3799 * @param param : pointer to hold acparams param
3800 *
3801 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3802 */
3803QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3804 struct acparams_params *param)
3805{
3806 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3807
3808 if (wmi_handle->ops->send_set_acparams_cmd)
3809 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3810 param);
3811
3812 return QDF_STATUS_E_FAILURE;
3813}
3814
3815/**
3816 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3817 * tid map cmd function
3818 * @param wmi_handle : handle to WMI.
3819 * @param param : pointer to hold dscp param
3820 *
3821 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3822 */
3823QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3824 struct vap_dscp_tid_map_params *param)
3825{
3826 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3827
3828 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3829 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3830
3831 return QDF_STATUS_E_FAILURE;
3832}
3833
3834/**
3835 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3836 * reserve cmd function
3837 * @param wmi_handle : handle to WMI.
3838 * @param param : pointer to hold ast param
3839 *
3840 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3841 */
3842QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3843 struct proxy_ast_reserve_params *param)
3844{
3845 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3846
3847 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3848 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3849 param);
3850
3851 return QDF_STATUS_E_FAILURE;
3852}
3853
3854/**
3855 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3856 * @param wmi_handle : handle to WMI.
3857 * @param param : pointer to hold qvit param
3858 *
3859 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3860 */
3861QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3862 struct pdev_qvit_params *param)
3863{
3864 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3865
3866 if (wmi_handle->ops->send_pdev_qvit_cmd)
3867 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3868
3869 return QDF_STATUS_E_FAILURE;
3870}
3871
3872/**
3873 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3874 * @param wmi_handle : handle to WMI.
3875 * @param param : pointer to hold mcast grp param
3876 *
3877 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3878 */
3879QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3880 struct mcast_group_update_params *param)
3881{
3882 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3883
3884 if (wmi_handle->ops->send_mcast_group_update_cmd)
3885 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3886 param);
3887
3888 return QDF_STATUS_E_FAILURE;
3889}
3890
3891/**
3892 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3893 * @param wmi_handle : handle to WMI.
3894 * @param param : pointer to hold wds entry param
3895 *
3896 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3897 */
3898QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3899 struct peer_add_wds_entry_params *param)
3900{
3901 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3902
3903 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3904 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3905 param);
3906
3907 return QDF_STATUS_E_FAILURE;
3908}
3909
3910/**
3911 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3912 * @param wmi_handle : handle to WMI.
3913 * @param param : pointer to hold wds entry param
3914 *
3915 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3916 */
3917QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3918 struct peer_del_wds_entry_params *param)
3919{
3920 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3921
3922 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3923 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3924 param);
3925
3926 return QDF_STATUS_E_FAILURE;
3927}
3928
3929/**
3930 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3931 * @param wmi_handle : handle to WMI.
3932 * @param param : pointer to hold wds entry param
3933 *
3934 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3935 */
3936QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3937 struct peer_update_wds_entry_params *param)
3938{
3939 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3940
3941 if (wmi->ops->send_peer_update_wds_entry_cmd)
3942 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3943
3944 return QDF_STATUS_E_FAILURE;
3945}
3946
3947/**
3948 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3949 * @param wmi_handle : handle to WMI.
3950 * @param param : pointer to hold phyerr enable param
3951 *
3952 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3953 */
3954QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3955{
3956 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3957
3958 if (wmi_handle->ops->send_phyerr_enable_cmd)
3959 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3960
3961 return QDF_STATUS_E_FAILURE;
3962}
3963
3964/**
3965 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3966 * @param wmi_handle : handle to WMI.
3967 * @param param : pointer to hold phyerr disable param
3968 *
3969 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3970 */
3971QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3972{
3973 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3974
3975 if (wmi_handle->ops->send_phyerr_disable_cmd)
3976 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3977
3978 return QDF_STATUS_E_FAILURE;
3979}
3980
3981/**
3982 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3983 * @param wmi_handle : handle to WMI.
3984 * @param param : pointer to hold antenna param
3985 *
3986 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3987 */
3988QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3989 struct smart_ant_enable_params *param)
3990{
3991 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3992
3993 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3994 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3995 param);
3996
3997 return QDF_STATUS_E_FAILURE;
3998}
3999
4000/**
4001 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
4002 * @param wmi_handle : handle to WMI.
4003 * @param param : pointer to hold antenna param
4004 *
4005 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4006 */
4007QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
4008 struct smart_ant_rx_ant_params *param)
4009{
4010 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4011
4012 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
4013 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
4014
4015 return QDF_STATUS_E_FAILURE;
4016}
4017
4018/**
4019 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
4020 * @param wmi_handle : handle to WMI.
4021 * @param param : pointer to hold antenna param
4022 *
4023 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4024 */
4025QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
4026 uint8_t macaddr[IEEE80211_ADDR_LEN],
4027 struct smart_ant_tx_ant_params *param)
4028{
4029 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4030
4031 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
4032 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
4033 param);
4034
4035 return QDF_STATUS_E_FAILURE;
4036}
4037
4038/**
4039 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
4040 * @param wmi_handle : handle to WMI.
4041 * @param param : pointer to hold antenna param
4042 *
4043 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4044 */
4045QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
4046 uint8_t macaddr[IEEE80211_ADDR_LEN],
4047 struct smart_ant_training_info_params *param)
4048{
4049 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4050
4051 if (wmi->ops->send_smart_ant_set_training_info_cmd)
4052 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
4053 macaddr, param);
4054
4055 return QDF_STATUS_E_FAILURE;
4056}
4057
4058/**
4059 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
4060 * @param wmi_handle : handle to WMI.
4061 * @param macaddr : MAC address
4062 * @param param : pointer to hold node parameter
4063 *
4064 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4065 */
4066QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
4067 uint8_t macaddr[IEEE80211_ADDR_LEN],
4068 struct smart_ant_node_config_params *param)
4069{
4070 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4071
4072 if (wmi->ops->send_smart_ant_set_node_config_cmd)
4073 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
4074 macaddr, param);
4075
4076 return QDF_STATUS_E_FAILURE;
4077}
4078
4079/**
4080 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
4081 * @param wmi_handle : handle to WMI.
4082 * @param param : pointer to hold antenna param
4083 *
4084 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4085 */
4086QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
4087 struct smart_ant_enable_tx_feedback_params *param)
4088{
4089 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4090
4091 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
4092 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
4093 param);
4094
4095 return QDF_STATUS_E_FAILURE;
4096}
4097
4098/**
4099 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
4100 * @param wmi_handle : handle to WMI.
4101 * @param param : pointer to hold spectral config param
4102 *
4103 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4104 */
4105QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
4106 struct vdev_spectral_configure_params *param)
4107{
4108 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4109
4110 if (wmi->ops->send_vdev_spectral_configure_cmd)
4111 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
4112
4113 return QDF_STATUS_E_FAILURE;
4114}
4115
4116/**
4117 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
4118 * @param wmi_handle : handle to WMI.
4119 * @param param : pointer to hold enable spectral param
4120 *
4121 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4122 */
4123QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
4124 struct vdev_spectral_enable_params *param)
4125{
4126 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4127
4128 if (wmi->ops->send_vdev_spectral_enable_cmd)
4129 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
4130
4131 return QDF_STATUS_E_FAILURE;
4132}
4133
4134/**
4135 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
4136 * @param wmi_handle : handle to WMI.
4137 * @param param : pointer to hold chan info param
4138 *
4139 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4140 */
4141QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
4142 struct bss_chan_info_request_params *param)
4143{
4144 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4145
4146 if (wmi->ops->send_bss_chan_info_request_cmd)
4147 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
4148
4149 return QDF_STATUS_E_FAILURE;
4150}
4151
4152/**
4153 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
4154 * @param wmi_handle : handle to WMI.
4155 * @param param : pointer to hold thermal mitigation param
4156 *
4157 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4158 */
4159QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
4160 struct thermal_mitigation_params *param)
4161{
4162 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4163
4164 if (wmi->ops->send_thermal_mitigation_param_cmd)
4165 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
4166
4167 return QDF_STATUS_E_FAILURE;
4168}
4169
4170/**
4171 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
4172 * @param wmi_handle : handle to WMI.
4173 * @param macaddr : MAC address
4174 * @param param : pointer to hold neighbour rx parameter
4175 *
4176 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4177 */
4178QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
4179 uint8_t macaddr[IEEE80211_ADDR_LEN],
4180 struct set_neighbour_rx_params *param)
4181{
4182 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4183
4184 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
4185 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
4186 macaddr, param);
4187
4188 return QDF_STATUS_E_FAILURE;
4189}
4190
4191/**
4192 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
4193 * @param wmi_handle : handle to WMI.
4194 * @param param : pointer to hold fwtest param
4195 *
4196 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4197 */
4198QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
4199 struct set_fwtest_params *param)
4200{
4201 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4202
4203 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
4204 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
4205
4206 return QDF_STATUS_E_FAILURE;
4207}
4208
4209/**
4210 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4211 * @param wmi_handle : handle to WMI.
4212 * @param param : pointer to hold config ratemask param
4213 *
4214 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4215 */
4216QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4217 struct config_ratemask_params *param)
4218{
4219 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4220
4221 if (wmi->ops->send_vdev_config_ratemask_cmd)
4222 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4223
4224 return QDF_STATUS_E_FAILURE;
4225}
4226
4227/**
4228 * wmi_unified_vdev_install_key_cmd_send() - WMI install key function
4229 * @param wmi_handle : handle to WMI.
4230 * @param macaddr : MAC address
4231 * @param param : pointer to hold key parameter
4232 *
4233 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4234 */
4235QDF_STATUS wmi_unified_vdev_install_key_cmd_send(void *wmi_hdl,
4236 uint8_t macaddr[IEEE80211_ADDR_LEN],
4237 struct vdev_install_key_params *param)
4238{
4239 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4240
4241 if (wmi_handle->ops->send_vdev_install_key_cmd)
4242 return wmi_handle->ops->send_vdev_install_key_cmd(wmi_handle,
4243 macaddr, param);
4244
4245 return QDF_STATUS_E_FAILURE;
4246}
4247
4248/**
4249 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4250 * @param wmi_handle : handle to WMI.
4251 * @param param : pointer to hold regdomain param
4252 *
4253 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4254 */
4255QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4256 struct pdev_set_regdomain_params *param)
4257{
4258 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4259
4260 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4261 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4262 param);
4263
4264 return QDF_STATUS_E_FAILURE;
4265}
4266
4267/**
4268 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4269 * @param wmi_handle : handle to WMI.
4270 * @param param : pointer to hold quiet mode param
4271 *
4272 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4273 */
4274QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4275 struct set_quiet_mode_params *param)
4276{
4277 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4278
4279 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4280 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4281 param);
4282
4283 return QDF_STATUS_E_FAILURE;
4284}
4285
4286/**
4287 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4288 * @param wmi_handle : handle to WMI.
4289 * @param param : pointer to hold beacon filter param
4290 *
4291 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4292 */
4293QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4294 struct set_beacon_filter_params *param)
4295{
4296 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4297
4298 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4299 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4300 param);
4301
4302 return QDF_STATUS_E_FAILURE;
4303}
4304
4305/**
4306 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4307 * @param wmi_handle : handle to WMI.
4308 * @param param : pointer to hold beacon filter param
4309 *
4310 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4311 */
4312QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4313 struct remove_beacon_filter_params *param)
4314{
4315 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4316
4317 if (wmi->ops->send_remove_beacon_filter_cmd)
4318 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4319
4320 return QDF_STATUS_E_FAILURE;
4321}
4322
4323/**
4324 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4325 * @param wmi_handle : handle to WMI.
4326 * @param macaddr : MAC address
4327 * @param param : pointer to hold mgmt parameter
4328 *
4329 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4330 */
4331#if 0
4332QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4333 uint8_t macaddr[IEEE80211_ADDR_LEN],
4334 struct mgmt_params *param)
4335{
4336 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4337
4338 if (wmi_handle->ops->send_mgmt_cmd)
4339 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4340 macaddr, param);
4341
4342 return QDF_STATUS_E_FAILURE;
4343}
4344#endif
4345
4346/**
4347 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4348 * @param wmi_handle : handle to WMI.
4349 * @param macaddr : MAC address
4350 * @param param : pointer to hold addba resp parameter
4351 *
4352 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4353 */
4354QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4355 uint8_t macaddr[IEEE80211_ADDR_LEN],
4356 struct addba_clearresponse_params *param)
4357{
4358 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4359
4360 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4361 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4362 macaddr, param);
4363
4364 return QDF_STATUS_E_FAILURE;
4365}
4366
4367/**
4368 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4369 * @param wmi_handle : handle to WMI.
4370 * @param macaddr : MAC address
4371 * @param param : pointer to hold addba parameter
4372 *
4373 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4374 */
4375QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4376 uint8_t macaddr[IEEE80211_ADDR_LEN],
4377 struct addba_send_params *param)
4378{
4379 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4380
4381 if (wmi_handle->ops->send_addba_send_cmd)
4382 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4383 macaddr, param);
4384
4385 return QDF_STATUS_E_FAILURE;
4386}
4387
4388/**
4389 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4390 * @param wmi_handle : handle to WMI.
4391 * @param macaddr : MAC address
4392 * @param param : pointer to hold delba parameter
4393 *
4394 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4395 */
4396QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4397 uint8_t macaddr[IEEE80211_ADDR_LEN],
4398 struct delba_send_params *param)
4399{
4400 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4401
4402 if (wmi_handle->ops->send_delba_send_cmd)
4403 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4404 macaddr, param);
4405
4406 return QDF_STATUS_E_FAILURE;
4407}
4408
4409/**
4410 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4411 * @param wmi_handle : handle to WMI.
4412 * @param macaddr : MAC address
4413 * @param param : pointer to hold addba set resp parameter
4414 *
4415 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4416 */
4417QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4418 uint8_t macaddr[IEEE80211_ADDR_LEN],
4419 struct addba_setresponse_params *param)
4420{
4421 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4422
4423 if (wmi_handle->ops->send_addba_setresponse_cmd)
4424 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4425 macaddr, param);
4426
4427 return QDF_STATUS_E_FAILURE;
4428}
4429
4430/**
4431 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4432 * @param wmi_handle : handle to WMI.
4433 * @param macaddr : MAC address
4434 * @param param : pointer to hold singleamsdu parameter
4435 *
4436 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4437 */
4438QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4439 uint8_t macaddr[IEEE80211_ADDR_LEN],
4440 struct singleamsdu_params *param)
4441{
4442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4443
4444 if (wmi_handle->ops->send_singleamsdu_cmd)
4445 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4446 macaddr, param);
4447
4448 return QDF_STATUS_E_FAILURE;
4449}
4450
4451/**
4452 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4453 * @param wmi_handle : handle to WMI.
4454 * @param macaddr : MAC address
4455 * @param param : pointer to hold set_qboost parameter
4456 *
4457 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4458 */
4459QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4460 uint8_t macaddr[IEEE80211_ADDR_LEN],
4461 struct set_qboost_params *param)
4462{
4463 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4464
4465 if (wmi_handle->ops->send_set_qboost_param_cmd)
4466 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4467 macaddr, param);
4468
4469 return QDF_STATUS_E_FAILURE;
4470}
4471
4472/**
4473 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4474 * @param wmi_handle : handle to WMI.
4475 * @param param : pointer to hold mu scan param
4476 *
4477 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4478 */
4479QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4480 struct mu_scan_params *param)
4481{
4482 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4483
4484 if (wmi_handle->ops->send_mu_scan_cmd)
4485 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4486
4487 return QDF_STATUS_E_FAILURE;
4488}
4489
4490/**
4491 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4492 * @param wmi_handle : handle to WMI.
4493 * @param param : pointer to hold mu scan param
4494 *
4495 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4496 */
4497QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4498 struct lteu_config_params *param)
4499{
4500 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4501
4502 if (wmi_handle->ops->send_lteu_config_cmd)
4503 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4504
4505 return QDF_STATUS_E_FAILURE;
4506}
4507
4508/**
4509 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4510 * @param wmi_handle : handle to WMI.
4511 * @param param : pointer to hold mu scan param
4512 *
4513 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4514 */
4515QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4516 struct set_ps_mode_params *param)
4517{
4518 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4519
4520 if (wmi_handle->ops->send_set_ps_mode_cmd)
4521 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4522
4523 return QDF_STATUS_E_FAILURE;
4524}
4525
4526/**
4527 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4528 * @wmi_handle: wmi handle
4529 * @param tgt_res_cfg: pointer to target resource configuration
4530 * @param num_mem_chunks: Number of memory chunks
4531 * @param mem_chunks: pointer to target memory chunks
4532 *
4533 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4534 */
4535QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
4536 target_resource_config *res_cfg, uint8_t num_mem_chunks,
4537 struct wmi_host_mem_chunk *mem_chunk)
4538{
4539 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4540
4541 if (wmi_handle->ops->init_cmd_send)
4542 return wmi_handle->ops->init_cmd_send(wmi_handle, res_cfg,
4543 num_mem_chunks, mem_chunk);
4544
4545 return QDF_STATUS_E_FAILURE;
4546}
4547
4548/**
4549 * wmi_save_service_bitmap() - save service bitmap
4550 * @wmi_handle: wmi handle
4551 * @param evt_buf: pointer to event buffer
4552 *
4553 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4554 */
4555QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf)
4556{
4557 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4558
4559 if (wmi_handle->ops->save_service_bitmap) {
4560 wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf);
4561 return 0;
4562 }
4563 return QDF_STATUS_E_FAILURE;
4564}
4565
4566/**
4567 * wmi_save_fw_version() - Save fw version
4568 * @wmi_handle: wmi handle
4569 * @param evt_buf: pointer to event buffer
4570 *
4571 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4572 */
4573QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4574{
4575 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4576
4577 if (wmi_handle->ops->save_fw_version) {
4578 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4579 return 0;
4580 }
4581 return QDF_STATUS_E_FAILURE;
4582
4583}
4584
4585/**
4586 * wmi_check_and_update_fw_version() - Ready and fw version check
4587 * @wmi_handle: wmi handle
4588 * @param evt_buf: pointer to event buffer
4589 *
4590 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4591 */
4592QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4593{
4594 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4595
4596 if (wmi_handle->ops->check_and_update_fw_version)
4597 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4598 evt_buf);
4599
4600 return QDF_STATUS_E_FAILURE;
4601
4602}
4603
4604/**
4605 * wmi_service_enabled() - Check if service enabled
4606 * @param wmi_handle: wmi handle
4607 * @param service_id: service identifier
4608 *
4609 * Return: 1 enabled, 0 disabled
4610 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05304611#ifndef CONFIG_MCL
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304612bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4613{
4614 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4615
4616 if ((service_id < wmi_services_max) &&
4617 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4618 if (wmi_handle->ops->is_service_enabled) {
4619 return wmi_handle->ops->is_service_enabled(wmi_handle,
4620 wmi_handle->services[service_id]);
4621 }
4622 } else {
4623 qdf_print("Support not added yet for Service %d\n", service_id);
4624 }
4625 return false;
4626}
4627#endif
4628
4629/**
4630 * wmi_get_target_cap_from_service_ready() - extract service ready event
4631 * @wmi_handle: wmi handle
4632 * @param evt_buf: pointer to received event buffer
4633 * @param ev: pointer to hold target capability information extracted from even
4634 *
4635 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4636 */
4637QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
4638 void *evt_buf, target_capability_info *ev)
4639{
4640 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4641
4642 if (wmi->ops->get_target_cap_from_service_ready)
4643 return wmi->ops->get_target_cap_from_service_ready(wmi,
4644 evt_buf, ev);
4645
4646 return QDF_STATUS_E_FAILURE;
4647}
4648
4649/**
4650 * wmi_extract_fw_version() - extract fw version
4651 * @wmi_handle: wmi handle
4652 * @param evt_buf: pointer to event buffer
4653 * @param fw_ver: Pointer to hold fw version
4654 *
4655 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4656 */
4657QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4658 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4659{
4660 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4661
4662 if (wmi_handle->ops->extract_fw_version)
4663 return wmi_handle->ops->extract_fw_version(wmi_handle,
4664 evt_buf, fw_ver);
4665
4666 return QDF_STATUS_E_FAILURE;
4667}
4668
4669/**
4670 * wmi_extract_fw_abi_version() - extract fw abi version
4671 * @wmi_handle: wmi handle
4672 * @param evt_buf: Pointer to event buffer
4673 * @param fw_ver: Pointer to hold fw abi version
4674 *
4675 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4676 */
4677QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4678 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4679{
4680 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4681
4682 if (wmi_handle->ops->extract_fw_abi_version)
4683 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4684 evt_buf, fw_ver);
4685
4686 return QDF_STATUS_E_FAILURE;
4687}
4688
4689/**
4690 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4691 * @wmi_handle: wmi handle
4692 * @param evt_buf: Pointer to event buffer
4693 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4694 *
4695 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4696 */
4697QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
4698 TARGET_HAL_REG_CAPABILITIES *hal_reg_cap)
4699{
4700 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4701
4702 if (wmi_handle->ops->extract_hal_reg_cap)
4703 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4704 evt_buf, hal_reg_cap);
4705
4706 return QDF_STATUS_E_FAILURE;
4707}
4708
4709/**
4710 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4711 * request event
4712 * @wmi_handle: wmi handle
4713 * @param evt_buf: pointer to event buffer
4714 * @param num_entries: pointer to hold number of entries requested
4715 *
4716 * Return: Number of entries requested
4717 */
4718host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4719 void *evt_buf, uint8_t *num_entries)
4720{
4721 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4722
4723 if (wmi_handle->ops->extract_host_mem_req)
4724 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4725 evt_buf, num_entries);
4726
4727 *num_entries = 0;
4728 return NULL;
4729}
4730
4731/**
4732 * wmi_ready_extract_init_status() - Extract init status from ready event
4733 * @wmi_handle: wmi handle
4734 * @param ev: Pointer to event buffer
4735 *
4736 * Return: ready status
4737 */
4738uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4739{
4740 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4741
4742 if (wmi_handle->ops->ready_extract_init_status)
4743 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4744 ev);
4745
4746
4747 return 1;
4748
4749}
4750
4751/**
4752 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4753 * @wmi_handle: wmi handle
4754 * @param ev: pointer to event buffer
4755 * @param macaddr: Pointer to hold MAC address
4756 *
4757 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4758 */
4759QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4760{
4761 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4762
4763 if (wmi_handle->ops->ready_extract_mac_addr)
4764 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4765 ev, macaddr);
4766
4767
4768 return QDF_STATUS_E_FAILURE;
4769}
4770
4771/**
4772 * wmi_extract_dbglog_data_len() - extract debuglog data length
4773 * @wmi_handle: wmi handle
4774 * @param evt_buf: pointer to event buffer
4775 * @param len: length of buffer
4776 *
4777 * Return: length
4778 */
4779uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
4780 uint16_t *len)
4781{
4782 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4783
4784 if (wmi_handle->ops->extract_dbglog_data_len)
4785 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4786 evt_buf, len);
4787
4788
4789 return NULL;
4790}
4791
4792/**
4793 * wmi_send_ext_resource_config() - send extended resource configuration
4794 * @wmi_handle: wmi handle
4795 * @param ext_cfg: pointer to extended resource configuration
4796 *
4797 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4798 */
4799QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4800 wmi_host_ext_resource_config *ext_cfg)
4801{
4802 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4803
4804 if (wmi_handle->ops->send_ext_resource_config)
4805 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4806 ext_cfg);
4807
4808 return QDF_STATUS_E_FAILURE;
4809}
4810
4811/**
4812 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4813 * @param wmi_handle : handle to WMI.
4814 *
4815 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4816 */
4817QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl)
4818{
4819 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4820
4821 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
4822 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi);
4823
4824 return QDF_STATUS_E_FAILURE;
4825}
4826
4827/**
4828 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4829 * @param wmi_handle : handle to WMI.
4830 * @param param : pointer to hold packet power info param
4831 *
4832 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4833 */
4834QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4835 struct packet_power_info_params *param)
4836{
4837 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4838
4839 if (wmi->ops->send_packet_power_info_get_cmd)
4840 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4841
4842 return QDF_STATUS_E_FAILURE;
4843}
4844
4845/**
4846 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4847 * @param wmi_handle : handle to WMI.
4848 * @param param : pointer to hold gpio config param
4849 *
4850 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4851 */
4852QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4853 struct gpio_config_params *param)
4854{
4855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4856
4857 if (wmi_handle->ops->send_gpio_config_cmd)
4858 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4859
4860 return QDF_STATUS_E_FAILURE;
4861}
4862
4863/**
4864 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4865 * @param wmi_handle : handle to WMI.
4866 * @param param : pointer to hold gpio config param
4867 *
4868 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4869 */
4870QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4871 struct gpio_output_params *param)
4872{
4873 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4874
4875 if (wmi_handle->ops->send_gpio_output_cmd)
4876 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4877
4878 return QDF_STATUS_E_FAILURE;
4879}
4880
4881/**
4882 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4883 * @param wmi_handle : handle to WMI.
4884 * @param param : pointer to hold rtt meas req test param
4885 *
4886 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4887 */
4888QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4889 struct rtt_meas_req_test_params *param)
4890{
4891 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4892
4893 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4894 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4895 param);
4896
4897 return QDF_STATUS_E_FAILURE;
4898}
4899
4900/**
4901 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4902 * @param wmi_handle : handle to WMI.
4903 * @param param : pointer to hold rtt meas req param
4904 *
4905 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4906 */
4907QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4908 struct rtt_meas_req_params *param)
4909{
4910 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4911
4912 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4913 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4914 param);
4915
4916 return QDF_STATUS_E_FAILURE;
4917}
4918
4919/**
4920 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4921 * @param wmi_handle : handle to WMI.
4922 * @param param : pointer to hold lci param
4923 *
4924 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4925 */
4926QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4927 struct lci_set_params *param)
4928{
4929 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4930
4931 if (wmi_handle->ops->send_lci_set_cmd)
4932 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4933
4934 return QDF_STATUS_E_FAILURE;
4935}
4936
4937/**
4938 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4939 * @param wmi_handle : handle to WMI.
4940 * @param param : pointer to hold lcr param
4941 *
4942 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4943 */
4944QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4945 struct lcr_set_params *param)
4946{
4947 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4948
4949 if (wmi_handle->ops->send_lcr_set_cmd)
4950 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4951
4952 return QDF_STATUS_E_FAILURE;
4953}
4954
4955/**
4956 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4957 * @param wmi_handle : handle to WMI.
4958 * @param param : pointer to hold rtt meas req test param
4959 *
4960 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4961 */
4962QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4963 struct rtt_keepalive_req_params *param)
4964{
4965 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4966
4967 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4968 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4969 param);
4970
4971 return QDF_STATUS_E_FAILURE;
4972}
4973
4974/**
4975 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4976 * to fw
4977 * @wmi_handle: wmi handle
4978 * @param: pointer to hold periodic chan stats param
4979 *
4980 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4981 */
4982QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4983 struct periodic_chan_stats_params *param)
4984{
4985 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4986
4987 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4988 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4989 param);
4990
4991 return QDF_STATUS_E_FAILURE;
4992}
4993
4994/**
4995 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4996 * @wmi_handle: wmi handle
4997 * @param: pointer to atf peer request param
4998 *
4999 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5000 */
5001QDF_STATUS
5002wmi_send_atf_peer_request_cmd(void *wmi_hdl,
5003 struct atf_peer_request_params *param)
5004{
5005 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5006
5007 if (wmi_handle->ops->send_atf_peer_request_cmd)
5008 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
5009 param);
5010
5011 return QDF_STATUS_E_FAILURE;
5012}
5013
5014/**
5015 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
5016 * @wmi_handle: wmi handle
5017 * @param: pointer to set atf grouping param
5018 *
5019 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5020 */
5021QDF_STATUS
5022wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
5023 struct atf_grouping_params *param)
5024{
5025 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5026
5027 if (wmi_handle->ops->send_set_atf_grouping_cmd)
5028 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
5029 param);
5030
5031 return QDF_STATUS_E_FAILURE;
5032
5033}
5034
5035
5036/* Extract - APIs */
5037/**
5038 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
5039 *
5040 * @param wmi_handle : handle to WMI.
5041 * @param evt_buf : pointer to event buffer
5042 * @param len : length of the event buffer
5043 * @param wds_ev: pointer to strct to extract
5044 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5045 */
5046QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
5047 uint16_t len, wds_addr_event_t *wds_ev)
5048{
5049 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5050
5051 if (wmi_handle->ops->extract_wds_addr_event) {
5052 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
5053 evt_buf, len, wds_ev);
5054 }
5055 return QDF_STATUS_E_FAILURE;
5056}
5057
5058/**
5059 * wmi_extract_dcs_interference_type() - extract dcs interference type
5060 * @wmi_handle: wmi handle
5061 * @param evt_buf: pointer to event buffer
5062 * @param interference_type: Pointer to hold interference type
5063 *
5064 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5065 */
5066QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
5067 void *evt_buf, uint32_t *interference_type)
5068{
5069 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5070
5071 if (wmi->ops->extract_dcs_interference_type) {
5072 return wmi->ops->extract_dcs_interference_type(wmi,
5073 evt_buf, interference_type);
5074 }
5075 return QDF_STATUS_E_FAILURE;
5076}
5077
5078/*
5079 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5080 * @wmi_handle: wmi handle
5081 * @param evt_buf: pointer to event buffer
5082 * @param cw_int: Pointer to hold cw interference
5083 *
5084 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5085 */
5086QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5087 wmi_host_ath_dcs_cw_int *cw_int)
5088{
5089 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5090
5091 if (wmi_handle->ops->extract_dcs_cw_int) {
5092 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5093 evt_buf, cw_int);
5094 }
5095 return QDF_STATUS_E_FAILURE;
5096}
5097
5098/**
5099 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5100 * @wmi_handle: wmi handle
5101 * @param evt_buf: pointer to event buffer
5102 * @param wlan_stat: Pointer to hold wlan stats
5103 *
5104 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5105 */
5106QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5107 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5108{
5109 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5110
5111 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5112 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5113 evt_buf, wlan_stat);
5114 }
5115 return QDF_STATUS_E_FAILURE;
5116}
5117
5118/**
5119 * wmi_extract_fips_event_error_status() - extract fips event error status
5120 * @wmi_handle: wmi handle
5121 * @param evt_buf: pointer to event buffer
5122 * @param err_status: Pointer to hold error status
5123 *
5124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5125 */
5126QDF_STATUS wmi_extract_fips_event_error_status(void *wmi_hdl, void *evt_buf,
5127 uint32_t *err_status)
5128{
5129 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5130
5131 if (wmi->ops->extract_fips_event_error_status) {
5132 return wmi->ops->extract_fips_event_error_status(wmi,
5133 evt_buf, err_status);
5134 }
5135 return QDF_STATUS_E_FAILURE;
5136}
5137
5138/**
5139 * wmi_extract_fips_event_data() - extract fips event data
5140 * @wmi_handle: wmi handle
5141 * @param evt_buf: pointer to event buffer
5142 * @param data_len: Pointer to hold fips data length
5143 * @param data: Double pointer to hold fips data
5144 *
5145 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5146 */
5147QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
5148 uint32_t *data_len, uint32_t **data)
5149{
5150 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5151
5152 if (wmi_handle->ops->extract_fips_event_data) {
5153 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
5154 evt_buf, data_len, data);
5155 }
5156 return QDF_STATUS_E_FAILURE;
5157}
5158
5159/**
5160 * wmi_extract_vdev_start_resp() - extract vdev start response
5161 * @wmi_handle: wmi handle
5162 * @param evt_buf: pointer to event buffer
5163 * @param vdev_rsp: Pointer to hold vdev response
5164 *
5165 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5166 */
5167QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5168 wmi_host_vdev_start_resp *vdev_rsp)
5169{
5170 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5171
5172 if (wmi_handle->ops->extract_vdev_start_resp)
5173 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5174 evt_buf, vdev_rsp);
5175
5176 return QDF_STATUS_E_FAILURE;
5177}
5178
5179/**
5180 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5181 * @wmi_handle: wmi handle
5182 * @param evt_buf: pointer to event buffer
5183 * @param vdev_map: Pointer to hold vdev map
5184 * @param tbttoffset_list: Pointer to tbtt offset list
5185 *
5186 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5187 */
5188QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
5189 uint32_t *vdev_map, uint32_t **tbttoffset_list)
5190{
5191 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5192
5193 if (wmi->ops->extract_tbttoffset_update_params)
5194 return wmi->ops->extract_tbttoffset_update_params(wmi,
5195 evt_buf, vdev_map, tbttoffset_list);
5196
5197 return QDF_STATUS_E_FAILURE;
5198}
5199
5200/**
5201 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5202 * @wmi_handle: wmi handle
5203 * @param evt_buf: pointer to event buffer
5204 * @param hdr: Pointer to hold header
5205 * @param bufp: Pointer to hold pointer to rx param buffer
5206 *
5207 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5208 */
5209QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
5210 wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
5211{
5212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5213
5214 if (wmi_handle->ops->extract_mgmt_rx_params)
5215 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5216 evt_buf, hdr, bufp);
5217
5218 return QDF_STATUS_E_FAILURE;
5219}
5220
5221/**
5222 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5223 * @wmi_handle: wmi handle
5224 * @param evt_buf: pointer to event buffer
5225 * @param vdev_id: Pointer to hold vdev identifier
5226 *
5227 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5228 */
5229QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5230 uint32_t *vdev_id)
5231{
5232 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5233
5234 if (wmi_handle->ops->extract_vdev_stopped_param)
5235 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5236 evt_buf, vdev_id);
5237
5238 return QDF_STATUS_E_FAILURE;
5239}
5240
5241/**
5242 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5243 * @wmi_handle: wmi handle
5244 * @param evt_buf: pointer to event buffer
5245 * @param param: Pointer to hold roam param
5246 *
5247 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5248 */
5249QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5250 wmi_host_roam_event *param)
5251{
5252 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5253
5254 if (wmi_handle->ops->extract_vdev_roam_param)
5255 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5256 evt_buf, param);
5257
5258 return QDF_STATUS_E_FAILURE;
5259}
5260
5261/**
5262 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5263 * @wmi_handle: wmi handle
5264 * @param evt_buf: pointer to event buffer
5265 * @param param: Pointer to hold vdev scan param
5266 *
5267 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5268 */
5269QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
5270 wmi_host_scan_event *param)
5271{
5272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5273
5274 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5275 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5276 evt_buf, param);
5277
5278 return QDF_STATUS_E_FAILURE;
5279}
5280
5281/**
5282 * wmi_extract_mu_ev_param() - extract mu param from event
5283 * @wmi_handle: wmi handle
5284 * @param evt_buf: pointer to event buffer
5285 * @param param: Pointer to hold mu report
5286 *
5287 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5288 */
5289QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5290 wmi_host_mu_report_event *param)
5291{
5292 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5293
5294 if (wmi_handle->ops->extract_mu_ev_param)
5295 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5296 param);
5297
5298 return QDF_STATUS_E_FAILURE;
5299}
5300
5301/**
5302 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5303 * param from event
5304 * @wmi_handle: wmi handle
5305 * @param evt_buf: pointer to event buffer
5306 * @param param: Pointer to hold tpc configuration
5307 *
5308 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5309 */
5310QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5311 wmi_host_pdev_tpc_config_event *param)
5312{
5313 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5314
5315 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5316 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5317 evt_buf, param);
5318
5319 return QDF_STATUS_E_FAILURE;
5320
5321}
5322
5323/**
5324 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5325 * @wmi_handle: wmi handle
5326 * @param evt_buf: pointer to event buffer
5327 * @param gpio_num: Pointer to hold gpio number
5328 *
5329 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5330 */
5331QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5332 void *evt_buf, uint32_t *gpio_num)
5333{
5334 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5335
5336 if (wmi_handle->ops->extract_gpio_input_ev_param)
5337 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5338 evt_buf, gpio_num);
5339
5340 return QDF_STATUS_E_FAILURE;
5341}
5342
5343/**
5344 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5345 * param from event
5346 * @wmi_handle: wmi handle
5347 * @param evt_buf: pointer to event buffer
5348 * @param result: Pointer to hold reserve ast entry param
5349 *
5350 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5351 */
5352QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
5353 void *evt_buf, uint32_t *result)
5354{
5355 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5356
5357 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5358 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
5359 evt_buf, result);
5360
5361 return QDF_STATUS_E_FAILURE;
5362}
5363
5364/**
5365 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5366 * power param from event
5367 * @wmi_handle: wmi handle
5368 * @param evt_buf: pointer to event buffer
5369 * @param param: Pointer to hold nf cal power param
5370 *
5371 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5372 */
5373QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5374 wmi_host_pdev_nfcal_power_all_channels_event *param)
5375{
5376 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5377
5378 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5379 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5380 evt_buf, param);
5381
5382 return QDF_STATUS_E_FAILURE;
5383
5384}
5385
5386/**
5387 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5388 * @wmi_handle: wmi handle
5389 * @param evt_buf: pointer to event buffer
5390 * @param param: Pointer to hold tpc param
5391 *
5392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5393 */
5394QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5395 wmi_host_pdev_tpc_event *param)
5396{
5397 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5398
5399 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5400 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5401 evt_buf, param);
5402
5403 return QDF_STATUS_E_FAILURE;
5404
5405}
5406
5407/**
5408 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5409 * from event
5410 * @wmi_handle: wmi handle
5411 * @param evt_buf: pointer to event buffer
5412 * @param param: Pointer to generic buffer param
5413 *
5414 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5415 */
5416QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5417 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5418{
5419 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5420
5421 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5422 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5423 evt_buf, param);
5424
5425 return QDF_STATUS_E_FAILURE;
5426
5427}
5428
5429/**
5430 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5431 * from event
5432 * @wmi_handle: wmi handle
5433 * @param evt_buf: pointer to event buffer
5434 * @param param: Pointer to mgmt tx completion param
5435 *
5436 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5437 */
5438QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5439 wmi_host_mgmt_tx_compl_event *param)
5440{
5441 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5442
5443 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5444 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5445 evt_buf, param);
5446
5447
5448 return QDF_STATUS_E_FAILURE;
5449}
5450
5451/**
5452 * wmi_extract_swba_vdev_map() - extract swba vdev map from event
5453 * @wmi_handle: wmi handle
5454 * @param evt_buf: pointer to event buffer
5455 * @param vdev_map: Pointer to hold vdev map
5456 *
5457 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5458 */
5459QDF_STATUS wmi_extract_swba_vdev_map(void *wmi_hdl, void *evt_buf,
5460 uint32_t *vdev_map)
5461{
5462 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5463
5464 if (wmi_handle->ops->extract_swba_vdev_map)
5465 return wmi_handle->ops->extract_swba_vdev_map(wmi_handle,
5466 evt_buf, vdev_map);
5467
5468 return QDF_STATUS_E_FAILURE;
5469}
5470
5471/**
5472 * wmi_extract_swba_tim_info() - extract swba tim info from event
5473 * @wmi_handle: wmi handle
5474 * @param evt_buf: pointer to event buffer
5475 * @param idx: Index to bcn info
5476 * @param tim_info: Pointer to hold tim info
5477 *
5478 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5479 */
5480QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5481 uint32_t idx, wmi_host_tim_info *tim_info)
5482{
5483 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5484
5485 if (wmi_handle->ops->extract_swba_tim_info)
5486 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5487 evt_buf, idx, tim_info);
5488
5489 return QDF_STATUS_E_FAILURE;
5490}
5491
5492/**
5493 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5494 * @wmi_handle: wmi handle
5495 * @param evt_buf: pointer to event buffer
5496 * @param idx: Index to bcn info
5497 * @param p2p_desc: Pointer to hold p2p NoA info
5498 *
5499 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5500 */
5501QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5502 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5503{
5504 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5505
5506 if (wmi_handle->ops->extract_swba_noa_info)
5507 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5508 evt_buf, idx, p2p_desc);
5509
5510 return QDF_STATUS_E_FAILURE;
5511}
5512
5513/**
5514 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5515 * from event
5516 * @wmi_handle: wmi handle
5517 * @param evt_buf: pointer to event buffer
5518 * @param ev: Pointer to hold peer param and ps state
5519 *
5520 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5521 */
5522QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5523 wmi_host_peer_sta_ps_statechange_event *ev)
5524{
5525 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5526
5527 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5528 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5529 evt_buf, ev);
5530
5531 return QDF_STATUS_E_FAILURE;
5532}
5533
5534/**
5535 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5536 * @wmi_handle: wmi handle
5537 * @param evt_buf: pointer to event buffer
5538 * @param ev: Pointer to hold peer param
5539 *
5540 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5541 */
5542QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5543 wmi_host_peer_sta_kickout_event *ev)
5544{
5545 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5546
5547 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5548 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5549 evt_buf, ev);
5550
5551 return QDF_STATUS_E_FAILURE;
5552}
5553
5554/**
5555 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5556 * @wmi_handle: wmi handle
5557 * @param evt_buf: pointer to event buffer
5558 * @param peer_mac: Pointer to hold peer mac address
5559 * @param rate_cap: Pointer to hold ratecode
5560 *
5561 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5562 */
5563QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5564 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5565{
5566 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5567
5568 if (wmi->ops->extract_peer_ratecode_list_ev)
5569 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5570 evt_buf, peer_mac, rate_cap);
5571
5572 return QDF_STATUS_E_FAILURE;
5573
5574}
5575
5576/**
5577 * wmi_extract_comb_phyerr() - extract comb phy error from event
5578 * @wmi_handle: wmi handle
5579 * @param evt_buf: pointer to event buffer
5580 * @param datalen: data length of event buffer
5581 * @param buf_offset: Pointer to hold value of current event buffer offset
5582 * post extraction
5583 * @param phyer: Pointer to hold phyerr
5584 *
5585 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5586 */
5587QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5588 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5589{
5590 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5591
5592 if (wmi_handle->ops->extract_comb_phyerr)
5593 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5594 evt_buf, datalen, buf_offset, phyerr);
5595
5596 return QDF_STATUS_E_FAILURE;
5597
5598}
5599
5600/**
5601 * wmi_extract_single_phyerr() - extract single phy error from event
5602 * @wmi_handle: wmi handle
5603 * @param evt_buf: pointer to event buffer
5604 * @param datalen: data length of event buffer
5605 * @param buf_offset: Pointer to hold value of current event buffer offset
5606 * post extraction
5607 * @param phyerr: Pointer to hold phyerr
5608 *
5609 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5610 */
5611QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5612 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5613{
5614 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5615
5616 if (wmi_handle->ops->extract_single_phyerr)
5617 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5618 evt_buf, datalen, buf_offset, phyerr);
5619
5620 return QDF_STATUS_E_FAILURE;
5621
5622}
5623
5624/**
5625 * wmi_extract_composite_phyerr() - extract composite phy error from event
5626 * @wmi_handle: wmi handle
5627 * @param evt_buf: pointer to event buffer
5628 * @param datalen: Length of event buffer
5629 * @param phyerr: Pointer to hold phy error
5630 *
5631 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5632 */
5633QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5634 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5635{
5636 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5637
5638 if (wmi_handle->ops->extract_composite_phyerr)
5639 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5640 evt_buf, datalen, phyerr);
5641
5642 return QDF_STATUS_E_FAILURE;
5643
5644}
5645
5646/**
5647 * wmi_extract_stats_param() - extract all stats count from event
5648 * @wmi_handle: wmi handle
5649 * @param evt_buf: pointer to event buffer
5650 * @param stats_param: Pointer to hold stats count
5651 *
5652 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5653 */
5654QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5655 wmi_host_stats_event *stats_param)
5656{
5657 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5658
5659 if (wmi_handle->ops->extract_all_stats_count)
5660 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5661 evt_buf, stats_param);
5662
5663 return QDF_STATUS_E_FAILURE;
5664}
5665
5666/**
5667 * wmi_extract_pdev_stats() - extract pdev stats from event
5668 * @wmi_handle: wmi handle
5669 * @param evt_buf: pointer to event buffer
5670 * @param index: Index into pdev stats
5671 * @param pdev_stats: Pointer to hold pdev stats
5672 *
5673 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5674 */
5675QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
5676 uint32_t index, wmi_host_pdev_stats *pdev_stats)
5677{
5678 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5679
5680 if (wmi_handle->ops->extract_pdev_stats)
5681 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
5682 evt_buf, index, pdev_stats);
5683
5684 return QDF_STATUS_E_FAILURE;
5685}
5686
5687/**
5688 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
5689 * @wmi_handle: wmi handle
5690 * @param evt_buf: pointer to event buffer
5691 * @param index: Index into extended pdev stats
5692 * @param pdev_ext_stats: Pointer to hold extended pdev stats
5693 *
5694 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5695 */
5696QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
5697 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
5698{
5699 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5700
5701 if (wmi_handle->ops->extract_pdev_ext_stats)
5702 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
5703 evt_buf, index, pdev_ext_stats);
5704
5705 return QDF_STATUS_E_FAILURE;
5706}
5707
5708/**
5709 * wmi_extract_peer_stats() - extract peer stats from event
5710 * @wmi_handle: wmi handle
5711 * @param evt_buf: pointer to event buffer
5712 * @param index: Index into peer stats
5713 * @param peer_stats: Pointer to hold peer stats
5714 *
5715 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5716 */
5717QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
5718 uint32_t index, wmi_host_peer_stats *peer_stats)
5719{
5720 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5721
5722 if (wmi_handle->ops->extract_peer_stats)
5723 return wmi_handle->ops->extract_peer_stats(wmi_handle,
5724 evt_buf, index, peer_stats);
5725
5726 return QDF_STATUS_E_FAILURE;
5727}
5728
5729/**
5730 * wmi_extract_vdev_stats() - extract vdev stats from event
5731 * @wmi_handle: wmi handle
5732 * @param evt_buf: pointer to event buffer
5733 * @param index: Index into vdev stats
5734 * @param vdev_stats: Pointer to hold vdev stats
5735 *
5736 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5737 */
5738QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
5739 uint32_t index, wmi_host_vdev_stats *vdev_stats)
5740{
5741 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5742
5743 if (wmi_handle->ops->extract_vdev_stats)
5744 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
5745 evt_buf, index, vdev_stats);
5746
5747 return QDF_STATUS_E_FAILURE;
5748}
5749
5750/**
5751 * wmi_extract_rtt_hdr() - extract rtt header from event
5752 * @wmi_handle: wmi handle
5753 * @param evt_buf: pointer to event buffer
5754 * @param ev: Pointer to hold rtt header
5755 *
5756 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5757 */
5758QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
5759 wmi_host_rtt_event_hdr *ev)
5760{
5761 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5762
5763 if (wmi_handle->ops->extract_rtt_hdr)
5764 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
5765 evt_buf, ev);
5766
5767 return QDF_STATUS_E_FAILURE;
5768}
5769
5770/**
5771 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
5772 * @wmi_handle: wmi handle
5773 * @param evt_buf: pointer to event buffer
5774 * @param index: Index into bcn fault stats
5775 * @param bcnflt_stats: Pointer to hold bcn fault stats
5776 *
5777 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5778 */
5779QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
5780 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
5781{
5782 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5783
5784 if (wmi_handle->ops->extract_bcnflt_stats)
5785 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
5786 evt_buf, index, bcnflt_stats);
5787
5788 return QDF_STATUS_E_FAILURE;
5789}
5790
5791/**
5792 * wmi_extract_rtt_ev() - extract rtt event
5793 * @wmi_handle: wmi handle
5794 * @param evt_buf: Pointer to event buffer
5795 * @param ev: Pointer to hold rtt event
5796 * @param hdump: Pointer to hold hex dump
5797 * @param hdump_len: hex dump length
5798 *
5799 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5800 */
5801QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
5802 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
5803{
5804 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5805
5806 if (wmi_handle->ops->extract_rtt_ev)
5807 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
5808 evt_buf, ev, hdump, hdump_len);
5809
5810 return QDF_STATUS_E_FAILURE;
5811}
5812
5813/**
5814 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
5815 * @wmi_handle: wmi handle
5816 * @param evt_buf: pointer to event buffer
5817 * @param index: Index into extended peer stats
5818 * @param peer_extd_stats: Pointer to hold extended peer stats
5819 *
5820 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5821 */
5822QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
5823 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
5824{
5825 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5826
5827 if (wmi_handle->ops->extract_peer_extd_stats)
5828 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
5829 evt_buf, index, peer_extd_stats);
5830
5831 return QDF_STATUS_E_FAILURE;
5832}
5833
5834/**
5835 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
5836 * @wmi_handle: wmi handle
5837 * @param evt_buf: pointer to event buffer
5838 * @param wds_ev: Pointer to hold rtt error report
5839 *
5840 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5841 */
5842QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
5843 wmi_host_rtt_error_report_event *ev)
5844{
5845 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5846
5847 if (wmi_handle->ops->extract_rtt_error_report_ev)
5848 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
5849 evt_buf, ev);
5850
5851 return QDF_STATUS_E_FAILURE;
5852}
5853
5854/**
5855 * wmi_extract_chan_stats() - extract chan stats from event
5856 * @wmi_handle: wmi handle
5857 * @param evt_buf: pointer to event buffer
5858 * @param index: Index into chan stats
5859 * @param chanstats: Pointer to hold chan stats
5860 *
5861 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5862 */
5863QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
5864 uint32_t index, wmi_host_chan_stats *chan_stats)
5865{
5866 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5867
5868 if (wmi_handle->ops->extract_chan_stats)
5869 return wmi_handle->ops->extract_chan_stats(wmi_handle,
5870 evt_buf, index, chan_stats);
5871
5872 return QDF_STATUS_E_FAILURE;
5873}
5874
5875/**
5876 * wmi_extract_thermal_stats() - extract thermal stats from event
5877 * @wmi_handle: wmi handle
5878 * @param evt_buf: Pointer to event buffer
5879 * @param temp: Pointer to hold extracted temperature
5880 * @param level: Pointer to hold extracted level
5881 *
5882 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5883 */
5884QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
5885 uint32_t *temp, uint32_t *level)
5886{
5887 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5888
5889 if (wmi_handle->ops->extract_thermal_stats)
5890 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
5891 evt_buf, temp, level);
5892
5893 return QDF_STATUS_E_FAILURE;
5894}
5895
5896/**
5897 * wmi_extract_profile_ctx() - extract profile context from event
5898 * @wmi_handle: wmi handle
5899 * @param evt_buf: pointer to event buffer
5900 * @param profile_ctx: Pointer to hold profile context
5901 *
5902 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5903 */
5904QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
5905 wmi_host_wlan_profile_ctx_t *profile_ctx)
5906{
5907 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5908
5909 if (wmi_handle->ops->extract_profile_ctx)
5910 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
5911 evt_buf, profile_ctx);
5912
5913 return QDF_STATUS_E_FAILURE;
5914}
5915
5916/**
5917 * wmi_extract_thermal_level_stats() - extract thermal level stats from
5918 * event
5919 * @wmi_handle: wmi handle
5920 * @param evt_buf: pointer to event buffer
5921 * @param idx: Index to level stats
5922 * @param levelcount: Pointer to hold levelcount
5923 * @param dccount: Pointer to hold dccount
5924 *
5925 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5926 */
5927QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
5928 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
5929{
5930 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5931
5932 if (wmi_handle->ops->extract_thermal_level_stats)
5933 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
5934 evt_buf, idx, levelcount, dccount);
5935
5936 return QDF_STATUS_E_FAILURE;
5937}
5938
5939/**
5940 * wmi_extract_profile_data() - extract profile data from event
5941 * @wmi_handle: wmi handle
5942 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05305943 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305944 * @param profile_data: Pointer to hold profile data
5945 *
5946 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5947 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05305948QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305949 wmi_host_wlan_profile_t *profile_data)
5950{
5951 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5952
5953 if (wmi_handle->ops->extract_profile_data)
5954 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05305955 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305956
5957 return QDF_STATUS_E_FAILURE;
5958}
5959
5960/**
5961 * wmi_extract_chan_info_event() - extract chan information from event
5962 * @wmi_handle: wmi handle
5963 * @param evt_buf: pointer to event buffer
5964 * @param chan_info: Pointer to hold chan information
5965 *
5966 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5967 */
5968QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
5969 wmi_host_chan_info_event *chan_info)
5970{
5971 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5972
5973 if (wmi_handle->ops->extract_chan_info_event)
5974 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
5975 evt_buf, chan_info);
5976
5977 return QDF_STATUS_E_FAILURE;
5978}
5979
5980/**
5981 * wmi_extract_channel_hopping_event() - extract channel hopping param
5982 * from event
5983 * @wmi_handle: wmi handle
5984 * @param evt_buf: pointer to event buffer
5985 * @param ch_hopping: Pointer to hold channel hopping param
5986 *
5987 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5988 */
5989QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
5990 wmi_host_pdev_channel_hopping_event *ch_hopping)
5991{
5992 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5993
5994 if (wmi->ops->extract_channel_hopping_event)
5995 return wmi->ops->extract_channel_hopping_event(wmi,
5996 evt_buf, ch_hopping);
5997
5998 return QDF_STATUS_E_FAILURE;
5999}
6000
6001/**
6002 * wmi_extract_bss_chan_info_event() - extract bss channel information
6003 * from event
6004 * @wmi_handle: wmi handle
6005 * @param evt_buf: pointer to event buffer
6006 * @param bss_chan_info: Pointer to hold bss channel information
6007 *
6008 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6009 */
6010QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6011 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6012{
6013 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6014
6015 if (wmi_handle->ops->extract_bss_chan_info_event)
6016 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6017 evt_buf, bss_chan_info);
6018
6019 return QDF_STATUS_E_FAILURE;
6020}
6021
6022/**
6023 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6024 * @wmi_handle: wmi handle
6025 * @param evt_buf: pointer to event buffer
6026 * @param inst_rssi_resp: Pointer to hold inst rssi response
6027 *
6028 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6029 */
6030QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6031 wmi_host_inst_stats_resp *inst_rssi_resp)
6032{
6033 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6034
6035 if (wmi->ops->extract_inst_rssi_stats_event)
6036 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6037 evt_buf, inst_rssi_resp);
6038
6039 return QDF_STATUS_E_FAILURE;
6040}
6041
6042/**
6043 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6044 * from event
6045 * @wmi_handle: wmi handle
6046 * @param evt_buf: pointer to event buffer
6047 * @param index: Index into chan stats
6048 * @param ev: Pointer to hold data traffic control
6049 *
6050 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6051 */
6052QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6053 wmi_host_tx_data_traffic_ctrl_event *ev)
6054{
6055 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6056
6057 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6058 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6059 evt_buf, ev);
6060
6061 return QDF_STATUS_E_FAILURE;
6062}
6063
6064/**
6065 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6066 * @wmi_handle: wmi handle
6067 * @param evt_buf: pointer to event buffer
6068 * @param index: Index into extended vdev stats
6069 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6070 *
6071 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6072 */
6073QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6074 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6075{
6076 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6077
6078 if (wmi_handle->ops->extract_vdev_extd_stats)
6079 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6080 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306081 return QDF_STATUS_E_FAILURE;
6082}
6083
6084/**
6085 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6086 * adaptive dwelltime configuration params
6087 * @wma_handle: wma handler
6088 * @dwelltime_params: pointer to dwelltime_params
6089 *
6090 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6091 */
6092QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6093 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6094{
6095 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6096
6097 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6098 return wmi_handle->ops->
6099 send_adapt_dwelltime_params_cmd(wmi_handle,
6100 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306101
6102 return QDF_STATUS_E_FAILURE;
6103}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306104
6105/**
6106 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6107 * @wmi_handle: wmi handle
6108 * @param: wmi power debug parameter
6109 *
6110 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6111 *
6112 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6113 */
6114QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6115 struct wmi_power_dbg_params *param)
6116{
6117 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6118
6119 if (wmi_handle->ops->send_power_dbg_cmd)
6120 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6121 param);
6122
6123 return QDF_STATUS_E_FAILURE;
6124}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306125
6126/**
6127 * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw
6128 * @wmi_hdl: wmi handle
6129 * @params: encrypt/decrypt params
6130 *
6131 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6132 */
6133QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
6134 struct encrypt_decrypt_req_params *params)
6135{
6136 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6137
6138 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6139 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6140 wmi_handle,
6141 params);
6142
6143 return QDF_STATUS_E_FAILURE;
6144}