blob: 603f7c890b3a6b2a539673cb9b356572687f4ab3 [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"
33#include "wmi.h"
34#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053035#include "wmi_unified_param.h"
36
37/**
38 * wmi_unified_vdev_create_send() - send VDEV create command to fw
39 * @wmi_handle: wmi handle
40 * @param: pointer to hold vdev create parameter
41 * @macaddr: vdev mac address
42 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053043 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053044 */
Govind Singhb53420c2016-03-09 14:32:57 +053045QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053046 uint8_t macaddr[IEEE80211_ADDR_LEN],
47 struct vdev_create_params *param)
48{
49 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
50
51 if (wmi_handle->ops->send_vdev_create_cmd)
52 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
53 macaddr, param);
54
Govind Singhb53420c2016-03-09 14:32:57 +053055 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053056}
57
58/**
59 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
60 * @wmi_handle: wmi handle
61 * @if_id: vdev id
62 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053063 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053064 */
Govind Singhb53420c2016-03-09 14:32:57 +053065QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053066 uint8_t if_id)
67{
68 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
69
70 if (wmi_handle->ops->send_vdev_delete_cmd)
71 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
72 if_id);
73
Govind Singhb53420c2016-03-09 14:32:57 +053074 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053075}
76
77/**
78 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
79 * @wmi: wmi handle
80 * @vdev_id: vdev id
81 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053082 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053083 */
Govind Singhb53420c2016-03-09 14:32:57 +053084QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053085 uint8_t vdev_id)
86{
87 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
88
89 if (wmi_handle->ops->send_vdev_stop_cmd)
90 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
91 vdev_id);
92
Govind Singhb53420c2016-03-09 14:32:57 +053093 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053094}
95
96/**
97 * wmi_unified_vdev_down_send() - send vdev down command to fw
98 * @wmi: wmi handle
99 * @vdev_id: vdev id
100 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530101 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530102 */
Govind Singhb53420c2016-03-09 14:32:57 +0530103QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530104{
105 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
106
107 if (wmi_handle->ops->send_vdev_down_cmd)
108 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
109
Govind Singhb53420c2016-03-09 14:32:57 +0530110 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530111}
112
113/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530114 * wmi_unified_vdev_start_send() - send vdev start command to fw
115 * @wmi: wmi handle
116 * @vdev_id: vdev id
117 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530118 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530119 */
120QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
121 struct vdev_start_params *req)
122{
123 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
124
125 if (wmi_handle->ops->send_vdev_start_cmd)
126 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
127
128 return QDF_STATUS_E_FAILURE;
129}
130
131/**
132 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
133 * @wmi: wmi handle
134 * @restart_params: vdev restart params
135 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530136 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530137 */
138QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
139 struct hidden_ssid_vdev_restart_params *restart_params)
140{
141 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
142
143 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
144 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
145 wmi_handle, restart_params);
146
147 return QDF_STATUS_E_FAILURE;
148}
149
150/**
Govind Singh5eb51532016-03-09 11:34:12 +0530151 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
152 * @wmi: wmi handle
153 * @peer_addr: peer mac address
154 * @param: pointer to hold peer flush tid parameter
155 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530156 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530157 */
Govind Singhb53420c2016-03-09 14:32:57 +0530158QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530159 uint8_t peer_addr[IEEE80211_ADDR_LEN],
160 struct peer_flush_params *param)
161{
162 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
163
164 if (wmi_handle->ops->send_peer_flush_tids_cmd)
165 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
166 peer_addr, param);
167
Govind Singhb53420c2016-03-09 14:32:57 +0530168 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530169}
170
171/**
172 * wmi_unified_peer_delete_send() - send PEER delete command to fw
173 * @wmi: wmi handle
174 * @peer_addr: peer mac addr
175 * @vdev_id: vdev id
176 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530177 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530178 */
Govind Singhb53420c2016-03-09 14:32:57 +0530179QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530180 uint8_t
181 peer_addr[IEEE80211_ADDR_LEN],
182 uint8_t vdev_id)
183{
184 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
185
186 if (wmi_handle->ops->send_peer_delete_cmd)
187 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
188 peer_addr, vdev_id);
189
Govind Singhb53420c2016-03-09 14:32:57 +0530190 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530191}
192
193/**
194 * wmi_set_peer_param() - set peer parameter in fw
195 * @wmi_ctx: wmi handle
196 * @peer_addr: peer mac address
197 * @param : pointer to hold peer set parameter
198 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530199 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530200 */
Govind Singhb53420c2016-03-09 14:32:57 +0530201QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530202 uint8_t peer_addr[IEEE80211_ADDR_LEN],
203 struct peer_set_params *param)
204{
205 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
206
207 if (wmi_handle->ops->send_peer_param_cmd)
208 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
209 peer_addr, param);
210
Govind Singhb53420c2016-03-09 14:32:57 +0530211 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530212}
213
214/**
215 * wmi_unified_vdev_up_send() - send vdev up command in fw
216 * @wmi: wmi handle
217 * @bssid: bssid
218 * @vdev_up_params: pointer to hold vdev up parameter
219 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530220 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530221 */
Govind Singhb53420c2016-03-09 14:32:57 +0530222QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530223 uint8_t bssid[IEEE80211_ADDR_LEN],
224 struct vdev_up_params *params)
225{
226 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
227
228 if (wmi_handle->ops->send_vdev_up_cmd)
229 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
230 params);
231
Govind Singhb53420c2016-03-09 14:32:57 +0530232 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530233}
234
235/**
236 * wmi_unified_peer_create_send() - send peer create command to fw
237 * @wmi: wmi handle
238 * @peer_addr: peer mac address
239 * @peer_type: peer type
240 * @vdev_id: vdev id
241 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530242 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530243 */
Govind Singhb53420c2016-03-09 14:32:57 +0530244QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530245 struct peer_create_params *param)
246{
247 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
248
249 if (wmi_handle->ops->send_peer_create_cmd)
250 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
251
Govind Singhb53420c2016-03-09 14:32:57 +0530252 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530253}
254
255#ifdef FEATURE_GREEN_AP
256/**
257 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
258 * @wmi_handle: wmi handle
259 * @value: value
260 * @mac_id: mac id to have radio context
261 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530262 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530263 */
Govind Singhb53420c2016-03-09 14:32:57 +0530264QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530265 uint32_t value, uint8_t mac_id)
266{
267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
268
269 if (wmi_handle->ops->send_green_ap_ps_cmd)
270 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
271 mac_id);
272
Govind Singhb53420c2016-03-09 14:32:57 +0530273 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530274}
275#else
Govind Singhb53420c2016-03-09 14:32:57 +0530276QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530277 uint32_t value, uint8_t mac_id)
278{
279 return 0;
280}
281#endif /* FEATURE_GREEN_AP */
282
283/**
284 * wmi_unified_pdev_utf_cmd() - send utf command to fw
285 * @wmi_handle: wmi handle
286 * @param: pointer to pdev_utf_params
287 * @mac_id: mac id to have radio context
288 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530289 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530290 */
Govind Singhb53420c2016-03-09 14:32:57 +0530291QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530292wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
293 struct pdev_utf_params *param,
294 uint8_t mac_id)
295{
296 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
297
298 if (wmi_handle->ops->send_pdev_utf_cmd)
299 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
300 mac_id);
301
Govind Singhb53420c2016-03-09 14:32:57 +0530302 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530303}
304
305/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530306 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530307 * @wmi_handle: wmi handle
308 * @param: pointer to pdev parameter
309 * @mac_id: radio context
310 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530311 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
312 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530313 */
Govind Singhb53420c2016-03-09 14:32:57 +0530314QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530315wmi_unified_pdev_param_send(void *wmi_hdl,
316 struct pdev_params *param,
317 uint8_t mac_id)
318{
319 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
320
321 if (wmi_handle->ops->send_pdev_param_cmd)
322 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
323 mac_id);
324
Govind Singhb53420c2016-03-09 14:32:57 +0530325 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530326}
327
328/**
329 * wmi_unified_suspend_send() - WMI suspend function
330 * @param wmi_handle : handle to WMI.
331 * @param param : pointer to hold suspend parameter
332 * @mac_id: radio context
333 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530334 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530335 */
Govind Singhb53420c2016-03-09 14:32:57 +0530336QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530337 struct suspend_params *param,
338 uint8_t mac_id)
339{
340 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
341
342 if (wmi_handle->ops->send_suspend_cmd)
343 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
344 mac_id);
345
Govind Singhb53420c2016-03-09 14:32:57 +0530346 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530347}
348
349/**
350 * wmi_unified_resume_send - WMI resume function
351 * @param wmi_handle : handle to WMI.
352 * @mac_id: radio context
353 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530354 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530355 */
Govind Singhb53420c2016-03-09 14:32:57 +0530356QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530357 uint8_t mac_id)
358{
359 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
360
361 if (wmi_handle->ops->send_resume_cmd)
362 return wmi_handle->ops->send_resume_cmd(wmi_handle,
363 mac_id);
364
Govind Singhb53420c2016-03-09 14:32:57 +0530365 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530366}
367
368/**
369 * wmi_unified_wow_enable_send() - WMI wow enable function
370 * @param wmi_handle : handle to WMI.
371 * @param param : pointer to hold wow enable parameter
372 * @mac_id: radio context
373 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530374 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530375 */
Govind Singhb53420c2016-03-09 14:32:57 +0530376QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530377 struct wow_cmd_params *param,
378 uint8_t mac_id)
379{
380 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
381
382 if (wmi_handle->ops->send_wow_enable_cmd)
383 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
384 mac_id);
385
Govind Singhb53420c2016-03-09 14:32:57 +0530386 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530387}
388
389/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530390 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
391 * @param wmi_hdl : handle to WMI.
392 *
393 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
394 */
395QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
396{
397 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
398
399 if (wmi_handle->ops->send_wow_wakeup_cmd)
400 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
401
402 return QDF_STATUS_E_FAILURE;
403}
404
405/**
406 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
407 * @param wmi_handle : handle to WMI.
408 * @param: pointer to wow wakeup event parameter structure
409 *
410 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
411 */
412QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
413 struct wow_add_wakeup_params *param)
414{
415 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
416
417 if (wmi->ops->send_wow_add_wakeup_event_cmd)
418 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
419 param);
420
421 return QDF_STATUS_E_FAILURE;
422}
423
424/**
425 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
426 * @param wmi_handle : handle to WMI.
427 * @param: pointer to wow wakeup pattern parameter structure
428 *
429 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
430 */
431QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
432 struct wow_add_wakeup_pattern_params *param)
433{
434 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
435
436 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
437 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
438
439 return QDF_STATUS_E_FAILURE;
440}
441
442/**
443 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
444 * @param wmi_handle : handle to WMI.
445 * @param: pointer to wow wakeup pattern parameter structure
446 *
447 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
448 */
449QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
450 struct wow_remove_wakeup_pattern_params *param)
451{
452 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
453
454 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
455 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
456
457 return QDF_STATUS_E_FAILURE;
458}
459
460/**
Govind Singh5eb51532016-03-09 11:34:12 +0530461 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
462 * @wma_ctx: wma context
463 * @peer_addr: peer mac address
464 * @param: pointer to ap_ps parameter structure
465 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530466 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530467 */
Govind Singhb53420c2016-03-09 14:32:57 +0530468QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530469 uint8_t *peer_addr,
470 struct ap_ps_params *param)
471{
472 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
473
474 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
475 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
476 peer_addr,
477 param);
478
Govind Singhb53420c2016-03-09 14:32:57 +0530479 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530480}
481
482/**
483 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
484 * @wma_ctx: wma context
485 * @peer_addr: peer mac address
486 * @param: pointer to sta_ps parameter structure
487 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530488 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530489 */
Govind Singhb53420c2016-03-09 14:32:57 +0530490QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530491 struct sta_ps_params *param)
492{
493 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
494
495 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
496 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
497 param);
498
Govind Singhb53420c2016-03-09 14:32:57 +0530499 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530500}
501
502/**
503 * wmi_crash_inject() - inject fw crash
504 * @wma_handle: wma handle
505 * @param: ponirt to crash inject paramter structure
506 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530507 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530508 */
Govind Singhb53420c2016-03-09 14:32:57 +0530509QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530510 struct crash_inject *param)
511{
512 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
513
514 if (wmi_handle->ops->send_crash_inject_cmd)
515 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
516 param);
517
Govind Singhb53420c2016-03-09 14:32:57 +0530518 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530519}
520
521/**
522 * wmi_unified_dbglog_cmd_send() - set debug log level
523 * @param wmi_handle : handle to WMI.
524 * @param param : pointer to hold dbglog level parameter
525 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530526 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530527 */
Govind Singhb53420c2016-03-09 14:32:57 +0530528QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530529wmi_unified_dbglog_cmd_send(void *wmi_hdl,
530 struct dbglog_params *dbglog_param)
531{
532 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
533
534 if (wmi_handle->ops->send_dbglog_cmd)
535 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
536 dbglog_param);
537
Govind Singhb53420c2016-03-09 14:32:57 +0530538 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530539}
540
541/**
542 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
543 * @param wmi_handle : handle to WMI.
544 * @param macaddr : MAC address
545 * @param param : pointer to hold vdev set parameter
546 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530547 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530548 */
Govind Singhb53420c2016-03-09 14:32:57 +0530549QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530550 struct vdev_set_params *param)
551{
552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
553
554 if (wmi_handle->ops->send_vdev_set_param_cmd)
555 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
556 param);
557
Govind Singhb53420c2016-03-09 14:32:57 +0530558 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530559}
560
561/**
562 * wmi_unified_stats_request_send() - WMI request stats function
563 * @param wmi_handle : handle to WMI.
564 * @param macaddr : MAC address
565 * @param param : pointer to hold stats request parameter
566 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530567 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530568 */
Govind Singhb53420c2016-03-09 14:32:57 +0530569QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530570 uint8_t macaddr[IEEE80211_ADDR_LEN],
571 struct stats_request_params *param)
572{
573 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
574
575 if (wmi_handle->ops->send_stats_request_cmd)
576 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
577 macaddr, param);
578
Govind Singhb53420c2016-03-09 14:32:57 +0530579 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530580}
581
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530582#ifndef WMI_NON_TLV_SUPPORT
Govind Singh5eb51532016-03-09 11:34:12 +0530583/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530584 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530585 * @param wmi_handle : handle to WMI.
586 * @param macaddr : MAC address
587 * @param param : pointer to hold stats request parameter
588 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530589 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530590 */
Govind Singhb53420c2016-03-09 14:32:57 +0530591QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530592 uint8_t macaddr[IEEE80211_ADDR_LEN],
593 struct packet_enable_params *param)
594{
595 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
596
597 if (wmi_handle->ops->send_packet_log_enable_cmd)
598 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
599 macaddr, param);
600
Govind Singhb53420c2016-03-09 14:32:57 +0530601 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530602}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530603#else
604/**
605 * wmi_unified_packet_log_enable_send() - WMI request stats function
606 * @param wmi_handle : handle to WMI.
607 * @param macaddr : MAC address
608 * @param param : pointer to hold stats request parameter
609 *
610 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
611 */
612QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
613 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT)
614{
615 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
616
617 if (wmi_handle->ops->send_packet_log_enable_cmd)
618 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
619 PKTLOG_EVENT);
620
621 return QDF_STATUS_E_FAILURE;
622}
623
624#endif
625/**
626 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
627 * @param wmi_handle : handle to WMI.
628 * @param PKTLOG_EVENT : packet log event
629 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
630 */
631QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl)
632{
633 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
634
635 if (wmi_handle->ops->send_packet_log_disable_cmd)
636 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle);
637
638 return QDF_STATUS_E_FAILURE;
639}
Govind Singh5eb51532016-03-09 11:34:12 +0530640
641/**
642 * wmi_unified_beacon_send_cmd() - WMI beacon send function
643 * @param wmi_handle : handle to WMI.
644 * @param macaddr : MAC address
645 * @param param : pointer to hold beacon send cmd parameter
646 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530647 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530648 */
Govind Singhb53420c2016-03-09 14:32:57 +0530649QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530650 struct beacon_params *param)
651{
652 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
653
654 if (wmi_handle->ops->send_beacon_send_cmd)
655 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530656 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530657
Govind Singhb53420c2016-03-09 14:32:57 +0530658 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530659}
660
661/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530662 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
663 * @param wmi_handle : handle to WMI.
664 * @param macaddr : MAC address
665 * @param param : pointer to hold beacon send cmd parameter
666 *
667 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
668 */
669QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
670 struct beacon_tmpl_params *param)
671{
672 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
673
674 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
675 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
676 param);
677
678 return QDF_STATUS_E_FAILURE;
679}
680/**
Govind Singh5eb51532016-03-09 11:34:12 +0530681 * wmi_unified_peer_assoc_send() - WMI peer assoc function
682 * @param wmi_handle : handle to WMI.
683 * @param macaddr : MAC address
684 * @param param : pointer to peer assoc parameter
685 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530686 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530687 */
Govind Singhb53420c2016-03-09 14:32:57 +0530688QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530689 struct peer_assoc_params *param)
690{
691 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
692
693 if (wmi_handle->ops->send_peer_assoc_cmd)
694 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530695 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530696
Govind Singhb53420c2016-03-09 14:32:57 +0530697 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530698}
699
700/**
701 * wmi_unified_scan_start_cmd_send() - WMI scan start function
702 * @param wmi_handle : handle to WMI.
703 * @param macaddr : MAC address
704 * @param param : pointer to hold scan start cmd parameter
705 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530706 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530707 */
Govind Singhb53420c2016-03-09 14:32:57 +0530708QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530709 struct scan_start_params *param)
710{
711 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
712
713 if (wmi_handle->ops->send_scan_start_cmd)
714 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530715 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530716
Govind Singhb53420c2016-03-09 14:32:57 +0530717 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530718}
719
720/**
721 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
722 * @param wmi_handle : handle to WMI.
723 * @param macaddr : MAC address
724 * @param param : pointer to hold scan start cmd parameter
725 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530726 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530727 */
Govind Singhb53420c2016-03-09 14:32:57 +0530728QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530729 struct scan_stop_params *param)
730{
731 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
732
733 if (wmi_handle->ops->send_scan_stop_cmd)
734 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530735 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530736
Govind Singhb53420c2016-03-09 14:32:57 +0530737 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530738}
739
740/**
741 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
742 * @param wmi_handle : handle to WMI.
743 * @param macaddr : MAC address
744 * @param param : pointer to hold scan channel list parameter
745 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530746 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530747 */
Govind Singhb53420c2016-03-09 14:32:57 +0530748QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530749 struct scan_chan_list_params *param)
750{
751 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
752
753 if (wmi_handle->ops->send_scan_chan_list_cmd)
754 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530755 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530756
Govind Singhb53420c2016-03-09 14:32:57 +0530757 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530758}
Govind Singh427ee5a2016-02-26 18:09:36 +0530759
760/**
761 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
762 * @wmi_hdl : handle to WMI.
763 * @param : pointer to hold mgmt cmd parameter
764 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530765 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530766 */
Govind Singhb53420c2016-03-09 14:32:57 +0530767QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530768 struct wmi_mgmt_params *param)
769{
770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
771
772 if (wmi_handle->ops->send_mgmt_cmd)
773 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
774 param);
775
Govind Singhb53420c2016-03-09 14:32:57 +0530776 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530777}
778
779/**
780 * wmi_unified_modem_power_state() - set modem power state to fw
781 * @wmi_hdl: wmi handle
782 * @param_value: parameter value
783 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530784 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530785 */
Govind Singhb53420c2016-03-09 14:32:57 +0530786QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530787 uint32_t param_value)
788{
789 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
790
791 if (wmi_handle->ops->send_modem_power_state_cmd)
792 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
793 param_value);
794
Govind Singhb53420c2016-03-09 14:32:57 +0530795 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530796}
797
798/**
799 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
800 * @wmi_hdl: wmi handle
801 * @vdev_id: vdev id
802 * @val: value
803 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530804 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530805 */
Govind Singhb53420c2016-03-09 14:32:57 +0530806QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530807 uint32_t vdev_id, uint8_t val)
808{
809 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
810
811 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
812 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
813 vdev_id, val);
814
Govind Singhb53420c2016-03-09 14:32:57 +0530815 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530816}
817
818/**
819 * wmi_set_mimops() - set MIMO powersave
820 * @wmi_hdl: wmi handle
821 * @vdev_id: vdev id
822 * @value: value
823 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530824 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530825 */
Govind Singhb53420c2016-03-09 14:32:57 +0530826QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530827{
828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
829
830 if (wmi_handle->ops->send_set_mimops_cmd)
831 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
832 vdev_id, value);
833
Govind Singhb53420c2016-03-09 14:32:57 +0530834 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530835}
836
837/**
838 * wmi_set_smps_params() - set smps params
839 * @wmi_hdl: wmi handle
840 * @vdev_id: vdev id
841 * @value: value
842 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530843 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530844 */
Govind Singhb53420c2016-03-09 14:32:57 +0530845QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530846 int value)
847{
848 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
849
850 if (wmi_handle->ops->send_set_smps_params_cmd)
851 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
852 vdev_id, value);
853
Govind Singhb53420c2016-03-09 14:32:57 +0530854 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530855}
856
857
858/**
859 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
860 * @wmi_hdl: wmi handle
861 * @opps: p2p opp power save parameters
862 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530863 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530864 */
Govind Singhb53420c2016-03-09 14:32:57 +0530865QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530866 struct p2p_ps_params *oppps)
867{
868 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
869
870 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
871 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
872 oppps);
873
Govind Singhb53420c2016-03-09 14:32:57 +0530874 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530875}
876
877/**
878 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
879 * @wmi_hdl: wmi handle
880 * @noa: p2p power save parameters
881 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530882 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530883 */
Govind Singhb53420c2016-03-09 14:32:57 +0530884QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530885 struct p2p_ps_params *noa)
886{
887 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
888
889 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
890 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
891 noa);
892
Govind Singhb53420c2016-03-09 14:32:57 +0530893 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530894}
895
896/**
897 * wmi_get_temperature() - get pdev temperature req
898 * @wmi_hdl: wmi handle
899 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530900 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530901 */
Govind Singhb53420c2016-03-09 14:32:57 +0530902QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +0530903{
904 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
905
906 if (wmi_handle->ops->send_get_temperature_cmd)
907 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
908
Govind Singhb53420c2016-03-09 14:32:57 +0530909 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530910}
911
912/**
913 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
914 * @wmi_hdl: wmi handle
915 * @end_set_sta_ps_mode_cmd: cmd paramter strcture
916 *
917 * This function sets the trigger
918 * uapsd params such as service interval, delay interval
919 * and suspend interval which will be used by the firmware
920 * to send trigger frames periodically when there is no
921 * traffic on the transmit side.
922 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530923 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530924 */
Govind Singhb53420c2016-03-09 14:32:57 +0530925QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +0530926wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
927 struct sta_uapsd_trig_params *param)
928{
929 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
930
931 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
932 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
933 param);
934
Govind Singhb53420c2016-03-09 14:32:57 +0530935 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530936}
Govind Singh2edc80f2016-03-01 15:30:53 +0530937
938/**
939 * wmi_unified_ocb_start_timing_advert() - start sending the timing advertisement
940 * frames on a channel
941 * @wmi_handle: pointer to the wmi handle
942 * @timing_advert: pointer to the timing advertisement struct
943 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530944 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530945 */
Govind Singhb53420c2016-03-09 14:32:57 +0530946QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530947 struct ocb_timing_advert_param *timing_advert)
948{
949 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
950
951 if (wmi_handle->ops->send_ocb_start_timing_advert_cmd)
952 return wmi_handle->ops->send_ocb_start_timing_advert_cmd(wmi_handle,
953 timing_advert);
954
Govind Singhb53420c2016-03-09 14:32:57 +0530955 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530956}
957
958/**
959 * wmi_unified_ocb_stop_timing_advert() - stop sending the timing advertisement
960 * frames on a channel
961 * @wmi_handle: pointer to the wmi handle
962 * @timing_advert: pointer to the timing advertisement struct
963 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530964 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530965 */
Govind Singhb53420c2016-03-09 14:32:57 +0530966QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530967 struct ocb_timing_advert_param *timing_advert)
968{
969 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
970
971 if (wmi_handle->ops->send_ocb_stop_timing_advert_cmd)
972 return wmi_handle->ops->send_ocb_stop_timing_advert_cmd(wmi_handle,
973 timing_advert);
974
Govind Singhb53420c2016-03-09 14:32:57 +0530975 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530976}
977
978/**
979 * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
980 * @wmi_handle: pointer to the wmi handle
981 * @vdev_id: vdev id
982 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530983 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +0530984 */
Govind Singhb53420c2016-03-09 14:32:57 +0530985QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +0530986 struct ocb_utc_param *utc)
987{
988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
989
990 if (wmi_handle->ops->send_ocb_set_utc_time_cmd)
991 return wmi_handle->ops->send_ocb_set_utc_time_cmd(wmi_handle,
992 utc);
993
Govind Singhb53420c2016-03-09 14:32:57 +0530994 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +0530995}
996
997/**
998 * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
999 * @wmi_handle: pointer to the wmi handle
1000 * @vdev_id: vdev id
1001 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301002 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301003 */
Govind Singhb53420c2016-03-09 14:32:57 +05301004QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301005 uint8_t vdev_id)
1006{
1007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1008
1009 if (wmi_handle->ops->send_ocb_get_tsf_timer_cmd)
1010 return wmi_handle->ops->send_ocb_get_tsf_timer_cmd(wmi_handle,
1011 vdev_id);
1012
Govind Singhb53420c2016-03-09 14:32:57 +05301013 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301014}
1015
1016/**
1017 * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
1018 * @wmi_handle: pointer to the wmi handle
1019 * @get_stats_param: pointer to the dcc stats
1020 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301021 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301022 */
Govind Singhb53420c2016-03-09 14:32:57 +05301023QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301024 struct dcc_get_stats_param *get_stats_param)
1025{
1026 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1027
1028 if (wmi_handle->ops->send_dcc_get_stats_cmd)
1029 return wmi_handle->ops->send_dcc_get_stats_cmd(wmi_handle,
1030 get_stats_param);
1031
Govind Singhb53420c2016-03-09 14:32:57 +05301032 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301033}
1034
1035/**
1036 * wmi_unified_dcc_clear_stats() - command to clear the DCC stats
1037 * @wmi_handle: pointer to the wmi handle
1038 * @clear_stats_param: parameters to the command
1039 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301040 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301041 */
Govind Singhb53420c2016-03-09 14:32:57 +05301042QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301043 uint32_t vdev_id, uint32_t dcc_stats_bitmap)
1044{
1045 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1046
1047 if (wmi_handle->ops->send_dcc_clear_stats_cmd)
1048 return wmi_handle->ops->send_dcc_clear_stats_cmd(wmi_handle,
1049 vdev_id, dcc_stats_bitmap);
1050
Govind Singhb53420c2016-03-09 14:32:57 +05301051 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301052}
1053
1054/**
1055 * wmi_unified_dcc_update_ndl() - command to update the NDL data
1056 * @wmi_handle: pointer to the wmi handle
1057 * @update_ndl_param: pointer to the request parameters
1058 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301059 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301060 */
Govind Singhb53420c2016-03-09 14:32:57 +05301061QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301062 struct dcc_update_ndl_param *update_ndl_param)
1063{
1064 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1065
1066 if (wmi_handle->ops->send_dcc_update_ndl_cmd)
1067 return wmi_handle->ops->send_dcc_update_ndl_cmd(wmi_handle,
1068 update_ndl_param);
1069
Govind Singhb53420c2016-03-09 14:32:57 +05301070 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301071}
1072
1073/**
1074 * wmi_unified_ocb_set_config() - send the OCB config to the FW
1075 * @wmi_handle: pointer to the wmi handle
1076 * @config: the OCB configuration
1077 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301078 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301079 */
Govind Singhb53420c2016-03-09 14:32:57 +05301080QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301081 struct ocb_config_param *config, uint32_t *ch_mhz)
1082{
1083 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1084
1085 if (wmi_handle->ops->send_ocb_set_config_cmd)
1086 return wmi_handle->ops->send_ocb_set_config_cmd(wmi_handle,
1087 config, ch_mhz);
1088
Govind Singhb53420c2016-03-09 14:32:57 +05301089 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301090}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301091
1092/**
1093 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1094 * @wmi_handle: wmi handle
1095 * @mcc_adaptive_scheduler: enable/disable
1096 *
1097 * This function enable/disable mcc adaptive scheduler in fw.
1098 *
Govind Singhb53420c2016-03-09 14:32:57 +05301099 * Return: QDF_STATUS_SUCCESS for sucess or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301100 */
Govind Singhb53420c2016-03-09 14:32:57 +05301101QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001102 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1103 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301104{
1105 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1106
1107 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1108 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001109 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301110
Govind Singhb53420c2016-03-09 14:32:57 +05301111 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301112}
1113
1114/**
1115 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1116 * @wmi: wmi handle
1117 * @mcc_channel: mcc channel
1118 * @mcc_channel_time_latency: MCC channel time latency.
1119 *
1120 * Currently used to set time latency for an MCC vdev/adapter using operating
1121 * channel of it and channel number. The info is provided run time using
1122 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1123 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301125 */
Govind Singhb53420c2016-03-09 14:32:57 +05301126QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301127 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1128{
1129 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1130
1131 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1132 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1133 mcc_channel_freq,
1134 mcc_channel_time_latency);
1135
Govind Singhb53420c2016-03-09 14:32:57 +05301136 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301137}
1138
1139/**
1140 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1141 * @wmi: wmi handle
1142 * @adapter_1_chan_number: adapter 1 channel number
1143 * @adapter_1_quota: adapter 1 quota
1144 * @adapter_2_chan_number: adapter 2 channel number
1145 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301146 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301147 */
Govind Singhb53420c2016-03-09 14:32:57 +05301148QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301149 uint32_t adapter_1_chan_freq,
1150 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301151{
1152 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1153
1154 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1155 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1156 adapter_1_chan_freq,
1157 adapter_1_quota,
1158 adapter_2_chan_freq);
1159
Govind Singhb53420c2016-03-09 14:32:57 +05301160 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301161}
1162
1163/**
1164 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1165 * @wmi_handle: Pointer to wmi handle
1166 * @thermal_info: Thermal command information
1167 *
1168 * This function sends the thermal management command
1169 * to the firmware
1170 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301171 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301172 */
Govind Singhb53420c2016-03-09 14:32:57 +05301173QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301174 struct thermal_cmd_params *thermal_info)
1175{
1176 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1177
1178 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1179 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1180 thermal_info);
1181
Govind Singhb53420c2016-03-09 14:32:57 +05301182 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301183}
1184
1185
1186/**
1187 * wmi_unified_lro_config_cmd() - process the LRO config command
1188 * @wmi: Pointer to wmi handle
1189 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1190 *
1191 * This function sends down the LRO configuration parameters to
1192 * the firmware to enable LRO, sets the TCP flags and sets the
1193 * seed values for the toeplitz hash generation
1194 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301195 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301196 */
Govind Singhb53420c2016-03-09 14:32:57 +05301197QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301198 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1199{
1200 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1201
1202 if (wmi_handle->ops->send_lro_config_cmd)
1203 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1204 wmi_lro_cmd);
1205
Govind Singhb53420c2016-03-09 14:32:57 +05301206 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301207}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301208
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301209#ifndef WMI_NON_TLV_SUPPORT
Govind Singh4eacd2b2016-03-07 14:24:22 +05301210/**
1211 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1212 * @wmi_hdl: wmi handle
1213 * @param: bcn ll cmd parameter
1214 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301215 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301216 */
Govind Singhb53420c2016-03-09 14:32:57 +05301217QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301218 wmi_bcn_send_from_host_cmd_fixed_param *param)
1219{
1220 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1221
1222 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1223 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1224 param);
1225
Govind Singhb53420c2016-03-09 14:32:57 +05301226 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301227}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301228#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301229
1230/**
1231 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1232 * @wmi_hdl: wmi handle
1233 * @vdev_id: vdev id
1234 * @max_retries: max retries
1235 * @retry_interval: retry interval
1236 * This function sets sta query related parameters in fw.
1237 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301238 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301239 */
1240
Govind Singhb53420c2016-03-09 14:32:57 +05301241QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301242 uint8_t vdev_id, uint32_t max_retries,
1243 uint32_t retry_interval)
1244{
1245 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1246
1247 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1248 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1249 vdev_id, max_retries,
1250 retry_interval);
1251
Govind Singhb53420c2016-03-09 14:32:57 +05301252 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301253}
1254
1255/**
1256 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1257 * @wmi_hdl: wmi handle
1258 * @params: sta keep alive parameter
1259 *
1260 * This function sets keep alive related parameters in fw.
1261 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301262 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301263 */
Govind Singhb53420c2016-03-09 14:32:57 +05301264QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301265 struct sta_params *params)
1266{
1267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1268
1269 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1270 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1271 params);
1272
Govind Singhb53420c2016-03-09 14:32:57 +05301273 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301274}
1275
1276/**
1277 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1278 * @wmi_hdl: wmi handle
1279 * @if_id: vdev id
1280 * @gtx_info: GTX config params
1281 *
1282 * This function set GTX related params in firmware.
1283 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301284 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301285 */
Govind Singhb53420c2016-03-09 14:32:57 +05301286QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301287 struct wmi_gtx_config *gtx_info)
1288{
1289 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1290
1291 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1292 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1293 if_id, gtx_info);
1294
Govind Singhb53420c2016-03-09 14:32:57 +05301295 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301296}
1297
1298/**
1299 * wmi_unified_process_update_edca_param() - update EDCA params
1300 * @wmi_hdl: wmi handle
1301 * @edca_params: edca parameters
1302 *
1303 * This function updates EDCA parameters to the target
1304 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301305 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301306 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301307#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05301308QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301309 uint8_t vdev_id,
1310 wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC])
1311{
1312 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1313
1314 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1315 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
1316 vdev_id, gwmm_param);
1317
Govind Singhb53420c2016-03-09 14:32:57 +05301318 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301319}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301320#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301321
1322/**
1323 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1324 * @wmi_hdl: wmi handle
1325 * @vdev_id: vdev id
1326 * @probe_rsp_info: probe response info
1327 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301328 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301329 */
Govind Singhb53420c2016-03-09 14:32:57 +05301330QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301331 uint8_t vdev_id,
1332 struct wmi_probe_resp_params *probe_rsp_info,
1333 uint8_t *frm)
1334{
1335 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1336
1337 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1338 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
1339 vdev_id, probe_rsp_info,
1340 frm);
1341
Govind Singhb53420c2016-03-09 14:32:57 +05301342 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301343}
1344
1345/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301346 * wmi_unified_setup_install_key_cmd - send key to install to fw
1347 * @wmi_hdl: wmi handle
1348 * @key_params: key parameters
1349 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301350 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301351 */
1352QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1353 struct set_key_params *key_params)
1354{
1355 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1356
1357 if (wmi_handle->ops->send_setup_install_key_cmd)
1358 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1359 key_params);
1360
1361 return QDF_STATUS_E_FAILURE;
1362}
1363
1364/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301365 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1366 * @wma_handle: wma handle
1367 * @vdev_id: vdev id
1368 * @p2p_ie: p2p IE
1369 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301370 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301371 */
Govind Singhb53420c2016-03-09 14:32:57 +05301372QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301373 A_UINT32 vdev_id, uint8_t *p2p_ie)
1374{
1375 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1376
1377 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1378 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1379 vdev_id, p2p_ie);
1380
Govind Singhb53420c2016-03-09 14:32:57 +05301381 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301382}
1383
1384/**
1385 * wmi_unified_set_gateway_params_cmd() - set gateway parameters
1386 * @wmi_hdl: wmi handle
1387 * @req: gateway parameter update request structure
1388 *
1389 * This function reads the incoming @req and fill in the destination
1390 * WMI structure and sends down the gateway configs down to the firmware
1391 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1393 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301394 */
Govind Singhb53420c2016-03-09 14:32:57 +05301395QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301396 struct gateway_update_req_param *req)
1397{
1398 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1399
1400 if (wmi_handle->ops->send_set_gateway_params_cmd)
1401 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1402 req);
1403
Govind Singhb53420c2016-03-09 14:32:57 +05301404 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301405}
1406
1407/**
1408 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1409 * @wmi_hdl: wmi handle
1410 * @req: rssi monitoring request structure
1411 *
1412 * This function reads the incoming @req and fill in the destination
1413 * WMI structure and send down the rssi monitoring configs down to the firmware
1414 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301415 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1416 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301417 */
Govind Singhb53420c2016-03-09 14:32:57 +05301418QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301419 struct rssi_monitor_param *req)
1420{
1421 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1422
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301423 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301424 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1425 req);
1426
Govind Singhb53420c2016-03-09 14:32:57 +05301427 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301428}
1429
1430/**
1431 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1432 * @wmi_hdl: wmi handle
1433 * @psetoui: OUI parameters
1434 *
1435 * set scan probe OUI parameters in firmware
1436 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301438 */
Govind Singhb53420c2016-03-09 14:32:57 +05301439QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301440 struct scan_mac_oui *psetoui)
1441{
1442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1443
1444 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1445 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1446 psetoui);
1447
Govind Singhb53420c2016-03-09 14:32:57 +05301448 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301449}
1450
1451/**
1452 * wmi_unified_reset_passpoint_network_list_cmd() - reset passpoint network list
1453 * @wmi_hdl: wmi handle
1454 * @req: passpoint network request structure
1455 *
1456 * This function sends down WMI command with network id set to wildcard id.
1457 * firmware shall clear all the config entries
1458 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301459 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301460 */
Govind Singhb53420c2016-03-09 14:32:57 +05301461QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301462 struct wifi_passpoint_req_param *req)
1463{
1464 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1465
1466 if (wmi_handle->ops->send_reset_passpoint_network_list_cmd)
1467 return wmi_handle->ops->send_reset_passpoint_network_list_cmd(wmi_handle,
1468 req);
1469
Govind Singhb53420c2016-03-09 14:32:57 +05301470 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301471}
1472
1473/**
1474 * wmi_unified_set_passpoint_network_list_cmd() - set passpoint network list
1475 * @wmi_hdl: wmi handle
1476 * @req: passpoint network request structure
1477 *
1478 * This function reads the incoming @req and fill in the destination
1479 * WMI structure and send down the passpoint configs down to the firmware
1480 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301481 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301482 */
Govind Singhb53420c2016-03-09 14:32:57 +05301483QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301484 struct wifi_passpoint_req_param *req)
1485{
1486 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1487
1488 if (wmi_handle->ops->send_set_passpoint_network_list_cmd)
1489 return wmi_handle->ops->send_set_passpoint_network_list_cmd(wmi_handle,
1490 req);
1491
Govind Singhb53420c2016-03-09 14:32:57 +05301492 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301493}
1494
1495/** wmi_unified_set_epno_network_list_cmd() - set epno network list
1496 * @wmi_hdl: wmi handle
1497 * @req: epno config params request structure
1498 *
1499 * This function reads the incoming epno config request structure
1500 * and constructs the WMI message to the firmware.
1501 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301502 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1503 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301504 */
Govind Singhb53420c2016-03-09 14:32:57 +05301505QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301506 struct wifi_enhanched_pno_params *req)
1507{
1508 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1509
1510 if (wmi_handle->ops->send_set_epno_network_list_cmd)
1511 return wmi_handle->ops->send_set_epno_network_list_cmd(wmi_handle,
1512 req);
1513
Govind Singhb53420c2016-03-09 14:32:57 +05301514 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301515}
1516
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301517#ifndef WMI_NON_TLV_SUPPORT
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301518/**
1519 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1520 * @wmi_hdl: wmi handle
1521 * @scan_cmd_fp: scan related parameters
1522 * @roam_req: roam related parameters
1523 *
1524 * This function reads the incoming @roam_req and fill in the destination
1525 * WMI structure and send down the roam scan configs down to the firmware
1526 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301527 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301528 */
1529QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1530 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1531 struct roam_offload_scan_params *roam_req)
1532{
1533 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1534
1535 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1536 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1537 wmi_handle, scan_cmd_fp, roam_req);
1538
1539 return QDF_STATUS_E_FAILURE;
1540}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301541#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301542
1543/**
1544 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1545 * parameters
1546 * @wmi_hdl: wmi handle
1547 * @roam_req: roam rssi related parameters
1548 *
1549 * This function reads the incoming @roam_req and fill in the destination
1550 * WMI structure and send down the roam scan rssi configs down to the firmware
1551 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301552 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301553 */
1554QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1555 struct roam_offload_scan_rssi_params
1556 *roam_req)
1557{
1558 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1559
1560 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1561 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1562 wmi_handle, roam_req);
1563
1564 return QDF_STATUS_E_FAILURE;
1565}
1566
1567/**
1568 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1569 * blacklist and preferred list
1570 * @wmi_hdl: wmi handle
1571 * @roam_req: roam scan lists related parameters
1572 *
1573 * This function reads the incoming @roam_req and fill in the destination
1574 * WMI structure and send down the different roam scan lists down to the fw
1575 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301576 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301577 */
1578QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1579 struct roam_scan_filter_params *roam_req)
1580{
1581 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1582
1583 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1584 return wmi_handle->ops->send_roam_scan_filter_cmd(
1585 wmi_handle, roam_req);
1586
1587 return QDF_STATUS_E_FAILURE;
1588}
1589
Govind Singh4eacd2b2016-03-07 14:24:22 +05301590/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1591 * @wmi_hdl: wmi handle
1592 * @ipa_offload: ipa offload control parameter
1593 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301594 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1595 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301596 */
Govind Singhb53420c2016-03-09 14:32:57 +05301597QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301598 struct ipa_offload_control_params *ipa_offload)
1599{
1600 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1601
1602 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1603 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1604 ipa_offload);
1605
Govind Singhb53420c2016-03-09 14:32:57 +05301606 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301607}
1608
1609/**
1610 * wmi_unified_extscan_get_capabilities_cmd() - extscan get capabilities
1611 * @wmi_hdl: wmi handle
1612 * @pgetcapab: get capabilities params
1613 *
1614 * This function send request to fw to get extscan capabilities.
1615 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301616 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301617 */
Govind Singhb53420c2016-03-09 14:32:57 +05301618QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301619 struct extscan_capabilities_params *pgetcapab)
1620{
1621 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1622
1623 if (wmi_handle->ops->send_extscan_get_capabilities_cmd)
1624 return wmi_handle->ops->send_extscan_get_capabilities_cmd(wmi_handle,
1625 pgetcapab);
1626
Govind Singhb53420c2016-03-09 14:32:57 +05301627 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301628}
1629
1630/**
1631 * wmi_unified_extscan_get_cached_results_cmd() - extscan get cached results
1632 * @wmi_hdl: wmi handle
1633 * @pcached_results: cached results parameters
1634 *
1635 * This function send request to fw to get cached results.
1636 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301637 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301638 */
Govind Singhb53420c2016-03-09 14:32:57 +05301639QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301640 struct extscan_cached_result_params *pcached_results)
1641{
1642 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1643
1644 if (wmi_handle->ops->send_extscan_get_cached_results_cmd)
1645 return wmi_handle->ops->send_extscan_get_cached_results_cmd(wmi_handle,
1646 pcached_results);
1647
Govind Singhb53420c2016-03-09 14:32:57 +05301648 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301649}
1650
1651/**
1652 * wmi_unified_extscan_stop_change_monitor_cmd() - send stop change monitor cmd
1653 * @wmi_hdl: wmi handle
1654 * @reset_req: Reset change request params
1655 *
1656 * This function sends stop change monitor request to fw.
1657 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301659 */
Govind Singhb53420c2016-03-09 14:32:57 +05301660QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301661 struct extscan_capabilities_reset_params *reset_req)
1662{
1663 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1664
1665 if (wmi_handle->ops->send_extscan_stop_change_monitor_cmd)
1666 return wmi_handle->ops->send_extscan_stop_change_monitor_cmd(wmi_handle,
1667 reset_req);
1668
Govind Singhb53420c2016-03-09 14:32:57 +05301669 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301670}
1671
1672
1673
1674/**
1675 * wmi_unified_extscan_start_change_monitor_cmd() - start change monitor cmd
1676 * @wmi_hdl: wmi handle
1677 * @psigchange: change monitor request params
1678 *
1679 * This function sends start change monitor request to fw.
1680 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301681 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301682 */
Govind Singhb53420c2016-03-09 14:32:57 +05301683QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301684 struct extscan_set_sig_changereq_params *
1685 psigchange)
1686{
1687 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1688
1689 if (wmi_handle->ops->send_extscan_start_change_monitor_cmd)
1690 return wmi_handle->ops->send_extscan_start_change_monitor_cmd(wmi_handle,
1691 psigchange);
1692
Govind Singhb53420c2016-03-09 14:32:57 +05301693 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301694}
1695
1696/**
1697 * wmi_unified_extscan_stop_hotlist_monitor_cmd() - stop hotlist monitor
1698 * @wmi_hdl: wmi handle
1699 * @photlist_reset: hotlist reset params
1700 *
1701 * This function configures hotlist monitor to stop in fw.
1702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301703 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301704 */
Govind Singhb53420c2016-03-09 14:32:57 +05301705QDF_STATUS wmi_unified_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301706 struct extscan_bssid_hotlist_reset_params *photlist_reset)
1707{
1708 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1709
1710 if (wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd)
1711 return wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd(wmi_handle,
1712 photlist_reset);
1713
Govind Singhb53420c2016-03-09 14:32:57 +05301714 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301715}
1716
1717/**
1718 * wmi_unified_stop_extscan_cmd() - stop extscan command to fw.
1719 * @wmi_hdl: wmi handle
1720 * @pstopcmd: stop scan command request params
1721 *
1722 * This function sends stop extscan request to fw.
1723 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301724 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301725 */
Govind Singhb53420c2016-03-09 14:32:57 +05301726QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301727 struct extscan_stop_req_params *pstopcmd)
1728{
1729 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1730
1731 if (wmi_handle->ops->send_stop_extscan_cmd)
1732 return wmi_handle->ops->send_stop_extscan_cmd(wmi_handle,
1733 pstopcmd);
1734
Govind Singhb53420c2016-03-09 14:32:57 +05301735 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301736}
1737
1738/**
1739 * wmi_unified_start_extscan_cmd() - start extscan command to fw.
1740 * @wmi_hdl: wmi handle
1741 * @pstart: scan command request params
1742 *
1743 * This function sends start extscan request to fw.
1744 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301745 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301746 */
Govind Singhb53420c2016-03-09 14:32:57 +05301747QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301748 struct wifi_scan_cmd_req_params *pstart)
1749{
1750 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1751
1752 if (wmi_handle->ops->send_start_extscan_cmd)
1753 return wmi_handle->ops->send_start_extscan_cmd(wmi_handle,
1754 pstart);
1755
Govind Singhb53420c2016-03-09 14:32:57 +05301756 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301757}
1758
1759/**
1760 * wmi_unified_plm_stop_cmd() - plm stop request
1761 * @wmi_hdl: wmi handle
1762 * @plm: plm request parameters
1763 *
1764 * This function request FW to stop PLM.
1765 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301766 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301767 */
Govind Singhb53420c2016-03-09 14:32:57 +05301768QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301769 const struct plm_req_params *plm)
1770{
1771 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1772
1773 if (wmi_handle->ops->send_plm_stop_cmd)
1774 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1775 plm);
1776
Govind Singhb53420c2016-03-09 14:32:57 +05301777 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301778}
1779
1780/**
1781 * wmi_unified_plm_start_cmd() - plm start request
1782 * @wmi_hdl: wmi handle
1783 * @plm: plm request parameters
1784 *
1785 * This function request FW to start PLM.
1786 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301787 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301788 */
Govind Singhb53420c2016-03-09 14:32:57 +05301789QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301790 const struct plm_req_params *plm,
1791 uint32_t *gchannel_list)
1792{
1793 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1794
1795 if (wmi_handle->ops->send_plm_start_cmd)
1796 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1797 plm, gchannel_list);
1798
Govind Singhb53420c2016-03-09 14:32:57 +05301799 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301800}
1801
1802/**
1803 * send_pno_stop_cmd() - PNO stop request
1804 * @wmi_hdl: wmi handle
1805 * @vdev_id: vdev id
1806 *
1807 * This function request FW to stop ongoing PNO operation.
1808 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301809 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301810 */
Govind Singhb53420c2016-03-09 14:32:57 +05301811QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301812{
1813 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1814
1815 if (wmi_handle->ops->send_pno_stop_cmd)
1816 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1817 vdev_id);
1818
Govind Singhb53420c2016-03-09 14:32:57 +05301819 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301820}
1821
1822/**
1823 * wmi_unified_pno_start_cmd() - PNO start request
1824 * @wmi_hdl: wmi handle
1825 * @pno: PNO request
1826 * @gchannel_freq_list: channel frequency list
1827 *
1828 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301829 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301830 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301831#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301832QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301833 struct pno_scan_req_params *pno,
1834 uint32_t *gchannel_freq_list)
1835{
1836 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1837
1838 if (wmi_handle->ops->send_pno_start_cmd)
1839 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
1840 pno, gchannel_freq_list);
1841
Govind Singhb53420c2016-03-09 14:32:57 +05301842 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301843}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301844#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301845
1846/* wmi_unified_set_ric_req_cmd() - set ric request element
1847 * @wmi_hdl: wmi handle
1848 * @msg: message
1849 * @is_add_ts: is addts required
1850 *
1851 * This function sets ric request element for 11r roaming.
1852 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301853 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301854 */
Govind Singhb53420c2016-03-09 14:32:57 +05301855QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301856 uint8_t is_add_ts)
1857{
1858 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1859
1860 if (wmi_handle->ops->send_set_ric_req_cmd)
1861 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
1862 is_add_ts);
1863
Govind Singhb53420c2016-03-09 14:32:57 +05301864 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301865}
1866
1867/**
1868 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1869 * @wmi_hdl: wmi handle
1870 * @clear_req: ll stats clear request command params
1871 * @addr: mac address
1872 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301873 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301874 */
Govind Singhb53420c2016-03-09 14:32:57 +05301875QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301876 const struct ll_stats_clear_params *clear_req,
1877 uint8_t addr[IEEE80211_ADDR_LEN])
1878{
1879 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1880
1881 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1882 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1883 clear_req, addr);
1884
Govind Singhb53420c2016-03-09 14:32:57 +05301885 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301886}
1887
1888/**
1889 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1890 * @wmi_hdl:wmi handle
1891 * @get_req:ll stats get request command params
1892 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301893 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301894 */
Govind Singhb53420c2016-03-09 14:32:57 +05301895QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301896 const struct ll_stats_get_params *get_req,
1897 uint8_t addr[IEEE80211_ADDR_LEN])
1898{
1899 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1900
1901 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1902 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1903 get_req, addr);
1904
Govind Singhb53420c2016-03-09 14:32:57 +05301905 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301906}
1907
1908/**
1909 * wmi_unified_get_stats_cmd() - get stats request
1910 * @wmi_hdl: wma handle
1911 * @get_stats_param: stats params
1912 * @addr: mac address
1913 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301914 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301915 */
Govind Singhb53420c2016-03-09 14:32:57 +05301916QDF_STATUS wmi_unified_get_stats_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301917 struct pe_stats_req *get_stats_param,
1918 uint8_t addr[IEEE80211_ADDR_LEN])
1919{
1920 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1921
1922 if (wmi_handle->ops->send_get_stats_cmd)
1923 return wmi_handle->ops->send_get_stats_cmd(wmi_handle,
1924 get_stats_param, addr);
1925
Govind Singhb53420c2016-03-09 14:32:57 +05301926 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301927}
1928
1929/**
1930 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1931 * @wmi_handle: wmi handle
1932 * @set_req: ll stats set request command params
1933 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301934 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301935 */
Govind Singhb53420c2016-03-09 14:32:57 +05301936QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301937 const struct ll_stats_set_params *set_req)
1938{
1939 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1940
1941 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1942 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1943 set_req);
1944
Govind Singhb53420c2016-03-09 14:32:57 +05301945 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301946}
Govind Singh20c5dac2016-03-07 15:33:31 +05301947
1948/**
1949 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1950 * @wmi_handle: wmi handle
1951 * @rssi_req: get RSSI request
1952 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301953 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301954 */
Govind Singhb53420c2016-03-09 14:32:57 +05301955QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301956{
1957 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1958
1959 if (wmi_handle->ops->send_snr_request_cmd)
1960 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1961
Govind Singhb53420c2016-03-09 14:32:57 +05301962 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301963}
1964
1965/**
1966 * wmi_unified_snr_cmd() - get RSSI from fw
1967 * @wmi_handle: wmi handle
1968 * @vdev_id: vdev id
1969 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301970 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301971 */
Govind Singhb53420c2016-03-09 14:32:57 +05301972QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301973{
1974 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1975
1976 if (wmi_handle->ops->send_snr_cmd)
1977 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1978 vdev_id);
1979
Govind Singhb53420c2016-03-09 14:32:57 +05301980 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301981}
1982
1983/**
1984 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1985 * @wmi_handle: wmi handle
1986 * @link_status: get link params
1987 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301988 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301989 */
Govind Singhb53420c2016-03-09 14:32:57 +05301990QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301991 struct link_status_params *link_status)
1992{
1993 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1994
1995 if (wmi_handle->ops->send_link_status_req_cmd)
1996 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1997 link_status);
1998
Govind Singhb53420c2016-03-09 14:32:57 +05301999 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302000}
2001
2002#ifdef FEATURE_WLAN_LPHB
2003
2004/**
2005 * wmi_unified_lphb_config_hbenable_cmd() - enable command of LPHB configuration requests
2006 * @wmi_handle: wmi handle
2007 * @lphb_conf_req: configuration info
2008 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302009 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302010 */
Govind Singhb53420c2016-03-09 14:32:57 +05302011QDF_STATUS wmi_unified_lphb_config_hbenable_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302012 wmi_hb_set_enable_cmd_fixed_param *params)
2013{
2014 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2015
2016 if (wmi_handle->ops->send_lphb_config_hbenable_cmd)
2017 return wmi_handle->ops->send_lphb_config_hbenable_cmd(wmi_handle,
2018 params);
2019
Govind Singhb53420c2016-03-09 14:32:57 +05302020 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302021}
2022
2023/**
2024 * wmi_unified_lphb_config_tcp_params_cmd() - set tcp params of LPHB configuration requests
2025 * @wmi_handle: wmi handle
2026 * @lphb_conf_req: lphb config request
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_tcp_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302031 wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req)
2032{
2033 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2034
2035 if (wmi_handle->ops->send_lphb_config_tcp_params_cmd)
2036 return wmi_handle->ops->send_lphb_config_tcp_params_cmd(wmi_handle,
2037 lphb_conf_req);
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_pkt_filter_cmd() - configure tcp packet filter command of LPHB
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_pkt_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302050 wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp)
2051{
2052 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2053
2054 if (wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd)
2055 return wmi_handle->ops->send_lphb_config_tcp_pkt_filter_cmd(wmi_handle,
2056 g_hb_tcp_filter_fp);
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_udp_params_cmd() - configure udp param 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_udp_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302069 wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req)
2070{
2071 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2072
2073 if (wmi_handle->ops->send_lphb_config_udp_params_cmd)
2074 return wmi_handle->ops->send_lphb_config_udp_params_cmd(wmi_handle,
2075 lphb_conf_req);
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_pkt_filter_cmd() - configure udp pkt filter 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_pkt_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302088 wmi_hb_set_udp_pkt_filter_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_pkt_filter_cmd)
2093 return wmi_handle->ops->send_lphb_config_udp_pkt_filter_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#endif /* FEATURE_WLAN_LPHB */
2099
2100/**
2101 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
2102 * @wmi_handle: wmi handle
2103 * @ta_dhcp_ind: DHCP indication parameter
2104 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302105 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302106 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302107#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05302108QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302109 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2110{
2111 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2112
2113 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2114 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2115 ta_dhcp_ind);
2116
Govind Singhb53420c2016-03-09 14:32:57 +05302117 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302118}
2119
2120/**
2121 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2122 * @wmi_handle: wmi handle
2123 * @pLinkSpeed: link speed info
2124 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302125 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302126 */
Govind Singhb53420c2016-03-09 14:32:57 +05302127QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302128 wmi_mac_addr peer_macaddr)
2129{
2130 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2131
2132 if (wmi_handle->ops->send_get_link_speed_cmd)
2133 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2134 peer_macaddr);
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_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2141 * @wmi_handle: wmi handler
2142 * @egap_params: pointer to egap_params
2143 *
2144 * Return: 0 for success, otherwise appropriate error code
2145 */
Govind Singhb53420c2016-03-09 14:32:57 +05302146QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302147 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params)
2148{
2149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2150
2151 if (wmi_handle->ops->send_egap_conf_params_cmd)
2152 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2153 egap_params);
2154
Govind Singhb53420c2016-03-09 14:32:57 +05302155 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302156}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302157#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302158
2159/**
2160 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2161 * @wmi_handl: wmi handle
2162 * @cmd: Profiling command index
2163 * @value1: parameter1 value
2164 * @value2: parameter2 value
2165 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302166 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302167 */
Govind Singhb53420c2016-03-09 14:32:57 +05302168QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302169 uint32_t cmd, uint32_t value1, uint32_t value2)
2170{
2171 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2172
2173 if (wmi_handle->ops->send_fw_profiling_cmd)
2174 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2175 cmd, value1, value2);
2176
Govind Singhb53420c2016-03-09 14:32:57 +05302177 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302178}
2179
2180#ifdef FEATURE_WLAN_RA_FILTERING
2181/**
2182 * wmi_unified_wow_sta_ra_filter_cmd() - set RA filter pattern in fw
2183 * @wmi_handle: wmi handle
2184 * @vdev_id: vdev id
2185 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302186 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302187 */
Govind Singhb53420c2016-03-09 14:32:57 +05302188QDF_STATUS wmi_unified_wow_sta_ra_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302189 uint8_t vdev_id, uint8_t default_pattern,
2190 uint16_t rate_limit_interval)
2191{
2192
2193 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2194
2195 if (wmi_handle->ops->send_wow_sta_ra_filter_cmd)
2196 return wmi_handle->ops->send_wow_sta_ra_filter_cmd(wmi_handle,
Krunal Soni58d87602016-05-10 17:22:11 -07002197 vdev_id, default_pattern, rate_limit_interval);
Govind Singh20c5dac2016-03-07 15:33:31 +05302198
Govind Singhb53420c2016-03-09 14:32:57 +05302199 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302200
2201}
2202#endif /* FEATURE_WLAN_RA_FILTERING */
2203
2204/**
2205 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2206 * @wmi_handle: wmi handle
2207 * @vdev_id: vdev id
2208 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302209 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302210 */
Govind Singhb53420c2016-03-09 14:32:57 +05302211QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302212{
2213 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2214
2215 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2216 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2217 vdev_id);
2218
Govind Singhb53420c2016-03-09 14:32:57 +05302219 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302220}
2221
2222/**
2223 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2224 * @wmi_hdl: wmi handle
2225 * @vdev_id: vdev id
2226 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302227 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302228 */
Govind Singhb53420c2016-03-09 14:32:57 +05302229QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302230{
2231 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2232
2233 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2234 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2235 vdev_id);
2236
Govind Singhb53420c2016-03-09 14:32:57 +05302237 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302238}
2239/**
2240 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2241 * @wmi_handle: wmi handle
2242 * @startOemDataReq: start request params
2243 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302244 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302245 */
Govind Singhb53420c2016-03-09 14:32:57 +05302246QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302247 uint8_t data_len,
2248 uint8_t *data)
2249{
2250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2251
2252 if (wmi_handle->ops->send_start_oem_data_cmd)
2253 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2254 data_len, data);
2255
Govind Singhb53420c2016-03-09 14:32:57 +05302256 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302257}
2258
2259/**
2260 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2261 * @wmi_handle: wmi handle
2262 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2263 *
2264 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2265 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2266 * to firmware based on phyerr filtering
2267 * offload status.
2268 *
2269 * Return: 1 success, 0 failure
2270 */
Govind Singhb53420c2016-03-09 14:32:57 +05302271QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302272wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2273 bool dfs_phyerr_filter_offload)
2274{
2275 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2276
2277 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2278 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2279 dfs_phyerr_filter_offload);
2280
Govind Singhb53420c2016-03-09 14:32:57 +05302281 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302282}
2283
2284#if !defined(REMOVE_PKT_LOG)
2285/**
2286 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2287 * @wmi_handle: wmi handle
2288 * @pktlog_event: pktlog event
2289 * @cmd_id: pktlog cmd id
2290 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302291 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302292 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302293#ifndef WMI_NON_TLV_SUPPORT
Govind Singhb53420c2016-03-09 14:32:57 +05302294QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302295 WMI_PKTLOG_EVENT pktlog_event,
2296 WMI_CMD_ID cmd_id)
2297{
2298 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2299
2300 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2301 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Krunal Soni58d87602016-05-10 17:22:11 -07002302 pktlog_event, cmd_id);
Govind Singh20c5dac2016-03-07 15:33:31 +05302303
Govind Singhb53420c2016-03-09 14:32:57 +05302304 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302305}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302306#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302307#endif /* REMOVE_PKT_LOG */
2308
2309/**
2310 * wmi_unified_add_wow_wakeup_event_cmd() - Configures wow wakeup events.
2311 * @wmi_handle: wmi handle
2312 * @vdev_id: vdev id
2313 * @bitmap: Event bitmap
2314 * @enable: enable/disable
2315 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302316 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302317 */
Govind Singhb53420c2016-03-09 14:32:57 +05302318QDF_STATUS wmi_unified_add_wow_wakeup_event_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302319 uint32_t vdev_id,
2320 uint32_t bitmap,
2321 bool enable)
2322{
2323 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2324
2325 if (wmi_handle->ops->send_add_wow_wakeup_event_cmd)
Krunal Soni58d87602016-05-10 17:22:11 -07002326 return wmi_handle->ops->send_add_wow_wakeup_event_cmd(
2327 wmi_handle, vdev_id, bitmap, enable);
Govind Singh20c5dac2016-03-07 15:33:31 +05302328
Govind Singhb53420c2016-03-09 14:32:57 +05302329 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302330}
2331
2332/**
2333 * wmi_unified_wow_patterns_to_fw_cmd() - Sends WOW patterns to FW.
2334 * @wmi_handle: wmi handle
2335 * @vdev_id: vdev id
2336 * @ptrn_id: pattern id
2337 * @ptrn: pattern
2338 * @ptrn_len: pattern length
2339 * @ptrn_offset: pattern offset
2340 * @mask: mask
2341 * @mask_len: mask length
2342 * @user: true for user configured pattern and false for default pattern
2343 * @default_patterns: default patterns
2344 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302345 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302346 */
Govind Singhb53420c2016-03-09 14:32:57 +05302347QDF_STATUS wmi_unified_wow_patterns_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302348 uint8_t vdev_id, uint8_t ptrn_id,
2349 const uint8_t *ptrn, uint8_t ptrn_len,
2350 uint8_t ptrn_offset, const uint8_t *mask,
2351 uint8_t mask_len, bool user,
2352 uint8_t default_patterns)
2353{
2354 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2355
2356 if (wmi_handle->ops->send_wow_patterns_to_fw_cmd)
2357 return wmi_handle->ops->send_wow_patterns_to_fw_cmd(wmi_handle,
2358 vdev_id, ptrn_id, ptrn,
2359 ptrn_len, ptrn_offset, mask,
2360 mask_len, user, default_patterns);
2361
Govind Singhb53420c2016-03-09 14:32:57 +05302362 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302363}
2364
2365/**
2366 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2367 * @wmi_handle: wmi handle
2368 * @ptrn_id: pattern id
2369 * @vdev_id: vdev id
2370 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302371 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302372 */
Govind Singhb53420c2016-03-09 14:32:57 +05302373QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302374 uint8_t vdev_id)
2375{
2376 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2377
2378 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2379 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2380 ptrn_id, vdev_id);
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_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2387 * @wmi_handle: wmi handle
2388 *
2389 * Sends host wakeup indication to FW. On receiving this indication,
2390 * FW will come out of WOW.
2391 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302393 */
Govind Singhb53420c2016-03-09 14:32:57 +05302394QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302395{
2396 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2397
2398 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2399 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2400
Govind Singhb53420c2016-03-09 14:32:57 +05302401 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302402}
2403
2404/**
2405 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2406 * @wmi_handle: wmi handle
2407 * @msg: delts params
2408 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302409 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302410 */
Govind Singhb53420c2016-03-09 14:32:57 +05302411QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302412 uint8_t ac)
2413{
2414 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2415
2416 if (wmi_handle->ops->send_del_ts_cmd)
2417 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2418 vdev_id, ac);
2419
Govind Singhb53420c2016-03-09 14:32:57 +05302420 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302421}
2422
2423/**
2424 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2425 * @wmi_handle: handle to wmi
2426 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2427 *
Govind Singhb53420c2016-03-09 14:32:57 +05302428 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302429 * ADD_TS requestes to firmware in loop for all the ACs with
2430 * active flow.
2431 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302432 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302433 */
Govind Singhb53420c2016-03-09 14:32:57 +05302434QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302435 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2436{
2437 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2438
2439 if (wmi_handle->ops->send_aggr_qos_cmd)
2440 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2441 aggr_qos_rsp_msg);
2442
Govind Singhb53420c2016-03-09 14:32:57 +05302443 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302444}
2445
2446/**
2447 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2448 * @wmi_handle: wmi handle
2449 * @msg: ADDTS params
2450 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302451 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302452 */
Govind Singhb53420c2016-03-09 14:32:57 +05302453QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302454 struct add_ts_param *msg)
2455{
2456 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2457
2458 if (wmi_handle->ops->send_add_ts_cmd)
2459 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2460 msg);
2461
Govind Singhb53420c2016-03-09 14:32:57 +05302462 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302463}
2464
2465/**
2466 * wmi_unified_enable_disable_packet_filter_cmd() - enable/disable packet filter in target
2467 * @wmi_handle: wmi handle
2468 * @vdev_id: vdev id
2469 * @enable: Flag to enable/disable packet filter
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_enable_disable_packet_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302474 uint8_t vdev_id, bool enable)
2475{
2476 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2477
2478 if (wmi_handle->ops->send_enable_disable_packet_filter_cmd)
Krunal Soni58d87602016-05-10 17:22:11 -07002479 return wmi_handle->ops->send_enable_disable_packet_filter_cmd(
2480 wmi_handle, vdev_id, enable);
Govind Singh20c5dac2016-03-07 15:33:31 +05302481
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_config_packet_filter_cmd() - configure packet filter in target
2487 * @wmi_handle: wmi handle
2488 * @vdev_id: vdev id
2489 * @rcv_filter_param: Packet filter parameters
2490 * @filter_id: Filter id
2491 * @enable: Flag to add/delete packet filter configuration
2492 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302493 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302494 */
Govind Singhb53420c2016-03-09 14:32:57 +05302495QDF_STATUS wmi_unified_config_packet_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302496 uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param,
2497 uint8_t filter_id, bool enable)
2498{
2499 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2500
2501 if (wmi_handle->ops->send_config_packet_filter_cmd)
2502 return wmi_handle->ops->send_config_packet_filter_cmd(wmi_handle,
2503 vdev_id, rcv_filter_param,
2504 filter_id, enable);
2505
Govind Singhb53420c2016-03-09 14:32:57 +05302506 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302507}
2508
2509/**
2510 * wmi_unified_add_clear_mcbc_filter_cmd() - set mcast filter command to fw
2511 * @wmi_handle: wmi handle
2512 * @vdev_id: vdev id
2513 * @multicastAddr: mcast address
2514 * @clearList: clear list flag
2515 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302516 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302517 */
Govind Singhb53420c2016-03-09 14:32:57 +05302518QDF_STATUS wmi_unified_add_clear_mcbc_filter_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302519 uint8_t vdev_id,
Govind Singhb53420c2016-03-09 14:32:57 +05302520 struct qdf_mac_addr multicast_addr,
Govind Singh20c5dac2016-03-07 15:33:31 +05302521 bool clearList)
2522{
2523 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2524
2525 if (wmi_handle->ops->send_add_clear_mcbc_filter_cmd)
2526 return wmi_handle->ops->send_add_clear_mcbc_filter_cmd(wmi_handle,
2527 vdev_id, multicast_addr, clearList);
2528
Govind Singhb53420c2016-03-09 14:32:57 +05302529 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302530}
2531
2532/**
2533 * wmi_unified_send_gtk_offload_cmd() - send GTK offload command to fw
2534 * @wmi_handle: wmi handle
2535 * @vdev_id: vdev id
2536 * @params: GTK offload parameters
2537 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302538 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302539 */
Govind Singhb53420c2016-03-09 14:32:57 +05302540QDF_STATUS wmi_unified_send_gtk_offload_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302541 struct gtk_offload_params *params,
2542 bool enable_offload,
2543 uint32_t gtk_offload_opcode)
2544{
2545 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2546
2547 if (wmi_handle->ops->send_gtk_offload_cmd)
2548 return wmi_handle->ops->send_gtk_offload_cmd(wmi_handle,
2549 vdev_id, params,
2550 enable_offload, gtk_offload_opcode);
2551
Govind Singhb53420c2016-03-09 14:32:57 +05302552 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302553}
2554
2555/**
2556 * wmi_unified_process_gtk_offload_getinfo_cmd() - send GTK offload cmd to fw
2557 * @wmi_handle: wmi handle
2558 * @params: GTK offload params
2559 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302560 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302561 */
Govind Singhb53420c2016-03-09 14:32:57 +05302562QDF_STATUS wmi_unified_process_gtk_offload_getinfo_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302563 uint8_t vdev_id,
2564 uint64_t offload_req_opcode)
2565{
2566 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2567
2568 if (wmi_handle->ops->send_process_gtk_offload_getinfo_cmd)
2569 return wmi_handle->ops->send_process_gtk_offload_getinfo_cmd(wmi_handle,
2570 vdev_id,
2571 offload_req_opcode);
2572
Govind Singhb53420c2016-03-09 14:32:57 +05302573 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302574}
2575
2576/**
2577 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2578 * @wmi_handle: wmi handle
2579 * @pAddPeriodicTxPtrnParams: tx ptrn params
2580 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302581 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302582 */
Govind Singhb53420c2016-03-09 14:32:57 +05302583QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302584 struct periodic_tx_pattern *
2585 pAddPeriodicTxPtrnParams,
2586 uint8_t vdev_id)
2587{
2588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2589
2590 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2591 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2592 pAddPeriodicTxPtrnParams,
2593 vdev_id);
2594
Govind Singhb53420c2016-03-09 14:32:57 +05302595 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302596}
2597
2598/**
2599 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2600 * @wmi_handle: wmi handle
2601 * @vdev_id: vdev id
2602 * @pattern_id: pattern id
2603 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302604 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302605 */
Govind Singhb53420c2016-03-09 14:32:57 +05302606QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302607 uint8_t vdev_id,
2608 uint8_t pattern_id)
2609{
2610 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2611
2612 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2613 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2614 vdev_id,
2615 pattern_id);
2616
Govind Singhb53420c2016-03-09 14:32:57 +05302617 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302618}
2619
2620/**
2621 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2622 * @wmi_handle: wmi handle
2623 * @preq: stats ext params
2624 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302625 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302626 */
Govind Singhb53420c2016-03-09 14:32:57 +05302627QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302628 struct stats_ext_params *preq)
2629{
2630 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2631
2632 if (wmi_handle->ops->send_stats_ext_req_cmd)
2633 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2634 preq);
2635
Govind Singhb53420c2016-03-09 14:32:57 +05302636 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302637}
2638
2639/**
2640 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2641 * @wmi_handle: wmi handle
2642 * @params: ext wow params
2643 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302644 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302645 */
Govind Singhb53420c2016-03-09 14:32:57 +05302646QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302647 struct ext_wow_params *params)
2648{
2649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2650
2651 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2652 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2653 params);
2654
Govind Singhb53420c2016-03-09 14:32:57 +05302655 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302656}
2657
2658/**
2659 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2660 * @wmi_handle: wmi handle
2661 * @appType2Params: app type2 params
2662 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302663 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302664 */
Govind Singhb53420c2016-03-09 14:32:57 +05302665QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302666 struct app_type2_params *appType2Params)
2667{
2668 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2669
2670 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2671 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2672 appType2Params);
2673
Govind Singhb53420c2016-03-09 14:32:57 +05302674 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302675
2676}
2677
2678/**
2679 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2680 * @wmi_handle: wmi handle
2681 * @timer_val: auto shutdown timer value
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_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302686 uint32_t timer_val)
2687{
2688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2689
2690 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2691 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2692 timer_val);
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 * wmi_unified_nan_req_cmd() - to send nan request to target
2699 * @wmi_handle: wmi handle
2700 * @nan_req: request data which will be non-null
2701 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302702 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302703 */
Govind Singhb53420c2016-03-09 14:32:57 +05302704QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302705 struct nan_req_params *nan_req)
2706{
2707 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2708
2709 if (wmi_handle->ops->send_nan_req_cmd)
2710 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2711 nan_req);
2712
Govind Singhb53420c2016-03-09 14:32:57 +05302713 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302714}
2715
2716/**
2717 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2718 * @wmi_handle: wmi handle
2719 * @pDhcpSrvOffloadInfo: DHCP server offload info
2720 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302721 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302722 */
Govind Singhb53420c2016-03-09 14:32:57 +05302723QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302724 struct dhcp_offload_info_params *pDhcpSrvOffloadInfo)
2725{
2726 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2727
2728 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2729 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
2730 pDhcpSrvOffloadInfo);
2731
Govind Singhb53420c2016-03-09 14:32:57 +05302732 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302733}
2734
2735/**
2736 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2737 * @wmi_handle: wmi handle
2738 * @ch_avoid_update_req: channel avoid update params
2739 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302740 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302741 */
Govind Singhb53420c2016-03-09 14:32:57 +05302742QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302743{
2744 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2745
2746 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2747 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2748
Govind Singhb53420c2016-03-09 14:32:57 +05302749 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302750}
2751
2752/**
2753 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2754 * @wmi_handle: wmi handle
2755 * @reg_dmn: reg domain
2756 * @regdmn2G: 2G reg domain
2757 * @regdmn5G: 5G reg domain
2758 * @ctl2G: 2G test limit
2759 * @ctl5G: 5G test limit
2760 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302761 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302762 */
Govind Singhb53420c2016-03-09 14:32:57 +05302763QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302764 uint32_t reg_dmn, uint16_t regdmn2G,
2765 uint16_t regdmn5G, int8_t ctl2G,
2766 int8_t ctl5G)
2767{
2768 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2769
2770 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2771 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2772 reg_dmn, regdmn2G,
2773 regdmn5G, ctl2G,
2774 ctl5G);
2775
Govind Singhb53420c2016-03-09 14:32:57 +05302776 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302777}
2778
2779
2780/**
2781 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2782 * @wmi_handle: wmi handle
2783 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2784 *
2785 * This function sets tdls off channel mode
2786 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302787 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2788 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302789 */
Govind Singhb53420c2016-03-09 14:32:57 +05302790QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302791 struct tdls_channel_switch_params *chan_switch_params)
2792{
2793 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2794
2795 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2796 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2797 chan_switch_params);
2798
Govind Singhb53420c2016-03-09 14:32:57 +05302799 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302800}
2801
2802/**
2803 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2804 * @wmi_handle: wmi handle
2805 * @pwmaTdlsparams: TDLS params
2806 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302808 */
Govind Singhb53420c2016-03-09 14:32:57 +05302809QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302810 void *tdls_param, uint8_t tdls_state)
2811{
2812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2813
2814 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2815 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2816 tdls_param, tdls_state);
2817
Govind Singhb53420c2016-03-09 14:32:57 +05302818 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302819}
2820
2821/**
2822 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2823 * @wmi_handle: wmi handle
2824 * @peerStateParams: TDLS peer state params
2825 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302826 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302827 */
Govind Singhb53420c2016-03-09 14:32:57 +05302828QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302829 struct tdls_peer_state_params *peerStateParams,
2830 uint32_t *ch_mhz)
2831{
2832 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2833
2834 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2835 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2836 peerStateParams, ch_mhz);
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_process_fw_mem_dump_cmd() - Function to request fw memory dump from
2843 * firmware
2844 * @wmi_handle: Pointer to wmi handle
2845 * @mem_dump_req: Pointer for mem_dump_req
2846 *
2847 * This function sends memory dump request to firmware
2848 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302849 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302850 *
2851 */
Govind Singhb53420c2016-03-09 14:32:57 +05302852QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302853 struct fw_dump_req_param *mem_dump_req)
2854{
2855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2856
2857 if (wmi_handle->ops->send_process_fw_mem_dump_cmd)
2858 return wmi_handle->ops->send_process_fw_mem_dump_cmd(wmi_handle,
2859 mem_dump_req);
2860
Govind Singhb53420c2016-03-09 14:32:57 +05302861 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302862}
2863
2864/**
2865 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2866 * @wmi_handle: Pointer to WMi handle
2867 * @ie_data: Pointer for ie data
2868 *
2869 * This function sends IE information to firmware
2870 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302871 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302872 *
2873 */
Govind Singhb53420c2016-03-09 14:32:57 +05302874QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302875 struct vdev_ie_info_param *ie_info)
2876{
2877 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2878
2879 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2880 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2881 ie_info);
2882
Govind Singhb53420c2016-03-09 14:32:57 +05302883 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302884}
Govind Singh9ddd5162016-03-07 16:30:32 +05302885
2886/**
2887 * wmi_unified_send_init_cmd() - wmi init command
2888 * @wmi_handle: pointer to wmi handle
2889 * @res_cfg: resource config
2890 * @num_mem_chunks: no of mem chunck
2891 * @mem_chunk: pointer to mem chunck structure
2892 *
2893 * This function sends IE information to firmware
2894 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302895 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302896 *
2897 */
Govind Singhb53420c2016-03-09 14:32:57 +05302898QDF_STATUS wmi_unified_send_init_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302899 wmi_resource_config *res_cfg,
2900 uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk,
2901 bool action)
2902{
2903 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2904
2905 if (wmi_handle->ops->send_init_cmd)
2906 return wmi_handle->ops->send_init_cmd(wmi_handle,
2907 res_cfg, num_mem_chunks, mem_chunk, action);
2908
Govind Singhb53420c2016-03-09 14:32:57 +05302909 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302910}
2911
2912/**
2913 * wmi_unified_send_saved_init_cmd() - wmi init command
2914 * @wmi_handle: pointer to wmi handle
2915 *
2916 * This function sends IE information to firmware
2917 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302918 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302919 *
2920 */
Govind Singhb53420c2016-03-09 14:32:57 +05302921QDF_STATUS wmi_unified_send_saved_init_cmd(void *wmi_hdl)
Govind Singh9ddd5162016-03-07 16:30:32 +05302922{
2923 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2924
2925 if (wmi_handle->ops->send_saved_init_cmd)
2926 return wmi_handle->ops->send_saved_init_cmd(wmi_handle);
2927
Govind Singhb53420c2016-03-09 14:32:57 +05302928 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302929}
2930
2931/**
2932 * wmi_unified_save_fw_version_cmd() - save fw version
2933 * @wmi_handle: pointer to wmi handle
2934 * @res_cfg: resource config
2935 * @num_mem_chunks: no of mem chunck
2936 * @mem_chunk: pointer to mem chunck structure
2937 *
2938 * This function sends IE information to firmware
2939 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302940 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302941 *
2942 */
Govind Singhb53420c2016-03-09 14:32:57 +05302943QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302944 void *evt_buf)
2945{
2946 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2947
2948 if (wmi_handle->ops->save_fw_version_cmd)
2949 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2950 evt_buf);
2951
Govind Singhb53420c2016-03-09 14:32:57 +05302952 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302953}
Govind Singha4836fd2016-03-07 16:45:38 +05302954
2955/**
2956 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2957 * @wmi_hdl: wmi handle
2958 * @custom_addr: base mac address
2959 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302960 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302961 */
Govind Singhb53420c2016-03-09 14:32:57 +05302962QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302963 uint8_t *custom_addr)
2964{
2965 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2966
2967 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2968 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2969 custom_addr);
2970
Govind Singhb53420c2016-03-09 14:32:57 +05302971 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302972}
2973
2974/**
2975 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2976 * @wmi_hdl: wmi handle
2977 * @event: Event received from FW
2978 * @len: Length of the event
2979 *
2980 * Enables the low frequency events and disables the high frequency
2981 * events. Bit 17 indicates if the event if low/high frequency.
2982 * 1 - high frequency, 0 - low frequency
2983 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302984 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302985 */
Govind Singhb53420c2016-03-09 14:32:57 +05302986QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302987 uint8_t *event,
2988 uint32_t len)
2989{
2990 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2991
2992 if (wmi_handle->ops->send_log_supported_evt_cmd)
2993 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2994 event, len);
2995
Govind Singhb53420c2016-03-09 14:32:57 +05302996 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302997}
2998
2999/**
3000 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
3001 * @wmi_hdl: wmi handle
3002 * @start_log: Start logging related parameters
3003 *
3004 * Send the command to the FW based on which specific logging of diag
3005 * event/log id can be started/stopped
3006 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303007 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303008 */
Govind Singhb53420c2016-03-09 14:32:57 +05303009QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303010 struct wmi_wifi_start_log *start_log)
3011{
3012 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3013
3014 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
3015 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
3016 start_log);
3017
Govind Singhb53420c2016-03-09 14:32:57 +05303018 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303019}
3020
3021/**
3022 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
3023 * @wmi_hdl: WMI handle
3024 *
3025 * This function is used to send the flush command to the FW,
3026 * that will flush the fw logs that are residue in the FW
3027 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303028 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303029 */
Govind Singhb53420c2016-03-09 14:32:57 +05303030QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05303031{
3032 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3033
3034 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
3035 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
3036
Govind Singhb53420c2016-03-09 14:32:57 +05303037 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303038}
3039
3040/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303041 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05303042 * @wmi_hdl: wmi handle
3043 * @msg: PCL structure containing the PCL and the number of channels
3044 *
3045 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
3046 * firmware. The DBS Manager is the consumer of this information in the WLAN
3047 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
3048 * to migrate to a new channel without host driver involvement. An example of
3049 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
3050 * manage the channel selection without firmware involvement.
3051 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303052 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303053 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303054QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
3055 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05303056{
3057 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3058
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05303059 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
3060 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05303061
Govind Singhb53420c2016-03-09 14:32:57 +05303062 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303063}
3064
3065/**
3066 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
3067 * @wmi_hdl: wmi handle
3068 * @msg: Structure containing the following parameters
3069 *
3070 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
3071 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
3072 *
3073 * Provides notification to the WLAN firmware that host driver is requesting a
3074 * HardWare (HW) Mode change. This command is needed to support iHelium in the
3075 * configurations that include the Dual Band Simultaneous (DBS) feature.
3076 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303077 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303078 */
Govind Singhb53420c2016-03-09 14:32:57 +05303079QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303080 uint32_t hw_mode_index)
3081{
3082 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3083
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05303084 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
3085 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05303086 hw_mode_index);
3087
Govind Singhb53420c2016-03-09 14:32:57 +05303088 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303089}
3090
3091/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303092 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05303093 * @wmi_hdl: wmi handle
3094 * @msg: Dual MAC config parameters
3095 *
3096 * Configures WLAN firmware with the dual MAC features
3097 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303098 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05303099 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303100QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303101 struct wmi_dual_mac_config *msg)
3102{
3103 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3104
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05303105 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
3106 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05303107 msg);
3108
Govind Singhb53420c2016-03-09 14:32:57 +05303109 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303110}
3111
3112/**
3113 * wmi_unified_enable_arp_ns_offload_cmd() - enable ARP NS offload
3114 * @wmi_hdl: wmi handle
3115 * @param: offload request
3116 * @arp_only: flag
3117 *
3118 * To configure ARP NS off load data to firmware
3119 * when target goes to wow mode.
3120 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303121 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303122 */
Govind Singhb53420c2016-03-09 14:32:57 +05303123QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303124 struct host_offload_req_param *param, bool arp_only,
3125 uint8_t vdev_id)
3126{
3127 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3128
3129 if (wmi_handle->ops->send_enable_arp_ns_offload_cmd)
3130 return wmi_handle->ops->send_enable_arp_ns_offload_cmd(wmi_handle,
3131 param, arp_only,
3132 vdev_id);
3133
Govind Singhb53420c2016-03-09 14:32:57 +05303134 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303135}
3136
3137/**
3138 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
3139 * @wmi_hdl: wmi handle
3140 * @flashing: flashing request
3141 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303142 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303143 */
Govind Singhb53420c2016-03-09 14:32:57 +05303144QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303145 struct flashing_req_params *flashing)
3146{
3147 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3148
3149 if (wmi_handle->ops->send_set_led_flashing_cmd)
3150 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
3151 flashing);
3152
Govind Singhb53420c2016-03-09 14:32:57 +05303153 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303154}
3155
3156/**
3157 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
3158 * @wmi_hdl: wmi handle
3159 * @appType1Params: app type1 params
3160 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303161 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303162 */
Govind Singhb53420c2016-03-09 14:32:57 +05303163QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303164 struct app_type1_params *app_type1_params)
3165{
3166 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3167
3168 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
3169 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
3170 app_type1_params);
3171
Govind Singhb53420c2016-03-09 14:32:57 +05303172 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303173}
3174
3175/**
3176 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
3177 * @wmi_hdl: wmi handle
3178 * @request: SSID hotlist set request
3179 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303180 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303181 */
Govind Singhb53420c2016-03-09 14:32:57 +05303182QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05303183wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
3184 struct ssid_hotlist_request_params *request)
3185{
3186 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3187
3188 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
3189 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
3190 request);
3191
Govind Singhb53420c2016-03-09 14:32:57 +05303192 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303193}
3194
3195/**
3196 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
3197 * @wmi_hdl: wmi handle
3198 * @vdev_id: vdev id
3199 *
3200 * This function sends roam synch complete event to fw.
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 wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303205 uint8_t vdev_id)
3206{
3207 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3208
3209 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
3210 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
3211 vdev_id);
3212
Govind Singhb53420c2016-03-09 14:32:57 +05303213 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303214}
3215
3216/**
3217 * wmi_unified_unit_test_cmd() - send unit test command to fw.
3218 * @wmi_hdl: wmi handle
3219 * @wmi_utest: unit test command
3220 *
3221 * This function send unit test command to fw.
3222 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303223 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303224 */
Govind Singhb53420c2016-03-09 14:32:57 +05303225QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303226 struct wmi_unit_test_cmd *wmi_utest)
3227{
3228 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3229
3230 if (wmi_handle->ops->send_unit_test_cmd)
3231 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
3232 wmi_utest);
3233
Govind Singhb53420c2016-03-09 14:32:57 +05303234 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303235}
3236
3237/**
3238 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
3239 * @wmi_hdl: wmi handle
3240 * @roaminvoke: roam invoke command
3241 *
3242 * Send roam invoke command to fw for fastreassoc.
3243 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303244 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303245 */
Govind Singhb53420c2016-03-09 14:32:57 +05303246QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303247 struct wmi_roam_invoke_cmd *roaminvoke,
3248 uint32_t ch_hz)
3249{
3250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3251
3252 if (wmi_handle->ops->send_roam_invoke_cmd)
3253 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
3254 roaminvoke, ch_hz);
3255
Govind Singhb53420c2016-03-09 14:32:57 +05303256 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303257}
3258
3259/**
3260 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
3261 * @wmi_hdl: wmi handle
3262 * @command: command
3263 * @vdev_id: vdev id
3264 *
3265 * This function set roam offload 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_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303270 uint32_t command, uint32_t vdev_id)
3271{
3272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3273
3274 if (wmi_handle->ops->send_roam_scan_offload_cmd)
3275 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
3276 command, vdev_id);
3277
Govind Singhb53420c2016-03-09 14:32:57 +05303278 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303279}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303280#ifndef WMI_NON_TLV_SUPPORT
Govind Singha4836fd2016-03-07 16:45:38 +05303281/**
3282 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
3283 * @wmi_hdl: wmi handle
3284 * @ap_profile_p: ap profile
3285 * @vdev_id: vdev id
3286 *
3287 * Send WMI_ROAM_AP_PROFILE to firmware
3288 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303289 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303290 */
Govind Singhb53420c2016-03-09 14:32:57 +05303291QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303292 wmi_ap_profile *ap_profile_p,
3293 uint32_t vdev_id)
3294{
3295 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3296
3297 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
3298 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(wmi_handle,
3299 ap_profile_p, vdev_id);
3300
Govind Singhb53420c2016-03-09 14:32:57 +05303301 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303302}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303303#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303304/**
3305 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3306 * @wmi_handle: wmi handle
3307 * @scan_period: scan period
3308 * @scan_age: scan age
3309 * @vdev_id: vdev id
3310 *
3311 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3312 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303313 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303314 */
Govind Singhb53420c2016-03-09 14:32:57 +05303315QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303316 uint32_t scan_period,
3317 uint32_t scan_age,
3318 uint32_t vdev_id)
3319{
3320 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3321
3322 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3323 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3324 scan_period, scan_age, vdev_id);
3325
Govind Singhb53420c2016-03-09 14:32:57 +05303326 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303327}
3328
3329/**
3330 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3331 * @wmi_handle: wmi handle
3332 * @chan_count: channel count
3333 * @chan_list: channel list
3334 * @list_type: list type
3335 * @vdev_id: vdev id
3336 *
3337 * Set roam offload channel list.
3338 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303339 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303340 */
Govind Singhb53420c2016-03-09 14:32:57 +05303341QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303342 uint8_t chan_count,
3343 uint8_t *chan_list,
3344 uint8_t list_type, uint32_t vdev_id)
3345{
3346 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3347
3348 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3349 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3350 chan_count, chan_list,
3351 list_type, vdev_id);
3352
Govind Singhb53420c2016-03-09 14:32:57 +05303353 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303354}
3355
3356/**
3357 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3358 * @wmi_hdl: wmi handle
3359 * @rssi_change_thresh: RSSI Change threshold
3360 * @bcn_rssi_weight: beacon RSSI weight
3361 * @vdev_id: vdev id
3362 *
3363 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3364 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303365 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303366 */
Govind Singhb53420c2016-03-09 14:32:57 +05303367QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303368 uint32_t vdev_id,
3369 int32_t rssi_change_thresh,
3370 uint32_t bcn_rssi_weight,
3371 uint32_t hirssi_delay_btw_scans)
3372{
3373 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3374
3375 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3376 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3377 vdev_id, rssi_change_thresh,
3378 bcn_rssi_weight, hirssi_delay_btw_scans);
3379
Govind Singhb53420c2016-03-09 14:32:57 +05303380 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303381}
3382
3383/**
3384 * wmi_unified_get_buf_extscan_hotlist_cmd() - prepare hotlist command
3385 * @wmi_hdl: wmi handle
3386 * @photlist: hotlist command params
3387 * @buf_len: buffer length
3388 *
3389 * This function fills individual elements for hotlist request and
3390 * TLV for bssid entries
3391 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singha4836fd2016-03-07 16:45:38 +05303393 */
Govind Singhb53420c2016-03-09 14:32:57 +05303394QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303395 struct ext_scan_setbssi_hotlist_params *
3396 photlist, int *buf_len)
3397{
3398 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3399
3400 if (wmi_handle->ops->send_get_buf_extscan_hotlist_cmd)
3401 return wmi_handle->ops->send_get_buf_extscan_hotlist_cmd(wmi_handle,
3402 photlist, buf_len);
3403
Govind Singhb53420c2016-03-09 14:32:57 +05303404 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303405}
3406
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303407/**
3408 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3409 * @param wmi_handle : handle to WMI.
3410 * @param param : tpc config param
3411 *
3412 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3413 */
3414QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3415 uint32_t param)
3416{
3417 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3418
3419 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3420 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3421 param);
3422
3423 return QDF_STATUS_E_FAILURE;
3424}
3425
3426/**
3427 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3428 * @param wmi_handle : handle to WMI.
3429 * @param param : pointer to set atf param
3430 *
3431 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3432 */
3433QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3434 struct set_atf_params *param)
3435{
3436 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3437
3438 if (wmi_handle->ops->send_set_atf_cmd)
3439 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3440
3441 return QDF_STATUS_E_FAILURE;
3442}
3443
3444/**
3445 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3446 * @param wmi_handle : handle to WMI.
3447 * @param param : pointer to hold pdev fips param
3448 *
3449 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3450 */
3451QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3452 struct fips_params *param)
3453{
3454 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3455
3456 if (wmi_handle->ops->send_pdev_fips_cmd)
3457 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3458
3459 return QDF_STATUS_E_FAILURE;
3460}
3461
3462/**
3463 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3464 * @param wmi_handle : handle to WMI.
3465 * @param param : pointer to hold wlan profile param
3466 *
3467 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3468 */
3469QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3470 struct wlan_profile_params *param)
3471{
3472 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3473
3474 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3475 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3476 param);
3477
3478 return QDF_STATUS_E_FAILURE;
3479}
3480
3481/**
3482 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3483 * @param wmi_handle : handle to WMI.
3484 * @param param : pointer to hold wlan profile param
3485 *
3486 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3487 */
3488QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3489 struct wlan_profile_params *param)
3490{
3491 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3492
3493 if (wmi->ops->send_wlan_profile_trigger_cmd)
3494 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3495 param);
3496
3497 return QDF_STATUS_E_FAILURE;
3498}
3499
3500/**
3501 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3502 * @param wmi_handle : handle to WMI.
3503 * @param param : pointer to hold channel param
3504 *
3505 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3506 */
3507QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3508 struct channel_param *param)
3509{
3510 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3511
3512 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3513 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3514 param);
3515
3516 return QDF_STATUS_E_FAILURE;
3517}
3518
3519/**
3520 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3521 * @param wmi_handle : handle to WMI.
3522 * @param param : pointer to hold channel param
3523 *
3524 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3525 */
3526QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3527 struct ht_ie_params *param)
3528{
3529 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3530
3531 if (wmi_handle->ops->send_set_ht_ie_cmd)
3532 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3533
3534 return QDF_STATUS_E_FAILURE;
3535}
3536
3537/**
3538 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3539 * @param wmi_handle : handle to WMI.
3540 * @param param : pointer to hold channel param
3541 *
3542 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3543 */
3544QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3545 struct vht_ie_params *param)
3546{
3547 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3548
3549 if (wmi_handle->ops->send_set_vht_ie_cmd)
3550 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3551
3552 return QDF_STATUS_E_FAILURE;
3553}
3554
3555/**
3556 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3557 * @param wmi_handle : handle to WMI.
3558 * @param param : pointer to hold wmm param
3559 *
3560 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3561 */
3562QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3563 struct wmm_update_params *param)
3564{
3565 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3566
3567 if (wmi_handle->ops->send_wmm_update_cmd)
3568 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3569
3570 return QDF_STATUS_E_FAILURE;
3571}
3572
3573/**
3574 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3575 * @param wmi_handle : handle to WMI.
3576 * @param param : pointer to hold ant switch tbl param
3577 *
3578 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3579 */
3580QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3581 struct ant_switch_tbl_params *param)
3582{
3583 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3584
3585 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3586 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3587 param);
3588
3589 return QDF_STATUS_E_FAILURE;
3590}
3591
3592/**
3593 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3594 * @param wmi_handle : handle to WMI.
3595 * @param param : pointer to hold ratepwr table param
3596 *
3597 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3598 */
3599QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3600 struct ratepwr_table_params *param)
3601{
3602 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3603
3604 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3605 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3606 param);
3607
3608 return QDF_STATUS_E_FAILURE;
3609}
3610
3611/**
3612 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3613 * @param wmi_handle : handle to WMI.
3614 *
3615 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3616 */
3617QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3618{
3619 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3620
3621 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3622 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3623
3624 return QDF_STATUS_E_FAILURE;
3625}
3626
3627/**
3628 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3629 * @param wmi_handle : handle to WMI.
3630 * @param param : pointer to hold ctl table param
3631 *
3632 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3633 */
3634QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3635 struct ctl_table_params *param)
3636{
3637 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3638
3639 if (wmi_handle->ops->send_set_ctl_table_cmd)
3640 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3641 param);
3642
3643 return QDF_STATUS_E_FAILURE;
3644}
3645
3646/**
3647 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3648 * @param wmi_handle : handle to WMI.
3649 * @param param : pointer to hold mimogain param
3650 *
3651 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3652 */
3653QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3654 struct mimogain_table_params *param)
3655{
3656 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3657
3658 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3659 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3660 param);
3661
3662 return QDF_STATUS_E_FAILURE;
3663}
3664
3665/**
3666 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3667 * chainmsk cmd function
3668 * @param wmi_handle : handle to WMI.
3669 * @param param : pointer to hold ratepwr chainmsk param
3670 *
3671 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3672 */
3673QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3674 struct ratepwr_chainmsk_params *param)
3675{
3676 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3677
3678 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3679 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3680
3681 return QDF_STATUS_E_FAILURE;
3682}
3683
3684/**
3685 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3686 * @param wmi_handle : handle to WMI.
3687 * @param param : pointer to hold macaddr param
3688 *
3689 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3690 */
3691QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3692 struct macaddr_params *param)
3693{
3694 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3695
3696 if (wmi_handle->ops->send_set_macaddr_cmd)
3697 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3698
3699 return QDF_STATUS_E_FAILURE;
3700}
3701
3702/**
3703 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3704 * @param wmi_handle : handle to WMI.
3705 *
3706 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3707 */
3708QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3709{
3710 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3711
3712 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3713 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3714
3715 return QDF_STATUS_E_FAILURE;
3716}
3717
3718/**
3719 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3720 * @param wmi_handle : handle to WMI.
3721 *
3722 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3723 */
3724QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3725{
3726 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3727
3728 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3729 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3730
3731 return QDF_STATUS_E_FAILURE;
3732}
3733
3734/**
3735 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3736 * @param wmi_handle : handle to WMI.
3737 * @param param : pointer to hold acparams param
3738 *
3739 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3740 */
3741QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3742 struct acparams_params *param)
3743{
3744 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3745
3746 if (wmi_handle->ops->send_set_acparams_cmd)
3747 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3748 param);
3749
3750 return QDF_STATUS_E_FAILURE;
3751}
3752
3753/**
3754 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3755 * tid map cmd function
3756 * @param wmi_handle : handle to WMI.
3757 * @param param : pointer to hold dscp param
3758 *
3759 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3760 */
3761QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3762 struct vap_dscp_tid_map_params *param)
3763{
3764 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3765
3766 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3767 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3768
3769 return QDF_STATUS_E_FAILURE;
3770}
3771
3772/**
3773 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3774 * reserve cmd function
3775 * @param wmi_handle : handle to WMI.
3776 * @param param : pointer to hold ast param
3777 *
3778 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3779 */
3780QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3781 struct proxy_ast_reserve_params *param)
3782{
3783 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3784
3785 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3786 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3787 param);
3788
3789 return QDF_STATUS_E_FAILURE;
3790}
3791
3792/**
3793 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3794 * @param wmi_handle : handle to WMI.
3795 * @param param : pointer to hold qvit param
3796 *
3797 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3798 */
3799QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3800 struct pdev_qvit_params *param)
3801{
3802 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3803
3804 if (wmi_handle->ops->send_pdev_qvit_cmd)
3805 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3806
3807 return QDF_STATUS_E_FAILURE;
3808}
3809
3810/**
3811 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3812 * @param wmi_handle : handle to WMI.
3813 * @param param : pointer to hold mcast grp param
3814 *
3815 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3816 */
3817QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3818 struct mcast_group_update_params *param)
3819{
3820 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3821
3822 if (wmi_handle->ops->send_mcast_group_update_cmd)
3823 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3824 param);
3825
3826 return QDF_STATUS_E_FAILURE;
3827}
3828
3829/**
3830 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3831 * @param wmi_handle : handle to WMI.
3832 * @param param : pointer to hold wds entry param
3833 *
3834 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3835 */
3836QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3837 struct peer_add_wds_entry_params *param)
3838{
3839 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3840
3841 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3842 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3843 param);
3844
3845 return QDF_STATUS_E_FAILURE;
3846}
3847
3848/**
3849 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3850 * @param wmi_handle : handle to WMI.
3851 * @param param : pointer to hold wds entry param
3852 *
3853 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3854 */
3855QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3856 struct peer_del_wds_entry_params *param)
3857{
3858 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3859
3860 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3861 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3862 param);
3863
3864 return QDF_STATUS_E_FAILURE;
3865}
3866
3867/**
3868 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3869 * @param wmi_handle : handle to WMI.
3870 * @param param : pointer to hold wds entry param
3871 *
3872 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3873 */
3874QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3875 struct peer_update_wds_entry_params *param)
3876{
3877 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3878
3879 if (wmi->ops->send_peer_update_wds_entry_cmd)
3880 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3881
3882 return QDF_STATUS_E_FAILURE;
3883}
3884
3885/**
3886 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3887 * @param wmi_handle : handle to WMI.
3888 * @param param : pointer to hold phyerr enable param
3889 *
3890 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3891 */
3892QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3893{
3894 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3895
3896 if (wmi_handle->ops->send_phyerr_enable_cmd)
3897 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3898
3899 return QDF_STATUS_E_FAILURE;
3900}
3901
3902/**
3903 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3904 * @param wmi_handle : handle to WMI.
3905 * @param param : pointer to hold phyerr disable param
3906 *
3907 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3908 */
3909QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3910{
3911 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3912
3913 if (wmi_handle->ops->send_phyerr_disable_cmd)
3914 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3915
3916 return QDF_STATUS_E_FAILURE;
3917}
3918
3919/**
3920 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3921 * @param wmi_handle : handle to WMI.
3922 * @param param : pointer to hold antenna param
3923 *
3924 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3925 */
3926QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3927 struct smart_ant_enable_params *param)
3928{
3929 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3930
3931 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3932 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3933 param);
3934
3935 return QDF_STATUS_E_FAILURE;
3936}
3937
3938/**
3939 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3940 * @param wmi_handle : handle to WMI.
3941 * @param param : pointer to hold antenna param
3942 *
3943 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3944 */
3945QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3946 struct smart_ant_rx_ant_params *param)
3947{
3948 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3949
3950 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3951 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3952
3953 return QDF_STATUS_E_FAILURE;
3954}
3955
3956/**
3957 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3958 * @param wmi_handle : handle to WMI.
3959 * @param param : pointer to hold antenna param
3960 *
3961 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3962 */
3963QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3964 uint8_t macaddr[IEEE80211_ADDR_LEN],
3965 struct smart_ant_tx_ant_params *param)
3966{
3967 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3968
3969 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3970 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3971 param);
3972
3973 return QDF_STATUS_E_FAILURE;
3974}
3975
3976/**
3977 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3978 * @param wmi_handle : handle to WMI.
3979 * @param param : pointer to hold antenna param
3980 *
3981 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3982 */
3983QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3984 uint8_t macaddr[IEEE80211_ADDR_LEN],
3985 struct smart_ant_training_info_params *param)
3986{
3987 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3988
3989 if (wmi->ops->send_smart_ant_set_training_info_cmd)
3990 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
3991 macaddr, param);
3992
3993 return QDF_STATUS_E_FAILURE;
3994}
3995
3996/**
3997 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
3998 * @param wmi_handle : handle to WMI.
3999 * @param macaddr : MAC address
4000 * @param param : pointer to hold node parameter
4001 *
4002 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4003 */
4004QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
4005 uint8_t macaddr[IEEE80211_ADDR_LEN],
4006 struct smart_ant_node_config_params *param)
4007{
4008 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4009
4010 if (wmi->ops->send_smart_ant_set_node_config_cmd)
4011 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
4012 macaddr, param);
4013
4014 return QDF_STATUS_E_FAILURE;
4015}
4016
4017/**
4018 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
4019 * @param wmi_handle : handle to WMI.
4020 * @param param : pointer to hold antenna param
4021 *
4022 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4023 */
4024QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
4025 struct smart_ant_enable_tx_feedback_params *param)
4026{
4027 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4028
4029 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
4030 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
4031 param);
4032
4033 return QDF_STATUS_E_FAILURE;
4034}
4035
4036/**
4037 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
4038 * @param wmi_handle : handle to WMI.
4039 * @param param : pointer to hold spectral config param
4040 *
4041 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4042 */
4043QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
4044 struct vdev_spectral_configure_params *param)
4045{
4046 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4047
4048 if (wmi->ops->send_vdev_spectral_configure_cmd)
4049 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
4050
4051 return QDF_STATUS_E_FAILURE;
4052}
4053
4054/**
4055 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
4056 * @param wmi_handle : handle to WMI.
4057 * @param param : pointer to hold enable spectral param
4058 *
4059 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4060 */
4061QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
4062 struct vdev_spectral_enable_params *param)
4063{
4064 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4065
4066 if (wmi->ops->send_vdev_spectral_enable_cmd)
4067 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
4068
4069 return QDF_STATUS_E_FAILURE;
4070}
4071
4072/**
4073 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
4074 * @param wmi_handle : handle to WMI.
4075 * @param param : pointer to hold chan info param
4076 *
4077 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4078 */
4079QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
4080 struct bss_chan_info_request_params *param)
4081{
4082 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4083
4084 if (wmi->ops->send_bss_chan_info_request_cmd)
4085 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
4086
4087 return QDF_STATUS_E_FAILURE;
4088}
4089
4090/**
4091 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
4092 * @param wmi_handle : handle to WMI.
4093 * @param param : pointer to hold thermal mitigation param
4094 *
4095 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4096 */
4097QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
4098 struct thermal_mitigation_params *param)
4099{
4100 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4101
4102 if (wmi->ops->send_thermal_mitigation_param_cmd)
4103 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
4104
4105 return QDF_STATUS_E_FAILURE;
4106}
4107
4108/**
4109 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
4110 * @param wmi_handle : handle to WMI.
4111 * @param macaddr : MAC address
4112 * @param param : pointer to hold neighbour rx parameter
4113 *
4114 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4115 */
4116QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
4117 uint8_t macaddr[IEEE80211_ADDR_LEN],
4118 struct set_neighbour_rx_params *param)
4119{
4120 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4121
4122 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
4123 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
4124 macaddr, param);
4125
4126 return QDF_STATUS_E_FAILURE;
4127}
4128
4129/**
4130 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
4131 * @param wmi_handle : handle to WMI.
4132 * @param param : pointer to hold fwtest param
4133 *
4134 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4135 */
4136QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
4137 struct set_fwtest_params *param)
4138{
4139 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4140
4141 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
4142 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
4143
4144 return QDF_STATUS_E_FAILURE;
4145}
4146
4147/**
4148 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4149 * @param wmi_handle : handle to WMI.
4150 * @param param : pointer to hold config ratemask param
4151 *
4152 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4153 */
4154QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4155 struct config_ratemask_params *param)
4156{
4157 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4158
4159 if (wmi->ops->send_vdev_config_ratemask_cmd)
4160 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4161
4162 return QDF_STATUS_E_FAILURE;
4163}
4164
4165/**
4166 * wmi_unified_vdev_install_key_cmd_send() - WMI install key function
4167 * @param wmi_handle : handle to WMI.
4168 * @param macaddr : MAC address
4169 * @param param : pointer to hold key parameter
4170 *
4171 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4172 */
4173QDF_STATUS wmi_unified_vdev_install_key_cmd_send(void *wmi_hdl,
4174 uint8_t macaddr[IEEE80211_ADDR_LEN],
4175 struct vdev_install_key_params *param)
4176{
4177 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4178
4179 if (wmi_handle->ops->send_vdev_install_key_cmd)
4180 return wmi_handle->ops->send_vdev_install_key_cmd(wmi_handle,
4181 macaddr, param);
4182
4183 return QDF_STATUS_E_FAILURE;
4184}
4185
4186/**
4187 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4188 * @param wmi_handle : handle to WMI.
4189 * @param param : pointer to hold regdomain param
4190 *
4191 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4192 */
4193QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4194 struct pdev_set_regdomain_params *param)
4195{
4196 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4197
4198 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4199 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4200 param);
4201
4202 return QDF_STATUS_E_FAILURE;
4203}
4204
4205/**
4206 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4207 * @param wmi_handle : handle to WMI.
4208 * @param param : pointer to hold quiet mode param
4209 *
4210 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4211 */
4212QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4213 struct set_quiet_mode_params *param)
4214{
4215 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4216
4217 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4218 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4219 param);
4220
4221 return QDF_STATUS_E_FAILURE;
4222}
4223
4224/**
4225 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4226 * @param wmi_handle : handle to WMI.
4227 * @param param : pointer to hold beacon filter param
4228 *
4229 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4230 */
4231QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4232 struct set_beacon_filter_params *param)
4233{
4234 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4235
4236 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4237 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4238 param);
4239
4240 return QDF_STATUS_E_FAILURE;
4241}
4242
4243/**
4244 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4245 * @param wmi_handle : handle to WMI.
4246 * @param param : pointer to hold beacon filter param
4247 *
4248 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4249 */
4250QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4251 struct remove_beacon_filter_params *param)
4252{
4253 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4254
4255 if (wmi->ops->send_remove_beacon_filter_cmd)
4256 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4257
4258 return QDF_STATUS_E_FAILURE;
4259}
4260
4261/**
4262 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4263 * @param wmi_handle : handle to WMI.
4264 * @param macaddr : MAC address
4265 * @param param : pointer to hold mgmt parameter
4266 *
4267 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4268 */
4269#if 0
4270QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4271 uint8_t macaddr[IEEE80211_ADDR_LEN],
4272 struct mgmt_params *param)
4273{
4274 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4275
4276 if (wmi_handle->ops->send_mgmt_cmd)
4277 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4278 macaddr, param);
4279
4280 return QDF_STATUS_E_FAILURE;
4281}
4282#endif
4283
4284/**
4285 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4286 * @param wmi_handle : handle to WMI.
4287 * @param macaddr : MAC address
4288 * @param param : pointer to hold addba resp parameter
4289 *
4290 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4291 */
4292QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4293 uint8_t macaddr[IEEE80211_ADDR_LEN],
4294 struct addba_clearresponse_params *param)
4295{
4296 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4297
4298 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4299 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4300 macaddr, param);
4301
4302 return QDF_STATUS_E_FAILURE;
4303}
4304
4305/**
4306 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4307 * @param wmi_handle : handle to WMI.
4308 * @param macaddr : MAC address
4309 * @param param : pointer to hold addba parameter
4310 *
4311 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4312 */
4313QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4314 uint8_t macaddr[IEEE80211_ADDR_LEN],
4315 struct addba_send_params *param)
4316{
4317 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4318
4319 if (wmi_handle->ops->send_addba_send_cmd)
4320 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4321 macaddr, param);
4322
4323 return QDF_STATUS_E_FAILURE;
4324}
4325
4326/**
4327 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4328 * @param wmi_handle : handle to WMI.
4329 * @param macaddr : MAC address
4330 * @param param : pointer to hold delba parameter
4331 *
4332 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4333 */
4334QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4335 uint8_t macaddr[IEEE80211_ADDR_LEN],
4336 struct delba_send_params *param)
4337{
4338 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4339
4340 if (wmi_handle->ops->send_delba_send_cmd)
4341 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4342 macaddr, param);
4343
4344 return QDF_STATUS_E_FAILURE;
4345}
4346
4347/**
4348 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4349 * @param wmi_handle : handle to WMI.
4350 * @param macaddr : MAC address
4351 * @param param : pointer to hold addba set resp parameter
4352 *
4353 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4354 */
4355QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4356 uint8_t macaddr[IEEE80211_ADDR_LEN],
4357 struct addba_setresponse_params *param)
4358{
4359 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4360
4361 if (wmi_handle->ops->send_addba_setresponse_cmd)
4362 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4363 macaddr, param);
4364
4365 return QDF_STATUS_E_FAILURE;
4366}
4367
4368/**
4369 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4370 * @param wmi_handle : handle to WMI.
4371 * @param macaddr : MAC address
4372 * @param param : pointer to hold singleamsdu parameter
4373 *
4374 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4375 */
4376QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4377 uint8_t macaddr[IEEE80211_ADDR_LEN],
4378 struct singleamsdu_params *param)
4379{
4380 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4381
4382 if (wmi_handle->ops->send_singleamsdu_cmd)
4383 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4384 macaddr, param);
4385
4386 return QDF_STATUS_E_FAILURE;
4387}
4388
4389/**
4390 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4391 * @param wmi_handle : handle to WMI.
4392 * @param macaddr : MAC address
4393 * @param param : pointer to hold set_qboost parameter
4394 *
4395 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4396 */
4397QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4398 uint8_t macaddr[IEEE80211_ADDR_LEN],
4399 struct set_qboost_params *param)
4400{
4401 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4402
4403 if (wmi_handle->ops->send_set_qboost_param_cmd)
4404 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4405 macaddr, param);
4406
4407 return QDF_STATUS_E_FAILURE;
4408}
4409
4410/**
4411 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4412 * @param wmi_handle : handle to WMI.
4413 * @param param : pointer to hold mu scan param
4414 *
4415 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4416 */
4417QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4418 struct mu_scan_params *param)
4419{
4420 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4421
4422 if (wmi_handle->ops->send_mu_scan_cmd)
4423 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4424
4425 return QDF_STATUS_E_FAILURE;
4426}
4427
4428/**
4429 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4430 * @param wmi_handle : handle to WMI.
4431 * @param param : pointer to hold mu scan param
4432 *
4433 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4434 */
4435QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4436 struct lteu_config_params *param)
4437{
4438 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4439
4440 if (wmi_handle->ops->send_lteu_config_cmd)
4441 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4442
4443 return QDF_STATUS_E_FAILURE;
4444}
4445
4446/**
4447 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4448 * @param wmi_handle : handle to WMI.
4449 * @param param : pointer to hold mu scan param
4450 *
4451 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4452 */
4453QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4454 struct set_ps_mode_params *param)
4455{
4456 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4457
4458 if (wmi_handle->ops->send_set_ps_mode_cmd)
4459 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4460
4461 return QDF_STATUS_E_FAILURE;
4462}
4463
4464/**
4465 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4466 * @wmi_handle: wmi handle
4467 * @param tgt_res_cfg: pointer to target resource configuration
4468 * @param num_mem_chunks: Number of memory chunks
4469 * @param mem_chunks: pointer to target memory chunks
4470 *
4471 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4472 */
4473QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
4474 target_resource_config *res_cfg, uint8_t num_mem_chunks,
4475 struct wmi_host_mem_chunk *mem_chunk)
4476{
4477 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4478
4479 if (wmi_handle->ops->init_cmd_send)
4480 return wmi_handle->ops->init_cmd_send(wmi_handle, res_cfg,
4481 num_mem_chunks, mem_chunk);
4482
4483 return QDF_STATUS_E_FAILURE;
4484}
4485
4486/**
4487 * wmi_save_service_bitmap() - save service bitmap
4488 * @wmi_handle: wmi handle
4489 * @param evt_buf: pointer to event buffer
4490 *
4491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4492 */
4493QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf)
4494{
4495 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4496
4497 if (wmi_handle->ops->save_service_bitmap) {
4498 wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf);
4499 return 0;
4500 }
4501 return QDF_STATUS_E_FAILURE;
4502}
4503
4504/**
4505 * wmi_save_fw_version() - Save fw version
4506 * @wmi_handle: wmi handle
4507 * @param evt_buf: pointer to event buffer
4508 *
4509 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4510 */
4511QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4512{
4513 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4514
4515 if (wmi_handle->ops->save_fw_version) {
4516 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4517 return 0;
4518 }
4519 return QDF_STATUS_E_FAILURE;
4520
4521}
4522
4523/**
4524 * wmi_check_and_update_fw_version() - Ready and fw version check
4525 * @wmi_handle: wmi handle
4526 * @param evt_buf: pointer to event buffer
4527 *
4528 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4529 */
4530QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4531{
4532 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4533
4534 if (wmi_handle->ops->check_and_update_fw_version)
4535 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4536 evt_buf);
4537
4538 return QDF_STATUS_E_FAILURE;
4539
4540}
4541
4542/**
4543 * wmi_service_enabled() - Check if service enabled
4544 * @param wmi_handle: wmi handle
4545 * @param service_id: service identifier
4546 *
4547 * Return: 1 enabled, 0 disabled
4548 */
4549#ifdef WMI_NON_TLV_SUPPORT
4550bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4551{
4552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4553
4554 if ((service_id < wmi_services_max) &&
4555 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4556 if (wmi_handle->ops->is_service_enabled) {
4557 return wmi_handle->ops->is_service_enabled(wmi_handle,
4558 wmi_handle->services[service_id]);
4559 }
4560 } else {
4561 qdf_print("Support not added yet for Service %d\n", service_id);
4562 }
4563 return false;
4564}
4565#endif
4566
4567/**
4568 * wmi_get_target_cap_from_service_ready() - extract service ready event
4569 * @wmi_handle: wmi handle
4570 * @param evt_buf: pointer to received event buffer
4571 * @param ev: pointer to hold target capability information extracted from even
4572 *
4573 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4574 */
4575QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
4576 void *evt_buf, target_capability_info *ev)
4577{
4578 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4579
4580 if (wmi->ops->get_target_cap_from_service_ready)
4581 return wmi->ops->get_target_cap_from_service_ready(wmi,
4582 evt_buf, ev);
4583
4584 return QDF_STATUS_E_FAILURE;
4585}
4586
4587/**
4588 * wmi_extract_fw_version() - extract fw version
4589 * @wmi_handle: wmi handle
4590 * @param evt_buf: pointer to event buffer
4591 * @param fw_ver: Pointer to hold fw version
4592 *
4593 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4594 */
4595QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4596 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4597{
4598 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4599
4600 if (wmi_handle->ops->extract_fw_version)
4601 return wmi_handle->ops->extract_fw_version(wmi_handle,
4602 evt_buf, fw_ver);
4603
4604 return QDF_STATUS_E_FAILURE;
4605}
4606
4607/**
4608 * wmi_extract_fw_abi_version() - extract fw abi version
4609 * @wmi_handle: wmi handle
4610 * @param evt_buf: Pointer to event buffer
4611 * @param fw_ver: Pointer to hold fw abi version
4612 *
4613 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4614 */
4615QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4616 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4617{
4618 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4619
4620 if (wmi_handle->ops->extract_fw_abi_version)
4621 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4622 evt_buf, fw_ver);
4623
4624 return QDF_STATUS_E_FAILURE;
4625}
4626
4627/**
4628 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4629 * @wmi_handle: wmi handle
4630 * @param evt_buf: Pointer to event buffer
4631 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4632 *
4633 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4634 */
4635QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
4636 TARGET_HAL_REG_CAPABILITIES *hal_reg_cap)
4637{
4638 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4639
4640 if (wmi_handle->ops->extract_hal_reg_cap)
4641 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4642 evt_buf, hal_reg_cap);
4643
4644 return QDF_STATUS_E_FAILURE;
4645}
4646
4647/**
4648 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4649 * request event
4650 * @wmi_handle: wmi handle
4651 * @param evt_buf: pointer to event buffer
4652 * @param num_entries: pointer to hold number of entries requested
4653 *
4654 * Return: Number of entries requested
4655 */
4656host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4657 void *evt_buf, uint8_t *num_entries)
4658{
4659 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4660
4661 if (wmi_handle->ops->extract_host_mem_req)
4662 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4663 evt_buf, num_entries);
4664
4665 *num_entries = 0;
4666 return NULL;
4667}
4668
4669/**
4670 * wmi_ready_extract_init_status() - Extract init status from ready event
4671 * @wmi_handle: wmi handle
4672 * @param ev: Pointer to event buffer
4673 *
4674 * Return: ready status
4675 */
4676uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4677{
4678 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4679
4680 if (wmi_handle->ops->ready_extract_init_status)
4681 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4682 ev);
4683
4684
4685 return 1;
4686
4687}
4688
4689/**
4690 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4691 * @wmi_handle: wmi handle
4692 * @param ev: pointer to event buffer
4693 * @param macaddr: Pointer to hold MAC address
4694 *
4695 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4696 */
4697QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4698{
4699 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4700
4701 if (wmi_handle->ops->ready_extract_mac_addr)
4702 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4703 ev, macaddr);
4704
4705
4706 return QDF_STATUS_E_FAILURE;
4707}
4708
4709/**
4710 * wmi_extract_dbglog_data_len() - extract debuglog data length
4711 * @wmi_handle: wmi handle
4712 * @param evt_buf: pointer to event buffer
4713 * @param len: length of buffer
4714 *
4715 * Return: length
4716 */
4717uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
4718 uint16_t *len)
4719{
4720 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4721
4722 if (wmi_handle->ops->extract_dbglog_data_len)
4723 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4724 evt_buf, len);
4725
4726
4727 return NULL;
4728}
4729
4730/**
4731 * wmi_send_ext_resource_config() - send extended resource configuration
4732 * @wmi_handle: wmi handle
4733 * @param ext_cfg: pointer to extended resource configuration
4734 *
4735 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4736 */
4737QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4738 wmi_host_ext_resource_config *ext_cfg)
4739{
4740 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4741
4742 if (wmi_handle->ops->send_ext_resource_config)
4743 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4744 ext_cfg);
4745
4746 return QDF_STATUS_E_FAILURE;
4747}
4748
4749/**
4750 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4751 * @param wmi_handle : handle to WMI.
4752 *
4753 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4754 */
4755QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl)
4756{
4757 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4758
4759 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
4760 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi);
4761
4762 return QDF_STATUS_E_FAILURE;
4763}
4764
4765/**
4766 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4767 * @param wmi_handle : handle to WMI.
4768 * @param param : pointer to hold packet power info param
4769 *
4770 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4771 */
4772QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4773 struct packet_power_info_params *param)
4774{
4775 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4776
4777 if (wmi->ops->send_packet_power_info_get_cmd)
4778 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4779
4780 return QDF_STATUS_E_FAILURE;
4781}
4782
4783/**
4784 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4785 * @param wmi_handle : handle to WMI.
4786 * @param param : pointer to hold gpio config param
4787 *
4788 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4789 */
4790QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4791 struct gpio_config_params *param)
4792{
4793 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4794
4795 if (wmi_handle->ops->send_gpio_config_cmd)
4796 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4797
4798 return QDF_STATUS_E_FAILURE;
4799}
4800
4801/**
4802 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4803 * @param wmi_handle : handle to WMI.
4804 * @param param : pointer to hold gpio config param
4805 *
4806 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4807 */
4808QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4809 struct gpio_output_params *param)
4810{
4811 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4812
4813 if (wmi_handle->ops->send_gpio_output_cmd)
4814 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4815
4816 return QDF_STATUS_E_FAILURE;
4817}
4818
4819/**
4820 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4821 * @param wmi_handle : handle to WMI.
4822 * @param param : pointer to hold rtt meas req test param
4823 *
4824 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4825 */
4826QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4827 struct rtt_meas_req_test_params *param)
4828{
4829 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4830
4831 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4832 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4833 param);
4834
4835 return QDF_STATUS_E_FAILURE;
4836}
4837
4838/**
4839 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4840 * @param wmi_handle : handle to WMI.
4841 * @param param : pointer to hold rtt meas req param
4842 *
4843 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4844 */
4845QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4846 struct rtt_meas_req_params *param)
4847{
4848 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4849
4850 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4851 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4852 param);
4853
4854 return QDF_STATUS_E_FAILURE;
4855}
4856
4857/**
4858 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4859 * @param wmi_handle : handle to WMI.
4860 * @param param : pointer to hold lci param
4861 *
4862 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4863 */
4864QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4865 struct lci_set_params *param)
4866{
4867 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4868
4869 if (wmi_handle->ops->send_lci_set_cmd)
4870 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4871
4872 return QDF_STATUS_E_FAILURE;
4873}
4874
4875/**
4876 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4877 * @param wmi_handle : handle to WMI.
4878 * @param param : pointer to hold lcr param
4879 *
4880 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4881 */
4882QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4883 struct lcr_set_params *param)
4884{
4885 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4886
4887 if (wmi_handle->ops->send_lcr_set_cmd)
4888 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4889
4890 return QDF_STATUS_E_FAILURE;
4891}
4892
4893/**
4894 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4895 * @param wmi_handle : handle to WMI.
4896 * @param param : pointer to hold rtt meas req test param
4897 *
4898 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4899 */
4900QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4901 struct rtt_keepalive_req_params *param)
4902{
4903 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4904
4905 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4906 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4907 param);
4908
4909 return QDF_STATUS_E_FAILURE;
4910}
4911
4912/**
4913 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4914 * to fw
4915 * @wmi_handle: wmi handle
4916 * @param: pointer to hold periodic chan stats param
4917 *
4918 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4919 */
4920QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4921 struct periodic_chan_stats_params *param)
4922{
4923 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4924
4925 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4926 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4927 param);
4928
4929 return QDF_STATUS_E_FAILURE;
4930}
4931
4932/**
4933 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4934 * @wmi_handle: wmi handle
4935 * @param: pointer to atf peer request param
4936 *
4937 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4938 */
4939QDF_STATUS
4940wmi_send_atf_peer_request_cmd(void *wmi_hdl,
4941 struct atf_peer_request_params *param)
4942{
4943 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4944
4945 if (wmi_handle->ops->send_atf_peer_request_cmd)
4946 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
4947 param);
4948
4949 return QDF_STATUS_E_FAILURE;
4950}
4951
4952/**
4953 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
4954 * @wmi_handle: wmi handle
4955 * @param: pointer to set atf grouping param
4956 *
4957 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4958 */
4959QDF_STATUS
4960wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
4961 struct atf_grouping_params *param)
4962{
4963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4964
4965 if (wmi_handle->ops->send_set_atf_grouping_cmd)
4966 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
4967 param);
4968
4969 return QDF_STATUS_E_FAILURE;
4970
4971}
4972
4973
4974/* Extract - APIs */
4975/**
4976 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
4977 *
4978 * @param wmi_handle : handle to WMI.
4979 * @param evt_buf : pointer to event buffer
4980 * @param len : length of the event buffer
4981 * @param wds_ev: pointer to strct to extract
4982 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4983 */
4984QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
4985 uint16_t len, wds_addr_event_t *wds_ev)
4986{
4987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4988
4989 if (wmi_handle->ops->extract_wds_addr_event) {
4990 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
4991 evt_buf, len, wds_ev);
4992 }
4993 return QDF_STATUS_E_FAILURE;
4994}
4995
4996/**
4997 * wmi_extract_dcs_interference_type() - extract dcs interference type
4998 * @wmi_handle: wmi handle
4999 * @param evt_buf: pointer to event buffer
5000 * @param interference_type: Pointer to hold interference type
5001 *
5002 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5003 */
5004QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
5005 void *evt_buf, uint32_t *interference_type)
5006{
5007 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5008
5009 if (wmi->ops->extract_dcs_interference_type) {
5010 return wmi->ops->extract_dcs_interference_type(wmi,
5011 evt_buf, interference_type);
5012 }
5013 return QDF_STATUS_E_FAILURE;
5014}
5015
5016/*
5017 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5018 * @wmi_handle: wmi handle
5019 * @param evt_buf: pointer to event buffer
5020 * @param cw_int: Pointer to hold cw interference
5021 *
5022 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5023 */
5024QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5025 wmi_host_ath_dcs_cw_int *cw_int)
5026{
5027 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5028
5029 if (wmi_handle->ops->extract_dcs_cw_int) {
5030 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5031 evt_buf, cw_int);
5032 }
5033 return QDF_STATUS_E_FAILURE;
5034}
5035
5036/**
5037 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5038 * @wmi_handle: wmi handle
5039 * @param evt_buf: pointer to event buffer
5040 * @param wlan_stat: Pointer to hold wlan stats
5041 *
5042 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5043 */
5044QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5045 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5046{
5047 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5048
5049 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5050 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5051 evt_buf, wlan_stat);
5052 }
5053 return QDF_STATUS_E_FAILURE;
5054}
5055
5056/**
5057 * wmi_extract_fips_event_error_status() - extract fips event error status
5058 * @wmi_handle: wmi handle
5059 * @param evt_buf: pointer to event buffer
5060 * @param err_status: Pointer to hold error status
5061 *
5062 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5063 */
5064QDF_STATUS wmi_extract_fips_event_error_status(void *wmi_hdl, void *evt_buf,
5065 uint32_t *err_status)
5066{
5067 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5068
5069 if (wmi->ops->extract_fips_event_error_status) {
5070 return wmi->ops->extract_fips_event_error_status(wmi,
5071 evt_buf, err_status);
5072 }
5073 return QDF_STATUS_E_FAILURE;
5074}
5075
5076/**
5077 * wmi_extract_fips_event_data() - extract fips event data
5078 * @wmi_handle: wmi handle
5079 * @param evt_buf: pointer to event buffer
5080 * @param data_len: Pointer to hold fips data length
5081 * @param data: Double pointer to hold fips data
5082 *
5083 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5084 */
5085QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
5086 uint32_t *data_len, uint32_t **data)
5087{
5088 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5089
5090 if (wmi_handle->ops->extract_fips_event_data) {
5091 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
5092 evt_buf, data_len, data);
5093 }
5094 return QDF_STATUS_E_FAILURE;
5095}
5096
5097/**
5098 * wmi_extract_vdev_start_resp() - extract vdev start response
5099 * @wmi_handle: wmi handle
5100 * @param evt_buf: pointer to event buffer
5101 * @param vdev_rsp: Pointer to hold vdev response
5102 *
5103 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5104 */
5105QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5106 wmi_host_vdev_start_resp *vdev_rsp)
5107{
5108 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5109
5110 if (wmi_handle->ops->extract_vdev_start_resp)
5111 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5112 evt_buf, vdev_rsp);
5113
5114 return QDF_STATUS_E_FAILURE;
5115}
5116
5117/**
5118 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5119 * @wmi_handle: wmi handle
5120 * @param evt_buf: pointer to event buffer
5121 * @param vdev_map: Pointer to hold vdev map
5122 * @param tbttoffset_list: Pointer to tbtt offset list
5123 *
5124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5125 */
5126QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
5127 uint32_t *vdev_map, uint32_t **tbttoffset_list)
5128{
5129 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5130
5131 if (wmi->ops->extract_tbttoffset_update_params)
5132 return wmi->ops->extract_tbttoffset_update_params(wmi,
5133 evt_buf, vdev_map, tbttoffset_list);
5134
5135 return QDF_STATUS_E_FAILURE;
5136}
5137
5138/**
5139 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5140 * @wmi_handle: wmi handle
5141 * @param evt_buf: pointer to event buffer
5142 * @param hdr: Pointer to hold header
5143 * @param bufp: Pointer to hold pointer to rx param buffer
5144 *
5145 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5146 */
5147QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
5148 wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
5149{
5150 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5151
5152 if (wmi_handle->ops->extract_mgmt_rx_params)
5153 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5154 evt_buf, hdr, bufp);
5155
5156 return QDF_STATUS_E_FAILURE;
5157}
5158
5159/**
5160 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5161 * @wmi_handle: wmi handle
5162 * @param evt_buf: pointer to event buffer
5163 * @param vdev_id: Pointer to hold vdev identifier
5164 *
5165 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5166 */
5167QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5168 uint32_t *vdev_id)
5169{
5170 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5171
5172 if (wmi_handle->ops->extract_vdev_stopped_param)
5173 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5174 evt_buf, vdev_id);
5175
5176 return QDF_STATUS_E_FAILURE;
5177}
5178
5179/**
5180 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5181 * @wmi_handle: wmi handle
5182 * @param evt_buf: pointer to event buffer
5183 * @param param: Pointer to hold roam param
5184 *
5185 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5186 */
5187QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5188 wmi_host_roam_event *param)
5189{
5190 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5191
5192 if (wmi_handle->ops->extract_vdev_roam_param)
5193 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5194 evt_buf, param);
5195
5196 return QDF_STATUS_E_FAILURE;
5197}
5198
5199/**
5200 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5201 * @wmi_handle: wmi handle
5202 * @param evt_buf: pointer to event buffer
5203 * @param param: Pointer to hold vdev scan param
5204 *
5205 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5206 */
5207QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
5208 wmi_host_scan_event *param)
5209{
5210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5211
5212 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5213 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5214 evt_buf, param);
5215
5216 return QDF_STATUS_E_FAILURE;
5217}
5218
5219/**
5220 * wmi_extract_mu_ev_param() - extract mu param from event
5221 * @wmi_handle: wmi handle
5222 * @param evt_buf: pointer to event buffer
5223 * @param param: Pointer to hold mu report
5224 *
5225 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5226 */
5227QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5228 wmi_host_mu_report_event *param)
5229{
5230 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5231
5232 if (wmi_handle->ops->extract_mu_ev_param)
5233 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5234 param);
5235
5236 return QDF_STATUS_E_FAILURE;
5237}
5238
5239/**
5240 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5241 * param from event
5242 * @wmi_handle: wmi handle
5243 * @param evt_buf: pointer to event buffer
5244 * @param param: Pointer to hold tpc configuration
5245 *
5246 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5247 */
5248QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5249 wmi_host_pdev_tpc_config_event *param)
5250{
5251 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5252
5253 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5254 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5255 evt_buf, param);
5256
5257 return QDF_STATUS_E_FAILURE;
5258
5259}
5260
5261/**
5262 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5263 * @wmi_handle: wmi handle
5264 * @param evt_buf: pointer to event buffer
5265 * @param gpio_num: Pointer to hold gpio number
5266 *
5267 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5268 */
5269QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5270 void *evt_buf, uint32_t *gpio_num)
5271{
5272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5273
5274 if (wmi_handle->ops->extract_gpio_input_ev_param)
5275 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5276 evt_buf, gpio_num);
5277
5278 return QDF_STATUS_E_FAILURE;
5279}
5280
5281/**
5282 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5283 * param from event
5284 * @wmi_handle: wmi handle
5285 * @param evt_buf: pointer to event buffer
5286 * @param result: Pointer to hold reserve ast entry param
5287 *
5288 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5289 */
5290QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
5291 void *evt_buf, uint32_t *result)
5292{
5293 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5294
5295 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5296 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
5297 evt_buf, result);
5298
5299 return QDF_STATUS_E_FAILURE;
5300}
5301
5302/**
5303 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5304 * power param from event
5305 * @wmi_handle: wmi handle
5306 * @param evt_buf: pointer to event buffer
5307 * @param param: Pointer to hold nf cal power param
5308 *
5309 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5310 */
5311QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5312 wmi_host_pdev_nfcal_power_all_channels_event *param)
5313{
5314 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5315
5316 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5317 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5318 evt_buf, param);
5319
5320 return QDF_STATUS_E_FAILURE;
5321
5322}
5323
5324/**
5325 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5326 * @wmi_handle: wmi handle
5327 * @param evt_buf: pointer to event buffer
5328 * @param param: Pointer to hold tpc param
5329 *
5330 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5331 */
5332QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5333 wmi_host_pdev_tpc_event *param)
5334{
5335 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5336
5337 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5338 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5339 evt_buf, param);
5340
5341 return QDF_STATUS_E_FAILURE;
5342
5343}
5344
5345/**
5346 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5347 * from event
5348 * @wmi_handle: wmi handle
5349 * @param evt_buf: pointer to event buffer
5350 * @param param: Pointer to generic buffer param
5351 *
5352 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5353 */
5354QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5355 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5356{
5357 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5358
5359 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5360 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5361 evt_buf, param);
5362
5363 return QDF_STATUS_E_FAILURE;
5364
5365}
5366
5367/**
5368 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5369 * from event
5370 * @wmi_handle: wmi handle
5371 * @param evt_buf: pointer to event buffer
5372 * @param param: Pointer to mgmt tx completion param
5373 *
5374 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5375 */
5376QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5377 wmi_host_mgmt_tx_compl_event *param)
5378{
5379 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5380
5381 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5382 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5383 evt_buf, param);
5384
5385
5386 return QDF_STATUS_E_FAILURE;
5387}
5388
5389/**
5390 * wmi_extract_swba_vdev_map() - extract swba vdev map from event
5391 * @wmi_handle: wmi handle
5392 * @param evt_buf: pointer to event buffer
5393 * @param vdev_map: Pointer to hold vdev map
5394 *
5395 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5396 */
5397QDF_STATUS wmi_extract_swba_vdev_map(void *wmi_hdl, void *evt_buf,
5398 uint32_t *vdev_map)
5399{
5400 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5401
5402 if (wmi_handle->ops->extract_swba_vdev_map)
5403 return wmi_handle->ops->extract_swba_vdev_map(wmi_handle,
5404 evt_buf, vdev_map);
5405
5406 return QDF_STATUS_E_FAILURE;
5407}
5408
5409/**
5410 * wmi_extract_swba_tim_info() - extract swba tim info from event
5411 * @wmi_handle: wmi handle
5412 * @param evt_buf: pointer to event buffer
5413 * @param idx: Index to bcn info
5414 * @param tim_info: Pointer to hold tim info
5415 *
5416 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5417 */
5418QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5419 uint32_t idx, wmi_host_tim_info *tim_info)
5420{
5421 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5422
5423 if (wmi_handle->ops->extract_swba_tim_info)
5424 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5425 evt_buf, idx, tim_info);
5426
5427 return QDF_STATUS_E_FAILURE;
5428}
5429
5430/**
5431 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5432 * @wmi_handle: wmi handle
5433 * @param evt_buf: pointer to event buffer
5434 * @param idx: Index to bcn info
5435 * @param p2p_desc: Pointer to hold p2p NoA info
5436 *
5437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5438 */
5439QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5440 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5441{
5442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5443
5444 if (wmi_handle->ops->extract_swba_noa_info)
5445 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5446 evt_buf, idx, p2p_desc);
5447
5448 return QDF_STATUS_E_FAILURE;
5449}
5450
5451/**
5452 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5453 * from event
5454 * @wmi_handle: wmi handle
5455 * @param evt_buf: pointer to event buffer
5456 * @param ev: Pointer to hold peer param and ps state
5457 *
5458 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5459 */
5460QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5461 wmi_host_peer_sta_ps_statechange_event *ev)
5462{
5463 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5464
5465 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5466 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5467 evt_buf, ev);
5468
5469 return QDF_STATUS_E_FAILURE;
5470}
5471
5472/**
5473 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5474 * @wmi_handle: wmi handle
5475 * @param evt_buf: pointer to event buffer
5476 * @param ev: Pointer to hold peer param
5477 *
5478 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5479 */
5480QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5481 wmi_host_peer_sta_kickout_event *ev)
5482{
5483 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5484
5485 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5486 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5487 evt_buf, ev);
5488
5489 return QDF_STATUS_E_FAILURE;
5490}
5491
5492/**
5493 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5494 * @wmi_handle: wmi handle
5495 * @param evt_buf: pointer to event buffer
5496 * @param peer_mac: Pointer to hold peer mac address
5497 * @param rate_cap: Pointer to hold ratecode
5498 *
5499 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5500 */
5501QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5502 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5503{
5504 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5505
5506 if (wmi->ops->extract_peer_ratecode_list_ev)
5507 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5508 evt_buf, peer_mac, rate_cap);
5509
5510 return QDF_STATUS_E_FAILURE;
5511
5512}
5513
5514/**
5515 * wmi_extract_comb_phyerr() - extract comb phy error from event
5516 * @wmi_handle: wmi handle
5517 * @param evt_buf: pointer to event buffer
5518 * @param datalen: data length of event buffer
5519 * @param buf_offset: Pointer to hold value of current event buffer offset
5520 * post extraction
5521 * @param phyer: Pointer to hold phyerr
5522 *
5523 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5524 */
5525QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5526 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5527{
5528 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5529
5530 if (wmi_handle->ops->extract_comb_phyerr)
5531 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5532 evt_buf, datalen, buf_offset, phyerr);
5533
5534 return QDF_STATUS_E_FAILURE;
5535
5536}
5537
5538/**
5539 * wmi_extract_single_phyerr() - extract single phy error from event
5540 * @wmi_handle: wmi handle
5541 * @param evt_buf: pointer to event buffer
5542 * @param datalen: data length of event buffer
5543 * @param buf_offset: Pointer to hold value of current event buffer offset
5544 * post extraction
5545 * @param phyerr: Pointer to hold phyerr
5546 *
5547 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5548 */
5549QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5550 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5551{
5552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5553
5554 if (wmi_handle->ops->extract_single_phyerr)
5555 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5556 evt_buf, datalen, buf_offset, phyerr);
5557
5558 return QDF_STATUS_E_FAILURE;
5559
5560}
5561
5562/**
5563 * wmi_extract_composite_phyerr() - extract composite phy error from event
5564 * @wmi_handle: wmi handle
5565 * @param evt_buf: pointer to event buffer
5566 * @param datalen: Length of event buffer
5567 * @param phyerr: Pointer to hold phy error
5568 *
5569 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5570 */
5571QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5572 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5573{
5574 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5575
5576 if (wmi_handle->ops->extract_composite_phyerr)
5577 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5578 evt_buf, datalen, phyerr);
5579
5580 return QDF_STATUS_E_FAILURE;
5581
5582}
5583
5584/**
5585 * wmi_extract_stats_param() - extract all stats count from event
5586 * @wmi_handle: wmi handle
5587 * @param evt_buf: pointer to event buffer
5588 * @param stats_param: Pointer to hold stats count
5589 *
5590 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5591 */
5592QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5593 wmi_host_stats_event *stats_param)
5594{
5595 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5596
5597 if (wmi_handle->ops->extract_all_stats_count)
5598 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5599 evt_buf, stats_param);
5600
5601 return QDF_STATUS_E_FAILURE;
5602}
5603
5604/**
5605 * wmi_extract_pdev_stats() - extract pdev stats from event
5606 * @wmi_handle: wmi handle
5607 * @param evt_buf: pointer to event buffer
5608 * @param index: Index into pdev stats
5609 * @param pdev_stats: Pointer to hold pdev stats
5610 *
5611 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5612 */
5613QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
5614 uint32_t index, wmi_host_pdev_stats *pdev_stats)
5615{
5616 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5617
5618 if (wmi_handle->ops->extract_pdev_stats)
5619 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
5620 evt_buf, index, pdev_stats);
5621
5622 return QDF_STATUS_E_FAILURE;
5623}
5624
5625/**
5626 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
5627 * @wmi_handle: wmi handle
5628 * @param evt_buf: pointer to event buffer
5629 * @param index: Index into extended pdev stats
5630 * @param pdev_ext_stats: Pointer to hold extended pdev stats
5631 *
5632 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5633 */
5634QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
5635 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
5636{
5637 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5638
5639 if (wmi_handle->ops->extract_pdev_ext_stats)
5640 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
5641 evt_buf, index, pdev_ext_stats);
5642
5643 return QDF_STATUS_E_FAILURE;
5644}
5645
5646/**
5647 * wmi_extract_peer_stats() - extract peer stats from event
5648 * @wmi_handle: wmi handle
5649 * @param evt_buf: pointer to event buffer
5650 * @param index: Index into peer stats
5651 * @param peer_stats: Pointer to hold peer stats
5652 *
5653 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5654 */
5655QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
5656 uint32_t index, wmi_host_peer_stats *peer_stats)
5657{
5658 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5659
5660 if (wmi_handle->ops->extract_peer_stats)
5661 return wmi_handle->ops->extract_peer_stats(wmi_handle,
5662 evt_buf, index, peer_stats);
5663
5664 return QDF_STATUS_E_FAILURE;
5665}
5666
5667/**
5668 * wmi_extract_vdev_stats() - extract vdev stats from event
5669 * @wmi_handle: wmi handle
5670 * @param evt_buf: pointer to event buffer
5671 * @param index: Index into vdev stats
5672 * @param vdev_stats: Pointer to hold vdev stats
5673 *
5674 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5675 */
5676QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
5677 uint32_t index, wmi_host_vdev_stats *vdev_stats)
5678{
5679 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5680
5681 if (wmi_handle->ops->extract_vdev_stats)
5682 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
5683 evt_buf, index, vdev_stats);
5684
5685 return QDF_STATUS_E_FAILURE;
5686}
5687
5688/**
5689 * wmi_extract_rtt_hdr() - extract rtt header from event
5690 * @wmi_handle: wmi handle
5691 * @param evt_buf: pointer to event buffer
5692 * @param ev: Pointer to hold rtt header
5693 *
5694 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5695 */
5696QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
5697 wmi_host_rtt_event_hdr *ev)
5698{
5699 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5700
5701 if (wmi_handle->ops->extract_rtt_hdr)
5702 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
5703 evt_buf, ev);
5704
5705 return QDF_STATUS_E_FAILURE;
5706}
5707
5708/**
5709 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
5710 * @wmi_handle: wmi handle
5711 * @param evt_buf: pointer to event buffer
5712 * @param index: Index into bcn fault stats
5713 * @param bcnflt_stats: Pointer to hold bcn fault stats
5714 *
5715 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5716 */
5717QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
5718 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
5719{
5720 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5721
5722 if (wmi_handle->ops->extract_bcnflt_stats)
5723 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
5724 evt_buf, index, bcnflt_stats);
5725
5726 return QDF_STATUS_E_FAILURE;
5727}
5728
5729/**
5730 * wmi_extract_rtt_ev() - extract rtt event
5731 * @wmi_handle: wmi handle
5732 * @param evt_buf: Pointer to event buffer
5733 * @param ev: Pointer to hold rtt event
5734 * @param hdump: Pointer to hold hex dump
5735 * @param hdump_len: hex dump length
5736 *
5737 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5738 */
5739QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
5740 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
5741{
5742 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5743
5744 if (wmi_handle->ops->extract_rtt_ev)
5745 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
5746 evt_buf, ev, hdump, hdump_len);
5747
5748 return QDF_STATUS_E_FAILURE;
5749}
5750
5751/**
5752 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
5753 * @wmi_handle: wmi handle
5754 * @param evt_buf: pointer to event buffer
5755 * @param index: Index into extended peer stats
5756 * @param peer_extd_stats: Pointer to hold extended peer stats
5757 *
5758 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5759 */
5760QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
5761 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
5762{
5763 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5764
5765 if (wmi_handle->ops->extract_peer_extd_stats)
5766 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
5767 evt_buf, index, peer_extd_stats);
5768
5769 return QDF_STATUS_E_FAILURE;
5770}
5771
5772/**
5773 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
5774 * @wmi_handle: wmi handle
5775 * @param evt_buf: pointer to event buffer
5776 * @param wds_ev: Pointer to hold rtt error report
5777 *
5778 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5779 */
5780QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
5781 wmi_host_rtt_error_report_event *ev)
5782{
5783 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5784
5785 if (wmi_handle->ops->extract_rtt_error_report_ev)
5786 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
5787 evt_buf, ev);
5788
5789 return QDF_STATUS_E_FAILURE;
5790}
5791
5792/**
5793 * wmi_extract_chan_stats() - extract chan stats from event
5794 * @wmi_handle: wmi handle
5795 * @param evt_buf: pointer to event buffer
5796 * @param index: Index into chan stats
5797 * @param chanstats: Pointer to hold chan stats
5798 *
5799 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5800 */
5801QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
5802 uint32_t index, wmi_host_chan_stats *chan_stats)
5803{
5804 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5805
5806 if (wmi_handle->ops->extract_chan_stats)
5807 return wmi_handle->ops->extract_chan_stats(wmi_handle,
5808 evt_buf, index, chan_stats);
5809
5810 return QDF_STATUS_E_FAILURE;
5811}
5812
5813/**
5814 * wmi_extract_thermal_stats() - extract thermal stats from event
5815 * @wmi_handle: wmi handle
5816 * @param evt_buf: Pointer to event buffer
5817 * @param temp: Pointer to hold extracted temperature
5818 * @param level: Pointer to hold extracted level
5819 *
5820 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5821 */
5822QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
5823 uint32_t *temp, uint32_t *level)
5824{
5825 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5826
5827 if (wmi_handle->ops->extract_thermal_stats)
5828 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
5829 evt_buf, temp, level);
5830
5831 return QDF_STATUS_E_FAILURE;
5832}
5833
5834/**
5835 * wmi_extract_profile_ctx() - extract profile context from event
5836 * @wmi_handle: wmi handle
5837 * @param evt_buf: pointer to event buffer
5838 * @param profile_ctx: Pointer to hold profile context
5839 *
5840 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5841 */
5842QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
5843 wmi_host_wlan_profile_ctx_t *profile_ctx)
5844{
5845 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5846
5847 if (wmi_handle->ops->extract_profile_ctx)
5848 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
5849 evt_buf, profile_ctx);
5850
5851 return QDF_STATUS_E_FAILURE;
5852}
5853
5854/**
5855 * wmi_extract_thermal_level_stats() - extract thermal level stats from
5856 * event
5857 * @wmi_handle: wmi handle
5858 * @param evt_buf: pointer to event buffer
5859 * @param idx: Index to level stats
5860 * @param levelcount: Pointer to hold levelcount
5861 * @param dccount: Pointer to hold dccount
5862 *
5863 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5864 */
5865QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
5866 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
5867{
5868 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5869
5870 if (wmi_handle->ops->extract_thermal_level_stats)
5871 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
5872 evt_buf, idx, levelcount, dccount);
5873
5874 return QDF_STATUS_E_FAILURE;
5875}
5876
5877/**
5878 * wmi_extract_profile_data() - extract profile data from event
5879 * @wmi_handle: wmi handle
5880 * @param evt_buf: pointer to event buffer
5881 * @param profile_data: Pointer to hold profile data
5882 *
5883 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5884 */
5885QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf,
5886 wmi_host_wlan_profile_t *profile_data)
5887{
5888 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5889
5890 if (wmi_handle->ops->extract_profile_data)
5891 return wmi_handle->ops->extract_profile_data(wmi_handle,
5892 evt_buf, profile_data);
5893
5894 return QDF_STATUS_E_FAILURE;
5895}
5896
5897/**
5898 * wmi_extract_chan_info_event() - extract chan information from event
5899 * @wmi_handle: wmi handle
5900 * @param evt_buf: pointer to event buffer
5901 * @param chan_info: Pointer to hold chan information
5902 *
5903 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5904 */
5905QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
5906 wmi_host_chan_info_event *chan_info)
5907{
5908 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5909
5910 if (wmi_handle->ops->extract_chan_info_event)
5911 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
5912 evt_buf, chan_info);
5913
5914 return QDF_STATUS_E_FAILURE;
5915}
5916
5917/**
5918 * wmi_extract_channel_hopping_event() - extract channel hopping param
5919 * from event
5920 * @wmi_handle: wmi handle
5921 * @param evt_buf: pointer to event buffer
5922 * @param ch_hopping: Pointer to hold channel hopping param
5923 *
5924 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5925 */
5926QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
5927 wmi_host_pdev_channel_hopping_event *ch_hopping)
5928{
5929 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5930
5931 if (wmi->ops->extract_channel_hopping_event)
5932 return wmi->ops->extract_channel_hopping_event(wmi,
5933 evt_buf, ch_hopping);
5934
5935 return QDF_STATUS_E_FAILURE;
5936}
5937
5938/**
5939 * wmi_extract_bss_chan_info_event() - extract bss channel information
5940 * from event
5941 * @wmi_handle: wmi handle
5942 * @param evt_buf: pointer to event buffer
5943 * @param bss_chan_info: Pointer to hold bss channel information
5944 *
5945 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5946 */
5947QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
5948 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
5949{
5950 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5951
5952 if (wmi_handle->ops->extract_bss_chan_info_event)
5953 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
5954 evt_buf, bss_chan_info);
5955
5956 return QDF_STATUS_E_FAILURE;
5957}
5958
5959/**
5960 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
5961 * @wmi_handle: wmi handle
5962 * @param evt_buf: pointer to event buffer
5963 * @param inst_rssi_resp: Pointer to hold inst rssi response
5964 *
5965 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5966 */
5967QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
5968 wmi_host_inst_stats_resp *inst_rssi_resp)
5969{
5970 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5971
5972 if (wmi->ops->extract_inst_rssi_stats_event)
5973 return wmi->ops->extract_inst_rssi_stats_event(wmi,
5974 evt_buf, inst_rssi_resp);
5975
5976 return QDF_STATUS_E_FAILURE;
5977}
5978
5979/**
5980 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
5981 * from event
5982 * @wmi_handle: wmi handle
5983 * @param evt_buf: pointer to event buffer
5984 * @param index: Index into chan stats
5985 * @param ev: Pointer to hold data traffic control
5986 *
5987 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5988 */
5989QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
5990 wmi_host_tx_data_traffic_ctrl_event *ev)
5991{
5992 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5993
5994 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
5995 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
5996 evt_buf, ev);
5997
5998 return QDF_STATUS_E_FAILURE;
5999}
6000
6001/**
6002 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6003 * @wmi_handle: wmi handle
6004 * @param evt_buf: pointer to event buffer
6005 * @param index: Index into extended vdev stats
6006 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6007 *
6008 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6009 */
6010QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6011 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6012{
6013 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6014
6015 if (wmi_handle->ops->extract_vdev_extd_stats)
6016 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6017 evt_buf, index, vdev_extd_stats);
6018
6019 return QDF_STATUS_E_FAILURE;
6020}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306021
6022/**
6023 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6024 * @wmi_handle: wmi handle
6025 * @param: wmi power debug parameter
6026 *
6027 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6028 *
6029 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6030 */
6031QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6032 struct wmi_power_dbg_params *param)
6033{
6034 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6035
6036 if (wmi_handle->ops->send_power_dbg_cmd)
6037 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6038 param);
6039
6040 return QDF_STATUS_E_FAILURE;
6041}