Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1 | /* |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 3 | * |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 4 | * 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 Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 19 | #include "wmi_unified_priv.h" |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 20 | #include "wmi_unified_param.h" |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 21 | #include "qdf_module.h" |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 22 | |
Naveen Rawat | 2630545 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 23 | static const wmi_host_channel_width mode_to_width[WMI_HOST_MODE_MAX] = { |
| 24 | [WMI_HOST_MODE_11A] = WMI_HOST_CHAN_WIDTH_20, |
| 25 | [WMI_HOST_MODE_11G] = WMI_HOST_CHAN_WIDTH_20, |
| 26 | [WMI_HOST_MODE_11B] = WMI_HOST_CHAN_WIDTH_20, |
| 27 | [WMI_HOST_MODE_11GONLY] = WMI_HOST_CHAN_WIDTH_20, |
| 28 | [WMI_HOST_MODE_11NA_HT20] = WMI_HOST_CHAN_WIDTH_20, |
| 29 | [WMI_HOST_MODE_11NG_HT20] = WMI_HOST_CHAN_WIDTH_20, |
| 30 | [WMI_HOST_MODE_11AC_VHT20] = WMI_HOST_CHAN_WIDTH_20, |
| 31 | [WMI_HOST_MODE_11AC_VHT20_2G] = WMI_HOST_CHAN_WIDTH_20, |
| 32 | [WMI_HOST_MODE_11NA_HT40] = WMI_HOST_CHAN_WIDTH_40, |
| 33 | [WMI_HOST_MODE_11NG_HT40] = WMI_HOST_CHAN_WIDTH_40, |
| 34 | [WMI_HOST_MODE_11AC_VHT40] = WMI_HOST_CHAN_WIDTH_40, |
| 35 | [WMI_HOST_MODE_11AC_VHT40_2G] = WMI_HOST_CHAN_WIDTH_40, |
| 36 | [WMI_HOST_MODE_11AC_VHT80] = WMI_HOST_CHAN_WIDTH_80, |
| 37 | [WMI_HOST_MODE_11AC_VHT80_2G] = WMI_HOST_CHAN_WIDTH_80, |
| 38 | #if CONFIG_160MHZ_SUPPORT |
| 39 | [WMI_HOST_MODE_11AC_VHT80_80] = WMI_HOST_CHAN_WIDTH_80P80, |
| 40 | [WMI_HOST_MODE_11AC_VHT160] = WMI_HOST_CHAN_WIDTH_160, |
| 41 | #endif |
| 42 | |
| 43 | #if SUPPORT_11AX |
| 44 | [WMI_HOST_MODE_11AX_HE20] = WMI_HOST_CHAN_WIDTH_20, |
| 45 | [WMI_HOST_MODE_11AX_HE40] = WMI_HOST_CHAN_WIDTH_40, |
| 46 | [WMI_HOST_MODE_11AX_HE80] = WMI_HOST_CHAN_WIDTH_80, |
| 47 | [WMI_HOST_MODE_11AX_HE80_80] = WMI_HOST_CHAN_WIDTH_80P80, |
| 48 | [WMI_HOST_MODE_11AX_HE160] = WMI_HOST_CHAN_WIDTH_160, |
| 49 | [WMI_HOST_MODE_11AX_HE20_2G] = WMI_HOST_CHAN_WIDTH_20, |
| 50 | [WMI_HOST_MODE_11AX_HE40_2G] = WMI_HOST_CHAN_WIDTH_40, |
| 51 | [WMI_HOST_MODE_11AX_HE80_2G] = WMI_HOST_CHAN_WIDTH_80, |
| 52 | #endif |
| 53 | }; |
| 54 | |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 55 | /** |
| 56 | * wmi_unified_vdev_create_send() - send VDEV create command to fw |
| 57 | * @wmi_handle: wmi handle |
| 58 | * @param: pointer to hold vdev create parameter |
| 59 | * @macaddr: vdev mac address |
| 60 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 61 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 62 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 63 | QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 64 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 65 | struct vdev_create_params *param) |
| 66 | { |
| 67 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 68 | |
| 69 | if (wmi_handle->ops->send_vdev_create_cmd) |
| 70 | return wmi_handle->ops->send_vdev_create_cmd(wmi_handle, |
| 71 | macaddr, param); |
| 72 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 73 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | /** |
| 77 | * wmi_unified_vdev_delete_send() - send VDEV delete command to fw |
| 78 | * @wmi_handle: wmi handle |
| 79 | * @if_id: vdev id |
| 80 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 81 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 82 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 83 | QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 84 | uint8_t if_id) |
| 85 | { |
| 86 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 87 | |
| 88 | if (wmi_handle->ops->send_vdev_delete_cmd) |
| 89 | return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle, |
| 90 | if_id); |
| 91 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 92 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | /** |
| 96 | * wmi_unified_vdev_stop_send() - send vdev stop command to fw |
| 97 | * @wmi: wmi handle |
| 98 | * @vdev_id: vdev id |
| 99 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 100 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 101 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 102 | QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 103 | uint8_t vdev_id) |
| 104 | { |
| 105 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 106 | |
| 107 | if (wmi_handle->ops->send_vdev_stop_cmd) |
| 108 | return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle, |
| 109 | vdev_id); |
| 110 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 111 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | /** |
| 115 | * wmi_unified_vdev_down_send() - send vdev down command to fw |
| 116 | * @wmi: wmi handle |
| 117 | * @vdev_id: vdev id |
| 118 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 119 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 120 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 121 | QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 122 | { |
| 123 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 124 | |
| 125 | if (wmi_handle->ops->send_vdev_down_cmd) |
| 126 | return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id); |
| 127 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 128 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | /** |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 132 | * wmi_unified_vdev_start_send() - send vdev start command to fw |
| 133 | * @wmi: wmi handle |
| 134 | * @vdev_id: vdev id |
| 135 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 136 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 137 | */ |
| 138 | QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl, |
| 139 | struct vdev_start_params *req) |
| 140 | { |
| 141 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 142 | |
| 143 | if (wmi_handle->ops->send_vdev_start_cmd) |
| 144 | return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req); |
| 145 | |
| 146 | return QDF_STATUS_E_FAILURE; |
| 147 | } |
| 148 | |
| 149 | /** |
Chaithanya Garrepalli | 8a9c38d | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 150 | * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw |
| 151 | * @wmi: wmi handle |
| 152 | * @req: pointer to hold nac rssi request data |
| 153 | * |
| 154 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 155 | */ |
| 156 | QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl, |
| 157 | struct vdev_scan_nac_rssi_params *req) |
| 158 | { |
| 159 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 160 | |
| 161 | if (wmi_handle->ops->send_vdev_set_nac_rssi_cmd) |
| 162 | return wmi_handle->ops->send_vdev_set_nac_rssi_cmd(wmi_handle, req); |
| 163 | |
| 164 | return QDF_STATUS_E_FAILURE; |
| 165 | } |
| 166 | |
| 167 | /** |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 168 | * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid |
| 169 | * @wmi: wmi handle |
| 170 | * @restart_params: vdev restart params |
| 171 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 172 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 173 | */ |
| 174 | QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl, |
| 175 | struct hidden_ssid_vdev_restart_params *restart_params) |
| 176 | { |
| 177 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 178 | |
| 179 | if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd) |
| 180 | return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd( |
| 181 | wmi_handle, restart_params); |
| 182 | |
| 183 | return QDF_STATUS_E_FAILURE; |
| 184 | } |
| 185 | |
| 186 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 187 | * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw |
| 188 | * @wmi: wmi handle |
| 189 | * @peer_addr: peer mac address |
| 190 | * @param: pointer to hold peer flush tid parameter |
| 191 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 192 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 193 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 194 | QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 195 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 196 | struct peer_flush_params *param) |
| 197 | { |
| 198 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 199 | |
| 200 | if (wmi_handle->ops->send_peer_flush_tids_cmd) |
| 201 | return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle, |
| 202 | peer_addr, param); |
| 203 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 204 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | /** |
| 208 | * wmi_unified_peer_delete_send() - send PEER delete command to fw |
| 209 | * @wmi: wmi handle |
| 210 | * @peer_addr: peer mac addr |
| 211 | * @vdev_id: vdev id |
| 212 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 213 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 214 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 215 | QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 216 | uint8_t |
| 217 | peer_addr[IEEE80211_ADDR_LEN], |
| 218 | uint8_t vdev_id) |
| 219 | { |
| 220 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 221 | |
| 222 | if (wmi_handle->ops->send_peer_delete_cmd) |
| 223 | return wmi_handle->ops->send_peer_delete_cmd(wmi_handle, |
| 224 | peer_addr, vdev_id); |
| 225 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 226 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | /** |
| 230 | * wmi_set_peer_param() - set peer parameter in fw |
| 231 | * @wmi_ctx: wmi handle |
| 232 | * @peer_addr: peer mac address |
| 233 | * @param : pointer to hold peer set parameter |
| 234 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 235 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 236 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 237 | QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 238 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 239 | struct peer_set_params *param) |
| 240 | { |
| 241 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 242 | |
| 243 | if (wmi_handle->ops->send_peer_param_cmd) |
| 244 | return wmi_handle->ops->send_peer_param_cmd(wmi_handle, |
| 245 | peer_addr, param); |
| 246 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 247 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | /** |
| 251 | * wmi_unified_vdev_up_send() - send vdev up command in fw |
| 252 | * @wmi: wmi handle |
| 253 | * @bssid: bssid |
| 254 | * @vdev_up_params: pointer to hold vdev up parameter |
| 255 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 256 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 257 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 258 | QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 259 | uint8_t bssid[IEEE80211_ADDR_LEN], |
| 260 | struct vdev_up_params *params) |
| 261 | { |
| 262 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 263 | |
| 264 | if (wmi_handle->ops->send_vdev_up_cmd) |
| 265 | return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid, |
| 266 | params); |
| 267 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 268 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | /** |
| 272 | * wmi_unified_peer_create_send() - send peer create command to fw |
| 273 | * @wmi: wmi handle |
| 274 | * @peer_addr: peer mac address |
| 275 | * @peer_type: peer type |
| 276 | * @vdev_id: vdev id |
| 277 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 278 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 279 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 280 | QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 281 | struct peer_create_params *param) |
| 282 | { |
| 283 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 284 | |
| 285 | if (wmi_handle->ops->send_peer_create_cmd) |
| 286 | return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param); |
| 287 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 288 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 289 | } |
| 290 | |
Leo Chang | eee4087 | 2016-09-28 13:43:36 -0700 | [diff] [blame] | 291 | /** |
| 292 | * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue |
| 293 | * setup command to fw |
| 294 | * @wmi: wmi handle |
| 295 | * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters |
| 296 | * |
| 297 | * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure |
| 298 | */ |
| 299 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl, |
| 300 | struct rx_reorder_queue_setup_params *param) |
| 301 | { |
| 302 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 303 | |
| 304 | if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd) |
| 305 | return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd( |
| 306 | wmi_handle, param); |
| 307 | |
| 308 | return QDF_STATUS_E_FAILURE; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue |
| 313 | * remove command to fw |
| 314 | * @wmi: wmi handle |
| 315 | * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters |
| 316 | * |
| 317 | * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure |
| 318 | */ |
| 319 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl, |
| 320 | struct rx_reorder_queue_remove_params *param) |
| 321 | { |
| 322 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 323 | |
| 324 | if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd) |
| 325 | return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd( |
| 326 | wmi_handle, param); |
| 327 | |
| 328 | return QDF_STATUS_E_FAILURE; |
| 329 | } |
| 330 | |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 331 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 332 | /** |
| 333 | * wmi_unified_green_ap_ps_send() - enable green ap powersave command |
| 334 | * @wmi_handle: wmi handle |
| 335 | * @value: value |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 336 | * @pdev_id: pdev id to have radio context |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 337 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 338 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 339 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 340 | QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 341 | uint32_t value, uint8_t pdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 342 | { |
| 343 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 344 | |
| 345 | if (wmi_handle->ops->send_green_ap_ps_cmd) |
| 346 | return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 347 | pdev_id); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 348 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 349 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 350 | } |
| 351 | #else |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 352 | QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 353 | uint32_t value, uint8_t pdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 354 | { |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 355 | return QDF_STATUS_SUCCESS; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 356 | } |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 357 | #endif /* WLAN_SUPPORT_GREEN_AP */ |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 358 | |
| 359 | /** |
| 360 | * wmi_unified_pdev_utf_cmd() - send utf command to fw |
| 361 | * @wmi_handle: wmi handle |
| 362 | * @param: pointer to pdev_utf_params |
| 363 | * @mac_id: mac id to have radio context |
| 364 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 365 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 366 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 367 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 368 | wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, |
| 369 | struct pdev_utf_params *param, |
| 370 | uint8_t mac_id) |
| 371 | { |
| 372 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 373 | |
| 374 | if (wmi_handle->ops->send_pdev_utf_cmd) |
| 375 | return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param, |
| 376 | mac_id); |
| 377 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 378 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 382 | * wmi_unified_pdev_param_send() - set pdev parameters |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 383 | * @wmi_handle: wmi handle |
| 384 | * @param: pointer to pdev parameter |
| 385 | * @mac_id: radio context |
| 386 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 387 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures, |
| 388 | * errno on failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 389 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 390 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 391 | wmi_unified_pdev_param_send(void *wmi_hdl, |
| 392 | struct pdev_params *param, |
| 393 | uint8_t mac_id) |
| 394 | { |
| 395 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 396 | |
| 397 | if (wmi_handle->ops->send_pdev_param_cmd) |
| 398 | return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param, |
| 399 | mac_id); |
| 400 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 401 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 402 | } |
| 403 | |
| 404 | /** |
| 405 | * wmi_unified_suspend_send() - WMI suspend function |
| 406 | * @param wmi_handle : handle to WMI. |
| 407 | * @param param : pointer to hold suspend parameter |
| 408 | * @mac_id: radio context |
| 409 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 410 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 411 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 412 | QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 413 | struct suspend_params *param, |
| 414 | uint8_t mac_id) |
| 415 | { |
| 416 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 417 | |
| 418 | if (wmi_handle->ops->send_suspend_cmd) |
| 419 | return wmi_handle->ops->send_suspend_cmd(wmi_handle, param, |
| 420 | mac_id); |
| 421 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 422 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 423 | } |
| 424 | |
| 425 | /** |
| 426 | * wmi_unified_resume_send - WMI resume function |
| 427 | * @param wmi_handle : handle to WMI. |
| 428 | * @mac_id: radio context |
| 429 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 430 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 431 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 432 | QDF_STATUS wmi_unified_resume_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 433 | uint8_t mac_id) |
| 434 | { |
| 435 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 436 | |
| 437 | if (wmi_handle->ops->send_resume_cmd) |
| 438 | return wmi_handle->ops->send_resume_cmd(wmi_handle, |
| 439 | mac_id); |
| 440 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 441 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 442 | } |
| 443 | |
Will Huang | 422ac9a | 2017-11-17 13:19:16 +0800 | [diff] [blame] | 444 | #ifdef FEATURE_WLAN_D0WOW |
| 445 | /** |
| 446 | * wmi_unified_d0wow_enable_send() - WMI d0 wow enable function |
| 447 | * @param wmi_handle: handle to WMI. |
| 448 | * @mac_id: radio context |
| 449 | * |
| 450 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 451 | */ |
| 452 | QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl, |
| 453 | uint8_t mac_id) |
| 454 | { |
| 455 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 456 | |
| 457 | if (wmi_handle->ops->send_d0wow_enable_cmd) |
| 458 | return wmi_handle->ops->send_d0wow_enable_cmd( |
| 459 | wmi_handle, mac_id); |
| 460 | |
| 461 | return QDF_STATUS_E_FAILURE; |
| 462 | } |
| 463 | |
| 464 | /** |
| 465 | * wmi_unified_d0wow_disable_send() - WMI d0 wow disable function |
| 466 | * @param wmi_handle: handle to WMI. |
| 467 | * @mac_id: radio context |
| 468 | * |
| 469 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 470 | */ |
| 471 | QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl, |
| 472 | uint8_t mac_id) |
| 473 | { |
| 474 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 475 | |
| 476 | if (wmi_handle->ops->send_d0wow_disable_cmd) |
| 477 | return wmi_handle->ops->send_d0wow_disable_cmd( |
| 478 | wmi_handle, mac_id); |
| 479 | |
| 480 | return QDF_STATUS_E_FAILURE; |
| 481 | } |
| 482 | #endif |
| 483 | |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 484 | /** |
| 485 | * wmi_unified_wow_enable_send() - WMI wow enable function |
| 486 | * @param wmi_handle : handle to WMI. |
| 487 | * @param param : pointer to hold wow enable parameter |
| 488 | * @mac_id: radio context |
| 489 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 490 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 491 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 492 | QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 493 | struct wow_cmd_params *param, |
| 494 | uint8_t mac_id) |
| 495 | { |
| 496 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 497 | |
| 498 | if (wmi_handle->ops->send_wow_enable_cmd) |
| 499 | return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param, |
| 500 | mac_id); |
| 501 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 502 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 503 | } |
| 504 | |
| 505 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 506 | * wmi_unified_wow_wakeup_send() - WMI wow wakeup function |
| 507 | * @param wmi_hdl : handle to WMI. |
| 508 | * |
| 509 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 510 | */ |
| 511 | QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl) |
| 512 | { |
| 513 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 514 | |
| 515 | if (wmi_handle->ops->send_wow_wakeup_cmd) |
| 516 | return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle); |
| 517 | |
| 518 | return QDF_STATUS_E_FAILURE; |
| 519 | } |
| 520 | |
| 521 | /** |
| 522 | * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function |
| 523 | * @param wmi_handle : handle to WMI. |
| 524 | * @param: pointer to wow wakeup event parameter structure |
| 525 | * |
| 526 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 527 | */ |
| 528 | QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl, |
| 529 | struct wow_add_wakeup_params *param) |
| 530 | { |
| 531 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 532 | |
| 533 | if (wmi->ops->send_wow_add_wakeup_event_cmd) |
| 534 | return wmi->ops->send_wow_add_wakeup_event_cmd(wmi, |
| 535 | param); |
| 536 | |
| 537 | return QDF_STATUS_E_FAILURE; |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function |
| 542 | * @param wmi_handle : handle to WMI. |
| 543 | * @param: pointer to wow wakeup pattern parameter structure |
| 544 | * |
| 545 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 546 | */ |
| 547 | QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl, |
| 548 | struct wow_add_wakeup_pattern_params *param) |
| 549 | { |
| 550 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 551 | |
| 552 | if (wmi->ops->send_wow_add_wakeup_pattern_cmd) |
| 553 | return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param); |
| 554 | |
| 555 | return QDF_STATUS_E_FAILURE; |
| 556 | } |
| 557 | |
| 558 | /** |
| 559 | * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function |
| 560 | * @param wmi_handle : handle to WMI. |
| 561 | * @param: pointer to wow wakeup pattern parameter structure |
| 562 | * |
| 563 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 564 | */ |
| 565 | QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl, |
| 566 | struct wow_remove_wakeup_pattern_params *param) |
| 567 | { |
| 568 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 569 | |
| 570 | if (wmi->ops->send_wow_remove_wakeup_pattern_cmd) |
| 571 | return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param); |
| 572 | |
| 573 | return QDF_STATUS_E_FAILURE; |
| 574 | } |
| 575 | |
| 576 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 577 | * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters |
| 578 | * @wma_ctx: wma context |
| 579 | * @peer_addr: peer mac address |
| 580 | * @param: pointer to ap_ps parameter structure |
| 581 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 582 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 583 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 584 | QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 585 | uint8_t *peer_addr, |
| 586 | struct ap_ps_params *param) |
| 587 | { |
| 588 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 589 | |
| 590 | if (wmi_handle->ops->send_set_ap_ps_param_cmd) |
| 591 | return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle, |
| 592 | peer_addr, |
| 593 | param); |
| 594 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 595 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 596 | } |
| 597 | |
| 598 | /** |
| 599 | * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters |
| 600 | * @wma_ctx: wma context |
| 601 | * @peer_addr: peer mac address |
| 602 | * @param: pointer to sta_ps parameter structure |
| 603 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 604 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 605 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 606 | QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 607 | struct sta_ps_params *param) |
| 608 | { |
| 609 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 610 | |
| 611 | if (wmi_handle->ops->send_set_sta_ps_param_cmd) |
| 612 | return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle, |
| 613 | param); |
| 614 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 615 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 616 | } |
| 617 | |
| 618 | /** |
| 619 | * wmi_crash_inject() - inject fw crash |
| 620 | * @wma_handle: wma handle |
Jeff Johnson | bbd428c | 2018-05-06 17:02:16 -0700 | [diff] [blame] | 621 | * @param: ponirt to crash inject parameter structure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 622 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 623 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 624 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 625 | QDF_STATUS wmi_crash_inject(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 626 | struct crash_inject *param) |
| 627 | { |
| 628 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 629 | |
| 630 | if (wmi_handle->ops->send_crash_inject_cmd) |
| 631 | return wmi_handle->ops->send_crash_inject_cmd(wmi_handle, |
| 632 | param); |
| 633 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 634 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 635 | } |
| 636 | |
Wen Gong | ca17401 | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 637 | #ifdef FEATURE_FW_LOG_PARSING |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 638 | /** |
| 639 | * wmi_unified_dbglog_cmd_send() - set debug log level |
| 640 | * @param wmi_handle : handle to WMI. |
| 641 | * @param param : pointer to hold dbglog level parameter |
| 642 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 643 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 644 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 645 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 646 | wmi_unified_dbglog_cmd_send(void *wmi_hdl, |
| 647 | struct dbglog_params *dbglog_param) |
| 648 | { |
| 649 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 650 | |
| 651 | if (wmi_handle->ops->send_dbglog_cmd) |
| 652 | return wmi_handle->ops->send_dbglog_cmd(wmi_handle, |
| 653 | dbglog_param); |
| 654 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 655 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 656 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 657 | qdf_export_symbol(wmi_unified_dbglog_cmd_send); |
Wen Gong | ca17401 | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 658 | #endif |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 659 | |
| 660 | /** |
| 661 | * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function |
| 662 | * @param wmi_handle : handle to WMI. |
| 663 | * @param macaddr : MAC address |
| 664 | * @param param : pointer to hold vdev set parameter |
| 665 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 666 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 667 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 668 | QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 669 | struct vdev_set_params *param) |
| 670 | { |
| 671 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 672 | |
| 673 | if (wmi_handle->ops->send_vdev_set_param_cmd) |
| 674 | return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle, |
| 675 | param); |
| 676 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 677 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 678 | } |
| 679 | |
| 680 | /** |
| 681 | * wmi_unified_stats_request_send() - WMI request stats function |
| 682 | * @param wmi_handle : handle to WMI. |
| 683 | * @param macaddr : MAC address |
| 684 | * @param param : pointer to hold stats request parameter |
| 685 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 686 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 687 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 688 | QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 689 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 690 | struct stats_request_params *param) |
| 691 | { |
| 692 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 693 | |
| 694 | if (wmi_handle->ops->send_stats_request_cmd) |
| 695 | return wmi_handle->ops->send_stats_request_cmd(wmi_handle, |
| 696 | macaddr, param); |
| 697 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 698 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 699 | } |
| 700 | |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 701 | #ifdef CONFIG_MCL |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 702 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 703 | * wmi_unified_packet_log_enable_send() - WMI request stats function |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 704 | * @param wmi_handle : handle to WMI. |
| 705 | * @param macaddr : MAC address |
| 706 | * @param param : pointer to hold stats request parameter |
| 707 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 708 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 709 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 710 | QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 711 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 712 | struct packet_enable_params *param) |
| 713 | { |
| 714 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 715 | |
| 716 | if (wmi_handle->ops->send_packet_log_enable_cmd) |
| 717 | return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle, |
| 718 | macaddr, param); |
| 719 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 720 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 721 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 722 | #else |
| 723 | /** |
| 724 | * wmi_unified_packet_log_enable_send() - WMI request stats function |
| 725 | * @param wmi_handle : handle to WMI. |
| 726 | * @param macaddr : MAC address |
| 727 | * @param param : pointer to hold stats request parameter |
| 728 | * |
| 729 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 730 | */ |
| 731 | QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 732 | WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 733 | { |
| 734 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 735 | |
| 736 | if (wmi_handle->ops->send_packet_log_enable_cmd) |
| 737 | return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle, |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 738 | PKTLOG_EVENT, mac_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 739 | |
| 740 | return QDF_STATUS_E_FAILURE; |
| 741 | } |
| 742 | |
| 743 | #endif |
| 744 | /** |
| 745 | * wmi_unified_packet_log_disable__send() - WMI pktlog disable function |
| 746 | * @param wmi_handle : handle to WMI. |
| 747 | * @param PKTLOG_EVENT : packet log event |
| 748 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 749 | */ |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 750 | QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 751 | { |
| 752 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 753 | |
| 754 | if (wmi_handle->ops->send_packet_log_disable_cmd) |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 755 | return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle, |
| 756 | mac_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 757 | |
| 758 | return QDF_STATUS_E_FAILURE; |
| 759 | } |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 760 | |
| 761 | /** |
| 762 | * wmi_unified_beacon_send_cmd() - WMI beacon send function |
| 763 | * @param wmi_handle : handle to WMI. |
| 764 | * @param macaddr : MAC address |
| 765 | * @param param : pointer to hold beacon send cmd parameter |
| 766 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 767 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 768 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 769 | QDF_STATUS wmi_unified_beacon_send_cmd(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 770 | struct beacon_params *param) |
| 771 | { |
| 772 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 773 | |
| 774 | if (wmi_handle->ops->send_beacon_send_cmd) |
| 775 | return wmi_handle->ops->send_beacon_send_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 776 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 777 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 778 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 779 | } |
| 780 | |
| 781 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 782 | * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function |
| 783 | * @param wmi_handle : handle to WMI. |
| 784 | * @param macaddr : MAC address |
| 785 | * @param param : pointer to hold beacon send cmd parameter |
| 786 | * |
| 787 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 788 | */ |
| 789 | QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl, |
| 790 | struct beacon_tmpl_params *param) |
| 791 | { |
| 792 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 793 | |
| 794 | if (wmi_handle->ops->send_beacon_tmpl_send_cmd) |
| 795 | return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle, |
| 796 | param); |
| 797 | |
| 798 | return QDF_STATUS_E_FAILURE; |
| 799 | } |
| 800 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 801 | * wmi_unified_peer_assoc_send() - WMI peer assoc function |
| 802 | * @param wmi_handle : handle to WMI. |
| 803 | * @param macaddr : MAC address |
| 804 | * @param param : pointer to peer assoc parameter |
| 805 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 806 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 807 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 808 | QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 809 | struct peer_assoc_params *param) |
| 810 | { |
| 811 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 812 | |
| 813 | if (wmi_handle->ops->send_peer_assoc_cmd) |
| 814 | return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 815 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 816 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 817 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 818 | } |
| 819 | |
| 820 | /** |
| 821 | * wmi_unified_scan_start_cmd_send() - WMI scan start function |
| 822 | * @param wmi_handle : handle to WMI. |
| 823 | * @param macaddr : MAC address |
| 824 | * @param param : pointer to hold scan start cmd parameter |
| 825 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 826 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 827 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 828 | QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 1d83e35 | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 829 | struct scan_req_params *param) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 830 | { |
| 831 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 832 | |
| 833 | if (wmi_handle->ops->send_scan_start_cmd) |
| 834 | return wmi_handle->ops->send_scan_start_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 835 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 836 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 837 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 838 | } |
| 839 | |
| 840 | /** |
| 841 | * wmi_unified_scan_stop_cmd_send() - WMI scan start function |
| 842 | * @param wmi_handle : handle to WMI. |
| 843 | * @param macaddr : MAC address |
| 844 | * @param param : pointer to hold scan start cmd parameter |
| 845 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 846 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 847 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 848 | QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 1d83e35 | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 849 | struct scan_cancel_param *param) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 850 | { |
| 851 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 852 | |
| 853 | if (wmi_handle->ops->send_scan_stop_cmd) |
| 854 | return wmi_handle->ops->send_scan_stop_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 855 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 856 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 857 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 858 | } |
| 859 | |
| 860 | /** |
| 861 | * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function |
| 862 | * @param wmi_handle : handle to WMI. |
| 863 | * @param macaddr : MAC address |
| 864 | * @param param : pointer to hold scan channel list parameter |
| 865 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 866 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 867 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 868 | QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 869 | struct scan_chan_list_params *param) |
| 870 | { |
| 871 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 872 | |
| 873 | if (wmi_handle->ops->send_scan_chan_list_cmd) |
| 874 | return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 875 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 876 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 877 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 878 | } |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 879 | |
| 880 | /** |
| 881 | * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer |
| 882 | * @wmi_hdl : handle to WMI. |
| 883 | * @param : pointer to hold mgmt cmd parameter |
| 884 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 885 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 886 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 887 | QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 888 | struct wmi_mgmt_params *param) |
| 889 | { |
| 890 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 891 | |
| 892 | if (wmi_handle->ops->send_mgmt_cmd) |
| 893 | return wmi_handle->ops->send_mgmt_cmd(wmi_handle, |
| 894 | param); |
| 895 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 896 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 897 | } |
| 898 | |
| 899 | /** |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 900 | * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer |
| 901 | * @wmi_hdl : handle to WMI. |
| 902 | * @param : pointer to hold offchan data cmd parameter |
| 903 | * |
| 904 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 905 | */ |
| 906 | QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, |
| 907 | struct wmi_offchan_data_tx_params *param) |
| 908 | { |
| 909 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 910 | |
| 911 | if (wmi_handle->ops->send_offchan_data_tx_cmd) |
| 912 | return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle, |
| 913 | param); |
| 914 | |
| 915 | return QDF_STATUS_E_FAILURE; |
| 916 | } |
| 917 | |
| 918 | /** |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 919 | * wmi_unified_modem_power_state() - set modem power state to fw |
| 920 | * @wmi_hdl: wmi handle |
| 921 | * @param_value: parameter value |
| 922 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 923 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 924 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 925 | QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 926 | uint32_t param_value) |
| 927 | { |
| 928 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 929 | |
| 930 | if (wmi_handle->ops->send_modem_power_state_cmd) |
| 931 | return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle, |
| 932 | param_value); |
| 933 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 934 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 935 | } |
| 936 | |
| 937 | /** |
| 938 | * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw |
| 939 | * @wmi_hdl: wmi handle |
| 940 | * @vdev_id: vdev id |
| 941 | * @val: value |
| 942 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 943 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 944 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 945 | QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 946 | uint32_t vdev_id, uint8_t val) |
| 947 | { |
| 948 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 949 | |
| 950 | if (wmi_handle->ops->send_set_sta_ps_mode_cmd) |
| 951 | return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle, |
| 952 | vdev_id, val); |
| 953 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 954 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 955 | } |
| 956 | |
| 957 | /** |
| 958 | * wmi_set_mimops() - set MIMO powersave |
| 959 | * @wmi_hdl: wmi handle |
| 960 | * @vdev_id: vdev id |
| 961 | * @value: value |
| 962 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 963 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 964 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 965 | QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value) |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 966 | { |
| 967 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 968 | |
| 969 | if (wmi_handle->ops->send_set_mimops_cmd) |
| 970 | return wmi_handle->ops->send_set_mimops_cmd(wmi_handle, |
| 971 | vdev_id, value); |
| 972 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 973 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 974 | } |
| 975 | |
| 976 | /** |
| 977 | * wmi_set_smps_params() - set smps params |
| 978 | * @wmi_hdl: wmi handle |
| 979 | * @vdev_id: vdev id |
| 980 | * @value: value |
| 981 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 982 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 983 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 984 | QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 985 | int value) |
| 986 | { |
| 987 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 988 | |
| 989 | if (wmi_handle->ops->send_set_smps_params_cmd) |
| 990 | return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle, |
| 991 | vdev_id, value); |
| 992 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 993 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 994 | } |
| 995 | |
| 996 | |
| 997 | /** |
| 998 | * wmi_set_p2pgo_oppps_req() - send p2p go opp power save request to fw |
| 999 | * @wmi_hdl: wmi handle |
| 1000 | * @opps: p2p opp power save parameters |
| 1001 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1002 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1003 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1004 | QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1005 | struct p2p_ps_params *oppps) |
| 1006 | { |
| 1007 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1008 | |
| 1009 | if (wmi_handle->ops->send_set_p2pgo_oppps_req_cmd) |
| 1010 | return wmi_handle->ops->send_set_p2pgo_oppps_req_cmd(wmi_handle, |
| 1011 | oppps); |
| 1012 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1013 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1014 | } |
| 1015 | |
| 1016 | /** |
| 1017 | * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw |
| 1018 | * @wmi_hdl: wmi handle |
| 1019 | * @noa: p2p power save parameters |
| 1020 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1021 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1022 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1023 | QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1024 | struct p2p_ps_params *noa) |
| 1025 | { |
| 1026 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1027 | |
| 1028 | if (wmi_handle->ops->send_set_p2pgo_noa_req_cmd) |
| 1029 | return wmi_handle->ops->send_set_p2pgo_noa_req_cmd(wmi_handle, |
| 1030 | noa); |
| 1031 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1032 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1033 | } |
| 1034 | |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 1035 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 1036 | /** |
| 1037 | * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw |
| 1038 | * @wmi_hdl: wmi handle |
| 1039 | * @param: p2p listen offload start parameters |
| 1040 | * |
| 1041 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1042 | */ |
| 1043 | QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl, |
| 1044 | struct p2p_lo_start *param) |
| 1045 | { |
| 1046 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1047 | |
| 1048 | if (!wmi_handle) { |
| 1049 | WMI_LOGE("wmi handle is null"); |
| 1050 | return QDF_STATUS_E_INVAL; |
| 1051 | } |
| 1052 | |
| 1053 | if (wmi_handle->ops->send_p2p_lo_start_cmd) |
| 1054 | return wmi_handle->ops->send_p2p_lo_start_cmd(wmi_handle, |
| 1055 | param); |
| 1056 | |
| 1057 | return QDF_STATUS_E_FAILURE; |
| 1058 | } |
| 1059 | |
| 1060 | /** |
| 1061 | * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw |
| 1062 | * @wmi_hdl: wmi handle |
| 1063 | * @vdev_id: vdev id |
| 1064 | * |
| 1065 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1066 | */ |
| 1067 | QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id) |
| 1068 | { |
| 1069 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1070 | |
| 1071 | if (!wmi_handle) { |
| 1072 | WMI_LOGE("wmi handle is null"); |
| 1073 | return QDF_STATUS_E_INVAL; |
| 1074 | } |
| 1075 | |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 1076 | if (wmi_handle->ops->send_p2p_lo_stop_cmd) |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 1077 | return wmi_handle->ops->send_p2p_lo_stop_cmd(wmi_handle, |
| 1078 | vdev_id); |
| 1079 | |
| 1080 | return QDF_STATUS_E_FAILURE; |
| 1081 | } |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 1082 | #endif /* End of FEATURE_P2P_LISTEN_OFFLOAD*/ |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 1083 | |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1084 | /** |
| 1085 | * wmi_get_temperature() - get pdev temperature req |
| 1086 | * @wmi_hdl: wmi handle |
| 1087 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1088 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1089 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1090 | QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl) |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1091 | { |
| 1092 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1093 | |
| 1094 | if (wmi_handle->ops->send_get_temperature_cmd) |
| 1095 | return wmi_handle->ops->send_get_temperature_cmd(wmi_handle); |
| 1096 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1097 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1098 | } |
| 1099 | |
| 1100 | /** |
| 1101 | * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command |
| 1102 | * @wmi_hdl: wmi handle |
Jeff Johnson | bbd428c | 2018-05-06 17:02:16 -0700 | [diff] [blame] | 1103 | * @end_set_sta_ps_mode_cmd: cmd parameter strcture |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1104 | * |
| 1105 | * This function sets the trigger |
| 1106 | * uapsd params such as service interval, delay interval |
| 1107 | * and suspend interval which will be used by the firmware |
| 1108 | * to send trigger frames periodically when there is no |
| 1109 | * traffic on the transmit side. |
| 1110 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1111 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1112 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1113 | QDF_STATUS |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1114 | wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, |
| 1115 | struct sta_uapsd_trig_params *param) |
| 1116 | { |
| 1117 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1118 | |
| 1119 | if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd) |
| 1120 | return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle, |
| 1121 | param); |
| 1122 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1123 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 1124 | } |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1125 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1126 | #ifdef WLAN_FEATURE_DSRC |
| 1127 | QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_hdl, |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1128 | struct ocb_timing_advert_param *timing_advert) |
| 1129 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1130 | if (wmi_hdl->ops->send_ocb_start_timing_advert_cmd) |
| 1131 | return wmi_hdl->ops->send_ocb_start_timing_advert_cmd(wmi_hdl, |
| 1132 | timing_advert); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1133 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1134 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1135 | } |
| 1136 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1137 | QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_hdl, |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1138 | struct ocb_timing_advert_param *timing_advert) |
| 1139 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1140 | if (wmi_hdl->ops->send_ocb_stop_timing_advert_cmd) |
| 1141 | return wmi_hdl->ops->send_ocb_stop_timing_advert_cmd(wmi_hdl, |
| 1142 | timing_advert); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1143 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1144 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1145 | } |
| 1146 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1147 | QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_hdl, |
| 1148 | struct ocb_utc_param *utc) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1149 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1150 | if (wmi_hdl->ops->send_ocb_set_utc_time_cmd) |
| 1151 | return wmi_hdl->ops->send_ocb_set_utc_time_cmd(wmi_hdl, utc); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1152 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1153 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1154 | } |
| 1155 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1156 | QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_hdl, |
| 1157 | struct ocb_get_tsf_timer_param *req) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1158 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1159 | if (wmi_hdl->ops->send_ocb_get_tsf_timer_cmd) |
| 1160 | return wmi_hdl->ops->send_ocb_get_tsf_timer_cmd(wmi_hdl, |
| 1161 | req->vdev_id); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1162 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1163 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1164 | } |
| 1165 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1166 | QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_hdl, |
| 1167 | struct ocb_dcc_get_stats_param *get_stats_param) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1168 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1169 | if (wmi_hdl->ops->send_dcc_get_stats_cmd) |
| 1170 | return wmi_hdl->ops->send_dcc_get_stats_cmd(wmi_hdl, |
| 1171 | get_stats_param); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1172 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1173 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1174 | } |
| 1175 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1176 | QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_hdl, |
| 1177 | struct ocb_dcc_clear_stats_param *clear_stats_param) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1178 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1179 | if (wmi_hdl->ops->send_dcc_clear_stats_cmd) |
| 1180 | return wmi_hdl->ops->send_dcc_clear_stats_cmd(wmi_hdl, |
| 1181 | clear_stats_param->vdev_id, |
| 1182 | clear_stats_param->dcc_stats_bitmap); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1183 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1184 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1185 | } |
| 1186 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1187 | QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_hdl, |
| 1188 | struct ocb_dcc_update_ndl_param *update_ndl_param) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1189 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1190 | if (wmi_hdl->ops->send_dcc_update_ndl_cmd) |
| 1191 | return wmi_hdl->ops->send_dcc_update_ndl_cmd(wmi_hdl, |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1192 | update_ndl_param); |
| 1193 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1194 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1195 | } |
| 1196 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1197 | QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_hdl, |
| 1198 | struct ocb_config *config) |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1199 | { |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1200 | if (wmi_hdl->ops->send_ocb_set_config_cmd) |
| 1201 | return wmi_hdl->ops->send_ocb_set_config_cmd(wmi_hdl, |
| 1202 | config); |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1203 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1204 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 1205 | } |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1206 | |
Zhang Qian | 11c0de3 | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 1207 | QDF_STATUS |
| 1208 | wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_hdl, |
| 1209 | void *evt_buf, |
| 1210 | uint32_t *status) |
| 1211 | { |
| 1212 | if (wmi_hdl->ops->extract_ocb_chan_config_resp) |
| 1213 | return wmi_hdl->ops->extract_ocb_chan_config_resp(wmi_hdl, |
| 1214 | evt_buf, |
| 1215 | status); |
| 1216 | |
| 1217 | return QDF_STATUS_E_FAILURE; |
| 1218 | } |
| 1219 | |
| 1220 | QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_hdl, |
| 1221 | void *evt_buf, |
| 1222 | struct ocb_get_tsf_timer_response *resp) |
| 1223 | { |
| 1224 | if (wmi_hdl->ops->extract_ocb_tsf_timer) |
| 1225 | return wmi_hdl->ops->extract_ocb_tsf_timer(wmi_hdl, |
| 1226 | evt_buf, |
| 1227 | resp); |
| 1228 | |
| 1229 | return QDF_STATUS_E_FAILURE; |
| 1230 | } |
| 1231 | |
| 1232 | QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_hdl, |
| 1233 | void *evt_buf, struct ocb_dcc_update_ndl_response *resp) |
| 1234 | { |
| 1235 | if (wmi_hdl->ops->extract_dcc_update_ndl_resp) |
| 1236 | return wmi_hdl->ops->extract_dcc_update_ndl_resp(wmi_hdl, |
| 1237 | evt_buf, |
| 1238 | resp); |
| 1239 | |
| 1240 | return QDF_STATUS_E_FAILURE; |
| 1241 | } |
| 1242 | |
| 1243 | QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_hdl, |
| 1244 | void *evt_buf, |
| 1245 | struct ocb_dcc_get_stats_response **resp) |
| 1246 | { |
| 1247 | if (wmi_hdl->ops->extract_dcc_stats) |
| 1248 | return wmi_hdl->ops->extract_dcc_stats(wmi_hdl, |
| 1249 | evt_buf, |
| 1250 | resp); |
| 1251 | |
| 1252 | return QDF_STATUS_E_FAILURE; |
| 1253 | } |
| 1254 | #endif |
| 1255 | |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1256 | /** |
| 1257 | * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc scheduler |
| 1258 | * @wmi_handle: wmi handle |
| 1259 | * @mcc_adaptive_scheduler: enable/disable |
| 1260 | * |
| 1261 | * This function enable/disable mcc adaptive scheduler in fw. |
| 1262 | * |
Jeff Johnson | eb83ef0 | 2018-05-06 00:09:31 -0700 | [diff] [blame] | 1263 | * Return: QDF_STATUS_SUCCESS for success or error code |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1264 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1265 | QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd( |
Govind Singh | 4df4714 | 2016-04-16 19:24:23 -0700 | [diff] [blame] | 1266 | void *wmi_hdl, uint32_t mcc_adaptive_scheduler, |
| 1267 | uint32_t pdev_id) |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1268 | { |
| 1269 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1270 | |
| 1271 | if (wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd) |
| 1272 | return wmi_handle->ops->send_set_enable_disable_mcc_adaptive_scheduler_cmd(wmi_handle, |
Govind Singh | 4df4714 | 2016-04-16 19:24:23 -0700 | [diff] [blame] | 1273 | mcc_adaptive_scheduler, pdev_id); |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1274 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1275 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1276 | } |
| 1277 | |
| 1278 | /** |
| 1279 | * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency |
| 1280 | * @wmi: wmi handle |
| 1281 | * @mcc_channel: mcc channel |
| 1282 | * @mcc_channel_time_latency: MCC channel time latency. |
| 1283 | * |
| 1284 | * Currently used to set time latency for an MCC vdev/adapter using operating |
| 1285 | * channel of it and channel number. The info is provided run time using |
| 1286 | * iwpriv command: iwpriv <wlan0 | p2p0> setMccLatency <latency in ms>. |
| 1287 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1288 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1289 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1290 | QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd(void *wmi_hdl, |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1291 | uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency) |
| 1292 | { |
| 1293 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1294 | |
| 1295 | if (wmi_handle->ops->send_set_mcc_channel_time_latency_cmd) |
| 1296 | return wmi_handle->ops->send_set_mcc_channel_time_latency_cmd(wmi_handle, |
| 1297 | mcc_channel_freq, |
| 1298 | mcc_channel_time_latency); |
| 1299 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1300 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1301 | } |
| 1302 | |
| 1303 | /** |
| 1304 | * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota |
| 1305 | * @wmi: wmi handle |
| 1306 | * @adapter_1_chan_number: adapter 1 channel number |
| 1307 | * @adapter_1_quota: adapter 1 quota |
| 1308 | * @adapter_2_chan_number: adapter 2 channel number |
| 1309 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1310 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1311 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1312 | QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1313 | uint32_t adapter_1_chan_freq, |
| 1314 | uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq) |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1315 | { |
| 1316 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1317 | |
| 1318 | if (wmi_handle->ops->send_set_mcc_channel_time_quota_cmd) |
| 1319 | return wmi_handle->ops->send_set_mcc_channel_time_quota_cmd(wmi_handle, |
| 1320 | adapter_1_chan_freq, |
| 1321 | adapter_1_quota, |
| 1322 | adapter_2_chan_freq); |
| 1323 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1324 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1325 | } |
| 1326 | |
| 1327 | /** |
| 1328 | * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw |
| 1329 | * @wmi_handle: Pointer to wmi handle |
| 1330 | * @thermal_info: Thermal command information |
| 1331 | * |
| 1332 | * This function sends the thermal management command |
| 1333 | * to the firmware |
| 1334 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1335 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1336 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1337 | QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1338 | struct thermal_cmd_params *thermal_info) |
| 1339 | { |
| 1340 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1341 | |
| 1342 | if (wmi_handle->ops->send_set_thermal_mgmt_cmd) |
| 1343 | return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle, |
| 1344 | thermal_info); |
| 1345 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1346 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1347 | } |
| 1348 | |
| 1349 | |
| 1350 | /** |
| 1351 | * wmi_unified_lro_config_cmd() - process the LRO config command |
| 1352 | * @wmi: Pointer to wmi handle |
| 1353 | * @wmi_lro_cmd: Pointer to LRO configuration parameters |
| 1354 | * |
| 1355 | * This function sends down the LRO configuration parameters to |
| 1356 | * the firmware to enable LRO, sets the TCP flags and sets the |
| 1357 | * seed values for the toeplitz hash generation |
| 1358 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1359 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1360 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1361 | QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1362 | struct wmi_lro_config_cmd_t *wmi_lro_cmd) |
| 1363 | { |
| 1364 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1365 | |
| 1366 | if (wmi_handle->ops->send_lro_config_cmd) |
| 1367 | return wmi_handle->ops->send_lro_config_cmd(wmi_handle, |
| 1368 | wmi_lro_cmd); |
| 1369 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1370 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1371 | } |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1372 | |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1373 | #ifdef CONFIG_MCL |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1374 | /** |
Poddar, Siddarth | 98281c4 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1375 | * wmi_unified_peer_rate_report_cmd() - process the peer rate report command |
| 1376 | * @wmi_hdl: Pointer to wmi handle |
| 1377 | * @rate_report_params: Pointer to peer rate report parameters |
| 1378 | * |
| 1379 | * |
| 1380 | * Return: QDF_STATUS_SUCCESS for success otherwise failure |
| 1381 | */ |
| 1382 | QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, |
| 1383 | struct wmi_peer_rate_report_params *rate_report_params) |
| 1384 | { |
| 1385 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1386 | |
| 1387 | if (wmi_handle->ops->send_peer_rate_report_cmd) |
| 1388 | return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle, |
| 1389 | rate_report_params); |
| 1390 | |
| 1391 | return QDF_STATUS_E_FAILURE; |
| 1392 | } |
| 1393 | |
| 1394 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1395 | * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL |
| 1396 | * @wmi_hdl: wmi handle |
| 1397 | * @param: bcn ll cmd parameter |
| 1398 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1399 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1400 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1401 | QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1402 | wmi_bcn_send_from_host_cmd_fixed_param *param) |
| 1403 | { |
| 1404 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1405 | |
| 1406 | if (wmi_handle->ops->send_bcn_buf_ll_cmd) |
| 1407 | return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle, |
| 1408 | param); |
| 1409 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1410 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1411 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1412 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1413 | |
| 1414 | /** |
| 1415 | * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters |
| 1416 | * @wmi_hdl: wmi handle |
| 1417 | * @vdev_id: vdev id |
| 1418 | * @max_retries: max retries |
| 1419 | * @retry_interval: retry interval |
| 1420 | * This function sets sta query related parameters in fw. |
| 1421 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1422 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1423 | */ |
| 1424 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1425 | QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1426 | uint8_t vdev_id, uint32_t max_retries, |
| 1427 | uint32_t retry_interval) |
| 1428 | { |
| 1429 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1430 | |
| 1431 | if (wmi_handle->ops->send_set_sta_sa_query_param_cmd) |
| 1432 | return wmi_handle->ops->send_set_sta_sa_query_param_cmd(wmi_handle, |
| 1433 | vdev_id, max_retries, |
| 1434 | retry_interval); |
| 1435 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1436 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1437 | } |
| 1438 | |
| 1439 | /** |
| 1440 | * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters |
| 1441 | * @wmi_hdl: wmi handle |
| 1442 | * @params: sta keep alive parameter |
| 1443 | * |
| 1444 | * This function sets keep alive related parameters in fw. |
| 1445 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1446 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1447 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1448 | QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1449 | struct sta_params *params) |
| 1450 | { |
| 1451 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1452 | |
| 1453 | if (wmi_handle->ops->send_set_sta_keep_alive_cmd) |
| 1454 | return wmi_handle->ops->send_set_sta_keep_alive_cmd(wmi_handle, |
| 1455 | params); |
| 1456 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1457 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1458 | } |
| 1459 | |
| 1460 | /** |
| 1461 | * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params |
| 1462 | * @wmi_hdl: wmi handle |
| 1463 | * @if_id: vdev id |
| 1464 | * @gtx_info: GTX config params |
| 1465 | * |
| 1466 | * This function set GTX related params in firmware. |
| 1467 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1468 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1469 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1470 | QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1471 | struct wmi_gtx_config *gtx_info) |
| 1472 | { |
| 1473 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1474 | |
| 1475 | if (wmi_handle->ops->send_vdev_set_gtx_cfg_cmd) |
| 1476 | return wmi_handle->ops->send_vdev_set_gtx_cfg_cmd(wmi_handle, |
| 1477 | if_id, gtx_info); |
| 1478 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1479 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1480 | } |
| 1481 | |
| 1482 | /** |
| 1483 | * wmi_unified_process_update_edca_param() - update EDCA params |
| 1484 | * @wmi_hdl: wmi handle |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1485 | * @vdev_id: vdev id. |
Kiran Kumar Lokere | a536eac | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 1486 | * @mu_edca_param: mu_edca_param. |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1487 | * @wmm_vparams: edca parameters |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1488 | * |
| 1489 | * This function updates EDCA parameters to the target |
| 1490 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1491 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1492 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1493 | QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, |
Kiran Kumar Lokere | a536eac | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 1494 | uint8_t vdev_id, bool mu_edca_param, |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1495 | struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1496 | { |
| 1497 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1498 | |
| 1499 | if (wmi_handle->ops->send_process_update_edca_param_cmd) |
| 1500 | return wmi_handle->ops->send_process_update_edca_param_cmd(wmi_handle, |
Kiran Kumar Lokere | a536eac | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 1501 | vdev_id, mu_edca_param, wmm_vparams); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1502 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1503 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1504 | } |
| 1505 | |
| 1506 | /** |
| 1507 | * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw |
| 1508 | * @wmi_hdl: wmi handle |
| 1509 | * @vdev_id: vdev id |
| 1510 | * @probe_rsp_info: probe response info |
| 1511 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1512 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1513 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1514 | QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1515 | uint8_t vdev_id, |
Krunal Soni | 8942686 | 2017-11-14 15:42:48 -0800 | [diff] [blame] | 1516 | struct wmi_probe_resp_params *probe_rsp_info) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1517 | { |
| 1518 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1519 | |
| 1520 | if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd) |
| 1521 | return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle, |
Krunal Soni | 8942686 | 2017-11-14 15:42:48 -0800 | [diff] [blame] | 1522 | vdev_id, probe_rsp_info); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1523 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1524 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1525 | } |
| 1526 | |
| 1527 | /** |
Himanshu Agarwal | 712622f | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 1528 | * wmi_unified_setup_install_key_cmd - send key to install to fw |
| 1529 | * @wmi_hdl: wmi handle |
| 1530 | * @key_params: key parameters |
| 1531 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1532 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | 712622f | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 1533 | */ |
| 1534 | QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, |
| 1535 | struct set_key_params *key_params) |
| 1536 | { |
| 1537 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1538 | |
| 1539 | if (wmi_handle->ops->send_setup_install_key_cmd) |
| 1540 | return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle, |
| 1541 | key_params); |
| 1542 | |
| 1543 | return QDF_STATUS_E_FAILURE; |
| 1544 | } |
| 1545 | |
| 1546 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1547 | * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go |
| 1548 | * @wma_handle: wma handle |
| 1549 | * @vdev_id: vdev id |
| 1550 | * @p2p_ie: p2p IE |
| 1551 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1552 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1553 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1554 | QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, |
Vivek | c582309 | 2018-03-22 23:27:21 +0530 | [diff] [blame] | 1555 | uint32_t vdev_id, uint8_t *p2p_ie) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1556 | { |
| 1557 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1558 | |
| 1559 | if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd) |
| 1560 | return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle, |
| 1561 | vdev_id, p2p_ie); |
| 1562 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1563 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1564 | } |
| 1565 | |
| 1566 | /** |
| 1567 | * wmi_unified_set_gateway_params_cmd() - set gateway parameters |
| 1568 | * @wmi_hdl: wmi handle |
| 1569 | * @req: gateway parameter update request structure |
| 1570 | * |
| 1571 | * This function reads the incoming @req and fill in the destination |
| 1572 | * WMI structure and sends down the gateway configs down to the firmware |
| 1573 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1574 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; |
| 1575 | * error number otherwise |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1576 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1577 | QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1578 | struct gateway_update_req_param *req) |
| 1579 | { |
| 1580 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1581 | |
| 1582 | if (wmi_handle->ops->send_set_gateway_params_cmd) |
| 1583 | return wmi_handle->ops->send_set_gateway_params_cmd(wmi_handle, |
| 1584 | req); |
| 1585 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1586 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1587 | } |
| 1588 | |
| 1589 | /** |
| 1590 | * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring |
| 1591 | * @wmi_hdl: wmi handle |
| 1592 | * @req: rssi monitoring request structure |
| 1593 | * |
| 1594 | * This function reads the incoming @req and fill in the destination |
| 1595 | * WMI structure and send down the rssi monitoring configs down to the firmware |
| 1596 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1597 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; |
| 1598 | * error number otherwise |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1599 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1600 | QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1601 | struct rssi_monitor_param *req) |
| 1602 | { |
| 1603 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1604 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1605 | if (wmi_handle->ops->send_set_rssi_monitoring_cmd) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1606 | return wmi_handle->ops->send_set_rssi_monitoring_cmd(wmi_handle, |
| 1607 | req); |
| 1608 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1609 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1610 | } |
| 1611 | |
| 1612 | /** |
| 1613 | * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI |
| 1614 | * @wmi_hdl: wmi handle |
| 1615 | * @psetoui: OUI parameters |
| 1616 | * |
| 1617 | * set scan probe OUI parameters in firmware |
| 1618 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1619 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1620 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1621 | QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1622 | struct scan_mac_oui *psetoui) |
| 1623 | { |
| 1624 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1625 | |
| 1626 | if (wmi_handle->ops->send_scan_probe_setoui_cmd) |
| 1627 | return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle, |
| 1628 | psetoui); |
| 1629 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1630 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1631 | } |
| 1632 | |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1633 | #ifdef CONFIG_MCL |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1634 | /** |
| 1635 | * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters |
| 1636 | * @wmi_hdl: wmi handle |
| 1637 | * @scan_cmd_fp: scan related parameters |
| 1638 | * @roam_req: roam related parameters |
| 1639 | * |
| 1640 | * This function reads the incoming @roam_req and fill in the destination |
| 1641 | * WMI structure and send down the roam scan configs down to the firmware |
| 1642 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1643 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1644 | */ |
| 1645 | QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl, |
| 1646 | wmi_start_scan_cmd_fixed_param *scan_cmd_fp, |
| 1647 | struct roam_offload_scan_params *roam_req) |
| 1648 | { |
| 1649 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1650 | |
| 1651 | if (wmi_handle->ops->send_roam_scan_offload_mode_cmd) |
| 1652 | return wmi_handle->ops->send_roam_scan_offload_mode_cmd( |
| 1653 | wmi_handle, scan_cmd_fp, roam_req); |
| 1654 | |
| 1655 | return QDF_STATUS_E_FAILURE; |
| 1656 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1657 | #endif |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1658 | |
| 1659 | /** |
| 1660 | * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi |
| 1661 | * parameters |
| 1662 | * @wmi_hdl: wmi handle |
| 1663 | * @roam_req: roam rssi related parameters |
| 1664 | * |
| 1665 | * This function reads the incoming @roam_req and fill in the destination |
| 1666 | * WMI structure and send down the roam scan rssi configs down to the firmware |
| 1667 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1668 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1669 | */ |
| 1670 | QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl, |
| 1671 | struct roam_offload_scan_rssi_params |
| 1672 | *roam_req) |
| 1673 | { |
| 1674 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1675 | |
| 1676 | if (wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd) |
| 1677 | return wmi_handle->ops->send_roam_scan_offload_rssi_thresh_cmd( |
| 1678 | wmi_handle, roam_req); |
| 1679 | |
| 1680 | return QDF_STATUS_E_FAILURE; |
| 1681 | } |
| 1682 | |
Varun Reddy Yeturu | 412601c | 2017-07-20 09:45:01 -0700 | [diff] [blame] | 1683 | QDF_STATUS wmi_unified_roam_mawc_params_cmd( |
| 1684 | void *wmi_hdl, struct wmi_mawc_roam_params *params) |
| 1685 | { |
| 1686 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1687 | |
| 1688 | if (wmi_handle->ops->send_roam_mawc_params_cmd) |
| 1689 | return wmi_handle->ops->send_roam_mawc_params_cmd( |
| 1690 | wmi_handle, params); |
| 1691 | |
| 1692 | return QDF_STATUS_E_FAILURE; |
| 1693 | } |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1694 | /** |
| 1695 | * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist, |
| 1696 | * blacklist and preferred list |
| 1697 | * @wmi_hdl: wmi handle |
| 1698 | * @roam_req: roam scan lists related parameters |
| 1699 | * |
| 1700 | * This function reads the incoming @roam_req and fill in the destination |
| 1701 | * WMI structure and send down the different roam scan lists down to the fw |
| 1702 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1703 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | c5e4d89 | 2016-03-09 15:25:44 +0530 | [diff] [blame] | 1704 | */ |
| 1705 | QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl, |
| 1706 | struct roam_scan_filter_params *roam_req) |
| 1707 | { |
| 1708 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1709 | |
| 1710 | if (wmi_handle->ops->send_roam_scan_filter_cmd) |
| 1711 | return wmi_handle->ops->send_roam_scan_filter_cmd( |
| 1712 | wmi_handle, roam_req); |
| 1713 | |
| 1714 | return QDF_STATUS_E_FAILURE; |
| 1715 | } |
| 1716 | |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1717 | #ifdef IPA_OFFLOAD |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1718 | /** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter |
| 1719 | * @wmi_hdl: wmi handle |
| 1720 | * @ipa_offload: ipa offload control parameter |
| 1721 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1722 | * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures, |
| 1723 | * error number otherwise |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1724 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1725 | QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1726 | struct ipa_uc_offload_control_params *ipa_offload) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1727 | { |
| 1728 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1729 | |
Amar Singhal | ca7aba3 | 2018-09-18 10:14:30 -0700 | [diff] [blame] | 1730 | if (!wmi_handle) |
| 1731 | return QDF_STATUS_E_FAILURE; |
| 1732 | |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1733 | if (wmi_handle->ops->send_ipa_offload_control_cmd) |
| 1734 | return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle, |
| 1735 | ipa_offload); |
| 1736 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1737 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1738 | } |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1739 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1740 | |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1741 | |
| 1742 | /** |
| 1743 | * wmi_unified_plm_stop_cmd() - plm stop request |
| 1744 | * @wmi_hdl: wmi handle |
| 1745 | * @plm: plm request parameters |
| 1746 | * |
| 1747 | * This function request FW to stop PLM. |
| 1748 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1749 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1750 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1751 | QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1752 | const struct plm_req_params *plm) |
| 1753 | { |
| 1754 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1755 | |
| 1756 | if (wmi_handle->ops->send_plm_stop_cmd) |
| 1757 | return wmi_handle->ops->send_plm_stop_cmd(wmi_handle, |
| 1758 | plm); |
| 1759 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1760 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1761 | } |
| 1762 | |
| 1763 | /** |
| 1764 | * wmi_unified_plm_start_cmd() - plm start request |
| 1765 | * @wmi_hdl: wmi handle |
| 1766 | * @plm: plm request parameters |
| 1767 | * |
| 1768 | * This function request FW to start PLM. |
| 1769 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1770 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1771 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1772 | QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1773 | const struct plm_req_params *plm, |
| 1774 | uint32_t *gchannel_list) |
| 1775 | { |
| 1776 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1777 | |
| 1778 | if (wmi_handle->ops->send_plm_start_cmd) |
| 1779 | return wmi_handle->ops->send_plm_start_cmd(wmi_handle, |
| 1780 | plm, gchannel_list); |
| 1781 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1782 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1783 | } |
| 1784 | |
| 1785 | /** |
| 1786 | * send_pno_stop_cmd() - PNO stop request |
| 1787 | * @wmi_hdl: wmi handle |
| 1788 | * @vdev_id: vdev id |
| 1789 | * |
| 1790 | * This function request FW to stop ongoing PNO operation. |
| 1791 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1792 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1793 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1794 | QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1795 | { |
| 1796 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1797 | |
| 1798 | if (wmi_handle->ops->send_pno_stop_cmd) |
| 1799 | return wmi_handle->ops->send_pno_stop_cmd(wmi_handle, |
| 1800 | vdev_id); |
| 1801 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1802 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1803 | } |
| 1804 | |
| 1805 | /** |
| 1806 | * wmi_unified_pno_start_cmd() - PNO start request |
| 1807 | * @wmi_hdl: wmi handle |
| 1808 | * @pno: PNO request |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1809 | * |
| 1810 | * This function request FW to start PNO request. |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1811 | * Request: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1812 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1813 | #ifdef FEATURE_WLAN_SCAN_PNO |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1814 | QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1815 | struct pno_scan_req_params *pno) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1816 | { |
| 1817 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1818 | |
| 1819 | if (wmi_handle->ops->send_pno_start_cmd) |
| 1820 | return wmi_handle->ops->send_pno_start_cmd(wmi_handle, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1821 | pno); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1822 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1823 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1824 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1825 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1826 | |
Varun Reddy Yeturu | eac038b | 2017-07-24 16:11:22 -0700 | [diff] [blame] | 1827 | /** |
| 1828 | * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration |
| 1829 | * @wmi_hdl: wmi handle |
| 1830 | * @params: Configuration parameters |
| 1831 | * |
| 1832 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1833 | */ |
| 1834 | QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, |
| 1835 | struct nlo_mawc_params *params) |
| 1836 | { |
| 1837 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1838 | |
| 1839 | if (wmi_handle->ops->send_nlo_mawc_cmd) |
| 1840 | return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params); |
| 1841 | |
| 1842 | return QDF_STATUS_E_FAILURE; |
| 1843 | } |
| 1844 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1845 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1846 | /** |
| 1847 | * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats |
| 1848 | * @wmi_hdl: wmi handle |
| 1849 | * @clear_req: ll stats clear request command params |
| 1850 | * @addr: mac address |
| 1851 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1852 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1853 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1854 | QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1855 | const struct ll_stats_clear_params *clear_req, |
| 1856 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1857 | { |
| 1858 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1859 | |
| 1860 | if (wmi_handle->ops->send_process_ll_stats_clear_cmd) |
| 1861 | return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle, |
| 1862 | clear_req, addr); |
| 1863 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1864 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1865 | } |
| 1866 | |
| 1867 | /** |
| 1868 | * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request |
| 1869 | * @wmi_hdl:wmi handle |
| 1870 | * @get_req:ll stats get request command params |
| 1871 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1872 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1873 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1874 | QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1875 | const struct ll_stats_get_params *get_req, |
| 1876 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1877 | { |
| 1878 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1879 | |
| 1880 | if (wmi_handle->ops->send_process_ll_stats_get_cmd) |
| 1881 | return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle, |
| 1882 | get_req, addr); |
| 1883 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1884 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1885 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1886 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1887 | |
| 1888 | /** |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1889 | * wmi_unified_congestion_request_cmd() - send request to fw to get CCA |
| 1890 | * @wmi_hdl: wma handle |
| 1891 | * @vdev_id: vdev id |
| 1892 | * |
| 1893 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1894 | */ |
| 1895 | QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, |
| 1896 | uint8_t vdev_id) |
| 1897 | { |
| 1898 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1899 | |
| 1900 | if (wmi_handle->ops->send_congestion_cmd) |
| 1901 | return wmi_handle->ops->send_congestion_cmd(wmi_handle, |
| 1902 | vdev_id); |
| 1903 | |
| 1904 | return QDF_STATUS_E_FAILURE; |
| 1905 | } |
| 1906 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1907 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1908 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1909 | * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request |
| 1910 | * @wmi_handle: wmi handle |
| 1911 | * @set_req: ll stats set request command params |
| 1912 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1913 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1914 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1915 | QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1916 | const struct ll_stats_set_params *set_req) |
| 1917 | { |
| 1918 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1919 | |
| 1920 | if (wmi_handle->ops->send_process_ll_stats_set_cmd) |
| 1921 | return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle, |
| 1922 | set_req); |
| 1923 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1924 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1925 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1926 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1927 | |
| 1928 | /** |
| 1929 | * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats |
| 1930 | * @wmi_handle: wmi handle |
| 1931 | * @rssi_req: get RSSI request |
| 1932 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1933 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1934 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1935 | QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1936 | { |
| 1937 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1938 | |
| 1939 | if (wmi_handle->ops->send_snr_request_cmd) |
| 1940 | return wmi_handle->ops->send_snr_request_cmd(wmi_handle); |
| 1941 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1942 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1943 | } |
| 1944 | |
| 1945 | /** |
| 1946 | * wmi_unified_snr_cmd() - get RSSI from fw |
| 1947 | * @wmi_handle: wmi handle |
| 1948 | * @vdev_id: vdev id |
| 1949 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1950 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1951 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1952 | QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1953 | { |
| 1954 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1955 | |
| 1956 | if (wmi_handle->ops->send_snr_cmd) |
| 1957 | return wmi_handle->ops->send_snr_cmd(wmi_handle, |
| 1958 | vdev_id); |
| 1959 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1960 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1961 | } |
| 1962 | |
| 1963 | /** |
| 1964 | * wmi_unified_link_status_req_cmd() - process link status request from UMAC |
| 1965 | * @wmi_handle: wmi handle |
| 1966 | * @link_status: get link params |
| 1967 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1968 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1969 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1970 | QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1971 | struct link_status_params *link_status) |
| 1972 | { |
| 1973 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1974 | |
| 1975 | if (wmi_handle->ops->send_link_status_req_cmd) |
| 1976 | return wmi_handle->ops->send_link_status_req_cmd(wmi_handle, |
| 1977 | link_status); |
| 1978 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1979 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1980 | } |
| 1981 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1982 | /** |
| 1983 | * wmi_unified_process_dhcp_ind() - process dhcp indication from SME |
| 1984 | * @wmi_handle: wmi handle |
| 1985 | * @ta_dhcp_ind: DHCP indication parameter |
| 1986 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1987 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1988 | */ |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1989 | #ifdef CONFIG_MCL |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1990 | QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1991 | wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind) |
| 1992 | { |
| 1993 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1994 | |
| 1995 | if (wmi_handle->ops->send_process_dhcp_ind_cmd) |
| 1996 | return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle, |
| 1997 | ta_dhcp_ind); |
| 1998 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1999 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2000 | } |
| 2001 | |
| 2002 | /** |
| 2003 | * wmi_unified_get_link_speed_cmd() -send command to get linkspeed |
| 2004 | * @wmi_handle: wmi handle |
| 2005 | * @pLinkSpeed: link speed info |
| 2006 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2007 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2008 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2009 | QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2010 | wmi_mac_addr peer_macaddr) |
| 2011 | { |
| 2012 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2013 | |
| 2014 | if (wmi_handle->ops->send_get_link_speed_cmd) |
| 2015 | return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle, |
| 2016 | peer_macaddr); |
| 2017 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2018 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2019 | } |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2020 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2021 | |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2022 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2023 | /** |
| 2024 | * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params |
| 2025 | * @wmi_handle: wmi handler |
| 2026 | * @egap_params: pointer to egap_params |
| 2027 | * |
| 2028 | * Return: 0 for success, otherwise appropriate error code |
| 2029 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2030 | QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2031 | struct wlan_green_ap_egap_params *egap_params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2032 | { |
| 2033 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2034 | |
| 2035 | if (wmi_handle->ops->send_egap_conf_params_cmd) |
| 2036 | return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle, |
| 2037 | egap_params); |
| 2038 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2039 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2040 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2041 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2042 | |
| 2043 | /** |
| 2044 | * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW |
| 2045 | * @wmi_handl: wmi handle |
| 2046 | * @cmd: Profiling command index |
| 2047 | * @value1: parameter1 value |
| 2048 | * @value2: parameter2 value |
| 2049 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2050 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2051 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2052 | QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2053 | uint32_t cmd, uint32_t value1, uint32_t value2) |
| 2054 | { |
| 2055 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2056 | |
| 2057 | if (wmi_handle->ops->send_fw_profiling_cmd) |
| 2058 | return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle, |
| 2059 | cmd, value1, value2); |
| 2060 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2061 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2062 | } |
| 2063 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2064 | /** |
Naveen Rawat | a5817e7 | 2017-10-26 18:50:19 -0700 | [diff] [blame] | 2065 | * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware |
| 2066 | * will wake up host after specified time is elapsed |
| 2067 | * @wmi_handle: wmi handle |
| 2068 | * @vdev_id: vdev id |
| 2069 | * @cookie: value to identify reason why host set up wake call. |
| 2070 | * @time: time in ms |
| 2071 | * |
| 2072 | * Return: QDF status |
| 2073 | */ |
| 2074 | QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id, |
| 2075 | uint32_t cookie, uint32_t time) |
| 2076 | { |
| 2077 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2078 | |
| 2079 | if (wmi_handle->ops->send_wow_timer_pattern_cmd) |
| 2080 | return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle, |
| 2081 | vdev_id, cookie, time); |
| 2082 | |
| 2083 | return QDF_STATUS_E_FAILURE; |
| 2084 | } |
| 2085 | |
| 2086 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2087 | * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter |
| 2088 | * @wmi_handle: wmi handle |
| 2089 | * @vdev_id: vdev id |
| 2090 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2091 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2092 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2093 | QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2094 | { |
| 2095 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2096 | |
| 2097 | if (wmi_handle->ops->send_nat_keepalive_en_cmd) |
| 2098 | return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle, |
| 2099 | vdev_id); |
| 2100 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2101 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2102 | } |
| 2103 | |
Paul Zhang | 92ab8d3 | 2017-12-08 16:08:00 +0800 | [diff] [blame] | 2104 | QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl, |
| 2105 | struct wlm_latency_level_param *param) |
| 2106 | { |
| 2107 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2108 | |
| 2109 | if (wmi_handle->ops->send_wlm_latency_level_cmd) |
| 2110 | return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle, |
| 2111 | param); |
| 2112 | |
| 2113 | return QDF_STATUS_E_FAILURE; |
| 2114 | } |
| 2115 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2116 | /** |
| 2117 | * wmi_unified_csa_offload_enable() - send CSA offload enable command |
| 2118 | * @wmi_hdl: wmi handle |
| 2119 | * @vdev_id: vdev id |
| 2120 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2121 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2122 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2123 | QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2124 | { |
| 2125 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2126 | |
| 2127 | if (wmi_handle->ops->send_csa_offload_enable_cmd) |
| 2128 | return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle, |
| 2129 | vdev_id); |
| 2130 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2131 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2132 | } |
Naveen Rawat | 42cd1e6 | 2017-05-13 15:56:57 -0700 | [diff] [blame] | 2133 | |
| 2134 | #ifdef WLAN_FEATURE_CIF_CFR |
| 2135 | QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, |
| 2136 | wmi_oem_dma_ring_cfg_req_fixed_param *cfg) |
| 2137 | { |
| 2138 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2139 | |
| 2140 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 2141 | return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg); |
| 2142 | |
| 2143 | return QDF_STATUS_E_FAILURE; |
| 2144 | } |
| 2145 | #endif |
| 2146 | |
Sathish Kumar | f396c72 | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 2147 | QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl, |
| 2148 | struct direct_buf_rx_cfg_req *cfg) |
| 2149 | { |
| 2150 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2151 | |
| 2152 | if (wmi_handle->ops->send_dbr_cfg_cmd) |
| 2153 | return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg); |
| 2154 | |
| 2155 | return QDF_STATUS_E_FAILURE; |
| 2156 | } |
| 2157 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2158 | /** |
| 2159 | * wmi_unified_start_oem_data_cmd() - start OEM data request to target |
| 2160 | * @wmi_handle: wmi handle |
| 2161 | * @startOemDataReq: start request params |
| 2162 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2163 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2164 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2165 | QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, |
Krishna Kumaar Natarajan | b16bb27 | 2016-07-21 15:02:44 -0700 | [diff] [blame] | 2166 | uint32_t data_len, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2167 | uint8_t *data) |
| 2168 | { |
| 2169 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2170 | |
| 2171 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 2172 | return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle, |
| 2173 | data_len, data); |
| 2174 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2175 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2176 | } |
| 2177 | |
| 2178 | /** |
| 2179 | * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter |
| 2180 | * @wmi_handle: wmi handle |
| 2181 | * @dfs_phyerr_filter_offload: is dfs phyerr filter offload |
| 2182 | * |
| 2183 | * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or |
| 2184 | * WMI_DFS_PHYERR_FILTER_DIS_CMDID command |
| 2185 | * to firmware based on phyerr filtering |
| 2186 | * offload status. |
| 2187 | * |
| 2188 | * Return: 1 success, 0 failure |
| 2189 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2190 | QDF_STATUS |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2191 | wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, |
| 2192 | bool dfs_phyerr_filter_offload) |
| 2193 | { |
| 2194 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2195 | |
| 2196 | if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd) |
| 2197 | return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle, |
| 2198 | dfs_phyerr_filter_offload); |
| 2199 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2200 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2201 | } |
| 2202 | |
| 2203 | #if !defined(REMOVE_PKT_LOG) |
| 2204 | /** |
| 2205 | * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target |
| 2206 | * @wmi_handle: wmi handle |
| 2207 | * @pktlog_event: pktlog event |
| 2208 | * @cmd_id: pktlog cmd id |
| 2209 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2210 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2211 | */ |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 2212 | #ifdef CONFIG_MCL |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2213 | QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2214 | WMI_PKTLOG_EVENT pktlog_event, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 2215 | uint32_t cmd_id, |
| 2216 | uint8_t user_triggered) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2217 | { |
| 2218 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2219 | |
| 2220 | if (wmi_handle->ops->send_pktlog_wmi_send_cmd) |
| 2221 | return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 2222 | pktlog_event, cmd_id, user_triggered); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2223 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2224 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2225 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2226 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2227 | #endif /* REMOVE_PKT_LOG */ |
| 2228 | |
| 2229 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2230 | * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target |
| 2231 | * @wmi_handle: wmi handle |
| 2232 | * @ptrn_id: pattern id |
| 2233 | * @vdev_id: vdev id |
| 2234 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2235 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2236 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2237 | QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2238 | uint8_t vdev_id) |
| 2239 | { |
| 2240 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2241 | |
| 2242 | if (wmi_handle->ops->send_wow_delete_pattern_cmd) |
| 2243 | return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle, |
| 2244 | ptrn_id, vdev_id); |
| 2245 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2246 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2247 | } |
| 2248 | |
| 2249 | /** |
| 2250 | * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw |
| 2251 | * @wmi_handle: wmi handle |
| 2252 | * |
| 2253 | * Sends host wakeup indication to FW. On receiving this indication, |
| 2254 | * FW will come out of WOW. |
| 2255 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2256 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2257 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2258 | QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2259 | { |
| 2260 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2261 | |
| 2262 | if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd) |
| 2263 | return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle); |
| 2264 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2265 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2266 | } |
| 2267 | |
| 2268 | /** |
| 2269 | * wmi_unified_del_ts_cmd() - send DELTS request to fw |
| 2270 | * @wmi_handle: wmi handle |
| 2271 | * @msg: delts params |
| 2272 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2273 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2274 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2275 | QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2276 | uint8_t ac) |
| 2277 | { |
| 2278 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2279 | |
| 2280 | if (wmi_handle->ops->send_del_ts_cmd) |
| 2281 | return wmi_handle->ops->send_del_ts_cmd(wmi_handle, |
| 2282 | vdev_id, ac); |
| 2283 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2284 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2285 | } |
| 2286 | |
| 2287 | /** |
| 2288 | * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw |
| 2289 | * @wmi_handle: handle to wmi |
| 2290 | * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests. |
| 2291 | * |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2292 | * A function to handle WMI_AGGR_QOS_REQ. This will send out |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2293 | * ADD_TS requestes to firmware in loop for all the ACs with |
| 2294 | * active flow. |
| 2295 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2296 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2297 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2298 | QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2299 | struct aggr_add_ts_param *aggr_qos_rsp_msg) |
| 2300 | { |
| 2301 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2302 | |
| 2303 | if (wmi_handle->ops->send_aggr_qos_cmd) |
| 2304 | return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle, |
| 2305 | aggr_qos_rsp_msg); |
| 2306 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2307 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2308 | } |
| 2309 | |
| 2310 | /** |
| 2311 | * wmi_unified_add_ts_cmd() - send ADDTS request to fw |
| 2312 | * @wmi_handle: wmi handle |
| 2313 | * @msg: ADDTS params |
| 2314 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2315 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2316 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2317 | QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2318 | struct add_ts_param *msg) |
| 2319 | { |
| 2320 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2321 | |
| 2322 | if (wmi_handle->ops->send_add_ts_cmd) |
| 2323 | return wmi_handle->ops->send_add_ts_cmd(wmi_handle, |
| 2324 | msg); |
| 2325 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2326 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2327 | } |
| 2328 | |
| 2329 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2330 | * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn |
| 2331 | * @wmi_handle: wmi handle |
| 2332 | * @pAddPeriodicTxPtrnParams: tx ptrn params |
| 2333 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2334 | * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2335 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2336 | QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2337 | struct periodic_tx_pattern * |
| 2338 | pAddPeriodicTxPtrnParams, |
| 2339 | uint8_t vdev_id) |
| 2340 | { |
| 2341 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2342 | |
| 2343 | if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd) |
| 2344 | return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle, |
| 2345 | pAddPeriodicTxPtrnParams, |
| 2346 | vdev_id); |
| 2347 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2348 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2349 | } |
| 2350 | |
| 2351 | /** |
| 2352 | * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn |
| 2353 | * @wmi_handle: wmi handle |
| 2354 | * @vdev_id: vdev id |
| 2355 | * @pattern_id: pattern id |
| 2356 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2357 | * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2358 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2359 | QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2360 | uint8_t vdev_id, |
| 2361 | uint8_t pattern_id) |
| 2362 | { |
| 2363 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2364 | |
| 2365 | if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd) |
| 2366 | return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle, |
| 2367 | vdev_id, |
| 2368 | pattern_id); |
| 2369 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2370 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2371 | } |
| 2372 | |
| 2373 | /** |
| 2374 | * wmi_unified_stats_ext_req_cmd() - request ext stats from fw |
| 2375 | * @wmi_handle: wmi handle |
| 2376 | * @preq: stats ext params |
| 2377 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2378 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2379 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2380 | QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2381 | struct stats_ext_params *preq) |
| 2382 | { |
| 2383 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2384 | |
| 2385 | if (wmi_handle->ops->send_stats_ext_req_cmd) |
| 2386 | return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle, |
| 2387 | preq); |
| 2388 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2389 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2390 | } |
| 2391 | |
| 2392 | /** |
| 2393 | * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw |
| 2394 | * @wmi_handle: wmi handle |
| 2395 | * @params: ext wow params |
| 2396 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2397 | * Return:QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2398 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2399 | QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2400 | struct ext_wow_params *params) |
| 2401 | { |
| 2402 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2403 | |
| 2404 | if (wmi_handle->ops->send_enable_ext_wow_cmd) |
| 2405 | return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle, |
| 2406 | params); |
| 2407 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2408 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2409 | } |
| 2410 | |
| 2411 | /** |
| 2412 | * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw |
| 2413 | * @wmi_handle: wmi handle |
| 2414 | * @appType2Params: app type2 params |
| 2415 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2416 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2417 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2418 | QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2419 | struct app_type2_params *appType2Params) |
| 2420 | { |
| 2421 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2422 | |
| 2423 | if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd) |
| 2424 | return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle, |
| 2425 | appType2Params); |
| 2426 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2427 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2428 | |
| 2429 | } |
| 2430 | |
| 2431 | /** |
| 2432 | * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware |
| 2433 | * @wmi_handle: wmi handle |
| 2434 | * @timer_val: auto shutdown timer value |
| 2435 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2436 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2437 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2438 | QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2439 | uint32_t timer_val) |
| 2440 | { |
| 2441 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2442 | |
| 2443 | if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd) |
| 2444 | return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle, |
| 2445 | timer_val); |
| 2446 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2447 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2448 | } |
| 2449 | |
| 2450 | /** |
| 2451 | * wmi_unified_nan_req_cmd() - to send nan request to target |
| 2452 | * @wmi_handle: wmi handle |
| 2453 | * @nan_req: request data which will be non-null |
| 2454 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2455 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2456 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2457 | QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2458 | struct nan_req_params *nan_req) |
| 2459 | { |
| 2460 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2461 | |
| 2462 | if (wmi_handle->ops->send_nan_req_cmd) |
| 2463 | return wmi_handle->ops->send_nan_req_cmd(wmi_handle, |
| 2464 | nan_req); |
| 2465 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2466 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2467 | } |
| 2468 | |
| 2469 | /** |
| 2470 | * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload |
| 2471 | * @wmi_handle: wmi handle |
| 2472 | * @pDhcpSrvOffloadInfo: DHCP server offload info |
| 2473 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2474 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2475 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2476 | QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 2477 | struct dhcp_offload_info_params *params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2478 | { |
| 2479 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2480 | |
| 2481 | if (wmi_handle->ops->send_process_dhcpserver_offload_cmd) |
| 2482 | return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 2483 | params); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2484 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2485 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2486 | } |
| 2487 | |
| 2488 | /** |
| 2489 | * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request |
| 2490 | * @wmi_handle: wmi handle |
| 2491 | * @ch_avoid_update_req: channel avoid update params |
| 2492 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2493 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2494 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2495 | QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2496 | { |
| 2497 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2498 | |
| 2499 | if (wmi_handle->ops->send_process_ch_avoid_update_cmd) |
| 2500 | return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle); |
| 2501 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2502 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2503 | } |
| 2504 | |
| 2505 | /** |
| 2506 | * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw |
| 2507 | * @wmi_handle: wmi handle |
| 2508 | * @reg_dmn: reg domain |
| 2509 | * @regdmn2G: 2G reg domain |
| 2510 | * @regdmn5G: 5G reg domain |
| 2511 | * @ctl2G: 2G test limit |
| 2512 | * @ctl5G: 5G test limit |
| 2513 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2514 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2515 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2516 | QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2517 | uint32_t reg_dmn, uint16_t regdmn2G, |
Rajeev Kumar Sirasanagandla | 4c1fecd | 2017-06-06 13:27:56 +0530 | [diff] [blame] | 2518 | uint16_t regdmn5G, uint8_t ctl2G, |
| 2519 | uint8_t ctl5G) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2520 | { |
| 2521 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2522 | |
| 2523 | if (wmi_handle->ops->send_regdomain_info_to_fw_cmd) |
| 2524 | return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle, |
| 2525 | reg_dmn, regdmn2G, |
| 2526 | regdmn5G, ctl2G, |
| 2527 | ctl5G); |
| 2528 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2529 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2530 | } |
| 2531 | |
| 2532 | |
| 2533 | /** |
| 2534 | * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode |
| 2535 | * @wmi_handle: wmi handle |
| 2536 | * @chan_switch_params: Pointer to tdls channel switch parameter structure |
| 2537 | * |
| 2538 | * This function sets tdls off channel mode |
| 2539 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2540 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; |
| 2541 | * Negative errno otherwise |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2542 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2543 | QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2544 | struct tdls_channel_switch_params *chan_switch_params) |
| 2545 | { |
| 2546 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2547 | |
| 2548 | if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd) |
| 2549 | return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle, |
| 2550 | chan_switch_params); |
| 2551 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2552 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2553 | } |
| 2554 | |
| 2555 | /** |
| 2556 | * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev |
| 2557 | * @wmi_handle: wmi handle |
| 2558 | * @pwmaTdlsparams: TDLS params |
| 2559 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2560 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2561 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2562 | QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2563 | void *tdls_param, uint8_t tdls_state) |
| 2564 | { |
| 2565 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2566 | |
| 2567 | if (wmi_handle->ops->send_update_fw_tdls_state_cmd) |
| 2568 | return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle, |
| 2569 | tdls_param, tdls_state); |
| 2570 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2571 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2572 | } |
| 2573 | |
| 2574 | /** |
| 2575 | * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state |
| 2576 | * @wmi_handle: wmi handle |
| 2577 | * @peerStateParams: TDLS peer state params |
| 2578 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2579 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2580 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2581 | QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2582 | struct tdls_peer_state_params *peerStateParams, |
| 2583 | uint32_t *ch_mhz) |
| 2584 | { |
| 2585 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2586 | |
| 2587 | if (wmi_handle->ops->send_update_tdls_peer_state_cmd) |
| 2588 | return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle, |
| 2589 | peerStateParams, ch_mhz); |
| 2590 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2591 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2592 | } |
| 2593 | |
| 2594 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2595 | * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware |
| 2596 | * @wmi_handle: Pointer to WMi handle |
| 2597 | * @ie_data: Pointer for ie data |
| 2598 | * |
| 2599 | * This function sends IE information to firmware |
| 2600 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2601 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2602 | * |
| 2603 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2604 | QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2605 | struct vdev_ie_info_param *ie_info) |
| 2606 | { |
| 2607 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2608 | |
| 2609 | if (wmi_handle->ops->send_process_set_ie_info_cmd) |
| 2610 | return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle, |
| 2611 | ie_info); |
| 2612 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2613 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2614 | } |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2615 | |
| 2616 | /** |
| 2617 | * wmi_unified_save_fw_version_cmd() - save fw version |
| 2618 | * @wmi_handle: pointer to wmi handle |
| 2619 | * @res_cfg: resource config |
| 2620 | * @num_mem_chunks: no of mem chunck |
| 2621 | * @mem_chunk: pointer to mem chunck structure |
| 2622 | * |
| 2623 | * This function sends IE information to firmware |
| 2624 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2625 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2626 | * |
| 2627 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2628 | QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2629 | void *evt_buf) |
| 2630 | { |
| 2631 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2632 | |
| 2633 | if (wmi_handle->ops->save_fw_version_cmd) |
| 2634 | return wmi_handle->ops->save_fw_version_cmd(wmi_handle, |
| 2635 | evt_buf); |
| 2636 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2637 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2638 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2639 | |
| 2640 | /** |
| 2641 | * send_set_base_macaddr_indicate_cmd() - set base mac address in fw |
| 2642 | * @wmi_hdl: wmi handle |
| 2643 | * @custom_addr: base mac address |
| 2644 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2645 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2646 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2647 | QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2648 | uint8_t *custom_addr) |
| 2649 | { |
| 2650 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2651 | |
| 2652 | if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd) |
| 2653 | return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle, |
| 2654 | custom_addr); |
| 2655 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2656 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2657 | } |
| 2658 | |
| 2659 | /** |
| 2660 | * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events |
| 2661 | * @wmi_hdl: wmi handle |
| 2662 | * @event: Event received from FW |
| 2663 | * @len: Length of the event |
| 2664 | * |
| 2665 | * Enables the low frequency events and disables the high frequency |
| 2666 | * events. Bit 17 indicates if the event if low/high frequency. |
| 2667 | * 1 - high frequency, 0 - low frequency |
| 2668 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2669 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2670 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2671 | QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2672 | uint8_t *event, |
| 2673 | uint32_t len) |
| 2674 | { |
| 2675 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2676 | |
| 2677 | if (wmi_handle->ops->send_log_supported_evt_cmd) |
| 2678 | return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle, |
| 2679 | event, len); |
| 2680 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2681 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2682 | } |
| 2683 | |
gaurank kathpalia | cdfb445 | 2018-02-21 18:58:29 +0530 | [diff] [blame] | 2684 | void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl) |
| 2685 | { |
| 2686 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2687 | if (wmi_handle->ops->send_time_stamp_sync_cmd) |
| 2688 | wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle); |
| 2689 | |
| 2690 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2691 | /** |
| 2692 | * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id |
| 2693 | * @wmi_hdl: wmi handle |
| 2694 | * @start_log: Start logging related parameters |
| 2695 | * |
| 2696 | * Send the command to the FW based on which specific logging of diag |
| 2697 | * event/log id can be started/stopped |
| 2698 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2699 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2700 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2701 | QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2702 | struct wmi_wifi_start_log *start_log) |
| 2703 | { |
| 2704 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2705 | |
| 2706 | if (wmi_handle->ops->send_enable_specific_fw_logs_cmd) |
| 2707 | return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle, |
| 2708 | start_log); |
| 2709 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2710 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2711 | } |
| 2712 | |
| 2713 | /** |
| 2714 | * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW |
| 2715 | * @wmi_hdl: WMI handle |
| 2716 | * |
| 2717 | * This function is used to send the flush command to the FW, |
| 2718 | * that will flush the fw logs that are residue in the FW |
| 2719 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2720 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2721 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2722 | QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2723 | { |
| 2724 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2725 | |
| 2726 | if (wmi_handle->ops->send_flush_logs_to_fw_cmd) |
| 2727 | return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle); |
| 2728 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2729 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2730 | } |
| 2731 | |
| 2732 | /** |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2733 | * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2734 | * @wmi_hdl: wmi handle |
| 2735 | * @msg: PCL structure containing the PCL and the number of channels |
| 2736 | * |
| 2737 | * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN |
| 2738 | * firmware. The DBS Manager is the consumer of this information in the WLAN |
| 2739 | * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs |
| 2740 | * to migrate to a new channel without host driver involvement. An example of |
| 2741 | * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will |
| 2742 | * manage the channel selection without firmware involvement. |
| 2743 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2744 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2745 | */ |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2746 | QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl, |
| 2747 | struct wmi_pcl_chan_weights *msg) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2748 | { |
| 2749 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2750 | |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2751 | if (wmi_handle->ops->send_pdev_set_pcl_cmd) |
| 2752 | return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg); |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2753 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2754 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2755 | } |
| 2756 | |
| 2757 | /** |
| 2758 | * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW |
| 2759 | * @wmi_hdl: wmi handle |
| 2760 | * @msg: Structure containing the following parameters |
| 2761 | * |
| 2762 | * - hw_mode_index: The HW_Mode field is a enumerated type that is selected |
| 2763 | * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID. |
| 2764 | * |
| 2765 | * Provides notification to the WLAN firmware that host driver is requesting a |
| 2766 | * HardWare (HW) Mode change. This command is needed to support iHelium in the |
| 2767 | * configurations that include the Dual Band Simultaneous (DBS) feature. |
| 2768 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2769 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2770 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2771 | QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2772 | uint32_t hw_mode_index) |
| 2773 | { |
| 2774 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2775 | |
Manishekar Chandrasekaran | 1718378 | 2016-04-27 12:29:16 +0530 | [diff] [blame] | 2776 | if (wmi_handle->ops->send_pdev_set_hw_mode_cmd) |
| 2777 | return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2778 | hw_mode_index); |
| 2779 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2780 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2781 | } |
| 2782 | |
| 2783 | /** |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2784 | * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2785 | * @wmi_hdl: wmi handle |
| 2786 | * @msg: Dual MAC config parameters |
| 2787 | * |
| 2788 | * Configures WLAN firmware with the dual MAC features |
| 2789 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2790 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures. |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2791 | */ |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2792 | QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl, |
Srinivas Girigowda | 5029ae7 | 2018-02-15 14:30:05 -0800 | [diff] [blame] | 2793 | struct policy_mgr_dual_mac_config *msg) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2794 | { |
| 2795 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2796 | |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2797 | if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd) |
| 2798 | return wmi_handle->ops->send_pdev_set_dual_mac_config_cmd(wmi_handle, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2799 | msg); |
| 2800 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2801 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2802 | } |
| 2803 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2804 | /** |
| 2805 | * wmi_unified_set_led_flashing_cmd() - set led flashing in fw |
| 2806 | * @wmi_hdl: wmi handle |
| 2807 | * @flashing: flashing request |
| 2808 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2809 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2810 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2811 | QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2812 | struct flashing_req_params *flashing) |
| 2813 | { |
| 2814 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2815 | |
| 2816 | if (wmi_handle->ops->send_set_led_flashing_cmd) |
| 2817 | return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle, |
| 2818 | flashing); |
| 2819 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2820 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2821 | } |
| 2822 | |
| 2823 | /** |
| 2824 | * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw |
| 2825 | * @wmi_hdl: wmi handle |
| 2826 | * @appType1Params: app type1 params |
| 2827 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2828 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2829 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2830 | QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2831 | struct app_type1_params *app_type1_params) |
| 2832 | { |
| 2833 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2834 | |
| 2835 | if (wmi_handle->ops->send_app_type1_params_in_fw_cmd) |
| 2836 | return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle, |
| 2837 | app_type1_params); |
| 2838 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2839 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2840 | } |
| 2841 | |
| 2842 | /** |
| 2843 | * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request |
| 2844 | * @wmi_hdl: wmi handle |
| 2845 | * @request: SSID hotlist set request |
| 2846 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2847 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2848 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2849 | QDF_STATUS |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2850 | wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, |
| 2851 | struct ssid_hotlist_request_params *request) |
| 2852 | { |
| 2853 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2854 | |
| 2855 | if (wmi_handle->ops->send_set_ssid_hotlist_cmd) |
| 2856 | return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle, |
| 2857 | request); |
| 2858 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2859 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2860 | } |
| 2861 | |
Rachit Kankane | e797c77 | 2018-07-31 12:00:48 +0530 | [diff] [blame] | 2862 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2863 | /** |
| 2864 | * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw. |
| 2865 | * @wmi_hdl: wmi handle |
| 2866 | * @vdev_id: vdev id |
| 2867 | * |
| 2868 | * This function sends roam synch complete event to fw. |
| 2869 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2870 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2871 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2872 | QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2873 | uint8_t vdev_id) |
| 2874 | { |
| 2875 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2876 | |
| 2877 | if (wmi_handle->ops->send_process_roam_synch_complete_cmd) |
| 2878 | return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle, |
| 2879 | vdev_id); |
| 2880 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2881 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2882 | } |
| 2883 | |
Rachit Kankane | e797c77 | 2018-07-31 12:00:48 +0530 | [diff] [blame] | 2884 | /* wmi_unified_set_ric_req_cmd() - set ric request element |
| 2885 | * @wmi_hdl: wmi handle |
| 2886 | * @msg: message |
| 2887 | * @is_add_ts: is addts required |
| 2888 | * |
| 2889 | * This function sets ric request element for 11r roaming. |
| 2890 | * |
| 2891 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2892 | */ |
| 2893 | QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg, |
| 2894 | uint8_t is_add_ts) |
| 2895 | { |
| 2896 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2897 | |
| 2898 | if (wmi_handle->ops->send_set_ric_req_cmd) |
| 2899 | return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg, |
| 2900 | is_add_ts); |
| 2901 | |
| 2902 | return QDF_STATUS_E_FAILURE; |
| 2903 | } |
| 2904 | #endif |
| 2905 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2906 | /** |
Anurag Chouhan | 459e015 | 2016-07-22 20:19:54 +0530 | [diff] [blame] | 2907 | * wmi_unified_fw_test_cmd() - send fw test command to fw. |
| 2908 | * @wmi_hdl: wmi handle |
| 2909 | * @wmi_fwtest: fw test command |
| 2910 | * |
| 2911 | * This function sends fw test command to fw. |
| 2912 | * |
| 2913 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2914 | */ |
| 2915 | QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, |
| 2916 | struct set_fwtest_params *wmi_fwtest) |
| 2917 | { |
| 2918 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2919 | |
| 2920 | if (wmi_handle->ops->send_fw_test_cmd) |
| 2921 | return wmi_handle->ops->send_fw_test_cmd(wmi_handle, |
| 2922 | wmi_fwtest); |
| 2923 | |
| 2924 | return QDF_STATUS_E_FAILURE; |
| 2925 | |
| 2926 | } |
| 2927 | |
| 2928 | /** |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2929 | * wmi_unified_unit_test_cmd() - send unit test command to fw. |
| 2930 | * @wmi_hdl: wmi handle |
| 2931 | * @wmi_utest: unit test command |
| 2932 | * |
| 2933 | * This function send unit test command to fw. |
| 2934 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2935 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2936 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2937 | QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2938 | struct wmi_unit_test_cmd *wmi_utest) |
| 2939 | { |
| 2940 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2941 | |
| 2942 | if (wmi_handle->ops->send_unit_test_cmd) |
| 2943 | return wmi_handle->ops->send_unit_test_cmd(wmi_handle, |
| 2944 | wmi_utest); |
| 2945 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2946 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2947 | } |
| 2948 | |
| 2949 | /** |
| 2950 | * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw. |
| 2951 | * @wmi_hdl: wmi handle |
| 2952 | * @roaminvoke: roam invoke command |
| 2953 | * |
| 2954 | * Send roam invoke command to fw for fastreassoc. |
| 2955 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2956 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2957 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2958 | QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2959 | struct wmi_roam_invoke_cmd *roaminvoke, |
| 2960 | uint32_t ch_hz) |
| 2961 | { |
| 2962 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2963 | |
| 2964 | if (wmi_handle->ops->send_roam_invoke_cmd) |
| 2965 | return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle, |
| 2966 | roaminvoke, ch_hz); |
| 2967 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2968 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2969 | } |
| 2970 | |
| 2971 | /** |
| 2972 | * wmi_unified_roam_scan_offload_cmd() - set roam offload command |
| 2973 | * @wmi_hdl: wmi handle |
| 2974 | * @command: command |
| 2975 | * @vdev_id: vdev id |
| 2976 | * |
| 2977 | * This function set roam offload command to fw. |
| 2978 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2979 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2980 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2981 | QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2982 | uint32_t command, uint32_t vdev_id) |
| 2983 | { |
| 2984 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2985 | |
| 2986 | if (wmi_handle->ops->send_roam_scan_offload_cmd) |
| 2987 | return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle, |
| 2988 | command, vdev_id); |
| 2989 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2990 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2991 | } |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 2992 | #ifdef CONFIG_MCL |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2993 | /** |
| 2994 | * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw |
| 2995 | * @wmi_hdl: wmi handle |
Himanshu Agarwal | eaf7d73 | 2017-09-28 11:51:35 +0530 | [diff] [blame] | 2996 | * @ap_profile: ap profile params |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2997 | * |
| 2998 | * Send WMI_ROAM_AP_PROFILE to firmware |
| 2999 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3000 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3001 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3002 | QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl, |
Himanshu Agarwal | eaf7d73 | 2017-09-28 11:51:35 +0530 | [diff] [blame] | 3003 | struct ap_profile_params *ap_profile) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3004 | { |
| 3005 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3006 | |
| 3007 | if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd) |
Himanshu Agarwal | eaf7d73 | 2017-09-28 11:51:35 +0530 | [diff] [blame] | 3008 | return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd( |
| 3009 | wmi_handle, ap_profile); |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3010 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3011 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3012 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3013 | #endif |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3014 | /** |
| 3015 | * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period |
| 3016 | * @wmi_handle: wmi handle |
| 3017 | * @scan_period: scan period |
| 3018 | * @scan_age: scan age |
| 3019 | * @vdev_id: vdev id |
| 3020 | * |
| 3021 | * Send WMI_ROAM_SCAN_PERIOD parameters to fw. |
| 3022 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3023 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3024 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3025 | QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3026 | uint32_t scan_period, |
| 3027 | uint32_t scan_age, |
| 3028 | uint32_t vdev_id) |
| 3029 | { |
| 3030 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3031 | |
| 3032 | if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd) |
| 3033 | return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle, |
| 3034 | scan_period, scan_age, vdev_id); |
| 3035 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3036 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3037 | } |
| 3038 | |
| 3039 | /** |
| 3040 | * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list |
| 3041 | * @wmi_handle: wmi handle |
| 3042 | * @chan_count: channel count |
| 3043 | * @chan_list: channel list |
| 3044 | * @list_type: list type |
| 3045 | * @vdev_id: vdev id |
| 3046 | * |
| 3047 | * Set roam offload channel list. |
| 3048 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3049 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3050 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3051 | QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3052 | uint8_t chan_count, |
Varun Reddy Yeturu | 5a552cf | 2016-07-07 17:42:49 -0700 | [diff] [blame] | 3053 | uint32_t *chan_list, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3054 | uint8_t list_type, uint32_t vdev_id) |
| 3055 | { |
| 3056 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3057 | |
| 3058 | if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd) |
| 3059 | return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle, |
| 3060 | chan_count, chan_list, |
| 3061 | list_type, vdev_id); |
| 3062 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3063 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3064 | } |
| 3065 | |
| 3066 | /** |
| 3067 | * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th |
| 3068 | * @wmi_hdl: wmi handle |
| 3069 | * @rssi_change_thresh: RSSI Change threshold |
| 3070 | * @bcn_rssi_weight: beacon RSSI weight |
| 3071 | * @vdev_id: vdev id |
| 3072 | * |
| 3073 | * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw. |
| 3074 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3075 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3076 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3077 | QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3078 | uint32_t vdev_id, |
| 3079 | int32_t rssi_change_thresh, |
| 3080 | uint32_t bcn_rssi_weight, |
| 3081 | uint32_t hirssi_delay_btw_scans) |
| 3082 | { |
| 3083 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3084 | |
| 3085 | if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd) |
| 3086 | return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle, |
| 3087 | vdev_id, rssi_change_thresh, |
| 3088 | bcn_rssi_weight, hirssi_delay_btw_scans); |
| 3089 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3090 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3091 | } |
| 3092 | |
Kapil Gupta | 54ea36e | 2017-02-24 15:50:03 +0530 | [diff] [blame] | 3093 | QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, |
| 3094 | struct wmi_per_roam_config_req *req_buf) |
| 3095 | { |
| 3096 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3097 | |
| 3098 | if (wmi_handle->ops->send_per_roam_config_cmd) |
| 3099 | return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle, |
| 3100 | req_buf); |
| 3101 | |
| 3102 | return QDF_STATUS_E_FAILURE; |
| 3103 | } |
| 3104 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3105 | /** |
Anurag Chouhan | 97f0042 | 2017-09-11 14:56:30 +0530 | [diff] [blame] | 3106 | * wmi_unified_set_arp_stats_req() - set arp stats request |
| 3107 | * @wmi_hdl: wmi handle |
| 3108 | * @req_buf: pointer to set_arp_stats |
| 3109 | * |
| 3110 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3111 | */ |
| 3112 | QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl, |
| 3113 | struct set_arp_stats *req_buf) |
| 3114 | { |
| 3115 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3116 | |
| 3117 | if (wmi_handle->ops->send_set_arp_stats_req_cmd) |
| 3118 | return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle, |
| 3119 | req_buf); |
| 3120 | |
| 3121 | return QDF_STATUS_E_FAILURE; |
| 3122 | } |
| 3123 | |
| 3124 | /** |
| 3125 | * wmi_unified_get_arp_stats_req() - get arp stats request |
| 3126 | * @wmi_hdl: wmi handle |
| 3127 | * @req_buf: pointer to get_arp_stats |
| 3128 | * |
| 3129 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3130 | */ |
| 3131 | QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, |
| 3132 | struct get_arp_stats *req_buf) |
| 3133 | { |
| 3134 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3135 | |
| 3136 | if (wmi_handle->ops->send_get_arp_stats_req_cmd) |
| 3137 | return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle, |
| 3138 | req_buf); |
| 3139 | |
| 3140 | return QDF_STATUS_E_FAILURE; |
| 3141 | } |
| 3142 | |
Vignesh Viswanathan | 81bde49 | 2017-09-25 14:36:38 +0530 | [diff] [blame] | 3143 | QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, |
| 3144 | struct wmi_unified_pmk_cache *req_buf) |
| 3145 | { |
| 3146 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3147 | |
| 3148 | if (wmi_handle->ops->send_set_del_pmkid_cache_cmd) |
| 3149 | return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle, |
| 3150 | req_buf); |
| 3151 | |
| 3152 | return QDF_STATUS_E_FAILURE; |
| 3153 | } |
| 3154 | |
| 3155 | #if defined(WLAN_FEATURE_FILS_SK) |
| 3156 | QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, |
| 3157 | struct hlp_params *req_buf) |
| 3158 | { |
| 3159 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3160 | |
| 3161 | if (wmi_handle->ops->send_roam_scan_hlp_cmd) |
| 3162 | return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle, |
| 3163 | req_buf); |
| 3164 | |
| 3165 | return QDF_STATUS_E_FAILURE; |
| 3166 | } |
| 3167 | #endif |
| 3168 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3169 | #ifdef FEATURE_WLAN_APF |
Nachiket Kukade | ae35a2c | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 3170 | QDF_STATUS |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3171 | wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id, |
Nachiket Kukade | ae35a2c | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 3172 | enum wmi_host_active_apf_mode ucast_mode, |
| 3173 | enum wmi_host_active_apf_mode |
| 3174 | mcast_bcast_mode) |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 3175 | { |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3176 | if (wmi->ops->send_set_active_apf_mode_cmd) |
| 3177 | return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id, |
| 3178 | ucast_mode, |
| 3179 | mcast_bcast_mode); |
| 3180 | return QDF_STATUS_E_FAILURE; |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 3181 | } |
| 3182 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3183 | QDF_STATUS |
| 3184 | wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi, |
| 3185 | uint32_t vdev_id, bool enable) |
| 3186 | { |
| 3187 | if (wmi->ops->send_apf_enable_cmd) |
| 3188 | return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable); |
| 3189 | return QDF_STATUS_E_FAILURE; |
| 3190 | } |
| 3191 | |
| 3192 | QDF_STATUS |
| 3193 | wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi, |
| 3194 | struct wmi_apf_write_memory_params |
| 3195 | *write_params) |
| 3196 | { |
| 3197 | if (wmi->ops->send_apf_write_work_memory_cmd) |
| 3198 | return wmi->ops->send_apf_write_work_memory_cmd(wmi, |
| 3199 | write_params); |
| 3200 | |
| 3201 | return QDF_STATUS_E_FAILURE; |
| 3202 | } |
| 3203 | |
| 3204 | QDF_STATUS |
| 3205 | wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi, |
| 3206 | struct wmi_apf_read_memory_params |
| 3207 | *read_params) |
| 3208 | { |
| 3209 | if (wmi->ops->send_apf_read_work_memory_cmd) |
| 3210 | return wmi->ops->send_apf_read_work_memory_cmd(wmi, |
| 3211 | read_params); |
| 3212 | |
| 3213 | return QDF_STATUS_E_FAILURE; |
| 3214 | } |
| 3215 | |
| 3216 | QDF_STATUS |
| 3217 | wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf, |
| 3218 | struct wmi_apf_read_memory_resp_event_params |
| 3219 | *read_mem_evt) |
| 3220 | { |
| 3221 | if (wmi->ops->extract_apf_read_memory_resp_event) |
| 3222 | return wmi->ops->extract_apf_read_memory_resp_event(wmi, |
| 3223 | evt_buf, |
| 3224 | read_mem_evt); |
| 3225 | |
| 3226 | return QDF_STATUS_E_FAILURE; |
| 3227 | } |
| 3228 | #endif /* FEATURE_WLAN_APF */ |
| 3229 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3230 | /** |
| 3231 | * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function |
| 3232 | * @param wmi_handle : handle to WMI. |
| 3233 | * @param param : tpc config param |
| 3234 | * |
| 3235 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3236 | */ |
| 3237 | QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl, |
| 3238 | uint32_t param) |
| 3239 | { |
| 3240 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3241 | |
| 3242 | if (wmi_handle->ops->send_pdev_get_tpc_config_cmd) |
| 3243 | return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle, |
| 3244 | param); |
| 3245 | |
| 3246 | return QDF_STATUS_E_FAILURE; |
| 3247 | } |
| 3248 | |
| 3249 | /** |
Sathish Kumar | 58f1255 | 2016-08-09 16:50:46 +0530 | [diff] [blame] | 3250 | * wmi_unified_set_bwf_cmd_send() - WMI set bwf function |
| 3251 | * @param wmi_handle : handle to WMI. |
| 3252 | * @param param : pointer to set bwf param |
| 3253 | * |
| 3254 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3255 | */ |
| 3256 | QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl, |
| 3257 | struct set_bwf_params *param) |
| 3258 | { |
| 3259 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3260 | |
| 3261 | if (wmi_handle->ops->send_set_bwf_cmd) |
| 3262 | return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param); |
| 3263 | |
| 3264 | return QDF_STATUS_E_FAILURE; |
| 3265 | } |
| 3266 | |
| 3267 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3268 | * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function |
| 3269 | * @param wmi_handle : handle to WMI. |
| 3270 | * @param param : pointer to hold pdev fips param |
| 3271 | * |
| 3272 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3273 | */ |
| 3274 | QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, |
| 3275 | struct fips_params *param) |
| 3276 | { |
| 3277 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3278 | |
| 3279 | if (wmi_handle->ops->send_pdev_fips_cmd) |
| 3280 | return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param); |
| 3281 | |
| 3282 | return QDF_STATUS_E_FAILURE; |
| 3283 | } |
| 3284 | |
| 3285 | /** |
| 3286 | * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function |
| 3287 | * @param wmi_handle : handle to WMI. |
| 3288 | * @param param : pointer to hold wlan profile param |
| 3289 | * |
| 3290 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3291 | */ |
| 3292 | QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, |
| 3293 | struct wlan_profile_params *param) |
| 3294 | { |
| 3295 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3296 | |
| 3297 | if (wmi_handle->ops->send_wlan_profile_enable_cmd) |
| 3298 | return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle, |
| 3299 | param); |
| 3300 | |
| 3301 | return QDF_STATUS_E_FAILURE; |
| 3302 | } |
| 3303 | |
| 3304 | /** |
| 3305 | * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function |
| 3306 | * @param wmi_handle : handle to WMI. |
| 3307 | * @param param : pointer to hold wlan profile param |
| 3308 | * |
| 3309 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3310 | */ |
| 3311 | QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, |
| 3312 | struct wlan_profile_params *param) |
| 3313 | { |
| 3314 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3315 | |
| 3316 | if (wmi->ops->send_wlan_profile_trigger_cmd) |
| 3317 | return wmi->ops->send_wlan_profile_trigger_cmd(wmi, |
| 3318 | param); |
| 3319 | |
| 3320 | return QDF_STATUS_E_FAILURE; |
| 3321 | } |
| 3322 | |
| 3323 | /** |
| 3324 | * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function |
| 3325 | * @param wmi_handle : handle to WMI. |
| 3326 | * @param param : pointer to hold channel param |
| 3327 | * |
| 3328 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3329 | */ |
| 3330 | QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, |
| 3331 | struct channel_param *param) |
| 3332 | { |
| 3333 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3334 | |
| 3335 | if (wmi_handle->ops->send_pdev_set_chan_cmd) |
| 3336 | return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle, |
| 3337 | param); |
| 3338 | |
| 3339 | return QDF_STATUS_E_FAILURE; |
| 3340 | } |
| 3341 | |
| 3342 | /** |
| 3343 | * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function |
| 3344 | * @param wmi_handle : handle to WMI. |
| 3345 | * @param param : pointer to hold channel param |
| 3346 | * |
| 3347 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3348 | */ |
| 3349 | QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl, |
| 3350 | struct ht_ie_params *param) |
| 3351 | { |
| 3352 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3353 | |
| 3354 | if (wmi_handle->ops->send_set_ht_ie_cmd) |
| 3355 | return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param); |
| 3356 | |
| 3357 | return QDF_STATUS_E_FAILURE; |
| 3358 | } |
| 3359 | |
| 3360 | /** |
| 3361 | * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function |
| 3362 | * @param wmi_handle : handle to WMI. |
| 3363 | * @param param : pointer to hold channel param |
| 3364 | * |
| 3365 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3366 | */ |
| 3367 | QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl, |
| 3368 | struct vht_ie_params *param) |
| 3369 | { |
| 3370 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3371 | |
| 3372 | if (wmi_handle->ops->send_set_vht_ie_cmd) |
| 3373 | return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param); |
| 3374 | |
| 3375 | return QDF_STATUS_E_FAILURE; |
| 3376 | } |
| 3377 | |
| 3378 | /** |
| 3379 | * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function |
| 3380 | * @param wmi_handle : handle to WMI. |
| 3381 | * @param param : pointer to hold wmm param |
| 3382 | * |
| 3383 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3384 | */ |
| 3385 | QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl, |
| 3386 | struct wmm_update_params *param) |
| 3387 | { |
| 3388 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3389 | |
| 3390 | if (wmi_handle->ops->send_wmm_update_cmd) |
| 3391 | return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param); |
| 3392 | |
| 3393 | return QDF_STATUS_E_FAILURE; |
| 3394 | } |
| 3395 | |
| 3396 | /** |
| 3397 | * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function |
| 3398 | * @param wmi_handle : handle to WMI. |
| 3399 | * @param param : pointer to hold ant switch tbl param |
| 3400 | * |
| 3401 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3402 | */ |
| 3403 | QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl, |
| 3404 | struct ant_switch_tbl_params *param) |
| 3405 | { |
| 3406 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3407 | |
| 3408 | if (wmi_handle->ops->send_set_ant_switch_tbl_cmd) |
| 3409 | return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle, |
| 3410 | param); |
| 3411 | |
| 3412 | return QDF_STATUS_E_FAILURE; |
| 3413 | } |
| 3414 | |
| 3415 | /** |
| 3416 | * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 3417 | * @param wmi_handle : handle to WMI. |
| 3418 | * @param param : pointer to hold ratepwr table param |
| 3419 | * |
| 3420 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3421 | */ |
| 3422 | QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, |
| 3423 | struct ratepwr_table_params *param) |
| 3424 | { |
| 3425 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3426 | |
| 3427 | if (wmi_handle->ops->send_set_ratepwr_table_cmd) |
| 3428 | return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle, |
| 3429 | param); |
| 3430 | |
| 3431 | return QDF_STATUS_E_FAILURE; |
| 3432 | } |
| 3433 | |
| 3434 | /** |
| 3435 | * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 3436 | * @param wmi_handle : handle to WMI. |
| 3437 | * |
| 3438 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3439 | */ |
| 3440 | QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl) |
| 3441 | { |
| 3442 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3443 | |
| 3444 | if (wmi_handle->ops->send_get_ratepwr_table_cmd) |
| 3445 | return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle); |
| 3446 | |
| 3447 | return QDF_STATUS_E_FAILURE; |
| 3448 | } |
| 3449 | |
| 3450 | /** |
| 3451 | * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function |
| 3452 | * @param wmi_handle : handle to WMI. |
| 3453 | * @param param : pointer to hold ctl table param |
| 3454 | * |
| 3455 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3456 | */ |
| 3457 | QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl, |
| 3458 | struct ctl_table_params *param) |
| 3459 | { |
| 3460 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3461 | |
| 3462 | if (wmi_handle->ops->send_set_ctl_table_cmd) |
| 3463 | return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle, |
| 3464 | param); |
| 3465 | |
| 3466 | return QDF_STATUS_E_FAILURE; |
| 3467 | } |
| 3468 | |
| 3469 | /** |
| 3470 | * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function |
| 3471 | * @param wmi_handle : handle to WMI. |
| 3472 | * @param param : pointer to hold mimogain param |
| 3473 | * |
| 3474 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3475 | */ |
| 3476 | QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl, |
| 3477 | struct mimogain_table_params *param) |
| 3478 | { |
| 3479 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3480 | |
| 3481 | if (wmi_handle->ops->send_set_mimogain_table_cmd) |
| 3482 | return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle, |
| 3483 | param); |
| 3484 | |
| 3485 | return QDF_STATUS_E_FAILURE; |
| 3486 | } |
| 3487 | |
| 3488 | /** |
| 3489 | * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr |
| 3490 | * chainmsk cmd function |
| 3491 | * @param wmi_handle : handle to WMI. |
| 3492 | * @param param : pointer to hold ratepwr chainmsk param |
| 3493 | * |
| 3494 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3495 | */ |
| 3496 | QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, |
| 3497 | struct ratepwr_chainmsk_params *param) |
| 3498 | { |
| 3499 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3500 | |
| 3501 | if (wmi->ops->send_set_ratepwr_chainmsk_cmd) |
| 3502 | return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param); |
| 3503 | |
| 3504 | return QDF_STATUS_E_FAILURE; |
| 3505 | } |
| 3506 | |
| 3507 | /** |
| 3508 | * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function |
| 3509 | * @param wmi_handle : handle to WMI. |
| 3510 | * @param param : pointer to hold macaddr param |
| 3511 | * |
| 3512 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3513 | */ |
| 3514 | QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, |
| 3515 | struct macaddr_params *param) |
| 3516 | { |
| 3517 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3518 | |
| 3519 | if (wmi_handle->ops->send_set_macaddr_cmd) |
| 3520 | return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param); |
| 3521 | |
| 3522 | return QDF_STATUS_E_FAILURE; |
| 3523 | } |
| 3524 | |
| 3525 | /** |
| 3526 | * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function |
| 3527 | * @param wmi_handle : handle to WMI. |
| 3528 | * |
| 3529 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3530 | */ |
| 3531 | QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl) |
| 3532 | { |
| 3533 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3534 | |
| 3535 | if (wmi_handle->ops->send_pdev_scan_start_cmd) |
| 3536 | return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle); |
| 3537 | |
| 3538 | return QDF_STATUS_E_FAILURE; |
| 3539 | } |
| 3540 | |
| 3541 | /** |
| 3542 | * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function |
| 3543 | * @param wmi_handle : handle to WMI. |
| 3544 | * |
| 3545 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3546 | */ |
| 3547 | QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl) |
| 3548 | { |
| 3549 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3550 | |
| 3551 | if (wmi_handle->ops->send_pdev_scan_end_cmd) |
| 3552 | return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle); |
| 3553 | |
| 3554 | return QDF_STATUS_E_FAILURE; |
| 3555 | } |
| 3556 | |
| 3557 | /** |
| 3558 | * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function |
| 3559 | * @param wmi_handle : handle to WMI. |
| 3560 | * @param param : pointer to hold acparams param |
| 3561 | * |
| 3562 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3563 | */ |
| 3564 | QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, |
| 3565 | struct acparams_params *param) |
| 3566 | { |
| 3567 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3568 | |
| 3569 | if (wmi_handle->ops->send_set_acparams_cmd) |
| 3570 | return wmi_handle->ops->send_set_acparams_cmd(wmi_handle, |
| 3571 | param); |
| 3572 | |
| 3573 | return QDF_STATUS_E_FAILURE; |
| 3574 | } |
| 3575 | |
| 3576 | /** |
| 3577 | * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp |
| 3578 | * tid map cmd function |
| 3579 | * @param wmi_handle : handle to WMI. |
| 3580 | * @param param : pointer to hold dscp param |
| 3581 | * |
| 3582 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3583 | */ |
| 3584 | QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, |
| 3585 | struct vap_dscp_tid_map_params *param) |
| 3586 | { |
| 3587 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3588 | |
| 3589 | if (wmi->ops->send_set_vap_dscp_tid_map_cmd) |
| 3590 | return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param); |
| 3591 | |
| 3592 | return QDF_STATUS_E_FAILURE; |
| 3593 | } |
| 3594 | |
| 3595 | /** |
| 3596 | * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast |
| 3597 | * reserve cmd function |
| 3598 | * @param wmi_handle : handle to WMI. |
| 3599 | * @param param : pointer to hold ast param |
| 3600 | * |
| 3601 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3602 | */ |
| 3603 | QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, |
| 3604 | struct proxy_ast_reserve_params *param) |
| 3605 | { |
| 3606 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3607 | |
| 3608 | if (wmi_handle->ops->send_proxy_ast_reserve_cmd) |
| 3609 | return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle, |
| 3610 | param); |
| 3611 | |
| 3612 | return QDF_STATUS_E_FAILURE; |
| 3613 | } |
| 3614 | |
| 3615 | /** |
| 3616 | * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function |
| 3617 | * @param wmi_handle : handle to WMI. |
| 3618 | * @param param : pointer to hold qvit param |
| 3619 | * |
| 3620 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3621 | */ |
| 3622 | QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl, |
| 3623 | struct pdev_qvit_params *param) |
| 3624 | { |
| 3625 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3626 | |
| 3627 | if (wmi_handle->ops->send_pdev_qvit_cmd) |
| 3628 | return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param); |
| 3629 | |
| 3630 | return QDF_STATUS_E_FAILURE; |
| 3631 | } |
| 3632 | |
| 3633 | /** |
| 3634 | * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function |
| 3635 | * @param wmi_handle : handle to WMI. |
| 3636 | * @param param : pointer to hold mcast grp param |
| 3637 | * |
| 3638 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3639 | */ |
| 3640 | QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl, |
| 3641 | struct mcast_group_update_params *param) |
| 3642 | { |
| 3643 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3644 | |
| 3645 | if (wmi_handle->ops->send_mcast_group_update_cmd) |
| 3646 | return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle, |
| 3647 | param); |
| 3648 | |
| 3649 | return QDF_STATUS_E_FAILURE; |
| 3650 | } |
| 3651 | |
| 3652 | /** |
| 3653 | * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function |
| 3654 | * @param wmi_handle : handle to WMI. |
| 3655 | * @param param : pointer to hold wds entry param |
| 3656 | * |
| 3657 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3658 | */ |
| 3659 | QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl, |
| 3660 | struct peer_add_wds_entry_params *param) |
| 3661 | { |
| 3662 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3663 | |
| 3664 | if (wmi_handle->ops->send_peer_add_wds_entry_cmd) |
| 3665 | return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle, |
| 3666 | param); |
| 3667 | |
| 3668 | return QDF_STATUS_E_FAILURE; |
| 3669 | } |
| 3670 | |
| 3671 | /** |
| 3672 | * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function |
| 3673 | * @param wmi_handle : handle to WMI. |
| 3674 | * @param param : pointer to hold wds entry param |
| 3675 | * |
| 3676 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3677 | */ |
| 3678 | QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl, |
| 3679 | struct peer_del_wds_entry_params *param) |
| 3680 | { |
| 3681 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3682 | |
| 3683 | if (wmi_handle->ops->send_peer_del_wds_entry_cmd) |
| 3684 | return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle, |
| 3685 | param); |
| 3686 | |
| 3687 | return QDF_STATUS_E_FAILURE; |
| 3688 | } |
| 3689 | |
| 3690 | /** |
Jeevan Kukkalli | 0aeff78 | 2017-06-16 18:07:28 +0530 | [diff] [blame] | 3691 | * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function |
| 3692 | * @param wmi_hdl : handle to WMI. |
| 3693 | * @param param : pointer to hold bridge mac addr param |
| 3694 | * |
| 3695 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3696 | */ |
| 3697 | QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, |
| 3698 | struct set_bridge_mac_addr_params *param) |
| 3699 | { |
| 3700 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3701 | |
| 3702 | if (wmi_handle->ops->send_set_bridge_mac_addr_cmd) |
| 3703 | return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle, |
| 3704 | param); |
| 3705 | |
| 3706 | return QDF_STATUS_E_FAILURE; |
| 3707 | } |
| 3708 | |
| 3709 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3710 | * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function |
| 3711 | * @param wmi_handle : handle to WMI. |
| 3712 | * @param param : pointer to hold wds entry param |
| 3713 | * |
| 3714 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3715 | */ |
| 3716 | QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl, |
| 3717 | struct peer_update_wds_entry_params *param) |
| 3718 | { |
| 3719 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3720 | |
| 3721 | if (wmi->ops->send_peer_update_wds_entry_cmd) |
| 3722 | return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param); |
| 3723 | |
| 3724 | return QDF_STATUS_E_FAILURE; |
| 3725 | } |
| 3726 | |
| 3727 | /** |
| 3728 | * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function |
| 3729 | * @param wmi_handle : handle to WMI. |
| 3730 | * @param param : pointer to hold phyerr enable param |
| 3731 | * |
| 3732 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3733 | */ |
| 3734 | QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl) |
| 3735 | { |
| 3736 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3737 | |
| 3738 | if (wmi_handle->ops->send_phyerr_enable_cmd) |
| 3739 | return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle); |
| 3740 | |
| 3741 | return QDF_STATUS_E_FAILURE; |
| 3742 | } |
| 3743 | |
| 3744 | /** |
| 3745 | * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function |
| 3746 | * @param wmi_handle : handle to WMI. |
| 3747 | * @param param : pointer to hold phyerr disable param |
| 3748 | * |
| 3749 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3750 | */ |
| 3751 | QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl) |
| 3752 | { |
| 3753 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3754 | |
| 3755 | if (wmi_handle->ops->send_phyerr_disable_cmd) |
| 3756 | return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle); |
| 3757 | |
| 3758 | return QDF_STATUS_E_FAILURE; |
| 3759 | } |
| 3760 | |
| 3761 | /** |
| 3762 | * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function |
| 3763 | * @param wmi_handle : handle to WMI. |
| 3764 | * @param param : pointer to hold antenna param |
| 3765 | * |
| 3766 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3767 | */ |
| 3768 | QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl, |
| 3769 | struct smart_ant_enable_params *param) |
| 3770 | { |
| 3771 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3772 | |
| 3773 | if (wmi_handle->ops->send_smart_ant_enable_cmd) |
| 3774 | return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle, |
| 3775 | param); |
| 3776 | |
| 3777 | return QDF_STATUS_E_FAILURE; |
| 3778 | } |
| 3779 | |
| 3780 | /** |
| 3781 | * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function |
| 3782 | * @param wmi_handle : handle to WMI. |
| 3783 | * @param param : pointer to hold antenna param |
| 3784 | * |
| 3785 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3786 | */ |
| 3787 | QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl, |
| 3788 | struct smart_ant_rx_ant_params *param) |
| 3789 | { |
| 3790 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3791 | |
| 3792 | if (wmi->ops->send_smart_ant_set_rx_ant_cmd) |
| 3793 | return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param); |
| 3794 | |
| 3795 | return QDF_STATUS_E_FAILURE; |
| 3796 | } |
| 3797 | |
| 3798 | /** |
| 3799 | * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function |
| 3800 | * @param wmi_handle : handle to WMI. |
| 3801 | * @param param : pointer to hold antenna param |
| 3802 | * |
| 3803 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3804 | */ |
| 3805 | QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl, |
| 3806 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3807 | struct smart_ant_tx_ant_params *param) |
| 3808 | { |
| 3809 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3810 | |
| 3811 | if (wmi->ops->send_smart_ant_set_tx_ant_cmd) |
| 3812 | return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr, |
| 3813 | param); |
| 3814 | |
| 3815 | return QDF_STATUS_E_FAILURE; |
| 3816 | } |
| 3817 | |
| 3818 | /** |
| 3819 | * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function |
| 3820 | * @param wmi_handle : handle to WMI. |
| 3821 | * @param param : pointer to hold antenna param |
| 3822 | * |
| 3823 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3824 | */ |
| 3825 | QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl, |
| 3826 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3827 | struct smart_ant_training_info_params *param) |
| 3828 | { |
| 3829 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3830 | |
| 3831 | if (wmi->ops->send_smart_ant_set_training_info_cmd) |
| 3832 | return wmi->ops->send_smart_ant_set_training_info_cmd(wmi, |
| 3833 | macaddr, param); |
| 3834 | |
| 3835 | return QDF_STATUS_E_FAILURE; |
| 3836 | } |
| 3837 | |
| 3838 | /** |
| 3839 | * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function |
| 3840 | * @param wmi_handle : handle to WMI. |
| 3841 | * @param macaddr : MAC address |
| 3842 | * @param param : pointer to hold node parameter |
| 3843 | * |
| 3844 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3845 | */ |
| 3846 | QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl, |
| 3847 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3848 | struct smart_ant_node_config_params *param) |
| 3849 | { |
| 3850 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3851 | |
| 3852 | if (wmi->ops->send_smart_ant_set_node_config_cmd) |
| 3853 | return wmi->ops->send_smart_ant_set_node_config_cmd(wmi, |
| 3854 | macaddr, param); |
| 3855 | |
| 3856 | return QDF_STATUS_E_FAILURE; |
| 3857 | } |
| 3858 | |
| 3859 | /** |
| 3860 | * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function |
| 3861 | * @param wmi_handle : handle to WMI. |
| 3862 | * @param param : pointer to hold antenna param |
| 3863 | * |
| 3864 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3865 | */ |
| 3866 | QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, |
| 3867 | struct smart_ant_enable_tx_feedback_params *param) |
| 3868 | { |
| 3869 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3870 | |
| 3871 | if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd) |
| 3872 | return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi, |
| 3873 | param); |
| 3874 | |
| 3875 | return QDF_STATUS_E_FAILURE; |
| 3876 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 3877 | qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3878 | |
| 3879 | /** |
| 3880 | * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function |
| 3881 | * @param wmi_handle : handle to WMI. |
| 3882 | * @param param : pointer to hold spectral config param |
| 3883 | * |
| 3884 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3885 | */ |
| 3886 | QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, |
| 3887 | struct vdev_spectral_configure_params *param) |
| 3888 | { |
| 3889 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3890 | |
| 3891 | if (wmi->ops->send_vdev_spectral_configure_cmd) |
| 3892 | return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param); |
| 3893 | |
| 3894 | return QDF_STATUS_E_FAILURE; |
| 3895 | } |
| 3896 | |
| 3897 | /** |
| 3898 | * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function |
| 3899 | * @param wmi_handle : handle to WMI. |
| 3900 | * @param param : pointer to hold enable spectral param |
| 3901 | * |
| 3902 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3903 | */ |
| 3904 | QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, |
| 3905 | struct vdev_spectral_enable_params *param) |
| 3906 | { |
| 3907 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3908 | |
| 3909 | if (wmi->ops->send_vdev_spectral_enable_cmd) |
| 3910 | return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param); |
| 3911 | |
| 3912 | return QDF_STATUS_E_FAILURE; |
| 3913 | } |
| 3914 | |
| 3915 | /** |
| 3916 | * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function |
| 3917 | * @param wmi_handle : handle to WMI. |
| 3918 | * @param param : pointer to hold chan info param |
| 3919 | * |
| 3920 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3921 | */ |
| 3922 | QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, |
| 3923 | struct bss_chan_info_request_params *param) |
| 3924 | { |
| 3925 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3926 | |
| 3927 | if (wmi->ops->send_bss_chan_info_request_cmd) |
| 3928 | return wmi->ops->send_bss_chan_info_request_cmd(wmi, param); |
| 3929 | |
| 3930 | return QDF_STATUS_E_FAILURE; |
| 3931 | } |
| 3932 | |
| 3933 | /** |
| 3934 | * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function |
| 3935 | * @param wmi_handle : handle to WMI. |
| 3936 | * @param param : pointer to hold thermal mitigation param |
| 3937 | * |
| 3938 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3939 | */ |
| 3940 | QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, |
| 3941 | struct thermal_mitigation_params *param) |
| 3942 | { |
| 3943 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3944 | |
| 3945 | if (wmi->ops->send_thermal_mitigation_param_cmd) |
| 3946 | return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param); |
| 3947 | |
| 3948 | return QDF_STATUS_E_FAILURE; |
| 3949 | } |
| 3950 | |
| 3951 | /** |
| 3952 | * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function |
| 3953 | * @param wmi_handle : handle to WMI. |
| 3954 | * @param macaddr : MAC address |
| 3955 | * @param param : pointer to hold neighbour rx parameter |
| 3956 | * |
| 3957 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3958 | */ |
| 3959 | QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl, |
| 3960 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3961 | struct set_neighbour_rx_params *param) |
| 3962 | { |
| 3963 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3964 | |
| 3965 | if (wmi->ops->send_vdev_set_neighbour_rx_cmd) |
| 3966 | return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi, |
| 3967 | macaddr, param); |
| 3968 | |
| 3969 | return QDF_STATUS_E_FAILURE; |
| 3970 | } |
| 3971 | |
| 3972 | /** |
| 3973 | * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function |
| 3974 | * @param wmi_handle : handle to WMI. |
| 3975 | * @param param : pointer to hold fwtest param |
| 3976 | * |
| 3977 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3978 | */ |
| 3979 | QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, |
| 3980 | struct set_fwtest_params *param) |
| 3981 | { |
| 3982 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3983 | |
| 3984 | if (wmi->ops->send_vdev_set_fwtest_param_cmd) |
| 3985 | return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param); |
| 3986 | |
| 3987 | return QDF_STATUS_E_FAILURE; |
| 3988 | } |
| 3989 | |
Subrat Mishra | d7c7a56 | 2017-09-27 14:41:20 +0530 | [diff] [blame] | 3990 | #ifdef WLAN_SUPPORT_FILS |
| 3991 | QDF_STATUS |
| 3992 | wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, struct fd_params *param) |
| 3993 | { |
| 3994 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 3995 | |
| 3996 | if (wmi_handle->ops->send_fils_discovery_send_cmd) |
| 3997 | return wmi_handle->ops->send_fils_discovery_send_cmd(wmi_handle, |
| 3998 | param); |
| 3999 | |
| 4000 | return QDF_STATUS_E_FAILURE; |
| 4001 | } |
| 4002 | |
| 4003 | QDF_STATUS |
| 4004 | wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl, |
| 4005 | struct config_fils_params *param) |
| 4006 | { |
| 4007 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4008 | |
| 4009 | if (wmi->ops->send_vdev_fils_enable_cmd) |
| 4010 | return wmi->ops->send_vdev_fils_enable_cmd(wmi, param); |
| 4011 | |
| 4012 | return QDF_STATUS_E_FAILURE; |
| 4013 | } |
| 4014 | |
| 4015 | QDF_STATUS |
| 4016 | wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf, |
| 4017 | uint32_t *vdev_id) |
| 4018 | { |
| 4019 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4020 | |
| 4021 | if (wmi_handle->ops->extract_swfda_vdev_id) |
| 4022 | return wmi_handle->ops->extract_swfda_vdev_id(wmi_handle, |
| 4023 | evt_buf, vdev_id); |
| 4024 | |
| 4025 | return QDF_STATUS_E_FAILURE; |
| 4026 | } |
| 4027 | #endif /* WLAN_SUPPORT_FILS */ |
| 4028 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4029 | /** |
| 4030 | * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function |
| 4031 | * @param wmi_handle : handle to WMI. |
| 4032 | * @param param : pointer to hold config ratemask param |
| 4033 | * |
| 4034 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4035 | */ |
| 4036 | QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl, |
| 4037 | struct config_ratemask_params *param) |
| 4038 | { |
| 4039 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4040 | |
| 4041 | if (wmi->ops->send_vdev_config_ratemask_cmd) |
| 4042 | return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param); |
| 4043 | |
| 4044 | return QDF_STATUS_E_FAILURE; |
| 4045 | } |
| 4046 | |
| 4047 | /** |
Sathish Kumar | 6011c74 | 2017-11-08 14:49:58 +0530 | [diff] [blame] | 4048 | * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr |
| 4049 | * size function |
| 4050 | * @param wmi_handle : handle to WMI |
| 4051 | * @param param : pointer to hold custom aggr size param |
| 4052 | * |
| 4053 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 4054 | */ |
| 4055 | QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, |
| 4056 | struct set_custom_aggr_size_params *param) |
| 4057 | { |
| 4058 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4059 | |
| 4060 | if (wmi->ops->send_vdev_set_custom_aggr_size_cmd) |
| 4061 | return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param); |
| 4062 | |
| 4063 | return QDF_STATUS_E_FAILURE; |
| 4064 | } |
| 4065 | |
| 4066 | /** |
Venkateswara Swamy Bandaru | 9983ac5 | 2017-12-22 17:16:19 +0530 | [diff] [blame] | 4067 | * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold |
| 4068 | * @param wmi_handle : handle to WMI |
| 4069 | * @param param : pointer to hold qdepth threshold params |
| 4070 | * |
| 4071 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 4072 | */ |
| 4073 | QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, |
| 4074 | struct set_qdepth_thresh_params *param) |
| 4075 | { |
| 4076 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4077 | |
| 4078 | if (wmi->ops->send_vdev_set_qdepth_thresh_cmd) |
| 4079 | return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param); |
| 4080 | |
| 4081 | return QDF_STATUS_E_FAILURE; |
| 4082 | } |
| 4083 | |
| 4084 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4085 | * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function |
| 4086 | * @param wmi_handle : handle to WMI. |
| 4087 | * @param param : pointer to hold regdomain param |
| 4088 | * |
| 4089 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4090 | */ |
| 4091 | QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, |
| 4092 | struct pdev_set_regdomain_params *param) |
| 4093 | { |
| 4094 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4095 | |
| 4096 | if (wmi_handle->ops->send_pdev_set_regdomain_cmd) |
| 4097 | return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle, |
| 4098 | param); |
| 4099 | |
| 4100 | return QDF_STATUS_E_FAILURE; |
| 4101 | } |
| 4102 | |
| 4103 | /** |
| 4104 | * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function |
| 4105 | * @param wmi_handle : handle to WMI. |
| 4106 | * @param param : pointer to hold quiet mode param |
| 4107 | * |
| 4108 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4109 | */ |
| 4110 | QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl, |
| 4111 | struct set_quiet_mode_params *param) |
| 4112 | { |
| 4113 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4114 | |
| 4115 | if (wmi_handle->ops->send_set_quiet_mode_cmd) |
| 4116 | return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle, |
| 4117 | param); |
| 4118 | |
| 4119 | return QDF_STATUS_E_FAILURE; |
| 4120 | } |
| 4121 | |
| 4122 | /** |
| 4123 | * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function |
| 4124 | * @param wmi_handle : handle to WMI. |
| 4125 | * @param param : pointer to hold beacon filter param |
| 4126 | * |
| 4127 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4128 | */ |
| 4129 | QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, |
| 4130 | struct set_beacon_filter_params *param) |
| 4131 | { |
| 4132 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4133 | |
| 4134 | if (wmi_handle->ops->send_set_beacon_filter_cmd) |
| 4135 | return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle, |
| 4136 | param); |
| 4137 | |
| 4138 | return QDF_STATUS_E_FAILURE; |
| 4139 | } |
| 4140 | |
| 4141 | /** |
| 4142 | * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function |
| 4143 | * @param wmi_handle : handle to WMI. |
| 4144 | * @param param : pointer to hold beacon filter param |
| 4145 | * |
| 4146 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4147 | */ |
| 4148 | QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, |
| 4149 | struct remove_beacon_filter_params *param) |
| 4150 | { |
| 4151 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4152 | |
| 4153 | if (wmi->ops->send_remove_beacon_filter_cmd) |
| 4154 | return wmi->ops->send_remove_beacon_filter_cmd(wmi, param); |
| 4155 | |
| 4156 | return QDF_STATUS_E_FAILURE; |
| 4157 | } |
| 4158 | |
| 4159 | /** |
| 4160 | * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function |
| 4161 | * @param wmi_handle : handle to WMI. |
| 4162 | * @param macaddr : MAC address |
| 4163 | * @param param : pointer to hold mgmt parameter |
| 4164 | * |
| 4165 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4166 | */ |
| 4167 | #if 0 |
| 4168 | QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl, |
| 4169 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4170 | struct mgmt_params *param) |
| 4171 | { |
| 4172 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4173 | |
| 4174 | if (wmi_handle->ops->send_mgmt_cmd) |
| 4175 | return wmi_handle->ops->send_mgmt_cmd(wmi_handle, |
| 4176 | macaddr, param); |
| 4177 | |
| 4178 | return QDF_STATUS_E_FAILURE; |
| 4179 | } |
| 4180 | #endif |
| 4181 | |
| 4182 | /** |
| 4183 | * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function |
| 4184 | * @param wmi_handle : handle to WMI. |
| 4185 | * @param macaddr : MAC address |
| 4186 | * @param param : pointer to hold addba resp parameter |
| 4187 | * |
| 4188 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4189 | */ |
| 4190 | QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, |
| 4191 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4192 | struct addba_clearresponse_params *param) |
| 4193 | { |
| 4194 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4195 | |
| 4196 | if (wmi_handle->ops->send_addba_clearresponse_cmd) |
| 4197 | return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle, |
| 4198 | macaddr, param); |
| 4199 | |
| 4200 | return QDF_STATUS_E_FAILURE; |
| 4201 | } |
| 4202 | |
| 4203 | /** |
| 4204 | * wmi_unified_addba_send_cmd_send() - WMI addba send function |
| 4205 | * @param wmi_handle : handle to WMI. |
| 4206 | * @param macaddr : MAC address |
| 4207 | * @param param : pointer to hold addba parameter |
| 4208 | * |
| 4209 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4210 | */ |
| 4211 | QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, |
| 4212 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4213 | struct addba_send_params *param) |
| 4214 | { |
| 4215 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4216 | |
| 4217 | if (wmi_handle->ops->send_addba_send_cmd) |
| 4218 | return wmi_handle->ops->send_addba_send_cmd(wmi_handle, |
| 4219 | macaddr, param); |
| 4220 | |
| 4221 | return QDF_STATUS_E_FAILURE; |
| 4222 | } |
| 4223 | |
| 4224 | /** |
| 4225 | * wmi_unified_delba_send_cmd_send() - WMI delba cmd function |
| 4226 | * @param wmi_handle : handle to WMI. |
| 4227 | * @param macaddr : MAC address |
| 4228 | * @param param : pointer to hold delba parameter |
| 4229 | * |
| 4230 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4231 | */ |
| 4232 | QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, |
| 4233 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4234 | struct delba_send_params *param) |
| 4235 | { |
| 4236 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4237 | |
| 4238 | if (wmi_handle->ops->send_delba_send_cmd) |
| 4239 | return wmi_handle->ops->send_delba_send_cmd(wmi_handle, |
| 4240 | macaddr, param); |
| 4241 | |
| 4242 | return QDF_STATUS_E_FAILURE; |
| 4243 | } |
| 4244 | |
| 4245 | /** |
| 4246 | * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function |
| 4247 | * @param wmi_handle : handle to WMI. |
| 4248 | * @param macaddr : MAC address |
| 4249 | * @param param : pointer to hold addba set resp parameter |
| 4250 | * |
| 4251 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4252 | */ |
| 4253 | QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, |
| 4254 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4255 | struct addba_setresponse_params *param) |
| 4256 | { |
| 4257 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4258 | |
| 4259 | if (wmi_handle->ops->send_addba_setresponse_cmd) |
| 4260 | return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle, |
| 4261 | macaddr, param); |
| 4262 | |
| 4263 | return QDF_STATUS_E_FAILURE; |
| 4264 | } |
| 4265 | |
| 4266 | /** |
| 4267 | * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function |
| 4268 | * @param wmi_handle : handle to WMI. |
| 4269 | * @param macaddr : MAC address |
| 4270 | * @param param : pointer to hold singleamsdu parameter |
| 4271 | * |
| 4272 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4273 | */ |
| 4274 | QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, |
| 4275 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4276 | struct singleamsdu_params *param) |
| 4277 | { |
| 4278 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4279 | |
| 4280 | if (wmi_handle->ops->send_singleamsdu_cmd) |
| 4281 | return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle, |
| 4282 | macaddr, param); |
| 4283 | |
| 4284 | return QDF_STATUS_E_FAILURE; |
| 4285 | } |
| 4286 | |
| 4287 | /** |
| 4288 | * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function |
| 4289 | * @param wmi_handle : handle to WMI. |
| 4290 | * @param macaddr : MAC address |
| 4291 | * @param param : pointer to hold set_qboost parameter |
| 4292 | * |
| 4293 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4294 | */ |
| 4295 | QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl, |
| 4296 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4297 | struct set_qboost_params *param) |
| 4298 | { |
| 4299 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4300 | |
| 4301 | if (wmi_handle->ops->send_set_qboost_param_cmd) |
| 4302 | return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle, |
| 4303 | macaddr, param); |
| 4304 | |
| 4305 | return QDF_STATUS_E_FAILURE; |
| 4306 | } |
| 4307 | |
| 4308 | /** |
| 4309 | * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function |
| 4310 | * @param wmi_handle : handle to WMI. |
| 4311 | * @param param : pointer to hold mu scan param |
| 4312 | * |
| 4313 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4314 | */ |
| 4315 | QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, |
| 4316 | struct mu_scan_params *param) |
| 4317 | { |
| 4318 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4319 | |
| 4320 | if (wmi_handle->ops->send_mu_scan_cmd) |
| 4321 | return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param); |
| 4322 | |
| 4323 | return QDF_STATUS_E_FAILURE; |
| 4324 | } |
| 4325 | |
| 4326 | /** |
| 4327 | * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function |
| 4328 | * @param wmi_handle : handle to WMI. |
| 4329 | * @param param : pointer to hold mu scan param |
| 4330 | * |
| 4331 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4332 | */ |
| 4333 | QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, |
| 4334 | struct lteu_config_params *param) |
| 4335 | { |
| 4336 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4337 | |
| 4338 | if (wmi_handle->ops->send_lteu_config_cmd) |
| 4339 | return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param); |
| 4340 | |
| 4341 | return QDF_STATUS_E_FAILURE; |
| 4342 | } |
| 4343 | |
| 4344 | /** |
| 4345 | * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function |
| 4346 | * @param wmi_handle : handle to WMI. |
| 4347 | * @param param : pointer to hold mu scan param |
| 4348 | * |
| 4349 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4350 | */ |
| 4351 | QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, |
| 4352 | struct set_ps_mode_params *param) |
| 4353 | { |
| 4354 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4355 | |
| 4356 | if (wmi_handle->ops->send_set_ps_mode_cmd) |
| 4357 | return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param); |
| 4358 | |
| 4359 | return QDF_STATUS_E_FAILURE; |
| 4360 | } |
| 4361 | |
| 4362 | /** |
| 4363 | * wmi_unified_init_cmd_send() - send initialization cmd to fw |
| 4364 | * @wmi_handle: wmi handle |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4365 | * @param param: pointer to wmi init param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4366 | * |
| 4367 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4368 | */ |
| 4369 | QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4370 | struct wmi_init_cmd_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4371 | { |
| 4372 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4373 | |
| 4374 | if (wmi_handle->ops->init_cmd_send) |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4375 | return wmi_handle->ops->init_cmd_send(wmi_handle, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4376 | |
| 4377 | return QDF_STATUS_E_FAILURE; |
| 4378 | } |
| 4379 | |
| 4380 | /** |
| 4381 | * wmi_save_service_bitmap() - save service bitmap |
| 4382 | * @wmi_handle: wmi handle |
| 4383 | * @param evt_buf: pointer to event buffer |
| 4384 | * |
| 4385 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4386 | */ |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 4387 | QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 4388 | void *bitmap_buf) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4389 | { |
| 4390 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4391 | |
| 4392 | if (wmi_handle->ops->save_service_bitmap) { |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 4393 | return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf, |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 4394 | bitmap_buf); |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 4395 | } |
| 4396 | return QDF_STATUS_E_FAILURE; |
| 4397 | } |
| 4398 | |
| 4399 | /** |
| 4400 | * wmi_save_ext_service_bitmap() - save extended service bitmap |
| 4401 | * @wmi_handle: wmi handle |
| 4402 | * @param evt_buf: pointer to event buffer |
| 4403 | * |
| 4404 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4405 | */ |
| 4406 | QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 4407 | void *bitmap_buf) |
| 4408 | { |
| 4409 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4410 | |
| 4411 | if (wmi_handle->ops->save_ext_service_bitmap) { |
| 4412 | return wmi_handle->ops->save_ext_service_bitmap(wmi_handle, |
| 4413 | evt_buf, bitmap_buf); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4414 | } |
| 4415 | return QDF_STATUS_E_FAILURE; |
| 4416 | } |
| 4417 | |
| 4418 | /** |
| 4419 | * wmi_save_fw_version() - Save fw version |
| 4420 | * @wmi_handle: wmi handle |
| 4421 | * @param evt_buf: pointer to event buffer |
| 4422 | * |
| 4423 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4424 | */ |
| 4425 | QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf) |
| 4426 | { |
| 4427 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4428 | |
| 4429 | if (wmi_handle->ops->save_fw_version) { |
| 4430 | wmi_handle->ops->save_fw_version(wmi_handle, evt_buf); |
| 4431 | return 0; |
| 4432 | } |
| 4433 | return QDF_STATUS_E_FAILURE; |
| 4434 | |
| 4435 | } |
| 4436 | |
| 4437 | /** |
| 4438 | * wmi_check_and_update_fw_version() - Ready and fw version check |
| 4439 | * @wmi_handle: wmi handle |
| 4440 | * @param evt_buf: pointer to event buffer |
| 4441 | * |
| 4442 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4443 | */ |
| 4444 | QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf) |
| 4445 | { |
| 4446 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4447 | |
| 4448 | if (wmi_handle->ops->check_and_update_fw_version) |
| 4449 | return wmi_handle->ops->check_and_update_fw_version(wmi_handle, |
| 4450 | evt_buf); |
| 4451 | |
| 4452 | return QDF_STATUS_E_FAILURE; |
| 4453 | |
| 4454 | } |
| 4455 | |
| 4456 | /** |
| 4457 | * wmi_service_enabled() - Check if service enabled |
| 4458 | * @param wmi_handle: wmi handle |
| 4459 | * @param service_id: service identifier |
| 4460 | * |
| 4461 | * Return: 1 enabled, 0 disabled |
| 4462 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4463 | bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id) |
| 4464 | { |
| 4465 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4466 | |
| 4467 | if ((service_id < wmi_services_max) && |
| 4468 | (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) { |
| 4469 | if (wmi_handle->ops->is_service_enabled) { |
| 4470 | return wmi_handle->ops->is_service_enabled(wmi_handle, |
| 4471 | wmi_handle->services[service_id]); |
| 4472 | } |
| 4473 | } else { |
Sathish Kumar | 686d08d | 2018-06-26 11:01:11 +0530 | [diff] [blame] | 4474 | WMI_LOGI("Service %d not supported", service_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4475 | } |
Sourav Mohapatra | a7b454d | 2017-12-03 11:44:44 +0530 | [diff] [blame] | 4476 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4477 | return false; |
| 4478 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4479 | |
| 4480 | /** |
| 4481 | * wmi_get_target_cap_from_service_ready() - extract service ready event |
| 4482 | * @wmi_handle: wmi handle |
| 4483 | * @param evt_buf: pointer to received event buffer |
| 4484 | * @param ev: pointer to hold target capability information extracted from even |
| 4485 | * |
| 4486 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4487 | */ |
| 4488 | QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 4489 | void *evt_buf, struct wlan_psoc_target_capability_info *ev) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4490 | { |
| 4491 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4492 | |
| 4493 | if (wmi->ops->get_target_cap_from_service_ready) |
| 4494 | return wmi->ops->get_target_cap_from_service_ready(wmi, |
| 4495 | evt_buf, ev); |
| 4496 | |
| 4497 | return QDF_STATUS_E_FAILURE; |
| 4498 | } |
| 4499 | |
| 4500 | /** |
| 4501 | * wmi_extract_fw_version() - extract fw version |
| 4502 | * @wmi_handle: wmi handle |
| 4503 | * @param evt_buf: pointer to event buffer |
| 4504 | * @param fw_ver: Pointer to hold fw version |
| 4505 | * |
| 4506 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4507 | */ |
| 4508 | QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, |
| 4509 | void *evt_buf, struct wmi_host_fw_ver *fw_ver) |
| 4510 | { |
| 4511 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4512 | |
| 4513 | if (wmi_handle->ops->extract_fw_version) |
| 4514 | return wmi_handle->ops->extract_fw_version(wmi_handle, |
| 4515 | evt_buf, fw_ver); |
| 4516 | |
| 4517 | return QDF_STATUS_E_FAILURE; |
| 4518 | } |
| 4519 | |
| 4520 | /** |
| 4521 | * wmi_extract_fw_abi_version() - extract fw abi version |
| 4522 | * @wmi_handle: wmi handle |
| 4523 | * @param evt_buf: Pointer to event buffer |
| 4524 | * @param fw_ver: Pointer to hold fw abi version |
| 4525 | * |
| 4526 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4527 | */ |
| 4528 | QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, |
| 4529 | void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver) |
| 4530 | { |
| 4531 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4532 | |
| 4533 | if (wmi_handle->ops->extract_fw_abi_version) |
| 4534 | return wmi_handle->ops->extract_fw_abi_version(wmi_handle, |
| 4535 | evt_buf, fw_ver); |
| 4536 | |
| 4537 | return QDF_STATUS_E_FAILURE; |
| 4538 | } |
| 4539 | |
| 4540 | /** |
| 4541 | * wmi_extract_hal_reg_cap() - extract HAL registered capabilities |
| 4542 | * @wmi_handle: wmi handle |
| 4543 | * @param evt_buf: Pointer to event buffer |
| 4544 | * @param hal_reg_cap: pointer to hold HAL reg capabilities |
| 4545 | * |
| 4546 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4547 | */ |
| 4548 | QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 4549 | struct wlan_psoc_hal_reg_capability *hal_reg_cap) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4550 | { |
| 4551 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4552 | |
| 4553 | if (wmi_handle->ops->extract_hal_reg_cap) |
| 4554 | return wmi_handle->ops->extract_hal_reg_cap(wmi_handle, |
| 4555 | evt_buf, hal_reg_cap); |
| 4556 | |
| 4557 | return QDF_STATUS_E_FAILURE; |
| 4558 | } |
| 4559 | |
| 4560 | /** |
| 4561 | * wmi_extract_host_mem_req_from_service_ready() - Extract host memory |
| 4562 | * request event |
| 4563 | * @wmi_handle: wmi handle |
| 4564 | * @param evt_buf: pointer to event buffer |
| 4565 | * @param num_entries: pointer to hold number of entries requested |
| 4566 | * |
| 4567 | * Return: Number of entries requested |
| 4568 | */ |
| 4569 | host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, |
| 4570 | void *evt_buf, uint8_t *num_entries) |
| 4571 | { |
| 4572 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4573 | |
| 4574 | if (wmi_handle->ops->extract_host_mem_req) |
| 4575 | return wmi_handle->ops->extract_host_mem_req(wmi_handle, |
| 4576 | evt_buf, num_entries); |
| 4577 | |
| 4578 | *num_entries = 0; |
| 4579 | return NULL; |
| 4580 | } |
| 4581 | |
| 4582 | /** |
| 4583 | * wmi_ready_extract_init_status() - Extract init status from ready event |
| 4584 | * @wmi_handle: wmi handle |
| 4585 | * @param ev: Pointer to event buffer |
| 4586 | * |
| 4587 | * Return: ready status |
| 4588 | */ |
| 4589 | uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev) |
| 4590 | { |
| 4591 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4592 | |
| 4593 | if (wmi_handle->ops->ready_extract_init_status) |
| 4594 | return wmi_handle->ops->ready_extract_init_status(wmi_handle, |
| 4595 | ev); |
| 4596 | |
| 4597 | |
| 4598 | return 1; |
| 4599 | |
| 4600 | } |
| 4601 | |
| 4602 | /** |
| 4603 | * wmi_ready_extract_mac_addr() - extract mac address from ready event |
| 4604 | * @wmi_handle: wmi handle |
| 4605 | * @param ev: pointer to event buffer |
| 4606 | * @param macaddr: Pointer to hold MAC address |
| 4607 | * |
| 4608 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4609 | */ |
| 4610 | QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr) |
| 4611 | { |
| 4612 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4613 | |
| 4614 | if (wmi_handle->ops->ready_extract_mac_addr) |
| 4615 | return wmi_handle->ops->ready_extract_mac_addr(wmi_handle, |
| 4616 | ev, macaddr); |
| 4617 | |
| 4618 | |
| 4619 | return QDF_STATUS_E_FAILURE; |
| 4620 | } |
| 4621 | |
| 4622 | /** |
Manoj Ekbote | dd27390 | 2017-07-09 23:28:56 -0700 | [diff] [blame] | 4623 | * wmi_ready_extract_mac_addr() - extract MAC address list from ready event |
| 4624 | * @wmi_handle: wmi handle |
| 4625 | * @param ev: pointer to event buffer |
| 4626 | * @param num_mac_addr: Pointer to number of entries |
| 4627 | * |
| 4628 | * Return: address to start of mac addr list |
| 4629 | */ |
| 4630 | wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, |
| 4631 | uint8_t *num_mac_addr) |
| 4632 | { |
| 4633 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4634 | |
| 4635 | if (wmi_handle->ops->ready_extract_mac_addr_list) |
| 4636 | return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle, |
| 4637 | ev, num_mac_addr); |
| 4638 | |
| 4639 | *num_mac_addr = 0; |
| 4640 | |
| 4641 | return NULL; |
| 4642 | } |
| 4643 | |
| 4644 | /** |
Kiran Venkatappa | 094c24f | 2017-11-10 20:50:12 +0530 | [diff] [blame] | 4645 | * wmi_extract_ready_params() - Extract data from ready event apart from |
| 4646 | * status, macaddr and version. |
| 4647 | * @wmi_handle: Pointer to WMI handle. |
| 4648 | * @evt_buf: Pointer to Ready event buffer. |
| 4649 | * @ev_param: Pointer to host defined struct to copy the data from event. |
| 4650 | * |
| 4651 | * Return: QDF_STATUS_SUCCESS on success. |
| 4652 | */ |
| 4653 | QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, |
| 4654 | void *evt_buf, struct wmi_host_ready_ev_param *ev_param) |
| 4655 | { |
| 4656 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4657 | |
| 4658 | if (wmi_handle->ops->extract_ready_event_params) |
| 4659 | return wmi_handle->ops->extract_ready_event_params(wmi_handle, |
| 4660 | evt_buf, ev_param); |
| 4661 | |
| 4662 | return QDF_STATUS_E_FAILURE; |
| 4663 | } |
| 4664 | |
| 4665 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4666 | * wmi_extract_dbglog_data_len() - extract debuglog data length |
| 4667 | * @wmi_handle: wmi handle |
| 4668 | * @param evt_buf: pointer to event buffer |
| 4669 | * @param len: length of buffer |
| 4670 | * |
| 4671 | * Return: length |
| 4672 | */ |
| 4673 | uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, void *evt_buf, |
Rajeev Kumar | 029b9ea | 2017-01-25 12:46:21 -0800 | [diff] [blame] | 4674 | uint32_t *len) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4675 | { |
| 4676 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4677 | |
| 4678 | if (wmi_handle->ops->extract_dbglog_data_len) |
| 4679 | return wmi_handle->ops->extract_dbglog_data_len(wmi_handle, |
| 4680 | evt_buf, len); |
| 4681 | |
| 4682 | |
| 4683 | return NULL; |
| 4684 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 4685 | qdf_export_symbol(wmi_extract_dbglog_data_len); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4686 | |
| 4687 | /** |
| 4688 | * wmi_send_ext_resource_config() - send extended resource configuration |
| 4689 | * @wmi_handle: wmi handle |
| 4690 | * @param ext_cfg: pointer to extended resource configuration |
| 4691 | * |
| 4692 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4693 | */ |
| 4694 | QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, |
| 4695 | wmi_host_ext_resource_config *ext_cfg) |
| 4696 | { |
| 4697 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4698 | |
| 4699 | if (wmi_handle->ops->send_ext_resource_config) |
| 4700 | return wmi_handle->ops->send_ext_resource_config(wmi_handle, |
| 4701 | ext_cfg); |
| 4702 | |
| 4703 | return QDF_STATUS_E_FAILURE; |
| 4704 | } |
| 4705 | |
| 4706 | /** |
| 4707 | * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function |
| 4708 | * @param wmi_handle : handle to WMI. |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4709 | * @mac_id: mac_id |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4710 | * |
| 4711 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4712 | */ |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4713 | QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl, |
| 4714 | uint8_t mac_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4715 | { |
| 4716 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4717 | |
| 4718 | if (wmi->ops->send_nf_dbr_dbm_info_get_cmd) |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4719 | return wmi->ops->send_nf_dbr_dbm_info_get_cmd(wmi, mac_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4720 | |
| 4721 | return QDF_STATUS_E_FAILURE; |
| 4722 | } |
| 4723 | |
| 4724 | /** |
| 4725 | * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function |
| 4726 | * @param wmi_handle : handle to WMI. |
| 4727 | * @param param : pointer to hold packet power info param |
| 4728 | * |
| 4729 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4730 | */ |
| 4731 | QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl, |
| 4732 | struct packet_power_info_params *param) |
| 4733 | { |
| 4734 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4735 | |
| 4736 | if (wmi->ops->send_packet_power_info_get_cmd) |
| 4737 | return wmi->ops->send_packet_power_info_get_cmd(wmi, param); |
| 4738 | |
| 4739 | return QDF_STATUS_E_FAILURE; |
| 4740 | } |
| 4741 | |
| 4742 | /** |
| 4743 | * wmi_unified_gpio_config_cmd_send() - WMI gpio config function |
| 4744 | * @param wmi_handle : handle to WMI. |
| 4745 | * @param param : pointer to hold gpio config param |
| 4746 | * |
| 4747 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4748 | */ |
| 4749 | QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl, |
| 4750 | struct gpio_config_params *param) |
| 4751 | { |
| 4752 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4753 | |
| 4754 | if (wmi_handle->ops->send_gpio_config_cmd) |
| 4755 | return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param); |
| 4756 | |
| 4757 | return QDF_STATUS_E_FAILURE; |
| 4758 | } |
| 4759 | |
| 4760 | /** |
| 4761 | * wmi_unified_gpio_output_cmd_send() - WMI gpio config function |
| 4762 | * @param wmi_handle : handle to WMI. |
| 4763 | * @param param : pointer to hold gpio config param |
| 4764 | * |
| 4765 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4766 | */ |
| 4767 | QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl, |
| 4768 | struct gpio_output_params *param) |
| 4769 | { |
| 4770 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4771 | |
| 4772 | if (wmi_handle->ops->send_gpio_output_cmd) |
| 4773 | return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param); |
| 4774 | |
| 4775 | return QDF_STATUS_E_FAILURE; |
| 4776 | } |
| 4777 | |
| 4778 | /** |
| 4779 | * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function |
| 4780 | * @param wmi_handle : handle to WMI. |
| 4781 | * @param param : pointer to hold rtt meas req test param |
| 4782 | * |
| 4783 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4784 | */ |
| 4785 | QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, |
| 4786 | struct rtt_meas_req_test_params *param) |
| 4787 | { |
| 4788 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4789 | |
| 4790 | if (wmi_handle->ops->send_rtt_meas_req_test_cmd) |
| 4791 | return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle, |
| 4792 | param); |
| 4793 | |
| 4794 | return QDF_STATUS_E_FAILURE; |
| 4795 | } |
| 4796 | |
| 4797 | /** |
| 4798 | * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function |
| 4799 | * @param wmi_handle : handle to WMI. |
| 4800 | * @param param : pointer to hold rtt meas req param |
| 4801 | * |
| 4802 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4803 | */ |
| 4804 | QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, |
| 4805 | struct rtt_meas_req_params *param) |
| 4806 | { |
| 4807 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4808 | |
| 4809 | if (wmi_handle->ops->send_rtt_meas_req_cmd) |
| 4810 | return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle, |
| 4811 | param); |
| 4812 | |
| 4813 | return QDF_STATUS_E_FAILURE; |
| 4814 | } |
| 4815 | |
| 4816 | /** |
| 4817 | * wmi_unified_lci_set_cmd_send() - WMI lci set function |
| 4818 | * @param wmi_handle : handle to WMI. |
| 4819 | * @param param : pointer to hold lci param |
| 4820 | * |
| 4821 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4822 | */ |
| 4823 | QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, |
| 4824 | struct lci_set_params *param) |
| 4825 | { |
| 4826 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4827 | |
| 4828 | if (wmi_handle->ops->send_lci_set_cmd) |
| 4829 | return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param); |
| 4830 | |
| 4831 | return QDF_STATUS_E_FAILURE; |
| 4832 | } |
| 4833 | |
| 4834 | /** |
| 4835 | * wmi_unified_lcr_set_cmd_send() - WMI lcr set function |
| 4836 | * @param wmi_handle : handle to WMI. |
| 4837 | * @param param : pointer to hold lcr param |
| 4838 | * |
| 4839 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4840 | */ |
| 4841 | QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, |
| 4842 | struct lcr_set_params *param) |
| 4843 | { |
| 4844 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4845 | |
| 4846 | if (wmi_handle->ops->send_lcr_set_cmd) |
| 4847 | return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param); |
| 4848 | |
| 4849 | return QDF_STATUS_E_FAILURE; |
| 4850 | } |
| 4851 | |
| 4852 | /** |
| 4853 | * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function |
| 4854 | * @param wmi_handle : handle to WMI. |
| 4855 | * @param param : pointer to hold rtt meas req test param |
| 4856 | * |
| 4857 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4858 | */ |
| 4859 | QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, |
| 4860 | struct rtt_keepalive_req_params *param) |
| 4861 | { |
| 4862 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4863 | |
| 4864 | if (wmi_handle->ops->send_rtt_keepalive_req_cmd) |
| 4865 | return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle, |
| 4866 | param); |
| 4867 | |
| 4868 | return QDF_STATUS_E_FAILURE; |
| 4869 | } |
| 4870 | |
| 4871 | /** |
| 4872 | * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd |
| 4873 | * to fw |
| 4874 | * @wmi_handle: wmi handle |
| 4875 | * @param: pointer to hold periodic chan stats param |
| 4876 | * |
| 4877 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4878 | */ |
| 4879 | QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, |
| 4880 | struct periodic_chan_stats_params *param) |
| 4881 | { |
| 4882 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4883 | |
| 4884 | if (wmi->ops->send_periodic_chan_stats_config_cmd) |
| 4885 | return wmi->ops->send_periodic_chan_stats_config_cmd(wmi, |
| 4886 | param); |
| 4887 | |
| 4888 | return QDF_STATUS_E_FAILURE; |
| 4889 | } |
| 4890 | |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4891 | #ifdef WLAN_ATF_ENABLE |
| 4892 | /** |
| 4893 | * wmi_unified_set_atf_cmd_send() - WMI set atf function |
| 4894 | * @param wmi_handle : handle to WMI. |
| 4895 | * @param param : pointer to set atf param |
| 4896 | * |
| 4897 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4898 | */ |
| 4899 | QDF_STATUS |
| 4900 | wmi_unified_set_atf_cmd_send(void *wmi_hdl, |
| 4901 | struct set_atf_params *param) |
| 4902 | { |
| 4903 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4904 | |
| 4905 | if (wmi_handle->ops->send_set_atf_cmd) |
| 4906 | return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param); |
| 4907 | |
| 4908 | return QDF_STATUS_E_FAILURE; |
| 4909 | } |
| 4910 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4911 | /** |
| 4912 | * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw |
| 4913 | * @wmi_handle: wmi handle |
| 4914 | * @param: pointer to atf peer request param |
| 4915 | * |
| 4916 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4917 | */ |
| 4918 | QDF_STATUS |
| 4919 | wmi_send_atf_peer_request_cmd(void *wmi_hdl, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4920 | struct atf_peer_request_params *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4921 | { |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4922 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4923 | |
| 4924 | if (wmi_handle->ops->send_atf_peer_request_cmd) |
| 4925 | return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4926 | param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4927 | |
| 4928 | return QDF_STATUS_E_FAILURE; |
| 4929 | } |
| 4930 | |
| 4931 | /** |
| 4932 | * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw |
| 4933 | * @wmi_handle: wmi handle |
| 4934 | * @param: pointer to set atf grouping param |
| 4935 | * |
| 4936 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4937 | */ |
| 4938 | QDF_STATUS |
| 4939 | wmi_send_set_atf_grouping_cmd(void *wmi_hdl, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4940 | struct atf_grouping_params *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4941 | { |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4942 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4943 | |
| 4944 | if (wmi_handle->ops->send_set_atf_grouping_cmd) |
| 4945 | return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4946 | param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4947 | |
| 4948 | return QDF_STATUS_E_FAILURE; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4949 | } |
| 4950 | |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 4951 | /** |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4952 | * wmi_send_set_atf_group_ac_cmd() - send set atf AC command to fw |
| 4953 | * @wmi_handle: wmi handle |
| 4954 | * @param: pointer to set atf AC group param |
| 4955 | * |
| 4956 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4957 | */ |
| 4958 | QDF_STATUS |
| 4959 | wmi_send_set_atf_group_ac_cmd(void *wmi_hdl, |
| 4960 | struct atf_group_ac_params *param) |
| 4961 | { |
| 4962 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4963 | |
| 4964 | if (wmi_handle->ops->send_set_atf_group_ac_cmd) |
| 4965 | return wmi_handle->ops->send_set_atf_group_ac_cmd(wmi_handle, |
| 4966 | param); |
| 4967 | |
| 4968 | return QDF_STATUS_E_FAILURE; |
| 4969 | } |
| 4970 | |
| 4971 | /** |
| 4972 | * wmi_extract_atf_peer_stats_ev() - extract atf peer stats |
| 4973 | * from event |
| 4974 | * @wmi_handle: wmi handle |
| 4975 | * @param evt_buf: pointer to event buffer |
| 4976 | * @param ev: Pointer to hold atf peer stats |
| 4977 | * |
| 4978 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4979 | */ |
| 4980 | QDF_STATUS |
| 4981 | wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf, |
| 4982 | wmi_host_atf_peer_stats_event *ev) |
| 4983 | { |
| 4984 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4985 | |
| 4986 | if (wmi->ops->extract_atf_peer_stats_ev) |
| 4987 | return wmi->ops->extract_atf_peer_stats_ev(wmi, evt_buf, ev); |
| 4988 | |
| 4989 | return QDF_STATUS_E_FAILURE; |
| 4990 | } |
| 4991 | |
| 4992 | /** |
| 4993 | * wmi_extract_atf_token_info_ev() - extract atf token info |
| 4994 | * from event |
| 4995 | * @wmi_handle: wmi handle |
| 4996 | * @param evt_buf: pointer to event buffer |
| 4997 | * @param idx: Index indicating the peer number |
| 4998 | * @param ev: Pointer to hold atf token info |
| 4999 | * |
| 5000 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5001 | */ |
| 5002 | QDF_STATUS |
| 5003 | wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, uint8_t idx, |
| 5004 | wmi_host_atf_peer_stats_info *ev) |
| 5005 | { |
| 5006 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 5007 | |
| 5008 | if (wmi->ops->extract_atf_token_info_ev) |
| 5009 | return wmi->ops->extract_atf_token_info_ev(wmi, evt_buf, |
| 5010 | idx, ev); |
| 5011 | |
| 5012 | return QDF_STATUS_E_FAILURE; |
| 5013 | } |
| 5014 | #endif /* WLAN_ATF_ENABLE */ |
| 5015 | |
| 5016 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5017 | * wmi_send_get_user_position_cmd() - send get user position command to fw |
| 5018 | * @wmi_handle: wmi handle |
| 5019 | * |
| 5020 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5021 | */ |
| 5022 | QDF_STATUS |
| 5023 | wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value) |
| 5024 | { |
| 5025 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5026 | |
| 5027 | if (wmi_handle->ops->send_get_user_position_cmd) |
| 5028 | return wmi_handle->ops->send_get_user_position_cmd(wmi_handle, |
| 5029 | value); |
| 5030 | |
| 5031 | return QDF_STATUS_E_FAILURE; |
| 5032 | } |
| 5033 | |
| 5034 | /** |
| 5035 | * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count |
| 5036 | * command to fw |
| 5037 | * @wmi_handle: wmi handle |
| 5038 | * @value: user pos value |
| 5039 | * |
| 5040 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5041 | */ |
| 5042 | QDF_STATUS |
| 5043 | wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 5044 | { |
| 5045 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5046 | |
| 5047 | if (wmi->ops->send_get_peer_mumimo_tx_count_cmd) |
| 5048 | return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value); |
| 5049 | |
| 5050 | return QDF_STATUS_E_FAILURE; |
| 5051 | } |
| 5052 | |
| 5053 | /** |
| 5054 | * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo |
| 5055 | * tx count to fw |
| 5056 | * @wmi_handle: wmi handle |
| 5057 | * @value: reset tx count value |
| 5058 | * |
| 5059 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5060 | */ |
| 5061 | QDF_STATUS |
| 5062 | wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 5063 | { |
| 5064 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5065 | |
| 5066 | if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd) |
| 5067 | return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi, |
| 5068 | value); |
| 5069 | |
| 5070 | return QDF_STATUS_E_FAILURE; |
| 5071 | } |
| 5072 | |
| 5073 | /** |
| 5074 | * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo |
| 5075 | * tx count to fw |
| 5076 | * @wmi_handle: wmi handle |
| 5077 | * @value: value |
| 5078 | * |
| 5079 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5080 | */ |
| 5081 | QDF_STATUS |
| 5082 | wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value) |
| 5083 | { |
| 5084 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5085 | |
| 5086 | if (wmi->ops->send_pdev_caldata_version_check_cmd) |
| 5087 | return wmi->ops->send_pdev_caldata_version_check_cmd(wmi, |
| 5088 | value); |
| 5089 | |
| 5090 | return QDF_STATUS_E_FAILURE; |
| 5091 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5092 | |
| 5093 | /* Extract - APIs */ |
| 5094 | /** |
| 5095 | * wmi_extract_wds_addr_event - Extract WDS addr WMI event |
| 5096 | * |
| 5097 | * @param wmi_handle : handle to WMI. |
| 5098 | * @param evt_buf : pointer to event buffer |
| 5099 | * @param len : length of the event buffer |
| 5100 | * @param wds_ev: pointer to strct to extract |
| 5101 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5102 | */ |
| 5103 | QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf, |
| 5104 | uint16_t len, wds_addr_event_t *wds_ev) |
| 5105 | { |
| 5106 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5107 | |
| 5108 | if (wmi_handle->ops->extract_wds_addr_event) { |
| 5109 | return wmi_handle->ops->extract_wds_addr_event(wmi_handle, |
| 5110 | evt_buf, len, wds_ev); |
| 5111 | } |
| 5112 | return QDF_STATUS_E_FAILURE; |
| 5113 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 5114 | qdf_export_symbol(wmi_extract_wds_addr_event); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5115 | |
| 5116 | /** |
| 5117 | * wmi_extract_dcs_interference_type() - extract dcs interference type |
| 5118 | * @wmi_handle: wmi handle |
| 5119 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5120 | * @param param: Pointer to hold dcs interference param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5121 | * |
| 5122 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5123 | */ |
| 5124 | QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl, |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5125 | void *evt_buf, struct wmi_host_dcs_interference_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5126 | { |
| 5127 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5128 | |
| 5129 | if (wmi->ops->extract_dcs_interference_type) { |
| 5130 | return wmi->ops->extract_dcs_interference_type(wmi, |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5131 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5132 | } |
| 5133 | return QDF_STATUS_E_FAILURE; |
| 5134 | } |
| 5135 | |
| 5136 | /* |
| 5137 | * wmi_extract_dcs_cw_int() - extract dcs cw interference from event |
| 5138 | * @wmi_handle: wmi handle |
| 5139 | * @param evt_buf: pointer to event buffer |
| 5140 | * @param cw_int: Pointer to hold cw interference |
| 5141 | * |
| 5142 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5143 | */ |
| 5144 | QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf, |
| 5145 | wmi_host_ath_dcs_cw_int *cw_int) |
| 5146 | { |
| 5147 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5148 | |
| 5149 | if (wmi_handle->ops->extract_dcs_cw_int) { |
| 5150 | return wmi_handle->ops->extract_dcs_cw_int(wmi_handle, |
| 5151 | evt_buf, cw_int); |
| 5152 | } |
| 5153 | return QDF_STATUS_E_FAILURE; |
| 5154 | } |
| 5155 | |
| 5156 | /** |
| 5157 | * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event |
| 5158 | * @wmi_handle: wmi handle |
| 5159 | * @param evt_buf: pointer to event buffer |
| 5160 | * @param wlan_stat: Pointer to hold wlan stats |
| 5161 | * |
| 5162 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5163 | */ |
| 5164 | QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf, |
| 5165 | wmi_host_dcs_im_tgt_stats_t *wlan_stat) |
| 5166 | { |
| 5167 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5168 | |
| 5169 | if (wmi_handle->ops->extract_dcs_im_tgt_stats) { |
| 5170 | return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle, |
| 5171 | evt_buf, wlan_stat); |
| 5172 | } |
| 5173 | return QDF_STATUS_E_FAILURE; |
| 5174 | } |
| 5175 | |
| 5176 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5177 | * wmi_extract_fips_event_data() - extract fips event data |
| 5178 | * @wmi_handle: wmi handle |
| 5179 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 5180 | * @param param: pointer to FIPS event param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5181 | * |
| 5182 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5183 | */ |
| 5184 | QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf, |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 5185 | struct wmi_host_fips_event_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5186 | { |
| 5187 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5188 | |
| 5189 | if (wmi_handle->ops->extract_fips_event_data) { |
| 5190 | return wmi_handle->ops->extract_fips_event_data(wmi_handle, |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 5191 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5192 | } |
| 5193 | return QDF_STATUS_E_FAILURE; |
| 5194 | } |
| 5195 | |
| 5196 | /** |
| 5197 | * wmi_extract_vdev_start_resp() - extract vdev start response |
| 5198 | * @wmi_handle: wmi handle |
| 5199 | * @param evt_buf: pointer to event buffer |
| 5200 | * @param vdev_rsp: Pointer to hold vdev response |
| 5201 | * |
| 5202 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5203 | */ |
| 5204 | QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf, |
| 5205 | wmi_host_vdev_start_resp *vdev_rsp) |
| 5206 | { |
| 5207 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5208 | |
| 5209 | if (wmi_handle->ops->extract_vdev_start_resp) |
| 5210 | return wmi_handle->ops->extract_vdev_start_resp(wmi_handle, |
| 5211 | evt_buf, vdev_rsp); |
| 5212 | |
| 5213 | return QDF_STATUS_E_FAILURE; |
| 5214 | } |
| 5215 | |
| 5216 | /** |
Om Prakash Tripathi | f3ef42d | 2017-11-24 16:53:07 +0530 | [diff] [blame] | 5217 | * wmi_extract_vdev_delete_resp() - extract vdev delete response |
| 5218 | * @wmi_handle: wmi handle |
| 5219 | * @param evt_buf: pointer to event buffer |
| 5220 | * @param delete_rsp: Pointer to hold vdev delete response |
| 5221 | * |
| 5222 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5223 | */ |
| 5224 | QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf, |
| 5225 | struct wmi_host_vdev_delete_resp *delete_rsp) |
| 5226 | { |
| 5227 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5228 | |
| 5229 | if (wmi_handle->ops->extract_vdev_delete_resp) |
| 5230 | return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle, |
| 5231 | evt_buf, delete_rsp); |
| 5232 | |
| 5233 | return QDF_STATUS_E_FAILURE; |
| 5234 | } |
| 5235 | |
| 5236 | |
| 5237 | /** |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5238 | * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev |
| 5239 | * @wmi_handle: wmi handle |
| 5240 | * @param evt_buf: pointer to event buffer |
| 5241 | * @param vdev_map: Pointer to hold num vdev |
| 5242 | * |
| 5243 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5244 | */ |
| 5245 | QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5246 | uint32_t *num_vdevs) |
| 5247 | { |
| 5248 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5249 | |
| 5250 | if (wmi->ops->extract_tbttoffset_num_vdevs) |
| 5251 | return wmi->ops->extract_tbttoffset_num_vdevs(wmi, |
| 5252 | evt_buf, num_vdevs); |
| 5253 | |
| 5254 | return QDF_STATUS_E_FAILURE; |
| 5255 | } |
| 5256 | |
| 5257 | /** |
| 5258 | * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev |
| 5259 | * @wmi_handle: wmi handle |
| 5260 | * @param evt_buf: pointer to event buffer |
| 5261 | * @param vdev_map: Pointer to hold num vdev |
| 5262 | * |
| 5263 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5264 | */ |
| 5265 | QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5266 | uint32_t *num_vdevs) |
| 5267 | { |
| 5268 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5269 | |
| 5270 | if (wmi->ops->extract_ext_tbttoffset_num_vdevs) |
| 5271 | return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi, |
| 5272 | evt_buf, num_vdevs); |
| 5273 | |
| 5274 | return QDF_STATUS_E_FAILURE; |
| 5275 | } |
| 5276 | |
| 5277 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5278 | * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param |
| 5279 | * @wmi_handle: wmi handle |
| 5280 | * @param evt_buf: pointer to event buffer |
Jeff Johnson | da26399 | 2018-05-12 14:22:00 -0700 | [diff] [blame] | 5281 | * @param idx: Index referring to a vdev |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5282 | * @param tbtt_param: Pointer to tbttoffset event param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5283 | * |
| 5284 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5285 | */ |
| 5286 | QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf, |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5287 | uint8_t idx, struct tbttoffset_params *tbtt_param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5288 | { |
| 5289 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5290 | |
| 5291 | if (wmi->ops->extract_tbttoffset_update_params) |
| 5292 | return wmi->ops->extract_tbttoffset_update_params(wmi, |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5293 | evt_buf, idx, tbtt_param); |
| 5294 | |
| 5295 | return QDF_STATUS_E_FAILURE; |
| 5296 | } |
| 5297 | |
| 5298 | /** |
| 5299 | * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param |
| 5300 | * @wmi_handle: wmi handle |
| 5301 | * @param evt_buf: pointer to event buffer |
Jeff Johnson | da26399 | 2018-05-12 14:22:00 -0700 | [diff] [blame] | 5302 | * @param idx: Index referring to a vdev |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5303 | * @param tbtt_param: Pointer to tbttoffset event param |
| 5304 | * |
| 5305 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5306 | */ |
| 5307 | QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl, |
| 5308 | void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param) |
| 5309 | { |
| 5310 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5311 | |
| 5312 | if (wmi->ops->extract_ext_tbttoffset_update_params) |
| 5313 | return wmi->ops->extract_ext_tbttoffset_update_params(wmi, |
| 5314 | evt_buf, idx, tbtt_param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5315 | |
| 5316 | return QDF_STATUS_E_FAILURE; |
| 5317 | } |
| 5318 | |
| 5319 | /** |
| 5320 | * wmi_extract_mgmt_rx_params() - extract management rx params from event |
| 5321 | * @wmi_handle: wmi handle |
| 5322 | * @param evt_buf: pointer to event buffer |
| 5323 | * @param hdr: Pointer to hold header |
| 5324 | * @param bufp: Pointer to hold pointer to rx param buffer |
| 5325 | * |
| 5326 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5327 | */ |
| 5328 | QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf, |
Himanshu Agarwal | b4992a4 | 2017-01-05 14:23:18 +0530 | [diff] [blame] | 5329 | struct mgmt_rx_event_params *hdr, uint8_t **bufp) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5330 | { |
| 5331 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5332 | |
| 5333 | if (wmi_handle->ops->extract_mgmt_rx_params) |
| 5334 | return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle, |
| 5335 | evt_buf, hdr, bufp); |
| 5336 | |
| 5337 | return QDF_STATUS_E_FAILURE; |
| 5338 | } |
| 5339 | |
| 5340 | /** |
| 5341 | * wmi_extract_vdev_stopped_param() - extract vdev stop param from event |
| 5342 | * @wmi_handle: wmi handle |
| 5343 | * @param evt_buf: pointer to event buffer |
| 5344 | * @param vdev_id: Pointer to hold vdev identifier |
| 5345 | * |
| 5346 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5347 | */ |
| 5348 | QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf, |
| 5349 | uint32_t *vdev_id) |
| 5350 | { |
| 5351 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5352 | |
| 5353 | if (wmi_handle->ops->extract_vdev_stopped_param) |
| 5354 | return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle, |
| 5355 | evt_buf, vdev_id); |
| 5356 | |
| 5357 | return QDF_STATUS_E_FAILURE; |
| 5358 | } |
| 5359 | |
| 5360 | /** |
| 5361 | * wmi_extract_vdev_roam_param() - extract vdev roam param from event |
| 5362 | * @wmi_handle: wmi handle |
| 5363 | * @param evt_buf: pointer to event buffer |
| 5364 | * @param param: Pointer to hold roam param |
| 5365 | * |
| 5366 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5367 | */ |
| 5368 | QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, |
| 5369 | wmi_host_roam_event *param) |
| 5370 | { |
| 5371 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5372 | |
| 5373 | if (wmi_handle->ops->extract_vdev_roam_param) |
| 5374 | return wmi_handle->ops->extract_vdev_roam_param(wmi_handle, |
| 5375 | evt_buf, param); |
| 5376 | |
| 5377 | return QDF_STATUS_E_FAILURE; |
| 5378 | } |
| 5379 | |
| 5380 | /** |
| 5381 | * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event |
| 5382 | * @wmi_handle: wmi handle |
| 5383 | * @param evt_buf: pointer to event buffer |
| 5384 | * @param param: Pointer to hold vdev scan param |
| 5385 | * |
| 5386 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5387 | */ |
| 5388 | QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf, |
Om Prakash Tripathi | 1d83e35 | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 5389 | struct scan_event *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5390 | { |
| 5391 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5392 | |
| 5393 | if (wmi_handle->ops->extract_vdev_scan_ev_param) |
| 5394 | return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle, |
| 5395 | evt_buf, param); |
| 5396 | |
| 5397 | return QDF_STATUS_E_FAILURE; |
| 5398 | } |
| 5399 | |
Frank Liu | 3d5e999 | 2017-03-15 17:51:43 +0800 | [diff] [blame] | 5400 | #ifdef CONVERGED_TDLS_ENABLE |
| 5401 | QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf, |
| 5402 | struct tdls_event_info *param) |
| 5403 | { |
| 5404 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 5405 | |
| 5406 | if (wmi_handle->ops->extract_vdev_tdls_ev_param) |
| 5407 | return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle, |
| 5408 | evt_buf, param); |
| 5409 | |
| 5410 | return QDF_STATUS_E_FAILURE; |
| 5411 | } |
| 5412 | #endif |
| 5413 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5414 | /** |
| 5415 | * wmi_extract_mu_ev_param() - extract mu param from event |
| 5416 | * @wmi_handle: wmi handle |
| 5417 | * @param evt_buf: pointer to event buffer |
| 5418 | * @param param: Pointer to hold mu report |
| 5419 | * |
| 5420 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5421 | */ |
| 5422 | QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, |
| 5423 | wmi_host_mu_report_event *param) |
| 5424 | { |
| 5425 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5426 | |
| 5427 | if (wmi_handle->ops->extract_mu_ev_param) |
| 5428 | return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf, |
| 5429 | param); |
| 5430 | |
| 5431 | return QDF_STATUS_E_FAILURE; |
| 5432 | } |
| 5433 | |
| 5434 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5435 | * wmi_extract_mu_db_entry() - extract mu db entry from event |
| 5436 | * @wmi_handle: wmi handle |
| 5437 | * @param evt_buf: pointer to event buffer |
| 5438 | * @param param: Pointer to hold mu db entry |
| 5439 | * |
| 5440 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5441 | */ |
| 5442 | QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, |
| 5443 | uint8_t idx, wmi_host_mu_db_entry *param) |
| 5444 | { |
| 5445 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5446 | |
| 5447 | if (wmi_handle->ops->extract_mu_db_entry) |
| 5448 | return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf, |
| 5449 | idx, param); |
| 5450 | |
| 5451 | return QDF_STATUS_E_FAILURE; |
| 5452 | } |
| 5453 | |
| 5454 | /** |
| 5455 | * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event |
| 5456 | * @wmi_handle: wmi handle |
| 5457 | * @param evt_buf: pointer to event buffer |
| 5458 | * @param param: Pointer to hold mumimo tx count |
| 5459 | * |
| 5460 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5461 | */ |
| 5462 | QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, |
| 5463 | wmi_host_peer_txmu_cnt_event *param) |
| 5464 | { |
| 5465 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5466 | |
| 5467 | if (wmi->ops->extract_mumimo_tx_count_ev_param) |
| 5468 | return wmi->ops->extract_mumimo_tx_count_ev_param(wmi, |
| 5469 | evt_buf, param); |
| 5470 | |
| 5471 | return QDF_STATUS_E_FAILURE; |
| 5472 | } |
| 5473 | |
| 5474 | /** |
| 5475 | * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list |
| 5476 | * from event |
| 5477 | * @wmi_handle: wmi handle |
| 5478 | * @param evt_buf: pointer to event buffer |
| 5479 | * @param param: Pointer to hold peer gid userposition list |
| 5480 | * |
| 5481 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5482 | */ |
| 5483 | QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, |
| 5484 | void *evt_buf, |
| 5485 | wmi_host_peer_gid_userpos_list_event *param) |
| 5486 | { |
| 5487 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5488 | |
| 5489 | if (wmi->ops->extract_peer_gid_userpos_list_ev_param) |
| 5490 | return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi, |
| 5491 | evt_buf, param); |
| 5492 | |
| 5493 | return QDF_STATUS_E_FAILURE; |
| 5494 | } |
| 5495 | |
| 5496 | /** |
Anirban Sirkhell | 23467ce | 2017-08-25 16:01:50 +0530 | [diff] [blame] | 5497 | * wmi_extract_esp_estimate_ev_param() - extract air time from event |
| 5498 | * @wmi_handle: wmi handle |
| 5499 | * @evt_buf: pointer to event buffer |
| 5500 | * @param: Pointer to hold esp event |
| 5501 | * |
| 5502 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5503 | */ |
| 5504 | QDF_STATUS |
| 5505 | wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf, |
| 5506 | struct esp_estimation_event *param) |
| 5507 | { |
| 5508 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 5509 | |
| 5510 | if (wmi_handle->ops->extract_esp_estimation_ev_param) |
| 5511 | return wmi_handle->ops->extract_esp_estimation_ev_param( |
| 5512 | wmi_handle, evt_buf, param); |
| 5513 | |
| 5514 | return QDF_STATUS_E_FAILURE; |
| 5515 | } |
| 5516 | |
| 5517 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5518 | * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata |
| 5519 | * from event |
| 5520 | * @wmi_handle: wmi handle |
| 5521 | * @param evt_buf: pointer to event buffer |
| 5522 | * @param param: Pointer to hold caldata version data |
| 5523 | * |
| 5524 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5525 | */ |
| 5526 | QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl, |
| 5527 | void *evt_buf, |
| 5528 | wmi_host_pdev_check_cal_version_event *param) |
| 5529 | { |
| 5530 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5531 | |
| 5532 | if (wmi->ops->extract_pdev_caldata_version_check_ev_param) |
| 5533 | return wmi->ops->extract_pdev_caldata_version_check_ev_param( |
| 5534 | wmi, evt_buf, param); |
| 5535 | |
| 5536 | return QDF_STATUS_E_FAILURE; |
| 5537 | } |
| 5538 | |
| 5539 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5540 | * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration |
| 5541 | * param from event |
| 5542 | * @wmi_handle: wmi handle |
| 5543 | * @param evt_buf: pointer to event buffer |
| 5544 | * @param param: Pointer to hold tpc configuration |
| 5545 | * |
| 5546 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5547 | */ |
| 5548 | QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf, |
| 5549 | wmi_host_pdev_tpc_config_event *param) |
| 5550 | { |
| 5551 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5552 | |
| 5553 | if (wmi->ops->extract_pdev_tpc_config_ev_param) |
| 5554 | return wmi->ops->extract_pdev_tpc_config_ev_param(wmi, |
| 5555 | evt_buf, param); |
| 5556 | |
| 5557 | return QDF_STATUS_E_FAILURE; |
| 5558 | |
| 5559 | } |
| 5560 | |
| 5561 | /** |
| 5562 | * wmi_extract_gpio_input_ev_param() - extract gpio input param from event |
| 5563 | * @wmi_handle: wmi handle |
| 5564 | * @param evt_buf: pointer to event buffer |
| 5565 | * @param gpio_num: Pointer to hold gpio number |
| 5566 | * |
| 5567 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5568 | */ |
| 5569 | QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, |
| 5570 | void *evt_buf, uint32_t *gpio_num) |
| 5571 | { |
| 5572 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5573 | |
| 5574 | if (wmi_handle->ops->extract_gpio_input_ev_param) |
| 5575 | return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle, |
| 5576 | evt_buf, gpio_num); |
| 5577 | |
| 5578 | return QDF_STATUS_E_FAILURE; |
| 5579 | } |
| 5580 | |
| 5581 | /** |
| 5582 | * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry |
| 5583 | * param from event |
| 5584 | * @wmi_handle: wmi handle |
| 5585 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5586 | * @param param: Pointer to hold reserve ast entry param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5587 | * |
| 5588 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5589 | */ |
| 5590 | QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5591 | void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5592 | { |
| 5593 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5594 | |
| 5595 | if (wmi->ops->extract_pdev_reserve_ast_ev_param) |
| 5596 | return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5597 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5598 | |
| 5599 | return QDF_STATUS_E_FAILURE; |
| 5600 | } |
| 5601 | |
| 5602 | /** |
| 5603 | * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration |
| 5604 | * power param from event |
| 5605 | * @wmi_handle: wmi handle |
| 5606 | * @param evt_buf: pointer to event buffer |
| 5607 | * @param param: Pointer to hold nf cal power param |
| 5608 | * |
| 5609 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5610 | */ |
| 5611 | QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf, |
| 5612 | wmi_host_pdev_nfcal_power_all_channels_event *param) |
| 5613 | { |
| 5614 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5615 | |
| 5616 | if (wmi_handle->ops->extract_nfcal_power_ev_param) |
| 5617 | return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle, |
| 5618 | evt_buf, param); |
| 5619 | |
| 5620 | return QDF_STATUS_E_FAILURE; |
| 5621 | |
| 5622 | } |
| 5623 | |
| 5624 | /** |
| 5625 | * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event |
| 5626 | * @wmi_handle: wmi handle |
| 5627 | * @param evt_buf: pointer to event buffer |
| 5628 | * @param param: Pointer to hold tpc param |
| 5629 | * |
| 5630 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5631 | */ |
| 5632 | QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf, |
| 5633 | wmi_host_pdev_tpc_event *param) |
| 5634 | { |
| 5635 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5636 | |
| 5637 | if (wmi_handle->ops->extract_pdev_tpc_ev_param) |
| 5638 | return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle, |
| 5639 | evt_buf, param); |
| 5640 | |
| 5641 | return QDF_STATUS_E_FAILURE; |
| 5642 | |
| 5643 | } |
| 5644 | |
| 5645 | /** |
| 5646 | * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer |
| 5647 | * from event |
| 5648 | * @wmi_handle: wmi handle |
| 5649 | * @param evt_buf: pointer to event buffer |
| 5650 | * @param param: Pointer to generic buffer param |
| 5651 | * |
| 5652 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5653 | */ |
| 5654 | QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, |
| 5655 | void *evt_buf, wmi_host_pdev_generic_buffer_event *param) |
| 5656 | { |
| 5657 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5658 | |
| 5659 | if (wmi->ops->extract_pdev_generic_buffer_ev_param) |
| 5660 | return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi, |
| 5661 | evt_buf, param); |
| 5662 | |
| 5663 | return QDF_STATUS_E_FAILURE; |
| 5664 | |
| 5665 | } |
| 5666 | |
| 5667 | /** |
| 5668 | * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param |
| 5669 | * from event |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 5670 | * @wmi_hdl: wmi handle |
| 5671 | * @evt_buf: pointer to event buffer |
| 5672 | * @param: Pointer to mgmt tx completion param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5673 | * |
| 5674 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5675 | */ |
| 5676 | QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf, |
| 5677 | wmi_host_mgmt_tx_compl_event *param) |
| 5678 | { |
| 5679 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5680 | |
| 5681 | if (wmi_handle->ops->extract_mgmt_tx_compl_param) |
| 5682 | return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle, |
| 5683 | evt_buf, param); |
| 5684 | |
| 5685 | |
| 5686 | return QDF_STATUS_E_FAILURE; |
| 5687 | } |
| 5688 | |
| 5689 | /** |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 5690 | * wmi_extract_offchan_data_tx_compl_param() - |
| 5691 | * extract offchan data tx completion param from event |
| 5692 | * @wmi_hdl: wmi handle |
| 5693 | * @evt_buf: pointer to event buffer |
| 5694 | * @param: Pointer to offchan data tx completion param |
| 5695 | * |
| 5696 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5697 | */ |
| 5698 | QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf, |
| 5699 | struct wmi_host_offchan_data_tx_compl_event *param) |
| 5700 | { |
| 5701 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5702 | |
| 5703 | if (wmi_handle->ops->extract_offchan_data_tx_compl_param) |
| 5704 | return wmi_handle->ops->extract_offchan_data_tx_compl_param( |
| 5705 | wmi_handle, evt_buf, param); |
| 5706 | |
| 5707 | |
| 5708 | return QDF_STATUS_E_FAILURE; |
| 5709 | } |
| 5710 | |
| 5711 | /** |
Sathish Kumar | 45e991b | 2017-02-27 10:35:40 +0530 | [diff] [blame] | 5712 | * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status |
| 5713 | * from event |
| 5714 | * @wmi_handle: wmi handle |
| 5715 | * @param evt_buf: pointer to event buffer |
| 5716 | * @param param: Pointer to CSA switch count status param |
| 5717 | * |
| 5718 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5719 | */ |
| 5720 | QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl, |
| 5721 | void *evt_buf, |
| 5722 | struct pdev_csa_switch_count_status *param) |
| 5723 | { |
| 5724 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5725 | |
| 5726 | if (wmi_handle->ops->extract_pdev_csa_switch_count_status) |
| 5727 | return wmi_handle->ops->extract_pdev_csa_switch_count_status( |
| 5728 | wmi_handle, |
| 5729 | evt_buf, |
| 5730 | param); |
| 5731 | |
| 5732 | return QDF_STATUS_E_FAILURE; |
| 5733 | } |
| 5734 | |
| 5735 | |
| 5736 | /** |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5737 | * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5738 | * @wmi_handle: wmi handle |
| 5739 | * @param evt_buf: pointer to event buffer |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5740 | * @param num_vdevs: Pointer to hold num vdevs |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5741 | * |
| 5742 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5743 | */ |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5744 | QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5745 | uint32_t *num_vdevs) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5746 | { |
| 5747 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5748 | |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5749 | if (wmi_handle->ops->extract_swba_num_vdevs) |
| 5750 | return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle, |
| 5751 | evt_buf, num_vdevs); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5752 | |
| 5753 | return QDF_STATUS_E_FAILURE; |
| 5754 | } |
| 5755 | |
| 5756 | /** |
| 5757 | * wmi_extract_swba_tim_info() - extract swba tim info from event |
| 5758 | * @wmi_handle: wmi handle |
| 5759 | * @param evt_buf: pointer to event buffer |
| 5760 | * @param idx: Index to bcn info |
| 5761 | * @param tim_info: Pointer to hold tim info |
| 5762 | * |
| 5763 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5764 | */ |
| 5765 | QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf, |
| 5766 | uint32_t idx, wmi_host_tim_info *tim_info) |
| 5767 | { |
| 5768 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5769 | |
| 5770 | if (wmi_handle->ops->extract_swba_tim_info) |
| 5771 | return wmi_handle->ops->extract_swba_tim_info(wmi_handle, |
| 5772 | evt_buf, idx, tim_info); |
| 5773 | |
| 5774 | return QDF_STATUS_E_FAILURE; |
| 5775 | } |
| 5776 | |
| 5777 | /** |
| 5778 | * wmi_extract_swba_noa_info() - extract swba NoA information from event |
| 5779 | * @wmi_handle: wmi handle |
| 5780 | * @param evt_buf: pointer to event buffer |
| 5781 | * @param idx: Index to bcn info |
| 5782 | * @param p2p_desc: Pointer to hold p2p NoA info |
| 5783 | * |
| 5784 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5785 | */ |
| 5786 | QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf, |
| 5787 | uint32_t idx, wmi_host_p2p_noa_info *p2p_desc) |
| 5788 | { |
| 5789 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5790 | |
| 5791 | if (wmi_handle->ops->extract_swba_noa_info) |
| 5792 | return wmi_handle->ops->extract_swba_noa_info(wmi_handle, |
| 5793 | evt_buf, idx, p2p_desc); |
| 5794 | |
| 5795 | return QDF_STATUS_E_FAILURE; |
| 5796 | } |
| 5797 | |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5798 | #ifdef CONVERGED_P2P_ENABLE |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 5799 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5800 | /** |
| 5801 | * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event |
| 5802 | * @wmi_handle: wmi handle |
| 5803 | * @evt_buf: pointer to event buffer |
| 5804 | * @param: Pointer to hold listen offload stop param |
| 5805 | * |
| 5806 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5807 | */ |
| 5808 | QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf, |
| 5809 | struct p2p_lo_event *param) |
| 5810 | { |
| 5811 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5812 | |
| 5813 | if (!wmi_handle) { |
| 5814 | WMI_LOGE("wmi handle is null"); |
| 5815 | return QDF_STATUS_E_INVAL; |
| 5816 | } |
| 5817 | |
| 5818 | if (wmi_handle->ops->extract_p2p_lo_stop_ev_param) |
| 5819 | return wmi_handle->ops->extract_p2p_lo_stop_ev_param( |
| 5820 | wmi_handle, evt_buf, param); |
| 5821 | |
| 5822 | return QDF_STATUS_E_FAILURE; |
| 5823 | } |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 5824 | #endif |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5825 | |
| 5826 | /** |
| 5827 | * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event |
| 5828 | * @wmi_handle: wmi handle |
| 5829 | * @evt_buf: pointer to event buffer |
| 5830 | * @param: Pointer to hold p2p noa param |
| 5831 | * |
| 5832 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5833 | */ |
| 5834 | QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf, |
| 5835 | struct p2p_noa_info *param) |
| 5836 | { |
| 5837 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5838 | |
| 5839 | if (!wmi_handle) { |
| 5840 | WMI_LOGE("wmi handle is null"); |
| 5841 | return QDF_STATUS_E_INVAL; |
| 5842 | } |
| 5843 | |
| 5844 | if (wmi_handle->ops->extract_p2p_noa_ev_param) |
| 5845 | return wmi_handle->ops->extract_p2p_noa_ev_param( |
| 5846 | wmi_handle, evt_buf, param); |
| 5847 | |
| 5848 | return QDF_STATUS_E_FAILURE; |
| 5849 | } |
| 5850 | #endif |
| 5851 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5852 | /** |
| 5853 | * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state |
| 5854 | * from event |
| 5855 | * @wmi_handle: wmi handle |
| 5856 | * @param evt_buf: pointer to event buffer |
| 5857 | * @param ev: Pointer to hold peer param and ps state |
| 5858 | * |
| 5859 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5860 | */ |
| 5861 | QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf, |
| 5862 | wmi_host_peer_sta_ps_statechange_event *ev) |
| 5863 | { |
| 5864 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5865 | |
| 5866 | if (wmi->ops->extract_peer_sta_ps_statechange_ev) |
| 5867 | return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi, |
| 5868 | evt_buf, ev); |
| 5869 | |
| 5870 | return QDF_STATUS_E_FAILURE; |
| 5871 | } |
| 5872 | |
| 5873 | /** |
| 5874 | * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event |
| 5875 | * @wmi_handle: wmi handle |
| 5876 | * @param evt_buf: pointer to event buffer |
| 5877 | * @param ev: Pointer to hold peer param |
| 5878 | * |
| 5879 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5880 | */ |
| 5881 | QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf, |
| 5882 | wmi_host_peer_sta_kickout_event *ev) |
| 5883 | { |
| 5884 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5885 | |
| 5886 | if (wmi_handle->ops->extract_peer_sta_kickout_ev) |
| 5887 | return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle, |
| 5888 | evt_buf, ev); |
| 5889 | |
| 5890 | return QDF_STATUS_E_FAILURE; |
| 5891 | } |
| 5892 | |
| 5893 | /** |
| 5894 | * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event |
| 5895 | * @wmi_handle: wmi handle |
| 5896 | * @param evt_buf: pointer to event buffer |
| 5897 | * @param peer_mac: Pointer to hold peer mac address |
| 5898 | * @param rate_cap: Pointer to hold ratecode |
| 5899 | * |
| 5900 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5901 | */ |
| 5902 | QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, |
| 5903 | uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap) |
| 5904 | { |
| 5905 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5906 | |
| 5907 | if (wmi->ops->extract_peer_ratecode_list_ev) |
| 5908 | return wmi->ops->extract_peer_ratecode_list_ev(wmi, |
| 5909 | evt_buf, peer_mac, rate_cap); |
| 5910 | |
| 5911 | return QDF_STATUS_E_FAILURE; |
| 5912 | |
| 5913 | } |
| 5914 | |
| 5915 | /** |
| 5916 | * wmi_extract_comb_phyerr() - extract comb phy error from event |
| 5917 | * @wmi_handle: wmi handle |
| 5918 | * @param evt_buf: pointer to event buffer |
| 5919 | * @param datalen: data length of event buffer |
| 5920 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 5921 | * post extraction |
| 5922 | * @param phyer: Pointer to hold phyerr |
| 5923 | * |
| 5924 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5925 | */ |
| 5926 | QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, |
| 5927 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 5928 | { |
| 5929 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5930 | |
| 5931 | if (wmi_handle->ops->extract_comb_phyerr) |
| 5932 | return wmi_handle->ops->extract_comb_phyerr(wmi_handle, |
| 5933 | evt_buf, datalen, buf_offset, phyerr); |
| 5934 | |
| 5935 | return QDF_STATUS_E_FAILURE; |
| 5936 | |
| 5937 | } |
| 5938 | |
| 5939 | /** |
| 5940 | * wmi_extract_single_phyerr() - extract single phy error from event |
| 5941 | * @wmi_handle: wmi handle |
| 5942 | * @param evt_buf: pointer to event buffer |
| 5943 | * @param datalen: data length of event buffer |
| 5944 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 5945 | * post extraction |
| 5946 | * @param phyerr: Pointer to hold phyerr |
| 5947 | * |
| 5948 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5949 | */ |
| 5950 | QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, |
| 5951 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 5952 | { |
| 5953 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5954 | |
| 5955 | if (wmi_handle->ops->extract_single_phyerr) |
| 5956 | return wmi_handle->ops->extract_single_phyerr(wmi_handle, |
| 5957 | evt_buf, datalen, buf_offset, phyerr); |
| 5958 | |
| 5959 | return QDF_STATUS_E_FAILURE; |
| 5960 | |
| 5961 | } |
| 5962 | |
| 5963 | /** |
| 5964 | * wmi_extract_composite_phyerr() - extract composite phy error from event |
| 5965 | * @wmi_handle: wmi handle |
| 5966 | * @param evt_buf: pointer to event buffer |
| 5967 | * @param datalen: Length of event buffer |
| 5968 | * @param phyerr: Pointer to hold phy error |
| 5969 | * |
| 5970 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5971 | */ |
| 5972 | QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, |
| 5973 | uint16_t datalen, wmi_host_phyerr_t *phyerr) |
| 5974 | { |
| 5975 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5976 | |
| 5977 | if (wmi_handle->ops->extract_composite_phyerr) |
| 5978 | return wmi_handle->ops->extract_composite_phyerr(wmi_handle, |
| 5979 | evt_buf, datalen, phyerr); |
| 5980 | |
| 5981 | return QDF_STATUS_E_FAILURE; |
| 5982 | |
| 5983 | } |
| 5984 | |
| 5985 | /** |
| 5986 | * wmi_extract_stats_param() - extract all stats count from event |
| 5987 | * @wmi_handle: wmi handle |
| 5988 | * @param evt_buf: pointer to event buffer |
| 5989 | * @param stats_param: Pointer to hold stats count |
| 5990 | * |
| 5991 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5992 | */ |
| 5993 | QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, |
| 5994 | wmi_host_stats_event *stats_param) |
| 5995 | { |
| 5996 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5997 | |
| 5998 | if (wmi_handle->ops->extract_all_stats_count) |
| 5999 | return wmi_handle->ops->extract_all_stats_count(wmi_handle, |
| 6000 | evt_buf, stats_param); |
| 6001 | |
| 6002 | return QDF_STATUS_E_FAILURE; |
| 6003 | } |
| 6004 | |
| 6005 | /** |
| 6006 | * wmi_extract_pdev_stats() - extract pdev stats from event |
| 6007 | * @wmi_handle: wmi handle |
| 6008 | * @param evt_buf: pointer to event buffer |
| 6009 | * @param index: Index into pdev stats |
| 6010 | * @param pdev_stats: Pointer to hold pdev stats |
| 6011 | * |
| 6012 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6013 | */ |
| 6014 | QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, |
| 6015 | uint32_t index, wmi_host_pdev_stats *pdev_stats) |
| 6016 | { |
| 6017 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6018 | |
| 6019 | if (wmi_handle->ops->extract_pdev_stats) |
| 6020 | return wmi_handle->ops->extract_pdev_stats(wmi_handle, |
| 6021 | evt_buf, index, pdev_stats); |
| 6022 | |
| 6023 | return QDF_STATUS_E_FAILURE; |
| 6024 | } |
| 6025 | |
| 6026 | /** |
Adil Saeed Musthafa | d280596 | 2017-08-23 17:32:11 -0700 | [diff] [blame] | 6027 | * extract_unit_test() - extract unit test from event |
| 6028 | * @wmi_handle: wmi handle |
| 6029 | * @param evt_buf: pointer to event buffer |
| 6030 | * @param unit_test: Pointer to hold unit-test header |
| 6031 | * @param maxspace: The amount of space in evt_buf |
| 6032 | * |
| 6033 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6034 | */ |
| 6035 | QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, |
| 6036 | wmi_unit_test_event *unit_test, uint32_t maxspace) |
| 6037 | { |
| 6038 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6039 | |
| 6040 | if (wmi_handle->ops->extract_unit_test) |
| 6041 | return wmi_handle->ops->extract_unit_test(wmi_handle, |
| 6042 | evt_buf, unit_test, maxspace); |
| 6043 | |
| 6044 | return QDF_STATUS_E_FAILURE; |
| 6045 | } |
| 6046 | |
| 6047 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6048 | * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event |
| 6049 | * @wmi_handle: wmi handle |
| 6050 | * @param evt_buf: pointer to event buffer |
| 6051 | * @param index: Index into extended pdev stats |
| 6052 | * @param pdev_ext_stats: Pointer to hold extended pdev stats |
| 6053 | * |
| 6054 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6055 | */ |
| 6056 | QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, |
| 6057 | uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats) |
| 6058 | { |
| 6059 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6060 | |
| 6061 | if (wmi_handle->ops->extract_pdev_ext_stats) |
| 6062 | return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle, |
| 6063 | evt_buf, index, pdev_ext_stats); |
| 6064 | |
| 6065 | return QDF_STATUS_E_FAILURE; |
| 6066 | } |
| 6067 | |
| 6068 | /** |
| 6069 | * wmi_extract_peer_stats() - extract peer stats from event |
| 6070 | * @wmi_handle: wmi handle |
| 6071 | * @param evt_buf: pointer to event buffer |
| 6072 | * @param index: Index into peer stats |
| 6073 | * @param peer_stats: Pointer to hold peer stats |
| 6074 | * |
| 6075 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6076 | */ |
| 6077 | QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, |
| 6078 | uint32_t index, wmi_host_peer_stats *peer_stats) |
| 6079 | { |
| 6080 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6081 | |
| 6082 | if (wmi_handle->ops->extract_peer_stats) |
| 6083 | return wmi_handle->ops->extract_peer_stats(wmi_handle, |
| 6084 | evt_buf, index, peer_stats); |
| 6085 | |
| 6086 | return QDF_STATUS_E_FAILURE; |
| 6087 | } |
| 6088 | |
| 6089 | /** |
| 6090 | * wmi_extract_vdev_stats() - extract vdev stats from event |
| 6091 | * @wmi_handle: wmi handle |
| 6092 | * @param evt_buf: pointer to event buffer |
| 6093 | * @param index: Index into vdev stats |
| 6094 | * @param vdev_stats: Pointer to hold vdev stats |
| 6095 | * |
| 6096 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6097 | */ |
| 6098 | QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, |
| 6099 | uint32_t index, wmi_host_vdev_stats *vdev_stats) |
| 6100 | { |
| 6101 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6102 | |
| 6103 | if (wmi_handle->ops->extract_vdev_stats) |
| 6104 | return wmi_handle->ops->extract_vdev_stats(wmi_handle, |
| 6105 | evt_buf, index, vdev_stats); |
| 6106 | |
| 6107 | return QDF_STATUS_E_FAILURE; |
| 6108 | } |
| 6109 | |
| 6110 | /** |
Naveen Rawat | d211572 | 2018-04-12 08:17:55 -0700 | [diff] [blame] | 6111 | * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event |
| 6112 | * @wmi_handle: wmi handle |
| 6113 | * @param evt_buf: pointer to event buffer |
| 6114 | * @param index: Index into rssi stats |
| 6115 | * @param rssi_stats: Pointer to hold rssi stats |
| 6116 | * |
| 6117 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6118 | */ |
| 6119 | QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 6120 | uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats) |
| 6121 | { |
| 6122 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6123 | |
| 6124 | if (wmi_handle->ops->extract_per_chain_rssi_stats) |
| 6125 | return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle, |
| 6126 | evt_buf, index, rssi_stats); |
| 6127 | |
| 6128 | return QDF_STATUS_E_FAILURE; |
| 6129 | } |
| 6130 | |
| 6131 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6132 | * wmi_extract_rtt_hdr() - extract rtt header from event |
| 6133 | * @wmi_handle: wmi handle |
| 6134 | * @param evt_buf: pointer to event buffer |
| 6135 | * @param ev: Pointer to hold rtt header |
| 6136 | * |
| 6137 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6138 | */ |
| 6139 | QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, |
| 6140 | wmi_host_rtt_event_hdr *ev) |
| 6141 | { |
| 6142 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6143 | |
| 6144 | if (wmi_handle->ops->extract_rtt_hdr) |
| 6145 | return wmi_handle->ops->extract_rtt_hdr(wmi_handle, |
| 6146 | evt_buf, ev); |
| 6147 | |
| 6148 | return QDF_STATUS_E_FAILURE; |
| 6149 | } |
| 6150 | |
| 6151 | /** |
| 6152 | * wmi_extract_bcnflt_stats() - extract bcn fault stats from event |
| 6153 | * @wmi_handle: wmi handle |
| 6154 | * @param evt_buf: pointer to event buffer |
| 6155 | * @param index: Index into bcn fault stats |
| 6156 | * @param bcnflt_stats: Pointer to hold bcn fault stats |
| 6157 | * |
| 6158 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6159 | */ |
| 6160 | QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, |
| 6161 | uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats) |
| 6162 | { |
| 6163 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6164 | |
| 6165 | if (wmi_handle->ops->extract_bcnflt_stats) |
| 6166 | return wmi_handle->ops->extract_bcnflt_stats(wmi_handle, |
| 6167 | evt_buf, index, bcnflt_stats); |
| 6168 | |
| 6169 | return QDF_STATUS_E_FAILURE; |
| 6170 | } |
| 6171 | |
| 6172 | /** |
| 6173 | * wmi_extract_rtt_ev() - extract rtt event |
| 6174 | * @wmi_handle: wmi handle |
| 6175 | * @param evt_buf: Pointer to event buffer |
| 6176 | * @param ev: Pointer to hold rtt event |
| 6177 | * @param hdump: Pointer to hold hex dump |
| 6178 | * @param hdump_len: hex dump length |
| 6179 | * |
| 6180 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6181 | */ |
| 6182 | QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, |
| 6183 | wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len) |
| 6184 | { |
| 6185 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6186 | |
| 6187 | if (wmi_handle->ops->extract_rtt_ev) |
| 6188 | return wmi_handle->ops->extract_rtt_ev(wmi_handle, |
| 6189 | evt_buf, ev, hdump, hdump_len); |
| 6190 | |
| 6191 | return QDF_STATUS_E_FAILURE; |
| 6192 | } |
| 6193 | |
| 6194 | /** |
| 6195 | * wmi_extract_peer_extd_stats() - extract extended peer stats from event |
| 6196 | * @wmi_handle: wmi handle |
| 6197 | * @param evt_buf: pointer to event buffer |
| 6198 | * @param index: Index into extended peer stats |
| 6199 | * @param peer_extd_stats: Pointer to hold extended peer stats |
| 6200 | * |
| 6201 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6202 | */ |
| 6203 | QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, |
| 6204 | uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats) |
| 6205 | { |
| 6206 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6207 | |
| 6208 | if (wmi_handle->ops->extract_peer_extd_stats) |
| 6209 | return wmi_handle->ops->extract_peer_extd_stats(wmi_handle, |
| 6210 | evt_buf, index, peer_extd_stats); |
| 6211 | |
| 6212 | return QDF_STATUS_E_FAILURE; |
| 6213 | } |
| 6214 | |
| 6215 | /** |
| 6216 | * wmi_extract_rtt_error_report_ev() - extract rtt error report from event |
| 6217 | * @wmi_handle: wmi handle |
| 6218 | * @param evt_buf: pointer to event buffer |
| 6219 | * @param wds_ev: Pointer to hold rtt error report |
| 6220 | * |
| 6221 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6222 | */ |
| 6223 | QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, |
| 6224 | wmi_host_rtt_error_report_event *ev) |
| 6225 | { |
| 6226 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6227 | |
| 6228 | if (wmi_handle->ops->extract_rtt_error_report_ev) |
| 6229 | return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle, |
| 6230 | evt_buf, ev); |
| 6231 | |
| 6232 | return QDF_STATUS_E_FAILURE; |
| 6233 | } |
| 6234 | |
| 6235 | /** |
| 6236 | * wmi_extract_chan_stats() - extract chan stats from event |
| 6237 | * @wmi_handle: wmi handle |
| 6238 | * @param evt_buf: pointer to event buffer |
| 6239 | * @param index: Index into chan stats |
| 6240 | * @param chanstats: Pointer to hold chan stats |
| 6241 | * |
| 6242 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6243 | */ |
| 6244 | QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, |
| 6245 | uint32_t index, wmi_host_chan_stats *chan_stats) |
| 6246 | { |
| 6247 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6248 | |
| 6249 | if (wmi_handle->ops->extract_chan_stats) |
| 6250 | return wmi_handle->ops->extract_chan_stats(wmi_handle, |
| 6251 | evt_buf, index, chan_stats); |
| 6252 | |
| 6253 | return QDF_STATUS_E_FAILURE; |
| 6254 | } |
| 6255 | |
| 6256 | /** |
| 6257 | * wmi_extract_thermal_stats() - extract thermal stats from event |
| 6258 | * @wmi_handle: wmi handle |
| 6259 | * @param evt_buf: Pointer to event buffer |
| 6260 | * @param temp: Pointer to hold extracted temperature |
| 6261 | * @param level: Pointer to hold extracted level |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 6262 | * @param pdev_id: Pointer to hold extracted pdev_id |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6263 | * |
| 6264 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6265 | */ |
| 6266 | QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf, |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 6267 | uint32_t *temp, uint32_t *level, uint32_t *pdev_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6268 | { |
| 6269 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6270 | |
| 6271 | if (wmi_handle->ops->extract_thermal_stats) |
| 6272 | return wmi_handle->ops->extract_thermal_stats(wmi_handle, |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 6273 | evt_buf, temp, level, pdev_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6274 | |
| 6275 | return QDF_STATUS_E_FAILURE; |
| 6276 | } |
| 6277 | |
| 6278 | /** |
| 6279 | * wmi_extract_profile_ctx() - extract profile context from event |
| 6280 | * @wmi_handle: wmi handle |
| 6281 | * @param evt_buf: pointer to event buffer |
| 6282 | * @param profile_ctx: Pointer to hold profile context |
| 6283 | * |
| 6284 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6285 | */ |
| 6286 | QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, |
| 6287 | wmi_host_wlan_profile_ctx_t *profile_ctx) |
| 6288 | { |
| 6289 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6290 | |
| 6291 | if (wmi_handle->ops->extract_profile_ctx) |
| 6292 | return wmi_handle->ops->extract_profile_ctx(wmi_handle, |
| 6293 | evt_buf, profile_ctx); |
| 6294 | |
| 6295 | return QDF_STATUS_E_FAILURE; |
| 6296 | } |
| 6297 | |
| 6298 | /** |
| 6299 | * wmi_extract_thermal_level_stats() - extract thermal level stats from |
| 6300 | * event |
| 6301 | * @wmi_handle: wmi handle |
| 6302 | * @param evt_buf: pointer to event buffer |
| 6303 | * @param idx: Index to level stats |
| 6304 | * @param levelcount: Pointer to hold levelcount |
| 6305 | * @param dccount: Pointer to hold dccount |
| 6306 | * |
| 6307 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6308 | */ |
| 6309 | QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, |
| 6310 | uint8_t idx, uint32_t *levelcount, uint32_t *dccount) |
| 6311 | { |
| 6312 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6313 | |
| 6314 | if (wmi_handle->ops->extract_thermal_level_stats) |
| 6315 | return wmi_handle->ops->extract_thermal_level_stats(wmi_handle, |
| 6316 | evt_buf, idx, levelcount, dccount); |
| 6317 | |
| 6318 | return QDF_STATUS_E_FAILURE; |
| 6319 | } |
| 6320 | |
| 6321 | /** |
| 6322 | * wmi_extract_profile_data() - extract profile data from event |
| 6323 | * @wmi_handle: wmi handle |
| 6324 | * @param evt_buf: pointer to event buffer |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6325 | * @idx index: index of profile data |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6326 | * @param profile_data: Pointer to hold profile data |
| 6327 | * |
| 6328 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6329 | */ |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6330 | QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx, |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6331 | wmi_host_wlan_profile_t *profile_data) |
| 6332 | { |
| 6333 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6334 | |
| 6335 | if (wmi_handle->ops->extract_profile_data) |
| 6336 | return wmi_handle->ops->extract_profile_data(wmi_handle, |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6337 | evt_buf, idx, profile_data); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6338 | |
| 6339 | return QDF_STATUS_E_FAILURE; |
| 6340 | } |
| 6341 | |
| 6342 | /** |
| 6343 | * wmi_extract_chan_info_event() - extract chan information from event |
| 6344 | * @wmi_handle: wmi handle |
| 6345 | * @param evt_buf: pointer to event buffer |
| 6346 | * @param chan_info: Pointer to hold chan information |
| 6347 | * |
| 6348 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6349 | */ |
| 6350 | QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 6351 | wmi_host_chan_info_event *chan_info) |
| 6352 | { |
| 6353 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6354 | |
| 6355 | if (wmi_handle->ops->extract_chan_info_event) |
| 6356 | return wmi_handle->ops->extract_chan_info_event(wmi_handle, |
| 6357 | evt_buf, chan_info); |
| 6358 | |
| 6359 | return QDF_STATUS_E_FAILURE; |
| 6360 | } |
| 6361 | |
| 6362 | /** |
| 6363 | * wmi_extract_channel_hopping_event() - extract channel hopping param |
| 6364 | * from event |
| 6365 | * @wmi_handle: wmi handle |
| 6366 | * @param evt_buf: pointer to event buffer |
| 6367 | * @param ch_hopping: Pointer to hold channel hopping param |
| 6368 | * |
| 6369 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6370 | */ |
| 6371 | QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf, |
| 6372 | wmi_host_pdev_channel_hopping_event *ch_hopping) |
| 6373 | { |
| 6374 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6375 | |
| 6376 | if (wmi->ops->extract_channel_hopping_event) |
| 6377 | return wmi->ops->extract_channel_hopping_event(wmi, |
| 6378 | evt_buf, ch_hopping); |
| 6379 | |
| 6380 | return QDF_STATUS_E_FAILURE; |
| 6381 | } |
| 6382 | |
| 6383 | /** |
| 6384 | * wmi_extract_bss_chan_info_event() - extract bss channel information |
| 6385 | * from event |
| 6386 | * @wmi_handle: wmi handle |
| 6387 | * @param evt_buf: pointer to event buffer |
| 6388 | * @param bss_chan_info: Pointer to hold bss channel information |
| 6389 | * |
| 6390 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6391 | */ |
| 6392 | QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 6393 | wmi_host_pdev_bss_chan_info_event *bss_chan_info) |
| 6394 | { |
| 6395 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6396 | |
| 6397 | if (wmi_handle->ops->extract_bss_chan_info_event) |
| 6398 | return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle, |
| 6399 | evt_buf, bss_chan_info); |
| 6400 | |
| 6401 | return QDF_STATUS_E_FAILURE; |
| 6402 | } |
| 6403 | |
| 6404 | /** |
| 6405 | * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event |
| 6406 | * @wmi_handle: wmi handle |
| 6407 | * @param evt_buf: pointer to event buffer |
| 6408 | * @param inst_rssi_resp: Pointer to hold inst rssi response |
| 6409 | * |
| 6410 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6411 | */ |
| 6412 | QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf, |
| 6413 | wmi_host_inst_stats_resp *inst_rssi_resp) |
| 6414 | { |
| 6415 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6416 | |
| 6417 | if (wmi->ops->extract_inst_rssi_stats_event) |
| 6418 | return wmi->ops->extract_inst_rssi_stats_event(wmi, |
| 6419 | evt_buf, inst_rssi_resp); |
| 6420 | |
| 6421 | return QDF_STATUS_E_FAILURE; |
| 6422 | } |
| 6423 | |
| 6424 | /** |
| 6425 | * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control |
| 6426 | * from event |
| 6427 | * @wmi_handle: wmi handle |
| 6428 | * @param evt_buf: pointer to event buffer |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6429 | * @param ev: Pointer to hold data traffic control |
| 6430 | * |
| 6431 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6432 | */ |
| 6433 | QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, |
| 6434 | wmi_host_tx_data_traffic_ctrl_event *ev) |
| 6435 | { |
| 6436 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6437 | |
| 6438 | if (wmi->ops->extract_tx_data_traffic_ctrl_ev) |
| 6439 | return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi, |
| 6440 | evt_buf, ev); |
| 6441 | |
| 6442 | return QDF_STATUS_E_FAILURE; |
| 6443 | } |
| 6444 | |
| 6445 | /** |
| 6446 | * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event |
| 6447 | * @wmi_handle: wmi handle |
| 6448 | * @param evt_buf: pointer to event buffer |
| 6449 | * @param index: Index into extended vdev stats |
| 6450 | * @param vdev_extd_stats: Pointer to hold extended vdev stats |
| 6451 | * |
| 6452 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6453 | */ |
| 6454 | QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, |
| 6455 | uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats) |
| 6456 | { |
| 6457 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6458 | |
| 6459 | if (wmi_handle->ops->extract_vdev_extd_stats) |
| 6460 | return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle, |
| 6461 | evt_buf, index, vdev_extd_stats); |
Gupta, Kapil | 2e68598 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 6462 | return QDF_STATUS_E_FAILURE; |
| 6463 | } |
| 6464 | |
| 6465 | /** |
Gurumoorthi Gnanasambandhan | b5fb836 | 2017-11-06 22:04:17 +0530 | [diff] [blame] | 6466 | * wmi_extract_bcn_stats() - extract beacon stats from event |
| 6467 | * @wmi_handle: wmi handle |
| 6468 | * @evt_buf: pointer to event buffer |
| 6469 | * @index: Index into beacon stats |
| 6470 | * @vdev_bcn_stats: Pointer to hold beacon stats |
| 6471 | * |
| 6472 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6473 | */ |
| 6474 | QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, |
| 6475 | uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats) |
| 6476 | { |
| 6477 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6478 | |
| 6479 | if (wmi_handle->ops->extract_bcn_stats) |
| 6480 | return wmi_handle->ops->extract_bcn_stats(wmi_handle, |
| 6481 | evt_buf, index, vdev_bcn_stats); |
| 6482 | return QDF_STATUS_E_FAILURE; |
| 6483 | } |
| 6484 | |
| 6485 | /** |
Chaithanya Garrepalli | 8a9c38d | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 6486 | * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event |
| 6487 | * @wmi_handle: wmi handle |
| 6488 | * @param evt_buf: pointer to event buffer |
| 6489 | * @param vdev_extd_stats: Pointer to hold nac rssi stats |
| 6490 | * |
| 6491 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6492 | */ |
| 6493 | QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 6494 | struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats) |
| 6495 | { |
| 6496 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6497 | |
| 6498 | if (wmi_handle->ops->extract_vdev_nac_rssi_stats) |
| 6499 | return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle, |
| 6500 | evt_buf, vdev_nac_rssi_stats); |
| 6501 | |
| 6502 | return QDF_STATUS_E_FAILURE; |
| 6503 | } |
| 6504 | |
| 6505 | /** |
Gupta, Kapil | 2e68598 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 6506 | * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of |
| 6507 | * adaptive dwelltime configuration params |
| 6508 | * @wma_handle: wma handler |
| 6509 | * @dwelltime_params: pointer to dwelltime_params |
| 6510 | * |
| 6511 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 6512 | */ |
| 6513 | QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, |
| 6514 | struct wmi_adaptive_dwelltime_params *dwelltime_params) |
| 6515 | { |
| 6516 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6517 | |
| 6518 | if (wmi_handle->ops->send_adapt_dwelltime_params_cmd) |
| 6519 | return wmi_handle->ops-> |
| 6520 | send_adapt_dwelltime_params_cmd(wmi_handle, |
| 6521 | dwelltime_params); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6522 | |
| 6523 | return QDF_STATUS_E_FAILURE; |
| 6524 | } |
Govind Singh | bca3b1b | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 6525 | |
| 6526 | /** |
| 6527 | * wmi_unified_send_power_dbg_cmd() - send power debug commands |
| 6528 | * @wmi_handle: wmi handle |
| 6529 | * @param: wmi power debug parameter |
| 6530 | * |
| 6531 | * Send WMI_POWER_DEBUG_CMDID parameters to fw. |
| 6532 | * |
| 6533 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6534 | */ |
| 6535 | QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, |
| 6536 | struct wmi_power_dbg_params *param) |
| 6537 | { |
| 6538 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6539 | |
| 6540 | if (wmi_handle->ops->send_power_dbg_cmd) |
| 6541 | return wmi_handle->ops->send_power_dbg_cmd(wmi_handle, |
| 6542 | param); |
| 6543 | |
| 6544 | return QDF_STATUS_E_FAILURE; |
| 6545 | } |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6546 | |
| 6547 | /** |
Sathish Kumar | 45e991b | 2017-02-27 10:35:40 +0530 | [diff] [blame] | 6548 | * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart |
| 6549 | * @wmi_handle: wmi handle |
| 6550 | * @param: multiple vdev restart parameter |
| 6551 | * |
| 6552 | * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw. |
| 6553 | * |
| 6554 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6555 | */ |
| 6556 | QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl, |
| 6557 | struct multiple_vdev_restart_params *param) |
| 6558 | { |
| 6559 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6560 | |
| 6561 | if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd) |
| 6562 | return wmi_handle->ops->send_multiple_vdev_restart_req_cmd( |
| 6563 | wmi_handle, |
| 6564 | param); |
| 6565 | |
| 6566 | return QDF_STATUS_E_FAILURE; |
| 6567 | } |
| 6568 | |
Manikandan Mohan | 31a13e2 | 2016-12-13 13:14:06 -0800 | [diff] [blame] | 6569 | QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, |
| 6570 | struct sar_limit_cmd_params *params) |
| 6571 | { |
| 6572 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6573 | |
| 6574 | if (wmi_handle->ops->send_sar_limit_cmd) |
| 6575 | return wmi_handle->ops->send_sar_limit_cmd( |
| 6576 | wmi_handle, |
| 6577 | params); |
| 6578 | return QDF_STATUS_E_FAILURE; |
| 6579 | } |
| 6580 | |
Jeff Johnson | 4783f90 | 2017-12-14 15:50:16 -0800 | [diff] [blame] | 6581 | QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl) |
| 6582 | { |
| 6583 | wmi_unified_t wmi_handle = wmi_hdl; |
| 6584 | |
| 6585 | if (wmi_handle->ops->get_sar_limit_cmd) |
| 6586 | return wmi_handle->ops->get_sar_limit_cmd(wmi_handle); |
| 6587 | |
| 6588 | return QDF_STATUS_E_FAILURE; |
| 6589 | } |
| 6590 | |
| 6591 | QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl, |
| 6592 | uint8_t *evt_buf, |
| 6593 | struct sar_limit_event *event) |
| 6594 | { |
| 6595 | wmi_unified_t wmi_handle = wmi_hdl; |
| 6596 | |
| 6597 | if (wmi_handle->ops->extract_sar_limit_event) |
| 6598 | return wmi_handle->ops->extract_sar_limit_event(wmi_handle, |
| 6599 | evt_buf, |
| 6600 | event); |
| 6601 | |
| 6602 | return QDF_STATUS_E_FAILURE; |
| 6603 | } |
| 6604 | |
Kabilan Kannan | 0d0f935 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 6605 | QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle, |
| 6606 | uint8_t *event, uint32_t len) |
| 6607 | { |
| 6608 | wmi_unified_t wmi_handle = handle; |
| 6609 | |
| 6610 | if (wmi_handle->ops->extract_sar2_result_event) |
| 6611 | return wmi_handle->ops->extract_sar2_result_event(wmi_handle, |
| 6612 | event, |
| 6613 | len); |
| 6614 | |
| 6615 | return QDF_STATUS_E_FAILURE; |
| 6616 | } |
Jeff Johnson | 4783f90 | 2017-12-14 15:50:16 -0800 | [diff] [blame] | 6617 | |
Nachiket Kukade | ab4cbc2 | 2017-12-15 12:36:58 +0530 | [diff] [blame] | 6618 | #ifdef WLAN_FEATURE_DISA |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6619 | QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl, |
Nachiket Kukade | 03e7ab2 | 2017-12-20 17:28:29 +0530 | [diff] [blame] | 6620 | struct disa_encrypt_decrypt_req_params *params) |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6621 | { |
| 6622 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6623 | |
| 6624 | if (wmi_handle->ops->send_encrypt_decrypt_send_cmd) |
| 6625 | return wmi_handle->ops->send_encrypt_decrypt_send_cmd( |
| 6626 | wmi_handle, |
| 6627 | params); |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6628 | return QDF_STATUS_E_FAILURE; |
| 6629 | } |
Nachiket Kukade | 03e7ab2 | 2017-12-20 17:28:29 +0530 | [diff] [blame] | 6630 | |
| 6631 | QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, |
| 6632 | uint8_t *evt_buf, |
| 6633 | struct disa_encrypt_decrypt_resp_params *resp) |
| 6634 | { |
| 6635 | struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; |
| 6636 | |
| 6637 | if (wmi_handle->ops->extract_encrypt_decrypt_resp_event) |
| 6638 | return wmi_handle->ops->extract_encrypt_decrypt_resp_event( |
| 6639 | wmi_handle, evt_buf, resp); |
| 6640 | |
| 6641 | return QDF_STATUS_E_FAILURE; |
| 6642 | } |
| 6643 | |
Nachiket Kukade | ab4cbc2 | 2017-12-15 12:36:58 +0530 | [diff] [blame] | 6644 | #endif |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6645 | |
| 6646 | /* |
| 6647 | * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands |
| 6648 | * @wmi_handle: wmi handle |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6649 | * @param : wmi btcoex cfg params |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6650 | * |
| 6651 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 6652 | * |
| 6653 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6654 | */ |
| 6655 | QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6656 | struct btcoex_cfg_params *param) |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6657 | { |
| 6658 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6659 | |
| 6660 | if (wmi->ops->send_btcoex_wlan_priority_cmd) |
| 6661 | return wmi->ops->send_btcoex_wlan_priority_cmd(wmi, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6662 | param); |
| 6663 | |
| 6664 | return QDF_STATUS_E_FAILURE; |
| 6665 | } |
| 6666 | /** |
| 6667 | * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands |
| 6668 | * @wmi_handle: wmi handle |
| 6669 | * @param: wmi btcoex cfg params |
| 6670 | * |
| 6671 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 6672 | * |
| 6673 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6674 | */ |
| 6675 | QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, |
| 6676 | struct btcoex_cfg_params *param) |
| 6677 | { |
| 6678 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6679 | |
| 6680 | if (wmi->ops->send_btcoex_duty_cycle_cmd) |
| 6681 | return wmi->ops->send_btcoex_duty_cycle_cmd(wmi, |
| 6682 | param); |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6683 | |
| 6684 | return QDF_STATUS_E_FAILURE; |
| 6685 | } |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6686 | |
| 6687 | /* |
| 6688 | * wmi_extract_service_ready_ext() - extract extended service ready |
| 6689 | * @wmi_handle: wmi handle |
| 6690 | * @param: wmi power debug parameter |
| 6691 | * |
| 6692 | * |
| 6693 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6694 | */ |
| 6695 | QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6696 | struct wlan_psoc_host_service_ext_param *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6697 | { |
| 6698 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6699 | |
| 6700 | if (wmi_handle->ops->extract_service_ready_ext) |
| 6701 | return wmi_handle->ops->extract_service_ready_ext(wmi_handle, |
| 6702 | evt_buf, param); |
| 6703 | |
| 6704 | return QDF_STATUS_E_FAILURE; |
| 6705 | } |
| 6706 | |
| 6707 | /** |
Kabilan Kannan | 0d0f935 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 6708 | * wmi_extract_sar_cap_service_ready_ext() - |
| 6709 | * extract sar cap from service ready event |
| 6710 | * @wmi_handle: wmi handle |
| 6711 | * @evt_buf: pointer to event buffer |
| 6712 | * @ext_param: extended target info |
| 6713 | * |
| 6714 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6715 | */ |
| 6716 | QDF_STATUS wmi_extract_sar_cap_service_ready_ext( |
| 6717 | void *wmi_hdl, |
| 6718 | uint8_t *evt_buf, |
| 6719 | struct wlan_psoc_host_service_ext_param *ext_param) |
| 6720 | { |
| 6721 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6722 | |
| 6723 | if (wmi_handle->ops->extract_sar_cap_service_ready_ext) |
| 6724 | return wmi_handle->ops->extract_sar_cap_service_ready_ext( |
| 6725 | wmi_handle, |
| 6726 | evt_buf, ext_param); |
| 6727 | |
| 6728 | return QDF_STATUS_E_FAILURE; |
| 6729 | } |
| 6730 | |
| 6731 | /** |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6732 | * wmi_extract_hw_mode_cap_service_ready_ext() - |
| 6733 | * extract HW mode cap from service ready event |
| 6734 | * @wmi_handle: wmi handle |
| 6735 | * @param evt_buf: pointer to event buffer |
| 6736 | * @param param: Pointer to hold evt buf |
| 6737 | * @param hw_mode_idx: hw mode idx should be less than num_mode |
| 6738 | * |
| 6739 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6740 | */ |
| 6741 | QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( |
| 6742 | void *wmi_hdl, |
| 6743 | uint8_t *evt_buf, uint8_t hw_mode_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6744 | struct wlan_psoc_host_hw_mode_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6745 | { |
| 6746 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6747 | |
| 6748 | if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext) |
| 6749 | return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext( |
| 6750 | wmi_handle, |
| 6751 | evt_buf, hw_mode_idx, param); |
| 6752 | |
| 6753 | return QDF_STATUS_E_FAILURE; |
| 6754 | } |
| 6755 | /** |
| 6756 | * wmi_extract_mac_phy_cap_service_ready_ext() - |
| 6757 | * extract MAC phy cap from service ready event |
| 6758 | * @wmi_handle: wmi handle |
| 6759 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6760 | * @param hw_mode_id: hw mode id of hw_mode_caps |
| 6761 | * @param phy_id: phy_id within hw_mode_cap |
| 6762 | * @param param: pointer to mac phy caps structure to hold the values from event |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6763 | * |
| 6764 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6765 | */ |
| 6766 | QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( |
| 6767 | void *wmi_hdl, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6768 | uint8_t *evt_buf, |
| 6769 | uint8_t hw_mode_id, |
| 6770 | uint8_t phy_id, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6771 | struct wlan_psoc_host_mac_phy_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6772 | { |
| 6773 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6774 | |
| 6775 | if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext) |
| 6776 | return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext( |
| 6777 | wmi_handle, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6778 | evt_buf, hw_mode_id, phy_id, param); |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6779 | |
| 6780 | return QDF_STATUS_E_FAILURE; |
| 6781 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6782 | |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6783 | /** |
| 6784 | * wmi_extract_reg_cap_service_ready_ext() - |
| 6785 | * extract REG cap from service ready event |
| 6786 | * @wmi_handle: wmi handle |
| 6787 | * @param evt_buf: pointer to event buffer |
| 6788 | * @param param: Pointer to hold evt buf |
| 6789 | * @param phy_idx: phy idx should be less than num_mode |
| 6790 | * |
| 6791 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6792 | */ |
| 6793 | QDF_STATUS wmi_extract_reg_cap_service_ready_ext( |
| 6794 | void *wmi_hdl, |
| 6795 | uint8_t *evt_buf, uint8_t phy_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6796 | struct wlan_psoc_host_hal_reg_capabilities_ext *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6797 | { |
| 6798 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6799 | |
| 6800 | if (wmi_handle->ops->extract_reg_cap_service_ready_ext) |
| 6801 | return wmi_handle->ops->extract_reg_cap_service_ready_ext( |
| 6802 | wmi_handle, |
| 6803 | evt_buf, phy_idx, param); |
| 6804 | |
| 6805 | return QDF_STATUS_E_FAILURE; |
| 6806 | } |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 6807 | |
Sathish Kumar | f396c72 | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 6808 | QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( |
| 6809 | void *wmi_hdl, |
| 6810 | uint8_t *evt_buf, uint8_t idx, |
| 6811 | struct wlan_psoc_host_dbr_ring_caps *param) |
| 6812 | { |
| 6813 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6814 | |
| 6815 | if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext) |
| 6816 | return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext( |
| 6817 | wmi_handle, |
| 6818 | evt_buf, idx, param); |
| 6819 | |
| 6820 | return QDF_STATUS_E_FAILURE; |
| 6821 | } |
| 6822 | |
| 6823 | QDF_STATUS wmi_extract_dbr_buf_release_fixed( |
| 6824 | void *wmi_hdl, |
| 6825 | uint8_t *evt_buf, |
| 6826 | struct direct_buf_rx_rsp *param) |
| 6827 | { |
| 6828 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6829 | |
| 6830 | if (wmi_handle->ops->extract_dbr_buf_release_fixed) |
| 6831 | return wmi_handle->ops->extract_dbr_buf_release_fixed( |
| 6832 | wmi_handle, |
| 6833 | evt_buf, param); |
| 6834 | |
| 6835 | return QDF_STATUS_E_FAILURE; |
| 6836 | } |
| 6837 | |
| 6838 | QDF_STATUS wmi_extract_dbr_buf_release_entry( |
| 6839 | void *wmi_hdl, |
| 6840 | uint8_t *evt_buf, uint8_t idx, |
| 6841 | struct direct_buf_rx_entry *param) |
| 6842 | { |
| 6843 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6844 | |
| 6845 | if (wmi_handle->ops->extract_dbr_buf_release_entry) |
| 6846 | return wmi_handle->ops->extract_dbr_buf_release_entry( |
| 6847 | wmi_handle, |
| 6848 | evt_buf, idx, param); |
| 6849 | |
| 6850 | return QDF_STATUS_E_FAILURE; |
| 6851 | } |
| 6852 | |
Edayilliam Jayadev | 9265122 | 2018-04-06 16:37:17 +0530 | [diff] [blame] | 6853 | QDF_STATUS wmi_extract_dbr_buf_metadata( |
| 6854 | void *wmi_hdl, |
| 6855 | uint8_t *evt_buf, uint8_t idx, |
| 6856 | struct direct_buf_rx_metadata *param) |
| 6857 | { |
| 6858 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 6859 | |
| 6860 | if (wmi_handle->ops->extract_dbr_buf_metadata) |
| 6861 | return wmi_handle->ops->extract_dbr_buf_metadata( |
| 6862 | wmi_handle, |
| 6863 | evt_buf, idx, param); |
| 6864 | |
| 6865 | return QDF_STATUS_E_FAILURE; |
| 6866 | } |
| 6867 | |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 6868 | /** |
| 6869 | * wmi_extract_pdev_utf_event() - |
| 6870 | * extract UTF data from pdev utf event |
| 6871 | * @wmi_handle: wmi handle |
| 6872 | * @param evt_buf: pointer to event buffer |
| 6873 | * @param param: Pointer to hold evt buf |
| 6874 | * |
| 6875 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6876 | */ |
| 6877 | QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, |
| 6878 | uint8_t *evt_buf, |
| 6879 | struct wmi_host_pdev_utf_event *param) |
| 6880 | { |
| 6881 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6882 | |
| 6883 | if (wmi_handle->ops->extract_pdev_utf_event) |
| 6884 | return wmi_handle->ops->extract_pdev_utf_event( |
| 6885 | wmi_handle, |
| 6886 | evt_buf, param); |
| 6887 | |
| 6888 | return QDF_STATUS_E_FAILURE; |
| 6889 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6890 | |
| 6891 | /** |
Kiran Venkatappa | 316357d | 2017-02-28 14:19:17 +0530 | [diff] [blame] | 6892 | * wmi_extract_pdev_qvit_event() - |
| 6893 | * extract UTF data from pdev qvit event |
| 6894 | * @wmi_handle: wmi handle |
| 6895 | * @param evt_buf: pointer to event buffer |
| 6896 | * @param param: Pointer to hold evt buf |
| 6897 | * |
| 6898 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6899 | */ |
| 6900 | QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, |
| 6901 | uint8_t *evt_buf, |
| 6902 | struct wmi_host_pdev_qvit_event *param) |
| 6903 | { |
| 6904 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6905 | |
| 6906 | if (wmi_handle->ops->extract_pdev_qvit_event) |
| 6907 | return wmi_handle->ops->extract_pdev_qvit_event( |
| 6908 | wmi_handle, |
| 6909 | evt_buf, param); |
| 6910 | |
| 6911 | return QDF_STATUS_E_FAILURE; |
| 6912 | } |
| 6913 | |
| 6914 | /** |
Sathish Kumar | 58a9fb9 | 2017-01-19 14:57:37 +0530 | [diff] [blame] | 6915 | * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command |
| 6916 | * @wmi_handle: wmi handle |
| 6917 | * @param: wmi coex ver cfg params |
| 6918 | * |
| 6919 | * Send WMI_COEX_VERSION_CFG_CMID parameters to fw. |
| 6920 | * |
| 6921 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6922 | */ |
| 6923 | QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, |
| 6924 | coex_ver_cfg_t *param) |
| 6925 | { |
| 6926 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6927 | |
| 6928 | if (wmi_handle->ops->send_coex_ver_cfg_cmd) |
| 6929 | return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle, |
| 6930 | param); |
| 6931 | |
| 6932 | return QDF_STATUS_E_FAILURE; |
| 6933 | } |
| 6934 | |
| 6935 | /** |
Sathish Kumar | 80f4f38 | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 6936 | * wmi_unified_send_coex_config_cmd() - send coex ver cfg command |
| 6937 | * @wmi_handle: wmi handle |
| 6938 | * @param: wmi coex cfg cmd params |
| 6939 | * |
| 6940 | * Send WMI_COEX_CFG_CMD parameters to fw. |
| 6941 | * |
| 6942 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6943 | */ |
| 6944 | QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, |
| 6945 | struct coex_config_params *param) |
| 6946 | { |
| 6947 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6948 | |
| 6949 | if (wmi_handle->ops->send_coex_config_cmd) |
| 6950 | return wmi_handle->ops->send_coex_config_cmd(wmi_handle, |
| 6951 | param); |
| 6952 | |
| 6953 | return QDF_STATUS_E_FAILURE; |
| 6954 | } |
| 6955 | |
Rajeev Kumar Sirasanagandla | ab4275d | 2016-11-22 21:28:54 +0530 | [diff] [blame] | 6956 | QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, |
| 6957 | struct rcpi_req *get_rcpi_param) |
| 6958 | { |
| 6959 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6960 | |
| 6961 | if (wmi_handle->ops->send_get_rcpi_cmd) |
| 6962 | return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle, |
| 6963 | get_rcpi_param); |
| 6964 | |
| 6965 | return QDF_STATUS_E_FAILURE; |
| 6966 | } |
| 6967 | |
| 6968 | QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, |
| 6969 | struct rcpi_res *res) |
| 6970 | { |
| 6971 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 6972 | struct wmi_ops *ops = wmi_handle->ops; |
| 6973 | |
| 6974 | if (ops->extract_rcpi_response_event) |
| 6975 | return ops->extract_rcpi_response_event(wmi_handle, evt_buf, |
| 6976 | res); |
| 6977 | |
| 6978 | return QDF_STATUS_E_FAILURE; |
| 6979 | } |
| 6980 | |
Sathish Kumar | 80f4f38 | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 6981 | /** |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6982 | * wmi_extract_peer_delete_response_event() - |
| 6983 | * extract vdev id and peer mac addresse from peer delete response event |
| 6984 | * @wmi_handle: wmi handle |
| 6985 | * @param evt_buf: pointer to event buffer |
| 6986 | * @param param: Pointer to hold evt buf |
| 6987 | * |
| 6988 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6989 | */ |
| 6990 | QDF_STATUS wmi_extract_peer_delete_response_event( |
| 6991 | void *wmi_hdl, |
| 6992 | uint8_t *evt_buf, |
| 6993 | struct wmi_host_peer_delete_response_event *param) |
| 6994 | { |
| 6995 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6996 | |
| 6997 | if (wmi_handle->ops->extract_peer_delete_response_event) |
| 6998 | return wmi_handle->ops->extract_peer_delete_response_event( |
| 6999 | wmi_handle, |
| 7000 | evt_buf, param); |
| 7001 | |
| 7002 | return QDF_STATUS_E_FAILURE; |
| 7003 | } |
Arif Hussain | f00be1d | 2017-01-07 18:21:55 -0800 | [diff] [blame] | 7004 | |
| 7005 | QDF_STATUS |
| 7006 | wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, |
| 7007 | uint32_t pdev_id) |
| 7008 | { |
| 7009 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7010 | |
| 7011 | if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd) |
| 7012 | return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd( |
| 7013 | wmi_handle, pdev_id); |
| 7014 | |
| 7015 | return QDF_STATUS_E_FAILURE; |
| 7016 | } |
| 7017 | |
| 7018 | QDF_STATUS |
| 7019 | wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, |
| 7020 | uint32_t pdev_id) |
| 7021 | { |
| 7022 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7023 | |
| 7024 | if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd) |
| 7025 | return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd( |
| 7026 | wmi_handle, pdev_id); |
| 7027 | |
| 7028 | return QDF_STATUS_E_FAILURE; |
| 7029 | } |
Vikram Kandukuri | 45fc858 | 2017-03-07 18:40:13 +0530 | [diff] [blame] | 7030 | |
| 7031 | /* |
| 7032 | * wmi_extract_chainmask_tables_tlv() - extract chain mask tables |
| 7033 | * @wmi_handle: wmi handle |
| 7034 | * @evt_buf: pointer to event buffer. |
| 7035 | * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table |
| 7036 | * |
| 7037 | * |
| 7038 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 7039 | */ |
| 7040 | QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, |
| 7041 | struct wlan_psoc_host_chainmask_table *chainmask_table) |
| 7042 | { |
| 7043 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7044 | |
| 7045 | if (wmi_handle->ops->extract_chainmask_tables) |
| 7046 | return wmi_handle->ops->extract_chainmask_tables(wmi_handle, |
| 7047 | evt_buf, chainmask_table); |
| 7048 | |
| 7049 | return QDF_STATUS_E_FAILURE; |
| 7050 | } |
Kiran Kumar Lokere | daf91e3 | 2017-04-24 00:56:03 -0700 | [diff] [blame] | 7051 | /** |
| 7052 | * wmi_unified_set_country_cmd_send() - WMI set country function |
| 7053 | * @param wmi_handle : handle to WMI. |
| 7054 | * @param param : pointer to hold set country cmd parameter |
| 7055 | * |
| 7056 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 7057 | */ |
| 7058 | QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, |
| 7059 | struct set_country *param) |
| 7060 | { |
| 7061 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7062 | |
| 7063 | if (wmi_handle->ops->send_set_country_cmd) |
| 7064 | return wmi_handle->ops->send_set_country_cmd(wmi_handle, |
| 7065 | param); |
| 7066 | |
| 7067 | return QDF_STATUS_E_FAILURE; |
| 7068 | } |
| 7069 | |
Nitesh Shah | 52323d0 | 2017-05-22 15:49:00 +0530 | [diff] [blame] | 7070 | /** |
| 7071 | * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of |
| 7072 | * DBS scan selection configuration params |
| 7073 | * @wma_handle: wma handler |
| 7074 | * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params |
| 7075 | * |
| 7076 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 7077 | */ |
| 7078 | QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl, |
| 7079 | struct wmi_dbs_scan_sel_params *dbs_scan_params) |
| 7080 | { |
| 7081 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7082 | |
| 7083 | if (wmi_handle->ops->send_dbs_scan_sel_params_cmd) |
| 7084 | return wmi_handle->ops-> |
| 7085 | send_dbs_scan_sel_params_cmd(wmi_handle, |
| 7086 | dbs_scan_params); |
| 7087 | |
| 7088 | return QDF_STATUS_E_FAILURE; |
| 7089 | } |
Ganesh Kondabattini | 40252f5 | 2017-07-10 11:54:11 +0530 | [diff] [blame] | 7090 | |
Rajeev Kumar Sirasanagandla | daadf83 | 2017-09-18 16:47:52 +0530 | [diff] [blame] | 7091 | #ifdef WLAN_FEATURE_ACTION_OUI |
| 7092 | QDF_STATUS |
| 7093 | wmi_unified_send_action_oui_cmd(void *wmi_hdl, |
| 7094 | struct action_oui_request *req) |
| 7095 | { |
| 7096 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7097 | |
| 7098 | if (wmi_handle->ops->send_action_oui_cmd) |
| 7099 | return wmi_handle->ops->send_action_oui_cmd(wmi_handle, |
| 7100 | req); |
| 7101 | |
| 7102 | return QDF_STATUS_E_FAILURE; |
| 7103 | } |
| 7104 | #endif |
| 7105 | |
Ganesh Kondabattini | 40252f5 | 2017-07-10 11:54:11 +0530 | [diff] [blame] | 7106 | /** |
| 7107 | * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel |
| 7108 | * configuration params |
| 7109 | * @wmi_hdl: wmi handler |
| 7110 | * @limit_off_chan_param: pointer to wmi_limit_off_chan_param |
| 7111 | * |
| 7112 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure |
| 7113 | */ |
| 7114 | QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl, |
| 7115 | struct wmi_limit_off_chan_param *limit_off_chan_param) |
| 7116 | { |
| 7117 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7118 | |
| 7119 | if (wmi_handle->ops->send_limit_off_chan_cmd) |
| 7120 | return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle, |
| 7121 | limit_off_chan_param); |
| 7122 | |
| 7123 | return QDF_STATUS_E_FAILURE; |
| 7124 | } |
Kiran Venkatappa | 7fe3afc | 2017-11-08 19:32:23 +0530 | [diff] [blame] | 7125 | |
| 7126 | /** |
| 7127 | * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw |
| 7128 | * @wmi_hdl: wmi handle |
| 7129 | * @bcn_ctrl_param: pointer to bcn_offload_control param |
| 7130 | * |
| 7131 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 7132 | */ |
| 7133 | QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl, |
| 7134 | struct bcn_offload_control *bcn_ctrl_param) |
| 7135 | { |
| 7136 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7137 | |
| 7138 | if (wmi_handle->ops->send_bcn_offload_control_cmd) |
| 7139 | return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle, |
| 7140 | bcn_ctrl_param); |
| 7141 | |
| 7142 | return QDF_STATUS_E_FAILURE; |
| 7143 | } |
Rathees kumar Chinannan | e3d6feb | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 7144 | |
| 7145 | /** |
| 7146 | * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of |
| 7147 | * wds entries from FW |
| 7148 | * @wmi_handle: wmi handle |
| 7149 | * |
| 7150 | * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. |
| 7151 | * |
| 7152 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 7153 | */ |
| 7154 | QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl) |
| 7155 | { |
| 7156 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7157 | |
| 7158 | if (wmi_handle->ops->send_wds_entry_list_cmd) |
| 7159 | return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle); |
| 7160 | |
| 7161 | return QDF_STATUS_E_FAILURE; |
| 7162 | } |
| 7163 | |
| 7164 | /** |
| 7165 | * wmi_extract_wds_entry - api to extract wds entry |
| 7166 | * @wmi_handle: wma handle |
| 7167 | * @evt_buf: pointer to event buffer |
| 7168 | * @wds_entry: wds entry |
| 7169 | * @idx: index to point wds entry in event buffer |
| 7170 | * |
| 7171 | * Return: QDF_STATUS_SUCCESS for successful event parse |
| 7172 | * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE |
| 7173 | */ |
| 7174 | QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, |
| 7175 | struct wdsentry *wds_entry, |
| 7176 | u_int32_t idx) |
| 7177 | { |
| 7178 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7179 | |
| 7180 | if (wmi_handle->ops->extract_wds_entry) |
| 7181 | return wmi_handle->ops->extract_wds_entry(wmi_handle, |
| 7182 | evt_buf, wds_entry, idx); |
| 7183 | |
| 7184 | return QDF_STATUS_E_FAILURE; |
| 7185 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 7186 | qdf_export_symbol(wmi_extract_wds_entry); |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7187 | |
| 7188 | #ifdef WLAN_FEATURE_NAN_CONVERGENCE |
| 7189 | QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl, |
| 7190 | struct nan_datapath_initiator_req *req) |
| 7191 | { |
| 7192 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7193 | |
| 7194 | if (wmi_handle->ops->send_ndp_initiator_req_cmd) |
| 7195 | return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle, |
| 7196 | req); |
| 7197 | |
| 7198 | return QDF_STATUS_E_FAILURE; |
| 7199 | } |
| 7200 | |
| 7201 | QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl, |
| 7202 | struct nan_datapath_responder_req *req) |
| 7203 | { |
| 7204 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7205 | |
| 7206 | if (wmi_handle->ops->send_ndp_responder_req_cmd) |
| 7207 | return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle, |
| 7208 | req); |
| 7209 | |
| 7210 | return QDF_STATUS_E_FAILURE; |
| 7211 | } |
| 7212 | |
| 7213 | QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl, |
| 7214 | struct nan_datapath_end_req *req) |
| 7215 | { |
| 7216 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7217 | |
| 7218 | if (wmi_handle->ops->send_ndp_end_req_cmd) |
| 7219 | return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle, |
| 7220 | req); |
| 7221 | |
| 7222 | return QDF_STATUS_E_FAILURE; |
| 7223 | } |
| 7224 | |
| 7225 | QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7226 | uint8_t *data, struct nan_datapath_initiator_rsp *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7227 | { |
| 7228 | if (wmi_handle->ops->extract_ndp_initiator_rsp) |
| 7229 | return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle, |
| 7230 | data, rsp); |
| 7231 | |
| 7232 | return QDF_STATUS_E_FAILURE; |
| 7233 | } |
| 7234 | |
| 7235 | QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7236 | struct nan_datapath_indication_event *ind) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7237 | { |
| 7238 | if (wmi_handle->ops->extract_ndp_ind) |
| 7239 | return wmi_handle->ops->extract_ndp_ind(wmi_handle, |
| 7240 | data, ind); |
| 7241 | |
| 7242 | return QDF_STATUS_E_FAILURE; |
| 7243 | } |
| 7244 | |
| 7245 | QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7246 | struct nan_datapath_confirm_event *ev) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7247 | { |
| 7248 | if (wmi_handle->ops->extract_ndp_confirm) |
| 7249 | return wmi_handle->ops->extract_ndp_confirm(wmi_handle, |
| 7250 | data, ev); |
| 7251 | |
| 7252 | return QDF_STATUS_E_FAILURE; |
| 7253 | } |
| 7254 | |
| 7255 | QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7256 | uint8_t *data, struct nan_datapath_responder_rsp *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7257 | { |
| 7258 | if (wmi_handle->ops->extract_ndp_responder_rsp) |
| 7259 | return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle, |
| 7260 | data, rsp); |
| 7261 | |
| 7262 | return QDF_STATUS_E_FAILURE; |
| 7263 | } |
| 7264 | |
| 7265 | QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7266 | struct nan_datapath_end_rsp_event *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7267 | { |
| 7268 | if (wmi_handle->ops->extract_ndp_end_rsp) |
| 7269 | return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle, |
| 7270 | data, rsp); |
| 7271 | |
| 7272 | return QDF_STATUS_E_FAILURE; |
| 7273 | } |
| 7274 | |
| 7275 | QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data, |
| 7276 | struct nan_datapath_end_indication_event **ind) |
| 7277 | { |
| 7278 | if (wmi_handle->ops->extract_ndp_end_ind) |
| 7279 | return wmi_handle->ops->extract_ndp_end_ind(wmi_handle, |
| 7280 | data, ind); |
| 7281 | |
| 7282 | return QDF_STATUS_E_FAILURE; |
| 7283 | } |
Naveen Rawat | d42ce38 | 2018-01-09 17:54:41 -0800 | [diff] [blame] | 7284 | |
| 7285 | QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data, |
| 7286 | struct nan_datapath_sch_update_event *ind) |
| 7287 | { |
| 7288 | if (wmi_handle->ops->extract_ndp_sch_update) |
| 7289 | return wmi_handle->ops->extract_ndp_sch_update(wmi_handle, |
| 7290 | data, ind); |
| 7291 | |
| 7292 | return QDF_STATUS_E_FAILURE; |
| 7293 | } |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7294 | #endif |
yeshwanth sriram guntuka | 07a15b8 | 2017-09-01 17:56:07 +0530 | [diff] [blame] | 7295 | QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, |
| 7296 | struct wmi_btm_config *params) |
| 7297 | { |
| 7298 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7299 | |
| 7300 | if (wmi_handle->ops->send_btm_config) |
| 7301 | return wmi_handle->ops->send_btm_config(wmi_handle, |
| 7302 | params); |
| 7303 | |
| 7304 | return QDF_STATUS_E_FAILURE; |
| 7305 | } |
Arif Hussain | c5bfe07 | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 7306 | |
| 7307 | QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, |
| 7308 | struct wmi_obss_detection_cfg_param *obss_cfg_param) |
| 7309 | { |
| 7310 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7311 | |
| 7312 | if (wmi_handle->ops->send_obss_detection_cfg_cmd) |
| 7313 | return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle, |
| 7314 | obss_cfg_param); |
| 7315 | |
| 7316 | return QDF_STATUS_E_FAILURE; |
| 7317 | } |
Arif Hussain | 33d9850 | 2018-01-12 13:15:04 -0800 | [diff] [blame] | 7318 | |
| 7319 | QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, |
| 7320 | uint8_t *data, |
| 7321 | struct wmi_obss_detect_info |
| 7322 | *info) |
| 7323 | { |
| 7324 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7325 | |
| 7326 | if (wmi_handle->ops->extract_obss_detection_info) |
| 7327 | return wmi_handle->ops->extract_obss_detection_info(data, info); |
| 7328 | |
| 7329 | return QDF_STATUS_E_FAILURE; |
| 7330 | } |
Vignesh Viswanathan | 7f05777 | 2018-01-18 19:06:40 +0530 | [diff] [blame] | 7331 | |
| 7332 | QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, |
| 7333 | struct wmi_11k_offload_params *params) |
| 7334 | { |
| 7335 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7336 | |
| 7337 | if (wmi_handle->ops->send_offload_11k_cmd) |
| 7338 | return wmi_handle->ops->send_offload_11k_cmd( |
| 7339 | wmi_handle, params); |
| 7340 | |
| 7341 | return QDF_STATUS_E_FAILURE; |
| 7342 | } |
| 7343 | |
| 7344 | QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, |
| 7345 | struct wmi_invoke_neighbor_report_params *params) |
| 7346 | { |
| 7347 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7348 | |
| 7349 | if (wmi_handle->ops->send_invoke_neighbor_report_cmd) |
| 7350 | return wmi_handle->ops->send_invoke_neighbor_report_cmd( |
| 7351 | wmi_handle, params); |
| 7352 | |
| 7353 | return QDF_STATUS_E_FAILURE; |
| 7354 | } |
Himanshu Agarwal | 157e478 | 2018-01-24 22:24:17 +0530 | [diff] [blame] | 7355 | |
| 7356 | #ifdef WLAN_SUPPORT_GREEN_AP |
| 7357 | QDF_STATUS wmi_extract_green_ap_egap_status_info( |
| 7358 | void *wmi_hdl, uint8_t *evt_buf, |
| 7359 | struct wlan_green_ap_egap_status_info *egap_status_info_params) |
| 7360 | { |
| 7361 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7362 | |
| 7363 | if (wmi_handle->ops->extract_green_ap_egap_status_info) |
| 7364 | return wmi_handle->ops->extract_green_ap_egap_status_info( |
| 7365 | evt_buf, egap_status_info_params); |
| 7366 | |
| 7367 | return QDF_STATUS_E_FAILURE; |
| 7368 | } |
| 7369 | #endif |
Arif Hussain | ec5cd3c | 2018-01-22 01:19:36 -0800 | [diff] [blame] | 7370 | |
| 7371 | QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, |
| 7372 | uint32_t vdev_id, |
| 7373 | bool enable) |
| 7374 | { |
| 7375 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7376 | |
| 7377 | if (wmi_handle->ops->send_bss_color_change_enable_cmd) |
| 7378 | return wmi_handle->ops->send_bss_color_change_enable_cmd( |
| 7379 | wmi_handle, vdev_id, enable); |
| 7380 | |
| 7381 | return QDF_STATUS_E_FAILURE; |
| 7382 | } |
| 7383 | |
| 7384 | QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, |
| 7385 | struct wmi_obss_color_collision_cfg_param *cfg) |
| 7386 | { |
| 7387 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7388 | |
| 7389 | if (wmi_handle->ops->send_obss_color_collision_cfg_cmd) |
| 7390 | return wmi_handle->ops->send_obss_color_collision_cfg_cmd( |
| 7391 | wmi_handle, cfg); |
| 7392 | |
| 7393 | return QDF_STATUS_E_FAILURE; |
| 7394 | } |
| 7395 | |
| 7396 | QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, |
| 7397 | uint8_t *data, struct wmi_obss_color_collision_info *info) |
| 7398 | { |
| 7399 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7400 | |
| 7401 | if (wmi_handle->ops->extract_obss_color_collision_info) |
| 7402 | return wmi_handle->ops->extract_obss_color_collision_info(data, |
| 7403 | info); |
| 7404 | |
| 7405 | return QDF_STATUS_E_FAILURE; |
| 7406 | } |
Naveen Rawat | 2630545 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 7407 | |
| 7408 | wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, |
| 7409 | WMI_HOST_WLAN_PHY_MODE phymode) |
| 7410 | { |
| 7411 | /* |
| 7412 | * this API does translation between host only strcutres, hence |
| 7413 | * does not need separate TLV, non-TLV definitions |
| 7414 | */ |
| 7415 | |
| 7416 | if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX) |
| 7417 | return mode_to_width[phymode]; |
| 7418 | else |
| 7419 | return WMI_HOST_CHAN_WIDTH_20; |
| 7420 | } |
Naveen Rawat | 963ee94 | 2018-04-13 16:38:36 -0700 | [diff] [blame] | 7421 | |
| 7422 | #ifdef QCA_SUPPORT_CP_STATS |
| 7423 | QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, |
| 7424 | struct wmi_host_congestion_stats *stats) |
| 7425 | { |
| 7426 | if (wmi_handle->ops->extract_cca_stats) |
| 7427 | return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf, |
| 7428 | stats); |
| 7429 | |
| 7430 | return QDF_STATUS_E_FAILURE; |
| 7431 | } |
| 7432 | #endif /* QCA_SUPPORT_CP_STATS */ |
Shashikala Prabhu | 5f65ac7 | 2018-05-16 10:08:09 +0530 | [diff] [blame] | 7433 | |
| 7434 | #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) |
| 7435 | QDF_STATUS |
| 7436 | wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, |
| 7437 | struct dfs_radar_found_params *params) |
| 7438 | { |
| 7439 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7440 | |
| 7441 | if (wmi_handle->ops->send_dfs_average_radar_params_cmd) |
| 7442 | return wmi_handle->ops->send_dfs_average_radar_params_cmd( |
| 7443 | wmi_handle, params); |
| 7444 | |
| 7445 | return QDF_STATUS_E_FAILURE; |
| 7446 | } |
| 7447 | |
| 7448 | QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, |
| 7449 | uint32_t *dfs_status_check) |
| 7450 | { |
| 7451 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7452 | |
| 7453 | if (wmi_handle->ops->extract_dfs_status_from_fw) |
| 7454 | return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle, |
| 7455 | evt_buf, dfs_status_check); |
| 7456 | |
| 7457 | return QDF_STATUS_E_FAILURE; |
| 7458 | } |
| 7459 | #endif |
c_cgodav | 758d99f | 2017-02-13 10:14:42 +0530 | [diff] [blame] | 7460 | |
| 7461 | #ifdef OL_ATH_SMART_LOGGING |
| 7462 | QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl, |
| 7463 | uint32_t param) |
| 7464 | { |
| 7465 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7466 | |
| 7467 | if (wmi_handle->ops->send_smart_logging_enable_cmd) |
| 7468 | return wmi_handle->ops->send_smart_logging_enable_cmd( |
| 7469 | wmi_handle, |
| 7470 | param); |
| 7471 | |
| 7472 | return QDF_STATUS_E_FAILURE; |
| 7473 | } |
| 7474 | |
| 7475 | QDF_STATUS |
| 7476 | wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl, |
| 7477 | struct wmi_debug_fatal_events *param) |
| 7478 | { |
| 7479 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7480 | |
| 7481 | if (wmi_handle->ops->send_smart_logging_fatal_cmd) |
| 7482 | return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle, |
| 7483 | param); |
| 7484 | |
| 7485 | return QDF_STATUS_E_FAILURE; |
| 7486 | } |
| 7487 | |
| 7488 | QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl, |
| 7489 | void *evt_buf, |
| 7490 | struct wmi_debug_fatal_events *ev) |
| 7491 | { |
| 7492 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 7493 | |
| 7494 | if (wmi->ops->extract_smartlog_event) |
| 7495 | return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev); |
| 7496 | |
| 7497 | return QDF_STATUS_E_FAILURE; |
| 7498 | } |
| 7499 | #endif /* OL_ATH_SMART_LOGGING */ |
Rajeev Kumar Sirasanagandla | d2d1a5e | 2018-03-02 21:12:16 +0530 | [diff] [blame] | 7500 | |
| 7501 | QDF_STATUS |
| 7502 | wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl, |
| 7503 | struct wmi_roam_scan_stats_req *params) |
| 7504 | { |
| 7505 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7506 | |
| 7507 | if (wmi_handle->ops->send_roam_scan_stats_cmd) |
| 7508 | return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle, |
| 7509 | params); |
| 7510 | |
| 7511 | return QDF_STATUS_E_FAILURE; |
| 7512 | } |
| 7513 | |
| 7514 | QDF_STATUS |
| 7515 | wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, |
| 7516 | uint32_t *vdev_id, |
| 7517 | struct wmi_roam_scan_stats_res **res_param) |
| 7518 | { |
| 7519 | if (wmi->ops->extract_roam_scan_stats_res_evt) |
| 7520 | return wmi->ops->extract_roam_scan_stats_res_evt(wmi, |
| 7521 | evt_buf, |
| 7522 | vdev_id, res_param); |
| 7523 | |
| 7524 | return QDF_STATUS_E_FAILURE; |
| 7525 | } |
Pratik Gandhi | 3fd97d6 | 2018-09-17 16:47:12 +0530 | [diff] [blame] | 7526 | |
| 7527 | #ifdef OBSS_PD |
| 7528 | QDF_STATUS |
| 7529 | wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_hdl, |
| 7530 | struct wmi_host_obss_spatial_reuse_set_param |
| 7531 | *obss_spatial_reuse_param) |
| 7532 | { |
| 7533 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 7534 | |
| 7535 | if (wmi->ops->send_obss_spatial_reuse_set) |
| 7536 | return wmi->ops->send_obss_spatial_reuse_set(wmi, |
| 7537 | obss_spatial_reuse_param); |
| 7538 | |
| 7539 | return QDF_STATUS_E_FAILURE; |
| 7540 | } |
| 7541 | #endif |
Shashikala Prabhu | b91325c | 2018-09-24 13:54:23 +0530 | [diff] [blame^] | 7542 | |
| 7543 | QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl, |
| 7544 | uint32_t host_pdev_id, |
| 7545 | uint32_t *target_pdev_id) |
| 7546 | { |
| 7547 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7548 | |
| 7549 | if (wmi_handle->ops->convert_pdev_id_host_to_target) { |
| 7550 | *target_pdev_id = |
| 7551 | wmi_handle->ops->convert_pdev_id_host_to_target( |
| 7552 | host_pdev_id); |
| 7553 | return QDF_STATUS_SUCCESS; |
| 7554 | } |
| 7555 | |
| 7556 | return QDF_STATUS_E_FAILURE; |
| 7557 | } |