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