blob: 375ba71e170efc374238f20c929afd91126de32e [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
444/**
445 * wmi_unified_wow_enable_send() - WMI wow enable function
446 * @param wmi_handle : handle to WMI.
447 * @param param : pointer to hold wow enable parameter
448 * @mac_id: radio context
449 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530450 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530451 */
Govind Singhb53420c2016-03-09 14:32:57 +0530452QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530453 struct wow_cmd_params *param,
454 uint8_t mac_id)
455{
456 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
457
458 if (wmi_handle->ops->send_wow_enable_cmd)
459 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
460 mac_id);
461
Govind Singhb53420c2016-03-09 14:32:57 +0530462 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530463}
464
465/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530466 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
467 * @param wmi_hdl : handle to WMI.
468 *
469 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
470 */
471QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
472{
473 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
474
475 if (wmi_handle->ops->send_wow_wakeup_cmd)
476 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
477
478 return QDF_STATUS_E_FAILURE;
479}
480
481/**
482 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
483 * @param wmi_handle : handle to WMI.
484 * @param: pointer to wow wakeup event parameter structure
485 *
486 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
487 */
488QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
489 struct wow_add_wakeup_params *param)
490{
491 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
492
493 if (wmi->ops->send_wow_add_wakeup_event_cmd)
494 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
495 param);
496
497 return QDF_STATUS_E_FAILURE;
498}
499
500/**
501 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
502 * @param wmi_handle : handle to WMI.
503 * @param: pointer to wow wakeup pattern parameter structure
504 *
505 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
506 */
507QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
508 struct wow_add_wakeup_pattern_params *param)
509{
510 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
511
512 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
513 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
514
515 return QDF_STATUS_E_FAILURE;
516}
517
518/**
519 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
520 * @param wmi_handle : handle to WMI.
521 * @param: pointer to wow wakeup pattern parameter structure
522 *
523 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
524 */
525QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
526 struct wow_remove_wakeup_pattern_params *param)
527{
528 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
529
530 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
531 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
532
533 return QDF_STATUS_E_FAILURE;
534}
535
536/**
Govind Singh5eb51532016-03-09 11:34:12 +0530537 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
538 * @wma_ctx: wma context
539 * @peer_addr: peer mac address
540 * @param: pointer to ap_ps parameter structure
541 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530542 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530543 */
Govind Singhb53420c2016-03-09 14:32:57 +0530544QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530545 uint8_t *peer_addr,
546 struct ap_ps_params *param)
547{
548 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
549
550 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
551 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
552 peer_addr,
553 param);
554
Govind Singhb53420c2016-03-09 14:32:57 +0530555 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530556}
557
558/**
559 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
560 * @wma_ctx: wma context
561 * @peer_addr: peer mac address
562 * @param: pointer to sta_ps parameter structure
563 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530564 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530565 */
Govind Singhb53420c2016-03-09 14:32:57 +0530566QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530567 struct sta_ps_params *param)
568{
569 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
570
571 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
572 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
573 param);
574
Govind Singhb53420c2016-03-09 14:32:57 +0530575 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530576}
577
578/**
579 * wmi_crash_inject() - inject fw crash
580 * @wma_handle: wma handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -0700581 * @param: ponirt to crash inject parameter structure
Govind Singh5eb51532016-03-09 11:34:12 +0530582 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530583 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530584 */
Govind Singhb53420c2016-03-09 14:32:57 +0530585QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530586 struct crash_inject *param)
587{
588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
589
590 if (wmi_handle->ops->send_crash_inject_cmd)
591 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
592 param);
593
Govind Singhb53420c2016-03-09 14:32:57 +0530594 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530595}
596
Wen Gongca174012018-04-20 16:56:28 +0800597#ifdef FEATURE_FW_LOG_PARSING
Govind Singh5eb51532016-03-09 11:34:12 +0530598/**
599 * wmi_unified_dbglog_cmd_send() - set debug log level
600 * @param wmi_handle : handle to WMI.
601 * @param param : pointer to hold dbglog level parameter
602 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530603 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530604 */
Govind Singhb53420c2016-03-09 14:32:57 +0530605QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530606wmi_unified_dbglog_cmd_send(void *wmi_hdl,
607 struct dbglog_params *dbglog_param)
608{
609 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
610
611 if (wmi_handle->ops->send_dbglog_cmd)
612 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
613 dbglog_param);
614
Govind Singhb53420c2016-03-09 14:32:57 +0530615 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530616}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +0530617qdf_export_symbol(wmi_unified_dbglog_cmd_send);
Wen Gongca174012018-04-20 16:56:28 +0800618#endif
Govind Singh5eb51532016-03-09 11:34:12 +0530619
620/**
621 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
622 * @param wmi_handle : handle to WMI.
623 * @param macaddr : MAC address
624 * @param param : pointer to hold vdev set parameter
625 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530626 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530627 */
Govind Singhb53420c2016-03-09 14:32:57 +0530628QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530629 struct vdev_set_params *param)
630{
631 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
632
633 if (wmi_handle->ops->send_vdev_set_param_cmd)
634 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
635 param);
636
Govind Singhb53420c2016-03-09 14:32:57 +0530637 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530638}
639
640/**
narayand47b3462018-07-01 21:59:41 +0530641 * wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
642 * @param wmi_handle : handle to WMI.
643 * @param param : pointer to hold sifs trigger parameter
644 *
645 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
646 */
647QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl,
648 struct sifs_trigger_param *param)
649{
650 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
651
652 if (wmi_handle->ops->send_vdev_sifs_trigger_cmd)
653 return wmi_handle->ops->send_vdev_sifs_trigger_cmd(wmi_handle,
654 param);
655
656 return QDF_STATUS_E_FAILURE;
657}
658
659/**
Govind Singh5eb51532016-03-09 11:34:12 +0530660 * wmi_unified_stats_request_send() - WMI request stats function
661 * @param wmi_handle : handle to WMI.
662 * @param macaddr : MAC address
663 * @param param : pointer to hold stats request parameter
664 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530665 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530666 */
Govind Singhb53420c2016-03-09 14:32:57 +0530667QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530668 uint8_t macaddr[IEEE80211_ADDR_LEN],
669 struct stats_request_params *param)
670{
671 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
672
673 if (wmi_handle->ops->send_stats_request_cmd)
674 return wmi_handle->ops->send_stats_request_cmd(wmi_handle,
675 macaddr, param);
676
Govind Singhb53420c2016-03-09 14:32:57 +0530677 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530678}
679
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530680#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530681/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530682 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530683 * @param wmi_handle : handle to WMI.
684 * @param macaddr : MAC address
685 * @param param : pointer to hold stats request parameter
686 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530687 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530688 */
Govind Singhb53420c2016-03-09 14:32:57 +0530689QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530690 uint8_t macaddr[IEEE80211_ADDR_LEN],
691 struct packet_enable_params *param)
692{
693 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
694
695 if (wmi_handle->ops->send_packet_log_enable_cmd)
696 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
697 macaddr, param);
698
Govind Singhb53420c2016-03-09 14:32:57 +0530699 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530700}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530701#else
702/**
703 * wmi_unified_packet_log_enable_send() - WMI request stats function
704 * @param wmi_handle : handle to WMI.
705 * @param macaddr : MAC address
706 * @param param : pointer to hold stats request parameter
707 *
708 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
709 */
710QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700711 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530712{
713 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
714
715 if (wmi_handle->ops->send_packet_log_enable_cmd)
716 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700717 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530718
719 return QDF_STATUS_E_FAILURE;
720}
721
722#endif
723/**
724 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
725 * @param wmi_handle : handle to WMI.
726 * @param PKTLOG_EVENT : packet log event
727 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
728 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700729QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530730{
731 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
732
733 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700734 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
735 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530736
737 return QDF_STATUS_E_FAILURE;
738}
Govind Singh5eb51532016-03-09 11:34:12 +0530739
740/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530741 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
742 * @param wmi_handle : handle to WMI.
743 * @param macaddr : MAC address
744 * @param param : pointer to hold beacon send cmd parameter
745 *
746 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
747 */
748QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
749 struct beacon_tmpl_params *param)
750{
751 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
752
753 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
754 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
755 param);
756
757 return QDF_STATUS_E_FAILURE;
758}
759/**
Govind Singh5eb51532016-03-09 11:34:12 +0530760 * wmi_unified_peer_assoc_send() - WMI peer assoc function
761 * @param wmi_handle : handle to WMI.
762 * @param macaddr : MAC address
763 * @param param : pointer to peer assoc parameter
764 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530765 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530766 */
Govind Singhb53420c2016-03-09 14:32:57 +0530767QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530768 struct peer_assoc_params *param)
769{
770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
771
772 if (wmi_handle->ops->send_peer_assoc_cmd)
773 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530774 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530775
Govind Singhb53420c2016-03-09 14:32:57 +0530776 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530777}
778
779/**
780 * wmi_unified_scan_start_cmd_send() - WMI scan start function
781 * @param wmi_handle : handle to WMI.
782 * @param macaddr : MAC address
783 * @param param : pointer to hold scan start cmd parameter
784 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530785 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530786 */
Govind Singhb53420c2016-03-09 14:32:57 +0530787QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530788 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530789{
790 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
791
792 if (wmi_handle->ops->send_scan_start_cmd)
793 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530794 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530795
Govind Singhb53420c2016-03-09 14:32:57 +0530796 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530797}
798
799/**
800 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
801 * @param wmi_handle : handle to WMI.
802 * @param macaddr : MAC address
803 * @param param : pointer to hold scan start cmd parameter
804 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530805 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530806 */
Govind Singhb53420c2016-03-09 14:32:57 +0530807QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530808 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530809{
810 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
811
812 if (wmi_handle->ops->send_scan_stop_cmd)
813 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530814 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530815
Govind Singhb53420c2016-03-09 14:32:57 +0530816 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530817}
818
819/**
820 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
821 * @param wmi_handle : handle to WMI.
822 * @param macaddr : MAC address
823 * @param param : pointer to hold scan channel list parameter
824 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530825 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530826 */
Govind Singhb53420c2016-03-09 14:32:57 +0530827QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530828 struct scan_chan_list_params *param)
829{
830 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
831
832 if (wmi_handle->ops->send_scan_chan_list_cmd)
833 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530834 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530835
Govind Singhb53420c2016-03-09 14:32:57 +0530836 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530837}
Govind Singh427ee5a2016-02-26 18:09:36 +0530838
839/**
840 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
841 * @wmi_hdl : handle to WMI.
842 * @param : pointer to hold mgmt cmd parameter
843 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530844 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530845 */
Govind Singhb53420c2016-03-09 14:32:57 +0530846QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530847 struct wmi_mgmt_params *param)
848{
849 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
850
851 if (wmi_handle->ops->send_mgmt_cmd)
852 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
853 param);
854
Govind Singhb53420c2016-03-09 14:32:57 +0530855 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530856}
857
858/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530859 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
860 * @wmi_hdl : handle to WMI.
861 * @param : pointer to hold offchan data cmd parameter
862 *
863 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
864 */
865QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
866 struct wmi_offchan_data_tx_params *param)
867{
868 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
869
870 if (wmi_handle->ops->send_offchan_data_tx_cmd)
871 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
872 param);
873
874 return QDF_STATUS_E_FAILURE;
875}
876
877/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530878 * wmi_unified_modem_power_state() - set modem power state to fw
879 * @wmi_hdl: wmi handle
880 * @param_value: parameter value
881 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530882 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530883 */
Govind Singhb53420c2016-03-09 14:32:57 +0530884QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530885 uint32_t param_value)
886{
887 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
888
889 if (wmi_handle->ops->send_modem_power_state_cmd)
890 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
891 param_value);
892
Govind Singhb53420c2016-03-09 14:32:57 +0530893 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530894}
895
896/**
897 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
898 * @wmi_hdl: wmi handle
899 * @vdev_id: vdev id
900 * @val: value
901 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530902 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530903 */
Govind Singhb53420c2016-03-09 14:32:57 +0530904QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530905 uint32_t vdev_id, uint8_t val)
906{
907 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
908
909 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
910 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
911 vdev_id, val);
912
Govind Singhb53420c2016-03-09 14:32:57 +0530913 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530914}
915
916/**
917 * wmi_set_mimops() - set MIMO powersave
918 * @wmi_hdl: wmi handle
919 * @vdev_id: vdev id
920 * @value: value
921 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530922 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530923 */
Govind Singhb53420c2016-03-09 14:32:57 +0530924QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530925{
926 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
927
928 if (wmi_handle->ops->send_set_mimops_cmd)
929 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
930 vdev_id, value);
931
Govind Singhb53420c2016-03-09 14:32:57 +0530932 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530933}
934
935/**
936 * wmi_set_smps_params() - set smps params
937 * @wmi_hdl: wmi handle
938 * @vdev_id: vdev id
939 * @value: value
940 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530941 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530942 */
Govind Singhb53420c2016-03-09 14:32:57 +0530943QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530944 int value)
945{
946 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
947
948 if (wmi_handle->ops->send_set_smps_params_cmd)
949 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
950 vdev_id, value);
951
Govind Singhb53420c2016-03-09 14:32:57 +0530952 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530953}
954
Govind Singh427ee5a2016-02-26 18:09:36 +0530955/**
956 * wmi_get_temperature() - get pdev temperature req
957 * @wmi_hdl: wmi handle
958 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530959 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530960 */
Govind Singhb53420c2016-03-09 14:32:57 +0530961QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +0530962{
963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
964
965 if (wmi_handle->ops->send_get_temperature_cmd)
966 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
967
Govind Singhb53420c2016-03-09 14:32:57 +0530968 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530969}
970
971/**
972 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
973 * @wmi_hdl: wmi handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -0700974 * @end_set_sta_ps_mode_cmd: cmd parameter strcture
Govind Singh427ee5a2016-02-26 18:09:36 +0530975 *
976 * This function sets the trigger
977 * uapsd params such as service interval, delay interval
978 * and suspend interval which will be used by the firmware
979 * to send trigger frames periodically when there is no
980 * traffic on the transmit side.
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
Govind Singh427ee5a2016-02-26 18:09:36 +0530985wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
986 struct sta_uapsd_trig_params *param)
987{
988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
989
990 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
991 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
992 param);
993
Govind Singhb53420c2016-03-09 14:32:57 +0530994 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530995}
Govind Singh2edc80f2016-03-01 15:30:53 +0530996
Govind Singh17a9cfa2016-03-01 15:54:59 +0530997
998/**
999 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1000 * @wmi_handle: Pointer to wmi handle
1001 * @thermal_info: Thermal command information
1002 *
1003 * This function sends the thermal management command
1004 * to the firmware
1005 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301006 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301007 */
Govind Singhb53420c2016-03-09 14:32:57 +05301008QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301009 struct thermal_cmd_params *thermal_info)
1010{
1011 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1012
1013 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1014 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1015 thermal_info);
1016
Govind Singhb53420c2016-03-09 14:32:57 +05301017 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301018}
1019
1020
1021/**
1022 * wmi_unified_lro_config_cmd() - process the LRO config command
1023 * @wmi: Pointer to wmi handle
1024 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1025 *
1026 * This function sends down the LRO configuration parameters to
1027 * the firmware to enable LRO, sets the TCP flags and sets the
1028 * seed values for the toeplitz hash generation
1029 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301030 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301031 */
Govind Singhb53420c2016-03-09 14:32:57 +05301032QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301033 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1034{
1035 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1036
1037 if (wmi_handle->ops->send_lro_config_cmd)
1038 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1039 wmi_lro_cmd);
1040
Govind Singhb53420c2016-03-09 14:32:57 +05301041 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301042}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301043
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301044#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301045/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301046 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1047 * @wmi_hdl: Pointer to wmi handle
1048 * @rate_report_params: Pointer to peer rate report parameters
1049 *
1050 *
1051 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1052 */
1053QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1054 struct wmi_peer_rate_report_params *rate_report_params)
1055{
1056 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1057
1058 if (wmi_handle->ops->send_peer_rate_report_cmd)
1059 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1060 rate_report_params);
1061
1062 return QDF_STATUS_E_FAILURE;
1063}
1064
1065/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301066 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1067 * @wmi_hdl: wmi handle
1068 * @param: bcn ll cmd parameter
1069 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301070 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301071 */
Govind Singhb53420c2016-03-09 14:32:57 +05301072QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301073 wmi_bcn_send_from_host_cmd_fixed_param *param)
1074{
1075 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1076
1077 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1078 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1079 param);
1080
Govind Singhb53420c2016-03-09 14:32:57 +05301081 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301082}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301083#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301084
1085/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301086 * wmi_unified_process_update_edca_param() - update EDCA params
1087 * @wmi_hdl: wmi handle
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301088 * @vdev_id: vdev id.
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001089 * @mu_edca_param: mu_edca_param.
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301090 * @wmm_vparams: edca parameters
Govind Singh4eacd2b2016-03-07 14:24:22 +05301091 *
1092 * This function updates EDCA parameters to the target
1093 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301094 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301095 */
Govind Singhb53420c2016-03-09 14:32:57 +05301096QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001097 uint8_t vdev_id, bool mu_edca_param,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301098 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC])
Govind Singh4eacd2b2016-03-07 14:24:22 +05301099{
1100 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1101
1102 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1103 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001104 vdev_id, mu_edca_param, wmm_vparams);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301105
Govind Singhb53420c2016-03-09 14:32:57 +05301106 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301107}
1108
1109/**
1110 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1111 * @wmi_hdl: wmi handle
1112 * @vdev_id: vdev id
1113 * @probe_rsp_info: probe response info
1114 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301115 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301116 */
Govind Singhb53420c2016-03-09 14:32:57 +05301117QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301118 uint8_t vdev_id,
Krunal Soni89426862017-11-14 15:42:48 -08001119 struct wmi_probe_resp_params *probe_rsp_info)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301120{
1121 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1122
1123 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1124 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
Krunal Soni89426862017-11-14 15:42:48 -08001125 vdev_id, probe_rsp_info);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301126
Govind Singhb53420c2016-03-09 14:32:57 +05301127 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301128}
1129
1130/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301131 * wmi_unified_setup_install_key_cmd - send key to install to fw
1132 * @wmi_hdl: wmi handle
1133 * @key_params: key parameters
1134 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301135 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301136 */
1137QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1138 struct set_key_params *key_params)
1139{
1140 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1141
1142 if (wmi_handle->ops->send_setup_install_key_cmd)
1143 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1144 key_params);
1145
1146 return QDF_STATUS_E_FAILURE;
1147}
1148
1149/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301150 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1151 * @wma_handle: wma handle
1152 * @vdev_id: vdev id
1153 * @p2p_ie: p2p IE
1154 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301155 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301156 */
Govind Singhb53420c2016-03-09 14:32:57 +05301157QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Vivekc5823092018-03-22 23:27:21 +05301158 uint32_t vdev_id, uint8_t *p2p_ie)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301159{
1160 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1161
1162 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1163 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1164 vdev_id, p2p_ie);
1165
Govind Singhb53420c2016-03-09 14:32:57 +05301166 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301167}
1168
1169/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301170 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1171 * @wmi_hdl: wmi handle
1172 * @psetoui: OUI parameters
1173 *
1174 * set scan probe OUI parameters in firmware
1175 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301176 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301177 */
Govind Singhb53420c2016-03-09 14:32:57 +05301178QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301179 struct scan_mac_oui *psetoui)
1180{
1181 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1182
1183 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1184 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1185 psetoui);
1186
Govind Singhb53420c2016-03-09 14:32:57 +05301187 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301188}
1189
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301190#ifdef IPA_OFFLOAD
Govind Singh4eacd2b2016-03-07 14:24:22 +05301191/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1192 * @wmi_hdl: wmi handle
1193 * @ipa_offload: ipa offload control parameter
1194 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301195 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1196 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301197 */
Govind Singhb53420c2016-03-09 14:32:57 +05301198QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301199 struct ipa_uc_offload_control_params *ipa_offload)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301200{
1201 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1202
Amar Singhalca7aba32018-09-18 10:14:30 -07001203 if (!wmi_handle)
1204 return QDF_STATUS_E_FAILURE;
1205
Govind Singh4eacd2b2016-03-07 14:24:22 +05301206 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1207 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1208 ipa_offload);
1209
Govind Singhb53420c2016-03-09 14:32:57 +05301210 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301211}
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301212#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301213
Govind Singh4eacd2b2016-03-07 14:24:22 +05301214/**
1215 * send_pno_stop_cmd() - PNO stop request
1216 * @wmi_hdl: wmi handle
1217 * @vdev_id: vdev id
1218 *
1219 * This function request FW to stop ongoing PNO operation.
1220 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301221 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301222 */
Govind Singhb53420c2016-03-09 14:32:57 +05301223QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301224{
1225 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1226
1227 if (wmi_handle->ops->send_pno_stop_cmd)
1228 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1229 vdev_id);
1230
Govind Singhb53420c2016-03-09 14:32:57 +05301231 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301232}
1233
1234/**
1235 * wmi_unified_pno_start_cmd() - PNO start request
1236 * @wmi_hdl: wmi handle
1237 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301238 *
1239 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301240 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301241 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301242#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301243QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05301244 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301245{
1246 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1247
1248 if (wmi_handle->ops->send_pno_start_cmd)
1249 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05301250 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301251
Govind Singhb53420c2016-03-09 14:32:57 +05301252 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301253}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301254#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301255
Varun Reddy Yeturueac038b2017-07-24 16:11:22 -07001256/**
1257 * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
1258 * @wmi_hdl: wmi handle
1259 * @params: Configuration parameters
1260 *
1261 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1262 */
1263QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
1264 struct nlo_mawc_params *params)
1265{
1266 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1267
1268 if (wmi_handle->ops->send_nlo_mawc_cmd)
1269 return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
1270
1271 return QDF_STATUS_E_FAILURE;
1272}
1273
Qiwei Cai1ccba222018-05-21 16:49:39 +08001274#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Govind Singh4eacd2b2016-03-07 14:24:22 +05301275/**
1276 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1277 * @wmi_hdl: wmi handle
1278 * @clear_req: ll stats clear request command params
1279 * @addr: mac address
1280 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301281 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301282 */
Govind Singhb53420c2016-03-09 14:32:57 +05301283QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301284 const struct ll_stats_clear_params *clear_req,
1285 uint8_t addr[IEEE80211_ADDR_LEN])
1286{
1287 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1288
1289 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1290 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1291 clear_req, addr);
1292
Govind Singhb53420c2016-03-09 14:32:57 +05301293 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301294}
1295
1296/**
1297 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1298 * @wmi_hdl:wmi handle
1299 * @get_req:ll stats get request command params
1300 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301301 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301302 */
Govind Singhb53420c2016-03-09 14:32:57 +05301303QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301304 const struct ll_stats_get_params *get_req,
1305 uint8_t addr[IEEE80211_ADDR_LEN])
1306{
1307 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1308
1309 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1310 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1311 get_req, addr);
1312
Govind Singhb53420c2016-03-09 14:32:57 +05301313 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301314}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001315#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh4eacd2b2016-03-07 14:24:22 +05301316
1317/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301318 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1319 * @wmi_hdl: wma handle
1320 * @vdev_id: vdev id
1321 *
1322 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1323 */
1324QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
1325 uint8_t vdev_id)
1326{
1327 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1328
1329 if (wmi_handle->ops->send_congestion_cmd)
1330 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
1331 vdev_id);
1332
1333 return QDF_STATUS_E_FAILURE;
1334}
1335
Qiwei Cai1ccba222018-05-21 16:49:39 +08001336#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301337/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301338 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1339 * @wmi_handle: wmi handle
1340 * @set_req: ll stats set request command params
1341 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301342 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301343 */
Govind Singhb53420c2016-03-09 14:32:57 +05301344QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301345 const struct ll_stats_set_params *set_req)
1346{
1347 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1348
1349 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1350 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1351 set_req);
1352
Govind Singhb53420c2016-03-09 14:32:57 +05301353 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301354}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001355#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh20c5dac2016-03-07 15:33:31 +05301356
1357/**
1358 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1359 * @wmi_handle: wmi handle
1360 * @rssi_req: get RSSI request
1361 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301362 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301363 */
Govind Singhb53420c2016-03-09 14:32:57 +05301364QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301365{
1366 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1367
1368 if (wmi_handle->ops->send_snr_request_cmd)
1369 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1370
Govind Singhb53420c2016-03-09 14:32:57 +05301371 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301372}
1373
1374/**
1375 * wmi_unified_snr_cmd() - get RSSI from fw
1376 * @wmi_handle: wmi handle
1377 * @vdev_id: vdev id
1378 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301379 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301380 */
Govind Singhb53420c2016-03-09 14:32:57 +05301381QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301382{
1383 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1384
1385 if (wmi_handle->ops->send_snr_cmd)
1386 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1387 vdev_id);
1388
Govind Singhb53420c2016-03-09 14:32:57 +05301389 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301390}
1391
1392/**
1393 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1394 * @wmi_handle: wmi handle
1395 * @link_status: get link params
1396 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301397 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301398 */
Govind Singhb53420c2016-03-09 14:32:57 +05301399QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301400 struct link_status_params *link_status)
1401{
1402 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1403
1404 if (wmi_handle->ops->send_link_status_req_cmd)
1405 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1406 link_status);
1407
Govind Singhb53420c2016-03-09 14:32:57 +05301408 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301409}
1410
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05301411#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh20c5dac2016-03-07 15:33:31 +05301412/**
1413 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
1414 * @wmi_handle: wmi handler
1415 * @egap_params: pointer to egap_params
1416 *
1417 * Return: 0 for success, otherwise appropriate error code
1418 */
Govind Singhb53420c2016-03-09 14:32:57 +05301419QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05301420 struct wlan_green_ap_egap_params *egap_params)
Govind Singh20c5dac2016-03-07 15:33:31 +05301421{
1422 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1423
1424 if (wmi_handle->ops->send_egap_conf_params_cmd)
1425 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
1426 egap_params);
1427
Govind Singhb53420c2016-03-09 14:32:57 +05301428 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301429}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301430#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05301431
1432/**
Govind Singh20c5dac2016-03-07 15:33:31 +05301433 * wmi_unified_csa_offload_enable() - send CSA offload enable command
1434 * @wmi_hdl: wmi handle
1435 * @vdev_id: vdev id
1436 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301438 */
Govind Singhb53420c2016-03-09 14:32:57 +05301439QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301440{
1441 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1442
1443 if (wmi_handle->ops->send_csa_offload_enable_cmd)
1444 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
1445 vdev_id);
1446
Govind Singhb53420c2016-03-09 14:32:57 +05301447 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301448}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07001449
1450#ifdef WLAN_FEATURE_CIF_CFR
1451QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
1452 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
1453{
1454 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1455
1456 if (wmi_handle->ops->send_start_oem_data_cmd)
1457 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
1458
1459 return QDF_STATUS_E_FAILURE;
1460}
1461#endif
1462
Govind Singh20c5dac2016-03-07 15:33:31 +05301463/**
1464 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
1465 * @wmi_handle: wmi handle
1466 * @startOemDataReq: start request params
1467 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301468 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301469 */
Govind Singhb53420c2016-03-09 14:32:57 +05301470QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07001471 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05301472 uint8_t *data)
1473{
1474 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1475
1476 if (wmi_handle->ops->send_start_oem_data_cmd)
1477 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
1478 data_len, data);
1479
Govind Singhb53420c2016-03-09 14:32:57 +05301480 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301481}
1482
1483/**
1484 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
1485 * @wmi_handle: wmi handle
1486 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
1487 *
1488 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
1489 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
1490 * to firmware based on phyerr filtering
1491 * offload status.
1492 *
1493 * Return: 1 success, 0 failure
1494 */
Govind Singhb53420c2016-03-09 14:32:57 +05301495QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05301496wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
1497 bool dfs_phyerr_filter_offload)
1498{
1499 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1500
1501 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
1502 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
1503 dfs_phyerr_filter_offload);
1504
Govind Singhb53420c2016-03-09 14:32:57 +05301505 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301506}
1507
1508#if !defined(REMOVE_PKT_LOG)
1509/**
1510 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
1511 * @wmi_handle: wmi handle
1512 * @pktlog_event: pktlog event
1513 * @cmd_id: pktlog cmd id
1514 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301515 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301516 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301517#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05301518QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301519 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05301520 uint32_t cmd_id,
1521 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05301522{
1523 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1524
1525 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
1526 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05301527 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05301528
Govind Singhb53420c2016-03-09 14:32:57 +05301529 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301530}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301531#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05301532#endif /* REMOVE_PKT_LOG */
1533
1534/**
Govind Singh20c5dac2016-03-07 15:33:31 +05301535 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
1536 * @wmi_handle: wmi handle
1537 * @preq: stats ext params
1538 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301539 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301540 */
Govind Singhb53420c2016-03-09 14:32:57 +05301541QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301542 struct stats_ext_params *preq)
1543{
1544 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1545
1546 if (wmi_handle->ops->send_stats_ext_req_cmd)
1547 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
1548 preq);
1549
Govind Singhb53420c2016-03-09 14:32:57 +05301550 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301551}
1552
1553/**
Govind Singh20c5dac2016-03-07 15:33:31 +05301554 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
1555 * @wmi_handle: wmi handle
1556 * @pDhcpSrvOffloadInfo: DHCP server offload info
1557 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301558 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301559 */
Govind Singhb53420c2016-03-09 14:32:57 +05301560QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07001561 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05301562{
1563 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1564
1565 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
1566 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07001567 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05301568
Govind Singhb53420c2016-03-09 14:32:57 +05301569 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301570}
1571
1572/**
Govind Singh20c5dac2016-03-07 15:33:31 +05301573 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
1574 * @wmi_handle: wmi handle
1575 * @reg_dmn: reg domain
1576 * @regdmn2G: 2G reg domain
1577 * @regdmn5G: 5G reg domain
1578 * @ctl2G: 2G test limit
1579 * @ctl5G: 5G test limit
1580 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301581 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301582 */
Govind Singhb53420c2016-03-09 14:32:57 +05301583QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301584 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05301585 uint16_t regdmn5G, uint8_t ctl2G,
1586 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05301587{
1588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1589
1590 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
1591 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
1592 reg_dmn, regdmn2G,
1593 regdmn5G, ctl2G,
1594 ctl5G);
1595
Govind Singhb53420c2016-03-09 14:32:57 +05301596 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301597}
1598
Govind Singh9ddd5162016-03-07 16:30:32 +05301599/**
1600 * wmi_unified_save_fw_version_cmd() - save fw version
1601 * @wmi_handle: pointer to wmi handle
1602 * @res_cfg: resource config
1603 * @num_mem_chunks: no of mem chunck
1604 * @mem_chunk: pointer to mem chunck structure
1605 *
1606 * This function sends IE information to firmware
1607 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301608 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05301609 *
1610 */
Govind Singhb53420c2016-03-09 14:32:57 +05301611QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05301612 void *evt_buf)
1613{
1614 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1615
1616 if (wmi_handle->ops->save_fw_version_cmd)
1617 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
1618 evt_buf);
1619
Govind Singhb53420c2016-03-09 14:32:57 +05301620 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05301621}
Govind Singha4836fd2016-03-07 16:45:38 +05301622
1623/**
Govind Singha4836fd2016-03-07 16:45:38 +05301624 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
1625 * @wmi_hdl: wmi handle
1626 * @event: Event received from FW
1627 * @len: Length of the event
1628 *
1629 * Enables the low frequency events and disables the high frequency
1630 * events. Bit 17 indicates if the event if low/high frequency.
1631 * 1 - high frequency, 0 - low frequency
1632 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301633 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05301634 */
Govind Singhb53420c2016-03-09 14:32:57 +05301635QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05301636 uint8_t *event,
1637 uint32_t len)
1638{
1639 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1640
1641 if (wmi_handle->ops->send_log_supported_evt_cmd)
1642 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
1643 event, len);
1644
Govind Singhb53420c2016-03-09 14:32:57 +05301645 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05301646}
1647
gaurank kathpaliacdfb4452018-02-21 18:58:29 +05301648void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl)
1649{
1650 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1651 if (wmi_handle->ops->send_time_stamp_sync_cmd)
1652 wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle);
1653
1654}
Govind Singha4836fd2016-03-07 16:45:38 +05301655/**
1656 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
1657 * @wmi_hdl: wmi handle
1658 * @start_log: Start logging related parameters
1659 *
1660 * Send the command to the FW based on which specific logging of diag
1661 * event/log id can be started/stopped
1662 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301663 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05301664 */
Govind Singhb53420c2016-03-09 14:32:57 +05301665QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05301666 struct wmi_wifi_start_log *start_log)
1667{
1668 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1669
1670 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
1671 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
1672 start_log);
1673
Govind Singhb53420c2016-03-09 14:32:57 +05301674 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05301675}
1676
1677/**
1678 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
1679 * @wmi_hdl: WMI handle
1680 *
1681 * This function is used to send the flush command to the FW,
1682 * that will flush the fw logs that are residue in the FW
1683 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301684 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05301685 */
Govind Singhb53420c2016-03-09 14:32:57 +05301686QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05301687{
1688 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1689
1690 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
1691 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
1692
Govind Singhb53420c2016-03-09 14:32:57 +05301693 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05301694}
1695
1696/**
Govind Singha4836fd2016-03-07 16:45:38 +05301697 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
1698 * @wmi_hdl: wmi handle
1699 * @request: SSID hotlist set request
1700 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301701 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05301702 */
Govind Singhb53420c2016-03-09 14:32:57 +05301703QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05301704wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
1705 struct ssid_hotlist_request_params *request)
1706{
1707 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1708
1709 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
1710 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
1711 request);
1712
Govind Singhb53420c2016-03-09 14:32:57 +05301713 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05301714}
1715
Govind Singha4836fd2016-03-07 16:45:38 +05301716/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05301717 * wmi_unified_fw_test_cmd() - send fw test command to fw.
1718 * @wmi_hdl: wmi handle
1719 * @wmi_fwtest: fw test command
1720 *
1721 * This function sends fw test command to fw.
1722 *
1723 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1724 */
1725QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
1726 struct set_fwtest_params *wmi_fwtest)
1727{
1728 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1729
1730 if (wmi_handle->ops->send_fw_test_cmd)
1731 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
1732 wmi_fwtest);
1733
1734 return QDF_STATUS_E_FAILURE;
1735
1736}
1737
1738/**
Govind Singha4836fd2016-03-07 16:45:38 +05301739 * wmi_unified_unit_test_cmd() - send unit test command to fw.
1740 * @wmi_hdl: wmi handle
1741 * @wmi_utest: unit test command
1742 *
1743 * This function send unit test command to fw.
1744 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301745 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05301746 */
Govind Singhb53420c2016-03-09 14:32:57 +05301747QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05301748 struct wmi_unit_test_cmd *wmi_utest)
1749{
1750 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1751
1752 if (wmi_handle->ops->send_unit_test_cmd)
1753 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
1754 wmi_utest);
1755
Govind Singhb53420c2016-03-09 14:32:57 +05301756 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05301757}
1758
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05301759#ifdef FEATURE_WLAN_APF
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05301760QDF_STATUS
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05301761wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05301762 enum wmi_host_active_apf_mode ucast_mode,
1763 enum wmi_host_active_apf_mode
1764 mcast_bcast_mode)
Dustin Brown4423f632017-01-13 15:24:07 -08001765{
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05301766 if (wmi->ops->send_set_active_apf_mode_cmd)
1767 return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
1768 ucast_mode,
1769 mcast_bcast_mode);
1770 return QDF_STATUS_E_FAILURE;
Dustin Brown4423f632017-01-13 15:24:07 -08001771}
1772
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05301773QDF_STATUS
1774wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
1775 uint32_t vdev_id, bool enable)
1776{
1777 if (wmi->ops->send_apf_enable_cmd)
1778 return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable);
1779 return QDF_STATUS_E_FAILURE;
1780}
1781
1782QDF_STATUS
1783wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
1784 struct wmi_apf_write_memory_params
1785 *write_params)
1786{
1787 if (wmi->ops->send_apf_write_work_memory_cmd)
1788 return wmi->ops->send_apf_write_work_memory_cmd(wmi,
1789 write_params);
1790
1791 return QDF_STATUS_E_FAILURE;
1792}
1793
1794QDF_STATUS
1795wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
1796 struct wmi_apf_read_memory_params
1797 *read_params)
1798{
1799 if (wmi->ops->send_apf_read_work_memory_cmd)
1800 return wmi->ops->send_apf_read_work_memory_cmd(wmi,
1801 read_params);
1802
1803 return QDF_STATUS_E_FAILURE;
1804}
1805
1806QDF_STATUS
1807wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
1808 struct wmi_apf_read_memory_resp_event_params
1809 *read_mem_evt)
1810{
1811 if (wmi->ops->extract_apf_read_memory_resp_event)
1812 return wmi->ops->extract_apf_read_memory_resp_event(wmi,
1813 evt_buf,
1814 read_mem_evt);
1815
1816 return QDF_STATUS_E_FAILURE;
1817}
1818#endif /* FEATURE_WLAN_APF */
1819
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301820/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301821 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
1822 * @param wmi_handle : handle to WMI.
1823 * @param param : pointer to hold pdev fips param
1824 *
1825 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1826 */
1827QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
1828 struct fips_params *param)
1829{
1830 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1831
1832 if (wmi_handle->ops->send_pdev_fips_cmd)
1833 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
1834
1835 return QDF_STATUS_E_FAILURE;
1836}
1837
1838/**
1839 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
1840 * @param wmi_handle : handle to WMI.
1841 * @param param : pointer to hold wlan profile param
1842 *
1843 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1844 */
1845QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
1846 struct wlan_profile_params *param)
1847{
1848 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1849
1850 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
1851 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
1852 param);
1853
1854 return QDF_STATUS_E_FAILURE;
1855}
1856
1857/**
1858 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
1859 * @param wmi_handle : handle to WMI.
1860 * @param param : pointer to hold wlan profile param
1861 *
1862 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1863 */
1864QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
1865 struct wlan_profile_params *param)
1866{
1867 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
1868
1869 if (wmi->ops->send_wlan_profile_trigger_cmd)
1870 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
1871 param);
1872
1873 return QDF_STATUS_E_FAILURE;
1874}
1875
1876/**
1877 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
1878 * @param wmi_handle : handle to WMI.
1879 * @param param : pointer to hold channel param
1880 *
1881 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1882 */
1883QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
1884 struct channel_param *param)
1885{
1886 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1887
1888 if (wmi_handle->ops->send_pdev_set_chan_cmd)
1889 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
1890 param);
1891
1892 return QDF_STATUS_E_FAILURE;
1893}
1894
1895/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301896 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
1897 * @param wmi_handle : handle to WMI.
1898 * @param param : pointer to hold ratepwr table param
1899 *
1900 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1901 */
1902QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
1903 struct ratepwr_table_params *param)
1904{
1905 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1906
1907 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
1908 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
1909 param);
1910
1911 return QDF_STATUS_E_FAILURE;
1912}
1913
1914/**
1915 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
1916 * @param wmi_handle : handle to WMI.
1917 *
1918 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1919 */
1920QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
1921{
1922 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1923
1924 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
1925 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
1926
1927 return QDF_STATUS_E_FAILURE;
1928}
1929
1930/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301931 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
1932 * chainmsk cmd function
1933 * @param wmi_handle : handle to WMI.
1934 * @param param : pointer to hold ratepwr chainmsk param
1935 *
1936 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1937 */
1938QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
1939 struct ratepwr_chainmsk_params *param)
1940{
1941 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
1942
1943 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
1944 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
1945
1946 return QDF_STATUS_E_FAILURE;
1947}
1948
1949/**
1950 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
1951 * @param wmi_handle : handle to WMI.
1952 * @param param : pointer to hold macaddr param
1953 *
1954 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1955 */
1956QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
1957 struct macaddr_params *param)
1958{
1959 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1960
1961 if (wmi_handle->ops->send_set_macaddr_cmd)
1962 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
1963
1964 return QDF_STATUS_E_FAILURE;
1965}
1966
1967/**
1968 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
1969 * @param wmi_handle : handle to WMI.
1970 *
1971 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1972 */
1973QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
1974{
1975 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1976
1977 if (wmi_handle->ops->send_pdev_scan_start_cmd)
1978 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
1979
1980 return QDF_STATUS_E_FAILURE;
1981}
1982
1983/**
1984 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
1985 * @param wmi_handle : handle to WMI.
1986 *
1987 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1988 */
1989QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
1990{
1991 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1992
1993 if (wmi_handle->ops->send_pdev_scan_end_cmd)
1994 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
1995
1996 return QDF_STATUS_E_FAILURE;
1997}
1998
1999/**
2000 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
2001 * @param wmi_handle : handle to WMI.
2002 * @param param : pointer to hold acparams param
2003 *
2004 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2005 */
2006QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
2007 struct acparams_params *param)
2008{
2009 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2010
2011 if (wmi_handle->ops->send_set_acparams_cmd)
2012 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
2013 param);
2014
2015 return QDF_STATUS_E_FAILURE;
2016}
2017
2018/**
2019 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
2020 * tid map cmd function
2021 * @param wmi_handle : handle to WMI.
2022 * @param param : pointer to hold dscp param
2023 *
2024 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2025 */
2026QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
2027 struct vap_dscp_tid_map_params *param)
2028{
2029 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2030
2031 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
2032 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
2033
2034 return QDF_STATUS_E_FAILURE;
2035}
2036
2037/**
2038 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
2039 * reserve cmd function
2040 * @param wmi_handle : handle to WMI.
2041 * @param param : pointer to hold ast param
2042 *
2043 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2044 */
2045QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
2046 struct proxy_ast_reserve_params *param)
2047{
2048 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2049
2050 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
2051 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
2052 param);
2053
2054 return QDF_STATUS_E_FAILURE;
2055}
2056
2057/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05302058 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
2059 * @param wmi_hdl : handle to WMI.
2060 * @param param : pointer to hold bridge mac addr param
2061 *
2062 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2063 */
2064QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
2065 struct set_bridge_mac_addr_params *param)
2066{
2067 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2068
2069 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
2070 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
2071 param);
2072
2073 return QDF_STATUS_E_FAILURE;
2074}
2075
2076/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302077 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
2078 * @param wmi_handle : handle to WMI.
2079 * @param param : pointer to hold phyerr enable param
2080 *
2081 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2082 */
2083QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
2084{
2085 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2086
2087 if (wmi_handle->ops->send_phyerr_enable_cmd)
2088 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
2089
2090 return QDF_STATUS_E_FAILURE;
2091}
2092
2093/**
2094 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
2095 * @param wmi_handle : handle to WMI.
2096 * @param param : pointer to hold phyerr disable param
2097 *
2098 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2099 */
2100QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
2101{
2102 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2103
2104 if (wmi_handle->ops->send_phyerr_disable_cmd)
2105 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
2106
2107 return QDF_STATUS_E_FAILURE;
2108}
2109
2110/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302111 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
2112 * @param wmi_handle : handle to WMI.
2113 * @param param : pointer to hold antenna param
2114 *
2115 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2116 */
2117QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
2118 struct smart_ant_enable_tx_feedback_params *param)
2119{
2120 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2121
2122 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
2123 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
2124 param);
2125
2126 return QDF_STATUS_E_FAILURE;
2127}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05302128qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302129
2130/**
2131 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
2132 * @param wmi_handle : handle to WMI.
2133 * @param param : pointer to hold spectral config param
2134 *
2135 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2136 */
2137QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
2138 struct vdev_spectral_configure_params *param)
2139{
2140 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2141
2142 if (wmi->ops->send_vdev_spectral_configure_cmd)
2143 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
2144
2145 return QDF_STATUS_E_FAILURE;
2146}
2147
2148/**
2149 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
2150 * @param wmi_handle : handle to WMI.
2151 * @param param : pointer to hold enable spectral param
2152 *
2153 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2154 */
2155QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
2156 struct vdev_spectral_enable_params *param)
2157{
2158 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2159
2160 if (wmi->ops->send_vdev_spectral_enable_cmd)
2161 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
2162
2163 return QDF_STATUS_E_FAILURE;
2164}
2165
2166/**
2167 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
2168 * @param wmi_handle : handle to WMI.
2169 * @param param : pointer to hold chan info param
2170 *
2171 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2172 */
2173QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
2174 struct bss_chan_info_request_params *param)
2175{
2176 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2177
2178 if (wmi->ops->send_bss_chan_info_request_cmd)
2179 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
2180
2181 return QDF_STATUS_E_FAILURE;
2182}
2183
2184/**
2185 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
2186 * @param wmi_handle : handle to WMI.
2187 * @param param : pointer to hold thermal mitigation param
2188 *
2189 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2190 */
2191QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
2192 struct thermal_mitigation_params *param)
2193{
2194 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2195
2196 if (wmi->ops->send_thermal_mitigation_param_cmd)
2197 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
2198
2199 return QDF_STATUS_E_FAILURE;
2200}
2201
2202/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302203 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
2204 * @param wmi_handle : handle to WMI.
2205 * @param param : pointer to hold fwtest param
2206 *
2207 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2208 */
2209QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
2210 struct set_fwtest_params *param)
2211{
2212 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2213
2214 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
2215 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
2216
2217 return QDF_STATUS_E_FAILURE;
2218}
2219
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302220/**
Sathish Kumar6011c742017-11-08 14:49:58 +05302221 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
2222 * size function
2223 * @param wmi_handle : handle to WMI
2224 * @param param : pointer to hold custom aggr size param
2225 *
2226 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
2227 */
2228QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
2229 struct set_custom_aggr_size_params *param)
2230{
2231 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
2232
2233 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
2234 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
2235
2236 return QDF_STATUS_E_FAILURE;
2237}
2238
2239/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05302240 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
2241 * @param wmi_handle : handle to WMI
2242 * @param param : pointer to hold qdepth threshold params
2243 *
2244 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
2245 */
2246QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
2247 struct set_qdepth_thresh_params *param)
2248{
2249 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
2250
2251 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
2252 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
2253
2254 return QDF_STATUS_E_FAILURE;
2255}
2256
2257/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302258 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
2259 * @param wmi_handle : handle to WMI.
2260 * @param param : pointer to hold regdomain param
2261 *
2262 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2263 */
2264QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
2265 struct pdev_set_regdomain_params *param)
2266{
2267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2268
2269 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
2270 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
2271 param);
2272
2273 return QDF_STATUS_E_FAILURE;
2274}
2275
2276/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302277 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
2278 * @param wmi_handle : handle to WMI.
2279 * @param param : pointer to hold beacon filter param
2280 *
2281 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2282 */
2283QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
2284 struct set_beacon_filter_params *param)
2285{
2286 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2287
2288 if (wmi_handle->ops->send_set_beacon_filter_cmd)
2289 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
2290 param);
2291
2292 return QDF_STATUS_E_FAILURE;
2293}
2294
2295/**
2296 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
2297 * @param wmi_handle : handle to WMI.
2298 * @param param : pointer to hold beacon filter param
2299 *
2300 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2301 */
2302QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
2303 struct remove_beacon_filter_params *param)
2304{
2305 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2306
2307 if (wmi->ops->send_remove_beacon_filter_cmd)
2308 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
2309
2310 return QDF_STATUS_E_FAILURE;
2311}
2312
2313/**
2314 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
2315 * @param wmi_handle : handle to WMI.
2316 * @param macaddr : MAC address
2317 * @param param : pointer to hold mgmt parameter
2318 *
2319 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2320 */
2321#if 0
2322QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
2323 uint8_t macaddr[IEEE80211_ADDR_LEN],
2324 struct mgmt_params *param)
2325{
2326 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2327
2328 if (wmi_handle->ops->send_mgmt_cmd)
2329 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
2330 macaddr, param);
2331
2332 return QDF_STATUS_E_FAILURE;
2333}
2334#endif
2335
2336/**
2337 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
2338 * @param wmi_handle : handle to WMI.
2339 * @param macaddr : MAC address
2340 * @param param : pointer to hold addba resp parameter
2341 *
2342 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2343 */
2344QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
2345 uint8_t macaddr[IEEE80211_ADDR_LEN],
2346 struct addba_clearresponse_params *param)
2347{
2348 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2349
2350 if (wmi_handle->ops->send_addba_clearresponse_cmd)
2351 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
2352 macaddr, param);
2353
2354 return QDF_STATUS_E_FAILURE;
2355}
2356
2357/**
2358 * wmi_unified_addba_send_cmd_send() - WMI addba send function
2359 * @param wmi_handle : handle to WMI.
2360 * @param macaddr : MAC address
2361 * @param param : pointer to hold addba parameter
2362 *
2363 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2364 */
2365QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
2366 uint8_t macaddr[IEEE80211_ADDR_LEN],
2367 struct addba_send_params *param)
2368{
2369 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2370
2371 if (wmi_handle->ops->send_addba_send_cmd)
2372 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
2373 macaddr, param);
2374
2375 return QDF_STATUS_E_FAILURE;
2376}
2377
2378/**
2379 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
2380 * @param wmi_handle : handle to WMI.
2381 * @param macaddr : MAC address
2382 * @param param : pointer to hold delba parameter
2383 *
2384 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2385 */
2386QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
2387 uint8_t macaddr[IEEE80211_ADDR_LEN],
2388 struct delba_send_params *param)
2389{
2390 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2391
2392 if (wmi_handle->ops->send_delba_send_cmd)
2393 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
2394 macaddr, param);
2395
2396 return QDF_STATUS_E_FAILURE;
2397}
2398
2399/**
2400 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
2401 * @param wmi_handle : handle to WMI.
2402 * @param macaddr : MAC address
2403 * @param param : pointer to hold addba set resp parameter
2404 *
2405 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2406 */
2407QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
2408 uint8_t macaddr[IEEE80211_ADDR_LEN],
2409 struct addba_setresponse_params *param)
2410{
2411 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2412
2413 if (wmi_handle->ops->send_addba_setresponse_cmd)
2414 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
2415 macaddr, param);
2416
2417 return QDF_STATUS_E_FAILURE;
2418}
2419
2420/**
2421 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
2422 * @param wmi_handle : handle to WMI.
2423 * @param macaddr : MAC address
2424 * @param param : pointer to hold singleamsdu parameter
2425 *
2426 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2427 */
2428QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
2429 uint8_t macaddr[IEEE80211_ADDR_LEN],
2430 struct singleamsdu_params *param)
2431{
2432 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2433
2434 if (wmi_handle->ops->send_singleamsdu_cmd)
2435 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
2436 macaddr, param);
2437
2438 return QDF_STATUS_E_FAILURE;
2439}
2440
2441/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302442 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
2443 * @param wmi_handle : handle to WMI.
2444 * @param param : pointer to hold mu scan param
2445 *
2446 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2447 */
2448QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
2449 struct mu_scan_params *param)
2450{
2451 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2452
2453 if (wmi_handle->ops->send_mu_scan_cmd)
2454 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
2455
2456 return QDF_STATUS_E_FAILURE;
2457}
2458
2459/**
2460 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
2461 * @param wmi_handle : handle to WMI.
2462 * @param param : pointer to hold mu scan param
2463 *
2464 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2465 */
2466QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
2467 struct lteu_config_params *param)
2468{
2469 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2470
2471 if (wmi_handle->ops->send_lteu_config_cmd)
2472 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
2473
2474 return QDF_STATUS_E_FAILURE;
2475}
2476
2477/**
2478 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
2479 * @param wmi_handle : handle to WMI.
2480 * @param param : pointer to hold mu scan param
2481 *
2482 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2483 */
2484QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
2485 struct set_ps_mode_params *param)
2486{
2487 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2488
2489 if (wmi_handle->ops->send_set_ps_mode_cmd)
2490 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
2491
2492 return QDF_STATUS_E_FAILURE;
2493}
2494
2495/**
2496 * wmi_unified_init_cmd_send() - send initialization cmd to fw
2497 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05302498 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302499 *
2500 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2501 */
2502QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05302503 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302504{
2505 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2506
2507 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05302508 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302509
2510 return QDF_STATUS_E_FAILURE;
2511}
2512
2513/**
2514 * wmi_save_service_bitmap() - save service bitmap
2515 * @wmi_handle: wmi handle
2516 * @param evt_buf: pointer to event buffer
2517 *
2518 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2519 */
Rajeev Kumar77901472017-02-12 02:12:17 -08002520QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
2521 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302522{
2523 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
2524
2525 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05302526 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08002527 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05302528 }
2529 return QDF_STATUS_E_FAILURE;
2530}
2531
2532/**
2533 * wmi_save_ext_service_bitmap() - save extended service bitmap
2534 * @wmi_handle: wmi handle
2535 * @param evt_buf: pointer to event buffer
2536 *
2537 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2538 */
2539QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
2540 void *bitmap_buf)
2541{
2542 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
2543
2544 if (wmi_handle->ops->save_ext_service_bitmap) {
2545 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
2546 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302547 }
2548 return QDF_STATUS_E_FAILURE;
2549}
2550
2551/**
2552 * wmi_save_fw_version() - Save fw version
2553 * @wmi_handle: wmi handle
2554 * @param evt_buf: pointer to event buffer
2555 *
2556 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2557 */
2558QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
2559{
2560 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
2561
2562 if (wmi_handle->ops->save_fw_version) {
2563 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
2564 return 0;
2565 }
2566 return QDF_STATUS_E_FAILURE;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302567}
2568
2569/**
2570 * wmi_check_and_update_fw_version() - Ready and fw version check
2571 * @wmi_handle: wmi handle
2572 * @param evt_buf: pointer to event buffer
2573 *
2574 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2575 */
2576QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
2577{
2578 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
2579
2580 if (wmi_handle->ops->check_and_update_fw_version)
2581 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
2582 evt_buf);
2583
2584 return QDF_STATUS_E_FAILURE;
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302585}
2586
2587/**
2588 * wmi_service_enabled() - Check if service enabled
2589 * @param wmi_handle: wmi handle
2590 * @param service_id: service identifier
2591 *
2592 * Return: 1 enabled, 0 disabled
2593 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302594bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
2595{
2596 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2597
2598 if ((service_id < wmi_services_max) &&
2599 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
2600 if (wmi_handle->ops->is_service_enabled) {
2601 return wmi_handle->ops->is_service_enabled(wmi_handle,
2602 wmi_handle->services[service_id]);
2603 }
2604 } else {
Sathish Kumar686d08d2018-06-26 11:01:11 +05302605 WMI_LOGI("Service %d not supported", service_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302606 }
Sourav Mohapatraa7b454d2017-12-03 11:44:44 +05302607
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302608 return false;
2609}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302610
2611/**
2612 * wmi_get_target_cap_from_service_ready() - extract service ready event
2613 * @wmi_handle: wmi handle
2614 * @param evt_buf: pointer to received event buffer
2615 * @param ev: pointer to hold target capability information extracted from even
2616 *
2617 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2618 */
2619QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08002620 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302621{
2622 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2623
2624 if (wmi->ops->get_target_cap_from_service_ready)
2625 return wmi->ops->get_target_cap_from_service_ready(wmi,
2626 evt_buf, ev);
2627
2628 return QDF_STATUS_E_FAILURE;
2629}
2630
2631/**
2632 * wmi_extract_fw_version() - extract fw version
2633 * @wmi_handle: wmi handle
2634 * @param evt_buf: pointer to event buffer
2635 * @param fw_ver: Pointer to hold fw version
2636 *
2637 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2638 */
2639QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
2640 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
2641{
2642 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2643
2644 if (wmi_handle->ops->extract_fw_version)
2645 return wmi_handle->ops->extract_fw_version(wmi_handle,
2646 evt_buf, fw_ver);
2647
2648 return QDF_STATUS_E_FAILURE;
2649}
2650
2651/**
2652 * wmi_extract_fw_abi_version() - extract fw abi version
2653 * @wmi_handle: wmi handle
2654 * @param evt_buf: Pointer to event buffer
2655 * @param fw_ver: Pointer to hold fw abi version
2656 *
2657 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2658 */
2659QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
2660 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
2661{
2662 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2663
2664 if (wmi_handle->ops->extract_fw_abi_version)
2665 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
2666 evt_buf, fw_ver);
2667
2668 return QDF_STATUS_E_FAILURE;
2669}
2670
2671/**
2672 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
2673 * @wmi_handle: wmi handle
2674 * @param evt_buf: Pointer to event buffer
2675 * @param hal_reg_cap: pointer to hold HAL reg capabilities
2676 *
2677 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2678 */
2679QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08002680 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302681{
2682 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2683
2684 if (wmi_handle->ops->extract_hal_reg_cap)
2685 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
2686 evt_buf, hal_reg_cap);
2687
2688 return QDF_STATUS_E_FAILURE;
2689}
2690
2691/**
2692 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
2693 * request event
2694 * @wmi_handle: wmi handle
2695 * @param evt_buf: pointer to event buffer
2696 * @param num_entries: pointer to hold number of entries requested
2697 *
2698 * Return: Number of entries requested
2699 */
2700host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
2701 void *evt_buf, uint8_t *num_entries)
2702{
2703 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2704
2705 if (wmi_handle->ops->extract_host_mem_req)
2706 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
2707 evt_buf, num_entries);
2708
2709 *num_entries = 0;
2710 return NULL;
2711}
2712
2713/**
2714 * wmi_ready_extract_init_status() - Extract init status from ready event
2715 * @wmi_handle: wmi handle
2716 * @param ev: Pointer to event buffer
2717 *
2718 * Return: ready status
2719 */
2720uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
2721{
2722 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2723
2724 if (wmi_handle->ops->ready_extract_init_status)
2725 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
2726 ev);
2727
2728
2729 return 1;
2730
2731}
2732
2733/**
2734 * wmi_ready_extract_mac_addr() - extract mac address from ready event
2735 * @wmi_handle: wmi handle
2736 * @param ev: pointer to event buffer
2737 * @param macaddr: Pointer to hold MAC address
2738 *
2739 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2740 */
2741QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
2742{
2743 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2744
2745 if (wmi_handle->ops->ready_extract_mac_addr)
2746 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
2747 ev, macaddr);
2748
2749
2750 return QDF_STATUS_E_FAILURE;
2751}
2752
2753/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07002754 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
2755 * @wmi_handle: wmi handle
2756 * @param ev: pointer to event buffer
2757 * @param num_mac_addr: Pointer to number of entries
2758 *
2759 * Return: address to start of mac addr list
2760 */
2761wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
2762 uint8_t *num_mac_addr)
2763{
2764 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2765
2766 if (wmi_handle->ops->ready_extract_mac_addr_list)
2767 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
2768 ev, num_mac_addr);
2769
2770 *num_mac_addr = 0;
2771
2772 return NULL;
2773}
2774
2775/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05302776 * wmi_extract_ready_params() - Extract data from ready event apart from
2777 * status, macaddr and version.
2778 * @wmi_handle: Pointer to WMI handle.
2779 * @evt_buf: Pointer to Ready event buffer.
2780 * @ev_param: Pointer to host defined struct to copy the data from event.
2781 *
2782 * Return: QDF_STATUS_SUCCESS on success.
2783 */
2784QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
2785 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
2786{
2787 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2788
2789 if (wmi_handle->ops->extract_ready_event_params)
2790 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
2791 evt_buf, ev_param);
2792
2793 return QDF_STATUS_E_FAILURE;
2794}
2795
2796/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302797 * wmi_extract_dbglog_data_len() - extract debuglog data length
2798 * @wmi_handle: wmi handle
2799 * @param evt_buf: pointer to event buffer
2800 * @param len: length of buffer
2801 *
2802 * Return: length
2803 */
2804uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08002805 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302806{
2807 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2808
2809 if (wmi_handle->ops->extract_dbglog_data_len)
2810 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
2811 evt_buf, len);
2812
2813
2814 return NULL;
2815}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05302816qdf_export_symbol(wmi_extract_dbglog_data_len);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302817
2818/**
2819 * wmi_send_ext_resource_config() - send extended resource configuration
2820 * @wmi_handle: wmi handle
2821 * @param ext_cfg: pointer to extended resource configuration
2822 *
2823 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2824 */
2825QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
2826 wmi_host_ext_resource_config *ext_cfg)
2827{
2828 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2829
2830 if (wmi_handle->ops->send_ext_resource_config)
2831 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
2832 ext_cfg);
2833
2834 return QDF_STATUS_E_FAILURE;
2835}
2836
2837/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302838 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
2839 * @param wmi_handle : handle to WMI.
2840 * @param param : pointer to hold rtt meas req test param
2841 *
2842 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2843 */
2844QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
2845 struct rtt_meas_req_test_params *param)
2846{
2847 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2848
2849 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
2850 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
2851 param);
2852
2853 return QDF_STATUS_E_FAILURE;
2854}
2855
2856/**
2857 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
2858 * @param wmi_handle : handle to WMI.
2859 * @param param : pointer to hold rtt meas req param
2860 *
2861 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2862 */
2863QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
2864 struct rtt_meas_req_params *param)
2865{
2866 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2867
2868 if (wmi_handle->ops->send_rtt_meas_req_cmd)
2869 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
2870 param);
2871
2872 return QDF_STATUS_E_FAILURE;
2873}
2874
2875/**
2876 * wmi_unified_lci_set_cmd_send() - WMI lci set function
2877 * @param wmi_handle : handle to WMI.
2878 * @param param : pointer to hold lci param
2879 *
2880 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2881 */
2882QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
2883 struct lci_set_params *param)
2884{
2885 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2886
2887 if (wmi_handle->ops->send_lci_set_cmd)
2888 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
2889
2890 return QDF_STATUS_E_FAILURE;
2891}
2892
2893/**
2894 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
2895 * @param wmi_handle : handle to WMI.
2896 * @param param : pointer to hold lcr param
2897 *
2898 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2899 */
2900QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
2901 struct lcr_set_params *param)
2902{
2903 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2904
2905 if (wmi_handle->ops->send_lcr_set_cmd)
2906 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
2907
2908 return QDF_STATUS_E_FAILURE;
2909}
2910
2911/**
2912 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
2913 * @param wmi_handle : handle to WMI.
2914 * @param param : pointer to hold rtt meas req test param
2915 *
2916 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2917 */
2918QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
2919 struct rtt_keepalive_req_params *param)
2920{
2921 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2922
2923 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
2924 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
2925 param);
2926
2927 return QDF_STATUS_E_FAILURE;
2928}
2929
2930/**
2931 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
2932 * to fw
2933 * @wmi_handle: wmi handle
2934 * @param: pointer to hold periodic chan stats param
2935 *
2936 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2937 */
2938QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
2939 struct periodic_chan_stats_params *param)
2940{
2941 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2942
2943 if (wmi->ops->send_periodic_chan_stats_config_cmd)
2944 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
2945 param);
2946
2947 return QDF_STATUS_E_FAILURE;
2948}
2949
Jeffin Mammen095050b2018-07-24 14:20:08 +05302950/**
Sathish Kumar68789382016-11-14 17:44:29 +05302951 * wmi_send_get_user_position_cmd() - send get user position command to fw
2952 * @wmi_handle: wmi handle
2953 *
2954 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2955 */
2956QDF_STATUS
2957wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
2958{
2959 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2960
2961 if (wmi_handle->ops->send_get_user_position_cmd)
2962 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
2963 value);
2964
2965 return QDF_STATUS_E_FAILURE;
2966}
2967
2968/**
2969 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
Sathish Kumarefb25bf2018-10-02 11:03:59 +05302970 * command to fw
Sathish Kumar68789382016-11-14 17:44:29 +05302971 * @wmi_handle: wmi handle
2972 * @value: user pos value
2973 *
2974 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2975 */
2976QDF_STATUS
2977wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
2978{
2979 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2980
2981 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
2982 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
2983
2984 return QDF_STATUS_E_FAILURE;
2985}
2986
2987/**
2988 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
Sathish Kumarefb25bf2018-10-02 11:03:59 +05302989 * tx count to fw
Sathish Kumar68789382016-11-14 17:44:29 +05302990 * @wmi_handle: wmi handle
2991 * @value: reset tx count value
2992 *
2993 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2994 */
2995QDF_STATUS
2996wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
2997{
2998 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
2999
3000 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
3001 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
3002 value);
3003
3004 return QDF_STATUS_E_FAILURE;
3005}
3006
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303007/* Extract - APIs */
3008/**
Alok Singh0243e7d2018-09-20 16:07:28 +05303009 * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl data
3010 * from event
3011 * @wmi_handle: wmi handle
3012 * @param evt_buf: pointer to event buffer
3013 * @param param: Pointer to hold ctl data
3014 *
3015 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3016 */
3017QDF_STATUS
3018wmi_extract_ctl_failsafe_check_ev_param(void *wmi_hdl,
3019 void *evt_buf,
3020 struct wmi_host_pdev_ctl_failsafe_event
3021 *param)
3022{
3023 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3024
3025 if (wmi->ops->extract_ctl_failsafe_check_ev_param)
3026 return wmi->ops->extract_ctl_failsafe_check_ev_param(
3027 wmi, evt_buf, param);
3028
3029 return QDF_STATUS_E_FAILURE;
3030}
3031
3032/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303033 * wmi_extract_fips_event_data() - extract fips event data
3034 * @wmi_handle: wmi handle
3035 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05303036 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303037 *
3038 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3039 */
3040QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05303041 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303042{
3043 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3044
3045 if (wmi_handle->ops->extract_fips_event_data) {
3046 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05303047 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303048 }
3049 return QDF_STATUS_E_FAILURE;
3050}
3051
3052/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303053 * wmi_extract_mgmt_rx_params() - extract management rx params from event
3054 * @wmi_handle: wmi handle
3055 * @param evt_buf: pointer to event buffer
3056 * @param hdr: Pointer to hold header
3057 * @param bufp: Pointer to hold pointer to rx param buffer
3058 *
3059 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3060 */
3061QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05303062 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303063{
3064 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3065
3066 if (wmi_handle->ops->extract_mgmt_rx_params)
3067 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
3068 evt_buf, hdr, bufp);
3069
3070 return QDF_STATUS_E_FAILURE;
3071}
3072
3073/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303074 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
3075 * @wmi_handle: wmi handle
3076 * @param evt_buf: pointer to event buffer
3077 * @param param: Pointer to hold roam param
3078 *
3079 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3080 */
3081QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
3082 wmi_host_roam_event *param)
3083{
3084 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3085
3086 if (wmi_handle->ops->extract_vdev_roam_param)
3087 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
3088 evt_buf, param);
3089
3090 return QDF_STATUS_E_FAILURE;
3091}
3092
3093/**
3094 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
3095 * @wmi_handle: wmi handle
3096 * @param evt_buf: pointer to event buffer
3097 * @param param: Pointer to hold vdev scan param
3098 *
3099 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3100 */
3101QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05303102 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303103{
3104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3105
3106 if (wmi_handle->ops->extract_vdev_scan_ev_param)
3107 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
3108 evt_buf, param);
3109
3110 return QDF_STATUS_E_FAILURE;
3111}
3112
3113/**
3114 * wmi_extract_mu_ev_param() - extract mu param from event
3115 * @wmi_handle: wmi handle
3116 * @param evt_buf: pointer to event buffer
3117 * @param param: Pointer to hold mu report
3118 *
3119 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3120 */
3121QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
3122 wmi_host_mu_report_event *param)
3123{
3124 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3125
3126 if (wmi_handle->ops->extract_mu_ev_param)
3127 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
3128 param);
3129
3130 return QDF_STATUS_E_FAILURE;
3131}
3132
3133/**
Sathish Kumar68789382016-11-14 17:44:29 +05303134 * wmi_extract_mu_db_entry() - extract mu db entry from event
3135 * @wmi_handle: wmi handle
3136 * @param evt_buf: pointer to event buffer
3137 * @param param: Pointer to hold mu db entry
3138 *
3139 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3140 */
3141QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
3142 uint8_t idx, wmi_host_mu_db_entry *param)
3143{
3144 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3145
3146 if (wmi_handle->ops->extract_mu_db_entry)
3147 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
3148 idx, param);
3149
3150 return QDF_STATUS_E_FAILURE;
3151}
3152
3153/**
3154 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
3155 * @wmi_handle: wmi handle
3156 * @param evt_buf: pointer to event buffer
3157 * @param param: Pointer to hold mumimo tx count
3158 *
3159 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3160 */
3161QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
3162 wmi_host_peer_txmu_cnt_event *param)
3163{
3164 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3165
3166 if (wmi->ops->extract_mumimo_tx_count_ev_param)
3167 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
3168 evt_buf, param);
3169
3170 return QDF_STATUS_E_FAILURE;
3171}
3172
3173/**
3174 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
Sathish Kumarefb25bf2018-10-02 11:03:59 +05303175 * from event
Sathish Kumar68789382016-11-14 17:44:29 +05303176 * @wmi_handle: wmi handle
3177 * @param evt_buf: pointer to event buffer
3178 * @param param: Pointer to hold peer gid userposition list
3179 *
3180 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3181 */
3182QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
3183 void *evt_buf,
3184 wmi_host_peer_gid_userpos_list_event *param)
3185{
3186 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3187
3188 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
3189 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
3190 evt_buf, param);
3191
3192 return QDF_STATUS_E_FAILURE;
3193}
3194
3195/**
Anirban Sirkhell23467ce2017-08-25 16:01:50 +05303196 * wmi_extract_esp_estimate_ev_param() - extract air time from event
3197 * @wmi_handle: wmi handle
3198 * @evt_buf: pointer to event buffer
3199 * @param: Pointer to hold esp event
3200 *
3201 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3202 */
3203QDF_STATUS
3204wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
3205 struct esp_estimation_event *param)
3206{
3207 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3208
3209 if (wmi_handle->ops->extract_esp_estimation_ev_param)
3210 return wmi_handle->ops->extract_esp_estimation_ev_param(
3211 wmi_handle, evt_buf, param);
3212
3213 return QDF_STATUS_E_FAILURE;
3214}
3215
3216/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303217 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
3218 * @wmi_handle: wmi handle
3219 * @param evt_buf: pointer to event buffer
3220 * @param gpio_num: Pointer to hold gpio number
3221 *
3222 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3223 */
3224QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
3225 void *evt_buf, uint32_t *gpio_num)
3226{
3227 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3228
3229 if (wmi_handle->ops->extract_gpio_input_ev_param)
3230 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
3231 evt_buf, gpio_num);
3232
3233 return QDF_STATUS_E_FAILURE;
3234}
3235
3236/**
3237 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
3238 * param from event
3239 * @wmi_handle: wmi handle
3240 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05303241 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303242 *
3243 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3244 */
3245QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05303246 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303247{
3248 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3249
3250 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
3251 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05303252 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303253
3254 return QDF_STATUS_E_FAILURE;
3255}
3256
3257/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303258 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
3259 * from event
3260 * @wmi_handle: wmi handle
3261 * @param evt_buf: pointer to event buffer
3262 * @param param: Pointer to generic buffer param
3263 *
3264 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3265 */
3266QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
3267 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
3268{
3269 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3270
3271 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
3272 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
3273 evt_buf, param);
3274
3275 return QDF_STATUS_E_FAILURE;
3276
3277}
3278
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303279/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303280 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
3281 * @wmi_handle: wmi handle
3282 * @param evt_buf: pointer to event buffer
3283 * @param peer_mac: Pointer to hold peer mac address
3284 * @param rate_cap: Pointer to hold ratecode
3285 *
3286 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3287 */
3288QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
3289 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
3290{
3291 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3292
3293 if (wmi->ops->extract_peer_ratecode_list_ev)
3294 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
3295 evt_buf, peer_mac, rate_cap);
3296
3297 return QDF_STATUS_E_FAILURE;
3298
3299}
3300
3301/**
3302 * wmi_extract_comb_phyerr() - extract comb phy error from event
3303 * @wmi_handle: wmi handle
3304 * @param evt_buf: pointer to event buffer
3305 * @param datalen: data length of event buffer
3306 * @param buf_offset: Pointer to hold value of current event buffer offset
3307 * post extraction
3308 * @param phyer: Pointer to hold phyerr
3309 *
3310 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3311 */
3312QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
3313 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
3314{
3315 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3316
3317 if (wmi_handle->ops->extract_comb_phyerr)
3318 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
3319 evt_buf, datalen, buf_offset, phyerr);
3320
3321 return QDF_STATUS_E_FAILURE;
3322
3323}
3324
3325/**
3326 * wmi_extract_single_phyerr() - extract single phy error from event
3327 * @wmi_handle: wmi handle
3328 * @param evt_buf: pointer to event buffer
3329 * @param datalen: data length of event buffer
3330 * @param buf_offset: Pointer to hold value of current event buffer offset
3331 * post extraction
3332 * @param phyerr: Pointer to hold phyerr
3333 *
3334 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3335 */
3336QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
3337 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
3338{
3339 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3340
3341 if (wmi_handle->ops->extract_single_phyerr)
3342 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
3343 evt_buf, datalen, buf_offset, phyerr);
3344
3345 return QDF_STATUS_E_FAILURE;
3346
3347}
3348
3349/**
3350 * wmi_extract_composite_phyerr() - extract composite phy error from event
3351 * @wmi_handle: wmi handle
3352 * @param evt_buf: pointer to event buffer
3353 * @param datalen: Length of event buffer
3354 * @param phyerr: Pointer to hold phy error
3355 *
3356 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3357 */
3358QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
3359 uint16_t datalen, wmi_host_phyerr_t *phyerr)
3360{
3361 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3362
3363 if (wmi_handle->ops->extract_composite_phyerr)
3364 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
3365 evt_buf, datalen, phyerr);
3366
3367 return QDF_STATUS_E_FAILURE;
3368
3369}
3370
3371/**
3372 * wmi_extract_stats_param() - extract all stats count from event
3373 * @wmi_handle: wmi handle
3374 * @param evt_buf: pointer to event buffer
3375 * @param stats_param: Pointer to hold stats count
3376 *
3377 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3378 */
3379QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
3380 wmi_host_stats_event *stats_param)
3381{
3382 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3383
3384 if (wmi_handle->ops->extract_all_stats_count)
3385 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
3386 evt_buf, stats_param);
3387
3388 return QDF_STATUS_E_FAILURE;
3389}
3390
3391/**
3392 * wmi_extract_pdev_stats() - extract pdev stats from event
3393 * @wmi_handle: wmi handle
3394 * @param evt_buf: pointer to event buffer
3395 * @param index: Index into pdev stats
3396 * @param pdev_stats: Pointer to hold pdev stats
3397 *
3398 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3399 */
3400QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
3401 uint32_t index, wmi_host_pdev_stats *pdev_stats)
3402{
3403 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3404
3405 if (wmi_handle->ops->extract_pdev_stats)
3406 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
3407 evt_buf, index, pdev_stats);
3408
3409 return QDF_STATUS_E_FAILURE;
3410}
3411
3412/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07003413 * extract_unit_test() - extract unit test from event
3414 * @wmi_handle: wmi handle
3415 * @param evt_buf: pointer to event buffer
3416 * @param unit_test: Pointer to hold unit-test header
3417 * @param maxspace: The amount of space in evt_buf
3418 *
3419 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3420 */
3421QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
3422 wmi_unit_test_event *unit_test, uint32_t maxspace)
3423{
3424 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3425
3426 if (wmi_handle->ops->extract_unit_test)
3427 return wmi_handle->ops->extract_unit_test(wmi_handle,
3428 evt_buf, unit_test, maxspace);
3429
3430 return QDF_STATUS_E_FAILURE;
3431}
3432
3433/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303434 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
3435 * @wmi_handle: wmi handle
3436 * @param evt_buf: pointer to event buffer
3437 * @param index: Index into extended pdev stats
3438 * @param pdev_ext_stats: Pointer to hold extended pdev stats
3439 *
3440 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3441 */
3442QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
3443 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
3444{
3445 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3446
3447 if (wmi_handle->ops->extract_pdev_ext_stats)
3448 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
3449 evt_buf, index, pdev_ext_stats);
3450
3451 return QDF_STATUS_E_FAILURE;
3452}
3453
3454/**
3455 * wmi_extract_peer_stats() - extract peer stats from event
3456 * @wmi_handle: wmi handle
3457 * @param evt_buf: pointer to event buffer
3458 * @param index: Index into peer stats
3459 * @param peer_stats: Pointer to hold peer stats
3460 *
3461 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3462 */
3463QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
3464 uint32_t index, wmi_host_peer_stats *peer_stats)
3465{
3466 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3467
3468 if (wmi_handle->ops->extract_peer_stats)
3469 return wmi_handle->ops->extract_peer_stats(wmi_handle,
3470 evt_buf, index, peer_stats);
3471
3472 return QDF_STATUS_E_FAILURE;
3473}
3474
3475/**
3476 * wmi_extract_vdev_stats() - extract vdev stats from event
3477 * @wmi_handle: wmi handle
3478 * @param evt_buf: pointer to event buffer
3479 * @param index: Index into vdev stats
3480 * @param vdev_stats: Pointer to hold vdev stats
3481 *
3482 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3483 */
3484QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
3485 uint32_t index, wmi_host_vdev_stats *vdev_stats)
3486{
3487 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3488
3489 if (wmi_handle->ops->extract_vdev_stats)
3490 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
3491 evt_buf, index, vdev_stats);
3492
3493 return QDF_STATUS_E_FAILURE;
3494}
3495
3496/**
Naveen Rawatd2115722018-04-12 08:17:55 -07003497 * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
3498 * @wmi_handle: wmi handle
3499 * @param evt_buf: pointer to event buffer
3500 * @param index: Index into rssi stats
3501 * @param rssi_stats: Pointer to hold rssi stats
3502 *
3503 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3504 */
3505QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
3506 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats)
3507{
3508 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3509
3510 if (wmi_handle->ops->extract_per_chain_rssi_stats)
3511 return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle,
3512 evt_buf, index, rssi_stats);
3513
3514 return QDF_STATUS_E_FAILURE;
3515}
3516
3517/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303518 * wmi_extract_rtt_hdr() - extract rtt header from event
3519 * @wmi_handle: wmi handle
3520 * @param evt_buf: pointer to event buffer
3521 * @param ev: Pointer to hold rtt header
3522 *
3523 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3524 */
3525QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
3526 wmi_host_rtt_event_hdr *ev)
3527{
3528 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3529
3530 if (wmi_handle->ops->extract_rtt_hdr)
3531 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
3532 evt_buf, ev);
3533
3534 return QDF_STATUS_E_FAILURE;
3535}
3536
3537/**
3538 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
3539 * @wmi_handle: wmi handle
3540 * @param evt_buf: pointer to event buffer
3541 * @param index: Index into bcn fault stats
3542 * @param bcnflt_stats: Pointer to hold bcn fault stats
3543 *
3544 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3545 */
3546QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
3547 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
3548{
3549 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3550
3551 if (wmi_handle->ops->extract_bcnflt_stats)
3552 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
3553 evt_buf, index, bcnflt_stats);
3554
3555 return QDF_STATUS_E_FAILURE;
3556}
3557
3558/**
3559 * wmi_extract_rtt_ev() - extract rtt event
3560 * @wmi_handle: wmi handle
3561 * @param evt_buf: Pointer to event buffer
3562 * @param ev: Pointer to hold rtt event
3563 * @param hdump: Pointer to hold hex dump
3564 * @param hdump_len: hex dump length
3565 *
3566 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3567 */
3568QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
3569 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
3570{
3571 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3572
3573 if (wmi_handle->ops->extract_rtt_ev)
3574 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
3575 evt_buf, ev, hdump, hdump_len);
3576
3577 return QDF_STATUS_E_FAILURE;
3578}
3579
3580/**
3581 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
3582 * @wmi_handle: wmi handle
3583 * @param evt_buf: pointer to event buffer
3584 * @param index: Index into extended peer stats
3585 * @param peer_extd_stats: Pointer to hold extended peer stats
3586 *
3587 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3588 */
3589QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
3590 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
3591{
3592 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3593
3594 if (wmi_handle->ops->extract_peer_extd_stats)
3595 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
3596 evt_buf, index, peer_extd_stats);
3597
3598 return QDF_STATUS_E_FAILURE;
3599}
3600
Uraj Sasan78b6ac92018-09-20 09:39:49 +05303601QDF_STATUS wmi_extract_peer_retry_stats(void *wmi_hdl, void *evt_buf,
3602 uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats)
3603{
3604 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
3605
3606 if (wmi_handle->ops->extract_peer_retry_stats)
3607 return wmi_handle->ops->extract_peer_retry_stats(wmi_handle,
3608 evt_buf, index, peer_retry_stats);
3609
3610 return QDF_STATUS_E_FAILURE;
3611}
3612
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303613/**
3614 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
3615 * @wmi_handle: wmi handle
3616 * @param evt_buf: pointer to event buffer
3617 * @param wds_ev: Pointer to hold rtt error report
3618 *
3619 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3620 */
3621QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
3622 wmi_host_rtt_error_report_event *ev)
3623{
3624 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3625
3626 if (wmi_handle->ops->extract_rtt_error_report_ev)
3627 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
3628 evt_buf, ev);
3629
3630 return QDF_STATUS_E_FAILURE;
3631}
3632
3633/**
3634 * wmi_extract_chan_stats() - extract chan stats from event
3635 * @wmi_handle: wmi handle
3636 * @param evt_buf: pointer to event buffer
3637 * @param index: Index into chan stats
3638 * @param chanstats: Pointer to hold chan stats
3639 *
3640 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3641 */
3642QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
3643 uint32_t index, wmi_host_chan_stats *chan_stats)
3644{
3645 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3646
3647 if (wmi_handle->ops->extract_chan_stats)
3648 return wmi_handle->ops->extract_chan_stats(wmi_handle,
3649 evt_buf, index, chan_stats);
3650
3651 return QDF_STATUS_E_FAILURE;
3652}
3653
3654/**
3655 * wmi_extract_thermal_stats() - extract thermal stats from event
3656 * @wmi_handle: wmi handle
3657 * @param evt_buf: Pointer to event buffer
3658 * @param temp: Pointer to hold extracted temperature
3659 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05303660 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303661 *
3662 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3663 */
3664QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05303665 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303666{
3667 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3668
3669 if (wmi_handle->ops->extract_thermal_stats)
3670 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05303671 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303672
3673 return QDF_STATUS_E_FAILURE;
3674}
3675
3676/**
3677 * wmi_extract_profile_ctx() - extract profile context from event
3678 * @wmi_handle: wmi handle
3679 * @param evt_buf: pointer to event buffer
3680 * @param profile_ctx: Pointer to hold profile context
3681 *
3682 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3683 */
3684QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
3685 wmi_host_wlan_profile_ctx_t *profile_ctx)
3686{
3687 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3688
3689 if (wmi_handle->ops->extract_profile_ctx)
3690 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
3691 evt_buf, profile_ctx);
3692
3693 return QDF_STATUS_E_FAILURE;
3694}
3695
3696/**
3697 * wmi_extract_thermal_level_stats() - extract thermal level stats from
3698 * event
3699 * @wmi_handle: wmi handle
3700 * @param evt_buf: pointer to event buffer
3701 * @param idx: Index to level stats
3702 * @param levelcount: Pointer to hold levelcount
3703 * @param dccount: Pointer to hold dccount
3704 *
3705 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3706 */
3707QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
3708 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
3709{
3710 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3711
3712 if (wmi_handle->ops->extract_thermal_level_stats)
3713 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
3714 evt_buf, idx, levelcount, dccount);
3715
3716 return QDF_STATUS_E_FAILURE;
3717}
3718
3719/**
3720 * wmi_extract_profile_data() - extract profile data from event
3721 * @wmi_handle: wmi handle
3722 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05303723 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303724 * @param profile_data: Pointer to hold profile data
3725 *
3726 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3727 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05303728QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303729 wmi_host_wlan_profile_t *profile_data)
3730{
3731 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3732
3733 if (wmi_handle->ops->extract_profile_data)
3734 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05303735 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303736
3737 return QDF_STATUS_E_FAILURE;
3738}
3739
3740/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303741 * wmi_extract_bss_chan_info_event() - extract bss channel information
3742 * from event
3743 * @wmi_handle: wmi handle
3744 * @param evt_buf: pointer to event buffer
3745 * @param bss_chan_info: Pointer to hold bss channel information
3746 *
3747 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3748 */
3749QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
3750 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
3751{
3752 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3753
3754 if (wmi_handle->ops->extract_bss_chan_info_event)
3755 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
3756 evt_buf, bss_chan_info);
3757
3758 return QDF_STATUS_E_FAILURE;
3759}
3760
3761/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303762 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
3763 * from event
3764 * @wmi_handle: wmi handle
3765 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303766 * @param ev: Pointer to hold data traffic control
3767 *
3768 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3769 */
3770QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
3771 wmi_host_tx_data_traffic_ctrl_event *ev)
3772{
3773 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3774
3775 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
3776 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
3777 evt_buf, ev);
3778
3779 return QDF_STATUS_E_FAILURE;
3780}
3781
3782/**
3783 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
3784 * @wmi_handle: wmi handle
3785 * @param evt_buf: pointer to event buffer
3786 * @param index: Index into extended vdev stats
3787 * @param vdev_extd_stats: Pointer to hold extended vdev stats
3788 *
3789 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3790 */
3791QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
3792 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
3793{
3794 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3795
3796 if (wmi_handle->ops->extract_vdev_extd_stats)
3797 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
3798 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05303799 return QDF_STATUS_E_FAILURE;
3800}
3801
3802/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05303803 * wmi_extract_bcn_stats() - extract beacon stats from event
3804 * @wmi_handle: wmi handle
3805 * @evt_buf: pointer to event buffer
3806 * @index: Index into beacon stats
3807 * @vdev_bcn_stats: Pointer to hold beacon stats
3808 *
3809 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3810 */
3811QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
3812 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
3813{
3814 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3815
3816 if (wmi_handle->ops->extract_bcn_stats)
3817 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
3818 evt_buf, index, vdev_bcn_stats);
3819 return QDF_STATUS_E_FAILURE;
3820}
3821
3822/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +05303823 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
3824 * @wmi_handle: wmi handle
3825 * @param evt_buf: pointer to event buffer
3826 * @param vdev_extd_stats: Pointer to hold nac rssi stats
3827 *
3828 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3829 */
3830QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
3831 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats)
3832{
3833 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3834
3835 if (wmi_handle->ops->extract_vdev_nac_rssi_stats)
3836 return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle,
3837 evt_buf, vdev_nac_rssi_stats);
3838
3839 return QDF_STATUS_E_FAILURE;
3840}
3841
3842/**
Govind Singhbca3b1b2016-05-02 17:59:24 +05303843 * wmi_unified_send_power_dbg_cmd() - send power debug commands
3844 * @wmi_handle: wmi handle
3845 * @param: wmi power debug parameter
3846 *
3847 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
3848 *
3849 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3850 */
3851QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
3852 struct wmi_power_dbg_params *param)
3853{
3854 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3855
3856 if (wmi_handle->ops->send_power_dbg_cmd)
3857 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
3858 param);
3859
3860 return QDF_STATUS_E_FAILURE;
3861}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05303862
Sathish Kumar68789382016-11-14 17:44:29 +05303863/*
3864 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
3865 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05303866 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05303867 *
3868 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
3869 *
3870 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3871 */
3872QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05303873 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05303874{
3875 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3876
3877 if (wmi->ops->send_btcoex_wlan_priority_cmd)
3878 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05303879 param);
3880
3881 return QDF_STATUS_E_FAILURE;
3882}
3883/**
3884 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
3885 * @wmi_handle: wmi handle
3886 * @param: wmi btcoex cfg params
3887 *
3888 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
3889 *
3890 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3891 */
3892QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
3893 struct btcoex_cfg_params *param)
3894{
3895 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3896
3897 if (wmi->ops->send_btcoex_duty_cycle_cmd)
3898 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
3899 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05303900
3901 return QDF_STATUS_E_FAILURE;
3902}
Kiran Venkatappa06520822016-08-10 23:55:40 +05303903
3904/*
3905 * wmi_extract_service_ready_ext() - extract extended service ready
3906 * @wmi_handle: wmi handle
3907 * @param: wmi power debug parameter
3908 *
3909 *
3910 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
3911 */
3912QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08003913 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05303914{
3915 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3916
3917 if (wmi_handle->ops->extract_service_ready_ext)
3918 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
3919 evt_buf, param);
3920
3921 return QDF_STATUS_E_FAILURE;
3922}
3923
3924/**
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07003925 * wmi_extract_sar_cap_service_ready_ext() -
3926 * extract sar cap from service ready event
3927 * @wmi_handle: wmi handle
3928 * @evt_buf: pointer to event buffer
3929 * @ext_param: extended target info
3930 *
3931 * Return: QDF_STATUS_SUCCESS for success or error code
3932 */
3933QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
3934 void *wmi_hdl,
3935 uint8_t *evt_buf,
3936 struct wlan_psoc_host_service_ext_param *ext_param)
3937{
3938 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3939
3940 if (wmi_handle->ops->extract_sar_cap_service_ready_ext)
3941 return wmi_handle->ops->extract_sar_cap_service_ready_ext(
3942 wmi_handle,
3943 evt_buf, ext_param);
3944
3945 return QDF_STATUS_E_FAILURE;
3946}
3947
3948/**
Kiran Venkatappa06520822016-08-10 23:55:40 +05303949 * wmi_extract_hw_mode_cap_service_ready_ext() -
3950 * extract HW mode cap from service ready event
3951 * @wmi_handle: wmi handle
3952 * @param evt_buf: pointer to event buffer
3953 * @param param: Pointer to hold evt buf
3954 * @param hw_mode_idx: hw mode idx should be less than num_mode
3955 *
3956 * Return: QDF_STATUS_SUCCESS for success or error code
3957 */
3958QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
3959 void *wmi_hdl,
3960 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08003961 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05303962{
3963 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3964
3965 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
3966 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
3967 wmi_handle,
3968 evt_buf, hw_mode_idx, param);
3969
3970 return QDF_STATUS_E_FAILURE;
3971}
3972/**
3973 * wmi_extract_mac_phy_cap_service_ready_ext() -
3974 * extract MAC phy cap from service ready event
3975 * @wmi_handle: wmi handle
3976 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05303977 * @param hw_mode_id: hw mode id of hw_mode_caps
3978 * @param phy_id: phy_id within hw_mode_cap
3979 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05303980 *
3981 * Return: QDF_STATUS_SUCCESS for success or error code
3982 */
3983QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
3984 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05303985 uint8_t *evt_buf,
3986 uint8_t hw_mode_id,
3987 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08003988 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05303989{
3990 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3991
3992 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
3993 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
3994 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05303995 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05303996
3997 return QDF_STATUS_E_FAILURE;
3998}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05303999
Kiran Venkatappa06520822016-08-10 23:55:40 +05304000/**
4001 * wmi_extract_reg_cap_service_ready_ext() -
4002 * extract REG cap from service ready event
4003 * @wmi_handle: wmi handle
4004 * @param evt_buf: pointer to event buffer
4005 * @param param: Pointer to hold evt buf
4006 * @param phy_idx: phy idx should be less than num_mode
4007 *
4008 * Return: QDF_STATUS_SUCCESS for success or error code
4009 */
4010QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
4011 void *wmi_hdl,
4012 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004013 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05304014{
4015 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4016
4017 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
4018 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
4019 wmi_handle,
4020 evt_buf, phy_idx, param);
4021
4022 return QDF_STATUS_E_FAILURE;
4023}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05304024
Sathish Kumarf396c722017-11-17 17:30:41 +05304025QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
4026 void *wmi_hdl,
4027 uint8_t *evt_buf, uint8_t idx,
4028 struct wlan_psoc_host_dbr_ring_caps *param)
4029{
4030 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4031
4032 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
4033 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
4034 wmi_handle,
4035 evt_buf, idx, param);
4036
4037 return QDF_STATUS_E_FAILURE;
4038}
4039
Sathish Kumar27ee0a32017-01-24 17:51:26 +05304040/**
4041 * wmi_extract_pdev_utf_event() -
4042 * extract UTF data from pdev utf event
4043 * @wmi_handle: wmi handle
4044 * @param evt_buf: pointer to event buffer
4045 * @param param: Pointer to hold evt buf
4046 *
4047 * Return: QDF_STATUS_SUCCESS for success or error code
4048 */
4049QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
4050 uint8_t *evt_buf,
4051 struct wmi_host_pdev_utf_event *param)
4052{
4053 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4054
4055 if (wmi_handle->ops->extract_pdev_utf_event)
4056 return wmi_handle->ops->extract_pdev_utf_event(
4057 wmi_handle,
4058 evt_buf, param);
4059
4060 return QDF_STATUS_E_FAILURE;
4061}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05304062
4063/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05304064 * wmi_extract_pdev_qvit_event() -
4065 * extract UTF data from pdev qvit event
4066 * @wmi_handle: wmi handle
4067 * @param evt_buf: pointer to event buffer
4068 * @param param: Pointer to hold evt buf
4069 *
4070 * Return: QDF_STATUS_SUCCESS for success or error code
4071 */
4072QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
4073 uint8_t *evt_buf,
4074 struct wmi_host_pdev_qvit_event *param)
4075{
4076 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4077
4078 if (wmi_handle->ops->extract_pdev_qvit_event)
4079 return wmi_handle->ops->extract_pdev_qvit_event(
4080 wmi_handle,
4081 evt_buf, param);
4082
4083 return QDF_STATUS_E_FAILURE;
4084}
4085
4086/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05304087 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
4088 * @wmi_handle: wmi handle
4089 * @param: wmi coex ver cfg params
4090 *
4091 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
4092 *
4093 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4094 */
4095QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
4096 coex_ver_cfg_t *param)
4097{
4098 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4099
4100 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
4101 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
4102 param);
4103
4104 return QDF_STATUS_E_FAILURE;
4105}
4106
4107/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05304108 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
4109 * @wmi_handle: wmi handle
4110 * @param: wmi coex cfg cmd params
4111 *
4112 * Send WMI_COEX_CFG_CMD parameters to fw.
4113 *
4114 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4115 */
4116QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
4117 struct coex_config_params *param)
4118{
4119 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4120
4121 if (wmi_handle->ops->send_coex_config_cmd)
4122 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
4123 param);
4124
4125 return QDF_STATUS_E_FAILURE;
4126}
4127
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05304128QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
4129 struct rcpi_req *get_rcpi_param)
4130{
4131 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4132
4133 if (wmi_handle->ops->send_get_rcpi_cmd)
4134 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
4135 get_rcpi_param);
4136
4137 return QDF_STATUS_E_FAILURE;
4138}
4139
4140QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
4141 struct rcpi_res *res)
4142{
4143 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4144 struct wmi_ops *ops = wmi_handle->ops;
4145
4146 if (ops->extract_rcpi_response_event)
4147 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
4148 res);
4149
4150 return QDF_STATUS_E_FAILURE;
4151}
4152
Arif Hussainf00be1d2017-01-07 18:21:55 -08004153QDF_STATUS
4154wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
4155 uint32_t pdev_id)
4156{
4157 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4158
4159 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
4160 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
4161 wmi_handle, pdev_id);
4162
4163 return QDF_STATUS_E_FAILURE;
4164}
4165
4166QDF_STATUS
4167wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
4168 uint32_t pdev_id)
4169{
4170 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4171
4172 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
4173 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
4174 wmi_handle, pdev_id);
4175
4176 return QDF_STATUS_E_FAILURE;
4177}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05304178
4179/*
4180 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
4181 * @wmi_handle: wmi handle
4182 * @evt_buf: pointer to event buffer.
4183 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
4184 *
4185 *
4186 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4187 */
4188QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
4189 struct wlan_psoc_host_chainmask_table *chainmask_table)
4190{
4191 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4192
4193 if (wmi_handle->ops->extract_chainmask_tables)
4194 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
4195 evt_buf, chainmask_table);
4196
4197 return QDF_STATUS_E_FAILURE;
4198}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07004199/**
4200 * wmi_unified_set_country_cmd_send() - WMI set country function
4201 * @param wmi_handle : handle to WMI.
4202 * @param param : pointer to hold set country cmd parameter
4203 *
4204 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4205 */
4206QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
4207 struct set_country *param)
4208{
4209 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4210
4211 if (wmi_handle->ops->send_set_country_cmd)
4212 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
4213 param);
4214
4215 return QDF_STATUS_E_FAILURE;
4216}
4217
Rajeev Kumar Sirasanagandladaadf832017-09-18 16:47:52 +05304218#ifdef WLAN_FEATURE_ACTION_OUI
4219QDF_STATUS
4220wmi_unified_send_action_oui_cmd(void *wmi_hdl,
4221 struct action_oui_request *req)
4222{
4223 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4224
4225 if (wmi_handle->ops->send_action_oui_cmd)
4226 return wmi_handle->ops->send_action_oui_cmd(wmi_handle,
4227 req);
4228
4229 return QDF_STATUS_E_FAILURE;
4230}
4231#endif
4232
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05304233/**
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05304234 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
4235 * wds entries from FW
4236 * @wmi_handle: wmi handle
4237 *
4238 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
4239 *
4240 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
4241 */
4242QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
4243{
4244 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4245
4246 if (wmi_handle->ops->send_wds_entry_list_cmd)
4247 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
4248
4249 return QDF_STATUS_E_FAILURE;
4250}
4251
4252/**
4253 * wmi_extract_wds_entry - api to extract wds entry
4254 * @wmi_handle: wma handle
4255 * @evt_buf: pointer to event buffer
4256 * @wds_entry: wds entry
4257 * @idx: index to point wds entry in event buffer
4258 *
4259 * Return: QDF_STATUS_SUCCESS for successful event parse
4260 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
4261 */
4262QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
4263 struct wdsentry *wds_entry,
4264 u_int32_t idx)
4265{
4266 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4267
4268 if (wmi_handle->ops->extract_wds_entry)
4269 return wmi_handle->ops->extract_wds_entry(wmi_handle,
4270 evt_buf, wds_entry, idx);
4271
4272 return QDF_STATUS_E_FAILURE;
4273}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304274qdf_export_symbol(wmi_extract_wds_entry);
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08004275
Arif Hussainc5bfe072017-12-27 16:23:45 -08004276QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
4277 struct wmi_obss_detection_cfg_param *obss_cfg_param)
4278{
4279 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4280
4281 if (wmi_handle->ops->send_obss_detection_cfg_cmd)
4282 return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle,
4283 obss_cfg_param);
4284
4285 return QDF_STATUS_E_FAILURE;
4286}
Arif Hussain33d98502018-01-12 13:15:04 -08004287
4288QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
4289 uint8_t *data,
4290 struct wmi_obss_detect_info
4291 *info)
4292{
4293 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4294
4295 if (wmi_handle->ops->extract_obss_detection_info)
4296 return wmi_handle->ops->extract_obss_detection_info(data, info);
4297
4298 return QDF_STATUS_E_FAILURE;
4299}
Vignesh Viswanathan7f057772018-01-18 19:06:40 +05304300
Himanshu Agarwal157e4782018-01-24 22:24:17 +05304301#ifdef WLAN_SUPPORT_GREEN_AP
4302QDF_STATUS wmi_extract_green_ap_egap_status_info(
4303 void *wmi_hdl, uint8_t *evt_buf,
4304 struct wlan_green_ap_egap_status_info *egap_status_info_params)
4305{
4306 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4307
4308 if (wmi_handle->ops->extract_green_ap_egap_status_info)
4309 return wmi_handle->ops->extract_green_ap_egap_status_info(
4310 evt_buf, egap_status_info_params);
4311
4312 return QDF_STATUS_E_FAILURE;
4313}
4314#endif
Arif Hussainec5cd3c2018-01-22 01:19:36 -08004315
Naveen Rawat26305452018-02-02 15:18:33 -08004316wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
4317 WMI_HOST_WLAN_PHY_MODE phymode)
4318{
4319 /*
4320 * this API does translation between host only strcutres, hence
4321 * does not need separate TLV, non-TLV definitions
4322 */
4323
4324 if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX)
4325 return mode_to_width[phymode];
4326 else
4327 return WMI_HOST_CHAN_WIDTH_20;
4328}
Naveen Rawat963ee942018-04-13 16:38:36 -07004329
4330#ifdef QCA_SUPPORT_CP_STATS
4331QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
4332 struct wmi_host_congestion_stats *stats)
4333{
4334 if (wmi_handle->ops->extract_cca_stats)
4335 return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf,
4336 stats);
4337
4338 return QDF_STATUS_E_FAILURE;
4339}
4340#endif /* QCA_SUPPORT_CP_STATS */
Shashikala Prabhu5f65ac72018-05-16 10:08:09 +05304341
4342#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
4343QDF_STATUS
4344wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
4345 struct dfs_radar_found_params *params)
4346{
4347 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4348
4349 if (wmi_handle->ops->send_dfs_average_radar_params_cmd)
4350 return wmi_handle->ops->send_dfs_average_radar_params_cmd(
4351 wmi_handle, params);
4352
4353 return QDF_STATUS_E_FAILURE;
4354}
4355
4356QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
4357 uint32_t *dfs_status_check)
4358{
4359 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4360
4361 if (wmi_handle->ops->extract_dfs_status_from_fw)
4362 return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle,
4363 evt_buf, dfs_status_check);
4364
4365 return QDF_STATUS_E_FAILURE;
4366}
4367#endif
c_cgodav758d99f2017-02-13 10:14:42 +05304368
4369#ifdef OL_ATH_SMART_LOGGING
4370QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
4371 uint32_t param)
4372{
4373 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4374
4375 if (wmi_handle->ops->send_smart_logging_enable_cmd)
4376 return wmi_handle->ops->send_smart_logging_enable_cmd(
4377 wmi_handle,
4378 param);
4379
4380 return QDF_STATUS_E_FAILURE;
4381}
4382
4383QDF_STATUS
4384wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl,
4385 struct wmi_debug_fatal_events *param)
4386{
4387 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4388
4389 if (wmi_handle->ops->send_smart_logging_fatal_cmd)
4390 return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle,
4391 param);
4392
4393 return QDF_STATUS_E_FAILURE;
4394}
4395
4396QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl,
4397 void *evt_buf,
4398 struct wmi_debug_fatal_events *ev)
4399{
4400 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4401
4402 if (wmi->ops->extract_smartlog_event)
4403 return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev);
4404
4405 return QDF_STATUS_E_FAILURE;
4406}
4407#endif /* OL_ATH_SMART_LOGGING */
Rajeev Kumar Sirasanagandlad2d1a5e2018-03-02 21:12:16 +05304408
4409QDF_STATUS
4410wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl,
4411 struct wmi_roam_scan_stats_req *params)
4412{
4413 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4414
4415 if (wmi_handle->ops->send_roam_scan_stats_cmd)
4416 return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle,
4417 params);
4418
4419 return QDF_STATUS_E_FAILURE;
4420}
4421
4422QDF_STATUS
4423wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
4424 uint32_t *vdev_id,
4425 struct wmi_roam_scan_stats_res **res_param)
4426{
4427 if (wmi->ops->extract_roam_scan_stats_res_evt)
4428 return wmi->ops->extract_roam_scan_stats_res_evt(wmi,
4429 evt_buf,
4430 vdev_id, res_param);
4431
4432 return QDF_STATUS_E_FAILURE;
4433}
Pratik Gandhi3fd97d62018-09-17 16:47:12 +05304434
Gyanranjan Hazarikaff074e92018-10-04 11:26:20 -07004435QDF_STATUS
4436wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf,
4437 uint32_t *vdev_id,
4438 uint32_t *tx_status) {
4439 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4440
4441 if (wmi->ops->extract_offload_bcn_tx_status_evt)
4442 return wmi->ops->extract_offload_bcn_tx_status_evt(wmi,
4443 evt_buf,
4444 vdev_id, tx_status);
4445
4446 return QDF_STATUS_E_FAILURE;
4447}
4448
Pratik Gandhi3fd97d62018-09-17 16:47:12 +05304449#ifdef OBSS_PD
4450QDF_STATUS
4451wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_hdl,
4452 struct wmi_host_obss_spatial_reuse_set_param
4453 *obss_spatial_reuse_param)
4454{
4455 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4456
4457 if (wmi->ops->send_obss_spatial_reuse_set)
4458 return wmi->ops->send_obss_spatial_reuse_set(wmi,
4459 obss_spatial_reuse_param);
4460
4461 return QDF_STATUS_E_FAILURE;
4462}
Arif Hussain4d4c8942018-10-17 18:48:29 -07004463
4464QDF_STATUS
4465wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl,
4466 struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh)
4467{
4468 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
4469
4470 if (wmi->ops->send_obss_spatial_reuse_set_def_thresh)
4471 return wmi->ops->send_obss_spatial_reuse_set_def_thresh(wmi,
4472 thresh);
4473
4474 return QDF_STATUS_E_FAILURE;
4475}
Pratik Gandhi3fd97d62018-09-17 16:47:12 +05304476#endif
Shashikala Prabhub91325c2018-09-24 13:54:23 +05304477
4478QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl,
4479 uint32_t host_pdev_id,
4480 uint32_t *target_pdev_id)
4481{
4482 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4483
4484 if (wmi_handle->ops->convert_pdev_id_host_to_target) {
4485 *target_pdev_id =
4486 wmi_handle->ops->convert_pdev_id_host_to_target(
4487 host_pdev_id);
4488 return QDF_STATUS_SUCCESS;
4489 }
4490
4491 return QDF_STATUS_E_FAILURE;
4492}
Qiwei Cai3d26b2e2018-09-17 19:17:13 +08004493
4494QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
4495 uint32_t vdev_id,
4496 bool enable)
4497{
4498 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4499
4500 if (wmi_handle->ops->send_bss_color_change_enable_cmd)
4501 return wmi_handle->ops->send_bss_color_change_enable_cmd(
4502 wmi_handle, vdev_id, enable);
4503
4504 return QDF_STATUS_E_FAILURE;
4505}
4506
4507QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
4508 struct wmi_obss_color_collision_cfg_param *cfg)
4509{
4510 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4511
4512 if (wmi_handle->ops->send_obss_color_collision_cfg_cmd)
4513 return wmi_handle->ops->send_obss_color_collision_cfg_cmd(
4514 wmi_handle, cfg);
4515
4516 return QDF_STATUS_E_FAILURE;
4517}
4518
4519QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
4520 uint8_t *data, struct wmi_obss_color_collision_info *info)
4521{
4522 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4523
4524 if (wmi_handle->ops->extract_obss_color_collision_info)
4525 return wmi_handle->ops->extract_obss_color_collision_info(data,
4526 info);
4527
4528 return QDF_STATUS_E_FAILURE;
4529}