blob: 6dce61cbb18abdaac2ae8ee5c63dd65a6a7aba9d [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 *
Govind Singh5eb51532016-03-09 11:34:12 +05304 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Govind Singh5eb51532016-03-09 11:34:12 +053019#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053020#include "wmi_unified_param.h"
Pratik Gandhi67da1bb2018-01-30 19:05:41 +053021#include "qdf_module.h"
Govind Singh5eb51532016-03-09 11:34:12 +053022
Naveen Rawat26305452018-02-02 15:18:33 -080023static const wmi_host_channel_width mode_to_width[WMI_HOST_MODE_MAX] = {
24 [WMI_HOST_MODE_11A] = WMI_HOST_CHAN_WIDTH_20,
25 [WMI_HOST_MODE_11G] = WMI_HOST_CHAN_WIDTH_20,
26 [WMI_HOST_MODE_11B] = WMI_HOST_CHAN_WIDTH_20,
27 [WMI_HOST_MODE_11GONLY] = WMI_HOST_CHAN_WIDTH_20,
28 [WMI_HOST_MODE_11NA_HT20] = WMI_HOST_CHAN_WIDTH_20,
29 [WMI_HOST_MODE_11NG_HT20] = WMI_HOST_CHAN_WIDTH_20,
30 [WMI_HOST_MODE_11AC_VHT20] = WMI_HOST_CHAN_WIDTH_20,
31 [WMI_HOST_MODE_11AC_VHT20_2G] = WMI_HOST_CHAN_WIDTH_20,
32 [WMI_HOST_MODE_11NA_HT40] = WMI_HOST_CHAN_WIDTH_40,
33 [WMI_HOST_MODE_11NG_HT40] = WMI_HOST_CHAN_WIDTH_40,
34 [WMI_HOST_MODE_11AC_VHT40] = WMI_HOST_CHAN_WIDTH_40,
35 [WMI_HOST_MODE_11AC_VHT40_2G] = WMI_HOST_CHAN_WIDTH_40,
36 [WMI_HOST_MODE_11AC_VHT80] = WMI_HOST_CHAN_WIDTH_80,
37 [WMI_HOST_MODE_11AC_VHT80_2G] = WMI_HOST_CHAN_WIDTH_80,
38#if CONFIG_160MHZ_SUPPORT
39 [WMI_HOST_MODE_11AC_VHT80_80] = WMI_HOST_CHAN_WIDTH_80P80,
40 [WMI_HOST_MODE_11AC_VHT160] = WMI_HOST_CHAN_WIDTH_160,
41#endif
42
43#if SUPPORT_11AX
44 [WMI_HOST_MODE_11AX_HE20] = WMI_HOST_CHAN_WIDTH_20,
45 [WMI_HOST_MODE_11AX_HE40] = WMI_HOST_CHAN_WIDTH_40,
46 [WMI_HOST_MODE_11AX_HE80] = WMI_HOST_CHAN_WIDTH_80,
47 [WMI_HOST_MODE_11AX_HE80_80] = WMI_HOST_CHAN_WIDTH_80P80,
48 [WMI_HOST_MODE_11AX_HE160] = WMI_HOST_CHAN_WIDTH_160,
49 [WMI_HOST_MODE_11AX_HE20_2G] = WMI_HOST_CHAN_WIDTH_20,
50 [WMI_HOST_MODE_11AX_HE40_2G] = WMI_HOST_CHAN_WIDTH_40,
51 [WMI_HOST_MODE_11AX_HE80_2G] = WMI_HOST_CHAN_WIDTH_80,
52#endif
53};
54
Govind Singh5eb51532016-03-09 11:34:12 +053055/**
56 * wmi_unified_vdev_create_send() - send VDEV create command to fw
57 * @wmi_handle: wmi handle
58 * @param: pointer to hold vdev create parameter
59 * @macaddr: vdev mac address
60 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053061 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053062 */
Govind Singhb53420c2016-03-09 14:32:57 +053063QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053064 uint8_t macaddr[IEEE80211_ADDR_LEN],
65 struct vdev_create_params *param)
66{
67 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
68
69 if (wmi_handle->ops->send_vdev_create_cmd)
70 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
71 macaddr, param);
72
Govind Singhb53420c2016-03-09 14:32:57 +053073 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053074}
75
76/**
77 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
78 * @wmi_handle: wmi handle
79 * @if_id: vdev id
80 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053081 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053082 */
Govind Singhb53420c2016-03-09 14:32:57 +053083QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053084 uint8_t if_id)
85{
86 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
87
88 if (wmi_handle->ops->send_vdev_delete_cmd)
89 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
90 if_id);
91
Govind Singhb53420c2016-03-09 14:32:57 +053092 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053093}
94
95/**
96 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
97 * @wmi: wmi handle
98 * @vdev_id: vdev id
99 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530100 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530101 */
Govind Singhb53420c2016-03-09 14:32:57 +0530102QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530103 uint8_t vdev_id)
104{
105 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
106
107 if (wmi_handle->ops->send_vdev_stop_cmd)
108 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
109 vdev_id);
110
Govind Singhb53420c2016-03-09 14:32:57 +0530111 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530112}
113
114/**
115 * wmi_unified_vdev_down_send() - send vdev down command to fw
116 * @wmi: wmi handle
117 * @vdev_id: vdev id
118 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530119 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530120 */
Govind Singhb53420c2016-03-09 14:32:57 +0530121QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530122{
123 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
124
125 if (wmi_handle->ops->send_vdev_down_cmd)
126 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
127
Govind Singhb53420c2016-03-09 14:32:57 +0530128 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530129}
130
131/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530132 * wmi_unified_vdev_start_send() - send vdev start command to fw
133 * @wmi: wmi handle
134 * @vdev_id: vdev id
135 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530136 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530137 */
138QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
139 struct vdev_start_params *req)
140{
141 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
142
143 if (wmi_handle->ops->send_vdev_start_cmd)
144 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
145
146 return QDF_STATUS_E_FAILURE;
147}
148
149/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +0530150 * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
151 * @wmi: wmi handle
152 * @req: pointer to hold nac rssi request data
153 *
154 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
155 */
156QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
157 struct vdev_scan_nac_rssi_params *req)
158{
159 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
160
161 if (wmi_handle->ops->send_vdev_set_nac_rssi_cmd)
162 return wmi_handle->ops->send_vdev_set_nac_rssi_cmd(wmi_handle, req);
163
164 return QDF_STATUS_E_FAILURE;
165}
166
167/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530168 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
169 * @wmi: wmi handle
170 * @restart_params: vdev restart params
171 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530172 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530173 */
174QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
175 struct hidden_ssid_vdev_restart_params *restart_params)
176{
177 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
178
179 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
180 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
181 wmi_handle, restart_params);
182
183 return QDF_STATUS_E_FAILURE;
184}
185
186/**
Govind Singh5eb51532016-03-09 11:34:12 +0530187 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
188 * @wmi: wmi handle
189 * @peer_addr: peer mac address
190 * @param: pointer to hold peer flush tid 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_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530195 uint8_t peer_addr[IEEE80211_ADDR_LEN],
196 struct peer_flush_params *param)
197{
198 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
199
200 if (wmi_handle->ops->send_peer_flush_tids_cmd)
201 return wmi_handle->ops->send_peer_flush_tids_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_peer_delete_send() - send PEER delete command to fw
209 * @wmi: wmi handle
210 * @peer_addr: peer mac addr
211 * @vdev_id: vdev id
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_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530216 uint8_t
217 peer_addr[IEEE80211_ADDR_LEN],
218 uint8_t vdev_id)
219{
220 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
221
222 if (wmi_handle->ops->send_peer_delete_cmd)
223 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
224 peer_addr, vdev_id);
225
Govind Singhb53420c2016-03-09 14:32:57 +0530226 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530227}
228
229/**
230 * wmi_set_peer_param() - set peer parameter in fw
231 * @wmi_ctx: wmi handle
232 * @peer_addr: peer mac address
233 * @param : pointer to hold peer set parameter
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_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530238 uint8_t peer_addr[IEEE80211_ADDR_LEN],
239 struct peer_set_params *param)
240{
241 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
242
243 if (wmi_handle->ops->send_peer_param_cmd)
244 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
245 peer_addr, param);
246
Govind Singhb53420c2016-03-09 14:32:57 +0530247 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530248}
249
250/**
251 * wmi_unified_vdev_up_send() - send vdev up command in fw
252 * @wmi: wmi handle
253 * @bssid: bssid
254 * @vdev_up_params: pointer to hold vdev up parameter
255 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530256 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530257 */
Govind Singhb53420c2016-03-09 14:32:57 +0530258QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530259 uint8_t bssid[IEEE80211_ADDR_LEN],
260 struct vdev_up_params *params)
261{
262 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
263
264 if (wmi_handle->ops->send_vdev_up_cmd)
265 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
266 params);
267
Govind Singhb53420c2016-03-09 14:32:57 +0530268 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530269}
270
271/**
272 * wmi_unified_peer_create_send() - send peer create command to fw
273 * @wmi: wmi handle
274 * @peer_addr: peer mac address
275 * @peer_type: peer type
276 * @vdev_id: vdev id
277 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530278 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530279 */
Govind Singhb53420c2016-03-09 14:32:57 +0530280QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530281 struct peer_create_params *param)
282{
283 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
284
285 if (wmi_handle->ops->send_peer_create_cmd)
286 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
287
Govind Singhb53420c2016-03-09 14:32:57 +0530288 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530289}
290
Leo Changeee40872016-09-28 13:43:36 -0700291/**
292 * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
293 * setup command to fw
294 * @wmi: wmi handle
295 * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters
296 *
297 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
298 */
299QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
300 struct rx_reorder_queue_setup_params *param)
301{
302 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
303
304 if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd)
305 return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd(
306 wmi_handle, param);
307
308 return QDF_STATUS_E_FAILURE;
309}
310
311/**
312 * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
313 * remove command to fw
314 * @wmi: wmi handle
315 * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters
316 *
317 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
318 */
319QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
320 struct rx_reorder_queue_remove_params *param)
321{
322 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
323
324 if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd)
325 return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd(
326 wmi_handle, param);
327
328 return QDF_STATUS_E_FAILURE;
329}
330
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530331#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh5eb51532016-03-09 11:34:12 +0530332/**
333 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
334 * @wmi_handle: wmi handle
335 * @value: value
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530336 * @pdev_id: pdev id to have radio context
Govind Singh5eb51532016-03-09 11:34:12 +0530337 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530338 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530339 */
Govind Singhb53420c2016-03-09 14:32:57 +0530340QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530341 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530342{
343 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
344
345 if (wmi_handle->ops->send_green_ap_ps_cmd)
346 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530347 pdev_id);
Govind Singh5eb51532016-03-09 11:34:12 +0530348
Govind Singhb53420c2016-03-09 14:32:57 +0530349 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530350}
351#else
Govind Singhb53420c2016-03-09 14:32:57 +0530352QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530353 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530354{
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530355 return QDF_STATUS_SUCCESS;
Govind Singh5eb51532016-03-09 11:34:12 +0530356}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530357#endif /* WLAN_SUPPORT_GREEN_AP */
Govind Singh5eb51532016-03-09 11:34:12 +0530358
359/**
360 * wmi_unified_pdev_utf_cmd() - send utf command to fw
361 * @wmi_handle: wmi handle
362 * @param: pointer to pdev_utf_params
363 * @mac_id: mac id to have radio context
364 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530365 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530366 */
Govind Singhb53420c2016-03-09 14:32:57 +0530367QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530368wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
369 struct pdev_utf_params *param,
370 uint8_t mac_id)
371{
372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
373
374 if (wmi_handle->ops->send_pdev_utf_cmd)
375 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
376 mac_id);
377
Govind Singhb53420c2016-03-09 14:32:57 +0530378 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530379}
380
381/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530382 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530383 * @wmi_handle: wmi handle
384 * @param: pointer to pdev parameter
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 failures,
388 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530389 */
Govind Singhb53420c2016-03-09 14:32:57 +0530390QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530391wmi_unified_pdev_param_send(void *wmi_hdl,
392 struct pdev_params *param,
393 uint8_t mac_id)
394{
395 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
396
397 if (wmi_handle->ops->send_pdev_param_cmd)
398 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
399 mac_id);
400
Govind Singhb53420c2016-03-09 14:32:57 +0530401 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530402}
403
404/**
405 * wmi_unified_suspend_send() - WMI suspend function
406 * @param wmi_handle : handle to WMI.
407 * @param param : pointer to hold suspend parameter
408 * @mac_id: radio context
409 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530410 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530411 */
Govind Singhb53420c2016-03-09 14:32:57 +0530412QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530413 struct suspend_params *param,
414 uint8_t mac_id)
415{
416 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
417
418 if (wmi_handle->ops->send_suspend_cmd)
419 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
420 mac_id);
421
Govind Singhb53420c2016-03-09 14:32:57 +0530422 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530423}
424
425/**
426 * wmi_unified_resume_send - WMI resume function
427 * @param wmi_handle : handle to WMI.
428 * @mac_id: radio context
429 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530430 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530431 */
Govind Singhb53420c2016-03-09 14:32:57 +0530432QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530433 uint8_t mac_id)
434{
435 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
436
437 if (wmi_handle->ops->send_resume_cmd)
438 return wmi_handle->ops->send_resume_cmd(wmi_handle,
439 mac_id);
440
Govind Singhb53420c2016-03-09 14:32:57 +0530441 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530442}
443
Will Huang422ac9a2017-11-17 13:19:16 +0800444#ifdef FEATURE_WLAN_D0WOW
445/**
446 * wmi_unified_d0wow_enable_send() - WMI d0 wow enable function
447 * @param wmi_handle: handle to WMI.
448 * @mac_id: radio context
449 *
450 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
451 */
452QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
453 uint8_t mac_id)
454{
455 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
456
457 if (wmi_handle->ops->send_d0wow_enable_cmd)
458 return wmi_handle->ops->send_d0wow_enable_cmd(
459 wmi_handle, mac_id);
460
461 return QDF_STATUS_E_FAILURE;
462}
463
464/**
465 * wmi_unified_d0wow_disable_send() - WMI d0 wow disable function
466 * @param wmi_handle: handle to WMI.
467 * @mac_id: radio context
468 *
469 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
470 */
471QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
472 uint8_t mac_id)
473{
474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
475
476 if (wmi_handle->ops->send_d0wow_disable_cmd)
477 return wmi_handle->ops->send_d0wow_disable_cmd(
478 wmi_handle, mac_id);
479
480 return QDF_STATUS_E_FAILURE;
481}
482#endif
483
Govind Singh5eb51532016-03-09 11:34:12 +0530484/**
485 * wmi_unified_wow_enable_send() - WMI wow enable function
486 * @param wmi_handle : handle to WMI.
487 * @param param : pointer to hold wow enable parameter
488 * @mac_id: radio context
489 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530490 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530491 */
Govind Singhb53420c2016-03-09 14:32:57 +0530492QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530493 struct wow_cmd_params *param,
494 uint8_t mac_id)
495{
496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
497
498 if (wmi_handle->ops->send_wow_enable_cmd)
499 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
500 mac_id);
501
Govind Singhb53420c2016-03-09 14:32:57 +0530502 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530503}
504
505/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530506 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
507 * @param wmi_hdl : handle to WMI.
508 *
509 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
510 */
511QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
512{
513 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
514
515 if (wmi_handle->ops->send_wow_wakeup_cmd)
516 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
517
518 return QDF_STATUS_E_FAILURE;
519}
520
521/**
522 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
523 * @param wmi_handle : handle to WMI.
524 * @param: pointer to wow wakeup event parameter structure
525 *
526 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
527 */
528QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
529 struct wow_add_wakeup_params *param)
530{
531 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
532
533 if (wmi->ops->send_wow_add_wakeup_event_cmd)
534 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
535 param);
536
537 return QDF_STATUS_E_FAILURE;
538}
539
540/**
541 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
542 * @param wmi_handle : handle to WMI.
543 * @param: pointer to wow wakeup pattern parameter structure
544 *
545 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
546 */
547QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
548 struct wow_add_wakeup_pattern_params *param)
549{
550 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
551
552 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
553 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
554
555 return QDF_STATUS_E_FAILURE;
556}
557
558/**
559 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
560 * @param wmi_handle : handle to WMI.
561 * @param: pointer to wow wakeup pattern parameter structure
562 *
563 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
564 */
565QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
566 struct wow_remove_wakeup_pattern_params *param)
567{
568 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
569
570 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
571 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
572
573 return QDF_STATUS_E_FAILURE;
574}
575
576/**
Govind Singh5eb51532016-03-09 11:34:12 +0530577 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
578 * @wma_ctx: wma context
579 * @peer_addr: peer mac address
580 * @param: pointer to ap_ps parameter structure
581 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530582 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530583 */
Govind Singhb53420c2016-03-09 14:32:57 +0530584QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530585 uint8_t *peer_addr,
586 struct ap_ps_params *param)
587{
588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
589
590 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
591 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
592 peer_addr,
593 param);
594
Govind Singhb53420c2016-03-09 14:32:57 +0530595 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530596}
597
598/**
599 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
600 * @wma_ctx: wma context
601 * @peer_addr: peer mac address
602 * @param: pointer to sta_ps parameter structure
603 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530604 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530605 */
Govind Singhb53420c2016-03-09 14:32:57 +0530606QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530607 struct sta_ps_params *param)
608{
609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
610
611 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
612 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
613 param);
614
Govind Singhb53420c2016-03-09 14:32:57 +0530615 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530616}
617
618/**
619 * wmi_crash_inject() - inject fw crash
620 * @wma_handle: wma handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -0700621 * @param: ponirt to crash inject parameter structure
Govind Singh5eb51532016-03-09 11:34:12 +0530622 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530623 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530624 */
Govind Singhb53420c2016-03-09 14:32:57 +0530625QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530626 struct crash_inject *param)
627{
628 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
629
630 if (wmi_handle->ops->send_crash_inject_cmd)
631 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
632 param);
633
Govind Singhb53420c2016-03-09 14:32:57 +0530634 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530635}
636
Wen Gongca174012018-04-20 16:56:28 +0800637#ifdef FEATURE_FW_LOG_PARSING
Govind Singh5eb51532016-03-09 11:34:12 +0530638/**
639 * wmi_unified_dbglog_cmd_send() - set debug log level
640 * @param wmi_handle : handle to WMI.
641 * @param param : pointer to hold dbglog level parameter
642 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530643 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530644 */
Govind Singhb53420c2016-03-09 14:32:57 +0530645QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530646wmi_unified_dbglog_cmd_send(void *wmi_hdl,
647 struct dbglog_params *dbglog_param)
648{
649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
650
651 if (wmi_handle->ops->send_dbglog_cmd)
652 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
653 dbglog_param);
654
Govind Singhb53420c2016-03-09 14:32:57 +0530655 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530656}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +0530657qdf_export_symbol(wmi_unified_dbglog_cmd_send);
Wen Gongca174012018-04-20 16:56:28 +0800658#endif
Govind Singh5eb51532016-03-09 11:34:12 +0530659
660/**
661 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
662 * @param wmi_handle : handle to WMI.
663 * @param macaddr : MAC address
664 * @param param : pointer to hold vdev set parameter
665 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530666 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530667 */
Govind Singhb53420c2016-03-09 14:32:57 +0530668QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530669 struct vdev_set_params *param)
670{
671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
672
673 if (wmi_handle->ops->send_vdev_set_param_cmd)
674 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
675 param);
676
Govind Singhb53420c2016-03-09 14:32:57 +0530677 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530678}
679
680/**
681 * wmi_unified_stats_request_send() - WMI request stats function
682 * @param wmi_handle : handle to WMI.
683 * @param macaddr : MAC address
684 * @param param : pointer to hold stats request parameter
685 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530686 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530687 */
Govind Singhb53420c2016-03-09 14:32:57 +0530688QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530689 uint8_t macaddr[IEEE80211_ADDR_LEN],
690 struct stats_request_params *param)
691{
692 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
693
694 if (wmi_handle->ops->send_stats_request_cmd)
695 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
696 macaddr, param);
697
Govind Singhb53420c2016-03-09 14:32:57 +0530698 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530699}
700
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530701#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530702/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530703 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530704 * @param wmi_handle : handle to WMI.
705 * @param macaddr : MAC address
706 * @param param : pointer to hold stats request parameter
707 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530708 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530709 */
Govind Singhb53420c2016-03-09 14:32:57 +0530710QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530711 uint8_t macaddr[IEEE80211_ADDR_LEN],
712 struct packet_enable_params *param)
713{
714 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
715
716 if (wmi_handle->ops->send_packet_log_enable_cmd)
717 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
718 macaddr, param);
719
Govind Singhb53420c2016-03-09 14:32:57 +0530720 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530721}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530722#else
723/**
724 * wmi_unified_packet_log_enable_send() - WMI request stats function
725 * @param wmi_handle : handle to WMI.
726 * @param macaddr : MAC address
727 * @param param : pointer to hold stats request parameter
728 *
729 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
730 */
731QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700732 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530733{
734 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
735
736 if (wmi_handle->ops->send_packet_log_enable_cmd)
737 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700738 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530739
740 return QDF_STATUS_E_FAILURE;
741}
742
743#endif
744/**
745 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
746 * @param wmi_handle : handle to WMI.
747 * @param PKTLOG_EVENT : packet log event
748 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
749 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700750QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530751{
752 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
753
754 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700755 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
756 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530757
758 return QDF_STATUS_E_FAILURE;
759}
Govind Singh5eb51532016-03-09 11:34:12 +0530760
761/**
762 * wmi_unified_beacon_send_cmd() - WMI beacon send function
763 * @param wmi_handle : handle to WMI.
764 * @param macaddr : MAC address
765 * @param param : pointer to hold beacon send cmd parameter
766 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530767 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530768 */
Govind Singhb53420c2016-03-09 14:32:57 +0530769QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530770 struct beacon_params *param)
771{
772 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
773
774 if (wmi_handle->ops->send_beacon_send_cmd)
775 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530776 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530777
Govind Singhb53420c2016-03-09 14:32:57 +0530778 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530779}
780
781/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530782 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
783 * @param wmi_handle : handle to WMI.
784 * @param macaddr : MAC address
785 * @param param : pointer to hold beacon send cmd parameter
786 *
787 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
788 */
789QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
790 struct beacon_tmpl_params *param)
791{
792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
793
794 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
795 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
796 param);
797
798 return QDF_STATUS_E_FAILURE;
799}
800/**
Govind Singh5eb51532016-03-09 11:34:12 +0530801 * wmi_unified_peer_assoc_send() - WMI peer assoc function
802 * @param wmi_handle : handle to WMI.
803 * @param macaddr : MAC address
804 * @param param : pointer to peer assoc parameter
805 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530806 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530807 */
Govind Singhb53420c2016-03-09 14:32:57 +0530808QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530809 struct peer_assoc_params *param)
810{
811 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
812
813 if (wmi_handle->ops->send_peer_assoc_cmd)
814 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530815 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530816
Govind Singhb53420c2016-03-09 14:32:57 +0530817 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530818}
819
820/**
821 * wmi_unified_scan_start_cmd_send() - WMI scan start function
822 * @param wmi_handle : handle to WMI.
823 * @param macaddr : MAC address
824 * @param param : pointer to hold scan start cmd parameter
825 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530826 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530827 */
Govind Singhb53420c2016-03-09 14:32:57 +0530828QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530829 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530830{
831 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
832
833 if (wmi_handle->ops->send_scan_start_cmd)
834 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530835 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530836
Govind Singhb53420c2016-03-09 14:32:57 +0530837 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530838}
839
840/**
841 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
842 * @param wmi_handle : handle to WMI.
843 * @param macaddr : MAC address
844 * @param param : pointer to hold scan start cmd parameter
845 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530846 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530847 */
Govind Singhb53420c2016-03-09 14:32:57 +0530848QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530849 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530850{
851 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
852
853 if (wmi_handle->ops->send_scan_stop_cmd)
854 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530855 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530856
Govind Singhb53420c2016-03-09 14:32:57 +0530857 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530858}
859
860/**
861 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
862 * @param wmi_handle : handle to WMI.
863 * @param macaddr : MAC address
864 * @param param : pointer to hold scan channel list parameter
865 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530866 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530867 */
Govind Singhb53420c2016-03-09 14:32:57 +0530868QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530869 struct scan_chan_list_params *param)
870{
871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
872
873 if (wmi_handle->ops->send_scan_chan_list_cmd)
874 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530875 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530876
Govind Singhb53420c2016-03-09 14:32:57 +0530877 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530878}
Govind Singh427ee5a2016-02-26 18:09:36 +0530879
880/**
881 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
882 * @wmi_hdl : handle to WMI.
883 * @param : pointer to hold mgmt cmd parameter
884 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530885 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530886 */
Govind Singhb53420c2016-03-09 14:32:57 +0530887QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530888 struct wmi_mgmt_params *param)
889{
890 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
891
892 if (wmi_handle->ops->send_mgmt_cmd)
893 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
894 param);
895
Govind Singhb53420c2016-03-09 14:32:57 +0530896 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530897}
898
899/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530900 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
901 * @wmi_hdl : handle to WMI.
902 * @param : pointer to hold offchan data cmd parameter
903 *
904 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
905 */
906QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
907 struct wmi_offchan_data_tx_params *param)
908{
909 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
910
911 if (wmi_handle->ops->send_offchan_data_tx_cmd)
912 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
913 param);
914
915 return QDF_STATUS_E_FAILURE;
916}
917
918/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530919 * wmi_unified_modem_power_state() - set modem power state to fw
920 * @wmi_hdl: wmi handle
921 * @param_value: parameter value
922 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530923 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530924 */
Govind Singhb53420c2016-03-09 14:32:57 +0530925QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530926 uint32_t param_value)
927{
928 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
929
930 if (wmi_handle->ops->send_modem_power_state_cmd)
931 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
932 param_value);
933
Govind Singhb53420c2016-03-09 14:32:57 +0530934 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530935}
936
937/**
938 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
939 * @wmi_hdl: wmi handle
940 * @vdev_id: vdev id
941 * @val: value
942 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530943 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530944 */
Govind Singhb53420c2016-03-09 14:32:57 +0530945QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530946 uint32_t vdev_id, uint8_t val)
947{
948 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
949
950 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
951 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
952 vdev_id, val);
953
Govind Singhb53420c2016-03-09 14:32:57 +0530954 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530955}
956
957/**
958 * wmi_set_mimops() - set MIMO powersave
959 * @wmi_hdl: wmi handle
960 * @vdev_id: vdev id
961 * @value: value
962 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530964 */
Govind Singhb53420c2016-03-09 14:32:57 +0530965QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530966{
967 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
968
969 if (wmi_handle->ops->send_set_mimops_cmd)
970 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
971 vdev_id, value);
972
Govind Singhb53420c2016-03-09 14:32:57 +0530973 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530974}
975
976/**
977 * wmi_set_smps_params() - set smps params
978 * @wmi_hdl: wmi handle
979 * @vdev_id: vdev id
980 * @value: value
981 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530982 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530983 */
Govind Singhb53420c2016-03-09 14:32:57 +0530984QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530985 int value)
986{
987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
988
989 if (wmi_handle->ops->send_set_smps_params_cmd)
990 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
991 vdev_id, value);
992
Govind Singhb53420c2016-03-09 14:32:57 +0530993 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530994}
995
996
997/**
998 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
999 * @wmi_hdl: wmi handle
1000 * @opps: p2p opp power save parameters
1001 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301002 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +05301003 */
Govind Singhb53420c2016-03-09 14:32:57 +05301004QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +05301005 struct p2p_ps_params *oppps)
1006{
1007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1008
1009 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
1010 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
1011 oppps);
1012
Govind Singhb53420c2016-03-09 14:32:57 +05301013 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301014}
1015
1016/**
1017 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
1018 * @wmi_hdl: wmi handle
1019 * @noa: p2p power save parameters
1020 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301021 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +05301022 */
Govind Singhb53420c2016-03-09 14:32:57 +05301023QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +05301024 struct p2p_ps_params *noa)
1025{
1026 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1027
1028 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
1029 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
1030 noa);
1031
Govind Singhb53420c2016-03-09 14:32:57 +05301032 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301033}
1034
Wu Gaocd3a8512017-03-13 20:17:34 +08001035#ifdef CONVERGED_P2P_ENABLE
1036/**
1037 * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
1038 * @wmi_hdl: wmi handle
1039 * @param: p2p listen offload start parameters
1040 *
1041 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1042 */
1043QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
1044 struct p2p_lo_start *param)
1045{
1046 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1047
1048 if (!wmi_handle) {
1049 WMI_LOGE("wmi handle is null");
1050 return QDF_STATUS_E_INVAL;
1051 }
1052
1053 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1054 return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
1055 param);
1056
1057 return QDF_STATUS_E_FAILURE;
1058}
1059
1060/**
1061 * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
1062 * @wmi_hdl: wmi handle
1063 * @vdev_id: vdev id
1064 *
1065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1066 */
1067QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
1068{
1069 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1070
1071 if (!wmi_handle) {
1072 WMI_LOGE("wmi handle is null");
1073 return QDF_STATUS_E_INVAL;
1074 }
1075
1076 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1077 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
1078 vdev_id);
1079
1080 return QDF_STATUS_E_FAILURE;
1081}
1082#endif /* End of CONVERGED_P2P_ENABLE */
1083
Govind Singh427ee5a2016-02-26 18:09:36 +05301084/**
1085 * wmi_get_temperature() - get pdev temperature req
1086 * @wmi_hdl: wmi handle
1087 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301088 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301089 */
Govind Singhb53420c2016-03-09 14:32:57 +05301090QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +05301091{
1092 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1093
1094 if (wmi_handle->ops->send_get_temperature_cmd)
1095 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
1096
Govind Singhb53420c2016-03-09 14:32:57 +05301097 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301098}
1099
1100/**
1101 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1102 * @wmi_hdl: wmi handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -07001103 * @end_set_sta_ps_mode_cmd: cmd parameter strcture
Govind Singh427ee5a2016-02-26 18:09:36 +05301104 *
1105 * This function sets the trigger
1106 * uapsd params such as service interval, delay interval
1107 * and suspend interval which will be used by the firmware
1108 * to send trigger frames periodically when there is no
1109 * traffic on the transmit side.
1110 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301111 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301112 */
Govind Singhb53420c2016-03-09 14:32:57 +05301113QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +05301114wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
1115 struct sta_uapsd_trig_params *param)
1116{
1117 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1118
1119 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
1120 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
1121 param);
1122
Govind Singhb53420c2016-03-09 14:32:57 +05301123 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301124}
Govind Singh2edc80f2016-03-01 15:30:53 +05301125
Zhang Qian11c0de32018-01-05 16:50:53 +08001126#ifdef WLAN_FEATURE_DSRC
1127QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301128 struct ocb_timing_advert_param *timing_advert)
1129{
Zhang Qian11c0de32018-01-05 16:50:53 +08001130 if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd)
1131 return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl,
1132 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301133
Govind Singhb53420c2016-03-09 14:32:57 +05301134 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301135}
1136
Zhang Qian11c0de32018-01-05 16:50:53 +08001137QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301138 struct ocb_timing_advert_param *timing_advert)
1139{
Zhang Qian11c0de32018-01-05 16:50:53 +08001140 if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd)
1141 return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl,
1142 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301143
Govind Singhb53420c2016-03-09 14:32:57 +05301144 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301145}
1146
Zhang Qian11c0de32018-01-05 16:50:53 +08001147QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl,
1148 struct ocb_utc_param *utc)
Govind Singh2edc80f2016-03-01 15:30:53 +05301149{
Zhang Qian11c0de32018-01-05 16:50:53 +08001150 if (wmi_hdl->ops->send_ocb_set_utc_time_cmd)
1151 return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc);
Govind Singh2edc80f2016-03-01 15:30:53 +05301152
Govind Singhb53420c2016-03-09 14:32:57 +05301153 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301154}
1155
Zhang Qian11c0de32018-01-05 16:50:53 +08001156QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl,
1157 struct ocb_get_tsf_timer_param *req)
Govind Singh2edc80f2016-03-01 15:30:53 +05301158{
Zhang Qian11c0de32018-01-05 16:50:53 +08001159 if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd)
1160 return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl,
1161 req->vdev_id);
Govind Singh2edc80f2016-03-01 15:30:53 +05301162
Govind Singhb53420c2016-03-09 14:32:57 +05301163 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301164}
1165
Zhang Qian11c0de32018-01-05 16:50:53 +08001166QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl,
1167 struct ocb_dcc_get_stats_param *get_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301168{
Zhang Qian11c0de32018-01-05 16:50:53 +08001169 if (wmi_hdl->ops->send_dcc_get_stats_cmd)
1170 return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl,
1171 get_stats_param);
Govind Singh2edc80f2016-03-01 15:30:53 +05301172
Govind Singhb53420c2016-03-09 14:32:57 +05301173 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301174}
1175
Zhang Qian11c0de32018-01-05 16:50:53 +08001176QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl,
1177 struct ocb_dcc_clear_stats_param *clear_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301178{
Zhang Qian11c0de32018-01-05 16:50:53 +08001179 if (wmi_hdl->ops->send_dcc_clear_stats_cmd)
1180 return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl,
1181 clear_stats_param->vdev_id,
1182 clear_stats_param->dcc_stats_bitmap);
Govind Singh2edc80f2016-03-01 15:30:53 +05301183
Govind Singhb53420c2016-03-09 14:32:57 +05301184 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301185}
1186
Zhang Qian11c0de32018-01-05 16:50:53 +08001187QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl,
1188 struct ocb_dcc_update_ndl_param *update_ndl_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301189{
Zhang Qian11c0de32018-01-05 16:50:53 +08001190 if (wmi_hdl->ops->send_dcc_update_ndl_cmd)
1191 return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301192 update_ndl_param);
1193
Govind Singhb53420c2016-03-09 14:32:57 +05301194 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301195}
1196
Zhang Qian11c0de32018-01-05 16:50:53 +08001197QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl,
1198 struct ocb_config *config)
Govind Singh2edc80f2016-03-01 15:30:53 +05301199{
Zhang Qian11c0de32018-01-05 16:50:53 +08001200 if (wmi_hdl->ops->send_ocb_set_config_cmd)
1201 return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl,
1202 config);
Govind Singh2edc80f2016-03-01 15:30:53 +05301203
Govind Singhb53420c2016-03-09 14:32:57 +05301204 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301205}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301206
Zhang Qian11c0de32018-01-05 16:50:53 +08001207QDF_STATUS
1208wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl,
1209 void *evt_buf,
1210 uint32_t *status)
1211{
1212 if (wmi_hdl->ops->extract_ocb_chan_config_resp)
1213 return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl,
1214 evt_buf,
1215 status);
1216
1217 return QDF_STATUS_E_FAILURE;
1218}
1219
1220QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl,
1221 void *evt_buf,
1222 struct ocb_get_tsf_timer_response *resp)
1223{
1224 if (wmi_hdl->ops->extract_ocb_tsf_timer)
1225 return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl,
1226 evt_buf,
1227 resp);
1228
1229 return QDF_STATUS_E_FAILURE;
1230}
1231
1232QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl,
1233 void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
1234{
1235 if (wmi_hdl->ops->extract_dcc_update_ndl_resp)
1236 return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl,
1237 evt_buf,
1238 resp);
1239
1240 return QDF_STATUS_E_FAILURE;
1241}
1242
1243QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl,
1244 void *evt_buf,
1245 struct ocb_dcc_get_stats_response **resp)
1246{
1247 if (wmi_hdl->ops->extract_dcc_stats)
1248 return wmi_hdl->ops->extract_dcc_stats(wmi_hdl,
1249 evt_buf,
1250 resp);
1251
1252 return QDF_STATUS_E_FAILURE;
1253}
1254#endif
1255
Govind Singh17a9cfa2016-03-01 15:54:59 +05301256/**
1257 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1258 * @wmi_handle: wmi handle
1259 * @mcc_adaptive_scheduler: enable/disable
1260 *
1261 * This function enable/disable mcc adaptive scheduler in fw.
1262 *
Jeff Johnsoneb83ef02018-05-06 00:09:31 -07001263 * Return: QDF_STATUS_SUCCESS for success or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301264 */
Govind Singhb53420c2016-03-09 14:32:57 +05301265QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001266 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1267 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301268{
1269 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1270
1271 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1272 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001273 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301274
Govind Singhb53420c2016-03-09 14:32:57 +05301275 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301276}
1277
1278/**
1279 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1280 * @wmi: wmi handle
1281 * @mcc_channel: mcc channel
1282 * @mcc_channel_time_latency: MCC channel time latency.
1283 *
1284 * Currently used to set time latency for an MCC vdev/adapter using operating
1285 * channel of it and channel number. The info is provided run time using
1286 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
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_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301291 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1292{
1293 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1294
1295 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1296 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1297 mcc_channel_freq,
1298 mcc_channel_time_latency);
1299
Govind Singhb53420c2016-03-09 14:32:57 +05301300 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301301}
1302
1303/**
1304 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1305 * @wmi: wmi handle
1306 * @adapter_1_chan_number: adapter 1 channel number
1307 * @adapter_1_quota: adapter 1 quota
1308 * @adapter_2_chan_number: adapter 2 channel number
1309 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301311 */
Govind Singhb53420c2016-03-09 14:32:57 +05301312QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301313 uint32_t adapter_1_chan_freq,
1314 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301315{
1316 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1317
1318 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1319 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1320 adapter_1_chan_freq,
1321 adapter_1_quota,
1322 adapter_2_chan_freq);
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 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1329 * @wmi_handle: Pointer to wmi handle
1330 * @thermal_info: Thermal command information
1331 *
1332 * This function sends the thermal management command
1333 * to the firmware
1334 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301335 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301336 */
Govind Singhb53420c2016-03-09 14:32:57 +05301337QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301338 struct thermal_cmd_params *thermal_info)
1339{
1340 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1341
1342 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1343 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1344 thermal_info);
1345
Govind Singhb53420c2016-03-09 14:32:57 +05301346 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301347}
1348
1349
1350/**
1351 * wmi_unified_lro_config_cmd() - process the LRO config command
1352 * @wmi: Pointer to wmi handle
1353 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1354 *
1355 * This function sends down the LRO configuration parameters to
1356 * the firmware to enable LRO, sets the TCP flags and sets the
1357 * seed values for the toeplitz hash generation
1358 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301359 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301360 */
Govind Singhb53420c2016-03-09 14:32:57 +05301361QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301362 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1363{
1364 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1365
1366 if (wmi_handle->ops->send_lro_config_cmd)
1367 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1368 wmi_lro_cmd);
1369
Govind Singhb53420c2016-03-09 14:32:57 +05301370 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301371}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301372
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301373#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301374/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301375 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1376 * @wmi_hdl: Pointer to wmi handle
1377 * @rate_report_params: Pointer to peer rate report parameters
1378 *
1379 *
1380 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1381 */
1382QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1383 struct wmi_peer_rate_report_params *rate_report_params)
1384{
1385 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1386
1387 if (wmi_handle->ops->send_peer_rate_report_cmd)
1388 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1389 rate_report_params);
1390
1391 return QDF_STATUS_E_FAILURE;
1392}
1393
1394/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301395 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1396 * @wmi_hdl: wmi handle
1397 * @param: bcn ll cmd parameter
1398 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301399 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301400 */
Govind Singhb53420c2016-03-09 14:32:57 +05301401QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301402 wmi_bcn_send_from_host_cmd_fixed_param *param)
1403{
1404 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1405
1406 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1407 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1408 param);
1409
Govind Singhb53420c2016-03-09 14:32:57 +05301410 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301411}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301412#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301413
1414/**
1415 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1416 * @wmi_hdl: wmi handle
1417 * @vdev_id: vdev id
1418 * @max_retries: max retries
1419 * @retry_interval: retry interval
1420 * This function sets sta query related parameters in fw.
1421 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301422 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301423 */
1424
Govind Singhb53420c2016-03-09 14:32:57 +05301425QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301426 uint8_t vdev_id, uint32_t max_retries,
1427 uint32_t retry_interval)
1428{
1429 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1430
1431 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1432 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1433 vdev_id, max_retries,
1434 retry_interval);
1435
Govind Singhb53420c2016-03-09 14:32:57 +05301436 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301437}
1438
1439/**
1440 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1441 * @wmi_hdl: wmi handle
1442 * @params: sta keep alive parameter
1443 *
1444 * This function sets keep alive related parameters in fw.
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_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301449 struct sta_params *params)
1450{
1451 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1452
1453 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1454 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1455 params);
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_vdev_set_gtx_cfg_cmd() - set GTX params
1462 * @wmi_hdl: wmi handle
1463 * @if_id: vdev id
1464 * @gtx_info: GTX config params
1465 *
1466 * This function set GTX related params in firmware.
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_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301471 struct wmi_gtx_config *gtx_info)
1472{
1473 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1474
1475 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1476 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1477 if_id, gtx_info);
1478
Govind Singhb53420c2016-03-09 14:32:57 +05301479 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301480}
1481
1482/**
1483 * wmi_unified_process_update_edca_param() - update EDCA params
1484 * @wmi_hdl: wmi handle
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301485 * @vdev_id: vdev id.
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001486 * @mu_edca_param: mu_edca_param.
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301487 * @wmm_vparams: edca parameters
Govind Singh4eacd2b2016-03-07 14:24:22 +05301488 *
1489 * This function updates EDCA parameters to the target
1490 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301492 */
Govind Singhb53420c2016-03-09 14:32:57 +05301493QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001494 uint8_t vdev_id, bool mu_edca_param,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301495 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC])
Govind Singh4eacd2b2016-03-07 14:24:22 +05301496{
1497 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1498
1499 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1500 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001501 vdev_id, mu_edca_param, wmm_vparams);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301502
Govind Singhb53420c2016-03-09 14:32:57 +05301503 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301504}
1505
1506/**
1507 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1508 * @wmi_hdl: wmi handle
1509 * @vdev_id: vdev id
1510 * @probe_rsp_info: probe response info
1511 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301512 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301513 */
Govind Singhb53420c2016-03-09 14:32:57 +05301514QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301515 uint8_t vdev_id,
Krunal Soni89426862017-11-14 15:42:48 -08001516 struct wmi_probe_resp_params *probe_rsp_info)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301517{
1518 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1519
1520 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1521 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
Krunal Soni89426862017-11-14 15:42:48 -08001522 vdev_id, probe_rsp_info);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301523
Govind Singhb53420c2016-03-09 14:32:57 +05301524 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301525}
1526
1527/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301528 * wmi_unified_setup_install_key_cmd - send key to install to fw
1529 * @wmi_hdl: wmi handle
1530 * @key_params: key parameters
1531 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301532 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301533 */
1534QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1535 struct set_key_params *key_params)
1536{
1537 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1538
1539 if (wmi_handle->ops->send_setup_install_key_cmd)
1540 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1541 key_params);
1542
1543 return QDF_STATUS_E_FAILURE;
1544}
1545
1546/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301547 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1548 * @wma_handle: wma handle
1549 * @vdev_id: vdev id
1550 * @p2p_ie: p2p IE
1551 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301552 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301553 */
Govind Singhb53420c2016-03-09 14:32:57 +05301554QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Vivekc5823092018-03-22 23:27:21 +05301555 uint32_t vdev_id, uint8_t *p2p_ie)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301556{
1557 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1558
1559 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1560 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1561 vdev_id, p2p_ie);
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_gateway_params_cmd() - set gateway parameters
1568 * @wmi_hdl: wmi handle
1569 * @req: gateway parameter update request structure
1570 *
1571 * This function reads the incoming @req and fill in the destination
1572 * WMI structure and sends down the gateway 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_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301578 struct gateway_update_req_param *req)
1579{
1580 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1581
1582 if (wmi_handle->ops->send_set_gateway_params_cmd)
1583 return wmi_handle->ops->send_set_gateway_params_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_set_rssi_monitoring_cmd() - set rssi monitoring
1591 * @wmi_hdl: wmi handle
1592 * @req: rssi monitoring request structure
1593 *
1594 * This function reads the incoming @req and fill in the destination
1595 * WMI structure and send down the rssi monitoring configs down to the firmware
1596 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301597 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1598 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301599 */
Govind Singhb53420c2016-03-09 14:32:57 +05301600QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301601 struct rssi_monitor_param *req)
1602{
1603 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1604
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301605 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301606 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1607 req);
1608
Govind Singhb53420c2016-03-09 14:32:57 +05301609 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301610}
1611
1612/**
1613 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1614 * @wmi_hdl: wmi handle
1615 * @psetoui: OUI parameters
1616 *
1617 * set scan probe OUI parameters in firmware
1618 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301619 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301620 */
Govind Singhb53420c2016-03-09 14:32:57 +05301621QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301622 struct scan_mac_oui *psetoui)
1623{
1624 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1625
1626 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1627 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1628 psetoui);
1629
Govind Singhb53420c2016-03-09 14:32:57 +05301630 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301631}
1632
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301633#ifdef CONFIG_MCL
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301634/**
1635 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1636 * @wmi_hdl: wmi handle
1637 * @scan_cmd_fp: scan related parameters
1638 * @roam_req: roam related parameters
1639 *
1640 * This function reads the incoming @roam_req and fill in the destination
1641 * WMI structure and send down the roam scan configs down to the firmware
1642 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301643 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301644 */
1645QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1646 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1647 struct roam_offload_scan_params *roam_req)
1648{
1649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1650
1651 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1652 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1653 wmi_handle, scan_cmd_fp, roam_req);
1654
1655 return QDF_STATUS_E_FAILURE;
1656}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301657#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301658
1659/**
1660 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1661 * parameters
1662 * @wmi_hdl: wmi handle
1663 * @roam_req: roam rssi related parameters
1664 *
1665 * This function reads the incoming @roam_req and fill in the destination
1666 * WMI structure and send down the roam scan rssi configs down to the firmware
1667 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301668 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301669 */
1670QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1671 struct roam_offload_scan_rssi_params
1672 *roam_req)
1673{
1674 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1675
1676 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1677 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1678 wmi_handle, roam_req);
1679
1680 return QDF_STATUS_E_FAILURE;
1681}
1682
Varun Reddy Yeturu412601c2017-07-20 09:45:01 -07001683QDF_STATUS wmi_unified_roam_mawc_params_cmd(
1684 void *wmi_hdl, struct wmi_mawc_roam_params *params)
1685{
1686 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1687
1688 if (wmi_handle->ops->send_roam_mawc_params_cmd)
1689 return wmi_handle->ops->send_roam_mawc_params_cmd(
1690 wmi_handle, params);
1691
1692 return QDF_STATUS_E_FAILURE;
1693}
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301694/**
1695 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1696 * blacklist and preferred list
1697 * @wmi_hdl: wmi handle
1698 * @roam_req: roam scan lists related parameters
1699 *
1700 * This function reads the incoming @roam_req and fill in the destination
1701 * WMI structure and send down the different roam scan lists down to the fw
1702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301703 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301704 */
1705QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1706 struct roam_scan_filter_params *roam_req)
1707{
1708 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1709
1710 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1711 return wmi_handle->ops->send_roam_scan_filter_cmd(
1712 wmi_handle, roam_req);
1713
1714 return QDF_STATUS_E_FAILURE;
1715}
1716
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301717#ifdef IPA_OFFLOAD
Govind Singh4eacd2b2016-03-07 14:24:22 +05301718/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1719 * @wmi_hdl: wmi handle
1720 * @ipa_offload: ipa offload control parameter
1721 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301722 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1723 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301724 */
Govind Singhb53420c2016-03-09 14:32:57 +05301725QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301726 struct ipa_uc_offload_control_params *ipa_offload)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301727{
1728 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1729
1730 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1731 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1732 ipa_offload);
1733
Govind Singhb53420c2016-03-09 14:32:57 +05301734 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301735}
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301736#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301737
Govind Singh4eacd2b2016-03-07 14:24:22 +05301738
1739/**
1740 * wmi_unified_plm_stop_cmd() - plm stop request
1741 * @wmi_hdl: wmi handle
1742 * @plm: plm request parameters
1743 *
1744 * This function request FW to stop PLM.
1745 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301746 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301747 */
Govind Singhb53420c2016-03-09 14:32:57 +05301748QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301749 const struct plm_req_params *plm)
1750{
1751 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1752
1753 if (wmi_handle->ops->send_plm_stop_cmd)
1754 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1755 plm);
1756
Govind Singhb53420c2016-03-09 14:32:57 +05301757 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301758}
1759
1760/**
1761 * wmi_unified_plm_start_cmd() - plm start request
1762 * @wmi_hdl: wmi handle
1763 * @plm: plm request parameters
1764 *
1765 * This function request FW to start PLM.
1766 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301767 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301768 */
Govind Singhb53420c2016-03-09 14:32:57 +05301769QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301770 const struct plm_req_params *plm,
1771 uint32_t *gchannel_list)
1772{
1773 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1774
1775 if (wmi_handle->ops->send_plm_start_cmd)
1776 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1777 plm, gchannel_list);
1778
Govind Singhb53420c2016-03-09 14:32:57 +05301779 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301780}
1781
1782/**
1783 * send_pno_stop_cmd() - PNO stop request
1784 * @wmi_hdl: wmi handle
1785 * @vdev_id: vdev id
1786 *
1787 * This function request FW to stop ongoing PNO operation.
1788 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301789 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301790 */
Govind Singhb53420c2016-03-09 14:32:57 +05301791QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301792{
1793 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1794
1795 if (wmi_handle->ops->send_pno_stop_cmd)
1796 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1797 vdev_id);
1798
Govind Singhb53420c2016-03-09 14:32:57 +05301799 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301800}
1801
1802/**
1803 * wmi_unified_pno_start_cmd() - PNO start request
1804 * @wmi_hdl: wmi handle
1805 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301806 *
1807 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301808 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301809 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301810#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301811QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05301812 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301813{
1814 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1815
1816 if (wmi_handle->ops->send_pno_start_cmd)
1817 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05301818 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301819
Govind Singhb53420c2016-03-09 14:32:57 +05301820 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301821}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301822#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301823
Varun Reddy Yeturueac038b2017-07-24 16:11:22 -07001824/**
1825 * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
1826 * @wmi_hdl: wmi handle
1827 * @params: Configuration parameters
1828 *
1829 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1830 */
1831QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
1832 struct nlo_mawc_params *params)
1833{
1834 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1835
1836 if (wmi_handle->ops->send_nlo_mawc_cmd)
1837 return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
1838
1839 return QDF_STATUS_E_FAILURE;
1840}
1841
Govind Singh4eacd2b2016-03-07 14:24:22 +05301842/* wmi_unified_set_ric_req_cmd() - set ric request element
1843 * @wmi_hdl: wmi handle
1844 * @msg: message
1845 * @is_add_ts: is addts required
1846 *
1847 * This function sets ric request element for 11r roaming.
1848 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301849 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301850 */
Govind Singhb53420c2016-03-09 14:32:57 +05301851QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 uint8_t is_add_ts)
1853{
1854 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1855
1856 if (wmi_handle->ops->send_set_ric_req_cmd)
1857 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
1858 is_add_ts);
1859
Govind Singhb53420c2016-03-09 14:32:57 +05301860 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301861}
1862
1863/**
1864 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1865 * @wmi_hdl: wmi handle
1866 * @clear_req: ll stats clear request command params
1867 * @addr: mac address
1868 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301869 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301870 */
Govind Singhb53420c2016-03-09 14:32:57 +05301871QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301872 const struct ll_stats_clear_params *clear_req,
1873 uint8_t addr[IEEE80211_ADDR_LEN])
1874{
1875 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1876
1877 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1878 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1879 clear_req, addr);
1880
Govind Singhb53420c2016-03-09 14:32:57 +05301881 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301882}
1883
1884/**
1885 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1886 * @wmi_hdl:wmi handle
1887 * @get_req:ll stats get request command params
1888 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301889 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301890 */
Govind Singhb53420c2016-03-09 14:32:57 +05301891QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301892 const struct ll_stats_get_params *get_req,
1893 uint8_t addr[IEEE80211_ADDR_LEN])
1894{
1895 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1896
1897 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1898 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1899 get_req, addr);
1900
Govind Singhb53420c2016-03-09 14:32:57 +05301901 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301902}
1903
1904/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301905 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1906 * @wmi_hdl: wma handle
1907 * @vdev_id: vdev id
1908 *
1909 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1910 */
1911QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
1912 uint8_t vdev_id)
1913{
1914 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1915
1916 if (wmi_handle->ops->send_congestion_cmd)
1917 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
1918 vdev_id);
1919
1920 return QDF_STATUS_E_FAILURE;
1921}
1922
1923/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301924 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1925 * @wmi_handle: wmi handle
1926 * @set_req: ll stats set request command params
1927 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301928 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301929 */
Govind Singhb53420c2016-03-09 14:32:57 +05301930QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301931 const struct ll_stats_set_params *set_req)
1932{
1933 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1934
1935 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1936 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1937 set_req);
1938
Govind Singhb53420c2016-03-09 14:32:57 +05301939 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301940}
Govind Singh20c5dac2016-03-07 15:33:31 +05301941
1942/**
1943 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1944 * @wmi_handle: wmi handle
1945 * @rssi_req: get RSSI request
1946 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301947 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301948 */
Govind Singhb53420c2016-03-09 14:32:57 +05301949QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301950{
1951 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1952
1953 if (wmi_handle->ops->send_snr_request_cmd)
1954 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1955
Govind Singhb53420c2016-03-09 14:32:57 +05301956 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301957}
1958
1959/**
1960 * wmi_unified_snr_cmd() - get RSSI from fw
1961 * @wmi_handle: wmi handle
1962 * @vdev_id: vdev id
1963 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301964 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301965 */
Govind Singhb53420c2016-03-09 14:32:57 +05301966QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301967{
1968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1969
1970 if (wmi_handle->ops->send_snr_cmd)
1971 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1972 vdev_id);
1973
Govind Singhb53420c2016-03-09 14:32:57 +05301974 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301975}
1976
1977/**
1978 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1979 * @wmi_handle: wmi handle
1980 * @link_status: get link params
1981 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301982 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301983 */
Govind Singhb53420c2016-03-09 14:32:57 +05301984QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301985 struct link_status_params *link_status)
1986{
1987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1988
1989 if (wmi_handle->ops->send_link_status_req_cmd)
1990 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1991 link_status);
1992
Govind Singhb53420c2016-03-09 14:32:57 +05301993 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301994}
1995
Govind Singh20c5dac2016-03-07 15:33:31 +05301996/**
1997 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
1998 * @wmi_handle: wmi handle
1999 * @ta_dhcp_ind: DHCP indication parameter
2000 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302001 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302002 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302003#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302004QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302005 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2006{
2007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2008
2009 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2010 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2011 ta_dhcp_ind);
2012
Govind Singhb53420c2016-03-09 14:32:57 +05302013 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302014}
2015
2016/**
2017 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2018 * @wmi_handle: wmi handle
2019 * @pLinkSpeed: link speed info
2020 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302021 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302022 */
Govind Singhb53420c2016-03-09 14:32:57 +05302023QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302024 wmi_mac_addr peer_macaddr)
2025{
2026 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2027
2028 if (wmi_handle->ops->send_get_link_speed_cmd)
2029 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2030 peer_macaddr);
2031
Govind Singhb53420c2016-03-09 14:32:57 +05302032 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302033}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302034#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302035
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302036#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh20c5dac2016-03-07 15:33:31 +05302037/**
2038 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2039 * @wmi_handle: wmi handler
2040 * @egap_params: pointer to egap_params
2041 *
2042 * Return: 0 for success, otherwise appropriate error code
2043 */
Govind Singhb53420c2016-03-09 14:32:57 +05302044QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302045 struct wlan_green_ap_egap_params *egap_params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302046{
2047 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2048
2049 if (wmi_handle->ops->send_egap_conf_params_cmd)
2050 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2051 egap_params);
2052
Govind Singhb53420c2016-03-09 14:32:57 +05302053 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302054}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302055#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302056
2057/**
2058 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2059 * @wmi_handl: wmi handle
2060 * @cmd: Profiling command index
2061 * @value1: parameter1 value
2062 * @value2: parameter2 value
2063 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302064 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302065 */
Govind Singhb53420c2016-03-09 14:32:57 +05302066QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302067 uint32_t cmd, uint32_t value1, uint32_t value2)
2068{
2069 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2070
2071 if (wmi_handle->ops->send_fw_profiling_cmd)
2072 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2073 cmd, value1, value2);
2074
Govind Singhb53420c2016-03-09 14:32:57 +05302075 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302076}
2077
Govind Singh20c5dac2016-03-07 15:33:31 +05302078/**
Naveen Rawata5817e72017-10-26 18:50:19 -07002079 * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware
2080 * will wake up host after specified time is elapsed
2081 * @wmi_handle: wmi handle
2082 * @vdev_id: vdev id
2083 * @cookie: value to identify reason why host set up wake call.
2084 * @time: time in ms
2085 *
2086 * Return: QDF status
2087 */
2088QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
2089 uint32_t cookie, uint32_t time)
2090{
2091 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2092
2093 if (wmi_handle->ops->send_wow_timer_pattern_cmd)
2094 return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
2095 vdev_id, cookie, time);
2096
2097 return QDF_STATUS_E_FAILURE;
2098}
2099
2100/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302101 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2102 * @wmi_handle: wmi handle
2103 * @vdev_id: vdev id
2104 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302105 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302106 */
Govind Singhb53420c2016-03-09 14:32:57 +05302107QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302108{
2109 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2110
2111 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2112 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2113 vdev_id);
2114
Govind Singhb53420c2016-03-09 14:32:57 +05302115 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302116}
2117
Paul Zhang92ab8d32017-12-08 16:08:00 +08002118QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
2119 struct wlm_latency_level_param *param)
2120{
2121 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2122
2123 if (wmi_handle->ops->send_wlm_latency_level_cmd)
2124 return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
2125 param);
2126
2127 return QDF_STATUS_E_FAILURE;
2128}
2129
Govind Singh20c5dac2016-03-07 15:33:31 +05302130/**
2131 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2132 * @wmi_hdl: wmi handle
2133 * @vdev_id: vdev id
2134 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302135 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302136 */
Govind Singhb53420c2016-03-09 14:32:57 +05302137QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302138{
2139 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2140
2141 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2142 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2143 vdev_id);
2144
Govind Singhb53420c2016-03-09 14:32:57 +05302145 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302146}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002147
2148#ifdef WLAN_FEATURE_CIF_CFR
2149QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2150 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2151{
2152 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2153
2154 if (wmi_handle->ops->send_start_oem_data_cmd)
2155 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2156
2157 return QDF_STATUS_E_FAILURE;
2158}
2159#endif
2160
Sathish Kumarf396c722017-11-17 17:30:41 +05302161QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
2162 struct direct_buf_rx_cfg_req *cfg)
2163{
2164 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2165
2166 if (wmi_handle->ops->send_dbr_cfg_cmd)
2167 return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg);
2168
2169 return QDF_STATUS_E_FAILURE;
2170}
2171
Govind Singh20c5dac2016-03-07 15:33:31 +05302172/**
2173 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2174 * @wmi_handle: wmi handle
2175 * @startOemDataReq: start request params
2176 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302177 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302178 */
Govind Singhb53420c2016-03-09 14:32:57 +05302179QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002180 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302181 uint8_t *data)
2182{
2183 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2184
2185 if (wmi_handle->ops->send_start_oem_data_cmd)
2186 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2187 data_len, data);
2188
Govind Singhb53420c2016-03-09 14:32:57 +05302189 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302190}
2191
2192/**
2193 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2194 * @wmi_handle: wmi handle
2195 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2196 *
2197 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2198 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2199 * to firmware based on phyerr filtering
2200 * offload status.
2201 *
2202 * Return: 1 success, 0 failure
2203 */
Govind Singhb53420c2016-03-09 14:32:57 +05302204QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302205wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2206 bool dfs_phyerr_filter_offload)
2207{
2208 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2209
2210 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2211 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2212 dfs_phyerr_filter_offload);
2213
Govind Singhb53420c2016-03-09 14:32:57 +05302214 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302215}
2216
2217#if !defined(REMOVE_PKT_LOG)
2218/**
2219 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2220 * @wmi_handle: wmi handle
2221 * @pktlog_event: pktlog event
2222 * @cmd_id: pktlog cmd id
2223 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302224 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302225 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302226#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302227QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302228 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302229 uint32_t cmd_id,
2230 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302231{
2232 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2233
2234 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2235 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302236 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302237
Govind Singhb53420c2016-03-09 14:32:57 +05302238 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302239}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302240#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302241#endif /* REMOVE_PKT_LOG */
2242
2243/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302244 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2245 * @wmi_handle: wmi handle
2246 * @ptrn_id: pattern id
2247 * @vdev_id: vdev id
2248 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302249 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302250 */
Govind Singhb53420c2016-03-09 14:32:57 +05302251QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302252 uint8_t vdev_id)
2253{
2254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2255
2256 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2257 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2258 ptrn_id, vdev_id);
2259
Govind Singhb53420c2016-03-09 14:32:57 +05302260 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302261}
2262
2263/**
2264 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2265 * @wmi_handle: wmi handle
2266 *
2267 * Sends host wakeup indication to FW. On receiving this indication,
2268 * FW will come out of WOW.
2269 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302270 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302271 */
Govind Singhb53420c2016-03-09 14:32:57 +05302272QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302273{
2274 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2275
2276 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2277 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2278
Govind Singhb53420c2016-03-09 14:32:57 +05302279 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302280}
2281
2282/**
2283 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2284 * @wmi_handle: wmi handle
2285 * @msg: delts params
2286 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302287 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302288 */
Govind Singhb53420c2016-03-09 14:32:57 +05302289QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302290 uint8_t ac)
2291{
2292 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2293
2294 if (wmi_handle->ops->send_del_ts_cmd)
2295 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2296 vdev_id, ac);
2297
Govind Singhb53420c2016-03-09 14:32:57 +05302298 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302299}
2300
2301/**
2302 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2303 * @wmi_handle: handle to wmi
2304 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2305 *
Govind Singhb53420c2016-03-09 14:32:57 +05302306 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302307 * ADD_TS requestes to firmware in loop for all the ACs with
2308 * active flow.
2309 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302311 */
Govind Singhb53420c2016-03-09 14:32:57 +05302312QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302313 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2314{
2315 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2316
2317 if (wmi_handle->ops->send_aggr_qos_cmd)
2318 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2319 aggr_qos_rsp_msg);
2320
Govind Singhb53420c2016-03-09 14:32:57 +05302321 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302322}
2323
2324/**
2325 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2326 * @wmi_handle: wmi handle
2327 * @msg: ADDTS params
2328 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302329 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302330 */
Govind Singhb53420c2016-03-09 14:32:57 +05302331QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302332 struct add_ts_param *msg)
2333{
2334 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2335
2336 if (wmi_handle->ops->send_add_ts_cmd)
2337 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2338 msg);
2339
Govind Singhb53420c2016-03-09 14:32:57 +05302340 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302341}
2342
2343/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302344 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2345 * @wmi_handle: wmi handle
2346 * @pAddPeriodicTxPtrnParams: tx ptrn params
2347 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302348 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302349 */
Govind Singhb53420c2016-03-09 14:32:57 +05302350QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302351 struct periodic_tx_pattern *
2352 pAddPeriodicTxPtrnParams,
2353 uint8_t vdev_id)
2354{
2355 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2356
2357 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2358 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2359 pAddPeriodicTxPtrnParams,
2360 vdev_id);
2361
Govind Singhb53420c2016-03-09 14:32:57 +05302362 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302363}
2364
2365/**
2366 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2367 * @wmi_handle: wmi handle
2368 * @vdev_id: vdev id
2369 * @pattern_id: pattern id
2370 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302371 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302372 */
Govind Singhb53420c2016-03-09 14:32:57 +05302373QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302374 uint8_t vdev_id,
2375 uint8_t pattern_id)
2376{
2377 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2378
2379 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2380 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2381 vdev_id,
2382 pattern_id);
2383
Govind Singhb53420c2016-03-09 14:32:57 +05302384 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302385}
2386
2387/**
2388 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2389 * @wmi_handle: wmi handle
2390 * @preq: stats ext params
2391 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302392 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302393 */
Govind Singhb53420c2016-03-09 14:32:57 +05302394QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302395 struct stats_ext_params *preq)
2396{
2397 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2398
2399 if (wmi_handle->ops->send_stats_ext_req_cmd)
2400 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2401 preq);
2402
Govind Singhb53420c2016-03-09 14:32:57 +05302403 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302404}
2405
2406/**
2407 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2408 * @wmi_handle: wmi handle
2409 * @params: ext wow params
2410 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302411 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302412 */
Govind Singhb53420c2016-03-09 14:32:57 +05302413QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302414 struct ext_wow_params *params)
2415{
2416 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2417
2418 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2419 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2420 params);
2421
Govind Singhb53420c2016-03-09 14:32:57 +05302422 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302423}
2424
2425/**
2426 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2427 * @wmi_handle: wmi handle
2428 * @appType2Params: app type2 params
2429 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302430 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302431 */
Govind Singhb53420c2016-03-09 14:32:57 +05302432QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302433 struct app_type2_params *appType2Params)
2434{
2435 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2436
2437 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2438 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2439 appType2Params);
2440
Govind Singhb53420c2016-03-09 14:32:57 +05302441 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302442
2443}
2444
2445/**
2446 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2447 * @wmi_handle: wmi handle
2448 * @timer_val: auto shutdown timer value
2449 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302450 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302451 */
Govind Singhb53420c2016-03-09 14:32:57 +05302452QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302453 uint32_t timer_val)
2454{
2455 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2456
2457 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2458 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2459 timer_val);
2460
Govind Singhb53420c2016-03-09 14:32:57 +05302461 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302462}
2463
2464/**
2465 * wmi_unified_nan_req_cmd() - to send nan request to target
2466 * @wmi_handle: wmi handle
2467 * @nan_req: request data which will be non-null
2468 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302469 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302470 */
Govind Singhb53420c2016-03-09 14:32:57 +05302471QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302472 struct nan_req_params *nan_req)
2473{
2474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2475
2476 if (wmi_handle->ops->send_nan_req_cmd)
2477 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2478 nan_req);
2479
Govind Singhb53420c2016-03-09 14:32:57 +05302480 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302481}
2482
2483/**
2484 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2485 * @wmi_handle: wmi handle
2486 * @pDhcpSrvOffloadInfo: DHCP server offload info
2487 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302488 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302489 */
Govind Singhb53420c2016-03-09 14:32:57 +05302490QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002491 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302492{
2493 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2494
2495 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2496 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002497 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05302498
Govind Singhb53420c2016-03-09 14:32:57 +05302499 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302500}
2501
2502/**
2503 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2504 * @wmi_handle: wmi handle
2505 * @ch_avoid_update_req: channel avoid update params
2506 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302507 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302508 */
Govind Singhb53420c2016-03-09 14:32:57 +05302509QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302510{
2511 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2512
2513 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2514 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2515
Govind Singhb53420c2016-03-09 14:32:57 +05302516 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302517}
2518
2519/**
2520 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2521 * @wmi_handle: wmi handle
2522 * @reg_dmn: reg domain
2523 * @regdmn2G: 2G reg domain
2524 * @regdmn5G: 5G reg domain
2525 * @ctl2G: 2G test limit
2526 * @ctl5G: 5G test limit
2527 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302528 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302529 */
Govind Singhb53420c2016-03-09 14:32:57 +05302530QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302531 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302532 uint16_t regdmn5G, uint8_t ctl2G,
2533 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302534{
2535 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2536
2537 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2538 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2539 reg_dmn, regdmn2G,
2540 regdmn5G, ctl2G,
2541 ctl5G);
2542
Govind Singhb53420c2016-03-09 14:32:57 +05302543 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302544}
2545
2546
2547/**
2548 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2549 * @wmi_handle: wmi handle
2550 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2551 *
2552 * This function sets tdls off channel mode
2553 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302554 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2555 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302556 */
Govind Singhb53420c2016-03-09 14:32:57 +05302557QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302558 struct tdls_channel_switch_params *chan_switch_params)
2559{
2560 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2561
2562 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2563 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2564 chan_switch_params);
2565
Govind Singhb53420c2016-03-09 14:32:57 +05302566 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302567}
2568
2569/**
2570 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2571 * @wmi_handle: wmi handle
2572 * @pwmaTdlsparams: TDLS params
2573 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302574 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302575 */
Govind Singhb53420c2016-03-09 14:32:57 +05302576QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302577 void *tdls_param, uint8_t tdls_state)
2578{
2579 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2580
2581 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2582 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2583 tdls_param, tdls_state);
2584
Govind Singhb53420c2016-03-09 14:32:57 +05302585 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302586}
2587
2588/**
2589 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2590 * @wmi_handle: wmi handle
2591 * @peerStateParams: TDLS peer state params
2592 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302593 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302594 */
Govind Singhb53420c2016-03-09 14:32:57 +05302595QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302596 struct tdls_peer_state_params *peerStateParams,
2597 uint32_t *ch_mhz)
2598{
2599 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2600
2601 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2602 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2603 peerStateParams, ch_mhz);
2604
Govind Singhb53420c2016-03-09 14:32:57 +05302605 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302606}
2607
2608/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302609 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2610 * @wmi_handle: Pointer to WMi handle
2611 * @ie_data: Pointer for ie data
2612 *
2613 * This function sends IE information to firmware
2614 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302615 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302616 *
2617 */
Govind Singhb53420c2016-03-09 14:32:57 +05302618QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302619 struct vdev_ie_info_param *ie_info)
2620{
2621 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2622
2623 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2624 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2625 ie_info);
2626
Govind Singhb53420c2016-03-09 14:32:57 +05302627 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302628}
Govind Singh9ddd5162016-03-07 16:30:32 +05302629
2630/**
2631 * wmi_unified_save_fw_version_cmd() - save fw version
2632 * @wmi_handle: pointer to wmi handle
2633 * @res_cfg: resource config
2634 * @num_mem_chunks: no of mem chunck
2635 * @mem_chunk: pointer to mem chunck structure
2636 *
2637 * This function sends IE information to firmware
2638 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302639 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302640 *
2641 */
Govind Singhb53420c2016-03-09 14:32:57 +05302642QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302643 void *evt_buf)
2644{
2645 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2646
2647 if (wmi_handle->ops->save_fw_version_cmd)
2648 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2649 evt_buf);
2650
Govind Singhb53420c2016-03-09 14:32:57 +05302651 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302652}
Govind Singha4836fd2016-03-07 16:45:38 +05302653
2654/**
2655 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2656 * @wmi_hdl: wmi handle
2657 * @custom_addr: base mac address
2658 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302659 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302660 */
Govind Singhb53420c2016-03-09 14:32:57 +05302661QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302662 uint8_t *custom_addr)
2663{
2664 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2665
2666 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2667 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2668 custom_addr);
2669
Govind Singhb53420c2016-03-09 14:32:57 +05302670 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302671}
2672
2673/**
2674 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2675 * @wmi_hdl: wmi handle
2676 * @event: Event received from FW
2677 * @len: Length of the event
2678 *
2679 * Enables the low frequency events and disables the high frequency
2680 * events. Bit 17 indicates if the event if low/high frequency.
2681 * 1 - high frequency, 0 - low frequency
2682 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302683 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302684 */
Govind Singhb53420c2016-03-09 14:32:57 +05302685QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302686 uint8_t *event,
2687 uint32_t len)
2688{
2689 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2690
2691 if (wmi_handle->ops->send_log_supported_evt_cmd)
2692 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2693 event, len);
2694
Govind Singhb53420c2016-03-09 14:32:57 +05302695 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302696}
2697
gaurank kathpaliacdfb4452018-02-21 18:58:29 +05302698void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl)
2699{
2700 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2701 if (wmi_handle->ops->send_time_stamp_sync_cmd)
2702 wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle);
2703
2704}
Govind Singha4836fd2016-03-07 16:45:38 +05302705/**
2706 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2707 * @wmi_hdl: wmi handle
2708 * @start_log: Start logging related parameters
2709 *
2710 * Send the command to the FW based on which specific logging of diag
2711 * event/log id can be started/stopped
2712 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302713 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302714 */
Govind Singhb53420c2016-03-09 14:32:57 +05302715QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302716 struct wmi_wifi_start_log *start_log)
2717{
2718 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2719
2720 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2721 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2722 start_log);
2723
Govind Singhb53420c2016-03-09 14:32:57 +05302724 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302725}
2726
2727/**
2728 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2729 * @wmi_hdl: WMI handle
2730 *
2731 * This function is used to send the flush command to the FW,
2732 * that will flush the fw logs that are residue in the FW
2733 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302734 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302735 */
Govind Singhb53420c2016-03-09 14:32:57 +05302736QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302737{
2738 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2739
2740 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2741 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2742
Govind Singhb53420c2016-03-09 14:32:57 +05302743 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302744}
2745
2746/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302747 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302748 * @wmi_hdl: wmi handle
2749 * @msg: PCL structure containing the PCL and the number of channels
2750 *
2751 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2752 * firmware. The DBS Manager is the consumer of this information in the WLAN
2753 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2754 * to migrate to a new channel without host driver involvement. An example of
2755 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2756 * manage the channel selection without firmware involvement.
2757 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302758 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302759 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302760QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2761 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302762{
2763 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2764
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302765 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2766 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302767
Govind Singhb53420c2016-03-09 14:32:57 +05302768 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302769}
2770
2771/**
2772 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2773 * @wmi_hdl: wmi handle
2774 * @msg: Structure containing the following parameters
2775 *
2776 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2777 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2778 *
2779 * Provides notification to the WLAN firmware that host driver is requesting a
2780 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2781 * configurations that include the Dual Band Simultaneous (DBS) feature.
2782 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302783 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302784 */
Govind Singhb53420c2016-03-09 14:32:57 +05302785QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302786 uint32_t hw_mode_index)
2787{
2788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2789
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302790 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2791 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302792 hw_mode_index);
2793
Govind Singhb53420c2016-03-09 14:32:57 +05302794 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302795}
2796
2797/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302798 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302799 * @wmi_hdl: wmi handle
2800 * @msg: Dual MAC config parameters
2801 *
2802 * Configures WLAN firmware with the dual MAC features
2803 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302804 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302805 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302806QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Srinivas Girigowda5029ae72018-02-15 14:30:05 -08002807 struct policy_mgr_dual_mac_config *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302808{
2809 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2810
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302811 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2812 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302813 msg);
2814
Govind Singhb53420c2016-03-09 14:32:57 +05302815 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302816}
2817
Govind Singha4836fd2016-03-07 16:45:38 +05302818/**
2819 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
2820 * @wmi_hdl: wmi handle
2821 * @flashing: flashing request
2822 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302823 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302824 */
Govind Singhb53420c2016-03-09 14:32:57 +05302825QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302826 struct flashing_req_params *flashing)
2827{
2828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2829
2830 if (wmi_handle->ops->send_set_led_flashing_cmd)
2831 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
2832 flashing);
2833
Govind Singhb53420c2016-03-09 14:32:57 +05302834 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302835}
2836
2837/**
2838 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
2839 * @wmi_hdl: wmi handle
2840 * @appType1Params: app type1 params
2841 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302842 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302843 */
Govind Singhb53420c2016-03-09 14:32:57 +05302844QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302845 struct app_type1_params *app_type1_params)
2846{
2847 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2848
2849 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
2850 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
2851 app_type1_params);
2852
Govind Singhb53420c2016-03-09 14:32:57 +05302853 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302854}
2855
2856/**
2857 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
2858 * @wmi_hdl: wmi handle
2859 * @request: SSID hotlist set request
2860 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302861 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302862 */
Govind Singhb53420c2016-03-09 14:32:57 +05302863QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05302864wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
2865 struct ssid_hotlist_request_params *request)
2866{
2867 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2868
2869 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
2870 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
2871 request);
2872
Govind Singhb53420c2016-03-09 14:32:57 +05302873 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302874}
2875
2876/**
2877 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
2878 * @wmi_hdl: wmi handle
2879 * @vdev_id: vdev id
2880 *
2881 * This function sends roam synch complete event to fw.
2882 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302883 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302884 */
Govind Singhb53420c2016-03-09 14:32:57 +05302885QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302886 uint8_t vdev_id)
2887{
2888 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2889
2890 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
2891 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
2892 vdev_id);
2893
Govind Singhb53420c2016-03-09 14:32:57 +05302894 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302895}
2896
2897/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05302898 * wmi_unified_fw_test_cmd() - send fw test command to fw.
2899 * @wmi_hdl: wmi handle
2900 * @wmi_fwtest: fw test command
2901 *
2902 * This function sends fw test command to fw.
2903 *
2904 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2905 */
2906QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
2907 struct set_fwtest_params *wmi_fwtest)
2908{
2909 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2910
2911 if (wmi_handle->ops->send_fw_test_cmd)
2912 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
2913 wmi_fwtest);
2914
2915 return QDF_STATUS_E_FAILURE;
2916
2917}
2918
2919/**
Govind Singha4836fd2016-03-07 16:45:38 +05302920 * wmi_unified_unit_test_cmd() - send unit test command to fw.
2921 * @wmi_hdl: wmi handle
2922 * @wmi_utest: unit test command
2923 *
2924 * This function send unit test command to fw.
2925 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302926 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302927 */
Govind Singhb53420c2016-03-09 14:32:57 +05302928QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302929 struct wmi_unit_test_cmd *wmi_utest)
2930{
2931 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2932
2933 if (wmi_handle->ops->send_unit_test_cmd)
2934 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
2935 wmi_utest);
2936
Govind Singhb53420c2016-03-09 14:32:57 +05302937 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302938}
2939
2940/**
2941 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
2942 * @wmi_hdl: wmi handle
2943 * @roaminvoke: roam invoke command
2944 *
2945 * Send roam invoke command to fw for fastreassoc.
2946 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302947 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302948 */
Govind Singhb53420c2016-03-09 14:32:57 +05302949QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302950 struct wmi_roam_invoke_cmd *roaminvoke,
2951 uint32_t ch_hz)
2952{
2953 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2954
2955 if (wmi_handle->ops->send_roam_invoke_cmd)
2956 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
2957 roaminvoke, ch_hz);
2958
Govind Singhb53420c2016-03-09 14:32:57 +05302959 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302960}
2961
2962/**
2963 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
2964 * @wmi_hdl: wmi handle
2965 * @command: command
2966 * @vdev_id: vdev id
2967 *
2968 * This function set roam offload command to fw.
2969 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302970 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302971 */
Govind Singhb53420c2016-03-09 14:32:57 +05302972QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302973 uint32_t command, uint32_t vdev_id)
2974{
2975 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2976
2977 if (wmi_handle->ops->send_roam_scan_offload_cmd)
2978 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
2979 command, vdev_id);
2980
Govind Singhb53420c2016-03-09 14:32:57 +05302981 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302982}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302983#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05302984/**
2985 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
2986 * @wmi_hdl: wmi handle
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302987 * @ap_profile: ap profile params
Govind Singha4836fd2016-03-07 16:45:38 +05302988 *
2989 * Send WMI_ROAM_AP_PROFILE to firmware
2990 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302991 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302992 */
Govind Singhb53420c2016-03-09 14:32:57 +05302993QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302994 struct ap_profile_params *ap_profile)
Govind Singha4836fd2016-03-07 16:45:38 +05302995{
2996 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2997
2998 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302999 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
3000 wmi_handle, ap_profile);
Govind Singha4836fd2016-03-07 16:45:38 +05303001
Govind Singhb53420c2016-03-09 14:32:57 +05303002 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303003}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303004#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303005/**
3006 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3007 * @wmi_handle: wmi handle
3008 * @scan_period: scan period
3009 * @scan_age: scan age
3010 * @vdev_id: vdev id
3011 *
3012 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3013 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303014 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303015 */
Govind Singhb53420c2016-03-09 14:32:57 +05303016QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303017 uint32_t scan_period,
3018 uint32_t scan_age,
3019 uint32_t vdev_id)
3020{
3021 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3022
3023 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3024 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3025 scan_period, scan_age, vdev_id);
3026
Govind Singhb53420c2016-03-09 14:32:57 +05303027 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303028}
3029
3030/**
3031 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3032 * @wmi_handle: wmi handle
3033 * @chan_count: channel count
3034 * @chan_list: channel list
3035 * @list_type: list type
3036 * @vdev_id: vdev id
3037 *
3038 * Set roam offload channel list.
3039 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303040 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303041 */
Govind Singhb53420c2016-03-09 14:32:57 +05303042QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303043 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003044 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303045 uint8_t list_type, uint32_t vdev_id)
3046{
3047 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3048
3049 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3050 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3051 chan_count, chan_list,
3052 list_type, vdev_id);
3053
Govind Singhb53420c2016-03-09 14:32:57 +05303054 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303055}
3056
3057/**
3058 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3059 * @wmi_hdl: wmi handle
3060 * @rssi_change_thresh: RSSI Change threshold
3061 * @bcn_rssi_weight: beacon RSSI weight
3062 * @vdev_id: vdev id
3063 *
3064 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3065 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303066 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303067 */
Govind Singhb53420c2016-03-09 14:32:57 +05303068QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303069 uint32_t vdev_id,
3070 int32_t rssi_change_thresh,
3071 uint32_t bcn_rssi_weight,
3072 uint32_t hirssi_delay_btw_scans)
3073{
3074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3075
3076 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3077 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3078 vdev_id, rssi_change_thresh,
3079 bcn_rssi_weight, hirssi_delay_btw_scans);
3080
Govind Singhb53420c2016-03-09 14:32:57 +05303081 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303082}
3083
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303084QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3085 struct wmi_per_roam_config_req *req_buf)
3086{
3087 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3088
3089 if (wmi_handle->ops->send_per_roam_config_cmd)
3090 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3091 req_buf);
3092
3093 return QDF_STATUS_E_FAILURE;
3094}
3095
Govind Singha4836fd2016-03-07 16:45:38 +05303096/**
Anurag Chouhan97f00422017-09-11 14:56:30 +05303097 * wmi_unified_set_arp_stats_req() - set arp stats request
3098 * @wmi_hdl: wmi handle
3099 * @req_buf: pointer to set_arp_stats
3100 *
3101 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3102 */
3103QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
3104 struct set_arp_stats *req_buf)
3105{
3106 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3107
3108 if (wmi_handle->ops->send_set_arp_stats_req_cmd)
3109 return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
3110 req_buf);
3111
3112 return QDF_STATUS_E_FAILURE;
3113}
3114
3115/**
3116 * wmi_unified_get_arp_stats_req() - get arp stats request
3117 * @wmi_hdl: wmi handle
3118 * @req_buf: pointer to get_arp_stats
3119 *
3120 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3121 */
3122QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
3123 struct get_arp_stats *req_buf)
3124{
3125 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3126
3127 if (wmi_handle->ops->send_get_arp_stats_req_cmd)
3128 return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
3129 req_buf);
3130
3131 return QDF_STATUS_E_FAILURE;
3132}
3133
Vignesh Viswanathan81bde492017-09-25 14:36:38 +05303134QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
3135 struct wmi_unified_pmk_cache *req_buf)
3136{
3137 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3138
3139 if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
3140 return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
3141 req_buf);
3142
3143 return QDF_STATUS_E_FAILURE;
3144}
3145
3146#if defined(WLAN_FEATURE_FILS_SK)
3147QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
3148 struct hlp_params *req_buf)
3149{
3150 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3151
3152 if (wmi_handle->ops->send_roam_scan_hlp_cmd)
3153 return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
3154 req_buf);
3155
3156 return QDF_STATUS_E_FAILURE;
3157}
3158#endif
3159
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303160QDF_STATUS
3161wmi_unified_set_active_apf_mode_cmd(void *wmi_hdl, uint8_t vdev_id,
3162 enum wmi_host_active_apf_mode ucast_mode,
3163 enum wmi_host_active_apf_mode
3164 mcast_bcast_mode)
Dustin Brown4423f632017-01-13 15:24:07 -08003165{
3166 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3167
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303168 if (!wmi->ops->send_set_active_apf_mode_cmd) {
3169 WMI_LOGD("send_set_active_apf_mode_cmd op is NULL");
Dustin Brown4423f632017-01-13 15:24:07 -08003170 return QDF_STATUS_E_FAILURE;
3171 }
3172
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303173 return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
Dustin Brown4423f632017-01-13 15:24:07 -08003174 ucast_mode,
3175 mcast_bcast_mode);
3176}
3177
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303178/**
3179 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3180 * @param wmi_handle : handle to WMI.
3181 * @param param : tpc config param
3182 *
3183 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3184 */
3185QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3186 uint32_t param)
3187{
3188 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3189
3190 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3191 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3192 param);
3193
3194 return QDF_STATUS_E_FAILURE;
3195}
3196
3197/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303198 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3199 * @param wmi_handle : handle to WMI.
3200 * @param param : pointer to set bwf param
3201 *
3202 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3203 */
3204QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3205 struct set_bwf_params *param)
3206{
3207 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3208
3209 if (wmi_handle->ops->send_set_bwf_cmd)
3210 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3211
3212 return QDF_STATUS_E_FAILURE;
3213}
3214
3215/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303216 * wmi_unified_set_atf_cmd_send() - WMI set atf function
3217 * @param wmi_handle : handle to WMI.
3218 * @param param : pointer to set atf param
3219 *
3220 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3221 */
3222QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl,
3223 struct set_atf_params *param)
3224{
3225 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3226
3227 if (wmi_handle->ops->send_set_atf_cmd)
3228 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
3229
3230 return QDF_STATUS_E_FAILURE;
3231}
3232
3233/**
3234 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3235 * @param wmi_handle : handle to WMI.
3236 * @param param : pointer to hold pdev fips param
3237 *
3238 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3239 */
3240QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3241 struct fips_params *param)
3242{
3243 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3244
3245 if (wmi_handle->ops->send_pdev_fips_cmd)
3246 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3247
3248 return QDF_STATUS_E_FAILURE;
3249}
3250
3251/**
3252 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3253 * @param wmi_handle : handle to WMI.
3254 * @param param : pointer to hold wlan profile param
3255 *
3256 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3257 */
3258QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3259 struct wlan_profile_params *param)
3260{
3261 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3262
3263 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3264 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3265 param);
3266
3267 return QDF_STATUS_E_FAILURE;
3268}
3269
3270/**
3271 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3272 * @param wmi_handle : handle to WMI.
3273 * @param param : pointer to hold wlan profile param
3274 *
3275 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3276 */
3277QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3278 struct wlan_profile_params *param)
3279{
3280 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3281
3282 if (wmi->ops->send_wlan_profile_trigger_cmd)
3283 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3284 param);
3285
3286 return QDF_STATUS_E_FAILURE;
3287}
3288
3289/**
3290 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3291 * @param wmi_handle : handle to WMI.
3292 * @param param : pointer to hold channel param
3293 *
3294 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3295 */
3296QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3297 struct channel_param *param)
3298{
3299 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3300
3301 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3302 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3303 param);
3304
3305 return QDF_STATUS_E_FAILURE;
3306}
3307
3308/**
3309 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3310 * @param wmi_handle : handle to WMI.
3311 * @param param : pointer to hold channel param
3312 *
3313 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3314 */
3315QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3316 struct ht_ie_params *param)
3317{
3318 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3319
3320 if (wmi_handle->ops->send_set_ht_ie_cmd)
3321 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3322
3323 return QDF_STATUS_E_FAILURE;
3324}
3325
3326/**
3327 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3328 * @param wmi_handle : handle to WMI.
3329 * @param param : pointer to hold channel param
3330 *
3331 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3332 */
3333QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3334 struct vht_ie_params *param)
3335{
3336 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3337
3338 if (wmi_handle->ops->send_set_vht_ie_cmd)
3339 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3340
3341 return QDF_STATUS_E_FAILURE;
3342}
3343
3344/**
3345 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3346 * @param wmi_handle : handle to WMI.
3347 * @param param : pointer to hold wmm param
3348 *
3349 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3350 */
3351QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3352 struct wmm_update_params *param)
3353{
3354 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3355
3356 if (wmi_handle->ops->send_wmm_update_cmd)
3357 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3358
3359 return QDF_STATUS_E_FAILURE;
3360}
3361
3362/**
3363 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3364 * @param wmi_handle : handle to WMI.
3365 * @param param : pointer to hold ant switch tbl param
3366 *
3367 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3368 */
3369QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3370 struct ant_switch_tbl_params *param)
3371{
3372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3373
3374 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3375 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3376 param);
3377
3378 return QDF_STATUS_E_FAILURE;
3379}
3380
3381/**
3382 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3383 * @param wmi_handle : handle to WMI.
3384 * @param param : pointer to hold ratepwr table param
3385 *
3386 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3387 */
3388QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3389 struct ratepwr_table_params *param)
3390{
3391 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3392
3393 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3394 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3395 param);
3396
3397 return QDF_STATUS_E_FAILURE;
3398}
3399
3400/**
3401 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3402 * @param wmi_handle : handle to WMI.
3403 *
3404 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3405 */
3406QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3407{
3408 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3409
3410 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3411 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3412
3413 return QDF_STATUS_E_FAILURE;
3414}
3415
3416/**
3417 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3418 * @param wmi_handle : handle to WMI.
3419 * @param param : pointer to hold ctl table param
3420 *
3421 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3422 */
3423QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3424 struct ctl_table_params *param)
3425{
3426 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3427
3428 if (wmi_handle->ops->send_set_ctl_table_cmd)
3429 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3430 param);
3431
3432 return QDF_STATUS_E_FAILURE;
3433}
3434
3435/**
3436 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3437 * @param wmi_handle : handle to WMI.
3438 * @param param : pointer to hold mimogain param
3439 *
3440 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3441 */
3442QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3443 struct mimogain_table_params *param)
3444{
3445 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3446
3447 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3448 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3449 param);
3450
3451 return QDF_STATUS_E_FAILURE;
3452}
3453
3454/**
3455 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3456 * chainmsk cmd function
3457 * @param wmi_handle : handle to WMI.
3458 * @param param : pointer to hold ratepwr chainmsk param
3459 *
3460 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3461 */
3462QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3463 struct ratepwr_chainmsk_params *param)
3464{
3465 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3466
3467 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3468 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3469
3470 return QDF_STATUS_E_FAILURE;
3471}
3472
3473/**
3474 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3475 * @param wmi_handle : handle to WMI.
3476 * @param param : pointer to hold macaddr param
3477 *
3478 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3479 */
3480QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3481 struct macaddr_params *param)
3482{
3483 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3484
3485 if (wmi_handle->ops->send_set_macaddr_cmd)
3486 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3487
3488 return QDF_STATUS_E_FAILURE;
3489}
3490
3491/**
3492 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3493 * @param wmi_handle : handle to WMI.
3494 *
3495 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3496 */
3497QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3498{
3499 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3500
3501 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3502 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3503
3504 return QDF_STATUS_E_FAILURE;
3505}
3506
3507/**
3508 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3509 * @param wmi_handle : handle to WMI.
3510 *
3511 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3512 */
3513QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3514{
3515 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3516
3517 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3518 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3519
3520 return QDF_STATUS_E_FAILURE;
3521}
3522
3523/**
3524 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3525 * @param wmi_handle : handle to WMI.
3526 * @param param : pointer to hold acparams param
3527 *
3528 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3529 */
3530QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3531 struct acparams_params *param)
3532{
3533 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3534
3535 if (wmi_handle->ops->send_set_acparams_cmd)
3536 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3537 param);
3538
3539 return QDF_STATUS_E_FAILURE;
3540}
3541
3542/**
3543 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3544 * tid map cmd function
3545 * @param wmi_handle : handle to WMI.
3546 * @param param : pointer to hold dscp param
3547 *
3548 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3549 */
3550QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3551 struct vap_dscp_tid_map_params *param)
3552{
3553 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3554
3555 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3556 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3557
3558 return QDF_STATUS_E_FAILURE;
3559}
3560
3561/**
3562 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3563 * reserve cmd function
3564 * @param wmi_handle : handle to WMI.
3565 * @param param : pointer to hold ast param
3566 *
3567 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3568 */
3569QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3570 struct proxy_ast_reserve_params *param)
3571{
3572 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3573
3574 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3575 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3576 param);
3577
3578 return QDF_STATUS_E_FAILURE;
3579}
3580
3581/**
3582 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3583 * @param wmi_handle : handle to WMI.
3584 * @param param : pointer to hold qvit param
3585 *
3586 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3587 */
3588QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3589 struct pdev_qvit_params *param)
3590{
3591 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3592
3593 if (wmi_handle->ops->send_pdev_qvit_cmd)
3594 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3595
3596 return QDF_STATUS_E_FAILURE;
3597}
3598
3599/**
3600 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3601 * @param wmi_handle : handle to WMI.
3602 * @param param : pointer to hold mcast grp param
3603 *
3604 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3605 */
3606QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3607 struct mcast_group_update_params *param)
3608{
3609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3610
3611 if (wmi_handle->ops->send_mcast_group_update_cmd)
3612 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3613 param);
3614
3615 return QDF_STATUS_E_FAILURE;
3616}
3617
3618/**
3619 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3620 * @param wmi_handle : handle to WMI.
3621 * @param param : pointer to hold wds entry param
3622 *
3623 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3624 */
3625QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3626 struct peer_add_wds_entry_params *param)
3627{
3628 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3629
3630 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3631 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3632 param);
3633
3634 return QDF_STATUS_E_FAILURE;
3635}
3636
3637/**
3638 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3639 * @param wmi_handle : handle to WMI.
3640 * @param param : pointer to hold wds entry param
3641 *
3642 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3643 */
3644QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3645 struct peer_del_wds_entry_params *param)
3646{
3647 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3648
3649 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3650 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3651 param);
3652
3653 return QDF_STATUS_E_FAILURE;
3654}
3655
3656/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05303657 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
3658 * @param wmi_hdl : handle to WMI.
3659 * @param param : pointer to hold bridge mac addr param
3660 *
3661 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3662 */
3663QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
3664 struct set_bridge_mac_addr_params *param)
3665{
3666 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3667
3668 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
3669 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
3670 param);
3671
3672 return QDF_STATUS_E_FAILURE;
3673}
3674
3675/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303676 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3677 * @param wmi_handle : handle to WMI.
3678 * @param param : pointer to hold wds entry param
3679 *
3680 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3681 */
3682QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3683 struct peer_update_wds_entry_params *param)
3684{
3685 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3686
3687 if (wmi->ops->send_peer_update_wds_entry_cmd)
3688 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3689
3690 return QDF_STATUS_E_FAILURE;
3691}
3692
3693/**
3694 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3695 * @param wmi_handle : handle to WMI.
3696 * @param param : pointer to hold phyerr enable param
3697 *
3698 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3699 */
3700QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3701{
3702 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3703
3704 if (wmi_handle->ops->send_phyerr_enable_cmd)
3705 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3706
3707 return QDF_STATUS_E_FAILURE;
3708}
3709
3710/**
3711 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3712 * @param wmi_handle : handle to WMI.
3713 * @param param : pointer to hold phyerr disable param
3714 *
3715 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3716 */
3717QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3718{
3719 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3720
3721 if (wmi_handle->ops->send_phyerr_disable_cmd)
3722 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3723
3724 return QDF_STATUS_E_FAILURE;
3725}
3726
3727/**
3728 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3729 * @param wmi_handle : handle to WMI.
3730 * @param param : pointer to hold antenna param
3731 *
3732 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3733 */
3734QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3735 struct smart_ant_enable_params *param)
3736{
3737 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3738
3739 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3740 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3741 param);
3742
3743 return QDF_STATUS_E_FAILURE;
3744}
3745
3746/**
3747 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3748 * @param wmi_handle : handle to WMI.
3749 * @param param : pointer to hold antenna param
3750 *
3751 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3752 */
3753QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3754 struct smart_ant_rx_ant_params *param)
3755{
3756 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3757
3758 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3759 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3760
3761 return QDF_STATUS_E_FAILURE;
3762}
3763
3764/**
3765 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3766 * @param wmi_handle : handle to WMI.
3767 * @param param : pointer to hold antenna param
3768 *
3769 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3770 */
3771QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3772 uint8_t macaddr[IEEE80211_ADDR_LEN],
3773 struct smart_ant_tx_ant_params *param)
3774{
3775 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3776
3777 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3778 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3779 param);
3780
3781 return QDF_STATUS_E_FAILURE;
3782}
3783
3784/**
3785 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3786 * @param wmi_handle : handle to WMI.
3787 * @param param : pointer to hold antenna param
3788 *
3789 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3790 */
3791QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3792 uint8_t macaddr[IEEE80211_ADDR_LEN],
3793 struct smart_ant_training_info_params *param)
3794{
3795 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3796
3797 if (wmi->ops->send_smart_ant_set_training_info_cmd)
3798 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
3799 macaddr, param);
3800
3801 return QDF_STATUS_E_FAILURE;
3802}
3803
3804/**
3805 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
3806 * @param wmi_handle : handle to WMI.
3807 * @param macaddr : MAC address
3808 * @param param : pointer to hold node parameter
3809 *
3810 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3811 */
3812QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
3813 uint8_t macaddr[IEEE80211_ADDR_LEN],
3814 struct smart_ant_node_config_params *param)
3815{
3816 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3817
3818 if (wmi->ops->send_smart_ant_set_node_config_cmd)
3819 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
3820 macaddr, param);
3821
3822 return QDF_STATUS_E_FAILURE;
3823}
3824
3825/**
3826 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
3827 * @param wmi_handle : handle to WMI.
3828 * @param param : pointer to hold antenna param
3829 *
3830 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3831 */
3832QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
3833 struct smart_ant_enable_tx_feedback_params *param)
3834{
3835 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3836
3837 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
3838 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
3839 param);
3840
3841 return QDF_STATUS_E_FAILURE;
3842}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05303843qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303844
3845/**
3846 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
3847 * @param wmi_handle : handle to WMI.
3848 * @param param : pointer to hold spectral config param
3849 *
3850 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3851 */
3852QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
3853 struct vdev_spectral_configure_params *param)
3854{
3855 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3856
3857 if (wmi->ops->send_vdev_spectral_configure_cmd)
3858 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
3859
3860 return QDF_STATUS_E_FAILURE;
3861}
3862
3863/**
3864 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
3865 * @param wmi_handle : handle to WMI.
3866 * @param param : pointer to hold enable spectral param
3867 *
3868 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3869 */
3870QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
3871 struct vdev_spectral_enable_params *param)
3872{
3873 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3874
3875 if (wmi->ops->send_vdev_spectral_enable_cmd)
3876 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
3877
3878 return QDF_STATUS_E_FAILURE;
3879}
3880
3881/**
3882 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
3883 * @param wmi_handle : handle to WMI.
3884 * @param param : pointer to hold chan info param
3885 *
3886 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3887 */
3888QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
3889 struct bss_chan_info_request_params *param)
3890{
3891 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3892
3893 if (wmi->ops->send_bss_chan_info_request_cmd)
3894 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
3895
3896 return QDF_STATUS_E_FAILURE;
3897}
3898
3899/**
3900 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
3901 * @param wmi_handle : handle to WMI.
3902 * @param param : pointer to hold thermal mitigation param
3903 *
3904 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3905 */
3906QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
3907 struct thermal_mitigation_params *param)
3908{
3909 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3910
3911 if (wmi->ops->send_thermal_mitigation_param_cmd)
3912 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
3913
3914 return QDF_STATUS_E_FAILURE;
3915}
3916
3917/**
3918 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
3919 * @param wmi_handle : handle to WMI.
3920 * @param macaddr : MAC address
3921 * @param param : pointer to hold neighbour rx parameter
3922 *
3923 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3924 */
3925QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
3926 uint8_t macaddr[IEEE80211_ADDR_LEN],
3927 struct set_neighbour_rx_params *param)
3928{
3929 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3930
3931 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
3932 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
3933 macaddr, param);
3934
3935 return QDF_STATUS_E_FAILURE;
3936}
3937
3938/**
3939 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
3940 * @param wmi_handle : handle to WMI.
3941 * @param param : pointer to hold fwtest param
3942 *
3943 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3944 */
3945QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
3946 struct set_fwtest_params *param)
3947{
3948 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3949
3950 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
3951 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
3952
3953 return QDF_STATUS_E_FAILURE;
3954}
3955
Subrat Mishrad7c7a562017-09-27 14:41:20 +05303956#ifdef WLAN_SUPPORT_FILS
3957QDF_STATUS
3958wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, struct fd_params *param)
3959{
3960 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3961
3962 if (wmi_handle->ops->send_fils_discovery_send_cmd)
3963 return wmi_handle->ops->send_fils_discovery_send_cmd(wmi_handle,
3964 param);
3965
3966 return QDF_STATUS_E_FAILURE;
3967}
3968
3969QDF_STATUS
3970wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl,
3971 struct config_fils_params *param)
3972{
3973 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3974
3975 if (wmi->ops->send_vdev_fils_enable_cmd)
3976 return wmi->ops->send_vdev_fils_enable_cmd(wmi, param);
3977
3978 return QDF_STATUS_E_FAILURE;
3979}
3980
3981QDF_STATUS
3982wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf,
3983 uint32_t *vdev_id)
3984{
3985 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3986
3987 if (wmi_handle->ops->extract_swfda_vdev_id)
3988 return wmi_handle->ops->extract_swfda_vdev_id(wmi_handle,
3989 evt_buf, vdev_id);
3990
3991 return QDF_STATUS_E_FAILURE;
3992}
3993#endif /* WLAN_SUPPORT_FILS */
3994
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303995/**
3996 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
3997 * @param wmi_handle : handle to WMI.
3998 * @param param : pointer to hold config ratemask param
3999 *
4000 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4001 */
4002QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4003 struct config_ratemask_params *param)
4004{
4005 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4006
4007 if (wmi->ops->send_vdev_config_ratemask_cmd)
4008 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4009
4010 return QDF_STATUS_E_FAILURE;
4011}
4012
4013/**
Sathish Kumar6011c742017-11-08 14:49:58 +05304014 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
4015 * size function
4016 * @param wmi_handle : handle to WMI
4017 * @param param : pointer to hold custom aggr size param
4018 *
4019 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4020 */
4021QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
4022 struct set_custom_aggr_size_params *param)
4023{
4024 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4025
4026 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
4027 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
4028
4029 return QDF_STATUS_E_FAILURE;
4030}
4031
4032/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05304033 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
4034 * @param wmi_handle : handle to WMI
4035 * @param param : pointer to hold qdepth threshold params
4036 *
4037 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4038 */
4039QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
4040 struct set_qdepth_thresh_params *param)
4041{
4042 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4043
4044 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
4045 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
4046
4047 return QDF_STATUS_E_FAILURE;
4048}
4049
4050/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304051 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4052 * @param wmi_handle : handle to WMI.
4053 * @param param : pointer to hold regdomain param
4054 *
4055 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4056 */
4057QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4058 struct pdev_set_regdomain_params *param)
4059{
4060 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4061
4062 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4063 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4064 param);
4065
4066 return QDF_STATUS_E_FAILURE;
4067}
4068
4069/**
4070 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4071 * @param wmi_handle : handle to WMI.
4072 * @param param : pointer to hold quiet mode param
4073 *
4074 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4075 */
4076QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4077 struct set_quiet_mode_params *param)
4078{
4079 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4080
4081 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4082 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4083 param);
4084
4085 return QDF_STATUS_E_FAILURE;
4086}
4087
4088/**
4089 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4090 * @param wmi_handle : handle to WMI.
4091 * @param param : pointer to hold beacon filter param
4092 *
4093 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4094 */
4095QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4096 struct set_beacon_filter_params *param)
4097{
4098 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4099
4100 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4101 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4102 param);
4103
4104 return QDF_STATUS_E_FAILURE;
4105}
4106
4107/**
4108 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4109 * @param wmi_handle : handle to WMI.
4110 * @param param : pointer to hold beacon filter param
4111 *
4112 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4113 */
4114QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4115 struct remove_beacon_filter_params *param)
4116{
4117 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4118
4119 if (wmi->ops->send_remove_beacon_filter_cmd)
4120 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4121
4122 return QDF_STATUS_E_FAILURE;
4123}
4124
4125/**
4126 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4127 * @param wmi_handle : handle to WMI.
4128 * @param macaddr : MAC address
4129 * @param param : pointer to hold mgmt parameter
4130 *
4131 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4132 */
4133#if 0
4134QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4135 uint8_t macaddr[IEEE80211_ADDR_LEN],
4136 struct mgmt_params *param)
4137{
4138 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4139
4140 if (wmi_handle->ops->send_mgmt_cmd)
4141 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4142 macaddr, param);
4143
4144 return QDF_STATUS_E_FAILURE;
4145}
4146#endif
4147
4148/**
4149 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4150 * @param wmi_handle : handle to WMI.
4151 * @param macaddr : MAC address
4152 * @param param : pointer to hold addba resp parameter
4153 *
4154 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4155 */
4156QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4157 uint8_t macaddr[IEEE80211_ADDR_LEN],
4158 struct addba_clearresponse_params *param)
4159{
4160 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4161
4162 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4163 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4164 macaddr, param);
4165
4166 return QDF_STATUS_E_FAILURE;
4167}
4168
4169/**
4170 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4171 * @param wmi_handle : handle to WMI.
4172 * @param macaddr : MAC address
4173 * @param param : pointer to hold addba parameter
4174 *
4175 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4176 */
4177QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4178 uint8_t macaddr[IEEE80211_ADDR_LEN],
4179 struct addba_send_params *param)
4180{
4181 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4182
4183 if (wmi_handle->ops->send_addba_send_cmd)
4184 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4185 macaddr, param);
4186
4187 return QDF_STATUS_E_FAILURE;
4188}
4189
4190/**
4191 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4192 * @param wmi_handle : handle to WMI.
4193 * @param macaddr : MAC address
4194 * @param param : pointer to hold delba parameter
4195 *
4196 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4197 */
4198QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4199 uint8_t macaddr[IEEE80211_ADDR_LEN],
4200 struct delba_send_params *param)
4201{
4202 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4203
4204 if (wmi_handle->ops->send_delba_send_cmd)
4205 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4206 macaddr, param);
4207
4208 return QDF_STATUS_E_FAILURE;
4209}
4210
4211/**
4212 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4213 * @param wmi_handle : handle to WMI.
4214 * @param macaddr : MAC address
4215 * @param param : pointer to hold addba set resp parameter
4216 *
4217 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4218 */
4219QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4220 uint8_t macaddr[IEEE80211_ADDR_LEN],
4221 struct addba_setresponse_params *param)
4222{
4223 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4224
4225 if (wmi_handle->ops->send_addba_setresponse_cmd)
4226 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4227 macaddr, param);
4228
4229 return QDF_STATUS_E_FAILURE;
4230}
4231
4232/**
4233 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4234 * @param wmi_handle : handle to WMI.
4235 * @param macaddr : MAC address
4236 * @param param : pointer to hold singleamsdu parameter
4237 *
4238 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4239 */
4240QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4241 uint8_t macaddr[IEEE80211_ADDR_LEN],
4242 struct singleamsdu_params *param)
4243{
4244 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4245
4246 if (wmi_handle->ops->send_singleamsdu_cmd)
4247 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4248 macaddr, param);
4249
4250 return QDF_STATUS_E_FAILURE;
4251}
4252
4253/**
4254 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4255 * @param wmi_handle : handle to WMI.
4256 * @param macaddr : MAC address
4257 * @param param : pointer to hold set_qboost parameter
4258 *
4259 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4260 */
4261QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4262 uint8_t macaddr[IEEE80211_ADDR_LEN],
4263 struct set_qboost_params *param)
4264{
4265 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4266
4267 if (wmi_handle->ops->send_set_qboost_param_cmd)
4268 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4269 macaddr, param);
4270
4271 return QDF_STATUS_E_FAILURE;
4272}
4273
4274/**
4275 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4276 * @param wmi_handle : handle to WMI.
4277 * @param param : pointer to hold mu scan param
4278 *
4279 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4280 */
4281QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4282 struct mu_scan_params *param)
4283{
4284 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4285
4286 if (wmi_handle->ops->send_mu_scan_cmd)
4287 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4288
4289 return QDF_STATUS_E_FAILURE;
4290}
4291
4292/**
4293 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4294 * @param wmi_handle : handle to WMI.
4295 * @param param : pointer to hold mu scan param
4296 *
4297 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4298 */
4299QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4300 struct lteu_config_params *param)
4301{
4302 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4303
4304 if (wmi_handle->ops->send_lteu_config_cmd)
4305 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4306
4307 return QDF_STATUS_E_FAILURE;
4308}
4309
4310/**
4311 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4312 * @param wmi_handle : handle to WMI.
4313 * @param param : pointer to hold mu scan param
4314 *
4315 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4316 */
4317QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4318 struct set_ps_mode_params *param)
4319{
4320 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4321
4322 if (wmi_handle->ops->send_set_ps_mode_cmd)
4323 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4324
4325 return QDF_STATUS_E_FAILURE;
4326}
4327
4328/**
4329 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4330 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05304331 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304332 *
4333 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4334 */
4335QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05304336 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304337{
4338 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4339
4340 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05304341 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304342
4343 return QDF_STATUS_E_FAILURE;
4344}
4345
4346/**
4347 * wmi_save_service_bitmap() - save service bitmap
4348 * @wmi_handle: wmi handle
4349 * @param evt_buf: pointer to event buffer
4350 *
4351 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4352 */
Rajeev Kumar77901472017-02-12 02:12:17 -08004353QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
4354 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304355{
4356 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4357
4358 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304359 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08004360 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304361 }
4362 return QDF_STATUS_E_FAILURE;
4363}
4364
4365/**
4366 * wmi_save_ext_service_bitmap() - save extended service bitmap
4367 * @wmi_handle: wmi handle
4368 * @param evt_buf: pointer to event buffer
4369 *
4370 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4371 */
4372QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
4373 void *bitmap_buf)
4374{
4375 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4376
4377 if (wmi_handle->ops->save_ext_service_bitmap) {
4378 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
4379 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304380 }
4381 return QDF_STATUS_E_FAILURE;
4382}
4383
4384/**
4385 * wmi_save_fw_version() - Save fw version
4386 * @wmi_handle: wmi handle
4387 * @param evt_buf: pointer to event buffer
4388 *
4389 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4390 */
4391QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4392{
4393 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4394
4395 if (wmi_handle->ops->save_fw_version) {
4396 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4397 return 0;
4398 }
4399 return QDF_STATUS_E_FAILURE;
4400
4401}
4402
4403/**
4404 * wmi_check_and_update_fw_version() - Ready and fw version check
4405 * @wmi_handle: wmi handle
4406 * @param evt_buf: pointer to event buffer
4407 *
4408 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4409 */
4410QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4411{
4412 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4413
4414 if (wmi_handle->ops->check_and_update_fw_version)
4415 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4416 evt_buf);
4417
4418 return QDF_STATUS_E_FAILURE;
4419
4420}
4421
4422/**
4423 * wmi_service_enabled() - Check if service enabled
4424 * @param wmi_handle: wmi handle
4425 * @param service_id: service identifier
4426 *
4427 * Return: 1 enabled, 0 disabled
4428 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304429bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4430{
4431 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4432
4433 if ((service_id < wmi_services_max) &&
4434 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4435 if (wmi_handle->ops->is_service_enabled) {
4436 return wmi_handle->ops->is_service_enabled(wmi_handle,
4437 wmi_handle->services[service_id]);
4438 }
4439 } else {
4440 qdf_print("Support not added yet for Service %d\n", service_id);
4441 }
Sourav Mohapatraa7b454d2017-12-03 11:44:44 +05304442
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304443 return false;
4444}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304445
4446/**
4447 * wmi_get_target_cap_from_service_ready() - extract service ready event
4448 * @wmi_handle: wmi handle
4449 * @param evt_buf: pointer to received event buffer
4450 * @param ev: pointer to hold target capability information extracted from even
4451 *
4452 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4453 */
4454QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004455 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304456{
4457 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4458
4459 if (wmi->ops->get_target_cap_from_service_ready)
4460 return wmi->ops->get_target_cap_from_service_ready(wmi,
4461 evt_buf, ev);
4462
4463 return QDF_STATUS_E_FAILURE;
4464}
4465
4466/**
4467 * wmi_extract_fw_version() - extract fw version
4468 * @wmi_handle: wmi handle
4469 * @param evt_buf: pointer to event buffer
4470 * @param fw_ver: Pointer to hold fw version
4471 *
4472 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4473 */
4474QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4475 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4476{
4477 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4478
4479 if (wmi_handle->ops->extract_fw_version)
4480 return wmi_handle->ops->extract_fw_version(wmi_handle,
4481 evt_buf, fw_ver);
4482
4483 return QDF_STATUS_E_FAILURE;
4484}
4485
4486/**
4487 * wmi_extract_fw_abi_version() - extract fw abi version
4488 * @wmi_handle: wmi handle
4489 * @param evt_buf: Pointer to event buffer
4490 * @param fw_ver: Pointer to hold fw abi version
4491 *
4492 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4493 */
4494QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4495 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4496{
4497 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4498
4499 if (wmi_handle->ops->extract_fw_abi_version)
4500 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4501 evt_buf, fw_ver);
4502
4503 return QDF_STATUS_E_FAILURE;
4504}
4505
4506/**
4507 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4508 * @wmi_handle: wmi handle
4509 * @param evt_buf: Pointer to event buffer
4510 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4511 *
4512 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4513 */
4514QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004515 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304516{
4517 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4518
4519 if (wmi_handle->ops->extract_hal_reg_cap)
4520 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4521 evt_buf, hal_reg_cap);
4522
4523 return QDF_STATUS_E_FAILURE;
4524}
4525
4526/**
4527 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4528 * request event
4529 * @wmi_handle: wmi handle
4530 * @param evt_buf: pointer to event buffer
4531 * @param num_entries: pointer to hold number of entries requested
4532 *
4533 * Return: Number of entries requested
4534 */
4535host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4536 void *evt_buf, uint8_t *num_entries)
4537{
4538 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4539
4540 if (wmi_handle->ops->extract_host_mem_req)
4541 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4542 evt_buf, num_entries);
4543
4544 *num_entries = 0;
4545 return NULL;
4546}
4547
4548/**
4549 * wmi_ready_extract_init_status() - Extract init status from ready event
4550 * @wmi_handle: wmi handle
4551 * @param ev: Pointer to event buffer
4552 *
4553 * Return: ready status
4554 */
4555uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4556{
4557 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4558
4559 if (wmi_handle->ops->ready_extract_init_status)
4560 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4561 ev);
4562
4563
4564 return 1;
4565
4566}
4567
4568/**
4569 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4570 * @wmi_handle: wmi handle
4571 * @param ev: pointer to event buffer
4572 * @param macaddr: Pointer to hold MAC address
4573 *
4574 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4575 */
4576QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4577{
4578 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4579
4580 if (wmi_handle->ops->ready_extract_mac_addr)
4581 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4582 ev, macaddr);
4583
4584
4585 return QDF_STATUS_E_FAILURE;
4586}
4587
4588/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07004589 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
4590 * @wmi_handle: wmi handle
4591 * @param ev: pointer to event buffer
4592 * @param num_mac_addr: Pointer to number of entries
4593 *
4594 * Return: address to start of mac addr list
4595 */
4596wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
4597 uint8_t *num_mac_addr)
4598{
4599 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4600
4601 if (wmi_handle->ops->ready_extract_mac_addr_list)
4602 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
4603 ev, num_mac_addr);
4604
4605 *num_mac_addr = 0;
4606
4607 return NULL;
4608}
4609
4610/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05304611 * wmi_extract_ready_params() - Extract data from ready event apart from
4612 * status, macaddr and version.
4613 * @wmi_handle: Pointer to WMI handle.
4614 * @evt_buf: Pointer to Ready event buffer.
4615 * @ev_param: Pointer to host defined struct to copy the data from event.
4616 *
4617 * Return: QDF_STATUS_SUCCESS on success.
4618 */
4619QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
4620 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
4621{
4622 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4623
4624 if (wmi_handle->ops->extract_ready_event_params)
4625 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
4626 evt_buf, ev_param);
4627
4628 return QDF_STATUS_E_FAILURE;
4629}
4630
4631/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304632 * wmi_extract_dbglog_data_len() - extract debuglog data length
4633 * @wmi_handle: wmi handle
4634 * @param evt_buf: pointer to event buffer
4635 * @param len: length of buffer
4636 *
4637 * Return: length
4638 */
4639uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004640 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304641{
4642 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4643
4644 if (wmi_handle->ops->extract_dbglog_data_len)
4645 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4646 evt_buf, len);
4647
4648
4649 return NULL;
4650}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304651qdf_export_symbol(wmi_extract_dbglog_data_len);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304652
4653/**
4654 * wmi_send_ext_resource_config() - send extended resource configuration
4655 * @wmi_handle: wmi handle
4656 * @param ext_cfg: pointer to extended resource configuration
4657 *
4658 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4659 */
4660QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4661 wmi_host_ext_resource_config *ext_cfg)
4662{
4663 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4664
4665 if (wmi_handle->ops->send_ext_resource_config)
4666 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4667 ext_cfg);
4668
4669 return QDF_STATUS_E_FAILURE;
4670}
4671
4672/**
4673 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4674 * @param wmi_handle : handle to WMI.
nobeljf74583b2018-01-25 16:35:36 -08004675 * @mac_id: mac_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304676 *
4677 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4678 */
nobeljf74583b2018-01-25 16:35:36 -08004679QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
4680 uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304681{
4682 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4683
4684 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
nobeljf74583b2018-01-25 16:35:36 -08004685 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304686
4687 return QDF_STATUS_E_FAILURE;
4688}
4689
4690/**
4691 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4692 * @param wmi_handle : handle to WMI.
4693 * @param param : pointer to hold packet power info param
4694 *
4695 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4696 */
4697QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4698 struct packet_power_info_params *param)
4699{
4700 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4701
4702 if (wmi->ops->send_packet_power_info_get_cmd)
4703 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4704
4705 return QDF_STATUS_E_FAILURE;
4706}
4707
4708/**
4709 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4710 * @param wmi_handle : handle to WMI.
4711 * @param param : pointer to hold gpio config param
4712 *
4713 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4714 */
4715QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4716 struct gpio_config_params *param)
4717{
4718 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4719
4720 if (wmi_handle->ops->send_gpio_config_cmd)
4721 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4722
4723 return QDF_STATUS_E_FAILURE;
4724}
4725
4726/**
4727 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4728 * @param wmi_handle : handle to WMI.
4729 * @param param : pointer to hold gpio config param
4730 *
4731 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4732 */
4733QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4734 struct gpio_output_params *param)
4735{
4736 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4737
4738 if (wmi_handle->ops->send_gpio_output_cmd)
4739 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4740
4741 return QDF_STATUS_E_FAILURE;
4742}
4743
4744/**
4745 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4746 * @param wmi_handle : handle to WMI.
4747 * @param param : pointer to hold rtt meas req test param
4748 *
4749 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4750 */
4751QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4752 struct rtt_meas_req_test_params *param)
4753{
4754 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4755
4756 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4757 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4758 param);
4759
4760 return QDF_STATUS_E_FAILURE;
4761}
4762
4763/**
4764 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4765 * @param wmi_handle : handle to WMI.
4766 * @param param : pointer to hold rtt meas req param
4767 *
4768 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4769 */
4770QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4771 struct rtt_meas_req_params *param)
4772{
4773 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4774
4775 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4776 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4777 param);
4778
4779 return QDF_STATUS_E_FAILURE;
4780}
4781
4782/**
4783 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4784 * @param wmi_handle : handle to WMI.
4785 * @param param : pointer to hold lci param
4786 *
4787 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4788 */
4789QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4790 struct lci_set_params *param)
4791{
4792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4793
4794 if (wmi_handle->ops->send_lci_set_cmd)
4795 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4796
4797 return QDF_STATUS_E_FAILURE;
4798}
4799
4800/**
4801 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4802 * @param wmi_handle : handle to WMI.
4803 * @param param : pointer to hold lcr param
4804 *
4805 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4806 */
4807QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4808 struct lcr_set_params *param)
4809{
4810 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4811
4812 if (wmi_handle->ops->send_lcr_set_cmd)
4813 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4814
4815 return QDF_STATUS_E_FAILURE;
4816}
4817
4818/**
4819 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4820 * @param wmi_handle : handle to WMI.
4821 * @param param : pointer to hold rtt meas req test param
4822 *
4823 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4824 */
4825QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4826 struct rtt_keepalive_req_params *param)
4827{
4828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4829
4830 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4831 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4832 param);
4833
4834 return QDF_STATUS_E_FAILURE;
4835}
4836
4837/**
4838 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4839 * to fw
4840 * @wmi_handle: wmi handle
4841 * @param: pointer to hold periodic chan stats param
4842 *
4843 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4844 */
4845QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4846 struct periodic_chan_stats_params *param)
4847{
4848 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4849
4850 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4851 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4852 param);
4853
4854 return QDF_STATUS_E_FAILURE;
4855}
4856
4857/**
4858 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4859 * @wmi_handle: wmi handle
4860 * @param: pointer to atf peer request param
4861 *
4862 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4863 */
4864QDF_STATUS
4865wmi_send_atf_peer_request_cmd(void *wmi_hdl,
4866 struct atf_peer_request_params *param)
4867{
4868 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4869
4870 if (wmi_handle->ops->send_atf_peer_request_cmd)
4871 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
4872 param);
4873
4874 return QDF_STATUS_E_FAILURE;
4875}
4876
4877/**
4878 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
4879 * @wmi_handle: wmi handle
4880 * @param: pointer to set atf grouping param
4881 *
4882 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4883 */
4884QDF_STATUS
4885wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
4886 struct atf_grouping_params *param)
4887{
4888 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4889
4890 if (wmi_handle->ops->send_set_atf_grouping_cmd)
4891 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
4892 param);
4893
4894 return QDF_STATUS_E_FAILURE;
4895
4896}
4897
Sathish Kumar68789382016-11-14 17:44:29 +05304898/**
4899 * wmi_send_get_user_position_cmd() - send get user position command to fw
4900 * @wmi_handle: wmi handle
4901 *
4902 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4903 */
4904QDF_STATUS
4905wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
4906{
4907 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4908
4909 if (wmi_handle->ops->send_get_user_position_cmd)
4910 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
4911 value);
4912
4913 return QDF_STATUS_E_FAILURE;
4914}
4915
4916/**
4917 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
4918 * command to fw
4919 * @wmi_handle: wmi handle
4920 * @value: user pos value
4921 *
4922 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4923 */
4924QDF_STATUS
4925wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4926{
4927 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4928
4929 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
4930 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
4931
4932 return QDF_STATUS_E_FAILURE;
4933}
4934
4935/**
4936 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
4937 * tx count to fw
4938 * @wmi_handle: wmi handle
4939 * @value: reset tx count value
4940 *
4941 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4942 */
4943QDF_STATUS
4944wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4945{
4946 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4947
4948 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
4949 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
4950 value);
4951
4952 return QDF_STATUS_E_FAILURE;
4953}
4954
4955/**
4956 * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo
4957 * tx count to fw
4958 * @wmi_handle: wmi handle
4959 * @value: value
4960 *
4961 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4962 */
4963QDF_STATUS
4964wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value)
4965{
4966 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4967
4968 if (wmi->ops->send_pdev_caldata_version_check_cmd)
4969 return wmi->ops->send_pdev_caldata_version_check_cmd(wmi,
4970 value);
4971
4972 return QDF_STATUS_E_FAILURE;
4973}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304974
4975/* Extract - APIs */
4976/**
4977 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
4978 *
4979 * @param wmi_handle : handle to WMI.
4980 * @param evt_buf : pointer to event buffer
4981 * @param len : length of the event buffer
4982 * @param wds_ev: pointer to strct to extract
4983 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4984 */
4985QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
4986 uint16_t len, wds_addr_event_t *wds_ev)
4987{
4988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4989
4990 if (wmi_handle->ops->extract_wds_addr_event) {
4991 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
4992 evt_buf, len, wds_ev);
4993 }
4994 return QDF_STATUS_E_FAILURE;
4995}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304996qdf_export_symbol(wmi_extract_wds_addr_event);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304997
4998/**
4999 * wmi_extract_dcs_interference_type() - extract dcs interference type
5000 * @wmi_handle: wmi handle
5001 * @param evt_buf: pointer to event buffer
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305002 * @param param: Pointer to hold dcs interference param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305003 *
5004 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5005 */
5006QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305007 void *evt_buf, struct wmi_host_dcs_interference_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305008{
5009 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5010
5011 if (wmi->ops->extract_dcs_interference_type) {
5012 return wmi->ops->extract_dcs_interference_type(wmi,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305013 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305014 }
5015 return QDF_STATUS_E_FAILURE;
5016}
5017
5018/*
5019 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5020 * @wmi_handle: wmi handle
5021 * @param evt_buf: pointer to event buffer
5022 * @param cw_int: Pointer to hold cw interference
5023 *
5024 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5025 */
5026QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5027 wmi_host_ath_dcs_cw_int *cw_int)
5028{
5029 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5030
5031 if (wmi_handle->ops->extract_dcs_cw_int) {
5032 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5033 evt_buf, cw_int);
5034 }
5035 return QDF_STATUS_E_FAILURE;
5036}
5037
5038/**
5039 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5040 * @wmi_handle: wmi handle
5041 * @param evt_buf: pointer to event buffer
5042 * @param wlan_stat: Pointer to hold wlan stats
5043 *
5044 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5045 */
5046QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5047 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5048{
5049 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5050
5051 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5052 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5053 evt_buf, wlan_stat);
5054 }
5055 return QDF_STATUS_E_FAILURE;
5056}
5057
5058/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305059 * wmi_extract_fips_event_data() - extract fips event data
5060 * @wmi_handle: wmi handle
5061 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305062 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305063 *
5064 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5065 */
5066QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305067 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305068{
5069 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5070
5071 if (wmi_handle->ops->extract_fips_event_data) {
5072 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305073 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305074 }
5075 return QDF_STATUS_E_FAILURE;
5076}
5077
5078/**
5079 * wmi_extract_vdev_start_resp() - extract vdev start response
5080 * @wmi_handle: wmi handle
5081 * @param evt_buf: pointer to event buffer
5082 * @param vdev_rsp: Pointer to hold vdev response
5083 *
5084 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5085 */
5086QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5087 wmi_host_vdev_start_resp *vdev_rsp)
5088{
5089 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5090
5091 if (wmi_handle->ops->extract_vdev_start_resp)
5092 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5093 evt_buf, vdev_rsp);
5094
5095 return QDF_STATUS_E_FAILURE;
5096}
5097
5098/**
Om Prakash Tripathif3ef42d2017-11-24 16:53:07 +05305099 * wmi_extract_vdev_delete_resp() - extract vdev delete response
5100 * @wmi_handle: wmi handle
5101 * @param evt_buf: pointer to event buffer
5102 * @param delete_rsp: Pointer to hold vdev delete response
5103 *
5104 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5105 */
5106QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
5107 struct wmi_host_vdev_delete_resp *delete_rsp)
5108{
5109 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5110
5111 if (wmi_handle->ops->extract_vdev_delete_resp)
5112 return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle,
5113 evt_buf, delete_rsp);
5114
5115 return QDF_STATUS_E_FAILURE;
5116}
5117
5118
5119/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305120 * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev
5121 * @wmi_handle: wmi handle
5122 * @param evt_buf: pointer to event buffer
5123 * @param vdev_map: Pointer to hold num vdev
5124 *
5125 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5126 */
5127QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5128 uint32_t *num_vdevs)
5129{
5130 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5131
5132 if (wmi->ops->extract_tbttoffset_num_vdevs)
5133 return wmi->ops->extract_tbttoffset_num_vdevs(wmi,
5134 evt_buf, num_vdevs);
5135
5136 return QDF_STATUS_E_FAILURE;
5137}
5138
5139/**
5140 * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev
5141 * @wmi_handle: wmi handle
5142 * @param evt_buf: pointer to event buffer
5143 * @param vdev_map: Pointer to hold num vdev
5144 *
5145 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5146 */
5147QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5148 uint32_t *num_vdevs)
5149{
5150 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5151
5152 if (wmi->ops->extract_ext_tbttoffset_num_vdevs)
5153 return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi,
5154 evt_buf, num_vdevs);
5155
5156 return QDF_STATUS_E_FAILURE;
5157}
5158
5159/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305160 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5161 * @wmi_handle: wmi handle
5162 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005163 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305164 * @param tbtt_param: Pointer to tbttoffset event 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_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305169 uint8_t idx, struct tbttoffset_params *tbtt_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_tbttoffset_update_params)
5174 return wmi->ops->extract_tbttoffset_update_params(wmi,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305175 evt_buf, idx, tbtt_param);
5176
5177 return QDF_STATUS_E_FAILURE;
5178}
5179
5180/**
5181 * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param
5182 * @wmi_handle: wmi handle
5183 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005184 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305185 * @param tbtt_param: Pointer to tbttoffset event param
5186 *
5187 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5188 */
5189QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
5190 void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param)
5191{
5192 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5193
5194 if (wmi->ops->extract_ext_tbttoffset_update_params)
5195 return wmi->ops->extract_ext_tbttoffset_update_params(wmi,
5196 evt_buf, idx, tbtt_param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305197
5198 return QDF_STATUS_E_FAILURE;
5199}
5200
5201/**
5202 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5203 * @wmi_handle: wmi handle
5204 * @param evt_buf: pointer to event buffer
5205 * @param hdr: Pointer to hold header
5206 * @param bufp: Pointer to hold pointer to rx param buffer
5207 *
5208 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5209 */
5210QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05305211 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305212{
5213 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5214
5215 if (wmi_handle->ops->extract_mgmt_rx_params)
5216 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5217 evt_buf, hdr, bufp);
5218
5219 return QDF_STATUS_E_FAILURE;
5220}
5221
5222/**
5223 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5224 * @wmi_handle: wmi handle
5225 * @param evt_buf: pointer to event buffer
5226 * @param vdev_id: Pointer to hold vdev identifier
5227 *
5228 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5229 */
5230QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5231 uint32_t *vdev_id)
5232{
5233 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5234
5235 if (wmi_handle->ops->extract_vdev_stopped_param)
5236 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5237 evt_buf, vdev_id);
5238
5239 return QDF_STATUS_E_FAILURE;
5240}
5241
5242/**
5243 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5244 * @wmi_handle: wmi handle
5245 * @param evt_buf: pointer to event buffer
5246 * @param param: Pointer to hold roam param
5247 *
5248 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5249 */
5250QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5251 wmi_host_roam_event *param)
5252{
5253 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5254
5255 if (wmi_handle->ops->extract_vdev_roam_param)
5256 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5257 evt_buf, param);
5258
5259 return QDF_STATUS_E_FAILURE;
5260}
5261
5262/**
5263 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5264 * @wmi_handle: wmi handle
5265 * @param evt_buf: pointer to event buffer
5266 * @param param: Pointer to hold vdev scan param
5267 *
5268 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5269 */
5270QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05305271 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305272{
5273 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5274
5275 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5276 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5277 evt_buf, param);
5278
5279 return QDF_STATUS_E_FAILURE;
5280}
5281
Frank Liu3d5e9992017-03-15 17:51:43 +08005282#ifdef CONVERGED_TDLS_ENABLE
5283QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
5284 struct tdls_event_info *param)
5285{
5286 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5287
5288 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
5289 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
5290 evt_buf, param);
5291
5292 return QDF_STATUS_E_FAILURE;
5293}
5294#endif
5295
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305296/**
5297 * wmi_extract_mu_ev_param() - extract mu param from event
5298 * @wmi_handle: wmi handle
5299 * @param evt_buf: pointer to event buffer
5300 * @param param: Pointer to hold mu report
5301 *
5302 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5303 */
5304QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5305 wmi_host_mu_report_event *param)
5306{
5307 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5308
5309 if (wmi_handle->ops->extract_mu_ev_param)
5310 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5311 param);
5312
5313 return QDF_STATUS_E_FAILURE;
5314}
5315
5316/**
Sathish Kumar68789382016-11-14 17:44:29 +05305317 * wmi_extract_mu_db_entry() - extract mu db entry from event
5318 * @wmi_handle: wmi handle
5319 * @param evt_buf: pointer to event buffer
5320 * @param param: Pointer to hold mu db entry
5321 *
5322 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5323 */
5324QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
5325 uint8_t idx, wmi_host_mu_db_entry *param)
5326{
5327 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5328
5329 if (wmi_handle->ops->extract_mu_db_entry)
5330 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
5331 idx, param);
5332
5333 return QDF_STATUS_E_FAILURE;
5334}
5335
5336/**
5337 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
5338 * @wmi_handle: wmi handle
5339 * @param evt_buf: pointer to event buffer
5340 * @param param: Pointer to hold mumimo tx count
5341 *
5342 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5343 */
5344QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
5345 wmi_host_peer_txmu_cnt_event *param)
5346{
5347 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5348
5349 if (wmi->ops->extract_mumimo_tx_count_ev_param)
5350 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
5351 evt_buf, param);
5352
5353 return QDF_STATUS_E_FAILURE;
5354}
5355
5356/**
5357 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
5358 * from event
5359 * @wmi_handle: wmi handle
5360 * @param evt_buf: pointer to event buffer
5361 * @param param: Pointer to hold peer gid userposition list
5362 *
5363 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5364 */
5365QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
5366 void *evt_buf,
5367 wmi_host_peer_gid_userpos_list_event *param)
5368{
5369 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5370
5371 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
5372 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
5373 evt_buf, param);
5374
5375 return QDF_STATUS_E_FAILURE;
5376}
5377
5378/**
5379 * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
5380 * from event
5381 * @wmi_handle: wmi handle
5382 * @param evt_buf: pointer to event buffer
5383 * @param param: Pointer to hold caldata version data
5384 *
5385 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5386 */
5387QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
5388 void *evt_buf,
5389 wmi_host_pdev_check_cal_version_event *param)
5390{
5391 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5392
5393 if (wmi->ops->extract_pdev_caldata_version_check_ev_param)
5394 return wmi->ops->extract_pdev_caldata_version_check_ev_param(
5395 wmi, evt_buf, param);
5396
5397 return QDF_STATUS_E_FAILURE;
5398}
5399
5400/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305401 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5402 * param from event
5403 * @wmi_handle: wmi handle
5404 * @param evt_buf: pointer to event buffer
5405 * @param param: Pointer to hold tpc configuration
5406 *
5407 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5408 */
5409QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5410 wmi_host_pdev_tpc_config_event *param)
5411{
5412 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5413
5414 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5415 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5416 evt_buf, param);
5417
5418 return QDF_STATUS_E_FAILURE;
5419
5420}
5421
5422/**
5423 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5424 * @wmi_handle: wmi handle
5425 * @param evt_buf: pointer to event buffer
5426 * @param gpio_num: Pointer to hold gpio number
5427 *
5428 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5429 */
5430QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5431 void *evt_buf, uint32_t *gpio_num)
5432{
5433 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5434
5435 if (wmi_handle->ops->extract_gpio_input_ev_param)
5436 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5437 evt_buf, gpio_num);
5438
5439 return QDF_STATUS_E_FAILURE;
5440}
5441
5442/**
5443 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5444 * param from event
5445 * @wmi_handle: wmi handle
5446 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305447 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305448 *
5449 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5450 */
5451QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305452 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305453{
5454 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5455
5456 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5457 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305458 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305459
5460 return QDF_STATUS_E_FAILURE;
5461}
5462
5463/**
5464 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5465 * power param from event
5466 * @wmi_handle: wmi handle
5467 * @param evt_buf: pointer to event buffer
5468 * @param param: Pointer to hold nf cal power param
5469 *
5470 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5471 */
5472QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5473 wmi_host_pdev_nfcal_power_all_channels_event *param)
5474{
5475 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5476
5477 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5478 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5479 evt_buf, param);
5480
5481 return QDF_STATUS_E_FAILURE;
5482
5483}
5484
5485/**
5486 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5487 * @wmi_handle: wmi handle
5488 * @param evt_buf: pointer to event buffer
5489 * @param param: Pointer to hold tpc param
5490 *
5491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5492 */
5493QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5494 wmi_host_pdev_tpc_event *param)
5495{
5496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5497
5498 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5499 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5500 evt_buf, param);
5501
5502 return QDF_STATUS_E_FAILURE;
5503
5504}
5505
5506/**
5507 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5508 * from event
5509 * @wmi_handle: wmi handle
5510 * @param evt_buf: pointer to event buffer
5511 * @param param: Pointer to generic buffer param
5512 *
5513 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5514 */
5515QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5516 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5517{
5518 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5519
5520 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5521 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5522 evt_buf, param);
5523
5524 return QDF_STATUS_E_FAILURE;
5525
5526}
5527
5528/**
5529 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5530 * from event
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305531 * @wmi_hdl: wmi handle
5532 * @evt_buf: pointer to event buffer
5533 * @param: Pointer to mgmt tx completion param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305534 *
5535 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5536 */
5537QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5538 wmi_host_mgmt_tx_compl_event *param)
5539{
5540 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5541
5542 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5543 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5544 evt_buf, param);
5545
5546
5547 return QDF_STATUS_E_FAILURE;
5548}
5549
5550/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305551 * wmi_extract_offchan_data_tx_compl_param() -
5552 * extract offchan data tx completion param from event
5553 * @wmi_hdl: wmi handle
5554 * @evt_buf: pointer to event buffer
5555 * @param: Pointer to offchan data tx completion param
5556 *
5557 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5558 */
5559QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
5560 struct wmi_host_offchan_data_tx_compl_event *param)
5561{
5562 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5563
5564 if (wmi_handle->ops->extract_offchan_data_tx_compl_param)
5565 return wmi_handle->ops->extract_offchan_data_tx_compl_param(
5566 wmi_handle, evt_buf, param);
5567
5568
5569 return QDF_STATUS_E_FAILURE;
5570}
5571
5572/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05305573 * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
5574 * from event
5575 * @wmi_handle: wmi handle
5576 * @param evt_buf: pointer to event buffer
5577 * @param param: Pointer to CSA switch count status param
5578 *
5579 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5580 */
5581QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
5582 void *evt_buf,
5583 struct pdev_csa_switch_count_status *param)
5584{
5585 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5586
5587 if (wmi_handle->ops->extract_pdev_csa_switch_count_status)
5588 return wmi_handle->ops->extract_pdev_csa_switch_count_status(
5589 wmi_handle,
5590 evt_buf,
5591 param);
5592
5593 return QDF_STATUS_E_FAILURE;
5594}
5595
5596
5597/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305598 * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305599 * @wmi_handle: wmi handle
5600 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305601 * @param num_vdevs: Pointer to hold num vdevs
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305602 *
5603 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5604 */
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305605QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
5606 uint32_t *num_vdevs)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305607{
5608 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5609
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305610 if (wmi_handle->ops->extract_swba_num_vdevs)
5611 return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle,
5612 evt_buf, num_vdevs);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305613
5614 return QDF_STATUS_E_FAILURE;
5615}
5616
5617/**
5618 * wmi_extract_swba_tim_info() - extract swba tim info from event
5619 * @wmi_handle: wmi handle
5620 * @param evt_buf: pointer to event buffer
5621 * @param idx: Index to bcn info
5622 * @param tim_info: Pointer to hold tim info
5623 *
5624 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5625 */
5626QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5627 uint32_t idx, wmi_host_tim_info *tim_info)
5628{
5629 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5630
5631 if (wmi_handle->ops->extract_swba_tim_info)
5632 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5633 evt_buf, idx, tim_info);
5634
5635 return QDF_STATUS_E_FAILURE;
5636}
5637
5638/**
5639 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5640 * @wmi_handle: wmi handle
5641 * @param evt_buf: pointer to event buffer
5642 * @param idx: Index to bcn info
5643 * @param p2p_desc: Pointer to hold p2p NoA info
5644 *
5645 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5646 */
5647QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5648 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5649{
5650 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5651
5652 if (wmi_handle->ops->extract_swba_noa_info)
5653 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5654 evt_buf, idx, p2p_desc);
5655
5656 return QDF_STATUS_E_FAILURE;
5657}
5658
Wu Gaocd3a8512017-03-13 20:17:34 +08005659#ifdef CONVERGED_P2P_ENABLE
5660/**
5661 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
5662 * @wmi_handle: wmi handle
5663 * @evt_buf: pointer to event buffer
5664 * @param: Pointer to hold listen offload stop param
5665 *
5666 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5667 */
5668QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
5669 struct p2p_lo_event *param)
5670{
5671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5672
5673 if (!wmi_handle) {
5674 WMI_LOGE("wmi handle is null");
5675 return QDF_STATUS_E_INVAL;
5676 }
5677
5678 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
5679 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
5680 wmi_handle, evt_buf, param);
5681
5682 return QDF_STATUS_E_FAILURE;
5683}
5684
5685/**
5686 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
5687 * @wmi_handle: wmi handle
5688 * @evt_buf: pointer to event buffer
5689 * @param: Pointer to hold p2p noa param
5690 *
5691 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5692 */
5693QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
5694 struct p2p_noa_info *param)
5695{
5696 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5697
5698 if (!wmi_handle) {
5699 WMI_LOGE("wmi handle is null");
5700 return QDF_STATUS_E_INVAL;
5701 }
5702
5703 if (wmi_handle->ops->extract_p2p_noa_ev_param)
5704 return wmi_handle->ops->extract_p2p_noa_ev_param(
5705 wmi_handle, evt_buf, param);
5706
5707 return QDF_STATUS_E_FAILURE;
5708}
5709#endif
5710
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305711/**
5712 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5713 * from event
5714 * @wmi_handle: wmi handle
5715 * @param evt_buf: pointer to event buffer
5716 * @param ev: Pointer to hold peer param and ps state
5717 *
5718 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5719 */
5720QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5721 wmi_host_peer_sta_ps_statechange_event *ev)
5722{
5723 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5724
5725 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5726 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5727 evt_buf, ev);
5728
5729 return QDF_STATUS_E_FAILURE;
5730}
5731
5732/**
5733 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5734 * @wmi_handle: wmi handle
5735 * @param evt_buf: pointer to event buffer
5736 * @param ev: Pointer to hold peer param
5737 *
5738 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5739 */
5740QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5741 wmi_host_peer_sta_kickout_event *ev)
5742{
5743 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5744
5745 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5746 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5747 evt_buf, ev);
5748
5749 return QDF_STATUS_E_FAILURE;
5750}
5751
5752/**
5753 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5754 * @wmi_handle: wmi handle
5755 * @param evt_buf: pointer to event buffer
5756 * @param peer_mac: Pointer to hold peer mac address
5757 * @param rate_cap: Pointer to hold ratecode
5758 *
5759 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5760 */
5761QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5762 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5763{
5764 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5765
5766 if (wmi->ops->extract_peer_ratecode_list_ev)
5767 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5768 evt_buf, peer_mac, rate_cap);
5769
5770 return QDF_STATUS_E_FAILURE;
5771
5772}
5773
5774/**
5775 * wmi_extract_comb_phyerr() - extract comb phy error from event
5776 * @wmi_handle: wmi handle
5777 * @param evt_buf: pointer to event buffer
5778 * @param datalen: data length of event buffer
5779 * @param buf_offset: Pointer to hold value of current event buffer offset
5780 * post extraction
5781 * @param phyer: Pointer to hold phyerr
5782 *
5783 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5784 */
5785QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5786 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5787{
5788 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5789
5790 if (wmi_handle->ops->extract_comb_phyerr)
5791 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5792 evt_buf, datalen, buf_offset, phyerr);
5793
5794 return QDF_STATUS_E_FAILURE;
5795
5796}
5797
5798/**
5799 * wmi_extract_single_phyerr() - extract single phy error from event
5800 * @wmi_handle: wmi handle
5801 * @param evt_buf: pointer to event buffer
5802 * @param datalen: data length of event buffer
5803 * @param buf_offset: Pointer to hold value of current event buffer offset
5804 * post extraction
5805 * @param phyerr: Pointer to hold phyerr
5806 *
5807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5808 */
5809QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5810 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5811{
5812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5813
5814 if (wmi_handle->ops->extract_single_phyerr)
5815 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5816 evt_buf, datalen, buf_offset, phyerr);
5817
5818 return QDF_STATUS_E_FAILURE;
5819
5820}
5821
5822/**
5823 * wmi_extract_composite_phyerr() - extract composite phy error from event
5824 * @wmi_handle: wmi handle
5825 * @param evt_buf: pointer to event buffer
5826 * @param datalen: Length of event buffer
5827 * @param phyerr: Pointer to hold phy error
5828 *
5829 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5830 */
5831QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5832 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5833{
5834 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5835
5836 if (wmi_handle->ops->extract_composite_phyerr)
5837 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5838 evt_buf, datalen, phyerr);
5839
5840 return QDF_STATUS_E_FAILURE;
5841
5842}
5843
5844/**
5845 * wmi_extract_stats_param() - extract all stats count from event
5846 * @wmi_handle: wmi handle
5847 * @param evt_buf: pointer to event buffer
5848 * @param stats_param: Pointer to hold stats count
5849 *
5850 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5851 */
5852QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5853 wmi_host_stats_event *stats_param)
5854{
5855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5856
5857 if (wmi_handle->ops->extract_all_stats_count)
5858 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5859 evt_buf, stats_param);
5860
5861 return QDF_STATUS_E_FAILURE;
5862}
5863
5864/**
5865 * wmi_extract_pdev_stats() - extract pdev stats from event
5866 * @wmi_handle: wmi handle
5867 * @param evt_buf: pointer to event buffer
5868 * @param index: Index into pdev stats
5869 * @param pdev_stats: Pointer to hold pdev stats
5870 *
5871 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5872 */
5873QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
5874 uint32_t index, wmi_host_pdev_stats *pdev_stats)
5875{
5876 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5877
5878 if (wmi_handle->ops->extract_pdev_stats)
5879 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
5880 evt_buf, index, pdev_stats);
5881
5882 return QDF_STATUS_E_FAILURE;
5883}
5884
5885/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07005886 * extract_unit_test() - extract unit test from event
5887 * @wmi_handle: wmi handle
5888 * @param evt_buf: pointer to event buffer
5889 * @param unit_test: Pointer to hold unit-test header
5890 * @param maxspace: The amount of space in evt_buf
5891 *
5892 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5893 */
5894QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
5895 wmi_unit_test_event *unit_test, uint32_t maxspace)
5896{
5897 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5898
5899 if (wmi_handle->ops->extract_unit_test)
5900 return wmi_handle->ops->extract_unit_test(wmi_handle,
5901 evt_buf, unit_test, maxspace);
5902
5903 return QDF_STATUS_E_FAILURE;
5904}
5905
5906/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305907 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
5908 * @wmi_handle: wmi handle
5909 * @param evt_buf: pointer to event buffer
5910 * @param index: Index into extended pdev stats
5911 * @param pdev_ext_stats: Pointer to hold extended pdev stats
5912 *
5913 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5914 */
5915QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
5916 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
5917{
5918 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5919
5920 if (wmi_handle->ops->extract_pdev_ext_stats)
5921 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
5922 evt_buf, index, pdev_ext_stats);
5923
5924 return QDF_STATUS_E_FAILURE;
5925}
5926
5927/**
5928 * wmi_extract_peer_stats() - extract peer stats from event
5929 * @wmi_handle: wmi handle
5930 * @param evt_buf: pointer to event buffer
5931 * @param index: Index into peer stats
5932 * @param peer_stats: Pointer to hold peer stats
5933 *
5934 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5935 */
5936QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
5937 uint32_t index, wmi_host_peer_stats *peer_stats)
5938{
5939 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5940
5941 if (wmi_handle->ops->extract_peer_stats)
5942 return wmi_handle->ops->extract_peer_stats(wmi_handle,
5943 evt_buf, index, peer_stats);
5944
5945 return QDF_STATUS_E_FAILURE;
5946}
5947
5948/**
5949 * wmi_extract_vdev_stats() - extract vdev stats from event
5950 * @wmi_handle: wmi handle
5951 * @param evt_buf: pointer to event buffer
5952 * @param index: Index into vdev stats
5953 * @param vdev_stats: Pointer to hold vdev stats
5954 *
5955 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5956 */
5957QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
5958 uint32_t index, wmi_host_vdev_stats *vdev_stats)
5959{
5960 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5961
5962 if (wmi_handle->ops->extract_vdev_stats)
5963 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
5964 evt_buf, index, vdev_stats);
5965
5966 return QDF_STATUS_E_FAILURE;
5967}
5968
5969/**
Naveen Rawatd2115722018-04-12 08:17:55 -07005970 * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
5971 * @wmi_handle: wmi handle
5972 * @param evt_buf: pointer to event buffer
5973 * @param index: Index into rssi stats
5974 * @param rssi_stats: Pointer to hold rssi stats
5975 *
5976 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5977 */
5978QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
5979 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats)
5980{
5981 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5982
5983 if (wmi_handle->ops->extract_per_chain_rssi_stats)
5984 return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle,
5985 evt_buf, index, rssi_stats);
5986
5987 return QDF_STATUS_E_FAILURE;
5988}
5989
5990/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305991 * wmi_extract_rtt_hdr() - extract rtt header from event
5992 * @wmi_handle: wmi handle
5993 * @param evt_buf: pointer to event buffer
5994 * @param ev: Pointer to hold rtt header
5995 *
5996 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5997 */
5998QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
5999 wmi_host_rtt_event_hdr *ev)
6000{
6001 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6002
6003 if (wmi_handle->ops->extract_rtt_hdr)
6004 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
6005 evt_buf, ev);
6006
6007 return QDF_STATUS_E_FAILURE;
6008}
6009
6010/**
6011 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
6012 * @wmi_handle: wmi handle
6013 * @param evt_buf: pointer to event buffer
6014 * @param index: Index into bcn fault stats
6015 * @param bcnflt_stats: Pointer to hold bcn fault stats
6016 *
6017 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6018 */
6019QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
6020 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
6021{
6022 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6023
6024 if (wmi_handle->ops->extract_bcnflt_stats)
6025 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
6026 evt_buf, index, bcnflt_stats);
6027
6028 return QDF_STATUS_E_FAILURE;
6029}
6030
6031/**
6032 * wmi_extract_rtt_ev() - extract rtt event
6033 * @wmi_handle: wmi handle
6034 * @param evt_buf: Pointer to event buffer
6035 * @param ev: Pointer to hold rtt event
6036 * @param hdump: Pointer to hold hex dump
6037 * @param hdump_len: hex dump length
6038 *
6039 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6040 */
6041QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
6042 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
6043{
6044 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6045
6046 if (wmi_handle->ops->extract_rtt_ev)
6047 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
6048 evt_buf, ev, hdump, hdump_len);
6049
6050 return QDF_STATUS_E_FAILURE;
6051}
6052
6053/**
6054 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
6055 * @wmi_handle: wmi handle
6056 * @param evt_buf: pointer to event buffer
6057 * @param index: Index into extended peer stats
6058 * @param peer_extd_stats: Pointer to hold extended peer stats
6059 *
6060 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6061 */
6062QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
6063 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
6064{
6065 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6066
6067 if (wmi_handle->ops->extract_peer_extd_stats)
6068 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
6069 evt_buf, index, peer_extd_stats);
6070
6071 return QDF_STATUS_E_FAILURE;
6072}
6073
6074/**
6075 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
6076 * @wmi_handle: wmi handle
6077 * @param evt_buf: pointer to event buffer
6078 * @param wds_ev: Pointer to hold rtt error report
6079 *
6080 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6081 */
6082QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
6083 wmi_host_rtt_error_report_event *ev)
6084{
6085 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6086
6087 if (wmi_handle->ops->extract_rtt_error_report_ev)
6088 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
6089 evt_buf, ev);
6090
6091 return QDF_STATUS_E_FAILURE;
6092}
6093
6094/**
6095 * wmi_extract_chan_stats() - extract chan stats from event
6096 * @wmi_handle: wmi handle
6097 * @param evt_buf: pointer to event buffer
6098 * @param index: Index into chan stats
6099 * @param chanstats: Pointer to hold chan stats
6100 *
6101 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6102 */
6103QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
6104 uint32_t index, wmi_host_chan_stats *chan_stats)
6105{
6106 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6107
6108 if (wmi_handle->ops->extract_chan_stats)
6109 return wmi_handle->ops->extract_chan_stats(wmi_handle,
6110 evt_buf, index, chan_stats);
6111
6112 return QDF_STATUS_E_FAILURE;
6113}
6114
6115/**
6116 * wmi_extract_thermal_stats() - extract thermal stats from event
6117 * @wmi_handle: wmi handle
6118 * @param evt_buf: Pointer to event buffer
6119 * @param temp: Pointer to hold extracted temperature
6120 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306121 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306122 *
6123 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6124 */
6125QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306126 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306127{
6128 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6129
6130 if (wmi_handle->ops->extract_thermal_stats)
6131 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306132 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306133
6134 return QDF_STATUS_E_FAILURE;
6135}
6136
6137/**
6138 * wmi_extract_profile_ctx() - extract profile context from event
6139 * @wmi_handle: wmi handle
6140 * @param evt_buf: pointer to event buffer
6141 * @param profile_ctx: Pointer to hold profile context
6142 *
6143 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6144 */
6145QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
6146 wmi_host_wlan_profile_ctx_t *profile_ctx)
6147{
6148 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6149
6150 if (wmi_handle->ops->extract_profile_ctx)
6151 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
6152 evt_buf, profile_ctx);
6153
6154 return QDF_STATUS_E_FAILURE;
6155}
6156
6157/**
6158 * wmi_extract_thermal_level_stats() - extract thermal level stats from
6159 * event
6160 * @wmi_handle: wmi handle
6161 * @param evt_buf: pointer to event buffer
6162 * @param idx: Index to level stats
6163 * @param levelcount: Pointer to hold levelcount
6164 * @param dccount: Pointer to hold dccount
6165 *
6166 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6167 */
6168QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
6169 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
6170{
6171 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6172
6173 if (wmi_handle->ops->extract_thermal_level_stats)
6174 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
6175 evt_buf, idx, levelcount, dccount);
6176
6177 return QDF_STATUS_E_FAILURE;
6178}
6179
6180/**
6181 * wmi_extract_profile_data() - extract profile data from event
6182 * @wmi_handle: wmi handle
6183 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05306184 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306185 * @param profile_data: Pointer to hold profile data
6186 *
6187 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6188 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05306189QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306190 wmi_host_wlan_profile_t *profile_data)
6191{
6192 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6193
6194 if (wmi_handle->ops->extract_profile_data)
6195 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05306196 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306197
6198 return QDF_STATUS_E_FAILURE;
6199}
6200
6201/**
6202 * wmi_extract_chan_info_event() - extract chan information from event
6203 * @wmi_handle: wmi handle
6204 * @param evt_buf: pointer to event buffer
6205 * @param chan_info: Pointer to hold chan information
6206 *
6207 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6208 */
6209QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
6210 wmi_host_chan_info_event *chan_info)
6211{
6212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6213
6214 if (wmi_handle->ops->extract_chan_info_event)
6215 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
6216 evt_buf, chan_info);
6217
6218 return QDF_STATUS_E_FAILURE;
6219}
6220
6221/**
6222 * wmi_extract_channel_hopping_event() - extract channel hopping param
6223 * from event
6224 * @wmi_handle: wmi handle
6225 * @param evt_buf: pointer to event buffer
6226 * @param ch_hopping: Pointer to hold channel hopping param
6227 *
6228 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6229 */
6230QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
6231 wmi_host_pdev_channel_hopping_event *ch_hopping)
6232{
6233 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6234
6235 if (wmi->ops->extract_channel_hopping_event)
6236 return wmi->ops->extract_channel_hopping_event(wmi,
6237 evt_buf, ch_hopping);
6238
6239 return QDF_STATUS_E_FAILURE;
6240}
6241
6242/**
6243 * wmi_extract_bss_chan_info_event() - extract bss channel information
6244 * from event
6245 * @wmi_handle: wmi handle
6246 * @param evt_buf: pointer to event buffer
6247 * @param bss_chan_info: Pointer to hold bss channel information
6248 *
6249 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6250 */
6251QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6252 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6253{
6254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6255
6256 if (wmi_handle->ops->extract_bss_chan_info_event)
6257 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6258 evt_buf, bss_chan_info);
6259
6260 return QDF_STATUS_E_FAILURE;
6261}
6262
6263/**
6264 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6265 * @wmi_handle: wmi handle
6266 * @param evt_buf: pointer to event buffer
6267 * @param inst_rssi_resp: Pointer to hold inst rssi response
6268 *
6269 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6270 */
6271QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6272 wmi_host_inst_stats_resp *inst_rssi_resp)
6273{
6274 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6275
6276 if (wmi->ops->extract_inst_rssi_stats_event)
6277 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6278 evt_buf, inst_rssi_resp);
6279
6280 return QDF_STATUS_E_FAILURE;
6281}
6282
6283/**
6284 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6285 * from event
6286 * @wmi_handle: wmi handle
6287 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306288 * @param ev: Pointer to hold data traffic control
6289 *
6290 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6291 */
6292QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6293 wmi_host_tx_data_traffic_ctrl_event *ev)
6294{
6295 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6296
6297 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6298 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6299 evt_buf, ev);
6300
6301 return QDF_STATUS_E_FAILURE;
6302}
6303
6304/**
Sathish Kumar68789382016-11-14 17:44:29 +05306305 * wmi_extract_atf_peer_stats_ev() - extract atf peer stats
6306 * from event
6307 * @wmi_handle: wmi handle
6308 * @param evt_buf: pointer to event buffer
6309 * @param ev: Pointer to hold atf peer stats
6310 *
6311 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6312 */
6313QDF_STATUS wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
6314 wmi_host_atf_peer_stats_event *ev)
6315{
6316 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6317
6318 if (wmi->ops->extract_atf_peer_stats_ev)
6319 return wmi->ops->extract_atf_peer_stats_ev(wmi,
6320 evt_buf, ev);
6321
6322 return QDF_STATUS_E_FAILURE;
6323}
6324
6325/**
6326 * wmi_extract_atf_token_info_ev() - extract atf token info
6327 * from event
6328 * @wmi_handle: wmi handle
6329 * @param evt_buf: pointer to event buffer
6330 * @param idx: Index indicating the peer number
6331 * @param ev: Pointer to hold atf token info
6332 *
6333 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6334 */
6335QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf,
6336 uint8_t idx, wmi_host_atf_peer_stats_info *ev)
6337{
6338 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6339
6340 if (wmi->ops->extract_atf_token_info_ev)
6341 return wmi->ops->extract_atf_token_info_ev(wmi,
6342 evt_buf, idx, ev);
6343
6344 return QDF_STATUS_E_FAILURE;
6345}
6346
6347/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306348 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6349 * @wmi_handle: wmi handle
6350 * @param evt_buf: pointer to event buffer
6351 * @param index: Index into extended vdev stats
6352 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6353 *
6354 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6355 */
6356QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6357 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6358{
6359 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6360
6361 if (wmi_handle->ops->extract_vdev_extd_stats)
6362 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6363 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306364 return QDF_STATUS_E_FAILURE;
6365}
6366
6367/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05306368 * wmi_extract_bcn_stats() - extract beacon stats from event
6369 * @wmi_handle: wmi handle
6370 * @evt_buf: pointer to event buffer
6371 * @index: Index into beacon stats
6372 * @vdev_bcn_stats: Pointer to hold beacon stats
6373 *
6374 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6375 */
6376QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
6377 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
6378{
6379 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6380
6381 if (wmi_handle->ops->extract_bcn_stats)
6382 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
6383 evt_buf, index, vdev_bcn_stats);
6384 return QDF_STATUS_E_FAILURE;
6385}
6386
6387/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +05306388 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
6389 * @wmi_handle: wmi handle
6390 * @param evt_buf: pointer to event buffer
6391 * @param vdev_extd_stats: Pointer to hold nac rssi stats
6392 *
6393 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6394 */
6395QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
6396 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats)
6397{
6398 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6399
6400 if (wmi_handle->ops->extract_vdev_nac_rssi_stats)
6401 return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle,
6402 evt_buf, vdev_nac_rssi_stats);
6403
6404 return QDF_STATUS_E_FAILURE;
6405}
6406
6407/**
Gupta, Kapil2e685982016-04-25 19:14:19 +05306408 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6409 * adaptive dwelltime configuration params
6410 * @wma_handle: wma handler
6411 * @dwelltime_params: pointer to dwelltime_params
6412 *
6413 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6414 */
6415QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6416 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6417{
6418 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6419
6420 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6421 return wmi_handle->ops->
6422 send_adapt_dwelltime_params_cmd(wmi_handle,
6423 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306424
6425 return QDF_STATUS_E_FAILURE;
6426}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306427
6428/**
6429 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6430 * @wmi_handle: wmi handle
6431 * @param: wmi power debug parameter
6432 *
6433 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6434 *
6435 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6436 */
6437QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6438 struct wmi_power_dbg_params *param)
6439{
6440 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6441
6442 if (wmi_handle->ops->send_power_dbg_cmd)
6443 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6444 param);
6445
6446 return QDF_STATUS_E_FAILURE;
6447}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306448
6449/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05306450 * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart
6451 * @wmi_handle: wmi handle
6452 * @param: multiple vdev restart parameter
6453 *
6454 * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw.
6455 *
6456 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6457 */
6458QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
6459 struct multiple_vdev_restart_params *param)
6460{
6461 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6462
6463 if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd)
6464 return wmi_handle->ops->send_multiple_vdev_restart_req_cmd(
6465 wmi_handle,
6466 param);
6467
6468 return QDF_STATUS_E_FAILURE;
6469}
6470
Manikandan Mohan31a13e22016-12-13 13:14:06 -08006471QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
6472 struct sar_limit_cmd_params *params)
6473{
6474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6475
6476 if (wmi_handle->ops->send_sar_limit_cmd)
6477 return wmi_handle->ops->send_sar_limit_cmd(
6478 wmi_handle,
6479 params);
6480 return QDF_STATUS_E_FAILURE;
6481}
6482
Jeff Johnson4783f902017-12-14 15:50:16 -08006483QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl)
6484{
6485 wmi_unified_t wmi_handle = wmi_hdl;
6486
6487 if (wmi_handle->ops->get_sar_limit_cmd)
6488 return wmi_handle->ops->get_sar_limit_cmd(wmi_handle);
6489
6490 return QDF_STATUS_E_FAILURE;
6491}
6492
6493QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
6494 uint8_t *evt_buf,
6495 struct sar_limit_event *event)
6496{
6497 wmi_unified_t wmi_handle = wmi_hdl;
6498
6499 if (wmi_handle->ops->extract_sar_limit_event)
6500 return wmi_handle->ops->extract_sar_limit_event(wmi_handle,
6501 evt_buf,
6502 event);
6503
6504 return QDF_STATUS_E_FAILURE;
6505}
6506
6507
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306508#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306509QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306510 struct disa_encrypt_decrypt_req_params *params)
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306511{
6512 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6513
6514 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6515 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6516 wmi_handle,
6517 params);
Sathish Kumar68789382016-11-14 17:44:29 +05306518 return QDF_STATUS_E_FAILURE;
6519}
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306520
6521QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
6522 uint8_t *evt_buf,
6523 struct disa_encrypt_decrypt_resp_params *resp)
6524{
6525 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
6526
6527 if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
6528 return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
6529 wmi_handle, evt_buf, resp);
6530
6531 return QDF_STATUS_E_FAILURE;
6532}
6533
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306534#endif
Sathish Kumar68789382016-11-14 17:44:29 +05306535
6536/*
6537 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
6538 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05306539 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05306540 *
6541 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6542 *
6543 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6544 */
6545QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306546 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05306547{
6548 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6549
6550 if (wmi->ops->send_btcoex_wlan_priority_cmd)
6551 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306552 param);
6553
6554 return QDF_STATUS_E_FAILURE;
6555}
6556/**
6557 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
6558 * @wmi_handle: wmi handle
6559 * @param: wmi btcoex cfg params
6560 *
6561 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6562 *
6563 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6564 */
6565QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
6566 struct btcoex_cfg_params *param)
6567{
6568 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6569
6570 if (wmi->ops->send_btcoex_duty_cycle_cmd)
6571 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
6572 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306573
6574 return QDF_STATUS_E_FAILURE;
6575}
Kiran Venkatappa06520822016-08-10 23:55:40 +05306576
6577/*
6578 * wmi_extract_service_ready_ext() - extract extended service ready
6579 * @wmi_handle: wmi handle
6580 * @param: wmi power debug parameter
6581 *
6582 *
6583 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6584 */
6585QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006586 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306587{
6588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6589
6590 if (wmi_handle->ops->extract_service_ready_ext)
6591 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
6592 evt_buf, param);
6593
6594 return QDF_STATUS_E_FAILURE;
6595}
6596
6597/**
6598 * wmi_extract_hw_mode_cap_service_ready_ext() -
6599 * extract HW mode cap from service ready event
6600 * @wmi_handle: wmi handle
6601 * @param evt_buf: pointer to event buffer
6602 * @param param: Pointer to hold evt buf
6603 * @param hw_mode_idx: hw mode idx should be less than num_mode
6604 *
6605 * Return: QDF_STATUS_SUCCESS for success or error code
6606 */
6607QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
6608 void *wmi_hdl,
6609 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006610 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306611{
6612 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6613
6614 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
6615 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
6616 wmi_handle,
6617 evt_buf, hw_mode_idx, param);
6618
6619 return QDF_STATUS_E_FAILURE;
6620}
6621/**
6622 * wmi_extract_mac_phy_cap_service_ready_ext() -
6623 * extract MAC phy cap from service ready event
6624 * @wmi_handle: wmi handle
6625 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306626 * @param hw_mode_id: hw mode id of hw_mode_caps
6627 * @param phy_id: phy_id within hw_mode_cap
6628 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05306629 *
6630 * Return: QDF_STATUS_SUCCESS for success or error code
6631 */
6632QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
6633 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306634 uint8_t *evt_buf,
6635 uint8_t hw_mode_id,
6636 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006637 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306638{
6639 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6640
6641 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
6642 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
6643 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306644 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05306645
6646 return QDF_STATUS_E_FAILURE;
6647}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306648
Kiran Venkatappa06520822016-08-10 23:55:40 +05306649/**
6650 * wmi_extract_reg_cap_service_ready_ext() -
6651 * extract REG cap from service ready event
6652 * @wmi_handle: wmi handle
6653 * @param evt_buf: pointer to event buffer
6654 * @param param: Pointer to hold evt buf
6655 * @param phy_idx: phy idx should be less than num_mode
6656 *
6657 * Return: QDF_STATUS_SUCCESS for success or error code
6658 */
6659QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
6660 void *wmi_hdl,
6661 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006662 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306663{
6664 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6665
6666 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
6667 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
6668 wmi_handle,
6669 evt_buf, phy_idx, param);
6670
6671 return QDF_STATUS_E_FAILURE;
6672}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306673
Sathish Kumarf396c722017-11-17 17:30:41 +05306674QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
6675 void *wmi_hdl,
6676 uint8_t *evt_buf, uint8_t idx,
6677 struct wlan_psoc_host_dbr_ring_caps *param)
6678{
6679 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6680
6681 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
6682 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
6683 wmi_handle,
6684 evt_buf, idx, param);
6685
6686 return QDF_STATUS_E_FAILURE;
6687}
6688
6689QDF_STATUS wmi_extract_dbr_buf_release_fixed(
6690 void *wmi_hdl,
6691 uint8_t *evt_buf,
6692 struct direct_buf_rx_rsp *param)
6693{
6694 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6695
6696 if (wmi_handle->ops->extract_dbr_buf_release_fixed)
6697 return wmi_handle->ops->extract_dbr_buf_release_fixed(
6698 wmi_handle,
6699 evt_buf, param);
6700
6701 return QDF_STATUS_E_FAILURE;
6702}
6703
6704QDF_STATUS wmi_extract_dbr_buf_release_entry(
6705 void *wmi_hdl,
6706 uint8_t *evt_buf, uint8_t idx,
6707 struct direct_buf_rx_entry *param)
6708{
6709 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6710
6711 if (wmi_handle->ops->extract_dbr_buf_release_entry)
6712 return wmi_handle->ops->extract_dbr_buf_release_entry(
6713 wmi_handle,
6714 evt_buf, idx, param);
6715
6716 return QDF_STATUS_E_FAILURE;
6717}
6718
Edayilliam Jayadev92651222018-04-06 16:37:17 +05306719QDF_STATUS wmi_extract_dbr_buf_metadata(
6720 void *wmi_hdl,
6721 uint8_t *evt_buf, uint8_t idx,
6722 struct direct_buf_rx_metadata *param)
6723{
6724 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6725
6726 if (wmi_handle->ops->extract_dbr_buf_metadata)
6727 return wmi_handle->ops->extract_dbr_buf_metadata(
6728 wmi_handle,
6729 evt_buf, idx, param);
6730
6731 return QDF_STATUS_E_FAILURE;
6732}
6733
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306734/**
6735 * wmi_extract_pdev_utf_event() -
6736 * extract UTF data from pdev utf event
6737 * @wmi_handle: wmi handle
6738 * @param evt_buf: pointer to event buffer
6739 * @param param: Pointer to hold evt buf
6740 *
6741 * Return: QDF_STATUS_SUCCESS for success or error code
6742 */
6743QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
6744 uint8_t *evt_buf,
6745 struct wmi_host_pdev_utf_event *param)
6746{
6747 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6748
6749 if (wmi_handle->ops->extract_pdev_utf_event)
6750 return wmi_handle->ops->extract_pdev_utf_event(
6751 wmi_handle,
6752 evt_buf, param);
6753
6754 return QDF_STATUS_E_FAILURE;
6755}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306756
6757/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05306758 * wmi_extract_pdev_qvit_event() -
6759 * extract UTF data from pdev qvit event
6760 * @wmi_handle: wmi handle
6761 * @param evt_buf: pointer to event buffer
6762 * @param param: Pointer to hold evt buf
6763 *
6764 * Return: QDF_STATUS_SUCCESS for success or error code
6765 */
6766QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
6767 uint8_t *evt_buf,
6768 struct wmi_host_pdev_qvit_event *param)
6769{
6770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6771
6772 if (wmi_handle->ops->extract_pdev_qvit_event)
6773 return wmi_handle->ops->extract_pdev_qvit_event(
6774 wmi_handle,
6775 evt_buf, param);
6776
6777 return QDF_STATUS_E_FAILURE;
6778}
6779
6780/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05306781 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
6782 * @wmi_handle: wmi handle
6783 * @param: wmi coex ver cfg params
6784 *
6785 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
6786 *
6787 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6788 */
6789QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
6790 coex_ver_cfg_t *param)
6791{
6792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6793
6794 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
6795 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
6796 param);
6797
6798 return QDF_STATUS_E_FAILURE;
6799}
6800
6801/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05306802 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
6803 * @wmi_handle: wmi handle
6804 * @param: wmi coex cfg cmd params
6805 *
6806 * Send WMI_COEX_CFG_CMD parameters to fw.
6807 *
6808 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6809 */
6810QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
6811 struct coex_config_params *param)
6812{
6813 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6814
6815 if (wmi_handle->ops->send_coex_config_cmd)
6816 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
6817 param);
6818
6819 return QDF_STATUS_E_FAILURE;
6820}
6821
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05306822QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
6823 struct rcpi_req *get_rcpi_param)
6824{
6825 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6826
6827 if (wmi_handle->ops->send_get_rcpi_cmd)
6828 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
6829 get_rcpi_param);
6830
6831 return QDF_STATUS_E_FAILURE;
6832}
6833
6834QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
6835 struct rcpi_res *res)
6836{
6837 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6838 struct wmi_ops *ops = wmi_handle->ops;
6839
6840 if (ops->extract_rcpi_response_event)
6841 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
6842 res);
6843
6844 return QDF_STATUS_E_FAILURE;
6845}
6846
Sathish Kumar80f4f382017-04-24 11:36:00 +05306847/**
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306848 * wmi_extract_peer_delete_response_event() -
6849 * extract vdev id and peer mac addresse from peer delete response event
6850 * @wmi_handle: wmi handle
6851 * @param evt_buf: pointer to event buffer
6852 * @param param: Pointer to hold evt buf
6853 *
6854 * Return: QDF_STATUS_SUCCESS for success or error code
6855 */
6856QDF_STATUS wmi_extract_peer_delete_response_event(
6857 void *wmi_hdl,
6858 uint8_t *evt_buf,
6859 struct wmi_host_peer_delete_response_event *param)
6860{
6861 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6862
6863 if (wmi_handle->ops->extract_peer_delete_response_event)
6864 return wmi_handle->ops->extract_peer_delete_response_event(
6865 wmi_handle,
6866 evt_buf, param);
6867
6868 return QDF_STATUS_E_FAILURE;
6869}
Arif Hussainf00be1d2017-01-07 18:21:55 -08006870
6871QDF_STATUS
6872wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
6873 uint32_t pdev_id)
6874{
6875 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6876
6877 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
6878 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
6879 wmi_handle, pdev_id);
6880
6881 return QDF_STATUS_E_FAILURE;
6882}
6883
6884QDF_STATUS
6885wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
6886 uint32_t pdev_id)
6887{
6888 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6889
6890 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
6891 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
6892 wmi_handle, pdev_id);
6893
6894 return QDF_STATUS_E_FAILURE;
6895}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05306896
6897/*
6898 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
6899 * @wmi_handle: wmi handle
6900 * @evt_buf: pointer to event buffer.
6901 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
6902 *
6903 *
6904 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6905 */
6906QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
6907 struct wlan_psoc_host_chainmask_table *chainmask_table)
6908{
6909 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6910
6911 if (wmi_handle->ops->extract_chainmask_tables)
6912 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
6913 evt_buf, chainmask_table);
6914
6915 return QDF_STATUS_E_FAILURE;
6916}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07006917/**
6918 * wmi_unified_set_country_cmd_send() - WMI set country function
6919 * @param wmi_handle : handle to WMI.
6920 * @param param : pointer to hold set country cmd parameter
6921 *
6922 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6923 */
6924QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
6925 struct set_country *param)
6926{
6927 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6928
6929 if (wmi_handle->ops->send_set_country_cmd)
6930 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
6931 param);
6932
6933 return QDF_STATUS_E_FAILURE;
6934}
6935
Nitesh Shah52323d02017-05-22 15:49:00 +05306936/**
6937 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
6938 * DBS scan selection configuration params
6939 * @wma_handle: wma handler
6940 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
6941 *
6942 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6943 */
6944QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
6945 struct wmi_dbs_scan_sel_params *dbs_scan_params)
6946{
6947 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6948
6949 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
6950 return wmi_handle->ops->
6951 send_dbs_scan_sel_params_cmd(wmi_handle,
6952 dbs_scan_params);
6953
6954 return QDF_STATUS_E_FAILURE;
6955}
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05306956
6957/**
6958 * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
6959 * configuration params
6960 * @wmi_hdl: wmi handler
6961 * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
6962 *
6963 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
6964 */
6965QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
6966 struct wmi_limit_off_chan_param *limit_off_chan_param)
6967{
6968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6969
6970 if (wmi_handle->ops->send_limit_off_chan_cmd)
6971 return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
6972 limit_off_chan_param);
6973
6974 return QDF_STATUS_E_FAILURE;
6975}
Kiran Venkatappa7fe3afc2017-11-08 19:32:23 +05306976
6977/**
6978 * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
6979 * @wmi_hdl: wmi handle
6980 * @bcn_ctrl_param: pointer to bcn_offload_control param
6981 *
6982 * Return: QDF_STATUS_SUCCESS for success or error code
6983 */
6984QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
6985 struct bcn_offload_control *bcn_ctrl_param)
6986{
6987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6988
6989 if (wmi_handle->ops->send_bcn_offload_control_cmd)
6990 return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle,
6991 bcn_ctrl_param);
6992
6993 return QDF_STATUS_E_FAILURE;
6994}
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05306995
6996/**
6997 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
6998 * wds entries from FW
6999 * @wmi_handle: wmi handle
7000 *
7001 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
7002 *
7003 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7004 */
7005QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
7006{
7007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7008
7009 if (wmi_handle->ops->send_wds_entry_list_cmd)
7010 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
7011
7012 return QDF_STATUS_E_FAILURE;
7013}
7014
7015/**
7016 * wmi_extract_wds_entry - api to extract wds entry
7017 * @wmi_handle: wma handle
7018 * @evt_buf: pointer to event buffer
7019 * @wds_entry: wds entry
7020 * @idx: index to point wds entry in event buffer
7021 *
7022 * Return: QDF_STATUS_SUCCESS for successful event parse
7023 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
7024 */
7025QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
7026 struct wdsentry *wds_entry,
7027 u_int32_t idx)
7028{
7029 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7030
7031 if (wmi_handle->ops->extract_wds_entry)
7032 return wmi_handle->ops->extract_wds_entry(wmi_handle,
7033 evt_buf, wds_entry, idx);
7034
7035 return QDF_STATUS_E_FAILURE;
7036}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05307037qdf_export_symbol(wmi_extract_wds_entry);
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007038
7039#ifdef WLAN_FEATURE_NAN_CONVERGENCE
7040QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
7041 struct nan_datapath_initiator_req *req)
7042{
7043 wmi_unified_t wmi_handle = wmi_hdl;
7044
7045 if (wmi_handle->ops->send_ndp_initiator_req_cmd)
7046 return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
7047 req);
7048
7049 return QDF_STATUS_E_FAILURE;
7050}
7051
7052QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
7053 struct nan_datapath_responder_req *req)
7054{
7055 wmi_unified_t wmi_handle = wmi_hdl;
7056
7057 if (wmi_handle->ops->send_ndp_responder_req_cmd)
7058 return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
7059 req);
7060
7061 return QDF_STATUS_E_FAILURE;
7062}
7063
7064QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
7065 struct nan_datapath_end_req *req)
7066{
7067 wmi_unified_t wmi_handle = wmi_hdl;
7068
7069 if (wmi_handle->ops->send_ndp_end_req_cmd)
7070 return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
7071 req);
7072
7073 return QDF_STATUS_E_FAILURE;
7074}
7075
7076QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007077 uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007078{
7079 if (wmi_handle->ops->extract_ndp_initiator_rsp)
7080 return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
7081 data, rsp);
7082
7083 return QDF_STATUS_E_FAILURE;
7084}
7085
7086QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007087 struct nan_datapath_indication_event *ind)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007088{
7089 if (wmi_handle->ops->extract_ndp_ind)
7090 return wmi_handle->ops->extract_ndp_ind(wmi_handle,
7091 data, ind);
7092
7093 return QDF_STATUS_E_FAILURE;
7094}
7095
7096QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007097 struct nan_datapath_confirm_event *ev)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007098{
7099 if (wmi_handle->ops->extract_ndp_confirm)
7100 return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
7101 data, ev);
7102
7103 return QDF_STATUS_E_FAILURE;
7104}
7105
7106QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007107 uint8_t *data, struct nan_datapath_responder_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007108{
7109 if (wmi_handle->ops->extract_ndp_responder_rsp)
7110 return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
7111 data, rsp);
7112
7113 return QDF_STATUS_E_FAILURE;
7114}
7115
7116QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007117 struct nan_datapath_end_rsp_event *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007118{
7119 if (wmi_handle->ops->extract_ndp_end_rsp)
7120 return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
7121 data, rsp);
7122
7123 return QDF_STATUS_E_FAILURE;
7124}
7125
7126QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
7127 struct nan_datapath_end_indication_event **ind)
7128{
7129 if (wmi_handle->ops->extract_ndp_end_ind)
7130 return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
7131 data, ind);
7132
7133 return QDF_STATUS_E_FAILURE;
7134}
Naveen Rawatd42ce382018-01-09 17:54:41 -08007135
7136QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
7137 struct nan_datapath_sch_update_event *ind)
7138{
7139 if (wmi_handle->ops->extract_ndp_sch_update)
7140 return wmi_handle->ops->extract_ndp_sch_update(wmi_handle,
7141 data, ind);
7142
7143 return QDF_STATUS_E_FAILURE;
7144}
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007145#endif
yeshwanth sriram guntuka07a15b82017-09-01 17:56:07 +05307146QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
7147 struct wmi_btm_config *params)
7148{
7149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7150
7151 if (wmi_handle->ops->send_btm_config)
7152 return wmi_handle->ops->send_btm_config(wmi_handle,
7153 params);
7154
7155 return QDF_STATUS_E_FAILURE;
7156}
Arif Hussainc5bfe072017-12-27 16:23:45 -08007157
7158QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
7159 struct wmi_obss_detection_cfg_param *obss_cfg_param)
7160{
7161 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7162
7163 if (wmi_handle->ops->send_obss_detection_cfg_cmd)
7164 return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle,
7165 obss_cfg_param);
7166
7167 return QDF_STATUS_E_FAILURE;
7168}
Arif Hussain33d98502018-01-12 13:15:04 -08007169
7170QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
7171 uint8_t *data,
7172 struct wmi_obss_detect_info
7173 *info)
7174{
7175 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7176
7177 if (wmi_handle->ops->extract_obss_detection_info)
7178 return wmi_handle->ops->extract_obss_detection_info(data, info);
7179
7180 return QDF_STATUS_E_FAILURE;
7181}
Vignesh Viswanathan7f057772018-01-18 19:06:40 +05307182
7183QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
7184 struct wmi_11k_offload_params *params)
7185{
7186 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7187
7188 if (wmi_handle->ops->send_offload_11k_cmd)
7189 return wmi_handle->ops->send_offload_11k_cmd(
7190 wmi_handle, params);
7191
7192 return QDF_STATUS_E_FAILURE;
7193}
7194
7195QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
7196 struct wmi_invoke_neighbor_report_params *params)
7197{
7198 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7199
7200 if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
7201 return wmi_handle->ops->send_invoke_neighbor_report_cmd(
7202 wmi_handle, params);
7203
7204 return QDF_STATUS_E_FAILURE;
7205}
Himanshu Agarwal157e4782018-01-24 22:24:17 +05307206
7207#ifdef WLAN_SUPPORT_GREEN_AP
7208QDF_STATUS wmi_extract_green_ap_egap_status_info(
7209 void *wmi_hdl, uint8_t *evt_buf,
7210 struct wlan_green_ap_egap_status_info *egap_status_info_params)
7211{
7212 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7213
7214 if (wmi_handle->ops->extract_green_ap_egap_status_info)
7215 return wmi_handle->ops->extract_green_ap_egap_status_info(
7216 evt_buf, egap_status_info_params);
7217
7218 return QDF_STATUS_E_FAILURE;
7219}
7220#endif
Arif Hussainec5cd3c2018-01-22 01:19:36 -08007221
7222QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
7223 uint32_t vdev_id,
7224 bool enable)
7225{
7226 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7227
7228 if (wmi_handle->ops->send_bss_color_change_enable_cmd)
7229 return wmi_handle->ops->send_bss_color_change_enable_cmd(
7230 wmi_handle, vdev_id, enable);
7231
7232 return QDF_STATUS_E_FAILURE;
7233}
7234
7235QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
7236 struct wmi_obss_color_collision_cfg_param *cfg)
7237{
7238 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7239
7240 if (wmi_handle->ops->send_obss_color_collision_cfg_cmd)
7241 return wmi_handle->ops->send_obss_color_collision_cfg_cmd(
7242 wmi_handle, cfg);
7243
7244 return QDF_STATUS_E_FAILURE;
7245}
7246
7247QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
7248 uint8_t *data, struct wmi_obss_color_collision_info *info)
7249{
7250 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7251
7252 if (wmi_handle->ops->extract_obss_color_collision_info)
7253 return wmi_handle->ops->extract_obss_color_collision_info(data,
7254 info);
7255
7256 return QDF_STATUS_E_FAILURE;
7257}
Naveen Rawat26305452018-02-02 15:18:33 -08007258
7259wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
7260 WMI_HOST_WLAN_PHY_MODE phymode)
7261{
7262 /*
7263 * this API does translation between host only strcutres, hence
7264 * does not need separate TLV, non-TLV definitions
7265 */
7266
7267 if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX)
7268 return mode_to_width[phymode];
7269 else
7270 return WMI_HOST_CHAN_WIDTH_20;
7271}
Naveen Rawat963ee942018-04-13 16:38:36 -07007272
7273#ifdef QCA_SUPPORT_CP_STATS
7274QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
7275 struct wmi_host_congestion_stats *stats)
7276{
7277 if (wmi_handle->ops->extract_cca_stats)
7278 return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf,
7279 stats);
7280
7281 return QDF_STATUS_E_FAILURE;
7282}
7283#endif /* QCA_SUPPORT_CP_STATS */
Shashikala Prabhu5f65ac72018-05-16 10:08:09 +05307284
7285#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
7286QDF_STATUS
7287wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
7288 struct dfs_radar_found_params *params)
7289{
7290 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7291
7292 if (wmi_handle->ops->send_dfs_average_radar_params_cmd)
7293 return wmi_handle->ops->send_dfs_average_radar_params_cmd(
7294 wmi_handle, params);
7295
7296 return QDF_STATUS_E_FAILURE;
7297}
7298
7299QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
7300 uint32_t *dfs_status_check)
7301{
7302 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7303
7304 if (wmi_handle->ops->extract_dfs_status_from_fw)
7305 return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle,
7306 evt_buf, dfs_status_check);
7307
7308 return QDF_STATUS_E_FAILURE;
7309}
7310#endif