blob: d126ddf7ac7b8ab6ec445d709615543a128527ad [file] [log] [blame]
Govind Singh5eb51532016-03-09 11:34:12 +05301/*
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08002 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
Govind Singh5eb51532016-03-09 11:34:12 +05303 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
Govind Singh5eb51532016-03-09 11:34:12 +053027#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053028#include "wmi_unified_param.h"
29
30/**
31 * wmi_unified_vdev_create_send() - send VDEV create command to fw
32 * @wmi_handle: wmi handle
33 * @param: pointer to hold vdev create parameter
34 * @macaddr: vdev mac address
35 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053036 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053037 */
Govind Singhb53420c2016-03-09 14:32:57 +053038QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053039 uint8_t macaddr[IEEE80211_ADDR_LEN],
40 struct vdev_create_params *param)
41{
42 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
43
44 if (wmi_handle->ops->send_vdev_create_cmd)
45 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
46 macaddr, param);
47
Govind Singhb53420c2016-03-09 14:32:57 +053048 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053049}
50
51/**
52 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
53 * @wmi_handle: wmi handle
54 * @if_id: vdev id
55 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053056 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053057 */
Govind Singhb53420c2016-03-09 14:32:57 +053058QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053059 uint8_t if_id)
60{
61 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
62
63 if (wmi_handle->ops->send_vdev_delete_cmd)
64 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
65 if_id);
66
Govind Singhb53420c2016-03-09 14:32:57 +053067 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053068}
69
70/**
71 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
72 * @wmi: wmi handle
73 * @vdev_id: vdev id
74 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053075 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053076 */
Govind Singhb53420c2016-03-09 14:32:57 +053077QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053078 uint8_t vdev_id)
79{
80 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
81
82 if (wmi_handle->ops->send_vdev_stop_cmd)
83 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
84 vdev_id);
85
Govind Singhb53420c2016-03-09 14:32:57 +053086 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053087}
88
89/**
90 * wmi_unified_vdev_down_send() - send vdev down command to fw
91 * @wmi: wmi handle
92 * @vdev_id: vdev id
93 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053094 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053095 */
Govind Singhb53420c2016-03-09 14:32:57 +053096QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +053097{
98 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
99
100 if (wmi_handle->ops->send_vdev_down_cmd)
101 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
102
Govind Singhb53420c2016-03-09 14:32:57 +0530103 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530104}
105
106/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530107 * wmi_unified_vdev_start_send() - send vdev start command to fw
108 * @wmi: wmi handle
109 * @vdev_id: vdev id
110 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530111 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530112 */
113QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
114 struct vdev_start_params *req)
115{
116 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
117
118 if (wmi_handle->ops->send_vdev_start_cmd)
119 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
120
121 return QDF_STATUS_E_FAILURE;
122}
123
124/**
125 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
126 * @wmi: wmi handle
127 * @restart_params: vdev restart params
128 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530129 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530130 */
131QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
132 struct hidden_ssid_vdev_restart_params *restart_params)
133{
134 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
135
136 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
137 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
138 wmi_handle, restart_params);
139
140 return QDF_STATUS_E_FAILURE;
141}
142
143/**
Govind Singh5eb51532016-03-09 11:34:12 +0530144 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
145 * @wmi: wmi handle
146 * @peer_addr: peer mac address
147 * @param: pointer to hold peer flush tid parameter
148 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530149 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530150 */
Govind Singhb53420c2016-03-09 14:32:57 +0530151QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530152 uint8_t peer_addr[IEEE80211_ADDR_LEN],
153 struct peer_flush_params *param)
154{
155 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
156
157 if (wmi_handle->ops->send_peer_flush_tids_cmd)
158 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
159 peer_addr, param);
160
Govind Singhb53420c2016-03-09 14:32:57 +0530161 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530162}
163
164/**
165 * wmi_unified_peer_delete_send() - send PEER delete command to fw
166 * @wmi: wmi handle
167 * @peer_addr: peer mac addr
168 * @vdev_id: vdev id
169 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530170 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530171 */
Govind Singhb53420c2016-03-09 14:32:57 +0530172QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530173 uint8_t
174 peer_addr[IEEE80211_ADDR_LEN],
175 uint8_t vdev_id)
176{
177 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
178
179 if (wmi_handle->ops->send_peer_delete_cmd)
180 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
181 peer_addr, vdev_id);
182
Govind Singhb53420c2016-03-09 14:32:57 +0530183 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530184}
185
186/**
187 * wmi_set_peer_param() - set peer parameter in fw
188 * @wmi_ctx: wmi handle
189 * @peer_addr: peer mac address
190 * @param : pointer to hold peer set parameter
191 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530192 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530193 */
Govind Singhb53420c2016-03-09 14:32:57 +0530194QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530195 uint8_t peer_addr[IEEE80211_ADDR_LEN],
196 struct peer_set_params *param)
197{
198 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
199
200 if (wmi_handle->ops->send_peer_param_cmd)
201 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
202 peer_addr, param);
203
Govind Singhb53420c2016-03-09 14:32:57 +0530204 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530205}
206
207/**
208 * wmi_unified_vdev_up_send() - send vdev up command in fw
209 * @wmi: wmi handle
210 * @bssid: bssid
211 * @vdev_up_params: pointer to hold vdev up parameter
212 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530213 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530214 */
Govind Singhb53420c2016-03-09 14:32:57 +0530215QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530216 uint8_t bssid[IEEE80211_ADDR_LEN],
217 struct vdev_up_params *params)
218{
219 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
220
221 if (wmi_handle->ops->send_vdev_up_cmd)
222 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
223 params);
224
Govind Singhb53420c2016-03-09 14:32:57 +0530225 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530226}
227
228/**
229 * wmi_unified_peer_create_send() - send peer create command to fw
230 * @wmi: wmi handle
231 * @peer_addr: peer mac address
232 * @peer_type: peer type
233 * @vdev_id: vdev id
234 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530235 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530236 */
Govind Singhb53420c2016-03-09 14:32:57 +0530237QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530238 struct peer_create_params *param)
239{
240 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
241
242 if (wmi_handle->ops->send_peer_create_cmd)
243 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
244
Govind Singhb53420c2016-03-09 14:32:57 +0530245 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530246}
247
Leo Changeee40872016-09-28 13:43:36 -0700248/**
249 * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
250 * setup command to fw
251 * @wmi: wmi handle
252 * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters
253 *
254 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
255 */
256QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
257 struct rx_reorder_queue_setup_params *param)
258{
259 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
260
261 if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd)
262 return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd(
263 wmi_handle, param);
264
265 return QDF_STATUS_E_FAILURE;
266}
267
268/**
269 * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
270 * remove command to fw
271 * @wmi: wmi handle
272 * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters
273 *
274 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
275 */
276QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
277 struct rx_reorder_queue_remove_params *param)
278{
279 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
280
281 if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd)
282 return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd(
283 wmi_handle, param);
284
285 return QDF_STATUS_E_FAILURE;
286}
287
Sathish Kumar01b7ac02016-10-04 14:28:00 +0530288#if defined(FEATURE_GREEN_AP) || defined(ATH_SUPPORT_GREEN_AP)
Govind Singh5eb51532016-03-09 11:34:12 +0530289/**
290 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
291 * @wmi_handle: wmi handle
292 * @value: value
293 * @mac_id: mac id to have radio context
294 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530295 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530296 */
Govind Singhb53420c2016-03-09 14:32:57 +0530297QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530298 uint32_t value, uint8_t mac_id)
299{
300 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
301
302 if (wmi_handle->ops->send_green_ap_ps_cmd)
303 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
304 mac_id);
305
Govind Singhb53420c2016-03-09 14:32:57 +0530306 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530307}
308#else
Govind Singhb53420c2016-03-09 14:32:57 +0530309QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530310 uint32_t value, uint8_t mac_id)
311{
312 return 0;
313}
Sathish Kumar01b7ac02016-10-04 14:28:00 +0530314#endif /* FEATURE_GREEN_AP or ATH_SUPPORT_GREEN_AP*/
Govind Singh5eb51532016-03-09 11:34:12 +0530315
316/**
317 * wmi_unified_pdev_utf_cmd() - send utf command to fw
318 * @wmi_handle: wmi handle
319 * @param: pointer to pdev_utf_params
320 * @mac_id: mac id to have radio context
321 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530322 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530323 */
Govind Singhb53420c2016-03-09 14:32:57 +0530324QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530325wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
326 struct pdev_utf_params *param,
327 uint8_t mac_id)
328{
329 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
330
331 if (wmi_handle->ops->send_pdev_utf_cmd)
332 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
333 mac_id);
334
Govind Singhb53420c2016-03-09 14:32:57 +0530335 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530336}
337
338/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530339 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530340 * @wmi_handle: wmi handle
341 * @param: pointer to pdev parameter
342 * @mac_id: radio context
343 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530344 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
345 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530346 */
Govind Singhb53420c2016-03-09 14:32:57 +0530347QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530348wmi_unified_pdev_param_send(void *wmi_hdl,
349 struct pdev_params *param,
350 uint8_t mac_id)
351{
352 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
353
354 if (wmi_handle->ops->send_pdev_param_cmd)
355 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
356 mac_id);
357
Govind Singhb53420c2016-03-09 14:32:57 +0530358 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530359}
360
361/**
362 * wmi_unified_suspend_send() - WMI suspend function
363 * @param wmi_handle : handle to WMI.
364 * @param param : pointer to hold suspend parameter
365 * @mac_id: radio context
366 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530367 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530368 */
Govind Singhb53420c2016-03-09 14:32:57 +0530369QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530370 struct suspend_params *param,
371 uint8_t mac_id)
372{
373 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
374
375 if (wmi_handle->ops->send_suspend_cmd)
376 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
377 mac_id);
378
Govind Singhb53420c2016-03-09 14:32:57 +0530379 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530380}
381
382/**
383 * wmi_unified_resume_send - WMI resume function
384 * @param wmi_handle : handle to WMI.
385 * @mac_id: radio context
386 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530387 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530388 */
Govind Singhb53420c2016-03-09 14:32:57 +0530389QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530390 uint8_t mac_id)
391{
392 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
393
394 if (wmi_handle->ops->send_resume_cmd)
395 return wmi_handle->ops->send_resume_cmd(wmi_handle,
396 mac_id);
397
Govind Singhb53420c2016-03-09 14:32:57 +0530398 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530399}
400
Will Huang422ac9a2017-11-17 13:19:16 +0800401#ifdef FEATURE_WLAN_D0WOW
402/**
403 * wmi_unified_d0wow_enable_send() - WMI d0 wow enable function
404 * @param wmi_handle: handle to WMI.
405 * @mac_id: radio context
406 *
407 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
408 */
409QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
410 uint8_t mac_id)
411{
412 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
413
414 if (wmi_handle->ops->send_d0wow_enable_cmd)
415 return wmi_handle->ops->send_d0wow_enable_cmd(
416 wmi_handle, mac_id);
417
418 return QDF_STATUS_E_FAILURE;
419}
420
421/**
422 * wmi_unified_d0wow_disable_send() - WMI d0 wow disable function
423 * @param wmi_handle: handle to WMI.
424 * @mac_id: radio context
425 *
426 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
427 */
428QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
429 uint8_t mac_id)
430{
431 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
432
433 if (wmi_handle->ops->send_d0wow_disable_cmd)
434 return wmi_handle->ops->send_d0wow_disable_cmd(
435 wmi_handle, mac_id);
436
437 return QDF_STATUS_E_FAILURE;
438}
439#endif
440
Govind Singh5eb51532016-03-09 11:34:12 +0530441/**
442 * wmi_unified_wow_enable_send() - WMI wow enable function
443 * @param wmi_handle : handle to WMI.
444 * @param param : pointer to hold wow enable parameter
445 * @mac_id: radio context
446 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530447 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530448 */
Govind Singhb53420c2016-03-09 14:32:57 +0530449QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530450 struct wow_cmd_params *param,
451 uint8_t mac_id)
452{
453 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
454
455 if (wmi_handle->ops->send_wow_enable_cmd)
456 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
457 mac_id);
458
Govind Singhb53420c2016-03-09 14:32:57 +0530459 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530460}
461
462/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530463 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
464 * @param wmi_hdl : handle to WMI.
465 *
466 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
467 */
468QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
469{
470 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
471
472 if (wmi_handle->ops->send_wow_wakeup_cmd)
473 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
474
475 return QDF_STATUS_E_FAILURE;
476}
477
478/**
479 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
480 * @param wmi_handle : handle to WMI.
481 * @param: pointer to wow wakeup event parameter structure
482 *
483 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
484 */
485QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
486 struct wow_add_wakeup_params *param)
487{
488 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
489
490 if (wmi->ops->send_wow_add_wakeup_event_cmd)
491 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
492 param);
493
494 return QDF_STATUS_E_FAILURE;
495}
496
497/**
498 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
499 * @param wmi_handle : handle to WMI.
500 * @param: pointer to wow wakeup pattern parameter structure
501 *
502 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
503 */
504QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
505 struct wow_add_wakeup_pattern_params *param)
506{
507 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
508
509 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
510 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
511
512 return QDF_STATUS_E_FAILURE;
513}
514
515/**
516 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
517 * @param wmi_handle : handle to WMI.
518 * @param: pointer to wow wakeup pattern parameter structure
519 *
520 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
521 */
522QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
523 struct wow_remove_wakeup_pattern_params *param)
524{
525 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
526
527 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
528 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
529
530 return QDF_STATUS_E_FAILURE;
531}
532
533/**
Govind Singh5eb51532016-03-09 11:34:12 +0530534 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
535 * @wma_ctx: wma context
536 * @peer_addr: peer mac address
537 * @param: pointer to ap_ps parameter structure
538 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530539 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530540 */
Govind Singhb53420c2016-03-09 14:32:57 +0530541QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530542 uint8_t *peer_addr,
543 struct ap_ps_params *param)
544{
545 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
546
547 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
548 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
549 peer_addr,
550 param);
551
Govind Singhb53420c2016-03-09 14:32:57 +0530552 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530553}
554
555/**
556 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
557 * @wma_ctx: wma context
558 * @peer_addr: peer mac address
559 * @param: pointer to sta_ps parameter structure
560 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530561 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530562 */
Govind Singhb53420c2016-03-09 14:32:57 +0530563QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530564 struct sta_ps_params *param)
565{
566 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
567
568 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
569 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
570 param);
571
Govind Singhb53420c2016-03-09 14:32:57 +0530572 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530573}
574
575/**
576 * wmi_crash_inject() - inject fw crash
577 * @wma_handle: wma handle
578 * @param: ponirt to crash inject paramter structure
579 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530580 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530581 */
Govind Singhb53420c2016-03-09 14:32:57 +0530582QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530583 struct crash_inject *param)
584{
585 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
586
587 if (wmi_handle->ops->send_crash_inject_cmd)
588 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
589 param);
590
Govind Singhb53420c2016-03-09 14:32:57 +0530591 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530592}
593
594/**
595 * wmi_unified_dbglog_cmd_send() - set debug log level
596 * @param wmi_handle : handle to WMI.
597 * @param param : pointer to hold dbglog level parameter
598 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530599 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530600 */
Govind Singhb53420c2016-03-09 14:32:57 +0530601QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530602wmi_unified_dbglog_cmd_send(void *wmi_hdl,
603 struct dbglog_params *dbglog_param)
604{
605 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
606
607 if (wmi_handle->ops->send_dbglog_cmd)
608 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
609 dbglog_param);
610
Govind Singhb53420c2016-03-09 14:32:57 +0530611 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530612}
613
614/**
615 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
616 * @param wmi_handle : handle to WMI.
617 * @param macaddr : MAC address
618 * @param param : pointer to hold vdev set parameter
619 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530620 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530621 */
Govind Singhb53420c2016-03-09 14:32:57 +0530622QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530623 struct vdev_set_params *param)
624{
625 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
626
627 if (wmi_handle->ops->send_vdev_set_param_cmd)
628 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
629 param);
630
Govind Singhb53420c2016-03-09 14:32:57 +0530631 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530632}
633
634/**
635 * wmi_unified_stats_request_send() - WMI request stats function
636 * @param wmi_handle : handle to WMI.
637 * @param macaddr : MAC address
638 * @param param : pointer to hold stats request parameter
639 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530640 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530641 */
Govind Singhb53420c2016-03-09 14:32:57 +0530642QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530643 uint8_t macaddr[IEEE80211_ADDR_LEN],
644 struct stats_request_params *param)
645{
646 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
647
648 if (wmi_handle->ops->send_stats_request_cmd)
649 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
650 macaddr, param);
651
Govind Singhb53420c2016-03-09 14:32:57 +0530652 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530653}
654
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530655#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530656/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530657 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530658 * @param wmi_handle : handle to WMI.
659 * @param macaddr : MAC address
660 * @param param : pointer to hold stats request parameter
661 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530662 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530663 */
Govind Singhb53420c2016-03-09 14:32:57 +0530664QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530665 uint8_t macaddr[IEEE80211_ADDR_LEN],
666 struct packet_enable_params *param)
667{
668 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
669
670 if (wmi_handle->ops->send_packet_log_enable_cmd)
671 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
672 macaddr, param);
673
Govind Singhb53420c2016-03-09 14:32:57 +0530674 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530675}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530676#else
677/**
678 * wmi_unified_packet_log_enable_send() - WMI request stats function
679 * @param wmi_handle : handle to WMI.
680 * @param macaddr : MAC address
681 * @param param : pointer to hold stats request parameter
682 *
683 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
684 */
685QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700686 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530687{
688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
689
690 if (wmi_handle->ops->send_packet_log_enable_cmd)
691 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700692 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530693
694 return QDF_STATUS_E_FAILURE;
695}
696
697#endif
698/**
699 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
700 * @param wmi_handle : handle to WMI.
701 * @param PKTLOG_EVENT : packet log event
702 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
703 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700704QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530705{
706 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
707
708 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700709 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
710 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530711
712 return QDF_STATUS_E_FAILURE;
713}
Govind Singh5eb51532016-03-09 11:34:12 +0530714
715/**
716 * wmi_unified_beacon_send_cmd() - WMI beacon send function
717 * @param wmi_handle : handle to WMI.
718 * @param macaddr : MAC address
719 * @param param : pointer to hold beacon send cmd parameter
720 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530721 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530722 */
Govind Singhb53420c2016-03-09 14:32:57 +0530723QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530724 struct beacon_params *param)
725{
726 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
727
728 if (wmi_handle->ops->send_beacon_send_cmd)
729 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530730 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530731
Govind Singhb53420c2016-03-09 14:32:57 +0530732 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530733}
734
735/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530736 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
737 * @param wmi_handle : handle to WMI.
738 * @param macaddr : MAC address
739 * @param param : pointer to hold beacon send cmd parameter
740 *
741 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
742 */
743QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
744 struct beacon_tmpl_params *param)
745{
746 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
747
748 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
749 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
750 param);
751
752 return QDF_STATUS_E_FAILURE;
753}
754/**
Govind Singh5eb51532016-03-09 11:34:12 +0530755 * wmi_unified_peer_assoc_send() - WMI peer assoc function
756 * @param wmi_handle : handle to WMI.
757 * @param macaddr : MAC address
758 * @param param : pointer to peer assoc parameter
759 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530760 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530761 */
Govind Singhb53420c2016-03-09 14:32:57 +0530762QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530763 struct peer_assoc_params *param)
764{
765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
766
767 if (wmi_handle->ops->send_peer_assoc_cmd)
768 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530769 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530770
Govind Singhb53420c2016-03-09 14:32:57 +0530771 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530772}
773
774/**
775 * wmi_unified_scan_start_cmd_send() - WMI scan start function
776 * @param wmi_handle : handle to WMI.
777 * @param macaddr : MAC address
778 * @param param : pointer to hold scan start cmd parameter
779 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530780 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530781 */
Govind Singhb53420c2016-03-09 14:32:57 +0530782QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530783 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530784{
785 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
786
787 if (wmi_handle->ops->send_scan_start_cmd)
788 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530789 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530790
Govind Singhb53420c2016-03-09 14:32:57 +0530791 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530792}
793
794/**
795 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
796 * @param wmi_handle : handle to WMI.
797 * @param macaddr : MAC address
798 * @param param : pointer to hold scan start cmd parameter
799 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530800 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530801 */
Govind Singhb53420c2016-03-09 14:32:57 +0530802QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530803 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530804{
805 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
806
807 if (wmi_handle->ops->send_scan_stop_cmd)
808 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530809 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530810
Govind Singhb53420c2016-03-09 14:32:57 +0530811 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530812}
813
814/**
815 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
816 * @param wmi_handle : handle to WMI.
817 * @param macaddr : MAC address
818 * @param param : pointer to hold scan channel list parameter
819 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530820 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530821 */
Govind Singhb53420c2016-03-09 14:32:57 +0530822QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530823 struct scan_chan_list_params *param)
824{
825 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
826
827 if (wmi_handle->ops->send_scan_chan_list_cmd)
828 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530829 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530830
Govind Singhb53420c2016-03-09 14:32:57 +0530831 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530832}
Govind Singh427ee5a2016-02-26 18:09:36 +0530833
834/**
835 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
836 * @wmi_hdl : handle to WMI.
837 * @param : pointer to hold mgmt cmd parameter
838 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530839 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530840 */
Govind Singhb53420c2016-03-09 14:32:57 +0530841QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530842 struct wmi_mgmt_params *param)
843{
844 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
845
846 if (wmi_handle->ops->send_mgmt_cmd)
847 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
848 param);
849
Govind Singhb53420c2016-03-09 14:32:57 +0530850 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530851}
852
853/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530854 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
855 * @wmi_hdl : handle to WMI.
856 * @param : pointer to hold offchan data cmd parameter
857 *
858 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
859 */
860QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
861 struct wmi_offchan_data_tx_params *param)
862{
863 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
864
865 if (wmi_handle->ops->send_offchan_data_tx_cmd)
866 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
867 param);
868
869 return QDF_STATUS_E_FAILURE;
870}
871
872/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530873 * wmi_unified_modem_power_state() - set modem power state to fw
874 * @wmi_hdl: wmi handle
875 * @param_value: parameter value
876 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530877 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530878 */
Govind Singhb53420c2016-03-09 14:32:57 +0530879QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530880 uint32_t param_value)
881{
882 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
883
884 if (wmi_handle->ops->send_modem_power_state_cmd)
885 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
886 param_value);
887
Govind Singhb53420c2016-03-09 14:32:57 +0530888 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530889}
890
891/**
892 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
893 * @wmi_hdl: wmi handle
894 * @vdev_id: vdev id
895 * @val: value
896 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530897 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530898 */
Govind Singhb53420c2016-03-09 14:32:57 +0530899QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530900 uint32_t vdev_id, uint8_t val)
901{
902 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
903
904 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
905 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
906 vdev_id, val);
907
Govind Singhb53420c2016-03-09 14:32:57 +0530908 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530909}
910
911/**
912 * wmi_set_mimops() - set MIMO powersave
913 * @wmi_hdl: wmi handle
914 * @vdev_id: vdev id
915 * @value: value
916 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530917 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530918 */
Govind Singhb53420c2016-03-09 14:32:57 +0530919QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530920{
921 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
922
923 if (wmi_handle->ops->send_set_mimops_cmd)
924 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
925 vdev_id, value);
926
Govind Singhb53420c2016-03-09 14:32:57 +0530927 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530928}
929
930/**
931 * wmi_set_smps_params() - set smps params
932 * @wmi_hdl: wmi handle
933 * @vdev_id: vdev id
934 * @value: value
935 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530936 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530937 */
Govind Singhb53420c2016-03-09 14:32:57 +0530938QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530939 int value)
940{
941 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
942
943 if (wmi_handle->ops->send_set_smps_params_cmd)
944 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
945 vdev_id, value);
946
Govind Singhb53420c2016-03-09 14:32:57 +0530947 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530948}
949
950
951/**
952 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
953 * @wmi_hdl: wmi handle
954 * @opps: p2p opp power save parameters
955 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530956 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530957 */
Govind Singhb53420c2016-03-09 14:32:57 +0530958QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530959 struct p2p_ps_params *oppps)
960{
961 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
962
963 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
964 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
965 oppps);
966
Govind Singhb53420c2016-03-09 14:32:57 +0530967 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530968}
969
970/**
971 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
972 * @wmi_hdl: wmi handle
973 * @noa: p2p power save parameters
974 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530975 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530976 */
Govind Singhb53420c2016-03-09 14:32:57 +0530977QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530978 struct p2p_ps_params *noa)
979{
980 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
981
982 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
983 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
984 noa);
985
Govind Singhb53420c2016-03-09 14:32:57 +0530986 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530987}
988
Wu Gaocd3a8512017-03-13 20:17:34 +0800989#ifdef CONVERGED_P2P_ENABLE
990/**
991 * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
992 * @wmi_hdl: wmi handle
993 * @param: p2p listen offload start parameters
994 *
995 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
996 */
997QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
998 struct p2p_lo_start *param)
999{
1000 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1001
1002 if (!wmi_handle) {
1003 WMI_LOGE("wmi handle is null");
1004 return QDF_STATUS_E_INVAL;
1005 }
1006
1007 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1008 return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
1009 param);
1010
1011 return QDF_STATUS_E_FAILURE;
1012}
1013
1014/**
1015 * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
1016 * @wmi_hdl: wmi handle
1017 * @vdev_id: vdev id
1018 *
1019 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1020 */
1021QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
1022{
1023 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1024
1025 if (!wmi_handle) {
1026 WMI_LOGE("wmi handle is null");
1027 return QDF_STATUS_E_INVAL;
1028 }
1029
1030 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1031 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
1032 vdev_id);
1033
1034 return QDF_STATUS_E_FAILURE;
1035}
1036#endif /* End of CONVERGED_P2P_ENABLE */
1037
Govind Singh427ee5a2016-02-26 18:09:36 +05301038/**
1039 * wmi_get_temperature() - get pdev temperature req
1040 * @wmi_hdl: wmi handle
1041 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301042 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301043 */
Govind Singhb53420c2016-03-09 14:32:57 +05301044QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +05301045{
1046 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1047
1048 if (wmi_handle->ops->send_get_temperature_cmd)
1049 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
1050
Govind Singhb53420c2016-03-09 14:32:57 +05301051 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301052}
1053
1054/**
1055 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1056 * @wmi_hdl: wmi handle
1057 * @end_set_sta_ps_mode_cmd: cmd paramter strcture
1058 *
1059 * This function sets the trigger
1060 * uapsd params such as service interval, delay interval
1061 * and suspend interval which will be used by the firmware
1062 * to send trigger frames periodically when there is no
1063 * traffic on the transmit side.
1064 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301066 */
Govind Singhb53420c2016-03-09 14:32:57 +05301067QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +05301068wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
1069 struct sta_uapsd_trig_params *param)
1070{
1071 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1072
1073 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
1074 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
1075 param);
1076
Govind Singhb53420c2016-03-09 14:32:57 +05301077 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301078}
Govind Singh2edc80f2016-03-01 15:30:53 +05301079
1080/**
1081 * wmi_unified_ocb_start_timing_advert() - start sending the timing advertisement
1082 * frames on a channel
1083 * @wmi_handle: pointer to the wmi handle
1084 * @timing_advert: pointer to the timing advertisement struct
1085 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301086 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301087 */
Govind Singhb53420c2016-03-09 14:32:57 +05301088QDF_STATUS wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301089 struct ocb_timing_advert_param *timing_advert)
1090{
1091 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1092
1093 if (wmi_handle->ops->send_ocb_start_timing_advert_cmd)
1094 return wmi_handle->ops->send_ocb_start_timing_advert_cmd(wmi_handle,
1095 timing_advert);
1096
Govind Singhb53420c2016-03-09 14:32:57 +05301097 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301098}
1099
1100/**
1101 * wmi_unified_ocb_stop_timing_advert() - stop sending the timing advertisement
1102 * frames on a channel
1103 * @wmi_handle: pointer to the wmi handle
1104 * @timing_advert: pointer to the timing advertisement struct
1105 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301106 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301107 */
Govind Singhb53420c2016-03-09 14:32:57 +05301108QDF_STATUS wmi_unified_ocb_stop_timing_advert(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301109 struct ocb_timing_advert_param *timing_advert)
1110{
1111 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1112
1113 if (wmi_handle->ops->send_ocb_stop_timing_advert_cmd)
1114 return wmi_handle->ops->send_ocb_stop_timing_advert_cmd(wmi_handle,
1115 timing_advert);
1116
Govind Singhb53420c2016-03-09 14:32:57 +05301117 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301118}
1119
1120/**
1121 * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val
1122 * @wmi_handle: pointer to the wmi handle
1123 * @vdev_id: vdev id
1124 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301125 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301126 */
Govind Singhb53420c2016-03-09 14:32:57 +05301127QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301128 struct ocb_utc_param *utc)
1129{
1130 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1131
1132 if (wmi_handle->ops->send_ocb_set_utc_time_cmd)
1133 return wmi_handle->ops->send_ocb_set_utc_time_cmd(wmi_handle,
1134 utc);
1135
Govind Singhb53420c2016-03-09 14:32:57 +05301136 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301137}
1138
1139/**
1140 * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val
1141 * @wmi_handle: pointer to the wmi handle
1142 * @vdev_id: vdev id
1143 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301144 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301145 */
Govind Singhb53420c2016-03-09 14:32:57 +05301146QDF_STATUS wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301147 uint8_t vdev_id)
1148{
1149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1150
1151 if (wmi_handle->ops->send_ocb_get_tsf_timer_cmd)
1152 return wmi_handle->ops->send_ocb_get_tsf_timer_cmd(wmi_handle,
1153 vdev_id);
1154
Govind Singhb53420c2016-03-09 14:32:57 +05301155 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301156}
1157
1158/**
1159 * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats
1160 * @wmi_handle: pointer to the wmi handle
1161 * @get_stats_param: pointer to the dcc stats
1162 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301163 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301164 */
Govind Singhb53420c2016-03-09 14:32:57 +05301165QDF_STATUS wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301166 struct dcc_get_stats_param *get_stats_param)
1167{
1168 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1169
1170 if (wmi_handle->ops->send_dcc_get_stats_cmd)
1171 return wmi_handle->ops->send_dcc_get_stats_cmd(wmi_handle,
1172 get_stats_param);
1173
Govind Singhb53420c2016-03-09 14:32:57 +05301174 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301175}
1176
1177/**
1178 * wmi_unified_dcc_clear_stats() - command to clear the DCC stats
1179 * @wmi_handle: pointer to the wmi handle
1180 * @clear_stats_param: parameters to the command
1181 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301182 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh2edc80f2016-03-01 15:30:53 +05301183 */
Govind Singhb53420c2016-03-09 14:32:57 +05301184QDF_STATUS wmi_unified_dcc_clear_stats(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301185 uint32_t vdev_id, uint32_t dcc_stats_bitmap)
1186{
1187 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1188
1189 if (wmi_handle->ops->send_dcc_clear_stats_cmd)
1190 return wmi_handle->ops->send_dcc_clear_stats_cmd(wmi_handle,
1191 vdev_id, dcc_stats_bitmap);
1192
Govind Singhb53420c2016-03-09 14:32:57 +05301193 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301194}
1195
1196/**
1197 * wmi_unified_dcc_update_ndl() - command to update the NDL data
1198 * @wmi_handle: pointer to the wmi handle
1199 * @update_ndl_param: pointer to the request parameters
1200 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301201 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301202 */
Govind Singhb53420c2016-03-09 14:32:57 +05301203QDF_STATUS wmi_unified_dcc_update_ndl(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301204 struct dcc_update_ndl_param *update_ndl_param)
1205{
1206 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1207
1208 if (wmi_handle->ops->send_dcc_update_ndl_cmd)
1209 return wmi_handle->ops->send_dcc_update_ndl_cmd(wmi_handle,
1210 update_ndl_param);
1211
Govind Singhb53420c2016-03-09 14:32:57 +05301212 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301213}
1214
1215/**
1216 * wmi_unified_ocb_set_config() - send the OCB config to the FW
1217 * @wmi_handle: pointer to the wmi handle
1218 * @config: the OCB configuration
1219 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301220 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singh2edc80f2016-03-01 15:30:53 +05301221 */
Govind Singhb53420c2016-03-09 14:32:57 +05301222QDF_STATUS wmi_unified_ocb_set_config(void *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301223 struct ocb_config_param *config, uint32_t *ch_mhz)
1224{
1225 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1226
1227 if (wmi_handle->ops->send_ocb_set_config_cmd)
1228 return wmi_handle->ops->send_ocb_set_config_cmd(wmi_handle,
1229 config, ch_mhz);
1230
Govind Singhb53420c2016-03-09 14:32:57 +05301231 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301232}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301233
1234/**
1235 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1236 * @wmi_handle: wmi handle
1237 * @mcc_adaptive_scheduler: enable/disable
1238 *
1239 * This function enable/disable mcc adaptive scheduler in fw.
1240 *
Govind Singhb53420c2016-03-09 14:32:57 +05301241 * Return: QDF_STATUS_SUCCESS for sucess or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301242 */
Govind Singhb53420c2016-03-09 14:32:57 +05301243QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001244 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1245 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301246{
1247 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1248
1249 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1250 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001251 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301252
Govind Singhb53420c2016-03-09 14:32:57 +05301253 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301254}
1255
1256/**
1257 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1258 * @wmi: wmi handle
1259 * @mcc_channel: mcc channel
1260 * @mcc_channel_time_latency: MCC channel time latency.
1261 *
1262 * Currently used to set time latency for an MCC vdev/adapter using operating
1263 * channel of it and channel number. The info is provided run time using
1264 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1265 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301266 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301267 */
Govind Singhb53420c2016-03-09 14:32:57 +05301268QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301269 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1270{
1271 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1272
1273 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1274 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1275 mcc_channel_freq,
1276 mcc_channel_time_latency);
1277
Govind Singhb53420c2016-03-09 14:32:57 +05301278 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301279}
1280
1281/**
1282 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1283 * @wmi: wmi handle
1284 * @adapter_1_chan_number: adapter 1 channel number
1285 * @adapter_1_quota: adapter 1 quota
1286 * @adapter_2_chan_number: adapter 2 channel number
1287 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301288 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301289 */
Govind Singhb53420c2016-03-09 14:32:57 +05301290QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301291 uint32_t adapter_1_chan_freq,
1292 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301293{
1294 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1295
1296 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1297 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1298 adapter_1_chan_freq,
1299 adapter_1_quota,
1300 adapter_2_chan_freq);
1301
Govind Singhb53420c2016-03-09 14:32:57 +05301302 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301303}
1304
1305/**
1306 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1307 * @wmi_handle: Pointer to wmi handle
1308 * @thermal_info: Thermal command information
1309 *
1310 * This function sends the thermal management command
1311 * to the firmware
1312 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301313 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301314 */
Govind Singhb53420c2016-03-09 14:32:57 +05301315QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301316 struct thermal_cmd_params *thermal_info)
1317{
1318 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1319
1320 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1321 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1322 thermal_info);
1323
Govind Singhb53420c2016-03-09 14:32:57 +05301324 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301325}
1326
1327
1328/**
1329 * wmi_unified_lro_config_cmd() - process the LRO config command
1330 * @wmi: Pointer to wmi handle
1331 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1332 *
1333 * This function sends down the LRO configuration parameters to
1334 * the firmware to enable LRO, sets the TCP flags and sets the
1335 * seed values for the toeplitz hash generation
1336 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301337 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301338 */
Govind Singhb53420c2016-03-09 14:32:57 +05301339QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301340 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1341{
1342 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1343
1344 if (wmi_handle->ops->send_lro_config_cmd)
1345 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1346 wmi_lro_cmd);
1347
Govind Singhb53420c2016-03-09 14:32:57 +05301348 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301349}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301350
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301351#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301352/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301353 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1354 * @wmi_hdl: Pointer to wmi handle
1355 * @rate_report_params: Pointer to peer rate report parameters
1356 *
1357 *
1358 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1359 */
1360QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1361 struct wmi_peer_rate_report_params *rate_report_params)
1362{
1363 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1364
1365 if (wmi_handle->ops->send_peer_rate_report_cmd)
1366 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1367 rate_report_params);
1368
1369 return QDF_STATUS_E_FAILURE;
1370}
1371
1372/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301373 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1374 * @wmi_hdl: wmi handle
1375 * @param: bcn ll cmd parameter
1376 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301377 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301378 */
Govind Singhb53420c2016-03-09 14:32:57 +05301379QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301380 wmi_bcn_send_from_host_cmd_fixed_param *param)
1381{
1382 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1383
1384 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1385 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1386 param);
1387
Govind Singhb53420c2016-03-09 14:32:57 +05301388 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301389}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301390#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301391
1392/**
1393 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1394 * @wmi_hdl: wmi handle
1395 * @vdev_id: vdev id
1396 * @max_retries: max retries
1397 * @retry_interval: retry interval
1398 * This function sets sta query related parameters in fw.
1399 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301400 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301401 */
1402
Govind Singhb53420c2016-03-09 14:32:57 +05301403QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301404 uint8_t vdev_id, uint32_t max_retries,
1405 uint32_t retry_interval)
1406{
1407 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1408
1409 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1410 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1411 vdev_id, max_retries,
1412 retry_interval);
1413
Govind Singhb53420c2016-03-09 14:32:57 +05301414 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301415}
1416
1417/**
1418 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1419 * @wmi_hdl: wmi handle
1420 * @params: sta keep alive parameter
1421 *
1422 * This function sets keep alive related parameters in fw.
1423 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301424 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301425 */
Govind Singhb53420c2016-03-09 14:32:57 +05301426QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301427 struct sta_params *params)
1428{
1429 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1430
1431 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1432 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1433 params);
1434
Govind Singhb53420c2016-03-09 14:32:57 +05301435 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301436}
1437
1438/**
1439 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1440 * @wmi_hdl: wmi handle
1441 * @if_id: vdev id
1442 * @gtx_info: GTX config params
1443 *
1444 * This function set GTX related params in firmware.
1445 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301446 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301447 */
Govind Singhb53420c2016-03-09 14:32:57 +05301448QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301449 struct wmi_gtx_config *gtx_info)
1450{
1451 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1452
1453 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1454 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1455 if_id, gtx_info);
1456
Govind Singhb53420c2016-03-09 14:32:57 +05301457 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301458}
1459
1460/**
1461 * wmi_unified_process_update_edca_param() - update EDCA params
1462 * @wmi_hdl: wmi handle
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301463 * @vdev_id: vdev id.
1464 * @wmm_vparams: edca parameters
Govind Singh4eacd2b2016-03-07 14:24:22 +05301465 *
1466 * This function updates EDCA parameters to the target
1467 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301468 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301469 */
Govind Singhb53420c2016-03-09 14:32:57 +05301470QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301471 uint8_t vdev_id,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301472 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC])
Govind Singh4eacd2b2016-03-07 14:24:22 +05301473{
1474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1475
1476 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1477 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301478 vdev_id, wmm_vparams);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301479
Govind Singhb53420c2016-03-09 14:32:57 +05301480 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301481}
1482
1483/**
1484 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1485 * @wmi_hdl: wmi handle
1486 * @vdev_id: vdev id
1487 * @probe_rsp_info: probe response info
1488 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301489 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301490 */
Govind Singhb53420c2016-03-09 14:32:57 +05301491QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301492 uint8_t vdev_id,
Krunal Soni89426862017-11-14 15:42:48 -08001493 struct wmi_probe_resp_params *probe_rsp_info)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301494{
1495 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1496
1497 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1498 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
Krunal Soni89426862017-11-14 15:42:48 -08001499 vdev_id, probe_rsp_info);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301500
Govind Singhb53420c2016-03-09 14:32:57 +05301501 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301502}
1503
1504/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301505 * wmi_unified_setup_install_key_cmd - send key to install to fw
1506 * @wmi_hdl: wmi handle
1507 * @key_params: key parameters
1508 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301509 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301510 */
1511QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1512 struct set_key_params *key_params)
1513{
1514 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1515
1516 if (wmi_handle->ops->send_setup_install_key_cmd)
1517 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1518 key_params);
1519
1520 return QDF_STATUS_E_FAILURE;
1521}
1522
1523/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301524 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1525 * @wma_handle: wma handle
1526 * @vdev_id: vdev id
1527 * @p2p_ie: p2p IE
1528 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301529 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301530 */
Govind Singhb53420c2016-03-09 14:32:57 +05301531QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301532 A_UINT32 vdev_id, uint8_t *p2p_ie)
1533{
1534 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1535
1536 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1537 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1538 vdev_id, p2p_ie);
1539
Govind Singhb53420c2016-03-09 14:32:57 +05301540 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301541}
1542
1543/**
1544 * wmi_unified_set_gateway_params_cmd() - set gateway parameters
1545 * @wmi_hdl: wmi handle
1546 * @req: gateway parameter update request structure
1547 *
1548 * This function reads the incoming @req and fill in the destination
1549 * WMI structure and sends down the gateway configs down to the firmware
1550 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301551 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1552 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301553 */
Govind Singhb53420c2016-03-09 14:32:57 +05301554QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301555 struct gateway_update_req_param *req)
1556{
1557 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1558
1559 if (wmi_handle->ops->send_set_gateway_params_cmd)
1560 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1561 req);
1562
Govind Singhb53420c2016-03-09 14:32:57 +05301563 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301564}
1565
1566/**
1567 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1568 * @wmi_hdl: wmi handle
1569 * @req: rssi monitoring request structure
1570 *
1571 * This function reads the incoming @req and fill in the destination
1572 * WMI structure and send down the rssi monitoring configs down to the firmware
1573 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301574 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1575 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301576 */
Govind Singhb53420c2016-03-09 14:32:57 +05301577QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301578 struct rssi_monitor_param *req)
1579{
1580 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1581
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301582 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301583 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1584 req);
1585
Govind Singhb53420c2016-03-09 14:32:57 +05301586 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301587}
1588
1589/**
1590 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1591 * @wmi_hdl: wmi handle
1592 * @psetoui: OUI parameters
1593 *
1594 * set scan probe OUI parameters in firmware
1595 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301596 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301597 */
Govind Singhb53420c2016-03-09 14:32:57 +05301598QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301599 struct scan_mac_oui *psetoui)
1600{
1601 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1602
1603 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1604 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1605 psetoui);
1606
Govind Singhb53420c2016-03-09 14:32:57 +05301607 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301608}
1609
1610/**
1611 * wmi_unified_reset_passpoint_network_list_cmd() - reset passpoint network list
1612 * @wmi_hdl: wmi handle
1613 * @req: passpoint network request structure
1614 *
1615 * This function sends down WMI command with network id set to wildcard id.
1616 * firmware shall clear all the config entries
1617 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301618 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301619 */
Govind Singhb53420c2016-03-09 14:32:57 +05301620QDF_STATUS wmi_unified_reset_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301621 struct wifi_passpoint_req_param *req)
1622{
1623 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1624
1625 if (wmi_handle->ops->send_reset_passpoint_network_list_cmd)
1626 return wmi_handle->ops->send_reset_passpoint_network_list_cmd(wmi_handle,
1627 req);
1628
Govind Singhb53420c2016-03-09 14:32:57 +05301629 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301630}
1631
1632/**
1633 * wmi_unified_set_passpoint_network_list_cmd() - set passpoint network list
1634 * @wmi_hdl: wmi handle
1635 * @req: passpoint network request structure
1636 *
1637 * This function reads the incoming @req and fill in the destination
1638 * WMI structure and send down the passpoint configs down to the firmware
1639 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301640 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301641 */
Govind Singhb53420c2016-03-09 14:32:57 +05301642QDF_STATUS wmi_unified_set_passpoint_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301643 struct wifi_passpoint_req_param *req)
1644{
1645 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1646
1647 if (wmi_handle->ops->send_set_passpoint_network_list_cmd)
1648 return wmi_handle->ops->send_set_passpoint_network_list_cmd(wmi_handle,
1649 req);
1650
Govind Singhb53420c2016-03-09 14:32:57 +05301651 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301652}
1653
1654/** wmi_unified_set_epno_network_list_cmd() - set epno network list
1655 * @wmi_hdl: wmi handle
1656 * @req: epno config params request structure
1657 *
1658 * This function reads the incoming epno config request structure
1659 * and constructs the WMI message to the firmware.
1660 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301661 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1662 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301663 */
Govind Singhb53420c2016-03-09 14:32:57 +05301664QDF_STATUS wmi_unified_set_epno_network_list_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301665 struct wifi_enhanched_pno_params *req)
1666{
1667 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1668
1669 if (wmi_handle->ops->send_set_epno_network_list_cmd)
1670 return wmi_handle->ops->send_set_epno_network_list_cmd(wmi_handle,
1671 req);
1672
Govind Singhb53420c2016-03-09 14:32:57 +05301673 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301674}
1675
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301676#ifdef CONFIG_MCL
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301677/**
1678 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1679 * @wmi_hdl: wmi handle
1680 * @scan_cmd_fp: scan related parameters
1681 * @roam_req: roam related parameters
1682 *
1683 * This function reads the incoming @roam_req and fill in the destination
1684 * WMI structure and send down the roam scan configs down to the firmware
1685 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301686 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301687 */
1688QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1689 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1690 struct roam_offload_scan_params *roam_req)
1691{
1692 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1693
1694 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1695 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1696 wmi_handle, scan_cmd_fp, roam_req);
1697
1698 return QDF_STATUS_E_FAILURE;
1699}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301700#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301701
1702/**
1703 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1704 * parameters
1705 * @wmi_hdl: wmi handle
1706 * @roam_req: roam rssi related parameters
1707 *
1708 * This function reads the incoming @roam_req and fill in the destination
1709 * WMI structure and send down the roam scan rssi configs down to the firmware
1710 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301711 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301712 */
1713QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1714 struct roam_offload_scan_rssi_params
1715 *roam_req)
1716{
1717 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1718
1719 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1720 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1721 wmi_handle, roam_req);
1722
1723 return QDF_STATUS_E_FAILURE;
1724}
1725
Varun Reddy Yeturu412601c2017-07-20 09:45:01 -07001726QDF_STATUS wmi_unified_roam_mawc_params_cmd(
1727 void *wmi_hdl, struct wmi_mawc_roam_params *params)
1728{
1729 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1730
1731 if (wmi_handle->ops->send_roam_mawc_params_cmd)
1732 return wmi_handle->ops->send_roam_mawc_params_cmd(
1733 wmi_handle, params);
1734
1735 return QDF_STATUS_E_FAILURE;
1736}
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301737/**
1738 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1739 * blacklist and preferred list
1740 * @wmi_hdl: wmi handle
1741 * @roam_req: roam scan lists related parameters
1742 *
1743 * This function reads the incoming @roam_req and fill in the destination
1744 * WMI structure and send down the different roam scan lists down to the fw
1745 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301746 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301747 */
1748QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1749 struct roam_scan_filter_params *roam_req)
1750{
1751 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1752
1753 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1754 return wmi_handle->ops->send_roam_scan_filter_cmd(
1755 wmi_handle, roam_req);
1756
1757 return QDF_STATUS_E_FAILURE;
1758}
1759
Govind Singh4eacd2b2016-03-07 14:24:22 +05301760/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1761 * @wmi_hdl: wmi handle
1762 * @ipa_offload: ipa offload control parameter
1763 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301764 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1765 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301766 */
Govind Singhb53420c2016-03-09 14:32:57 +05301767QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301768 struct ipa_offload_control_params *ipa_offload)
1769{
1770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1771
1772 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1773 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1774 ipa_offload);
1775
Govind Singhb53420c2016-03-09 14:32:57 +05301776 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301777}
1778
1779/**
1780 * wmi_unified_extscan_get_capabilities_cmd() - extscan get capabilities
1781 * @wmi_hdl: wmi handle
1782 * @pgetcapab: get capabilities params
1783 *
1784 * This function send request to fw to get extscan capabilities.
1785 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301786 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301787 */
Govind Singhb53420c2016-03-09 14:32:57 +05301788QDF_STATUS wmi_unified_extscan_get_capabilities_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301789 struct extscan_capabilities_params *pgetcapab)
1790{
1791 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1792
1793 if (wmi_handle->ops->send_extscan_get_capabilities_cmd)
1794 return wmi_handle->ops->send_extscan_get_capabilities_cmd(wmi_handle,
1795 pgetcapab);
1796
Govind Singhb53420c2016-03-09 14:32:57 +05301797 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301798}
1799
1800/**
1801 * wmi_unified_extscan_get_cached_results_cmd() - extscan get cached results
1802 * @wmi_hdl: wmi handle
1803 * @pcached_results: cached results parameters
1804 *
1805 * This function send request to fw to get cached results.
1806 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301808 */
Govind Singhb53420c2016-03-09 14:32:57 +05301809QDF_STATUS wmi_unified_extscan_get_cached_results_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301810 struct extscan_cached_result_params *pcached_results)
1811{
1812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1813
1814 if (wmi_handle->ops->send_extscan_get_cached_results_cmd)
1815 return wmi_handle->ops->send_extscan_get_cached_results_cmd(wmi_handle,
1816 pcached_results);
1817
Govind Singhb53420c2016-03-09 14:32:57 +05301818 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301819}
1820
1821/**
1822 * wmi_unified_extscan_stop_change_monitor_cmd() - send stop change monitor cmd
1823 * @wmi_hdl: wmi handle
1824 * @reset_req: Reset change request params
1825 *
1826 * This function sends stop change monitor request to fw.
1827 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301828 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301829 */
Govind Singhb53420c2016-03-09 14:32:57 +05301830QDF_STATUS wmi_unified_extscan_stop_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301831 struct extscan_capabilities_reset_params *reset_req)
1832{
1833 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1834
1835 if (wmi_handle->ops->send_extscan_stop_change_monitor_cmd)
1836 return wmi_handle->ops->send_extscan_stop_change_monitor_cmd(wmi_handle,
1837 reset_req);
1838
Govind Singhb53420c2016-03-09 14:32:57 +05301839 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301840}
1841
1842
1843
1844/**
1845 * wmi_unified_extscan_start_change_monitor_cmd() - start change monitor cmd
1846 * @wmi_hdl: wmi handle
1847 * @psigchange: change monitor request params
1848 *
1849 * This function sends start change monitor request to fw.
1850 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301851 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 */
Govind Singhb53420c2016-03-09 14:32:57 +05301853QDF_STATUS wmi_unified_extscan_start_change_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301854 struct extscan_set_sig_changereq_params *
1855 psigchange)
1856{
1857 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1858
1859 if (wmi_handle->ops->send_extscan_start_change_monitor_cmd)
1860 return wmi_handle->ops->send_extscan_start_change_monitor_cmd(wmi_handle,
1861 psigchange);
1862
Govind Singhb53420c2016-03-09 14:32:57 +05301863 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301864}
1865
1866/**
1867 * wmi_unified_extscan_stop_hotlist_monitor_cmd() - stop hotlist monitor
1868 * @wmi_hdl: wmi handle
1869 * @photlist_reset: hotlist reset params
1870 *
1871 * This function configures hotlist monitor to stop in fw.
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_extscan_stop_hotlist_monitor_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301876 struct extscan_bssid_hotlist_reset_params *photlist_reset)
1877{
1878 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1879
1880 if (wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd)
1881 return wmi_handle->ops->send_extscan_stop_hotlist_monitor_cmd(wmi_handle,
1882 photlist_reset);
1883
Govind Singhb53420c2016-03-09 14:32:57 +05301884 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301885}
1886
1887/**
1888 * wmi_unified_stop_extscan_cmd() - stop extscan command to fw.
1889 * @wmi_hdl: wmi handle
1890 * @pstopcmd: stop scan command request params
1891 *
1892 * This function sends stop extscan request to fw.
1893 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301894 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301895 */
Govind Singhb53420c2016-03-09 14:32:57 +05301896QDF_STATUS wmi_unified_stop_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301897 struct extscan_stop_req_params *pstopcmd)
1898{
1899 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1900
1901 if (wmi_handle->ops->send_stop_extscan_cmd)
1902 return wmi_handle->ops->send_stop_extscan_cmd(wmi_handle,
1903 pstopcmd);
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_start_extscan_cmd() - start extscan command to fw.
1910 * @wmi_hdl: wmi handle
1911 * @pstart: scan command request params
1912 *
1913 * This function sends start extscan request to fw.
1914 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301915 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh4eacd2b2016-03-07 14:24:22 +05301916 */
Govind Singhb53420c2016-03-09 14:32:57 +05301917QDF_STATUS wmi_unified_start_extscan_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301918 struct wifi_scan_cmd_req_params *pstart)
1919{
1920 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1921
1922 if (wmi_handle->ops->send_start_extscan_cmd)
1923 return wmi_handle->ops->send_start_extscan_cmd(wmi_handle,
1924 pstart);
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_plm_stop_cmd() - plm stop request
1931 * @wmi_hdl: wmi handle
1932 * @plm: plm request parameters
1933 *
1934 * This function request FW to stop PLM.
1935 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301936 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301937 */
Govind Singhb53420c2016-03-09 14:32:57 +05301938QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301939 const struct plm_req_params *plm)
1940{
1941 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1942
1943 if (wmi_handle->ops->send_plm_stop_cmd)
1944 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1945 plm);
1946
Govind Singhb53420c2016-03-09 14:32:57 +05301947 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301948}
1949
1950/**
1951 * wmi_unified_plm_start_cmd() - plm start request
1952 * @wmi_hdl: wmi handle
1953 * @plm: plm request parameters
1954 *
1955 * This function request FW to start PLM.
1956 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301957 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301958 */
Govind Singhb53420c2016-03-09 14:32:57 +05301959QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301960 const struct plm_req_params *plm,
1961 uint32_t *gchannel_list)
1962{
1963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1964
1965 if (wmi_handle->ops->send_plm_start_cmd)
1966 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1967 plm, gchannel_list);
1968
Govind Singhb53420c2016-03-09 14:32:57 +05301969 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301970}
1971
1972/**
1973 * send_pno_stop_cmd() - PNO stop request
1974 * @wmi_hdl: wmi handle
1975 * @vdev_id: vdev id
1976 *
1977 * This function request FW to stop ongoing PNO operation.
1978 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301979 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301980 */
Govind Singhb53420c2016-03-09 14:32:57 +05301981QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301982{
1983 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1984
1985 if (wmi_handle->ops->send_pno_stop_cmd)
1986 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1987 vdev_id);
1988
Govind Singhb53420c2016-03-09 14:32:57 +05301989 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301990}
1991
1992/**
1993 * wmi_unified_pno_start_cmd() - PNO start request
1994 * @wmi_hdl: wmi handle
1995 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301996 *
1997 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301998 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301999 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302000#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05302001QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05302002 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05302003{
2004 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2005
2006 if (wmi_handle->ops->send_pno_start_cmd)
2007 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05302008 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05302009
Govind Singhb53420c2016-03-09 14:32:57 +05302010 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302011}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302012#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05302013
Varun Reddy Yeturueac038b2017-07-24 16:11:22 -07002014/**
2015 * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
2016 * @wmi_hdl: wmi handle
2017 * @params: Configuration parameters
2018 *
2019 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2020 */
2021QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
2022 struct nlo_mawc_params *params)
2023{
2024 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2025
2026 if (wmi_handle->ops->send_nlo_mawc_cmd)
2027 return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
2028
2029 return QDF_STATUS_E_FAILURE;
2030}
2031
Govind Singh4eacd2b2016-03-07 14:24:22 +05302032/* wmi_unified_set_ric_req_cmd() - set ric request element
2033 * @wmi_hdl: wmi handle
2034 * @msg: message
2035 * @is_add_ts: is addts required
2036 *
2037 * This function sets ric request element for 11r roaming.
2038 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302039 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302040 */
Govind Singhb53420c2016-03-09 14:32:57 +05302041QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302042 uint8_t is_add_ts)
2043{
2044 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2045
2046 if (wmi_handle->ops->send_set_ric_req_cmd)
2047 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
2048 is_add_ts);
2049
Govind Singhb53420c2016-03-09 14:32:57 +05302050 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302051}
2052
2053/**
2054 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
2055 * @wmi_hdl: wmi handle
2056 * @clear_req: ll stats clear request command params
2057 * @addr: mac address
2058 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302059 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302060 */
Govind Singhb53420c2016-03-09 14:32:57 +05302061QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302062 const struct ll_stats_clear_params *clear_req,
2063 uint8_t addr[IEEE80211_ADDR_LEN])
2064{
2065 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2066
2067 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
2068 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
2069 clear_req, addr);
2070
Govind Singhb53420c2016-03-09 14:32:57 +05302071 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302072}
2073
2074/**
2075 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
2076 * @wmi_hdl:wmi handle
2077 * @get_req:ll stats get request command params
2078 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302079 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302080 */
Govind Singhb53420c2016-03-09 14:32:57 +05302081QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302082 const struct ll_stats_get_params *get_req,
2083 uint8_t addr[IEEE80211_ADDR_LEN])
2084{
2085 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2086
2087 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
2088 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
2089 get_req, addr);
2090
Govind Singhb53420c2016-03-09 14:32:57 +05302091 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302092}
2093
2094/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05302095 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
2096 * @wmi_hdl: wma handle
2097 * @vdev_id: vdev id
2098 *
2099 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2100 */
2101QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
2102 uint8_t vdev_id)
2103{
2104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2105
2106 if (wmi_handle->ops->send_congestion_cmd)
2107 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
2108 vdev_id);
2109
2110 return QDF_STATUS_E_FAILURE;
2111}
2112
2113/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05302114 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
2115 * @wmi_handle: wmi handle
2116 * @set_req: ll stats set request command params
2117 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302118 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05302119 */
Govind Singhb53420c2016-03-09 14:32:57 +05302120QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05302121 const struct ll_stats_set_params *set_req)
2122{
2123 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2124
2125 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
2126 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
2127 set_req);
2128
Govind Singhb53420c2016-03-09 14:32:57 +05302129 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05302130}
Govind Singh20c5dac2016-03-07 15:33:31 +05302131
2132/**
2133 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
2134 * @wmi_handle: wmi handle
2135 * @rssi_req: get RSSI request
2136 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302137 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302138 */
Govind Singhb53420c2016-03-09 14:32:57 +05302139QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302140{
2141 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2142
2143 if (wmi_handle->ops->send_snr_request_cmd)
2144 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
2145
Govind Singhb53420c2016-03-09 14:32:57 +05302146 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302147}
2148
2149/**
2150 * wmi_unified_snr_cmd() - get RSSI from fw
2151 * @wmi_handle: wmi handle
2152 * @vdev_id: vdev id
2153 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302154 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302155 */
Govind Singhb53420c2016-03-09 14:32:57 +05302156QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302157{
2158 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2159
2160 if (wmi_handle->ops->send_snr_cmd)
2161 return wmi_handle->ops->send_snr_cmd(wmi_handle,
2162 vdev_id);
2163
Govind Singhb53420c2016-03-09 14:32:57 +05302164 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302165}
2166
2167/**
2168 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
2169 * @wmi_handle: wmi handle
2170 * @link_status: get link params
2171 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302172 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302173 */
Govind Singhb53420c2016-03-09 14:32:57 +05302174QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302175 struct link_status_params *link_status)
2176{
2177 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2178
2179 if (wmi_handle->ops->send_link_status_req_cmd)
2180 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
2181 link_status);
2182
Govind Singhb53420c2016-03-09 14:32:57 +05302183 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302184}
2185
Govind Singh20c5dac2016-03-07 15:33:31 +05302186/**
2187 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
2188 * @wmi_handle: wmi handle
2189 * @ta_dhcp_ind: DHCP indication parameter
2190 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302191 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302192 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302193#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302194QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302195 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2196{
2197 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2198
2199 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2200 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2201 ta_dhcp_ind);
2202
Govind Singhb53420c2016-03-09 14:32:57 +05302203 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302204}
2205
2206/**
2207 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2208 * @wmi_handle: wmi handle
2209 * @pLinkSpeed: link speed info
2210 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302211 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302212 */
Govind Singhb53420c2016-03-09 14:32:57 +05302213QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302214 wmi_mac_addr peer_macaddr)
2215{
2216 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2217
2218 if (wmi_handle->ops->send_get_link_speed_cmd)
2219 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2220 peer_macaddr);
2221
Govind Singhb53420c2016-03-09 14:32:57 +05302222 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302223}
2224
2225/**
2226 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2227 * @wmi_handle: wmi handler
2228 * @egap_params: pointer to egap_params
2229 *
2230 * Return: 0 for success, otherwise appropriate error code
2231 */
Govind Singhb53420c2016-03-09 14:32:57 +05302232QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302233 wmi_ap_ps_egap_param_cmd_fixed_param *egap_params)
2234{
2235 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2236
2237 if (wmi_handle->ops->send_egap_conf_params_cmd)
2238 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2239 egap_params);
2240
Govind Singhb53420c2016-03-09 14:32:57 +05302241 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302242}
Paul Zhangd19abd82017-01-04 16:45:42 +08002243
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302244#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302245
2246/**
2247 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2248 * @wmi_handl: wmi handle
2249 * @cmd: Profiling command index
2250 * @value1: parameter1 value
2251 * @value2: parameter2 value
2252 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302253 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302254 */
Govind Singhb53420c2016-03-09 14:32:57 +05302255QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302256 uint32_t cmd, uint32_t value1, uint32_t value2)
2257{
2258 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2259
2260 if (wmi_handle->ops->send_fw_profiling_cmd)
2261 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2262 cmd, value1, value2);
2263
Govind Singhb53420c2016-03-09 14:32:57 +05302264 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302265}
2266
Govind Singh20c5dac2016-03-07 15:33:31 +05302267/**
Naveen Rawata5817e72017-10-26 18:50:19 -07002268 * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware
2269 * will wake up host after specified time is elapsed
2270 * @wmi_handle: wmi handle
2271 * @vdev_id: vdev id
2272 * @cookie: value to identify reason why host set up wake call.
2273 * @time: time in ms
2274 *
2275 * Return: QDF status
2276 */
2277QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
2278 uint32_t cookie, uint32_t time)
2279{
2280 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2281
2282 if (wmi_handle->ops->send_wow_timer_pattern_cmd)
2283 return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
2284 vdev_id, cookie, time);
2285
2286 return QDF_STATUS_E_FAILURE;
2287}
2288
2289/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302290 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2291 * @wmi_handle: wmi handle
2292 * @vdev_id: vdev id
2293 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302294 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302295 */
Govind Singhb53420c2016-03-09 14:32:57 +05302296QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302297{
2298 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2299
2300 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2301 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2302 vdev_id);
2303
Govind Singhb53420c2016-03-09 14:32:57 +05302304 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302305}
2306
Paul Zhang92ab8d32017-12-08 16:08:00 +08002307QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
2308 struct wlm_latency_level_param *param)
2309{
2310 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2311
2312 if (wmi_handle->ops->send_wlm_latency_level_cmd)
2313 return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
2314 param);
2315
2316 return QDF_STATUS_E_FAILURE;
2317}
2318
Govind Singh20c5dac2016-03-07 15:33:31 +05302319/**
2320 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2321 * @wmi_hdl: wmi handle
2322 * @vdev_id: vdev id
2323 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302324 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302325 */
Govind Singhb53420c2016-03-09 14:32:57 +05302326QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302327{
2328 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2329
2330 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2331 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2332 vdev_id);
2333
Govind Singhb53420c2016-03-09 14:32:57 +05302334 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302335}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002336
2337#ifdef WLAN_FEATURE_CIF_CFR
2338QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2339 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2340{
2341 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2342
2343 if (wmi_handle->ops->send_start_oem_data_cmd)
2344 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2345
2346 return QDF_STATUS_E_FAILURE;
2347}
2348#endif
2349
Sathish Kumarf396c722017-11-17 17:30:41 +05302350QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
2351 struct direct_buf_rx_cfg_req *cfg)
2352{
2353 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2354
2355 if (wmi_handle->ops->send_dbr_cfg_cmd)
2356 return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg);
2357
2358 return QDF_STATUS_E_FAILURE;
2359}
2360
Govind Singh20c5dac2016-03-07 15:33:31 +05302361/**
2362 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2363 * @wmi_handle: wmi handle
2364 * @startOemDataReq: start request params
2365 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302366 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302367 */
Govind Singhb53420c2016-03-09 14:32:57 +05302368QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002369 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302370 uint8_t *data)
2371{
2372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2373
2374 if (wmi_handle->ops->send_start_oem_data_cmd)
2375 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2376 data_len, data);
2377
Govind Singhb53420c2016-03-09 14:32:57 +05302378 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302379}
2380
2381/**
2382 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2383 * @wmi_handle: wmi handle
2384 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2385 *
2386 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2387 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2388 * to firmware based on phyerr filtering
2389 * offload status.
2390 *
2391 * Return: 1 success, 0 failure
2392 */
Govind Singhb53420c2016-03-09 14:32:57 +05302393QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302394wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2395 bool dfs_phyerr_filter_offload)
2396{
2397 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2398
2399 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2400 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2401 dfs_phyerr_filter_offload);
2402
Govind Singhb53420c2016-03-09 14:32:57 +05302403 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302404}
2405
2406#if !defined(REMOVE_PKT_LOG)
2407/**
2408 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2409 * @wmi_handle: wmi handle
2410 * @pktlog_event: pktlog event
2411 * @cmd_id: pktlog cmd id
2412 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302413 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302414 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302415#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302416QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302417 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302418 uint32_t cmd_id,
2419 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302420{
2421 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2422
2423 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2424 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302425 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302426
Govind Singhb53420c2016-03-09 14:32:57 +05302427 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302428}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302429#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302430#endif /* REMOVE_PKT_LOG */
2431
2432/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302433 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2434 * @wmi_handle: wmi handle
2435 * @ptrn_id: pattern id
2436 * @vdev_id: vdev id
2437 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302438 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302439 */
Govind Singhb53420c2016-03-09 14:32:57 +05302440QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302441 uint8_t vdev_id)
2442{
2443 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2444
2445 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2446 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2447 ptrn_id, vdev_id);
2448
Govind Singhb53420c2016-03-09 14:32:57 +05302449 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302450}
2451
2452/**
2453 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2454 * @wmi_handle: wmi handle
2455 *
2456 * Sends host wakeup indication to FW. On receiving this indication,
2457 * FW will come out of WOW.
2458 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302459 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302460 */
Govind Singhb53420c2016-03-09 14:32:57 +05302461QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302462{
2463 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2464
2465 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2466 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2467
Govind Singhb53420c2016-03-09 14:32:57 +05302468 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302469}
2470
2471/**
2472 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2473 * @wmi_handle: wmi handle
2474 * @msg: delts params
2475 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302476 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302477 */
Govind Singhb53420c2016-03-09 14:32:57 +05302478QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302479 uint8_t ac)
2480{
2481 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2482
2483 if (wmi_handle->ops->send_del_ts_cmd)
2484 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2485 vdev_id, ac);
2486
Govind Singhb53420c2016-03-09 14:32:57 +05302487 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302488}
2489
2490/**
2491 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2492 * @wmi_handle: handle to wmi
2493 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2494 *
Govind Singhb53420c2016-03-09 14:32:57 +05302495 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302496 * ADD_TS requestes to firmware in loop for all the ACs with
2497 * active flow.
2498 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302499 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302500 */
Govind Singhb53420c2016-03-09 14:32:57 +05302501QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302502 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2503{
2504 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2505
2506 if (wmi_handle->ops->send_aggr_qos_cmd)
2507 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2508 aggr_qos_rsp_msg);
2509
Govind Singhb53420c2016-03-09 14:32:57 +05302510 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302511}
2512
2513/**
2514 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2515 * @wmi_handle: wmi handle
2516 * @msg: ADDTS params
2517 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302518 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302519 */
Govind Singhb53420c2016-03-09 14:32:57 +05302520QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302521 struct add_ts_param *msg)
2522{
2523 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2524
2525 if (wmi_handle->ops->send_add_ts_cmd)
2526 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2527 msg);
2528
Govind Singhb53420c2016-03-09 14:32:57 +05302529 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302530}
2531
2532/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302533 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2534 * @wmi_handle: wmi handle
2535 * @pAddPeriodicTxPtrnParams: tx ptrn params
2536 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302537 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302538 */
Govind Singhb53420c2016-03-09 14:32:57 +05302539QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302540 struct periodic_tx_pattern *
2541 pAddPeriodicTxPtrnParams,
2542 uint8_t vdev_id)
2543{
2544 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2545
2546 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2547 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2548 pAddPeriodicTxPtrnParams,
2549 vdev_id);
2550
Govind Singhb53420c2016-03-09 14:32:57 +05302551 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302552}
2553
2554/**
2555 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2556 * @wmi_handle: wmi handle
2557 * @vdev_id: vdev id
2558 * @pattern_id: pattern id
2559 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302560 * Retrun: 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_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302563 uint8_t vdev_id,
2564 uint8_t pattern_id)
2565{
2566 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2567
2568 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2569 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2570 vdev_id,
2571 pattern_id);
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_stats_ext_req_cmd() - request ext stats from fw
2578 * @wmi_handle: wmi handle
2579 * @preq: stats ext params
2580 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302581 * Return: 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_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302584 struct stats_ext_params *preq)
2585{
2586 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2587
2588 if (wmi_handle->ops->send_stats_ext_req_cmd)
2589 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2590 preq);
2591
Govind Singhb53420c2016-03-09 14:32:57 +05302592 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302593}
2594
2595/**
2596 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2597 * @wmi_handle: wmi handle
2598 * @params: ext wow params
2599 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302600 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302601 */
Govind Singhb53420c2016-03-09 14:32:57 +05302602QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302603 struct ext_wow_params *params)
2604{
2605 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2606
2607 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2608 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2609 params);
2610
Govind Singhb53420c2016-03-09 14:32:57 +05302611 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302612}
2613
2614/**
2615 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2616 * @wmi_handle: wmi handle
2617 * @appType2Params: app type2 params
2618 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302619 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302620 */
Govind Singhb53420c2016-03-09 14:32:57 +05302621QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302622 struct app_type2_params *appType2Params)
2623{
2624 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2625
2626 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2627 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2628 appType2Params);
2629
Govind Singhb53420c2016-03-09 14:32:57 +05302630 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302631
2632}
2633
2634/**
2635 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2636 * @wmi_handle: wmi handle
2637 * @timer_val: auto shutdown timer value
2638 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302639 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302640 */
Govind Singhb53420c2016-03-09 14:32:57 +05302641QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302642 uint32_t timer_val)
2643{
2644 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2645
2646 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2647 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2648 timer_val);
2649
Govind Singhb53420c2016-03-09 14:32:57 +05302650 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302651}
2652
2653/**
2654 * wmi_unified_nan_req_cmd() - to send nan request to target
2655 * @wmi_handle: wmi handle
2656 * @nan_req: request data which will be non-null
2657 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302659 */
Govind Singhb53420c2016-03-09 14:32:57 +05302660QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302661 struct nan_req_params *nan_req)
2662{
2663 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2664
2665 if (wmi_handle->ops->send_nan_req_cmd)
2666 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2667 nan_req);
2668
Govind Singhb53420c2016-03-09 14:32:57 +05302669 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302670}
2671
2672/**
2673 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2674 * @wmi_handle: wmi handle
2675 * @pDhcpSrvOffloadInfo: DHCP server offload info
2676 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302677 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302678 */
Govind Singhb53420c2016-03-09 14:32:57 +05302679QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002680 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302681{
2682 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2683
2684 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2685 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002686 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05302687
Govind Singhb53420c2016-03-09 14:32:57 +05302688 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302689}
2690
2691/**
2692 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2693 * @wmi_handle: wmi handle
2694 * @ch_avoid_update_req: channel avoid update params
2695 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302696 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302697 */
Govind Singhb53420c2016-03-09 14:32:57 +05302698QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302699{
2700 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2701
2702 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2703 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2704
Govind Singhb53420c2016-03-09 14:32:57 +05302705 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302706}
2707
2708/**
2709 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2710 * @wmi_handle: wmi handle
2711 * @reg_dmn: reg domain
2712 * @regdmn2G: 2G reg domain
2713 * @regdmn5G: 5G reg domain
2714 * @ctl2G: 2G test limit
2715 * @ctl5G: 5G test limit
2716 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302717 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302718 */
Govind Singhb53420c2016-03-09 14:32:57 +05302719QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302720 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302721 uint16_t regdmn5G, uint8_t ctl2G,
2722 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302723{
2724 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2725
2726 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2727 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2728 reg_dmn, regdmn2G,
2729 regdmn5G, ctl2G,
2730 ctl5G);
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/**
2737 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2738 * @wmi_handle: wmi handle
2739 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2740 *
2741 * This function sets tdls off channel mode
2742 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302743 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2744 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302745 */
Govind Singhb53420c2016-03-09 14:32:57 +05302746QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302747 struct tdls_channel_switch_params *chan_switch_params)
2748{
2749 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2750
2751 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2752 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2753 chan_switch_params);
2754
Govind Singhb53420c2016-03-09 14:32:57 +05302755 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302756}
2757
2758/**
2759 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2760 * @wmi_handle: wmi handle
2761 * @pwmaTdlsparams: TDLS params
2762 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302763 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302764 */
Govind Singhb53420c2016-03-09 14:32:57 +05302765QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302766 void *tdls_param, uint8_t tdls_state)
2767{
2768 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2769
2770 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2771 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2772 tdls_param, tdls_state);
2773
Govind Singhb53420c2016-03-09 14:32:57 +05302774 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302775}
2776
2777/**
2778 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2779 * @wmi_handle: wmi handle
2780 * @peerStateParams: TDLS peer state params
2781 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302782 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302783 */
Govind Singhb53420c2016-03-09 14:32:57 +05302784QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302785 struct tdls_peer_state_params *peerStateParams,
2786 uint32_t *ch_mhz)
2787{
2788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2789
2790 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2791 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2792 peerStateParams, ch_mhz);
2793
Govind Singhb53420c2016-03-09 14:32:57 +05302794 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302795}
2796
2797/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302798 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2799 * @wmi_handle: Pointer to WMi handle
2800 * @ie_data: Pointer for ie data
2801 *
2802 * This function sends IE information to firmware
2803 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302804 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302805 *
2806 */
Govind Singhb53420c2016-03-09 14:32:57 +05302807QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302808 struct vdev_ie_info_param *ie_info)
2809{
2810 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2811
2812 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2813 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2814 ie_info);
2815
Govind Singhb53420c2016-03-09 14:32:57 +05302816 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302817}
Govind Singh9ddd5162016-03-07 16:30:32 +05302818
2819/**
2820 * wmi_unified_save_fw_version_cmd() - save fw version
2821 * @wmi_handle: pointer to wmi handle
2822 * @res_cfg: resource config
2823 * @num_mem_chunks: no of mem chunck
2824 * @mem_chunk: pointer to mem chunck structure
2825 *
2826 * This function sends IE information to firmware
2827 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302828 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302829 *
2830 */
Govind Singhb53420c2016-03-09 14:32:57 +05302831QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302832 void *evt_buf)
2833{
2834 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2835
2836 if (wmi_handle->ops->save_fw_version_cmd)
2837 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2838 evt_buf);
2839
Govind Singhb53420c2016-03-09 14:32:57 +05302840 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302841}
Govind Singha4836fd2016-03-07 16:45:38 +05302842
2843/**
2844 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2845 * @wmi_hdl: wmi handle
2846 * @custom_addr: base mac address
2847 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302848 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302849 */
Govind Singhb53420c2016-03-09 14:32:57 +05302850QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302851 uint8_t *custom_addr)
2852{
2853 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2854
2855 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2856 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2857 custom_addr);
2858
Govind Singhb53420c2016-03-09 14:32:57 +05302859 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302860}
2861
2862/**
2863 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2864 * @wmi_hdl: wmi handle
2865 * @event: Event received from FW
2866 * @len: Length of the event
2867 *
2868 * Enables the low frequency events and disables the high frequency
2869 * events. Bit 17 indicates if the event if low/high frequency.
2870 * 1 - high frequency, 0 - low frequency
2871 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302872 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302873 */
Govind Singhb53420c2016-03-09 14:32:57 +05302874QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302875 uint8_t *event,
2876 uint32_t len)
2877{
2878 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2879
2880 if (wmi_handle->ops->send_log_supported_evt_cmd)
2881 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2882 event, len);
2883
Govind Singhb53420c2016-03-09 14:32:57 +05302884 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302885}
2886
2887/**
2888 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2889 * @wmi_hdl: wmi handle
2890 * @start_log: Start logging related parameters
2891 *
2892 * Send the command to the FW based on which specific logging of diag
2893 * event/log id can be started/stopped
2894 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302895 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302896 */
Govind Singhb53420c2016-03-09 14:32:57 +05302897QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302898 struct wmi_wifi_start_log *start_log)
2899{
2900 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2901
2902 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2903 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2904 start_log);
2905
Govind Singhb53420c2016-03-09 14:32:57 +05302906 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302907}
2908
2909/**
2910 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2911 * @wmi_hdl: WMI handle
2912 *
2913 * This function is used to send the flush command to the FW,
2914 * that will flush the fw logs that are residue in the FW
2915 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302916 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302917 */
Govind Singhb53420c2016-03-09 14:32:57 +05302918QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302919{
2920 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2921
2922 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2923 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2924
Govind Singhb53420c2016-03-09 14:32:57 +05302925 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302926}
2927
2928/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302929 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302930 * @wmi_hdl: wmi handle
2931 * @msg: PCL structure containing the PCL and the number of channels
2932 *
2933 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2934 * firmware. The DBS Manager is the consumer of this information in the WLAN
2935 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2936 * to migrate to a new channel without host driver involvement. An example of
2937 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2938 * manage the channel selection without firmware involvement.
2939 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302940 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302941 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302942QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2943 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302944{
2945 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2946
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302947 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2948 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302949
Govind Singhb53420c2016-03-09 14:32:57 +05302950 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302951}
2952
2953/**
2954 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2955 * @wmi_hdl: wmi handle
2956 * @msg: Structure containing the following parameters
2957 *
2958 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2959 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2960 *
2961 * Provides notification to the WLAN firmware that host driver is requesting a
2962 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2963 * configurations that include the Dual Band Simultaneous (DBS) feature.
2964 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302965 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302966 */
Govind Singhb53420c2016-03-09 14:32:57 +05302967QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302968 uint32_t hw_mode_index)
2969{
2970 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2971
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302972 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2973 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302974 hw_mode_index);
2975
Govind Singhb53420c2016-03-09 14:32:57 +05302976 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302977}
2978
2979/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302980 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302981 * @wmi_hdl: wmi handle
2982 * @msg: Dual MAC config parameters
2983 *
2984 * Configures WLAN firmware with the dual MAC features
2985 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302986 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302987 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302988QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302989 struct wmi_dual_mac_config *msg)
2990{
2991 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2992
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302993 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2994 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302995 msg);
2996
Govind Singhb53420c2016-03-09 14:32:57 +05302997 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302998}
2999
Govind Singha4836fd2016-03-07 16:45:38 +05303000/**
3001 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
3002 * @wmi_hdl: wmi handle
3003 * @flashing: flashing request
3004 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303005 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303006 */
Govind Singhb53420c2016-03-09 14:32:57 +05303007QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303008 struct flashing_req_params *flashing)
3009{
3010 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3011
3012 if (wmi_handle->ops->send_set_led_flashing_cmd)
3013 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
3014 flashing);
3015
Govind Singhb53420c2016-03-09 14:32:57 +05303016 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303017}
3018
3019/**
3020 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
3021 * @wmi_hdl: wmi handle
3022 * @appType1Params: app type1 params
3023 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303024 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303025 */
Govind Singhb53420c2016-03-09 14:32:57 +05303026QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303027 struct app_type1_params *app_type1_params)
3028{
3029 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3030
3031 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
3032 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
3033 app_type1_params);
3034
Govind Singhb53420c2016-03-09 14:32:57 +05303035 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303036}
3037
3038/**
3039 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
3040 * @wmi_hdl: wmi handle
3041 * @request: SSID hotlist set request
3042 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303043 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303044 */
Govind Singhb53420c2016-03-09 14:32:57 +05303045QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05303046wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
3047 struct ssid_hotlist_request_params *request)
3048{
3049 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3050
3051 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
3052 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
3053 request);
3054
Govind Singhb53420c2016-03-09 14:32:57 +05303055 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303056}
3057
3058/**
3059 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
3060 * @wmi_hdl: wmi handle
3061 * @vdev_id: vdev id
3062 *
3063 * This function sends roam synch complete event to fw.
3064 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303066 */
Govind Singhb53420c2016-03-09 14:32:57 +05303067QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303068 uint8_t vdev_id)
3069{
3070 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3071
3072 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
3073 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
3074 vdev_id);
3075
Govind Singhb53420c2016-03-09 14:32:57 +05303076 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303077}
3078
3079/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05303080 * wmi_unified_fw_test_cmd() - send fw test command to fw.
3081 * @wmi_hdl: wmi handle
3082 * @wmi_fwtest: fw test command
3083 *
3084 * This function sends fw test command to fw.
3085 *
3086 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3087 */
3088QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
3089 struct set_fwtest_params *wmi_fwtest)
3090{
3091 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3092
3093 if (wmi_handle->ops->send_fw_test_cmd)
3094 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
3095 wmi_fwtest);
3096
3097 return QDF_STATUS_E_FAILURE;
3098
3099}
3100
3101/**
Govind Singha4836fd2016-03-07 16:45:38 +05303102 * wmi_unified_unit_test_cmd() - send unit test command to fw.
3103 * @wmi_hdl: wmi handle
3104 * @wmi_utest: unit test command
3105 *
3106 * This function send unit test command to fw.
3107 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303108 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303109 */
Govind Singhb53420c2016-03-09 14:32:57 +05303110QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303111 struct wmi_unit_test_cmd *wmi_utest)
3112{
3113 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3114
3115 if (wmi_handle->ops->send_unit_test_cmd)
3116 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
3117 wmi_utest);
3118
Govind Singhb53420c2016-03-09 14:32:57 +05303119 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303120}
3121
3122/**
3123 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
3124 * @wmi_hdl: wmi handle
3125 * @roaminvoke: roam invoke command
3126 *
3127 * Send roam invoke command to fw for fastreassoc.
3128 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303129 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303130 */
Govind Singhb53420c2016-03-09 14:32:57 +05303131QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303132 struct wmi_roam_invoke_cmd *roaminvoke,
3133 uint32_t ch_hz)
3134{
3135 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3136
3137 if (wmi_handle->ops->send_roam_invoke_cmd)
3138 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
3139 roaminvoke, ch_hz);
3140
Govind Singhb53420c2016-03-09 14:32:57 +05303141 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303142}
3143
3144/**
3145 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
3146 * @wmi_hdl: wmi handle
3147 * @command: command
3148 * @vdev_id: vdev id
3149 *
3150 * This function set roam offload command to fw.
3151 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303152 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303153 */
Govind Singhb53420c2016-03-09 14:32:57 +05303154QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303155 uint32_t command, uint32_t vdev_id)
3156{
3157 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3158
3159 if (wmi_handle->ops->send_roam_scan_offload_cmd)
3160 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
3161 command, vdev_id);
3162
Govind Singhb53420c2016-03-09 14:32:57 +05303163 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303164}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05303165#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05303166/**
3167 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
3168 * @wmi_hdl: wmi handle
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303169 * @ap_profile: ap profile params
Govind Singha4836fd2016-03-07 16:45:38 +05303170 *
3171 * Send WMI_ROAM_AP_PROFILE to firmware
3172 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303173 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303174 */
Govind Singhb53420c2016-03-09 14:32:57 +05303175QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303176 struct ap_profile_params *ap_profile)
Govind Singha4836fd2016-03-07 16:45:38 +05303177{
3178 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3179
3180 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303181 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
3182 wmi_handle, ap_profile);
Govind Singha4836fd2016-03-07 16:45:38 +05303183
Govind Singhb53420c2016-03-09 14:32:57 +05303184 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303185}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303186#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303187/**
3188 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3189 * @wmi_handle: wmi handle
3190 * @scan_period: scan period
3191 * @scan_age: scan age
3192 * @vdev_id: vdev id
3193 *
3194 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3195 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303196 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303197 */
Govind Singhb53420c2016-03-09 14:32:57 +05303198QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303199 uint32_t scan_period,
3200 uint32_t scan_age,
3201 uint32_t vdev_id)
3202{
3203 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3204
3205 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3206 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3207 scan_period, scan_age, vdev_id);
3208
Govind Singhb53420c2016-03-09 14:32:57 +05303209 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303210}
3211
3212/**
3213 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3214 * @wmi_handle: wmi handle
3215 * @chan_count: channel count
3216 * @chan_list: channel list
3217 * @list_type: list type
3218 * @vdev_id: vdev id
3219 *
3220 * Set roam offload channel list.
3221 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303222 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303223 */
Govind Singhb53420c2016-03-09 14:32:57 +05303224QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303225 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003226 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303227 uint8_t list_type, uint32_t vdev_id)
3228{
3229 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3230
3231 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3232 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3233 chan_count, chan_list,
3234 list_type, vdev_id);
3235
Govind Singhb53420c2016-03-09 14:32:57 +05303236 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303237}
3238
3239/**
3240 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3241 * @wmi_hdl: wmi handle
3242 * @rssi_change_thresh: RSSI Change threshold
3243 * @bcn_rssi_weight: beacon RSSI weight
3244 * @vdev_id: vdev id
3245 *
3246 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3247 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303248 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303249 */
Govind Singhb53420c2016-03-09 14:32:57 +05303250QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303251 uint32_t vdev_id,
3252 int32_t rssi_change_thresh,
3253 uint32_t bcn_rssi_weight,
3254 uint32_t hirssi_delay_btw_scans)
3255{
3256 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3257
3258 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3259 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3260 vdev_id, rssi_change_thresh,
3261 bcn_rssi_weight, hirssi_delay_btw_scans);
3262
Govind Singhb53420c2016-03-09 14:32:57 +05303263 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303264}
3265
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303266QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3267 struct wmi_per_roam_config_req *req_buf)
3268{
3269 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3270
3271 if (wmi_handle->ops->send_per_roam_config_cmd)
3272 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3273 req_buf);
3274
3275 return QDF_STATUS_E_FAILURE;
3276}
3277
Govind Singha4836fd2016-03-07 16:45:38 +05303278/**
Anurag Chouhan97f00422017-09-11 14:56:30 +05303279 * wmi_unified_set_arp_stats_req() - set arp stats request
3280 * @wmi_hdl: wmi handle
3281 * @req_buf: pointer to set_arp_stats
3282 *
3283 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3284 */
3285QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
3286 struct set_arp_stats *req_buf)
3287{
3288 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3289
3290 if (wmi_handle->ops->send_set_arp_stats_req_cmd)
3291 return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
3292 req_buf);
3293
3294 return QDF_STATUS_E_FAILURE;
3295}
3296
3297/**
3298 * wmi_unified_get_arp_stats_req() - get arp stats request
3299 * @wmi_hdl: wmi handle
3300 * @req_buf: pointer to get_arp_stats
3301 *
3302 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3303 */
3304QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
3305 struct get_arp_stats *req_buf)
3306{
3307 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3308
3309 if (wmi_handle->ops->send_get_arp_stats_req_cmd)
3310 return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
3311 req_buf);
3312
3313 return QDF_STATUS_E_FAILURE;
3314}
3315
Vignesh Viswanathan81bde492017-09-25 14:36:38 +05303316QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
3317 struct wmi_unified_pmk_cache *req_buf)
3318{
3319 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3320
3321 if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
3322 return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
3323 req_buf);
3324
3325 return QDF_STATUS_E_FAILURE;
3326}
3327
3328#if defined(WLAN_FEATURE_FILS_SK)
3329QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
3330 struct hlp_params *req_buf)
3331{
3332 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3333
3334 if (wmi_handle->ops->send_roam_scan_hlp_cmd)
3335 return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
3336 req_buf);
3337
3338 return QDF_STATUS_E_FAILURE;
3339}
3340#endif
3341
Anurag Chouhan97f00422017-09-11 14:56:30 +05303342/**
Govind Singha4836fd2016-03-07 16:45:38 +05303343 * wmi_unified_get_buf_extscan_hotlist_cmd() - prepare hotlist command
3344 * @wmi_hdl: wmi handle
3345 * @photlist: hotlist command params
3346 * @buf_len: buffer length
3347 *
3348 * This function fills individual elements for hotlist request and
3349 * TLV for bssid entries
3350 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303351 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singha4836fd2016-03-07 16:45:38 +05303352 */
Govind Singhb53420c2016-03-09 14:32:57 +05303353QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303354 struct ext_scan_setbssi_hotlist_params *
3355 photlist, int *buf_len)
3356{
3357 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3358
3359 if (wmi_handle->ops->send_get_buf_extscan_hotlist_cmd)
3360 return wmi_handle->ops->send_get_buf_extscan_hotlist_cmd(wmi_handle,
3361 photlist, buf_len);
3362
Govind Singhb53420c2016-03-09 14:32:57 +05303363 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303364}
3365
Dustin Brown4423f632017-01-13 15:24:07 -08003366QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl,
3367 uint8_t vdev_id,
3368 enum wmi_host_active_bpf_mode ucast_mode,
3369 enum wmi_host_active_bpf_mode mcast_bcast_mode)
3370{
3371 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3372
3373 if (!wmi->ops->send_set_active_bpf_mode_cmd) {
Srinivas Girigowda61e086f2017-06-19 17:20:20 -07003374 WMI_LOGD("send_set_active_bpf_mode_cmd op is NULL");
Dustin Brown4423f632017-01-13 15:24:07 -08003375 return QDF_STATUS_E_FAILURE;
3376 }
3377
3378 return wmi->ops->send_set_active_bpf_mode_cmd(wmi, vdev_id,
3379 ucast_mode,
3380 mcast_bcast_mode);
3381}
3382
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303383/**
3384 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3385 * @param wmi_handle : handle to WMI.
3386 * @param param : tpc config param
3387 *
3388 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3389 */
3390QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3391 uint32_t param)
3392{
3393 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3394
3395 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3396 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3397 param);
3398
3399 return QDF_STATUS_E_FAILURE;
3400}
3401
3402/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303403 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3404 * @param wmi_handle : handle to WMI.
3405 * @param param : pointer to set bwf param
3406 *
3407 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3408 */
3409QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3410 struct set_bwf_params *param)
3411{
3412 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3413
3414 if (wmi_handle->ops->send_set_bwf_cmd)
3415 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3416
3417 return QDF_STATUS_E_FAILURE;
3418}
3419
3420/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303421 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3422 * @param wmi_handle : handle to WMI.
3423 * @param param : pointer to set atf param
3424 *
3425 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3426 */
3427QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3428 struct set_atf_params *param)
3429{
3430 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3431
3432 if (wmi_handle->ops->send_set_atf_cmd)
3433 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3434
3435 return QDF_STATUS_E_FAILURE;
3436}
3437
3438/**
3439 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3440 * @param wmi_handle : handle to WMI.
3441 * @param param : pointer to hold pdev fips param
3442 *
3443 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3444 */
3445QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3446 struct fips_params *param)
3447{
3448 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3449
3450 if (wmi_handle->ops->send_pdev_fips_cmd)
3451 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3452
3453 return QDF_STATUS_E_FAILURE;
3454}
3455
3456/**
3457 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3458 * @param wmi_handle : handle to WMI.
3459 * @param param : pointer to hold wlan profile param
3460 *
3461 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3462 */
3463QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3464 struct wlan_profile_params *param)
3465{
3466 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3467
3468 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3469 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3470 param);
3471
3472 return QDF_STATUS_E_FAILURE;
3473}
3474
3475/**
3476 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3477 * @param wmi_handle : handle to WMI.
3478 * @param param : pointer to hold wlan profile param
3479 *
3480 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3481 */
3482QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3483 struct wlan_profile_params *param)
3484{
3485 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3486
3487 if (wmi->ops->send_wlan_profile_trigger_cmd)
3488 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3489 param);
3490
3491 return QDF_STATUS_E_FAILURE;
3492}
3493
3494/**
3495 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3496 * @param wmi_handle : handle to WMI.
3497 * @param param : pointer to hold channel param
3498 *
3499 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3500 */
3501QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3502 struct channel_param *param)
3503{
3504 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3505
3506 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3507 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3508 param);
3509
3510 return QDF_STATUS_E_FAILURE;
3511}
3512
3513/**
3514 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3515 * @param wmi_handle : handle to WMI.
3516 * @param param : pointer to hold channel param
3517 *
3518 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3519 */
3520QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3521 struct ht_ie_params *param)
3522{
3523 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3524
3525 if (wmi_handle->ops->send_set_ht_ie_cmd)
3526 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3527
3528 return QDF_STATUS_E_FAILURE;
3529}
3530
3531/**
3532 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3533 * @param wmi_handle : handle to WMI.
3534 * @param param : pointer to hold channel param
3535 *
3536 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3537 */
3538QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3539 struct vht_ie_params *param)
3540{
3541 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3542
3543 if (wmi_handle->ops->send_set_vht_ie_cmd)
3544 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3545
3546 return QDF_STATUS_E_FAILURE;
3547}
3548
3549/**
3550 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3551 * @param wmi_handle : handle to WMI.
3552 * @param param : pointer to hold wmm param
3553 *
3554 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3555 */
3556QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3557 struct wmm_update_params *param)
3558{
3559 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3560
3561 if (wmi_handle->ops->send_wmm_update_cmd)
3562 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3563
3564 return QDF_STATUS_E_FAILURE;
3565}
3566
3567/**
3568 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3569 * @param wmi_handle : handle to WMI.
3570 * @param param : pointer to hold ant switch tbl param
3571 *
3572 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3573 */
3574QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3575 struct ant_switch_tbl_params *param)
3576{
3577 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3578
3579 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3580 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3581 param);
3582
3583 return QDF_STATUS_E_FAILURE;
3584}
3585
3586/**
3587 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3588 * @param wmi_handle : handle to WMI.
3589 * @param param : pointer to hold ratepwr table param
3590 *
3591 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3592 */
3593QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3594 struct ratepwr_table_params *param)
3595{
3596 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3597
3598 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3599 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3600 param);
3601
3602 return QDF_STATUS_E_FAILURE;
3603}
3604
3605/**
3606 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3607 * @param wmi_handle : handle to WMI.
3608 *
3609 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3610 */
3611QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3612{
3613 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3614
3615 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3616 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3617
3618 return QDF_STATUS_E_FAILURE;
3619}
3620
3621/**
3622 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3623 * @param wmi_handle : handle to WMI.
3624 * @param param : pointer to hold ctl table param
3625 *
3626 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3627 */
3628QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3629 struct ctl_table_params *param)
3630{
3631 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3632
3633 if (wmi_handle->ops->send_set_ctl_table_cmd)
3634 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3635 param);
3636
3637 return QDF_STATUS_E_FAILURE;
3638}
3639
3640/**
3641 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3642 * @param wmi_handle : handle to WMI.
3643 * @param param : pointer to hold mimogain param
3644 *
3645 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3646 */
3647QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3648 struct mimogain_table_params *param)
3649{
3650 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3651
3652 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3653 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3654 param);
3655
3656 return QDF_STATUS_E_FAILURE;
3657}
3658
3659/**
3660 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3661 * chainmsk cmd function
3662 * @param wmi_handle : handle to WMI.
3663 * @param param : pointer to hold ratepwr chainmsk param
3664 *
3665 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3666 */
3667QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3668 struct ratepwr_chainmsk_params *param)
3669{
3670 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3671
3672 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3673 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3674
3675 return QDF_STATUS_E_FAILURE;
3676}
3677
3678/**
3679 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3680 * @param wmi_handle : handle to WMI.
3681 * @param param : pointer to hold macaddr param
3682 *
3683 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3684 */
3685QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3686 struct macaddr_params *param)
3687{
3688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3689
3690 if (wmi_handle->ops->send_set_macaddr_cmd)
3691 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3692
3693 return QDF_STATUS_E_FAILURE;
3694}
3695
3696/**
3697 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3698 * @param wmi_handle : handle to WMI.
3699 *
3700 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3701 */
3702QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3703{
3704 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3705
3706 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3707 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3708
3709 return QDF_STATUS_E_FAILURE;
3710}
3711
3712/**
3713 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3714 * @param wmi_handle : handle to WMI.
3715 *
3716 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3717 */
3718QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3719{
3720 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3721
3722 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3723 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3724
3725 return QDF_STATUS_E_FAILURE;
3726}
3727
3728/**
3729 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3730 * @param wmi_handle : handle to WMI.
3731 * @param param : pointer to hold acparams param
3732 *
3733 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3734 */
3735QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3736 struct acparams_params *param)
3737{
3738 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3739
3740 if (wmi_handle->ops->send_set_acparams_cmd)
3741 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3742 param);
3743
3744 return QDF_STATUS_E_FAILURE;
3745}
3746
3747/**
3748 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3749 * tid map cmd function
3750 * @param wmi_handle : handle to WMI.
3751 * @param param : pointer to hold dscp param
3752 *
3753 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3754 */
3755QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3756 struct vap_dscp_tid_map_params *param)
3757{
3758 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3759
3760 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3761 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3762
3763 return QDF_STATUS_E_FAILURE;
3764}
3765
3766/**
3767 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3768 * reserve cmd function
3769 * @param wmi_handle : handle to WMI.
3770 * @param param : pointer to hold ast param
3771 *
3772 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3773 */
3774QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3775 struct proxy_ast_reserve_params *param)
3776{
3777 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3778
3779 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3780 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3781 param);
3782
3783 return QDF_STATUS_E_FAILURE;
3784}
3785
3786/**
3787 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3788 * @param wmi_handle : handle to WMI.
3789 * @param param : pointer to hold qvit param
3790 *
3791 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3792 */
3793QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3794 struct pdev_qvit_params *param)
3795{
3796 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3797
3798 if (wmi_handle->ops->send_pdev_qvit_cmd)
3799 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3800
3801 return QDF_STATUS_E_FAILURE;
3802}
3803
3804/**
3805 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3806 * @param wmi_handle : handle to WMI.
3807 * @param param : pointer to hold mcast grp param
3808 *
3809 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3810 */
3811QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3812 struct mcast_group_update_params *param)
3813{
3814 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3815
3816 if (wmi_handle->ops->send_mcast_group_update_cmd)
3817 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3818 param);
3819
3820 return QDF_STATUS_E_FAILURE;
3821}
3822
3823/**
3824 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3825 * @param wmi_handle : handle to WMI.
3826 * @param param : pointer to hold wds entry param
3827 *
3828 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3829 */
3830QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3831 struct peer_add_wds_entry_params *param)
3832{
3833 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3834
3835 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3836 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3837 param);
3838
3839 return QDF_STATUS_E_FAILURE;
3840}
3841
3842/**
3843 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3844 * @param wmi_handle : handle to WMI.
3845 * @param param : pointer to hold wds entry param
3846 *
3847 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3848 */
3849QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3850 struct peer_del_wds_entry_params *param)
3851{
3852 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3853
3854 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3855 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3856 param);
3857
3858 return QDF_STATUS_E_FAILURE;
3859}
3860
3861/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05303862 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
3863 * @param wmi_hdl : handle to WMI.
3864 * @param param : pointer to hold bridge mac addr param
3865 *
3866 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3867 */
3868QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
3869 struct set_bridge_mac_addr_params *param)
3870{
3871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3872
3873 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
3874 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
3875 param);
3876
3877 return QDF_STATUS_E_FAILURE;
3878}
3879
3880/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303881 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3882 * @param wmi_handle : handle to WMI.
3883 * @param param : pointer to hold wds entry param
3884 *
3885 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3886 */
3887QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3888 struct peer_update_wds_entry_params *param)
3889{
3890 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3891
3892 if (wmi->ops->send_peer_update_wds_entry_cmd)
3893 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3894
3895 return QDF_STATUS_E_FAILURE;
3896}
3897
3898/**
3899 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3900 * @param wmi_handle : handle to WMI.
3901 * @param param : pointer to hold phyerr enable param
3902 *
3903 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3904 */
3905QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3906{
3907 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3908
3909 if (wmi_handle->ops->send_phyerr_enable_cmd)
3910 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3911
3912 return QDF_STATUS_E_FAILURE;
3913}
3914
3915/**
3916 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3917 * @param wmi_handle : handle to WMI.
3918 * @param param : pointer to hold phyerr disable param
3919 *
3920 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3921 */
3922QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3923{
3924 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3925
3926 if (wmi_handle->ops->send_phyerr_disable_cmd)
3927 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3928
3929 return QDF_STATUS_E_FAILURE;
3930}
3931
3932/**
3933 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3934 * @param wmi_handle : handle to WMI.
3935 * @param param : pointer to hold antenna param
3936 *
3937 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3938 */
3939QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3940 struct smart_ant_enable_params *param)
3941{
3942 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3943
3944 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3945 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3946 param);
3947
3948 return QDF_STATUS_E_FAILURE;
3949}
3950
3951/**
3952 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3953 * @param wmi_handle : handle to WMI.
3954 * @param param : pointer to hold antenna param
3955 *
3956 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3957 */
3958QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3959 struct smart_ant_rx_ant_params *param)
3960{
3961 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3962
3963 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3964 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3965
3966 return QDF_STATUS_E_FAILURE;
3967}
3968
3969/**
3970 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3971 * @param wmi_handle : handle to WMI.
3972 * @param param : pointer to hold antenna param
3973 *
3974 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3975 */
3976QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3977 uint8_t macaddr[IEEE80211_ADDR_LEN],
3978 struct smart_ant_tx_ant_params *param)
3979{
3980 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3981
3982 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3983 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3984 param);
3985
3986 return QDF_STATUS_E_FAILURE;
3987}
3988
3989/**
3990 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3991 * @param wmi_handle : handle to WMI.
3992 * @param param : pointer to hold antenna param
3993 *
3994 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3995 */
3996QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3997 uint8_t macaddr[IEEE80211_ADDR_LEN],
3998 struct smart_ant_training_info_params *param)
3999{
4000 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4001
4002 if (wmi->ops->send_smart_ant_set_training_info_cmd)
4003 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
4004 macaddr, param);
4005
4006 return QDF_STATUS_E_FAILURE;
4007}
4008
4009/**
4010 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
4011 * @param wmi_handle : handle to WMI.
4012 * @param macaddr : MAC address
4013 * @param param : pointer to hold node parameter
4014 *
4015 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4016 */
4017QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
4018 uint8_t macaddr[IEEE80211_ADDR_LEN],
4019 struct smart_ant_node_config_params *param)
4020{
4021 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4022
4023 if (wmi->ops->send_smart_ant_set_node_config_cmd)
4024 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
4025 macaddr, param);
4026
4027 return QDF_STATUS_E_FAILURE;
4028}
4029
4030/**
4031 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
4032 * @param wmi_handle : handle to WMI.
4033 * @param param : pointer to hold antenna param
4034 *
4035 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4036 */
4037QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
4038 struct smart_ant_enable_tx_feedback_params *param)
4039{
4040 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4041
4042 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
4043 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
4044 param);
4045
4046 return QDF_STATUS_E_FAILURE;
4047}
4048
4049/**
4050 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
4051 * @param wmi_handle : handle to WMI.
4052 * @param param : pointer to hold spectral config param
4053 *
4054 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4055 */
4056QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
4057 struct vdev_spectral_configure_params *param)
4058{
4059 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4060
4061 if (wmi->ops->send_vdev_spectral_configure_cmd)
4062 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
4063
4064 return QDF_STATUS_E_FAILURE;
4065}
4066
4067/**
4068 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
4069 * @param wmi_handle : handle to WMI.
4070 * @param param : pointer to hold enable spectral param
4071 *
4072 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4073 */
4074QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
4075 struct vdev_spectral_enable_params *param)
4076{
4077 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4078
4079 if (wmi->ops->send_vdev_spectral_enable_cmd)
4080 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
4081
4082 return QDF_STATUS_E_FAILURE;
4083}
4084
4085/**
4086 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
4087 * @param wmi_handle : handle to WMI.
4088 * @param param : pointer to hold chan info param
4089 *
4090 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4091 */
4092QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
4093 struct bss_chan_info_request_params *param)
4094{
4095 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4096
4097 if (wmi->ops->send_bss_chan_info_request_cmd)
4098 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
4099
4100 return QDF_STATUS_E_FAILURE;
4101}
4102
4103/**
4104 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
4105 * @param wmi_handle : handle to WMI.
4106 * @param param : pointer to hold thermal mitigation param
4107 *
4108 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4109 */
4110QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
4111 struct thermal_mitigation_params *param)
4112{
4113 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4114
4115 if (wmi->ops->send_thermal_mitigation_param_cmd)
4116 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
4117
4118 return QDF_STATUS_E_FAILURE;
4119}
4120
4121/**
4122 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
4123 * @param wmi_handle : handle to WMI.
4124 * @param macaddr : MAC address
4125 * @param param : pointer to hold neighbour rx parameter
4126 *
4127 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4128 */
4129QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
4130 uint8_t macaddr[IEEE80211_ADDR_LEN],
4131 struct set_neighbour_rx_params *param)
4132{
4133 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4134
4135 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
4136 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
4137 macaddr, param);
4138
4139 return QDF_STATUS_E_FAILURE;
4140}
4141
4142/**
4143 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
4144 * @param wmi_handle : handle to WMI.
4145 * @param param : pointer to hold fwtest param
4146 *
4147 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4148 */
4149QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
4150 struct set_fwtest_params *param)
4151{
4152 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4153
4154 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
4155 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
4156
4157 return QDF_STATUS_E_FAILURE;
4158}
4159
4160/**
4161 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4162 * @param wmi_handle : handle to WMI.
4163 * @param param : pointer to hold config ratemask param
4164 *
4165 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4166 */
4167QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4168 struct config_ratemask_params *param)
4169{
4170 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4171
4172 if (wmi->ops->send_vdev_config_ratemask_cmd)
4173 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4174
4175 return QDF_STATUS_E_FAILURE;
4176}
4177
4178/**
Sathish Kumar6011c742017-11-08 14:49:58 +05304179 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
4180 * size function
4181 * @param wmi_handle : handle to WMI
4182 * @param param : pointer to hold custom aggr size param
4183 *
4184 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4185 */
4186QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
4187 struct set_custom_aggr_size_params *param)
4188{
4189 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4190
4191 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
4192 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
4193
4194 return QDF_STATUS_E_FAILURE;
4195}
4196
4197/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05304198 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
4199 * @param wmi_handle : handle to WMI
4200 * @param param : pointer to hold qdepth threshold params
4201 *
4202 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4203 */
4204QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
4205 struct set_qdepth_thresh_params *param)
4206{
4207 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4208
4209 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
4210 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
4211
4212 return QDF_STATUS_E_FAILURE;
4213}
4214
4215/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304216 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4217 * @param wmi_handle : handle to WMI.
4218 * @param param : pointer to hold regdomain param
4219 *
4220 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4221 */
4222QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4223 struct pdev_set_regdomain_params *param)
4224{
4225 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4226
4227 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4228 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4229 param);
4230
4231 return QDF_STATUS_E_FAILURE;
4232}
4233
4234/**
4235 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4236 * @param wmi_handle : handle to WMI.
4237 * @param param : pointer to hold quiet mode param
4238 *
4239 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4240 */
4241QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4242 struct set_quiet_mode_params *param)
4243{
4244 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4245
4246 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4247 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4248 param);
4249
4250 return QDF_STATUS_E_FAILURE;
4251}
4252
4253/**
4254 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4255 * @param wmi_handle : handle to WMI.
4256 * @param param : pointer to hold beacon filter param
4257 *
4258 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4259 */
4260QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4261 struct set_beacon_filter_params *param)
4262{
4263 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4264
4265 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4266 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4267 param);
4268
4269 return QDF_STATUS_E_FAILURE;
4270}
4271
4272/**
4273 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4274 * @param wmi_handle : handle to WMI.
4275 * @param param : pointer to hold beacon filter param
4276 *
4277 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4278 */
4279QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4280 struct remove_beacon_filter_params *param)
4281{
4282 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4283
4284 if (wmi->ops->send_remove_beacon_filter_cmd)
4285 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4286
4287 return QDF_STATUS_E_FAILURE;
4288}
4289
4290/**
4291 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4292 * @param wmi_handle : handle to WMI.
4293 * @param macaddr : MAC address
4294 * @param param : pointer to hold mgmt parameter
4295 *
4296 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4297 */
4298#if 0
4299QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4300 uint8_t macaddr[IEEE80211_ADDR_LEN],
4301 struct mgmt_params *param)
4302{
4303 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4304
4305 if (wmi_handle->ops->send_mgmt_cmd)
4306 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4307 macaddr, param);
4308
4309 return QDF_STATUS_E_FAILURE;
4310}
4311#endif
4312
4313/**
4314 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4315 * @param wmi_handle : handle to WMI.
4316 * @param macaddr : MAC address
4317 * @param param : pointer to hold addba resp parameter
4318 *
4319 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4320 */
4321QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4322 uint8_t macaddr[IEEE80211_ADDR_LEN],
4323 struct addba_clearresponse_params *param)
4324{
4325 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4326
4327 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4328 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4329 macaddr, param);
4330
4331 return QDF_STATUS_E_FAILURE;
4332}
4333
4334/**
4335 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4336 * @param wmi_handle : handle to WMI.
4337 * @param macaddr : MAC address
4338 * @param param : pointer to hold addba parameter
4339 *
4340 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4341 */
4342QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4343 uint8_t macaddr[IEEE80211_ADDR_LEN],
4344 struct addba_send_params *param)
4345{
4346 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4347
4348 if (wmi_handle->ops->send_addba_send_cmd)
4349 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4350 macaddr, param);
4351
4352 return QDF_STATUS_E_FAILURE;
4353}
4354
4355/**
4356 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4357 * @param wmi_handle : handle to WMI.
4358 * @param macaddr : MAC address
4359 * @param param : pointer to hold delba parameter
4360 *
4361 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4362 */
4363QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4364 uint8_t macaddr[IEEE80211_ADDR_LEN],
4365 struct delba_send_params *param)
4366{
4367 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4368
4369 if (wmi_handle->ops->send_delba_send_cmd)
4370 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4371 macaddr, param);
4372
4373 return QDF_STATUS_E_FAILURE;
4374}
4375
4376/**
4377 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4378 * @param wmi_handle : handle to WMI.
4379 * @param macaddr : MAC address
4380 * @param param : pointer to hold addba set resp parameter
4381 *
4382 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4383 */
4384QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4385 uint8_t macaddr[IEEE80211_ADDR_LEN],
4386 struct addba_setresponse_params *param)
4387{
4388 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4389
4390 if (wmi_handle->ops->send_addba_setresponse_cmd)
4391 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4392 macaddr, param);
4393
4394 return QDF_STATUS_E_FAILURE;
4395}
4396
4397/**
4398 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4399 * @param wmi_handle : handle to WMI.
4400 * @param macaddr : MAC address
4401 * @param param : pointer to hold singleamsdu parameter
4402 *
4403 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4404 */
4405QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4406 uint8_t macaddr[IEEE80211_ADDR_LEN],
4407 struct singleamsdu_params *param)
4408{
4409 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4410
4411 if (wmi_handle->ops->send_singleamsdu_cmd)
4412 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4413 macaddr, param);
4414
4415 return QDF_STATUS_E_FAILURE;
4416}
4417
4418/**
4419 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4420 * @param wmi_handle : handle to WMI.
4421 * @param macaddr : MAC address
4422 * @param param : pointer to hold set_qboost parameter
4423 *
4424 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4425 */
4426QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4427 uint8_t macaddr[IEEE80211_ADDR_LEN],
4428 struct set_qboost_params *param)
4429{
4430 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4431
4432 if (wmi_handle->ops->send_set_qboost_param_cmd)
4433 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4434 macaddr, param);
4435
4436 return QDF_STATUS_E_FAILURE;
4437}
4438
4439/**
4440 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4441 * @param wmi_handle : handle to WMI.
4442 * @param param : pointer to hold mu scan param
4443 *
4444 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4445 */
4446QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4447 struct mu_scan_params *param)
4448{
4449 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4450
4451 if (wmi_handle->ops->send_mu_scan_cmd)
4452 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4453
4454 return QDF_STATUS_E_FAILURE;
4455}
4456
4457/**
4458 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4459 * @param wmi_handle : handle to WMI.
4460 * @param param : pointer to hold mu scan param
4461 *
4462 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4463 */
4464QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4465 struct lteu_config_params *param)
4466{
4467 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4468
4469 if (wmi_handle->ops->send_lteu_config_cmd)
4470 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4471
4472 return QDF_STATUS_E_FAILURE;
4473}
4474
4475/**
4476 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4477 * @param wmi_handle : handle to WMI.
4478 * @param param : pointer to hold mu scan param
4479 *
4480 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4481 */
4482QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4483 struct set_ps_mode_params *param)
4484{
4485 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4486
4487 if (wmi_handle->ops->send_set_ps_mode_cmd)
4488 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4489
4490 return QDF_STATUS_E_FAILURE;
4491}
4492
4493/**
4494 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4495 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05304496 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304497 *
4498 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4499 */
4500QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05304501 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304502{
4503 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4504
4505 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05304506 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304507
4508 return QDF_STATUS_E_FAILURE;
4509}
4510
4511/**
4512 * wmi_save_service_bitmap() - save service bitmap
4513 * @wmi_handle: wmi handle
4514 * @param evt_buf: pointer to event buffer
4515 *
4516 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4517 */
Rajeev Kumar77901472017-02-12 02:12:17 -08004518QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
4519 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304520{
4521 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4522
4523 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304524 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08004525 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304526 }
4527 return QDF_STATUS_E_FAILURE;
4528}
4529
4530/**
4531 * wmi_save_ext_service_bitmap() - save extended service bitmap
4532 * @wmi_handle: wmi handle
4533 * @param evt_buf: pointer to event buffer
4534 *
4535 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4536 */
4537QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
4538 void *bitmap_buf)
4539{
4540 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4541
4542 if (wmi_handle->ops->save_ext_service_bitmap) {
4543 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
4544 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304545 }
4546 return QDF_STATUS_E_FAILURE;
4547}
4548
4549/**
4550 * wmi_save_fw_version() - Save fw version
4551 * @wmi_handle: wmi handle
4552 * @param evt_buf: pointer to event buffer
4553 *
4554 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4555 */
4556QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4557{
4558 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4559
4560 if (wmi_handle->ops->save_fw_version) {
4561 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4562 return 0;
4563 }
4564 return QDF_STATUS_E_FAILURE;
4565
4566}
4567
4568/**
4569 * wmi_check_and_update_fw_version() - Ready and fw version check
4570 * @wmi_handle: wmi handle
4571 * @param evt_buf: pointer to event buffer
4572 *
4573 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4574 */
4575QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4576{
4577 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4578
4579 if (wmi_handle->ops->check_and_update_fw_version)
4580 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4581 evt_buf);
4582
4583 return QDF_STATUS_E_FAILURE;
4584
4585}
4586
4587/**
4588 * wmi_service_enabled() - Check if service enabled
4589 * @param wmi_handle: wmi handle
4590 * @param service_id: service identifier
4591 *
4592 * Return: 1 enabled, 0 disabled
4593 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05304594#ifndef CONFIG_MCL
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304595bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4596{
4597 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4598
4599 if ((service_id < wmi_services_max) &&
4600 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4601 if (wmi_handle->ops->is_service_enabled) {
4602 return wmi_handle->ops->is_service_enabled(wmi_handle,
4603 wmi_handle->services[service_id]);
4604 }
4605 } else {
4606 qdf_print("Support not added yet for Service %d\n", service_id);
4607 }
4608 return false;
4609}
4610#endif
4611
4612/**
4613 * wmi_get_target_cap_from_service_ready() - extract service ready event
4614 * @wmi_handle: wmi handle
4615 * @param evt_buf: pointer to received event buffer
4616 * @param ev: pointer to hold target capability information extracted from even
4617 *
4618 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4619 */
4620QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004621 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304622{
4623 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4624
4625 if (wmi->ops->get_target_cap_from_service_ready)
4626 return wmi->ops->get_target_cap_from_service_ready(wmi,
4627 evt_buf, ev);
4628
4629 return QDF_STATUS_E_FAILURE;
4630}
4631
4632/**
4633 * wmi_extract_fw_version() - extract fw version
4634 * @wmi_handle: wmi handle
4635 * @param evt_buf: pointer to event buffer
4636 * @param fw_ver: Pointer to hold fw version
4637 *
4638 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4639 */
4640QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4641 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4642{
4643 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4644
4645 if (wmi_handle->ops->extract_fw_version)
4646 return wmi_handle->ops->extract_fw_version(wmi_handle,
4647 evt_buf, fw_ver);
4648
4649 return QDF_STATUS_E_FAILURE;
4650}
4651
4652/**
4653 * wmi_extract_fw_abi_version() - extract fw abi version
4654 * @wmi_handle: wmi handle
4655 * @param evt_buf: Pointer to event buffer
4656 * @param fw_ver: Pointer to hold fw abi version
4657 *
4658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4659 */
4660QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4661 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4662{
4663 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4664
4665 if (wmi_handle->ops->extract_fw_abi_version)
4666 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4667 evt_buf, fw_ver);
4668
4669 return QDF_STATUS_E_FAILURE;
4670}
4671
4672/**
4673 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4674 * @wmi_handle: wmi handle
4675 * @param evt_buf: Pointer to event buffer
4676 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4677 *
4678 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4679 */
4680QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004681 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304682{
4683 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4684
4685 if (wmi_handle->ops->extract_hal_reg_cap)
4686 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4687 evt_buf, hal_reg_cap);
4688
4689 return QDF_STATUS_E_FAILURE;
4690}
4691
4692/**
4693 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4694 * request event
4695 * @wmi_handle: wmi handle
4696 * @param evt_buf: pointer to event buffer
4697 * @param num_entries: pointer to hold number of entries requested
4698 *
4699 * Return: Number of entries requested
4700 */
4701host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4702 void *evt_buf, uint8_t *num_entries)
4703{
4704 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4705
4706 if (wmi_handle->ops->extract_host_mem_req)
4707 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4708 evt_buf, num_entries);
4709
4710 *num_entries = 0;
4711 return NULL;
4712}
4713
4714/**
4715 * wmi_ready_extract_init_status() - Extract init status from ready event
4716 * @wmi_handle: wmi handle
4717 * @param ev: Pointer to event buffer
4718 *
4719 * Return: ready status
4720 */
4721uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4722{
4723 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4724
4725 if (wmi_handle->ops->ready_extract_init_status)
4726 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4727 ev);
4728
4729
4730 return 1;
4731
4732}
4733
4734/**
4735 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4736 * @wmi_handle: wmi handle
4737 * @param ev: pointer to event buffer
4738 * @param macaddr: Pointer to hold MAC address
4739 *
4740 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4741 */
4742QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4743{
4744 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4745
4746 if (wmi_handle->ops->ready_extract_mac_addr)
4747 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4748 ev, macaddr);
4749
4750
4751 return QDF_STATUS_E_FAILURE;
4752}
4753
4754/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07004755 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
4756 * @wmi_handle: wmi handle
4757 * @param ev: pointer to event buffer
4758 * @param num_mac_addr: Pointer to number of entries
4759 *
4760 * Return: address to start of mac addr list
4761 */
4762wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
4763 uint8_t *num_mac_addr)
4764{
4765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4766
4767 if (wmi_handle->ops->ready_extract_mac_addr_list)
4768 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
4769 ev, num_mac_addr);
4770
4771 *num_mac_addr = 0;
4772
4773 return NULL;
4774}
4775
4776/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05304777 * wmi_extract_ready_params() - Extract data from ready event apart from
4778 * status, macaddr and version.
4779 * @wmi_handle: Pointer to WMI handle.
4780 * @evt_buf: Pointer to Ready event buffer.
4781 * @ev_param: Pointer to host defined struct to copy the data from event.
4782 *
4783 * Return: QDF_STATUS_SUCCESS on success.
4784 */
4785QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
4786 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
4787{
4788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4789
4790 if (wmi_handle->ops->extract_ready_event_params)
4791 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
4792 evt_buf, ev_param);
4793
4794 return QDF_STATUS_E_FAILURE;
4795}
4796
4797/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304798 * wmi_extract_dbglog_data_len() - extract debuglog data length
4799 * @wmi_handle: wmi handle
4800 * @param evt_buf: pointer to event buffer
4801 * @param len: length of buffer
4802 *
4803 * Return: length
4804 */
4805uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004806 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304807{
4808 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4809
4810 if (wmi_handle->ops->extract_dbglog_data_len)
4811 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4812 evt_buf, len);
4813
4814
4815 return NULL;
4816}
4817
4818/**
4819 * wmi_send_ext_resource_config() - send extended resource configuration
4820 * @wmi_handle: wmi handle
4821 * @param ext_cfg: pointer to extended resource configuration
4822 *
4823 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4824 */
4825QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4826 wmi_host_ext_resource_config *ext_cfg)
4827{
4828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4829
4830 if (wmi_handle->ops->send_ext_resource_config)
4831 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4832 ext_cfg);
4833
4834 return QDF_STATUS_E_FAILURE;
4835}
4836
4837/**
4838 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4839 * @param wmi_handle : handle to WMI.
4840 *
4841 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4842 */
4843QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl)
4844{
4845 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4846
4847 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
4848 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi);
4849
4850 return QDF_STATUS_E_FAILURE;
4851}
4852
4853/**
4854 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4855 * @param wmi_handle : handle to WMI.
4856 * @param param : pointer to hold packet power info param
4857 *
4858 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4859 */
4860QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4861 struct packet_power_info_params *param)
4862{
4863 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4864
4865 if (wmi->ops->send_packet_power_info_get_cmd)
4866 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4867
4868 return QDF_STATUS_E_FAILURE;
4869}
4870
4871/**
4872 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4873 * @param wmi_handle : handle to WMI.
4874 * @param param : pointer to hold gpio config param
4875 *
4876 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4877 */
4878QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4879 struct gpio_config_params *param)
4880{
4881 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4882
4883 if (wmi_handle->ops->send_gpio_config_cmd)
4884 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4885
4886 return QDF_STATUS_E_FAILURE;
4887}
4888
4889/**
4890 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4891 * @param wmi_handle : handle to WMI.
4892 * @param param : pointer to hold gpio config param
4893 *
4894 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4895 */
4896QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4897 struct gpio_output_params *param)
4898{
4899 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4900
4901 if (wmi_handle->ops->send_gpio_output_cmd)
4902 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4903
4904 return QDF_STATUS_E_FAILURE;
4905}
4906
4907/**
4908 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4909 * @param wmi_handle : handle to WMI.
4910 * @param param : pointer to hold rtt meas req test param
4911 *
4912 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4913 */
4914QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4915 struct rtt_meas_req_test_params *param)
4916{
4917 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4918
4919 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4920 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4921 param);
4922
4923 return QDF_STATUS_E_FAILURE;
4924}
4925
4926/**
4927 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4928 * @param wmi_handle : handle to WMI.
4929 * @param param : pointer to hold rtt meas req param
4930 *
4931 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4932 */
4933QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4934 struct rtt_meas_req_params *param)
4935{
4936 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4937
4938 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4939 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4940 param);
4941
4942 return QDF_STATUS_E_FAILURE;
4943}
4944
4945/**
4946 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4947 * @param wmi_handle : handle to WMI.
4948 * @param param : pointer to hold lci param
4949 *
4950 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4951 */
4952QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4953 struct lci_set_params *param)
4954{
4955 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4956
4957 if (wmi_handle->ops->send_lci_set_cmd)
4958 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4959
4960 return QDF_STATUS_E_FAILURE;
4961}
4962
4963/**
4964 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4965 * @param wmi_handle : handle to WMI.
4966 * @param param : pointer to hold lcr param
4967 *
4968 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4969 */
4970QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4971 struct lcr_set_params *param)
4972{
4973 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4974
4975 if (wmi_handle->ops->send_lcr_set_cmd)
4976 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4977
4978 return QDF_STATUS_E_FAILURE;
4979}
4980
4981/**
4982 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4983 * @param wmi_handle : handle to WMI.
4984 * @param param : pointer to hold rtt meas req test param
4985 *
4986 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4987 */
4988QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4989 struct rtt_keepalive_req_params *param)
4990{
4991 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4992
4993 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4994 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4995 param);
4996
4997 return QDF_STATUS_E_FAILURE;
4998}
4999
5000/**
5001 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
5002 * to fw
5003 * @wmi_handle: wmi handle
5004 * @param: pointer to hold periodic chan stats param
5005 *
5006 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5007 */
5008QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
5009 struct periodic_chan_stats_params *param)
5010{
5011 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5012
5013 if (wmi->ops->send_periodic_chan_stats_config_cmd)
5014 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
5015 param);
5016
5017 return QDF_STATUS_E_FAILURE;
5018}
5019
5020/**
5021 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
5022 * @wmi_handle: wmi handle
5023 * @param: pointer to atf peer request param
5024 *
5025 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5026 */
5027QDF_STATUS
5028wmi_send_atf_peer_request_cmd(void *wmi_hdl,
5029 struct atf_peer_request_params *param)
5030{
5031 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5032
5033 if (wmi_handle->ops->send_atf_peer_request_cmd)
5034 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
5035 param);
5036
5037 return QDF_STATUS_E_FAILURE;
5038}
5039
5040/**
5041 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
5042 * @wmi_handle: wmi handle
5043 * @param: pointer to set atf grouping param
5044 *
5045 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5046 */
5047QDF_STATUS
5048wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
5049 struct atf_grouping_params *param)
5050{
5051 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5052
5053 if (wmi_handle->ops->send_set_atf_grouping_cmd)
5054 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
5055 param);
5056
5057 return QDF_STATUS_E_FAILURE;
5058
5059}
5060
Sathish Kumar68789382016-11-14 17:44:29 +05305061/**
5062 * wmi_send_get_user_position_cmd() - send get user position command to fw
5063 * @wmi_handle: wmi handle
5064 *
5065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5066 */
5067QDF_STATUS
5068wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
5069{
5070 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5071
5072 if (wmi_handle->ops->send_get_user_position_cmd)
5073 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
5074 value);
5075
5076 return QDF_STATUS_E_FAILURE;
5077}
5078
5079/**
5080 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
5081 * command to fw
5082 * @wmi_handle: wmi handle
5083 * @value: user pos value
5084 *
5085 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5086 */
5087QDF_STATUS
5088wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5089{
5090 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5091
5092 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
5093 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
5094
5095 return QDF_STATUS_E_FAILURE;
5096}
5097
5098/**
5099 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
5100 * tx count to fw
5101 * @wmi_handle: wmi handle
5102 * @value: reset tx count value
5103 *
5104 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5105 */
5106QDF_STATUS
5107wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5108{
5109 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5110
5111 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
5112 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
5113 value);
5114
5115 return QDF_STATUS_E_FAILURE;
5116}
5117
5118/**
5119 * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo
5120 * tx count to fw
5121 * @wmi_handle: wmi handle
5122 * @value: value
5123 *
5124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5125 */
5126QDF_STATUS
5127wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value)
5128{
5129 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5130
5131 if (wmi->ops->send_pdev_caldata_version_check_cmd)
5132 return wmi->ops->send_pdev_caldata_version_check_cmd(wmi,
5133 value);
5134
5135 return QDF_STATUS_E_FAILURE;
5136}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305137
5138/* Extract - APIs */
5139/**
5140 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
5141 *
5142 * @param wmi_handle : handle to WMI.
5143 * @param evt_buf : pointer to event buffer
5144 * @param len : length of the event buffer
5145 * @param wds_ev: pointer to strct to extract
5146 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5147 */
5148QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
5149 uint16_t len, wds_addr_event_t *wds_ev)
5150{
5151 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5152
5153 if (wmi_handle->ops->extract_wds_addr_event) {
5154 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
5155 evt_buf, len, wds_ev);
5156 }
5157 return QDF_STATUS_E_FAILURE;
5158}
5159
5160/**
5161 * wmi_extract_dcs_interference_type() - extract dcs interference type
5162 * @wmi_handle: wmi handle
5163 * @param evt_buf: pointer to event buffer
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305164 * @param param: Pointer to hold dcs interference param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305165 *
5166 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5167 */
5168QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305169 void *evt_buf, struct wmi_host_dcs_interference_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305170{
5171 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5172
5173 if (wmi->ops->extract_dcs_interference_type) {
5174 return wmi->ops->extract_dcs_interference_type(wmi,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305175 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305176 }
5177 return QDF_STATUS_E_FAILURE;
5178}
5179
5180/*
5181 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5182 * @wmi_handle: wmi handle
5183 * @param evt_buf: pointer to event buffer
5184 * @param cw_int: Pointer to hold cw interference
5185 *
5186 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5187 */
5188QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5189 wmi_host_ath_dcs_cw_int *cw_int)
5190{
5191 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5192
5193 if (wmi_handle->ops->extract_dcs_cw_int) {
5194 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5195 evt_buf, cw_int);
5196 }
5197 return QDF_STATUS_E_FAILURE;
5198}
5199
5200/**
5201 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5202 * @wmi_handle: wmi handle
5203 * @param evt_buf: pointer to event buffer
5204 * @param wlan_stat: Pointer to hold wlan stats
5205 *
5206 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5207 */
5208QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5209 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5210{
5211 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5212
5213 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5214 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5215 evt_buf, wlan_stat);
5216 }
5217 return QDF_STATUS_E_FAILURE;
5218}
5219
5220/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305221 * wmi_extract_fips_event_data() - extract fips event data
5222 * @wmi_handle: wmi handle
5223 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305224 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305225 *
5226 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5227 */
5228QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305229 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305230{
5231 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5232
5233 if (wmi_handle->ops->extract_fips_event_data) {
5234 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305235 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305236 }
5237 return QDF_STATUS_E_FAILURE;
5238}
5239
5240/**
5241 * wmi_extract_vdev_start_resp() - extract vdev start response
5242 * @wmi_handle: wmi handle
5243 * @param evt_buf: pointer to event buffer
5244 * @param vdev_rsp: Pointer to hold vdev response
5245 *
5246 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5247 */
5248QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5249 wmi_host_vdev_start_resp *vdev_rsp)
5250{
5251 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5252
5253 if (wmi_handle->ops->extract_vdev_start_resp)
5254 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5255 evt_buf, vdev_rsp);
5256
5257 return QDF_STATUS_E_FAILURE;
5258}
5259
5260/**
Om Prakash Tripathif3ef42d2017-11-24 16:53:07 +05305261 * wmi_extract_vdev_delete_resp() - extract vdev delete response
5262 * @wmi_handle: wmi handle
5263 * @param evt_buf: pointer to event buffer
5264 * @param delete_rsp: Pointer to hold vdev delete response
5265 *
5266 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5267 */
5268QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
5269 struct wmi_host_vdev_delete_resp *delete_rsp)
5270{
5271 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5272
5273 if (wmi_handle->ops->extract_vdev_delete_resp)
5274 return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle,
5275 evt_buf, delete_rsp);
5276
5277 return QDF_STATUS_E_FAILURE;
5278}
5279
5280
5281/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305282 * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev
5283 * @wmi_handle: wmi handle
5284 * @param evt_buf: pointer to event buffer
5285 * @param vdev_map: Pointer to hold num vdev
5286 *
5287 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5288 */
5289QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5290 uint32_t *num_vdevs)
5291{
5292 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5293
5294 if (wmi->ops->extract_tbttoffset_num_vdevs)
5295 return wmi->ops->extract_tbttoffset_num_vdevs(wmi,
5296 evt_buf, num_vdevs);
5297
5298 return QDF_STATUS_E_FAILURE;
5299}
5300
5301/**
5302 * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev
5303 * @wmi_handle: wmi handle
5304 * @param evt_buf: pointer to event buffer
5305 * @param vdev_map: Pointer to hold num vdev
5306 *
5307 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5308 */
5309QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5310 uint32_t *num_vdevs)
5311{
5312 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5313
5314 if (wmi->ops->extract_ext_tbttoffset_num_vdevs)
5315 return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi,
5316 evt_buf, num_vdevs);
5317
5318 return QDF_STATUS_E_FAILURE;
5319}
5320
5321/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305322 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5323 * @wmi_handle: wmi handle
5324 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305325 * @param idx: Index refering to a vdev
5326 * @param tbtt_param: Pointer to tbttoffset event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305327 *
5328 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5329 */
5330QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305331 uint8_t idx, struct tbttoffset_params *tbtt_param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305332{
5333 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5334
5335 if (wmi->ops->extract_tbttoffset_update_params)
5336 return wmi->ops->extract_tbttoffset_update_params(wmi,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305337 evt_buf, idx, tbtt_param);
5338
5339 return QDF_STATUS_E_FAILURE;
5340}
5341
5342/**
5343 * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param
5344 * @wmi_handle: wmi handle
5345 * @param evt_buf: pointer to event buffer
5346 * @param idx: Index refering to a vdev
5347 * @param tbtt_param: Pointer to tbttoffset event param
5348 *
5349 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5350 */
5351QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
5352 void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param)
5353{
5354 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5355
5356 if (wmi->ops->extract_ext_tbttoffset_update_params)
5357 return wmi->ops->extract_ext_tbttoffset_update_params(wmi,
5358 evt_buf, idx, tbtt_param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305359
5360 return QDF_STATUS_E_FAILURE;
5361}
5362
5363/**
5364 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5365 * @wmi_handle: wmi handle
5366 * @param evt_buf: pointer to event buffer
5367 * @param hdr: Pointer to hold header
5368 * @param bufp: Pointer to hold pointer to rx param buffer
5369 *
5370 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5371 */
5372QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05305373 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305374{
5375 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5376
5377 if (wmi_handle->ops->extract_mgmt_rx_params)
5378 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5379 evt_buf, hdr, bufp);
5380
5381 return QDF_STATUS_E_FAILURE;
5382}
5383
5384/**
5385 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5386 * @wmi_handle: wmi handle
5387 * @param evt_buf: pointer to event buffer
5388 * @param vdev_id: Pointer to hold vdev identifier
5389 *
5390 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5391 */
5392QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5393 uint32_t *vdev_id)
5394{
5395 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5396
5397 if (wmi_handle->ops->extract_vdev_stopped_param)
5398 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5399 evt_buf, vdev_id);
5400
5401 return QDF_STATUS_E_FAILURE;
5402}
5403
5404/**
5405 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5406 * @wmi_handle: wmi handle
5407 * @param evt_buf: pointer to event buffer
5408 * @param param: Pointer to hold roam param
5409 *
5410 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5411 */
5412QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5413 wmi_host_roam_event *param)
5414{
5415 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5416
5417 if (wmi_handle->ops->extract_vdev_roam_param)
5418 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5419 evt_buf, param);
5420
5421 return QDF_STATUS_E_FAILURE;
5422}
5423
5424/**
5425 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5426 * @wmi_handle: wmi handle
5427 * @param evt_buf: pointer to event buffer
5428 * @param param: Pointer to hold vdev scan param
5429 *
5430 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5431 */
5432QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05305433 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305434{
5435 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5436
5437 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5438 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5439 evt_buf, param);
5440
5441 return QDF_STATUS_E_FAILURE;
5442}
5443
Frank Liu3d5e9992017-03-15 17:51:43 +08005444#ifdef CONVERGED_TDLS_ENABLE
5445QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
5446 struct tdls_event_info *param)
5447{
5448 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5449
5450 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
5451 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
5452 evt_buf, param);
5453
5454 return QDF_STATUS_E_FAILURE;
5455}
5456#endif
5457
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305458/**
5459 * wmi_extract_mu_ev_param() - extract mu param from event
5460 * @wmi_handle: wmi handle
5461 * @param evt_buf: pointer to event buffer
5462 * @param param: Pointer to hold mu report
5463 *
5464 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5465 */
5466QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5467 wmi_host_mu_report_event *param)
5468{
5469 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5470
5471 if (wmi_handle->ops->extract_mu_ev_param)
5472 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5473 param);
5474
5475 return QDF_STATUS_E_FAILURE;
5476}
5477
5478/**
Sathish Kumar68789382016-11-14 17:44:29 +05305479 * wmi_extract_mu_db_entry() - extract mu db entry from event
5480 * @wmi_handle: wmi handle
5481 * @param evt_buf: pointer to event buffer
5482 * @param param: Pointer to hold mu db entry
5483 *
5484 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5485 */
5486QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
5487 uint8_t idx, wmi_host_mu_db_entry *param)
5488{
5489 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5490
5491 if (wmi_handle->ops->extract_mu_db_entry)
5492 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
5493 idx, param);
5494
5495 return QDF_STATUS_E_FAILURE;
5496}
5497
5498/**
5499 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
5500 * @wmi_handle: wmi handle
5501 * @param evt_buf: pointer to event buffer
5502 * @param param: Pointer to hold mumimo tx count
5503 *
5504 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5505 */
5506QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
5507 wmi_host_peer_txmu_cnt_event *param)
5508{
5509 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5510
5511 if (wmi->ops->extract_mumimo_tx_count_ev_param)
5512 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
5513 evt_buf, param);
5514
5515 return QDF_STATUS_E_FAILURE;
5516}
5517
5518/**
5519 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
5520 * from event
5521 * @wmi_handle: wmi handle
5522 * @param evt_buf: pointer to event buffer
5523 * @param param: Pointer to hold peer gid userposition list
5524 *
5525 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5526 */
5527QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
5528 void *evt_buf,
5529 wmi_host_peer_gid_userpos_list_event *param)
5530{
5531 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5532
5533 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
5534 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
5535 evt_buf, param);
5536
5537 return QDF_STATUS_E_FAILURE;
5538}
5539
5540/**
5541 * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
5542 * from event
5543 * @wmi_handle: wmi handle
5544 * @param evt_buf: pointer to event buffer
5545 * @param param: Pointer to hold caldata version data
5546 *
5547 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5548 */
5549QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
5550 void *evt_buf,
5551 wmi_host_pdev_check_cal_version_event *param)
5552{
5553 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5554
5555 if (wmi->ops->extract_pdev_caldata_version_check_ev_param)
5556 return wmi->ops->extract_pdev_caldata_version_check_ev_param(
5557 wmi, evt_buf, param);
5558
5559 return QDF_STATUS_E_FAILURE;
5560}
5561
5562/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305563 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5564 * param from event
5565 * @wmi_handle: wmi handle
5566 * @param evt_buf: pointer to event buffer
5567 * @param param: Pointer to hold tpc configuration
5568 *
5569 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5570 */
5571QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5572 wmi_host_pdev_tpc_config_event *param)
5573{
5574 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5575
5576 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5577 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5578 evt_buf, param);
5579
5580 return QDF_STATUS_E_FAILURE;
5581
5582}
5583
5584/**
5585 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5586 * @wmi_handle: wmi handle
5587 * @param evt_buf: pointer to event buffer
5588 * @param gpio_num: Pointer to hold gpio number
5589 *
5590 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5591 */
5592QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5593 void *evt_buf, uint32_t *gpio_num)
5594{
5595 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5596
5597 if (wmi_handle->ops->extract_gpio_input_ev_param)
5598 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5599 evt_buf, gpio_num);
5600
5601 return QDF_STATUS_E_FAILURE;
5602}
5603
5604/**
5605 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5606 * param from event
5607 * @wmi_handle: wmi handle
5608 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305609 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305610 *
5611 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5612 */
5613QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305614 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305615{
5616 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5617
5618 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5619 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305620 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305621
5622 return QDF_STATUS_E_FAILURE;
5623}
5624
5625/**
5626 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5627 * power param from event
5628 * @wmi_handle: wmi handle
5629 * @param evt_buf: pointer to event buffer
5630 * @param param: Pointer to hold nf cal power param
5631 *
5632 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5633 */
5634QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5635 wmi_host_pdev_nfcal_power_all_channels_event *param)
5636{
5637 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5638
5639 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5640 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5641 evt_buf, param);
5642
5643 return QDF_STATUS_E_FAILURE;
5644
5645}
5646
5647/**
5648 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5649 * @wmi_handle: wmi handle
5650 * @param evt_buf: pointer to event buffer
5651 * @param param: Pointer to hold tpc param
5652 *
5653 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5654 */
5655QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5656 wmi_host_pdev_tpc_event *param)
5657{
5658 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5659
5660 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5661 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5662 evt_buf, param);
5663
5664 return QDF_STATUS_E_FAILURE;
5665
5666}
5667
5668/**
5669 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5670 * from event
5671 * @wmi_handle: wmi handle
5672 * @param evt_buf: pointer to event buffer
5673 * @param param: Pointer to generic buffer param
5674 *
5675 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5676 */
5677QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5678 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5679{
5680 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5681
5682 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5683 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5684 evt_buf, param);
5685
5686 return QDF_STATUS_E_FAILURE;
5687
5688}
5689
5690/**
5691 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5692 * from event
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305693 * @wmi_hdl: wmi handle
5694 * @evt_buf: pointer to event buffer
5695 * @param: Pointer to mgmt tx completion param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305696 *
5697 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5698 */
5699QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5700 wmi_host_mgmt_tx_compl_event *param)
5701{
5702 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5703
5704 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5705 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5706 evt_buf, param);
5707
5708
5709 return QDF_STATUS_E_FAILURE;
5710}
5711
5712/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305713 * wmi_extract_offchan_data_tx_compl_param() -
5714 * extract offchan data tx completion param from event
5715 * @wmi_hdl: wmi handle
5716 * @evt_buf: pointer to event buffer
5717 * @param: Pointer to offchan data tx completion param
5718 *
5719 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5720 */
5721QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
5722 struct wmi_host_offchan_data_tx_compl_event *param)
5723{
5724 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5725
5726 if (wmi_handle->ops->extract_offchan_data_tx_compl_param)
5727 return wmi_handle->ops->extract_offchan_data_tx_compl_param(
5728 wmi_handle, evt_buf, param);
5729
5730
5731 return QDF_STATUS_E_FAILURE;
5732}
5733
5734/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05305735 * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
5736 * from event
5737 * @wmi_handle: wmi handle
5738 * @param evt_buf: pointer to event buffer
5739 * @param param: Pointer to CSA switch count status param
5740 *
5741 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5742 */
5743QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
5744 void *evt_buf,
5745 struct pdev_csa_switch_count_status *param)
5746{
5747 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5748
5749 if (wmi_handle->ops->extract_pdev_csa_switch_count_status)
5750 return wmi_handle->ops->extract_pdev_csa_switch_count_status(
5751 wmi_handle,
5752 evt_buf,
5753 param);
5754
5755 return QDF_STATUS_E_FAILURE;
5756}
5757
5758
5759/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305760 * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305761 * @wmi_handle: wmi handle
5762 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305763 * @param num_vdevs: Pointer to hold num vdevs
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305764 *
5765 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5766 */
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305767QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
5768 uint32_t *num_vdevs)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305769{
5770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5771
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305772 if (wmi_handle->ops->extract_swba_num_vdevs)
5773 return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle,
5774 evt_buf, num_vdevs);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305775
5776 return QDF_STATUS_E_FAILURE;
5777}
5778
5779/**
5780 * wmi_extract_swba_tim_info() - extract swba tim info from event
5781 * @wmi_handle: wmi handle
5782 * @param evt_buf: pointer to event buffer
5783 * @param idx: Index to bcn info
5784 * @param tim_info: Pointer to hold tim info
5785 *
5786 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5787 */
5788QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5789 uint32_t idx, wmi_host_tim_info *tim_info)
5790{
5791 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5792
5793 if (wmi_handle->ops->extract_swba_tim_info)
5794 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5795 evt_buf, idx, tim_info);
5796
5797 return QDF_STATUS_E_FAILURE;
5798}
5799
5800/**
5801 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5802 * @wmi_handle: wmi handle
5803 * @param evt_buf: pointer to event buffer
5804 * @param idx: Index to bcn info
5805 * @param p2p_desc: Pointer to hold p2p NoA info
5806 *
5807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5808 */
5809QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5810 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5811{
5812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5813
5814 if (wmi_handle->ops->extract_swba_noa_info)
5815 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5816 evt_buf, idx, p2p_desc);
5817
5818 return QDF_STATUS_E_FAILURE;
5819}
5820
Wu Gaocd3a8512017-03-13 20:17:34 +08005821#ifdef CONVERGED_P2P_ENABLE
5822/**
5823 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
5824 * @wmi_handle: wmi handle
5825 * @evt_buf: pointer to event buffer
5826 * @param: Pointer to hold listen offload stop param
5827 *
5828 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5829 */
5830QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
5831 struct p2p_lo_event *param)
5832{
5833 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5834
5835 if (!wmi_handle) {
5836 WMI_LOGE("wmi handle is null");
5837 return QDF_STATUS_E_INVAL;
5838 }
5839
5840 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
5841 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
5842 wmi_handle, evt_buf, param);
5843
5844 return QDF_STATUS_E_FAILURE;
5845}
5846
5847/**
5848 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
5849 * @wmi_handle: wmi handle
5850 * @evt_buf: pointer to event buffer
5851 * @param: Pointer to hold p2p noa param
5852 *
5853 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5854 */
5855QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
5856 struct p2p_noa_info *param)
5857{
5858 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5859
5860 if (!wmi_handle) {
5861 WMI_LOGE("wmi handle is null");
5862 return QDF_STATUS_E_INVAL;
5863 }
5864
5865 if (wmi_handle->ops->extract_p2p_noa_ev_param)
5866 return wmi_handle->ops->extract_p2p_noa_ev_param(
5867 wmi_handle, evt_buf, param);
5868
5869 return QDF_STATUS_E_FAILURE;
5870}
5871#endif
5872
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305873/**
5874 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5875 * from event
5876 * @wmi_handle: wmi handle
5877 * @param evt_buf: pointer to event buffer
5878 * @param ev: Pointer to hold peer param and ps state
5879 *
5880 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5881 */
5882QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5883 wmi_host_peer_sta_ps_statechange_event *ev)
5884{
5885 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5886
5887 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5888 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5889 evt_buf, ev);
5890
5891 return QDF_STATUS_E_FAILURE;
5892}
5893
5894/**
5895 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5896 * @wmi_handle: wmi handle
5897 * @param evt_buf: pointer to event buffer
5898 * @param ev: Pointer to hold peer param
5899 *
5900 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5901 */
5902QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5903 wmi_host_peer_sta_kickout_event *ev)
5904{
5905 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5906
5907 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5908 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5909 evt_buf, ev);
5910
5911 return QDF_STATUS_E_FAILURE;
5912}
5913
5914/**
5915 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5916 * @wmi_handle: wmi handle
5917 * @param evt_buf: pointer to event buffer
5918 * @param peer_mac: Pointer to hold peer mac address
5919 * @param rate_cap: Pointer to hold ratecode
5920 *
5921 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5922 */
5923QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5924 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5925{
5926 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5927
5928 if (wmi->ops->extract_peer_ratecode_list_ev)
5929 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5930 evt_buf, peer_mac, rate_cap);
5931
5932 return QDF_STATUS_E_FAILURE;
5933
5934}
5935
5936/**
5937 * wmi_extract_comb_phyerr() - extract comb phy error from event
5938 * @wmi_handle: wmi handle
5939 * @param evt_buf: pointer to event buffer
5940 * @param datalen: data length of event buffer
5941 * @param buf_offset: Pointer to hold value of current event buffer offset
5942 * post extraction
5943 * @param phyer: Pointer to hold phyerr
5944 *
5945 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5946 */
5947QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5948 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5949{
5950 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5951
5952 if (wmi_handle->ops->extract_comb_phyerr)
5953 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5954 evt_buf, datalen, buf_offset, phyerr);
5955
5956 return QDF_STATUS_E_FAILURE;
5957
5958}
5959
5960/**
5961 * wmi_extract_single_phyerr() - extract single phy error from event
5962 * @wmi_handle: wmi handle
5963 * @param evt_buf: pointer to event buffer
5964 * @param datalen: data length of event buffer
5965 * @param buf_offset: Pointer to hold value of current event buffer offset
5966 * post extraction
5967 * @param phyerr: Pointer to hold phyerr
5968 *
5969 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5970 */
5971QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5972 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5973{
5974 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5975
5976 if (wmi_handle->ops->extract_single_phyerr)
5977 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5978 evt_buf, datalen, buf_offset, phyerr);
5979
5980 return QDF_STATUS_E_FAILURE;
5981
5982}
5983
5984/**
5985 * wmi_extract_composite_phyerr() - extract composite phy error from event
5986 * @wmi_handle: wmi handle
5987 * @param evt_buf: pointer to event buffer
5988 * @param datalen: Length of event buffer
5989 * @param phyerr: Pointer to hold phy error
5990 *
5991 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5992 */
5993QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5994 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5995{
5996 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5997
5998 if (wmi_handle->ops->extract_composite_phyerr)
5999 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
6000 evt_buf, datalen, phyerr);
6001
6002 return QDF_STATUS_E_FAILURE;
6003
6004}
6005
6006/**
6007 * wmi_extract_stats_param() - extract all stats count from event
6008 * @wmi_handle: wmi handle
6009 * @param evt_buf: pointer to event buffer
6010 * @param stats_param: Pointer to hold stats count
6011 *
6012 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6013 */
6014QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
6015 wmi_host_stats_event *stats_param)
6016{
6017 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6018
6019 if (wmi_handle->ops->extract_all_stats_count)
6020 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
6021 evt_buf, stats_param);
6022
6023 return QDF_STATUS_E_FAILURE;
6024}
6025
6026/**
6027 * wmi_extract_pdev_stats() - extract pdev stats from event
6028 * @wmi_handle: wmi handle
6029 * @param evt_buf: pointer to event buffer
6030 * @param index: Index into pdev stats
6031 * @param pdev_stats: Pointer to hold pdev stats
6032 *
6033 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6034 */
6035QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
6036 uint32_t index, wmi_host_pdev_stats *pdev_stats)
6037{
6038 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6039
6040 if (wmi_handle->ops->extract_pdev_stats)
6041 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
6042 evt_buf, index, pdev_stats);
6043
6044 return QDF_STATUS_E_FAILURE;
6045}
6046
6047/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07006048 * extract_unit_test() - extract unit test from event
6049 * @wmi_handle: wmi handle
6050 * @param evt_buf: pointer to event buffer
6051 * @param unit_test: Pointer to hold unit-test header
6052 * @param maxspace: The amount of space in evt_buf
6053 *
6054 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6055 */
6056QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
6057 wmi_unit_test_event *unit_test, uint32_t maxspace)
6058{
6059 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6060
6061 if (wmi_handle->ops->extract_unit_test)
6062 return wmi_handle->ops->extract_unit_test(wmi_handle,
6063 evt_buf, unit_test, maxspace);
6064
6065 return QDF_STATUS_E_FAILURE;
6066}
6067
6068/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306069 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
6070 * @wmi_handle: wmi handle
6071 * @param evt_buf: pointer to event buffer
6072 * @param index: Index into extended pdev stats
6073 * @param pdev_ext_stats: Pointer to hold extended pdev stats
6074 *
6075 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6076 */
6077QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
6078 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
6079{
6080 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6081
6082 if (wmi_handle->ops->extract_pdev_ext_stats)
6083 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
6084 evt_buf, index, pdev_ext_stats);
6085
6086 return QDF_STATUS_E_FAILURE;
6087}
6088
6089/**
6090 * wmi_extract_peer_stats() - extract peer stats from event
6091 * @wmi_handle: wmi handle
6092 * @param evt_buf: pointer to event buffer
6093 * @param index: Index into peer stats
6094 * @param peer_stats: Pointer to hold peer stats
6095 *
6096 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6097 */
6098QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
6099 uint32_t index, wmi_host_peer_stats *peer_stats)
6100{
6101 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6102
6103 if (wmi_handle->ops->extract_peer_stats)
6104 return wmi_handle->ops->extract_peer_stats(wmi_handle,
6105 evt_buf, index, peer_stats);
6106
6107 return QDF_STATUS_E_FAILURE;
6108}
6109
6110/**
6111 * wmi_extract_vdev_stats() - extract vdev stats from event
6112 * @wmi_handle: wmi handle
6113 * @param evt_buf: pointer to event buffer
6114 * @param index: Index into vdev stats
6115 * @param vdev_stats: Pointer to hold vdev stats
6116 *
6117 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6118 */
6119QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
6120 uint32_t index, wmi_host_vdev_stats *vdev_stats)
6121{
6122 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6123
6124 if (wmi_handle->ops->extract_vdev_stats)
6125 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
6126 evt_buf, index, vdev_stats);
6127
6128 return QDF_STATUS_E_FAILURE;
6129}
6130
6131/**
6132 * wmi_extract_rtt_hdr() - extract rtt header from event
6133 * @wmi_handle: wmi handle
6134 * @param evt_buf: pointer to event buffer
6135 * @param ev: Pointer to hold rtt header
6136 *
6137 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6138 */
6139QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
6140 wmi_host_rtt_event_hdr *ev)
6141{
6142 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6143
6144 if (wmi_handle->ops->extract_rtt_hdr)
6145 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
6146 evt_buf, ev);
6147
6148 return QDF_STATUS_E_FAILURE;
6149}
6150
6151/**
6152 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
6153 * @wmi_handle: wmi handle
6154 * @param evt_buf: pointer to event buffer
6155 * @param index: Index into bcn fault stats
6156 * @param bcnflt_stats: Pointer to hold bcn fault stats
6157 *
6158 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6159 */
6160QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
6161 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
6162{
6163 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6164
6165 if (wmi_handle->ops->extract_bcnflt_stats)
6166 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
6167 evt_buf, index, bcnflt_stats);
6168
6169 return QDF_STATUS_E_FAILURE;
6170}
6171
6172/**
6173 * wmi_extract_rtt_ev() - extract rtt event
6174 * @wmi_handle: wmi handle
6175 * @param evt_buf: Pointer to event buffer
6176 * @param ev: Pointer to hold rtt event
6177 * @param hdump: Pointer to hold hex dump
6178 * @param hdump_len: hex dump length
6179 *
6180 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6181 */
6182QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
6183 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
6184{
6185 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6186
6187 if (wmi_handle->ops->extract_rtt_ev)
6188 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
6189 evt_buf, ev, hdump, hdump_len);
6190
6191 return QDF_STATUS_E_FAILURE;
6192}
6193
6194/**
6195 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
6196 * @wmi_handle: wmi handle
6197 * @param evt_buf: pointer to event buffer
6198 * @param index: Index into extended peer stats
6199 * @param peer_extd_stats: Pointer to hold extended peer stats
6200 *
6201 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6202 */
6203QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
6204 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
6205{
6206 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6207
6208 if (wmi_handle->ops->extract_peer_extd_stats)
6209 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
6210 evt_buf, index, peer_extd_stats);
6211
6212 return QDF_STATUS_E_FAILURE;
6213}
6214
6215/**
6216 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
6217 * @wmi_handle: wmi handle
6218 * @param evt_buf: pointer to event buffer
6219 * @param wds_ev: Pointer to hold rtt error report
6220 *
6221 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6222 */
6223QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
6224 wmi_host_rtt_error_report_event *ev)
6225{
6226 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6227
6228 if (wmi_handle->ops->extract_rtt_error_report_ev)
6229 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
6230 evt_buf, ev);
6231
6232 return QDF_STATUS_E_FAILURE;
6233}
6234
6235/**
6236 * wmi_extract_chan_stats() - extract chan stats from event
6237 * @wmi_handle: wmi handle
6238 * @param evt_buf: pointer to event buffer
6239 * @param index: Index into chan stats
6240 * @param chanstats: Pointer to hold chan stats
6241 *
6242 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6243 */
6244QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
6245 uint32_t index, wmi_host_chan_stats *chan_stats)
6246{
6247 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6248
6249 if (wmi_handle->ops->extract_chan_stats)
6250 return wmi_handle->ops->extract_chan_stats(wmi_handle,
6251 evt_buf, index, chan_stats);
6252
6253 return QDF_STATUS_E_FAILURE;
6254}
6255
6256/**
6257 * wmi_extract_thermal_stats() - extract thermal stats from event
6258 * @wmi_handle: wmi handle
6259 * @param evt_buf: Pointer to event buffer
6260 * @param temp: Pointer to hold extracted temperature
6261 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306262 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306263 *
6264 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6265 */
6266QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306267 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306268{
6269 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6270
6271 if (wmi_handle->ops->extract_thermal_stats)
6272 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306273 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306274
6275 return QDF_STATUS_E_FAILURE;
6276}
6277
6278/**
6279 * wmi_extract_profile_ctx() - extract profile context from event
6280 * @wmi_handle: wmi handle
6281 * @param evt_buf: pointer to event buffer
6282 * @param profile_ctx: Pointer to hold profile context
6283 *
6284 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6285 */
6286QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
6287 wmi_host_wlan_profile_ctx_t *profile_ctx)
6288{
6289 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6290
6291 if (wmi_handle->ops->extract_profile_ctx)
6292 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
6293 evt_buf, profile_ctx);
6294
6295 return QDF_STATUS_E_FAILURE;
6296}
6297
6298/**
6299 * wmi_extract_thermal_level_stats() - extract thermal level stats from
6300 * event
6301 * @wmi_handle: wmi handle
6302 * @param evt_buf: pointer to event buffer
6303 * @param idx: Index to level stats
6304 * @param levelcount: Pointer to hold levelcount
6305 * @param dccount: Pointer to hold dccount
6306 *
6307 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6308 */
6309QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
6310 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
6311{
6312 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6313
6314 if (wmi_handle->ops->extract_thermal_level_stats)
6315 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
6316 evt_buf, idx, levelcount, dccount);
6317
6318 return QDF_STATUS_E_FAILURE;
6319}
6320
6321/**
6322 * wmi_extract_profile_data() - extract profile data from event
6323 * @wmi_handle: wmi handle
6324 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05306325 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306326 * @param profile_data: Pointer to hold profile data
6327 *
6328 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6329 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05306330QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306331 wmi_host_wlan_profile_t *profile_data)
6332{
6333 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6334
6335 if (wmi_handle->ops->extract_profile_data)
6336 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05306337 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306338
6339 return QDF_STATUS_E_FAILURE;
6340}
6341
6342/**
6343 * wmi_extract_chan_info_event() - extract chan information from event
6344 * @wmi_handle: wmi handle
6345 * @param evt_buf: pointer to event buffer
6346 * @param chan_info: Pointer to hold chan information
6347 *
6348 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6349 */
6350QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
6351 wmi_host_chan_info_event *chan_info)
6352{
6353 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6354
6355 if (wmi_handle->ops->extract_chan_info_event)
6356 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
6357 evt_buf, chan_info);
6358
6359 return QDF_STATUS_E_FAILURE;
6360}
6361
6362/**
6363 * wmi_extract_channel_hopping_event() - extract channel hopping param
6364 * from event
6365 * @wmi_handle: wmi handle
6366 * @param evt_buf: pointer to event buffer
6367 * @param ch_hopping: Pointer to hold channel hopping param
6368 *
6369 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6370 */
6371QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
6372 wmi_host_pdev_channel_hopping_event *ch_hopping)
6373{
6374 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6375
6376 if (wmi->ops->extract_channel_hopping_event)
6377 return wmi->ops->extract_channel_hopping_event(wmi,
6378 evt_buf, ch_hopping);
6379
6380 return QDF_STATUS_E_FAILURE;
6381}
6382
6383/**
6384 * wmi_extract_bss_chan_info_event() - extract bss channel information
6385 * from event
6386 * @wmi_handle: wmi handle
6387 * @param evt_buf: pointer to event buffer
6388 * @param bss_chan_info: Pointer to hold bss channel information
6389 *
6390 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6391 */
6392QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6393 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6394{
6395 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6396
6397 if (wmi_handle->ops->extract_bss_chan_info_event)
6398 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6399 evt_buf, bss_chan_info);
6400
6401 return QDF_STATUS_E_FAILURE;
6402}
6403
6404/**
6405 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6406 * @wmi_handle: wmi handle
6407 * @param evt_buf: pointer to event buffer
6408 * @param inst_rssi_resp: Pointer to hold inst rssi response
6409 *
6410 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6411 */
6412QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6413 wmi_host_inst_stats_resp *inst_rssi_resp)
6414{
6415 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6416
6417 if (wmi->ops->extract_inst_rssi_stats_event)
6418 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6419 evt_buf, inst_rssi_resp);
6420
6421 return QDF_STATUS_E_FAILURE;
6422}
6423
6424/**
6425 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6426 * from event
6427 * @wmi_handle: wmi handle
6428 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306429 * @param ev: Pointer to hold data traffic control
6430 *
6431 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6432 */
6433QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6434 wmi_host_tx_data_traffic_ctrl_event *ev)
6435{
6436 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6437
6438 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6439 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6440 evt_buf, ev);
6441
6442 return QDF_STATUS_E_FAILURE;
6443}
6444
6445/**
Sathish Kumar68789382016-11-14 17:44:29 +05306446 * wmi_extract_atf_peer_stats_ev() - extract atf peer stats
6447 * from event
6448 * @wmi_handle: wmi handle
6449 * @param evt_buf: pointer to event buffer
6450 * @param ev: Pointer to hold atf peer stats
6451 *
6452 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6453 */
6454QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
6455 wmi_host_atf_peer_stats_event *ev)
6456{
6457 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6458
6459 if (wmi->ops->extract_atf_peer_stats_ev)
6460 return wmi->ops->extract_atf_peer_stats_ev(wmi,
6461 evt_buf, ev);
6462
6463 return QDF_STATUS_E_FAILURE;
6464}
6465
6466/**
6467 * wmi_extract_atf_token_info_ev() - extract atf token info
6468 * from event
6469 * @wmi_handle: wmi handle
6470 * @param evt_buf: pointer to event buffer
6471 * @param idx: Index indicating the peer number
6472 * @param ev: Pointer to hold atf token info
6473 *
6474 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6475 */
6476QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf,
6477 uint8_t idx, wmi_host_atf_peer_stats_info *ev)
6478{
6479 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6480
6481 if (wmi->ops->extract_atf_token_info_ev)
6482 return wmi->ops->extract_atf_token_info_ev(wmi,
6483 evt_buf, idx, ev);
6484
6485 return QDF_STATUS_E_FAILURE;
6486}
6487
6488/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306489 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6490 * @wmi_handle: wmi handle
6491 * @param evt_buf: pointer to event buffer
6492 * @param index: Index into extended vdev stats
6493 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6494 *
6495 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6496 */
6497QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6498 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6499{
6500 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6501
6502 if (wmi_handle->ops->extract_vdev_extd_stats)
6503 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6504 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306505 return QDF_STATUS_E_FAILURE;
6506}
6507
6508/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05306509 * wmi_extract_bcn_stats() - extract beacon stats from event
6510 * @wmi_handle: wmi handle
6511 * @evt_buf: pointer to event buffer
6512 * @index: Index into beacon stats
6513 * @vdev_bcn_stats: Pointer to hold beacon stats
6514 *
6515 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6516 */
6517QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
6518 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
6519{
6520 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6521
6522 if (wmi_handle->ops->extract_bcn_stats)
6523 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
6524 evt_buf, index, vdev_bcn_stats);
6525 return QDF_STATUS_E_FAILURE;
6526}
6527
6528/**
Gupta, Kapil2e685982016-04-25 19:14:19 +05306529 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6530 * adaptive dwelltime configuration params
6531 * @wma_handle: wma handler
6532 * @dwelltime_params: pointer to dwelltime_params
6533 *
6534 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6535 */
6536QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6537 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6538{
6539 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6540
6541 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6542 return wmi_handle->ops->
6543 send_adapt_dwelltime_params_cmd(wmi_handle,
6544 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306545
6546 return QDF_STATUS_E_FAILURE;
6547}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306548
6549/**
6550 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6551 * @wmi_handle: wmi handle
6552 * @param: wmi power debug parameter
6553 *
6554 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6555 *
6556 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6557 */
6558QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6559 struct wmi_power_dbg_params *param)
6560{
6561 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6562
6563 if (wmi_handle->ops->send_power_dbg_cmd)
6564 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6565 param);
6566
6567 return QDF_STATUS_E_FAILURE;
6568}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306569
6570/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05306571 * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart
6572 * @wmi_handle: wmi handle
6573 * @param: multiple vdev restart parameter
6574 *
6575 * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw.
6576 *
6577 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6578 */
6579QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
6580 struct multiple_vdev_restart_params *param)
6581{
6582 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6583
6584 if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd)
6585 return wmi_handle->ops->send_multiple_vdev_restart_req_cmd(
6586 wmi_handle,
6587 param);
6588
6589 return QDF_STATUS_E_FAILURE;
6590}
6591
6592/**
Manikandan Mohan31a13e22016-12-13 13:14:06 -08006593 * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw
6594 * @wmi_hdl: wmi handle
6595 * @params: sar limit command params
6596 *
6597 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6598 */
6599QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
6600 struct sar_limit_cmd_params *params)
6601{
6602 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6603
6604 if (wmi_handle->ops->send_sar_limit_cmd)
6605 return wmi_handle->ops->send_sar_limit_cmd(
6606 wmi_handle,
6607 params);
6608 return QDF_STATUS_E_FAILURE;
6609}
6610
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306611#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306612QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306613 struct disa_encrypt_decrypt_req_params *params)
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306614{
6615 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6616
6617 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6618 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6619 wmi_handle,
6620 params);
Sathish Kumar68789382016-11-14 17:44:29 +05306621 return QDF_STATUS_E_FAILURE;
6622}
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306623
6624QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
6625 uint8_t *evt_buf,
6626 struct disa_encrypt_decrypt_resp_params *resp)
6627{
6628 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
6629
6630 if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
6631 return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
6632 wmi_handle, evt_buf, resp);
6633
6634 return QDF_STATUS_E_FAILURE;
6635}
6636
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306637#endif
Sathish Kumar68789382016-11-14 17:44:29 +05306638
6639/*
6640 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
6641 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05306642 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05306643 *
6644 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6645 *
6646 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6647 */
6648QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306649 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05306650{
6651 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6652
6653 if (wmi->ops->send_btcoex_wlan_priority_cmd)
6654 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306655 param);
6656
6657 return QDF_STATUS_E_FAILURE;
6658}
6659/**
6660 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
6661 * @wmi_handle: wmi handle
6662 * @param: wmi btcoex cfg params
6663 *
6664 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6665 *
6666 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6667 */
6668QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
6669 struct btcoex_cfg_params *param)
6670{
6671 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6672
6673 if (wmi->ops->send_btcoex_duty_cycle_cmd)
6674 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
6675 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306676
6677 return QDF_STATUS_E_FAILURE;
6678}
Kiran Venkatappa06520822016-08-10 23:55:40 +05306679
6680/*
6681 * wmi_extract_service_ready_ext() - extract extended service ready
6682 * @wmi_handle: wmi handle
6683 * @param: wmi power debug parameter
6684 *
6685 *
6686 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6687 */
6688QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006689 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306690{
6691 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6692
6693 if (wmi_handle->ops->extract_service_ready_ext)
6694 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
6695 evt_buf, param);
6696
6697 return QDF_STATUS_E_FAILURE;
6698}
6699
6700/**
6701 * wmi_extract_hw_mode_cap_service_ready_ext() -
6702 * extract HW mode cap from service ready event
6703 * @wmi_handle: wmi handle
6704 * @param evt_buf: pointer to event buffer
6705 * @param param: Pointer to hold evt buf
6706 * @param hw_mode_idx: hw mode idx should be less than num_mode
6707 *
6708 * Return: QDF_STATUS_SUCCESS for success or error code
6709 */
6710QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
6711 void *wmi_hdl,
6712 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006713 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306714{
6715 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6716
6717 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
6718 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
6719 wmi_handle,
6720 evt_buf, hw_mode_idx, param);
6721
6722 return QDF_STATUS_E_FAILURE;
6723}
6724/**
6725 * wmi_extract_mac_phy_cap_service_ready_ext() -
6726 * extract MAC phy cap from service ready event
6727 * @wmi_handle: wmi handle
6728 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306729 * @param hw_mode_id: hw mode id of hw_mode_caps
6730 * @param phy_id: phy_id within hw_mode_cap
6731 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05306732 *
6733 * Return: QDF_STATUS_SUCCESS for success or error code
6734 */
6735QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
6736 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306737 uint8_t *evt_buf,
6738 uint8_t hw_mode_id,
6739 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006740 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306741{
6742 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6743
6744 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
6745 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
6746 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306747 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05306748
6749 return QDF_STATUS_E_FAILURE;
6750}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306751
Kiran Venkatappa06520822016-08-10 23:55:40 +05306752/**
6753 * wmi_extract_reg_cap_service_ready_ext() -
6754 * extract REG cap from service ready event
6755 * @wmi_handle: wmi handle
6756 * @param evt_buf: pointer to event buffer
6757 * @param param: Pointer to hold evt buf
6758 * @param phy_idx: phy idx should be less than num_mode
6759 *
6760 * Return: QDF_STATUS_SUCCESS for success or error code
6761 */
6762QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
6763 void *wmi_hdl,
6764 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006765 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306766{
6767 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6768
6769 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
6770 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
6771 wmi_handle,
6772 evt_buf, phy_idx, param);
6773
6774 return QDF_STATUS_E_FAILURE;
6775}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306776
Sathish Kumarf396c722017-11-17 17:30:41 +05306777QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
6778 void *wmi_hdl,
6779 uint8_t *evt_buf, uint8_t idx,
6780 struct wlan_psoc_host_dbr_ring_caps *param)
6781{
6782 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6783
6784 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
6785 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
6786 wmi_handle,
6787 evt_buf, idx, param);
6788
6789 return QDF_STATUS_E_FAILURE;
6790}
6791
6792QDF_STATUS wmi_extract_dbr_buf_release_fixed(
6793 void *wmi_hdl,
6794 uint8_t *evt_buf,
6795 struct direct_buf_rx_rsp *param)
6796{
6797 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6798
6799 if (wmi_handle->ops->extract_dbr_buf_release_fixed)
6800 return wmi_handle->ops->extract_dbr_buf_release_fixed(
6801 wmi_handle,
6802 evt_buf, param);
6803
6804 return QDF_STATUS_E_FAILURE;
6805}
6806
6807QDF_STATUS wmi_extract_dbr_buf_release_entry(
6808 void *wmi_hdl,
6809 uint8_t *evt_buf, uint8_t idx,
6810 struct direct_buf_rx_entry *param)
6811{
6812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6813
6814 if (wmi_handle->ops->extract_dbr_buf_release_entry)
6815 return wmi_handle->ops->extract_dbr_buf_release_entry(
6816 wmi_handle,
6817 evt_buf, idx, param);
6818
6819 return QDF_STATUS_E_FAILURE;
6820}
6821
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306822/**
6823 * wmi_extract_pdev_utf_event() -
6824 * extract UTF data from pdev utf event
6825 * @wmi_handle: wmi handle
6826 * @param evt_buf: pointer to event buffer
6827 * @param param: Pointer to hold evt buf
6828 *
6829 * Return: QDF_STATUS_SUCCESS for success or error code
6830 */
6831QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
6832 uint8_t *evt_buf,
6833 struct wmi_host_pdev_utf_event *param)
6834{
6835 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6836
6837 if (wmi_handle->ops->extract_pdev_utf_event)
6838 return wmi_handle->ops->extract_pdev_utf_event(
6839 wmi_handle,
6840 evt_buf, param);
6841
6842 return QDF_STATUS_E_FAILURE;
6843}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306844
6845/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05306846 * wmi_extract_pdev_qvit_event() -
6847 * extract UTF data from pdev qvit event
6848 * @wmi_handle: wmi handle
6849 * @param evt_buf: pointer to event buffer
6850 * @param param: Pointer to hold evt buf
6851 *
6852 * Return: QDF_STATUS_SUCCESS for success or error code
6853 */
6854QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
6855 uint8_t *evt_buf,
6856 struct wmi_host_pdev_qvit_event *param)
6857{
6858 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6859
6860 if (wmi_handle->ops->extract_pdev_qvit_event)
6861 return wmi_handle->ops->extract_pdev_qvit_event(
6862 wmi_handle,
6863 evt_buf, param);
6864
6865 return QDF_STATUS_E_FAILURE;
6866}
6867
6868/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05306869 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
6870 * @wmi_handle: wmi handle
6871 * @param: wmi coex ver cfg params
6872 *
6873 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
6874 *
6875 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6876 */
6877QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
6878 coex_ver_cfg_t *param)
6879{
6880 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6881
6882 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
6883 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
6884 param);
6885
6886 return QDF_STATUS_E_FAILURE;
6887}
6888
6889/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05306890 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
6891 * @wmi_handle: wmi handle
6892 * @param: wmi coex cfg cmd params
6893 *
6894 * Send WMI_COEX_CFG_CMD parameters to fw.
6895 *
6896 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6897 */
6898QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
6899 struct coex_config_params *param)
6900{
6901 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6902
6903 if (wmi_handle->ops->send_coex_config_cmd)
6904 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
6905 param);
6906
6907 return QDF_STATUS_E_FAILURE;
6908}
6909
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05306910QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
6911 struct rcpi_req *get_rcpi_param)
6912{
6913 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6914
6915 if (wmi_handle->ops->send_get_rcpi_cmd)
6916 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
6917 get_rcpi_param);
6918
6919 return QDF_STATUS_E_FAILURE;
6920}
6921
6922QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
6923 struct rcpi_res *res)
6924{
6925 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6926 struct wmi_ops *ops = wmi_handle->ops;
6927
6928 if (ops->extract_rcpi_response_event)
6929 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
6930 res);
6931
6932 return QDF_STATUS_E_FAILURE;
6933}
6934
Sathish Kumar80f4f382017-04-24 11:36:00 +05306935/**
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306936 * wmi_extract_peer_delete_response_event() -
6937 * extract vdev id and peer mac addresse from peer delete response event
6938 * @wmi_handle: wmi handle
6939 * @param evt_buf: pointer to event buffer
6940 * @param param: Pointer to hold evt buf
6941 *
6942 * Return: QDF_STATUS_SUCCESS for success or error code
6943 */
6944QDF_STATUS wmi_extract_peer_delete_response_event(
6945 void *wmi_hdl,
6946 uint8_t *evt_buf,
6947 struct wmi_host_peer_delete_response_event *param)
6948{
6949 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6950
6951 if (wmi_handle->ops->extract_peer_delete_response_event)
6952 return wmi_handle->ops->extract_peer_delete_response_event(
6953 wmi_handle,
6954 evt_buf, param);
6955
6956 return QDF_STATUS_E_FAILURE;
6957}
Arif Hussainf00be1d2017-01-07 18:21:55 -08006958
6959QDF_STATUS
6960wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
6961 uint32_t pdev_id)
6962{
6963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6964
6965 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
6966 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
6967 wmi_handle, pdev_id);
6968
6969 return QDF_STATUS_E_FAILURE;
6970}
6971
6972QDF_STATUS
6973wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
6974 uint32_t pdev_id)
6975{
6976 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6977
6978 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
6979 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
6980 wmi_handle, pdev_id);
6981
6982 return QDF_STATUS_E_FAILURE;
6983}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05306984
6985/*
6986 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
6987 * @wmi_handle: wmi handle
6988 * @evt_buf: pointer to event buffer.
6989 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
6990 *
6991 *
6992 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6993 */
6994QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
6995 struct wlan_psoc_host_chainmask_table *chainmask_table)
6996{
6997 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6998
6999 if (wmi_handle->ops->extract_chainmask_tables)
7000 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
7001 evt_buf, chainmask_table);
7002
7003 return QDF_STATUS_E_FAILURE;
7004}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07007005/**
7006 * wmi_unified_set_country_cmd_send() - WMI set country function
7007 * @param wmi_handle : handle to WMI.
7008 * @param param : pointer to hold set country cmd parameter
7009 *
7010 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
7011 */
7012QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
7013 struct set_country *param)
7014{
7015 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7016
7017 if (wmi_handle->ops->send_set_country_cmd)
7018 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
7019 param);
7020
7021 return QDF_STATUS_E_FAILURE;
7022}
7023
Nitesh Shah52323d02017-05-22 15:49:00 +05307024/**
7025 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
7026 * DBS scan selection configuration params
7027 * @wma_handle: wma handler
7028 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
7029 *
7030 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
7031 */
7032QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
7033 struct wmi_dbs_scan_sel_params *dbs_scan_params)
7034{
7035 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7036
7037 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
7038 return wmi_handle->ops->
7039 send_dbs_scan_sel_params_cmd(wmi_handle,
7040 dbs_scan_params);
7041
7042 return QDF_STATUS_E_FAILURE;
7043}
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05307044
7045/**
7046 * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
7047 * configuration params
7048 * @wmi_hdl: wmi handler
7049 * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
7050 *
7051 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
7052 */
7053QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
7054 struct wmi_limit_off_chan_param *limit_off_chan_param)
7055{
7056 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7057
7058 if (wmi_handle->ops->send_limit_off_chan_cmd)
7059 return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
7060 limit_off_chan_param);
7061
7062 return QDF_STATUS_E_FAILURE;
7063}
Kiran Venkatappa7fe3afc2017-11-08 19:32:23 +05307064
7065/**
7066 * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
7067 * @wmi_hdl: wmi handle
7068 * @bcn_ctrl_param: pointer to bcn_offload_control param
7069 *
7070 * Return: QDF_STATUS_SUCCESS for success or error code
7071 */
7072QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
7073 struct bcn_offload_control *bcn_ctrl_param)
7074{
7075 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7076
7077 if (wmi_handle->ops->send_bcn_offload_control_cmd)
7078 return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle,
7079 bcn_ctrl_param);
7080
7081 return QDF_STATUS_E_FAILURE;
7082}
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05307083
7084/**
7085 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
7086 * wds entries from FW
7087 * @wmi_handle: wmi handle
7088 *
7089 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
7090 *
7091 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7092 */
7093QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
7094{
7095 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7096
7097 if (wmi_handle->ops->send_wds_entry_list_cmd)
7098 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
7099
7100 return QDF_STATUS_E_FAILURE;
7101}
7102
7103/**
7104 * wmi_extract_wds_entry - api to extract wds entry
7105 * @wmi_handle: wma handle
7106 * @evt_buf: pointer to event buffer
7107 * @wds_entry: wds entry
7108 * @idx: index to point wds entry in event buffer
7109 *
7110 * Return: QDF_STATUS_SUCCESS for successful event parse
7111 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
7112 */
7113QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
7114 struct wdsentry *wds_entry,
7115 u_int32_t idx)
7116{
7117 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7118
7119 if (wmi_handle->ops->extract_wds_entry)
7120 return wmi_handle->ops->extract_wds_entry(wmi_handle,
7121 evt_buf, wds_entry, idx);
7122
7123 return QDF_STATUS_E_FAILURE;
7124}
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007125
7126#ifdef WLAN_FEATURE_NAN_CONVERGENCE
7127QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
7128 struct nan_datapath_initiator_req *req)
7129{
7130 wmi_unified_t wmi_handle = wmi_hdl;
7131
7132 if (wmi_handle->ops->send_ndp_initiator_req_cmd)
7133 return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
7134 req);
7135
7136 return QDF_STATUS_E_FAILURE;
7137}
7138
7139QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
7140 struct nan_datapath_responder_req *req)
7141{
7142 wmi_unified_t wmi_handle = wmi_hdl;
7143
7144 if (wmi_handle->ops->send_ndp_responder_req_cmd)
7145 return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
7146 req);
7147
7148 return QDF_STATUS_E_FAILURE;
7149}
7150
7151QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
7152 struct nan_datapath_end_req *req)
7153{
7154 wmi_unified_t wmi_handle = wmi_hdl;
7155
7156 if (wmi_handle->ops->send_ndp_end_req_cmd)
7157 return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
7158 req);
7159
7160 return QDF_STATUS_E_FAILURE;
7161}
7162
7163QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
7164 uint8_t *data, struct nan_datapath_initiator_rsp **rsp)
7165{
7166 if (wmi_handle->ops->extract_ndp_initiator_rsp)
7167 return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
7168 data, rsp);
7169
7170 return QDF_STATUS_E_FAILURE;
7171}
7172
7173QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
7174 struct nan_datapath_indication_event **ind)
7175{
7176 if (wmi_handle->ops->extract_ndp_ind)
7177 return wmi_handle->ops->extract_ndp_ind(wmi_handle,
7178 data, ind);
7179
7180 return QDF_STATUS_E_FAILURE;
7181}
7182
7183QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
7184 struct nan_datapath_confirm_event **ev)
7185{
7186 if (wmi_handle->ops->extract_ndp_confirm)
7187 return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
7188 data, ev);
7189
7190 return QDF_STATUS_E_FAILURE;
7191}
7192
7193QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
7194 uint8_t *data, struct nan_datapath_responder_rsp **rsp)
7195{
7196 if (wmi_handle->ops->extract_ndp_responder_rsp)
7197 return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
7198 data, rsp);
7199
7200 return QDF_STATUS_E_FAILURE;
7201}
7202
7203QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
7204 struct nan_datapath_end_rsp_event **rsp)
7205{
7206 if (wmi_handle->ops->extract_ndp_end_rsp)
7207 return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
7208 data, rsp);
7209
7210 return QDF_STATUS_E_FAILURE;
7211}
7212
7213QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
7214 struct nan_datapath_end_indication_event **ind)
7215{
7216 if (wmi_handle->ops->extract_ndp_end_ind)
7217 return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
7218 data, ind);
7219
7220 return QDF_STATUS_E_FAILURE;
7221}
7222#endif