blob: a84d30782d535f6650f70cc13817a239b9487ec9 [file] [log] [blame]
Govind Singh5eb51532016-03-09 11:34:12 +05301/*
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08002 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
Govind Singh5eb51532016-03-09 11:34:12 +05303 *
Govind Singh5eb51532016-03-09 11:34:12 +05304 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Govind Singh5eb51532016-03-09 11:34:12 +053019#include "wmi_unified_priv.h"
Govind Singh5eb51532016-03-09 11:34:12 +053020#include "wmi_unified_param.h"
Pratik Gandhi67da1bb2018-01-30 19:05:41 +053021#include "qdf_module.h"
Govind Singh5eb51532016-03-09 11:34:12 +053022
Naveen Rawat26305452018-02-02 15:18:33 -080023static const wmi_host_channel_width mode_to_width[WMI_HOST_MODE_MAX] = {
24 [WMI_HOST_MODE_11A] = WMI_HOST_CHAN_WIDTH_20,
25 [WMI_HOST_MODE_11G] = WMI_HOST_CHAN_WIDTH_20,
26 [WMI_HOST_MODE_11B] = WMI_HOST_CHAN_WIDTH_20,
27 [WMI_HOST_MODE_11GONLY] = WMI_HOST_CHAN_WIDTH_20,
28 [WMI_HOST_MODE_11NA_HT20] = WMI_HOST_CHAN_WIDTH_20,
29 [WMI_HOST_MODE_11NG_HT20] = WMI_HOST_CHAN_WIDTH_20,
30 [WMI_HOST_MODE_11AC_VHT20] = WMI_HOST_CHAN_WIDTH_20,
31 [WMI_HOST_MODE_11AC_VHT20_2G] = WMI_HOST_CHAN_WIDTH_20,
32 [WMI_HOST_MODE_11NA_HT40] = WMI_HOST_CHAN_WIDTH_40,
33 [WMI_HOST_MODE_11NG_HT40] = WMI_HOST_CHAN_WIDTH_40,
34 [WMI_HOST_MODE_11AC_VHT40] = WMI_HOST_CHAN_WIDTH_40,
35 [WMI_HOST_MODE_11AC_VHT40_2G] = WMI_HOST_CHAN_WIDTH_40,
36 [WMI_HOST_MODE_11AC_VHT80] = WMI_HOST_CHAN_WIDTH_80,
37 [WMI_HOST_MODE_11AC_VHT80_2G] = WMI_HOST_CHAN_WIDTH_80,
38#if CONFIG_160MHZ_SUPPORT
39 [WMI_HOST_MODE_11AC_VHT80_80] = WMI_HOST_CHAN_WIDTH_80P80,
40 [WMI_HOST_MODE_11AC_VHT160] = WMI_HOST_CHAN_WIDTH_160,
41#endif
42
43#if SUPPORT_11AX
44 [WMI_HOST_MODE_11AX_HE20] = WMI_HOST_CHAN_WIDTH_20,
45 [WMI_HOST_MODE_11AX_HE40] = WMI_HOST_CHAN_WIDTH_40,
46 [WMI_HOST_MODE_11AX_HE80] = WMI_HOST_CHAN_WIDTH_80,
47 [WMI_HOST_MODE_11AX_HE80_80] = WMI_HOST_CHAN_WIDTH_80P80,
48 [WMI_HOST_MODE_11AX_HE160] = WMI_HOST_CHAN_WIDTH_160,
49 [WMI_HOST_MODE_11AX_HE20_2G] = WMI_HOST_CHAN_WIDTH_20,
50 [WMI_HOST_MODE_11AX_HE40_2G] = WMI_HOST_CHAN_WIDTH_40,
51 [WMI_HOST_MODE_11AX_HE80_2G] = WMI_HOST_CHAN_WIDTH_80,
52#endif
53};
54
Govind Singh5eb51532016-03-09 11:34:12 +053055/**
56 * wmi_unified_vdev_create_send() - send VDEV create command to fw
57 * @wmi_handle: wmi handle
58 * @param: pointer to hold vdev create parameter
59 * @macaddr: vdev mac address
60 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053061 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053062 */
Govind Singhb53420c2016-03-09 14:32:57 +053063QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053064 uint8_t macaddr[IEEE80211_ADDR_LEN],
65 struct vdev_create_params *param)
66{
67 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
68
69 if (wmi_handle->ops->send_vdev_create_cmd)
70 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
71 macaddr, param);
72
Govind Singhb53420c2016-03-09 14:32:57 +053073 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053074}
75
76/**
77 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
78 * @wmi_handle: wmi handle
79 * @if_id: vdev id
80 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053081 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053082 */
Govind Singhb53420c2016-03-09 14:32:57 +053083QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053084 uint8_t if_id)
85{
86 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
87
88 if (wmi_handle->ops->send_vdev_delete_cmd)
89 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
90 if_id);
91
Govind Singhb53420c2016-03-09 14:32:57 +053092 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053093}
94
95/**
96 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
97 * @wmi: wmi handle
98 * @vdev_id: vdev id
99 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530100 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530101 */
Govind Singhb53420c2016-03-09 14:32:57 +0530102QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530103 uint8_t vdev_id)
104{
105 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
106
107 if (wmi_handle->ops->send_vdev_stop_cmd)
108 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
109 vdev_id);
110
Govind Singhb53420c2016-03-09 14:32:57 +0530111 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530112}
113
114/**
115 * wmi_unified_vdev_down_send() - send vdev down command to fw
116 * @wmi: wmi handle
117 * @vdev_id: vdev id
118 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530119 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530120 */
Govind Singhb53420c2016-03-09 14:32:57 +0530121QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530122{
123 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
124
125 if (wmi_handle->ops->send_vdev_down_cmd)
126 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
127
Govind Singhb53420c2016-03-09 14:32:57 +0530128 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530129}
130
131/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530132 * wmi_unified_vdev_start_send() - send vdev start command to fw
133 * @wmi: wmi handle
134 * @vdev_id: vdev id
135 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530136 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530137 */
138QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
139 struct vdev_start_params *req)
140{
141 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
142
143 if (wmi_handle->ops->send_vdev_start_cmd)
144 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
145
146 return QDF_STATUS_E_FAILURE;
147}
148
149/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +0530150 * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
151 * @wmi: wmi handle
152 * @req: pointer to hold nac rssi request data
153 *
154 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
155 */
156QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
157 struct vdev_scan_nac_rssi_params *req)
158{
159 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
160
161 if (wmi_handle->ops->send_vdev_set_nac_rssi_cmd)
162 return wmi_handle->ops->send_vdev_set_nac_rssi_cmd(wmi_handle, req);
163
164 return QDF_STATUS_E_FAILURE;
165}
166
167/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530168 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
169 * @wmi: wmi handle
170 * @restart_params: vdev restart params
171 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530172 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530173 */
174QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
175 struct hidden_ssid_vdev_restart_params *restart_params)
176{
177 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
178
179 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
180 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
181 wmi_handle, restart_params);
182
183 return QDF_STATUS_E_FAILURE;
184}
185
186/**
Govind Singh5eb51532016-03-09 11:34:12 +0530187 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
188 * @wmi: wmi handle
189 * @peer_addr: peer mac address
190 * @param: pointer to hold peer flush tid parameter
191 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530192 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530193 */
Govind Singhb53420c2016-03-09 14:32:57 +0530194QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530195 uint8_t peer_addr[IEEE80211_ADDR_LEN],
196 struct peer_flush_params *param)
197{
198 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
199
200 if (wmi_handle->ops->send_peer_flush_tids_cmd)
201 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
202 peer_addr, param);
203
Govind Singhb53420c2016-03-09 14:32:57 +0530204 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530205}
206
207/**
208 * wmi_unified_peer_delete_send() - send PEER delete command to fw
209 * @wmi: wmi handle
210 * @peer_addr: peer mac addr
211 * @vdev_id: vdev id
212 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530213 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530214 */
Govind Singhb53420c2016-03-09 14:32:57 +0530215QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530216 uint8_t
217 peer_addr[IEEE80211_ADDR_LEN],
218 uint8_t vdev_id)
219{
220 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
221
222 if (wmi_handle->ops->send_peer_delete_cmd)
223 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
224 peer_addr, vdev_id);
225
Govind Singhb53420c2016-03-09 14:32:57 +0530226 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530227}
228
229/**
230 * wmi_set_peer_param() - set peer parameter in fw
231 * @wmi_ctx: wmi handle
232 * @peer_addr: peer mac address
233 * @param : pointer to hold peer set parameter
234 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530235 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530236 */
Govind Singhb53420c2016-03-09 14:32:57 +0530237QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530238 uint8_t peer_addr[IEEE80211_ADDR_LEN],
239 struct peer_set_params *param)
240{
241 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
242
243 if (wmi_handle->ops->send_peer_param_cmd)
244 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
245 peer_addr, param);
246
Govind Singhb53420c2016-03-09 14:32:57 +0530247 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530248}
249
250/**
251 * wmi_unified_vdev_up_send() - send vdev up command in fw
252 * @wmi: wmi handle
253 * @bssid: bssid
254 * @vdev_up_params: pointer to hold vdev up parameter
255 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530256 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530257 */
Govind Singhb53420c2016-03-09 14:32:57 +0530258QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530259 uint8_t bssid[IEEE80211_ADDR_LEN],
260 struct vdev_up_params *params)
261{
262 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
263
264 if (wmi_handle->ops->send_vdev_up_cmd)
265 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
266 params);
267
Govind Singhb53420c2016-03-09 14:32:57 +0530268 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530269}
270
271/**
272 * wmi_unified_peer_create_send() - send peer create command to fw
273 * @wmi: wmi handle
274 * @peer_addr: peer mac address
275 * @peer_type: peer type
276 * @vdev_id: vdev id
277 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530278 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530279 */
Govind Singhb53420c2016-03-09 14:32:57 +0530280QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530281 struct peer_create_params *param)
282{
283 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
284
285 if (wmi_handle->ops->send_peer_create_cmd)
286 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
287
Govind Singhb53420c2016-03-09 14:32:57 +0530288 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530289}
290
Leo Changeee40872016-09-28 13:43:36 -0700291/**
292 * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
293 * setup command to fw
294 * @wmi: wmi handle
295 * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters
296 *
297 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
298 */
299QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
300 struct rx_reorder_queue_setup_params *param)
301{
302 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
303
304 if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd)
305 return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd(
306 wmi_handle, param);
307
308 return QDF_STATUS_E_FAILURE;
309}
310
311/**
312 * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
313 * remove command to fw
314 * @wmi: wmi handle
315 * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters
316 *
317 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
318 */
319QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
320 struct rx_reorder_queue_remove_params *param)
321{
322 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
323
324 if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd)
325 return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd(
326 wmi_handle, param);
327
328 return QDF_STATUS_E_FAILURE;
329}
330
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530331#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh5eb51532016-03-09 11:34:12 +0530332/**
333 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
334 * @wmi_handle: wmi handle
335 * @value: value
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530336 * @pdev_id: pdev id to have radio context
Govind Singh5eb51532016-03-09 11:34:12 +0530337 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530338 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530339 */
Govind Singhb53420c2016-03-09 14:32:57 +0530340QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530341 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530342{
343 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
344
345 if (wmi_handle->ops->send_green_ap_ps_cmd)
346 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530347 pdev_id);
Govind Singh5eb51532016-03-09 11:34:12 +0530348
Govind Singhb53420c2016-03-09 14:32:57 +0530349 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530350}
351#else
Govind Singhb53420c2016-03-09 14:32:57 +0530352QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530353 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530354{
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530355 return QDF_STATUS_SUCCESS;
Govind Singh5eb51532016-03-09 11:34:12 +0530356}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530357#endif /* WLAN_SUPPORT_GREEN_AP */
Govind Singh5eb51532016-03-09 11:34:12 +0530358
359/**
360 * wmi_unified_pdev_utf_cmd() - send utf command to fw
361 * @wmi_handle: wmi handle
362 * @param: pointer to pdev_utf_params
363 * @mac_id: mac id to have radio context
364 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530365 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530366 */
Govind Singhb53420c2016-03-09 14:32:57 +0530367QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530368wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
369 struct pdev_utf_params *param,
370 uint8_t mac_id)
371{
372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
373
374 if (wmi_handle->ops->send_pdev_utf_cmd)
375 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
376 mac_id);
377
Govind Singhb53420c2016-03-09 14:32:57 +0530378 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530379}
380
381/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530382 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530383 * @wmi_handle: wmi handle
384 * @param: pointer to pdev parameter
385 * @mac_id: radio context
386 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530387 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
388 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530389 */
Govind Singhb53420c2016-03-09 14:32:57 +0530390QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530391wmi_unified_pdev_param_send(void *wmi_hdl,
392 struct pdev_params *param,
393 uint8_t mac_id)
394{
395 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
396
397 if (wmi_handle->ops->send_pdev_param_cmd)
398 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
399 mac_id);
400
Govind Singhb53420c2016-03-09 14:32:57 +0530401 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530402}
403
404/**
405 * wmi_unified_suspend_send() - WMI suspend function
406 * @param wmi_handle : handle to WMI.
407 * @param param : pointer to hold suspend parameter
408 * @mac_id: radio context
409 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530410 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530411 */
Govind Singhb53420c2016-03-09 14:32:57 +0530412QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530413 struct suspend_params *param,
414 uint8_t mac_id)
415{
416 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
417
418 if (wmi_handle->ops->send_suspend_cmd)
419 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
420 mac_id);
421
Govind Singhb53420c2016-03-09 14:32:57 +0530422 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530423}
424
425/**
426 * wmi_unified_resume_send - WMI resume function
427 * @param wmi_handle : handle to WMI.
428 * @mac_id: radio context
429 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530430 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530431 */
Govind Singhb53420c2016-03-09 14:32:57 +0530432QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530433 uint8_t mac_id)
434{
435 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
436
437 if (wmi_handle->ops->send_resume_cmd)
438 return wmi_handle->ops->send_resume_cmd(wmi_handle,
439 mac_id);
440
Govind Singhb53420c2016-03-09 14:32:57 +0530441 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530442}
443
Will Huang422ac9a2017-11-17 13:19:16 +0800444#ifdef FEATURE_WLAN_D0WOW
445/**
446 * wmi_unified_d0wow_enable_send() - WMI d0 wow enable function
447 * @param wmi_handle: handle to WMI.
448 * @mac_id: radio context
449 *
450 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
451 */
452QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
453 uint8_t mac_id)
454{
455 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
456
457 if (wmi_handle->ops->send_d0wow_enable_cmd)
458 return wmi_handle->ops->send_d0wow_enable_cmd(
459 wmi_handle, mac_id);
460
461 return QDF_STATUS_E_FAILURE;
462}
463
464/**
465 * wmi_unified_d0wow_disable_send() - WMI d0 wow disable function
466 * @param wmi_handle: handle to WMI.
467 * @mac_id: radio context
468 *
469 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
470 */
471QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
472 uint8_t mac_id)
473{
474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
475
476 if (wmi_handle->ops->send_d0wow_disable_cmd)
477 return wmi_handle->ops->send_d0wow_disable_cmd(
478 wmi_handle, mac_id);
479
480 return QDF_STATUS_E_FAILURE;
481}
482#endif
483
Govind Singh5eb51532016-03-09 11:34:12 +0530484/**
485 * wmi_unified_wow_enable_send() - WMI wow enable function
486 * @param wmi_handle : handle to WMI.
487 * @param param : pointer to hold wow enable parameter
488 * @mac_id: radio context
489 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530490 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530491 */
Govind Singhb53420c2016-03-09 14:32:57 +0530492QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530493 struct wow_cmd_params *param,
494 uint8_t mac_id)
495{
496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
497
498 if (wmi_handle->ops->send_wow_enable_cmd)
499 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
500 mac_id);
501
Govind Singhb53420c2016-03-09 14:32:57 +0530502 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530503}
504
505/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530506 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
507 * @param wmi_hdl : handle to WMI.
508 *
509 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
510 */
511QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
512{
513 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
514
515 if (wmi_handle->ops->send_wow_wakeup_cmd)
516 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
517
518 return QDF_STATUS_E_FAILURE;
519}
520
521/**
522 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
523 * @param wmi_handle : handle to WMI.
524 * @param: pointer to wow wakeup event parameter structure
525 *
526 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
527 */
528QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
529 struct wow_add_wakeup_params *param)
530{
531 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
532
533 if (wmi->ops->send_wow_add_wakeup_event_cmd)
534 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
535 param);
536
537 return QDF_STATUS_E_FAILURE;
538}
539
540/**
541 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
542 * @param wmi_handle : handle to WMI.
543 * @param: pointer to wow wakeup pattern parameter structure
544 *
545 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
546 */
547QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
548 struct wow_add_wakeup_pattern_params *param)
549{
550 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
551
552 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
553 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
554
555 return QDF_STATUS_E_FAILURE;
556}
557
558/**
559 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
560 * @param wmi_handle : handle to WMI.
561 * @param: pointer to wow wakeup pattern parameter structure
562 *
563 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
564 */
565QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
566 struct wow_remove_wakeup_pattern_params *param)
567{
568 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
569
570 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
571 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
572
573 return QDF_STATUS_E_FAILURE;
574}
575
576/**
Govind Singh5eb51532016-03-09 11:34:12 +0530577 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
578 * @wma_ctx: wma context
579 * @peer_addr: peer mac address
580 * @param: pointer to ap_ps parameter structure
581 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530582 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530583 */
Govind Singhb53420c2016-03-09 14:32:57 +0530584QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530585 uint8_t *peer_addr,
586 struct ap_ps_params *param)
587{
588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
589
590 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
591 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
592 peer_addr,
593 param);
594
Govind Singhb53420c2016-03-09 14:32:57 +0530595 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530596}
597
598/**
599 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
600 * @wma_ctx: wma context
601 * @peer_addr: peer mac address
602 * @param: pointer to sta_ps parameter structure
603 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530604 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530605 */
Govind Singhb53420c2016-03-09 14:32:57 +0530606QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530607 struct sta_ps_params *param)
608{
609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
610
611 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
612 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
613 param);
614
Govind Singhb53420c2016-03-09 14:32:57 +0530615 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530616}
617
618/**
619 * wmi_crash_inject() - inject fw crash
620 * @wma_handle: wma handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -0700621 * @param: ponirt to crash inject parameter structure
Govind Singh5eb51532016-03-09 11:34:12 +0530622 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530623 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530624 */
Govind Singhb53420c2016-03-09 14:32:57 +0530625QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530626 struct crash_inject *param)
627{
628 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
629
630 if (wmi_handle->ops->send_crash_inject_cmd)
631 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
632 param);
633
Govind Singhb53420c2016-03-09 14:32:57 +0530634 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530635}
636
Wen Gongca174012018-04-20 16:56:28 +0800637#ifdef FEATURE_FW_LOG_PARSING
Govind Singh5eb51532016-03-09 11:34:12 +0530638/**
639 * wmi_unified_dbglog_cmd_send() - set debug log level
640 * @param wmi_handle : handle to WMI.
641 * @param param : pointer to hold dbglog level parameter
642 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530643 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530644 */
Govind Singhb53420c2016-03-09 14:32:57 +0530645QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530646wmi_unified_dbglog_cmd_send(void *wmi_hdl,
647 struct dbglog_params *dbglog_param)
648{
649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
650
651 if (wmi_handle->ops->send_dbglog_cmd)
652 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
653 dbglog_param);
654
Govind Singhb53420c2016-03-09 14:32:57 +0530655 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530656}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +0530657qdf_export_symbol(wmi_unified_dbglog_cmd_send);
Wen Gongca174012018-04-20 16:56:28 +0800658#endif
Govind Singh5eb51532016-03-09 11:34:12 +0530659
660/**
661 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
662 * @param wmi_handle : handle to WMI.
663 * @param macaddr : MAC address
664 * @param param : pointer to hold vdev set parameter
665 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530666 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530667 */
Govind Singhb53420c2016-03-09 14:32:57 +0530668QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530669 struct vdev_set_params *param)
670{
671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
672
673 if (wmi_handle->ops->send_vdev_set_param_cmd)
674 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
675 param);
676
Govind Singhb53420c2016-03-09 14:32:57 +0530677 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530678}
679
680/**
681 * wmi_unified_stats_request_send() - WMI request stats function
682 * @param wmi_handle : handle to WMI.
683 * @param macaddr : MAC address
684 * @param param : pointer to hold stats request parameter
685 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530686 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530687 */
Govind Singhb53420c2016-03-09 14:32:57 +0530688QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530689 uint8_t macaddr[IEEE80211_ADDR_LEN],
690 struct stats_request_params *param)
691{
692 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
693
694 if (wmi_handle->ops->send_stats_request_cmd)
695 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
696 macaddr, param);
697
Govind Singhb53420c2016-03-09 14:32:57 +0530698 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530699}
700
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530701#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530702/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530703 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530704 * @param wmi_handle : handle to WMI.
705 * @param macaddr : MAC address
706 * @param param : pointer to hold stats request parameter
707 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530708 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530709 */
Govind Singhb53420c2016-03-09 14:32:57 +0530710QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530711 uint8_t macaddr[IEEE80211_ADDR_LEN],
712 struct packet_enable_params *param)
713{
714 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
715
716 if (wmi_handle->ops->send_packet_log_enable_cmd)
717 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
718 macaddr, param);
719
Govind Singhb53420c2016-03-09 14:32:57 +0530720 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530721}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530722#else
723/**
724 * wmi_unified_packet_log_enable_send() - WMI request stats function
725 * @param wmi_handle : handle to WMI.
726 * @param macaddr : MAC address
727 * @param param : pointer to hold stats request parameter
728 *
729 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
730 */
731QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700732 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530733{
734 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
735
736 if (wmi_handle->ops->send_packet_log_enable_cmd)
737 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700738 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530739
740 return QDF_STATUS_E_FAILURE;
741}
742
743#endif
744/**
745 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
746 * @param wmi_handle : handle to WMI.
747 * @param PKTLOG_EVENT : packet log event
748 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
749 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700750QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530751{
752 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
753
754 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700755 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
756 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530757
758 return QDF_STATUS_E_FAILURE;
759}
Govind Singh5eb51532016-03-09 11:34:12 +0530760
761/**
762 * wmi_unified_beacon_send_cmd() - WMI beacon send function
763 * @param wmi_handle : handle to WMI.
764 * @param macaddr : MAC address
765 * @param param : pointer to hold beacon send cmd parameter
766 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530767 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530768 */
Govind Singhb53420c2016-03-09 14:32:57 +0530769QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530770 struct beacon_params *param)
771{
772 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
773
774 if (wmi_handle->ops->send_beacon_send_cmd)
775 return wmi_handle->ops->send_beacon_send_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530776 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530777
Govind Singhb53420c2016-03-09 14:32:57 +0530778 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530779}
780
781/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530782 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
783 * @param wmi_handle : handle to WMI.
784 * @param macaddr : MAC address
785 * @param param : pointer to hold beacon send cmd parameter
786 *
787 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
788 */
789QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
790 struct beacon_tmpl_params *param)
791{
792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
793
794 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
795 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
796 param);
797
798 return QDF_STATUS_E_FAILURE;
799}
800/**
Govind Singh5eb51532016-03-09 11:34:12 +0530801 * wmi_unified_peer_assoc_send() - WMI peer assoc function
802 * @param wmi_handle : handle to WMI.
803 * @param macaddr : MAC address
804 * @param param : pointer to peer assoc parameter
805 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530806 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530807 */
Govind Singhb53420c2016-03-09 14:32:57 +0530808QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530809 struct peer_assoc_params *param)
810{
811 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
812
813 if (wmi_handle->ops->send_peer_assoc_cmd)
814 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530815 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530816
Govind Singhb53420c2016-03-09 14:32:57 +0530817 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530818}
819
820/**
821 * wmi_unified_scan_start_cmd_send() - WMI scan start function
822 * @param wmi_handle : handle to WMI.
823 * @param macaddr : MAC address
824 * @param param : pointer to hold scan start cmd parameter
825 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530826 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530827 */
Govind Singhb53420c2016-03-09 14:32:57 +0530828QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530829 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530830{
831 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
832
833 if (wmi_handle->ops->send_scan_start_cmd)
834 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530835 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530836
Govind Singhb53420c2016-03-09 14:32:57 +0530837 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530838}
839
840/**
841 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
842 * @param wmi_handle : handle to WMI.
843 * @param macaddr : MAC address
844 * @param param : pointer to hold scan start cmd parameter
845 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530846 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530847 */
Govind Singhb53420c2016-03-09 14:32:57 +0530848QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530849 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530850{
851 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
852
853 if (wmi_handle->ops->send_scan_stop_cmd)
854 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530855 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530856
Govind Singhb53420c2016-03-09 14:32:57 +0530857 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530858}
859
860/**
861 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
862 * @param wmi_handle : handle to WMI.
863 * @param macaddr : MAC address
864 * @param param : pointer to hold scan channel list parameter
865 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530866 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530867 */
Govind Singhb53420c2016-03-09 14:32:57 +0530868QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530869 struct scan_chan_list_params *param)
870{
871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
872
873 if (wmi_handle->ops->send_scan_chan_list_cmd)
874 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530875 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530876
Govind Singhb53420c2016-03-09 14:32:57 +0530877 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530878}
Govind Singh427ee5a2016-02-26 18:09:36 +0530879
880/**
881 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
882 * @wmi_hdl : handle to WMI.
883 * @param : pointer to hold mgmt cmd parameter
884 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530885 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530886 */
Govind Singhb53420c2016-03-09 14:32:57 +0530887QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530888 struct wmi_mgmt_params *param)
889{
890 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
891
892 if (wmi_handle->ops->send_mgmt_cmd)
893 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
894 param);
895
Govind Singhb53420c2016-03-09 14:32:57 +0530896 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530897}
898
899/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530900 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
901 * @wmi_hdl : handle to WMI.
902 * @param : pointer to hold offchan data cmd parameter
903 *
904 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
905 */
906QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
907 struct wmi_offchan_data_tx_params *param)
908{
909 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
910
911 if (wmi_handle->ops->send_offchan_data_tx_cmd)
912 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
913 param);
914
915 return QDF_STATUS_E_FAILURE;
916}
917
918/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530919 * wmi_unified_modem_power_state() - set modem power state to fw
920 * @wmi_hdl: wmi handle
921 * @param_value: parameter value
922 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530923 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530924 */
Govind Singhb53420c2016-03-09 14:32:57 +0530925QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530926 uint32_t param_value)
927{
928 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
929
930 if (wmi_handle->ops->send_modem_power_state_cmd)
931 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
932 param_value);
933
Govind Singhb53420c2016-03-09 14:32:57 +0530934 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530935}
936
937/**
938 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
939 * @wmi_hdl: wmi handle
940 * @vdev_id: vdev id
941 * @val: value
942 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530943 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530944 */
Govind Singhb53420c2016-03-09 14:32:57 +0530945QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530946 uint32_t vdev_id, uint8_t val)
947{
948 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
949
950 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
951 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
952 vdev_id, val);
953
Govind Singhb53420c2016-03-09 14:32:57 +0530954 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530955}
956
957/**
958 * wmi_set_mimops() - set MIMO powersave
959 * @wmi_hdl: wmi handle
960 * @vdev_id: vdev id
961 * @value: value
962 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530964 */
Govind Singhb53420c2016-03-09 14:32:57 +0530965QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530966{
967 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
968
969 if (wmi_handle->ops->send_set_mimops_cmd)
970 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
971 vdev_id, value);
972
Govind Singhb53420c2016-03-09 14:32:57 +0530973 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530974}
975
976/**
977 * wmi_set_smps_params() - set smps params
978 * @wmi_hdl: wmi handle
979 * @vdev_id: vdev id
980 * @value: value
981 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530982 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530983 */
Govind Singhb53420c2016-03-09 14:32:57 +0530984QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530985 int value)
986{
987 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
988
989 if (wmi_handle->ops->send_set_smps_params_cmd)
990 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
991 vdev_id, value);
992
Govind Singhb53420c2016-03-09 14:32:57 +0530993 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530994}
995
996
997/**
998 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
999 * @wmi_hdl: wmi handle
1000 * @opps: p2p opp power save parameters
1001 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301002 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +05301003 */
Govind Singhb53420c2016-03-09 14:32:57 +05301004QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +05301005 struct p2p_ps_params *oppps)
1006{
1007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1008
1009 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
1010 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
1011 oppps);
1012
Govind Singhb53420c2016-03-09 14:32:57 +05301013 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301014}
1015
1016/**
1017 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
1018 * @wmi_hdl: wmi handle
1019 * @noa: p2p power save parameters
1020 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301021 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +05301022 */
Govind Singhb53420c2016-03-09 14:32:57 +05301023QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +05301024 struct p2p_ps_params *noa)
1025{
1026 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1027
1028 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
1029 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
1030 noa);
1031
Govind Singhb53420c2016-03-09 14:32:57 +05301032 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301033}
1034
Wu Gaocd3a8512017-03-13 20:17:34 +08001035#ifdef CONVERGED_P2P_ENABLE
1036/**
1037 * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
1038 * @wmi_hdl: wmi handle
1039 * @param: p2p listen offload start parameters
1040 *
1041 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1042 */
1043QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
1044 struct p2p_lo_start *param)
1045{
1046 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1047
1048 if (!wmi_handle) {
1049 WMI_LOGE("wmi handle is null");
1050 return QDF_STATUS_E_INVAL;
1051 }
1052
1053 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1054 return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
1055 param);
1056
1057 return QDF_STATUS_E_FAILURE;
1058}
1059
1060/**
1061 * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
1062 * @wmi_hdl: wmi handle
1063 * @vdev_id: vdev id
1064 *
1065 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1066 */
1067QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
1068{
1069 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1070
1071 if (!wmi_handle) {
1072 WMI_LOGE("wmi handle is null");
1073 return QDF_STATUS_E_INVAL;
1074 }
1075
1076 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1077 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
1078 vdev_id);
1079
1080 return QDF_STATUS_E_FAILURE;
1081}
1082#endif /* End of CONVERGED_P2P_ENABLE */
1083
Govind Singh427ee5a2016-02-26 18:09:36 +05301084/**
1085 * wmi_get_temperature() - get pdev temperature req
1086 * @wmi_hdl: wmi handle
1087 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301088 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301089 */
Govind Singhb53420c2016-03-09 14:32:57 +05301090QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +05301091{
1092 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1093
1094 if (wmi_handle->ops->send_get_temperature_cmd)
1095 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
1096
Govind Singhb53420c2016-03-09 14:32:57 +05301097 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301098}
1099
1100/**
1101 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1102 * @wmi_hdl: wmi handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -07001103 * @end_set_sta_ps_mode_cmd: cmd parameter strcture
Govind Singh427ee5a2016-02-26 18:09:36 +05301104 *
1105 * This function sets the trigger
1106 * uapsd params such as service interval, delay interval
1107 * and suspend interval which will be used by the firmware
1108 * to send trigger frames periodically when there is no
1109 * traffic on the transmit side.
1110 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301111 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301112 */
Govind Singhb53420c2016-03-09 14:32:57 +05301113QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +05301114wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
1115 struct sta_uapsd_trig_params *param)
1116{
1117 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1118
1119 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
1120 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
1121 param);
1122
Govind Singhb53420c2016-03-09 14:32:57 +05301123 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301124}
Govind Singh2edc80f2016-03-01 15:30:53 +05301125
Zhang Qian11c0de32018-01-05 16:50:53 +08001126#ifdef WLAN_FEATURE_DSRC
1127QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301128 struct ocb_timing_advert_param *timing_advert)
1129{
Zhang Qian11c0de32018-01-05 16:50:53 +08001130 if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd)
1131 return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl,
1132 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301133
Govind Singhb53420c2016-03-09 14:32:57 +05301134 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301135}
1136
Zhang Qian11c0de32018-01-05 16:50:53 +08001137QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301138 struct ocb_timing_advert_param *timing_advert)
1139{
Zhang Qian11c0de32018-01-05 16:50:53 +08001140 if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd)
1141 return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl,
1142 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301143
Govind Singhb53420c2016-03-09 14:32:57 +05301144 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301145}
1146
Zhang Qian11c0de32018-01-05 16:50:53 +08001147QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl,
1148 struct ocb_utc_param *utc)
Govind Singh2edc80f2016-03-01 15:30:53 +05301149{
Zhang Qian11c0de32018-01-05 16:50:53 +08001150 if (wmi_hdl->ops->send_ocb_set_utc_time_cmd)
1151 return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc);
Govind Singh2edc80f2016-03-01 15:30:53 +05301152
Govind Singhb53420c2016-03-09 14:32:57 +05301153 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301154}
1155
Zhang Qian11c0de32018-01-05 16:50:53 +08001156QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl,
1157 struct ocb_get_tsf_timer_param *req)
Govind Singh2edc80f2016-03-01 15:30:53 +05301158{
Zhang Qian11c0de32018-01-05 16:50:53 +08001159 if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd)
1160 return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl,
1161 req->vdev_id);
Govind Singh2edc80f2016-03-01 15:30:53 +05301162
Govind Singhb53420c2016-03-09 14:32:57 +05301163 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301164}
1165
Zhang Qian11c0de32018-01-05 16:50:53 +08001166QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl,
1167 struct ocb_dcc_get_stats_param *get_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301168{
Zhang Qian11c0de32018-01-05 16:50:53 +08001169 if (wmi_hdl->ops->send_dcc_get_stats_cmd)
1170 return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl,
1171 get_stats_param);
Govind Singh2edc80f2016-03-01 15:30:53 +05301172
Govind Singhb53420c2016-03-09 14:32:57 +05301173 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301174}
1175
Zhang Qian11c0de32018-01-05 16:50:53 +08001176QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl,
1177 struct ocb_dcc_clear_stats_param *clear_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301178{
Zhang Qian11c0de32018-01-05 16:50:53 +08001179 if (wmi_hdl->ops->send_dcc_clear_stats_cmd)
1180 return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl,
1181 clear_stats_param->vdev_id,
1182 clear_stats_param->dcc_stats_bitmap);
Govind Singh2edc80f2016-03-01 15:30:53 +05301183
Govind Singhb53420c2016-03-09 14:32:57 +05301184 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301185}
1186
Zhang Qian11c0de32018-01-05 16:50:53 +08001187QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl,
1188 struct ocb_dcc_update_ndl_param *update_ndl_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301189{
Zhang Qian11c0de32018-01-05 16:50:53 +08001190 if (wmi_hdl->ops->send_dcc_update_ndl_cmd)
1191 return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301192 update_ndl_param);
1193
Govind Singhb53420c2016-03-09 14:32:57 +05301194 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301195}
1196
Zhang Qian11c0de32018-01-05 16:50:53 +08001197QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl,
1198 struct ocb_config *config)
Govind Singh2edc80f2016-03-01 15:30:53 +05301199{
Zhang Qian11c0de32018-01-05 16:50:53 +08001200 if (wmi_hdl->ops->send_ocb_set_config_cmd)
1201 return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl,
1202 config);
Govind Singh2edc80f2016-03-01 15:30:53 +05301203
Govind Singhb53420c2016-03-09 14:32:57 +05301204 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301205}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301206
Zhang Qian11c0de32018-01-05 16:50:53 +08001207QDF_STATUS
1208wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl,
1209 void *evt_buf,
1210 uint32_t *status)
1211{
1212 if (wmi_hdl->ops->extract_ocb_chan_config_resp)
1213 return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl,
1214 evt_buf,
1215 status);
1216
1217 return QDF_STATUS_E_FAILURE;
1218}
1219
1220QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl,
1221 void *evt_buf,
1222 struct ocb_get_tsf_timer_response *resp)
1223{
1224 if (wmi_hdl->ops->extract_ocb_tsf_timer)
1225 return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl,
1226 evt_buf,
1227 resp);
1228
1229 return QDF_STATUS_E_FAILURE;
1230}
1231
1232QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl,
1233 void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
1234{
1235 if (wmi_hdl->ops->extract_dcc_update_ndl_resp)
1236 return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl,
1237 evt_buf,
1238 resp);
1239
1240 return QDF_STATUS_E_FAILURE;
1241}
1242
1243QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl,
1244 void *evt_buf,
1245 struct ocb_dcc_get_stats_response **resp)
1246{
1247 if (wmi_hdl->ops->extract_dcc_stats)
1248 return wmi_hdl->ops->extract_dcc_stats(wmi_hdl,
1249 evt_buf,
1250 resp);
1251
1252 return QDF_STATUS_E_FAILURE;
1253}
1254#endif
1255
Govind Singh17a9cfa2016-03-01 15:54:59 +05301256/**
1257 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1258 * @wmi_handle: wmi handle
1259 * @mcc_adaptive_scheduler: enable/disable
1260 *
1261 * This function enable/disable mcc adaptive scheduler in fw.
1262 *
Jeff Johnsoneb83ef02018-05-06 00:09:31 -07001263 * Return: QDF_STATUS_SUCCESS for success or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301264 */
Govind Singhb53420c2016-03-09 14:32:57 +05301265QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001266 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1267 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301268{
1269 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1270
1271 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1272 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001273 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301274
Govind Singhb53420c2016-03-09 14:32:57 +05301275 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301276}
1277
1278/**
1279 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1280 * @wmi: wmi handle
1281 * @mcc_channel: mcc channel
1282 * @mcc_channel_time_latency: MCC channel time latency.
1283 *
1284 * Currently used to set time latency for an MCC vdev/adapter using operating
1285 * channel of it and channel number. The info is provided run time using
1286 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1287 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301288 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301289 */
Govind Singhb53420c2016-03-09 14:32:57 +05301290QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301291 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1292{
1293 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1294
1295 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1296 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1297 mcc_channel_freq,
1298 mcc_channel_time_latency);
1299
Govind Singhb53420c2016-03-09 14:32:57 +05301300 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301301}
1302
1303/**
1304 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1305 * @wmi: wmi handle
1306 * @adapter_1_chan_number: adapter 1 channel number
1307 * @adapter_1_quota: adapter 1 quota
1308 * @adapter_2_chan_number: adapter 2 channel number
1309 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301311 */
Govind Singhb53420c2016-03-09 14:32:57 +05301312QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301313 uint32_t adapter_1_chan_freq,
1314 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301315{
1316 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1317
1318 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1319 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1320 adapter_1_chan_freq,
1321 adapter_1_quota,
1322 adapter_2_chan_freq);
1323
Govind Singhb53420c2016-03-09 14:32:57 +05301324 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301325}
1326
1327/**
1328 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1329 * @wmi_handle: Pointer to wmi handle
1330 * @thermal_info: Thermal command information
1331 *
1332 * This function sends the thermal management command
1333 * to the firmware
1334 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301335 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301336 */
Govind Singhb53420c2016-03-09 14:32:57 +05301337QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301338 struct thermal_cmd_params *thermal_info)
1339{
1340 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1341
1342 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1343 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1344 thermal_info);
1345
Govind Singhb53420c2016-03-09 14:32:57 +05301346 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301347}
1348
1349
1350/**
1351 * wmi_unified_lro_config_cmd() - process the LRO config command
1352 * @wmi: Pointer to wmi handle
1353 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1354 *
1355 * This function sends down the LRO configuration parameters to
1356 * the firmware to enable LRO, sets the TCP flags and sets the
1357 * seed values for the toeplitz hash generation
1358 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301359 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301360 */
Govind Singhb53420c2016-03-09 14:32:57 +05301361QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301362 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1363{
1364 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1365
1366 if (wmi_handle->ops->send_lro_config_cmd)
1367 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1368 wmi_lro_cmd);
1369
Govind Singhb53420c2016-03-09 14:32:57 +05301370 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301371}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301372
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301373#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301374/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301375 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1376 * @wmi_hdl: Pointer to wmi handle
1377 * @rate_report_params: Pointer to peer rate report parameters
1378 *
1379 *
1380 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1381 */
1382QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1383 struct wmi_peer_rate_report_params *rate_report_params)
1384{
1385 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1386
1387 if (wmi_handle->ops->send_peer_rate_report_cmd)
1388 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1389 rate_report_params);
1390
1391 return QDF_STATUS_E_FAILURE;
1392}
1393
1394/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301395 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1396 * @wmi_hdl: wmi handle
1397 * @param: bcn ll cmd parameter
1398 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301399 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301400 */
Govind Singhb53420c2016-03-09 14:32:57 +05301401QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301402 wmi_bcn_send_from_host_cmd_fixed_param *param)
1403{
1404 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1405
1406 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1407 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1408 param);
1409
Govind Singhb53420c2016-03-09 14:32:57 +05301410 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301411}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301412#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301413
1414/**
1415 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1416 * @wmi_hdl: wmi handle
1417 * @vdev_id: vdev id
1418 * @max_retries: max retries
1419 * @retry_interval: retry interval
1420 * This function sets sta query related parameters in fw.
1421 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301422 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301423 */
1424
Govind Singhb53420c2016-03-09 14:32:57 +05301425QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301426 uint8_t vdev_id, uint32_t max_retries,
1427 uint32_t retry_interval)
1428{
1429 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1430
1431 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1432 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1433 vdev_id, max_retries,
1434 retry_interval);
1435
Govind Singhb53420c2016-03-09 14:32:57 +05301436 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301437}
1438
1439/**
1440 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1441 * @wmi_hdl: wmi handle
1442 * @params: sta keep alive parameter
1443 *
1444 * This function sets keep alive related parameters in fw.
1445 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301446 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301447 */
Govind Singhb53420c2016-03-09 14:32:57 +05301448QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301449 struct sta_params *params)
1450{
1451 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1452
1453 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1454 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1455 params);
1456
Govind Singhb53420c2016-03-09 14:32:57 +05301457 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301458}
1459
1460/**
1461 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1462 * @wmi_hdl: wmi handle
1463 * @if_id: vdev id
1464 * @gtx_info: GTX config params
1465 *
1466 * This function set GTX related params in firmware.
1467 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301468 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301469 */
Govind Singhb53420c2016-03-09 14:32:57 +05301470QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301471 struct wmi_gtx_config *gtx_info)
1472{
1473 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1474
1475 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1476 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1477 if_id, gtx_info);
1478
Govind Singhb53420c2016-03-09 14:32:57 +05301479 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301480}
1481
1482/**
1483 * wmi_unified_process_update_edca_param() - update EDCA params
1484 * @wmi_hdl: wmi handle
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301485 * @vdev_id: vdev id.
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001486 * @mu_edca_param: mu_edca_param.
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301487 * @wmm_vparams: edca parameters
Govind Singh4eacd2b2016-03-07 14:24:22 +05301488 *
1489 * This function updates EDCA parameters to the target
1490 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301492 */
Govind Singhb53420c2016-03-09 14:32:57 +05301493QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001494 uint8_t vdev_id, bool mu_edca_param,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301495 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC])
Govind Singh4eacd2b2016-03-07 14:24:22 +05301496{
1497 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1498
1499 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1500 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001501 vdev_id, mu_edca_param, wmm_vparams);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301502
Govind Singhb53420c2016-03-09 14:32:57 +05301503 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301504}
1505
1506/**
1507 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1508 * @wmi_hdl: wmi handle
1509 * @vdev_id: vdev id
1510 * @probe_rsp_info: probe response info
1511 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301512 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301513 */
Govind Singhb53420c2016-03-09 14:32:57 +05301514QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301515 uint8_t vdev_id,
Krunal Soni89426862017-11-14 15:42:48 -08001516 struct wmi_probe_resp_params *probe_rsp_info)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301517{
1518 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1519
1520 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1521 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
Krunal Soni89426862017-11-14 15:42:48 -08001522 vdev_id, probe_rsp_info);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301523
Govind Singhb53420c2016-03-09 14:32:57 +05301524 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301525}
1526
1527/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301528 * wmi_unified_setup_install_key_cmd - send key to install to fw
1529 * @wmi_hdl: wmi handle
1530 * @key_params: key parameters
1531 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301532 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301533 */
1534QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1535 struct set_key_params *key_params)
1536{
1537 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1538
1539 if (wmi_handle->ops->send_setup_install_key_cmd)
1540 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1541 key_params);
1542
1543 return QDF_STATUS_E_FAILURE;
1544}
1545
1546/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301547 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1548 * @wma_handle: wma handle
1549 * @vdev_id: vdev id
1550 * @p2p_ie: p2p IE
1551 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301552 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301553 */
Govind Singhb53420c2016-03-09 14:32:57 +05301554QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Vivekc5823092018-03-22 23:27:21 +05301555 uint32_t vdev_id, uint8_t *p2p_ie)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301556{
1557 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1558
1559 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1560 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1561 vdev_id, p2p_ie);
1562
Govind Singhb53420c2016-03-09 14:32:57 +05301563 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301564}
1565
1566/**
1567 * wmi_unified_set_gateway_params_cmd() - set gateway parameters
1568 * @wmi_hdl: wmi handle
1569 * @req: gateway parameter update request structure
1570 *
1571 * This function reads the incoming @req and fill in the destination
1572 * WMI structure and sends down the gateway configs down to the firmware
1573 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301574 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1575 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301576 */
Govind Singhb53420c2016-03-09 14:32:57 +05301577QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301578 struct gateway_update_req_param *req)
1579{
1580 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1581
1582 if (wmi_handle->ops->send_set_gateway_params_cmd)
1583 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1584 req);
1585
Govind Singhb53420c2016-03-09 14:32:57 +05301586 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301587}
1588
1589/**
1590 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1591 * @wmi_hdl: wmi handle
1592 * @req: rssi monitoring request structure
1593 *
1594 * This function reads the incoming @req and fill in the destination
1595 * WMI structure and send down the rssi monitoring configs down to the firmware
1596 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301597 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1598 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301599 */
Govind Singhb53420c2016-03-09 14:32:57 +05301600QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301601 struct rssi_monitor_param *req)
1602{
1603 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1604
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301605 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301606 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1607 req);
1608
Govind Singhb53420c2016-03-09 14:32:57 +05301609 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301610}
1611
1612/**
1613 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1614 * @wmi_hdl: wmi handle
1615 * @psetoui: OUI parameters
1616 *
1617 * set scan probe OUI parameters in firmware
1618 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301619 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301620 */
Govind Singhb53420c2016-03-09 14:32:57 +05301621QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301622 struct scan_mac_oui *psetoui)
1623{
1624 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1625
1626 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1627 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1628 psetoui);
1629
Govind Singhb53420c2016-03-09 14:32:57 +05301630 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301631}
1632
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301633#ifdef CONFIG_MCL
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301634/**
1635 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1636 * @wmi_hdl: wmi handle
1637 * @scan_cmd_fp: scan related parameters
1638 * @roam_req: roam related parameters
1639 *
1640 * This function reads the incoming @roam_req and fill in the destination
1641 * WMI structure and send down the roam scan configs down to the firmware
1642 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301643 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301644 */
1645QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1646 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1647 struct roam_offload_scan_params *roam_req)
1648{
1649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1650
1651 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1652 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1653 wmi_handle, scan_cmd_fp, roam_req);
1654
1655 return QDF_STATUS_E_FAILURE;
1656}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301657#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301658
1659/**
1660 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1661 * parameters
1662 * @wmi_hdl: wmi handle
1663 * @roam_req: roam rssi related parameters
1664 *
1665 * This function reads the incoming @roam_req and fill in the destination
1666 * WMI structure and send down the roam scan rssi configs down to the firmware
1667 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301668 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301669 */
1670QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1671 struct roam_offload_scan_rssi_params
1672 *roam_req)
1673{
1674 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1675
1676 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1677 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1678 wmi_handle, roam_req);
1679
1680 return QDF_STATUS_E_FAILURE;
1681}
1682
Varun Reddy Yeturu412601c2017-07-20 09:45:01 -07001683QDF_STATUS wmi_unified_roam_mawc_params_cmd(
1684 void *wmi_hdl, struct wmi_mawc_roam_params *params)
1685{
1686 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1687
1688 if (wmi_handle->ops->send_roam_mawc_params_cmd)
1689 return wmi_handle->ops->send_roam_mawc_params_cmd(
1690 wmi_handle, params);
1691
1692 return QDF_STATUS_E_FAILURE;
1693}
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301694/**
1695 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1696 * blacklist and preferred list
1697 * @wmi_hdl: wmi handle
1698 * @roam_req: roam scan lists related parameters
1699 *
1700 * This function reads the incoming @roam_req and fill in the destination
1701 * WMI structure and send down the different roam scan lists down to the fw
1702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301703 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301704 */
1705QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1706 struct roam_scan_filter_params *roam_req)
1707{
1708 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1709
1710 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1711 return wmi_handle->ops->send_roam_scan_filter_cmd(
1712 wmi_handle, roam_req);
1713
1714 return QDF_STATUS_E_FAILURE;
1715}
1716
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301717#ifdef IPA_OFFLOAD
Govind Singh4eacd2b2016-03-07 14:24:22 +05301718/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1719 * @wmi_hdl: wmi handle
1720 * @ipa_offload: ipa offload control parameter
1721 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301722 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1723 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301724 */
Govind Singhb53420c2016-03-09 14:32:57 +05301725QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301726 struct ipa_uc_offload_control_params *ipa_offload)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301727{
1728 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1729
1730 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1731 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1732 ipa_offload);
1733
Govind Singhb53420c2016-03-09 14:32:57 +05301734 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301735}
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301736#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301737
Govind Singh4eacd2b2016-03-07 14:24:22 +05301738
1739/**
1740 * wmi_unified_plm_stop_cmd() - plm stop request
1741 * @wmi_hdl: wmi handle
1742 * @plm: plm request parameters
1743 *
1744 * This function request FW to stop PLM.
1745 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301746 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301747 */
Govind Singhb53420c2016-03-09 14:32:57 +05301748QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301749 const struct plm_req_params *plm)
1750{
1751 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1752
1753 if (wmi_handle->ops->send_plm_stop_cmd)
1754 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1755 plm);
1756
Govind Singhb53420c2016-03-09 14:32:57 +05301757 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301758}
1759
1760/**
1761 * wmi_unified_plm_start_cmd() - plm start request
1762 * @wmi_hdl: wmi handle
1763 * @plm: plm request parameters
1764 *
1765 * This function request FW to start PLM.
1766 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301767 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301768 */
Govind Singhb53420c2016-03-09 14:32:57 +05301769QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301770 const struct plm_req_params *plm,
1771 uint32_t *gchannel_list)
1772{
1773 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1774
1775 if (wmi_handle->ops->send_plm_start_cmd)
1776 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1777 plm, gchannel_list);
1778
Govind Singhb53420c2016-03-09 14:32:57 +05301779 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301780}
1781
1782/**
1783 * send_pno_stop_cmd() - PNO stop request
1784 * @wmi_hdl: wmi handle
1785 * @vdev_id: vdev id
1786 *
1787 * This function request FW to stop ongoing PNO operation.
1788 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301789 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301790 */
Govind Singhb53420c2016-03-09 14:32:57 +05301791QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301792{
1793 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1794
1795 if (wmi_handle->ops->send_pno_stop_cmd)
1796 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1797 vdev_id);
1798
Govind Singhb53420c2016-03-09 14:32:57 +05301799 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301800}
1801
1802/**
1803 * wmi_unified_pno_start_cmd() - PNO start request
1804 * @wmi_hdl: wmi handle
1805 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301806 *
1807 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301808 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301809 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301810#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301811QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05301812 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301813{
1814 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1815
1816 if (wmi_handle->ops->send_pno_start_cmd)
1817 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05301818 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301819
Govind Singhb53420c2016-03-09 14:32:57 +05301820 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301821}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301822#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301823
Varun Reddy Yeturueac038b2017-07-24 16:11:22 -07001824/**
1825 * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
1826 * @wmi_hdl: wmi handle
1827 * @params: Configuration parameters
1828 *
1829 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1830 */
1831QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
1832 struct nlo_mawc_params *params)
1833{
1834 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1835
1836 if (wmi_handle->ops->send_nlo_mawc_cmd)
1837 return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
1838
1839 return QDF_STATUS_E_FAILURE;
1840}
1841
Govind Singh4eacd2b2016-03-07 14:24:22 +05301842/* wmi_unified_set_ric_req_cmd() - set ric request element
1843 * @wmi_hdl: wmi handle
1844 * @msg: message
1845 * @is_add_ts: is addts required
1846 *
1847 * This function sets ric request element for 11r roaming.
1848 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301849 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301850 */
Govind Singhb53420c2016-03-09 14:32:57 +05301851QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301852 uint8_t is_add_ts)
1853{
1854 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1855
1856 if (wmi_handle->ops->send_set_ric_req_cmd)
1857 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
1858 is_add_ts);
1859
Govind Singhb53420c2016-03-09 14:32:57 +05301860 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301861}
1862
Qiwei Cai1ccba222018-05-21 16:49:39 +08001863#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Govind Singh4eacd2b2016-03-07 14:24:22 +05301864/**
1865 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1866 * @wmi_hdl: wmi handle
1867 * @clear_req: ll stats clear request command params
1868 * @addr: mac address
1869 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301870 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301871 */
Govind Singhb53420c2016-03-09 14:32:57 +05301872QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301873 const struct ll_stats_clear_params *clear_req,
1874 uint8_t addr[IEEE80211_ADDR_LEN])
1875{
1876 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1877
1878 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1879 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1880 clear_req, addr);
1881
Govind Singhb53420c2016-03-09 14:32:57 +05301882 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301883}
1884
1885/**
1886 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1887 * @wmi_hdl:wmi handle
1888 * @get_req:ll stats get request command params
1889 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301890 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301891 */
Govind Singhb53420c2016-03-09 14:32:57 +05301892QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301893 const struct ll_stats_get_params *get_req,
1894 uint8_t addr[IEEE80211_ADDR_LEN])
1895{
1896 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1897
1898 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1899 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1900 get_req, addr);
1901
Govind Singhb53420c2016-03-09 14:32:57 +05301902 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301903}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001904#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh4eacd2b2016-03-07 14:24:22 +05301905
1906/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301907 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1908 * @wmi_hdl: wma handle
1909 * @vdev_id: vdev id
1910 *
1911 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1912 */
1913QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
1914 uint8_t vdev_id)
1915{
1916 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1917
1918 if (wmi_handle->ops->send_congestion_cmd)
1919 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
1920 vdev_id);
1921
1922 return QDF_STATUS_E_FAILURE;
1923}
1924
Qiwei Cai1ccba222018-05-21 16:49:39 +08001925#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301926/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301927 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1928 * @wmi_handle: wmi handle
1929 * @set_req: ll stats set request command params
1930 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301931 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301932 */
Govind Singhb53420c2016-03-09 14:32:57 +05301933QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301934 const struct ll_stats_set_params *set_req)
1935{
1936 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1937
1938 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1939 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1940 set_req);
1941
Govind Singhb53420c2016-03-09 14:32:57 +05301942 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301943}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001944#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh20c5dac2016-03-07 15:33:31 +05301945
1946/**
1947 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1948 * @wmi_handle: wmi handle
1949 * @rssi_req: get RSSI request
1950 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301951 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301952 */
Govind Singhb53420c2016-03-09 14:32:57 +05301953QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301954{
1955 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1956
1957 if (wmi_handle->ops->send_snr_request_cmd)
1958 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1959
Govind Singhb53420c2016-03-09 14:32:57 +05301960 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301961}
1962
1963/**
1964 * wmi_unified_snr_cmd() - get RSSI from fw
1965 * @wmi_handle: wmi handle
1966 * @vdev_id: vdev id
1967 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301968 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301969 */
Govind Singhb53420c2016-03-09 14:32:57 +05301970QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301971{
1972 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1973
1974 if (wmi_handle->ops->send_snr_cmd)
1975 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1976 vdev_id);
1977
Govind Singhb53420c2016-03-09 14:32:57 +05301978 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301979}
1980
1981/**
1982 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1983 * @wmi_handle: wmi handle
1984 * @link_status: get link params
1985 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301986 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301987 */
Govind Singhb53420c2016-03-09 14:32:57 +05301988QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301989 struct link_status_params *link_status)
1990{
1991 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1992
1993 if (wmi_handle->ops->send_link_status_req_cmd)
1994 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1995 link_status);
1996
Govind Singhb53420c2016-03-09 14:32:57 +05301997 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301998}
1999
Govind Singh20c5dac2016-03-07 15:33:31 +05302000/**
2001 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
2002 * @wmi_handle: wmi handle
2003 * @ta_dhcp_ind: DHCP indication parameter
2004 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302005 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302006 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302007#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302008QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302009 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
2010{
2011 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2012
2013 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
2014 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
2015 ta_dhcp_ind);
2016
Govind Singhb53420c2016-03-09 14:32:57 +05302017 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302018}
2019
2020/**
2021 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
2022 * @wmi_handle: wmi handle
2023 * @pLinkSpeed: link speed info
2024 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302025 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302026 */
Govind Singhb53420c2016-03-09 14:32:57 +05302027QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302028 wmi_mac_addr peer_macaddr)
2029{
2030 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2031
2032 if (wmi_handle->ops->send_get_link_speed_cmd)
2033 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
2034 peer_macaddr);
2035
Govind Singhb53420c2016-03-09 14:32:57 +05302036 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302037}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302038#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302039
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302040#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh20c5dac2016-03-07 15:33:31 +05302041/**
2042 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2043 * @wmi_handle: wmi handler
2044 * @egap_params: pointer to egap_params
2045 *
2046 * Return: 0 for success, otherwise appropriate error code
2047 */
Govind Singhb53420c2016-03-09 14:32:57 +05302048QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302049 struct wlan_green_ap_egap_params *egap_params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302050{
2051 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2052
2053 if (wmi_handle->ops->send_egap_conf_params_cmd)
2054 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2055 egap_params);
2056
Govind Singhb53420c2016-03-09 14:32:57 +05302057 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302058}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302059#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302060
2061/**
2062 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2063 * @wmi_handl: wmi handle
2064 * @cmd: Profiling command index
2065 * @value1: parameter1 value
2066 * @value2: parameter2 value
2067 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302068 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302069 */
Govind Singhb53420c2016-03-09 14:32:57 +05302070QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302071 uint32_t cmd, uint32_t value1, uint32_t value2)
2072{
2073 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2074
2075 if (wmi_handle->ops->send_fw_profiling_cmd)
2076 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2077 cmd, value1, value2);
2078
Govind Singhb53420c2016-03-09 14:32:57 +05302079 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302080}
2081
Govind Singh20c5dac2016-03-07 15:33:31 +05302082/**
Naveen Rawata5817e72017-10-26 18:50:19 -07002083 * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware
2084 * will wake up host after specified time is elapsed
2085 * @wmi_handle: wmi handle
2086 * @vdev_id: vdev id
2087 * @cookie: value to identify reason why host set up wake call.
2088 * @time: time in ms
2089 *
2090 * Return: QDF status
2091 */
2092QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
2093 uint32_t cookie, uint32_t time)
2094{
2095 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2096
2097 if (wmi_handle->ops->send_wow_timer_pattern_cmd)
2098 return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
2099 vdev_id, cookie, time);
2100
2101 return QDF_STATUS_E_FAILURE;
2102}
2103
2104/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302105 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2106 * @wmi_handle: wmi handle
2107 * @vdev_id: vdev id
2108 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302109 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302110 */
Govind Singhb53420c2016-03-09 14:32:57 +05302111QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302112{
2113 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2114
2115 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2116 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2117 vdev_id);
2118
Govind Singhb53420c2016-03-09 14:32:57 +05302119 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302120}
2121
Paul Zhang92ab8d32017-12-08 16:08:00 +08002122QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
2123 struct wlm_latency_level_param *param)
2124{
2125 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2126
2127 if (wmi_handle->ops->send_wlm_latency_level_cmd)
2128 return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
2129 param);
2130
2131 return QDF_STATUS_E_FAILURE;
2132}
2133
Govind Singh20c5dac2016-03-07 15:33:31 +05302134/**
2135 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2136 * @wmi_hdl: wmi handle
2137 * @vdev_id: vdev id
2138 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302139 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302140 */
Govind Singhb53420c2016-03-09 14:32:57 +05302141QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302142{
2143 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2144
2145 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2146 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2147 vdev_id);
2148
Govind Singhb53420c2016-03-09 14:32:57 +05302149 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302150}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002151
2152#ifdef WLAN_FEATURE_CIF_CFR
2153QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2154 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2155{
2156 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2157
2158 if (wmi_handle->ops->send_start_oem_data_cmd)
2159 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2160
2161 return QDF_STATUS_E_FAILURE;
2162}
2163#endif
2164
Sathish Kumarf396c722017-11-17 17:30:41 +05302165QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl,
2166 struct direct_buf_rx_cfg_req *cfg)
2167{
2168 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2169
2170 if (wmi_handle->ops->send_dbr_cfg_cmd)
2171 return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg);
2172
2173 return QDF_STATUS_E_FAILURE;
2174}
2175
Govind Singh20c5dac2016-03-07 15:33:31 +05302176/**
2177 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2178 * @wmi_handle: wmi handle
2179 * @startOemDataReq: start request params
2180 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302181 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302182 */
Govind Singhb53420c2016-03-09 14:32:57 +05302183QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002184 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302185 uint8_t *data)
2186{
2187 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2188
2189 if (wmi_handle->ops->send_start_oem_data_cmd)
2190 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2191 data_len, data);
2192
Govind Singhb53420c2016-03-09 14:32:57 +05302193 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302194}
2195
2196/**
2197 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2198 * @wmi_handle: wmi handle
2199 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2200 *
2201 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2202 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2203 * to firmware based on phyerr filtering
2204 * offload status.
2205 *
2206 * Return: 1 success, 0 failure
2207 */
Govind Singhb53420c2016-03-09 14:32:57 +05302208QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302209wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2210 bool dfs_phyerr_filter_offload)
2211{
2212 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2213
2214 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2215 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2216 dfs_phyerr_filter_offload);
2217
Govind Singhb53420c2016-03-09 14:32:57 +05302218 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302219}
2220
2221#if !defined(REMOVE_PKT_LOG)
2222/**
2223 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2224 * @wmi_handle: wmi handle
2225 * @pktlog_event: pktlog event
2226 * @cmd_id: pktlog cmd id
2227 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302228 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302229 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302230#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302231QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302232 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302233 uint32_t cmd_id,
2234 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302235{
2236 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2237
2238 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2239 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302240 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302241
Govind Singhb53420c2016-03-09 14:32:57 +05302242 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302243}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302244#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302245#endif /* REMOVE_PKT_LOG */
2246
2247/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302248 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2249 * @wmi_handle: wmi handle
2250 * @ptrn_id: pattern id
2251 * @vdev_id: vdev id
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_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302256 uint8_t vdev_id)
2257{
2258 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2259
2260 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2261 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2262 ptrn_id, vdev_id);
2263
Govind Singhb53420c2016-03-09 14:32:57 +05302264 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302265}
2266
2267/**
2268 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2269 * @wmi_handle: wmi handle
2270 *
2271 * Sends host wakeup indication to FW. On receiving this indication,
2272 * FW will come out of WOW.
2273 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302274 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302275 */
Govind Singhb53420c2016-03-09 14:32:57 +05302276QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302277{
2278 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2279
2280 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2281 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2282
Govind Singhb53420c2016-03-09 14:32:57 +05302283 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302284}
2285
2286/**
2287 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2288 * @wmi_handle: wmi handle
2289 * @msg: delts params
2290 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302291 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302292 */
Govind Singhb53420c2016-03-09 14:32:57 +05302293QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302294 uint8_t ac)
2295{
2296 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2297
2298 if (wmi_handle->ops->send_del_ts_cmd)
2299 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2300 vdev_id, ac);
2301
Govind Singhb53420c2016-03-09 14:32:57 +05302302 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302303}
2304
2305/**
2306 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2307 * @wmi_handle: handle to wmi
2308 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2309 *
Govind Singhb53420c2016-03-09 14:32:57 +05302310 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302311 * ADD_TS requestes to firmware in loop for all the ACs with
2312 * active flow.
2313 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302314 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302315 */
Govind Singhb53420c2016-03-09 14:32:57 +05302316QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302317 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2318{
2319 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2320
2321 if (wmi_handle->ops->send_aggr_qos_cmd)
2322 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2323 aggr_qos_rsp_msg);
2324
Govind Singhb53420c2016-03-09 14:32:57 +05302325 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302326}
2327
2328/**
2329 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2330 * @wmi_handle: wmi handle
2331 * @msg: ADDTS params
2332 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302333 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302334 */
Govind Singhb53420c2016-03-09 14:32:57 +05302335QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302336 struct add_ts_param *msg)
2337{
2338 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2339
2340 if (wmi_handle->ops->send_add_ts_cmd)
2341 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2342 msg);
2343
Govind Singhb53420c2016-03-09 14:32:57 +05302344 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302345}
2346
2347/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302348 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2349 * @wmi_handle: wmi handle
2350 * @pAddPeriodicTxPtrnParams: tx ptrn params
2351 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302352 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302353 */
Govind Singhb53420c2016-03-09 14:32:57 +05302354QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302355 struct periodic_tx_pattern *
2356 pAddPeriodicTxPtrnParams,
2357 uint8_t vdev_id)
2358{
2359 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2360
2361 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2362 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2363 pAddPeriodicTxPtrnParams,
2364 vdev_id);
2365
Govind Singhb53420c2016-03-09 14:32:57 +05302366 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302367}
2368
2369/**
2370 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2371 * @wmi_handle: wmi handle
2372 * @vdev_id: vdev id
2373 * @pattern_id: pattern id
2374 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302375 * Retrun: 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_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302378 uint8_t vdev_id,
2379 uint8_t pattern_id)
2380{
2381 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2382
2383 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2384 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2385 vdev_id,
2386 pattern_id);
2387
Govind Singhb53420c2016-03-09 14:32:57 +05302388 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302389}
2390
2391/**
2392 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2393 * @wmi_handle: wmi handle
2394 * @preq: stats ext params
2395 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302396 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302397 */
Govind Singhb53420c2016-03-09 14:32:57 +05302398QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302399 struct stats_ext_params *preq)
2400{
2401 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2402
2403 if (wmi_handle->ops->send_stats_ext_req_cmd)
2404 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2405 preq);
2406
Govind Singhb53420c2016-03-09 14:32:57 +05302407 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302408}
2409
2410/**
2411 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2412 * @wmi_handle: wmi handle
2413 * @params: ext wow params
2414 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302415 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302416 */
Govind Singhb53420c2016-03-09 14:32:57 +05302417QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302418 struct ext_wow_params *params)
2419{
2420 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2421
2422 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2423 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2424 params);
2425
Govind Singhb53420c2016-03-09 14:32:57 +05302426 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302427}
2428
2429/**
2430 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2431 * @wmi_handle: wmi handle
2432 * @appType2Params: app type2 params
2433 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302434 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302435 */
Govind Singhb53420c2016-03-09 14:32:57 +05302436QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302437 struct app_type2_params *appType2Params)
2438{
2439 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2440
2441 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2442 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2443 appType2Params);
2444
Govind Singhb53420c2016-03-09 14:32:57 +05302445 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302446
2447}
2448
2449/**
2450 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2451 * @wmi_handle: wmi handle
2452 * @timer_val: auto shutdown timer value
2453 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302454 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302455 */
Govind Singhb53420c2016-03-09 14:32:57 +05302456QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302457 uint32_t timer_val)
2458{
2459 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2460
2461 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2462 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2463 timer_val);
2464
Govind Singhb53420c2016-03-09 14:32:57 +05302465 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302466}
2467
2468/**
2469 * wmi_unified_nan_req_cmd() - to send nan request to target
2470 * @wmi_handle: wmi handle
2471 * @nan_req: request data which will be non-null
2472 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302473 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302474 */
Govind Singhb53420c2016-03-09 14:32:57 +05302475QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302476 struct nan_req_params *nan_req)
2477{
2478 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2479
2480 if (wmi_handle->ops->send_nan_req_cmd)
2481 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2482 nan_req);
2483
Govind Singhb53420c2016-03-09 14:32:57 +05302484 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302485}
2486
2487/**
2488 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2489 * @wmi_handle: wmi handle
2490 * @pDhcpSrvOffloadInfo: DHCP server offload info
2491 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302492 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302493 */
Govind Singhb53420c2016-03-09 14:32:57 +05302494QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002495 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302496{
2497 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2498
2499 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2500 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002501 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05302502
Govind Singhb53420c2016-03-09 14:32:57 +05302503 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302504}
2505
2506/**
2507 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2508 * @wmi_handle: wmi handle
2509 * @ch_avoid_update_req: channel avoid update params
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_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302514{
2515 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2516
2517 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2518 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2519
Govind Singhb53420c2016-03-09 14:32:57 +05302520 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302521}
2522
2523/**
2524 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2525 * @wmi_handle: wmi handle
2526 * @reg_dmn: reg domain
2527 * @regdmn2G: 2G reg domain
2528 * @regdmn5G: 5G reg domain
2529 * @ctl2G: 2G test limit
2530 * @ctl5G: 5G test limit
2531 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302532 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302533 */
Govind Singhb53420c2016-03-09 14:32:57 +05302534QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302535 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302536 uint16_t regdmn5G, uint8_t ctl2G,
2537 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302538{
2539 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2540
2541 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2542 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2543 reg_dmn, regdmn2G,
2544 regdmn5G, ctl2G,
2545 ctl5G);
2546
Govind Singhb53420c2016-03-09 14:32:57 +05302547 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302548}
2549
2550
2551/**
2552 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2553 * @wmi_handle: wmi handle
2554 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2555 *
2556 * This function sets tdls off channel mode
2557 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302558 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2559 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302560 */
Govind Singhb53420c2016-03-09 14:32:57 +05302561QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302562 struct tdls_channel_switch_params *chan_switch_params)
2563{
2564 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2565
2566 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2567 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2568 chan_switch_params);
2569
Govind Singhb53420c2016-03-09 14:32:57 +05302570 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302571}
2572
2573/**
2574 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2575 * @wmi_handle: wmi handle
2576 * @pwmaTdlsparams: TDLS params
2577 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302578 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302579 */
Govind Singhb53420c2016-03-09 14:32:57 +05302580QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302581 void *tdls_param, uint8_t tdls_state)
2582{
2583 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2584
2585 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2586 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2587 tdls_param, tdls_state);
2588
Govind Singhb53420c2016-03-09 14:32:57 +05302589 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302590}
2591
2592/**
2593 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2594 * @wmi_handle: wmi handle
2595 * @peerStateParams: TDLS peer state params
2596 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302597 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302598 */
Govind Singhb53420c2016-03-09 14:32:57 +05302599QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302600 struct tdls_peer_state_params *peerStateParams,
2601 uint32_t *ch_mhz)
2602{
2603 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2604
2605 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2606 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2607 peerStateParams, ch_mhz);
2608
Govind Singhb53420c2016-03-09 14:32:57 +05302609 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302610}
2611
2612/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302613 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2614 * @wmi_handle: Pointer to WMi handle
2615 * @ie_data: Pointer for ie data
2616 *
2617 * This function sends IE information to firmware
2618 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302619 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302620 *
2621 */
Govind Singhb53420c2016-03-09 14:32:57 +05302622QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302623 struct vdev_ie_info_param *ie_info)
2624{
2625 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2626
2627 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2628 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2629 ie_info);
2630
Govind Singhb53420c2016-03-09 14:32:57 +05302631 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302632}
Govind Singh9ddd5162016-03-07 16:30:32 +05302633
2634/**
2635 * wmi_unified_save_fw_version_cmd() - save fw version
2636 * @wmi_handle: pointer to wmi handle
2637 * @res_cfg: resource config
2638 * @num_mem_chunks: no of mem chunck
2639 * @mem_chunk: pointer to mem chunck structure
2640 *
2641 * This function sends IE information to firmware
2642 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302643 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302644 *
2645 */
Govind Singhb53420c2016-03-09 14:32:57 +05302646QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302647 void *evt_buf)
2648{
2649 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2650
2651 if (wmi_handle->ops->save_fw_version_cmd)
2652 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2653 evt_buf);
2654
Govind Singhb53420c2016-03-09 14:32:57 +05302655 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302656}
Govind Singha4836fd2016-03-07 16:45:38 +05302657
2658/**
2659 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2660 * @wmi_hdl: wmi handle
2661 * @custom_addr: base mac address
2662 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302663 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302664 */
Govind Singhb53420c2016-03-09 14:32:57 +05302665QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302666 uint8_t *custom_addr)
2667{
2668 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2669
2670 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2671 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2672 custom_addr);
2673
Govind Singhb53420c2016-03-09 14:32:57 +05302674 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302675}
2676
2677/**
2678 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2679 * @wmi_hdl: wmi handle
2680 * @event: Event received from FW
2681 * @len: Length of the event
2682 *
2683 * Enables the low frequency events and disables the high frequency
2684 * events. Bit 17 indicates if the event if low/high frequency.
2685 * 1 - high frequency, 0 - low frequency
2686 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302687 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302688 */
Govind Singhb53420c2016-03-09 14:32:57 +05302689QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302690 uint8_t *event,
2691 uint32_t len)
2692{
2693 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2694
2695 if (wmi_handle->ops->send_log_supported_evt_cmd)
2696 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2697 event, len);
2698
Govind Singhb53420c2016-03-09 14:32:57 +05302699 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302700}
2701
gaurank kathpaliacdfb4452018-02-21 18:58:29 +05302702void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl)
2703{
2704 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2705 if (wmi_handle->ops->send_time_stamp_sync_cmd)
2706 wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle);
2707
2708}
Govind Singha4836fd2016-03-07 16:45:38 +05302709/**
2710 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2711 * @wmi_hdl: wmi handle
2712 * @start_log: Start logging related parameters
2713 *
2714 * Send the command to the FW based on which specific logging of diag
2715 * event/log id can be started/stopped
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_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302720 struct wmi_wifi_start_log *start_log)
2721{
2722 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2723
2724 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2725 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2726 start_log);
2727
Govind Singhb53420c2016-03-09 14:32:57 +05302728 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302729}
2730
2731/**
2732 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2733 * @wmi_hdl: WMI handle
2734 *
2735 * This function is used to send the flush command to the FW,
2736 * that will flush the fw logs that are residue in the FW
2737 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302738 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302739 */
Govind Singhb53420c2016-03-09 14:32:57 +05302740QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302741{
2742 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2743
2744 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2745 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2746
Govind Singhb53420c2016-03-09 14:32:57 +05302747 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302748}
2749
2750/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302751 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302752 * @wmi_hdl: wmi handle
2753 * @msg: PCL structure containing the PCL and the number of channels
2754 *
2755 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2756 * firmware. The DBS Manager is the consumer of this information in the WLAN
2757 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2758 * to migrate to a new channel without host driver involvement. An example of
2759 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2760 * manage the channel selection without firmware involvement.
2761 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302762 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302763 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302764QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2765 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302766{
2767 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2768
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302769 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2770 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302771
Govind Singhb53420c2016-03-09 14:32:57 +05302772 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302773}
2774
2775/**
2776 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2777 * @wmi_hdl: wmi handle
2778 * @msg: Structure containing the following parameters
2779 *
2780 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2781 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2782 *
2783 * Provides notification to the WLAN firmware that host driver is requesting a
2784 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2785 * configurations that include the Dual Band Simultaneous (DBS) feature.
2786 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302787 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302788 */
Govind Singhb53420c2016-03-09 14:32:57 +05302789QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302790 uint32_t hw_mode_index)
2791{
2792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2793
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302794 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2795 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302796 hw_mode_index);
2797
Govind Singhb53420c2016-03-09 14:32:57 +05302798 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302799}
2800
2801/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302802 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302803 * @wmi_hdl: wmi handle
2804 * @msg: Dual MAC config parameters
2805 *
2806 * Configures WLAN firmware with the dual MAC features
2807 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302808 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302809 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302810QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Srinivas Girigowda5029ae72018-02-15 14:30:05 -08002811 struct policy_mgr_dual_mac_config *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302812{
2813 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2814
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302815 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2816 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302817 msg);
2818
Govind Singhb53420c2016-03-09 14:32:57 +05302819 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302820}
2821
Govind Singha4836fd2016-03-07 16:45:38 +05302822/**
2823 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
2824 * @wmi_hdl: wmi handle
2825 * @flashing: flashing request
2826 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302827 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302828 */
Govind Singhb53420c2016-03-09 14:32:57 +05302829QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302830 struct flashing_req_params *flashing)
2831{
2832 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2833
2834 if (wmi_handle->ops->send_set_led_flashing_cmd)
2835 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
2836 flashing);
2837
Govind Singhb53420c2016-03-09 14:32:57 +05302838 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302839}
2840
2841/**
2842 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
2843 * @wmi_hdl: wmi handle
2844 * @appType1Params: app type1 params
2845 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302846 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302847 */
Govind Singhb53420c2016-03-09 14:32:57 +05302848QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302849 struct app_type1_params *app_type1_params)
2850{
2851 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2852
2853 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
2854 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
2855 app_type1_params);
2856
Govind Singhb53420c2016-03-09 14:32:57 +05302857 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302858}
2859
2860/**
2861 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
2862 * @wmi_hdl: wmi handle
2863 * @request: SSID hotlist set request
2864 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302865 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302866 */
Govind Singhb53420c2016-03-09 14:32:57 +05302867QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05302868wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
2869 struct ssid_hotlist_request_params *request)
2870{
2871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2872
2873 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
2874 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
2875 request);
2876
Govind Singhb53420c2016-03-09 14:32:57 +05302877 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302878}
2879
2880/**
2881 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
2882 * @wmi_hdl: wmi handle
2883 * @vdev_id: vdev id
2884 *
2885 * This function sends roam synch complete event to fw.
2886 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302887 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302888 */
Govind Singhb53420c2016-03-09 14:32:57 +05302889QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302890 uint8_t vdev_id)
2891{
2892 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2893
2894 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
2895 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
2896 vdev_id);
2897
Govind Singhb53420c2016-03-09 14:32:57 +05302898 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302899}
2900
2901/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05302902 * wmi_unified_fw_test_cmd() - send fw test command to fw.
2903 * @wmi_hdl: wmi handle
2904 * @wmi_fwtest: fw test command
2905 *
2906 * This function sends fw test command to fw.
2907 *
2908 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2909 */
2910QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
2911 struct set_fwtest_params *wmi_fwtest)
2912{
2913 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2914
2915 if (wmi_handle->ops->send_fw_test_cmd)
2916 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
2917 wmi_fwtest);
2918
2919 return QDF_STATUS_E_FAILURE;
2920
2921}
2922
2923/**
Govind Singha4836fd2016-03-07 16:45:38 +05302924 * wmi_unified_unit_test_cmd() - send unit test command to fw.
2925 * @wmi_hdl: wmi handle
2926 * @wmi_utest: unit test command
2927 *
2928 * This function send unit test command to fw.
2929 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302930 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302931 */
Govind Singhb53420c2016-03-09 14:32:57 +05302932QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302933 struct wmi_unit_test_cmd *wmi_utest)
2934{
2935 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2936
2937 if (wmi_handle->ops->send_unit_test_cmd)
2938 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
2939 wmi_utest);
2940
Govind Singhb53420c2016-03-09 14:32:57 +05302941 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302942}
2943
2944/**
2945 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
2946 * @wmi_hdl: wmi handle
2947 * @roaminvoke: roam invoke command
2948 *
2949 * Send roam invoke command to fw for fastreassoc.
2950 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302951 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302952 */
Govind Singhb53420c2016-03-09 14:32:57 +05302953QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302954 struct wmi_roam_invoke_cmd *roaminvoke,
2955 uint32_t ch_hz)
2956{
2957 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2958
2959 if (wmi_handle->ops->send_roam_invoke_cmd)
2960 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
2961 roaminvoke, ch_hz);
2962
Govind Singhb53420c2016-03-09 14:32:57 +05302963 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302964}
2965
2966/**
2967 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
2968 * @wmi_hdl: wmi handle
2969 * @command: command
2970 * @vdev_id: vdev id
2971 *
2972 * This function set roam offload command to fw.
2973 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302974 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302975 */
Govind Singhb53420c2016-03-09 14:32:57 +05302976QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302977 uint32_t command, uint32_t vdev_id)
2978{
2979 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2980
2981 if (wmi_handle->ops->send_roam_scan_offload_cmd)
2982 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
2983 command, vdev_id);
2984
Govind Singhb53420c2016-03-09 14:32:57 +05302985 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302986}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302987#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05302988/**
2989 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
2990 * @wmi_hdl: wmi handle
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302991 * @ap_profile: ap profile params
Govind Singha4836fd2016-03-07 16:45:38 +05302992 *
2993 * Send WMI_ROAM_AP_PROFILE to firmware
2994 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302995 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302996 */
Govind Singhb53420c2016-03-09 14:32:57 +05302997QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302998 struct ap_profile_params *ap_profile)
Govind Singha4836fd2016-03-07 16:45:38 +05302999{
3000 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3001
3002 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05303003 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
3004 wmi_handle, ap_profile);
Govind Singha4836fd2016-03-07 16:45:38 +05303005
Govind Singhb53420c2016-03-09 14:32:57 +05303006 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303007}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303008#endif
Govind Singha4836fd2016-03-07 16:45:38 +05303009/**
3010 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
3011 * @wmi_handle: wmi handle
3012 * @scan_period: scan period
3013 * @scan_age: scan age
3014 * @vdev_id: vdev id
3015 *
3016 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
3017 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303018 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303019 */
Govind Singhb53420c2016-03-09 14:32:57 +05303020QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303021 uint32_t scan_period,
3022 uint32_t scan_age,
3023 uint32_t vdev_id)
3024{
3025 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3026
3027 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3028 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3029 scan_period, scan_age, vdev_id);
3030
Govind Singhb53420c2016-03-09 14:32:57 +05303031 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303032}
3033
3034/**
3035 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3036 * @wmi_handle: wmi handle
3037 * @chan_count: channel count
3038 * @chan_list: channel list
3039 * @list_type: list type
3040 * @vdev_id: vdev id
3041 *
3042 * Set roam offload channel list.
3043 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303044 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303045 */
Govind Singhb53420c2016-03-09 14:32:57 +05303046QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303047 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003048 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303049 uint8_t list_type, uint32_t vdev_id)
3050{
3051 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3052
3053 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3054 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3055 chan_count, chan_list,
3056 list_type, vdev_id);
3057
Govind Singhb53420c2016-03-09 14:32:57 +05303058 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303059}
3060
3061/**
3062 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3063 * @wmi_hdl: wmi handle
3064 * @rssi_change_thresh: RSSI Change threshold
3065 * @bcn_rssi_weight: beacon RSSI weight
3066 * @vdev_id: vdev id
3067 *
3068 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3069 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303070 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303071 */
Govind Singhb53420c2016-03-09 14:32:57 +05303072QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303073 uint32_t vdev_id,
3074 int32_t rssi_change_thresh,
3075 uint32_t bcn_rssi_weight,
3076 uint32_t hirssi_delay_btw_scans)
3077{
3078 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3079
3080 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3081 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3082 vdev_id, rssi_change_thresh,
3083 bcn_rssi_weight, hirssi_delay_btw_scans);
3084
Govind Singhb53420c2016-03-09 14:32:57 +05303085 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303086}
3087
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303088QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3089 struct wmi_per_roam_config_req *req_buf)
3090{
3091 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3092
3093 if (wmi_handle->ops->send_per_roam_config_cmd)
3094 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3095 req_buf);
3096
3097 return QDF_STATUS_E_FAILURE;
3098}
3099
Govind Singha4836fd2016-03-07 16:45:38 +05303100/**
Anurag Chouhan97f00422017-09-11 14:56:30 +05303101 * wmi_unified_set_arp_stats_req() - set arp stats request
3102 * @wmi_hdl: wmi handle
3103 * @req_buf: pointer to set_arp_stats
3104 *
3105 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3106 */
3107QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
3108 struct set_arp_stats *req_buf)
3109{
3110 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3111
3112 if (wmi_handle->ops->send_set_arp_stats_req_cmd)
3113 return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
3114 req_buf);
3115
3116 return QDF_STATUS_E_FAILURE;
3117}
3118
3119/**
3120 * wmi_unified_get_arp_stats_req() - get arp stats request
3121 * @wmi_hdl: wmi handle
3122 * @req_buf: pointer to get_arp_stats
3123 *
3124 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3125 */
3126QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
3127 struct get_arp_stats *req_buf)
3128{
3129 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3130
3131 if (wmi_handle->ops->send_get_arp_stats_req_cmd)
3132 return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
3133 req_buf);
3134
3135 return QDF_STATUS_E_FAILURE;
3136}
3137
Vignesh Viswanathan81bde492017-09-25 14:36:38 +05303138QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
3139 struct wmi_unified_pmk_cache *req_buf)
3140{
3141 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3142
3143 if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
3144 return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
3145 req_buf);
3146
3147 return QDF_STATUS_E_FAILURE;
3148}
3149
3150#if defined(WLAN_FEATURE_FILS_SK)
3151QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
3152 struct hlp_params *req_buf)
3153{
3154 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3155
3156 if (wmi_handle->ops->send_roam_scan_hlp_cmd)
3157 return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
3158 req_buf);
3159
3160 return QDF_STATUS_E_FAILURE;
3161}
3162#endif
3163
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303164#ifdef FEATURE_WLAN_APF
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303165QDF_STATUS
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303166wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303167 enum wmi_host_active_apf_mode ucast_mode,
3168 enum wmi_host_active_apf_mode
3169 mcast_bcast_mode)
Dustin Brown4423f632017-01-13 15:24:07 -08003170{
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303171 if (wmi->ops->send_set_active_apf_mode_cmd)
3172 return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
3173 ucast_mode,
3174 mcast_bcast_mode);
3175 return QDF_STATUS_E_FAILURE;
Dustin Brown4423f632017-01-13 15:24:07 -08003176}
3177
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303178QDF_STATUS
3179wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
3180 uint32_t vdev_id, bool enable)
3181{
3182 if (wmi->ops->send_apf_enable_cmd)
3183 return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable);
3184 return QDF_STATUS_E_FAILURE;
3185}
3186
3187QDF_STATUS
3188wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
3189 struct wmi_apf_write_memory_params
3190 *write_params)
3191{
3192 if (wmi->ops->send_apf_write_work_memory_cmd)
3193 return wmi->ops->send_apf_write_work_memory_cmd(wmi,
3194 write_params);
3195
3196 return QDF_STATUS_E_FAILURE;
3197}
3198
3199QDF_STATUS
3200wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
3201 struct wmi_apf_read_memory_params
3202 *read_params)
3203{
3204 if (wmi->ops->send_apf_read_work_memory_cmd)
3205 return wmi->ops->send_apf_read_work_memory_cmd(wmi,
3206 read_params);
3207
3208 return QDF_STATUS_E_FAILURE;
3209}
3210
3211QDF_STATUS
3212wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
3213 struct wmi_apf_read_memory_resp_event_params
3214 *read_mem_evt)
3215{
3216 if (wmi->ops->extract_apf_read_memory_resp_event)
3217 return wmi->ops->extract_apf_read_memory_resp_event(wmi,
3218 evt_buf,
3219 read_mem_evt);
3220
3221 return QDF_STATUS_E_FAILURE;
3222}
3223#endif /* FEATURE_WLAN_APF */
3224
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303225/**
3226 * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function
3227 * @param wmi_handle : handle to WMI.
3228 * @param param : tpc config param
3229 *
3230 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3231 */
3232QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl,
3233 uint32_t param)
3234{
3235 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3236
3237 if (wmi_handle->ops->send_pdev_get_tpc_config_cmd)
3238 return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle,
3239 param);
3240
3241 return QDF_STATUS_E_FAILURE;
3242}
3243
3244/**
Sathish Kumar58f12552016-08-09 16:50:46 +05303245 * wmi_unified_set_bwf_cmd_send() - WMI set bwf function
3246 * @param wmi_handle : handle to WMI.
3247 * @param param : pointer to set bwf param
3248 *
3249 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3250 */
3251QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl,
3252 struct set_bwf_params *param)
3253{
3254 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3255
3256 if (wmi_handle->ops->send_set_bwf_cmd)
3257 return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param);
3258
3259 return QDF_STATUS_E_FAILURE;
3260}
3261
3262/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303263 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3264 * @param wmi_handle : handle to WMI.
3265 * @param param : pointer to hold pdev fips param
3266 *
3267 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3268 */
3269QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3270 struct fips_params *param)
3271{
3272 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3273
3274 if (wmi_handle->ops->send_pdev_fips_cmd)
3275 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3276
3277 return QDF_STATUS_E_FAILURE;
3278}
3279
3280/**
3281 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3282 * @param wmi_handle : handle to WMI.
3283 * @param param : pointer to hold wlan profile param
3284 *
3285 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3286 */
3287QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3288 struct wlan_profile_params *param)
3289{
3290 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3291
3292 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3293 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3294 param);
3295
3296 return QDF_STATUS_E_FAILURE;
3297}
3298
3299/**
3300 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3301 * @param wmi_handle : handle to WMI.
3302 * @param param : pointer to hold wlan profile param
3303 *
3304 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3305 */
3306QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3307 struct wlan_profile_params *param)
3308{
3309 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3310
3311 if (wmi->ops->send_wlan_profile_trigger_cmd)
3312 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3313 param);
3314
3315 return QDF_STATUS_E_FAILURE;
3316}
3317
3318/**
3319 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3320 * @param wmi_handle : handle to WMI.
3321 * @param param : pointer to hold channel param
3322 *
3323 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3324 */
3325QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3326 struct channel_param *param)
3327{
3328 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3329
3330 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3331 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3332 param);
3333
3334 return QDF_STATUS_E_FAILURE;
3335}
3336
3337/**
3338 * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function
3339 * @param wmi_handle : handle to WMI.
3340 * @param param : pointer to hold channel param
3341 *
3342 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3343 */
3344QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl,
3345 struct ht_ie_params *param)
3346{
3347 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3348
3349 if (wmi_handle->ops->send_set_ht_ie_cmd)
3350 return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param);
3351
3352 return QDF_STATUS_E_FAILURE;
3353}
3354
3355/**
3356 * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function
3357 * @param wmi_handle : handle to WMI.
3358 * @param param : pointer to hold channel param
3359 *
3360 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3361 */
3362QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl,
3363 struct vht_ie_params *param)
3364{
3365 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3366
3367 if (wmi_handle->ops->send_set_vht_ie_cmd)
3368 return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param);
3369
3370 return QDF_STATUS_E_FAILURE;
3371}
3372
3373/**
3374 * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function
3375 * @param wmi_handle : handle to WMI.
3376 * @param param : pointer to hold wmm param
3377 *
3378 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3379 */
3380QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl,
3381 struct wmm_update_params *param)
3382{
3383 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3384
3385 if (wmi_handle->ops->send_wmm_update_cmd)
3386 return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param);
3387
3388 return QDF_STATUS_E_FAILURE;
3389}
3390
3391/**
3392 * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function
3393 * @param wmi_handle : handle to WMI.
3394 * @param param : pointer to hold ant switch tbl param
3395 *
3396 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3397 */
3398QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl,
3399 struct ant_switch_tbl_params *param)
3400{
3401 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3402
3403 if (wmi_handle->ops->send_set_ant_switch_tbl_cmd)
3404 return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle,
3405 param);
3406
3407 return QDF_STATUS_E_FAILURE;
3408}
3409
3410/**
3411 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3412 * @param wmi_handle : handle to WMI.
3413 * @param param : pointer to hold ratepwr table param
3414 *
3415 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3416 */
3417QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3418 struct ratepwr_table_params *param)
3419{
3420 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3421
3422 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3423 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3424 param);
3425
3426 return QDF_STATUS_E_FAILURE;
3427}
3428
3429/**
3430 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3431 * @param wmi_handle : handle to WMI.
3432 *
3433 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3434 */
3435QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3436{
3437 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3438
3439 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3440 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3441
3442 return QDF_STATUS_E_FAILURE;
3443}
3444
3445/**
3446 * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function
3447 * @param wmi_handle : handle to WMI.
3448 * @param param : pointer to hold ctl table param
3449 *
3450 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3451 */
3452QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl,
3453 struct ctl_table_params *param)
3454{
3455 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3456
3457 if (wmi_handle->ops->send_set_ctl_table_cmd)
3458 return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle,
3459 param);
3460
3461 return QDF_STATUS_E_FAILURE;
3462}
3463
3464/**
3465 * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function
3466 * @param wmi_handle : handle to WMI.
3467 * @param param : pointer to hold mimogain param
3468 *
3469 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3470 */
3471QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl,
3472 struct mimogain_table_params *param)
3473{
3474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3475
3476 if (wmi_handle->ops->send_set_mimogain_table_cmd)
3477 return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle,
3478 param);
3479
3480 return QDF_STATUS_E_FAILURE;
3481}
3482
3483/**
3484 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3485 * chainmsk cmd function
3486 * @param wmi_handle : handle to WMI.
3487 * @param param : pointer to hold ratepwr chainmsk param
3488 *
3489 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3490 */
3491QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3492 struct ratepwr_chainmsk_params *param)
3493{
3494 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3495
3496 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3497 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3498
3499 return QDF_STATUS_E_FAILURE;
3500}
3501
3502/**
3503 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3504 * @param wmi_handle : handle to WMI.
3505 * @param param : pointer to hold macaddr param
3506 *
3507 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3508 */
3509QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3510 struct macaddr_params *param)
3511{
3512 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3513
3514 if (wmi_handle->ops->send_set_macaddr_cmd)
3515 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3516
3517 return QDF_STATUS_E_FAILURE;
3518}
3519
3520/**
3521 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3522 * @param wmi_handle : handle to WMI.
3523 *
3524 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3525 */
3526QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3527{
3528 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3529
3530 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3531 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3532
3533 return QDF_STATUS_E_FAILURE;
3534}
3535
3536/**
3537 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3538 * @param wmi_handle : handle to WMI.
3539 *
3540 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3541 */
3542QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3543{
3544 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3545
3546 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3547 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3548
3549 return QDF_STATUS_E_FAILURE;
3550}
3551
3552/**
3553 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3554 * @param wmi_handle : handle to WMI.
3555 * @param param : pointer to hold acparams param
3556 *
3557 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3558 */
3559QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3560 struct acparams_params *param)
3561{
3562 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3563
3564 if (wmi_handle->ops->send_set_acparams_cmd)
3565 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3566 param);
3567
3568 return QDF_STATUS_E_FAILURE;
3569}
3570
3571/**
3572 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3573 * tid map cmd function
3574 * @param wmi_handle : handle to WMI.
3575 * @param param : pointer to hold dscp param
3576 *
3577 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3578 */
3579QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3580 struct vap_dscp_tid_map_params *param)
3581{
3582 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3583
3584 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3585 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3586
3587 return QDF_STATUS_E_FAILURE;
3588}
3589
3590/**
3591 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3592 * reserve cmd function
3593 * @param wmi_handle : handle to WMI.
3594 * @param param : pointer to hold ast param
3595 *
3596 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3597 */
3598QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3599 struct proxy_ast_reserve_params *param)
3600{
3601 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3602
3603 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3604 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3605 param);
3606
3607 return QDF_STATUS_E_FAILURE;
3608}
3609
3610/**
3611 * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function
3612 * @param wmi_handle : handle to WMI.
3613 * @param param : pointer to hold qvit param
3614 *
3615 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3616 */
3617QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl,
3618 struct pdev_qvit_params *param)
3619{
3620 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3621
3622 if (wmi_handle->ops->send_pdev_qvit_cmd)
3623 return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param);
3624
3625 return QDF_STATUS_E_FAILURE;
3626}
3627
3628/**
3629 * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function
3630 * @param wmi_handle : handle to WMI.
3631 * @param param : pointer to hold mcast grp param
3632 *
3633 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3634 */
3635QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl,
3636 struct mcast_group_update_params *param)
3637{
3638 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3639
3640 if (wmi_handle->ops->send_mcast_group_update_cmd)
3641 return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle,
3642 param);
3643
3644 return QDF_STATUS_E_FAILURE;
3645}
3646
3647/**
3648 * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function
3649 * @param wmi_handle : handle to WMI.
3650 * @param param : pointer to hold wds entry param
3651 *
3652 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3653 */
3654QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl,
3655 struct peer_add_wds_entry_params *param)
3656{
3657 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3658
3659 if (wmi_handle->ops->send_peer_add_wds_entry_cmd)
3660 return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle,
3661 param);
3662
3663 return QDF_STATUS_E_FAILURE;
3664}
3665
3666/**
3667 * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function
3668 * @param wmi_handle : handle to WMI.
3669 * @param param : pointer to hold wds entry param
3670 *
3671 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3672 */
3673QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl,
3674 struct peer_del_wds_entry_params *param)
3675{
3676 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3677
3678 if (wmi_handle->ops->send_peer_del_wds_entry_cmd)
3679 return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle,
3680 param);
3681
3682 return QDF_STATUS_E_FAILURE;
3683}
3684
3685/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05303686 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
3687 * @param wmi_hdl : handle to WMI.
3688 * @param param : pointer to hold bridge mac addr param
3689 *
3690 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3691 */
3692QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
3693 struct set_bridge_mac_addr_params *param)
3694{
3695 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3696
3697 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
3698 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
3699 param);
3700
3701 return QDF_STATUS_E_FAILURE;
3702}
3703
3704/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303705 * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function
3706 * @param wmi_handle : handle to WMI.
3707 * @param param : pointer to hold wds entry param
3708 *
3709 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3710 */
3711QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl,
3712 struct peer_update_wds_entry_params *param)
3713{
3714 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3715
3716 if (wmi->ops->send_peer_update_wds_entry_cmd)
3717 return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param);
3718
3719 return QDF_STATUS_E_FAILURE;
3720}
3721
3722/**
3723 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3724 * @param wmi_handle : handle to WMI.
3725 * @param param : pointer to hold phyerr enable param
3726 *
3727 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3728 */
3729QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3730{
3731 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3732
3733 if (wmi_handle->ops->send_phyerr_enable_cmd)
3734 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3735
3736 return QDF_STATUS_E_FAILURE;
3737}
3738
3739/**
3740 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3741 * @param wmi_handle : handle to WMI.
3742 * @param param : pointer to hold phyerr disable param
3743 *
3744 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3745 */
3746QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3747{
3748 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3749
3750 if (wmi_handle->ops->send_phyerr_disable_cmd)
3751 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3752
3753 return QDF_STATUS_E_FAILURE;
3754}
3755
3756/**
3757 * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function
3758 * @param wmi_handle : handle to WMI.
3759 * @param param : pointer to hold antenna param
3760 *
3761 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3762 */
3763QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl,
3764 struct smart_ant_enable_params *param)
3765{
3766 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3767
3768 if (wmi_handle->ops->send_smart_ant_enable_cmd)
3769 return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle,
3770 param);
3771
3772 return QDF_STATUS_E_FAILURE;
3773}
3774
3775/**
3776 * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function
3777 * @param wmi_handle : handle to WMI.
3778 * @param param : pointer to hold antenna param
3779 *
3780 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3781 */
3782QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl,
3783 struct smart_ant_rx_ant_params *param)
3784{
3785 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3786
3787 if (wmi->ops->send_smart_ant_set_rx_ant_cmd)
3788 return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param);
3789
3790 return QDF_STATUS_E_FAILURE;
3791}
3792
3793/**
3794 * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function
3795 * @param wmi_handle : handle to WMI.
3796 * @param param : pointer to hold antenna param
3797 *
3798 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3799 */
3800QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl,
3801 uint8_t macaddr[IEEE80211_ADDR_LEN],
3802 struct smart_ant_tx_ant_params *param)
3803{
3804 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3805
3806 if (wmi->ops->send_smart_ant_set_tx_ant_cmd)
3807 return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr,
3808 param);
3809
3810 return QDF_STATUS_E_FAILURE;
3811}
3812
3813/**
3814 * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function
3815 * @param wmi_handle : handle to WMI.
3816 * @param param : pointer to hold antenna param
3817 *
3818 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3819 */
3820QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl,
3821 uint8_t macaddr[IEEE80211_ADDR_LEN],
3822 struct smart_ant_training_info_params *param)
3823{
3824 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3825
3826 if (wmi->ops->send_smart_ant_set_training_info_cmd)
3827 return wmi->ops->send_smart_ant_set_training_info_cmd(wmi,
3828 macaddr, param);
3829
3830 return QDF_STATUS_E_FAILURE;
3831}
3832
3833/**
3834 * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function
3835 * @param wmi_handle : handle to WMI.
3836 * @param macaddr : MAC address
3837 * @param param : pointer to hold node parameter
3838 *
3839 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3840 */
3841QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl,
3842 uint8_t macaddr[IEEE80211_ADDR_LEN],
3843 struct smart_ant_node_config_params *param)
3844{
3845 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3846
3847 if (wmi->ops->send_smart_ant_set_node_config_cmd)
3848 return wmi->ops->send_smart_ant_set_node_config_cmd(wmi,
3849 macaddr, param);
3850
3851 return QDF_STATUS_E_FAILURE;
3852}
3853
3854/**
3855 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
3856 * @param wmi_handle : handle to WMI.
3857 * @param param : pointer to hold antenna param
3858 *
3859 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3860 */
3861QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
3862 struct smart_ant_enable_tx_feedback_params *param)
3863{
3864 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3865
3866 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
3867 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
3868 param);
3869
3870 return QDF_STATUS_E_FAILURE;
3871}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05303872qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303873
3874/**
3875 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
3876 * @param wmi_handle : handle to WMI.
3877 * @param param : pointer to hold spectral config param
3878 *
3879 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3880 */
3881QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
3882 struct vdev_spectral_configure_params *param)
3883{
3884 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3885
3886 if (wmi->ops->send_vdev_spectral_configure_cmd)
3887 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
3888
3889 return QDF_STATUS_E_FAILURE;
3890}
3891
3892/**
3893 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
3894 * @param wmi_handle : handle to WMI.
3895 * @param param : pointer to hold enable spectral param
3896 *
3897 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3898 */
3899QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
3900 struct vdev_spectral_enable_params *param)
3901{
3902 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3903
3904 if (wmi->ops->send_vdev_spectral_enable_cmd)
3905 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
3906
3907 return QDF_STATUS_E_FAILURE;
3908}
3909
3910/**
3911 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
3912 * @param wmi_handle : handle to WMI.
3913 * @param param : pointer to hold chan info param
3914 *
3915 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3916 */
3917QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
3918 struct bss_chan_info_request_params *param)
3919{
3920 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3921
3922 if (wmi->ops->send_bss_chan_info_request_cmd)
3923 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
3924
3925 return QDF_STATUS_E_FAILURE;
3926}
3927
3928/**
3929 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
3930 * @param wmi_handle : handle to WMI.
3931 * @param param : pointer to hold thermal mitigation param
3932 *
3933 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3934 */
3935QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
3936 struct thermal_mitigation_params *param)
3937{
3938 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3939
3940 if (wmi->ops->send_thermal_mitigation_param_cmd)
3941 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
3942
3943 return QDF_STATUS_E_FAILURE;
3944}
3945
3946/**
3947 * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function
3948 * @param wmi_handle : handle to WMI.
3949 * @param macaddr : MAC address
3950 * @param param : pointer to hold neighbour rx parameter
3951 *
3952 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3953 */
3954QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl,
3955 uint8_t macaddr[IEEE80211_ADDR_LEN],
3956 struct set_neighbour_rx_params *param)
3957{
3958 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3959
3960 if (wmi->ops->send_vdev_set_neighbour_rx_cmd)
3961 return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi,
3962 macaddr, param);
3963
3964 return QDF_STATUS_E_FAILURE;
3965}
3966
3967/**
3968 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
3969 * @param wmi_handle : handle to WMI.
3970 * @param param : pointer to hold fwtest param
3971 *
3972 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3973 */
3974QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
3975 struct set_fwtest_params *param)
3976{
3977 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3978
3979 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
3980 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
3981
3982 return QDF_STATUS_E_FAILURE;
3983}
3984
Subrat Mishrad7c7a562017-09-27 14:41:20 +05303985#ifdef WLAN_SUPPORT_FILS
3986QDF_STATUS
3987wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, struct fd_params *param)
3988{
3989 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3990
3991 if (wmi_handle->ops->send_fils_discovery_send_cmd)
3992 return wmi_handle->ops->send_fils_discovery_send_cmd(wmi_handle,
3993 param);
3994
3995 return QDF_STATUS_E_FAILURE;
3996}
3997
3998QDF_STATUS
3999wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl,
4000 struct config_fils_params *param)
4001{
4002 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4003
4004 if (wmi->ops->send_vdev_fils_enable_cmd)
4005 return wmi->ops->send_vdev_fils_enable_cmd(wmi, param);
4006
4007 return QDF_STATUS_E_FAILURE;
4008}
4009
4010QDF_STATUS
4011wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf,
4012 uint32_t *vdev_id)
4013{
4014 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4015
4016 if (wmi_handle->ops->extract_swfda_vdev_id)
4017 return wmi_handle->ops->extract_swfda_vdev_id(wmi_handle,
4018 evt_buf, vdev_id);
4019
4020 return QDF_STATUS_E_FAILURE;
4021}
4022#endif /* WLAN_SUPPORT_FILS */
4023
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304024/**
4025 * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function
4026 * @param wmi_handle : handle to WMI.
4027 * @param param : pointer to hold config ratemask param
4028 *
4029 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4030 */
4031QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl,
4032 struct config_ratemask_params *param)
4033{
4034 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4035
4036 if (wmi->ops->send_vdev_config_ratemask_cmd)
4037 return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param);
4038
4039 return QDF_STATUS_E_FAILURE;
4040}
4041
4042/**
Sathish Kumar6011c742017-11-08 14:49:58 +05304043 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
4044 * size function
4045 * @param wmi_handle : handle to WMI
4046 * @param param : pointer to hold custom aggr size param
4047 *
4048 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4049 */
4050QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
4051 struct set_custom_aggr_size_params *param)
4052{
4053 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4054
4055 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
4056 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
4057
4058 return QDF_STATUS_E_FAILURE;
4059}
4060
4061/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05304062 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
4063 * @param wmi_handle : handle to WMI
4064 * @param param : pointer to hold qdepth threshold params
4065 *
4066 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
4067 */
4068QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
4069 struct set_qdepth_thresh_params *param)
4070{
4071 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4072
4073 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
4074 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
4075
4076 return QDF_STATUS_E_FAILURE;
4077}
4078
4079/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304080 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
4081 * @param wmi_handle : handle to WMI.
4082 * @param param : pointer to hold regdomain param
4083 *
4084 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4085 */
4086QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
4087 struct pdev_set_regdomain_params *param)
4088{
4089 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4090
4091 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
4092 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
4093 param);
4094
4095 return QDF_STATUS_E_FAILURE;
4096}
4097
4098/**
4099 * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function
4100 * @param wmi_handle : handle to WMI.
4101 * @param param : pointer to hold quiet mode param
4102 *
4103 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4104 */
4105QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl,
4106 struct set_quiet_mode_params *param)
4107{
4108 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4109
4110 if (wmi_handle->ops->send_set_quiet_mode_cmd)
4111 return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle,
4112 param);
4113
4114 return QDF_STATUS_E_FAILURE;
4115}
4116
4117/**
4118 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
4119 * @param wmi_handle : handle to WMI.
4120 * @param param : pointer to hold beacon filter param
4121 *
4122 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4123 */
4124QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
4125 struct set_beacon_filter_params *param)
4126{
4127 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4128
4129 if (wmi_handle->ops->send_set_beacon_filter_cmd)
4130 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
4131 param);
4132
4133 return QDF_STATUS_E_FAILURE;
4134}
4135
4136/**
4137 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
4138 * @param wmi_handle : handle to WMI.
4139 * @param param : pointer to hold beacon filter param
4140 *
4141 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4142 */
4143QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
4144 struct remove_beacon_filter_params *param)
4145{
4146 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4147
4148 if (wmi->ops->send_remove_beacon_filter_cmd)
4149 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
4150
4151 return QDF_STATUS_E_FAILURE;
4152}
4153
4154/**
4155 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
4156 * @param wmi_handle : handle to WMI.
4157 * @param macaddr : MAC address
4158 * @param param : pointer to hold mgmt parameter
4159 *
4160 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4161 */
4162#if 0
4163QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
4164 uint8_t macaddr[IEEE80211_ADDR_LEN],
4165 struct mgmt_params *param)
4166{
4167 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4168
4169 if (wmi_handle->ops->send_mgmt_cmd)
4170 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
4171 macaddr, param);
4172
4173 return QDF_STATUS_E_FAILURE;
4174}
4175#endif
4176
4177/**
4178 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
4179 * @param wmi_handle : handle to WMI.
4180 * @param macaddr : MAC address
4181 * @param param : pointer to hold addba resp parameter
4182 *
4183 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4184 */
4185QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
4186 uint8_t macaddr[IEEE80211_ADDR_LEN],
4187 struct addba_clearresponse_params *param)
4188{
4189 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4190
4191 if (wmi_handle->ops->send_addba_clearresponse_cmd)
4192 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
4193 macaddr, param);
4194
4195 return QDF_STATUS_E_FAILURE;
4196}
4197
4198/**
4199 * wmi_unified_addba_send_cmd_send() - WMI addba send function
4200 * @param wmi_handle : handle to WMI.
4201 * @param macaddr : MAC address
4202 * @param param : pointer to hold addba parameter
4203 *
4204 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4205 */
4206QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
4207 uint8_t macaddr[IEEE80211_ADDR_LEN],
4208 struct addba_send_params *param)
4209{
4210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4211
4212 if (wmi_handle->ops->send_addba_send_cmd)
4213 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
4214 macaddr, param);
4215
4216 return QDF_STATUS_E_FAILURE;
4217}
4218
4219/**
4220 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
4221 * @param wmi_handle : handle to WMI.
4222 * @param macaddr : MAC address
4223 * @param param : pointer to hold delba parameter
4224 *
4225 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4226 */
4227QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
4228 uint8_t macaddr[IEEE80211_ADDR_LEN],
4229 struct delba_send_params *param)
4230{
4231 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4232
4233 if (wmi_handle->ops->send_delba_send_cmd)
4234 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
4235 macaddr, param);
4236
4237 return QDF_STATUS_E_FAILURE;
4238}
4239
4240/**
4241 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
4242 * @param wmi_handle : handle to WMI.
4243 * @param macaddr : MAC address
4244 * @param param : pointer to hold addba set resp parameter
4245 *
4246 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4247 */
4248QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
4249 uint8_t macaddr[IEEE80211_ADDR_LEN],
4250 struct addba_setresponse_params *param)
4251{
4252 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4253
4254 if (wmi_handle->ops->send_addba_setresponse_cmd)
4255 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
4256 macaddr, param);
4257
4258 return QDF_STATUS_E_FAILURE;
4259}
4260
4261/**
4262 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
4263 * @param wmi_handle : handle to WMI.
4264 * @param macaddr : MAC address
4265 * @param param : pointer to hold singleamsdu parameter
4266 *
4267 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4268 */
4269QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
4270 uint8_t macaddr[IEEE80211_ADDR_LEN],
4271 struct singleamsdu_params *param)
4272{
4273 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4274
4275 if (wmi_handle->ops->send_singleamsdu_cmd)
4276 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
4277 macaddr, param);
4278
4279 return QDF_STATUS_E_FAILURE;
4280}
4281
4282/**
4283 * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function
4284 * @param wmi_handle : handle to WMI.
4285 * @param macaddr : MAC address
4286 * @param param : pointer to hold set_qboost parameter
4287 *
4288 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4289 */
4290QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl,
4291 uint8_t macaddr[IEEE80211_ADDR_LEN],
4292 struct set_qboost_params *param)
4293{
4294 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4295
4296 if (wmi_handle->ops->send_set_qboost_param_cmd)
4297 return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle,
4298 macaddr, param);
4299
4300 return QDF_STATUS_E_FAILURE;
4301}
4302
4303/**
4304 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
4305 * @param wmi_handle : handle to WMI.
4306 * @param param : pointer to hold mu scan param
4307 *
4308 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4309 */
4310QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
4311 struct mu_scan_params *param)
4312{
4313 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4314
4315 if (wmi_handle->ops->send_mu_scan_cmd)
4316 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
4317
4318 return QDF_STATUS_E_FAILURE;
4319}
4320
4321/**
4322 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
4323 * @param wmi_handle : handle to WMI.
4324 * @param param : pointer to hold mu scan param
4325 *
4326 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4327 */
4328QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
4329 struct lteu_config_params *param)
4330{
4331 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4332
4333 if (wmi_handle->ops->send_lteu_config_cmd)
4334 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
4335
4336 return QDF_STATUS_E_FAILURE;
4337}
4338
4339/**
4340 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
4341 * @param wmi_handle : handle to WMI.
4342 * @param param : pointer to hold mu scan param
4343 *
4344 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4345 */
4346QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
4347 struct set_ps_mode_params *param)
4348{
4349 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4350
4351 if (wmi_handle->ops->send_set_ps_mode_cmd)
4352 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
4353
4354 return QDF_STATUS_E_FAILURE;
4355}
4356
4357/**
4358 * wmi_unified_init_cmd_send() - send initialization cmd to fw
4359 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05304360 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304361 *
4362 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4363 */
4364QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05304365 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304366{
4367 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4368
4369 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05304370 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304371
4372 return QDF_STATUS_E_FAILURE;
4373}
4374
4375/**
4376 * wmi_save_service_bitmap() - save service bitmap
4377 * @wmi_handle: wmi handle
4378 * @param evt_buf: pointer to event buffer
4379 *
4380 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4381 */
Rajeev Kumar77901472017-02-12 02:12:17 -08004382QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
4383 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304384{
4385 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4386
4387 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304388 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08004389 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05304390 }
4391 return QDF_STATUS_E_FAILURE;
4392}
4393
4394/**
4395 * wmi_save_ext_service_bitmap() - save extended service bitmap
4396 * @wmi_handle: wmi handle
4397 * @param evt_buf: pointer to event buffer
4398 *
4399 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4400 */
4401QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
4402 void *bitmap_buf)
4403{
4404 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4405
4406 if (wmi_handle->ops->save_ext_service_bitmap) {
4407 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
4408 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304409 }
4410 return QDF_STATUS_E_FAILURE;
4411}
4412
4413/**
4414 * wmi_save_fw_version() - Save fw version
4415 * @wmi_handle: wmi handle
4416 * @param evt_buf: pointer to event buffer
4417 *
4418 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4419 */
4420QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
4421{
4422 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4423
4424 if (wmi_handle->ops->save_fw_version) {
4425 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
4426 return 0;
4427 }
4428 return QDF_STATUS_E_FAILURE;
4429
4430}
4431
4432/**
4433 * wmi_check_and_update_fw_version() - Ready and fw version check
4434 * @wmi_handle: wmi handle
4435 * @param evt_buf: pointer to event buffer
4436 *
4437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4438 */
4439QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
4440{
4441 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
4442
4443 if (wmi_handle->ops->check_and_update_fw_version)
4444 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
4445 evt_buf);
4446
4447 return QDF_STATUS_E_FAILURE;
4448
4449}
4450
4451/**
4452 * wmi_service_enabled() - Check if service enabled
4453 * @param wmi_handle: wmi handle
4454 * @param service_id: service identifier
4455 *
4456 * Return: 1 enabled, 0 disabled
4457 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304458bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
4459{
4460 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4461
4462 if ((service_id < wmi_services_max) &&
4463 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
4464 if (wmi_handle->ops->is_service_enabled) {
4465 return wmi_handle->ops->is_service_enabled(wmi_handle,
4466 wmi_handle->services[service_id]);
4467 }
4468 } else {
Sathish Kumar686d08d2018-06-26 11:01:11 +05304469 WMI_LOGI("Service %d not supported", service_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304470 }
Sourav Mohapatraa7b454d2017-12-03 11:44:44 +05304471
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304472 return false;
4473}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304474
4475/**
4476 * wmi_get_target_cap_from_service_ready() - extract service ready event
4477 * @wmi_handle: wmi handle
4478 * @param evt_buf: pointer to received event buffer
4479 * @param ev: pointer to hold target capability information extracted from even
4480 *
4481 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4482 */
4483QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004484 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304485{
4486 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4487
4488 if (wmi->ops->get_target_cap_from_service_ready)
4489 return wmi->ops->get_target_cap_from_service_ready(wmi,
4490 evt_buf, ev);
4491
4492 return QDF_STATUS_E_FAILURE;
4493}
4494
4495/**
4496 * wmi_extract_fw_version() - extract fw version
4497 * @wmi_handle: wmi handle
4498 * @param evt_buf: pointer to event buffer
4499 * @param fw_ver: Pointer to hold fw version
4500 *
4501 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4502 */
4503QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4504 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4505{
4506 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4507
4508 if (wmi_handle->ops->extract_fw_version)
4509 return wmi_handle->ops->extract_fw_version(wmi_handle,
4510 evt_buf, fw_ver);
4511
4512 return QDF_STATUS_E_FAILURE;
4513}
4514
4515/**
4516 * wmi_extract_fw_abi_version() - extract fw abi version
4517 * @wmi_handle: wmi handle
4518 * @param evt_buf: Pointer to event buffer
4519 * @param fw_ver: Pointer to hold fw abi version
4520 *
4521 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4522 */
4523QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4524 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4525{
4526 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4527
4528 if (wmi_handle->ops->extract_fw_abi_version)
4529 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4530 evt_buf, fw_ver);
4531
4532 return QDF_STATUS_E_FAILURE;
4533}
4534
4535/**
4536 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4537 * @wmi_handle: wmi handle
4538 * @param evt_buf: Pointer to event buffer
4539 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4540 *
4541 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4542 */
4543QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004544 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304545{
4546 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4547
4548 if (wmi_handle->ops->extract_hal_reg_cap)
4549 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4550 evt_buf, hal_reg_cap);
4551
4552 return QDF_STATUS_E_FAILURE;
4553}
4554
4555/**
4556 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4557 * request event
4558 * @wmi_handle: wmi handle
4559 * @param evt_buf: pointer to event buffer
4560 * @param num_entries: pointer to hold number of entries requested
4561 *
4562 * Return: Number of entries requested
4563 */
4564host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4565 void *evt_buf, uint8_t *num_entries)
4566{
4567 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4568
4569 if (wmi_handle->ops->extract_host_mem_req)
4570 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4571 evt_buf, num_entries);
4572
4573 *num_entries = 0;
4574 return NULL;
4575}
4576
4577/**
4578 * wmi_ready_extract_init_status() - Extract init status from ready event
4579 * @wmi_handle: wmi handle
4580 * @param ev: Pointer to event buffer
4581 *
4582 * Return: ready status
4583 */
4584uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4585{
4586 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4587
4588 if (wmi_handle->ops->ready_extract_init_status)
4589 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4590 ev);
4591
4592
4593 return 1;
4594
4595}
4596
4597/**
4598 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4599 * @wmi_handle: wmi handle
4600 * @param ev: pointer to event buffer
4601 * @param macaddr: Pointer to hold MAC address
4602 *
4603 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4604 */
4605QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4606{
4607 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4608
4609 if (wmi_handle->ops->ready_extract_mac_addr)
4610 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4611 ev, macaddr);
4612
4613
4614 return QDF_STATUS_E_FAILURE;
4615}
4616
4617/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07004618 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
4619 * @wmi_handle: wmi handle
4620 * @param ev: pointer to event buffer
4621 * @param num_mac_addr: Pointer to number of entries
4622 *
4623 * Return: address to start of mac addr list
4624 */
4625wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
4626 uint8_t *num_mac_addr)
4627{
4628 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4629
4630 if (wmi_handle->ops->ready_extract_mac_addr_list)
4631 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
4632 ev, num_mac_addr);
4633
4634 *num_mac_addr = 0;
4635
4636 return NULL;
4637}
4638
4639/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05304640 * wmi_extract_ready_params() - Extract data from ready event apart from
4641 * status, macaddr and version.
4642 * @wmi_handle: Pointer to WMI handle.
4643 * @evt_buf: Pointer to Ready event buffer.
4644 * @ev_param: Pointer to host defined struct to copy the data from event.
4645 *
4646 * Return: QDF_STATUS_SUCCESS on success.
4647 */
4648QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
4649 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
4650{
4651 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4652
4653 if (wmi_handle->ops->extract_ready_event_params)
4654 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
4655 evt_buf, ev_param);
4656
4657 return QDF_STATUS_E_FAILURE;
4658}
4659
4660/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304661 * wmi_extract_dbglog_data_len() - extract debuglog data length
4662 * @wmi_handle: wmi handle
4663 * @param evt_buf: pointer to event buffer
4664 * @param len: length of buffer
4665 *
4666 * Return: length
4667 */
4668uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004669 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304670{
4671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4672
4673 if (wmi_handle->ops->extract_dbglog_data_len)
4674 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4675 evt_buf, len);
4676
4677
4678 return NULL;
4679}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304680qdf_export_symbol(wmi_extract_dbglog_data_len);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304681
4682/**
4683 * wmi_send_ext_resource_config() - send extended resource configuration
4684 * @wmi_handle: wmi handle
4685 * @param ext_cfg: pointer to extended resource configuration
4686 *
4687 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4688 */
4689QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4690 wmi_host_ext_resource_config *ext_cfg)
4691{
4692 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4693
4694 if (wmi_handle->ops->send_ext_resource_config)
4695 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4696 ext_cfg);
4697
4698 return QDF_STATUS_E_FAILURE;
4699}
4700
4701/**
4702 * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function
4703 * @param wmi_handle : handle to WMI.
nobeljf74583b2018-01-25 16:35:36 -08004704 * @mac_id: mac_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304705 *
4706 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4707 */
nobeljf74583b2018-01-25 16:35:36 -08004708QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl,
4709 uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304710{
4711 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4712
4713 if (wmi->ops->send_nf_dbr_dbm_info_get_cmd)
nobeljf74583b2018-01-25 16:35:36 -08004714 return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304715
4716 return QDF_STATUS_E_FAILURE;
4717}
4718
4719/**
4720 * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function
4721 * @param wmi_handle : handle to WMI.
4722 * @param param : pointer to hold packet power info param
4723 *
4724 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4725 */
4726QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl,
4727 struct packet_power_info_params *param)
4728{
4729 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4730
4731 if (wmi->ops->send_packet_power_info_get_cmd)
4732 return wmi->ops->send_packet_power_info_get_cmd(wmi, param);
4733
4734 return QDF_STATUS_E_FAILURE;
4735}
4736
4737/**
4738 * wmi_unified_gpio_config_cmd_send() - WMI gpio config function
4739 * @param wmi_handle : handle to WMI.
4740 * @param param : pointer to hold gpio config param
4741 *
4742 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4743 */
4744QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl,
4745 struct gpio_config_params *param)
4746{
4747 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4748
4749 if (wmi_handle->ops->send_gpio_config_cmd)
4750 return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param);
4751
4752 return QDF_STATUS_E_FAILURE;
4753}
4754
4755/**
4756 * wmi_unified_gpio_output_cmd_send() - WMI gpio config function
4757 * @param wmi_handle : handle to WMI.
4758 * @param param : pointer to hold gpio config param
4759 *
4760 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4761 */
4762QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl,
4763 struct gpio_output_params *param)
4764{
4765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4766
4767 if (wmi_handle->ops->send_gpio_output_cmd)
4768 return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param);
4769
4770 return QDF_STATUS_E_FAILURE;
4771}
4772
4773/**
4774 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4775 * @param wmi_handle : handle to WMI.
4776 * @param param : pointer to hold rtt meas req test param
4777 *
4778 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4779 */
4780QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4781 struct rtt_meas_req_test_params *param)
4782{
4783 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4784
4785 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4786 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4787 param);
4788
4789 return QDF_STATUS_E_FAILURE;
4790}
4791
4792/**
4793 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4794 * @param wmi_handle : handle to WMI.
4795 * @param param : pointer to hold rtt meas req param
4796 *
4797 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4798 */
4799QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4800 struct rtt_meas_req_params *param)
4801{
4802 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4803
4804 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4805 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4806 param);
4807
4808 return QDF_STATUS_E_FAILURE;
4809}
4810
4811/**
4812 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4813 * @param wmi_handle : handle to WMI.
4814 * @param param : pointer to hold lci param
4815 *
4816 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4817 */
4818QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4819 struct lci_set_params *param)
4820{
4821 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4822
4823 if (wmi_handle->ops->send_lci_set_cmd)
4824 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4825
4826 return QDF_STATUS_E_FAILURE;
4827}
4828
4829/**
4830 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4831 * @param wmi_handle : handle to WMI.
4832 * @param param : pointer to hold lcr param
4833 *
4834 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4835 */
4836QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4837 struct lcr_set_params *param)
4838{
4839 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4840
4841 if (wmi_handle->ops->send_lcr_set_cmd)
4842 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4843
4844 return QDF_STATUS_E_FAILURE;
4845}
4846
4847/**
4848 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4849 * @param wmi_handle : handle to WMI.
4850 * @param param : pointer to hold rtt meas req test param
4851 *
4852 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4853 */
4854QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4855 struct rtt_keepalive_req_params *param)
4856{
4857 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4858
4859 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4860 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4861 param);
4862
4863 return QDF_STATUS_E_FAILURE;
4864}
4865
4866/**
4867 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4868 * to fw
4869 * @wmi_handle: wmi handle
4870 * @param: pointer to hold periodic chan stats param
4871 *
4872 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4873 */
4874QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4875 struct periodic_chan_stats_params *param)
4876{
4877 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4878
4879 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4880 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4881 param);
4882
4883 return QDF_STATUS_E_FAILURE;
4884}
4885
Jeffin Mammen095050b2018-07-24 14:20:08 +05304886#ifdef WLAN_ATF_ENABLE
4887/**
4888 * wmi_unified_set_atf_cmd_send() - WMI set atf function
4889 * @param wmi_handle : handle to WMI.
4890 * @param param : pointer to set atf param
4891 *
4892 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4893 */
4894QDF_STATUS
4895wmi_unified_set_atf_cmd_send(void *wmi_hdl,
4896 struct set_atf_params *param)
4897{
4898 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4899
4900 if (wmi_handle->ops->send_set_atf_cmd)
4901 return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param);
4902
4903 return QDF_STATUS_E_FAILURE;
4904}
4905
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304906/**
4907 * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw
4908 * @wmi_handle: wmi handle
4909 * @param: pointer to atf peer request param
4910 *
4911 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4912 */
4913QDF_STATUS
4914wmi_send_atf_peer_request_cmd(void *wmi_hdl,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304915 struct atf_peer_request_params *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304916{
Jeffin Mammen095050b2018-07-24 14:20:08 +05304917 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304918
4919 if (wmi_handle->ops->send_atf_peer_request_cmd)
4920 return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304921 param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304922
4923 return QDF_STATUS_E_FAILURE;
4924}
4925
4926/**
4927 * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw
4928 * @wmi_handle: wmi handle
4929 * @param: pointer to set atf grouping param
4930 *
4931 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4932 */
4933QDF_STATUS
4934wmi_send_set_atf_grouping_cmd(void *wmi_hdl,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304935 struct atf_grouping_params *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304936{
Jeffin Mammen095050b2018-07-24 14:20:08 +05304937 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304938
4939 if (wmi_handle->ops->send_set_atf_grouping_cmd)
4940 return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle,
Jeffin Mammen095050b2018-07-24 14:20:08 +05304941 param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304942
4943 return QDF_STATUS_E_FAILURE;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304944}
4945
Sathish Kumar68789382016-11-14 17:44:29 +05304946/**
Jeffin Mammen095050b2018-07-24 14:20:08 +05304947 * wmi_send_set_atf_group_ac_cmd() - send set atf AC command to fw
4948 * @wmi_handle: wmi handle
4949 * @param: pointer to set atf AC group param
4950 *
4951 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4952 */
4953QDF_STATUS
4954wmi_send_set_atf_group_ac_cmd(void *wmi_hdl,
4955 struct atf_group_ac_params *param)
4956{
4957 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4958
4959 if (wmi_handle->ops->send_set_atf_group_ac_cmd)
4960 return wmi_handle->ops->send_set_atf_group_ac_cmd(wmi_handle,
4961 param);
4962
4963 return QDF_STATUS_E_FAILURE;
4964}
4965
4966/**
4967 * wmi_extract_atf_peer_stats_ev() - extract atf peer stats
4968 * from event
4969 * @wmi_handle: wmi handle
4970 * @param evt_buf: pointer to event buffer
4971 * @param ev: Pointer to hold atf peer stats
4972 *
4973 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4974 */
4975QDF_STATUS
4976wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf,
4977 wmi_host_atf_peer_stats_event *ev)
4978{
4979 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4980
4981 if (wmi->ops->extract_atf_peer_stats_ev)
4982 return wmi->ops->extract_atf_peer_stats_ev(wmi, evt_buf, ev);
4983
4984 return QDF_STATUS_E_FAILURE;
4985}
4986
4987/**
4988 * wmi_extract_atf_token_info_ev() - extract atf token info
4989 * from event
4990 * @wmi_handle: wmi handle
4991 * @param evt_buf: pointer to event buffer
4992 * @param idx: Index indicating the peer number
4993 * @param ev: Pointer to hold atf token info
4994 *
4995 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4996 */
4997QDF_STATUS
4998wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, uint8_t idx,
4999 wmi_host_atf_peer_stats_info *ev)
5000{
5001 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
5002
5003 if (wmi->ops->extract_atf_token_info_ev)
5004 return wmi->ops->extract_atf_token_info_ev(wmi, evt_buf,
5005 idx, ev);
5006
5007 return QDF_STATUS_E_FAILURE;
5008}
5009#endif /* WLAN_ATF_ENABLE */
5010
5011/**
Sathish Kumar68789382016-11-14 17:44:29 +05305012 * wmi_send_get_user_position_cmd() - send get user position command to fw
5013 * @wmi_handle: wmi handle
5014 *
5015 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5016 */
5017QDF_STATUS
5018wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
5019{
5020 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5021
5022 if (wmi_handle->ops->send_get_user_position_cmd)
5023 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
5024 value);
5025
5026 return QDF_STATUS_E_FAILURE;
5027}
5028
5029/**
5030 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
5031 * command to fw
5032 * @wmi_handle: wmi handle
5033 * @value: user pos value
5034 *
5035 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5036 */
5037QDF_STATUS
5038wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5039{
5040 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5041
5042 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
5043 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
5044
5045 return QDF_STATUS_E_FAILURE;
5046}
5047
5048/**
5049 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
5050 * tx count to fw
5051 * @wmi_handle: wmi handle
5052 * @value: reset tx count value
5053 *
5054 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5055 */
5056QDF_STATUS
5057wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
5058{
5059 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5060
5061 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
5062 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
5063 value);
5064
5065 return QDF_STATUS_E_FAILURE;
5066}
5067
5068/**
5069 * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo
5070 * tx count to fw
5071 * @wmi_handle: wmi handle
5072 * @value: value
5073 *
5074 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5075 */
5076QDF_STATUS
5077wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value)
5078{
5079 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5080
5081 if (wmi->ops->send_pdev_caldata_version_check_cmd)
5082 return wmi->ops->send_pdev_caldata_version_check_cmd(wmi,
5083 value);
5084
5085 return QDF_STATUS_E_FAILURE;
5086}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305087
5088/* Extract - APIs */
5089/**
5090 * wmi_extract_wds_addr_event - Extract WDS addr WMI event
5091 *
5092 * @param wmi_handle : handle to WMI.
5093 * @param evt_buf : pointer to event buffer
5094 * @param len : length of the event buffer
5095 * @param wds_ev: pointer to strct to extract
5096 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5097 */
5098QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf,
5099 uint16_t len, wds_addr_event_t *wds_ev)
5100{
5101 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5102
5103 if (wmi_handle->ops->extract_wds_addr_event) {
5104 return wmi_handle->ops->extract_wds_addr_event(wmi_handle,
5105 evt_buf, len, wds_ev);
5106 }
5107 return QDF_STATUS_E_FAILURE;
5108}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05305109qdf_export_symbol(wmi_extract_wds_addr_event);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305110
5111/**
5112 * wmi_extract_dcs_interference_type() - extract dcs interference type
5113 * @wmi_handle: wmi handle
5114 * @param evt_buf: pointer to event buffer
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305115 * @param param: Pointer to hold dcs interference param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305116 *
5117 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5118 */
5119QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305120 void *evt_buf, struct wmi_host_dcs_interference_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305121{
5122 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5123
5124 if (wmi->ops->extract_dcs_interference_type) {
5125 return wmi->ops->extract_dcs_interference_type(wmi,
Kiran Venkatappafea8a802016-12-29 18:09:32 +05305126 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305127 }
5128 return QDF_STATUS_E_FAILURE;
5129}
5130
5131/*
5132 * wmi_extract_dcs_cw_int() - extract dcs cw interference from event
5133 * @wmi_handle: wmi handle
5134 * @param evt_buf: pointer to event buffer
5135 * @param cw_int: Pointer to hold cw interference
5136 *
5137 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5138 */
5139QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf,
5140 wmi_host_ath_dcs_cw_int *cw_int)
5141{
5142 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5143
5144 if (wmi_handle->ops->extract_dcs_cw_int) {
5145 return wmi_handle->ops->extract_dcs_cw_int(wmi_handle,
5146 evt_buf, cw_int);
5147 }
5148 return QDF_STATUS_E_FAILURE;
5149}
5150
5151/**
5152 * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event
5153 * @wmi_handle: wmi handle
5154 * @param evt_buf: pointer to event buffer
5155 * @param wlan_stat: Pointer to hold wlan stats
5156 *
5157 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5158 */
5159QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf,
5160 wmi_host_dcs_im_tgt_stats_t *wlan_stat)
5161{
5162 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5163
5164 if (wmi_handle->ops->extract_dcs_im_tgt_stats) {
5165 return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle,
5166 evt_buf, wlan_stat);
5167 }
5168 return QDF_STATUS_E_FAILURE;
5169}
5170
5171/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305172 * wmi_extract_fips_event_data() - extract fips event data
5173 * @wmi_handle: wmi handle
5174 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305175 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305176 *
5177 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5178 */
5179QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305180 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305181{
5182 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5183
5184 if (wmi_handle->ops->extract_fips_event_data) {
5185 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05305186 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305187 }
5188 return QDF_STATUS_E_FAILURE;
5189}
5190
5191/**
5192 * wmi_extract_vdev_start_resp() - extract vdev start response
5193 * @wmi_handle: wmi handle
5194 * @param evt_buf: pointer to event buffer
5195 * @param vdev_rsp: Pointer to hold vdev response
5196 *
5197 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5198 */
5199QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf,
5200 wmi_host_vdev_start_resp *vdev_rsp)
5201{
5202 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5203
5204 if (wmi_handle->ops->extract_vdev_start_resp)
5205 return wmi_handle->ops->extract_vdev_start_resp(wmi_handle,
5206 evt_buf, vdev_rsp);
5207
5208 return QDF_STATUS_E_FAILURE;
5209}
5210
5211/**
Om Prakash Tripathif3ef42d2017-11-24 16:53:07 +05305212 * wmi_extract_vdev_delete_resp() - extract vdev delete response
5213 * @wmi_handle: wmi handle
5214 * @param evt_buf: pointer to event buffer
5215 * @param delete_rsp: Pointer to hold vdev delete response
5216 *
5217 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5218 */
5219QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf,
5220 struct wmi_host_vdev_delete_resp *delete_rsp)
5221{
5222 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5223
5224 if (wmi_handle->ops->extract_vdev_delete_resp)
5225 return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle,
5226 evt_buf, delete_rsp);
5227
5228 return QDF_STATUS_E_FAILURE;
5229}
5230
5231
5232/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305233 * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev
5234 * @wmi_handle: wmi handle
5235 * @param evt_buf: pointer to event buffer
5236 * @param vdev_map: Pointer to hold num vdev
5237 *
5238 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5239 */
5240QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5241 uint32_t *num_vdevs)
5242{
5243 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5244
5245 if (wmi->ops->extract_tbttoffset_num_vdevs)
5246 return wmi->ops->extract_tbttoffset_num_vdevs(wmi,
5247 evt_buf, num_vdevs);
5248
5249 return QDF_STATUS_E_FAILURE;
5250}
5251
5252/**
5253 * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev
5254 * @wmi_handle: wmi handle
5255 * @param evt_buf: pointer to event buffer
5256 * @param vdev_map: Pointer to hold num vdev
5257 *
5258 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5259 */
5260QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf,
5261 uint32_t *num_vdevs)
5262{
5263 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5264
5265 if (wmi->ops->extract_ext_tbttoffset_num_vdevs)
5266 return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi,
5267 evt_buf, num_vdevs);
5268
5269 return QDF_STATUS_E_FAILURE;
5270}
5271
5272/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305273 * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param
5274 * @wmi_handle: wmi handle
5275 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005276 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305277 * @param tbtt_param: Pointer to tbttoffset event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305278 *
5279 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5280 */
5281QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305282 uint8_t idx, struct tbttoffset_params *tbtt_param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305283{
5284 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5285
5286 if (wmi->ops->extract_tbttoffset_update_params)
5287 return wmi->ops->extract_tbttoffset_update_params(wmi,
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305288 evt_buf, idx, tbtt_param);
5289
5290 return QDF_STATUS_E_FAILURE;
5291}
5292
5293/**
5294 * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param
5295 * @wmi_handle: wmi handle
5296 * @param evt_buf: pointer to event buffer
Jeff Johnsonda263992018-05-12 14:22:00 -07005297 * @param idx: Index referring to a vdev
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305298 * @param tbtt_param: Pointer to tbttoffset event param
5299 *
5300 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5301 */
5302QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl,
5303 void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param)
5304{
5305 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5306
5307 if (wmi->ops->extract_ext_tbttoffset_update_params)
5308 return wmi->ops->extract_ext_tbttoffset_update_params(wmi,
5309 evt_buf, idx, tbtt_param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305310
5311 return QDF_STATUS_E_FAILURE;
5312}
5313
5314/**
5315 * wmi_extract_mgmt_rx_params() - extract management rx params from event
5316 * @wmi_handle: wmi handle
5317 * @param evt_buf: pointer to event buffer
5318 * @param hdr: Pointer to hold header
5319 * @param bufp: Pointer to hold pointer to rx param buffer
5320 *
5321 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5322 */
5323QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05305324 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305325{
5326 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5327
5328 if (wmi_handle->ops->extract_mgmt_rx_params)
5329 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
5330 evt_buf, hdr, bufp);
5331
5332 return QDF_STATUS_E_FAILURE;
5333}
5334
5335/**
5336 * wmi_extract_vdev_stopped_param() - extract vdev stop param from event
5337 * @wmi_handle: wmi handle
5338 * @param evt_buf: pointer to event buffer
5339 * @param vdev_id: Pointer to hold vdev identifier
5340 *
5341 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5342 */
5343QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
5344 uint32_t *vdev_id)
5345{
5346 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5347
5348 if (wmi_handle->ops->extract_vdev_stopped_param)
5349 return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle,
5350 evt_buf, vdev_id);
5351
5352 return QDF_STATUS_E_FAILURE;
5353}
5354
5355/**
5356 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
5357 * @wmi_handle: wmi handle
5358 * @param evt_buf: pointer to event buffer
5359 * @param param: Pointer to hold roam param
5360 *
5361 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5362 */
5363QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
5364 wmi_host_roam_event *param)
5365{
5366 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5367
5368 if (wmi_handle->ops->extract_vdev_roam_param)
5369 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
5370 evt_buf, param);
5371
5372 return QDF_STATUS_E_FAILURE;
5373}
5374
5375/**
5376 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
5377 * @wmi_handle: wmi handle
5378 * @param evt_buf: pointer to event buffer
5379 * @param param: Pointer to hold vdev scan param
5380 *
5381 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5382 */
5383QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05305384 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305385{
5386 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5387
5388 if (wmi_handle->ops->extract_vdev_scan_ev_param)
5389 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
5390 evt_buf, param);
5391
5392 return QDF_STATUS_E_FAILURE;
5393}
5394
Frank Liu3d5e9992017-03-15 17:51:43 +08005395#ifdef CONVERGED_TDLS_ENABLE
5396QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
5397 struct tdls_event_info *param)
5398{
5399 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5400
5401 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
5402 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
5403 evt_buf, param);
5404
5405 return QDF_STATUS_E_FAILURE;
5406}
5407#endif
5408
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305409/**
5410 * wmi_extract_mu_ev_param() - extract mu param from event
5411 * @wmi_handle: wmi handle
5412 * @param evt_buf: pointer to event buffer
5413 * @param param: Pointer to hold mu report
5414 *
5415 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5416 */
5417QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
5418 wmi_host_mu_report_event *param)
5419{
5420 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5421
5422 if (wmi_handle->ops->extract_mu_ev_param)
5423 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
5424 param);
5425
5426 return QDF_STATUS_E_FAILURE;
5427}
5428
5429/**
Sathish Kumar68789382016-11-14 17:44:29 +05305430 * wmi_extract_mu_db_entry() - extract mu db entry from event
5431 * @wmi_handle: wmi handle
5432 * @param evt_buf: pointer to event buffer
5433 * @param param: Pointer to hold mu db entry
5434 *
5435 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5436 */
5437QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
5438 uint8_t idx, wmi_host_mu_db_entry *param)
5439{
5440 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5441
5442 if (wmi_handle->ops->extract_mu_db_entry)
5443 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
5444 idx, param);
5445
5446 return QDF_STATUS_E_FAILURE;
5447}
5448
5449/**
5450 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
5451 * @wmi_handle: wmi handle
5452 * @param evt_buf: pointer to event buffer
5453 * @param param: Pointer to hold mumimo tx count
5454 *
5455 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5456 */
5457QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
5458 wmi_host_peer_txmu_cnt_event *param)
5459{
5460 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5461
5462 if (wmi->ops->extract_mumimo_tx_count_ev_param)
5463 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
5464 evt_buf, param);
5465
5466 return QDF_STATUS_E_FAILURE;
5467}
5468
5469/**
5470 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
5471 * from event
5472 * @wmi_handle: wmi handle
5473 * @param evt_buf: pointer to event buffer
5474 * @param param: Pointer to hold peer gid userposition list
5475 *
5476 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5477 */
5478QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
5479 void *evt_buf,
5480 wmi_host_peer_gid_userpos_list_event *param)
5481{
5482 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5483
5484 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
5485 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
5486 evt_buf, param);
5487
5488 return QDF_STATUS_E_FAILURE;
5489}
5490
5491/**
Anirban Sirkhell23467ce2017-08-25 16:01:50 +05305492 * wmi_extract_esp_estimate_ev_param() - extract air time from event
5493 * @wmi_handle: wmi handle
5494 * @evt_buf: pointer to event buffer
5495 * @param: Pointer to hold esp event
5496 *
5497 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5498 */
5499QDF_STATUS
5500wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
5501 struct esp_estimation_event *param)
5502{
5503 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5504
5505 if (wmi_handle->ops->extract_esp_estimation_ev_param)
5506 return wmi_handle->ops->extract_esp_estimation_ev_param(
5507 wmi_handle, evt_buf, param);
5508
5509 return QDF_STATUS_E_FAILURE;
5510}
5511
5512/**
Sathish Kumar68789382016-11-14 17:44:29 +05305513 * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata
5514 * from event
5515 * @wmi_handle: wmi handle
5516 * @param evt_buf: pointer to event buffer
5517 * @param param: Pointer to hold caldata version data
5518 *
5519 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5520 */
5521QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl,
5522 void *evt_buf,
5523 wmi_host_pdev_check_cal_version_event *param)
5524{
5525 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5526
5527 if (wmi->ops->extract_pdev_caldata_version_check_ev_param)
5528 return wmi->ops->extract_pdev_caldata_version_check_ev_param(
5529 wmi, evt_buf, param);
5530
5531 return QDF_STATUS_E_FAILURE;
5532}
5533
5534/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305535 * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration
5536 * param from event
5537 * @wmi_handle: wmi handle
5538 * @param evt_buf: pointer to event buffer
5539 * @param param: Pointer to hold tpc configuration
5540 *
5541 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5542 */
5543QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf,
5544 wmi_host_pdev_tpc_config_event *param)
5545{
5546 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5547
5548 if (wmi->ops->extract_pdev_tpc_config_ev_param)
5549 return wmi->ops->extract_pdev_tpc_config_ev_param(wmi,
5550 evt_buf, param);
5551
5552 return QDF_STATUS_E_FAILURE;
5553
5554}
5555
5556/**
5557 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
5558 * @wmi_handle: wmi handle
5559 * @param evt_buf: pointer to event buffer
5560 * @param gpio_num: Pointer to hold gpio number
5561 *
5562 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5563 */
5564QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
5565 void *evt_buf, uint32_t *gpio_num)
5566{
5567 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5568
5569 if (wmi_handle->ops->extract_gpio_input_ev_param)
5570 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
5571 evt_buf, gpio_num);
5572
5573 return QDF_STATUS_E_FAILURE;
5574}
5575
5576/**
5577 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
5578 * param from event
5579 * @wmi_handle: wmi handle
5580 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305581 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305582 *
5583 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5584 */
5585QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305586 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305587{
5588 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5589
5590 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
5591 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05305592 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305593
5594 return QDF_STATUS_E_FAILURE;
5595}
5596
5597/**
5598 * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration
5599 * power param from event
5600 * @wmi_handle: wmi handle
5601 * @param evt_buf: pointer to event buffer
5602 * @param param: Pointer to hold nf cal power param
5603 *
5604 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5605 */
5606QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf,
5607 wmi_host_pdev_nfcal_power_all_channels_event *param)
5608{
5609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5610
5611 if (wmi_handle->ops->extract_nfcal_power_ev_param)
5612 return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle,
5613 evt_buf, param);
5614
5615 return QDF_STATUS_E_FAILURE;
5616
5617}
5618
5619/**
5620 * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event
5621 * @wmi_handle: wmi handle
5622 * @param evt_buf: pointer to event buffer
5623 * @param param: Pointer to hold tpc param
5624 *
5625 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5626 */
5627QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf,
5628 wmi_host_pdev_tpc_event *param)
5629{
5630 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5631
5632 if (wmi_handle->ops->extract_pdev_tpc_ev_param)
5633 return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle,
5634 evt_buf, param);
5635
5636 return QDF_STATUS_E_FAILURE;
5637
5638}
5639
5640/**
5641 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
5642 * from event
5643 * @wmi_handle: wmi handle
5644 * @param evt_buf: pointer to event buffer
5645 * @param param: Pointer to generic buffer param
5646 *
5647 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5648 */
5649QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
5650 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
5651{
5652 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5653
5654 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
5655 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
5656 evt_buf, param);
5657
5658 return QDF_STATUS_E_FAILURE;
5659
5660}
5661
5662/**
5663 * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param
5664 * from event
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305665 * @wmi_hdl: wmi handle
5666 * @evt_buf: pointer to event buffer
5667 * @param: Pointer to mgmt tx completion param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305668 *
5669 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5670 */
5671QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf,
5672 wmi_host_mgmt_tx_compl_event *param)
5673{
5674 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5675
5676 if (wmi_handle->ops->extract_mgmt_tx_compl_param)
5677 return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle,
5678 evt_buf, param);
5679
5680
5681 return QDF_STATUS_E_FAILURE;
5682}
5683
5684/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +05305685 * wmi_extract_offchan_data_tx_compl_param() -
5686 * extract offchan data tx completion param from event
5687 * @wmi_hdl: wmi handle
5688 * @evt_buf: pointer to event buffer
5689 * @param: Pointer to offchan data tx completion param
5690 *
5691 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5692 */
5693QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf,
5694 struct wmi_host_offchan_data_tx_compl_event *param)
5695{
5696 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5697
5698 if (wmi_handle->ops->extract_offchan_data_tx_compl_param)
5699 return wmi_handle->ops->extract_offchan_data_tx_compl_param(
5700 wmi_handle, evt_buf, param);
5701
5702
5703 return QDF_STATUS_E_FAILURE;
5704}
5705
5706/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05305707 * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status
5708 * from event
5709 * @wmi_handle: wmi handle
5710 * @param evt_buf: pointer to event buffer
5711 * @param param: Pointer to CSA switch count status param
5712 *
5713 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5714 */
5715QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl,
5716 void *evt_buf,
5717 struct pdev_csa_switch_count_status *param)
5718{
5719 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5720
5721 if (wmi_handle->ops->extract_pdev_csa_switch_count_status)
5722 return wmi_handle->ops->extract_pdev_csa_switch_count_status(
5723 wmi_handle,
5724 evt_buf,
5725 param);
5726
5727 return QDF_STATUS_E_FAILURE;
5728}
5729
5730
5731/**
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305732 * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305733 * @wmi_handle: wmi handle
5734 * @param evt_buf: pointer to event buffer
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305735 * @param num_vdevs: Pointer to hold num vdevs
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305736 *
5737 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5738 */
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305739QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf,
5740 uint32_t *num_vdevs)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305741{
5742 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5743
Sathish Kumare5f0e0e2017-05-17 18:05:15 +05305744 if (wmi_handle->ops->extract_swba_num_vdevs)
5745 return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle,
5746 evt_buf, num_vdevs);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305747
5748 return QDF_STATUS_E_FAILURE;
5749}
5750
5751/**
5752 * wmi_extract_swba_tim_info() - extract swba tim info from event
5753 * @wmi_handle: wmi handle
5754 * @param evt_buf: pointer to event buffer
5755 * @param idx: Index to bcn info
5756 * @param tim_info: Pointer to hold tim info
5757 *
5758 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5759 */
5760QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf,
5761 uint32_t idx, wmi_host_tim_info *tim_info)
5762{
5763 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5764
5765 if (wmi_handle->ops->extract_swba_tim_info)
5766 return wmi_handle->ops->extract_swba_tim_info(wmi_handle,
5767 evt_buf, idx, tim_info);
5768
5769 return QDF_STATUS_E_FAILURE;
5770}
5771
5772/**
5773 * wmi_extract_swba_noa_info() - extract swba NoA information from event
5774 * @wmi_handle: wmi handle
5775 * @param evt_buf: pointer to event buffer
5776 * @param idx: Index to bcn info
5777 * @param p2p_desc: Pointer to hold p2p NoA info
5778 *
5779 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5780 */
5781QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf,
5782 uint32_t idx, wmi_host_p2p_noa_info *p2p_desc)
5783{
5784 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5785
5786 if (wmi_handle->ops->extract_swba_noa_info)
5787 return wmi_handle->ops->extract_swba_noa_info(wmi_handle,
5788 evt_buf, idx, p2p_desc);
5789
5790 return QDF_STATUS_E_FAILURE;
5791}
5792
Wu Gaocd3a8512017-03-13 20:17:34 +08005793#ifdef CONVERGED_P2P_ENABLE
5794/**
5795 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
5796 * @wmi_handle: wmi handle
5797 * @evt_buf: pointer to event buffer
5798 * @param: Pointer to hold listen offload stop param
5799 *
5800 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5801 */
5802QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
5803 struct p2p_lo_event *param)
5804{
5805 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5806
5807 if (!wmi_handle) {
5808 WMI_LOGE("wmi handle is null");
5809 return QDF_STATUS_E_INVAL;
5810 }
5811
5812 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
5813 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
5814 wmi_handle, evt_buf, param);
5815
5816 return QDF_STATUS_E_FAILURE;
5817}
5818
5819/**
5820 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
5821 * @wmi_handle: wmi handle
5822 * @evt_buf: pointer to event buffer
5823 * @param: Pointer to hold p2p noa param
5824 *
5825 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5826 */
5827QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
5828 struct p2p_noa_info *param)
5829{
5830 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5831
5832 if (!wmi_handle) {
5833 WMI_LOGE("wmi handle is null");
5834 return QDF_STATUS_E_INVAL;
5835 }
5836
5837 if (wmi_handle->ops->extract_p2p_noa_ev_param)
5838 return wmi_handle->ops->extract_p2p_noa_ev_param(
5839 wmi_handle, evt_buf, param);
5840
5841 return QDF_STATUS_E_FAILURE;
5842}
5843#endif
5844
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305845/**
5846 * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state
5847 * from event
5848 * @wmi_handle: wmi handle
5849 * @param evt_buf: pointer to event buffer
5850 * @param ev: Pointer to hold peer param and ps state
5851 *
5852 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5853 */
5854QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf,
5855 wmi_host_peer_sta_ps_statechange_event *ev)
5856{
5857 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5858
5859 if (wmi->ops->extract_peer_sta_ps_statechange_ev)
5860 return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi,
5861 evt_buf, ev);
5862
5863 return QDF_STATUS_E_FAILURE;
5864}
5865
5866/**
5867 * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event
5868 * @wmi_handle: wmi handle
5869 * @param evt_buf: pointer to event buffer
5870 * @param ev: Pointer to hold peer param
5871 *
5872 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5873 */
5874QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf,
5875 wmi_host_peer_sta_kickout_event *ev)
5876{
5877 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5878
5879 if (wmi_handle->ops->extract_peer_sta_kickout_ev)
5880 return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle,
5881 evt_buf, ev);
5882
5883 return QDF_STATUS_E_FAILURE;
5884}
5885
5886/**
5887 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
5888 * @wmi_handle: wmi handle
5889 * @param evt_buf: pointer to event buffer
5890 * @param peer_mac: Pointer to hold peer mac address
5891 * @param rate_cap: Pointer to hold ratecode
5892 *
5893 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5894 */
5895QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
5896 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
5897{
5898 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5899
5900 if (wmi->ops->extract_peer_ratecode_list_ev)
5901 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
5902 evt_buf, peer_mac, rate_cap);
5903
5904 return QDF_STATUS_E_FAILURE;
5905
5906}
5907
5908/**
5909 * wmi_extract_comb_phyerr() - extract comb phy error from event
5910 * @wmi_handle: wmi handle
5911 * @param evt_buf: pointer to event buffer
5912 * @param datalen: data length of event buffer
5913 * @param buf_offset: Pointer to hold value of current event buffer offset
5914 * post extraction
5915 * @param phyer: Pointer to hold phyerr
5916 *
5917 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5918 */
5919QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
5920 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5921{
5922 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5923
5924 if (wmi_handle->ops->extract_comb_phyerr)
5925 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
5926 evt_buf, datalen, buf_offset, phyerr);
5927
5928 return QDF_STATUS_E_FAILURE;
5929
5930}
5931
5932/**
5933 * wmi_extract_single_phyerr() - extract single phy error from event
5934 * @wmi_handle: wmi handle
5935 * @param evt_buf: pointer to event buffer
5936 * @param datalen: data length of event buffer
5937 * @param buf_offset: Pointer to hold value of current event buffer offset
5938 * post extraction
5939 * @param phyerr: Pointer to hold phyerr
5940 *
5941 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5942 */
5943QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
5944 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
5945{
5946 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5947
5948 if (wmi_handle->ops->extract_single_phyerr)
5949 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
5950 evt_buf, datalen, buf_offset, phyerr);
5951
5952 return QDF_STATUS_E_FAILURE;
5953
5954}
5955
5956/**
5957 * wmi_extract_composite_phyerr() - extract composite phy error from event
5958 * @wmi_handle: wmi handle
5959 * @param evt_buf: pointer to event buffer
5960 * @param datalen: Length of event buffer
5961 * @param phyerr: Pointer to hold phy error
5962 *
5963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5964 */
5965QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
5966 uint16_t datalen, wmi_host_phyerr_t *phyerr)
5967{
5968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5969
5970 if (wmi_handle->ops->extract_composite_phyerr)
5971 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
5972 evt_buf, datalen, phyerr);
5973
5974 return QDF_STATUS_E_FAILURE;
5975
5976}
5977
5978/**
5979 * wmi_extract_stats_param() - extract all stats count from event
5980 * @wmi_handle: wmi handle
5981 * @param evt_buf: pointer to event buffer
5982 * @param stats_param: Pointer to hold stats count
5983 *
5984 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5985 */
5986QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
5987 wmi_host_stats_event *stats_param)
5988{
5989 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5990
5991 if (wmi_handle->ops->extract_all_stats_count)
5992 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
5993 evt_buf, stats_param);
5994
5995 return QDF_STATUS_E_FAILURE;
5996}
5997
5998/**
5999 * wmi_extract_pdev_stats() - extract pdev stats from event
6000 * @wmi_handle: wmi handle
6001 * @param evt_buf: pointer to event buffer
6002 * @param index: Index into pdev stats
6003 * @param pdev_stats: Pointer to hold pdev stats
6004 *
6005 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6006 */
6007QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
6008 uint32_t index, wmi_host_pdev_stats *pdev_stats)
6009{
6010 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6011
6012 if (wmi_handle->ops->extract_pdev_stats)
6013 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
6014 evt_buf, index, pdev_stats);
6015
6016 return QDF_STATUS_E_FAILURE;
6017}
6018
6019/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07006020 * extract_unit_test() - extract unit test from event
6021 * @wmi_handle: wmi handle
6022 * @param evt_buf: pointer to event buffer
6023 * @param unit_test: Pointer to hold unit-test header
6024 * @param maxspace: The amount of space in evt_buf
6025 *
6026 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6027 */
6028QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
6029 wmi_unit_test_event *unit_test, uint32_t maxspace)
6030{
6031 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6032
6033 if (wmi_handle->ops->extract_unit_test)
6034 return wmi_handle->ops->extract_unit_test(wmi_handle,
6035 evt_buf, unit_test, maxspace);
6036
6037 return QDF_STATUS_E_FAILURE;
6038}
6039
6040/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306041 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
6042 * @wmi_handle: wmi handle
6043 * @param evt_buf: pointer to event buffer
6044 * @param index: Index into extended pdev stats
6045 * @param pdev_ext_stats: Pointer to hold extended pdev stats
6046 *
6047 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6048 */
6049QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
6050 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
6051{
6052 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6053
6054 if (wmi_handle->ops->extract_pdev_ext_stats)
6055 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
6056 evt_buf, index, pdev_ext_stats);
6057
6058 return QDF_STATUS_E_FAILURE;
6059}
6060
6061/**
6062 * wmi_extract_peer_stats() - extract peer stats from event
6063 * @wmi_handle: wmi handle
6064 * @param evt_buf: pointer to event buffer
6065 * @param index: Index into peer stats
6066 * @param peer_stats: Pointer to hold peer stats
6067 *
6068 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6069 */
6070QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
6071 uint32_t index, wmi_host_peer_stats *peer_stats)
6072{
6073 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6074
6075 if (wmi_handle->ops->extract_peer_stats)
6076 return wmi_handle->ops->extract_peer_stats(wmi_handle,
6077 evt_buf, index, peer_stats);
6078
6079 return QDF_STATUS_E_FAILURE;
6080}
6081
6082/**
6083 * wmi_extract_vdev_stats() - extract vdev stats from event
6084 * @wmi_handle: wmi handle
6085 * @param evt_buf: pointer to event buffer
6086 * @param index: Index into vdev stats
6087 * @param vdev_stats: Pointer to hold vdev stats
6088 *
6089 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6090 */
6091QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
6092 uint32_t index, wmi_host_vdev_stats *vdev_stats)
6093{
6094 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6095
6096 if (wmi_handle->ops->extract_vdev_stats)
6097 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
6098 evt_buf, index, vdev_stats);
6099
6100 return QDF_STATUS_E_FAILURE;
6101}
6102
6103/**
Naveen Rawatd2115722018-04-12 08:17:55 -07006104 * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
6105 * @wmi_handle: wmi handle
6106 * @param evt_buf: pointer to event buffer
6107 * @param index: Index into rssi stats
6108 * @param rssi_stats: Pointer to hold rssi stats
6109 *
6110 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6111 */
6112QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
6113 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats)
6114{
6115 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6116
6117 if (wmi_handle->ops->extract_per_chain_rssi_stats)
6118 return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle,
6119 evt_buf, index, rssi_stats);
6120
6121 return QDF_STATUS_E_FAILURE;
6122}
6123
6124/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306125 * wmi_extract_rtt_hdr() - extract rtt header from event
6126 * @wmi_handle: wmi handle
6127 * @param evt_buf: pointer to event buffer
6128 * @param ev: Pointer to hold rtt header
6129 *
6130 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6131 */
6132QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
6133 wmi_host_rtt_event_hdr *ev)
6134{
6135 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6136
6137 if (wmi_handle->ops->extract_rtt_hdr)
6138 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
6139 evt_buf, ev);
6140
6141 return QDF_STATUS_E_FAILURE;
6142}
6143
6144/**
6145 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
6146 * @wmi_handle: wmi handle
6147 * @param evt_buf: pointer to event buffer
6148 * @param index: Index into bcn fault stats
6149 * @param bcnflt_stats: Pointer to hold bcn fault stats
6150 *
6151 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6152 */
6153QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
6154 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
6155{
6156 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6157
6158 if (wmi_handle->ops->extract_bcnflt_stats)
6159 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
6160 evt_buf, index, bcnflt_stats);
6161
6162 return QDF_STATUS_E_FAILURE;
6163}
6164
6165/**
6166 * wmi_extract_rtt_ev() - extract rtt event
6167 * @wmi_handle: wmi handle
6168 * @param evt_buf: Pointer to event buffer
6169 * @param ev: Pointer to hold rtt event
6170 * @param hdump: Pointer to hold hex dump
6171 * @param hdump_len: hex dump length
6172 *
6173 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6174 */
6175QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
6176 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
6177{
6178 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6179
6180 if (wmi_handle->ops->extract_rtt_ev)
6181 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
6182 evt_buf, ev, hdump, hdump_len);
6183
6184 return QDF_STATUS_E_FAILURE;
6185}
6186
6187/**
6188 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
6189 * @wmi_handle: wmi handle
6190 * @param evt_buf: pointer to event buffer
6191 * @param index: Index into extended peer stats
6192 * @param peer_extd_stats: Pointer to hold extended peer stats
6193 *
6194 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6195 */
6196QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
6197 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
6198{
6199 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6200
6201 if (wmi_handle->ops->extract_peer_extd_stats)
6202 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
6203 evt_buf, index, peer_extd_stats);
6204
6205 return QDF_STATUS_E_FAILURE;
6206}
6207
6208/**
6209 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
6210 * @wmi_handle: wmi handle
6211 * @param evt_buf: pointer to event buffer
6212 * @param wds_ev: Pointer to hold rtt error report
6213 *
6214 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6215 */
6216QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
6217 wmi_host_rtt_error_report_event *ev)
6218{
6219 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6220
6221 if (wmi_handle->ops->extract_rtt_error_report_ev)
6222 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
6223 evt_buf, ev);
6224
6225 return QDF_STATUS_E_FAILURE;
6226}
6227
6228/**
6229 * wmi_extract_chan_stats() - extract chan stats from event
6230 * @wmi_handle: wmi handle
6231 * @param evt_buf: pointer to event buffer
6232 * @param index: Index into chan stats
6233 * @param chanstats: Pointer to hold chan stats
6234 *
6235 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6236 */
6237QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
6238 uint32_t index, wmi_host_chan_stats *chan_stats)
6239{
6240 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6241
6242 if (wmi_handle->ops->extract_chan_stats)
6243 return wmi_handle->ops->extract_chan_stats(wmi_handle,
6244 evt_buf, index, chan_stats);
6245
6246 return QDF_STATUS_E_FAILURE;
6247}
6248
6249/**
6250 * wmi_extract_thermal_stats() - extract thermal stats from event
6251 * @wmi_handle: wmi handle
6252 * @param evt_buf: Pointer to event buffer
6253 * @param temp: Pointer to hold extracted temperature
6254 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306255 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306256 *
6257 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6258 */
6259QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306260 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306261{
6262 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6263
6264 if (wmi_handle->ops->extract_thermal_stats)
6265 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05306266 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306267
6268 return QDF_STATUS_E_FAILURE;
6269}
6270
6271/**
6272 * wmi_extract_profile_ctx() - extract profile context from event
6273 * @wmi_handle: wmi handle
6274 * @param evt_buf: pointer to event buffer
6275 * @param profile_ctx: Pointer to hold profile context
6276 *
6277 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6278 */
6279QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
6280 wmi_host_wlan_profile_ctx_t *profile_ctx)
6281{
6282 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6283
6284 if (wmi_handle->ops->extract_profile_ctx)
6285 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
6286 evt_buf, profile_ctx);
6287
6288 return QDF_STATUS_E_FAILURE;
6289}
6290
6291/**
6292 * wmi_extract_thermal_level_stats() - extract thermal level stats from
6293 * event
6294 * @wmi_handle: wmi handle
6295 * @param evt_buf: pointer to event buffer
6296 * @param idx: Index to level stats
6297 * @param levelcount: Pointer to hold levelcount
6298 * @param dccount: Pointer to hold dccount
6299 *
6300 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6301 */
6302QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
6303 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
6304{
6305 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6306
6307 if (wmi_handle->ops->extract_thermal_level_stats)
6308 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
6309 evt_buf, idx, levelcount, dccount);
6310
6311 return QDF_STATUS_E_FAILURE;
6312}
6313
6314/**
6315 * wmi_extract_profile_data() - extract profile data from event
6316 * @wmi_handle: wmi handle
6317 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05306318 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306319 * @param profile_data: Pointer to hold profile data
6320 *
6321 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6322 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05306323QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306324 wmi_host_wlan_profile_t *profile_data)
6325{
6326 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6327
6328 if (wmi_handle->ops->extract_profile_data)
6329 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05306330 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306331
6332 return QDF_STATUS_E_FAILURE;
6333}
6334
6335/**
6336 * wmi_extract_chan_info_event() - extract chan information from event
6337 * @wmi_handle: wmi handle
6338 * @param evt_buf: pointer to event buffer
6339 * @param chan_info: Pointer to hold chan information
6340 *
6341 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6342 */
6343QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf,
6344 wmi_host_chan_info_event *chan_info)
6345{
6346 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6347
6348 if (wmi_handle->ops->extract_chan_info_event)
6349 return wmi_handle->ops->extract_chan_info_event(wmi_handle,
6350 evt_buf, chan_info);
6351
6352 return QDF_STATUS_E_FAILURE;
6353}
6354
6355/**
6356 * wmi_extract_channel_hopping_event() - extract channel hopping param
6357 * from event
6358 * @wmi_handle: wmi handle
6359 * @param evt_buf: pointer to event buffer
6360 * @param ch_hopping: Pointer to hold channel hopping param
6361 *
6362 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6363 */
6364QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf,
6365 wmi_host_pdev_channel_hopping_event *ch_hopping)
6366{
6367 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6368
6369 if (wmi->ops->extract_channel_hopping_event)
6370 return wmi->ops->extract_channel_hopping_event(wmi,
6371 evt_buf, ch_hopping);
6372
6373 return QDF_STATUS_E_FAILURE;
6374}
6375
6376/**
6377 * wmi_extract_bss_chan_info_event() - extract bss channel information
6378 * from event
6379 * @wmi_handle: wmi handle
6380 * @param evt_buf: pointer to event buffer
6381 * @param bss_chan_info: Pointer to hold bss channel information
6382 *
6383 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6384 */
6385QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
6386 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
6387{
6388 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6389
6390 if (wmi_handle->ops->extract_bss_chan_info_event)
6391 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
6392 evt_buf, bss_chan_info);
6393
6394 return QDF_STATUS_E_FAILURE;
6395}
6396
6397/**
6398 * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event
6399 * @wmi_handle: wmi handle
6400 * @param evt_buf: pointer to event buffer
6401 * @param inst_rssi_resp: Pointer to hold inst rssi response
6402 *
6403 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6404 */
6405QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf,
6406 wmi_host_inst_stats_resp *inst_rssi_resp)
6407{
6408 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6409
6410 if (wmi->ops->extract_inst_rssi_stats_event)
6411 return wmi->ops->extract_inst_rssi_stats_event(wmi,
6412 evt_buf, inst_rssi_resp);
6413
6414 return QDF_STATUS_E_FAILURE;
6415}
6416
6417/**
6418 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
6419 * from event
6420 * @wmi_handle: wmi handle
6421 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306422 * @param ev: Pointer to hold data traffic control
6423 *
6424 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6425 */
6426QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
6427 wmi_host_tx_data_traffic_ctrl_event *ev)
6428{
6429 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6430
6431 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
6432 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
6433 evt_buf, ev);
6434
6435 return QDF_STATUS_E_FAILURE;
6436}
6437
6438/**
6439 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
6440 * @wmi_handle: wmi handle
6441 * @param evt_buf: pointer to event buffer
6442 * @param index: Index into extended vdev stats
6443 * @param vdev_extd_stats: Pointer to hold extended vdev stats
6444 *
6445 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6446 */
6447QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
6448 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
6449{
6450 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6451
6452 if (wmi_handle->ops->extract_vdev_extd_stats)
6453 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
6454 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05306455 return QDF_STATUS_E_FAILURE;
6456}
6457
6458/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05306459 * wmi_extract_bcn_stats() - extract beacon stats from event
6460 * @wmi_handle: wmi handle
6461 * @evt_buf: pointer to event buffer
6462 * @index: Index into beacon stats
6463 * @vdev_bcn_stats: Pointer to hold beacon stats
6464 *
6465 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6466 */
6467QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
6468 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
6469{
6470 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6471
6472 if (wmi_handle->ops->extract_bcn_stats)
6473 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
6474 evt_buf, index, vdev_bcn_stats);
6475 return QDF_STATUS_E_FAILURE;
6476}
6477
6478/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +05306479 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
6480 * @wmi_handle: wmi handle
6481 * @param evt_buf: pointer to event buffer
6482 * @param vdev_extd_stats: Pointer to hold nac rssi stats
6483 *
6484 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
6485 */
6486QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
6487 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats)
6488{
6489 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6490
6491 if (wmi_handle->ops->extract_vdev_nac_rssi_stats)
6492 return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle,
6493 evt_buf, vdev_nac_rssi_stats);
6494
6495 return QDF_STATUS_E_FAILURE;
6496}
6497
6498/**
Gupta, Kapil2e685982016-04-25 19:14:19 +05306499 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
6500 * adaptive dwelltime configuration params
6501 * @wma_handle: wma handler
6502 * @dwelltime_params: pointer to dwelltime_params
6503 *
6504 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
6505 */
6506QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
6507 struct wmi_adaptive_dwelltime_params *dwelltime_params)
6508{
6509 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6510
6511 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
6512 return wmi_handle->ops->
6513 send_adapt_dwelltime_params_cmd(wmi_handle,
6514 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05306515
6516 return QDF_STATUS_E_FAILURE;
6517}
Govind Singhbca3b1b2016-05-02 17:59:24 +05306518
6519/**
6520 * wmi_unified_send_power_dbg_cmd() - send power debug commands
6521 * @wmi_handle: wmi handle
6522 * @param: wmi power debug parameter
6523 *
6524 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
6525 *
6526 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6527 */
6528QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
6529 struct wmi_power_dbg_params *param)
6530{
6531 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6532
6533 if (wmi_handle->ops->send_power_dbg_cmd)
6534 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
6535 param);
6536
6537 return QDF_STATUS_E_FAILURE;
6538}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306539
6540/**
Sathish Kumar45e991b2017-02-27 10:35:40 +05306541 * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart
6542 * @wmi_handle: wmi handle
6543 * @param: multiple vdev restart parameter
6544 *
6545 * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw.
6546 *
6547 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6548 */
6549QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl,
6550 struct multiple_vdev_restart_params *param)
6551{
6552 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6553
6554 if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd)
6555 return wmi_handle->ops->send_multiple_vdev_restart_req_cmd(
6556 wmi_handle,
6557 param);
6558
6559 return QDF_STATUS_E_FAILURE;
6560}
6561
Manikandan Mohan31a13e22016-12-13 13:14:06 -08006562QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
6563 struct sar_limit_cmd_params *params)
6564{
6565 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6566
6567 if (wmi_handle->ops->send_sar_limit_cmd)
6568 return wmi_handle->ops->send_sar_limit_cmd(
6569 wmi_handle,
6570 params);
6571 return QDF_STATUS_E_FAILURE;
6572}
6573
Jeff Johnson4783f902017-12-14 15:50:16 -08006574QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl)
6575{
6576 wmi_unified_t wmi_handle = wmi_hdl;
6577
6578 if (wmi_handle->ops->get_sar_limit_cmd)
6579 return wmi_handle->ops->get_sar_limit_cmd(wmi_handle);
6580
6581 return QDF_STATUS_E_FAILURE;
6582}
6583
6584QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
6585 uint8_t *evt_buf,
6586 struct sar_limit_event *event)
6587{
6588 wmi_unified_t wmi_handle = wmi_hdl;
6589
6590 if (wmi_handle->ops->extract_sar_limit_event)
6591 return wmi_handle->ops->extract_sar_limit_event(wmi_handle,
6592 evt_buf,
6593 event);
6594
6595 return QDF_STATUS_E_FAILURE;
6596}
6597
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07006598QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle,
6599 uint8_t *event, uint32_t len)
6600{
6601 wmi_unified_t wmi_handle = handle;
6602
6603 if (wmi_handle->ops->extract_sar2_result_event)
6604 return wmi_handle->ops->extract_sar2_result_event(wmi_handle,
6605 event,
6606 len);
6607
6608 return QDF_STATUS_E_FAILURE;
6609}
Jeff Johnson4783f902017-12-14 15:50:16 -08006610
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306611#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306612QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306613 struct disa_encrypt_decrypt_req_params *params)
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306614{
6615 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6616
6617 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
6618 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
6619 wmi_handle,
6620 params);
Sathish Kumar68789382016-11-14 17:44:29 +05306621 return QDF_STATUS_E_FAILURE;
6622}
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05306623
6624QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
6625 uint8_t *evt_buf,
6626 struct disa_encrypt_decrypt_resp_params *resp)
6627{
6628 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
6629
6630 if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
6631 return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
6632 wmi_handle, evt_buf, resp);
6633
6634 return QDF_STATUS_E_FAILURE;
6635}
6636
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05306637#endif
Sathish Kumar68789382016-11-14 17:44:29 +05306638
6639/*
6640 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
6641 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05306642 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05306643 *
6644 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6645 *
6646 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6647 */
6648QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306649 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05306650{
6651 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6652
6653 if (wmi->ops->send_btcoex_wlan_priority_cmd)
6654 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05306655 param);
6656
6657 return QDF_STATUS_E_FAILURE;
6658}
6659/**
6660 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
6661 * @wmi_handle: wmi handle
6662 * @param: wmi btcoex cfg params
6663 *
6664 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
6665 *
6666 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6667 */
6668QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
6669 struct btcoex_cfg_params *param)
6670{
6671 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
6672
6673 if (wmi->ops->send_btcoex_duty_cycle_cmd)
6674 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
6675 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05306676
6677 return QDF_STATUS_E_FAILURE;
6678}
Kiran Venkatappa06520822016-08-10 23:55:40 +05306679
6680/*
6681 * wmi_extract_service_ready_ext() - extract extended service ready
6682 * @wmi_handle: wmi handle
6683 * @param: wmi power debug parameter
6684 *
6685 *
6686 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6687 */
6688QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006689 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306690{
6691 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6692
6693 if (wmi_handle->ops->extract_service_ready_ext)
6694 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
6695 evt_buf, param);
6696
6697 return QDF_STATUS_E_FAILURE;
6698}
6699
6700/**
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07006701 * wmi_extract_sar_cap_service_ready_ext() -
6702 * extract sar cap from service ready event
6703 * @wmi_handle: wmi handle
6704 * @evt_buf: pointer to event buffer
6705 * @ext_param: extended target info
6706 *
6707 * Return: QDF_STATUS_SUCCESS for success or error code
6708 */
6709QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
6710 void *wmi_hdl,
6711 uint8_t *evt_buf,
6712 struct wlan_psoc_host_service_ext_param *ext_param)
6713{
6714 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6715
6716 if (wmi_handle->ops->extract_sar_cap_service_ready_ext)
6717 return wmi_handle->ops->extract_sar_cap_service_ready_ext(
6718 wmi_handle,
6719 evt_buf, ext_param);
6720
6721 return QDF_STATUS_E_FAILURE;
6722}
6723
6724/**
Kiran Venkatappa06520822016-08-10 23:55:40 +05306725 * wmi_extract_hw_mode_cap_service_ready_ext() -
6726 * extract HW mode cap from service ready event
6727 * @wmi_handle: wmi handle
6728 * @param evt_buf: pointer to event buffer
6729 * @param param: Pointer to hold evt buf
6730 * @param hw_mode_idx: hw mode idx should be less than num_mode
6731 *
6732 * Return: QDF_STATUS_SUCCESS for success or error code
6733 */
6734QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
6735 void *wmi_hdl,
6736 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006737 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306738{
6739 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6740
6741 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
6742 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
6743 wmi_handle,
6744 evt_buf, hw_mode_idx, param);
6745
6746 return QDF_STATUS_E_FAILURE;
6747}
6748/**
6749 * wmi_extract_mac_phy_cap_service_ready_ext() -
6750 * extract MAC phy cap from service ready event
6751 * @wmi_handle: wmi handle
6752 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306753 * @param hw_mode_id: hw mode id of hw_mode_caps
6754 * @param phy_id: phy_id within hw_mode_cap
6755 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05306756 *
6757 * Return: QDF_STATUS_SUCCESS for success or error code
6758 */
6759QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
6760 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306761 uint8_t *evt_buf,
6762 uint8_t hw_mode_id,
6763 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006764 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306765{
6766 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6767
6768 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
6769 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
6770 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05306771 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05306772
6773 return QDF_STATUS_E_FAILURE;
6774}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306775
Kiran Venkatappa06520822016-08-10 23:55:40 +05306776/**
6777 * wmi_extract_reg_cap_service_ready_ext() -
6778 * extract REG cap from service ready event
6779 * @wmi_handle: wmi handle
6780 * @param evt_buf: pointer to event buffer
6781 * @param param: Pointer to hold evt buf
6782 * @param phy_idx: phy idx should be less than num_mode
6783 *
6784 * Return: QDF_STATUS_SUCCESS for success or error code
6785 */
6786QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
6787 void *wmi_hdl,
6788 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08006789 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05306790{
6791 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6792
6793 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
6794 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
6795 wmi_handle,
6796 evt_buf, phy_idx, param);
6797
6798 return QDF_STATUS_E_FAILURE;
6799}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306800
Sathish Kumarf396c722017-11-17 17:30:41 +05306801QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
6802 void *wmi_hdl,
6803 uint8_t *evt_buf, uint8_t idx,
6804 struct wlan_psoc_host_dbr_ring_caps *param)
6805{
6806 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6807
6808 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
6809 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
6810 wmi_handle,
6811 evt_buf, idx, param);
6812
6813 return QDF_STATUS_E_FAILURE;
6814}
6815
6816QDF_STATUS wmi_extract_dbr_buf_release_fixed(
6817 void *wmi_hdl,
6818 uint8_t *evt_buf,
6819 struct direct_buf_rx_rsp *param)
6820{
6821 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6822
6823 if (wmi_handle->ops->extract_dbr_buf_release_fixed)
6824 return wmi_handle->ops->extract_dbr_buf_release_fixed(
6825 wmi_handle,
6826 evt_buf, param);
6827
6828 return QDF_STATUS_E_FAILURE;
6829}
6830
6831QDF_STATUS wmi_extract_dbr_buf_release_entry(
6832 void *wmi_hdl,
6833 uint8_t *evt_buf, uint8_t idx,
6834 struct direct_buf_rx_entry *param)
6835{
6836 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6837
6838 if (wmi_handle->ops->extract_dbr_buf_release_entry)
6839 return wmi_handle->ops->extract_dbr_buf_release_entry(
6840 wmi_handle,
6841 evt_buf, idx, param);
6842
6843 return QDF_STATUS_E_FAILURE;
6844}
6845
Edayilliam Jayadev92651222018-04-06 16:37:17 +05306846QDF_STATUS wmi_extract_dbr_buf_metadata(
6847 void *wmi_hdl,
6848 uint8_t *evt_buf, uint8_t idx,
6849 struct direct_buf_rx_metadata *param)
6850{
6851 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6852
6853 if (wmi_handle->ops->extract_dbr_buf_metadata)
6854 return wmi_handle->ops->extract_dbr_buf_metadata(
6855 wmi_handle,
6856 evt_buf, idx, param);
6857
6858 return QDF_STATUS_E_FAILURE;
6859}
6860
Sathish Kumar27ee0a32017-01-24 17:51:26 +05306861/**
6862 * wmi_extract_pdev_utf_event() -
6863 * extract UTF data from pdev utf event
6864 * @wmi_handle: wmi handle
6865 * @param evt_buf: pointer to event buffer
6866 * @param param: Pointer to hold evt buf
6867 *
6868 * Return: QDF_STATUS_SUCCESS for success or error code
6869 */
6870QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
6871 uint8_t *evt_buf,
6872 struct wmi_host_pdev_utf_event *param)
6873{
6874 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6875
6876 if (wmi_handle->ops->extract_pdev_utf_event)
6877 return wmi_handle->ops->extract_pdev_utf_event(
6878 wmi_handle,
6879 evt_buf, param);
6880
6881 return QDF_STATUS_E_FAILURE;
6882}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306883
6884/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05306885 * wmi_extract_pdev_qvit_event() -
6886 * extract UTF data from pdev qvit event
6887 * @wmi_handle: wmi handle
6888 * @param evt_buf: pointer to event buffer
6889 * @param param: Pointer to hold evt buf
6890 *
6891 * Return: QDF_STATUS_SUCCESS for success or error code
6892 */
6893QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
6894 uint8_t *evt_buf,
6895 struct wmi_host_pdev_qvit_event *param)
6896{
6897 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6898
6899 if (wmi_handle->ops->extract_pdev_qvit_event)
6900 return wmi_handle->ops->extract_pdev_qvit_event(
6901 wmi_handle,
6902 evt_buf, param);
6903
6904 return QDF_STATUS_E_FAILURE;
6905}
6906
6907/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05306908 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
6909 * @wmi_handle: wmi handle
6910 * @param: wmi coex ver cfg params
6911 *
6912 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
6913 *
6914 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6915 */
6916QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
6917 coex_ver_cfg_t *param)
6918{
6919 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6920
6921 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
6922 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
6923 param);
6924
6925 return QDF_STATUS_E_FAILURE;
6926}
6927
6928/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05306929 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
6930 * @wmi_handle: wmi handle
6931 * @param: wmi coex cfg cmd params
6932 *
6933 * Send WMI_COEX_CFG_CMD parameters to fw.
6934 *
6935 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
6936 */
6937QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
6938 struct coex_config_params *param)
6939{
6940 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6941
6942 if (wmi_handle->ops->send_coex_config_cmd)
6943 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
6944 param);
6945
6946 return QDF_STATUS_E_FAILURE;
6947}
6948
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05306949QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
6950 struct rcpi_req *get_rcpi_param)
6951{
6952 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6953
6954 if (wmi_handle->ops->send_get_rcpi_cmd)
6955 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
6956 get_rcpi_param);
6957
6958 return QDF_STATUS_E_FAILURE;
6959}
6960
6961QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
6962 struct rcpi_res *res)
6963{
6964 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6965 struct wmi_ops *ops = wmi_handle->ops;
6966
6967 if (ops->extract_rcpi_response_event)
6968 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
6969 res);
6970
6971 return QDF_STATUS_E_FAILURE;
6972}
6973
Sathish Kumar80f4f382017-04-24 11:36:00 +05306974/**
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05306975 * wmi_extract_peer_delete_response_event() -
6976 * extract vdev id and peer mac addresse from peer delete response event
6977 * @wmi_handle: wmi handle
6978 * @param evt_buf: pointer to event buffer
6979 * @param param: Pointer to hold evt buf
6980 *
6981 * Return: QDF_STATUS_SUCCESS for success or error code
6982 */
6983QDF_STATUS wmi_extract_peer_delete_response_event(
6984 void *wmi_hdl,
6985 uint8_t *evt_buf,
6986 struct wmi_host_peer_delete_response_event *param)
6987{
6988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
6989
6990 if (wmi_handle->ops->extract_peer_delete_response_event)
6991 return wmi_handle->ops->extract_peer_delete_response_event(
6992 wmi_handle,
6993 evt_buf, param);
6994
6995 return QDF_STATUS_E_FAILURE;
6996}
Arif Hussainf00be1d2017-01-07 18:21:55 -08006997
6998QDF_STATUS
6999wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
7000 uint32_t pdev_id)
7001{
7002 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7003
7004 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
7005 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
7006 wmi_handle, pdev_id);
7007
7008 return QDF_STATUS_E_FAILURE;
7009}
7010
7011QDF_STATUS
7012wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
7013 uint32_t pdev_id)
7014{
7015 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7016
7017 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
7018 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
7019 wmi_handle, pdev_id);
7020
7021 return QDF_STATUS_E_FAILURE;
7022}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05307023
7024/*
7025 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
7026 * @wmi_handle: wmi handle
7027 * @evt_buf: pointer to event buffer.
7028 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
7029 *
7030 *
7031 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7032 */
7033QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
7034 struct wlan_psoc_host_chainmask_table *chainmask_table)
7035{
7036 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7037
7038 if (wmi_handle->ops->extract_chainmask_tables)
7039 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
7040 evt_buf, chainmask_table);
7041
7042 return QDF_STATUS_E_FAILURE;
7043}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07007044/**
7045 * wmi_unified_set_country_cmd_send() - WMI set country function
7046 * @param wmi_handle : handle to WMI.
7047 * @param param : pointer to hold set country cmd parameter
7048 *
7049 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
7050 */
7051QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
7052 struct set_country *param)
7053{
7054 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7055
7056 if (wmi_handle->ops->send_set_country_cmd)
7057 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
7058 param);
7059
7060 return QDF_STATUS_E_FAILURE;
7061}
7062
Nitesh Shah52323d02017-05-22 15:49:00 +05307063/**
7064 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
7065 * DBS scan selection configuration params
7066 * @wma_handle: wma handler
7067 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
7068 *
7069 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
7070 */
7071QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
7072 struct wmi_dbs_scan_sel_params *dbs_scan_params)
7073{
7074 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7075
7076 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
7077 return wmi_handle->ops->
7078 send_dbs_scan_sel_params_cmd(wmi_handle,
7079 dbs_scan_params);
7080
7081 return QDF_STATUS_E_FAILURE;
7082}
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05307083
Rajeev Kumar Sirasanagandladaadf832017-09-18 16:47:52 +05307084#ifdef WLAN_FEATURE_ACTION_OUI
7085QDF_STATUS
7086wmi_unified_send_action_oui_cmd(void *wmi_hdl,
7087 struct action_oui_request *req)
7088{
7089 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7090
7091 if (wmi_handle->ops->send_action_oui_cmd)
7092 return wmi_handle->ops->send_action_oui_cmd(wmi_handle,
7093 req);
7094
7095 return QDF_STATUS_E_FAILURE;
7096}
7097#endif
7098
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05307099/**
7100 * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
7101 * configuration params
7102 * @wmi_hdl: wmi handler
7103 * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
7104 *
7105 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
7106 */
7107QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
7108 struct wmi_limit_off_chan_param *limit_off_chan_param)
7109{
7110 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7111
7112 if (wmi_handle->ops->send_limit_off_chan_cmd)
7113 return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
7114 limit_off_chan_param);
7115
7116 return QDF_STATUS_E_FAILURE;
7117}
Kiran Venkatappa7fe3afc2017-11-08 19:32:23 +05307118
7119/**
7120 * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw
7121 * @wmi_hdl: wmi handle
7122 * @bcn_ctrl_param: pointer to bcn_offload_control param
7123 *
7124 * Return: QDF_STATUS_SUCCESS for success or error code
7125 */
7126QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl,
7127 struct bcn_offload_control *bcn_ctrl_param)
7128{
7129 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7130
7131 if (wmi_handle->ops->send_bcn_offload_control_cmd)
7132 return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle,
7133 bcn_ctrl_param);
7134
7135 return QDF_STATUS_E_FAILURE;
7136}
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05307137
7138/**
7139 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
7140 * wds entries from FW
7141 * @wmi_handle: wmi handle
7142 *
7143 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
7144 *
7145 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
7146 */
7147QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
7148{
7149 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7150
7151 if (wmi_handle->ops->send_wds_entry_list_cmd)
7152 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
7153
7154 return QDF_STATUS_E_FAILURE;
7155}
7156
7157/**
7158 * wmi_extract_wds_entry - api to extract wds entry
7159 * @wmi_handle: wma handle
7160 * @evt_buf: pointer to event buffer
7161 * @wds_entry: wds entry
7162 * @idx: index to point wds entry in event buffer
7163 *
7164 * Return: QDF_STATUS_SUCCESS for successful event parse
7165 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
7166 */
7167QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
7168 struct wdsentry *wds_entry,
7169 u_int32_t idx)
7170{
7171 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7172
7173 if (wmi_handle->ops->extract_wds_entry)
7174 return wmi_handle->ops->extract_wds_entry(wmi_handle,
7175 evt_buf, wds_entry, idx);
7176
7177 return QDF_STATUS_E_FAILURE;
7178}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05307179qdf_export_symbol(wmi_extract_wds_entry);
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007180
7181#ifdef WLAN_FEATURE_NAN_CONVERGENCE
7182QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
7183 struct nan_datapath_initiator_req *req)
7184{
7185 wmi_unified_t wmi_handle = wmi_hdl;
7186
7187 if (wmi_handle->ops->send_ndp_initiator_req_cmd)
7188 return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
7189 req);
7190
7191 return QDF_STATUS_E_FAILURE;
7192}
7193
7194QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
7195 struct nan_datapath_responder_req *req)
7196{
7197 wmi_unified_t wmi_handle = wmi_hdl;
7198
7199 if (wmi_handle->ops->send_ndp_responder_req_cmd)
7200 return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
7201 req);
7202
7203 return QDF_STATUS_E_FAILURE;
7204}
7205
7206QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
7207 struct nan_datapath_end_req *req)
7208{
7209 wmi_unified_t wmi_handle = wmi_hdl;
7210
7211 if (wmi_handle->ops->send_ndp_end_req_cmd)
7212 return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
7213 req);
7214
7215 return QDF_STATUS_E_FAILURE;
7216}
7217
7218QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007219 uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007220{
7221 if (wmi_handle->ops->extract_ndp_initiator_rsp)
7222 return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
7223 data, rsp);
7224
7225 return QDF_STATUS_E_FAILURE;
7226}
7227
7228QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007229 struct nan_datapath_indication_event *ind)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007230{
7231 if (wmi_handle->ops->extract_ndp_ind)
7232 return wmi_handle->ops->extract_ndp_ind(wmi_handle,
7233 data, ind);
7234
7235 return QDF_STATUS_E_FAILURE;
7236}
7237
7238QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007239 struct nan_datapath_confirm_event *ev)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007240{
7241 if (wmi_handle->ops->extract_ndp_confirm)
7242 return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
7243 data, ev);
7244
7245 return QDF_STATUS_E_FAILURE;
7246}
7247
7248QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007249 uint8_t *data, struct nan_datapath_responder_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007250{
7251 if (wmi_handle->ops->extract_ndp_responder_rsp)
7252 return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
7253 data, rsp);
7254
7255 return QDF_STATUS_E_FAILURE;
7256}
7257
7258QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08007259 struct nan_datapath_end_rsp_event *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007260{
7261 if (wmi_handle->ops->extract_ndp_end_rsp)
7262 return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
7263 data, rsp);
7264
7265 return QDF_STATUS_E_FAILURE;
7266}
7267
7268QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
7269 struct nan_datapath_end_indication_event **ind)
7270{
7271 if (wmi_handle->ops->extract_ndp_end_ind)
7272 return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
7273 data, ind);
7274
7275 return QDF_STATUS_E_FAILURE;
7276}
Naveen Rawatd42ce382018-01-09 17:54:41 -08007277
7278QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
7279 struct nan_datapath_sch_update_event *ind)
7280{
7281 if (wmi_handle->ops->extract_ndp_sch_update)
7282 return wmi_handle->ops->extract_ndp_sch_update(wmi_handle,
7283 data, ind);
7284
7285 return QDF_STATUS_E_FAILURE;
7286}
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08007287#endif
yeshwanth sriram guntuka07a15b82017-09-01 17:56:07 +05307288QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
7289 struct wmi_btm_config *params)
7290{
7291 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7292
7293 if (wmi_handle->ops->send_btm_config)
7294 return wmi_handle->ops->send_btm_config(wmi_handle,
7295 params);
7296
7297 return QDF_STATUS_E_FAILURE;
7298}
Arif Hussainc5bfe072017-12-27 16:23:45 -08007299
7300QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
7301 struct wmi_obss_detection_cfg_param *obss_cfg_param)
7302{
7303 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7304
7305 if (wmi_handle->ops->send_obss_detection_cfg_cmd)
7306 return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle,
7307 obss_cfg_param);
7308
7309 return QDF_STATUS_E_FAILURE;
7310}
Arif Hussain33d98502018-01-12 13:15:04 -08007311
7312QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
7313 uint8_t *data,
7314 struct wmi_obss_detect_info
7315 *info)
7316{
7317 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7318
7319 if (wmi_handle->ops->extract_obss_detection_info)
7320 return wmi_handle->ops->extract_obss_detection_info(data, info);
7321
7322 return QDF_STATUS_E_FAILURE;
7323}
Vignesh Viswanathan7f057772018-01-18 19:06:40 +05307324
7325QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
7326 struct wmi_11k_offload_params *params)
7327{
7328 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7329
7330 if (wmi_handle->ops->send_offload_11k_cmd)
7331 return wmi_handle->ops->send_offload_11k_cmd(
7332 wmi_handle, params);
7333
7334 return QDF_STATUS_E_FAILURE;
7335}
7336
7337QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
7338 struct wmi_invoke_neighbor_report_params *params)
7339{
7340 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
7341
7342 if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
7343 return wmi_handle->ops->send_invoke_neighbor_report_cmd(
7344 wmi_handle, params);
7345
7346 return QDF_STATUS_E_FAILURE;
7347}
Himanshu Agarwal157e4782018-01-24 22:24:17 +05307348
7349#ifdef WLAN_SUPPORT_GREEN_AP
7350QDF_STATUS wmi_extract_green_ap_egap_status_info(
7351 void *wmi_hdl, uint8_t *evt_buf,
7352 struct wlan_green_ap_egap_status_info *egap_status_info_params)
7353{
7354 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7355
7356 if (wmi_handle->ops->extract_green_ap_egap_status_info)
7357 return wmi_handle->ops->extract_green_ap_egap_status_info(
7358 evt_buf, egap_status_info_params);
7359
7360 return QDF_STATUS_E_FAILURE;
7361}
7362#endif
Arif Hussainec5cd3c2018-01-22 01:19:36 -08007363
7364QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
7365 uint32_t vdev_id,
7366 bool enable)
7367{
7368 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7369
7370 if (wmi_handle->ops->send_bss_color_change_enable_cmd)
7371 return wmi_handle->ops->send_bss_color_change_enable_cmd(
7372 wmi_handle, vdev_id, enable);
7373
7374 return QDF_STATUS_E_FAILURE;
7375}
7376
7377QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
7378 struct wmi_obss_color_collision_cfg_param *cfg)
7379{
7380 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7381
7382 if (wmi_handle->ops->send_obss_color_collision_cfg_cmd)
7383 return wmi_handle->ops->send_obss_color_collision_cfg_cmd(
7384 wmi_handle, cfg);
7385
7386 return QDF_STATUS_E_FAILURE;
7387}
7388
7389QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
7390 uint8_t *data, struct wmi_obss_color_collision_info *info)
7391{
7392 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7393
7394 if (wmi_handle->ops->extract_obss_color_collision_info)
7395 return wmi_handle->ops->extract_obss_color_collision_info(data,
7396 info);
7397
7398 return QDF_STATUS_E_FAILURE;
7399}
Naveen Rawat26305452018-02-02 15:18:33 -08007400
7401wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
7402 WMI_HOST_WLAN_PHY_MODE phymode)
7403{
7404 /*
7405 * this API does translation between host only strcutres, hence
7406 * does not need separate TLV, non-TLV definitions
7407 */
7408
7409 if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX)
7410 return mode_to_width[phymode];
7411 else
7412 return WMI_HOST_CHAN_WIDTH_20;
7413}
Naveen Rawat963ee942018-04-13 16:38:36 -07007414
7415#ifdef QCA_SUPPORT_CP_STATS
7416QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
7417 struct wmi_host_congestion_stats *stats)
7418{
7419 if (wmi_handle->ops->extract_cca_stats)
7420 return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf,
7421 stats);
7422
7423 return QDF_STATUS_E_FAILURE;
7424}
7425#endif /* QCA_SUPPORT_CP_STATS */
Shashikala Prabhu5f65ac72018-05-16 10:08:09 +05307426
7427#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
7428QDF_STATUS
7429wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
7430 struct dfs_radar_found_params *params)
7431{
7432 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7433
7434 if (wmi_handle->ops->send_dfs_average_radar_params_cmd)
7435 return wmi_handle->ops->send_dfs_average_radar_params_cmd(
7436 wmi_handle, params);
7437
7438 return QDF_STATUS_E_FAILURE;
7439}
7440
7441QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
7442 uint32_t *dfs_status_check)
7443{
7444 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7445
7446 if (wmi_handle->ops->extract_dfs_status_from_fw)
7447 return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle,
7448 evt_buf, dfs_status_check);
7449
7450 return QDF_STATUS_E_FAILURE;
7451}
7452#endif
c_cgodav758d99f2017-02-13 10:14:42 +05307453
7454#ifdef OL_ATH_SMART_LOGGING
7455QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
7456 uint32_t param)
7457{
7458 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7459
7460 if (wmi_handle->ops->send_smart_logging_enable_cmd)
7461 return wmi_handle->ops->send_smart_logging_enable_cmd(
7462 wmi_handle,
7463 param);
7464
7465 return QDF_STATUS_E_FAILURE;
7466}
7467
7468QDF_STATUS
7469wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl,
7470 struct wmi_debug_fatal_events *param)
7471{
7472 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
7473
7474 if (wmi_handle->ops->send_smart_logging_fatal_cmd)
7475 return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle,
7476 param);
7477
7478 return QDF_STATUS_E_FAILURE;
7479}
7480
7481QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl,
7482 void *evt_buf,
7483 struct wmi_debug_fatal_events *ev)
7484{
7485 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
7486
7487 if (wmi->ops->extract_smartlog_event)
7488 return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev);
7489
7490 return QDF_STATUS_E_FAILURE;
7491}
7492#endif /* OL_ATH_SMART_LOGGING */