blob: 362b1eecd06127c02d53db32a8bf4ab569543745 [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
Sathish Kumarefb25bf2018-10-02 11:03:59 +053055
Govind Singh5eb51532016-03-09 11:34:12 +053056/**
57 * wmi_unified_vdev_create_send() - send VDEV create command to fw
58 * @wmi_handle: wmi handle
59 * @param: pointer to hold vdev create parameter
60 * @macaddr: vdev mac address
61 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053062 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053063 */
Govind Singhb53420c2016-03-09 14:32:57 +053064QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053065 uint8_t macaddr[IEEE80211_ADDR_LEN],
66 struct vdev_create_params *param)
67{
68 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
69
70 if (wmi_handle->ops->send_vdev_create_cmd)
71 return wmi_handle->ops->send_vdev_create_cmd(wmi_handle,
72 macaddr, param);
73
Govind Singhb53420c2016-03-09 14:32:57 +053074 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053075}
76
77/**
78 * wmi_unified_vdev_delete_send() - send VDEV delete command to fw
79 * @wmi_handle: wmi handle
80 * @if_id: vdev id
81 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +053082 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +053083 */
Govind Singhb53420c2016-03-09 14:32:57 +053084QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +053085 uint8_t if_id)
86{
87 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
88
89 if (wmi_handle->ops->send_vdev_delete_cmd)
90 return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle,
91 if_id);
92
Govind Singhb53420c2016-03-09 14:32:57 +053093 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +053094}
95
96/**
97 * wmi_unified_vdev_stop_send() - send vdev stop command to fw
98 * @wmi: wmi handle
99 * @vdev_id: vdev id
100 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530101 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530102 */
Govind Singhb53420c2016-03-09 14:32:57 +0530103QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530104 uint8_t vdev_id)
105{
106 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
107
108 if (wmi_handle->ops->send_vdev_stop_cmd)
109 return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle,
110 vdev_id);
111
Govind Singhb53420c2016-03-09 14:32:57 +0530112 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530113}
114
115/**
116 * wmi_unified_vdev_down_send() - send vdev down command to fw
117 * @wmi: wmi handle
118 * @vdev_id: vdev id
119 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530120 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530121 */
Govind Singhb53420c2016-03-09 14:32:57 +0530122QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530123{
124 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
125
126 if (wmi_handle->ops->send_vdev_down_cmd)
127 return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id);
128
Govind Singhb53420c2016-03-09 14:32:57 +0530129 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530130}
131
132/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530133 * wmi_unified_vdev_start_send() - send vdev start command to fw
134 * @wmi: wmi handle
135 * @vdev_id: vdev id
136 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530137 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530138 */
139QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl,
140 struct vdev_start_params *req)
141{
142 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
143
144 if (wmi_handle->ops->send_vdev_start_cmd)
145 return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req);
146
147 return QDF_STATUS_E_FAILURE;
148}
149
150/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +0530151 * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw
152 * @wmi: wmi handle
153 * @req: pointer to hold nac rssi request data
154 *
155 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
156 */
157QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl,
158 struct vdev_scan_nac_rssi_params *req)
159{
160 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
161
162 if (wmi_handle->ops->send_vdev_set_nac_rssi_cmd)
163 return wmi_handle->ops->send_vdev_set_nac_rssi_cmd(wmi_handle, req);
164
165 return QDF_STATUS_E_FAILURE;
166}
167
168/**
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530169 * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid
170 * @wmi: wmi handle
171 * @restart_params: vdev restart params
172 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530173 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal0007b762016-03-09 16:49:38 +0530174 */
175QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
176 struct hidden_ssid_vdev_restart_params *restart_params)
177{
178 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
179
180 if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd)
181 return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd(
182 wmi_handle, restart_params);
183
184 return QDF_STATUS_E_FAILURE;
185}
186
187/**
Govind Singh5eb51532016-03-09 11:34:12 +0530188 * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw
189 * @wmi: wmi handle
190 * @peer_addr: peer mac address
191 * @param: pointer to hold peer flush tid parameter
192 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530193 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530194 */
Govind Singhb53420c2016-03-09 14:32:57 +0530195QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530196 uint8_t peer_addr[IEEE80211_ADDR_LEN],
197 struct peer_flush_params *param)
198{
199 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
200
201 if (wmi_handle->ops->send_peer_flush_tids_cmd)
202 return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle,
203 peer_addr, param);
204
Govind Singhb53420c2016-03-09 14:32:57 +0530205 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530206}
207
208/**
209 * wmi_unified_peer_delete_send() - send PEER delete command to fw
210 * @wmi: wmi handle
211 * @peer_addr: peer mac addr
212 * @vdev_id: vdev id
213 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530214 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530215 */
Govind Singhb53420c2016-03-09 14:32:57 +0530216QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530217 uint8_t
218 peer_addr[IEEE80211_ADDR_LEN],
219 uint8_t vdev_id)
220{
221 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
222
223 if (wmi_handle->ops->send_peer_delete_cmd)
224 return wmi_handle->ops->send_peer_delete_cmd(wmi_handle,
225 peer_addr, vdev_id);
226
Govind Singhb53420c2016-03-09 14:32:57 +0530227 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530228}
229
230/**
231 * wmi_set_peer_param() - set peer parameter in fw
232 * @wmi_ctx: wmi handle
233 * @peer_addr: peer mac address
234 * @param : pointer to hold peer set parameter
235 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530236 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530237 */
Govind Singhb53420c2016-03-09 14:32:57 +0530238QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530239 uint8_t peer_addr[IEEE80211_ADDR_LEN],
240 struct peer_set_params *param)
241{
242 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
243
244 if (wmi_handle->ops->send_peer_param_cmd)
245 return wmi_handle->ops->send_peer_param_cmd(wmi_handle,
246 peer_addr, param);
247
Govind Singhb53420c2016-03-09 14:32:57 +0530248 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530249}
250
251/**
252 * wmi_unified_vdev_up_send() - send vdev up command in fw
253 * @wmi: wmi handle
254 * @bssid: bssid
255 * @vdev_up_params: pointer to hold vdev up parameter
256 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530257 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530258 */
Govind Singhb53420c2016-03-09 14:32:57 +0530259QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530260 uint8_t bssid[IEEE80211_ADDR_LEN],
261 struct vdev_up_params *params)
262{
263 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
264
265 if (wmi_handle->ops->send_vdev_up_cmd)
266 return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid,
267 params);
268
Govind Singhb53420c2016-03-09 14:32:57 +0530269 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530270}
271
272/**
273 * wmi_unified_peer_create_send() - send peer create command to fw
274 * @wmi: wmi handle
275 * @peer_addr: peer mac address
276 * @peer_type: peer type
277 * @vdev_id: vdev id
278 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530279 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530280 */
Govind Singhb53420c2016-03-09 14:32:57 +0530281QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530282 struct peer_create_params *param)
283{
284 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
285
286 if (wmi_handle->ops->send_peer_create_cmd)
287 return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param);
288
Govind Singhb53420c2016-03-09 14:32:57 +0530289 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530290}
291
Leo Changeee40872016-09-28 13:43:36 -0700292/**
293 * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue
294 * setup command to fw
295 * @wmi: wmi handle
296 * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters
297 *
298 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
299 */
300QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl,
301 struct rx_reorder_queue_setup_params *param)
302{
303 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
304
305 if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd)
306 return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd(
307 wmi_handle, param);
308
309 return QDF_STATUS_E_FAILURE;
310}
311
312/**
313 * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue
314 * remove command to fw
315 * @wmi: wmi handle
316 * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters
317 *
318 * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure
319 */
320QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl,
321 struct rx_reorder_queue_remove_params *param)
322{
323 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
324
325 if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd)
326 return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd(
327 wmi_handle, param);
328
329 return QDF_STATUS_E_FAILURE;
330}
331
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530332#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh5eb51532016-03-09 11:34:12 +0530333/**
334 * wmi_unified_green_ap_ps_send() - enable green ap powersave command
335 * @wmi_handle: wmi handle
336 * @value: value
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530337 * @pdev_id: pdev id to have radio context
Govind Singh5eb51532016-03-09 11:34:12 +0530338 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530339 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530340 */
Govind Singhb53420c2016-03-09 14:32:57 +0530341QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530342 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530343{
344 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
345
346 if (wmi_handle->ops->send_green_ap_ps_cmd)
347 return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530348 pdev_id);
Govind Singh5eb51532016-03-09 11:34:12 +0530349
Govind Singhb53420c2016-03-09 14:32:57 +0530350 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530351}
352#else
Govind Singhb53420c2016-03-09 14:32:57 +0530353QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530354 uint32_t value, uint8_t pdev_id)
Govind Singh5eb51532016-03-09 11:34:12 +0530355{
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530356 return QDF_STATUS_SUCCESS;
Govind Singh5eb51532016-03-09 11:34:12 +0530357}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +0530358#endif /* WLAN_SUPPORT_GREEN_AP */
Govind Singh5eb51532016-03-09 11:34:12 +0530359
360/**
361 * wmi_unified_pdev_utf_cmd() - send utf command to fw
362 * @wmi_handle: wmi handle
363 * @param: pointer to pdev_utf_params
364 * @mac_id: mac id to have radio context
365 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530366 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530367 */
Govind Singhb53420c2016-03-09 14:32:57 +0530368QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530369wmi_unified_pdev_utf_cmd_send(void *wmi_hdl,
370 struct pdev_utf_params *param,
371 uint8_t mac_id)
372{
373 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
374
375 if (wmi_handle->ops->send_pdev_utf_cmd)
376 return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param,
377 mac_id);
378
Govind Singhb53420c2016-03-09 14:32:57 +0530379 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530380}
381
382/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530383 * wmi_unified_pdev_param_send() - set pdev parameters
Govind Singh5eb51532016-03-09 11:34:12 +0530384 * @wmi_handle: wmi handle
385 * @param: pointer to pdev parameter
386 * @mac_id: radio context
387 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530388 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
389 * errno on failure
Govind Singh5eb51532016-03-09 11:34:12 +0530390 */
Govind Singhb53420c2016-03-09 14:32:57 +0530391QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530392wmi_unified_pdev_param_send(void *wmi_hdl,
393 struct pdev_params *param,
394 uint8_t mac_id)
395{
396 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
397
398 if (wmi_handle->ops->send_pdev_param_cmd)
399 return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param,
400 mac_id);
401
Govind Singhb53420c2016-03-09 14:32:57 +0530402 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530403}
404
405/**
406 * wmi_unified_suspend_send() - WMI suspend function
407 * @param wmi_handle : handle to WMI.
408 * @param param : pointer to hold suspend parameter
409 * @mac_id: radio context
410 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530411 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530412 */
Govind Singhb53420c2016-03-09 14:32:57 +0530413QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530414 struct suspend_params *param,
415 uint8_t mac_id)
416{
417 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
418
419 if (wmi_handle->ops->send_suspend_cmd)
420 return wmi_handle->ops->send_suspend_cmd(wmi_handle, param,
421 mac_id);
422
Govind Singhb53420c2016-03-09 14:32:57 +0530423 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530424}
425
426/**
427 * wmi_unified_resume_send - WMI resume function
428 * @param wmi_handle : handle to WMI.
429 * @mac_id: radio context
430 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530431 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530432 */
Govind Singhb53420c2016-03-09 14:32:57 +0530433QDF_STATUS wmi_unified_resume_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530434 uint8_t mac_id)
435{
436 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
437
438 if (wmi_handle->ops->send_resume_cmd)
439 return wmi_handle->ops->send_resume_cmd(wmi_handle,
440 mac_id);
441
Govind Singhb53420c2016-03-09 14:32:57 +0530442 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530443}
444
Will Huang422ac9a2017-11-17 13:19:16 +0800445#ifdef FEATURE_WLAN_D0WOW
446/**
447 * wmi_unified_d0wow_enable_send() - WMI d0 wow enable function
448 * @param wmi_handle: handle to WMI.
449 * @mac_id: radio context
450 *
451 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
452 */
453QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl,
454 uint8_t mac_id)
455{
456 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
457
458 if (wmi_handle->ops->send_d0wow_enable_cmd)
459 return wmi_handle->ops->send_d0wow_enable_cmd(
460 wmi_handle, mac_id);
461
462 return QDF_STATUS_E_FAILURE;
463}
464
465/**
466 * wmi_unified_d0wow_disable_send() - WMI d0 wow disable function
467 * @param wmi_handle: handle to WMI.
468 * @mac_id: radio context
469 *
470 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
471 */
472QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl,
473 uint8_t mac_id)
474{
475 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
476
477 if (wmi_handle->ops->send_d0wow_disable_cmd)
478 return wmi_handle->ops->send_d0wow_disable_cmd(
479 wmi_handle, mac_id);
480
481 return QDF_STATUS_E_FAILURE;
482}
483#endif
484
Govind Singh5eb51532016-03-09 11:34:12 +0530485/**
486 * wmi_unified_wow_enable_send() - WMI wow enable function
487 * @param wmi_handle : handle to WMI.
488 * @param param : pointer to hold wow enable parameter
489 * @mac_id: radio context
490 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530492 */
Govind Singhb53420c2016-03-09 14:32:57 +0530493QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530494 struct wow_cmd_params *param,
495 uint8_t mac_id)
496{
497 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
498
499 if (wmi_handle->ops->send_wow_enable_cmd)
500 return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param,
501 mac_id);
502
Govind Singhb53420c2016-03-09 14:32:57 +0530503 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530504}
505
506/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530507 * wmi_unified_wow_wakeup_send() - WMI wow wakeup function
508 * @param wmi_hdl : handle to WMI.
509 *
510 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
511 */
512QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl)
513{
514 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
515
516 if (wmi_handle->ops->send_wow_wakeup_cmd)
517 return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle);
518
519 return QDF_STATUS_E_FAILURE;
520}
521
522/**
523 * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function
524 * @param wmi_handle : handle to WMI.
525 * @param: pointer to wow wakeup event parameter structure
526 *
527 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
528 */
529QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl,
530 struct wow_add_wakeup_params *param)
531{
532 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
533
534 if (wmi->ops->send_wow_add_wakeup_event_cmd)
535 return wmi->ops->send_wow_add_wakeup_event_cmd(wmi,
536 param);
537
538 return QDF_STATUS_E_FAILURE;
539}
540
541/**
542 * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function
543 * @param wmi_handle : handle to WMI.
544 * @param: pointer to wow wakeup pattern parameter structure
545 *
546 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
547 */
548QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl,
549 struct wow_add_wakeup_pattern_params *param)
550{
551 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
552
553 if (wmi->ops->send_wow_add_wakeup_pattern_cmd)
554 return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param);
555
556 return QDF_STATUS_E_FAILURE;
557}
558
559/**
560 * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function
561 * @param wmi_handle : handle to WMI.
562 * @param: pointer to wow wakeup pattern parameter structure
563 *
564 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
565 */
566QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl,
567 struct wow_remove_wakeup_pattern_params *param)
568{
569 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
570
571 if (wmi->ops->send_wow_remove_wakeup_pattern_cmd)
572 return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param);
573
574 return QDF_STATUS_E_FAILURE;
575}
576
577/**
Govind Singh5eb51532016-03-09 11:34:12 +0530578 * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters
579 * @wma_ctx: wma context
580 * @peer_addr: peer mac address
581 * @param: pointer to ap_ps parameter structure
582 *
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_unified_ap_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530586 uint8_t *peer_addr,
587 struct ap_ps_params *param)
588{
589 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
590
591 if (wmi_handle->ops->send_set_ap_ps_param_cmd)
592 return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle,
593 peer_addr,
594 param);
595
Govind Singhb53420c2016-03-09 14:32:57 +0530596 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530597}
598
599/**
600 * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters
601 * @wma_ctx: wma context
602 * @peer_addr: peer mac address
603 * @param: pointer to sta_ps parameter structure
604 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530605 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530606 */
Govind Singhb53420c2016-03-09 14:32:57 +0530607QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530608 struct sta_ps_params *param)
609{
610 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
611
612 if (wmi_handle->ops->send_set_sta_ps_param_cmd)
613 return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle,
614 param);
615
Govind Singhb53420c2016-03-09 14:32:57 +0530616 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530617}
618
619/**
620 * wmi_crash_inject() - inject fw crash
621 * @wma_handle: wma handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -0700622 * @param: ponirt to crash inject parameter structure
Govind Singh5eb51532016-03-09 11:34:12 +0530623 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530624 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530625 */
Govind Singhb53420c2016-03-09 14:32:57 +0530626QDF_STATUS wmi_crash_inject(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530627 struct crash_inject *param)
628{
629 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
630
631 if (wmi_handle->ops->send_crash_inject_cmd)
632 return wmi_handle->ops->send_crash_inject_cmd(wmi_handle,
633 param);
634
Govind Singhb53420c2016-03-09 14:32:57 +0530635 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530636}
637
Wen Gongca174012018-04-20 16:56:28 +0800638#ifdef FEATURE_FW_LOG_PARSING
Govind Singh5eb51532016-03-09 11:34:12 +0530639/**
640 * wmi_unified_dbglog_cmd_send() - set debug log level
641 * @param wmi_handle : handle to WMI.
642 * @param param : pointer to hold dbglog level parameter
643 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530644 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530645 */
Govind Singhb53420c2016-03-09 14:32:57 +0530646QDF_STATUS
Govind Singh5eb51532016-03-09 11:34:12 +0530647wmi_unified_dbglog_cmd_send(void *wmi_hdl,
648 struct dbglog_params *dbglog_param)
649{
650 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
651
652 if (wmi_handle->ops->send_dbglog_cmd)
653 return wmi_handle->ops->send_dbglog_cmd(wmi_handle,
654 dbglog_param);
655
Govind Singhb53420c2016-03-09 14:32:57 +0530656 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530657}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +0530658qdf_export_symbol(wmi_unified_dbglog_cmd_send);
Wen Gongca174012018-04-20 16:56:28 +0800659#endif
Govind Singh5eb51532016-03-09 11:34:12 +0530660
661/**
662 * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function
663 * @param wmi_handle : handle to WMI.
664 * @param macaddr : MAC address
665 * @param param : pointer to hold vdev set parameter
666 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530667 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530668 */
Govind Singhb53420c2016-03-09 14:32:57 +0530669QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530670 struct vdev_set_params *param)
671{
672 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
673
674 if (wmi_handle->ops->send_vdev_set_param_cmd)
675 return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle,
676 param);
677
Govind Singhb53420c2016-03-09 14:32:57 +0530678 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530679}
680
681/**
682 * wmi_unified_stats_request_send() - WMI request stats function
683 * @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_stats_request_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530690 uint8_t macaddr[IEEE80211_ADDR_LEN],
691 struct stats_request_params *param)
692{
693 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
694
695 if (wmi_handle->ops->send_stats_request_cmd)
696 return wmi_handle->ops->send_stats_request_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}
701
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +0530702#ifdef CONFIG_MCL
Govind Singh5eb51532016-03-09 11:34:12 +0530703/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530704 * wmi_unified_packet_log_enable_send() - WMI request stats function
Govind Singh5eb51532016-03-09 11:34:12 +0530705 * @param wmi_handle : handle to WMI.
706 * @param macaddr : MAC address
707 * @param param : pointer to hold stats request parameter
708 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530709 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530710 */
Govind Singhb53420c2016-03-09 14:32:57 +0530711QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530712 uint8_t macaddr[IEEE80211_ADDR_LEN],
713 struct packet_enable_params *param)
714{
715 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
716
717 if (wmi_handle->ops->send_packet_log_enable_cmd)
718 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
719 macaddr, param);
720
Govind Singhb53420c2016-03-09 14:32:57 +0530721 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530722}
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530723#else
724/**
725 * wmi_unified_packet_log_enable_send() - WMI request stats function
726 * @param wmi_handle : handle to WMI.
727 * @param macaddr : MAC address
728 * @param param : pointer to hold stats request parameter
729 *
730 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
731 */
732QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700733 WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530734{
735 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
736
737 if (wmi_handle->ops->send_packet_log_enable_cmd)
738 return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle,
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700739 PKTLOG_EVENT, mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530740
741 return QDF_STATUS_E_FAILURE;
742}
743
744#endif
745/**
746 * wmi_unified_packet_log_disable__send() - WMI pktlog disable function
747 * @param wmi_handle : handle to WMI.
748 * @param PKTLOG_EVENT : packet log event
749 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
750 */
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700751QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530752{
753 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
754
755 if (wmi_handle->ops->send_packet_log_disable_cmd)
Keyur Parekh7df8ca12017-05-07 08:54:47 -0700756 return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle,
757 mac_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530758
759 return QDF_STATUS_E_FAILURE;
760}
Govind Singh5eb51532016-03-09 11:34:12 +0530761
762/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530763 * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function
764 * @param wmi_handle : handle to WMI.
765 * @param macaddr : MAC address
766 * @param param : pointer to hold beacon send cmd parameter
767 *
768 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
769 */
770QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl,
771 struct beacon_tmpl_params *param)
772{
773 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
774
775 if (wmi_handle->ops->send_beacon_tmpl_send_cmd)
776 return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle,
777 param);
778
779 return QDF_STATUS_E_FAILURE;
780}
781/**
Govind Singh5eb51532016-03-09 11:34:12 +0530782 * wmi_unified_peer_assoc_send() - WMI peer assoc function
783 * @param wmi_handle : handle to WMI.
784 * @param macaddr : MAC address
785 * @param param : pointer to peer assoc parameter
786 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530787 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530788 */
Govind Singhb53420c2016-03-09 14:32:57 +0530789QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530790 struct peer_assoc_params *param)
791{
792 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
793
794 if (wmi_handle->ops->send_peer_assoc_cmd)
795 return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530796 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530797
Govind Singhb53420c2016-03-09 14:32:57 +0530798 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530799}
800
801/**
802 * wmi_unified_scan_start_cmd_send() - WMI scan start function
803 * @param wmi_handle : handle to WMI.
804 * @param macaddr : MAC address
805 * @param param : pointer to hold scan start cmd parameter
806 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530807 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530808 */
Govind Singhb53420c2016-03-09 14:32:57 +0530809QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530810 struct scan_req_params *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530811{
812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
813
814 if (wmi_handle->ops->send_scan_start_cmd)
815 return wmi_handle->ops->send_scan_start_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530816 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530817
Govind Singhb53420c2016-03-09 14:32:57 +0530818 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530819}
820
821/**
822 * wmi_unified_scan_stop_cmd_send() - WMI scan start function
823 * @param wmi_handle : handle to WMI.
824 * @param macaddr : MAC address
825 * @param param : pointer to hold scan start cmd parameter
826 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530827 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530828 */
Govind Singhb53420c2016-03-09 14:32:57 +0530829QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +0530830 struct scan_cancel_param *param)
Govind Singh5eb51532016-03-09 11:34:12 +0530831{
832 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
833
834 if (wmi_handle->ops->send_scan_stop_cmd)
835 return wmi_handle->ops->send_scan_stop_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530836 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530837
Govind Singhb53420c2016-03-09 14:32:57 +0530838 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530839}
840
841/**
842 * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function
843 * @param wmi_handle : handle to WMI.
844 * @param macaddr : MAC address
845 * @param param : pointer to hold scan channel list parameter
846 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530847 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh5eb51532016-03-09 11:34:12 +0530848 */
Govind Singhb53420c2016-03-09 14:32:57 +0530849QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl,
Govind Singh5eb51532016-03-09 11:34:12 +0530850 struct scan_chan_list_params *param)
851{
852 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
853
854 if (wmi_handle->ops->send_scan_chan_list_cmd)
855 return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle,
Govind Singhd3156eb2016-02-26 17:50:39 +0530856 param);
Govind Singh5eb51532016-03-09 11:34:12 +0530857
Govind Singhb53420c2016-03-09 14:32:57 +0530858 return QDF_STATUS_E_FAILURE;
Govind Singh5eb51532016-03-09 11:34:12 +0530859}
Govind Singh427ee5a2016-02-26 18:09:36 +0530860
861/**
862 * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer
863 * @wmi_hdl : handle to WMI.
864 * @param : pointer to hold mgmt cmd parameter
865 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530866 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530867 */
Govind Singhb53420c2016-03-09 14:32:57 +0530868QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530869 struct wmi_mgmt_params *param)
870{
871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
872
873 if (wmi_handle->ops->send_mgmt_cmd)
874 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
875 param);
876
Govind Singhb53420c2016-03-09 14:32:57 +0530877 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530878}
879
880/**
Kiran Venkatappac13fc7b2017-03-19 22:58:09 +0530881 * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer
882 * @wmi_hdl : handle to WMI.
883 * @param : pointer to hold offchan data cmd parameter
884 *
885 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
886 */
887QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl,
888 struct wmi_offchan_data_tx_params *param)
889{
890 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
891
892 if (wmi_handle->ops->send_offchan_data_tx_cmd)
893 return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle,
894 param);
895
896 return QDF_STATUS_E_FAILURE;
897}
898
899/**
Govind Singh427ee5a2016-02-26 18:09:36 +0530900 * wmi_unified_modem_power_state() - set modem power state to fw
901 * @wmi_hdl: wmi handle
902 * @param_value: parameter value
903 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530904 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530905 */
Govind Singhb53420c2016-03-09 14:32:57 +0530906QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530907 uint32_t param_value)
908{
909 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
910
911 if (wmi_handle->ops->send_modem_power_state_cmd)
912 return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle,
913 param_value);
914
Govind Singhb53420c2016-03-09 14:32:57 +0530915 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530916}
917
918/**
919 * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw
920 * @wmi_hdl: wmi handle
921 * @vdev_id: vdev id
922 * @val: value
923 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530924 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530925 */
Govind Singhb53420c2016-03-09 14:32:57 +0530926QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530927 uint32_t vdev_id, uint8_t val)
928{
929 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
930
931 if (wmi_handle->ops->send_set_sta_ps_mode_cmd)
932 return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle,
933 vdev_id, val);
934
Govind Singhb53420c2016-03-09 14:32:57 +0530935 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530936}
937
938/**
939 * wmi_set_mimops() - set MIMO powersave
940 * @wmi_hdl: wmi handle
941 * @vdev_id: vdev id
942 * @value: value
943 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530944 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530945 */
Govind Singhb53420c2016-03-09 14:32:57 +0530946QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value)
Govind Singh427ee5a2016-02-26 18:09:36 +0530947{
948 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
949
950 if (wmi_handle->ops->send_set_mimops_cmd)
951 return wmi_handle->ops->send_set_mimops_cmd(wmi_handle,
952 vdev_id, value);
953
Govind Singhb53420c2016-03-09 14:32:57 +0530954 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530955}
956
957/**
958 * wmi_set_smps_params() - set smps params
959 * @wmi_hdl: wmi handle
960 * @vdev_id: vdev id
961 * @value: value
962 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530963 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +0530964 */
Govind Singhb53420c2016-03-09 14:32:57 +0530965QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id,
Govind Singh427ee5a2016-02-26 18:09:36 +0530966 int value)
967{
968 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
969
970 if (wmi_handle->ops->send_set_smps_params_cmd)
971 return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle,
972 vdev_id, value);
973
Govind Singhb53420c2016-03-09 14:32:57 +0530974 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530975}
976
977
978/**
979 * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw
980 * @wmi_hdl: wmi handle
981 * @opps: p2p opp power save parameters
982 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +0530983 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +0530984 */
Govind Singhb53420c2016-03-09 14:32:57 +0530985QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +0530986 struct p2p_ps_params *oppps)
987{
988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
989
990 if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd)
991 return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle,
992 oppps);
993
Govind Singhb53420c2016-03-09 14:32:57 +0530994 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +0530995}
996
997/**
998 * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw
999 * @wmi_hdl: wmi handle
1000 * @noa: p2p power save parameters
1001 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301002 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh427ee5a2016-02-26 18:09:36 +05301003 */
Govind Singhb53420c2016-03-09 14:32:57 +05301004QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl,
Govind Singh427ee5a2016-02-26 18:09:36 +05301005 struct p2p_ps_params *noa)
1006{
1007 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1008
1009 if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd)
1010 return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle,
1011 noa);
1012
Govind Singhb53420c2016-03-09 14:32:57 +05301013 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301014}
1015
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301016#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Wu Gaocd3a8512017-03-13 20:17:34 +08001017/**
1018 * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw
1019 * @wmi_hdl: wmi handle
1020 * @param: p2p listen offload start parameters
1021 *
1022 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1023 */
1024QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl,
1025 struct p2p_lo_start *param)
1026{
1027 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1028
1029 if (!wmi_handle) {
1030 WMI_LOGE("wmi handle is null");
1031 return QDF_STATUS_E_INVAL;
1032 }
1033
1034 if (wmi_handle->ops->send_p2p_lo_start_cmd)
1035 return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle,
1036 param);
1037
1038 return QDF_STATUS_E_FAILURE;
1039}
1040
1041/**
1042 * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw
1043 * @wmi_hdl: wmi handle
1044 * @vdev_id: vdev id
1045 *
1046 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1047 */
1048QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
1049{
1050 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1051
1052 if (!wmi_handle) {
1053 WMI_LOGE("wmi handle is null");
1054 return QDF_STATUS_E_INVAL;
1055 }
1056
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301057 if (wmi_handle->ops->send_p2p_lo_stop_cmd)
Wu Gaocd3a8512017-03-13 20:17:34 +08001058 return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle,
1059 vdev_id);
1060
1061 return QDF_STATUS_E_FAILURE;
1062}
Rachit Kankane9cd0c752018-07-31 16:26:38 +05301063#endif /* End of FEATURE_P2P_LISTEN_OFFLOAD*/
Wu Gaocd3a8512017-03-13 20:17:34 +08001064
Govind Singh427ee5a2016-02-26 18:09:36 +05301065/**
1066 * wmi_get_temperature() - get pdev temperature req
1067 * @wmi_hdl: wmi handle
1068 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301069 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301070 */
Govind Singhb53420c2016-03-09 14:32:57 +05301071QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl)
Govind Singh427ee5a2016-02-26 18:09:36 +05301072{
1073 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1074
1075 if (wmi_handle->ops->send_get_temperature_cmd)
1076 return wmi_handle->ops->send_get_temperature_cmd(wmi_handle);
1077
Govind Singhb53420c2016-03-09 14:32:57 +05301078 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301079}
1080
1081/**
1082 * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command
1083 * @wmi_hdl: wmi handle
Jeff Johnsonbbd428c2018-05-06 17:02:16 -07001084 * @end_set_sta_ps_mode_cmd: cmd parameter strcture
Govind Singh427ee5a2016-02-26 18:09:36 +05301085 *
1086 * This function sets the trigger
1087 * uapsd params such as service interval, delay interval
1088 * and suspend interval which will be used by the firmware
1089 * to send trigger frames periodically when there is no
1090 * traffic on the transmit side.
1091 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301092 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure.
Govind Singh427ee5a2016-02-26 18:09:36 +05301093 */
Govind Singhb53420c2016-03-09 14:32:57 +05301094QDF_STATUS
Govind Singh427ee5a2016-02-26 18:09:36 +05301095wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl,
1096 struct sta_uapsd_trig_params *param)
1097{
1098 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1099
1100 if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd)
1101 return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle,
1102 param);
1103
Govind Singhb53420c2016-03-09 14:32:57 +05301104 return QDF_STATUS_E_FAILURE;
Govind Singh427ee5a2016-02-26 18:09:36 +05301105}
Govind Singh2edc80f2016-03-01 15:30:53 +05301106
Zhang Qian11c0de32018-01-05 16:50:53 +08001107#ifdef WLAN_FEATURE_DSRC
1108QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301109 struct ocb_timing_advert_param *timing_advert)
1110{
Zhang Qian11c0de32018-01-05 16:50:53 +08001111 if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd)
1112 return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl,
1113 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301114
Govind Singhb53420c2016-03-09 14:32:57 +05301115 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301116}
1117
Zhang Qian11c0de32018-01-05 16:50:53 +08001118QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301119 struct ocb_timing_advert_param *timing_advert)
1120{
Zhang Qian11c0de32018-01-05 16:50:53 +08001121 if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd)
1122 return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl,
1123 timing_advert);
Govind Singh2edc80f2016-03-01 15:30:53 +05301124
Govind Singhb53420c2016-03-09 14:32:57 +05301125 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301126}
1127
Zhang Qian11c0de32018-01-05 16:50:53 +08001128QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl,
1129 struct ocb_utc_param *utc)
Govind Singh2edc80f2016-03-01 15:30:53 +05301130{
Zhang Qian11c0de32018-01-05 16:50:53 +08001131 if (wmi_hdl->ops->send_ocb_set_utc_time_cmd)
1132 return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc);
Govind Singh2edc80f2016-03-01 15:30:53 +05301133
Govind Singhb53420c2016-03-09 14:32:57 +05301134 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301135}
1136
Zhang Qian11c0de32018-01-05 16:50:53 +08001137QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl,
1138 struct ocb_get_tsf_timer_param *req)
Govind Singh2edc80f2016-03-01 15:30:53 +05301139{
Zhang Qian11c0de32018-01-05 16:50:53 +08001140 if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd)
1141 return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl,
1142 req->vdev_id);
Govind Singh2edc80f2016-03-01 15:30:53 +05301143
Govind Singhb53420c2016-03-09 14:32:57 +05301144 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301145}
1146
Zhang Qian11c0de32018-01-05 16:50:53 +08001147QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl,
1148 struct ocb_dcc_get_stats_param *get_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301149{
Zhang Qian11c0de32018-01-05 16:50:53 +08001150 if (wmi_hdl->ops->send_dcc_get_stats_cmd)
1151 return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl,
1152 get_stats_param);
Govind Singh2edc80f2016-03-01 15:30:53 +05301153
Govind Singhb53420c2016-03-09 14:32:57 +05301154 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301155}
1156
Zhang Qian11c0de32018-01-05 16:50:53 +08001157QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl,
1158 struct ocb_dcc_clear_stats_param *clear_stats_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301159{
Zhang Qian11c0de32018-01-05 16:50:53 +08001160 if (wmi_hdl->ops->send_dcc_clear_stats_cmd)
1161 return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl,
1162 clear_stats_param->vdev_id,
1163 clear_stats_param->dcc_stats_bitmap);
Govind Singh2edc80f2016-03-01 15:30:53 +05301164
Govind Singhb53420c2016-03-09 14:32:57 +05301165 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301166}
1167
Zhang Qian11c0de32018-01-05 16:50:53 +08001168QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl,
1169 struct ocb_dcc_update_ndl_param *update_ndl_param)
Govind Singh2edc80f2016-03-01 15:30:53 +05301170{
Zhang Qian11c0de32018-01-05 16:50:53 +08001171 if (wmi_hdl->ops->send_dcc_update_ndl_cmd)
1172 return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl,
Govind Singh2edc80f2016-03-01 15:30:53 +05301173 update_ndl_param);
1174
Govind Singhb53420c2016-03-09 14:32:57 +05301175 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301176}
1177
Zhang Qian11c0de32018-01-05 16:50:53 +08001178QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl,
1179 struct ocb_config *config)
Govind Singh2edc80f2016-03-01 15:30:53 +05301180{
Zhang Qian11c0de32018-01-05 16:50:53 +08001181 if (wmi_hdl->ops->send_ocb_set_config_cmd)
1182 return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl,
1183 config);
Govind Singh2edc80f2016-03-01 15:30:53 +05301184
Govind Singhb53420c2016-03-09 14:32:57 +05301185 return QDF_STATUS_E_FAILURE;
Govind Singh2edc80f2016-03-01 15:30:53 +05301186}
Govind Singh17a9cfa2016-03-01 15:54:59 +05301187
Zhang Qian11c0de32018-01-05 16:50:53 +08001188QDF_STATUS
1189wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl,
1190 void *evt_buf,
1191 uint32_t *status)
1192{
1193 if (wmi_hdl->ops->extract_ocb_chan_config_resp)
1194 return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl,
1195 evt_buf,
1196 status);
1197
1198 return QDF_STATUS_E_FAILURE;
1199}
1200
1201QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl,
1202 void *evt_buf,
1203 struct ocb_get_tsf_timer_response *resp)
1204{
1205 if (wmi_hdl->ops->extract_ocb_tsf_timer)
1206 return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl,
1207 evt_buf,
1208 resp);
1209
1210 return QDF_STATUS_E_FAILURE;
1211}
1212
1213QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl,
1214 void *evt_buf, struct ocb_dcc_update_ndl_response *resp)
1215{
1216 if (wmi_hdl->ops->extract_dcc_update_ndl_resp)
1217 return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl,
1218 evt_buf,
1219 resp);
1220
1221 return QDF_STATUS_E_FAILURE;
1222}
1223
1224QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl,
1225 void *evt_buf,
1226 struct ocb_dcc_get_stats_response **resp)
1227{
1228 if (wmi_hdl->ops->extract_dcc_stats)
1229 return wmi_hdl->ops->extract_dcc_stats(wmi_hdl,
1230 evt_buf,
1231 resp);
1232
1233 return QDF_STATUS_E_FAILURE;
1234}
1235#endif
1236
Govind Singh17a9cfa2016-03-01 15:54:59 +05301237/**
1238 * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler
1239 * @wmi_handle: wmi handle
1240 * @mcc_adaptive_scheduler: enable/disable
1241 *
1242 * This function enable/disable mcc adaptive scheduler in fw.
1243 *
Jeff Johnsoneb83ef02018-05-06 00:09:31 -07001244 * Return: QDF_STATUS_SUCCESS for success or error code
Govind Singh17a9cfa2016-03-01 15:54:59 +05301245 */
Govind Singhb53420c2016-03-09 14:32:57 +05301246QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
Govind Singh4df47142016-04-16 19:24:23 -07001247 void *wmi_hdl, uint32_t mcc_adaptive_scheduler,
1248 uint32_t pdev_id)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301249{
1250 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1251
1252 if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd)
1253 return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle,
Govind Singh4df47142016-04-16 19:24:23 -07001254 mcc_adaptive_scheduler, pdev_id);
Govind Singh17a9cfa2016-03-01 15:54:59 +05301255
Govind Singhb53420c2016-03-09 14:32:57 +05301256 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301257}
1258
1259/**
1260 * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency
1261 * @wmi: wmi handle
1262 * @mcc_channel: mcc channel
1263 * @mcc_channel_time_latency: MCC channel time latency.
1264 *
1265 * Currently used to set time latency for an MCC vdev/adapter using operating
1266 * channel of it and channel number. The info is provided run time using
1267 * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>.
1268 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301269 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301270 */
Govind Singhb53420c2016-03-09 14:32:57 +05301271QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301272 uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency)
1273{
1274 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1275
1276 if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd)
1277 return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle,
1278 mcc_channel_freq,
1279 mcc_channel_time_latency);
1280
Govind Singhb53420c2016-03-09 14:32:57 +05301281 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301282}
1283
1284/**
1285 * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota
1286 * @wmi: wmi handle
1287 * @adapter_1_chan_number: adapter 1 channel number
1288 * @adapter_1_quota: adapter 1 quota
1289 * @adapter_2_chan_number: adapter 2 channel number
1290 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301291 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301292 */
Govind Singhb53420c2016-03-09 14:32:57 +05301293QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301294 uint32_t adapter_1_chan_freq,
1295 uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq)
Govind Singh17a9cfa2016-03-01 15:54:59 +05301296{
1297 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1298
1299 if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd)
1300 return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle,
1301 adapter_1_chan_freq,
1302 adapter_1_quota,
1303 adapter_2_chan_freq);
1304
Govind Singhb53420c2016-03-09 14:32:57 +05301305 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301306}
1307
1308/**
1309 * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw
1310 * @wmi_handle: Pointer to wmi handle
1311 * @thermal_info: Thermal command information
1312 *
1313 * This function sends the thermal management command
1314 * to the firmware
1315 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301316 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301317 */
Govind Singhb53420c2016-03-09 14:32:57 +05301318QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301319 struct thermal_cmd_params *thermal_info)
1320{
1321 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1322
1323 if (wmi_handle->ops->send_set_thermal_mgmt_cmd)
1324 return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle,
1325 thermal_info);
1326
Govind Singhb53420c2016-03-09 14:32:57 +05301327 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301328}
1329
1330
1331/**
1332 * wmi_unified_lro_config_cmd() - process the LRO config command
1333 * @wmi: Pointer to wmi handle
1334 * @wmi_lro_cmd: Pointer to LRO configuration parameters
1335 *
1336 * This function sends down the LRO configuration parameters to
1337 * the firmware to enable LRO, sets the TCP flags and sets the
1338 * seed values for the toeplitz hash generation
1339 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301340 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh17a9cfa2016-03-01 15:54:59 +05301341 */
Govind Singhb53420c2016-03-09 14:32:57 +05301342QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl,
Govind Singh17a9cfa2016-03-01 15:54:59 +05301343 struct wmi_lro_config_cmd_t *wmi_lro_cmd)
1344{
1345 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1346
1347 if (wmi_handle->ops->send_lro_config_cmd)
1348 return wmi_handle->ops->send_lro_config_cmd(wmi_handle,
1349 wmi_lro_cmd);
1350
Govind Singhb53420c2016-03-09 14:32:57 +05301351 return QDF_STATUS_E_FAILURE;
Govind Singh17a9cfa2016-03-01 15:54:59 +05301352}
Govind Singh4eacd2b2016-03-07 14:24:22 +05301353
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301354#ifdef CONFIG_MCL
Govind Singh4eacd2b2016-03-07 14:24:22 +05301355/**
Poddar, Siddarth98281c42016-04-28 15:49:11 +05301356 * wmi_unified_peer_rate_report_cmd() - process the peer rate report command
1357 * @wmi_hdl: Pointer to wmi handle
1358 * @rate_report_params: Pointer to peer rate report parameters
1359 *
1360 *
1361 * Return: QDF_STATUS_SUCCESS for success otherwise failure
1362 */
1363QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl,
1364 struct wmi_peer_rate_report_params *rate_report_params)
1365{
1366 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1367
1368 if (wmi_handle->ops->send_peer_rate_report_cmd)
1369 return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle,
1370 rate_report_params);
1371
1372 return QDF_STATUS_E_FAILURE;
1373}
1374
1375/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301376 * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL
1377 * @wmi_hdl: wmi handle
1378 * @param: bcn ll cmd parameter
1379 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301380 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301381 */
Govind Singhb53420c2016-03-09 14:32:57 +05301382QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301383 wmi_bcn_send_from_host_cmd_fixed_param *param)
1384{
1385 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1386
1387 if (wmi_handle->ops->send_bcn_buf_ll_cmd)
1388 return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle,
1389 param);
1390
Govind Singhb53420c2016-03-09 14:32:57 +05301391 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301392}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301393#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301394
1395/**
1396 * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters
1397 * @wmi_hdl: wmi handle
1398 * @vdev_id: vdev id
1399 * @max_retries: max retries
1400 * @retry_interval: retry interval
1401 * This function sets sta query related parameters in fw.
1402 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301403 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301404 */
1405
Govind Singhb53420c2016-03-09 14:32:57 +05301406QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301407 uint8_t vdev_id, uint32_t max_retries,
1408 uint32_t retry_interval)
1409{
1410 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1411
1412 if (wmi_handle->ops->send_set_sta_sa_query_param_cmd)
1413 return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle,
1414 vdev_id, max_retries,
1415 retry_interval);
1416
Govind Singhb53420c2016-03-09 14:32:57 +05301417 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301418}
1419
1420/**
1421 * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters
1422 * @wmi_hdl: wmi handle
1423 * @params: sta keep alive parameter
1424 *
1425 * This function sets keep alive related parameters in fw.
1426 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301427 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301428 */
Govind Singhb53420c2016-03-09 14:32:57 +05301429QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301430 struct sta_params *params)
1431{
1432 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1433
1434 if (wmi_handle->ops->send_set_sta_keep_alive_cmd)
1435 return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle,
1436 params);
1437
Govind Singhb53420c2016-03-09 14:32:57 +05301438 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301439}
1440
1441/**
1442 * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params
1443 * @wmi_hdl: wmi handle
1444 * @if_id: vdev id
1445 * @gtx_info: GTX config params
1446 *
1447 * This function set GTX related params in firmware.
1448 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301449 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301450 */
Govind Singhb53420c2016-03-09 14:32:57 +05301451QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301452 struct wmi_gtx_config *gtx_info)
1453{
1454 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1455
1456 if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd)
1457 return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle,
1458 if_id, gtx_info);
1459
Govind Singhb53420c2016-03-09 14:32:57 +05301460 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301461}
1462
1463/**
1464 * wmi_unified_process_update_edca_param() - update EDCA params
1465 * @wmi_hdl: wmi handle
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301466 * @vdev_id: vdev id.
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001467 * @mu_edca_param: mu_edca_param.
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301468 * @wmm_vparams: edca parameters
Govind Singh4eacd2b2016-03-07 14:24:22 +05301469 *
1470 * This function updates EDCA parameters to the target
1471 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301472 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301473 */
Govind Singhb53420c2016-03-09 14:32:57 +05301474QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001475 uint8_t vdev_id, bool mu_edca_param,
Vikram Kandukuri3bb482b2017-06-01 16:47:51 +05301476 struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC])
Govind Singh4eacd2b2016-03-07 14:24:22 +05301477{
1478 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1479
1480 if (wmi_handle->ops->send_process_update_edca_param_cmd)
1481 return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle,
Kiran Kumar Lokerea536eac2018-04-06 16:56:47 -07001482 vdev_id, mu_edca_param, wmm_vparams);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301483
Govind Singhb53420c2016-03-09 14:32:57 +05301484 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301485}
1486
1487/**
1488 * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw
1489 * @wmi_hdl: wmi handle
1490 * @vdev_id: vdev id
1491 * @probe_rsp_info: probe response info
1492 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301493 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301494 */
Govind Singhb53420c2016-03-09 14:32:57 +05301495QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301496 uint8_t vdev_id,
Krunal Soni89426862017-11-14 15:42:48 -08001497 struct wmi_probe_resp_params *probe_rsp_info)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301498{
1499 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1500
1501 if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd)
1502 return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle,
Krunal Soni89426862017-11-14 15:42:48 -08001503 vdev_id, probe_rsp_info);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301504
Govind Singhb53420c2016-03-09 14:32:57 +05301505 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301506}
1507
1508/**
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301509 * wmi_unified_setup_install_key_cmd - send key to install to fw
1510 * @wmi_hdl: wmi handle
1511 * @key_params: key parameters
1512 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301513 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwal712622f2016-03-09 18:49:18 +05301514 */
1515QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl,
1516 struct set_key_params *key_params)
1517{
1518 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1519
1520 if (wmi_handle->ops->send_setup_install_key_cmd)
1521 return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle,
1522 key_params);
1523
1524 return QDF_STATUS_E_FAILURE;
1525}
1526
1527/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301528 * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go
1529 * @wma_handle: wma handle
1530 * @vdev_id: vdev id
1531 * @p2p_ie: p2p IE
1532 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301533 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301534 */
Govind Singhb53420c2016-03-09 14:32:57 +05301535QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl,
Vivekc5823092018-03-22 23:27:21 +05301536 uint32_t vdev_id, uint8_t *p2p_ie)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301537{
1538 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1539
1540 if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd)
1541 return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle,
1542 vdev_id, p2p_ie);
1543
Govind Singhb53420c2016-03-09 14:32:57 +05301544 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301545}
1546
1547/**
1548 * wmi_unified_set_gateway_params_cmd() - set gateway parameters
1549 * @wmi_hdl: wmi handle
1550 * @req: gateway parameter update request structure
1551 *
1552 * This function reads the incoming @req and fill in the destination
1553 * WMI structure and sends down the gateway configs down to the firmware
1554 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301555 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1556 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301557 */
Govind Singhb53420c2016-03-09 14:32:57 +05301558QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301559 struct gateway_update_req_param *req)
1560{
1561 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1562
1563 if (wmi_handle->ops->send_set_gateway_params_cmd)
1564 return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle,
1565 req);
1566
Govind Singhb53420c2016-03-09 14:32:57 +05301567 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301568}
1569
1570/**
1571 * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring
1572 * @wmi_hdl: wmi handle
1573 * @req: rssi monitoring request structure
1574 *
1575 * This function reads the incoming @req and fill in the destination
1576 * WMI structure and send down the rssi monitoring configs down to the firmware
1577 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301578 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
1579 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301580 */
Govind Singhb53420c2016-03-09 14:32:57 +05301581QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301582 struct rssi_monitor_param *req)
1583{
1584 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1585
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301586 if (wmi_handle->ops->send_set_rssi_monitoring_cmd)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301587 return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle,
1588 req);
1589
Govind Singhb53420c2016-03-09 14:32:57 +05301590 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301591}
1592
1593/**
1594 * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI
1595 * @wmi_hdl: wmi handle
1596 * @psetoui: OUI parameters
1597 *
1598 * set scan probe OUI parameters in firmware
1599 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301600 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301601 */
Govind Singhb53420c2016-03-09 14:32:57 +05301602QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301603 struct scan_mac_oui *psetoui)
1604{
1605 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1606
1607 if (wmi_handle->ops->send_scan_probe_setoui_cmd)
1608 return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle,
1609 psetoui);
1610
Govind Singhb53420c2016-03-09 14:32:57 +05301611 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301612}
1613
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301614#ifdef CONFIG_MCL
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301615/**
1616 * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters
1617 * @wmi_hdl: wmi handle
1618 * @scan_cmd_fp: scan related parameters
1619 * @roam_req: roam related parameters
1620 *
1621 * This function reads the incoming @roam_req and fill in the destination
1622 * WMI structure and send down the roam scan configs down to the firmware
1623 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301624 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301625 */
1626QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl,
1627 wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
1628 struct roam_offload_scan_params *roam_req)
1629{
1630 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1631
1632 if (wmi_handle->ops->send_roam_scan_offload_mode_cmd)
1633 return wmi_handle->ops->send_roam_scan_offload_mode_cmd(
1634 wmi_handle, scan_cmd_fp, roam_req);
1635
1636 return QDF_STATUS_E_FAILURE;
1637}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301638#endif
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301639
1640/**
1641 * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi
1642 * parameters
1643 * @wmi_hdl: wmi handle
1644 * @roam_req: roam rssi related parameters
1645 *
1646 * This function reads the incoming @roam_req and fill in the destination
1647 * WMI structure and send down the roam scan rssi configs down to the firmware
1648 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301649 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301650 */
1651QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl,
1652 struct roam_offload_scan_rssi_params
1653 *roam_req)
1654{
1655 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1656
1657 if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd)
1658 return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd(
1659 wmi_handle, roam_req);
1660
1661 return QDF_STATUS_E_FAILURE;
1662}
1663
Varun Reddy Yeturu412601c2017-07-20 09:45:01 -07001664QDF_STATUS wmi_unified_roam_mawc_params_cmd(
1665 void *wmi_hdl, struct wmi_mawc_roam_params *params)
1666{
1667 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1668
1669 if (wmi_handle->ops->send_roam_mawc_params_cmd)
1670 return wmi_handle->ops->send_roam_mawc_params_cmd(
1671 wmi_handle, params);
1672
1673 return QDF_STATUS_E_FAILURE;
1674}
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301675/**
1676 * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist,
1677 * blacklist and preferred list
1678 * @wmi_hdl: wmi handle
1679 * @roam_req: roam scan lists related parameters
1680 *
1681 * This function reads the incoming @roam_req and fill in the destination
1682 * WMI structure and send down the different roam scan lists down to the fw
1683 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301684 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Himanshu Agarwalc5e4d892016-03-09 15:25:44 +05301685 */
1686QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl,
1687 struct roam_scan_filter_params *roam_req)
1688{
1689 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1690
1691 if (wmi_handle->ops->send_roam_scan_filter_cmd)
1692 return wmi_handle->ops->send_roam_scan_filter_cmd(
1693 wmi_handle, roam_req);
1694
1695 return QDF_STATUS_E_FAILURE;
1696}
1697
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301698#ifdef IPA_OFFLOAD
Govind Singh4eacd2b2016-03-07 14:24:22 +05301699/** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter
1700 * @wmi_hdl: wmi handle
1701 * @ipa_offload: ipa offload control parameter
1702 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301703 * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures,
1704 * error number otherwise
Govind Singh4eacd2b2016-03-07 14:24:22 +05301705 */
Govind Singhb53420c2016-03-09 14:32:57 +05301706QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl,
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301707 struct ipa_uc_offload_control_params *ipa_offload)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301708{
1709 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1710
Amar Singhalca7aba32018-09-18 10:14:30 -07001711 if (!wmi_handle)
1712 return QDF_STATUS_E_FAILURE;
1713
Govind Singh4eacd2b2016-03-07 14:24:22 +05301714 if (wmi_handle->ops->send_ipa_offload_control_cmd)
1715 return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle,
1716 ipa_offload);
1717
Govind Singhb53420c2016-03-09 14:32:57 +05301718 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301719}
Sravan Kumar Kairam963cad92018-02-15 23:28:34 +05301720#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301721
Govind Singh4eacd2b2016-03-07 14:24:22 +05301722
1723/**
1724 * wmi_unified_plm_stop_cmd() - plm stop request
1725 * @wmi_hdl: wmi handle
1726 * @plm: plm request parameters
1727 *
1728 * This function request FW to stop PLM.
1729 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301730 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301731 */
Govind Singhb53420c2016-03-09 14:32:57 +05301732QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301733 const struct plm_req_params *plm)
1734{
1735 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1736
1737 if (wmi_handle->ops->send_plm_stop_cmd)
1738 return wmi_handle->ops->send_plm_stop_cmd(wmi_handle,
1739 plm);
1740
Govind Singhb53420c2016-03-09 14:32:57 +05301741 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301742}
1743
1744/**
1745 * wmi_unified_plm_start_cmd() - plm start request
1746 * @wmi_hdl: wmi handle
1747 * @plm: plm request parameters
1748 *
1749 * This function request FW to start PLM.
1750 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301751 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301752 */
Govind Singhb53420c2016-03-09 14:32:57 +05301753QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301754 const struct plm_req_params *plm,
1755 uint32_t *gchannel_list)
1756{
1757 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1758
1759 if (wmi_handle->ops->send_plm_start_cmd)
1760 return wmi_handle->ops->send_plm_start_cmd(wmi_handle,
1761 plm, gchannel_list);
1762
Govind Singhb53420c2016-03-09 14:32:57 +05301763 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301764}
1765
1766/**
1767 * send_pno_stop_cmd() - PNO stop request
1768 * @wmi_hdl: wmi handle
1769 * @vdev_id: vdev id
1770 *
1771 * This function request FW to stop ongoing PNO operation.
1772 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301773 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301774 */
Govind Singhb53420c2016-03-09 14:32:57 +05301775QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301776{
1777 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1778
1779 if (wmi_handle->ops->send_pno_stop_cmd)
1780 return wmi_handle->ops->send_pno_stop_cmd(wmi_handle,
1781 vdev_id);
1782
Govind Singhb53420c2016-03-09 14:32:57 +05301783 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301784}
1785
1786/**
1787 * wmi_unified_pno_start_cmd() - PNO start request
1788 * @wmi_hdl: wmi handle
1789 * @pno: PNO request
Govind Singh4eacd2b2016-03-07 14:24:22 +05301790 *
1791 * This function request FW to start PNO request.
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301792 * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301793 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301794#ifdef FEATURE_WLAN_SCAN_PNO
Govind Singhb53420c2016-03-09 14:32:57 +05301795QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl,
Abhishek Singh5987b632017-03-03 22:09:07 +05301796 struct pno_scan_req_params *pno)
Govind Singh4eacd2b2016-03-07 14:24:22 +05301797{
1798 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1799
1800 if (wmi_handle->ops->send_pno_start_cmd)
1801 return wmi_handle->ops->send_pno_start_cmd(wmi_handle,
Abhishek Singh5987b632017-03-03 22:09:07 +05301802 pno);
Govind Singh4eacd2b2016-03-07 14:24:22 +05301803
Govind Singhb53420c2016-03-09 14:32:57 +05301804 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301805}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301806#endif
Govind Singh4eacd2b2016-03-07 14:24:22 +05301807
Varun Reddy Yeturueac038b2017-07-24 16:11:22 -07001808/**
1809 * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration
1810 * @wmi_hdl: wmi handle
1811 * @params: Configuration parameters
1812 *
1813 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1814 */
1815QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl,
1816 struct nlo_mawc_params *params)
1817{
1818 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1819
1820 if (wmi_handle->ops->send_nlo_mawc_cmd)
1821 return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params);
1822
1823 return QDF_STATUS_E_FAILURE;
1824}
1825
Qiwei Cai1ccba222018-05-21 16:49:39 +08001826#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Govind Singh4eacd2b2016-03-07 14:24:22 +05301827/**
1828 * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats
1829 * @wmi_hdl: wmi handle
1830 * @clear_req: ll stats clear request command params
1831 * @addr: mac address
1832 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301833 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301834 */
Govind Singhb53420c2016-03-09 14:32:57 +05301835QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301836 const struct ll_stats_clear_params *clear_req,
1837 uint8_t addr[IEEE80211_ADDR_LEN])
1838{
1839 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1840
1841 if (wmi_handle->ops->send_process_ll_stats_clear_cmd)
1842 return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle,
1843 clear_req, addr);
1844
Govind Singhb53420c2016-03-09 14:32:57 +05301845 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301846}
1847
1848/**
1849 * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request
1850 * @wmi_hdl:wmi handle
1851 * @get_req:ll stats get request command params
1852 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301853 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301854 */
Govind Singhb53420c2016-03-09 14:32:57 +05301855QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301856 const struct ll_stats_get_params *get_req,
1857 uint8_t addr[IEEE80211_ADDR_LEN])
1858{
1859 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1860
1861 if (wmi_handle->ops->send_process_ll_stats_get_cmd)
1862 return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle,
1863 get_req, addr);
1864
Govind Singhb53420c2016-03-09 14:32:57 +05301865 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301866}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001867#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh4eacd2b2016-03-07 14:24:22 +05301868
1869/**
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301870 * wmi_unified_congestion_request_cmd() - send request to fw to get CCA
1871 * @wmi_hdl: wma handle
1872 * @vdev_id: vdev id
1873 *
1874 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
1875 */
1876QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl,
1877 uint8_t vdev_id)
1878{
1879 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1880
1881 if (wmi_handle->ops->send_congestion_cmd)
1882 return wmi_handle->ops->send_congestion_cmd(wmi_handle,
1883 vdev_id);
1884
1885 return QDF_STATUS_E_FAILURE;
1886}
1887
Qiwei Cai1ccba222018-05-21 16:49:39 +08001888#ifdef WLAN_FEATURE_LINK_LAYER_STATS
Padma, Santhosh Kumarcb1ee462017-03-21 19:09:35 +05301889/**
Govind Singh4eacd2b2016-03-07 14:24:22 +05301890 * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request
1891 * @wmi_handle: wmi handle
1892 * @set_req: ll stats set request command params
1893 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301894 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh4eacd2b2016-03-07 14:24:22 +05301895 */
Govind Singhb53420c2016-03-09 14:32:57 +05301896QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl,
Govind Singh4eacd2b2016-03-07 14:24:22 +05301897 const struct ll_stats_set_params *set_req)
1898{
1899 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1900
1901 if (wmi_handle->ops->send_process_ll_stats_set_cmd)
1902 return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle,
1903 set_req);
1904
Govind Singhb53420c2016-03-09 14:32:57 +05301905 return QDF_STATUS_E_FAILURE;
Govind Singh4eacd2b2016-03-07 14:24:22 +05301906}
Qiwei Cai1ccba222018-05-21 16:49:39 +08001907#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
Govind Singh20c5dac2016-03-07 15:33:31 +05301908
1909/**
1910 * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats
1911 * @wmi_handle: wmi handle
1912 * @rssi_req: get RSSI request
1913 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301914 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301915 */
Govind Singhb53420c2016-03-09 14:32:57 +05301916QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05301917{
1918 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1919
1920 if (wmi_handle->ops->send_snr_request_cmd)
1921 return wmi_handle->ops->send_snr_request_cmd(wmi_handle);
1922
Govind Singhb53420c2016-03-09 14:32:57 +05301923 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301924}
1925
1926/**
1927 * wmi_unified_snr_cmd() - get RSSI from fw
1928 * @wmi_handle: wmi handle
1929 * @vdev_id: vdev id
1930 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301931 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301932 */
Govind Singhb53420c2016-03-09 14:32:57 +05301933QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05301934{
1935 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1936
1937 if (wmi_handle->ops->send_snr_cmd)
1938 return wmi_handle->ops->send_snr_cmd(wmi_handle,
1939 vdev_id);
1940
Govind Singhb53420c2016-03-09 14:32:57 +05301941 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301942}
1943
1944/**
1945 * wmi_unified_link_status_req_cmd() - process link status request from UMAC
1946 * @wmi_handle: wmi handle
1947 * @link_status: get link params
1948 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301949 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301950 */
Govind Singhb53420c2016-03-09 14:32:57 +05301951QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301952 struct link_status_params *link_status)
1953{
1954 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1955
1956 if (wmi_handle->ops->send_link_status_req_cmd)
1957 return wmi_handle->ops->send_link_status_req_cmd(wmi_handle,
1958 link_status);
1959
Govind Singhb53420c2016-03-09 14:32:57 +05301960 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301961}
1962
Govind Singh20c5dac2016-03-07 15:33:31 +05301963/**
1964 * wmi_unified_process_dhcp_ind() - process dhcp indication from SME
1965 * @wmi_handle: wmi handle
1966 * @ta_dhcp_ind: DHCP indication parameter
1967 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301968 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301969 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05301970#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05301971QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301972 wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind)
1973{
1974 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1975
1976 if (wmi_handle->ops->send_process_dhcp_ind_cmd)
1977 return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle,
1978 ta_dhcp_ind);
1979
Govind Singhb53420c2016-03-09 14:32:57 +05301980 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05301981}
1982
1983/**
1984 * wmi_unified_get_link_speed_cmd() -send command to get linkspeed
1985 * @wmi_handle: wmi handle
1986 * @pLinkSpeed: link speed info
1987 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05301988 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05301989 */
Govind Singhb53420c2016-03-09 14:32:57 +05301990QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05301991 wmi_mac_addr peer_macaddr)
1992{
1993 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
1994
1995 if (wmi_handle->ops->send_get_link_speed_cmd)
1996 return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle,
1997 peer_macaddr);
1998
Govind Singhb53420c2016-03-09 14:32:57 +05301999 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302000}
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302001#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302002
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302003#ifdef WLAN_SUPPORT_GREEN_AP
Govind Singh20c5dac2016-03-07 15:33:31 +05302004/**
2005 * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params
2006 * @wmi_handle: wmi handler
2007 * @egap_params: pointer to egap_params
2008 *
2009 * Return: 0 for success, otherwise appropriate error code
2010 */
Govind Singhb53420c2016-03-09 14:32:57 +05302011QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl,
Himanshu Agarwal66d4a162018-01-10 14:21:53 +05302012 struct wlan_green_ap_egap_params *egap_params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302013{
2014 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2015
2016 if (wmi_handle->ops->send_egap_conf_params_cmd)
2017 return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle,
2018 egap_params);
2019
Govind Singhb53420c2016-03-09 14:32:57 +05302020 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302021}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302022#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302023
2024/**
2025 * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW
2026 * @wmi_handl: wmi handle
2027 * @cmd: Profiling command index
2028 * @value1: parameter1 value
2029 * @value2: parameter2 value
2030 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302031 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302032 */
Govind Singhb53420c2016-03-09 14:32:57 +05302033QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302034 uint32_t cmd, uint32_t value1, uint32_t value2)
2035{
2036 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2037
2038 if (wmi_handle->ops->send_fw_profiling_cmd)
2039 return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle,
2040 cmd, value1, value2);
2041
Govind Singhb53420c2016-03-09 14:32:57 +05302042 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302043}
2044
Govind Singh20c5dac2016-03-07 15:33:31 +05302045/**
Naveen Rawata5817e72017-10-26 18:50:19 -07002046 * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware
2047 * will wake up host after specified time is elapsed
2048 * @wmi_handle: wmi handle
2049 * @vdev_id: vdev id
2050 * @cookie: value to identify reason why host set up wake call.
2051 * @time: time in ms
2052 *
2053 * Return: QDF status
2054 */
2055QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
2056 uint32_t cookie, uint32_t time)
2057{
2058 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2059
2060 if (wmi_handle->ops->send_wow_timer_pattern_cmd)
2061 return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle,
2062 vdev_id, cookie, time);
2063
2064 return QDF_STATUS_E_FAILURE;
2065}
2066
2067/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302068 * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter
2069 * @wmi_handle: wmi handle
2070 * @vdev_id: vdev id
2071 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302072 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302073 */
Govind Singhb53420c2016-03-09 14:32:57 +05302074QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302075{
2076 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2077
2078 if (wmi_handle->ops->send_nat_keepalive_en_cmd)
2079 return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle,
2080 vdev_id);
2081
Govind Singhb53420c2016-03-09 14:32:57 +05302082 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302083}
2084
Paul Zhang92ab8d32017-12-08 16:08:00 +08002085QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
2086 struct wlm_latency_level_param *param)
2087{
2088 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2089
2090 if (wmi_handle->ops->send_wlm_latency_level_cmd)
2091 return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle,
2092 param);
2093
2094 return QDF_STATUS_E_FAILURE;
2095}
2096
Govind Singh20c5dac2016-03-07 15:33:31 +05302097/**
2098 * wmi_unified_csa_offload_enable() - send CSA offload enable command
2099 * @wmi_hdl: wmi handle
2100 * @vdev_id: vdev id
2101 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302102 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302103 */
Govind Singhb53420c2016-03-09 14:32:57 +05302104QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id)
Govind Singh20c5dac2016-03-07 15:33:31 +05302105{
2106 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2107
2108 if (wmi_handle->ops->send_csa_offload_enable_cmd)
2109 return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle,
2110 vdev_id);
2111
Govind Singhb53420c2016-03-09 14:32:57 +05302112 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302113}
Naveen Rawat42cd1e62017-05-13 15:56:57 -07002114
2115#ifdef WLAN_FEATURE_CIF_CFR
2116QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl,
2117 wmi_oem_dma_ring_cfg_req_fixed_param *cfg)
2118{
2119 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2120
2121 if (wmi_handle->ops->send_start_oem_data_cmd)
2122 return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg);
2123
2124 return QDF_STATUS_E_FAILURE;
2125}
2126#endif
2127
Govind Singh20c5dac2016-03-07 15:33:31 +05302128/**
2129 * wmi_unified_start_oem_data_cmd() - start OEM data request to target
2130 * @wmi_handle: wmi handle
2131 * @startOemDataReq: start request params
2132 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302133 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302134 */
Govind Singhb53420c2016-03-09 14:32:57 +05302135QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl,
Krishna Kumaar Natarajanb16bb272016-07-21 15:02:44 -07002136 uint32_t data_len,
Govind Singh20c5dac2016-03-07 15:33:31 +05302137 uint8_t *data)
2138{
2139 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2140
2141 if (wmi_handle->ops->send_start_oem_data_cmd)
2142 return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle,
2143 data_len, data);
2144
Govind Singhb53420c2016-03-09 14:32:57 +05302145 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302146}
2147
2148/**
2149 * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter
2150 * @wmi_handle: wmi handle
2151 * @dfs_phyerr_filter_offload: is dfs phyerr filter offload
2152 *
2153 * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or
2154 * WMI_DFS_PHYERR_FILTER_DIS_CMDID command
2155 * to firmware based on phyerr filtering
2156 * offload status.
2157 *
2158 * Return: 1 success, 0 failure
2159 */
Govind Singhb53420c2016-03-09 14:32:57 +05302160QDF_STATUS
Govind Singh20c5dac2016-03-07 15:33:31 +05302161wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl,
2162 bool dfs_phyerr_filter_offload)
2163{
2164 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2165
2166 if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd)
2167 return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle,
2168 dfs_phyerr_filter_offload);
2169
Govind Singhb53420c2016-03-09 14:32:57 +05302170 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302171}
2172
2173#if !defined(REMOVE_PKT_LOG)
2174/**
2175 * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target
2176 * @wmi_handle: wmi handle
2177 * @pktlog_event: pktlog event
2178 * @cmd_id: pktlog cmd id
2179 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302180 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302181 */
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302182#ifdef CONFIG_MCL
Govind Singhb53420c2016-03-09 14:32:57 +05302183QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302184 WMI_PKTLOG_EVENT pktlog_event,
Nirav Shah47ec2482016-07-27 19:06:13 +05302185 uint32_t cmd_id,
2186 uint8_t user_triggered)
Govind Singh20c5dac2016-03-07 15:33:31 +05302187{
2188 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2189
2190 if (wmi_handle->ops->send_pktlog_wmi_send_cmd)
2191 return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle,
Nirav Shah47ec2482016-07-27 19:06:13 +05302192 pktlog_event, cmd_id, user_triggered);
Govind Singh20c5dac2016-03-07 15:33:31 +05302193
Govind Singhb53420c2016-03-09 14:32:57 +05302194 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302195}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302196#endif
Govind Singh20c5dac2016-03-07 15:33:31 +05302197#endif /* REMOVE_PKT_LOG */
2198
2199/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302200 * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target
2201 * @wmi_handle: wmi handle
2202 * @ptrn_id: pattern id
2203 * @vdev_id: vdev id
2204 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302205 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302206 */
Govind Singhb53420c2016-03-09 14:32:57 +05302207QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302208 uint8_t vdev_id)
2209{
2210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2211
2212 if (wmi_handle->ops->send_wow_delete_pattern_cmd)
2213 return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle,
2214 ptrn_id, vdev_id);
2215
Govind Singhb53420c2016-03-09 14:32:57 +05302216 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302217}
2218
2219/**
2220 * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw
2221 * @wmi_handle: wmi handle
2222 *
2223 * Sends host wakeup indication to FW. On receiving this indication,
2224 * FW will come out of WOW.
2225 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302226 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302227 */
Govind Singhb53420c2016-03-09 14:32:57 +05302228QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302229{
2230 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2231
2232 if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd)
2233 return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle);
2234
Govind Singhb53420c2016-03-09 14:32:57 +05302235 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302236}
2237
2238/**
2239 * wmi_unified_del_ts_cmd() - send DELTS request to fw
2240 * @wmi_handle: wmi handle
2241 * @msg: delts params
2242 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302243 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302244 */
Govind Singhb53420c2016-03-09 14:32:57 +05302245QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id,
Govind Singh20c5dac2016-03-07 15:33:31 +05302246 uint8_t ac)
2247{
2248 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2249
2250 if (wmi_handle->ops->send_del_ts_cmd)
2251 return wmi_handle->ops->send_del_ts_cmd(wmi_handle,
2252 vdev_id, ac);
2253
Govind Singhb53420c2016-03-09 14:32:57 +05302254 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302255}
2256
2257/**
2258 * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw
2259 * @wmi_handle: handle to wmi
2260 * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests.
2261 *
Govind Singhb53420c2016-03-09 14:32:57 +05302262 * A function to handle WMI_AGGR_QOS_REQ. This will send out
Govind Singh20c5dac2016-03-07 15:33:31 +05302263 * ADD_TS requestes to firmware in loop for all the ACs with
2264 * active flow.
2265 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302266 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302267 */
Govind Singhb53420c2016-03-09 14:32:57 +05302268QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302269 struct aggr_add_ts_param *aggr_qos_rsp_msg)
2270{
2271 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2272
2273 if (wmi_handle->ops->send_aggr_qos_cmd)
2274 return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle,
2275 aggr_qos_rsp_msg);
2276
Govind Singhb53420c2016-03-09 14:32:57 +05302277 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302278}
2279
2280/**
2281 * wmi_unified_add_ts_cmd() - send ADDTS request to fw
2282 * @wmi_handle: wmi handle
2283 * @msg: ADDTS params
2284 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302285 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302286 */
Govind Singhb53420c2016-03-09 14:32:57 +05302287QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302288 struct add_ts_param *msg)
2289{
2290 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2291
2292 if (wmi_handle->ops->send_add_ts_cmd)
2293 return wmi_handle->ops->send_add_ts_cmd(wmi_handle,
2294 msg);
2295
Govind Singhb53420c2016-03-09 14:32:57 +05302296 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302297}
2298
2299/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302300 * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn
2301 * @wmi_handle: wmi handle
2302 * @pAddPeriodicTxPtrnParams: tx ptrn params
2303 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302304 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302305 */
Govind Singhb53420c2016-03-09 14:32:57 +05302306QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302307 struct periodic_tx_pattern *
2308 pAddPeriodicTxPtrnParams,
2309 uint8_t vdev_id)
2310{
2311 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2312
2313 if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd)
2314 return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle,
2315 pAddPeriodicTxPtrnParams,
2316 vdev_id);
2317
Govind Singhb53420c2016-03-09 14:32:57 +05302318 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302319}
2320
2321/**
2322 * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn
2323 * @wmi_handle: wmi handle
2324 * @vdev_id: vdev id
2325 * @pattern_id: pattern id
2326 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302327 * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302328 */
Govind Singhb53420c2016-03-09 14:32:57 +05302329QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302330 uint8_t vdev_id,
2331 uint8_t pattern_id)
2332{
2333 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2334
2335 if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd)
2336 return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle,
2337 vdev_id,
2338 pattern_id);
2339
Govind Singhb53420c2016-03-09 14:32:57 +05302340 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302341}
2342
2343/**
2344 * wmi_unified_stats_ext_req_cmd() - request ext stats from fw
2345 * @wmi_handle: wmi handle
2346 * @preq: stats ext params
2347 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302348 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302349 */
Govind Singhb53420c2016-03-09 14:32:57 +05302350QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302351 struct stats_ext_params *preq)
2352{
2353 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2354
2355 if (wmi_handle->ops->send_stats_ext_req_cmd)
2356 return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle,
2357 preq);
2358
Govind Singhb53420c2016-03-09 14:32:57 +05302359 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302360}
2361
2362/**
2363 * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw
2364 * @wmi_handle: wmi handle
2365 * @params: ext wow params
2366 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302367 * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302368 */
Govind Singhb53420c2016-03-09 14:32:57 +05302369QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302370 struct ext_wow_params *params)
2371{
2372 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2373
2374 if (wmi_handle->ops->send_enable_ext_wow_cmd)
2375 return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle,
2376 params);
2377
Govind Singhb53420c2016-03-09 14:32:57 +05302378 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302379}
2380
2381/**
2382 * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw
2383 * @wmi_handle: wmi handle
2384 * @appType2Params: app type2 params
2385 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302386 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302387 */
Govind Singhb53420c2016-03-09 14:32:57 +05302388QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302389 struct app_type2_params *appType2Params)
2390{
2391 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2392
2393 if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd)
2394 return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle,
2395 appType2Params);
2396
Govind Singhb53420c2016-03-09 14:32:57 +05302397 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302398
2399}
2400
2401/**
2402 * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware
2403 * @wmi_handle: wmi handle
2404 * @timer_val: auto shutdown timer value
2405 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302406 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302407 */
Govind Singhb53420c2016-03-09 14:32:57 +05302408QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302409 uint32_t timer_val)
2410{
2411 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2412
2413 if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd)
2414 return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle,
2415 timer_val);
2416
Govind Singhb53420c2016-03-09 14:32:57 +05302417 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302418}
2419
2420/**
2421 * wmi_unified_nan_req_cmd() - to send nan request to target
2422 * @wmi_handle: wmi handle
2423 * @nan_req: request data which will be non-null
2424 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302425 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302426 */
Govind Singhb53420c2016-03-09 14:32:57 +05302427QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302428 struct nan_req_params *nan_req)
2429{
2430 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2431
2432 if (wmi_handle->ops->send_nan_req_cmd)
2433 return wmi_handle->ops->send_nan_req_cmd(wmi_handle,
2434 nan_req);
2435
Govind Singhb53420c2016-03-09 14:32:57 +05302436 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302437}
2438
2439/**
2440 * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload
2441 * @wmi_handle: wmi handle
2442 * @pDhcpSrvOffloadInfo: DHCP server offload info
2443 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302444 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302445 */
Govind Singhb53420c2016-03-09 14:32:57 +05302446QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002447 struct dhcp_offload_info_params *params)
Govind Singh20c5dac2016-03-07 15:33:31 +05302448{
2449 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2450
2451 if (wmi_handle->ops->send_process_dhcpserver_offload_cmd)
2452 return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle,
Jeff Johnsona87370f2017-10-04 19:19:20 -07002453 params);
Govind Singh20c5dac2016-03-07 15:33:31 +05302454
Govind Singhb53420c2016-03-09 14:32:57 +05302455 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302456}
2457
2458/**
2459 * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request
2460 * @wmi_handle: wmi handle
2461 * @ch_avoid_update_req: channel avoid update params
2462 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302463 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302464 */
Govind Singhb53420c2016-03-09 14:32:57 +05302465QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl)
Govind Singh20c5dac2016-03-07 15:33:31 +05302466{
2467 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2468
2469 if (wmi_handle->ops->send_process_ch_avoid_update_cmd)
2470 return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle);
2471
Govind Singhb53420c2016-03-09 14:32:57 +05302472 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302473}
2474
2475/**
2476 * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw
2477 * @wmi_handle: wmi handle
2478 * @reg_dmn: reg domain
2479 * @regdmn2G: 2G reg domain
2480 * @regdmn5G: 5G reg domain
2481 * @ctl2G: 2G test limit
2482 * @ctl5G: 5G test limit
2483 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302484 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302485 */
Govind Singhb53420c2016-03-09 14:32:57 +05302486QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302487 uint32_t reg_dmn, uint16_t regdmn2G,
Rajeev Kumar Sirasanagandla4c1fecd2017-06-06 13:27:56 +05302488 uint16_t regdmn5G, uint8_t ctl2G,
2489 uint8_t ctl5G)
Govind Singh20c5dac2016-03-07 15:33:31 +05302490{
2491 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2492
2493 if (wmi_handle->ops->send_regdomain_info_to_fw_cmd)
2494 return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle,
2495 reg_dmn, regdmn2G,
2496 regdmn5G, ctl2G,
2497 ctl5G);
2498
Govind Singhb53420c2016-03-09 14:32:57 +05302499 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302500}
2501
2502
2503/**
2504 * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode
2505 * @wmi_handle: wmi handle
2506 * @chan_switch_params: Pointer to tdls channel switch parameter structure
2507 *
2508 * This function sets tdls off channel mode
2509 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302510 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures;
2511 * Negative errno otherwise
Govind Singh20c5dac2016-03-07 15:33:31 +05302512 */
Govind Singhb53420c2016-03-09 14:32:57 +05302513QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302514 struct tdls_channel_switch_params *chan_switch_params)
2515{
2516 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2517
2518 if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd)
2519 return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle,
2520 chan_switch_params);
2521
Govind Singhb53420c2016-03-09 14:32:57 +05302522 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302523}
2524
2525/**
2526 * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev
2527 * @wmi_handle: wmi handle
2528 * @pwmaTdlsparams: TDLS params
2529 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302530 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302531 */
Govind Singhb53420c2016-03-09 14:32:57 +05302532QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302533 void *tdls_param, uint8_t tdls_state)
2534{
2535 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2536
2537 if (wmi_handle->ops->send_update_fw_tdls_state_cmd)
2538 return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle,
2539 tdls_param, tdls_state);
2540
Govind Singhb53420c2016-03-09 14:32:57 +05302541 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302542}
2543
2544/**
2545 * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state
2546 * @wmi_handle: wmi handle
2547 * @peerStateParams: TDLS peer state params
2548 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302549 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302550 */
Govind Singhb53420c2016-03-09 14:32:57 +05302551QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302552 struct tdls_peer_state_params *peerStateParams,
2553 uint32_t *ch_mhz)
2554{
2555 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2556
2557 if (wmi_handle->ops->send_update_tdls_peer_state_cmd)
2558 return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle,
2559 peerStateParams, ch_mhz);
2560
Govind Singhb53420c2016-03-09 14:32:57 +05302561 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302562}
2563
2564/**
Govind Singh20c5dac2016-03-07 15:33:31 +05302565 * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware
2566 * @wmi_handle: Pointer to WMi handle
2567 * @ie_data: Pointer for ie data
2568 *
2569 * This function sends IE information to firmware
2570 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302571 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh20c5dac2016-03-07 15:33:31 +05302572 *
2573 */
Govind Singhb53420c2016-03-09 14:32:57 +05302574QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
Govind Singh20c5dac2016-03-07 15:33:31 +05302575 struct vdev_ie_info_param *ie_info)
2576{
2577 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2578
2579 if (wmi_handle->ops->send_process_set_ie_info_cmd)
2580 return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle,
2581 ie_info);
2582
Govind Singhb53420c2016-03-09 14:32:57 +05302583 return QDF_STATUS_E_FAILURE;
Govind Singh20c5dac2016-03-07 15:33:31 +05302584}
Govind Singh9ddd5162016-03-07 16:30:32 +05302585
2586/**
2587 * wmi_unified_save_fw_version_cmd() - save fw version
2588 * @wmi_handle: pointer to wmi handle
2589 * @res_cfg: resource config
2590 * @num_mem_chunks: no of mem chunck
2591 * @mem_chunk: pointer to mem chunck structure
2592 *
2593 * This function sends IE information to firmware
2594 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302595 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singh9ddd5162016-03-07 16:30:32 +05302596 *
2597 */
Govind Singhb53420c2016-03-09 14:32:57 +05302598QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl,
Govind Singh9ddd5162016-03-07 16:30:32 +05302599 void *evt_buf)
2600{
2601 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2602
2603 if (wmi_handle->ops->save_fw_version_cmd)
2604 return wmi_handle->ops->save_fw_version_cmd(wmi_handle,
2605 evt_buf);
2606
Govind Singhb53420c2016-03-09 14:32:57 +05302607 return QDF_STATUS_E_FAILURE;
Govind Singh9ddd5162016-03-07 16:30:32 +05302608}
Govind Singha4836fd2016-03-07 16:45:38 +05302609
2610/**
2611 * send_set_base_macaddr_indicate_cmd() - set base mac address in fw
2612 * @wmi_hdl: wmi handle
2613 * @custom_addr: base mac address
2614 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302615 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302616 */
Govind Singhb53420c2016-03-09 14:32:57 +05302617QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302618 uint8_t *custom_addr)
2619{
2620 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2621
2622 if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd)
2623 return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle,
2624 custom_addr);
2625
Govind Singhb53420c2016-03-09 14:32:57 +05302626 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302627}
2628
2629/**
2630 * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events
2631 * @wmi_hdl: wmi handle
2632 * @event: Event received from FW
2633 * @len: Length of the event
2634 *
2635 * Enables the low frequency events and disables the high frequency
2636 * events. Bit 17 indicates if the event if low/high frequency.
2637 * 1 - high frequency, 0 - low frequency
2638 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302639 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures
Govind Singha4836fd2016-03-07 16:45:38 +05302640 */
Govind Singhb53420c2016-03-09 14:32:57 +05302641QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302642 uint8_t *event,
2643 uint32_t len)
2644{
2645 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2646
2647 if (wmi_handle->ops->send_log_supported_evt_cmd)
2648 return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle,
2649 event, len);
2650
Govind Singhb53420c2016-03-09 14:32:57 +05302651 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302652}
2653
gaurank kathpaliacdfb4452018-02-21 18:58:29 +05302654void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl)
2655{
2656 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2657 if (wmi_handle->ops->send_time_stamp_sync_cmd)
2658 wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle);
2659
2660}
Govind Singha4836fd2016-03-07 16:45:38 +05302661/**
2662 * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id
2663 * @wmi_hdl: wmi handle
2664 * @start_log: Start logging related parameters
2665 *
2666 * Send the command to the FW based on which specific logging of diag
2667 * event/log id can be started/stopped
2668 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302669 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302670 */
Govind Singhb53420c2016-03-09 14:32:57 +05302671QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302672 struct wmi_wifi_start_log *start_log)
2673{
2674 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2675
2676 if (wmi_handle->ops->send_enable_specific_fw_logs_cmd)
2677 return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle,
2678 start_log);
2679
Govind Singhb53420c2016-03-09 14:32:57 +05302680 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302681}
2682
2683/**
2684 * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW
2685 * @wmi_hdl: WMI handle
2686 *
2687 * This function is used to send the flush command to the FW,
2688 * that will flush the fw logs that are residue in the FW
2689 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302690 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302691 */
Govind Singhb53420c2016-03-09 14:32:57 +05302692QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl)
Govind Singha4836fd2016-03-07 16:45:38 +05302693{
2694 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2695
2696 if (wmi_handle->ops->send_flush_logs_to_fw_cmd)
2697 return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle);
2698
Govind Singhb53420c2016-03-09 14:32:57 +05302699 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302700}
2701
2702/**
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302703 * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302704 * @wmi_hdl: wmi handle
2705 * @msg: PCL structure containing the PCL and the number of channels
2706 *
2707 * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN
2708 * firmware. The DBS Manager is the consumer of this information in the WLAN
2709 * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs
2710 * to migrate to a new channel without host driver involvement. An example of
2711 * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will
2712 * manage the channel selection without firmware involvement.
2713 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302714 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302715 */
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302716QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl,
2717 struct wmi_pcl_chan_weights *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302718{
2719 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2720
Manishekar Chandrasekaran86508512016-04-21 19:16:32 +05302721 if (wmi_handle->ops->send_pdev_set_pcl_cmd)
2722 return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg);
Govind Singha4836fd2016-03-07 16:45:38 +05302723
Govind Singhb53420c2016-03-09 14:32:57 +05302724 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302725}
2726
2727/**
2728 * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW
2729 * @wmi_hdl: wmi handle
2730 * @msg: Structure containing the following parameters
2731 *
2732 * - hw_mode_index: The HW_Mode field is a enumerated type that is selected
2733 * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID.
2734 *
2735 * Provides notification to the WLAN firmware that host driver is requesting a
2736 * HardWare (HW) Mode change. This command is needed to support iHelium in the
2737 * configurations that include the Dual Band Simultaneous (DBS) feature.
2738 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302739 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302740 */
Govind Singhb53420c2016-03-09 14:32:57 +05302741QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302742 uint32_t hw_mode_index)
2743{
2744 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2745
Manishekar Chandrasekaran17183782016-04-27 12:29:16 +05302746 if (wmi_handle->ops->send_pdev_set_hw_mode_cmd)
2747 return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302748 hw_mode_index);
2749
Govind Singhb53420c2016-03-09 14:32:57 +05302750 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302751}
2752
2753/**
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302754 * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW
Govind Singha4836fd2016-03-07 16:45:38 +05302755 * @wmi_hdl: wmi handle
2756 * @msg: Dual MAC config parameters
2757 *
2758 * Configures WLAN firmware with the dual MAC features
2759 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302760 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures.
Govind Singha4836fd2016-03-07 16:45:38 +05302761 */
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302762QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl,
Srinivas Girigowda5029ae72018-02-15 14:30:05 -08002763 struct policy_mgr_dual_mac_config *msg)
Govind Singha4836fd2016-03-07 16:45:38 +05302764{
2765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2766
Manishekar Chandrasekaran157a4de2016-04-27 12:52:51 +05302767 if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd)
2768 return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle,
Govind Singha4836fd2016-03-07 16:45:38 +05302769 msg);
2770
Govind Singhb53420c2016-03-09 14:32:57 +05302771 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302772}
2773
Govind Singha4836fd2016-03-07 16:45:38 +05302774/**
2775 * wmi_unified_set_led_flashing_cmd() - set led flashing in fw
2776 * @wmi_hdl: wmi handle
2777 * @flashing: flashing request
2778 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302779 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302780 */
Govind Singhb53420c2016-03-09 14:32:57 +05302781QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302782 struct flashing_req_params *flashing)
2783{
2784 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2785
2786 if (wmi_handle->ops->send_set_led_flashing_cmd)
2787 return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle,
2788 flashing);
2789
Govind Singhb53420c2016-03-09 14:32:57 +05302790 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302791}
2792
2793/**
2794 * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw
2795 * @wmi_hdl: wmi handle
2796 * @appType1Params: app type1 params
2797 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302798 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302799 */
Govind Singhb53420c2016-03-09 14:32:57 +05302800QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302801 struct app_type1_params *app_type1_params)
2802{
2803 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2804
2805 if (wmi_handle->ops->send_app_type1_params_in_fw_cmd)
2806 return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle,
2807 app_type1_params);
2808
Govind Singhb53420c2016-03-09 14:32:57 +05302809 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302810}
2811
2812/**
2813 * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request
2814 * @wmi_hdl: wmi handle
2815 * @request: SSID hotlist set request
2816 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302817 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302818 */
Govind Singhb53420c2016-03-09 14:32:57 +05302819QDF_STATUS
Govind Singha4836fd2016-03-07 16:45:38 +05302820wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl,
2821 struct ssid_hotlist_request_params *request)
2822{
2823 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2824
2825 if (wmi_handle->ops->send_set_ssid_hotlist_cmd)
2826 return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle,
2827 request);
2828
Govind Singhb53420c2016-03-09 14:32:57 +05302829 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302830}
2831
Rachit Kankanee797c772018-07-31 12:00:48 +05302832#ifdef WLAN_FEATURE_ROAM_OFFLOAD
Govind Singha4836fd2016-03-07 16:45:38 +05302833/**
2834 * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw.
2835 * @wmi_hdl: wmi handle
2836 * @vdev_id: vdev id
2837 *
2838 * This function sends roam synch complete event to fw.
2839 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302840 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302841 */
Govind Singhb53420c2016-03-09 14:32:57 +05302842QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302843 uint8_t vdev_id)
2844{
2845 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2846
2847 if (wmi_handle->ops->send_process_roam_synch_complete_cmd)
2848 return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle,
2849 vdev_id);
2850
Govind Singhb53420c2016-03-09 14:32:57 +05302851 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302852}
2853
Rachit Kankanee797c772018-07-31 12:00:48 +05302854/* wmi_unified_set_ric_req_cmd() - set ric request element
2855 * @wmi_hdl: wmi handle
2856 * @msg: message
2857 * @is_add_ts: is addts required
2858 *
2859 * This function sets ric request element for 11r roaming.
2860 *
2861 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2862 */
2863QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg,
2864 uint8_t is_add_ts)
2865{
2866 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2867
2868 if (wmi_handle->ops->send_set_ric_req_cmd)
2869 return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg,
2870 is_add_ts);
2871
2872 return QDF_STATUS_E_FAILURE;
2873}
2874#endif
2875
Govind Singha4836fd2016-03-07 16:45:38 +05302876/**
Anurag Chouhan459e0152016-07-22 20:19:54 +05302877 * wmi_unified_fw_test_cmd() - send fw test command to fw.
2878 * @wmi_hdl: wmi handle
2879 * @wmi_fwtest: fw test command
2880 *
2881 * This function sends fw test command to fw.
2882 *
2883 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
2884 */
2885QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
2886 struct set_fwtest_params *wmi_fwtest)
2887{
2888 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2889
2890 if (wmi_handle->ops->send_fw_test_cmd)
2891 return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
2892 wmi_fwtest);
2893
2894 return QDF_STATUS_E_FAILURE;
2895
2896}
2897
2898/**
Govind Singha4836fd2016-03-07 16:45:38 +05302899 * wmi_unified_unit_test_cmd() - send unit test command to fw.
2900 * @wmi_hdl: wmi handle
2901 * @wmi_utest: unit test command
2902 *
2903 * This function send unit test command to fw.
2904 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302905 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302906 */
Govind Singhb53420c2016-03-09 14:32:57 +05302907QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302908 struct wmi_unit_test_cmd *wmi_utest)
2909{
2910 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2911
2912 if (wmi_handle->ops->send_unit_test_cmd)
2913 return wmi_handle->ops->send_unit_test_cmd(wmi_handle,
2914 wmi_utest);
2915
Govind Singhb53420c2016-03-09 14:32:57 +05302916 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302917}
2918
2919/**
2920 * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw.
2921 * @wmi_hdl: wmi handle
2922 * @roaminvoke: roam invoke command
2923 *
2924 * Send roam invoke command to fw for fastreassoc.
2925 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302926 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302927 */
Govind Singhb53420c2016-03-09 14:32:57 +05302928QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302929 struct wmi_roam_invoke_cmd *roaminvoke,
2930 uint32_t ch_hz)
2931{
2932 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2933
2934 if (wmi_handle->ops->send_roam_invoke_cmd)
2935 return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle,
2936 roaminvoke, ch_hz);
2937
Govind Singhb53420c2016-03-09 14:32:57 +05302938 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302939}
2940
2941/**
2942 * wmi_unified_roam_scan_offload_cmd() - set roam offload command
2943 * @wmi_hdl: wmi handle
2944 * @command: command
2945 * @vdev_id: vdev id
2946 *
2947 * This function set roam offload command to fw.
2948 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302949 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302950 */
Govind Singhb53420c2016-03-09 14:32:57 +05302951QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302952 uint32_t command, uint32_t vdev_id)
2953{
2954 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2955
2956 if (wmi_handle->ops->send_roam_scan_offload_cmd)
2957 return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle,
2958 command, vdev_id);
2959
Govind Singhb53420c2016-03-09 14:32:57 +05302960 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302961}
Kiran Venkatappa1d5f5ab2016-08-09 22:52:35 +05302962#ifdef CONFIG_MCL
Govind Singha4836fd2016-03-07 16:45:38 +05302963/**
2964 * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw
2965 * @wmi_hdl: wmi handle
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302966 * @ap_profile: ap profile params
Govind Singha4836fd2016-03-07 16:45:38 +05302967 *
2968 * Send WMI_ROAM_AP_PROFILE to firmware
2969 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302970 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302971 */
Govind Singhb53420c2016-03-09 14:32:57 +05302972QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl,
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302973 struct ap_profile_params *ap_profile)
Govind Singha4836fd2016-03-07 16:45:38 +05302974{
2975 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
2976
2977 if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd)
Himanshu Agarwaleaf7d732017-09-28 11:51:35 +05302978 return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd(
2979 wmi_handle, ap_profile);
Govind Singha4836fd2016-03-07 16:45:38 +05302980
Govind Singhb53420c2016-03-09 14:32:57 +05302981 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05302982}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302983#endif
Govind Singha4836fd2016-03-07 16:45:38 +05302984/**
2985 * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period
2986 * @wmi_handle: wmi handle
2987 * @scan_period: scan period
2988 * @scan_age: scan age
2989 * @vdev_id: vdev id
2990 *
2991 * Send WMI_ROAM_SCAN_PERIOD parameters to fw.
2992 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05302993 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05302994 */
Govind Singhb53420c2016-03-09 14:32:57 +05302995QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05302996 uint32_t scan_period,
2997 uint32_t scan_age,
2998 uint32_t vdev_id)
2999{
3000 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3001
3002 if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd)
3003 return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle,
3004 scan_period, scan_age, vdev_id);
3005
Govind Singhb53420c2016-03-09 14:32:57 +05303006 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303007}
3008
3009/**
3010 * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list
3011 * @wmi_handle: wmi handle
3012 * @chan_count: channel count
3013 * @chan_list: channel list
3014 * @list_type: list type
3015 * @vdev_id: vdev id
3016 *
3017 * Set roam offload channel list.
3018 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303019 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303020 */
Govind Singhb53420c2016-03-09 14:32:57 +05303021QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303022 uint8_t chan_count,
Varun Reddy Yeturu5a552cf2016-07-07 17:42:49 -07003023 uint32_t *chan_list,
Govind Singha4836fd2016-03-07 16:45:38 +05303024 uint8_t list_type, uint32_t vdev_id)
3025{
3026 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3027
3028 if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd)
3029 return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle,
3030 chan_count, chan_list,
3031 list_type, vdev_id);
3032
Govind Singhb53420c2016-03-09 14:32:57 +05303033 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303034}
3035
3036/**
3037 * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th
3038 * @wmi_hdl: wmi handle
3039 * @rssi_change_thresh: RSSI Change threshold
3040 * @bcn_rssi_weight: beacon RSSI weight
3041 * @vdev_id: vdev id
3042 *
3043 * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw.
3044 *
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303045 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
Govind Singha4836fd2016-03-07 16:45:38 +05303046 */
Govind Singhb53420c2016-03-09 14:32:57 +05303047QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl,
Govind Singha4836fd2016-03-07 16:45:38 +05303048 uint32_t vdev_id,
3049 int32_t rssi_change_thresh,
3050 uint32_t bcn_rssi_weight,
3051 uint32_t hirssi_delay_btw_scans)
3052{
3053 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3054
3055 if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd)
3056 return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle,
3057 vdev_id, rssi_change_thresh,
3058 bcn_rssi_weight, hirssi_delay_btw_scans);
3059
Govind Singhb53420c2016-03-09 14:32:57 +05303060 return QDF_STATUS_E_FAILURE;
Govind Singha4836fd2016-03-07 16:45:38 +05303061}
3062
Kapil Gupta54ea36e2017-02-24 15:50:03 +05303063QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl,
3064 struct wmi_per_roam_config_req *req_buf)
3065{
3066 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3067
3068 if (wmi_handle->ops->send_per_roam_config_cmd)
3069 return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle,
3070 req_buf);
3071
3072 return QDF_STATUS_E_FAILURE;
3073}
3074
Govind Singha4836fd2016-03-07 16:45:38 +05303075/**
Anurag Chouhan97f00422017-09-11 14:56:30 +05303076 * wmi_unified_set_arp_stats_req() - set arp stats request
3077 * @wmi_hdl: wmi handle
3078 * @req_buf: pointer to set_arp_stats
3079 *
3080 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3081 */
3082QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
3083 struct set_arp_stats *req_buf)
3084{
3085 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3086
3087 if (wmi_handle->ops->send_set_arp_stats_req_cmd)
3088 return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle,
3089 req_buf);
3090
3091 return QDF_STATUS_E_FAILURE;
3092}
3093
3094/**
3095 * wmi_unified_get_arp_stats_req() - get arp stats request
3096 * @wmi_hdl: wmi handle
3097 * @req_buf: pointer to get_arp_stats
3098 *
3099 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3100 */
3101QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
3102 struct get_arp_stats *req_buf)
3103{
3104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3105
3106 if (wmi_handle->ops->send_get_arp_stats_req_cmd)
3107 return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle,
3108 req_buf);
3109
3110 return QDF_STATUS_E_FAILURE;
3111}
3112
Vignesh Viswanathan81bde492017-09-25 14:36:38 +05303113QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl,
3114 struct wmi_unified_pmk_cache *req_buf)
3115{
3116 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3117
3118 if (wmi_handle->ops->send_set_del_pmkid_cache_cmd)
3119 return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle,
3120 req_buf);
3121
3122 return QDF_STATUS_E_FAILURE;
3123}
3124
3125#if defined(WLAN_FEATURE_FILS_SK)
3126QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl,
3127 struct hlp_params *req_buf)
3128{
3129 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3130
3131 if (wmi_handle->ops->send_roam_scan_hlp_cmd)
3132 return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle,
3133 req_buf);
3134
3135 return QDF_STATUS_E_FAILURE;
3136}
3137#endif
3138
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303139#ifdef FEATURE_WLAN_APF
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303140QDF_STATUS
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303141wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id,
Nachiket Kukadeae35a2c2018-05-22 12:17:15 +05303142 enum wmi_host_active_apf_mode ucast_mode,
3143 enum wmi_host_active_apf_mode
3144 mcast_bcast_mode)
Dustin Brown4423f632017-01-13 15:24:07 -08003145{
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303146 if (wmi->ops->send_set_active_apf_mode_cmd)
3147 return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id,
3148 ucast_mode,
3149 mcast_bcast_mode);
3150 return QDF_STATUS_E_FAILURE;
Dustin Brown4423f632017-01-13 15:24:07 -08003151}
3152
Nachiket Kukadee06beaa2018-05-25 14:52:55 +05303153QDF_STATUS
3154wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi,
3155 uint32_t vdev_id, bool enable)
3156{
3157 if (wmi->ops->send_apf_enable_cmd)
3158 return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable);
3159 return QDF_STATUS_E_FAILURE;
3160}
3161
3162QDF_STATUS
3163wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi,
3164 struct wmi_apf_write_memory_params
3165 *write_params)
3166{
3167 if (wmi->ops->send_apf_write_work_memory_cmd)
3168 return wmi->ops->send_apf_write_work_memory_cmd(wmi,
3169 write_params);
3170
3171 return QDF_STATUS_E_FAILURE;
3172}
3173
3174QDF_STATUS
3175wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi,
3176 struct wmi_apf_read_memory_params
3177 *read_params)
3178{
3179 if (wmi->ops->send_apf_read_work_memory_cmd)
3180 return wmi->ops->send_apf_read_work_memory_cmd(wmi,
3181 read_params);
3182
3183 return QDF_STATUS_E_FAILURE;
3184}
3185
3186QDF_STATUS
3187wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf,
3188 struct wmi_apf_read_memory_resp_event_params
3189 *read_mem_evt)
3190{
3191 if (wmi->ops->extract_apf_read_memory_resp_event)
3192 return wmi->ops->extract_apf_read_memory_resp_event(wmi,
3193 evt_buf,
3194 read_mem_evt);
3195
3196 return QDF_STATUS_E_FAILURE;
3197}
3198#endif /* FEATURE_WLAN_APF */
3199
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303200/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303201 * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function
3202 * @param wmi_handle : handle to WMI.
3203 * @param param : pointer to hold pdev fips param
3204 *
3205 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3206 */
3207QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl,
3208 struct fips_params *param)
3209{
3210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3211
3212 if (wmi_handle->ops->send_pdev_fips_cmd)
3213 return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param);
3214
3215 return QDF_STATUS_E_FAILURE;
3216}
3217
3218/**
3219 * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function
3220 * @param wmi_handle : handle to WMI.
3221 * @param param : pointer to hold wlan profile param
3222 *
3223 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3224 */
3225QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl,
3226 struct wlan_profile_params *param)
3227{
3228 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3229
3230 if (wmi_handle->ops->send_wlan_profile_enable_cmd)
3231 return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle,
3232 param);
3233
3234 return QDF_STATUS_E_FAILURE;
3235}
3236
3237/**
3238 * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function
3239 * @param wmi_handle : handle to WMI.
3240 * @param param : pointer to hold wlan profile param
3241 *
3242 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3243 */
3244QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl,
3245 struct wlan_profile_params *param)
3246{
3247 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3248
3249 if (wmi->ops->send_wlan_profile_trigger_cmd)
3250 return wmi->ops->send_wlan_profile_trigger_cmd(wmi,
3251 param);
3252
3253 return QDF_STATUS_E_FAILURE;
3254}
3255
3256/**
3257 * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function
3258 * @param wmi_handle : handle to WMI.
3259 * @param param : pointer to hold channel param
3260 *
3261 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3262 */
3263QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl,
3264 struct channel_param *param)
3265{
3266 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3267
3268 if (wmi_handle->ops->send_pdev_set_chan_cmd)
3269 return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle,
3270 param);
3271
3272 return QDF_STATUS_E_FAILURE;
3273}
3274
3275/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303276 * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3277 * @param wmi_handle : handle to WMI.
3278 * @param param : pointer to hold ratepwr table param
3279 *
3280 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3281 */
3282QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl,
3283 struct ratepwr_table_params *param)
3284{
3285 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3286
3287 if (wmi_handle->ops->send_set_ratepwr_table_cmd)
3288 return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle,
3289 param);
3290
3291 return QDF_STATUS_E_FAILURE;
3292}
3293
3294/**
3295 * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function
3296 * @param wmi_handle : handle to WMI.
3297 *
3298 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3299 */
3300QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl)
3301{
3302 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3303
3304 if (wmi_handle->ops->send_get_ratepwr_table_cmd)
3305 return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle);
3306
3307 return QDF_STATUS_E_FAILURE;
3308}
3309
3310/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303311 * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr
3312 * chainmsk cmd function
3313 * @param wmi_handle : handle to WMI.
3314 * @param param : pointer to hold ratepwr chainmsk param
3315 *
3316 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3317 */
3318QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl,
3319 struct ratepwr_chainmsk_params *param)
3320{
3321 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3322
3323 if (wmi->ops->send_set_ratepwr_chainmsk_cmd)
3324 return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param);
3325
3326 return QDF_STATUS_E_FAILURE;
3327}
3328
3329/**
3330 * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function
3331 * @param wmi_handle : handle to WMI.
3332 * @param param : pointer to hold macaddr param
3333 *
3334 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3335 */
3336QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl,
3337 struct macaddr_params *param)
3338{
3339 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3340
3341 if (wmi_handle->ops->send_set_macaddr_cmd)
3342 return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param);
3343
3344 return QDF_STATUS_E_FAILURE;
3345}
3346
3347/**
3348 * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function
3349 * @param wmi_handle : handle to WMI.
3350 *
3351 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3352 */
3353QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl)
3354{
3355 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3356
3357 if (wmi_handle->ops->send_pdev_scan_start_cmd)
3358 return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle);
3359
3360 return QDF_STATUS_E_FAILURE;
3361}
3362
3363/**
3364 * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function
3365 * @param wmi_handle : handle to WMI.
3366 *
3367 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3368 */
3369QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl)
3370{
3371 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3372
3373 if (wmi_handle->ops->send_pdev_scan_end_cmd)
3374 return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle);
3375
3376 return QDF_STATUS_E_FAILURE;
3377}
3378
3379/**
3380 * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function
3381 * @param wmi_handle : handle to WMI.
3382 * @param param : pointer to hold acparams param
3383 *
3384 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3385 */
3386QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl,
3387 struct acparams_params *param)
3388{
3389 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3390
3391 if (wmi_handle->ops->send_set_acparams_cmd)
3392 return wmi_handle->ops->send_set_acparams_cmd(wmi_handle,
3393 param);
3394
3395 return QDF_STATUS_E_FAILURE;
3396}
3397
3398/**
3399 * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp
3400 * tid map cmd function
3401 * @param wmi_handle : handle to WMI.
3402 * @param param : pointer to hold dscp param
3403 *
3404 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3405 */
3406QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl,
3407 struct vap_dscp_tid_map_params *param)
3408{
3409 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3410
3411 if (wmi->ops->send_set_vap_dscp_tid_map_cmd)
3412 return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param);
3413
3414 return QDF_STATUS_E_FAILURE;
3415}
3416
3417/**
3418 * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast
3419 * reserve cmd function
3420 * @param wmi_handle : handle to WMI.
3421 * @param param : pointer to hold ast param
3422 *
3423 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3424 */
3425QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl,
3426 struct proxy_ast_reserve_params *param)
3427{
3428 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3429
3430 if (wmi_handle->ops->send_proxy_ast_reserve_cmd)
3431 return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle,
3432 param);
3433
3434 return QDF_STATUS_E_FAILURE;
3435}
3436
3437/**
Jeevan Kukkalli0aeff782017-06-16 18:07:28 +05303438 * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function
3439 * @param wmi_hdl : handle to WMI.
3440 * @param param : pointer to hold bridge mac addr param
3441 *
3442 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3443 */
3444QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl,
3445 struct set_bridge_mac_addr_params *param)
3446{
3447 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3448
3449 if (wmi_handle->ops->send_set_bridge_mac_addr_cmd)
3450 return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle,
3451 param);
3452
3453 return QDF_STATUS_E_FAILURE;
3454}
3455
3456/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303457 * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function
3458 * @param wmi_handle : handle to WMI.
3459 * @param param : pointer to hold phyerr enable param
3460 *
3461 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3462 */
3463QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl)
3464{
3465 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3466
3467 if (wmi_handle->ops->send_phyerr_enable_cmd)
3468 return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle);
3469
3470 return QDF_STATUS_E_FAILURE;
3471}
3472
3473/**
3474 * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function
3475 * @param wmi_handle : handle to WMI.
3476 * @param param : pointer to hold phyerr disable param
3477 *
3478 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3479 */
3480QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl)
3481{
3482 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3483
3484 if (wmi_handle->ops->send_phyerr_disable_cmd)
3485 return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle);
3486
3487 return QDF_STATUS_E_FAILURE;
3488}
3489
3490/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303491 * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function
3492 * @param wmi_handle : handle to WMI.
3493 * @param param : pointer to hold antenna param
3494 *
3495 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3496 */
3497QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl,
3498 struct smart_ant_enable_tx_feedback_params *param)
3499{
3500 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3501
3502 if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd)
3503 return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi,
3504 param);
3505
3506 return QDF_STATUS_E_FAILURE;
3507}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05303508qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303509
3510/**
3511 * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function
3512 * @param wmi_handle : handle to WMI.
3513 * @param param : pointer to hold spectral config param
3514 *
3515 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3516 */
3517QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl,
3518 struct vdev_spectral_configure_params *param)
3519{
3520 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3521
3522 if (wmi->ops->send_vdev_spectral_configure_cmd)
3523 return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param);
3524
3525 return QDF_STATUS_E_FAILURE;
3526}
3527
3528/**
3529 * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function
3530 * @param wmi_handle : handle to WMI.
3531 * @param param : pointer to hold enable spectral param
3532 *
3533 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3534 */
3535QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl,
3536 struct vdev_spectral_enable_params *param)
3537{
3538 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3539
3540 if (wmi->ops->send_vdev_spectral_enable_cmd)
3541 return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param);
3542
3543 return QDF_STATUS_E_FAILURE;
3544}
3545
3546/**
3547 * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function
3548 * @param wmi_handle : handle to WMI.
3549 * @param param : pointer to hold chan info param
3550 *
3551 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3552 */
3553QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl,
3554 struct bss_chan_info_request_params *param)
3555{
3556 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3557
3558 if (wmi->ops->send_bss_chan_info_request_cmd)
3559 return wmi->ops->send_bss_chan_info_request_cmd(wmi, param);
3560
3561 return QDF_STATUS_E_FAILURE;
3562}
3563
3564/**
3565 * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function
3566 * @param wmi_handle : handle to WMI.
3567 * @param param : pointer to hold thermal mitigation param
3568 *
3569 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3570 */
3571QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl,
3572 struct thermal_mitigation_params *param)
3573{
3574 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3575
3576 if (wmi->ops->send_thermal_mitigation_param_cmd)
3577 return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param);
3578
3579 return QDF_STATUS_E_FAILURE;
3580}
3581
3582/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303583 * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function
3584 * @param wmi_handle : handle to WMI.
3585 * @param param : pointer to hold fwtest param
3586 *
3587 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3588 */
3589QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl,
3590 struct set_fwtest_params *param)
3591{
3592 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3593
3594 if (wmi->ops->send_vdev_set_fwtest_param_cmd)
3595 return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param);
3596
3597 return QDF_STATUS_E_FAILURE;
3598}
3599
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303600/**
Sathish Kumar6011c742017-11-08 14:49:58 +05303601 * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr
3602 * size function
3603 * @param wmi_handle : handle to WMI
3604 * @param param : pointer to hold custom aggr size param
3605 *
3606 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
3607 */
3608QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl,
3609 struct set_custom_aggr_size_params *param)
3610{
3611 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3612
3613 if (wmi->ops->send_vdev_set_custom_aggr_size_cmd)
3614 return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param);
3615
3616 return QDF_STATUS_E_FAILURE;
3617}
3618
3619/**
Venkateswara Swamy Bandaru9983ac52017-12-22 17:16:19 +05303620 * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold
3621 * @param wmi_handle : handle to WMI
3622 * @param param : pointer to hold qdepth threshold params
3623 *
3624 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure
3625 */
3626QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl,
3627 struct set_qdepth_thresh_params *param)
3628{
3629 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
3630
3631 if (wmi->ops->send_vdev_set_qdepth_thresh_cmd)
3632 return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param);
3633
3634 return QDF_STATUS_E_FAILURE;
3635}
3636
3637/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303638 * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function
3639 * @param wmi_handle : handle to WMI.
3640 * @param param : pointer to hold regdomain param
3641 *
3642 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3643 */
3644QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl,
3645 struct pdev_set_regdomain_params *param)
3646{
3647 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3648
3649 if (wmi_handle->ops->send_pdev_set_regdomain_cmd)
3650 return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle,
3651 param);
3652
3653 return QDF_STATUS_E_FAILURE;
3654}
3655
3656/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303657 * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function
3658 * @param wmi_handle : handle to WMI.
3659 * @param param : pointer to hold beacon filter param
3660 *
3661 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3662 */
3663QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl,
3664 struct set_beacon_filter_params *param)
3665{
3666 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3667
3668 if (wmi_handle->ops->send_set_beacon_filter_cmd)
3669 return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle,
3670 param);
3671
3672 return QDF_STATUS_E_FAILURE;
3673}
3674
3675/**
3676 * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function
3677 * @param wmi_handle : handle to WMI.
3678 * @param param : pointer to hold beacon filter param
3679 *
3680 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3681 */
3682QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl,
3683 struct remove_beacon_filter_params *param)
3684{
3685 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
3686
3687 if (wmi->ops->send_remove_beacon_filter_cmd)
3688 return wmi->ops->send_remove_beacon_filter_cmd(wmi, param);
3689
3690 return QDF_STATUS_E_FAILURE;
3691}
3692
3693/**
3694 * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function
3695 * @param wmi_handle : handle to WMI.
3696 * @param macaddr : MAC address
3697 * @param param : pointer to hold mgmt parameter
3698 *
3699 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3700 */
3701#if 0
3702QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl,
3703 uint8_t macaddr[IEEE80211_ADDR_LEN],
3704 struct mgmt_params *param)
3705{
3706 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3707
3708 if (wmi_handle->ops->send_mgmt_cmd)
3709 return wmi_handle->ops->send_mgmt_cmd(wmi_handle,
3710 macaddr, param);
3711
3712 return QDF_STATUS_E_FAILURE;
3713}
3714#endif
3715
3716/**
3717 * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function
3718 * @param wmi_handle : handle to WMI.
3719 * @param macaddr : MAC address
3720 * @param param : pointer to hold addba resp parameter
3721 *
3722 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3723 */
3724QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl,
3725 uint8_t macaddr[IEEE80211_ADDR_LEN],
3726 struct addba_clearresponse_params *param)
3727{
3728 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3729
3730 if (wmi_handle->ops->send_addba_clearresponse_cmd)
3731 return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle,
3732 macaddr, param);
3733
3734 return QDF_STATUS_E_FAILURE;
3735}
3736
3737/**
3738 * wmi_unified_addba_send_cmd_send() - WMI addba send function
3739 * @param wmi_handle : handle to WMI.
3740 * @param macaddr : MAC address
3741 * @param param : pointer to hold addba parameter
3742 *
3743 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3744 */
3745QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl,
3746 uint8_t macaddr[IEEE80211_ADDR_LEN],
3747 struct addba_send_params *param)
3748{
3749 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3750
3751 if (wmi_handle->ops->send_addba_send_cmd)
3752 return wmi_handle->ops->send_addba_send_cmd(wmi_handle,
3753 macaddr, param);
3754
3755 return QDF_STATUS_E_FAILURE;
3756}
3757
3758/**
3759 * wmi_unified_delba_send_cmd_send() - WMI delba cmd function
3760 * @param wmi_handle : handle to WMI.
3761 * @param macaddr : MAC address
3762 * @param param : pointer to hold delba parameter
3763 *
3764 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3765 */
3766QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl,
3767 uint8_t macaddr[IEEE80211_ADDR_LEN],
3768 struct delba_send_params *param)
3769{
3770 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3771
3772 if (wmi_handle->ops->send_delba_send_cmd)
3773 return wmi_handle->ops->send_delba_send_cmd(wmi_handle,
3774 macaddr, param);
3775
3776 return QDF_STATUS_E_FAILURE;
3777}
3778
3779/**
3780 * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function
3781 * @param wmi_handle : handle to WMI.
3782 * @param macaddr : MAC address
3783 * @param param : pointer to hold addba set resp parameter
3784 *
3785 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3786 */
3787QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl,
3788 uint8_t macaddr[IEEE80211_ADDR_LEN],
3789 struct addba_setresponse_params *param)
3790{
3791 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3792
3793 if (wmi_handle->ops->send_addba_setresponse_cmd)
3794 return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle,
3795 macaddr, param);
3796
3797 return QDF_STATUS_E_FAILURE;
3798}
3799
3800/**
3801 * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function
3802 * @param wmi_handle : handle to WMI.
3803 * @param macaddr : MAC address
3804 * @param param : pointer to hold singleamsdu parameter
3805 *
3806 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3807 */
3808QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl,
3809 uint8_t macaddr[IEEE80211_ADDR_LEN],
3810 struct singleamsdu_params *param)
3811{
3812 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3813
3814 if (wmi_handle->ops->send_singleamsdu_cmd)
3815 return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle,
3816 macaddr, param);
3817
3818 return QDF_STATUS_E_FAILURE;
3819}
3820
3821/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303822 * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function
3823 * @param wmi_handle : handle to WMI.
3824 * @param param : pointer to hold mu scan param
3825 *
3826 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3827 */
3828QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl,
3829 struct mu_scan_params *param)
3830{
3831 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3832
3833 if (wmi_handle->ops->send_mu_scan_cmd)
3834 return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param);
3835
3836 return QDF_STATUS_E_FAILURE;
3837}
3838
3839/**
3840 * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function
3841 * @param wmi_handle : handle to WMI.
3842 * @param param : pointer to hold mu scan param
3843 *
3844 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3845 */
3846QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl,
3847 struct lteu_config_params *param)
3848{
3849 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3850
3851 if (wmi_handle->ops->send_lteu_config_cmd)
3852 return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param);
3853
3854 return QDF_STATUS_E_FAILURE;
3855}
3856
3857/**
3858 * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function
3859 * @param wmi_handle : handle to WMI.
3860 * @param param : pointer to hold mu scan param
3861 *
3862 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3863 */
3864QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl,
3865 struct set_ps_mode_params *param)
3866{
3867 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3868
3869 if (wmi_handle->ops->send_set_ps_mode_cmd)
3870 return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param);
3871
3872 return QDF_STATUS_E_FAILURE;
3873}
3874
3875/**
3876 * wmi_unified_init_cmd_send() - send initialization cmd to fw
3877 * @wmi_handle: wmi handle
Kiran Venkatappa26117052016-12-23 19:58:54 +05303878 * @param param: pointer to wmi init param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303879 *
3880 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3881 */
3882QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl,
Kiran Venkatappa26117052016-12-23 19:58:54 +05303883 struct wmi_init_cmd_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303884{
3885 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3886
3887 if (wmi_handle->ops->init_cmd_send)
Kiran Venkatappa26117052016-12-23 19:58:54 +05303888 return wmi_handle->ops->init_cmd_send(wmi_handle, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303889
3890 return QDF_STATUS_E_FAILURE;
3891}
3892
3893/**
3894 * wmi_save_service_bitmap() - save service bitmap
3895 * @wmi_handle: wmi handle
3896 * @param evt_buf: pointer to event buffer
3897 *
3898 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3899 */
Rajeev Kumar77901472017-02-12 02:12:17 -08003900QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf,
3901 void *bitmap_buf)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303902{
3903 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
3904
3905 if (wmi_handle->ops->save_service_bitmap) {
Kiran Venkatappa7d739142017-09-01 17:02:34 +05303906 return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf,
Rajeev Kumar77901472017-02-12 02:12:17 -08003907 bitmap_buf);
Kiran Venkatappa7d739142017-09-01 17:02:34 +05303908 }
3909 return QDF_STATUS_E_FAILURE;
3910}
3911
3912/**
3913 * wmi_save_ext_service_bitmap() - save extended service bitmap
3914 * @wmi_handle: wmi handle
3915 * @param evt_buf: pointer to event buffer
3916 *
3917 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3918 */
3919QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf,
3920 void *bitmap_buf)
3921{
3922 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
3923
3924 if (wmi_handle->ops->save_ext_service_bitmap) {
3925 return wmi_handle->ops->save_ext_service_bitmap(wmi_handle,
3926 evt_buf, bitmap_buf);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303927 }
3928 return QDF_STATUS_E_FAILURE;
3929}
3930
3931/**
3932 * wmi_save_fw_version() - Save fw version
3933 * @wmi_handle: wmi handle
3934 * @param evt_buf: pointer to event buffer
3935 *
3936 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3937 */
3938QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf)
3939{
3940 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
3941
3942 if (wmi_handle->ops->save_fw_version) {
3943 wmi_handle->ops->save_fw_version(wmi_handle, evt_buf);
3944 return 0;
3945 }
3946 return QDF_STATUS_E_FAILURE;
3947
3948}
3949
3950/**
3951 * wmi_check_and_update_fw_version() - Ready and fw version check
3952 * @wmi_handle: wmi handle
3953 * @param evt_buf: pointer to event buffer
3954 *
3955 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
3956 */
3957QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf)
3958{
3959 struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl;
3960
3961 if (wmi_handle->ops->check_and_update_fw_version)
3962 return wmi_handle->ops->check_and_update_fw_version(wmi_handle,
3963 evt_buf);
3964
3965 return QDF_STATUS_E_FAILURE;
3966
3967}
3968
3969/**
3970 * wmi_service_enabled() - Check if service enabled
3971 * @param wmi_handle: wmi handle
3972 * @param service_id: service identifier
3973 *
3974 * Return: 1 enabled, 0 disabled
3975 */
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303976bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id)
3977{
3978 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
3979
3980 if ((service_id < wmi_services_max) &&
3981 (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) {
3982 if (wmi_handle->ops->is_service_enabled) {
3983 return wmi_handle->ops->is_service_enabled(wmi_handle,
3984 wmi_handle->services[service_id]);
3985 }
3986 } else {
Sathish Kumar686d08d2018-06-26 11:01:11 +05303987 WMI_LOGI("Service %d not supported", service_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303988 }
Sourav Mohapatraa7b454d2017-12-03 11:44:44 +05303989
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303990 return false;
3991}
Govind Singhe7d9f3e2016-04-15 13:58:27 +05303992
3993/**
3994 * wmi_get_target_cap_from_service_ready() - extract service ready event
3995 * @wmi_handle: wmi handle
3996 * @param evt_buf: pointer to received event buffer
3997 * @param ev: pointer to hold target capability information extracted from even
3998 *
3999 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4000 */
4001QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004002 void *evt_buf, struct wlan_psoc_target_capability_info *ev)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304003{
4004 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4005
4006 if (wmi->ops->get_target_cap_from_service_ready)
4007 return wmi->ops->get_target_cap_from_service_ready(wmi,
4008 evt_buf, ev);
4009
4010 return QDF_STATUS_E_FAILURE;
4011}
4012
4013/**
4014 * wmi_extract_fw_version() - extract fw version
4015 * @wmi_handle: wmi handle
4016 * @param evt_buf: pointer to event buffer
4017 * @param fw_ver: Pointer to hold fw version
4018 *
4019 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4020 */
4021QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
4022 void *evt_buf, struct wmi_host_fw_ver *fw_ver)
4023{
4024 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4025
4026 if (wmi_handle->ops->extract_fw_version)
4027 return wmi_handle->ops->extract_fw_version(wmi_handle,
4028 evt_buf, fw_ver);
4029
4030 return QDF_STATUS_E_FAILURE;
4031}
4032
4033/**
4034 * wmi_extract_fw_abi_version() - extract fw abi version
4035 * @wmi_handle: wmi handle
4036 * @param evt_buf: Pointer to event buffer
4037 * @param fw_ver: Pointer to hold fw abi version
4038 *
4039 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4040 */
4041QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl,
4042 void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver)
4043{
4044 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4045
4046 if (wmi_handle->ops->extract_fw_abi_version)
4047 return wmi_handle->ops->extract_fw_abi_version(wmi_handle,
4048 evt_buf, fw_ver);
4049
4050 return QDF_STATUS_E_FAILURE;
4051}
4052
4053/**
4054 * wmi_extract_hal_reg_cap() - extract HAL registered capabilities
4055 * @wmi_handle: wmi handle
4056 * @param evt_buf: Pointer to event buffer
4057 * @param hal_reg_cap: pointer to hold HAL reg capabilities
4058 *
4059 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4060 */
4061QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08004062 struct wlan_psoc_hal_reg_capability *hal_reg_cap)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304063{
4064 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4065
4066 if (wmi_handle->ops->extract_hal_reg_cap)
4067 return wmi_handle->ops->extract_hal_reg_cap(wmi_handle,
4068 evt_buf, hal_reg_cap);
4069
4070 return QDF_STATUS_E_FAILURE;
4071}
4072
4073/**
4074 * wmi_extract_host_mem_req_from_service_ready() - Extract host memory
4075 * request event
4076 * @wmi_handle: wmi handle
4077 * @param evt_buf: pointer to event buffer
4078 * @param num_entries: pointer to hold number of entries requested
4079 *
4080 * Return: Number of entries requested
4081 */
4082host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl,
4083 void *evt_buf, uint8_t *num_entries)
4084{
4085 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4086
4087 if (wmi_handle->ops->extract_host_mem_req)
4088 return wmi_handle->ops->extract_host_mem_req(wmi_handle,
4089 evt_buf, num_entries);
4090
4091 *num_entries = 0;
4092 return NULL;
4093}
4094
4095/**
4096 * wmi_ready_extract_init_status() - Extract init status from ready event
4097 * @wmi_handle: wmi handle
4098 * @param ev: Pointer to event buffer
4099 *
4100 * Return: ready status
4101 */
4102uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev)
4103{
4104 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4105
4106 if (wmi_handle->ops->ready_extract_init_status)
4107 return wmi_handle->ops->ready_extract_init_status(wmi_handle,
4108 ev);
4109
4110
4111 return 1;
4112
4113}
4114
4115/**
4116 * wmi_ready_extract_mac_addr() - extract mac address from ready event
4117 * @wmi_handle: wmi handle
4118 * @param ev: pointer to event buffer
4119 * @param macaddr: Pointer to hold MAC address
4120 *
4121 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4122 */
4123QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
4124{
4125 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4126
4127 if (wmi_handle->ops->ready_extract_mac_addr)
4128 return wmi_handle->ops->ready_extract_mac_addr(wmi_handle,
4129 ev, macaddr);
4130
4131
4132 return QDF_STATUS_E_FAILURE;
4133}
4134
4135/**
Manoj Ekbotedd273902017-07-09 23:28:56 -07004136 * wmi_ready_extract_mac_addr() - extract MAC address list from ready event
4137 * @wmi_handle: wmi handle
4138 * @param ev: pointer to event buffer
4139 * @param num_mac_addr: Pointer to number of entries
4140 *
4141 * Return: address to start of mac addr list
4142 */
4143wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
4144 uint8_t *num_mac_addr)
4145{
4146 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4147
4148 if (wmi_handle->ops->ready_extract_mac_addr_list)
4149 return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
4150 ev, num_mac_addr);
4151
4152 *num_mac_addr = 0;
4153
4154 return NULL;
4155}
4156
4157/**
Kiran Venkatappa094c24f2017-11-10 20:50:12 +05304158 * wmi_extract_ready_params() - Extract data from ready event apart from
4159 * status, macaddr and version.
4160 * @wmi_handle: Pointer to WMI handle.
4161 * @evt_buf: Pointer to Ready event buffer.
4162 * @ev_param: Pointer to host defined struct to copy the data from event.
4163 *
4164 * Return: QDF_STATUS_SUCCESS on success.
4165 */
4166QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
4167 void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
4168{
4169 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4170
4171 if (wmi_handle->ops->extract_ready_event_params)
4172 return wmi_handle->ops->extract_ready_event_params(wmi_handle,
4173 evt_buf, ev_param);
4174
4175 return QDF_STATUS_E_FAILURE;
4176}
4177
4178/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304179 * wmi_extract_dbglog_data_len() - extract debuglog data length
4180 * @wmi_handle: wmi handle
4181 * @param evt_buf: pointer to event buffer
4182 * @param len: length of buffer
4183 *
4184 * Return: length
4185 */
4186uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf,
Rajeev Kumar029b9ea2017-01-25 12:46:21 -08004187 uint32_t *len)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304188{
4189 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4190
4191 if (wmi_handle->ops->extract_dbglog_data_len)
4192 return wmi_handle->ops->extract_dbglog_data_len(wmi_handle,
4193 evt_buf, len);
4194
4195
4196 return NULL;
4197}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05304198qdf_export_symbol(wmi_extract_dbglog_data_len);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304199
4200/**
4201 * wmi_send_ext_resource_config() - send extended resource configuration
4202 * @wmi_handle: wmi handle
4203 * @param ext_cfg: pointer to extended resource configuration
4204 *
4205 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4206 */
4207QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl,
4208 wmi_host_ext_resource_config *ext_cfg)
4209{
4210 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4211
4212 if (wmi_handle->ops->send_ext_resource_config)
4213 return wmi_handle->ops->send_ext_resource_config(wmi_handle,
4214 ext_cfg);
4215
4216 return QDF_STATUS_E_FAILURE;
4217}
4218
4219/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304220 * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function
4221 * @param wmi_handle : handle to WMI.
4222 * @param param : pointer to hold rtt meas req test param
4223 *
4224 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4225 */
4226QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl,
4227 struct rtt_meas_req_test_params *param)
4228{
4229 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4230
4231 if (wmi_handle->ops->send_rtt_meas_req_test_cmd)
4232 return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle,
4233 param);
4234
4235 return QDF_STATUS_E_FAILURE;
4236}
4237
4238/**
4239 * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function
4240 * @param wmi_handle : handle to WMI.
4241 * @param param : pointer to hold rtt meas req param
4242 *
4243 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4244 */
4245QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl,
4246 struct rtt_meas_req_params *param)
4247{
4248 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4249
4250 if (wmi_handle->ops->send_rtt_meas_req_cmd)
4251 return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle,
4252 param);
4253
4254 return QDF_STATUS_E_FAILURE;
4255}
4256
4257/**
4258 * wmi_unified_lci_set_cmd_send() - WMI lci set function
4259 * @param wmi_handle : handle to WMI.
4260 * @param param : pointer to hold lci param
4261 *
4262 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4263 */
4264QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl,
4265 struct lci_set_params *param)
4266{
4267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4268
4269 if (wmi_handle->ops->send_lci_set_cmd)
4270 return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param);
4271
4272 return QDF_STATUS_E_FAILURE;
4273}
4274
4275/**
4276 * wmi_unified_lcr_set_cmd_send() - WMI lcr set function
4277 * @param wmi_handle : handle to WMI.
4278 * @param param : pointer to hold lcr param
4279 *
4280 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4281 */
4282QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl,
4283 struct lcr_set_params *param)
4284{
4285 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4286
4287 if (wmi_handle->ops->send_lcr_set_cmd)
4288 return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param);
4289
4290 return QDF_STATUS_E_FAILURE;
4291}
4292
4293/**
4294 * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function
4295 * @param wmi_handle : handle to WMI.
4296 * @param param : pointer to hold rtt meas req test param
4297 *
4298 * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4299 */
4300QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl,
4301 struct rtt_keepalive_req_params *param)
4302{
4303 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4304
4305 if (wmi_handle->ops->send_rtt_keepalive_req_cmd)
4306 return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle,
4307 param);
4308
4309 return QDF_STATUS_E_FAILURE;
4310}
4311
4312/**
4313 * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd
4314 * to fw
4315 * @wmi_handle: wmi handle
4316 * @param: pointer to hold periodic chan stats param
4317 *
4318 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4319 */
4320QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl,
4321 struct periodic_chan_stats_params *param)
4322{
4323 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4324
4325 if (wmi->ops->send_periodic_chan_stats_config_cmd)
4326 return wmi->ops->send_periodic_chan_stats_config_cmd(wmi,
4327 param);
4328
4329 return QDF_STATUS_E_FAILURE;
4330}
4331
Jeffin Mammen095050b2018-07-24 14:20:08 +05304332/**
Sathish Kumar68789382016-11-14 17:44:29 +05304333 * wmi_send_get_user_position_cmd() - send get user position command to fw
4334 * @wmi_handle: wmi handle
4335 *
4336 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4337 */
4338QDF_STATUS
4339wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value)
4340{
4341 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4342
4343 if (wmi_handle->ops->send_get_user_position_cmd)
4344 return wmi_handle->ops->send_get_user_position_cmd(wmi_handle,
4345 value);
4346
4347 return QDF_STATUS_E_FAILURE;
4348}
4349
4350/**
4351 * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count
Sathish Kumarefb25bf2018-10-02 11:03:59 +05304352 * command to fw
Sathish Kumar68789382016-11-14 17:44:29 +05304353 * @wmi_handle: wmi handle
4354 * @value: user pos value
4355 *
4356 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4357 */
4358QDF_STATUS
4359wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4360{
4361 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4362
4363 if (wmi->ops->send_get_peer_mumimo_tx_count_cmd)
4364 return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value);
4365
4366 return QDF_STATUS_E_FAILURE;
4367}
4368
4369/**
4370 * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo
Sathish Kumarefb25bf2018-10-02 11:03:59 +05304371 * tx count to fw
Sathish Kumar68789382016-11-14 17:44:29 +05304372 * @wmi_handle: wmi handle
4373 * @value: reset tx count value
4374 *
4375 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4376 */
4377QDF_STATUS
4378wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value)
4379{
4380 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4381
4382 if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd)
4383 return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi,
4384 value);
4385
4386 return QDF_STATUS_E_FAILURE;
4387}
4388
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304389/* Extract - APIs */
4390/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304391 * wmi_extract_fips_event_data() - extract fips event data
4392 * @wmi_handle: wmi handle
4393 * @param evt_buf: pointer to event buffer
Kiran Venkatappac813ec92016-12-29 22:07:14 +05304394 * @param param: pointer to FIPS event param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304395 *
4396 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4397 */
4398QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05304399 struct wmi_host_fips_event_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304400{
4401 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4402
4403 if (wmi_handle->ops->extract_fips_event_data) {
4404 return wmi_handle->ops->extract_fips_event_data(wmi_handle,
Kiran Venkatappac813ec92016-12-29 22:07:14 +05304405 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304406 }
4407 return QDF_STATUS_E_FAILURE;
4408}
4409
4410/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304411 * wmi_extract_mgmt_rx_params() - extract management rx params from event
4412 * @wmi_handle: wmi handle
4413 * @param evt_buf: pointer to event buffer
4414 * @param hdr: Pointer to hold header
4415 * @param bufp: Pointer to hold pointer to rx param buffer
4416 *
4417 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4418 */
4419QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
Himanshu Agarwalb4992a42017-01-05 14:23:18 +05304420 struct mgmt_rx_event_params *hdr, uint8_t **bufp)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304421{
4422 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4423
4424 if (wmi_handle->ops->extract_mgmt_rx_params)
4425 return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle,
4426 evt_buf, hdr, bufp);
4427
4428 return QDF_STATUS_E_FAILURE;
4429}
4430
4431/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304432 * wmi_extract_vdev_roam_param() - extract vdev roam param from event
4433 * @wmi_handle: wmi handle
4434 * @param evt_buf: pointer to event buffer
4435 * @param param: Pointer to hold roam param
4436 *
4437 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4438 */
4439QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf,
4440 wmi_host_roam_event *param)
4441{
4442 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4443
4444 if (wmi_handle->ops->extract_vdev_roam_param)
4445 return wmi_handle->ops->extract_vdev_roam_param(wmi_handle,
4446 evt_buf, param);
4447
4448 return QDF_STATUS_E_FAILURE;
4449}
4450
4451/**
4452 * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event
4453 * @wmi_handle: wmi handle
4454 * @param evt_buf: pointer to event buffer
4455 * @param param: Pointer to hold vdev scan param
4456 *
4457 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4458 */
4459QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathi1d83e352017-02-25 15:53:30 +05304460 struct scan_event *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304461{
4462 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4463
4464 if (wmi_handle->ops->extract_vdev_scan_ev_param)
4465 return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle,
4466 evt_buf, param);
4467
4468 return QDF_STATUS_E_FAILURE;
4469}
4470
Frank Liu3d5e9992017-03-15 17:51:43 +08004471#ifdef CONVERGED_TDLS_ENABLE
4472QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf,
4473 struct tdls_event_info *param)
4474{
4475 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4476
4477 if (wmi_handle->ops->extract_vdev_tdls_ev_param)
4478 return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle,
4479 evt_buf, param);
4480
4481 return QDF_STATUS_E_FAILURE;
4482}
4483#endif
4484
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304485/**
4486 * wmi_extract_mu_ev_param() - extract mu param from event
4487 * @wmi_handle: wmi handle
4488 * @param evt_buf: pointer to event buffer
4489 * @param param: Pointer to hold mu report
4490 *
4491 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4492 */
4493QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf,
4494 wmi_host_mu_report_event *param)
4495{
4496 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4497
4498 if (wmi_handle->ops->extract_mu_ev_param)
4499 return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf,
4500 param);
4501
4502 return QDF_STATUS_E_FAILURE;
4503}
4504
4505/**
Sathish Kumar68789382016-11-14 17:44:29 +05304506 * wmi_extract_mu_db_entry() - extract mu db entry from event
4507 * @wmi_handle: wmi handle
4508 * @param evt_buf: pointer to event buffer
4509 * @param param: Pointer to hold mu db entry
4510 *
4511 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4512 */
4513QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf,
4514 uint8_t idx, wmi_host_mu_db_entry *param)
4515{
4516 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4517
4518 if (wmi_handle->ops->extract_mu_db_entry)
4519 return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf,
4520 idx, param);
4521
4522 return QDF_STATUS_E_FAILURE;
4523}
4524
4525/**
4526 * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event
4527 * @wmi_handle: wmi handle
4528 * @param evt_buf: pointer to event buffer
4529 * @param param: Pointer to hold mumimo tx count
4530 *
4531 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4532 */
4533QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf,
4534 wmi_host_peer_txmu_cnt_event *param)
4535{
4536 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4537
4538 if (wmi->ops->extract_mumimo_tx_count_ev_param)
4539 return wmi->ops->extract_mumimo_tx_count_ev_param(wmi,
4540 evt_buf, param);
4541
4542 return QDF_STATUS_E_FAILURE;
4543}
4544
4545/**
4546 * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list
Sathish Kumarefb25bf2018-10-02 11:03:59 +05304547 * from event
Sathish Kumar68789382016-11-14 17:44:29 +05304548 * @wmi_handle: wmi handle
4549 * @param evt_buf: pointer to event buffer
4550 * @param param: Pointer to hold peer gid userposition list
4551 *
4552 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4553 */
4554QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl,
4555 void *evt_buf,
4556 wmi_host_peer_gid_userpos_list_event *param)
4557{
4558 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4559
4560 if (wmi->ops->extract_peer_gid_userpos_list_ev_param)
4561 return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi,
4562 evt_buf, param);
4563
4564 return QDF_STATUS_E_FAILURE;
4565}
4566
4567/**
Anirban Sirkhell23467ce2017-08-25 16:01:50 +05304568 * wmi_extract_esp_estimate_ev_param() - extract air time from event
4569 * @wmi_handle: wmi handle
4570 * @evt_buf: pointer to event buffer
4571 * @param: Pointer to hold esp event
4572 *
4573 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4574 */
4575QDF_STATUS
4576wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf,
4577 struct esp_estimation_event *param)
4578{
4579 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
4580
4581 if (wmi_handle->ops->extract_esp_estimation_ev_param)
4582 return wmi_handle->ops->extract_esp_estimation_ev_param(
4583 wmi_handle, evt_buf, param);
4584
4585 return QDF_STATUS_E_FAILURE;
4586}
4587
4588/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304589 * wmi_extract_gpio_input_ev_param() - extract gpio input param from event
4590 * @wmi_handle: wmi handle
4591 * @param evt_buf: pointer to event buffer
4592 * @param gpio_num: Pointer to hold gpio number
4593 *
4594 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4595 */
4596QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl,
4597 void *evt_buf, uint32_t *gpio_num)
4598{
4599 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4600
4601 if (wmi_handle->ops->extract_gpio_input_ev_param)
4602 return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle,
4603 evt_buf, gpio_num);
4604
4605 return QDF_STATUS_E_FAILURE;
4606}
4607
4608/**
4609 * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry
4610 * param from event
4611 * @wmi_handle: wmi handle
4612 * @param evt_buf: pointer to event buffer
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05304613 * @param param: Pointer to hold reserve ast entry param
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304614 *
4615 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4616 */
4617QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05304618 void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304619{
4620 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4621
4622 if (wmi->ops->extract_pdev_reserve_ast_ev_param)
4623 return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi,
Kiran Venkatappa5050aa82017-02-08 14:57:16 +05304624 evt_buf, param);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304625
4626 return QDF_STATUS_E_FAILURE;
4627}
4628
4629/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304630 * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer
4631 * from event
4632 * @wmi_handle: wmi handle
4633 * @param evt_buf: pointer to event buffer
4634 * @param param: Pointer to generic buffer param
4635 *
4636 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4637 */
4638QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl,
4639 void *evt_buf, wmi_host_pdev_generic_buffer_event *param)
4640{
4641 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4642
4643 if (wmi->ops->extract_pdev_generic_buffer_ev_param)
4644 return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi,
4645 evt_buf, param);
4646
4647 return QDF_STATUS_E_FAILURE;
4648
4649}
4650
Wu Gaocd3a8512017-03-13 20:17:34 +08004651#ifdef CONVERGED_P2P_ENABLE
Rachit Kankane9cd0c752018-07-31 16:26:38 +05304652#ifdef FEATURE_P2P_LISTEN_OFFLOAD
Wu Gaocd3a8512017-03-13 20:17:34 +08004653/**
4654 * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event
4655 * @wmi_handle: wmi handle
4656 * @evt_buf: pointer to event buffer
4657 * @param: Pointer to hold listen offload stop param
4658 *
4659 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4660 */
4661QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf,
4662 struct p2p_lo_event *param)
4663{
4664 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4665
4666 if (!wmi_handle) {
4667 WMI_LOGE("wmi handle is null");
4668 return QDF_STATUS_E_INVAL;
4669 }
4670
4671 if (wmi_handle->ops->extract_p2p_lo_stop_ev_param)
4672 return wmi_handle->ops->extract_p2p_lo_stop_ev_param(
4673 wmi_handle, evt_buf, param);
4674
4675 return QDF_STATUS_E_FAILURE;
4676}
Rachit Kankane9cd0c752018-07-31 16:26:38 +05304677#endif
Wu Gaocd3a8512017-03-13 20:17:34 +08004678
4679/**
4680 * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event
4681 * @wmi_handle: wmi handle
4682 * @evt_buf: pointer to event buffer
4683 * @param: Pointer to hold p2p noa param
4684 *
4685 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4686 */
4687QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf,
4688 struct p2p_noa_info *param)
4689{
4690 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4691
4692 if (!wmi_handle) {
4693 WMI_LOGE("wmi handle is null");
4694 return QDF_STATUS_E_INVAL;
4695 }
4696
4697 if (wmi_handle->ops->extract_p2p_noa_ev_param)
4698 return wmi_handle->ops->extract_p2p_noa_ev_param(
4699 wmi_handle, evt_buf, param);
4700
4701 return QDF_STATUS_E_FAILURE;
4702}
4703#endif
4704
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304705/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304706 * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event
4707 * @wmi_handle: wmi handle
4708 * @param evt_buf: pointer to event buffer
4709 * @param peer_mac: Pointer to hold peer mac address
4710 * @param rate_cap: Pointer to hold ratecode
4711 *
4712 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4713 */
4714QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf,
4715 uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap)
4716{
4717 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
4718
4719 if (wmi->ops->extract_peer_ratecode_list_ev)
4720 return wmi->ops->extract_peer_ratecode_list_ev(wmi,
4721 evt_buf, peer_mac, rate_cap);
4722
4723 return QDF_STATUS_E_FAILURE;
4724
4725}
4726
4727/**
4728 * wmi_extract_comb_phyerr() - extract comb phy error from event
4729 * @wmi_handle: wmi handle
4730 * @param evt_buf: pointer to event buffer
4731 * @param datalen: data length of event buffer
4732 * @param buf_offset: Pointer to hold value of current event buffer offset
4733 * post extraction
4734 * @param phyer: Pointer to hold phyerr
4735 *
4736 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4737 */
4738QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf,
4739 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
4740{
4741 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4742
4743 if (wmi_handle->ops->extract_comb_phyerr)
4744 return wmi_handle->ops->extract_comb_phyerr(wmi_handle,
4745 evt_buf, datalen, buf_offset, phyerr);
4746
4747 return QDF_STATUS_E_FAILURE;
4748
4749}
4750
4751/**
4752 * wmi_extract_single_phyerr() - extract single phy error from event
4753 * @wmi_handle: wmi handle
4754 * @param evt_buf: pointer to event buffer
4755 * @param datalen: data length of event buffer
4756 * @param buf_offset: Pointer to hold value of current event buffer offset
4757 * post extraction
4758 * @param phyerr: Pointer to hold phyerr
4759 *
4760 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4761 */
4762QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf,
4763 uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr)
4764{
4765 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4766
4767 if (wmi_handle->ops->extract_single_phyerr)
4768 return wmi_handle->ops->extract_single_phyerr(wmi_handle,
4769 evt_buf, datalen, buf_offset, phyerr);
4770
4771 return QDF_STATUS_E_FAILURE;
4772
4773}
4774
4775/**
4776 * wmi_extract_composite_phyerr() - extract composite phy error from event
4777 * @wmi_handle: wmi handle
4778 * @param evt_buf: pointer to event buffer
4779 * @param datalen: Length of event buffer
4780 * @param phyerr: Pointer to hold phy error
4781 *
4782 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4783 */
4784QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf,
4785 uint16_t datalen, wmi_host_phyerr_t *phyerr)
4786{
4787 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4788
4789 if (wmi_handle->ops->extract_composite_phyerr)
4790 return wmi_handle->ops->extract_composite_phyerr(wmi_handle,
4791 evt_buf, datalen, phyerr);
4792
4793 return QDF_STATUS_E_FAILURE;
4794
4795}
4796
4797/**
4798 * wmi_extract_stats_param() - extract all stats count from event
4799 * @wmi_handle: wmi handle
4800 * @param evt_buf: pointer to event buffer
4801 * @param stats_param: Pointer to hold stats count
4802 *
4803 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4804 */
4805QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf,
4806 wmi_host_stats_event *stats_param)
4807{
4808 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4809
4810 if (wmi_handle->ops->extract_all_stats_count)
4811 return wmi_handle->ops->extract_all_stats_count(wmi_handle,
4812 evt_buf, stats_param);
4813
4814 return QDF_STATUS_E_FAILURE;
4815}
4816
4817/**
4818 * wmi_extract_pdev_stats() - extract pdev stats from event
4819 * @wmi_handle: wmi handle
4820 * @param evt_buf: pointer to event buffer
4821 * @param index: Index into pdev stats
4822 * @param pdev_stats: Pointer to hold pdev stats
4823 *
4824 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4825 */
4826QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf,
4827 uint32_t index, wmi_host_pdev_stats *pdev_stats)
4828{
4829 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4830
4831 if (wmi_handle->ops->extract_pdev_stats)
4832 return wmi_handle->ops->extract_pdev_stats(wmi_handle,
4833 evt_buf, index, pdev_stats);
4834
4835 return QDF_STATUS_E_FAILURE;
4836}
4837
4838/**
Adil Saeed Musthafad2805962017-08-23 17:32:11 -07004839 * extract_unit_test() - extract unit test from event
4840 * @wmi_handle: wmi handle
4841 * @param evt_buf: pointer to event buffer
4842 * @param unit_test: Pointer to hold unit-test header
4843 * @param maxspace: The amount of space in evt_buf
4844 *
4845 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4846 */
4847QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf,
4848 wmi_unit_test_event *unit_test, uint32_t maxspace)
4849{
4850 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4851
4852 if (wmi_handle->ops->extract_unit_test)
4853 return wmi_handle->ops->extract_unit_test(wmi_handle,
4854 evt_buf, unit_test, maxspace);
4855
4856 return QDF_STATUS_E_FAILURE;
4857}
4858
4859/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304860 * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event
4861 * @wmi_handle: wmi handle
4862 * @param evt_buf: pointer to event buffer
4863 * @param index: Index into extended pdev stats
4864 * @param pdev_ext_stats: Pointer to hold extended pdev stats
4865 *
4866 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4867 */
4868QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf,
4869 uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats)
4870{
4871 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4872
4873 if (wmi_handle->ops->extract_pdev_ext_stats)
4874 return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle,
4875 evt_buf, index, pdev_ext_stats);
4876
4877 return QDF_STATUS_E_FAILURE;
4878}
4879
4880/**
4881 * wmi_extract_peer_stats() - extract peer stats from event
4882 * @wmi_handle: wmi handle
4883 * @param evt_buf: pointer to event buffer
4884 * @param index: Index into peer stats
4885 * @param peer_stats: Pointer to hold peer stats
4886 *
4887 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4888 */
4889QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf,
4890 uint32_t index, wmi_host_peer_stats *peer_stats)
4891{
4892 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4893
4894 if (wmi_handle->ops->extract_peer_stats)
4895 return wmi_handle->ops->extract_peer_stats(wmi_handle,
4896 evt_buf, index, peer_stats);
4897
4898 return QDF_STATUS_E_FAILURE;
4899}
4900
4901/**
4902 * wmi_extract_vdev_stats() - extract vdev stats from event
4903 * @wmi_handle: wmi handle
4904 * @param evt_buf: pointer to event buffer
4905 * @param index: Index into vdev stats
4906 * @param vdev_stats: Pointer to hold vdev stats
4907 *
4908 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4909 */
4910QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
4911 uint32_t index, wmi_host_vdev_stats *vdev_stats)
4912{
4913 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4914
4915 if (wmi_handle->ops->extract_vdev_stats)
4916 return wmi_handle->ops->extract_vdev_stats(wmi_handle,
4917 evt_buf, index, vdev_stats);
4918
4919 return QDF_STATUS_E_FAILURE;
4920}
4921
4922/**
Naveen Rawatd2115722018-04-12 08:17:55 -07004923 * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event
4924 * @wmi_handle: wmi handle
4925 * @param evt_buf: pointer to event buffer
4926 * @param index: Index into rssi stats
4927 * @param rssi_stats: Pointer to hold rssi stats
4928 *
4929 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4930 */
4931QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf,
4932 uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats)
4933{
4934 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4935
4936 if (wmi_handle->ops->extract_per_chain_rssi_stats)
4937 return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle,
4938 evt_buf, index, rssi_stats);
4939
4940 return QDF_STATUS_E_FAILURE;
4941}
4942
4943/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05304944 * wmi_extract_rtt_hdr() - extract rtt header from event
4945 * @wmi_handle: wmi handle
4946 * @param evt_buf: pointer to event buffer
4947 * @param ev: Pointer to hold rtt header
4948 *
4949 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4950 */
4951QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf,
4952 wmi_host_rtt_event_hdr *ev)
4953{
4954 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4955
4956 if (wmi_handle->ops->extract_rtt_hdr)
4957 return wmi_handle->ops->extract_rtt_hdr(wmi_handle,
4958 evt_buf, ev);
4959
4960 return QDF_STATUS_E_FAILURE;
4961}
4962
4963/**
4964 * wmi_extract_bcnflt_stats() - extract bcn fault stats from event
4965 * @wmi_handle: wmi handle
4966 * @param evt_buf: pointer to event buffer
4967 * @param index: Index into bcn fault stats
4968 * @param bcnflt_stats: Pointer to hold bcn fault stats
4969 *
4970 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4971 */
4972QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf,
4973 uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats)
4974{
4975 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4976
4977 if (wmi_handle->ops->extract_bcnflt_stats)
4978 return wmi_handle->ops->extract_bcnflt_stats(wmi_handle,
4979 evt_buf, index, bcnflt_stats);
4980
4981 return QDF_STATUS_E_FAILURE;
4982}
4983
4984/**
4985 * wmi_extract_rtt_ev() - extract rtt event
4986 * @wmi_handle: wmi handle
4987 * @param evt_buf: Pointer to event buffer
4988 * @param ev: Pointer to hold rtt event
4989 * @param hdump: Pointer to hold hex dump
4990 * @param hdump_len: hex dump length
4991 *
4992 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
4993 */
4994QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf,
4995 wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len)
4996{
4997 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
4998
4999 if (wmi_handle->ops->extract_rtt_ev)
5000 return wmi_handle->ops->extract_rtt_ev(wmi_handle,
5001 evt_buf, ev, hdump, hdump_len);
5002
5003 return QDF_STATUS_E_FAILURE;
5004}
5005
5006/**
5007 * wmi_extract_peer_extd_stats() - extract extended peer stats from event
5008 * @wmi_handle: wmi handle
5009 * @param evt_buf: pointer to event buffer
5010 * @param index: Index into extended peer stats
5011 * @param peer_extd_stats: Pointer to hold extended peer stats
5012 *
5013 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5014 */
5015QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf,
5016 uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats)
5017{
5018 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5019
5020 if (wmi_handle->ops->extract_peer_extd_stats)
5021 return wmi_handle->ops->extract_peer_extd_stats(wmi_handle,
5022 evt_buf, index, peer_extd_stats);
5023
5024 return QDF_STATUS_E_FAILURE;
5025}
5026
5027/**
5028 * wmi_extract_rtt_error_report_ev() - extract rtt error report from event
5029 * @wmi_handle: wmi handle
5030 * @param evt_buf: pointer to event buffer
5031 * @param wds_ev: Pointer to hold rtt error report
5032 *
5033 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5034 */
5035QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf,
5036 wmi_host_rtt_error_report_event *ev)
5037{
5038 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5039
5040 if (wmi_handle->ops->extract_rtt_error_report_ev)
5041 return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle,
5042 evt_buf, ev);
5043
5044 return QDF_STATUS_E_FAILURE;
5045}
5046
5047/**
5048 * wmi_extract_chan_stats() - extract chan stats from event
5049 * @wmi_handle: wmi handle
5050 * @param evt_buf: pointer to event buffer
5051 * @param index: Index into chan stats
5052 * @param chanstats: Pointer to hold chan stats
5053 *
5054 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5055 */
5056QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf,
5057 uint32_t index, wmi_host_chan_stats *chan_stats)
5058{
5059 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5060
5061 if (wmi_handle->ops->extract_chan_stats)
5062 return wmi_handle->ops->extract_chan_stats(wmi_handle,
5063 evt_buf, index, chan_stats);
5064
5065 return QDF_STATUS_E_FAILURE;
5066}
5067
5068/**
5069 * wmi_extract_thermal_stats() - extract thermal stats from event
5070 * @wmi_handle: wmi handle
5071 * @param evt_buf: Pointer to event buffer
5072 * @param temp: Pointer to hold extracted temperature
5073 * @param level: Pointer to hold extracted level
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05305074 * @param pdev_id: Pointer to hold extracted pdev_id
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305075 *
5076 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5077 */
5078QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05305079 uint32_t *temp, uint32_t *level, uint32_t *pdev_id)
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305080{
5081 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5082
5083 if (wmi_handle->ops->extract_thermal_stats)
5084 return wmi_handle->ops->extract_thermal_stats(wmi_handle,
Om Prakash Tripathic569cdb2017-04-19 16:57:31 +05305085 evt_buf, temp, level, pdev_id);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305086
5087 return QDF_STATUS_E_FAILURE;
5088}
5089
5090/**
5091 * wmi_extract_profile_ctx() - extract profile context from event
5092 * @wmi_handle: wmi handle
5093 * @param evt_buf: pointer to event buffer
5094 * @param profile_ctx: Pointer to hold profile context
5095 *
5096 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5097 */
5098QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf,
5099 wmi_host_wlan_profile_ctx_t *profile_ctx)
5100{
5101 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5102
5103 if (wmi_handle->ops->extract_profile_ctx)
5104 return wmi_handle->ops->extract_profile_ctx(wmi_handle,
5105 evt_buf, profile_ctx);
5106
5107 return QDF_STATUS_E_FAILURE;
5108}
5109
5110/**
5111 * wmi_extract_thermal_level_stats() - extract thermal level stats from
5112 * event
5113 * @wmi_handle: wmi handle
5114 * @param evt_buf: pointer to event buffer
5115 * @param idx: Index to level stats
5116 * @param levelcount: Pointer to hold levelcount
5117 * @param dccount: Pointer to hold dccount
5118 *
5119 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5120 */
5121QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
5122 uint8_t idx, uint32_t *levelcount, uint32_t *dccount)
5123{
5124 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5125
5126 if (wmi_handle->ops->extract_thermal_level_stats)
5127 return wmi_handle->ops->extract_thermal_level_stats(wmi_handle,
5128 evt_buf, idx, levelcount, dccount);
5129
5130 return QDF_STATUS_E_FAILURE;
5131}
5132
5133/**
5134 * wmi_extract_profile_data() - extract profile data from event
5135 * @wmi_handle: wmi handle
5136 * @param evt_buf: pointer to event buffer
Govind Singhfdb1bb32016-05-06 20:20:25 +05305137 * @idx index: index of profile data
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305138 * @param profile_data: Pointer to hold profile data
5139 *
5140 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5141 */
Govind Singhfdb1bb32016-05-06 20:20:25 +05305142QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305143 wmi_host_wlan_profile_t *profile_data)
5144{
5145 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5146
5147 if (wmi_handle->ops->extract_profile_data)
5148 return wmi_handle->ops->extract_profile_data(wmi_handle,
Govind Singhfdb1bb32016-05-06 20:20:25 +05305149 evt_buf, idx, profile_data);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305150
5151 return QDF_STATUS_E_FAILURE;
5152}
5153
5154/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305155 * wmi_extract_bss_chan_info_event() - extract bss channel information
5156 * from event
5157 * @wmi_handle: wmi handle
5158 * @param evt_buf: pointer to event buffer
5159 * @param bss_chan_info: Pointer to hold bss channel information
5160 *
5161 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5162 */
5163QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf,
5164 wmi_host_pdev_bss_chan_info_event *bss_chan_info)
5165{
5166 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5167
5168 if (wmi_handle->ops->extract_bss_chan_info_event)
5169 return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle,
5170 evt_buf, bss_chan_info);
5171
5172 return QDF_STATUS_E_FAILURE;
5173}
5174
5175/**
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305176 * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control
5177 * from event
5178 * @wmi_handle: wmi handle
5179 * @param evt_buf: pointer to event buffer
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305180 * @param ev: Pointer to hold data traffic control
5181 *
5182 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5183 */
5184QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf,
5185 wmi_host_tx_data_traffic_ctrl_event *ev)
5186{
5187 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5188
5189 if (wmi->ops->extract_tx_data_traffic_ctrl_ev)
5190 return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi,
5191 evt_buf, ev);
5192
5193 return QDF_STATUS_E_FAILURE;
5194}
5195
5196/**
5197 * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event
5198 * @wmi_handle: wmi handle
5199 * @param evt_buf: pointer to event buffer
5200 * @param index: Index into extended vdev stats
5201 * @param vdev_extd_stats: Pointer to hold extended vdev stats
5202 *
5203 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5204 */
5205QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
5206 uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats)
5207{
5208 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5209
5210 if (wmi_handle->ops->extract_vdev_extd_stats)
5211 return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle,
5212 evt_buf, index, vdev_extd_stats);
Gupta, Kapil2e685982016-04-25 19:14:19 +05305213 return QDF_STATUS_E_FAILURE;
5214}
5215
5216/**
Gurumoorthi Gnanasambandhanb5fb8362017-11-06 22:04:17 +05305217 * wmi_extract_bcn_stats() - extract beacon stats from event
5218 * @wmi_handle: wmi handle
5219 * @evt_buf: pointer to event buffer
5220 * @index: Index into beacon stats
5221 * @vdev_bcn_stats: Pointer to hold beacon stats
5222 *
5223 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5224 */
5225QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
5226 uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats)
5227{
5228 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5229
5230 if (wmi_handle->ops->extract_bcn_stats)
5231 return wmi_handle->ops->extract_bcn_stats(wmi_handle,
5232 evt_buf, index, vdev_bcn_stats);
5233 return QDF_STATUS_E_FAILURE;
5234}
5235
5236/**
Chaithanya Garrepalli8a9c38d2018-01-18 14:19:41 +05305237 * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event
5238 * @wmi_handle: wmi handle
5239 * @param evt_buf: pointer to event buffer
5240 * @param vdev_extd_stats: Pointer to hold nac rssi stats
5241 *
5242 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5243 */
5244QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf,
5245 struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats)
5246{
5247 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5248
5249 if (wmi_handle->ops->extract_vdev_nac_rssi_stats)
5250 return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle,
5251 evt_buf, vdev_nac_rssi_stats);
5252
5253 return QDF_STATUS_E_FAILURE;
5254}
5255
5256/**
Gupta, Kapil2e685982016-04-25 19:14:19 +05305257 * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of
5258 * adaptive dwelltime configuration params
5259 * @wma_handle: wma handler
5260 * @dwelltime_params: pointer to dwelltime_params
5261 *
5262 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
5263 */
5264QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
5265 struct wmi_adaptive_dwelltime_params *dwelltime_params)
5266{
5267 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5268
5269 if (wmi_handle->ops->send_adapt_dwelltime_params_cmd)
5270 return wmi_handle->ops->
5271 send_adapt_dwelltime_params_cmd(wmi_handle,
5272 dwelltime_params);
Govind Singhe7d9f3e2016-04-15 13:58:27 +05305273
5274 return QDF_STATUS_E_FAILURE;
5275}
Govind Singhbca3b1b2016-05-02 17:59:24 +05305276
5277/**
5278 * wmi_unified_send_power_dbg_cmd() - send power debug commands
5279 * @wmi_handle: wmi handle
5280 * @param: wmi power debug parameter
5281 *
5282 * Send WMI_POWER_DEBUG_CMDID parameters to fw.
5283 *
5284 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5285 */
5286QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
5287 struct wmi_power_dbg_params *param)
5288{
5289 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5290
5291 if (wmi_handle->ops->send_power_dbg_cmd)
5292 return wmi_handle->ops->send_power_dbg_cmd(wmi_handle,
5293 param);
5294
5295 return QDF_STATUS_E_FAILURE;
5296}
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05305297
Manikandan Mohan31a13e22016-12-13 13:14:06 -08005298QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl,
5299 struct sar_limit_cmd_params *params)
5300{
5301 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5302
5303 if (wmi_handle->ops->send_sar_limit_cmd)
5304 return wmi_handle->ops->send_sar_limit_cmd(
5305 wmi_handle,
5306 params);
5307 return QDF_STATUS_E_FAILURE;
5308}
5309
Jeff Johnson4783f902017-12-14 15:50:16 -08005310QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl)
5311{
5312 wmi_unified_t wmi_handle = wmi_hdl;
5313
5314 if (wmi_handle->ops->get_sar_limit_cmd)
5315 return wmi_handle->ops->get_sar_limit_cmd(wmi_handle);
5316
5317 return QDF_STATUS_E_FAILURE;
5318}
5319
5320QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl,
5321 uint8_t *evt_buf,
5322 struct sar_limit_event *event)
5323{
5324 wmi_unified_t wmi_handle = wmi_hdl;
5325
5326 if (wmi_handle->ops->extract_sar_limit_event)
5327 return wmi_handle->ops->extract_sar_limit_event(wmi_handle,
5328 evt_buf,
5329 event);
5330
5331 return QDF_STATUS_E_FAILURE;
5332}
5333
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07005334QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle,
5335 uint8_t *event, uint32_t len)
5336{
5337 wmi_unified_t wmi_handle = handle;
5338
5339 if (wmi_handle->ops->extract_sar2_result_event)
5340 return wmi_handle->ops->extract_sar2_result_event(wmi_handle,
5341 event,
5342 len);
5343
5344 return QDF_STATUS_E_FAILURE;
5345}
Jeff Johnson4783f902017-12-14 15:50:16 -08005346
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05305347#ifdef WLAN_FEATURE_DISA
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05305348QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl,
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05305349 struct disa_encrypt_decrypt_req_params *params)
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05305350{
5351 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5352
5353 if (wmi_handle->ops->send_encrypt_decrypt_send_cmd)
5354 return wmi_handle->ops->send_encrypt_decrypt_send_cmd(
5355 wmi_handle,
5356 params);
Sathish Kumar68789382016-11-14 17:44:29 +05305357 return QDF_STATUS_E_FAILURE;
5358}
Nachiket Kukade03e7ab22017-12-20 17:28:29 +05305359
5360QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl,
5361 uint8_t *evt_buf,
5362 struct disa_encrypt_decrypt_resp_params *resp)
5363{
5364 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl;
5365
5366 if (wmi_handle->ops->extract_encrypt_decrypt_resp_event)
5367 return wmi_handle->ops->extract_encrypt_decrypt_resp_event(
5368 wmi_handle, evt_buf, resp);
5369
5370 return QDF_STATUS_E_FAILURE;
5371}
5372
Nachiket Kukadeab4cbc22017-12-15 12:36:58 +05305373#endif
Sathish Kumar68789382016-11-14 17:44:29 +05305374
5375/*
5376 * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands
5377 * @wmi_handle: wmi handle
Sathish Kumar699f6b52016-11-10 15:30:22 +05305378 * @param : wmi btcoex cfg params
Sathish Kumar68789382016-11-14 17:44:29 +05305379 *
5380 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
5381 *
5382 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5383 */
5384QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl,
Sathish Kumar699f6b52016-11-10 15:30:22 +05305385 struct btcoex_cfg_params *param)
Sathish Kumar68789382016-11-14 17:44:29 +05305386{
5387 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5388
5389 if (wmi->ops->send_btcoex_wlan_priority_cmd)
5390 return wmi->ops->send_btcoex_wlan_priority_cmd(wmi,
Sathish Kumar699f6b52016-11-10 15:30:22 +05305391 param);
5392
5393 return QDF_STATUS_E_FAILURE;
5394}
5395/**
5396 * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands
5397 * @wmi_handle: wmi handle
5398 * @param: wmi btcoex cfg params
5399 *
5400 * Send WMI_BTCOEX_CFG_CMDID parameters to fw.
5401 *
5402 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5403 */
5404QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl,
5405 struct btcoex_cfg_params *param)
5406{
5407 wmi_unified_t wmi = (wmi_unified_t) wmi_hdl;
5408
5409 if (wmi->ops->send_btcoex_duty_cycle_cmd)
5410 return wmi->ops->send_btcoex_duty_cycle_cmd(wmi,
5411 param);
Padma, Santhosh Kumar8394bae2016-09-11 18:24:59 +05305412
5413 return QDF_STATUS_E_FAILURE;
5414}
Kiran Venkatappa06520822016-08-10 23:55:40 +05305415
5416/*
5417 * wmi_extract_service_ready_ext() - extract extended service ready
5418 * @wmi_handle: wmi handle
5419 * @param: wmi power debug parameter
5420 *
5421 *
5422 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5423 */
5424QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf,
Rajeev Kumar037799b2017-02-03 00:39:49 -08005425 struct wlan_psoc_host_service_ext_param *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05305426{
5427 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5428
5429 if (wmi_handle->ops->extract_service_ready_ext)
5430 return wmi_handle->ops->extract_service_ready_ext(wmi_handle,
5431 evt_buf, param);
5432
5433 return QDF_STATUS_E_FAILURE;
5434}
5435
5436/**
Kabilan Kannan0d0f9352018-06-21 16:55:47 -07005437 * wmi_extract_sar_cap_service_ready_ext() -
5438 * extract sar cap from service ready event
5439 * @wmi_handle: wmi handle
5440 * @evt_buf: pointer to event buffer
5441 * @ext_param: extended target info
5442 *
5443 * Return: QDF_STATUS_SUCCESS for success or error code
5444 */
5445QDF_STATUS wmi_extract_sar_cap_service_ready_ext(
5446 void *wmi_hdl,
5447 uint8_t *evt_buf,
5448 struct wlan_psoc_host_service_ext_param *ext_param)
5449{
5450 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5451
5452 if (wmi_handle->ops->extract_sar_cap_service_ready_ext)
5453 return wmi_handle->ops->extract_sar_cap_service_ready_ext(
5454 wmi_handle,
5455 evt_buf, ext_param);
5456
5457 return QDF_STATUS_E_FAILURE;
5458}
5459
5460/**
Kiran Venkatappa06520822016-08-10 23:55:40 +05305461 * wmi_extract_hw_mode_cap_service_ready_ext() -
5462 * extract HW mode cap from service ready event
5463 * @wmi_handle: wmi handle
5464 * @param evt_buf: pointer to event buffer
5465 * @param param: Pointer to hold evt buf
5466 * @param hw_mode_idx: hw mode idx should be less than num_mode
5467 *
5468 * Return: QDF_STATUS_SUCCESS for success or error code
5469 */
5470QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext(
5471 void *wmi_hdl,
5472 uint8_t *evt_buf, uint8_t hw_mode_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08005473 struct wlan_psoc_host_hw_mode_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05305474{
5475 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5476
5477 if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext)
5478 return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext(
5479 wmi_handle,
5480 evt_buf, hw_mode_idx, param);
5481
5482 return QDF_STATUS_E_FAILURE;
5483}
5484/**
5485 * wmi_extract_mac_phy_cap_service_ready_ext() -
5486 * extract MAC phy cap from service ready event
5487 * @wmi_handle: wmi handle
5488 * @param evt_buf: pointer to event buffer
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05305489 * @param hw_mode_id: hw mode id of hw_mode_caps
5490 * @param phy_id: phy_id within hw_mode_cap
5491 * @param param: pointer to mac phy caps structure to hold the values from event
Kiran Venkatappa06520822016-08-10 23:55:40 +05305492 *
5493 * Return: QDF_STATUS_SUCCESS for success or error code
5494 */
5495QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext(
5496 void *wmi_hdl,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05305497 uint8_t *evt_buf,
5498 uint8_t hw_mode_id,
5499 uint8_t phy_id,
Rajeev Kumar037799b2017-02-03 00:39:49 -08005500 struct wlan_psoc_host_mac_phy_caps *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05305501{
5502 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5503
5504 if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext)
5505 return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext(
5506 wmi_handle,
Kiran Venkatappa2b1b0d22016-12-26 15:38:06 +05305507 evt_buf, hw_mode_id, phy_id, param);
Kiran Venkatappa06520822016-08-10 23:55:40 +05305508
5509 return QDF_STATUS_E_FAILURE;
5510}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05305511
Kiran Venkatappa06520822016-08-10 23:55:40 +05305512/**
5513 * wmi_extract_reg_cap_service_ready_ext() -
5514 * extract REG cap from service ready event
5515 * @wmi_handle: wmi handle
5516 * @param evt_buf: pointer to event buffer
5517 * @param param: Pointer to hold evt buf
5518 * @param phy_idx: phy idx should be less than num_mode
5519 *
5520 * Return: QDF_STATUS_SUCCESS for success or error code
5521 */
5522QDF_STATUS wmi_extract_reg_cap_service_ready_ext(
5523 void *wmi_hdl,
5524 uint8_t *evt_buf, uint8_t phy_idx,
Rajeev Kumar037799b2017-02-03 00:39:49 -08005525 struct wlan_psoc_host_hal_reg_capabilities_ext *param)
Kiran Venkatappa06520822016-08-10 23:55:40 +05305526{
5527 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5528
5529 if (wmi_handle->ops->extract_reg_cap_service_ready_ext)
5530 return wmi_handle->ops->extract_reg_cap_service_ready_ext(
5531 wmi_handle,
5532 evt_buf, phy_idx, param);
5533
5534 return QDF_STATUS_E_FAILURE;
5535}
Sathish Kumar27ee0a32017-01-24 17:51:26 +05305536
Sathish Kumarf396c722017-11-17 17:30:41 +05305537QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext(
5538 void *wmi_hdl,
5539 uint8_t *evt_buf, uint8_t idx,
5540 struct wlan_psoc_host_dbr_ring_caps *param)
5541{
5542 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5543
5544 if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext)
5545 return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext(
5546 wmi_handle,
5547 evt_buf, idx, param);
5548
5549 return QDF_STATUS_E_FAILURE;
5550}
5551
Sathish Kumar27ee0a32017-01-24 17:51:26 +05305552/**
5553 * wmi_extract_pdev_utf_event() -
5554 * extract UTF data from pdev utf event
5555 * @wmi_handle: wmi handle
5556 * @param evt_buf: pointer to event buffer
5557 * @param param: Pointer to hold evt buf
5558 *
5559 * Return: QDF_STATUS_SUCCESS for success or error code
5560 */
5561QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl,
5562 uint8_t *evt_buf,
5563 struct wmi_host_pdev_utf_event *param)
5564{
5565 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5566
5567 if (wmi_handle->ops->extract_pdev_utf_event)
5568 return wmi_handle->ops->extract_pdev_utf_event(
5569 wmi_handle,
5570 evt_buf, param);
5571
5572 return QDF_STATUS_E_FAILURE;
5573}
Vijay Pamidipatid814b8d2017-01-17 12:53:05 +05305574
5575/**
Kiran Venkatappa316357d2017-02-28 14:19:17 +05305576 * wmi_extract_pdev_qvit_event() -
5577 * extract UTF data from pdev qvit event
5578 * @wmi_handle: wmi handle
5579 * @param evt_buf: pointer to event buffer
5580 * @param param: Pointer to hold evt buf
5581 *
5582 * Return: QDF_STATUS_SUCCESS for success or error code
5583 */
5584QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl,
5585 uint8_t *evt_buf,
5586 struct wmi_host_pdev_qvit_event *param)
5587{
5588 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5589
5590 if (wmi_handle->ops->extract_pdev_qvit_event)
5591 return wmi_handle->ops->extract_pdev_qvit_event(
5592 wmi_handle,
5593 evt_buf, param);
5594
5595 return QDF_STATUS_E_FAILURE;
5596}
5597
5598/**
Sathish Kumar58a9fb92017-01-19 14:57:37 +05305599 * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command
5600 * @wmi_handle: wmi handle
5601 * @param: wmi coex ver cfg params
5602 *
5603 * Send WMI_COEX_VERSION_CFG_CMID parameters to fw.
5604 *
5605 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5606 */
5607QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl,
5608 coex_ver_cfg_t *param)
5609{
5610 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5611
5612 if (wmi_handle->ops->send_coex_ver_cfg_cmd)
5613 return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle,
5614 param);
5615
5616 return QDF_STATUS_E_FAILURE;
5617}
5618
5619/**
Sathish Kumar80f4f382017-04-24 11:36:00 +05305620 * wmi_unified_send_coex_config_cmd() - send coex ver cfg command
5621 * @wmi_handle: wmi handle
5622 * @param: wmi coex cfg cmd params
5623 *
5624 * Send WMI_COEX_CFG_CMD parameters to fw.
5625 *
5626 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5627 */
5628QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl,
5629 struct coex_config_params *param)
5630{
5631 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5632
5633 if (wmi_handle->ops->send_coex_config_cmd)
5634 return wmi_handle->ops->send_coex_config_cmd(wmi_handle,
5635 param);
5636
5637 return QDF_STATUS_E_FAILURE;
5638}
5639
Rajeev Kumar Sirasanagandlaab4275d2016-11-22 21:28:54 +05305640QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl,
5641 struct rcpi_req *get_rcpi_param)
5642{
5643 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5644
5645 if (wmi_handle->ops->send_get_rcpi_cmd)
5646 return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle,
5647 get_rcpi_param);
5648
5649 return QDF_STATUS_E_FAILURE;
5650}
5651
5652QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf,
5653 struct rcpi_res *res)
5654{
5655 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5656 struct wmi_ops *ops = wmi_handle->ops;
5657
5658 if (ops->extract_rcpi_response_event)
5659 return ops->extract_rcpi_response_event(wmi_handle, evt_buf,
5660 res);
5661
5662 return QDF_STATUS_E_FAILURE;
5663}
5664
Arif Hussainf00be1d2017-01-07 18:21:55 -08005665QDF_STATUS
5666wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl,
5667 uint32_t pdev_id)
5668{
5669 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5670
5671 if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd)
5672 return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd(
5673 wmi_handle, pdev_id);
5674
5675 return QDF_STATUS_E_FAILURE;
5676}
5677
5678QDF_STATUS
5679wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl,
5680 uint32_t pdev_id)
5681{
5682 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5683
5684 if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd)
5685 return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd(
5686 wmi_handle, pdev_id);
5687
5688 return QDF_STATUS_E_FAILURE;
5689}
Vikram Kandukuri45fc8582017-03-07 18:40:13 +05305690
5691/*
5692 * wmi_extract_chainmask_tables_tlv() - extract chain mask tables
5693 * @wmi_handle: wmi handle
5694 * @evt_buf: pointer to event buffer.
5695 * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table
5696 *
5697 *
5698 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5699 */
5700QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf,
5701 struct wlan_psoc_host_chainmask_table *chainmask_table)
5702{
5703 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5704
5705 if (wmi_handle->ops->extract_chainmask_tables)
5706 return wmi_handle->ops->extract_chainmask_tables(wmi_handle,
5707 evt_buf, chainmask_table);
5708
5709 return QDF_STATUS_E_FAILURE;
5710}
Kiran Kumar Lokeredaf91e32017-04-24 00:56:03 -07005711/**
5712 * wmi_unified_set_country_cmd_send() - WMI set country function
5713 * @param wmi_handle : handle to WMI.
5714 * @param param : pointer to hold set country cmd parameter
5715 *
5716 * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
5717 */
5718QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl,
5719 struct set_country *param)
5720{
5721 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5722
5723 if (wmi_handle->ops->send_set_country_cmd)
5724 return wmi_handle->ops->send_set_country_cmd(wmi_handle,
5725 param);
5726
5727 return QDF_STATUS_E_FAILURE;
5728}
5729
Nitesh Shah52323d02017-05-22 15:49:00 +05305730/**
5731 * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of
5732 * DBS scan selection configuration params
5733 * @wma_handle: wma handler
5734 * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params
5735 *
5736 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure
5737 */
5738QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl,
5739 struct wmi_dbs_scan_sel_params *dbs_scan_params)
5740{
5741 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5742
5743 if (wmi_handle->ops->send_dbs_scan_sel_params_cmd)
5744 return wmi_handle->ops->
5745 send_dbs_scan_sel_params_cmd(wmi_handle,
5746 dbs_scan_params);
5747
5748 return QDF_STATUS_E_FAILURE;
5749}
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05305750
Rajeev Kumar Sirasanagandladaadf832017-09-18 16:47:52 +05305751#ifdef WLAN_FEATURE_ACTION_OUI
5752QDF_STATUS
5753wmi_unified_send_action_oui_cmd(void *wmi_hdl,
5754 struct action_oui_request *req)
5755{
5756 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5757
5758 if (wmi_handle->ops->send_action_oui_cmd)
5759 return wmi_handle->ops->send_action_oui_cmd(wmi_handle,
5760 req);
5761
5762 return QDF_STATUS_E_FAILURE;
5763}
5764#endif
5765
Ganesh Kondabattini40252f52017-07-10 11:54:11 +05305766/**
5767 * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel
5768 * configuration params
5769 * @wmi_hdl: wmi handler
5770 * @limit_off_chan_param: pointer to wmi_limit_off_chan_param
5771 *
5772 * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure
5773 */
5774QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl,
5775 struct wmi_limit_off_chan_param *limit_off_chan_param)
5776{
5777 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5778
5779 if (wmi_handle->ops->send_limit_off_chan_cmd)
5780 return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle,
5781 limit_off_chan_param);
5782
5783 return QDF_STATUS_E_FAILURE;
5784}
Kiran Venkatappa7fe3afc2017-11-08 19:32:23 +05305785
5786/**
Rathees kumar Chinannane3d6feb2017-11-22 17:03:57 +05305787 * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of
5788 * wds entries from FW
5789 * @wmi_handle: wmi handle
5790 *
5791 * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw.
5792 *
5793 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
5794 */
5795QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl)
5796{
5797 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5798
5799 if (wmi_handle->ops->send_wds_entry_list_cmd)
5800 return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle);
5801
5802 return QDF_STATUS_E_FAILURE;
5803}
5804
5805/**
5806 * wmi_extract_wds_entry - api to extract wds entry
5807 * @wmi_handle: wma handle
5808 * @evt_buf: pointer to event buffer
5809 * @wds_entry: wds entry
5810 * @idx: index to point wds entry in event buffer
5811 *
5812 * Return: QDF_STATUS_SUCCESS for successful event parse
5813 * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE
5814 */
5815QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf,
5816 struct wdsentry *wds_entry,
5817 u_int32_t idx)
5818{
5819 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5820
5821 if (wmi_handle->ops->extract_wds_entry)
5822 return wmi_handle->ops->extract_wds_entry(wmi_handle,
5823 evt_buf, wds_entry, idx);
5824
5825 return QDF_STATUS_E_FAILURE;
5826}
Pratik Gandhi67da1bb2018-01-30 19:05:41 +05305827qdf_export_symbol(wmi_extract_wds_entry);
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005828
5829#ifdef WLAN_FEATURE_NAN_CONVERGENCE
5830QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl,
5831 struct nan_datapath_initiator_req *req)
5832{
5833 wmi_unified_t wmi_handle = wmi_hdl;
5834
5835 if (wmi_handle->ops->send_ndp_initiator_req_cmd)
5836 return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle,
5837 req);
5838
5839 return QDF_STATUS_E_FAILURE;
5840}
5841
5842QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl,
5843 struct nan_datapath_responder_req *req)
5844{
5845 wmi_unified_t wmi_handle = wmi_hdl;
5846
5847 if (wmi_handle->ops->send_ndp_responder_req_cmd)
5848 return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle,
5849 req);
5850
5851 return QDF_STATUS_E_FAILURE;
5852}
5853
5854QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl,
5855 struct nan_datapath_end_req *req)
5856{
5857 wmi_unified_t wmi_handle = wmi_hdl;
5858
5859 if (wmi_handle->ops->send_ndp_end_req_cmd)
5860 return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle,
5861 req);
5862
5863 return QDF_STATUS_E_FAILURE;
5864}
5865
5866QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08005867 uint8_t *data, struct nan_datapath_initiator_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005868{
5869 if (wmi_handle->ops->extract_ndp_initiator_rsp)
5870 return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle,
5871 data, rsp);
5872
5873 return QDF_STATUS_E_FAILURE;
5874}
5875
5876QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08005877 struct nan_datapath_indication_event *ind)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005878{
5879 if (wmi_handle->ops->extract_ndp_ind)
5880 return wmi_handle->ops->extract_ndp_ind(wmi_handle,
5881 data, ind);
5882
5883 return QDF_STATUS_E_FAILURE;
5884}
5885
5886QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08005887 struct nan_datapath_confirm_event *ev)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005888{
5889 if (wmi_handle->ops->extract_ndp_confirm)
5890 return wmi_handle->ops->extract_ndp_confirm(wmi_handle,
5891 data, ev);
5892
5893 return QDF_STATUS_E_FAILURE;
5894}
5895
5896QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08005897 uint8_t *data, struct nan_datapath_responder_rsp *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005898{
5899 if (wmi_handle->ops->extract_ndp_responder_rsp)
5900 return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle,
5901 data, rsp);
5902
5903 return QDF_STATUS_E_FAILURE;
5904}
5905
5906QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data,
Naveen Rawat3aa16c42018-02-02 15:13:05 -08005907 struct nan_datapath_end_rsp_event *rsp)
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005908{
5909 if (wmi_handle->ops->extract_ndp_end_rsp)
5910 return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle,
5911 data, rsp);
5912
5913 return QDF_STATUS_E_FAILURE;
5914}
5915
5916QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data,
5917 struct nan_datapath_end_indication_event **ind)
5918{
5919 if (wmi_handle->ops->extract_ndp_end_ind)
5920 return wmi_handle->ops->extract_ndp_end_ind(wmi_handle,
5921 data, ind);
5922
5923 return QDF_STATUS_E_FAILURE;
5924}
Naveen Rawatd42ce382018-01-09 17:54:41 -08005925
5926QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data,
5927 struct nan_datapath_sch_update_event *ind)
5928{
5929 if (wmi_handle->ops->extract_ndp_sch_update)
5930 return wmi_handle->ops->extract_ndp_sch_update(wmi_handle,
5931 data, ind);
5932
5933 return QDF_STATUS_E_FAILURE;
5934}
Naveen Rawat4f1e2ac2017-12-14 13:24:31 -08005935#endif
yeshwanth sriram guntuka07a15b82017-09-01 17:56:07 +05305936QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl,
5937 struct wmi_btm_config *params)
5938{
5939 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5940
5941 if (wmi_handle->ops->send_btm_config)
5942 return wmi_handle->ops->send_btm_config(wmi_handle,
5943 params);
5944
5945 return QDF_STATUS_E_FAILURE;
5946}
Arif Hussainc5bfe072017-12-27 16:23:45 -08005947
5948QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl,
5949 struct wmi_obss_detection_cfg_param *obss_cfg_param)
5950{
5951 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5952
5953 if (wmi_handle->ops->send_obss_detection_cfg_cmd)
5954 return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle,
5955 obss_cfg_param);
5956
5957 return QDF_STATUS_E_FAILURE;
5958}
Arif Hussain33d98502018-01-12 13:15:04 -08005959
5960QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl,
5961 uint8_t *data,
5962 struct wmi_obss_detect_info
5963 *info)
5964{
5965 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
5966
5967 if (wmi_handle->ops->extract_obss_detection_info)
5968 return wmi_handle->ops->extract_obss_detection_info(data, info);
5969
5970 return QDF_STATUS_E_FAILURE;
5971}
Vignesh Viswanathan7f057772018-01-18 19:06:40 +05305972
5973QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl,
5974 struct wmi_11k_offload_params *params)
5975{
5976 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5977
5978 if (wmi_handle->ops->send_offload_11k_cmd)
5979 return wmi_handle->ops->send_offload_11k_cmd(
5980 wmi_handle, params);
5981
5982 return QDF_STATUS_E_FAILURE;
5983}
5984
5985QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
5986 struct wmi_invoke_neighbor_report_params *params)
5987{
5988 wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
5989
5990 if (wmi_handle->ops->send_invoke_neighbor_report_cmd)
5991 return wmi_handle->ops->send_invoke_neighbor_report_cmd(
5992 wmi_handle, params);
5993
5994 return QDF_STATUS_E_FAILURE;
5995}
Himanshu Agarwal157e4782018-01-24 22:24:17 +05305996
5997#ifdef WLAN_SUPPORT_GREEN_AP
5998QDF_STATUS wmi_extract_green_ap_egap_status_info(
5999 void *wmi_hdl, uint8_t *evt_buf,
6000 struct wlan_green_ap_egap_status_info *egap_status_info_params)
6001{
6002 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6003
6004 if (wmi_handle->ops->extract_green_ap_egap_status_info)
6005 return wmi_handle->ops->extract_green_ap_egap_status_info(
6006 evt_buf, egap_status_info_params);
6007
6008 return QDF_STATUS_E_FAILURE;
6009}
6010#endif
Arif Hussainec5cd3c2018-01-22 01:19:36 -08006011
6012QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl,
6013 uint32_t vdev_id,
6014 bool enable)
6015{
6016 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6017
6018 if (wmi_handle->ops->send_bss_color_change_enable_cmd)
6019 return wmi_handle->ops->send_bss_color_change_enable_cmd(
6020 wmi_handle, vdev_id, enable);
6021
6022 return QDF_STATUS_E_FAILURE;
6023}
6024
6025QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl,
6026 struct wmi_obss_color_collision_cfg_param *cfg)
6027{
6028 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6029
6030 if (wmi_handle->ops->send_obss_color_collision_cfg_cmd)
6031 return wmi_handle->ops->send_obss_color_collision_cfg_cmd(
6032 wmi_handle, cfg);
6033
6034 return QDF_STATUS_E_FAILURE;
6035}
6036
6037QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl,
6038 uint8_t *data, struct wmi_obss_color_collision_info *info)
6039{
6040 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6041
6042 if (wmi_handle->ops->extract_obss_color_collision_info)
6043 return wmi_handle->ops->extract_obss_color_collision_info(data,
6044 info);
6045
6046 return QDF_STATUS_E_FAILURE;
6047}
Naveen Rawat26305452018-02-02 15:18:33 -08006048
6049wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
6050 WMI_HOST_WLAN_PHY_MODE phymode)
6051{
6052 /*
6053 * this API does translation between host only strcutres, hence
6054 * does not need separate TLV, non-TLV definitions
6055 */
6056
6057 if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX)
6058 return mode_to_width[phymode];
6059 else
6060 return WMI_HOST_CHAN_WIDTH_20;
6061}
Naveen Rawat963ee942018-04-13 16:38:36 -07006062
6063#ifdef QCA_SUPPORT_CP_STATS
6064QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
6065 struct wmi_host_congestion_stats *stats)
6066{
6067 if (wmi_handle->ops->extract_cca_stats)
6068 return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf,
6069 stats);
6070
6071 return QDF_STATUS_E_FAILURE;
6072}
6073#endif /* QCA_SUPPORT_CP_STATS */
Shashikala Prabhu5f65ac72018-05-16 10:08:09 +05306074
6075#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
6076QDF_STATUS
6077wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl,
6078 struct dfs_radar_found_params *params)
6079{
6080 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6081
6082 if (wmi_handle->ops->send_dfs_average_radar_params_cmd)
6083 return wmi_handle->ops->send_dfs_average_radar_params_cmd(
6084 wmi_handle, params);
6085
6086 return QDF_STATUS_E_FAILURE;
6087}
6088
6089QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf,
6090 uint32_t *dfs_status_check)
6091{
6092 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6093
6094 if (wmi_handle->ops->extract_dfs_status_from_fw)
6095 return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle,
6096 evt_buf, dfs_status_check);
6097
6098 return QDF_STATUS_E_FAILURE;
6099}
6100#endif
c_cgodav758d99f2017-02-13 10:14:42 +05306101
6102#ifdef OL_ATH_SMART_LOGGING
6103QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl,
6104 uint32_t param)
6105{
6106 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6107
6108 if (wmi_handle->ops->send_smart_logging_enable_cmd)
6109 return wmi_handle->ops->send_smart_logging_enable_cmd(
6110 wmi_handle,
6111 param);
6112
6113 return QDF_STATUS_E_FAILURE;
6114}
6115
6116QDF_STATUS
6117wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl,
6118 struct wmi_debug_fatal_events *param)
6119{
6120 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6121
6122 if (wmi_handle->ops->send_smart_logging_fatal_cmd)
6123 return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle,
6124 param);
6125
6126 return QDF_STATUS_E_FAILURE;
6127}
6128
6129QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl,
6130 void *evt_buf,
6131 struct wmi_debug_fatal_events *ev)
6132{
6133 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
6134
6135 if (wmi->ops->extract_smartlog_event)
6136 return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev);
6137
6138 return QDF_STATUS_E_FAILURE;
6139}
6140#endif /* OL_ATH_SMART_LOGGING */
Rajeev Kumar Sirasanagandlad2d1a5e2018-03-02 21:12:16 +05306141
6142QDF_STATUS
6143wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl,
6144 struct wmi_roam_scan_stats_req *params)
6145{
6146 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6147
6148 if (wmi_handle->ops->send_roam_scan_stats_cmd)
6149 return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle,
6150 params);
6151
6152 return QDF_STATUS_E_FAILURE;
6153}
6154
6155QDF_STATUS
6156wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf,
6157 uint32_t *vdev_id,
6158 struct wmi_roam_scan_stats_res **res_param)
6159{
6160 if (wmi->ops->extract_roam_scan_stats_res_evt)
6161 return wmi->ops->extract_roam_scan_stats_res_evt(wmi,
6162 evt_buf,
6163 vdev_id, res_param);
6164
6165 return QDF_STATUS_E_FAILURE;
6166}
Pratik Gandhi3fd97d62018-09-17 16:47:12 +05306167
Gyanranjan Hazarikaff074e92018-10-04 11:26:20 -07006168QDF_STATUS
6169wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf,
6170 uint32_t *vdev_id,
6171 uint32_t *tx_status) {
6172 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
6173
6174 if (wmi->ops->extract_offload_bcn_tx_status_evt)
6175 return wmi->ops->extract_offload_bcn_tx_status_evt(wmi,
6176 evt_buf,
6177 vdev_id, tx_status);
6178
6179 return QDF_STATUS_E_FAILURE;
6180}
6181
Pratik Gandhi3fd97d62018-09-17 16:47:12 +05306182#ifdef OBSS_PD
6183QDF_STATUS
6184wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_hdl,
6185 struct wmi_host_obss_spatial_reuse_set_param
6186 *obss_spatial_reuse_param)
6187{
6188 wmi_unified_t wmi = (wmi_unified_t)wmi_hdl;
6189
6190 if (wmi->ops->send_obss_spatial_reuse_set)
6191 return wmi->ops->send_obss_spatial_reuse_set(wmi,
6192 obss_spatial_reuse_param);
6193
6194 return QDF_STATUS_E_FAILURE;
6195}
6196#endif
Shashikala Prabhub91325c2018-09-24 13:54:23 +05306197
6198QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl,
6199 uint32_t host_pdev_id,
6200 uint32_t *target_pdev_id)
6201{
6202 wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
6203
6204 if (wmi_handle->ops->convert_pdev_id_host_to_target) {
6205 *target_pdev_id =
6206 wmi_handle->ops->convert_pdev_id_host_to_target(
6207 host_pdev_id);
6208 return QDF_STATUS_SUCCESS;
6209 }
6210
6211 return QDF_STATUS_E_FAILURE;
6212}