blob: 2ec9cee939e1c0953db6705b835c90dc9b2988ac [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
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301035#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Wu Gaocd3a8512017-03-13 20:17:34 +08001036/**
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
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301076 if (wmi_handle->ops->send_p2p_lo_stop_cmd)
Wu Gaocd3a8512017-03-13 20:17:34 +08001077 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
1078 vdev_id);
1079
1080 return QDF_STATUS_E_FAILURE;
1081}
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301082#endif /* End of FEATURE_P2P_LISTEN_OFFLOAD*/
Wu Gaocd3a8512017-03-13 20:17:34 +08001083
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
Qiwei Cai1ccba222018-05-21 16:49:39 +08001842#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Govind Singh4eacd2b2016-03-07 14:24:22 +05301843/**
1844 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1845 * @wmi_hdl: wmi handle
1846 * @clear_req: ll stats clear request command params
1847 * @addr: mac address
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_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 const struct ll_stats_clear_params *clear_req,
1853 uint8_t addr[IEEE80211_ADDR_LEN])
1854{
1855 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1856
1857 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1858 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1859 clear_req, addr);
1860
Govind Singhb53420c2016-03-09 14:32:57 +05301861 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301862}
1863
1864/**
1865 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1866 * @wmi_hdl:wmi handle
1867 * @get_req:ll stats get request command params
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_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301872 const struct ll_stats_get_params *get_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_get_cmd)
1878 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1879 get_req, addr);
1880
Govind Singhb53420c2016-03-09 14:32:57 +05301881 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301882}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001883#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh4eacd2b2016-03-07 14:24:22 +05301884
1885/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301886 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1887 * @wmi_hdl: wma handle
1888 * @vdev_id: vdev id
1889 *
1890 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1891 */
1892QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
1893 uint8_t vdev_id)
1894{
1895 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1896
1897 if (wmi_handle->ops->send_congestion_cmd)
1898 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
1899 vdev_id);
1900
1901 return QDF_STATUS_E_FAILURE;
1902}
1903
Qiwei Cai1ccba222018-05-21 16:49:39 +08001904#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301905/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301906 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1907 * @wmi_handle: wmi handle
1908 * @set_req: ll stats set request command params
1909 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301910 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301911 */
Govind Singhb53420c2016-03-09 14:32:57 +05301912QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301913 const struct ll_stats_set_params *set_req)
1914{
1915 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1916
1917 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1918 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1919 set_req);
1920
Govind Singhb53420c2016-03-09 14:32:57 +05301921 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301922}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001923#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh20c5dac2016-03-07 15:33:31 +05301924
1925/**
1926 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1927 * @wmi_handle: wmi handle
1928 * @rssi_req: get RSSI request
1929 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301930 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301931 */
Govind Singhb53420c2016-03-09 14:32:57 +05301932QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301933{
1934 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1935
1936 if (wmi_handle->ops->send_snr_request_cmd)
1937 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1938
Govind Singhb53420c2016-03-09 14:32:57 +05301939 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301940}
1941
1942/**
1943 * wmi_unified_snr_cmd() - get RSSI from fw
1944 * @wmi_handle: wmi handle
1945 * @vdev_id: vdev id
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_cmd(void *wmi_hdl, uint8_t vdev_id)
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_cmd)
1954 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1955 vdev_id);
1956
Govind Singhb53420c2016-03-09 14:32:57 +05301957 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301958}
1959
1960/**
1961 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1962 * @wmi_handle: wmi handle
1963 * @link_status: get link params
1964 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301965 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301966 */
Govind Singhb53420c2016-03-09 14:32:57 +05301967QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301968 struct link_status_params *link_status)
1969{
1970 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1971
1972 if (wmi_handle->ops->send_link_status_req_cmd)
1973 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1974 link_status);
1975
Govind Singhb53420c2016-03-09 14:32:57 +05301976 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301977}
1978
Govind Singh20c5dac2016-03-07 15:33:31 +05301979/**
1980 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
1981 * @wmi_handle: wmi handle
1982 * @ta_dhcp_ind: DHCP indication parameter
1983 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301984 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301985 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301986#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05301987QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301988 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
1989{
1990 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1991
1992 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
1993 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
1994 ta_dhcp_ind);
1995
Govind Singhb53420c2016-03-09 14:32:57 +05301996 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301997}
1998
1999/**
2000 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2001 * @wmi_handle: wmi handle
2002 * @pLinkSpeed: link speed info
2003 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302004 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302005 */
Govind Singhb53420c2016-03-09 14:32:57 +05302006QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302007 wmi_mac_addr peer_macaddr)
2008{
2009 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2010
2011 if (wmi_handle->ops->send_get_link_speed_cmd)
2012 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2013 peer_macaddr);
2014
Govind Singhb53420c2016-03-09 14:32:57 +05302015 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302016}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302017#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302018
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302019#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh20c5dac2016-03-07 15:33:31 +05302020/**
2021 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2022 * @wmi_handle: wmi handler
2023 * @egap_params: pointer to egap_params
2024 *
2025 * Return: 0 for success, otherwise appropriate error code
2026 */
Govind Singhb53420c2016-03-09 14:32:57 +05302027QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302028 struct wlan_green_ap_egap_params *egap_params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302029{
2030 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2031
2032 if (wmi_handle->ops->send_egap_conf_params_cmd)
2033 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2034 egap_params);
2035
Govind Singhb53420c2016-03-09 14:32:57 +05302036 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302037}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302038#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302039
2040/**
2041 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2042 * @wmi_handl: wmi handle
2043 * @cmd: Profiling command index
2044 * @value1: parameter1 value
2045 * @value2: parameter2 value
2046 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302047 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302048 */
Govind Singhb53420c2016-03-09 14:32:57 +05302049QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302050 uint32_t cmd, uint32_t value1, uint32_t value2)
2051{
2052 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2053
2054 if (wmi_handle->ops->send_fw_profiling_cmd)
2055 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2056 cmd, value1, value2);
2057
Govind Singhb53420c2016-03-09 14:32:57 +05302058 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302059}
2060
Govind Singh20c5dac2016-03-07 15:33:31 +05302061/**
Naveen Rawata5817e72017-10-26 18:50:19 -07002062 * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware
2063 * will wake up host after specified time is elapsed
2064 * @wmi_handle: wmi handle
2065 * @vdev_id: vdev id
2066 * @cookie: value to identify reason why host set up wake call.
2067 * @time: time in ms
2068 *
2069 * Return: QDF status
2070 */
2071QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
2072 uint32_t cookie, uint32_t time)
2073{
2074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2075
2076 if (wmi_handle->ops->send_wow_timer_pattern_cmd)
2077 return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
2078 vdev_id, cookie, time);
2079
2080 return QDF_STATUS_E_FAILURE;
2081}
2082
2083/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302084 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2085 * @wmi_handle: wmi handle
2086 * @vdev_id: vdev id
2087 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302088 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302089 */
Govind Singhb53420c2016-03-09 14:32:57 +05302090QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302091{
2092 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2093
2094 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2095 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2096 vdev_id);
2097
Govind Singhb53420c2016-03-09 14:32:57 +05302098 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302099}
2100
Paul Zhang92ab8d32017-12-08 16:08:00 +08002101QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
2102 struct wlm_latency_level_param *param)
2103{
2104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2105
2106 if (wmi_handle->ops->send_wlm_latency_level_cmd)
2107 return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
2108 param);
2109
2110 return QDF_STATUS_E_FAILURE;
2111}
2112
Govind Singh20c5dac2016-03-07 15:33:31 +05302113/**
2114 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2115 * @wmi_hdl: wmi handle
2116 * @vdev_id: vdev id
2117 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302118 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302119 */
Govind Singhb53420c2016-03-09 14:32:57 +05302120QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302121{
2122 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2123
2124 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2125 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2126 vdev_id);
2127
Govind Singhb53420c2016-03-09 14:32:57 +05302128 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302129}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002130
2131#ifdef WLAN_FEATURE_CIF_CFR
2132QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2133 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2134{
2135 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2136
2137 if (wmi_handle->ops->send_start_oem_data_cmd)
2138 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2139
2140 return QDF_STATUS_E_FAILURE;
2141}
2142#endif
2143
Sathish Kumarf396c722017-11-17 17:30:41 +05302144QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
2145 struct direct_buf_rx_cfg_req *cfg)
2146{
2147 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2148
2149 if (wmi_handle->ops->send_dbr_cfg_cmd)
2150 return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg);
2151
2152 return QDF_STATUS_E_FAILURE;
2153}
2154
Govind Singh20c5dac2016-03-07 15:33:31 +05302155/**
2156 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2157 * @wmi_handle: wmi handle
2158 * @startOemDataReq: start request params
2159 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302160 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302161 */
Govind Singhb53420c2016-03-09 14:32:57 +05302162QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002163 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302164 uint8_t *data)
2165{
2166 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2167
2168 if (wmi_handle->ops->send_start_oem_data_cmd)
2169 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2170 data_len, data);
2171
Govind Singhb53420c2016-03-09 14:32:57 +05302172 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302173}
2174
2175/**
2176 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2177 * @wmi_handle: wmi handle
2178 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2179 *
2180 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2181 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2182 * to firmware based on phyerr filtering
2183 * offload status.
2184 *
2185 * Return: 1 success, 0 failure
2186 */
Govind Singhb53420c2016-03-09 14:32:57 +05302187QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302188wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2189 bool dfs_phyerr_filter_offload)
2190{
2191 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2192
2193 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2194 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2195 dfs_phyerr_filter_offload);
2196
Govind Singhb53420c2016-03-09 14:32:57 +05302197 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302198}
2199
2200#if !defined(REMOVE_PKT_LOG)
2201/**
2202 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2203 * @wmi_handle: wmi handle
2204 * @pktlog_event: pktlog event
2205 * @cmd_id: pktlog cmd id
2206 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302207 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302208 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302209#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302210QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302211 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302212 uint32_t cmd_id,
2213 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302214{
2215 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2216
2217 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2218 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302219 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302220
Govind Singhb53420c2016-03-09 14:32:57 +05302221 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302222}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302223#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302224#endif /* REMOVE_PKT_LOG */
2225
2226/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302227 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2228 * @wmi_handle: wmi handle
2229 * @ptrn_id: pattern id
2230 * @vdev_id: vdev id
2231 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302232 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302233 */
Govind Singhb53420c2016-03-09 14:32:57 +05302234QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302235 uint8_t vdev_id)
2236{
2237 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2238
2239 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2240 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2241 ptrn_id, vdev_id);
2242
Govind Singhb53420c2016-03-09 14:32:57 +05302243 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302244}
2245
2246/**
2247 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2248 * @wmi_handle: wmi handle
2249 *
2250 * Sends host wakeup indication to FW. On receiving this indication,
2251 * FW will come out of WOW.
2252 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302253 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302254 */
Govind Singhb53420c2016-03-09 14:32:57 +05302255QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302256{
2257 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2258
2259 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2260 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2261
Govind Singhb53420c2016-03-09 14:32:57 +05302262 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302263}
2264
2265/**
2266 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2267 * @wmi_handle: wmi handle
2268 * @msg: delts params
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_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302273 uint8_t ac)
2274{
2275 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2276
2277 if (wmi_handle->ops->send_del_ts_cmd)
2278 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2279 vdev_id, ac);
2280
Govind Singhb53420c2016-03-09 14:32:57 +05302281 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302282}
2283
2284/**
2285 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2286 * @wmi_handle: handle to wmi
2287 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2288 *
Govind Singhb53420c2016-03-09 14:32:57 +05302289 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302290 * ADD_TS requestes to firmware in loop for all the ACs with
2291 * active flow.
2292 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302293 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302294 */
Govind Singhb53420c2016-03-09 14:32:57 +05302295QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302296 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2297{
2298 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2299
2300 if (wmi_handle->ops->send_aggr_qos_cmd)
2301 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2302 aggr_qos_rsp_msg);
2303
Govind Singhb53420c2016-03-09 14:32:57 +05302304 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302305}
2306
2307/**
2308 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2309 * @wmi_handle: wmi handle
2310 * @msg: ADDTS params
2311 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302312 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302313 */
Govind Singhb53420c2016-03-09 14:32:57 +05302314QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302315 struct add_ts_param *msg)
2316{
2317 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2318
2319 if (wmi_handle->ops->send_add_ts_cmd)
2320 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2321 msg);
2322
Govind Singhb53420c2016-03-09 14:32:57 +05302323 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302324}
2325
2326/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302327 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2328 * @wmi_handle: wmi handle
2329 * @pAddPeriodicTxPtrnParams: tx ptrn params
2330 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302331 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302332 */
Govind Singhb53420c2016-03-09 14:32:57 +05302333QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302334 struct periodic_tx_pattern *
2335 pAddPeriodicTxPtrnParams,
2336 uint8_t vdev_id)
2337{
2338 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2339
2340 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2341 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2342 pAddPeriodicTxPtrnParams,
2343 vdev_id);
2344
Govind Singhb53420c2016-03-09 14:32:57 +05302345 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302346}
2347
2348/**
2349 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2350 * @wmi_handle: wmi handle
2351 * @vdev_id: vdev id
2352 * @pattern_id: pattern id
2353 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302354 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302355 */
Govind Singhb53420c2016-03-09 14:32:57 +05302356QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302357 uint8_t vdev_id,
2358 uint8_t pattern_id)
2359{
2360 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2361
2362 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2363 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2364 vdev_id,
2365 pattern_id);
2366
Govind Singhb53420c2016-03-09 14:32:57 +05302367 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302368}
2369
2370/**
2371 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2372 * @wmi_handle: wmi handle
2373 * @preq: stats ext params
2374 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302375 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302376 */
Govind Singhb53420c2016-03-09 14:32:57 +05302377QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302378 struct stats_ext_params *preq)
2379{
2380 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2381
2382 if (wmi_handle->ops->send_stats_ext_req_cmd)
2383 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2384 preq);
2385
Govind Singhb53420c2016-03-09 14:32:57 +05302386 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302387}
2388
2389/**
2390 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2391 * @wmi_handle: wmi handle
2392 * @params: ext wow params
2393 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302394 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302395 */
Govind Singhb53420c2016-03-09 14:32:57 +05302396QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302397 struct ext_wow_params *params)
2398{
2399 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2400
2401 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2402 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2403 params);
2404
Govind Singhb53420c2016-03-09 14:32:57 +05302405 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302406}
2407
2408/**
2409 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2410 * @wmi_handle: wmi handle
2411 * @appType2Params: app type2 params
2412 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302413 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302414 */
Govind Singhb53420c2016-03-09 14:32:57 +05302415QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302416 struct app_type2_params *appType2Params)
2417{
2418 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2419
2420 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2421 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2422 appType2Params);
2423
Govind Singhb53420c2016-03-09 14:32:57 +05302424 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302425
2426}
2427
2428/**
2429 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2430 * @wmi_handle: wmi handle
2431 * @timer_val: auto shutdown timer value
2432 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302433 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302434 */
Govind Singhb53420c2016-03-09 14:32:57 +05302435QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302436 uint32_t timer_val)
2437{
2438 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2439
2440 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2441 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2442 timer_val);
2443
Govind Singhb53420c2016-03-09 14:32:57 +05302444 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302445}
2446
2447/**
2448 * wmi_unified_nan_req_cmd() - to send nan request to target
2449 * @wmi_handle: wmi handle
2450 * @nan_req: request data which will be non-null
2451 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302452 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302453 */
Govind Singhb53420c2016-03-09 14:32:57 +05302454QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302455 struct nan_req_params *nan_req)
2456{
2457 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2458
2459 if (wmi_handle->ops->send_nan_req_cmd)
2460 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2461 nan_req);
2462
Govind Singhb53420c2016-03-09 14:32:57 +05302463 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302464}
2465
2466/**
2467 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2468 * @wmi_handle: wmi handle
2469 * @pDhcpSrvOffloadInfo: DHCP server offload info
2470 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302471 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302472 */
Govind Singhb53420c2016-03-09 14:32:57 +05302473QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002474 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302475{
2476 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2477
2478 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2479 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002480 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05302481
Govind Singhb53420c2016-03-09 14:32:57 +05302482 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302483}
2484
2485/**
2486 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2487 * @wmi_handle: wmi handle
2488 * @ch_avoid_update_req: channel avoid update params
2489 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302490 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302491 */
Govind Singhb53420c2016-03-09 14:32:57 +05302492QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302493{
2494 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2495
2496 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2497 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2498
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_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2504 * @wmi_handle: wmi handle
2505 * @reg_dmn: reg domain
2506 * @regdmn2G: 2G reg domain
2507 * @regdmn5G: 5G reg domain
2508 * @ctl2G: 2G test limit
2509 * @ctl5G: 5G test limit
2510 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302511 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302512 */
Govind Singhb53420c2016-03-09 14:32:57 +05302513QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302514 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302515 uint16_t regdmn5G, uint8_t ctl2G,
2516 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302517{
2518 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2519
2520 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2521 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2522 reg_dmn, regdmn2G,
2523 regdmn5G, ctl2G,
2524 ctl5G);
2525
Govind Singhb53420c2016-03-09 14:32:57 +05302526 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302527}
2528
2529
2530/**
2531 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2532 * @wmi_handle: wmi handle
2533 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2534 *
2535 * This function sets tdls off channel mode
2536 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302537 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2538 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302539 */
Govind Singhb53420c2016-03-09 14:32:57 +05302540QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302541 struct tdls_channel_switch_params *chan_switch_params)
2542{
2543 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2544
2545 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2546 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2547 chan_switch_params);
2548
Govind Singhb53420c2016-03-09 14:32:57 +05302549 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302550}
2551
2552/**
2553 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2554 * @wmi_handle: wmi handle
2555 * @pwmaTdlsparams: TDLS params
2556 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302557 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302558 */
Govind Singhb53420c2016-03-09 14:32:57 +05302559QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302560 void *tdls_param, uint8_t tdls_state)
2561{
2562 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2563
2564 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2565 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2566 tdls_param, tdls_state);
2567
Govind Singhb53420c2016-03-09 14:32:57 +05302568 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302569}
2570
2571/**
2572 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2573 * @wmi_handle: wmi handle
2574 * @peerStateParams: TDLS peer state params
2575 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302576 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302577 */
Govind Singhb53420c2016-03-09 14:32:57 +05302578QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302579 struct tdls_peer_state_params *peerStateParams,
2580 uint32_t *ch_mhz)
2581{
2582 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2583
2584 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2585 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2586 peerStateParams, ch_mhz);
2587
Govind Singhb53420c2016-03-09 14:32:57 +05302588 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302589}
2590
2591/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302592 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2593 * @wmi_handle: Pointer to WMi handle
2594 * @ie_data: Pointer for ie data
2595 *
2596 * This function sends IE information to firmware
2597 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302598 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302599 *
2600 */
Govind Singhb53420c2016-03-09 14:32:57 +05302601QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302602 struct vdev_ie_info_param *ie_info)
2603{
2604 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2605
2606 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2607 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2608 ie_info);
2609
Govind Singhb53420c2016-03-09 14:32:57 +05302610 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302611}
Govind Singh9ddd5162016-03-07 16:30:32 +05302612
2613/**
2614 * wmi_unified_save_fw_version_cmd() - save fw version
2615 * @wmi_handle: pointer to wmi handle
2616 * @res_cfg: resource config
2617 * @num_mem_chunks: no of mem chunck
2618 * @mem_chunk: pointer to mem chunck structure
2619 *
2620 * This function sends IE information to firmware
2621 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302622 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302623 *
2624 */
Govind Singhb53420c2016-03-09 14:32:57 +05302625QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302626 void *evt_buf)
2627{
2628 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2629
2630 if (wmi_handle->ops->save_fw_version_cmd)
2631 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2632 evt_buf);
2633
Govind Singhb53420c2016-03-09 14:32:57 +05302634 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302635}
Govind Singha4836fd2016-03-07 16:45:38 +05302636
2637/**
2638 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2639 * @wmi_hdl: wmi handle
2640 * @custom_addr: base mac address
2641 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302642 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302643 */
Govind Singhb53420c2016-03-09 14:32:57 +05302644QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302645 uint8_t *custom_addr)
2646{
2647 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2648
2649 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2650 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2651 custom_addr);
2652
Govind Singhb53420c2016-03-09 14:32:57 +05302653 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302654}
2655
2656/**
2657 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2658 * @wmi_hdl: wmi handle
2659 * @event: Event received from FW
2660 * @len: Length of the event
2661 *
2662 * Enables the low frequency events and disables the high frequency
2663 * events. Bit 17 indicates if the event if low/high frequency.
2664 * 1 - high frequency, 0 - low frequency
2665 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302666 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302667 */
Govind Singhb53420c2016-03-09 14:32:57 +05302668QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302669 uint8_t *event,
2670 uint32_t len)
2671{
2672 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2673
2674 if (wmi_handle->ops->send_log_supported_evt_cmd)
2675 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2676 event, len);
2677
Govind Singhb53420c2016-03-09 14:32:57 +05302678 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302679}
2680
gaurank kathpaliacdfb4452018-02-21 18:58:29 +05302681void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl)
2682{
2683 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2684 if (wmi_handle->ops->send_time_stamp_sync_cmd)
2685 wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle);
2686
2687}
Govind Singha4836fd2016-03-07 16:45:38 +05302688/**
2689 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2690 * @wmi_hdl: wmi handle
2691 * @start_log: Start logging related parameters
2692 *
2693 * Send the command to the FW based on which specific logging of diag
2694 * event/log id can be started/stopped
2695 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302696 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302697 */
Govind Singhb53420c2016-03-09 14:32:57 +05302698QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302699 struct wmi_wifi_start_log *start_log)
2700{
2701 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2702
2703 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2704 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2705 start_log);
2706
Govind Singhb53420c2016-03-09 14:32:57 +05302707 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302708}
2709
2710/**
2711 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2712 * @wmi_hdl: WMI handle
2713 *
2714 * This function is used to send the flush command to the FW,
2715 * that will flush the fw logs that are residue in the FW
2716 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302717 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302718 */
Govind Singhb53420c2016-03-09 14:32:57 +05302719QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302720{
2721 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2722
2723 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2724 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2725
Govind Singhb53420c2016-03-09 14:32:57 +05302726 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302727}
2728
2729/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302730 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302731 * @wmi_hdl: wmi handle
2732 * @msg: PCL structure containing the PCL and the number of channels
2733 *
2734 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2735 * firmware. The DBS Manager is the consumer of this information in the WLAN
2736 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2737 * to migrate to a new channel without host driver involvement. An example of
2738 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2739 * manage the channel selection without firmware involvement.
2740 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302741 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302742 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302743QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2744 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302745{
2746 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2747
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302748 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2749 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302750
Govind Singhb53420c2016-03-09 14:32:57 +05302751 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302752}
2753
2754/**
2755 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2756 * @wmi_hdl: wmi handle
2757 * @msg: Structure containing the following parameters
2758 *
2759 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2760 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2761 *
2762 * Provides notification to the WLAN firmware that host driver is requesting a
2763 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2764 * configurations that include the Dual Band Simultaneous (DBS) feature.
2765 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302766 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302767 */
Govind Singhb53420c2016-03-09 14:32:57 +05302768QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302769 uint32_t hw_mode_index)
2770{
2771 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2772
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302773 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2774 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302775 hw_mode_index);
2776
Govind Singhb53420c2016-03-09 14:32:57 +05302777 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302778}
2779
2780/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302781 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302782 * @wmi_hdl: wmi handle
2783 * @msg: Dual MAC config parameters
2784 *
2785 * Configures WLAN firmware with the dual MAC features
2786 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302787 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302788 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302789QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Srinivas Girigowda5029ae72018-02-15 14:30:05 -08002790 struct policy_mgr_dual_mac_config *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302791{
2792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2793
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302794 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2795 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302796 msg);
2797
Govind Singhb53420c2016-03-09 14:32:57 +05302798 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302799}
2800
Govind Singha4836fd2016-03-07 16:45:38 +05302801/**
2802 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
2803 * @wmi_hdl: wmi handle
2804 * @flashing: flashing request
2805 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302806 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302807 */
Govind Singhb53420c2016-03-09 14:32:57 +05302808QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302809 struct flashing_req_params *flashing)
2810{
2811 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2812
2813 if (wmi_handle->ops->send_set_led_flashing_cmd)
2814 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
2815 flashing);
2816
Govind Singhb53420c2016-03-09 14:32:57 +05302817 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302818}
2819
2820/**
2821 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
2822 * @wmi_hdl: wmi handle
2823 * @appType1Params: app type1 params
2824 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302825 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302826 */
Govind Singhb53420c2016-03-09 14:32:57 +05302827QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302828 struct app_type1_params *app_type1_params)
2829{
2830 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2831
2832 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
2833 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
2834 app_type1_params);
2835
Govind Singhb53420c2016-03-09 14:32:57 +05302836 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302837}
2838
2839/**
2840 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
2841 * @wmi_hdl: wmi handle
2842 * @request: SSID hotlist set request
2843 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302844 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302845 */
Govind Singhb53420c2016-03-09 14:32:57 +05302846QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05302847wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
2848 struct ssid_hotlist_request_params *request)
2849{
2850 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2851
2852 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
2853 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
2854 request);
2855
Govind Singhb53420c2016-03-09 14:32:57 +05302856 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302857}
2858
Rachit Kankanee797c772018-07-31 12:00:48 +05302859#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Govind Singha4836fd2016-03-07 16:45:38 +05302860/**
2861 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
2862 * @wmi_hdl: wmi handle
2863 * @vdev_id: vdev id
2864 *
2865 * This function sends roam synch complete event to fw.
2866 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302867 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302868 */
Govind Singhb53420c2016-03-09 14:32:57 +05302869QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302870 uint8_t vdev_id)
2871{
2872 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2873
2874 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
2875 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
2876 vdev_id);
2877
Govind Singhb53420c2016-03-09 14:32:57 +05302878 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302879}
2880
Rachit Kankanee797c772018-07-31 12:00:48 +05302881/* wmi_unified_set_ric_req_cmd() - set ric request element
2882 * @wmi_hdl: wmi handle
2883 * @msg: message
2884 * @is_add_ts: is addts required
2885 *
2886 * This function sets ric request element for 11r roaming.
2887 *
2888 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2889 */
2890QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
2891 uint8_t is_add_ts)
2892{
2893 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2894
2895 if (wmi_handle->ops->send_set_ric_req_cmd)
2896 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
2897 is_add_ts);
2898
2899 return QDF_STATUS_E_FAILURE;
2900}
2901#endif
2902
Govind Singha4836fd2016-03-07 16:45:38 +05302903/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05302904 * wmi_unified_fw_test_cmd() - send fw test command to fw.
2905 * @wmi_hdl: wmi handle
2906 * @wmi_fwtest: fw test command
2907 *
2908 * This function sends fw test command to fw.
2909 *
2910 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2911 */
2912QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
2913 struct set_fwtest_params *wmi_fwtest)
2914{
2915 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2916
2917 if (wmi_handle->ops->send_fw_test_cmd)
2918 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
2919 wmi_fwtest);
2920
2921 return QDF_STATUS_E_FAILURE;
2922
2923}
2924
2925/**
Govind Singha4836fd2016-03-07 16:45:38 +05302926 * wmi_unified_unit_test_cmd() - send unit test command to fw.
2927 * @wmi_hdl: wmi handle
2928 * @wmi_utest: unit test command
2929 *
2930 * This function send unit test command to fw.
2931 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302932 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302933 */
Govind Singhb53420c2016-03-09 14:32:57 +05302934QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302935 struct wmi_unit_test_cmd *wmi_utest)
2936{
2937 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2938
2939 if (wmi_handle->ops->send_unit_test_cmd)
2940 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
2941 wmi_utest);
2942
Govind Singhb53420c2016-03-09 14:32:57 +05302943 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302944}
2945
2946/**
2947 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
2948 * @wmi_hdl: wmi handle
2949 * @roaminvoke: roam invoke command
2950 *
2951 * Send roam invoke command to fw for fastreassoc.
2952 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302953 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302954 */
Govind Singhb53420c2016-03-09 14:32:57 +05302955QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302956 struct wmi_roam_invoke_cmd *roaminvoke,
2957 uint32_t ch_hz)
2958{
2959 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2960
2961 if (wmi_handle->ops->send_roam_invoke_cmd)
2962 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
2963 roaminvoke, ch_hz);
2964
Govind Singhb53420c2016-03-09 14:32:57 +05302965 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302966}
2967
2968/**
2969 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
2970 * @wmi_hdl: wmi handle
2971 * @command: command
2972 * @vdev_id: vdev id
2973 *
2974 * This function set roam offload command to fw.
2975 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302976 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302977 */
Govind Singhb53420c2016-03-09 14:32:57 +05302978QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302979 uint32_t command, uint32_t vdev_id)
2980{
2981 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2982
2983 if (wmi_handle->ops->send_roam_scan_offload_cmd)
2984 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
2985 command, vdev_id);
2986
Govind Singhb53420c2016-03-09 14:32:57 +05302987 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302988}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302989#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05302990/**
2991 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
2992 * @wmi_hdl: wmi handle
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302993 * @ap_profile: ap profile params
Govind Singha4836fd2016-03-07 16:45:38 +05302994 *
2995 * Send WMI_ROAM_AP_PROFILE to firmware
2996 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302997 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302998 */
Govind Singhb53420c2016-03-09 14:32:57 +05302999QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303000 struct ap_profile_params *ap_profile)
Govind Singha4836fd2016-03-07 16:45:38 +05303001{
3002 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3003
3004 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303005 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
3006 wmi_handle, ap_profile);
Govind Singha4836fd2016-03-07 16:45:38 +05303007
Govind Singhb53420c2016-03-09 14:32:57 +05303008 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303009}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303010#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303011/**
3012 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3013 * @wmi_handle: wmi handle
3014 * @scan_period: scan period
3015 * @scan_age: scan age
3016 * @vdev_id: vdev id
3017 *
3018 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3019 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303020 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303021 */
Govind Singhb53420c2016-03-09 14:32:57 +05303022QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303023 uint32_t scan_period,
3024 uint32_t scan_age,
3025 uint32_t vdev_id)
3026{
3027 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3028
3029 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3030 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3031 scan_period, scan_age, vdev_id);
3032
Govind Singhb53420c2016-03-09 14:32:57 +05303033 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303034}
3035
3036/**
3037 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3038 * @wmi_handle: wmi handle
3039 * @chan_count: channel count
3040 * @chan_list: channel list
3041 * @list_type: list type
3042 * @vdev_id: vdev id
3043 *
3044 * Set roam offload channel list.
3045 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303046 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303047 */
Govind Singhb53420c2016-03-09 14:32:57 +05303048QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303049 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003050 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303051 uint8_t list_type, uint32_t vdev_id)
3052{
3053 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3054
3055 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3056 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3057 chan_count, chan_list,
3058 list_type, vdev_id);
3059
Govind Singhb53420c2016-03-09 14:32:57 +05303060 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303061}
3062
3063/**
3064 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3065 * @wmi_hdl: wmi handle
3066 * @rssi_change_thresh: RSSI Change threshold
3067 * @bcn_rssi_weight: beacon RSSI weight
3068 * @vdev_id: vdev id
3069 *
3070 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3071 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303072 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303073 */
Govind Singhb53420c2016-03-09 14:32:57 +05303074QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303075 uint32_t vdev_id,
3076 int32_t rssi_change_thresh,
3077 uint32_t bcn_rssi_weight,
3078 uint32_t hirssi_delay_btw_scans)
3079{
3080 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3081
3082 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3083 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3084 vdev_id, rssi_change_thresh,
3085 bcn_rssi_weight, hirssi_delay_btw_scans);
3086
Govind Singhb53420c2016-03-09 14:32:57 +05303087 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303088}
3089
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303090QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3091 struct wmi_per_roam_config_req *req_buf)
3092{
3093 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3094
3095 if (wmi_handle->ops->send_per_roam_config_cmd)
3096 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3097 req_buf);
3098
3099 return QDF_STATUS_E_FAILURE;
3100}
3101
Govind Singha4836fd2016-03-07 16:45:38 +05303102/**
Anurag Chouhan97f00422017-09-11 14:56:30 +05303103 * wmi_unified_set_arp_stats_req() - set arp stats request
3104 * @wmi_hdl: wmi handle
3105 * @req_buf: pointer to set_arp_stats
3106 *
3107 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3108 */
3109QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
3110 struct set_arp_stats *req_buf)
3111{
3112 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3113
3114 if (wmi_handle->ops->send_set_arp_stats_req_cmd)
3115 return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
3116 req_buf);
3117
3118 return QDF_STATUS_E_FAILURE;
3119}
3120
3121/**
3122 * wmi_unified_get_arp_stats_req() - get arp stats request
3123 * @wmi_hdl: wmi handle
3124 * @req_buf: pointer to get_arp_stats
3125 *
3126 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3127 */
3128QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
3129 struct get_arp_stats *req_buf)
3130{
3131 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3132
3133 if (wmi_handle->ops->send_get_arp_stats_req_cmd)
3134 return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
3135 req_buf);
3136
3137 return QDF_STATUS_E_FAILURE;
3138}
3139
Vignesh Viswanathan81bde492017-09-25 14:36:38 +05303140QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
3141 struct wmi_unified_pmk_cache *req_buf)
3142{
3143 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3144
3145 if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
3146 return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
3147 req_buf);
3148
3149 return QDF_STATUS_E_FAILURE;
3150}
3151
3152#if defined(WLAN_FEATURE_FILS_SK)
3153QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
3154 struct hlp_params *req_buf)
3155{
3156 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3157
3158 if (wmi_handle->ops->send_roam_scan_hlp_cmd)
3159 return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
3160 req_buf);
3161
3162 return QDF_STATUS_E_FAILURE;
3163}
3164#endif
3165
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303166#ifdef FEATURE_WLAN_APF
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303167QDF_STATUS
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303168wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303169 enum wmi_host_active_apf_mode ucast_mode,
3170 enum wmi_host_active_apf_mode
3171 mcast_bcast_mode)
Dustin Brown4423f632017-01-13 15:24:07 -08003172{
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303173 if (wmi->ops->send_set_active_apf_mode_cmd)
3174 return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
3175 ucast_mode,
3176 mcast_bcast_mode);
3177 return QDF_STATUS_E_FAILURE;
Dustin Brown4423f632017-01-13 15:24:07 -08003178}
3179
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303180QDF_STATUS
3181wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
3182 uint32_t vdev_id, bool enable)
3183{
3184 if (wmi->ops->send_apf_enable_cmd)
3185 return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable);
3186 return QDF_STATUS_E_FAILURE;
3187}
3188
3189QDF_STATUS
3190wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
3191 struct wmi_apf_write_memory_params
3192 *write_params)
3193{
3194 if (wmi->ops->send_apf_write_work_memory_cmd)
3195 return wmi->ops->send_apf_write_work_memory_cmd(wmi,
3196 write_params);
3197
3198 return QDF_STATUS_E_FAILURE;
3199}
3200
3201QDF_STATUS
3202wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
3203 struct wmi_apf_read_memory_params
3204 *read_params)
3205{
3206 if (wmi->ops->send_apf_read_work_memory_cmd)
3207 return wmi->ops->send_apf_read_work_memory_cmd(wmi,
3208 read_params);
3209
3210 return QDF_STATUS_E_FAILURE;
3211}
3212
3213QDF_STATUS
3214wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
3215 struct wmi_apf_read_memory_resp_event_params
3216 *read_mem_evt)
3217{
3218 if (wmi->ops->extract_apf_read_memory_resp_event)
3219 return wmi->ops->extract_apf_read_memory_resp_event(wmi,
3220 evt_buf,
3221 read_mem_evt);
3222
3223 return QDF_STATUS_E_FAILURE;
3224}
3225#endif /* FEATURE_WLAN_APF */
3226
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303227/**
3228 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3229 * @param wmi_handle : handle to WMI.
3230 * @param param : tpc config param
3231 *
3232 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3233 */
3234QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3235 uint32_t param)
3236{
3237 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3238
3239 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3240 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3241 param);
3242
3243 return QDF_STATUS_E_FAILURE;
3244}
3245
3246/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303247 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3248 * @param wmi_handle : handle to WMI.
3249 * @param param : pointer to set bwf param
3250 *
3251 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3252 */
3253QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3254 struct set_bwf_params *param)
3255{
3256 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3257
3258 if (wmi_handle->ops->send_set_bwf_cmd)
3259 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3260
3261 return QDF_STATUS_E_FAILURE;
3262}
3263
3264/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303265 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3266 * @param wmi_handle : handle to WMI.
3267 * @param param : pointer to hold pdev fips param
3268 *
3269 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3270 */
3271QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3272 struct fips_params *param)
3273{
3274 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3275
3276 if (wmi_handle->ops->send_pdev_fips_cmd)
3277 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3278
3279 return QDF_STATUS_E_FAILURE;
3280}
3281
3282/**
3283 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3284 * @param wmi_handle : handle to WMI.
3285 * @param param : pointer to hold wlan profile param
3286 *
3287 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3288 */
3289QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3290 struct wlan_profile_params *param)
3291{
3292 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3293
3294 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3295 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3296 param);
3297
3298 return QDF_STATUS_E_FAILURE;
3299}
3300
3301/**
3302 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3303 * @param wmi_handle : handle to WMI.
3304 * @param param : pointer to hold wlan profile param
3305 *
3306 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3307 */
3308QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3309 struct wlan_profile_params *param)
3310{
3311 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3312
3313 if (wmi->ops->send_wlan_profile_trigger_cmd)
3314 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3315 param);
3316
3317 return QDF_STATUS_E_FAILURE;
3318}
3319
3320/**
3321 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3322 * @param wmi_handle : handle to WMI.
3323 * @param param : pointer to hold channel param
3324 *
3325 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3326 */
3327QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3328 struct channel_param *param)
3329{
3330 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3331
3332 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3333 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3334 param);
3335
3336 return QDF_STATUS_E_FAILURE;
3337}
3338
3339/**
3340 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3341 * @param wmi_handle : handle to WMI.
3342 * @param param : pointer to hold channel param
3343 *
3344 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3345 */
3346QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3347 struct ht_ie_params *param)
3348{
3349 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3350
3351 if (wmi_handle->ops->send_set_ht_ie_cmd)
3352 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3353
3354 return QDF_STATUS_E_FAILURE;
3355}
3356
3357/**
3358 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3359 * @param wmi_handle : handle to WMI.
3360 * @param param : pointer to hold channel param
3361 *
3362 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3363 */
3364QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3365 struct vht_ie_params *param)
3366{
3367 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3368
3369 if (wmi_handle->ops->send_set_vht_ie_cmd)
3370 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3371
3372 return QDF_STATUS_E_FAILURE;
3373}
3374
3375/**
3376 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3377 * @param wmi_handle : handle to WMI.
3378 * @param param : pointer to hold wmm param
3379 *
3380 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3381 */
3382QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3383 struct wmm_update_params *param)
3384{
3385 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3386
3387 if (wmi_handle->ops->send_wmm_update_cmd)
3388 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3389
3390 return QDF_STATUS_E_FAILURE;
3391}
3392
3393/**
3394 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3395 * @param wmi_handle : handle to WMI.
3396 * @param param : pointer to hold ant switch tbl param
3397 *
3398 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3399 */
3400QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3401 struct ant_switch_tbl_params *param)
3402{
3403 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3404
3405 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3406 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3407 param);
3408
3409 return QDF_STATUS_E_FAILURE;
3410}
3411
3412/**
3413 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3414 * @param wmi_handle : handle to WMI.
3415 * @param param : pointer to hold ratepwr table param
3416 *
3417 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3418 */
3419QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3420 struct ratepwr_table_params *param)
3421{
3422 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3423
3424 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3425 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3426 param);
3427
3428 return QDF_STATUS_E_FAILURE;
3429}
3430
3431/**
3432 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3433 * @param wmi_handle : handle to WMI.
3434 *
3435 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3436 */
3437QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3438{
3439 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3440
3441 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3442 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3443
3444 return QDF_STATUS_E_FAILURE;
3445}
3446
3447/**
3448 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3449 * @param wmi_handle : handle to WMI.
3450 * @param param : pointer to hold ctl table param
3451 *
3452 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3453 */
3454QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3455 struct ctl_table_params *param)
3456{
3457 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3458
3459 if (wmi_handle->ops->send_set_ctl_table_cmd)
3460 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3461 param);
3462
3463 return QDF_STATUS_E_FAILURE;
3464}
3465
3466/**
3467 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3468 * @param wmi_handle : handle to WMI.
3469 * @param param : pointer to hold mimogain param
3470 *
3471 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3472 */
3473QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3474 struct mimogain_table_params *param)
3475{
3476 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3477
3478 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3479 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3480 param);
3481
3482 return QDF_STATUS_E_FAILURE;
3483}
3484
3485/**
3486 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3487 * chainmsk cmd function
3488 * @param wmi_handle : handle to WMI.
3489 * @param param : pointer to hold ratepwr chainmsk param
3490 *
3491 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3492 */
3493QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3494 struct ratepwr_chainmsk_params *param)
3495{
3496 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3497
3498 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3499 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3500
3501 return QDF_STATUS_E_FAILURE;
3502}
3503
3504/**
3505 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3506 * @param wmi_handle : handle to WMI.
3507 * @param param : pointer to hold macaddr param
3508 *
3509 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3510 */
3511QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3512 struct macaddr_params *param)
3513{
3514 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3515
3516 if (wmi_handle->ops->send_set_macaddr_cmd)
3517 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3518
3519 return QDF_STATUS_E_FAILURE;
3520}
3521
3522/**
3523 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3524 * @param wmi_handle : handle to WMI.
3525 *
3526 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3527 */
3528QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3529{
3530 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3531
3532 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3533 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3534
3535 return QDF_STATUS_E_FAILURE;
3536}
3537
3538/**
3539 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3540 * @param wmi_handle : handle to WMI.
3541 *
3542 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3543 */
3544QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3545{
3546 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3547
3548 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3549 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3550
3551 return QDF_STATUS_E_FAILURE;
3552}
3553
3554/**
3555 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3556 * @param wmi_handle : handle to WMI.
3557 * @param param : pointer to hold acparams param
3558 *
3559 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3560 */
3561QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3562 struct acparams_params *param)
3563{
3564 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3565
3566 if (wmi_handle->ops->send_set_acparams_cmd)
3567 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3568 param);
3569
3570 return QDF_STATUS_E_FAILURE;
3571}
3572
3573/**
3574 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3575 * tid map cmd function
3576 * @param wmi_handle : handle to WMI.
3577 * @param param : pointer to hold dscp param
3578 *
3579 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3580 */
3581QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3582 struct vap_dscp_tid_map_params *param)
3583{
3584 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3585
3586 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3587 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3588
3589 return QDF_STATUS_E_FAILURE;
3590}
3591
3592/**
3593 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3594 * reserve cmd function
3595 * @param wmi_handle : handle to WMI.
3596 * @param param : pointer to hold ast param
3597 *
3598 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3599 */
3600QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3601 struct proxy_ast_reserve_params *param)
3602{
3603 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3604
3605 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3606 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3607 param);
3608
3609 return QDF_STATUS_E_FAILURE;
3610}
3611
3612/**
3613 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3614 * @param wmi_handle : handle to WMI.
3615 * @param param : pointer to hold qvit param
3616 *
3617 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3618 */
3619QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3620 struct pdev_qvit_params *param)
3621{
3622 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3623
3624 if (wmi_handle->ops->send_pdev_qvit_cmd)
3625 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3626
3627 return QDF_STATUS_E_FAILURE;
3628}
3629
3630/**
3631 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3632 * @param wmi_handle : handle to WMI.
3633 * @param param : pointer to hold mcast grp param
3634 *
3635 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3636 */
3637QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3638 struct mcast_group_update_params *param)
3639{
3640 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3641
3642 if (wmi_handle->ops->send_mcast_group_update_cmd)
3643 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3644 param);
3645
3646 return QDF_STATUS_E_FAILURE;
3647}
3648
3649/**
3650 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3651 * @param wmi_handle : handle to WMI.
3652 * @param param : pointer to hold wds entry param
3653 *
3654 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3655 */
3656QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3657 struct peer_add_wds_entry_params *param)
3658{
3659 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3660
3661 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3662 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3663 param);
3664
3665 return QDF_STATUS_E_FAILURE;
3666}
3667
3668/**
3669 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3670 * @param wmi_handle : handle to WMI.
3671 * @param param : pointer to hold wds entry param
3672 *
3673 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3674 */
3675QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3676 struct peer_del_wds_entry_params *param)
3677{
3678 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3679
3680 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3681 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3682 param);
3683
3684 return QDF_STATUS_E_FAILURE;
3685}
3686
3687/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05303688 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
3689 * @param wmi_hdl : handle to WMI.
3690 * @param param : pointer to hold bridge mac addr param
3691 *
3692 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3693 */
3694QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
3695 struct set_bridge_mac_addr_params *param)
3696{
3697 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3698
3699 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
3700 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
3701 param);
3702
3703 return QDF_STATUS_E_FAILURE;
3704}
3705
3706/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303707 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3708 * @param wmi_handle : handle to WMI.
3709 * @param param : pointer to hold wds entry param
3710 *
3711 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3712 */
3713QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3714 struct peer_update_wds_entry_params *param)
3715{
3716 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3717
3718 if (wmi->ops->send_peer_update_wds_entry_cmd)
3719 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3720
3721 return QDF_STATUS_E_FAILURE;
3722}
3723
3724/**
3725 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3726 * @param wmi_handle : handle to WMI.
3727 * @param param : pointer to hold phyerr enable param
3728 *
3729 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3730 */
3731QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3732{
3733 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3734
3735 if (wmi_handle->ops->send_phyerr_enable_cmd)
3736 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3737
3738 return QDF_STATUS_E_FAILURE;
3739}
3740
3741/**
3742 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3743 * @param wmi_handle : handle to WMI.
3744 * @param param : pointer to hold phyerr disable param
3745 *
3746 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3747 */
3748QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3749{
3750 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3751
3752 if (wmi_handle->ops->send_phyerr_disable_cmd)
3753 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3754
3755 return QDF_STATUS_E_FAILURE;
3756}
3757
3758/**
3759 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3760 * @param wmi_handle : handle to WMI.
3761 * @param param : pointer to hold antenna param
3762 *
3763 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3764 */
3765QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3766 struct smart_ant_enable_params *param)
3767{
3768 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3769
3770 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3771 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3772 param);
3773
3774 return QDF_STATUS_E_FAILURE;
3775}
3776
3777/**
3778 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3779 * @param wmi_handle : handle to WMI.
3780 * @param param : pointer to hold antenna param
3781 *
3782 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3783 */
3784QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3785 struct smart_ant_rx_ant_params *param)
3786{
3787 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3788
3789 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3790 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3791
3792 return QDF_STATUS_E_FAILURE;
3793}
3794
3795/**
3796 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3797 * @param wmi_handle : handle to WMI.
3798 * @param param : pointer to hold antenna param
3799 *
3800 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3801 */
3802QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3803 uint8_t macaddr[IEEE80211_ADDR_LEN],
3804 struct smart_ant_tx_ant_params *param)
3805{
3806 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3807
3808 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3809 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3810 param);
3811
3812 return QDF_STATUS_E_FAILURE;
3813}
3814
3815/**
3816 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3817 * @param wmi_handle : handle to WMI.
3818 * @param param : pointer to hold antenna param
3819 *
3820 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3821 */
3822QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3823 uint8_t macaddr[IEEE80211_ADDR_LEN],
3824 struct smart_ant_training_info_params *param)
3825{
3826 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3827
3828 if (wmi->ops->send_smart_ant_set_training_info_cmd)
3829 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
3830 macaddr, param);
3831
3832 return QDF_STATUS_E_FAILURE;
3833}
3834
3835/**
3836 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
3837 * @param wmi_handle : handle to WMI.
3838 * @param macaddr : MAC address
3839 * @param param : pointer to hold node parameter
3840 *
3841 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3842 */
3843QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
3844 uint8_t macaddr[IEEE80211_ADDR_LEN],
3845 struct smart_ant_node_config_params *param)
3846{
3847 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3848
3849 if (wmi->ops->send_smart_ant_set_node_config_cmd)
3850 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
3851 macaddr, param);
3852
3853 return QDF_STATUS_E_FAILURE;
3854}
3855
3856/**
3857 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
3858 * @param wmi_handle : handle to WMI.
3859 * @param param : pointer to hold antenna param
3860 *
3861 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3862 */
3863QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
3864 struct smart_ant_enable_tx_feedback_params *param)
3865{
3866 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3867
3868 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
3869 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
3870 param);
3871
3872 return QDF_STATUS_E_FAILURE;
3873}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05303874qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303875
3876/**
3877 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
3878 * @param wmi_handle : handle to WMI.
3879 * @param param : pointer to hold spectral config param
3880 *
3881 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3882 */
3883QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
3884 struct vdev_spectral_configure_params *param)
3885{
3886 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3887
3888 if (wmi->ops->send_vdev_spectral_configure_cmd)
3889 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
3890
3891 return QDF_STATUS_E_FAILURE;
3892}
3893
3894/**
3895 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
3896 * @param wmi_handle : handle to WMI.
3897 * @param param : pointer to hold enable spectral param
3898 *
3899 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3900 */
3901QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
3902 struct vdev_spectral_enable_params *param)
3903{
3904 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3905
3906 if (wmi->ops->send_vdev_spectral_enable_cmd)
3907 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
3908
3909 return QDF_STATUS_E_FAILURE;
3910}
3911
3912/**
3913 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
3914 * @param wmi_handle : handle to WMI.
3915 * @param param : pointer to hold chan info param
3916 *
3917 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3918 */
3919QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
3920 struct bss_chan_info_request_params *param)
3921{
3922 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3923
3924 if (wmi->ops->send_bss_chan_info_request_cmd)
3925 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
3926
3927 return QDF_STATUS_E_FAILURE;
3928}
3929
3930/**
3931 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
3932 * @param wmi_handle : handle to WMI.
3933 * @param param : pointer to hold thermal mitigation param
3934 *
3935 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3936 */
3937QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
3938 struct thermal_mitigation_params *param)
3939{
3940 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3941
3942 if (wmi->ops->send_thermal_mitigation_param_cmd)
3943 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
3944
3945 return QDF_STATUS_E_FAILURE;
3946}
3947
3948/**
3949 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
3950 * @param wmi_handle : handle to WMI.
3951 * @param macaddr : MAC address
3952 * @param param : pointer to hold neighbour rx parameter
3953 *
3954 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3955 */
3956QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
3957 uint8_t macaddr[IEEE80211_ADDR_LEN],
3958 struct set_neighbour_rx_params *param)
3959{
3960 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3961
3962 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
3963 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
3964 macaddr, param);
3965
3966 return QDF_STATUS_E_FAILURE;
3967}
3968
3969/**
3970 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
3971 * @param wmi_handle : handle to WMI.
3972 * @param param : pointer to hold fwtest param
3973 *
3974 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3975 */
3976QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
3977 struct set_fwtest_params *param)
3978{
3979 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3980
3981 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
3982 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
3983
3984 return QDF_STATUS_E_FAILURE;
3985}
3986
Subrat Mishrad7c7a562017-09-27 14:41:20 +05303987#ifdef WLAN_SUPPORT_FILS
3988QDF_STATUS
3989wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, struct fd_params *param)
3990{
3991 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3992
3993 if (wmi_handle->ops->send_fils_discovery_send_cmd)
3994 return wmi_handle->ops->send_fils_discovery_send_cmd(wmi_handle,
3995 param);
3996
3997 return QDF_STATUS_E_FAILURE;
3998}
3999
4000QDF_STATUS
4001wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl,
4002 struct config_fils_params *param)
4003{
4004 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4005
4006 if (wmi->ops->send_vdev_fils_enable_cmd)
4007 return wmi->ops->send_vdev_fils_enable_cmd(wmi, param);
4008
4009 return QDF_STATUS_E_FAILURE;
4010}
4011
4012QDF_STATUS
4013wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf,
4014 uint32_t *vdev_id)
4015{
4016 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4017
4018 if (wmi_handle->ops->extract_swfda_vdev_id)
4019 return wmi_handle->ops->extract_swfda_vdev_id(wmi_handle,
4020 evt_buf, vdev_id);
4021
4022 return QDF_STATUS_E_FAILURE;
4023}
4024#endif /* WLAN_SUPPORT_FILS */
4025
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304026/**
4027 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4028 * @param wmi_handle : handle to WMI.
4029 * @param param : pointer to hold config ratemask param
4030 *
4031 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4032 */
4033QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4034 struct config_ratemask_params *param)
4035{
4036 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4037
4038 if (wmi->ops->send_vdev_config_ratemask_cmd)
4039 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4040
4041 return QDF_STATUS_E_FAILURE;
4042}
4043
4044/**
Sathish Kumar6011c742017-11-08 14:49:58 +05304045 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
4046 * size function
4047 * @param wmi_handle : handle to WMI
4048 * @param param : pointer to hold custom aggr size param
4049 *
4050 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4051 */
4052QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
4053 struct set_custom_aggr_size_params *param)
4054{
4055 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4056
4057 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
4058 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
4059
4060 return QDF_STATUS_E_FAILURE;
4061}
4062
4063/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05304064 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
4065 * @param wmi_handle : handle to WMI
4066 * @param param : pointer to hold qdepth threshold params
4067 *
4068 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4069 */
4070QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
4071 struct set_qdepth_thresh_params *param)
4072{
4073 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4074
4075 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
4076 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
4077
4078 return QDF_STATUS_E_FAILURE;
4079}
4080
4081/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304082 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4083 * @param wmi_handle : handle to WMI.
4084 * @param param : pointer to hold regdomain param
4085 *
4086 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4087 */
4088QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4089 struct pdev_set_regdomain_params *param)
4090{
4091 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4092
4093 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4094 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4095 param);
4096
4097 return QDF_STATUS_E_FAILURE;
4098}
4099
4100/**
4101 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4102 * @param wmi_handle : handle to WMI.
4103 * @param param : pointer to hold quiet mode param
4104 *
4105 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4106 */
4107QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4108 struct set_quiet_mode_params *param)
4109{
4110 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4111
4112 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4113 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4114 param);
4115
4116 return QDF_STATUS_E_FAILURE;
4117}
4118
4119/**
4120 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4121 * @param wmi_handle : handle to WMI.
4122 * @param param : pointer to hold beacon filter param
4123 *
4124 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4125 */
4126QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4127 struct set_beacon_filter_params *param)
4128{
4129 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4130
4131 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4132 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4133 param);
4134
4135 return QDF_STATUS_E_FAILURE;
4136}
4137
4138/**
4139 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4140 * @param wmi_handle : handle to WMI.
4141 * @param param : pointer to hold beacon filter param
4142 *
4143 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4144 */
4145QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4146 struct remove_beacon_filter_params *param)
4147{
4148 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4149
4150 if (wmi->ops->send_remove_beacon_filter_cmd)
4151 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4152
4153 return QDF_STATUS_E_FAILURE;
4154}
4155
4156/**
4157 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4158 * @param wmi_handle : handle to WMI.
4159 * @param macaddr : MAC address
4160 * @param param : pointer to hold mgmt parameter
4161 *
4162 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4163 */
4164#if 0
4165QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4166 uint8_t macaddr[IEEE80211_ADDR_LEN],
4167 struct mgmt_params *param)
4168{
4169 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4170
4171 if (wmi_handle->ops->send_mgmt_cmd)
4172 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4173 macaddr, param);
4174
4175 return QDF_STATUS_E_FAILURE;
4176}
4177#endif
4178
4179/**
4180 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4181 * @param wmi_handle : handle to WMI.
4182 * @param macaddr : MAC address
4183 * @param param : pointer to hold addba resp parameter
4184 *
4185 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4186 */
4187QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4188 uint8_t macaddr[IEEE80211_ADDR_LEN],
4189 struct addba_clearresponse_params *param)
4190{
4191 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4192
4193 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4194 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4195 macaddr, param);
4196
4197 return QDF_STATUS_E_FAILURE;
4198}
4199
4200/**
4201 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4202 * @param wmi_handle : handle to WMI.
4203 * @param macaddr : MAC address
4204 * @param param : pointer to hold addba parameter
4205 *
4206 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4207 */
4208QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4209 uint8_t macaddr[IEEE80211_ADDR_LEN],
4210 struct addba_send_params *param)
4211{
4212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4213
4214 if (wmi_handle->ops->send_addba_send_cmd)
4215 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4216 macaddr, param);
4217
4218 return QDF_STATUS_E_FAILURE;
4219}
4220
4221/**
4222 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4223 * @param wmi_handle : handle to WMI.
4224 * @param macaddr : MAC address
4225 * @param param : pointer to hold delba parameter
4226 *
4227 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4228 */
4229QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4230 uint8_t macaddr[IEEE80211_ADDR_LEN],
4231 struct delba_send_params *param)
4232{
4233 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4234
4235 if (wmi_handle->ops->send_delba_send_cmd)
4236 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4237 macaddr, param);
4238
4239 return QDF_STATUS_E_FAILURE;
4240}
4241
4242/**
4243 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4244 * @param wmi_handle : handle to WMI.
4245 * @param macaddr : MAC address
4246 * @param param : pointer to hold addba set resp parameter
4247 *
4248 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4249 */
4250QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4251 uint8_t macaddr[IEEE80211_ADDR_LEN],
4252 struct addba_setresponse_params *param)
4253{
4254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4255
4256 if (wmi_handle->ops->send_addba_setresponse_cmd)
4257 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4258 macaddr, param);
4259
4260 return QDF_STATUS_E_FAILURE;
4261}
4262
4263/**
4264 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4265 * @param wmi_handle : handle to WMI.
4266 * @param macaddr : MAC address
4267 * @param param : pointer to hold singleamsdu parameter
4268 *
4269 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4270 */
4271QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4272 uint8_t macaddr[IEEE80211_ADDR_LEN],
4273 struct singleamsdu_params *param)
4274{
4275 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4276
4277 if (wmi_handle->ops->send_singleamsdu_cmd)
4278 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4279 macaddr, param);
4280
4281 return QDF_STATUS_E_FAILURE;
4282}
4283
4284/**
4285 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4286 * @param wmi_handle : handle to WMI.
4287 * @param macaddr : MAC address
4288 * @param param : pointer to hold set_qboost parameter
4289 *
4290 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4291 */
4292QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4293 uint8_t macaddr[IEEE80211_ADDR_LEN],
4294 struct set_qboost_params *param)
4295{
4296 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4297
4298 if (wmi_handle->ops->send_set_qboost_param_cmd)
4299 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4300 macaddr, param);
4301
4302 return QDF_STATUS_E_FAILURE;
4303}
4304
4305/**
4306 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4307 * @param wmi_handle : handle to WMI.
4308 * @param param : pointer to hold mu scan param
4309 *
4310 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4311 */
4312QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4313 struct mu_scan_params *param)
4314{
4315 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4316
4317 if (wmi_handle->ops->send_mu_scan_cmd)
4318 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4319
4320 return QDF_STATUS_E_FAILURE;
4321}
4322
4323/**
4324 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4325 * @param wmi_handle : handle to WMI.
4326 * @param param : pointer to hold mu scan param
4327 *
4328 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4329 */
4330QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4331 struct lteu_config_params *param)
4332{
4333 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4334
4335 if (wmi_handle->ops->send_lteu_config_cmd)
4336 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4337
4338 return QDF_STATUS_E_FAILURE;
4339}
4340
4341/**
4342 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4343 * @param wmi_handle : handle to WMI.
4344 * @param param : pointer to hold mu scan param
4345 *
4346 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4347 */
4348QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4349 struct set_ps_mode_params *param)
4350{
4351 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4352
4353 if (wmi_handle->ops->send_set_ps_mode_cmd)
4354 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4355
4356 return QDF_STATUS_E_FAILURE;
4357}
4358
4359/**
4360 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4361 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05304362 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304363 *
4364 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4365 */
4366QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05304367 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304368{
4369 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4370
4371 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05304372 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304373
4374 return QDF_STATUS_E_FAILURE;
4375}
4376
4377/**
4378 * wmi_save_service_bitmap() - save service bitmap
4379 * @wmi_handle: wmi handle
4380 * @param evt_buf: pointer to event buffer
4381 *
4382 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4383 */
Rajeev Kumar77901472017-02-12 02:12:17 -08004384QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
4385 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304386{
4387 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4388
4389 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304390 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08004391 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304392 }
4393 return QDF_STATUS_E_FAILURE;
4394}
4395
4396/**
4397 * wmi_save_ext_service_bitmap() - save extended service bitmap
4398 * @wmi_handle: wmi handle
4399 * @param evt_buf: pointer to event buffer
4400 *
4401 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4402 */
4403QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
4404 void *bitmap_buf)
4405{
4406 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4407
4408 if (wmi_handle->ops->save_ext_service_bitmap) {
4409 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
4410 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304411 }
4412 return QDF_STATUS_E_FAILURE;
4413}
4414
4415/**
4416 * wmi_save_fw_version() - Save fw version
4417 * @wmi_handle: wmi handle
4418 * @param evt_buf: pointer to event buffer
4419 *
4420 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4421 */
4422QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4423{
4424 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4425
4426 if (wmi_handle->ops->save_fw_version) {
4427 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4428 return 0;
4429 }
4430 return QDF_STATUS_E_FAILURE;
4431
4432}
4433
4434/**
4435 * wmi_check_and_update_fw_version() - Ready and fw version check
4436 * @wmi_handle: wmi handle
4437 * @param evt_buf: pointer to event buffer
4438 *
4439 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4440 */
4441QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4442{
4443 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4444
4445 if (wmi_handle->ops->check_and_update_fw_version)
4446 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4447 evt_buf);
4448
4449 return QDF_STATUS_E_FAILURE;
4450
4451}
4452
4453/**
4454 * wmi_service_enabled() - Check if service enabled
4455 * @param wmi_handle: wmi handle
4456 * @param service_id: service identifier
4457 *
4458 * Return: 1 enabled, 0 disabled
4459 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304460bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4461{
4462 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4463
4464 if ((service_id < wmi_services_max) &&
4465 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4466 if (wmi_handle->ops->is_service_enabled) {
4467 return wmi_handle->ops->is_service_enabled(wmi_handle,
4468 wmi_handle->services[service_id]);
4469 }
4470 } else {
Sathish Kumar686d08d2018-06-26 11:01:11 +05304471 WMI_LOGI("Service %d not supported", service_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304472 }
Sourav Mohapatraa7b454d2017-12-03 11:44:44 +05304473
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304474 return false;
4475}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304476
4477/**
4478 * wmi_get_target_cap_from_service_ready() - extract service ready event
4479 * @wmi_handle: wmi handle
4480 * @param evt_buf: pointer to received event buffer
4481 * @param ev: pointer to hold target capability information extracted from even
4482 *
4483 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4484 */
4485QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004486 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304487{
4488 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4489
4490 if (wmi->ops->get_target_cap_from_service_ready)
4491 return wmi->ops->get_target_cap_from_service_ready(wmi,
4492 evt_buf, ev);
4493
4494 return QDF_STATUS_E_FAILURE;
4495}
4496
4497/**
4498 * wmi_extract_fw_version() - extract fw version
4499 * @wmi_handle: wmi handle
4500 * @param evt_buf: pointer to event buffer
4501 * @param fw_ver: Pointer to hold fw version
4502 *
4503 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4504 */
4505QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4506 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4507{
4508 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4509
4510 if (wmi_handle->ops->extract_fw_version)
4511 return wmi_handle->ops->extract_fw_version(wmi_handle,
4512 evt_buf, fw_ver);
4513
4514 return QDF_STATUS_E_FAILURE;
4515}
4516
4517/**
4518 * wmi_extract_fw_abi_version() - extract fw abi version
4519 * @wmi_handle: wmi handle
4520 * @param evt_buf: Pointer to event buffer
4521 * @param fw_ver: Pointer to hold fw abi version
4522 *
4523 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4524 */
4525QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4526 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4527{
4528 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4529
4530 if (wmi_handle->ops->extract_fw_abi_version)
4531 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4532 evt_buf, fw_ver);
4533
4534 return QDF_STATUS_E_FAILURE;
4535}
4536
4537/**
4538 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4539 * @wmi_handle: wmi handle
4540 * @param evt_buf: Pointer to event buffer
4541 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4542 *
4543 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4544 */
4545QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004546 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304547{
4548 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4549
4550 if (wmi_handle->ops->extract_hal_reg_cap)
4551 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4552 evt_buf, hal_reg_cap);
4553
4554 return QDF_STATUS_E_FAILURE;
4555}
4556
4557/**
4558 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4559 * request event
4560 * @wmi_handle: wmi handle
4561 * @param evt_buf: pointer to event buffer
4562 * @param num_entries: pointer to hold number of entries requested
4563 *
4564 * Return: Number of entries requested
4565 */
4566host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4567 void *evt_buf, uint8_t *num_entries)
4568{
4569 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4570
4571 if (wmi_handle->ops->extract_host_mem_req)
4572 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4573 evt_buf, num_entries);
4574
4575 *num_entries = 0;
4576 return NULL;
4577}
4578
4579/**
4580 * wmi_ready_extract_init_status() - Extract init status from ready event
4581 * @wmi_handle: wmi handle
4582 * @param ev: Pointer to event buffer
4583 *
4584 * Return: ready status
4585 */
4586uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4587{
4588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4589
4590 if (wmi_handle->ops->ready_extract_init_status)
4591 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4592 ev);
4593
4594
4595 return 1;
4596
4597}
4598
4599/**
4600 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4601 * @wmi_handle: wmi handle
4602 * @param ev: pointer to event buffer
4603 * @param macaddr: Pointer to hold MAC address
4604 *
4605 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4606 */
4607QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4608{
4609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4610
4611 if (wmi_handle->ops->ready_extract_mac_addr)
4612 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4613 ev, macaddr);
4614
4615
4616 return QDF_STATUS_E_FAILURE;
4617}
4618
4619/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07004620 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
4621 * @wmi_handle: wmi handle
4622 * @param ev: pointer to event buffer
4623 * @param num_mac_addr: Pointer to number of entries
4624 *
4625 * Return: address to start of mac addr list
4626 */
4627wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
4628 uint8_t *num_mac_addr)
4629{
4630 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4631
4632 if (wmi_handle->ops->ready_extract_mac_addr_list)
4633 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
4634 ev, num_mac_addr);
4635
4636 *num_mac_addr = 0;
4637
4638 return NULL;
4639}
4640
4641/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05304642 * wmi_extract_ready_params() - Extract data from ready event apart from
4643 * status, macaddr and version.
4644 * @wmi_handle: Pointer to WMI handle.
4645 * @evt_buf: Pointer to Ready event buffer.
4646 * @ev_param: Pointer to host defined struct to copy the data from event.
4647 *
4648 * Return: QDF_STATUS_SUCCESS on success.
4649 */
4650QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
4651 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
4652{
4653 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4654
4655 if (wmi_handle->ops->extract_ready_event_params)
4656 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
4657 evt_buf, ev_param);
4658
4659 return QDF_STATUS_E_FAILURE;
4660}
4661
4662/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304663 * wmi_extract_dbglog_data_len() - extract debuglog data length
4664 * @wmi_handle: wmi handle
4665 * @param evt_buf: pointer to event buffer
4666 * @param len: length of buffer
4667 *
4668 * Return: length
4669 */
4670uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004671 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304672{
4673 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4674
4675 if (wmi_handle->ops->extract_dbglog_data_len)
4676 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4677 evt_buf, len);
4678
4679
4680 return NULL;
4681}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304682qdf_export_symbol(wmi_extract_dbglog_data_len);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304683
4684/**
4685 * wmi_send_ext_resource_config() - send extended resource configuration
4686 * @wmi_handle: wmi handle
4687 * @param ext_cfg: pointer to extended resource configuration
4688 *
4689 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4690 */
4691QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4692 wmi_host_ext_resource_config *ext_cfg)
4693{
4694 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4695
4696 if (wmi_handle->ops->send_ext_resource_config)
4697 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4698 ext_cfg);
4699
4700 return QDF_STATUS_E_FAILURE;
4701}
4702
4703/**
4704 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4705 * @param wmi_handle : handle to WMI.
nobeljf74583b2018-01-25 16:35:36 -08004706 * @mac_id: mac_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304707 *
4708 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4709 */
nobeljf74583b2018-01-25 16:35:36 -08004710QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
4711 uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304712{
4713 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4714
4715 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
nobeljf74583b2018-01-25 16:35:36 -08004716 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304717
4718 return QDF_STATUS_E_FAILURE;
4719}
4720
4721/**
4722 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4723 * @param wmi_handle : handle to WMI.
4724 * @param param : pointer to hold packet power info param
4725 *
4726 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4727 */
4728QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4729 struct packet_power_info_params *param)
4730{
4731 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4732
4733 if (wmi->ops->send_packet_power_info_get_cmd)
4734 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4735
4736 return QDF_STATUS_E_FAILURE;
4737}
4738
4739/**
4740 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4741 * @param wmi_handle : handle to WMI.
4742 * @param param : pointer to hold gpio config param
4743 *
4744 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4745 */
4746QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4747 struct gpio_config_params *param)
4748{
4749 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4750
4751 if (wmi_handle->ops->send_gpio_config_cmd)
4752 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4753
4754 return QDF_STATUS_E_FAILURE;
4755}
4756
4757/**
4758 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4759 * @param wmi_handle : handle to WMI.
4760 * @param param : pointer to hold gpio config param
4761 *
4762 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4763 */
4764QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4765 struct gpio_output_params *param)
4766{
4767 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4768
4769 if (wmi_handle->ops->send_gpio_output_cmd)
4770 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4771
4772 return QDF_STATUS_E_FAILURE;
4773}
4774
4775/**
4776 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4777 * @param wmi_handle : handle to WMI.
4778 * @param param : pointer to hold rtt meas req test param
4779 *
4780 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4781 */
4782QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4783 struct rtt_meas_req_test_params *param)
4784{
4785 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4786
4787 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4788 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4789 param);
4790
4791 return QDF_STATUS_E_FAILURE;
4792}
4793
4794/**
4795 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4796 * @param wmi_handle : handle to WMI.
4797 * @param param : pointer to hold rtt meas req param
4798 *
4799 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4800 */
4801QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4802 struct rtt_meas_req_params *param)
4803{
4804 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4805
4806 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4807 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4808 param);
4809
4810 return QDF_STATUS_E_FAILURE;
4811}
4812
4813/**
4814 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4815 * @param wmi_handle : handle to WMI.
4816 * @param param : pointer to hold lci param
4817 *
4818 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4819 */
4820QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4821 struct lci_set_params *param)
4822{
4823 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4824
4825 if (wmi_handle->ops->send_lci_set_cmd)
4826 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4827
4828 return QDF_STATUS_E_FAILURE;
4829}
4830
4831/**
4832 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4833 * @param wmi_handle : handle to WMI.
4834 * @param param : pointer to hold lcr param
4835 *
4836 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4837 */
4838QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4839 struct lcr_set_params *param)
4840{
4841 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4842
4843 if (wmi_handle->ops->send_lcr_set_cmd)
4844 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4845
4846 return QDF_STATUS_E_FAILURE;
4847}
4848
4849/**
4850 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4851 * @param wmi_handle : handle to WMI.
4852 * @param param : pointer to hold rtt meas req test param
4853 *
4854 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4855 */
4856QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4857 struct rtt_keepalive_req_params *param)
4858{
4859 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4860
4861 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4862 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4863 param);
4864
4865 return QDF_STATUS_E_FAILURE;
4866}
4867
4868/**
4869 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4870 * to fw
4871 * @wmi_handle: wmi handle
4872 * @param: pointer to hold periodic chan stats param
4873 *
4874 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4875 */
4876QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4877 struct periodic_chan_stats_params *param)
4878{
4879 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4880
4881 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4882 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4883 param);
4884
4885 return QDF_STATUS_E_FAILURE;
4886}
4887
Jeffin Mammen095050b2018-07-24 14:20:08 +05304888#ifdef WLAN_ATF_ENABLE
4889/**
4890 * wmi_unified_set_atf_cmd_send() - WMI set atf function
4891 * @param wmi_handle : handle to WMI.
4892 * @param param : pointer to set atf param
4893 *
4894 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4895 */
4896QDF_STATUS
4897wmi_unified_set_atf_cmd_send(void *wmi_hdl,
4898 struct set_atf_params *param)
4899{
4900 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4901
4902 if (wmi_handle->ops->send_set_atf_cmd)
4903 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
4904
4905 return QDF_STATUS_E_FAILURE;
4906}
4907
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304908/**
4909 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4910 * @wmi_handle: wmi handle
4911 * @param: pointer to atf peer request param
4912 *
4913 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4914 */
4915QDF_STATUS
4916wmi_send_atf_peer_request_cmd(void *wmi_hdl,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304917 struct atf_peer_request_params *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304918{
Jeffin Mammen095050b2018-07-24 14:20:08 +05304919 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304920
4921 if (wmi_handle->ops->send_atf_peer_request_cmd)
4922 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304923 param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304924
4925 return QDF_STATUS_E_FAILURE;
4926}
4927
4928/**
4929 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
4930 * @wmi_handle: wmi handle
4931 * @param: pointer to set atf grouping param
4932 *
4933 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4934 */
4935QDF_STATUS
4936wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304937 struct atf_grouping_params *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304938{
Jeffin Mammen095050b2018-07-24 14:20:08 +05304939 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304940
4941 if (wmi_handle->ops->send_set_atf_grouping_cmd)
4942 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304943 param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304944
4945 return QDF_STATUS_E_FAILURE;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304946}
4947
Sathish Kumar68789382016-11-14 17:44:29 +05304948/**
Jeffin Mammen095050b2018-07-24 14:20:08 +05304949 * wmi_send_set_atf_group_ac_cmd() - send set atf AC command to fw
4950 * @wmi_handle: wmi handle
4951 * @param: pointer to set atf AC group param
4952 *
4953 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4954 */
4955QDF_STATUS
4956wmi_send_set_atf_group_ac_cmd(void *wmi_hdl,
4957 struct atf_group_ac_params *param)
4958{
4959 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4960
4961 if (wmi_handle->ops->send_set_atf_group_ac_cmd)
4962 return wmi_handle->ops->send_set_atf_group_ac_cmd(wmi_handle,
4963 param);
4964
4965 return QDF_STATUS_E_FAILURE;
4966}
4967
4968/**
4969 * wmi_extract_atf_peer_stats_ev() - extract atf peer stats
4970 * from event
4971 * @wmi_handle: wmi handle
4972 * @param evt_buf: pointer to event buffer
4973 * @param ev: Pointer to hold atf peer stats
4974 *
4975 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4976 */
4977QDF_STATUS
4978wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
4979 wmi_host_atf_peer_stats_event *ev)
4980{
4981 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4982
4983 if (wmi->ops->extract_atf_peer_stats_ev)
4984 return wmi->ops->extract_atf_peer_stats_ev(wmi, evt_buf, ev);
4985
4986 return QDF_STATUS_E_FAILURE;
4987}
4988
4989/**
4990 * wmi_extract_atf_token_info_ev() - extract atf token info
4991 * from event
4992 * @wmi_handle: wmi handle
4993 * @param evt_buf: pointer to event buffer
4994 * @param idx: Index indicating the peer number
4995 * @param ev: Pointer to hold atf token info
4996 *
4997 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4998 */
4999QDF_STATUS
5000wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, uint8_t idx,
5001 wmi_host_atf_peer_stats_info *ev)
5002{
5003 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
5004
5005 if (wmi->ops->extract_atf_token_info_ev)
5006 return wmi->ops->extract_atf_token_info_ev(wmi, evt_buf,
5007 idx, ev);
5008
5009 return QDF_STATUS_E_FAILURE;
5010}
5011#endif /* WLAN_ATF_ENABLE */
5012
5013/**
Sathish Kumar68789382016-11-14 17:44:29 +05305014 * wmi_send_get_user_position_cmd() - send get user position command to fw
5015 * @wmi_handle: wmi handle
5016 *
5017 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5018 */
5019QDF_STATUS
5020wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
5021{
5022 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5023
5024 if (wmi_handle->ops->send_get_user_position_cmd)
5025 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
5026 value);
5027
5028 return QDF_STATUS_E_FAILURE;
5029}
5030
5031/**
5032 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
5033 * command to fw
5034 * @wmi_handle: wmi handle
5035 * @value: user pos value
5036 *
5037 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5038 */
5039QDF_STATUS
5040wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5041{
5042 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5043
5044 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
5045 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
5046
5047 return QDF_STATUS_E_FAILURE;
5048}
5049
5050/**
5051 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
5052 * tx count to fw
5053 * @wmi_handle: wmi handle
5054 * @value: reset tx count value
5055 *
5056 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5057 */
5058QDF_STATUS
5059wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5060{
5061 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5062
5063 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
5064 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
5065 value);
5066
5067 return QDF_STATUS_E_FAILURE;
5068}
5069
5070/**
5071 * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo
5072 * tx count to fw
5073 * @wmi_handle: wmi handle
5074 * @value: value
5075 *
5076 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5077 */
5078QDF_STATUS
5079wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value)
5080{
5081 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5082
5083 if (wmi->ops->send_pdev_caldata_version_check_cmd)
5084 return wmi->ops->send_pdev_caldata_version_check_cmd(wmi,
5085 value);
5086
5087 return QDF_STATUS_E_FAILURE;
5088}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305089
5090/* Extract - APIs */
5091/**
5092 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
5093 *
5094 * @param wmi_handle : handle to WMI.
5095 * @param evt_buf : pointer to event buffer
5096 * @param len : length of the event buffer
5097 * @param wds_ev: pointer to strct to extract
5098 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5099 */
5100QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
5101 uint16_t len, wds_addr_event_t *wds_ev)
5102{
5103 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5104
5105 if (wmi_handle->ops->extract_wds_addr_event) {
5106 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
5107 evt_buf, len, wds_ev);
5108 }
5109 return QDF_STATUS_E_FAILURE;
5110}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05305111qdf_export_symbol(wmi_extract_wds_addr_event);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305112
5113/**
5114 * wmi_extract_dcs_interference_type() - extract dcs interference type
5115 * @wmi_handle: wmi handle
5116 * @param evt_buf: pointer to event buffer
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305117 * @param param: Pointer to hold dcs interference param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305118 *
5119 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5120 */
5121QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305122 void *evt_buf, struct wmi_host_dcs_interference_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305123{
5124 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5125
5126 if (wmi->ops->extract_dcs_interference_type) {
5127 return wmi->ops->extract_dcs_interference_type(wmi,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305128 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305129 }
5130 return QDF_STATUS_E_FAILURE;
5131}
5132
5133/*
5134 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5135 * @wmi_handle: wmi handle
5136 * @param evt_buf: pointer to event buffer
5137 * @param cw_int: Pointer to hold cw interference
5138 *
5139 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5140 */
5141QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5142 wmi_host_ath_dcs_cw_int *cw_int)
5143{
5144 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5145
5146 if (wmi_handle->ops->extract_dcs_cw_int) {
5147 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5148 evt_buf, cw_int);
5149 }
5150 return QDF_STATUS_E_FAILURE;
5151}
5152
5153/**
5154 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5155 * @wmi_handle: wmi handle
5156 * @param evt_buf: pointer to event buffer
5157 * @param wlan_stat: Pointer to hold wlan stats
5158 *
5159 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5160 */
5161QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5162 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5163{
5164 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5165
5166 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5167 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5168 evt_buf, wlan_stat);
5169 }
5170 return QDF_STATUS_E_FAILURE;
5171}
5172
5173/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305174 * wmi_extract_fips_event_data() - extract fips event data
5175 * @wmi_handle: wmi handle
5176 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305177 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305178 *
5179 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5180 */
5181QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305182 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305183{
5184 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5185
5186 if (wmi_handle->ops->extract_fips_event_data) {
5187 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305188 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305189 }
5190 return QDF_STATUS_E_FAILURE;
5191}
5192
5193/**
5194 * wmi_extract_vdev_start_resp() - extract vdev start response
5195 * @wmi_handle: wmi handle
5196 * @param evt_buf: pointer to event buffer
5197 * @param vdev_rsp: Pointer to hold vdev response
5198 *
5199 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5200 */
5201QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5202 wmi_host_vdev_start_resp *vdev_rsp)
5203{
5204 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5205
5206 if (wmi_handle->ops->extract_vdev_start_resp)
5207 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5208 evt_buf, vdev_rsp);
5209
5210 return QDF_STATUS_E_FAILURE;
5211}
5212
5213/**
Om Prakash Tripathif3ef42d2017-11-24 16:53:07 +05305214 * wmi_extract_vdev_delete_resp() - extract vdev delete response
5215 * @wmi_handle: wmi handle
5216 * @param evt_buf: pointer to event buffer
5217 * @param delete_rsp: Pointer to hold vdev delete response
5218 *
5219 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5220 */
5221QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
5222 struct wmi_host_vdev_delete_resp *delete_rsp)
5223{
5224 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5225
5226 if (wmi_handle->ops->extract_vdev_delete_resp)
5227 return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle,
5228 evt_buf, delete_rsp);
5229
5230 return QDF_STATUS_E_FAILURE;
5231}
5232
5233
5234/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305235 * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev
5236 * @wmi_handle: wmi handle
5237 * @param evt_buf: pointer to event buffer
5238 * @param vdev_map: Pointer to hold num vdev
5239 *
5240 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5241 */
5242QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5243 uint32_t *num_vdevs)
5244{
5245 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5246
5247 if (wmi->ops->extract_tbttoffset_num_vdevs)
5248 return wmi->ops->extract_tbttoffset_num_vdevs(wmi,
5249 evt_buf, num_vdevs);
5250
5251 return QDF_STATUS_E_FAILURE;
5252}
5253
5254/**
5255 * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev
5256 * @wmi_handle: wmi handle
5257 * @param evt_buf: pointer to event buffer
5258 * @param vdev_map: Pointer to hold num vdev
5259 *
5260 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5261 */
5262QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5263 uint32_t *num_vdevs)
5264{
5265 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5266
5267 if (wmi->ops->extract_ext_tbttoffset_num_vdevs)
5268 return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi,
5269 evt_buf, num_vdevs);
5270
5271 return QDF_STATUS_E_FAILURE;
5272}
5273
5274/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305275 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5276 * @wmi_handle: wmi handle
5277 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005278 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305279 * @param tbtt_param: Pointer to tbttoffset event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305280 *
5281 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5282 */
5283QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305284 uint8_t idx, struct tbttoffset_params *tbtt_param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305285{
5286 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5287
5288 if (wmi->ops->extract_tbttoffset_update_params)
5289 return wmi->ops->extract_tbttoffset_update_params(wmi,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305290 evt_buf, idx, tbtt_param);
5291
5292 return QDF_STATUS_E_FAILURE;
5293}
5294
5295/**
5296 * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param
5297 * @wmi_handle: wmi handle
5298 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005299 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305300 * @param tbtt_param: Pointer to tbttoffset event param
5301 *
5302 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5303 */
5304QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
5305 void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param)
5306{
5307 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5308
5309 if (wmi->ops->extract_ext_tbttoffset_update_params)
5310 return wmi->ops->extract_ext_tbttoffset_update_params(wmi,
5311 evt_buf, idx, tbtt_param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305312
5313 return QDF_STATUS_E_FAILURE;
5314}
5315
5316/**
5317 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5318 * @wmi_handle: wmi handle
5319 * @param evt_buf: pointer to event buffer
5320 * @param hdr: Pointer to hold header
5321 * @param bufp: Pointer to hold pointer to rx param buffer
5322 *
5323 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5324 */
5325QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05305326 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305327{
5328 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5329
5330 if (wmi_handle->ops->extract_mgmt_rx_params)
5331 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5332 evt_buf, hdr, bufp);
5333
5334 return QDF_STATUS_E_FAILURE;
5335}
5336
5337/**
5338 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5339 * @wmi_handle: wmi handle
5340 * @param evt_buf: pointer to event buffer
5341 * @param vdev_id: Pointer to hold vdev identifier
5342 *
5343 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5344 */
5345QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5346 uint32_t *vdev_id)
5347{
5348 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5349
5350 if (wmi_handle->ops->extract_vdev_stopped_param)
5351 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5352 evt_buf, vdev_id);
5353
5354 return QDF_STATUS_E_FAILURE;
5355}
5356
5357/**
5358 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5359 * @wmi_handle: wmi handle
5360 * @param evt_buf: pointer to event buffer
5361 * @param param: Pointer to hold roam param
5362 *
5363 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5364 */
5365QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5366 wmi_host_roam_event *param)
5367{
5368 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5369
5370 if (wmi_handle->ops->extract_vdev_roam_param)
5371 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5372 evt_buf, param);
5373
5374 return QDF_STATUS_E_FAILURE;
5375}
5376
5377/**
5378 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5379 * @wmi_handle: wmi handle
5380 * @param evt_buf: pointer to event buffer
5381 * @param param: Pointer to hold vdev scan param
5382 *
5383 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5384 */
5385QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05305386 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305387{
5388 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5389
5390 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5391 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5392 evt_buf, param);
5393
5394 return QDF_STATUS_E_FAILURE;
5395}
5396
Frank Liu3d5e9992017-03-15 17:51:43 +08005397#ifdef CONVERGED_TDLS_ENABLE
5398QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
5399 struct tdls_event_info *param)
5400{
5401 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5402
5403 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
5404 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
5405 evt_buf, param);
5406
5407 return QDF_STATUS_E_FAILURE;
5408}
5409#endif
5410
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305411/**
5412 * wmi_extract_mu_ev_param() - extract mu param from event
5413 * @wmi_handle: wmi handle
5414 * @param evt_buf: pointer to event buffer
5415 * @param param: Pointer to hold mu report
5416 *
5417 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5418 */
5419QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5420 wmi_host_mu_report_event *param)
5421{
5422 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5423
5424 if (wmi_handle->ops->extract_mu_ev_param)
5425 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5426 param);
5427
5428 return QDF_STATUS_E_FAILURE;
5429}
5430
5431/**
Sathish Kumar68789382016-11-14 17:44:29 +05305432 * wmi_extract_mu_db_entry() - extract mu db entry from event
5433 * @wmi_handle: wmi handle
5434 * @param evt_buf: pointer to event buffer
5435 * @param param: Pointer to hold mu db entry
5436 *
5437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5438 */
5439QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
5440 uint8_t idx, wmi_host_mu_db_entry *param)
5441{
5442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5443
5444 if (wmi_handle->ops->extract_mu_db_entry)
5445 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
5446 idx, param);
5447
5448 return QDF_STATUS_E_FAILURE;
5449}
5450
5451/**
5452 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
5453 * @wmi_handle: wmi handle
5454 * @param evt_buf: pointer to event buffer
5455 * @param param: Pointer to hold mumimo tx count
5456 *
5457 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5458 */
5459QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
5460 wmi_host_peer_txmu_cnt_event *param)
5461{
5462 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5463
5464 if (wmi->ops->extract_mumimo_tx_count_ev_param)
5465 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
5466 evt_buf, param);
5467
5468 return QDF_STATUS_E_FAILURE;
5469}
5470
5471/**
5472 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
5473 * from event
5474 * @wmi_handle: wmi handle
5475 * @param evt_buf: pointer to event buffer
5476 * @param param: Pointer to hold peer gid userposition list
5477 *
5478 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5479 */
5480QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
5481 void *evt_buf,
5482 wmi_host_peer_gid_userpos_list_event *param)
5483{
5484 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5485
5486 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
5487 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
5488 evt_buf, param);
5489
5490 return QDF_STATUS_E_FAILURE;
5491}
5492
5493/**
Anirban Sirkhell23467ce2017-08-25 16:01:50 +05305494 * wmi_extract_esp_estimate_ev_param() - extract air time from event
5495 * @wmi_handle: wmi handle
5496 * @evt_buf: pointer to event buffer
5497 * @param: Pointer to hold esp event
5498 *
5499 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5500 */
5501QDF_STATUS
5502wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
5503 struct esp_estimation_event *param)
5504{
5505 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5506
5507 if (wmi_handle->ops->extract_esp_estimation_ev_param)
5508 return wmi_handle->ops->extract_esp_estimation_ev_param(
5509 wmi_handle, evt_buf, param);
5510
5511 return QDF_STATUS_E_FAILURE;
5512}
5513
5514/**
Sathish Kumar68789382016-11-14 17:44:29 +05305515 * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
5516 * from event
5517 * @wmi_handle: wmi handle
5518 * @param evt_buf: pointer to event buffer
5519 * @param param: Pointer to hold caldata version data
5520 *
5521 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5522 */
5523QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
5524 void *evt_buf,
5525 wmi_host_pdev_check_cal_version_event *param)
5526{
5527 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5528
5529 if (wmi->ops->extract_pdev_caldata_version_check_ev_param)
5530 return wmi->ops->extract_pdev_caldata_version_check_ev_param(
5531 wmi, evt_buf, param);
5532
5533 return QDF_STATUS_E_FAILURE;
5534}
5535
5536/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305537 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5538 * param from event
5539 * @wmi_handle: wmi handle
5540 * @param evt_buf: pointer to event buffer
5541 * @param param: Pointer to hold tpc configuration
5542 *
5543 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5544 */
5545QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5546 wmi_host_pdev_tpc_config_event *param)
5547{
5548 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5549
5550 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5551 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5552 evt_buf, param);
5553
5554 return QDF_STATUS_E_FAILURE;
5555
5556}
5557
5558/**
5559 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5560 * @wmi_handle: wmi handle
5561 * @param evt_buf: pointer to event buffer
5562 * @param gpio_num: Pointer to hold gpio number
5563 *
5564 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5565 */
5566QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5567 void *evt_buf, uint32_t *gpio_num)
5568{
5569 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5570
5571 if (wmi_handle->ops->extract_gpio_input_ev_param)
5572 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5573 evt_buf, gpio_num);
5574
5575 return QDF_STATUS_E_FAILURE;
5576}
5577
5578/**
5579 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5580 * param from event
5581 * @wmi_handle: wmi handle
5582 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305583 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305584 *
5585 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5586 */
5587QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305588 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305589{
5590 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5591
5592 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5593 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305594 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305595
5596 return QDF_STATUS_E_FAILURE;
5597}
5598
5599/**
5600 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5601 * power param from event
5602 * @wmi_handle: wmi handle
5603 * @param evt_buf: pointer to event buffer
5604 * @param param: Pointer to hold nf cal power param
5605 *
5606 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5607 */
5608QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5609 wmi_host_pdev_nfcal_power_all_channels_event *param)
5610{
5611 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5612
5613 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5614 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5615 evt_buf, param);
5616
5617 return QDF_STATUS_E_FAILURE;
5618
5619}
5620
5621/**
5622 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5623 * @wmi_handle: wmi handle
5624 * @param evt_buf: pointer to event buffer
5625 * @param param: Pointer to hold tpc param
5626 *
5627 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5628 */
5629QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5630 wmi_host_pdev_tpc_event *param)
5631{
5632 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5633
5634 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5635 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5636 evt_buf, param);
5637
5638 return QDF_STATUS_E_FAILURE;
5639
5640}
5641
5642/**
5643 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5644 * from event
5645 * @wmi_handle: wmi handle
5646 * @param evt_buf: pointer to event buffer
5647 * @param param: Pointer to generic buffer param
5648 *
5649 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5650 */
5651QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5652 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5653{
5654 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5655
5656 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5657 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5658 evt_buf, param);
5659
5660 return QDF_STATUS_E_FAILURE;
5661
5662}
5663
5664/**
5665 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5666 * from event
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305667 * @wmi_hdl: wmi handle
5668 * @evt_buf: pointer to event buffer
5669 * @param: Pointer to mgmt tx completion param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305670 *
5671 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5672 */
5673QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5674 wmi_host_mgmt_tx_compl_event *param)
5675{
5676 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5677
5678 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5679 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5680 evt_buf, param);
5681
5682
5683 return QDF_STATUS_E_FAILURE;
5684}
5685
5686/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305687 * wmi_extract_offchan_data_tx_compl_param() -
5688 * extract offchan data tx completion param from event
5689 * @wmi_hdl: wmi handle
5690 * @evt_buf: pointer to event buffer
5691 * @param: Pointer to offchan data tx completion param
5692 *
5693 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5694 */
5695QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
5696 struct wmi_host_offchan_data_tx_compl_event *param)
5697{
5698 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5699
5700 if (wmi_handle->ops->extract_offchan_data_tx_compl_param)
5701 return wmi_handle->ops->extract_offchan_data_tx_compl_param(
5702 wmi_handle, evt_buf, param);
5703
5704
5705 return QDF_STATUS_E_FAILURE;
5706}
5707
5708/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05305709 * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
5710 * from event
5711 * @wmi_handle: wmi handle
5712 * @param evt_buf: pointer to event buffer
5713 * @param param: Pointer to CSA switch count status param
5714 *
5715 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5716 */
5717QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
5718 void *evt_buf,
5719 struct pdev_csa_switch_count_status *param)
5720{
5721 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5722
5723 if (wmi_handle->ops->extract_pdev_csa_switch_count_status)
5724 return wmi_handle->ops->extract_pdev_csa_switch_count_status(
5725 wmi_handle,
5726 evt_buf,
5727 param);
5728
5729 return QDF_STATUS_E_FAILURE;
5730}
5731
5732
5733/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305734 * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305735 * @wmi_handle: wmi handle
5736 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305737 * @param num_vdevs: Pointer to hold num vdevs
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305738 *
5739 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5740 */
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305741QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
5742 uint32_t *num_vdevs)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305743{
5744 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5745
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305746 if (wmi_handle->ops->extract_swba_num_vdevs)
5747 return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle,
5748 evt_buf, num_vdevs);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305749
5750 return QDF_STATUS_E_FAILURE;
5751}
5752
5753/**
5754 * wmi_extract_swba_tim_info() - extract swba tim info from event
5755 * @wmi_handle: wmi handle
5756 * @param evt_buf: pointer to event buffer
5757 * @param idx: Index to bcn info
5758 * @param tim_info: Pointer to hold tim info
5759 *
5760 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5761 */
5762QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5763 uint32_t idx, wmi_host_tim_info *tim_info)
5764{
5765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5766
5767 if (wmi_handle->ops->extract_swba_tim_info)
5768 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5769 evt_buf, idx, tim_info);
5770
5771 return QDF_STATUS_E_FAILURE;
5772}
5773
5774/**
5775 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5776 * @wmi_handle: wmi handle
5777 * @param evt_buf: pointer to event buffer
5778 * @param idx: Index to bcn info
5779 * @param p2p_desc: Pointer to hold p2p NoA info
5780 *
5781 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5782 */
5783QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5784 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5785{
5786 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5787
5788 if (wmi_handle->ops->extract_swba_noa_info)
5789 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5790 evt_buf, idx, p2p_desc);
5791
5792 return QDF_STATUS_E_FAILURE;
5793}
5794
Wu Gaocd3a8512017-03-13 20:17:34 +08005795#ifdef CONVERGED_P2P_ENABLE
Rachit Kankane9cd0c752018-07-31 16:26:38 +05305796#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Wu Gaocd3a8512017-03-13 20:17:34 +08005797/**
5798 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
5799 * @wmi_handle: wmi handle
5800 * @evt_buf: pointer to event buffer
5801 * @param: Pointer to hold listen offload stop param
5802 *
5803 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5804 */
5805QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
5806 struct p2p_lo_event *param)
5807{
5808 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5809
5810 if (!wmi_handle) {
5811 WMI_LOGE("wmi handle is null");
5812 return QDF_STATUS_E_INVAL;
5813 }
5814
5815 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
5816 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
5817 wmi_handle, evt_buf, param);
5818
5819 return QDF_STATUS_E_FAILURE;
5820}
Rachit Kankane9cd0c752018-07-31 16:26:38 +05305821#endif
Wu Gaocd3a8512017-03-13 20:17:34 +08005822
5823/**
5824 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
5825 * @wmi_handle: wmi handle
5826 * @evt_buf: pointer to event buffer
5827 * @param: Pointer to hold p2p noa param
5828 *
5829 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5830 */
5831QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
5832 struct p2p_noa_info *param)
5833{
5834 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5835
5836 if (!wmi_handle) {
5837 WMI_LOGE("wmi handle is null");
5838 return QDF_STATUS_E_INVAL;
5839 }
5840
5841 if (wmi_handle->ops->extract_p2p_noa_ev_param)
5842 return wmi_handle->ops->extract_p2p_noa_ev_param(
5843 wmi_handle, evt_buf, param);
5844
5845 return QDF_STATUS_E_FAILURE;
5846}
5847#endif
5848
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305849/**
5850 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5851 * from event
5852 * @wmi_handle: wmi handle
5853 * @param evt_buf: pointer to event buffer
5854 * @param ev: Pointer to hold peer param and ps state
5855 *
5856 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5857 */
5858QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5859 wmi_host_peer_sta_ps_statechange_event *ev)
5860{
5861 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5862
5863 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5864 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5865 evt_buf, ev);
5866
5867 return QDF_STATUS_E_FAILURE;
5868}
5869
5870/**
5871 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5872 * @wmi_handle: wmi handle
5873 * @param evt_buf: pointer to event buffer
5874 * @param ev: Pointer to hold peer param
5875 *
5876 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5877 */
5878QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5879 wmi_host_peer_sta_kickout_event *ev)
5880{
5881 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5882
5883 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5884 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5885 evt_buf, ev);
5886
5887 return QDF_STATUS_E_FAILURE;
5888}
5889
5890/**
5891 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5892 * @wmi_handle: wmi handle
5893 * @param evt_buf: pointer to event buffer
5894 * @param peer_mac: Pointer to hold peer mac address
5895 * @param rate_cap: Pointer to hold ratecode
5896 *
5897 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5898 */
5899QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5900 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5901{
5902 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5903
5904 if (wmi->ops->extract_peer_ratecode_list_ev)
5905 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5906 evt_buf, peer_mac, rate_cap);
5907
5908 return QDF_STATUS_E_FAILURE;
5909
5910}
5911
5912/**
5913 * wmi_extract_comb_phyerr() - extract comb phy error from event
5914 * @wmi_handle: wmi handle
5915 * @param evt_buf: pointer to event buffer
5916 * @param datalen: data length of event buffer
5917 * @param buf_offset: Pointer to hold value of current event buffer offset
5918 * post extraction
5919 * @param phyer: Pointer to hold phyerr
5920 *
5921 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5922 */
5923QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5924 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5925{
5926 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5927
5928 if (wmi_handle->ops->extract_comb_phyerr)
5929 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5930 evt_buf, datalen, buf_offset, phyerr);
5931
5932 return QDF_STATUS_E_FAILURE;
5933
5934}
5935
5936/**
5937 * wmi_extract_single_phyerr() - extract single phy error from event
5938 * @wmi_handle: wmi handle
5939 * @param evt_buf: pointer to event buffer
5940 * @param datalen: data length of event buffer
5941 * @param buf_offset: Pointer to hold value of current event buffer offset
5942 * post extraction
5943 * @param phyerr: Pointer to hold phyerr
5944 *
5945 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5946 */
5947QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5948 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5949{
5950 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5951
5952 if (wmi_handle->ops->extract_single_phyerr)
5953 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5954 evt_buf, datalen, buf_offset, phyerr);
5955
5956 return QDF_STATUS_E_FAILURE;
5957
5958}
5959
5960/**
5961 * wmi_extract_composite_phyerr() - extract composite phy error from event
5962 * @wmi_handle: wmi handle
5963 * @param evt_buf: pointer to event buffer
5964 * @param datalen: Length of event buffer
5965 * @param phyerr: Pointer to hold phy error
5966 *
5967 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5968 */
5969QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5970 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5971{
5972 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5973
5974 if (wmi_handle->ops->extract_composite_phyerr)
5975 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5976 evt_buf, datalen, phyerr);
5977
5978 return QDF_STATUS_E_FAILURE;
5979
5980}
5981
5982/**
5983 * wmi_extract_stats_param() - extract all stats count from event
5984 * @wmi_handle: wmi handle
5985 * @param evt_buf: pointer to event buffer
5986 * @param stats_param: Pointer to hold stats count
5987 *
5988 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5989 */
5990QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5991 wmi_host_stats_event *stats_param)
5992{
5993 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5994
5995 if (wmi_handle->ops->extract_all_stats_count)
5996 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5997 evt_buf, stats_param);
5998
5999 return QDF_STATUS_E_FAILURE;
6000}
6001
6002/**
6003 * wmi_extract_pdev_stats() - extract pdev stats from event
6004 * @wmi_handle: wmi handle
6005 * @param evt_buf: pointer to event buffer
6006 * @param index: Index into pdev stats
6007 * @param pdev_stats: Pointer to hold pdev stats
6008 *
6009 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6010 */
6011QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
6012 uint32_t index, wmi_host_pdev_stats *pdev_stats)
6013{
6014 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6015
6016 if (wmi_handle->ops->extract_pdev_stats)
6017 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
6018 evt_buf, index, pdev_stats);
6019
6020 return QDF_STATUS_E_FAILURE;
6021}
6022
6023/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07006024 * extract_unit_test() - extract unit test from event
6025 * @wmi_handle: wmi handle
6026 * @param evt_buf: pointer to event buffer
6027 * @param unit_test: Pointer to hold unit-test header
6028 * @param maxspace: The amount of space in evt_buf
6029 *
6030 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6031 */
6032QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
6033 wmi_unit_test_event *unit_test, uint32_t maxspace)
6034{
6035 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6036
6037 if (wmi_handle->ops->extract_unit_test)
6038 return wmi_handle->ops->extract_unit_test(wmi_handle,
6039 evt_buf, unit_test, maxspace);
6040
6041 return QDF_STATUS_E_FAILURE;
6042}
6043
6044/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306045 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
6046 * @wmi_handle: wmi handle
6047 * @param evt_buf: pointer to event buffer
6048 * @param index: Index into extended pdev stats
6049 * @param pdev_ext_stats: Pointer to hold extended pdev stats
6050 *
6051 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6052 */
6053QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
6054 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
6055{
6056 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6057
6058 if (wmi_handle->ops->extract_pdev_ext_stats)
6059 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
6060 evt_buf, index, pdev_ext_stats);
6061
6062 return QDF_STATUS_E_FAILURE;
6063}
6064
6065/**
6066 * wmi_extract_peer_stats() - extract peer stats from event
6067 * @wmi_handle: wmi handle
6068 * @param evt_buf: pointer to event buffer
6069 * @param index: Index into peer stats
6070 * @param peer_stats: Pointer to hold peer stats
6071 *
6072 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6073 */
6074QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
6075 uint32_t index, wmi_host_peer_stats *peer_stats)
6076{
6077 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6078
6079 if (wmi_handle->ops->extract_peer_stats)
6080 return wmi_handle->ops->extract_peer_stats(wmi_handle,
6081 evt_buf, index, peer_stats);
6082
6083 return QDF_STATUS_E_FAILURE;
6084}
6085
6086/**
6087 * wmi_extract_vdev_stats() - extract vdev stats from event
6088 * @wmi_handle: wmi handle
6089 * @param evt_buf: pointer to event buffer
6090 * @param index: Index into vdev stats
6091 * @param vdev_stats: Pointer to hold vdev stats
6092 *
6093 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6094 */
6095QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
6096 uint32_t index, wmi_host_vdev_stats *vdev_stats)
6097{
6098 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6099
6100 if (wmi_handle->ops->extract_vdev_stats)
6101 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
6102 evt_buf, index, vdev_stats);
6103
6104 return QDF_STATUS_E_FAILURE;
6105}
6106
6107/**
Naveen Rawatd2115722018-04-12 08:17:55 -07006108 * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
6109 * @wmi_handle: wmi handle
6110 * @param evt_buf: pointer to event buffer
6111 * @param index: Index into rssi stats
6112 * @param rssi_stats: Pointer to hold rssi stats
6113 *
6114 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6115 */
6116QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
6117 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats)
6118{
6119 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6120
6121 if (wmi_handle->ops->extract_per_chain_rssi_stats)
6122 return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle,
6123 evt_buf, index, rssi_stats);
6124
6125 return QDF_STATUS_E_FAILURE;
6126}
6127
6128/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306129 * wmi_extract_rtt_hdr() - extract rtt header from event
6130 * @wmi_handle: wmi handle
6131 * @param evt_buf: pointer to event buffer
6132 * @param ev: Pointer to hold rtt header
6133 *
6134 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6135 */
6136QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
6137 wmi_host_rtt_event_hdr *ev)
6138{
6139 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6140
6141 if (wmi_handle->ops->extract_rtt_hdr)
6142 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
6143 evt_buf, ev);
6144
6145 return QDF_STATUS_E_FAILURE;
6146}
6147
6148/**
6149 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
6150 * @wmi_handle: wmi handle
6151 * @param evt_buf: pointer to event buffer
6152 * @param index: Index into bcn fault stats
6153 * @param bcnflt_stats: Pointer to hold bcn fault stats
6154 *
6155 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6156 */
6157QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
6158 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
6159{
6160 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6161
6162 if (wmi_handle->ops->extract_bcnflt_stats)
6163 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
6164 evt_buf, index, bcnflt_stats);
6165
6166 return QDF_STATUS_E_FAILURE;
6167}
6168
6169/**
6170 * wmi_extract_rtt_ev() - extract rtt event
6171 * @wmi_handle: wmi handle
6172 * @param evt_buf: Pointer to event buffer
6173 * @param ev: Pointer to hold rtt event
6174 * @param hdump: Pointer to hold hex dump
6175 * @param hdump_len: hex dump length
6176 *
6177 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6178 */
6179QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
6180 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
6181{
6182 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6183
6184 if (wmi_handle->ops->extract_rtt_ev)
6185 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
6186 evt_buf, ev, hdump, hdump_len);
6187
6188 return QDF_STATUS_E_FAILURE;
6189}
6190
6191/**
6192 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
6193 * @wmi_handle: wmi handle
6194 * @param evt_buf: pointer to event buffer
6195 * @param index: Index into extended peer stats
6196 * @param peer_extd_stats: Pointer to hold extended peer stats
6197 *
6198 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6199 */
6200QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
6201 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
6202{
6203 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6204
6205 if (wmi_handle->ops->extract_peer_extd_stats)
6206 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
6207 evt_buf, index, peer_extd_stats);
6208
6209 return QDF_STATUS_E_FAILURE;
6210}
6211
6212/**
6213 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
6214 * @wmi_handle: wmi handle
6215 * @param evt_buf: pointer to event buffer
6216 * @param wds_ev: Pointer to hold rtt error report
6217 *
6218 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6219 */
6220QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
6221 wmi_host_rtt_error_report_event *ev)
6222{
6223 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6224
6225 if (wmi_handle->ops->extract_rtt_error_report_ev)
6226 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
6227 evt_buf, ev);
6228
6229 return QDF_STATUS_E_FAILURE;
6230}
6231
6232/**
6233 * wmi_extract_chan_stats() - extract chan stats from event
6234 * @wmi_handle: wmi handle
6235 * @param evt_buf: pointer to event buffer
6236 * @param index: Index into chan stats
6237 * @param chanstats: Pointer to hold chan stats
6238 *
6239 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6240 */
6241QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
6242 uint32_t index, wmi_host_chan_stats *chan_stats)
6243{
6244 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6245
6246 if (wmi_handle->ops->extract_chan_stats)
6247 return wmi_handle->ops->extract_chan_stats(wmi_handle,
6248 evt_buf, index, chan_stats);
6249
6250 return QDF_STATUS_E_FAILURE;
6251}
6252
6253/**
6254 * wmi_extract_thermal_stats() - extract thermal stats from event
6255 * @wmi_handle: wmi handle
6256 * @param evt_buf: Pointer to event buffer
6257 * @param temp: Pointer to hold extracted temperature
6258 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306259 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306260 *
6261 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6262 */
6263QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306264 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306265{
6266 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6267
6268 if (wmi_handle->ops->extract_thermal_stats)
6269 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306270 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306271
6272 return QDF_STATUS_E_FAILURE;
6273}
6274
6275/**
6276 * wmi_extract_profile_ctx() - extract profile context from event
6277 * @wmi_handle: wmi handle
6278 * @param evt_buf: pointer to event buffer
6279 * @param profile_ctx: Pointer to hold profile context
6280 *
6281 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6282 */
6283QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
6284 wmi_host_wlan_profile_ctx_t *profile_ctx)
6285{
6286 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6287
6288 if (wmi_handle->ops->extract_profile_ctx)
6289 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
6290 evt_buf, profile_ctx);
6291
6292 return QDF_STATUS_E_FAILURE;
6293}
6294
6295/**
6296 * wmi_extract_thermal_level_stats() - extract thermal level stats from
6297 * event
6298 * @wmi_handle: wmi handle
6299 * @param evt_buf: pointer to event buffer
6300 * @param idx: Index to level stats
6301 * @param levelcount: Pointer to hold levelcount
6302 * @param dccount: Pointer to hold dccount
6303 *
6304 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6305 */
6306QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
6307 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
6308{
6309 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6310
6311 if (wmi_handle->ops->extract_thermal_level_stats)
6312 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
6313 evt_buf, idx, levelcount, dccount);
6314
6315 return QDF_STATUS_E_FAILURE;
6316}
6317
6318/**
6319 * wmi_extract_profile_data() - extract profile data from event
6320 * @wmi_handle: wmi handle
6321 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05306322 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306323 * @param profile_data: Pointer to hold profile data
6324 *
6325 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6326 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05306327QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306328 wmi_host_wlan_profile_t *profile_data)
6329{
6330 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6331
6332 if (wmi_handle->ops->extract_profile_data)
6333 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05306334 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306335
6336 return QDF_STATUS_E_FAILURE;
6337}
6338
6339/**
6340 * wmi_extract_chan_info_event() - extract chan information from event
6341 * @wmi_handle: wmi handle
6342 * @param evt_buf: pointer to event buffer
6343 * @param chan_info: Pointer to hold chan information
6344 *
6345 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6346 */
6347QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
6348 wmi_host_chan_info_event *chan_info)
6349{
6350 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6351
6352 if (wmi_handle->ops->extract_chan_info_event)
6353 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
6354 evt_buf, chan_info);
6355
6356 return QDF_STATUS_E_FAILURE;
6357}
6358
6359/**
6360 * wmi_extract_channel_hopping_event() - extract channel hopping param
6361 * from event
6362 * @wmi_handle: wmi handle
6363 * @param evt_buf: pointer to event buffer
6364 * @param ch_hopping: Pointer to hold channel hopping param
6365 *
6366 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6367 */
6368QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
6369 wmi_host_pdev_channel_hopping_event *ch_hopping)
6370{
6371 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6372
6373 if (wmi->ops->extract_channel_hopping_event)
6374 return wmi->ops->extract_channel_hopping_event(wmi,
6375 evt_buf, ch_hopping);
6376
6377 return QDF_STATUS_E_FAILURE;
6378}
6379
6380/**
6381 * wmi_extract_bss_chan_info_event() - extract bss channel information
6382 * from event
6383 * @wmi_handle: wmi handle
6384 * @param evt_buf: pointer to event buffer
6385 * @param bss_chan_info: Pointer to hold bss channel information
6386 *
6387 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6388 */
6389QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6390 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6391{
6392 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6393
6394 if (wmi_handle->ops->extract_bss_chan_info_event)
6395 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6396 evt_buf, bss_chan_info);
6397
6398 return QDF_STATUS_E_FAILURE;
6399}
6400
6401/**
6402 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6403 * @wmi_handle: wmi handle
6404 * @param evt_buf: pointer to event buffer
6405 * @param inst_rssi_resp: Pointer to hold inst rssi response
6406 *
6407 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6408 */
6409QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6410 wmi_host_inst_stats_resp *inst_rssi_resp)
6411{
6412 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6413
6414 if (wmi->ops->extract_inst_rssi_stats_event)
6415 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6416 evt_buf, inst_rssi_resp);
6417
6418 return QDF_STATUS_E_FAILURE;
6419}
6420
6421/**
6422 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6423 * from event
6424 * @wmi_handle: wmi handle
6425 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306426 * @param ev: Pointer to hold data traffic control
6427 *
6428 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6429 */
6430QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6431 wmi_host_tx_data_traffic_ctrl_event *ev)
6432{
6433 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6434
6435 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6436 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6437 evt_buf, ev);
6438
6439 return QDF_STATUS_E_FAILURE;
6440}
6441
6442/**
6443 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6444 * @wmi_handle: wmi handle
6445 * @param evt_buf: pointer to event buffer
6446 * @param index: Index into extended vdev stats
6447 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6448 *
6449 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6450 */
6451QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6452 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6453{
6454 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6455
6456 if (wmi_handle->ops->extract_vdev_extd_stats)
6457 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6458 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306459 return QDF_STATUS_E_FAILURE;
6460}
6461
6462/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05306463 * wmi_extract_bcn_stats() - extract beacon stats from event
6464 * @wmi_handle: wmi handle
6465 * @evt_buf: pointer to event buffer
6466 * @index: Index into beacon stats
6467 * @vdev_bcn_stats: Pointer to hold beacon stats
6468 *
6469 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6470 */
6471QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
6472 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
6473{
6474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6475
6476 if (wmi_handle->ops->extract_bcn_stats)
6477 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
6478 evt_buf, index, vdev_bcn_stats);
6479 return QDF_STATUS_E_FAILURE;
6480}
6481
6482/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +05306483 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
6484 * @wmi_handle: wmi handle
6485 * @param evt_buf: pointer to event buffer
6486 * @param vdev_extd_stats: Pointer to hold nac rssi stats
6487 *
6488 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6489 */
6490QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
6491 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats)
6492{
6493 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6494
6495 if (wmi_handle->ops->extract_vdev_nac_rssi_stats)
6496 return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle,
6497 evt_buf, vdev_nac_rssi_stats);
6498
6499 return QDF_STATUS_E_FAILURE;
6500}
6501
6502/**
Gupta, Kapil2e685982016-04-25 19:14:19 +05306503 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6504 * adaptive dwelltime configuration params
6505 * @wma_handle: wma handler
6506 * @dwelltime_params: pointer to dwelltime_params
6507 *
6508 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6509 */
6510QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6511 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6512{
6513 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6514
6515 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6516 return wmi_handle->ops->
6517 send_adapt_dwelltime_params_cmd(wmi_handle,
6518 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306519
6520 return QDF_STATUS_E_FAILURE;
6521}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306522
6523/**
6524 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6525 * @wmi_handle: wmi handle
6526 * @param: wmi power debug parameter
6527 *
6528 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6529 *
6530 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6531 */
6532QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6533 struct wmi_power_dbg_params *param)
6534{
6535 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6536
6537 if (wmi_handle->ops->send_power_dbg_cmd)
6538 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6539 param);
6540
6541 return QDF_STATUS_E_FAILURE;
6542}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306543
6544/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05306545 * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart
6546 * @wmi_handle: wmi handle
6547 * @param: multiple vdev restart parameter
6548 *
6549 * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw.
6550 *
6551 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6552 */
6553QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
6554 struct multiple_vdev_restart_params *param)
6555{
6556 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6557
6558 if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd)
6559 return wmi_handle->ops->send_multiple_vdev_restart_req_cmd(
6560 wmi_handle,
6561 param);
6562
6563 return QDF_STATUS_E_FAILURE;
6564}
6565
Manikandan Mohan31a13e22016-12-13 13:14:06 -08006566QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
6567 struct sar_limit_cmd_params *params)
6568{
6569 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6570
6571 if (wmi_handle->ops->send_sar_limit_cmd)
6572 return wmi_handle->ops->send_sar_limit_cmd(
6573 wmi_handle,
6574 params);
6575 return QDF_STATUS_E_FAILURE;
6576}
6577
Jeff Johnson4783f902017-12-14 15:50:16 -08006578QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl)
6579{
6580 wmi_unified_t wmi_handle = wmi_hdl;
6581
6582 if (wmi_handle->ops->get_sar_limit_cmd)
6583 return wmi_handle->ops->get_sar_limit_cmd(wmi_handle);
6584
6585 return QDF_STATUS_E_FAILURE;
6586}
6587
6588QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
6589 uint8_t *evt_buf,
6590 struct sar_limit_event *event)
6591{
6592 wmi_unified_t wmi_handle = wmi_hdl;
6593
6594 if (wmi_handle->ops->extract_sar_limit_event)
6595 return wmi_handle->ops->extract_sar_limit_event(wmi_handle,
6596 evt_buf,
6597 event);
6598
6599 return QDF_STATUS_E_FAILURE;
6600}
6601
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07006602QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle,
6603 uint8_t *event, uint32_t len)
6604{
6605 wmi_unified_t wmi_handle = handle;
6606
6607 if (wmi_handle->ops->extract_sar2_result_event)
6608 return wmi_handle->ops->extract_sar2_result_event(wmi_handle,
6609 event,
6610 len);
6611
6612 return QDF_STATUS_E_FAILURE;
6613}
Jeff Johnson4783f902017-12-14 15:50:16 -08006614
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306615#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306616QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306617 struct disa_encrypt_decrypt_req_params *params)
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306618{
6619 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6620
6621 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6622 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6623 wmi_handle,
6624 params);
Sathish Kumar68789382016-11-14 17:44:29 +05306625 return QDF_STATUS_E_FAILURE;
6626}
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306627
6628QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
6629 uint8_t *evt_buf,
6630 struct disa_encrypt_decrypt_resp_params *resp)
6631{
6632 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
6633
6634 if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
6635 return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
6636 wmi_handle, evt_buf, resp);
6637
6638 return QDF_STATUS_E_FAILURE;
6639}
6640
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306641#endif
Sathish Kumar68789382016-11-14 17:44:29 +05306642
6643/*
6644 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
6645 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05306646 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05306647 *
6648 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6649 *
6650 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6651 */
6652QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306653 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05306654{
6655 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6656
6657 if (wmi->ops->send_btcoex_wlan_priority_cmd)
6658 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306659 param);
6660
6661 return QDF_STATUS_E_FAILURE;
6662}
6663/**
6664 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
6665 * @wmi_handle: wmi handle
6666 * @param: wmi btcoex cfg params
6667 *
6668 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6669 *
6670 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6671 */
6672QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
6673 struct btcoex_cfg_params *param)
6674{
6675 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6676
6677 if (wmi->ops->send_btcoex_duty_cycle_cmd)
6678 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
6679 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306680
6681 return QDF_STATUS_E_FAILURE;
6682}
Kiran Venkatappa06520822016-08-10 23:55:40 +05306683
6684/*
6685 * wmi_extract_service_ready_ext() - extract extended service ready
6686 * @wmi_handle: wmi handle
6687 * @param: wmi power debug parameter
6688 *
6689 *
6690 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6691 */
6692QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006693 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306694{
6695 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6696
6697 if (wmi_handle->ops->extract_service_ready_ext)
6698 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
6699 evt_buf, param);
6700
6701 return QDF_STATUS_E_FAILURE;
6702}
6703
6704/**
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07006705 * wmi_extract_sar_cap_service_ready_ext() -
6706 * extract sar cap from service ready event
6707 * @wmi_handle: wmi handle
6708 * @evt_buf: pointer to event buffer
6709 * @ext_param: extended target info
6710 *
6711 * Return: QDF_STATUS_SUCCESS for success or error code
6712 */
6713QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
6714 void *wmi_hdl,
6715 uint8_t *evt_buf,
6716 struct wlan_psoc_host_service_ext_param *ext_param)
6717{
6718 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6719
6720 if (wmi_handle->ops->extract_sar_cap_service_ready_ext)
6721 return wmi_handle->ops->extract_sar_cap_service_ready_ext(
6722 wmi_handle,
6723 evt_buf, ext_param);
6724
6725 return QDF_STATUS_E_FAILURE;
6726}
6727
6728/**
Kiran Venkatappa06520822016-08-10 23:55:40 +05306729 * wmi_extract_hw_mode_cap_service_ready_ext() -
6730 * extract HW mode cap from service ready event
6731 * @wmi_handle: wmi handle
6732 * @param evt_buf: pointer to event buffer
6733 * @param param: Pointer to hold evt buf
6734 * @param hw_mode_idx: hw mode idx should be less than num_mode
6735 *
6736 * Return: QDF_STATUS_SUCCESS for success or error code
6737 */
6738QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
6739 void *wmi_hdl,
6740 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006741 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306742{
6743 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6744
6745 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
6746 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
6747 wmi_handle,
6748 evt_buf, hw_mode_idx, param);
6749
6750 return QDF_STATUS_E_FAILURE;
6751}
6752/**
6753 * wmi_extract_mac_phy_cap_service_ready_ext() -
6754 * extract MAC phy cap from service ready event
6755 * @wmi_handle: wmi handle
6756 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306757 * @param hw_mode_id: hw mode id of hw_mode_caps
6758 * @param phy_id: phy_id within hw_mode_cap
6759 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05306760 *
6761 * Return: QDF_STATUS_SUCCESS for success or error code
6762 */
6763QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
6764 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306765 uint8_t *evt_buf,
6766 uint8_t hw_mode_id,
6767 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006768 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306769{
6770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6771
6772 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
6773 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
6774 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306775 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05306776
6777 return QDF_STATUS_E_FAILURE;
6778}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306779
Kiran Venkatappa06520822016-08-10 23:55:40 +05306780/**
6781 * wmi_extract_reg_cap_service_ready_ext() -
6782 * extract REG cap from service ready event
6783 * @wmi_handle: wmi handle
6784 * @param evt_buf: pointer to event buffer
6785 * @param param: Pointer to hold evt buf
6786 * @param phy_idx: phy idx should be less than num_mode
6787 *
6788 * Return: QDF_STATUS_SUCCESS for success or error code
6789 */
6790QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
6791 void *wmi_hdl,
6792 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006793 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306794{
6795 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6796
6797 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
6798 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
6799 wmi_handle,
6800 evt_buf, phy_idx, param);
6801
6802 return QDF_STATUS_E_FAILURE;
6803}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306804
Sathish Kumarf396c722017-11-17 17:30:41 +05306805QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
6806 void *wmi_hdl,
6807 uint8_t *evt_buf, uint8_t idx,
6808 struct wlan_psoc_host_dbr_ring_caps *param)
6809{
6810 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6811
6812 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
6813 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
6814 wmi_handle,
6815 evt_buf, idx, param);
6816
6817 return QDF_STATUS_E_FAILURE;
6818}
6819
6820QDF_STATUS wmi_extract_dbr_buf_release_fixed(
6821 void *wmi_hdl,
6822 uint8_t *evt_buf,
6823 struct direct_buf_rx_rsp *param)
6824{
6825 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6826
6827 if (wmi_handle->ops->extract_dbr_buf_release_fixed)
6828 return wmi_handle->ops->extract_dbr_buf_release_fixed(
6829 wmi_handle,
6830 evt_buf, param);
6831
6832 return QDF_STATUS_E_FAILURE;
6833}
6834
6835QDF_STATUS wmi_extract_dbr_buf_release_entry(
6836 void *wmi_hdl,
6837 uint8_t *evt_buf, uint8_t idx,
6838 struct direct_buf_rx_entry *param)
6839{
6840 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6841
6842 if (wmi_handle->ops->extract_dbr_buf_release_entry)
6843 return wmi_handle->ops->extract_dbr_buf_release_entry(
6844 wmi_handle,
6845 evt_buf, idx, param);
6846
6847 return QDF_STATUS_E_FAILURE;
6848}
6849
Edayilliam Jayadev92651222018-04-06 16:37:17 +05306850QDF_STATUS wmi_extract_dbr_buf_metadata(
6851 void *wmi_hdl,
6852 uint8_t *evt_buf, uint8_t idx,
6853 struct direct_buf_rx_metadata *param)
6854{
6855 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6856
6857 if (wmi_handle->ops->extract_dbr_buf_metadata)
6858 return wmi_handle->ops->extract_dbr_buf_metadata(
6859 wmi_handle,
6860 evt_buf, idx, param);
6861
6862 return QDF_STATUS_E_FAILURE;
6863}
6864
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306865/**
6866 * wmi_extract_pdev_utf_event() -
6867 * extract UTF data from pdev utf event
6868 * @wmi_handle: wmi handle
6869 * @param evt_buf: pointer to event buffer
6870 * @param param: Pointer to hold evt buf
6871 *
6872 * Return: QDF_STATUS_SUCCESS for success or error code
6873 */
6874QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
6875 uint8_t *evt_buf,
6876 struct wmi_host_pdev_utf_event *param)
6877{
6878 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6879
6880 if (wmi_handle->ops->extract_pdev_utf_event)
6881 return wmi_handle->ops->extract_pdev_utf_event(
6882 wmi_handle,
6883 evt_buf, param);
6884
6885 return QDF_STATUS_E_FAILURE;
6886}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306887
6888/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05306889 * wmi_extract_pdev_qvit_event() -
6890 * extract UTF data from pdev qvit event
6891 * @wmi_handle: wmi handle
6892 * @param evt_buf: pointer to event buffer
6893 * @param param: Pointer to hold evt buf
6894 *
6895 * Return: QDF_STATUS_SUCCESS for success or error code
6896 */
6897QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
6898 uint8_t *evt_buf,
6899 struct wmi_host_pdev_qvit_event *param)
6900{
6901 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6902
6903 if (wmi_handle->ops->extract_pdev_qvit_event)
6904 return wmi_handle->ops->extract_pdev_qvit_event(
6905 wmi_handle,
6906 evt_buf, param);
6907
6908 return QDF_STATUS_E_FAILURE;
6909}
6910
6911/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05306912 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
6913 * @wmi_handle: wmi handle
6914 * @param: wmi coex ver cfg params
6915 *
6916 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
6917 *
6918 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6919 */
6920QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
6921 coex_ver_cfg_t *param)
6922{
6923 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6924
6925 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
6926 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
6927 param);
6928
6929 return QDF_STATUS_E_FAILURE;
6930}
6931
6932/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05306933 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
6934 * @wmi_handle: wmi handle
6935 * @param: wmi coex cfg cmd params
6936 *
6937 * Send WMI_COEX_CFG_CMD parameters to fw.
6938 *
6939 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6940 */
6941QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
6942 struct coex_config_params *param)
6943{
6944 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6945
6946 if (wmi_handle->ops->send_coex_config_cmd)
6947 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
6948 param);
6949
6950 return QDF_STATUS_E_FAILURE;
6951}
6952
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05306953QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
6954 struct rcpi_req *get_rcpi_param)
6955{
6956 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6957
6958 if (wmi_handle->ops->send_get_rcpi_cmd)
6959 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
6960 get_rcpi_param);
6961
6962 return QDF_STATUS_E_FAILURE;
6963}
6964
6965QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
6966 struct rcpi_res *res)
6967{
6968 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6969 struct wmi_ops *ops = wmi_handle->ops;
6970
6971 if (ops->extract_rcpi_response_event)
6972 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
6973 res);
6974
6975 return QDF_STATUS_E_FAILURE;
6976}
6977
Sathish Kumar80f4f382017-04-24 11:36:00 +05306978/**
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306979 * wmi_extract_peer_delete_response_event() -
6980 * extract vdev id and peer mac addresse from peer delete response event
6981 * @wmi_handle: wmi handle
6982 * @param evt_buf: pointer to event buffer
6983 * @param param: Pointer to hold evt buf
6984 *
6985 * Return: QDF_STATUS_SUCCESS for success or error code
6986 */
6987QDF_STATUS wmi_extract_peer_delete_response_event(
6988 void *wmi_hdl,
6989 uint8_t *evt_buf,
6990 struct wmi_host_peer_delete_response_event *param)
6991{
6992 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6993
6994 if (wmi_handle->ops->extract_peer_delete_response_event)
6995 return wmi_handle->ops->extract_peer_delete_response_event(
6996 wmi_handle,
6997 evt_buf, param);
6998
6999 return QDF_STATUS_E_FAILURE;
7000}
Arif Hussainf00be1d2017-01-07 18:21:55 -08007001
7002QDF_STATUS
7003wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
7004 uint32_t pdev_id)
7005{
7006 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7007
7008 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
7009 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
7010 wmi_handle, pdev_id);
7011
7012 return QDF_STATUS_E_FAILURE;
7013}
7014
7015QDF_STATUS
7016wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
7017 uint32_t pdev_id)
7018{
7019 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7020
7021 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
7022 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
7023 wmi_handle, pdev_id);
7024
7025 return QDF_STATUS_E_FAILURE;
7026}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05307027
7028/*
7029 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
7030 * @wmi_handle: wmi handle
7031 * @evt_buf: pointer to event buffer.
7032 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
7033 *
7034 *
7035 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7036 */
7037QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
7038 struct wlan_psoc_host_chainmask_table *chainmask_table)
7039{
7040 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7041
7042 if (wmi_handle->ops->extract_chainmask_tables)
7043 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
7044 evt_buf, chainmask_table);
7045
7046 return QDF_STATUS_E_FAILURE;
7047}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07007048/**
7049 * wmi_unified_set_country_cmd_send() - WMI set country function
7050 * @param wmi_handle : handle to WMI.
7051 * @param param : pointer to hold set country cmd parameter
7052 *
7053 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
7054 */
7055QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
7056 struct set_country *param)
7057{
7058 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7059
7060 if (wmi_handle->ops->send_set_country_cmd)
7061 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
7062 param);
7063
7064 return QDF_STATUS_E_FAILURE;
7065}
7066
Nitesh Shah52323d02017-05-22 15:49:00 +05307067/**
7068 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
7069 * DBS scan selection configuration params
7070 * @wma_handle: wma handler
7071 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
7072 *
7073 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
7074 */
7075QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
7076 struct wmi_dbs_scan_sel_params *dbs_scan_params)
7077{
7078 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7079
7080 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
7081 return wmi_handle->ops->
7082 send_dbs_scan_sel_params_cmd(wmi_handle,
7083 dbs_scan_params);
7084
7085 return QDF_STATUS_E_FAILURE;
7086}
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05307087
Rajeev Kumar Sirasanagandladaadf832017-09-18 16:47:52 +05307088#ifdef WLAN_FEATURE_ACTION_OUI
7089QDF_STATUS
7090wmi_unified_send_action_oui_cmd(void *wmi_hdl,
7091 struct action_oui_request *req)
7092{
7093 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7094
7095 if (wmi_handle->ops->send_action_oui_cmd)
7096 return wmi_handle->ops->send_action_oui_cmd(wmi_handle,
7097 req);
7098
7099 return QDF_STATUS_E_FAILURE;
7100}
7101#endif
7102
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05307103/**
7104 * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
7105 * configuration params
7106 * @wmi_hdl: wmi handler
7107 * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
7108 *
7109 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
7110 */
7111QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
7112 struct wmi_limit_off_chan_param *limit_off_chan_param)
7113{
7114 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7115
7116 if (wmi_handle->ops->send_limit_off_chan_cmd)
7117 return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
7118 limit_off_chan_param);
7119
7120 return QDF_STATUS_E_FAILURE;
7121}
Kiran Venkatappa7fe3afc2017-11-08 19:32:23 +05307122
7123/**
7124 * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
7125 * @wmi_hdl: wmi handle
7126 * @bcn_ctrl_param: pointer to bcn_offload_control param
7127 *
7128 * Return: QDF_STATUS_SUCCESS for success or error code
7129 */
7130QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
7131 struct bcn_offload_control *bcn_ctrl_param)
7132{
7133 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7134
7135 if (wmi_handle->ops->send_bcn_offload_control_cmd)
7136 return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle,
7137 bcn_ctrl_param);
7138
7139 return QDF_STATUS_E_FAILURE;
7140}
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05307141
7142/**
7143 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
7144 * wds entries from FW
7145 * @wmi_handle: wmi handle
7146 *
7147 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
7148 *
7149 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7150 */
7151QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
7152{
7153 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7154
7155 if (wmi_handle->ops->send_wds_entry_list_cmd)
7156 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
7157
7158 return QDF_STATUS_E_FAILURE;
7159}
7160
7161/**
7162 * wmi_extract_wds_entry - api to extract wds entry
7163 * @wmi_handle: wma handle
7164 * @evt_buf: pointer to event buffer
7165 * @wds_entry: wds entry
7166 * @idx: index to point wds entry in event buffer
7167 *
7168 * Return: QDF_STATUS_SUCCESS for successful event parse
7169 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
7170 */
7171QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
7172 struct wdsentry *wds_entry,
7173 u_int32_t idx)
7174{
7175 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7176
7177 if (wmi_handle->ops->extract_wds_entry)
7178 return wmi_handle->ops->extract_wds_entry(wmi_handle,
7179 evt_buf, wds_entry, idx);
7180
7181 return QDF_STATUS_E_FAILURE;
7182}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05307183qdf_export_symbol(wmi_extract_wds_entry);
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007184
7185#ifdef WLAN_FEATURE_NAN_CONVERGENCE
7186QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
7187 struct nan_datapath_initiator_req *req)
7188{
7189 wmi_unified_t wmi_handle = wmi_hdl;
7190
7191 if (wmi_handle->ops->send_ndp_initiator_req_cmd)
7192 return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
7193 req);
7194
7195 return QDF_STATUS_E_FAILURE;
7196}
7197
7198QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
7199 struct nan_datapath_responder_req *req)
7200{
7201 wmi_unified_t wmi_handle = wmi_hdl;
7202
7203 if (wmi_handle->ops->send_ndp_responder_req_cmd)
7204 return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
7205 req);
7206
7207 return QDF_STATUS_E_FAILURE;
7208}
7209
7210QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
7211 struct nan_datapath_end_req *req)
7212{
7213 wmi_unified_t wmi_handle = wmi_hdl;
7214
7215 if (wmi_handle->ops->send_ndp_end_req_cmd)
7216 return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
7217 req);
7218
7219 return QDF_STATUS_E_FAILURE;
7220}
7221
7222QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007223 uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007224{
7225 if (wmi_handle->ops->extract_ndp_initiator_rsp)
7226 return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
7227 data, rsp);
7228
7229 return QDF_STATUS_E_FAILURE;
7230}
7231
7232QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007233 struct nan_datapath_indication_event *ind)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007234{
7235 if (wmi_handle->ops->extract_ndp_ind)
7236 return wmi_handle->ops->extract_ndp_ind(wmi_handle,
7237 data, ind);
7238
7239 return QDF_STATUS_E_FAILURE;
7240}
7241
7242QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007243 struct nan_datapath_confirm_event *ev)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007244{
7245 if (wmi_handle->ops->extract_ndp_confirm)
7246 return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
7247 data, ev);
7248
7249 return QDF_STATUS_E_FAILURE;
7250}
7251
7252QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007253 uint8_t *data, struct nan_datapath_responder_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007254{
7255 if (wmi_handle->ops->extract_ndp_responder_rsp)
7256 return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
7257 data, rsp);
7258
7259 return QDF_STATUS_E_FAILURE;
7260}
7261
7262QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007263 struct nan_datapath_end_rsp_event *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007264{
7265 if (wmi_handle->ops->extract_ndp_end_rsp)
7266 return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
7267 data, rsp);
7268
7269 return QDF_STATUS_E_FAILURE;
7270}
7271
7272QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
7273 struct nan_datapath_end_indication_event **ind)
7274{
7275 if (wmi_handle->ops->extract_ndp_end_ind)
7276 return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
7277 data, ind);
7278
7279 return QDF_STATUS_E_FAILURE;
7280}
Naveen Rawatd42ce382018-01-09 17:54:41 -08007281
7282QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
7283 struct nan_datapath_sch_update_event *ind)
7284{
7285 if (wmi_handle->ops->extract_ndp_sch_update)
7286 return wmi_handle->ops->extract_ndp_sch_update(wmi_handle,
7287 data, ind);
7288
7289 return QDF_STATUS_E_FAILURE;
7290}
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007291#endif
yeshwanth sriram guntuka07a15b82017-09-01 17:56:07 +05307292QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
7293 struct wmi_btm_config *params)
7294{
7295 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7296
7297 if (wmi_handle->ops->send_btm_config)
7298 return wmi_handle->ops->send_btm_config(wmi_handle,
7299 params);
7300
7301 return QDF_STATUS_E_FAILURE;
7302}
Arif Hussainc5bfe072017-12-27 16:23:45 -08007303
7304QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
7305 struct wmi_obss_detection_cfg_param *obss_cfg_param)
7306{
7307 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7308
7309 if (wmi_handle->ops->send_obss_detection_cfg_cmd)
7310 return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle,
7311 obss_cfg_param);
7312
7313 return QDF_STATUS_E_FAILURE;
7314}
Arif Hussain33d98502018-01-12 13:15:04 -08007315
7316QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
7317 uint8_t *data,
7318 struct wmi_obss_detect_info
7319 *info)
7320{
7321 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7322
7323 if (wmi_handle->ops->extract_obss_detection_info)
7324 return wmi_handle->ops->extract_obss_detection_info(data, info);
7325
7326 return QDF_STATUS_E_FAILURE;
7327}
Vignesh Viswanathan7f057772018-01-18 19:06:40 +05307328
7329QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
7330 struct wmi_11k_offload_params *params)
7331{
7332 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7333
7334 if (wmi_handle->ops->send_offload_11k_cmd)
7335 return wmi_handle->ops->send_offload_11k_cmd(
7336 wmi_handle, params);
7337
7338 return QDF_STATUS_E_FAILURE;
7339}
7340
7341QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
7342 struct wmi_invoke_neighbor_report_params *params)
7343{
7344 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7345
7346 if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
7347 return wmi_handle->ops->send_invoke_neighbor_report_cmd(
7348 wmi_handle, params);
7349
7350 return QDF_STATUS_E_FAILURE;
7351}
Himanshu Agarwal157e4782018-01-24 22:24:17 +05307352
7353#ifdef WLAN_SUPPORT_GREEN_AP
7354QDF_STATUS wmi_extract_green_ap_egap_status_info(
7355 void *wmi_hdl, uint8_t *evt_buf,
7356 struct wlan_green_ap_egap_status_info *egap_status_info_params)
7357{
7358 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7359
7360 if (wmi_handle->ops->extract_green_ap_egap_status_info)
7361 return wmi_handle->ops->extract_green_ap_egap_status_info(
7362 evt_buf, egap_status_info_params);
7363
7364 return QDF_STATUS_E_FAILURE;
7365}
7366#endif
Arif Hussainec5cd3c2018-01-22 01:19:36 -08007367
7368QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
7369 uint32_t vdev_id,
7370 bool enable)
7371{
7372 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7373
7374 if (wmi_handle->ops->send_bss_color_change_enable_cmd)
7375 return wmi_handle->ops->send_bss_color_change_enable_cmd(
7376 wmi_handle, vdev_id, enable);
7377
7378 return QDF_STATUS_E_FAILURE;
7379}
7380
7381QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
7382 struct wmi_obss_color_collision_cfg_param *cfg)
7383{
7384 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7385
7386 if (wmi_handle->ops->send_obss_color_collision_cfg_cmd)
7387 return wmi_handle->ops->send_obss_color_collision_cfg_cmd(
7388 wmi_handle, cfg);
7389
7390 return QDF_STATUS_E_FAILURE;
7391}
7392
7393QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
7394 uint8_t *data, struct wmi_obss_color_collision_info *info)
7395{
7396 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7397
7398 if (wmi_handle->ops->extract_obss_color_collision_info)
7399 return wmi_handle->ops->extract_obss_color_collision_info(data,
7400 info);
7401
7402 return QDF_STATUS_E_FAILURE;
7403}
Naveen Rawat26305452018-02-02 15:18:33 -08007404
7405wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
7406 WMI_HOST_WLAN_PHY_MODE phymode)
7407{
7408 /*
7409 * this API does translation between host only strcutres, hence
7410 * does not need separate TLV, non-TLV definitions
7411 */
7412
7413 if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX)
7414 return mode_to_width[phymode];
7415 else
7416 return WMI_HOST_CHAN_WIDTH_20;
7417}
Naveen Rawat963ee942018-04-13 16:38:36 -07007418
7419#ifdef QCA_SUPPORT_CP_STATS
7420QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
7421 struct wmi_host_congestion_stats *stats)
7422{
7423 if (wmi_handle->ops->extract_cca_stats)
7424 return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf,
7425 stats);
7426
7427 return QDF_STATUS_E_FAILURE;
7428}
7429#endif /* QCA_SUPPORT_CP_STATS */
Shashikala Prabhu5f65ac72018-05-16 10:08:09 +05307430
7431#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
7432QDF_STATUS
7433wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
7434 struct dfs_radar_found_params *params)
7435{
7436 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7437
7438 if (wmi_handle->ops->send_dfs_average_radar_params_cmd)
7439 return wmi_handle->ops->send_dfs_average_radar_params_cmd(
7440 wmi_handle, params);
7441
7442 return QDF_STATUS_E_FAILURE;
7443}
7444
7445QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
7446 uint32_t *dfs_status_check)
7447{
7448 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7449
7450 if (wmi_handle->ops->extract_dfs_status_from_fw)
7451 return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle,
7452 evt_buf, dfs_status_check);
7453
7454 return QDF_STATUS_E_FAILURE;
7455}
7456#endif
c_cgodav758d99f2017-02-13 10:14:42 +05307457
7458#ifdef OL_ATH_SMART_LOGGING
7459QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
7460 uint32_t param)
7461{
7462 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7463
7464 if (wmi_handle->ops->send_smart_logging_enable_cmd)
7465 return wmi_handle->ops->send_smart_logging_enable_cmd(
7466 wmi_handle,
7467 param);
7468
7469 return QDF_STATUS_E_FAILURE;
7470}
7471
7472QDF_STATUS
7473wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl,
7474 struct wmi_debug_fatal_events *param)
7475{
7476 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7477
7478 if (wmi_handle->ops->send_smart_logging_fatal_cmd)
7479 return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle,
7480 param);
7481
7482 return QDF_STATUS_E_FAILURE;
7483}
7484
7485QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl,
7486 void *evt_buf,
7487 struct wmi_debug_fatal_events *ev)
7488{
7489 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
7490
7491 if (wmi->ops->extract_smartlog_event)
7492 return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev);
7493
7494 return QDF_STATUS_E_FAILURE;
7495}
7496#endif /* OL_ATH_SMART_LOGGING */
Rajeev Kumar Sirasanagandlad2d1a5e2018-03-02 21:12:16 +05307497
7498QDF_STATUS
7499wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl,
7500 struct wmi_roam_scan_stats_req *params)
7501{
7502 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7503
7504 if (wmi_handle->ops->send_roam_scan_stats_cmd)
7505 return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle,
7506 params);
7507
7508 return QDF_STATUS_E_FAILURE;
7509}
7510
7511QDF_STATUS
7512wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
7513 uint32_t *vdev_id,
7514 struct wmi_roam_scan_stats_res **res_param)
7515{
7516 if (wmi->ops->extract_roam_scan_stats_res_evt)
7517 return wmi->ops->extract_roam_scan_stats_res_evt(wmi,
7518 evt_buf,
7519 vdev_id, res_param);
7520
7521 return QDF_STATUS_E_FAILURE;
7522}