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