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 | |
| 1730 | if (wmi_handle->ops->send_ipa_offload_control_cmd) |
| 1731 | return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle, |
| 1732 | ipa_offload); |
| 1733 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1734 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1735 | } |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1736 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1737 | |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1738 | |
| 1739 | /** |
| 1740 | * wmi_unified_plm_stop_cmd() - plm stop request |
| 1741 | * @wmi_hdl: wmi handle |
| 1742 | * @plm: plm request parameters |
| 1743 | * |
| 1744 | * This function request FW to stop PLM. |
| 1745 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1746 | * 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] | 1747 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1748 | QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1749 | const struct plm_req_params *plm) |
| 1750 | { |
| 1751 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1752 | |
| 1753 | if (wmi_handle->ops->send_plm_stop_cmd) |
| 1754 | return wmi_handle->ops->send_plm_stop_cmd(wmi_handle, |
| 1755 | plm); |
| 1756 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1757 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1758 | } |
| 1759 | |
| 1760 | /** |
| 1761 | * wmi_unified_plm_start_cmd() - plm start request |
| 1762 | * @wmi_hdl: wmi handle |
| 1763 | * @plm: plm request parameters |
| 1764 | * |
| 1765 | * This function request FW to start PLM. |
| 1766 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1767 | * 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] | 1768 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1769 | QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1770 | const struct plm_req_params *plm, |
| 1771 | uint32_t *gchannel_list) |
| 1772 | { |
| 1773 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1774 | |
| 1775 | if (wmi_handle->ops->send_plm_start_cmd) |
| 1776 | return wmi_handle->ops->send_plm_start_cmd(wmi_handle, |
| 1777 | plm, gchannel_list); |
| 1778 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1779 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1780 | } |
| 1781 | |
| 1782 | /** |
| 1783 | * send_pno_stop_cmd() - PNO stop request |
| 1784 | * @wmi_hdl: wmi handle |
| 1785 | * @vdev_id: vdev id |
| 1786 | * |
| 1787 | * This function request FW to stop ongoing PNO operation. |
| 1788 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1789 | * 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] | 1790 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1791 | 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] | 1792 | { |
| 1793 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1794 | |
| 1795 | if (wmi_handle->ops->send_pno_stop_cmd) |
| 1796 | return wmi_handle->ops->send_pno_stop_cmd(wmi_handle, |
| 1797 | vdev_id); |
| 1798 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1799 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1800 | } |
| 1801 | |
| 1802 | /** |
| 1803 | * wmi_unified_pno_start_cmd() - PNO start request |
| 1804 | * @wmi_hdl: wmi handle |
| 1805 | * @pno: PNO request |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1806 | * |
| 1807 | * This function request FW to start PNO request. |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1808 | * 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] | 1809 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1810 | #ifdef FEATURE_WLAN_SCAN_PNO |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1811 | QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1812 | struct pno_scan_req_params *pno) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1813 | { |
| 1814 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1815 | |
| 1816 | if (wmi_handle->ops->send_pno_start_cmd) |
| 1817 | return wmi_handle->ops->send_pno_start_cmd(wmi_handle, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1818 | pno); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1819 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1820 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1821 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1822 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1823 | |
Varun Reddy Yeturu | eac038b | 2017-07-24 16:11:22 -0700 | [diff] [blame] | 1824 | /** |
| 1825 | * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration |
| 1826 | * @wmi_hdl: wmi handle |
| 1827 | * @params: Configuration parameters |
| 1828 | * |
| 1829 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1830 | */ |
| 1831 | QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, |
| 1832 | struct nlo_mawc_params *params) |
| 1833 | { |
| 1834 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1835 | |
| 1836 | if (wmi_handle->ops->send_nlo_mawc_cmd) |
| 1837 | return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params); |
| 1838 | |
| 1839 | return QDF_STATUS_E_FAILURE; |
| 1840 | } |
| 1841 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1842 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1843 | /** |
| 1844 | * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats |
| 1845 | * @wmi_hdl: wmi handle |
| 1846 | * @clear_req: ll stats clear request command params |
| 1847 | * @addr: mac address |
| 1848 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1849 | * 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] | 1850 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1851 | QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1852 | const struct ll_stats_clear_params *clear_req, |
| 1853 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1854 | { |
| 1855 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1856 | |
| 1857 | if (wmi_handle->ops->send_process_ll_stats_clear_cmd) |
| 1858 | return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle, |
| 1859 | clear_req, addr); |
| 1860 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1861 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1862 | } |
| 1863 | |
| 1864 | /** |
| 1865 | * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request |
| 1866 | * @wmi_hdl:wmi handle |
| 1867 | * @get_req:ll stats get request command params |
| 1868 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1869 | * 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] | 1870 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1871 | QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1872 | const struct ll_stats_get_params *get_req, |
| 1873 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1874 | { |
| 1875 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1876 | |
| 1877 | if (wmi_handle->ops->send_process_ll_stats_get_cmd) |
| 1878 | return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle, |
| 1879 | get_req, addr); |
| 1880 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1881 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1882 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1883 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1884 | |
| 1885 | /** |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1886 | * wmi_unified_congestion_request_cmd() - send request to fw to get CCA |
| 1887 | * @wmi_hdl: wma handle |
| 1888 | * @vdev_id: vdev id |
| 1889 | * |
| 1890 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1891 | */ |
| 1892 | QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, |
| 1893 | uint8_t vdev_id) |
| 1894 | { |
| 1895 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1896 | |
| 1897 | if (wmi_handle->ops->send_congestion_cmd) |
| 1898 | return wmi_handle->ops->send_congestion_cmd(wmi_handle, |
| 1899 | vdev_id); |
| 1900 | |
| 1901 | return QDF_STATUS_E_FAILURE; |
| 1902 | } |
| 1903 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1904 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1905 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1906 | * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request |
| 1907 | * @wmi_handle: wmi handle |
| 1908 | * @set_req: ll stats set request command params |
| 1909 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1910 | * 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] | 1911 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1912 | QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1913 | const struct ll_stats_set_params *set_req) |
| 1914 | { |
| 1915 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1916 | |
| 1917 | if (wmi_handle->ops->send_process_ll_stats_set_cmd) |
| 1918 | return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle, |
| 1919 | set_req); |
| 1920 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1921 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1922 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1923 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1924 | |
| 1925 | /** |
| 1926 | * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats |
| 1927 | * @wmi_handle: wmi handle |
| 1928 | * @rssi_req: get RSSI request |
| 1929 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1930 | * 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] | 1931 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1932 | QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1933 | { |
| 1934 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1935 | |
| 1936 | if (wmi_handle->ops->send_snr_request_cmd) |
| 1937 | return wmi_handle->ops->send_snr_request_cmd(wmi_handle); |
| 1938 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1939 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1940 | } |
| 1941 | |
| 1942 | /** |
| 1943 | * wmi_unified_snr_cmd() - get RSSI from fw |
| 1944 | * @wmi_handle: wmi handle |
| 1945 | * @vdev_id: vdev id |
| 1946 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1947 | * 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] | 1948 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1949 | 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] | 1950 | { |
| 1951 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1952 | |
| 1953 | if (wmi_handle->ops->send_snr_cmd) |
| 1954 | return wmi_handle->ops->send_snr_cmd(wmi_handle, |
| 1955 | vdev_id); |
| 1956 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1957 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1958 | } |
| 1959 | |
| 1960 | /** |
| 1961 | * wmi_unified_link_status_req_cmd() - process link status request from UMAC |
| 1962 | * @wmi_handle: wmi handle |
| 1963 | * @link_status: get link params |
| 1964 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1965 | * 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] | 1966 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1967 | QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1968 | struct link_status_params *link_status) |
| 1969 | { |
| 1970 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1971 | |
| 1972 | if (wmi_handle->ops->send_link_status_req_cmd) |
| 1973 | return wmi_handle->ops->send_link_status_req_cmd(wmi_handle, |
| 1974 | link_status); |
| 1975 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1976 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1977 | } |
| 1978 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1979 | /** |
| 1980 | * wmi_unified_process_dhcp_ind() - process dhcp indication from SME |
| 1981 | * @wmi_handle: wmi handle |
| 1982 | * @ta_dhcp_ind: DHCP indication parameter |
| 1983 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1984 | * 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] | 1985 | */ |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1986 | #ifdef CONFIG_MCL |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1987 | QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1988 | wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind) |
| 1989 | { |
| 1990 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1991 | |
| 1992 | if (wmi_handle->ops->send_process_dhcp_ind_cmd) |
| 1993 | return wmi_handle->ops->send_process_dhcp_ind_cmd(wmi_handle, |
| 1994 | ta_dhcp_ind); |
| 1995 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1996 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1997 | } |
| 1998 | |
| 1999 | /** |
| 2000 | * wmi_unified_get_link_speed_cmd() -send command to get linkspeed |
| 2001 | * @wmi_handle: wmi handle |
| 2002 | * @pLinkSpeed: link speed info |
| 2003 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2004 | * 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] | 2005 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2006 | QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2007 | wmi_mac_addr peer_macaddr) |
| 2008 | { |
| 2009 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2010 | |
| 2011 | if (wmi_handle->ops->send_get_link_speed_cmd) |
| 2012 | return wmi_handle->ops->send_get_link_speed_cmd(wmi_handle, |
| 2013 | peer_macaddr); |
| 2014 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2015 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2016 | } |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2017 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2018 | |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2019 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2020 | /** |
| 2021 | * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params |
| 2022 | * @wmi_handle: wmi handler |
| 2023 | * @egap_params: pointer to egap_params |
| 2024 | * |
| 2025 | * Return: 0 for success, otherwise appropriate error code |
| 2026 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2027 | QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 2028 | struct wlan_green_ap_egap_params *egap_params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2029 | { |
| 2030 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2031 | |
| 2032 | if (wmi_handle->ops->send_egap_conf_params_cmd) |
| 2033 | return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle, |
| 2034 | egap_params); |
| 2035 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2036 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2037 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2038 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2039 | |
| 2040 | /** |
| 2041 | * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW |
| 2042 | * @wmi_handl: wmi handle |
| 2043 | * @cmd: Profiling command index |
| 2044 | * @value1: parameter1 value |
| 2045 | * @value2: parameter2 value |
| 2046 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2047 | * 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] | 2048 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2049 | QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2050 | uint32_t cmd, uint32_t value1, uint32_t value2) |
| 2051 | { |
| 2052 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2053 | |
| 2054 | if (wmi_handle->ops->send_fw_profiling_cmd) |
| 2055 | return wmi_handle->ops->send_fw_profiling_cmd(wmi_handle, |
| 2056 | cmd, value1, value2); |
| 2057 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2058 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2059 | } |
| 2060 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2061 | /** |
Naveen Rawat | a5817e7 | 2017-10-26 18:50:19 -0700 | [diff] [blame] | 2062 | * wmi_unified_wow_timer_pattern_cmd() - set timer pattern tlv, so that firmware |
| 2063 | * will wake up host after specified time is elapsed |
| 2064 | * @wmi_handle: wmi handle |
| 2065 | * @vdev_id: vdev id |
| 2066 | * @cookie: value to identify reason why host set up wake call. |
| 2067 | * @time: time in ms |
| 2068 | * |
| 2069 | * Return: QDF status |
| 2070 | */ |
| 2071 | QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id, |
| 2072 | uint32_t cookie, uint32_t time) |
| 2073 | { |
| 2074 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2075 | |
| 2076 | if (wmi_handle->ops->send_wow_timer_pattern_cmd) |
| 2077 | return wmi_handle->ops->send_wow_timer_pattern_cmd(wmi_handle, |
| 2078 | vdev_id, cookie, time); |
| 2079 | |
| 2080 | return QDF_STATUS_E_FAILURE; |
| 2081 | } |
| 2082 | |
| 2083 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2084 | * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter |
| 2085 | * @wmi_handle: wmi handle |
| 2086 | * @vdev_id: vdev id |
| 2087 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2088 | * 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] | 2089 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2090 | 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] | 2091 | { |
| 2092 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2093 | |
| 2094 | if (wmi_handle->ops->send_nat_keepalive_en_cmd) |
| 2095 | return wmi_handle->ops->send_nat_keepalive_en_cmd(wmi_handle, |
| 2096 | vdev_id); |
| 2097 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2098 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2099 | } |
| 2100 | |
Paul Zhang | 92ab8d3 | 2017-12-08 16:08:00 +0800 | [diff] [blame] | 2101 | QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl, |
| 2102 | struct wlm_latency_level_param *param) |
| 2103 | { |
| 2104 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2105 | |
| 2106 | if (wmi_handle->ops->send_wlm_latency_level_cmd) |
| 2107 | return wmi_handle->ops->send_wlm_latency_level_cmd(wmi_handle, |
| 2108 | param); |
| 2109 | |
| 2110 | return QDF_STATUS_E_FAILURE; |
| 2111 | } |
| 2112 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2113 | /** |
| 2114 | * wmi_unified_csa_offload_enable() - send CSA offload enable command |
| 2115 | * @wmi_hdl: wmi handle |
| 2116 | * @vdev_id: vdev id |
| 2117 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2118 | * 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] | 2119 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2120 | 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] | 2121 | { |
| 2122 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2123 | |
| 2124 | if (wmi_handle->ops->send_csa_offload_enable_cmd) |
| 2125 | return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle, |
| 2126 | vdev_id); |
| 2127 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2128 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2129 | } |
Naveen Rawat | 42cd1e6 | 2017-05-13 15:56:57 -0700 | [diff] [blame] | 2130 | |
| 2131 | #ifdef WLAN_FEATURE_CIF_CFR |
| 2132 | QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, |
| 2133 | wmi_oem_dma_ring_cfg_req_fixed_param *cfg) |
| 2134 | { |
| 2135 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2136 | |
| 2137 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 2138 | return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg); |
| 2139 | |
| 2140 | return QDF_STATUS_E_FAILURE; |
| 2141 | } |
| 2142 | #endif |
| 2143 | |
Sathish Kumar | f396c72 | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 2144 | QDF_STATUS wmi_unified_dbr_ring_cfg(void *wmi_hdl, |
| 2145 | struct direct_buf_rx_cfg_req *cfg) |
| 2146 | { |
| 2147 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2148 | |
| 2149 | if (wmi_handle->ops->send_dbr_cfg_cmd) |
| 2150 | return wmi_handle->ops->send_dbr_cfg_cmd(wmi_handle, cfg); |
| 2151 | |
| 2152 | return QDF_STATUS_E_FAILURE; |
| 2153 | } |
| 2154 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2155 | /** |
| 2156 | * wmi_unified_start_oem_data_cmd() - start OEM data request to target |
| 2157 | * @wmi_handle: wmi handle |
| 2158 | * @startOemDataReq: start request params |
| 2159 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2160 | * 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] | 2161 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2162 | QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, |
Krishna Kumaar Natarajan | b16bb27 | 2016-07-21 15:02:44 -0700 | [diff] [blame] | 2163 | uint32_t data_len, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2164 | uint8_t *data) |
| 2165 | { |
| 2166 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2167 | |
| 2168 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 2169 | return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle, |
| 2170 | data_len, data); |
| 2171 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2172 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2173 | } |
| 2174 | |
| 2175 | /** |
| 2176 | * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter |
| 2177 | * @wmi_handle: wmi handle |
| 2178 | * @dfs_phyerr_filter_offload: is dfs phyerr filter offload |
| 2179 | * |
| 2180 | * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or |
| 2181 | * WMI_DFS_PHYERR_FILTER_DIS_CMDID command |
| 2182 | * to firmware based on phyerr filtering |
| 2183 | * offload status. |
| 2184 | * |
| 2185 | * Return: 1 success, 0 failure |
| 2186 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2187 | QDF_STATUS |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2188 | wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, |
| 2189 | bool dfs_phyerr_filter_offload) |
| 2190 | { |
| 2191 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2192 | |
| 2193 | if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd) |
| 2194 | return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle, |
| 2195 | dfs_phyerr_filter_offload); |
| 2196 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2197 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2198 | } |
| 2199 | |
| 2200 | #if !defined(REMOVE_PKT_LOG) |
| 2201 | /** |
| 2202 | * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target |
| 2203 | * @wmi_handle: wmi handle |
| 2204 | * @pktlog_event: pktlog event |
| 2205 | * @cmd_id: pktlog cmd id |
| 2206 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2207 | * 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] | 2208 | */ |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 2209 | #ifdef CONFIG_MCL |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2210 | QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2211 | WMI_PKTLOG_EVENT pktlog_event, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 2212 | uint32_t cmd_id, |
| 2213 | uint8_t user_triggered) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2214 | { |
| 2215 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2216 | |
| 2217 | if (wmi_handle->ops->send_pktlog_wmi_send_cmd) |
| 2218 | return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 2219 | pktlog_event, cmd_id, user_triggered); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2220 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2221 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2222 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2223 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2224 | #endif /* REMOVE_PKT_LOG */ |
| 2225 | |
| 2226 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2227 | * wmi_unified_wow_delete_pattern_cmd() - delete wow pattern in target |
| 2228 | * @wmi_handle: wmi handle |
| 2229 | * @ptrn_id: pattern id |
| 2230 | * @vdev_id: vdev id |
| 2231 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2232 | * 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] | 2233 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2234 | 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] | 2235 | uint8_t vdev_id) |
| 2236 | { |
| 2237 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2238 | |
| 2239 | if (wmi_handle->ops->send_wow_delete_pattern_cmd) |
| 2240 | return wmi_handle->ops->send_wow_delete_pattern_cmd(wmi_handle, |
| 2241 | ptrn_id, vdev_id); |
| 2242 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2243 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2244 | } |
| 2245 | |
| 2246 | /** |
| 2247 | * wmi_unified_host_wakeup_ind_to_fw_cmd() - send wakeup ind to fw |
| 2248 | * @wmi_handle: wmi handle |
| 2249 | * |
| 2250 | * Sends host wakeup indication to FW. On receiving this indication, |
| 2251 | * FW will come out of WOW. |
| 2252 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2253 | * 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] | 2254 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2255 | 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] | 2256 | { |
| 2257 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2258 | |
| 2259 | if (wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd) |
| 2260 | return wmi_handle->ops->send_host_wakeup_ind_to_fw_cmd(wmi_handle); |
| 2261 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2262 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2263 | } |
| 2264 | |
| 2265 | /** |
| 2266 | * wmi_unified_del_ts_cmd() - send DELTS request to fw |
| 2267 | * @wmi_handle: wmi handle |
| 2268 | * @msg: delts params |
| 2269 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2270 | * 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] | 2271 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2272 | 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] | 2273 | uint8_t ac) |
| 2274 | { |
| 2275 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2276 | |
| 2277 | if (wmi_handle->ops->send_del_ts_cmd) |
| 2278 | return wmi_handle->ops->send_del_ts_cmd(wmi_handle, |
| 2279 | vdev_id, ac); |
| 2280 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2281 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2282 | } |
| 2283 | |
| 2284 | /** |
| 2285 | * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw |
| 2286 | * @wmi_handle: handle to wmi |
| 2287 | * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests. |
| 2288 | * |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2289 | * A function to handle WMI_AGGR_QOS_REQ. This will send out |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2290 | * ADD_TS requestes to firmware in loop for all the ACs with |
| 2291 | * active flow. |
| 2292 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2293 | * 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] | 2294 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2295 | QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2296 | struct aggr_add_ts_param *aggr_qos_rsp_msg) |
| 2297 | { |
| 2298 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2299 | |
| 2300 | if (wmi_handle->ops->send_aggr_qos_cmd) |
| 2301 | return wmi_handle->ops->send_aggr_qos_cmd(wmi_handle, |
| 2302 | aggr_qos_rsp_msg); |
| 2303 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2304 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2305 | } |
| 2306 | |
| 2307 | /** |
| 2308 | * wmi_unified_add_ts_cmd() - send ADDTS request to fw |
| 2309 | * @wmi_handle: wmi handle |
| 2310 | * @msg: ADDTS params |
| 2311 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2312 | * 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] | 2313 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2314 | QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2315 | struct add_ts_param *msg) |
| 2316 | { |
| 2317 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2318 | |
| 2319 | if (wmi_handle->ops->send_add_ts_cmd) |
| 2320 | return wmi_handle->ops->send_add_ts_cmd(wmi_handle, |
| 2321 | msg); |
| 2322 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2323 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2324 | } |
| 2325 | |
| 2326 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2327 | * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn |
| 2328 | * @wmi_handle: wmi handle |
| 2329 | * @pAddPeriodicTxPtrnParams: tx ptrn params |
| 2330 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2331 | * 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] | 2332 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2333 | 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] | 2334 | struct periodic_tx_pattern * |
| 2335 | pAddPeriodicTxPtrnParams, |
| 2336 | uint8_t vdev_id) |
| 2337 | { |
| 2338 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2339 | |
| 2340 | if (wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd) |
| 2341 | return wmi_handle->ops->send_process_add_periodic_tx_ptrn_cmd(wmi_handle, |
| 2342 | pAddPeriodicTxPtrnParams, |
| 2343 | vdev_id); |
| 2344 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2345 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2346 | } |
| 2347 | |
| 2348 | /** |
| 2349 | * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn |
| 2350 | * @wmi_handle: wmi handle |
| 2351 | * @vdev_id: vdev id |
| 2352 | * @pattern_id: pattern id |
| 2353 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2354 | * 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] | 2355 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2356 | 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] | 2357 | uint8_t vdev_id, |
| 2358 | uint8_t pattern_id) |
| 2359 | { |
| 2360 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2361 | |
| 2362 | if (wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd) |
| 2363 | return wmi_handle->ops->send_process_del_periodic_tx_ptrn_cmd(wmi_handle, |
| 2364 | vdev_id, |
| 2365 | pattern_id); |
| 2366 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2367 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2368 | } |
| 2369 | |
| 2370 | /** |
| 2371 | * wmi_unified_stats_ext_req_cmd() - request ext stats from fw |
| 2372 | * @wmi_handle: wmi handle |
| 2373 | * @preq: stats ext params |
| 2374 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2375 | * 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] | 2376 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2377 | QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2378 | struct stats_ext_params *preq) |
| 2379 | { |
| 2380 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2381 | |
| 2382 | if (wmi_handle->ops->send_stats_ext_req_cmd) |
| 2383 | return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle, |
| 2384 | preq); |
| 2385 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2386 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2387 | } |
| 2388 | |
| 2389 | /** |
| 2390 | * wmi_unified_enable_ext_wow_cmd() - enable ext wow in fw |
| 2391 | * @wmi_handle: wmi handle |
| 2392 | * @params: ext wow params |
| 2393 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2394 | * 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] | 2395 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2396 | QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2397 | struct ext_wow_params *params) |
| 2398 | { |
| 2399 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2400 | |
| 2401 | if (wmi_handle->ops->send_enable_ext_wow_cmd) |
| 2402 | return wmi_handle->ops->send_enable_ext_wow_cmd(wmi_handle, |
| 2403 | params); |
| 2404 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2405 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2406 | } |
| 2407 | |
| 2408 | /** |
| 2409 | * wmi_unified_set_app_type2_params_in_fw_cmd() - set app type2 params in fw |
| 2410 | * @wmi_handle: wmi handle |
| 2411 | * @appType2Params: app type2 params |
| 2412 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2413 | * 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] | 2414 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2415 | 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] | 2416 | struct app_type2_params *appType2Params) |
| 2417 | { |
| 2418 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2419 | |
| 2420 | if (wmi_handle->ops->send_set_app_type2_params_in_fw_cmd) |
| 2421 | return wmi_handle->ops->send_set_app_type2_params_in_fw_cmd(wmi_handle, |
| 2422 | appType2Params); |
| 2423 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2424 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2425 | |
| 2426 | } |
| 2427 | |
| 2428 | /** |
| 2429 | * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown timer in firmware |
| 2430 | * @wmi_handle: wmi handle |
| 2431 | * @timer_val: auto shutdown timer value |
| 2432 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2433 | * 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] | 2434 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2435 | QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2436 | uint32_t timer_val) |
| 2437 | { |
| 2438 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2439 | |
| 2440 | if (wmi_handle->ops->send_set_auto_shutdown_timer_cmd) |
| 2441 | return wmi_handle->ops->send_set_auto_shutdown_timer_cmd(wmi_handle, |
| 2442 | timer_val); |
| 2443 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2444 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2445 | } |
| 2446 | |
| 2447 | /** |
| 2448 | * wmi_unified_nan_req_cmd() - to send nan request to target |
| 2449 | * @wmi_handle: wmi handle |
| 2450 | * @nan_req: request data which will be non-null |
| 2451 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2452 | * 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] | 2453 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2454 | QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2455 | struct nan_req_params *nan_req) |
| 2456 | { |
| 2457 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2458 | |
| 2459 | if (wmi_handle->ops->send_nan_req_cmd) |
| 2460 | return wmi_handle->ops->send_nan_req_cmd(wmi_handle, |
| 2461 | nan_req); |
| 2462 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2463 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2464 | } |
| 2465 | |
| 2466 | /** |
| 2467 | * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload |
| 2468 | * @wmi_handle: wmi handle |
| 2469 | * @pDhcpSrvOffloadInfo: DHCP server offload info |
| 2470 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2471 | * 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] | 2472 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2473 | QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 2474 | struct dhcp_offload_info_params *params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2475 | { |
| 2476 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2477 | |
| 2478 | if (wmi_handle->ops->send_process_dhcpserver_offload_cmd) |
| 2479 | return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 2480 | params); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2481 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2482 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2483 | } |
| 2484 | |
| 2485 | /** |
| 2486 | * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid update request |
| 2487 | * @wmi_handle: wmi handle |
| 2488 | * @ch_avoid_update_req: channel avoid update params |
| 2489 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2490 | * 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] | 2491 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2492 | QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2493 | { |
| 2494 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2495 | |
| 2496 | if (wmi_handle->ops->send_process_ch_avoid_update_cmd) |
| 2497 | return wmi_handle->ops->send_process_ch_avoid_update_cmd(wmi_handle); |
| 2498 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2499 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2500 | } |
| 2501 | |
| 2502 | /** |
| 2503 | * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw |
| 2504 | * @wmi_handle: wmi handle |
| 2505 | * @reg_dmn: reg domain |
| 2506 | * @regdmn2G: 2G reg domain |
| 2507 | * @regdmn5G: 5G reg domain |
| 2508 | * @ctl2G: 2G test limit |
| 2509 | * @ctl5G: 5G test limit |
| 2510 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2511 | * 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] | 2512 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2513 | 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] | 2514 | uint32_t reg_dmn, uint16_t regdmn2G, |
Rajeev Kumar Sirasanagandla | 4c1fecd | 2017-06-06 13:27:56 +0530 | [diff] [blame] | 2515 | uint16_t regdmn5G, uint8_t ctl2G, |
| 2516 | uint8_t ctl5G) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2517 | { |
| 2518 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2519 | |
| 2520 | if (wmi_handle->ops->send_regdomain_info_to_fw_cmd) |
| 2521 | return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle, |
| 2522 | reg_dmn, regdmn2G, |
| 2523 | regdmn5G, ctl2G, |
| 2524 | ctl5G); |
| 2525 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2526 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2527 | } |
| 2528 | |
| 2529 | |
| 2530 | /** |
| 2531 | * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode |
| 2532 | * @wmi_handle: wmi handle |
| 2533 | * @chan_switch_params: Pointer to tdls channel switch parameter structure |
| 2534 | * |
| 2535 | * This function sets tdls off channel mode |
| 2536 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2537 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; |
| 2538 | * Negative errno otherwise |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2539 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2540 | QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2541 | struct tdls_channel_switch_params *chan_switch_params) |
| 2542 | { |
| 2543 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2544 | |
| 2545 | if (wmi_handle->ops->send_set_tdls_offchan_mode_cmd) |
| 2546 | return wmi_handle->ops->send_set_tdls_offchan_mode_cmd(wmi_handle, |
| 2547 | chan_switch_params); |
| 2548 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2549 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2550 | } |
| 2551 | |
| 2552 | /** |
| 2553 | * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev |
| 2554 | * @wmi_handle: wmi handle |
| 2555 | * @pwmaTdlsparams: TDLS params |
| 2556 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2557 | * 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] | 2558 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2559 | QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2560 | void *tdls_param, uint8_t tdls_state) |
| 2561 | { |
| 2562 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2563 | |
| 2564 | if (wmi_handle->ops->send_update_fw_tdls_state_cmd) |
| 2565 | return wmi_handle->ops->send_update_fw_tdls_state_cmd(wmi_handle, |
| 2566 | tdls_param, tdls_state); |
| 2567 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2568 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2569 | } |
| 2570 | |
| 2571 | /** |
| 2572 | * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state |
| 2573 | * @wmi_handle: wmi handle |
| 2574 | * @peerStateParams: TDLS peer state params |
| 2575 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2576 | * 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] | 2577 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2578 | QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2579 | struct tdls_peer_state_params *peerStateParams, |
| 2580 | uint32_t *ch_mhz) |
| 2581 | { |
| 2582 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2583 | |
| 2584 | if (wmi_handle->ops->send_update_tdls_peer_state_cmd) |
| 2585 | return wmi_handle->ops->send_update_tdls_peer_state_cmd(wmi_handle, |
| 2586 | peerStateParams, ch_mhz); |
| 2587 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2588 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2589 | } |
| 2590 | |
| 2591 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2592 | * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware |
| 2593 | * @wmi_handle: Pointer to WMi handle |
| 2594 | * @ie_data: Pointer for ie data |
| 2595 | * |
| 2596 | * This function sends IE information to firmware |
| 2597 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2598 | * 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] | 2599 | * |
| 2600 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2601 | QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2602 | struct vdev_ie_info_param *ie_info) |
| 2603 | { |
| 2604 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2605 | |
| 2606 | if (wmi_handle->ops->send_process_set_ie_info_cmd) |
| 2607 | return wmi_handle->ops->send_process_set_ie_info_cmd(wmi_handle, |
| 2608 | ie_info); |
| 2609 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2610 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 2611 | } |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2612 | |
| 2613 | /** |
| 2614 | * wmi_unified_save_fw_version_cmd() - save fw version |
| 2615 | * @wmi_handle: pointer to wmi handle |
| 2616 | * @res_cfg: resource config |
| 2617 | * @num_mem_chunks: no of mem chunck |
| 2618 | * @mem_chunk: pointer to mem chunck structure |
| 2619 | * |
| 2620 | * This function sends IE information to firmware |
| 2621 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2622 | * 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] | 2623 | * |
| 2624 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2625 | QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2626 | void *evt_buf) |
| 2627 | { |
| 2628 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2629 | |
| 2630 | if (wmi_handle->ops->save_fw_version_cmd) |
| 2631 | return wmi_handle->ops->save_fw_version_cmd(wmi_handle, |
| 2632 | evt_buf); |
| 2633 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2634 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 2635 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2636 | |
| 2637 | /** |
| 2638 | * send_set_base_macaddr_indicate_cmd() - set base mac address in fw |
| 2639 | * @wmi_hdl: wmi handle |
| 2640 | * @custom_addr: base mac address |
| 2641 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2642 | * 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] | 2643 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2644 | QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2645 | uint8_t *custom_addr) |
| 2646 | { |
| 2647 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2648 | |
| 2649 | if (wmi_handle->ops->send_set_base_macaddr_indicate_cmd) |
| 2650 | return wmi_handle->ops->send_set_base_macaddr_indicate_cmd(wmi_handle, |
| 2651 | custom_addr); |
| 2652 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2653 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2654 | } |
| 2655 | |
| 2656 | /** |
| 2657 | * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events |
| 2658 | * @wmi_hdl: wmi handle |
| 2659 | * @event: Event received from FW |
| 2660 | * @len: Length of the event |
| 2661 | * |
| 2662 | * Enables the low frequency events and disables the high frequency |
| 2663 | * events. Bit 17 indicates if the event if low/high frequency. |
| 2664 | * 1 - high frequency, 0 - low frequency |
| 2665 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2666 | * 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] | 2667 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2668 | QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2669 | uint8_t *event, |
| 2670 | uint32_t len) |
| 2671 | { |
| 2672 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2673 | |
| 2674 | if (wmi_handle->ops->send_log_supported_evt_cmd) |
| 2675 | return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle, |
| 2676 | event, len); |
| 2677 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2678 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2679 | } |
| 2680 | |
gaurank kathpalia | cdfb445 | 2018-02-21 18:58:29 +0530 | [diff] [blame] | 2681 | void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl) |
| 2682 | { |
| 2683 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2684 | if (wmi_handle->ops->send_time_stamp_sync_cmd) |
| 2685 | wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle); |
| 2686 | |
| 2687 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2688 | /** |
| 2689 | * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id |
| 2690 | * @wmi_hdl: wmi handle |
| 2691 | * @start_log: Start logging related parameters |
| 2692 | * |
| 2693 | * Send the command to the FW based on which specific logging of diag |
| 2694 | * event/log id can be started/stopped |
| 2695 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2696 | * 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] | 2697 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2698 | QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2699 | struct wmi_wifi_start_log *start_log) |
| 2700 | { |
| 2701 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2702 | |
| 2703 | if (wmi_handle->ops->send_enable_specific_fw_logs_cmd) |
| 2704 | return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle, |
| 2705 | start_log); |
| 2706 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2707 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2708 | } |
| 2709 | |
| 2710 | /** |
| 2711 | * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW |
| 2712 | * @wmi_hdl: WMI handle |
| 2713 | * |
| 2714 | * This function is used to send the flush command to the FW, |
| 2715 | * that will flush the fw logs that are residue in the FW |
| 2716 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2717 | * 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] | 2718 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2719 | QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2720 | { |
| 2721 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2722 | |
| 2723 | if (wmi_handle->ops->send_flush_logs_to_fw_cmd) |
| 2724 | return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle); |
| 2725 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2726 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2727 | } |
| 2728 | |
| 2729 | /** |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2730 | * 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] | 2731 | * @wmi_hdl: wmi handle |
| 2732 | * @msg: PCL structure containing the PCL and the number of channels |
| 2733 | * |
| 2734 | * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN |
| 2735 | * firmware. The DBS Manager is the consumer of this information in the WLAN |
| 2736 | * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs |
| 2737 | * to migrate to a new channel without host driver involvement. An example of |
| 2738 | * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will |
| 2739 | * manage the channel selection without firmware involvement. |
| 2740 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2741 | * 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] | 2742 | */ |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2743 | QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl, |
| 2744 | struct wmi_pcl_chan_weights *msg) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2745 | { |
| 2746 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2747 | |
Manishekar Chandrasekaran | 8650851 | 2016-04-21 19:16:32 +0530 | [diff] [blame] | 2748 | if (wmi_handle->ops->send_pdev_set_pcl_cmd) |
| 2749 | return wmi_handle->ops->send_pdev_set_pcl_cmd(wmi_handle, msg); |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2750 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2751 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2752 | } |
| 2753 | |
| 2754 | /** |
| 2755 | * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW |
| 2756 | * @wmi_hdl: wmi handle |
| 2757 | * @msg: Structure containing the following parameters |
| 2758 | * |
| 2759 | * - hw_mode_index: The HW_Mode field is a enumerated type that is selected |
| 2760 | * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID. |
| 2761 | * |
| 2762 | * Provides notification to the WLAN firmware that host driver is requesting a |
| 2763 | * HardWare (HW) Mode change. This command is needed to support iHelium in the |
| 2764 | * configurations that include the Dual Band Simultaneous (DBS) feature. |
| 2765 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2766 | * 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] | 2767 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2768 | QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2769 | uint32_t hw_mode_index) |
| 2770 | { |
| 2771 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2772 | |
Manishekar Chandrasekaran | 1718378 | 2016-04-27 12:29:16 +0530 | [diff] [blame] | 2773 | if (wmi_handle->ops->send_pdev_set_hw_mode_cmd) |
| 2774 | return wmi_handle->ops->send_pdev_set_hw_mode_cmd(wmi_handle, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2775 | hw_mode_index); |
| 2776 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2777 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2778 | } |
| 2779 | |
| 2780 | /** |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2781 | * 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] | 2782 | * @wmi_hdl: wmi handle |
| 2783 | * @msg: Dual MAC config parameters |
| 2784 | * |
| 2785 | * Configures WLAN firmware with the dual MAC features |
| 2786 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2787 | * 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] | 2788 | */ |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2789 | 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] | 2790 | struct policy_mgr_dual_mac_config *msg) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2791 | { |
| 2792 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2793 | |
Manishekar Chandrasekaran | 157a4de | 2016-04-27 12:52:51 +0530 | [diff] [blame] | 2794 | if (wmi_handle->ops->send_pdev_set_dual_mac_config_cmd) |
| 2795 | 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] | 2796 | msg); |
| 2797 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2798 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2799 | } |
| 2800 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2801 | /** |
| 2802 | * wmi_unified_set_led_flashing_cmd() - set led flashing in fw |
| 2803 | * @wmi_hdl: wmi handle |
| 2804 | * @flashing: flashing request |
| 2805 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2806 | * 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] | 2807 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2808 | QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2809 | struct flashing_req_params *flashing) |
| 2810 | { |
| 2811 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2812 | |
| 2813 | if (wmi_handle->ops->send_set_led_flashing_cmd) |
| 2814 | return wmi_handle->ops->send_set_led_flashing_cmd(wmi_handle, |
| 2815 | flashing); |
| 2816 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2817 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2818 | } |
| 2819 | |
| 2820 | /** |
| 2821 | * wmi_unified_app_type1_params_in_fw_cmd() - set app type1 params in fw |
| 2822 | * @wmi_hdl: wmi handle |
| 2823 | * @appType1Params: app type1 params |
| 2824 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2825 | * 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] | 2826 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2827 | 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] | 2828 | struct app_type1_params *app_type1_params) |
| 2829 | { |
| 2830 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2831 | |
| 2832 | if (wmi_handle->ops->send_app_type1_params_in_fw_cmd) |
| 2833 | return wmi_handle->ops->send_app_type1_params_in_fw_cmd(wmi_handle, |
| 2834 | app_type1_params); |
| 2835 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2836 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2837 | } |
| 2838 | |
| 2839 | /** |
| 2840 | * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request |
| 2841 | * @wmi_hdl: wmi handle |
| 2842 | * @request: SSID hotlist set request |
| 2843 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2844 | * 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] | 2845 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2846 | QDF_STATUS |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2847 | wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, |
| 2848 | struct ssid_hotlist_request_params *request) |
| 2849 | { |
| 2850 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2851 | |
| 2852 | if (wmi_handle->ops->send_set_ssid_hotlist_cmd) |
| 2853 | return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle, |
| 2854 | request); |
| 2855 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2856 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2857 | } |
| 2858 | |
Rachit Kankane | e797c77 | 2018-07-31 12:00:48 +0530 | [diff] [blame] | 2859 | #ifdef WLAN_FEATURE_ROAM_OFFLOAD |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2860 | /** |
| 2861 | * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw. |
| 2862 | * @wmi_hdl: wmi handle |
| 2863 | * @vdev_id: vdev id |
| 2864 | * |
| 2865 | * This function sends roam synch complete event to fw. |
| 2866 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2867 | * 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] | 2868 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2869 | QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2870 | uint8_t vdev_id) |
| 2871 | { |
| 2872 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2873 | |
| 2874 | if (wmi_handle->ops->send_process_roam_synch_complete_cmd) |
| 2875 | return wmi_handle->ops->send_process_roam_synch_complete_cmd(wmi_handle, |
| 2876 | vdev_id); |
| 2877 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2878 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2879 | } |
| 2880 | |
Rachit Kankane | e797c77 | 2018-07-31 12:00:48 +0530 | [diff] [blame] | 2881 | /* wmi_unified_set_ric_req_cmd() - set ric request element |
| 2882 | * @wmi_hdl: wmi handle |
| 2883 | * @msg: message |
| 2884 | * @is_add_ts: is addts required |
| 2885 | * |
| 2886 | * This function sets ric request element for 11r roaming. |
| 2887 | * |
| 2888 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2889 | */ |
| 2890 | QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg, |
| 2891 | uint8_t is_add_ts) |
| 2892 | { |
| 2893 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2894 | |
| 2895 | if (wmi_handle->ops->send_set_ric_req_cmd) |
| 2896 | return wmi_handle->ops->send_set_ric_req_cmd(wmi_handle, msg, |
| 2897 | is_add_ts); |
| 2898 | |
| 2899 | return QDF_STATUS_E_FAILURE; |
| 2900 | } |
| 2901 | #endif |
| 2902 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2903 | /** |
Anurag Chouhan | 459e015 | 2016-07-22 20:19:54 +0530 | [diff] [blame] | 2904 | * wmi_unified_fw_test_cmd() - send fw test command to fw. |
| 2905 | * @wmi_hdl: wmi handle |
| 2906 | * @wmi_fwtest: fw test command |
| 2907 | * |
| 2908 | * This function sends fw test command to fw. |
| 2909 | * |
| 2910 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2911 | */ |
| 2912 | QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, |
| 2913 | struct set_fwtest_params *wmi_fwtest) |
| 2914 | { |
| 2915 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2916 | |
| 2917 | if (wmi_handle->ops->send_fw_test_cmd) |
| 2918 | return wmi_handle->ops->send_fw_test_cmd(wmi_handle, |
| 2919 | wmi_fwtest); |
| 2920 | |
| 2921 | return QDF_STATUS_E_FAILURE; |
| 2922 | |
| 2923 | } |
| 2924 | |
| 2925 | /** |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2926 | * wmi_unified_unit_test_cmd() - send unit test command to fw. |
| 2927 | * @wmi_hdl: wmi handle |
| 2928 | * @wmi_utest: unit test command |
| 2929 | * |
| 2930 | * This function send unit test command to fw. |
| 2931 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2932 | * 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] | 2933 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2934 | QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2935 | struct wmi_unit_test_cmd *wmi_utest) |
| 2936 | { |
| 2937 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2938 | |
| 2939 | if (wmi_handle->ops->send_unit_test_cmd) |
| 2940 | return wmi_handle->ops->send_unit_test_cmd(wmi_handle, |
| 2941 | wmi_utest); |
| 2942 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2943 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2944 | } |
| 2945 | |
| 2946 | /** |
| 2947 | * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw. |
| 2948 | * @wmi_hdl: wmi handle |
| 2949 | * @roaminvoke: roam invoke command |
| 2950 | * |
| 2951 | * Send roam invoke command to fw for fastreassoc. |
| 2952 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2953 | * 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] | 2954 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2955 | QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2956 | struct wmi_roam_invoke_cmd *roaminvoke, |
| 2957 | uint32_t ch_hz) |
| 2958 | { |
| 2959 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2960 | |
| 2961 | if (wmi_handle->ops->send_roam_invoke_cmd) |
| 2962 | return wmi_handle->ops->send_roam_invoke_cmd(wmi_handle, |
| 2963 | roaminvoke, ch_hz); |
| 2964 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2965 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2966 | } |
| 2967 | |
| 2968 | /** |
| 2969 | * wmi_unified_roam_scan_offload_cmd() - set roam offload command |
| 2970 | * @wmi_hdl: wmi handle |
| 2971 | * @command: command |
| 2972 | * @vdev_id: vdev id |
| 2973 | * |
| 2974 | * This function set roam offload command to fw. |
| 2975 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2976 | * 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] | 2977 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2978 | QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2979 | uint32_t command, uint32_t vdev_id) |
| 2980 | { |
| 2981 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2982 | |
| 2983 | if (wmi_handle->ops->send_roam_scan_offload_cmd) |
| 2984 | return wmi_handle->ops->send_roam_scan_offload_cmd(wmi_handle, |
| 2985 | command, vdev_id); |
| 2986 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2987 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2988 | } |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 2989 | #ifdef CONFIG_MCL |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2990 | /** |
| 2991 | * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw |
| 2992 | * @wmi_hdl: wmi handle |
Himanshu Agarwal | eaf7d73 | 2017-09-28 11:51:35 +0530 | [diff] [blame] | 2993 | * @ap_profile: ap profile params |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 2994 | * |
| 2995 | * Send WMI_ROAM_AP_PROFILE to firmware |
| 2996 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2997 | * 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] | 2998 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 2999 | 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] | 3000 | struct ap_profile_params *ap_profile) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3001 | { |
| 3002 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3003 | |
| 3004 | if (wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd) |
Himanshu Agarwal | eaf7d73 | 2017-09-28 11:51:35 +0530 | [diff] [blame] | 3005 | return wmi_handle->ops->send_roam_scan_offload_ap_profile_cmd( |
| 3006 | wmi_handle, ap_profile); |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3007 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3008 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3009 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3010 | #endif |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3011 | /** |
| 3012 | * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period |
| 3013 | * @wmi_handle: wmi handle |
| 3014 | * @scan_period: scan period |
| 3015 | * @scan_age: scan age |
| 3016 | * @vdev_id: vdev id |
| 3017 | * |
| 3018 | * Send WMI_ROAM_SCAN_PERIOD parameters to fw. |
| 3019 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3020 | * 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] | 3021 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3022 | QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3023 | uint32_t scan_period, |
| 3024 | uint32_t scan_age, |
| 3025 | uint32_t vdev_id) |
| 3026 | { |
| 3027 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3028 | |
| 3029 | if (wmi_handle->ops->send_roam_scan_offload_scan_period_cmd) |
| 3030 | return wmi_handle->ops->send_roam_scan_offload_scan_period_cmd(wmi_handle, |
| 3031 | scan_period, scan_age, vdev_id); |
| 3032 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3033 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3034 | } |
| 3035 | |
| 3036 | /** |
| 3037 | * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list |
| 3038 | * @wmi_handle: wmi handle |
| 3039 | * @chan_count: channel count |
| 3040 | * @chan_list: channel list |
| 3041 | * @list_type: list type |
| 3042 | * @vdev_id: vdev id |
| 3043 | * |
| 3044 | * Set roam offload channel list. |
| 3045 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3046 | * 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] | 3047 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3048 | 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] | 3049 | uint8_t chan_count, |
Varun Reddy Yeturu | 5a552cf | 2016-07-07 17:42:49 -0700 | [diff] [blame] | 3050 | uint32_t *chan_list, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3051 | uint8_t list_type, uint32_t vdev_id) |
| 3052 | { |
| 3053 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3054 | |
| 3055 | if (wmi_handle->ops->send_roam_scan_offload_chan_list_cmd) |
| 3056 | return wmi_handle->ops->send_roam_scan_offload_chan_list_cmd(wmi_handle, |
| 3057 | chan_count, chan_list, |
| 3058 | list_type, vdev_id); |
| 3059 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3060 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3061 | } |
| 3062 | |
| 3063 | /** |
| 3064 | * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th |
| 3065 | * @wmi_hdl: wmi handle |
| 3066 | * @rssi_change_thresh: RSSI Change threshold |
| 3067 | * @bcn_rssi_weight: beacon RSSI weight |
| 3068 | * @vdev_id: vdev id |
| 3069 | * |
| 3070 | * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw. |
| 3071 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3072 | * 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] | 3073 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3074 | 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] | 3075 | uint32_t vdev_id, |
| 3076 | int32_t rssi_change_thresh, |
| 3077 | uint32_t bcn_rssi_weight, |
| 3078 | uint32_t hirssi_delay_btw_scans) |
| 3079 | { |
| 3080 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3081 | |
| 3082 | if (wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd) |
| 3083 | return wmi_handle->ops->send_roam_scan_offload_rssi_change_cmd(wmi_handle, |
| 3084 | vdev_id, rssi_change_thresh, |
| 3085 | bcn_rssi_weight, hirssi_delay_btw_scans); |
| 3086 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 3087 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3088 | } |
| 3089 | |
Kapil Gupta | 54ea36e | 2017-02-24 15:50:03 +0530 | [diff] [blame] | 3090 | QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, |
| 3091 | struct wmi_per_roam_config_req *req_buf) |
| 3092 | { |
| 3093 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3094 | |
| 3095 | if (wmi_handle->ops->send_per_roam_config_cmd) |
| 3096 | return wmi_handle->ops->send_per_roam_config_cmd(wmi_handle, |
| 3097 | req_buf); |
| 3098 | |
| 3099 | return QDF_STATUS_E_FAILURE; |
| 3100 | } |
| 3101 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 3102 | /** |
Anurag Chouhan | 97f0042 | 2017-09-11 14:56:30 +0530 | [diff] [blame] | 3103 | * wmi_unified_set_arp_stats_req() - set arp stats request |
| 3104 | * @wmi_hdl: wmi handle |
| 3105 | * @req_buf: pointer to set_arp_stats |
| 3106 | * |
| 3107 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3108 | */ |
| 3109 | QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl, |
| 3110 | struct set_arp_stats *req_buf) |
| 3111 | { |
| 3112 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3113 | |
| 3114 | if (wmi_handle->ops->send_set_arp_stats_req_cmd) |
| 3115 | return wmi_handle->ops->send_set_arp_stats_req_cmd(wmi_handle, |
| 3116 | req_buf); |
| 3117 | |
| 3118 | return QDF_STATUS_E_FAILURE; |
| 3119 | } |
| 3120 | |
| 3121 | /** |
| 3122 | * wmi_unified_get_arp_stats_req() - get arp stats request |
| 3123 | * @wmi_hdl: wmi handle |
| 3124 | * @req_buf: pointer to get_arp_stats |
| 3125 | * |
| 3126 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3127 | */ |
| 3128 | QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, |
| 3129 | struct get_arp_stats *req_buf) |
| 3130 | { |
| 3131 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3132 | |
| 3133 | if (wmi_handle->ops->send_get_arp_stats_req_cmd) |
| 3134 | return wmi_handle->ops->send_get_arp_stats_req_cmd(wmi_handle, |
| 3135 | req_buf); |
| 3136 | |
| 3137 | return QDF_STATUS_E_FAILURE; |
| 3138 | } |
| 3139 | |
Vignesh Viswanathan | 81bde49 | 2017-09-25 14:36:38 +0530 | [diff] [blame] | 3140 | QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, |
| 3141 | struct wmi_unified_pmk_cache *req_buf) |
| 3142 | { |
| 3143 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3144 | |
| 3145 | if (wmi_handle->ops->send_set_del_pmkid_cache_cmd) |
| 3146 | return wmi_handle->ops->send_set_del_pmkid_cache_cmd(wmi_handle, |
| 3147 | req_buf); |
| 3148 | |
| 3149 | return QDF_STATUS_E_FAILURE; |
| 3150 | } |
| 3151 | |
| 3152 | #if defined(WLAN_FEATURE_FILS_SK) |
| 3153 | QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, |
| 3154 | struct hlp_params *req_buf) |
| 3155 | { |
| 3156 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3157 | |
| 3158 | if (wmi_handle->ops->send_roam_scan_hlp_cmd) |
| 3159 | return wmi_handle->ops->send_roam_scan_hlp_cmd(wmi_handle, |
| 3160 | req_buf); |
| 3161 | |
| 3162 | return QDF_STATUS_E_FAILURE; |
| 3163 | } |
| 3164 | #endif |
| 3165 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3166 | #ifdef FEATURE_WLAN_APF |
Nachiket Kukade | ae35a2c | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 3167 | QDF_STATUS |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3168 | 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] | 3169 | enum wmi_host_active_apf_mode ucast_mode, |
| 3170 | enum wmi_host_active_apf_mode |
| 3171 | mcast_bcast_mode) |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 3172 | { |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3173 | if (wmi->ops->send_set_active_apf_mode_cmd) |
| 3174 | return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id, |
| 3175 | ucast_mode, |
| 3176 | mcast_bcast_mode); |
| 3177 | return QDF_STATUS_E_FAILURE; |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 3178 | } |
| 3179 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 3180 | QDF_STATUS |
| 3181 | wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi, |
| 3182 | uint32_t vdev_id, bool enable) |
| 3183 | { |
| 3184 | if (wmi->ops->send_apf_enable_cmd) |
| 3185 | return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable); |
| 3186 | return QDF_STATUS_E_FAILURE; |
| 3187 | } |
| 3188 | |
| 3189 | QDF_STATUS |
| 3190 | wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi, |
| 3191 | struct wmi_apf_write_memory_params |
| 3192 | *write_params) |
| 3193 | { |
| 3194 | if (wmi->ops->send_apf_write_work_memory_cmd) |
| 3195 | return wmi->ops->send_apf_write_work_memory_cmd(wmi, |
| 3196 | write_params); |
| 3197 | |
| 3198 | return QDF_STATUS_E_FAILURE; |
| 3199 | } |
| 3200 | |
| 3201 | QDF_STATUS |
| 3202 | wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi, |
| 3203 | struct wmi_apf_read_memory_params |
| 3204 | *read_params) |
| 3205 | { |
| 3206 | if (wmi->ops->send_apf_read_work_memory_cmd) |
| 3207 | return wmi->ops->send_apf_read_work_memory_cmd(wmi, |
| 3208 | read_params); |
| 3209 | |
| 3210 | return QDF_STATUS_E_FAILURE; |
| 3211 | } |
| 3212 | |
| 3213 | QDF_STATUS |
| 3214 | wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf, |
| 3215 | struct wmi_apf_read_memory_resp_event_params |
| 3216 | *read_mem_evt) |
| 3217 | { |
| 3218 | if (wmi->ops->extract_apf_read_memory_resp_event) |
| 3219 | return wmi->ops->extract_apf_read_memory_resp_event(wmi, |
| 3220 | evt_buf, |
| 3221 | read_mem_evt); |
| 3222 | |
| 3223 | return QDF_STATUS_E_FAILURE; |
| 3224 | } |
| 3225 | #endif /* FEATURE_WLAN_APF */ |
| 3226 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3227 | /** |
| 3228 | * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function |
| 3229 | * @param wmi_handle : handle to WMI. |
| 3230 | * @param param : tpc config param |
| 3231 | * |
| 3232 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3233 | */ |
| 3234 | QDF_STATUS wmi_unified_pdev_get_tpc_config_cmd_send(void *wmi_hdl, |
| 3235 | uint32_t param) |
| 3236 | { |
| 3237 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3238 | |
| 3239 | if (wmi_handle->ops->send_pdev_get_tpc_config_cmd) |
| 3240 | return wmi_handle->ops->send_pdev_get_tpc_config_cmd(wmi_handle, |
| 3241 | param); |
| 3242 | |
| 3243 | return QDF_STATUS_E_FAILURE; |
| 3244 | } |
| 3245 | |
| 3246 | /** |
Sathish Kumar | 58f1255 | 2016-08-09 16:50:46 +0530 | [diff] [blame] | 3247 | * wmi_unified_set_bwf_cmd_send() - WMI set bwf function |
| 3248 | * @param wmi_handle : handle to WMI. |
| 3249 | * @param param : pointer to set bwf param |
| 3250 | * |
| 3251 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3252 | */ |
| 3253 | QDF_STATUS wmi_unified_set_bwf_cmd_send(void *wmi_hdl, |
| 3254 | struct set_bwf_params *param) |
| 3255 | { |
| 3256 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3257 | |
| 3258 | if (wmi_handle->ops->send_set_bwf_cmd) |
| 3259 | return wmi_handle->ops->send_set_bwf_cmd(wmi_handle, param); |
| 3260 | |
| 3261 | return QDF_STATUS_E_FAILURE; |
| 3262 | } |
| 3263 | |
| 3264 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3265 | * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function |
| 3266 | * @param wmi_handle : handle to WMI. |
| 3267 | * @param param : pointer to hold pdev fips param |
| 3268 | * |
| 3269 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3270 | */ |
| 3271 | QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, |
| 3272 | struct fips_params *param) |
| 3273 | { |
| 3274 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3275 | |
| 3276 | if (wmi_handle->ops->send_pdev_fips_cmd) |
| 3277 | return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param); |
| 3278 | |
| 3279 | return QDF_STATUS_E_FAILURE; |
| 3280 | } |
| 3281 | |
| 3282 | /** |
| 3283 | * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function |
| 3284 | * @param wmi_handle : handle to WMI. |
| 3285 | * @param param : pointer to hold wlan profile param |
| 3286 | * |
| 3287 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3288 | */ |
| 3289 | QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, |
| 3290 | struct wlan_profile_params *param) |
| 3291 | { |
| 3292 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3293 | |
| 3294 | if (wmi_handle->ops->send_wlan_profile_enable_cmd) |
| 3295 | return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle, |
| 3296 | param); |
| 3297 | |
| 3298 | return QDF_STATUS_E_FAILURE; |
| 3299 | } |
| 3300 | |
| 3301 | /** |
| 3302 | * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function |
| 3303 | * @param wmi_handle : handle to WMI. |
| 3304 | * @param param : pointer to hold wlan profile param |
| 3305 | * |
| 3306 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3307 | */ |
| 3308 | QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, |
| 3309 | struct wlan_profile_params *param) |
| 3310 | { |
| 3311 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3312 | |
| 3313 | if (wmi->ops->send_wlan_profile_trigger_cmd) |
| 3314 | return wmi->ops->send_wlan_profile_trigger_cmd(wmi, |
| 3315 | param); |
| 3316 | |
| 3317 | return QDF_STATUS_E_FAILURE; |
| 3318 | } |
| 3319 | |
| 3320 | /** |
| 3321 | * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function |
| 3322 | * @param wmi_handle : handle to WMI. |
| 3323 | * @param param : pointer to hold channel param |
| 3324 | * |
| 3325 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3326 | */ |
| 3327 | QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, |
| 3328 | struct channel_param *param) |
| 3329 | { |
| 3330 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3331 | |
| 3332 | if (wmi_handle->ops->send_pdev_set_chan_cmd) |
| 3333 | return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle, |
| 3334 | param); |
| 3335 | |
| 3336 | return QDF_STATUS_E_FAILURE; |
| 3337 | } |
| 3338 | |
| 3339 | /** |
| 3340 | * wmi_unified_set_ht_ie_cmd_send() - WMI set channel cmd function |
| 3341 | * @param wmi_handle : handle to WMI. |
| 3342 | * @param param : pointer to hold channel param |
| 3343 | * |
| 3344 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3345 | */ |
| 3346 | QDF_STATUS wmi_unified_set_ht_ie_cmd_send(void *wmi_hdl, |
| 3347 | struct ht_ie_params *param) |
| 3348 | { |
| 3349 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3350 | |
| 3351 | if (wmi_handle->ops->send_set_ht_ie_cmd) |
| 3352 | return wmi_handle->ops->send_set_ht_ie_cmd(wmi_handle, param); |
| 3353 | |
| 3354 | return QDF_STATUS_E_FAILURE; |
| 3355 | } |
| 3356 | |
| 3357 | /** |
| 3358 | * wmi_unified_set_vht_ie_cmd_send() - WMI set channel cmd function |
| 3359 | * @param wmi_handle : handle to WMI. |
| 3360 | * @param param : pointer to hold channel param |
| 3361 | * |
| 3362 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3363 | */ |
| 3364 | QDF_STATUS wmi_unified_set_vht_ie_cmd_send(void *wmi_hdl, |
| 3365 | struct vht_ie_params *param) |
| 3366 | { |
| 3367 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3368 | |
| 3369 | if (wmi_handle->ops->send_set_vht_ie_cmd) |
| 3370 | return wmi_handle->ops->send_set_vht_ie_cmd(wmi_handle, param); |
| 3371 | |
| 3372 | return QDF_STATUS_E_FAILURE; |
| 3373 | } |
| 3374 | |
| 3375 | /** |
| 3376 | * wmi_unified_wmm_update_cmd_send() - WMI wmm update cmd function |
| 3377 | * @param wmi_handle : handle to WMI. |
| 3378 | * @param param : pointer to hold wmm param |
| 3379 | * |
| 3380 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3381 | */ |
| 3382 | QDF_STATUS wmi_unified_wmm_update_cmd_send(void *wmi_hdl, |
| 3383 | struct wmm_update_params *param) |
| 3384 | { |
| 3385 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3386 | |
| 3387 | if (wmi_handle->ops->send_wmm_update_cmd) |
| 3388 | return wmi_handle->ops->send_wmm_update_cmd(wmi_handle, param); |
| 3389 | |
| 3390 | return QDF_STATUS_E_FAILURE; |
| 3391 | } |
| 3392 | |
| 3393 | /** |
| 3394 | * wmi_unified_set_ant_switch_tbl_cmd_send() - WMI ant switch tbl cmd function |
| 3395 | * @param wmi_handle : handle to WMI. |
| 3396 | * @param param : pointer to hold ant switch tbl param |
| 3397 | * |
| 3398 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3399 | */ |
| 3400 | QDF_STATUS wmi_unified_set_ant_switch_tbl_cmd_send(void *wmi_hdl, |
| 3401 | struct ant_switch_tbl_params *param) |
| 3402 | { |
| 3403 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3404 | |
| 3405 | if (wmi_handle->ops->send_set_ant_switch_tbl_cmd) |
| 3406 | return wmi_handle->ops->send_set_ant_switch_tbl_cmd(wmi_handle, |
| 3407 | param); |
| 3408 | |
| 3409 | return QDF_STATUS_E_FAILURE; |
| 3410 | } |
| 3411 | |
| 3412 | /** |
| 3413 | * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 3414 | * @param wmi_handle : handle to WMI. |
| 3415 | * @param param : pointer to hold ratepwr table param |
| 3416 | * |
| 3417 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3418 | */ |
| 3419 | QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, |
| 3420 | struct ratepwr_table_params *param) |
| 3421 | { |
| 3422 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3423 | |
| 3424 | if (wmi_handle->ops->send_set_ratepwr_table_cmd) |
| 3425 | return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle, |
| 3426 | param); |
| 3427 | |
| 3428 | return QDF_STATUS_E_FAILURE; |
| 3429 | } |
| 3430 | |
| 3431 | /** |
| 3432 | * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 3433 | * @param wmi_handle : handle to WMI. |
| 3434 | * |
| 3435 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3436 | */ |
| 3437 | QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl) |
| 3438 | { |
| 3439 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3440 | |
| 3441 | if (wmi_handle->ops->send_get_ratepwr_table_cmd) |
| 3442 | return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle); |
| 3443 | |
| 3444 | return QDF_STATUS_E_FAILURE; |
| 3445 | } |
| 3446 | |
| 3447 | /** |
| 3448 | * wmi_unified_set_ctl_table_cmd_send() - WMI ctl table cmd function |
| 3449 | * @param wmi_handle : handle to WMI. |
| 3450 | * @param param : pointer to hold ctl table param |
| 3451 | * |
| 3452 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3453 | */ |
| 3454 | QDF_STATUS wmi_unified_set_ctl_table_cmd_send(void *wmi_hdl, |
| 3455 | struct ctl_table_params *param) |
| 3456 | { |
| 3457 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3458 | |
| 3459 | if (wmi_handle->ops->send_set_ctl_table_cmd) |
| 3460 | return wmi_handle->ops->send_set_ctl_table_cmd(wmi_handle, |
| 3461 | param); |
| 3462 | |
| 3463 | return QDF_STATUS_E_FAILURE; |
| 3464 | } |
| 3465 | |
| 3466 | /** |
| 3467 | * wmi_unified_set_mimogain_table_cmd_send() - WMI set mimogain cmd function |
| 3468 | * @param wmi_handle : handle to WMI. |
| 3469 | * @param param : pointer to hold mimogain param |
| 3470 | * |
| 3471 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3472 | */ |
| 3473 | QDF_STATUS wmi_unified_set_mimogain_table_cmd_send(void *wmi_hdl, |
| 3474 | struct mimogain_table_params *param) |
| 3475 | { |
| 3476 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3477 | |
| 3478 | if (wmi_handle->ops->send_set_mimogain_table_cmd) |
| 3479 | return wmi_handle->ops->send_set_mimogain_table_cmd(wmi_handle, |
| 3480 | param); |
| 3481 | |
| 3482 | return QDF_STATUS_E_FAILURE; |
| 3483 | } |
| 3484 | |
| 3485 | /** |
| 3486 | * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr |
| 3487 | * chainmsk cmd function |
| 3488 | * @param wmi_handle : handle to WMI. |
| 3489 | * @param param : pointer to hold ratepwr chainmsk param |
| 3490 | * |
| 3491 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3492 | */ |
| 3493 | QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, |
| 3494 | struct ratepwr_chainmsk_params *param) |
| 3495 | { |
| 3496 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3497 | |
| 3498 | if (wmi->ops->send_set_ratepwr_chainmsk_cmd) |
| 3499 | return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param); |
| 3500 | |
| 3501 | return QDF_STATUS_E_FAILURE; |
| 3502 | } |
| 3503 | |
| 3504 | /** |
| 3505 | * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function |
| 3506 | * @param wmi_handle : handle to WMI. |
| 3507 | * @param param : pointer to hold macaddr param |
| 3508 | * |
| 3509 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3510 | */ |
| 3511 | QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, |
| 3512 | struct macaddr_params *param) |
| 3513 | { |
| 3514 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3515 | |
| 3516 | if (wmi_handle->ops->send_set_macaddr_cmd) |
| 3517 | return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param); |
| 3518 | |
| 3519 | return QDF_STATUS_E_FAILURE; |
| 3520 | } |
| 3521 | |
| 3522 | /** |
| 3523 | * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function |
| 3524 | * @param wmi_handle : handle to WMI. |
| 3525 | * |
| 3526 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3527 | */ |
| 3528 | QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl) |
| 3529 | { |
| 3530 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3531 | |
| 3532 | if (wmi_handle->ops->send_pdev_scan_start_cmd) |
| 3533 | return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle); |
| 3534 | |
| 3535 | return QDF_STATUS_E_FAILURE; |
| 3536 | } |
| 3537 | |
| 3538 | /** |
| 3539 | * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function |
| 3540 | * @param wmi_handle : handle to WMI. |
| 3541 | * |
| 3542 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3543 | */ |
| 3544 | QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl) |
| 3545 | { |
| 3546 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3547 | |
| 3548 | if (wmi_handle->ops->send_pdev_scan_end_cmd) |
| 3549 | return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle); |
| 3550 | |
| 3551 | return QDF_STATUS_E_FAILURE; |
| 3552 | } |
| 3553 | |
| 3554 | /** |
| 3555 | * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function |
| 3556 | * @param wmi_handle : handle to WMI. |
| 3557 | * @param param : pointer to hold acparams param |
| 3558 | * |
| 3559 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3560 | */ |
| 3561 | QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, |
| 3562 | struct acparams_params *param) |
| 3563 | { |
| 3564 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3565 | |
| 3566 | if (wmi_handle->ops->send_set_acparams_cmd) |
| 3567 | return wmi_handle->ops->send_set_acparams_cmd(wmi_handle, |
| 3568 | param); |
| 3569 | |
| 3570 | return QDF_STATUS_E_FAILURE; |
| 3571 | } |
| 3572 | |
| 3573 | /** |
| 3574 | * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp |
| 3575 | * tid map cmd function |
| 3576 | * @param wmi_handle : handle to WMI. |
| 3577 | * @param param : pointer to hold dscp param |
| 3578 | * |
| 3579 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3580 | */ |
| 3581 | QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, |
| 3582 | struct vap_dscp_tid_map_params *param) |
| 3583 | { |
| 3584 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3585 | |
| 3586 | if (wmi->ops->send_set_vap_dscp_tid_map_cmd) |
| 3587 | return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param); |
| 3588 | |
| 3589 | return QDF_STATUS_E_FAILURE; |
| 3590 | } |
| 3591 | |
| 3592 | /** |
| 3593 | * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast |
| 3594 | * reserve cmd function |
| 3595 | * @param wmi_handle : handle to WMI. |
| 3596 | * @param param : pointer to hold ast param |
| 3597 | * |
| 3598 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3599 | */ |
| 3600 | QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, |
| 3601 | struct proxy_ast_reserve_params *param) |
| 3602 | { |
| 3603 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3604 | |
| 3605 | if (wmi_handle->ops->send_proxy_ast_reserve_cmd) |
| 3606 | return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle, |
| 3607 | param); |
| 3608 | |
| 3609 | return QDF_STATUS_E_FAILURE; |
| 3610 | } |
| 3611 | |
| 3612 | /** |
| 3613 | * wmi_unified_pdev_qvit_cmd_send() - WMI pdev qvit cmd function |
| 3614 | * @param wmi_handle : handle to WMI. |
| 3615 | * @param param : pointer to hold qvit param |
| 3616 | * |
| 3617 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3618 | */ |
| 3619 | QDF_STATUS wmi_unified_pdev_qvit_cmd_send(void *wmi_hdl, |
| 3620 | struct pdev_qvit_params *param) |
| 3621 | { |
| 3622 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3623 | |
| 3624 | if (wmi_handle->ops->send_pdev_qvit_cmd) |
| 3625 | return wmi_handle->ops->send_pdev_qvit_cmd(wmi_handle, param); |
| 3626 | |
| 3627 | return QDF_STATUS_E_FAILURE; |
| 3628 | } |
| 3629 | |
| 3630 | /** |
| 3631 | * wmi_unified_mcast_group_update_cmd_send() - WMI mcast grp update cmd function |
| 3632 | * @param wmi_handle : handle to WMI. |
| 3633 | * @param param : pointer to hold mcast grp param |
| 3634 | * |
| 3635 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3636 | */ |
| 3637 | QDF_STATUS wmi_unified_mcast_group_update_cmd_send(void *wmi_hdl, |
| 3638 | struct mcast_group_update_params *param) |
| 3639 | { |
| 3640 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3641 | |
| 3642 | if (wmi_handle->ops->send_mcast_group_update_cmd) |
| 3643 | return wmi_handle->ops->send_mcast_group_update_cmd(wmi_handle, |
| 3644 | param); |
| 3645 | |
| 3646 | return QDF_STATUS_E_FAILURE; |
| 3647 | } |
| 3648 | |
| 3649 | /** |
| 3650 | * wmi_unified_peer_add_wds_entry_cmd_send() - WMI add wds entry cmd function |
| 3651 | * @param wmi_handle : handle to WMI. |
| 3652 | * @param param : pointer to hold wds entry param |
| 3653 | * |
| 3654 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3655 | */ |
| 3656 | QDF_STATUS wmi_unified_peer_add_wds_entry_cmd_send(void *wmi_hdl, |
| 3657 | struct peer_add_wds_entry_params *param) |
| 3658 | { |
| 3659 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3660 | |
| 3661 | if (wmi_handle->ops->send_peer_add_wds_entry_cmd) |
| 3662 | return wmi_handle->ops->send_peer_add_wds_entry_cmd(wmi_handle, |
| 3663 | param); |
| 3664 | |
| 3665 | return QDF_STATUS_E_FAILURE; |
| 3666 | } |
| 3667 | |
| 3668 | /** |
| 3669 | * wmi_unified_peer_del_wds_entry_cmd_send() - WMI del wds entry cmd function |
| 3670 | * @param wmi_handle : handle to WMI. |
| 3671 | * @param param : pointer to hold wds entry param |
| 3672 | * |
| 3673 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3674 | */ |
| 3675 | QDF_STATUS wmi_unified_peer_del_wds_entry_cmd_send(void *wmi_hdl, |
| 3676 | struct peer_del_wds_entry_params *param) |
| 3677 | { |
| 3678 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3679 | |
| 3680 | if (wmi_handle->ops->send_peer_del_wds_entry_cmd) |
| 3681 | return wmi_handle->ops->send_peer_del_wds_entry_cmd(wmi_handle, |
| 3682 | param); |
| 3683 | |
| 3684 | return QDF_STATUS_E_FAILURE; |
| 3685 | } |
| 3686 | |
| 3687 | /** |
Jeevan Kukkalli | 0aeff78 | 2017-06-16 18:07:28 +0530 | [diff] [blame] | 3688 | * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function |
| 3689 | * @param wmi_hdl : handle to WMI. |
| 3690 | * @param param : pointer to hold bridge mac addr param |
| 3691 | * |
| 3692 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3693 | */ |
| 3694 | QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, |
| 3695 | struct set_bridge_mac_addr_params *param) |
| 3696 | { |
| 3697 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3698 | |
| 3699 | if (wmi_handle->ops->send_set_bridge_mac_addr_cmd) |
| 3700 | return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle, |
| 3701 | param); |
| 3702 | |
| 3703 | return QDF_STATUS_E_FAILURE; |
| 3704 | } |
| 3705 | |
| 3706 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3707 | * wmi_unified_peer_update_wds_entry_cmd_send() - WMI update wds entry cmd function |
| 3708 | * @param wmi_handle : handle to WMI. |
| 3709 | * @param param : pointer to hold wds entry param |
| 3710 | * |
| 3711 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3712 | */ |
| 3713 | QDF_STATUS wmi_unified_peer_update_wds_entry_cmd_send(void *wmi_hdl, |
| 3714 | struct peer_update_wds_entry_params *param) |
| 3715 | { |
| 3716 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3717 | |
| 3718 | if (wmi->ops->send_peer_update_wds_entry_cmd) |
| 3719 | return wmi->ops->send_peer_update_wds_entry_cmd(wmi, param); |
| 3720 | |
| 3721 | return QDF_STATUS_E_FAILURE; |
| 3722 | } |
| 3723 | |
| 3724 | /** |
| 3725 | * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function |
| 3726 | * @param wmi_handle : handle to WMI. |
| 3727 | * @param param : pointer to hold phyerr enable param |
| 3728 | * |
| 3729 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3730 | */ |
| 3731 | QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl) |
| 3732 | { |
| 3733 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3734 | |
| 3735 | if (wmi_handle->ops->send_phyerr_enable_cmd) |
| 3736 | return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle); |
| 3737 | |
| 3738 | return QDF_STATUS_E_FAILURE; |
| 3739 | } |
| 3740 | |
| 3741 | /** |
| 3742 | * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function |
| 3743 | * @param wmi_handle : handle to WMI. |
| 3744 | * @param param : pointer to hold phyerr disable param |
| 3745 | * |
| 3746 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3747 | */ |
| 3748 | QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl) |
| 3749 | { |
| 3750 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3751 | |
| 3752 | if (wmi_handle->ops->send_phyerr_disable_cmd) |
| 3753 | return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle); |
| 3754 | |
| 3755 | return QDF_STATUS_E_FAILURE; |
| 3756 | } |
| 3757 | |
| 3758 | /** |
| 3759 | * wmi_unified_smart_ant_enable_cmd_send() - WMI smart ant enable function |
| 3760 | * @param wmi_handle : handle to WMI. |
| 3761 | * @param param : pointer to hold antenna param |
| 3762 | * |
| 3763 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3764 | */ |
| 3765 | QDF_STATUS wmi_unified_smart_ant_enable_cmd_send(void *wmi_hdl, |
| 3766 | struct smart_ant_enable_params *param) |
| 3767 | { |
| 3768 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3769 | |
| 3770 | if (wmi_handle->ops->send_smart_ant_enable_cmd) |
| 3771 | return wmi_handle->ops->send_smart_ant_enable_cmd(wmi_handle, |
| 3772 | param); |
| 3773 | |
| 3774 | return QDF_STATUS_E_FAILURE; |
| 3775 | } |
| 3776 | |
| 3777 | /** |
| 3778 | * wmi_unified_smart_ant_set_rx_ant_cmd_send() - WMI set rx antenna function |
| 3779 | * @param wmi_handle : handle to WMI. |
| 3780 | * @param param : pointer to hold antenna param |
| 3781 | * |
| 3782 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3783 | */ |
| 3784 | QDF_STATUS wmi_unified_smart_ant_set_rx_ant_cmd_send(void *wmi_hdl, |
| 3785 | struct smart_ant_rx_ant_params *param) |
| 3786 | { |
| 3787 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3788 | |
| 3789 | if (wmi->ops->send_smart_ant_set_rx_ant_cmd) |
| 3790 | return wmi->ops->send_smart_ant_set_rx_ant_cmd(wmi, param); |
| 3791 | |
| 3792 | return QDF_STATUS_E_FAILURE; |
| 3793 | } |
| 3794 | |
| 3795 | /** |
| 3796 | * wmi_unified_smart_ant_set_tx_ant_cmd_send() - WMI set tx antenna function |
| 3797 | * @param wmi_handle : handle to WMI. |
| 3798 | * @param param : pointer to hold antenna param |
| 3799 | * |
| 3800 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3801 | */ |
| 3802 | QDF_STATUS wmi_unified_smart_ant_set_tx_ant_cmd_send(void *wmi_hdl, |
| 3803 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3804 | struct smart_ant_tx_ant_params *param) |
| 3805 | { |
| 3806 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3807 | |
| 3808 | if (wmi->ops->send_smart_ant_set_tx_ant_cmd) |
| 3809 | return wmi->ops->send_smart_ant_set_tx_ant_cmd(wmi, macaddr, |
| 3810 | param); |
| 3811 | |
| 3812 | return QDF_STATUS_E_FAILURE; |
| 3813 | } |
| 3814 | |
| 3815 | /** |
| 3816 | * wmi_unified_smart_ant_set_training_info_cmd_send() - WMI set tx antenna function |
| 3817 | * @param wmi_handle : handle to WMI. |
| 3818 | * @param param : pointer to hold antenna param |
| 3819 | * |
| 3820 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3821 | */ |
| 3822 | QDF_STATUS wmi_unified_smart_ant_set_training_info_cmd_send(void *wmi_hdl, |
| 3823 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3824 | struct smart_ant_training_info_params *param) |
| 3825 | { |
| 3826 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3827 | |
| 3828 | if (wmi->ops->send_smart_ant_set_training_info_cmd) |
| 3829 | return wmi->ops->send_smart_ant_set_training_info_cmd(wmi, |
| 3830 | macaddr, param); |
| 3831 | |
| 3832 | return QDF_STATUS_E_FAILURE; |
| 3833 | } |
| 3834 | |
| 3835 | /** |
| 3836 | * wmi_unified_smart_ant_node_config_cmd_send() - WMI set node config function |
| 3837 | * @param wmi_handle : handle to WMI. |
| 3838 | * @param macaddr : MAC address |
| 3839 | * @param param : pointer to hold node parameter |
| 3840 | * |
| 3841 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3842 | */ |
| 3843 | QDF_STATUS wmi_unified_smart_ant_node_config_cmd_send(void *wmi_hdl, |
| 3844 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3845 | struct smart_ant_node_config_params *param) |
| 3846 | { |
| 3847 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3848 | |
| 3849 | if (wmi->ops->send_smart_ant_set_node_config_cmd) |
| 3850 | return wmi->ops->send_smart_ant_set_node_config_cmd(wmi, |
| 3851 | macaddr, param); |
| 3852 | |
| 3853 | return QDF_STATUS_E_FAILURE; |
| 3854 | } |
| 3855 | |
| 3856 | /** |
| 3857 | * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function |
| 3858 | * @param wmi_handle : handle to WMI. |
| 3859 | * @param param : pointer to hold antenna param |
| 3860 | * |
| 3861 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3862 | */ |
| 3863 | QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, |
| 3864 | struct smart_ant_enable_tx_feedback_params *param) |
| 3865 | { |
| 3866 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3867 | |
| 3868 | if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd) |
| 3869 | return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi, |
| 3870 | param); |
| 3871 | |
| 3872 | return QDF_STATUS_E_FAILURE; |
| 3873 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 3874 | qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3875 | |
| 3876 | /** |
| 3877 | * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function |
| 3878 | * @param wmi_handle : handle to WMI. |
| 3879 | * @param param : pointer to hold spectral config param |
| 3880 | * |
| 3881 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3882 | */ |
| 3883 | QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, |
| 3884 | struct vdev_spectral_configure_params *param) |
| 3885 | { |
| 3886 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3887 | |
| 3888 | if (wmi->ops->send_vdev_spectral_configure_cmd) |
| 3889 | return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param); |
| 3890 | |
| 3891 | return QDF_STATUS_E_FAILURE; |
| 3892 | } |
| 3893 | |
| 3894 | /** |
| 3895 | * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function |
| 3896 | * @param wmi_handle : handle to WMI. |
| 3897 | * @param param : pointer to hold enable spectral param |
| 3898 | * |
| 3899 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3900 | */ |
| 3901 | QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, |
| 3902 | struct vdev_spectral_enable_params *param) |
| 3903 | { |
| 3904 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3905 | |
| 3906 | if (wmi->ops->send_vdev_spectral_enable_cmd) |
| 3907 | return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param); |
| 3908 | |
| 3909 | return QDF_STATUS_E_FAILURE; |
| 3910 | } |
| 3911 | |
| 3912 | /** |
| 3913 | * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function |
| 3914 | * @param wmi_handle : handle to WMI. |
| 3915 | * @param param : pointer to hold chan info param |
| 3916 | * |
| 3917 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3918 | */ |
| 3919 | QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, |
| 3920 | struct bss_chan_info_request_params *param) |
| 3921 | { |
| 3922 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3923 | |
| 3924 | if (wmi->ops->send_bss_chan_info_request_cmd) |
| 3925 | return wmi->ops->send_bss_chan_info_request_cmd(wmi, param); |
| 3926 | |
| 3927 | return QDF_STATUS_E_FAILURE; |
| 3928 | } |
| 3929 | |
| 3930 | /** |
| 3931 | * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function |
| 3932 | * @param wmi_handle : handle to WMI. |
| 3933 | * @param param : pointer to hold thermal mitigation param |
| 3934 | * |
| 3935 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3936 | */ |
| 3937 | QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, |
| 3938 | struct thermal_mitigation_params *param) |
| 3939 | { |
| 3940 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3941 | |
| 3942 | if (wmi->ops->send_thermal_mitigation_param_cmd) |
| 3943 | return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param); |
| 3944 | |
| 3945 | return QDF_STATUS_E_FAILURE; |
| 3946 | } |
| 3947 | |
| 3948 | /** |
| 3949 | * wmi_unified_vdev_set_neighbour_rx_cmd_send() - WMI set neighbour rx function |
| 3950 | * @param wmi_handle : handle to WMI. |
| 3951 | * @param macaddr : MAC address |
| 3952 | * @param param : pointer to hold neighbour rx parameter |
| 3953 | * |
| 3954 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3955 | */ |
| 3956 | QDF_STATUS wmi_unified_vdev_set_neighbour_rx_cmd_send(void *wmi_hdl, |
| 3957 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 3958 | struct set_neighbour_rx_params *param) |
| 3959 | { |
| 3960 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3961 | |
| 3962 | if (wmi->ops->send_vdev_set_neighbour_rx_cmd) |
| 3963 | return wmi->ops->send_vdev_set_neighbour_rx_cmd(wmi, |
| 3964 | macaddr, param); |
| 3965 | |
| 3966 | return QDF_STATUS_E_FAILURE; |
| 3967 | } |
| 3968 | |
| 3969 | /** |
| 3970 | * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function |
| 3971 | * @param wmi_handle : handle to WMI. |
| 3972 | * @param param : pointer to hold fwtest param |
| 3973 | * |
| 3974 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3975 | */ |
| 3976 | QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, |
| 3977 | struct set_fwtest_params *param) |
| 3978 | { |
| 3979 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3980 | |
| 3981 | if (wmi->ops->send_vdev_set_fwtest_param_cmd) |
| 3982 | return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param); |
| 3983 | |
| 3984 | return QDF_STATUS_E_FAILURE; |
| 3985 | } |
| 3986 | |
Subrat Mishra | d7c7a56 | 2017-09-27 14:41:20 +0530 | [diff] [blame] | 3987 | #ifdef WLAN_SUPPORT_FILS |
| 3988 | QDF_STATUS |
| 3989 | wmi_unified_fils_discovery_send_cmd(void *wmi_hdl, struct fd_params *param) |
| 3990 | { |
| 3991 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 3992 | |
| 3993 | if (wmi_handle->ops->send_fils_discovery_send_cmd) |
| 3994 | return wmi_handle->ops->send_fils_discovery_send_cmd(wmi_handle, |
| 3995 | param); |
| 3996 | |
| 3997 | return QDF_STATUS_E_FAILURE; |
| 3998 | } |
| 3999 | |
| 4000 | QDF_STATUS |
| 4001 | wmi_unified_fils_vdev_config_send_cmd(void *wmi_hdl, |
| 4002 | struct config_fils_params *param) |
| 4003 | { |
| 4004 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4005 | |
| 4006 | if (wmi->ops->send_vdev_fils_enable_cmd) |
| 4007 | return wmi->ops->send_vdev_fils_enable_cmd(wmi, param); |
| 4008 | |
| 4009 | return QDF_STATUS_E_FAILURE; |
| 4010 | } |
| 4011 | |
| 4012 | QDF_STATUS |
| 4013 | wmi_extract_swfda_vdev_id(void *wmi_hdl, void *evt_buf, |
| 4014 | uint32_t *vdev_id) |
| 4015 | { |
| 4016 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4017 | |
| 4018 | if (wmi_handle->ops->extract_swfda_vdev_id) |
| 4019 | return wmi_handle->ops->extract_swfda_vdev_id(wmi_handle, |
| 4020 | evt_buf, vdev_id); |
| 4021 | |
| 4022 | return QDF_STATUS_E_FAILURE; |
| 4023 | } |
| 4024 | #endif /* WLAN_SUPPORT_FILS */ |
| 4025 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4026 | /** |
| 4027 | * wmi_unified_vdev_config_ratemask_cmd_send() - WMI config ratemask function |
| 4028 | * @param wmi_handle : handle to WMI. |
| 4029 | * @param param : pointer to hold config ratemask param |
| 4030 | * |
| 4031 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4032 | */ |
| 4033 | QDF_STATUS wmi_unified_vdev_config_ratemask_cmd_send(void *wmi_hdl, |
| 4034 | struct config_ratemask_params *param) |
| 4035 | { |
| 4036 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4037 | |
| 4038 | if (wmi->ops->send_vdev_config_ratemask_cmd) |
| 4039 | return wmi->ops->send_vdev_config_ratemask_cmd(wmi, param); |
| 4040 | |
| 4041 | return QDF_STATUS_E_FAILURE; |
| 4042 | } |
| 4043 | |
| 4044 | /** |
Sathish Kumar | 6011c74 | 2017-11-08 14:49:58 +0530 | [diff] [blame] | 4045 | * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr |
| 4046 | * size function |
| 4047 | * @param wmi_handle : handle to WMI |
| 4048 | * @param param : pointer to hold custom aggr size param |
| 4049 | * |
| 4050 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 4051 | */ |
| 4052 | QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, |
| 4053 | struct set_custom_aggr_size_params *param) |
| 4054 | { |
| 4055 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4056 | |
| 4057 | if (wmi->ops->send_vdev_set_custom_aggr_size_cmd) |
| 4058 | return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param); |
| 4059 | |
| 4060 | return QDF_STATUS_E_FAILURE; |
| 4061 | } |
| 4062 | |
| 4063 | /** |
Venkateswara Swamy Bandaru | 9983ac5 | 2017-12-22 17:16:19 +0530 | [diff] [blame] | 4064 | * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold |
| 4065 | * @param wmi_handle : handle to WMI |
| 4066 | * @param param : pointer to hold qdepth threshold params |
| 4067 | * |
| 4068 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 4069 | */ |
| 4070 | QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, |
| 4071 | struct set_qdepth_thresh_params *param) |
| 4072 | { |
| 4073 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4074 | |
| 4075 | if (wmi->ops->send_vdev_set_qdepth_thresh_cmd) |
| 4076 | return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param); |
| 4077 | |
| 4078 | return QDF_STATUS_E_FAILURE; |
| 4079 | } |
| 4080 | |
| 4081 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4082 | * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function |
| 4083 | * @param wmi_handle : handle to WMI. |
| 4084 | * @param param : pointer to hold regdomain param |
| 4085 | * |
| 4086 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4087 | */ |
| 4088 | QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, |
| 4089 | struct pdev_set_regdomain_params *param) |
| 4090 | { |
| 4091 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4092 | |
| 4093 | if (wmi_handle->ops->send_pdev_set_regdomain_cmd) |
| 4094 | return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle, |
| 4095 | param); |
| 4096 | |
| 4097 | return QDF_STATUS_E_FAILURE; |
| 4098 | } |
| 4099 | |
| 4100 | /** |
| 4101 | * wmi_unified_set_quiet_mode_cmd_send() - WMI set quiet mode function |
| 4102 | * @param wmi_handle : handle to WMI. |
| 4103 | * @param param : pointer to hold quiet mode param |
| 4104 | * |
| 4105 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4106 | */ |
| 4107 | QDF_STATUS wmi_unified_set_quiet_mode_cmd_send(void *wmi_hdl, |
| 4108 | struct set_quiet_mode_params *param) |
| 4109 | { |
| 4110 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4111 | |
| 4112 | if (wmi_handle->ops->send_set_quiet_mode_cmd) |
| 4113 | return wmi_handle->ops->send_set_quiet_mode_cmd(wmi_handle, |
| 4114 | param); |
| 4115 | |
| 4116 | return QDF_STATUS_E_FAILURE; |
| 4117 | } |
| 4118 | |
| 4119 | /** |
| 4120 | * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function |
| 4121 | * @param wmi_handle : handle to WMI. |
| 4122 | * @param param : pointer to hold beacon filter param |
| 4123 | * |
| 4124 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4125 | */ |
| 4126 | QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, |
| 4127 | struct set_beacon_filter_params *param) |
| 4128 | { |
| 4129 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4130 | |
| 4131 | if (wmi_handle->ops->send_set_beacon_filter_cmd) |
| 4132 | return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle, |
| 4133 | param); |
| 4134 | |
| 4135 | return QDF_STATUS_E_FAILURE; |
| 4136 | } |
| 4137 | |
| 4138 | /** |
| 4139 | * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function |
| 4140 | * @param wmi_handle : handle to WMI. |
| 4141 | * @param param : pointer to hold beacon filter param |
| 4142 | * |
| 4143 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4144 | */ |
| 4145 | QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, |
| 4146 | struct remove_beacon_filter_params *param) |
| 4147 | { |
| 4148 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4149 | |
| 4150 | if (wmi->ops->send_remove_beacon_filter_cmd) |
| 4151 | return wmi->ops->send_remove_beacon_filter_cmd(wmi, param); |
| 4152 | |
| 4153 | return QDF_STATUS_E_FAILURE; |
| 4154 | } |
| 4155 | |
| 4156 | /** |
| 4157 | * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function |
| 4158 | * @param wmi_handle : handle to WMI. |
| 4159 | * @param macaddr : MAC address |
| 4160 | * @param param : pointer to hold mgmt parameter |
| 4161 | * |
| 4162 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4163 | */ |
| 4164 | #if 0 |
| 4165 | QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl, |
| 4166 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4167 | struct mgmt_params *param) |
| 4168 | { |
| 4169 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4170 | |
| 4171 | if (wmi_handle->ops->send_mgmt_cmd) |
| 4172 | return wmi_handle->ops->send_mgmt_cmd(wmi_handle, |
| 4173 | macaddr, param); |
| 4174 | |
| 4175 | return QDF_STATUS_E_FAILURE; |
| 4176 | } |
| 4177 | #endif |
| 4178 | |
| 4179 | /** |
| 4180 | * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function |
| 4181 | * @param wmi_handle : handle to WMI. |
| 4182 | * @param macaddr : MAC address |
| 4183 | * @param param : pointer to hold addba resp parameter |
| 4184 | * |
| 4185 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4186 | */ |
| 4187 | QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, |
| 4188 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4189 | struct addba_clearresponse_params *param) |
| 4190 | { |
| 4191 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4192 | |
| 4193 | if (wmi_handle->ops->send_addba_clearresponse_cmd) |
| 4194 | return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle, |
| 4195 | macaddr, param); |
| 4196 | |
| 4197 | return QDF_STATUS_E_FAILURE; |
| 4198 | } |
| 4199 | |
| 4200 | /** |
| 4201 | * wmi_unified_addba_send_cmd_send() - WMI addba send function |
| 4202 | * @param wmi_handle : handle to WMI. |
| 4203 | * @param macaddr : MAC address |
| 4204 | * @param param : pointer to hold addba parameter |
| 4205 | * |
| 4206 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4207 | */ |
| 4208 | QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, |
| 4209 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4210 | struct addba_send_params *param) |
| 4211 | { |
| 4212 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4213 | |
| 4214 | if (wmi_handle->ops->send_addba_send_cmd) |
| 4215 | return wmi_handle->ops->send_addba_send_cmd(wmi_handle, |
| 4216 | macaddr, param); |
| 4217 | |
| 4218 | return QDF_STATUS_E_FAILURE; |
| 4219 | } |
| 4220 | |
| 4221 | /** |
| 4222 | * wmi_unified_delba_send_cmd_send() - WMI delba cmd function |
| 4223 | * @param wmi_handle : handle to WMI. |
| 4224 | * @param macaddr : MAC address |
| 4225 | * @param param : pointer to hold delba parameter |
| 4226 | * |
| 4227 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4228 | */ |
| 4229 | QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, |
| 4230 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4231 | struct delba_send_params *param) |
| 4232 | { |
| 4233 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4234 | |
| 4235 | if (wmi_handle->ops->send_delba_send_cmd) |
| 4236 | return wmi_handle->ops->send_delba_send_cmd(wmi_handle, |
| 4237 | macaddr, param); |
| 4238 | |
| 4239 | return QDF_STATUS_E_FAILURE; |
| 4240 | } |
| 4241 | |
| 4242 | /** |
| 4243 | * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function |
| 4244 | * @param wmi_handle : handle to WMI. |
| 4245 | * @param macaddr : MAC address |
| 4246 | * @param param : pointer to hold addba set resp parameter |
| 4247 | * |
| 4248 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4249 | */ |
| 4250 | QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, |
| 4251 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4252 | struct addba_setresponse_params *param) |
| 4253 | { |
| 4254 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4255 | |
| 4256 | if (wmi_handle->ops->send_addba_setresponse_cmd) |
| 4257 | return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle, |
| 4258 | macaddr, param); |
| 4259 | |
| 4260 | return QDF_STATUS_E_FAILURE; |
| 4261 | } |
| 4262 | |
| 4263 | /** |
| 4264 | * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function |
| 4265 | * @param wmi_handle : handle to WMI. |
| 4266 | * @param macaddr : MAC address |
| 4267 | * @param param : pointer to hold singleamsdu parameter |
| 4268 | * |
| 4269 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4270 | */ |
| 4271 | QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, |
| 4272 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4273 | struct singleamsdu_params *param) |
| 4274 | { |
| 4275 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4276 | |
| 4277 | if (wmi_handle->ops->send_singleamsdu_cmd) |
| 4278 | return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle, |
| 4279 | macaddr, param); |
| 4280 | |
| 4281 | return QDF_STATUS_E_FAILURE; |
| 4282 | } |
| 4283 | |
| 4284 | /** |
| 4285 | * wmi_unified_set_qboost_param_cmd_send() - WMI set_qboost function |
| 4286 | * @param wmi_handle : handle to WMI. |
| 4287 | * @param macaddr : MAC address |
| 4288 | * @param param : pointer to hold set_qboost parameter |
| 4289 | * |
| 4290 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4291 | */ |
| 4292 | QDF_STATUS wmi_unified_set_qboost_param_cmd_send(void *wmi_hdl, |
| 4293 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 4294 | struct set_qboost_params *param) |
| 4295 | { |
| 4296 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4297 | |
| 4298 | if (wmi_handle->ops->send_set_qboost_param_cmd) |
| 4299 | return wmi_handle->ops->send_set_qboost_param_cmd(wmi_handle, |
| 4300 | macaddr, param); |
| 4301 | |
| 4302 | return QDF_STATUS_E_FAILURE; |
| 4303 | } |
| 4304 | |
| 4305 | /** |
| 4306 | * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function |
| 4307 | * @param wmi_handle : handle to WMI. |
| 4308 | * @param param : pointer to hold mu scan param |
| 4309 | * |
| 4310 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4311 | */ |
| 4312 | QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, |
| 4313 | struct mu_scan_params *param) |
| 4314 | { |
| 4315 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4316 | |
| 4317 | if (wmi_handle->ops->send_mu_scan_cmd) |
| 4318 | return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param); |
| 4319 | |
| 4320 | return QDF_STATUS_E_FAILURE; |
| 4321 | } |
| 4322 | |
| 4323 | /** |
| 4324 | * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function |
| 4325 | * @param wmi_handle : handle to WMI. |
| 4326 | * @param param : pointer to hold mu scan param |
| 4327 | * |
| 4328 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4329 | */ |
| 4330 | QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, |
| 4331 | struct lteu_config_params *param) |
| 4332 | { |
| 4333 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4334 | |
| 4335 | if (wmi_handle->ops->send_lteu_config_cmd) |
| 4336 | return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param); |
| 4337 | |
| 4338 | return QDF_STATUS_E_FAILURE; |
| 4339 | } |
| 4340 | |
| 4341 | /** |
| 4342 | * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function |
| 4343 | * @param wmi_handle : handle to WMI. |
| 4344 | * @param param : pointer to hold mu scan param |
| 4345 | * |
| 4346 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4347 | */ |
| 4348 | QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, |
| 4349 | struct set_ps_mode_params *param) |
| 4350 | { |
| 4351 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4352 | |
| 4353 | if (wmi_handle->ops->send_set_ps_mode_cmd) |
| 4354 | return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param); |
| 4355 | |
| 4356 | return QDF_STATUS_E_FAILURE; |
| 4357 | } |
| 4358 | |
| 4359 | /** |
| 4360 | * wmi_unified_init_cmd_send() - send initialization cmd to fw |
| 4361 | * @wmi_handle: wmi handle |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4362 | * @param param: pointer to wmi init param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4363 | * |
| 4364 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4365 | */ |
| 4366 | QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4367 | struct wmi_init_cmd_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4368 | { |
| 4369 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4370 | |
| 4371 | if (wmi_handle->ops->init_cmd_send) |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 4372 | return wmi_handle->ops->init_cmd_send(wmi_handle, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4373 | |
| 4374 | return QDF_STATUS_E_FAILURE; |
| 4375 | } |
| 4376 | |
| 4377 | /** |
| 4378 | * wmi_save_service_bitmap() - save service bitmap |
| 4379 | * @wmi_handle: wmi handle |
| 4380 | * @param evt_buf: pointer to event buffer |
| 4381 | * |
| 4382 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4383 | */ |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 4384 | QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 4385 | void *bitmap_buf) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4386 | { |
| 4387 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4388 | |
| 4389 | if (wmi_handle->ops->save_service_bitmap) { |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 4390 | return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf, |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 4391 | bitmap_buf); |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 4392 | } |
| 4393 | return QDF_STATUS_E_FAILURE; |
| 4394 | } |
| 4395 | |
| 4396 | /** |
| 4397 | * wmi_save_ext_service_bitmap() - save extended service bitmap |
| 4398 | * @wmi_handle: wmi handle |
| 4399 | * @param evt_buf: pointer to event buffer |
| 4400 | * |
| 4401 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4402 | */ |
| 4403 | QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 4404 | void *bitmap_buf) |
| 4405 | { |
| 4406 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4407 | |
| 4408 | if (wmi_handle->ops->save_ext_service_bitmap) { |
| 4409 | return wmi_handle->ops->save_ext_service_bitmap(wmi_handle, |
| 4410 | evt_buf, bitmap_buf); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4411 | } |
| 4412 | return QDF_STATUS_E_FAILURE; |
| 4413 | } |
| 4414 | |
| 4415 | /** |
| 4416 | * wmi_save_fw_version() - Save fw version |
| 4417 | * @wmi_handle: wmi handle |
| 4418 | * @param evt_buf: pointer to event buffer |
| 4419 | * |
| 4420 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4421 | */ |
| 4422 | QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf) |
| 4423 | { |
| 4424 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4425 | |
| 4426 | if (wmi_handle->ops->save_fw_version) { |
| 4427 | wmi_handle->ops->save_fw_version(wmi_handle, evt_buf); |
| 4428 | return 0; |
| 4429 | } |
| 4430 | return QDF_STATUS_E_FAILURE; |
| 4431 | |
| 4432 | } |
| 4433 | |
| 4434 | /** |
| 4435 | * wmi_check_and_update_fw_version() - Ready and fw version check |
| 4436 | * @wmi_handle: wmi handle |
| 4437 | * @param evt_buf: pointer to event buffer |
| 4438 | * |
| 4439 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4440 | */ |
| 4441 | QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf) |
| 4442 | { |
| 4443 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 4444 | |
| 4445 | if (wmi_handle->ops->check_and_update_fw_version) |
| 4446 | return wmi_handle->ops->check_and_update_fw_version(wmi_handle, |
| 4447 | evt_buf); |
| 4448 | |
| 4449 | return QDF_STATUS_E_FAILURE; |
| 4450 | |
| 4451 | } |
| 4452 | |
| 4453 | /** |
| 4454 | * wmi_service_enabled() - Check if service enabled |
| 4455 | * @param wmi_handle: wmi handle |
| 4456 | * @param service_id: service identifier |
| 4457 | * |
| 4458 | * Return: 1 enabled, 0 disabled |
| 4459 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4460 | bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id) |
| 4461 | { |
| 4462 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4463 | |
| 4464 | if ((service_id < wmi_services_max) && |
| 4465 | (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) { |
| 4466 | if (wmi_handle->ops->is_service_enabled) { |
| 4467 | return wmi_handle->ops->is_service_enabled(wmi_handle, |
| 4468 | wmi_handle->services[service_id]); |
| 4469 | } |
| 4470 | } else { |
Sathish Kumar | 686d08d | 2018-06-26 11:01:11 +0530 | [diff] [blame] | 4471 | WMI_LOGI("Service %d not supported", service_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4472 | } |
Sourav Mohapatra | a7b454d | 2017-12-03 11:44:44 +0530 | [diff] [blame] | 4473 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4474 | return false; |
| 4475 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4476 | |
| 4477 | /** |
| 4478 | * wmi_get_target_cap_from_service_ready() - extract service ready event |
| 4479 | * @wmi_handle: wmi handle |
| 4480 | * @param evt_buf: pointer to received event buffer |
| 4481 | * @param ev: pointer to hold target capability information extracted from even |
| 4482 | * |
| 4483 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4484 | */ |
| 4485 | QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 4486 | void *evt_buf, struct wlan_psoc_target_capability_info *ev) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4487 | { |
| 4488 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4489 | |
| 4490 | if (wmi->ops->get_target_cap_from_service_ready) |
| 4491 | return wmi->ops->get_target_cap_from_service_ready(wmi, |
| 4492 | evt_buf, ev); |
| 4493 | |
| 4494 | return QDF_STATUS_E_FAILURE; |
| 4495 | } |
| 4496 | |
| 4497 | /** |
| 4498 | * wmi_extract_fw_version() - extract fw version |
| 4499 | * @wmi_handle: wmi handle |
| 4500 | * @param evt_buf: pointer to event buffer |
| 4501 | * @param fw_ver: Pointer to hold fw version |
| 4502 | * |
| 4503 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4504 | */ |
| 4505 | QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, |
| 4506 | void *evt_buf, struct wmi_host_fw_ver *fw_ver) |
| 4507 | { |
| 4508 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4509 | |
| 4510 | if (wmi_handle->ops->extract_fw_version) |
| 4511 | return wmi_handle->ops->extract_fw_version(wmi_handle, |
| 4512 | evt_buf, fw_ver); |
| 4513 | |
| 4514 | return QDF_STATUS_E_FAILURE; |
| 4515 | } |
| 4516 | |
| 4517 | /** |
| 4518 | * wmi_extract_fw_abi_version() - extract fw abi version |
| 4519 | * @wmi_handle: wmi handle |
| 4520 | * @param evt_buf: Pointer to event buffer |
| 4521 | * @param fw_ver: Pointer to hold fw abi version |
| 4522 | * |
| 4523 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4524 | */ |
| 4525 | QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, |
| 4526 | void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver) |
| 4527 | { |
| 4528 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4529 | |
| 4530 | if (wmi_handle->ops->extract_fw_abi_version) |
| 4531 | return wmi_handle->ops->extract_fw_abi_version(wmi_handle, |
| 4532 | evt_buf, fw_ver); |
| 4533 | |
| 4534 | return QDF_STATUS_E_FAILURE; |
| 4535 | } |
| 4536 | |
| 4537 | /** |
| 4538 | * wmi_extract_hal_reg_cap() - extract HAL registered capabilities |
| 4539 | * @wmi_handle: wmi handle |
| 4540 | * @param evt_buf: Pointer to event buffer |
| 4541 | * @param hal_reg_cap: pointer to hold HAL reg capabilities |
| 4542 | * |
| 4543 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4544 | */ |
| 4545 | 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] | 4546 | struct wlan_psoc_hal_reg_capability *hal_reg_cap) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4547 | { |
| 4548 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4549 | |
| 4550 | if (wmi_handle->ops->extract_hal_reg_cap) |
| 4551 | return wmi_handle->ops->extract_hal_reg_cap(wmi_handle, |
| 4552 | evt_buf, hal_reg_cap); |
| 4553 | |
| 4554 | return QDF_STATUS_E_FAILURE; |
| 4555 | } |
| 4556 | |
| 4557 | /** |
| 4558 | * wmi_extract_host_mem_req_from_service_ready() - Extract host memory |
| 4559 | * request event |
| 4560 | * @wmi_handle: wmi handle |
| 4561 | * @param evt_buf: pointer to event buffer |
| 4562 | * @param num_entries: pointer to hold number of entries requested |
| 4563 | * |
| 4564 | * Return: Number of entries requested |
| 4565 | */ |
| 4566 | host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, |
| 4567 | void *evt_buf, uint8_t *num_entries) |
| 4568 | { |
| 4569 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4570 | |
| 4571 | if (wmi_handle->ops->extract_host_mem_req) |
| 4572 | return wmi_handle->ops->extract_host_mem_req(wmi_handle, |
| 4573 | evt_buf, num_entries); |
| 4574 | |
| 4575 | *num_entries = 0; |
| 4576 | return NULL; |
| 4577 | } |
| 4578 | |
| 4579 | /** |
| 4580 | * wmi_ready_extract_init_status() - Extract init status from ready event |
| 4581 | * @wmi_handle: wmi handle |
| 4582 | * @param ev: Pointer to event buffer |
| 4583 | * |
| 4584 | * Return: ready status |
| 4585 | */ |
| 4586 | uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev) |
| 4587 | { |
| 4588 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4589 | |
| 4590 | if (wmi_handle->ops->ready_extract_init_status) |
| 4591 | return wmi_handle->ops->ready_extract_init_status(wmi_handle, |
| 4592 | ev); |
| 4593 | |
| 4594 | |
| 4595 | return 1; |
| 4596 | |
| 4597 | } |
| 4598 | |
| 4599 | /** |
| 4600 | * wmi_ready_extract_mac_addr() - extract mac address from ready event |
| 4601 | * @wmi_handle: wmi handle |
| 4602 | * @param ev: pointer to event buffer |
| 4603 | * @param macaddr: Pointer to hold MAC address |
| 4604 | * |
| 4605 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4606 | */ |
| 4607 | QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr) |
| 4608 | { |
| 4609 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4610 | |
| 4611 | if (wmi_handle->ops->ready_extract_mac_addr) |
| 4612 | return wmi_handle->ops->ready_extract_mac_addr(wmi_handle, |
| 4613 | ev, macaddr); |
| 4614 | |
| 4615 | |
| 4616 | return QDF_STATUS_E_FAILURE; |
| 4617 | } |
| 4618 | |
| 4619 | /** |
Manoj Ekbote | dd27390 | 2017-07-09 23:28:56 -0700 | [diff] [blame] | 4620 | * wmi_ready_extract_mac_addr() - extract MAC address list from ready event |
| 4621 | * @wmi_handle: wmi handle |
| 4622 | * @param ev: pointer to event buffer |
| 4623 | * @param num_mac_addr: Pointer to number of entries |
| 4624 | * |
| 4625 | * Return: address to start of mac addr list |
| 4626 | */ |
| 4627 | wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, |
| 4628 | uint8_t *num_mac_addr) |
| 4629 | { |
| 4630 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4631 | |
| 4632 | if (wmi_handle->ops->ready_extract_mac_addr_list) |
| 4633 | return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle, |
| 4634 | ev, num_mac_addr); |
| 4635 | |
| 4636 | *num_mac_addr = 0; |
| 4637 | |
| 4638 | return NULL; |
| 4639 | } |
| 4640 | |
| 4641 | /** |
Kiran Venkatappa | 094c24f | 2017-11-10 20:50:12 +0530 | [diff] [blame] | 4642 | * wmi_extract_ready_params() - Extract data from ready event apart from |
| 4643 | * status, macaddr and version. |
| 4644 | * @wmi_handle: Pointer to WMI handle. |
| 4645 | * @evt_buf: Pointer to Ready event buffer. |
| 4646 | * @ev_param: Pointer to host defined struct to copy the data from event. |
| 4647 | * |
| 4648 | * Return: QDF_STATUS_SUCCESS on success. |
| 4649 | */ |
| 4650 | QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, |
| 4651 | void *evt_buf, struct wmi_host_ready_ev_param *ev_param) |
| 4652 | { |
| 4653 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4654 | |
| 4655 | if (wmi_handle->ops->extract_ready_event_params) |
| 4656 | return wmi_handle->ops->extract_ready_event_params(wmi_handle, |
| 4657 | evt_buf, ev_param); |
| 4658 | |
| 4659 | return QDF_STATUS_E_FAILURE; |
| 4660 | } |
| 4661 | |
| 4662 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4663 | * wmi_extract_dbglog_data_len() - extract debuglog data length |
| 4664 | * @wmi_handle: wmi handle |
| 4665 | * @param evt_buf: pointer to event buffer |
| 4666 | * @param len: length of buffer |
| 4667 | * |
| 4668 | * Return: length |
| 4669 | */ |
| 4670 | 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] | 4671 | uint32_t *len) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4672 | { |
| 4673 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4674 | |
| 4675 | if (wmi_handle->ops->extract_dbglog_data_len) |
| 4676 | return wmi_handle->ops->extract_dbglog_data_len(wmi_handle, |
| 4677 | evt_buf, len); |
| 4678 | |
| 4679 | |
| 4680 | return NULL; |
| 4681 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 4682 | qdf_export_symbol(wmi_extract_dbglog_data_len); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4683 | |
| 4684 | /** |
| 4685 | * wmi_send_ext_resource_config() - send extended resource configuration |
| 4686 | * @wmi_handle: wmi handle |
| 4687 | * @param ext_cfg: pointer to extended resource configuration |
| 4688 | * |
| 4689 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4690 | */ |
| 4691 | QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, |
| 4692 | wmi_host_ext_resource_config *ext_cfg) |
| 4693 | { |
| 4694 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4695 | |
| 4696 | if (wmi_handle->ops->send_ext_resource_config) |
| 4697 | return wmi_handle->ops->send_ext_resource_config(wmi_handle, |
| 4698 | ext_cfg); |
| 4699 | |
| 4700 | return QDF_STATUS_E_FAILURE; |
| 4701 | } |
| 4702 | |
| 4703 | /** |
| 4704 | * wmi_unified_nf_dbr_dbm_info_get_cmd_send() - WMI request nf info function |
| 4705 | * @param wmi_handle : handle to WMI. |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4706 | * @mac_id: mac_id |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4707 | * |
| 4708 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4709 | */ |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4710 | QDF_STATUS wmi_unified_nf_dbr_dbm_info_get_cmd_send(void *wmi_hdl, |
| 4711 | uint8_t mac_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4712 | { |
| 4713 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4714 | |
| 4715 | if (wmi->ops->send_nf_dbr_dbm_info_get_cmd) |
nobelj | f74583b | 2018-01-25 16:35:36 -0800 | [diff] [blame] | 4716 | 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] | 4717 | |
| 4718 | return QDF_STATUS_E_FAILURE; |
| 4719 | } |
| 4720 | |
| 4721 | /** |
| 4722 | * wmi_unified_packet_power_info_get_cmd_send() - WMI get packet power info function |
| 4723 | * @param wmi_handle : handle to WMI. |
| 4724 | * @param param : pointer to hold packet power info param |
| 4725 | * |
| 4726 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4727 | */ |
| 4728 | QDF_STATUS wmi_unified_packet_power_info_get_cmd_send(void *wmi_hdl, |
| 4729 | struct packet_power_info_params *param) |
| 4730 | { |
| 4731 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4732 | |
| 4733 | if (wmi->ops->send_packet_power_info_get_cmd) |
| 4734 | return wmi->ops->send_packet_power_info_get_cmd(wmi, param); |
| 4735 | |
| 4736 | return QDF_STATUS_E_FAILURE; |
| 4737 | } |
| 4738 | |
| 4739 | /** |
| 4740 | * wmi_unified_gpio_config_cmd_send() - WMI gpio config function |
| 4741 | * @param wmi_handle : handle to WMI. |
| 4742 | * @param param : pointer to hold gpio config param |
| 4743 | * |
| 4744 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4745 | */ |
| 4746 | QDF_STATUS wmi_unified_gpio_config_cmd_send(void *wmi_hdl, |
| 4747 | struct gpio_config_params *param) |
| 4748 | { |
| 4749 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4750 | |
| 4751 | if (wmi_handle->ops->send_gpio_config_cmd) |
| 4752 | return wmi_handle->ops->send_gpio_config_cmd(wmi_handle, param); |
| 4753 | |
| 4754 | return QDF_STATUS_E_FAILURE; |
| 4755 | } |
| 4756 | |
| 4757 | /** |
| 4758 | * wmi_unified_gpio_output_cmd_send() - WMI gpio config function |
| 4759 | * @param wmi_handle : handle to WMI. |
| 4760 | * @param param : pointer to hold gpio config param |
| 4761 | * |
| 4762 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4763 | */ |
| 4764 | QDF_STATUS wmi_unified_gpio_output_cmd_send(void *wmi_hdl, |
| 4765 | struct gpio_output_params *param) |
| 4766 | { |
| 4767 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4768 | |
| 4769 | if (wmi_handle->ops->send_gpio_output_cmd) |
| 4770 | return wmi_handle->ops->send_gpio_output_cmd(wmi_handle, param); |
| 4771 | |
| 4772 | return QDF_STATUS_E_FAILURE; |
| 4773 | } |
| 4774 | |
| 4775 | /** |
| 4776 | * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function |
| 4777 | * @param wmi_handle : handle to WMI. |
| 4778 | * @param param : pointer to hold rtt meas req test param |
| 4779 | * |
| 4780 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4781 | */ |
| 4782 | QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, |
| 4783 | struct rtt_meas_req_test_params *param) |
| 4784 | { |
| 4785 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4786 | |
| 4787 | if (wmi_handle->ops->send_rtt_meas_req_test_cmd) |
| 4788 | return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle, |
| 4789 | param); |
| 4790 | |
| 4791 | return QDF_STATUS_E_FAILURE; |
| 4792 | } |
| 4793 | |
| 4794 | /** |
| 4795 | * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function |
| 4796 | * @param wmi_handle : handle to WMI. |
| 4797 | * @param param : pointer to hold rtt meas req param |
| 4798 | * |
| 4799 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4800 | */ |
| 4801 | QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, |
| 4802 | struct rtt_meas_req_params *param) |
| 4803 | { |
| 4804 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4805 | |
| 4806 | if (wmi_handle->ops->send_rtt_meas_req_cmd) |
| 4807 | return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle, |
| 4808 | param); |
| 4809 | |
| 4810 | return QDF_STATUS_E_FAILURE; |
| 4811 | } |
| 4812 | |
| 4813 | /** |
| 4814 | * wmi_unified_lci_set_cmd_send() - WMI lci set function |
| 4815 | * @param wmi_handle : handle to WMI. |
| 4816 | * @param param : pointer to hold lci param |
| 4817 | * |
| 4818 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4819 | */ |
| 4820 | QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, |
| 4821 | struct lci_set_params *param) |
| 4822 | { |
| 4823 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4824 | |
| 4825 | if (wmi_handle->ops->send_lci_set_cmd) |
| 4826 | return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param); |
| 4827 | |
| 4828 | return QDF_STATUS_E_FAILURE; |
| 4829 | } |
| 4830 | |
| 4831 | /** |
| 4832 | * wmi_unified_lcr_set_cmd_send() - WMI lcr set function |
| 4833 | * @param wmi_handle : handle to WMI. |
| 4834 | * @param param : pointer to hold lcr param |
| 4835 | * |
| 4836 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4837 | */ |
| 4838 | QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, |
| 4839 | struct lcr_set_params *param) |
| 4840 | { |
| 4841 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4842 | |
| 4843 | if (wmi_handle->ops->send_lcr_set_cmd) |
| 4844 | return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param); |
| 4845 | |
| 4846 | return QDF_STATUS_E_FAILURE; |
| 4847 | } |
| 4848 | |
| 4849 | /** |
| 4850 | * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function |
| 4851 | * @param wmi_handle : handle to WMI. |
| 4852 | * @param param : pointer to hold rtt meas req test param |
| 4853 | * |
| 4854 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4855 | */ |
| 4856 | QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, |
| 4857 | struct rtt_keepalive_req_params *param) |
| 4858 | { |
| 4859 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4860 | |
| 4861 | if (wmi_handle->ops->send_rtt_keepalive_req_cmd) |
| 4862 | return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle, |
| 4863 | param); |
| 4864 | |
| 4865 | return QDF_STATUS_E_FAILURE; |
| 4866 | } |
| 4867 | |
| 4868 | /** |
| 4869 | * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd |
| 4870 | * to fw |
| 4871 | * @wmi_handle: wmi handle |
| 4872 | * @param: pointer to hold periodic chan stats param |
| 4873 | * |
| 4874 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4875 | */ |
| 4876 | QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, |
| 4877 | struct periodic_chan_stats_params *param) |
| 4878 | { |
| 4879 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 4880 | |
| 4881 | if (wmi->ops->send_periodic_chan_stats_config_cmd) |
| 4882 | return wmi->ops->send_periodic_chan_stats_config_cmd(wmi, |
| 4883 | param); |
| 4884 | |
| 4885 | return QDF_STATUS_E_FAILURE; |
| 4886 | } |
| 4887 | |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4888 | #ifdef WLAN_ATF_ENABLE |
| 4889 | /** |
| 4890 | * wmi_unified_set_atf_cmd_send() - WMI set atf function |
| 4891 | * @param wmi_handle : handle to WMI. |
| 4892 | * @param param : pointer to set atf param |
| 4893 | * |
| 4894 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4895 | */ |
| 4896 | QDF_STATUS |
| 4897 | wmi_unified_set_atf_cmd_send(void *wmi_hdl, |
| 4898 | struct set_atf_params *param) |
| 4899 | { |
| 4900 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4901 | |
| 4902 | if (wmi_handle->ops->send_set_atf_cmd) |
| 4903 | return wmi_handle->ops->send_set_atf_cmd(wmi_handle, param); |
| 4904 | |
| 4905 | return QDF_STATUS_E_FAILURE; |
| 4906 | } |
| 4907 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4908 | /** |
| 4909 | * wmi_send_atf_peer_request_cmd() - send atf peer request command to fw |
| 4910 | * @wmi_handle: wmi handle |
| 4911 | * @param: pointer to atf peer request param |
| 4912 | * |
| 4913 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4914 | */ |
| 4915 | QDF_STATUS |
| 4916 | wmi_send_atf_peer_request_cmd(void *wmi_hdl, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4917 | struct atf_peer_request_params *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4918 | { |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4919 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4920 | |
| 4921 | if (wmi_handle->ops->send_atf_peer_request_cmd) |
| 4922 | return wmi_handle->ops->send_atf_peer_request_cmd(wmi_handle, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4923 | param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4924 | |
| 4925 | return QDF_STATUS_E_FAILURE; |
| 4926 | } |
| 4927 | |
| 4928 | /** |
| 4929 | * wmi_send_set_atf_grouping_cmd() - send set atf grouping command to fw |
| 4930 | * @wmi_handle: wmi handle |
| 4931 | * @param: pointer to set atf grouping param |
| 4932 | * |
| 4933 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4934 | */ |
| 4935 | QDF_STATUS |
| 4936 | wmi_send_set_atf_grouping_cmd(void *wmi_hdl, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4937 | struct atf_grouping_params *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4938 | { |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4939 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4940 | |
| 4941 | if (wmi_handle->ops->send_set_atf_grouping_cmd) |
| 4942 | return wmi_handle->ops->send_set_atf_grouping_cmd(wmi_handle, |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4943 | param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4944 | |
| 4945 | return QDF_STATUS_E_FAILURE; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 4946 | } |
| 4947 | |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 4948 | /** |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 4949 | * wmi_send_set_atf_group_ac_cmd() - send set atf AC command to fw |
| 4950 | * @wmi_handle: wmi handle |
| 4951 | * @param: pointer to set atf AC group param |
| 4952 | * |
| 4953 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4954 | */ |
| 4955 | QDF_STATUS |
| 4956 | wmi_send_set_atf_group_ac_cmd(void *wmi_hdl, |
| 4957 | struct atf_group_ac_params *param) |
| 4958 | { |
| 4959 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4960 | |
| 4961 | if (wmi_handle->ops->send_set_atf_group_ac_cmd) |
| 4962 | return wmi_handle->ops->send_set_atf_group_ac_cmd(wmi_handle, |
| 4963 | param); |
| 4964 | |
| 4965 | return QDF_STATUS_E_FAILURE; |
| 4966 | } |
| 4967 | |
| 4968 | /** |
| 4969 | * wmi_extract_atf_peer_stats_ev() - extract atf peer stats |
| 4970 | * from event |
| 4971 | * @wmi_handle: wmi handle |
| 4972 | * @param evt_buf: pointer to event buffer |
| 4973 | * @param ev: Pointer to hold atf peer stats |
| 4974 | * |
| 4975 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4976 | */ |
| 4977 | QDF_STATUS |
| 4978 | wmi_extract_atf_peer_stats_ev(void *wmi_hdl, void *evt_buf, |
| 4979 | wmi_host_atf_peer_stats_event *ev) |
| 4980 | { |
| 4981 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4982 | |
| 4983 | if (wmi->ops->extract_atf_peer_stats_ev) |
| 4984 | return wmi->ops->extract_atf_peer_stats_ev(wmi, evt_buf, ev); |
| 4985 | |
| 4986 | return QDF_STATUS_E_FAILURE; |
| 4987 | } |
| 4988 | |
| 4989 | /** |
| 4990 | * wmi_extract_atf_token_info_ev() - extract atf token info |
| 4991 | * from event |
| 4992 | * @wmi_handle: wmi handle |
| 4993 | * @param evt_buf: pointer to event buffer |
| 4994 | * @param idx: Index indicating the peer number |
| 4995 | * @param ev: Pointer to hold atf token info |
| 4996 | * |
| 4997 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4998 | */ |
| 4999 | QDF_STATUS |
| 5000 | wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, uint8_t idx, |
| 5001 | wmi_host_atf_peer_stats_info *ev) |
| 5002 | { |
| 5003 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 5004 | |
| 5005 | if (wmi->ops->extract_atf_token_info_ev) |
| 5006 | return wmi->ops->extract_atf_token_info_ev(wmi, evt_buf, |
| 5007 | idx, ev); |
| 5008 | |
| 5009 | return QDF_STATUS_E_FAILURE; |
| 5010 | } |
| 5011 | #endif /* WLAN_ATF_ENABLE */ |
| 5012 | |
| 5013 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5014 | * wmi_send_get_user_position_cmd() - send get user position command to fw |
| 5015 | * @wmi_handle: wmi handle |
| 5016 | * |
| 5017 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5018 | */ |
| 5019 | QDF_STATUS |
| 5020 | wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value) |
| 5021 | { |
| 5022 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5023 | |
| 5024 | if (wmi_handle->ops->send_get_user_position_cmd) |
| 5025 | return wmi_handle->ops->send_get_user_position_cmd(wmi_handle, |
| 5026 | value); |
| 5027 | |
| 5028 | return QDF_STATUS_E_FAILURE; |
| 5029 | } |
| 5030 | |
| 5031 | /** |
| 5032 | * wmi_send_get_peer_mumimo_tx_count_cmd() - send get mumio tx count |
| 5033 | * command to fw |
| 5034 | * @wmi_handle: wmi handle |
| 5035 | * @value: user pos value |
| 5036 | * |
| 5037 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5038 | */ |
| 5039 | QDF_STATUS |
| 5040 | wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 5041 | { |
| 5042 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5043 | |
| 5044 | if (wmi->ops->send_get_peer_mumimo_tx_count_cmd) |
| 5045 | return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value); |
| 5046 | |
| 5047 | return QDF_STATUS_E_FAILURE; |
| 5048 | } |
| 5049 | |
| 5050 | /** |
| 5051 | * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo |
| 5052 | * tx count to fw |
| 5053 | * @wmi_handle: wmi handle |
| 5054 | * @value: reset tx count value |
| 5055 | * |
| 5056 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5057 | */ |
| 5058 | QDF_STATUS |
| 5059 | wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 5060 | { |
| 5061 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5062 | |
| 5063 | if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd) |
| 5064 | return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi, |
| 5065 | value); |
| 5066 | |
| 5067 | return QDF_STATUS_E_FAILURE; |
| 5068 | } |
| 5069 | |
| 5070 | /** |
| 5071 | * wmi_send_pdev_caldata_version_check_cmd() - send reset peer mumimo |
| 5072 | * tx count to fw |
| 5073 | * @wmi_handle: wmi handle |
| 5074 | * @value: value |
| 5075 | * |
| 5076 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5077 | */ |
| 5078 | QDF_STATUS |
| 5079 | wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value) |
| 5080 | { |
| 5081 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5082 | |
| 5083 | if (wmi->ops->send_pdev_caldata_version_check_cmd) |
| 5084 | return wmi->ops->send_pdev_caldata_version_check_cmd(wmi, |
| 5085 | value); |
| 5086 | |
| 5087 | return QDF_STATUS_E_FAILURE; |
| 5088 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5089 | |
| 5090 | /* Extract - APIs */ |
| 5091 | /** |
| 5092 | * wmi_extract_wds_addr_event - Extract WDS addr WMI event |
| 5093 | * |
| 5094 | * @param wmi_handle : handle to WMI. |
| 5095 | * @param evt_buf : pointer to event buffer |
| 5096 | * @param len : length of the event buffer |
| 5097 | * @param wds_ev: pointer to strct to extract |
| 5098 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5099 | */ |
| 5100 | QDF_STATUS wmi_extract_wds_addr_event(void *wmi_hdl, void *evt_buf, |
| 5101 | uint16_t len, wds_addr_event_t *wds_ev) |
| 5102 | { |
| 5103 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5104 | |
| 5105 | if (wmi_handle->ops->extract_wds_addr_event) { |
| 5106 | return wmi_handle->ops->extract_wds_addr_event(wmi_handle, |
| 5107 | evt_buf, len, wds_ev); |
| 5108 | } |
| 5109 | return QDF_STATUS_E_FAILURE; |
| 5110 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 5111 | qdf_export_symbol(wmi_extract_wds_addr_event); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5112 | |
| 5113 | /** |
| 5114 | * wmi_extract_dcs_interference_type() - extract dcs interference type |
| 5115 | * @wmi_handle: wmi handle |
| 5116 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5117 | * @param param: Pointer to hold dcs interference param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5118 | * |
| 5119 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5120 | */ |
| 5121 | QDF_STATUS wmi_extract_dcs_interference_type(void *wmi_hdl, |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5122 | void *evt_buf, struct wmi_host_dcs_interference_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5123 | { |
| 5124 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5125 | |
| 5126 | if (wmi->ops->extract_dcs_interference_type) { |
| 5127 | return wmi->ops->extract_dcs_interference_type(wmi, |
Kiran Venkatappa | fea8a80 | 2016-12-29 18:09:32 +0530 | [diff] [blame] | 5128 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5129 | } |
| 5130 | return QDF_STATUS_E_FAILURE; |
| 5131 | } |
| 5132 | |
| 5133 | /* |
| 5134 | * wmi_extract_dcs_cw_int() - extract dcs cw interference from event |
| 5135 | * @wmi_handle: wmi handle |
| 5136 | * @param evt_buf: pointer to event buffer |
| 5137 | * @param cw_int: Pointer to hold cw interference |
| 5138 | * |
| 5139 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5140 | */ |
| 5141 | QDF_STATUS wmi_extract_dcs_cw_int(void *wmi_hdl, void *evt_buf, |
| 5142 | wmi_host_ath_dcs_cw_int *cw_int) |
| 5143 | { |
| 5144 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5145 | |
| 5146 | if (wmi_handle->ops->extract_dcs_cw_int) { |
| 5147 | return wmi_handle->ops->extract_dcs_cw_int(wmi_handle, |
| 5148 | evt_buf, cw_int); |
| 5149 | } |
| 5150 | return QDF_STATUS_E_FAILURE; |
| 5151 | } |
| 5152 | |
| 5153 | /** |
| 5154 | * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats from event |
| 5155 | * @wmi_handle: wmi handle |
| 5156 | * @param evt_buf: pointer to event buffer |
| 5157 | * @param wlan_stat: Pointer to hold wlan stats |
| 5158 | * |
| 5159 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5160 | */ |
| 5161 | QDF_STATUS wmi_extract_dcs_im_tgt_stats(void *wmi_hdl, void *evt_buf, |
| 5162 | wmi_host_dcs_im_tgt_stats_t *wlan_stat) |
| 5163 | { |
| 5164 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5165 | |
| 5166 | if (wmi_handle->ops->extract_dcs_im_tgt_stats) { |
| 5167 | return wmi_handle->ops->extract_dcs_im_tgt_stats(wmi_handle, |
| 5168 | evt_buf, wlan_stat); |
| 5169 | } |
| 5170 | return QDF_STATUS_E_FAILURE; |
| 5171 | } |
| 5172 | |
| 5173 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5174 | * wmi_extract_fips_event_data() - extract fips event data |
| 5175 | * @wmi_handle: wmi handle |
| 5176 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 5177 | * @param param: pointer to FIPS event param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5178 | * |
| 5179 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5180 | */ |
| 5181 | 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] | 5182 | struct wmi_host_fips_event_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5183 | { |
| 5184 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5185 | |
| 5186 | if (wmi_handle->ops->extract_fips_event_data) { |
| 5187 | return wmi_handle->ops->extract_fips_event_data(wmi_handle, |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 5188 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5189 | } |
| 5190 | return QDF_STATUS_E_FAILURE; |
| 5191 | } |
| 5192 | |
| 5193 | /** |
| 5194 | * wmi_extract_vdev_start_resp() - extract vdev start response |
| 5195 | * @wmi_handle: wmi handle |
| 5196 | * @param evt_buf: pointer to event buffer |
| 5197 | * @param vdev_rsp: Pointer to hold vdev response |
| 5198 | * |
| 5199 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5200 | */ |
| 5201 | QDF_STATUS wmi_extract_vdev_start_resp(void *wmi_hdl, void *evt_buf, |
| 5202 | wmi_host_vdev_start_resp *vdev_rsp) |
| 5203 | { |
| 5204 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5205 | |
| 5206 | if (wmi_handle->ops->extract_vdev_start_resp) |
| 5207 | return wmi_handle->ops->extract_vdev_start_resp(wmi_handle, |
| 5208 | evt_buf, vdev_rsp); |
| 5209 | |
| 5210 | return QDF_STATUS_E_FAILURE; |
| 5211 | } |
| 5212 | |
| 5213 | /** |
Om Prakash Tripathi | f3ef42d | 2017-11-24 16:53:07 +0530 | [diff] [blame] | 5214 | * wmi_extract_vdev_delete_resp() - extract vdev delete response |
| 5215 | * @wmi_handle: wmi handle |
| 5216 | * @param evt_buf: pointer to event buffer |
| 5217 | * @param delete_rsp: Pointer to hold vdev delete response |
| 5218 | * |
| 5219 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5220 | */ |
| 5221 | QDF_STATUS wmi_extract_vdev_delete_resp(void *wmi_hdl, void *evt_buf, |
| 5222 | struct wmi_host_vdev_delete_resp *delete_rsp) |
| 5223 | { |
| 5224 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5225 | |
| 5226 | if (wmi_handle->ops->extract_vdev_delete_resp) |
| 5227 | return wmi_handle->ops->extract_vdev_delete_resp(wmi_handle, |
| 5228 | evt_buf, delete_rsp); |
| 5229 | |
| 5230 | return QDF_STATUS_E_FAILURE; |
| 5231 | } |
| 5232 | |
| 5233 | |
| 5234 | /** |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5235 | * wmi_extract_tbttoffset_num_vdevs() - extract tbtt offset num vdev |
| 5236 | * @wmi_handle: wmi handle |
| 5237 | * @param evt_buf: pointer to event buffer |
| 5238 | * @param vdev_map: Pointer to hold num vdev |
| 5239 | * |
| 5240 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5241 | */ |
| 5242 | QDF_STATUS wmi_extract_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5243 | uint32_t *num_vdevs) |
| 5244 | { |
| 5245 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5246 | |
| 5247 | if (wmi->ops->extract_tbttoffset_num_vdevs) |
| 5248 | return wmi->ops->extract_tbttoffset_num_vdevs(wmi, |
| 5249 | evt_buf, num_vdevs); |
| 5250 | |
| 5251 | return QDF_STATUS_E_FAILURE; |
| 5252 | } |
| 5253 | |
| 5254 | /** |
| 5255 | * wmi_extract_ext_tbttoffset_num_vdevs() - extract ext tbtt offset num vdev |
| 5256 | * @wmi_handle: wmi handle |
| 5257 | * @param evt_buf: pointer to event buffer |
| 5258 | * @param vdev_map: Pointer to hold num vdev |
| 5259 | * |
| 5260 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5261 | */ |
| 5262 | QDF_STATUS wmi_extract_ext_tbttoffset_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5263 | uint32_t *num_vdevs) |
| 5264 | { |
| 5265 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5266 | |
| 5267 | if (wmi->ops->extract_ext_tbttoffset_num_vdevs) |
| 5268 | return wmi->ops->extract_ext_tbttoffset_num_vdevs(wmi, |
| 5269 | evt_buf, num_vdevs); |
| 5270 | |
| 5271 | return QDF_STATUS_E_FAILURE; |
| 5272 | } |
| 5273 | |
| 5274 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5275 | * wmi_extract_tbttoffset_update_params() - extract tbtt offset update param |
| 5276 | * @wmi_handle: wmi handle |
| 5277 | * @param evt_buf: pointer to event buffer |
Jeff Johnson | da26399 | 2018-05-12 14:22:00 -0700 | [diff] [blame] | 5278 | * @param idx: Index referring to a vdev |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5279 | * @param tbtt_param: Pointer to tbttoffset event param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5280 | * |
| 5281 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5282 | */ |
| 5283 | 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] | 5284 | uint8_t idx, struct tbttoffset_params *tbtt_param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5285 | { |
| 5286 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5287 | |
| 5288 | if (wmi->ops->extract_tbttoffset_update_params) |
| 5289 | return wmi->ops->extract_tbttoffset_update_params(wmi, |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5290 | evt_buf, idx, tbtt_param); |
| 5291 | |
| 5292 | return QDF_STATUS_E_FAILURE; |
| 5293 | } |
| 5294 | |
| 5295 | /** |
| 5296 | * wmi_extract_ext_tbttoffset_update_params() - extract tbtt offset update param |
| 5297 | * @wmi_handle: wmi handle |
| 5298 | * @param evt_buf: pointer to event buffer |
Jeff Johnson | da26399 | 2018-05-12 14:22:00 -0700 | [diff] [blame] | 5299 | * @param idx: Index referring to a vdev |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5300 | * @param tbtt_param: Pointer to tbttoffset event param |
| 5301 | * |
| 5302 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5303 | */ |
| 5304 | QDF_STATUS wmi_extract_ext_tbttoffset_update_params(void *wmi_hdl, |
| 5305 | void *evt_buf, uint8_t idx, struct tbttoffset_params *tbtt_param) |
| 5306 | { |
| 5307 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5308 | |
| 5309 | if (wmi->ops->extract_ext_tbttoffset_update_params) |
| 5310 | return wmi->ops->extract_ext_tbttoffset_update_params(wmi, |
| 5311 | evt_buf, idx, tbtt_param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5312 | |
| 5313 | return QDF_STATUS_E_FAILURE; |
| 5314 | } |
| 5315 | |
| 5316 | /** |
| 5317 | * wmi_extract_mgmt_rx_params() - extract management rx params from event |
| 5318 | * @wmi_handle: wmi handle |
| 5319 | * @param evt_buf: pointer to event buffer |
| 5320 | * @param hdr: Pointer to hold header |
| 5321 | * @param bufp: Pointer to hold pointer to rx param buffer |
| 5322 | * |
| 5323 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5324 | */ |
| 5325 | 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] | 5326 | struct mgmt_rx_event_params *hdr, uint8_t **bufp) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5327 | { |
| 5328 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5329 | |
| 5330 | if (wmi_handle->ops->extract_mgmt_rx_params) |
| 5331 | return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle, |
| 5332 | evt_buf, hdr, bufp); |
| 5333 | |
| 5334 | return QDF_STATUS_E_FAILURE; |
| 5335 | } |
| 5336 | |
| 5337 | /** |
| 5338 | * wmi_extract_vdev_stopped_param() - extract vdev stop param from event |
| 5339 | * @wmi_handle: wmi handle |
| 5340 | * @param evt_buf: pointer to event buffer |
| 5341 | * @param vdev_id: Pointer to hold vdev identifier |
| 5342 | * |
| 5343 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5344 | */ |
| 5345 | QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf, |
| 5346 | uint32_t *vdev_id) |
| 5347 | { |
| 5348 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5349 | |
| 5350 | if (wmi_handle->ops->extract_vdev_stopped_param) |
| 5351 | return wmi_handle->ops->extract_vdev_stopped_param(wmi_handle, |
| 5352 | evt_buf, vdev_id); |
| 5353 | |
| 5354 | return QDF_STATUS_E_FAILURE; |
| 5355 | } |
| 5356 | |
| 5357 | /** |
| 5358 | * wmi_extract_vdev_roam_param() - extract vdev roam param from event |
| 5359 | * @wmi_handle: wmi handle |
| 5360 | * @param evt_buf: pointer to event buffer |
| 5361 | * @param param: Pointer to hold roam param |
| 5362 | * |
| 5363 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5364 | */ |
| 5365 | QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, |
| 5366 | wmi_host_roam_event *param) |
| 5367 | { |
| 5368 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5369 | |
| 5370 | if (wmi_handle->ops->extract_vdev_roam_param) |
| 5371 | return wmi_handle->ops->extract_vdev_roam_param(wmi_handle, |
| 5372 | evt_buf, param); |
| 5373 | |
| 5374 | return QDF_STATUS_E_FAILURE; |
| 5375 | } |
| 5376 | |
| 5377 | /** |
| 5378 | * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event |
| 5379 | * @wmi_handle: wmi handle |
| 5380 | * @param evt_buf: pointer to event buffer |
| 5381 | * @param param: Pointer to hold vdev scan param |
| 5382 | * |
| 5383 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5384 | */ |
| 5385 | 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] | 5386 | struct scan_event *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5387 | { |
| 5388 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5389 | |
| 5390 | if (wmi_handle->ops->extract_vdev_scan_ev_param) |
| 5391 | return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle, |
| 5392 | evt_buf, param); |
| 5393 | |
| 5394 | return QDF_STATUS_E_FAILURE; |
| 5395 | } |
| 5396 | |
Frank Liu | 3d5e999 | 2017-03-15 17:51:43 +0800 | [diff] [blame] | 5397 | #ifdef CONVERGED_TDLS_ENABLE |
| 5398 | QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf, |
| 5399 | struct tdls_event_info *param) |
| 5400 | { |
| 5401 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 5402 | |
| 5403 | if (wmi_handle->ops->extract_vdev_tdls_ev_param) |
| 5404 | return wmi_handle->ops->extract_vdev_tdls_ev_param(wmi_handle, |
| 5405 | evt_buf, param); |
| 5406 | |
| 5407 | return QDF_STATUS_E_FAILURE; |
| 5408 | } |
| 5409 | #endif |
| 5410 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5411 | /** |
| 5412 | * wmi_extract_mu_ev_param() - extract mu param from event |
| 5413 | * @wmi_handle: wmi handle |
| 5414 | * @param evt_buf: pointer to event buffer |
| 5415 | * @param param: Pointer to hold mu report |
| 5416 | * |
| 5417 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5418 | */ |
| 5419 | QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, |
| 5420 | wmi_host_mu_report_event *param) |
| 5421 | { |
| 5422 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5423 | |
| 5424 | if (wmi_handle->ops->extract_mu_ev_param) |
| 5425 | return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf, |
| 5426 | param); |
| 5427 | |
| 5428 | return QDF_STATUS_E_FAILURE; |
| 5429 | } |
| 5430 | |
| 5431 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5432 | * wmi_extract_mu_db_entry() - extract mu db entry from event |
| 5433 | * @wmi_handle: wmi handle |
| 5434 | * @param evt_buf: pointer to event buffer |
| 5435 | * @param param: Pointer to hold mu db entry |
| 5436 | * |
| 5437 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5438 | */ |
| 5439 | QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, |
| 5440 | uint8_t idx, wmi_host_mu_db_entry *param) |
| 5441 | { |
| 5442 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5443 | |
| 5444 | if (wmi_handle->ops->extract_mu_db_entry) |
| 5445 | return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf, |
| 5446 | idx, param); |
| 5447 | |
| 5448 | return QDF_STATUS_E_FAILURE; |
| 5449 | } |
| 5450 | |
| 5451 | /** |
| 5452 | * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event |
| 5453 | * @wmi_handle: wmi handle |
| 5454 | * @param evt_buf: pointer to event buffer |
| 5455 | * @param param: Pointer to hold mumimo tx count |
| 5456 | * |
| 5457 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5458 | */ |
| 5459 | QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, |
| 5460 | wmi_host_peer_txmu_cnt_event *param) |
| 5461 | { |
| 5462 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5463 | |
| 5464 | if (wmi->ops->extract_mumimo_tx_count_ev_param) |
| 5465 | return wmi->ops->extract_mumimo_tx_count_ev_param(wmi, |
| 5466 | evt_buf, param); |
| 5467 | |
| 5468 | return QDF_STATUS_E_FAILURE; |
| 5469 | } |
| 5470 | |
| 5471 | /** |
| 5472 | * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list |
| 5473 | * from event |
| 5474 | * @wmi_handle: wmi handle |
| 5475 | * @param evt_buf: pointer to event buffer |
| 5476 | * @param param: Pointer to hold peer gid userposition list |
| 5477 | * |
| 5478 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5479 | */ |
| 5480 | QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, |
| 5481 | void *evt_buf, |
| 5482 | wmi_host_peer_gid_userpos_list_event *param) |
| 5483 | { |
| 5484 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5485 | |
| 5486 | if (wmi->ops->extract_peer_gid_userpos_list_ev_param) |
| 5487 | return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi, |
| 5488 | evt_buf, param); |
| 5489 | |
| 5490 | return QDF_STATUS_E_FAILURE; |
| 5491 | } |
| 5492 | |
| 5493 | /** |
Anirban Sirkhell | 23467ce | 2017-08-25 16:01:50 +0530 | [diff] [blame] | 5494 | * wmi_extract_esp_estimate_ev_param() - extract air time from event |
| 5495 | * @wmi_handle: wmi handle |
| 5496 | * @evt_buf: pointer to event buffer |
| 5497 | * @param: Pointer to hold esp event |
| 5498 | * |
| 5499 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5500 | */ |
| 5501 | QDF_STATUS |
| 5502 | wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf, |
| 5503 | struct esp_estimation_event *param) |
| 5504 | { |
| 5505 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 5506 | |
| 5507 | if (wmi_handle->ops->extract_esp_estimation_ev_param) |
| 5508 | return wmi_handle->ops->extract_esp_estimation_ev_param( |
| 5509 | wmi_handle, evt_buf, param); |
| 5510 | |
| 5511 | return QDF_STATUS_E_FAILURE; |
| 5512 | } |
| 5513 | |
| 5514 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 5515 | * wmi_extract_pdev_caldata_version_check_ev_param() - extract caldata |
| 5516 | * from event |
| 5517 | * @wmi_handle: wmi handle |
| 5518 | * @param evt_buf: pointer to event buffer |
| 5519 | * @param param: Pointer to hold caldata version data |
| 5520 | * |
| 5521 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5522 | */ |
| 5523 | QDF_STATUS wmi_extract_pdev_caldata_version_check_ev_param(void *wmi_hdl, |
| 5524 | void *evt_buf, |
| 5525 | wmi_host_pdev_check_cal_version_event *param) |
| 5526 | { |
| 5527 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5528 | |
| 5529 | if (wmi->ops->extract_pdev_caldata_version_check_ev_param) |
| 5530 | return wmi->ops->extract_pdev_caldata_version_check_ev_param( |
| 5531 | wmi, evt_buf, param); |
| 5532 | |
| 5533 | return QDF_STATUS_E_FAILURE; |
| 5534 | } |
| 5535 | |
| 5536 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5537 | * wmi_extract_pdev_tpc_config_ev_param() - extract pdev tpc configuration |
| 5538 | * param from event |
| 5539 | * @wmi_handle: wmi handle |
| 5540 | * @param evt_buf: pointer to event buffer |
| 5541 | * @param param: Pointer to hold tpc configuration |
| 5542 | * |
| 5543 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5544 | */ |
| 5545 | QDF_STATUS wmi_extract_pdev_tpc_config_ev_param(void *wmi_hdl, void *evt_buf, |
| 5546 | wmi_host_pdev_tpc_config_event *param) |
| 5547 | { |
| 5548 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5549 | |
| 5550 | if (wmi->ops->extract_pdev_tpc_config_ev_param) |
| 5551 | return wmi->ops->extract_pdev_tpc_config_ev_param(wmi, |
| 5552 | evt_buf, param); |
| 5553 | |
| 5554 | return QDF_STATUS_E_FAILURE; |
| 5555 | |
| 5556 | } |
| 5557 | |
| 5558 | /** |
| 5559 | * wmi_extract_gpio_input_ev_param() - extract gpio input param from event |
| 5560 | * @wmi_handle: wmi handle |
| 5561 | * @param evt_buf: pointer to event buffer |
| 5562 | * @param gpio_num: Pointer to hold gpio number |
| 5563 | * |
| 5564 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5565 | */ |
| 5566 | QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, |
| 5567 | void *evt_buf, uint32_t *gpio_num) |
| 5568 | { |
| 5569 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5570 | |
| 5571 | if (wmi_handle->ops->extract_gpio_input_ev_param) |
| 5572 | return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle, |
| 5573 | evt_buf, gpio_num); |
| 5574 | |
| 5575 | return QDF_STATUS_E_FAILURE; |
| 5576 | } |
| 5577 | |
| 5578 | /** |
| 5579 | * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry |
| 5580 | * param from event |
| 5581 | * @wmi_handle: wmi handle |
| 5582 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5583 | * @param param: Pointer to hold reserve ast entry param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5584 | * |
| 5585 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5586 | */ |
| 5587 | QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5588 | void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5589 | { |
| 5590 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5591 | |
| 5592 | if (wmi->ops->extract_pdev_reserve_ast_ev_param) |
| 5593 | return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 5594 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5595 | |
| 5596 | return QDF_STATUS_E_FAILURE; |
| 5597 | } |
| 5598 | |
| 5599 | /** |
| 5600 | * wmi_extract_nfcal_power_ev_param() - extract noise floor calibration |
| 5601 | * power param from event |
| 5602 | * @wmi_handle: wmi handle |
| 5603 | * @param evt_buf: pointer to event buffer |
| 5604 | * @param param: Pointer to hold nf cal power param |
| 5605 | * |
| 5606 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5607 | */ |
| 5608 | QDF_STATUS wmi_extract_nfcal_power_ev_param(void *wmi_hdl, void *evt_buf, |
| 5609 | wmi_host_pdev_nfcal_power_all_channels_event *param) |
| 5610 | { |
| 5611 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5612 | |
| 5613 | if (wmi_handle->ops->extract_nfcal_power_ev_param) |
| 5614 | return wmi_handle->ops->extract_nfcal_power_ev_param(wmi_handle, |
| 5615 | evt_buf, param); |
| 5616 | |
| 5617 | return QDF_STATUS_E_FAILURE; |
| 5618 | |
| 5619 | } |
| 5620 | |
| 5621 | /** |
| 5622 | * wmi_extract_pdev_tpc_ev_param() - extract tpc param from event |
| 5623 | * @wmi_handle: wmi handle |
| 5624 | * @param evt_buf: pointer to event buffer |
| 5625 | * @param param: Pointer to hold tpc param |
| 5626 | * |
| 5627 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5628 | */ |
| 5629 | QDF_STATUS wmi_extract_pdev_tpc_ev_param(void *wmi_hdl, void *evt_buf, |
| 5630 | wmi_host_pdev_tpc_event *param) |
| 5631 | { |
| 5632 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5633 | |
| 5634 | if (wmi_handle->ops->extract_pdev_tpc_ev_param) |
| 5635 | return wmi_handle->ops->extract_pdev_tpc_ev_param(wmi_handle, |
| 5636 | evt_buf, param); |
| 5637 | |
| 5638 | return QDF_STATUS_E_FAILURE; |
| 5639 | |
| 5640 | } |
| 5641 | |
| 5642 | /** |
| 5643 | * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer |
| 5644 | * from event |
| 5645 | * @wmi_handle: wmi handle |
| 5646 | * @param evt_buf: pointer to event buffer |
| 5647 | * @param param: Pointer to generic buffer param |
| 5648 | * |
| 5649 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5650 | */ |
| 5651 | QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, |
| 5652 | void *evt_buf, wmi_host_pdev_generic_buffer_event *param) |
| 5653 | { |
| 5654 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5655 | |
| 5656 | if (wmi->ops->extract_pdev_generic_buffer_ev_param) |
| 5657 | return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi, |
| 5658 | evt_buf, param); |
| 5659 | |
| 5660 | return QDF_STATUS_E_FAILURE; |
| 5661 | |
| 5662 | } |
| 5663 | |
| 5664 | /** |
| 5665 | * wmi_extract_mgmt_tx_compl_param() - extract mgmt tx completion param |
| 5666 | * from event |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 5667 | * @wmi_hdl: wmi handle |
| 5668 | * @evt_buf: pointer to event buffer |
| 5669 | * @param: Pointer to mgmt tx completion param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5670 | * |
| 5671 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5672 | */ |
| 5673 | QDF_STATUS wmi_extract_mgmt_tx_compl_param(void *wmi_hdl, void *evt_buf, |
| 5674 | wmi_host_mgmt_tx_compl_event *param) |
| 5675 | { |
| 5676 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5677 | |
| 5678 | if (wmi_handle->ops->extract_mgmt_tx_compl_param) |
| 5679 | return wmi_handle->ops->extract_mgmt_tx_compl_param(wmi_handle, |
| 5680 | evt_buf, param); |
| 5681 | |
| 5682 | |
| 5683 | return QDF_STATUS_E_FAILURE; |
| 5684 | } |
| 5685 | |
| 5686 | /** |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 5687 | * wmi_extract_offchan_data_tx_compl_param() - |
| 5688 | * extract offchan data tx completion param from event |
| 5689 | * @wmi_hdl: wmi handle |
| 5690 | * @evt_buf: pointer to event buffer |
| 5691 | * @param: Pointer to offchan data tx completion param |
| 5692 | * |
| 5693 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5694 | */ |
| 5695 | QDF_STATUS wmi_extract_offchan_data_tx_compl_param(void *wmi_hdl, void *evt_buf, |
| 5696 | struct wmi_host_offchan_data_tx_compl_event *param) |
| 5697 | { |
| 5698 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5699 | |
| 5700 | if (wmi_handle->ops->extract_offchan_data_tx_compl_param) |
| 5701 | return wmi_handle->ops->extract_offchan_data_tx_compl_param( |
| 5702 | wmi_handle, evt_buf, param); |
| 5703 | |
| 5704 | |
| 5705 | return QDF_STATUS_E_FAILURE; |
| 5706 | } |
| 5707 | |
| 5708 | /** |
Sathish Kumar | 45e991b | 2017-02-27 10:35:40 +0530 | [diff] [blame] | 5709 | * wmi_extract_pdev_csa_switch_count_status() - extract CSA switch count status |
| 5710 | * from event |
| 5711 | * @wmi_handle: wmi handle |
| 5712 | * @param evt_buf: pointer to event buffer |
| 5713 | * @param param: Pointer to CSA switch count status param |
| 5714 | * |
| 5715 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5716 | */ |
| 5717 | QDF_STATUS wmi_extract_pdev_csa_switch_count_status(void *wmi_hdl, |
| 5718 | void *evt_buf, |
| 5719 | struct pdev_csa_switch_count_status *param) |
| 5720 | { |
| 5721 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5722 | |
| 5723 | if (wmi_handle->ops->extract_pdev_csa_switch_count_status) |
| 5724 | return wmi_handle->ops->extract_pdev_csa_switch_count_status( |
| 5725 | wmi_handle, |
| 5726 | evt_buf, |
| 5727 | param); |
| 5728 | |
| 5729 | return QDF_STATUS_E_FAILURE; |
| 5730 | } |
| 5731 | |
| 5732 | |
| 5733 | /** |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5734 | * wmi_extract_swba_num_vdevs() - extract swba num vdevs from event |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5735 | * @wmi_handle: wmi handle |
| 5736 | * @param evt_buf: pointer to event buffer |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5737 | * @param num_vdevs: Pointer to hold num vdevs |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5738 | * |
| 5739 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5740 | */ |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5741 | QDF_STATUS wmi_extract_swba_num_vdevs(void *wmi_hdl, void *evt_buf, |
| 5742 | uint32_t *num_vdevs) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5743 | { |
| 5744 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5745 | |
Sathish Kumar | e5f0e0e | 2017-05-17 18:05:15 +0530 | [diff] [blame] | 5746 | if (wmi_handle->ops->extract_swba_num_vdevs) |
| 5747 | return wmi_handle->ops->extract_swba_num_vdevs(wmi_handle, |
| 5748 | evt_buf, num_vdevs); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5749 | |
| 5750 | return QDF_STATUS_E_FAILURE; |
| 5751 | } |
| 5752 | |
| 5753 | /** |
| 5754 | * wmi_extract_swba_tim_info() - extract swba tim info from event |
| 5755 | * @wmi_handle: wmi handle |
| 5756 | * @param evt_buf: pointer to event buffer |
| 5757 | * @param idx: Index to bcn info |
| 5758 | * @param tim_info: Pointer to hold tim info |
| 5759 | * |
| 5760 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5761 | */ |
| 5762 | QDF_STATUS wmi_extract_swba_tim_info(void *wmi_hdl, void *evt_buf, |
| 5763 | uint32_t idx, wmi_host_tim_info *tim_info) |
| 5764 | { |
| 5765 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5766 | |
| 5767 | if (wmi_handle->ops->extract_swba_tim_info) |
| 5768 | return wmi_handle->ops->extract_swba_tim_info(wmi_handle, |
| 5769 | evt_buf, idx, tim_info); |
| 5770 | |
| 5771 | return QDF_STATUS_E_FAILURE; |
| 5772 | } |
| 5773 | |
| 5774 | /** |
| 5775 | * wmi_extract_swba_noa_info() - extract swba NoA information from event |
| 5776 | * @wmi_handle: wmi handle |
| 5777 | * @param evt_buf: pointer to event buffer |
| 5778 | * @param idx: Index to bcn info |
| 5779 | * @param p2p_desc: Pointer to hold p2p NoA info |
| 5780 | * |
| 5781 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5782 | */ |
| 5783 | QDF_STATUS wmi_extract_swba_noa_info(void *wmi_hdl, void *evt_buf, |
| 5784 | uint32_t idx, wmi_host_p2p_noa_info *p2p_desc) |
| 5785 | { |
| 5786 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5787 | |
| 5788 | if (wmi_handle->ops->extract_swba_noa_info) |
| 5789 | return wmi_handle->ops->extract_swba_noa_info(wmi_handle, |
| 5790 | evt_buf, idx, p2p_desc); |
| 5791 | |
| 5792 | return QDF_STATUS_E_FAILURE; |
| 5793 | } |
| 5794 | |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5795 | #ifdef CONVERGED_P2P_ENABLE |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 5796 | #ifdef FEATURE_P2P_LISTEN_OFFLOAD |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5797 | /** |
| 5798 | * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event |
| 5799 | * @wmi_handle: wmi handle |
| 5800 | * @evt_buf: pointer to event buffer |
| 5801 | * @param: Pointer to hold listen offload stop param |
| 5802 | * |
| 5803 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5804 | */ |
| 5805 | QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, void *evt_buf, |
| 5806 | struct p2p_lo_event *param) |
| 5807 | { |
| 5808 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5809 | |
| 5810 | if (!wmi_handle) { |
| 5811 | WMI_LOGE("wmi handle is null"); |
| 5812 | return QDF_STATUS_E_INVAL; |
| 5813 | } |
| 5814 | |
| 5815 | if (wmi_handle->ops->extract_p2p_lo_stop_ev_param) |
| 5816 | return wmi_handle->ops->extract_p2p_lo_stop_ev_param( |
| 5817 | wmi_handle, evt_buf, param); |
| 5818 | |
| 5819 | return QDF_STATUS_E_FAILURE; |
| 5820 | } |
Rachit Kankane | 9cd0c75 | 2018-07-31 16:26:38 +0530 | [diff] [blame] | 5821 | #endif |
Wu Gao | cd3a851 | 2017-03-13 20:17:34 +0800 | [diff] [blame] | 5822 | |
| 5823 | /** |
| 5824 | * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event |
| 5825 | * @wmi_handle: wmi handle |
| 5826 | * @evt_buf: pointer to event buffer |
| 5827 | * @param: Pointer to hold p2p noa param |
| 5828 | * |
| 5829 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5830 | */ |
| 5831 | QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, void *evt_buf, |
| 5832 | struct p2p_noa_info *param) |
| 5833 | { |
| 5834 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5835 | |
| 5836 | if (!wmi_handle) { |
| 5837 | WMI_LOGE("wmi handle is null"); |
| 5838 | return QDF_STATUS_E_INVAL; |
| 5839 | } |
| 5840 | |
| 5841 | if (wmi_handle->ops->extract_p2p_noa_ev_param) |
| 5842 | return wmi_handle->ops->extract_p2p_noa_ev_param( |
| 5843 | wmi_handle, evt_buf, param); |
| 5844 | |
| 5845 | return QDF_STATUS_E_FAILURE; |
| 5846 | } |
| 5847 | #endif |
| 5848 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 5849 | /** |
| 5850 | * wmi_extract_peer_sta_ps_statechange_ev() - extract peer sta ps state |
| 5851 | * from event |
| 5852 | * @wmi_handle: wmi handle |
| 5853 | * @param evt_buf: pointer to event buffer |
| 5854 | * @param ev: Pointer to hold peer param and ps state |
| 5855 | * |
| 5856 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5857 | */ |
| 5858 | QDF_STATUS wmi_extract_peer_sta_ps_statechange_ev(void *wmi_hdl, void *evt_buf, |
| 5859 | wmi_host_peer_sta_ps_statechange_event *ev) |
| 5860 | { |
| 5861 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5862 | |
| 5863 | if (wmi->ops->extract_peer_sta_ps_statechange_ev) |
| 5864 | return wmi->ops->extract_peer_sta_ps_statechange_ev(wmi, |
| 5865 | evt_buf, ev); |
| 5866 | |
| 5867 | return QDF_STATUS_E_FAILURE; |
| 5868 | } |
| 5869 | |
| 5870 | /** |
| 5871 | * wmi_extract_peer_sta_kickout_ev() - extract peer sta kickout event |
| 5872 | * @wmi_handle: wmi handle |
| 5873 | * @param evt_buf: pointer to event buffer |
| 5874 | * @param ev: Pointer to hold peer param |
| 5875 | * |
| 5876 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5877 | */ |
| 5878 | QDF_STATUS wmi_extract_peer_sta_kickout_ev(void *wmi_hdl, void *evt_buf, |
| 5879 | wmi_host_peer_sta_kickout_event *ev) |
| 5880 | { |
| 5881 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5882 | |
| 5883 | if (wmi_handle->ops->extract_peer_sta_kickout_ev) |
| 5884 | return wmi_handle->ops->extract_peer_sta_kickout_ev(wmi_handle, |
| 5885 | evt_buf, ev); |
| 5886 | |
| 5887 | return QDF_STATUS_E_FAILURE; |
| 5888 | } |
| 5889 | |
| 5890 | /** |
| 5891 | * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event |
| 5892 | * @wmi_handle: wmi handle |
| 5893 | * @param evt_buf: pointer to event buffer |
| 5894 | * @param peer_mac: Pointer to hold peer mac address |
| 5895 | * @param rate_cap: Pointer to hold ratecode |
| 5896 | * |
| 5897 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5898 | */ |
| 5899 | QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, |
| 5900 | uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap) |
| 5901 | { |
| 5902 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 5903 | |
| 5904 | if (wmi->ops->extract_peer_ratecode_list_ev) |
| 5905 | return wmi->ops->extract_peer_ratecode_list_ev(wmi, |
| 5906 | evt_buf, peer_mac, rate_cap); |
| 5907 | |
| 5908 | return QDF_STATUS_E_FAILURE; |
| 5909 | |
| 5910 | } |
| 5911 | |
| 5912 | /** |
| 5913 | * wmi_extract_comb_phyerr() - extract comb phy error from event |
| 5914 | * @wmi_handle: wmi handle |
| 5915 | * @param evt_buf: pointer to event buffer |
| 5916 | * @param datalen: data length of event buffer |
| 5917 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 5918 | * post extraction |
| 5919 | * @param phyer: Pointer to hold phyerr |
| 5920 | * |
| 5921 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5922 | */ |
| 5923 | QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, |
| 5924 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 5925 | { |
| 5926 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5927 | |
| 5928 | if (wmi_handle->ops->extract_comb_phyerr) |
| 5929 | return wmi_handle->ops->extract_comb_phyerr(wmi_handle, |
| 5930 | evt_buf, datalen, buf_offset, phyerr); |
| 5931 | |
| 5932 | return QDF_STATUS_E_FAILURE; |
| 5933 | |
| 5934 | } |
| 5935 | |
| 5936 | /** |
| 5937 | * wmi_extract_single_phyerr() - extract single phy error from event |
| 5938 | * @wmi_handle: wmi handle |
| 5939 | * @param evt_buf: pointer to event buffer |
| 5940 | * @param datalen: data length of event buffer |
| 5941 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 5942 | * post extraction |
| 5943 | * @param phyerr: Pointer to hold phyerr |
| 5944 | * |
| 5945 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5946 | */ |
| 5947 | QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, |
| 5948 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 5949 | { |
| 5950 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5951 | |
| 5952 | if (wmi_handle->ops->extract_single_phyerr) |
| 5953 | return wmi_handle->ops->extract_single_phyerr(wmi_handle, |
| 5954 | evt_buf, datalen, buf_offset, phyerr); |
| 5955 | |
| 5956 | return QDF_STATUS_E_FAILURE; |
| 5957 | |
| 5958 | } |
| 5959 | |
| 5960 | /** |
| 5961 | * wmi_extract_composite_phyerr() - extract composite phy error from event |
| 5962 | * @wmi_handle: wmi handle |
| 5963 | * @param evt_buf: pointer to event buffer |
| 5964 | * @param datalen: Length of event buffer |
| 5965 | * @param phyerr: Pointer to hold phy error |
| 5966 | * |
| 5967 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5968 | */ |
| 5969 | QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, |
| 5970 | uint16_t datalen, wmi_host_phyerr_t *phyerr) |
| 5971 | { |
| 5972 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5973 | |
| 5974 | if (wmi_handle->ops->extract_composite_phyerr) |
| 5975 | return wmi_handle->ops->extract_composite_phyerr(wmi_handle, |
| 5976 | evt_buf, datalen, phyerr); |
| 5977 | |
| 5978 | return QDF_STATUS_E_FAILURE; |
| 5979 | |
| 5980 | } |
| 5981 | |
| 5982 | /** |
| 5983 | * wmi_extract_stats_param() - extract all stats count from event |
| 5984 | * @wmi_handle: wmi handle |
| 5985 | * @param evt_buf: pointer to event buffer |
| 5986 | * @param stats_param: Pointer to hold stats count |
| 5987 | * |
| 5988 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 5989 | */ |
| 5990 | QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, |
| 5991 | wmi_host_stats_event *stats_param) |
| 5992 | { |
| 5993 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 5994 | |
| 5995 | if (wmi_handle->ops->extract_all_stats_count) |
| 5996 | return wmi_handle->ops->extract_all_stats_count(wmi_handle, |
| 5997 | evt_buf, stats_param); |
| 5998 | |
| 5999 | return QDF_STATUS_E_FAILURE; |
| 6000 | } |
| 6001 | |
| 6002 | /** |
| 6003 | * wmi_extract_pdev_stats() - extract pdev stats from event |
| 6004 | * @wmi_handle: wmi handle |
| 6005 | * @param evt_buf: pointer to event buffer |
| 6006 | * @param index: Index into pdev stats |
| 6007 | * @param pdev_stats: Pointer to hold pdev stats |
| 6008 | * |
| 6009 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6010 | */ |
| 6011 | QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, |
| 6012 | uint32_t index, wmi_host_pdev_stats *pdev_stats) |
| 6013 | { |
| 6014 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6015 | |
| 6016 | if (wmi_handle->ops->extract_pdev_stats) |
| 6017 | return wmi_handle->ops->extract_pdev_stats(wmi_handle, |
| 6018 | evt_buf, index, pdev_stats); |
| 6019 | |
| 6020 | return QDF_STATUS_E_FAILURE; |
| 6021 | } |
| 6022 | |
| 6023 | /** |
Adil Saeed Musthafa | d280596 | 2017-08-23 17:32:11 -0700 | [diff] [blame] | 6024 | * extract_unit_test() - extract unit test from event |
| 6025 | * @wmi_handle: wmi handle |
| 6026 | * @param evt_buf: pointer to event buffer |
| 6027 | * @param unit_test: Pointer to hold unit-test header |
| 6028 | * @param maxspace: The amount of space in evt_buf |
| 6029 | * |
| 6030 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6031 | */ |
| 6032 | QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, |
| 6033 | wmi_unit_test_event *unit_test, uint32_t maxspace) |
| 6034 | { |
| 6035 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6036 | |
| 6037 | if (wmi_handle->ops->extract_unit_test) |
| 6038 | return wmi_handle->ops->extract_unit_test(wmi_handle, |
| 6039 | evt_buf, unit_test, maxspace); |
| 6040 | |
| 6041 | return QDF_STATUS_E_FAILURE; |
| 6042 | } |
| 6043 | |
| 6044 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6045 | * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event |
| 6046 | * @wmi_handle: wmi handle |
| 6047 | * @param evt_buf: pointer to event buffer |
| 6048 | * @param index: Index into extended pdev stats |
| 6049 | * @param pdev_ext_stats: Pointer to hold extended pdev stats |
| 6050 | * |
| 6051 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6052 | */ |
| 6053 | QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, |
| 6054 | uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats) |
| 6055 | { |
| 6056 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6057 | |
| 6058 | if (wmi_handle->ops->extract_pdev_ext_stats) |
| 6059 | return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle, |
| 6060 | evt_buf, index, pdev_ext_stats); |
| 6061 | |
| 6062 | return QDF_STATUS_E_FAILURE; |
| 6063 | } |
| 6064 | |
| 6065 | /** |
| 6066 | * wmi_extract_peer_stats() - extract peer stats from event |
| 6067 | * @wmi_handle: wmi handle |
| 6068 | * @param evt_buf: pointer to event buffer |
| 6069 | * @param index: Index into peer stats |
| 6070 | * @param peer_stats: Pointer to hold peer stats |
| 6071 | * |
| 6072 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6073 | */ |
| 6074 | QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, |
| 6075 | uint32_t index, wmi_host_peer_stats *peer_stats) |
| 6076 | { |
| 6077 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6078 | |
| 6079 | if (wmi_handle->ops->extract_peer_stats) |
| 6080 | return wmi_handle->ops->extract_peer_stats(wmi_handle, |
| 6081 | evt_buf, index, peer_stats); |
| 6082 | |
| 6083 | return QDF_STATUS_E_FAILURE; |
| 6084 | } |
| 6085 | |
| 6086 | /** |
| 6087 | * wmi_extract_vdev_stats() - extract vdev stats from event |
| 6088 | * @wmi_handle: wmi handle |
| 6089 | * @param evt_buf: pointer to event buffer |
| 6090 | * @param index: Index into vdev stats |
| 6091 | * @param vdev_stats: Pointer to hold vdev stats |
| 6092 | * |
| 6093 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6094 | */ |
| 6095 | QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, |
| 6096 | uint32_t index, wmi_host_vdev_stats *vdev_stats) |
| 6097 | { |
| 6098 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6099 | |
| 6100 | if (wmi_handle->ops->extract_vdev_stats) |
| 6101 | return wmi_handle->ops->extract_vdev_stats(wmi_handle, |
| 6102 | evt_buf, index, vdev_stats); |
| 6103 | |
| 6104 | return QDF_STATUS_E_FAILURE; |
| 6105 | } |
| 6106 | |
| 6107 | /** |
Naveen Rawat | d211572 | 2018-04-12 08:17:55 -0700 | [diff] [blame] | 6108 | * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event |
| 6109 | * @wmi_handle: wmi handle |
| 6110 | * @param evt_buf: pointer to event buffer |
| 6111 | * @param index: Index into rssi stats |
| 6112 | * @param rssi_stats: Pointer to hold rssi stats |
| 6113 | * |
| 6114 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6115 | */ |
| 6116 | QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 6117 | uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats) |
| 6118 | { |
| 6119 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6120 | |
| 6121 | if (wmi_handle->ops->extract_per_chain_rssi_stats) |
| 6122 | return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle, |
| 6123 | evt_buf, index, rssi_stats); |
| 6124 | |
| 6125 | return QDF_STATUS_E_FAILURE; |
| 6126 | } |
| 6127 | |
| 6128 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6129 | * wmi_extract_rtt_hdr() - extract rtt header from event |
| 6130 | * @wmi_handle: wmi handle |
| 6131 | * @param evt_buf: pointer to event buffer |
| 6132 | * @param ev: Pointer to hold rtt header |
| 6133 | * |
| 6134 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6135 | */ |
| 6136 | QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, |
| 6137 | wmi_host_rtt_event_hdr *ev) |
| 6138 | { |
| 6139 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6140 | |
| 6141 | if (wmi_handle->ops->extract_rtt_hdr) |
| 6142 | return wmi_handle->ops->extract_rtt_hdr(wmi_handle, |
| 6143 | evt_buf, ev); |
| 6144 | |
| 6145 | return QDF_STATUS_E_FAILURE; |
| 6146 | } |
| 6147 | |
| 6148 | /** |
| 6149 | * wmi_extract_bcnflt_stats() - extract bcn fault stats from event |
| 6150 | * @wmi_handle: wmi handle |
| 6151 | * @param evt_buf: pointer to event buffer |
| 6152 | * @param index: Index into bcn fault stats |
| 6153 | * @param bcnflt_stats: Pointer to hold bcn fault stats |
| 6154 | * |
| 6155 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6156 | */ |
| 6157 | QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, |
| 6158 | uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats) |
| 6159 | { |
| 6160 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6161 | |
| 6162 | if (wmi_handle->ops->extract_bcnflt_stats) |
| 6163 | return wmi_handle->ops->extract_bcnflt_stats(wmi_handle, |
| 6164 | evt_buf, index, bcnflt_stats); |
| 6165 | |
| 6166 | return QDF_STATUS_E_FAILURE; |
| 6167 | } |
| 6168 | |
| 6169 | /** |
| 6170 | * wmi_extract_rtt_ev() - extract rtt event |
| 6171 | * @wmi_handle: wmi handle |
| 6172 | * @param evt_buf: Pointer to event buffer |
| 6173 | * @param ev: Pointer to hold rtt event |
| 6174 | * @param hdump: Pointer to hold hex dump |
| 6175 | * @param hdump_len: hex dump length |
| 6176 | * |
| 6177 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6178 | */ |
| 6179 | QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, |
| 6180 | wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len) |
| 6181 | { |
| 6182 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6183 | |
| 6184 | if (wmi_handle->ops->extract_rtt_ev) |
| 6185 | return wmi_handle->ops->extract_rtt_ev(wmi_handle, |
| 6186 | evt_buf, ev, hdump, hdump_len); |
| 6187 | |
| 6188 | return QDF_STATUS_E_FAILURE; |
| 6189 | } |
| 6190 | |
| 6191 | /** |
| 6192 | * wmi_extract_peer_extd_stats() - extract extended peer stats from event |
| 6193 | * @wmi_handle: wmi handle |
| 6194 | * @param evt_buf: pointer to event buffer |
| 6195 | * @param index: Index into extended peer stats |
| 6196 | * @param peer_extd_stats: Pointer to hold extended peer stats |
| 6197 | * |
| 6198 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6199 | */ |
| 6200 | QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, |
| 6201 | uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats) |
| 6202 | { |
| 6203 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6204 | |
| 6205 | if (wmi_handle->ops->extract_peer_extd_stats) |
| 6206 | return wmi_handle->ops->extract_peer_extd_stats(wmi_handle, |
| 6207 | evt_buf, index, peer_extd_stats); |
| 6208 | |
| 6209 | return QDF_STATUS_E_FAILURE; |
| 6210 | } |
| 6211 | |
| 6212 | /** |
| 6213 | * wmi_extract_rtt_error_report_ev() - extract rtt error report from event |
| 6214 | * @wmi_handle: wmi handle |
| 6215 | * @param evt_buf: pointer to event buffer |
| 6216 | * @param wds_ev: Pointer to hold rtt error report |
| 6217 | * |
| 6218 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6219 | */ |
| 6220 | QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, |
| 6221 | wmi_host_rtt_error_report_event *ev) |
| 6222 | { |
| 6223 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6224 | |
| 6225 | if (wmi_handle->ops->extract_rtt_error_report_ev) |
| 6226 | return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle, |
| 6227 | evt_buf, ev); |
| 6228 | |
| 6229 | return QDF_STATUS_E_FAILURE; |
| 6230 | } |
| 6231 | |
| 6232 | /** |
| 6233 | * wmi_extract_chan_stats() - extract chan stats from event |
| 6234 | * @wmi_handle: wmi handle |
| 6235 | * @param evt_buf: pointer to event buffer |
| 6236 | * @param index: Index into chan stats |
| 6237 | * @param chanstats: Pointer to hold chan stats |
| 6238 | * |
| 6239 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6240 | */ |
| 6241 | QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, |
| 6242 | uint32_t index, wmi_host_chan_stats *chan_stats) |
| 6243 | { |
| 6244 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6245 | |
| 6246 | if (wmi_handle->ops->extract_chan_stats) |
| 6247 | return wmi_handle->ops->extract_chan_stats(wmi_handle, |
| 6248 | evt_buf, index, chan_stats); |
| 6249 | |
| 6250 | return QDF_STATUS_E_FAILURE; |
| 6251 | } |
| 6252 | |
| 6253 | /** |
| 6254 | * wmi_extract_thermal_stats() - extract thermal stats from event |
| 6255 | * @wmi_handle: wmi handle |
| 6256 | * @param evt_buf: Pointer to event buffer |
| 6257 | * @param temp: Pointer to hold extracted temperature |
| 6258 | * @param level: Pointer to hold extracted level |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 6259 | * @param pdev_id: Pointer to hold extracted pdev_id |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6260 | * |
| 6261 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6262 | */ |
| 6263 | 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] | 6264 | uint32_t *temp, uint32_t *level, uint32_t *pdev_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6265 | { |
| 6266 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6267 | |
| 6268 | if (wmi_handle->ops->extract_thermal_stats) |
| 6269 | return wmi_handle->ops->extract_thermal_stats(wmi_handle, |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 6270 | evt_buf, temp, level, pdev_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6271 | |
| 6272 | return QDF_STATUS_E_FAILURE; |
| 6273 | } |
| 6274 | |
| 6275 | /** |
| 6276 | * wmi_extract_profile_ctx() - extract profile context from event |
| 6277 | * @wmi_handle: wmi handle |
| 6278 | * @param evt_buf: pointer to event buffer |
| 6279 | * @param profile_ctx: Pointer to hold profile context |
| 6280 | * |
| 6281 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6282 | */ |
| 6283 | QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, |
| 6284 | wmi_host_wlan_profile_ctx_t *profile_ctx) |
| 6285 | { |
| 6286 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6287 | |
| 6288 | if (wmi_handle->ops->extract_profile_ctx) |
| 6289 | return wmi_handle->ops->extract_profile_ctx(wmi_handle, |
| 6290 | evt_buf, profile_ctx); |
| 6291 | |
| 6292 | return QDF_STATUS_E_FAILURE; |
| 6293 | } |
| 6294 | |
| 6295 | /** |
| 6296 | * wmi_extract_thermal_level_stats() - extract thermal level stats from |
| 6297 | * event |
| 6298 | * @wmi_handle: wmi handle |
| 6299 | * @param evt_buf: pointer to event buffer |
| 6300 | * @param idx: Index to level stats |
| 6301 | * @param levelcount: Pointer to hold levelcount |
| 6302 | * @param dccount: Pointer to hold dccount |
| 6303 | * |
| 6304 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6305 | */ |
| 6306 | QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, |
| 6307 | uint8_t idx, uint32_t *levelcount, uint32_t *dccount) |
| 6308 | { |
| 6309 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6310 | |
| 6311 | if (wmi_handle->ops->extract_thermal_level_stats) |
| 6312 | return wmi_handle->ops->extract_thermal_level_stats(wmi_handle, |
| 6313 | evt_buf, idx, levelcount, dccount); |
| 6314 | |
| 6315 | return QDF_STATUS_E_FAILURE; |
| 6316 | } |
| 6317 | |
| 6318 | /** |
| 6319 | * wmi_extract_profile_data() - extract profile data from event |
| 6320 | * @wmi_handle: wmi handle |
| 6321 | * @param evt_buf: pointer to event buffer |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6322 | * @idx index: index of profile data |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6323 | * @param profile_data: Pointer to hold profile data |
| 6324 | * |
| 6325 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6326 | */ |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6327 | 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] | 6328 | wmi_host_wlan_profile_t *profile_data) |
| 6329 | { |
| 6330 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6331 | |
| 6332 | if (wmi_handle->ops->extract_profile_data) |
| 6333 | return wmi_handle->ops->extract_profile_data(wmi_handle, |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 6334 | evt_buf, idx, profile_data); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6335 | |
| 6336 | return QDF_STATUS_E_FAILURE; |
| 6337 | } |
| 6338 | |
| 6339 | /** |
| 6340 | * wmi_extract_chan_info_event() - extract chan information from event |
| 6341 | * @wmi_handle: wmi handle |
| 6342 | * @param evt_buf: pointer to event buffer |
| 6343 | * @param chan_info: Pointer to hold chan information |
| 6344 | * |
| 6345 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6346 | */ |
| 6347 | QDF_STATUS wmi_extract_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 6348 | wmi_host_chan_info_event *chan_info) |
| 6349 | { |
| 6350 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6351 | |
| 6352 | if (wmi_handle->ops->extract_chan_info_event) |
| 6353 | return wmi_handle->ops->extract_chan_info_event(wmi_handle, |
| 6354 | evt_buf, chan_info); |
| 6355 | |
| 6356 | return QDF_STATUS_E_FAILURE; |
| 6357 | } |
| 6358 | |
| 6359 | /** |
| 6360 | * wmi_extract_channel_hopping_event() - extract channel hopping param |
| 6361 | * from event |
| 6362 | * @wmi_handle: wmi handle |
| 6363 | * @param evt_buf: pointer to event buffer |
| 6364 | * @param ch_hopping: Pointer to hold channel hopping param |
| 6365 | * |
| 6366 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6367 | */ |
| 6368 | QDF_STATUS wmi_extract_channel_hopping_event(void *wmi_hdl, void *evt_buf, |
| 6369 | wmi_host_pdev_channel_hopping_event *ch_hopping) |
| 6370 | { |
| 6371 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6372 | |
| 6373 | if (wmi->ops->extract_channel_hopping_event) |
| 6374 | return wmi->ops->extract_channel_hopping_event(wmi, |
| 6375 | evt_buf, ch_hopping); |
| 6376 | |
| 6377 | return QDF_STATUS_E_FAILURE; |
| 6378 | } |
| 6379 | |
| 6380 | /** |
| 6381 | * wmi_extract_bss_chan_info_event() - extract bss channel information |
| 6382 | * from event |
| 6383 | * @wmi_handle: wmi handle |
| 6384 | * @param evt_buf: pointer to event buffer |
| 6385 | * @param bss_chan_info: Pointer to hold bss channel information |
| 6386 | * |
| 6387 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6388 | */ |
| 6389 | QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 6390 | wmi_host_pdev_bss_chan_info_event *bss_chan_info) |
| 6391 | { |
| 6392 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6393 | |
| 6394 | if (wmi_handle->ops->extract_bss_chan_info_event) |
| 6395 | return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle, |
| 6396 | evt_buf, bss_chan_info); |
| 6397 | |
| 6398 | return QDF_STATUS_E_FAILURE; |
| 6399 | } |
| 6400 | |
| 6401 | /** |
| 6402 | * wmi_extract_inst_rssi_stats_event() - extract inst rssi stats from event |
| 6403 | * @wmi_handle: wmi handle |
| 6404 | * @param evt_buf: pointer to event buffer |
| 6405 | * @param inst_rssi_resp: Pointer to hold inst rssi response |
| 6406 | * |
| 6407 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6408 | */ |
| 6409 | QDF_STATUS wmi_extract_inst_rssi_stats_event(void *wmi_hdl, void *evt_buf, |
| 6410 | wmi_host_inst_stats_resp *inst_rssi_resp) |
| 6411 | { |
| 6412 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6413 | |
| 6414 | if (wmi->ops->extract_inst_rssi_stats_event) |
| 6415 | return wmi->ops->extract_inst_rssi_stats_event(wmi, |
| 6416 | evt_buf, inst_rssi_resp); |
| 6417 | |
| 6418 | return QDF_STATUS_E_FAILURE; |
| 6419 | } |
| 6420 | |
| 6421 | /** |
| 6422 | * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control |
| 6423 | * from event |
| 6424 | * @wmi_handle: wmi handle |
| 6425 | * @param evt_buf: pointer to event buffer |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6426 | * @param ev: Pointer to hold data traffic control |
| 6427 | * |
| 6428 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6429 | */ |
| 6430 | QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, |
| 6431 | wmi_host_tx_data_traffic_ctrl_event *ev) |
| 6432 | { |
| 6433 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6434 | |
| 6435 | if (wmi->ops->extract_tx_data_traffic_ctrl_ev) |
| 6436 | return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi, |
| 6437 | evt_buf, ev); |
| 6438 | |
| 6439 | return QDF_STATUS_E_FAILURE; |
| 6440 | } |
| 6441 | |
| 6442 | /** |
| 6443 | * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event |
| 6444 | * @wmi_handle: wmi handle |
| 6445 | * @param evt_buf: pointer to event buffer |
| 6446 | * @param index: Index into extended vdev stats |
| 6447 | * @param vdev_extd_stats: Pointer to hold extended vdev stats |
| 6448 | * |
| 6449 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6450 | */ |
| 6451 | QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, |
| 6452 | uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats) |
| 6453 | { |
| 6454 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6455 | |
| 6456 | if (wmi_handle->ops->extract_vdev_extd_stats) |
| 6457 | return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle, |
| 6458 | evt_buf, index, vdev_extd_stats); |
Gupta, Kapil | 2e68598 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 6459 | return QDF_STATUS_E_FAILURE; |
| 6460 | } |
| 6461 | |
| 6462 | /** |
Gurumoorthi Gnanasambandhan | b5fb836 | 2017-11-06 22:04:17 +0530 | [diff] [blame] | 6463 | * wmi_extract_bcn_stats() - extract beacon stats from event |
| 6464 | * @wmi_handle: wmi handle |
| 6465 | * @evt_buf: pointer to event buffer |
| 6466 | * @index: Index into beacon stats |
| 6467 | * @vdev_bcn_stats: Pointer to hold beacon stats |
| 6468 | * |
| 6469 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6470 | */ |
| 6471 | QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, |
| 6472 | uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats) |
| 6473 | { |
| 6474 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6475 | |
| 6476 | if (wmi_handle->ops->extract_bcn_stats) |
| 6477 | return wmi_handle->ops->extract_bcn_stats(wmi_handle, |
| 6478 | evt_buf, index, vdev_bcn_stats); |
| 6479 | return QDF_STATUS_E_FAILURE; |
| 6480 | } |
| 6481 | |
| 6482 | /** |
Chaithanya Garrepalli | 8a9c38d | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 6483 | * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event |
| 6484 | * @wmi_handle: wmi handle |
| 6485 | * @param evt_buf: pointer to event buffer |
| 6486 | * @param vdev_extd_stats: Pointer to hold nac rssi stats |
| 6487 | * |
| 6488 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 6489 | */ |
| 6490 | QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 6491 | struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats) |
| 6492 | { |
| 6493 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6494 | |
| 6495 | if (wmi_handle->ops->extract_vdev_nac_rssi_stats) |
| 6496 | return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle, |
| 6497 | evt_buf, vdev_nac_rssi_stats); |
| 6498 | |
| 6499 | return QDF_STATUS_E_FAILURE; |
| 6500 | } |
| 6501 | |
| 6502 | /** |
Gupta, Kapil | 2e68598 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 6503 | * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of |
| 6504 | * adaptive dwelltime configuration params |
| 6505 | * @wma_handle: wma handler |
| 6506 | * @dwelltime_params: pointer to dwelltime_params |
| 6507 | * |
| 6508 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 6509 | */ |
| 6510 | QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, |
| 6511 | struct wmi_adaptive_dwelltime_params *dwelltime_params) |
| 6512 | { |
| 6513 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6514 | |
| 6515 | if (wmi_handle->ops->send_adapt_dwelltime_params_cmd) |
| 6516 | return wmi_handle->ops-> |
| 6517 | send_adapt_dwelltime_params_cmd(wmi_handle, |
| 6518 | dwelltime_params); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 6519 | |
| 6520 | return QDF_STATUS_E_FAILURE; |
| 6521 | } |
Govind Singh | bca3b1b | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 6522 | |
| 6523 | /** |
| 6524 | * wmi_unified_send_power_dbg_cmd() - send power debug commands |
| 6525 | * @wmi_handle: wmi handle |
| 6526 | * @param: wmi power debug parameter |
| 6527 | * |
| 6528 | * Send WMI_POWER_DEBUG_CMDID parameters to fw. |
| 6529 | * |
| 6530 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6531 | */ |
| 6532 | QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, |
| 6533 | struct wmi_power_dbg_params *param) |
| 6534 | { |
| 6535 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6536 | |
| 6537 | if (wmi_handle->ops->send_power_dbg_cmd) |
| 6538 | return wmi_handle->ops->send_power_dbg_cmd(wmi_handle, |
| 6539 | param); |
| 6540 | |
| 6541 | return QDF_STATUS_E_FAILURE; |
| 6542 | } |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6543 | |
| 6544 | /** |
Sathish Kumar | 45e991b | 2017-02-27 10:35:40 +0530 | [diff] [blame] | 6545 | * wmi_unified_send_multiple_vdev_restart_req_cmd() - send multiple vdev restart |
| 6546 | * @wmi_handle: wmi handle |
| 6547 | * @param: multiple vdev restart parameter |
| 6548 | * |
| 6549 | * Send WMI_PDEV_MULTIPLE_VDEV_RESTART_REQUEST_CMDID parameters to fw. |
| 6550 | * |
| 6551 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6552 | */ |
| 6553 | QDF_STATUS wmi_unified_send_multiple_vdev_restart_req_cmd(void *wmi_hdl, |
| 6554 | struct multiple_vdev_restart_params *param) |
| 6555 | { |
| 6556 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6557 | |
| 6558 | if (wmi_handle->ops->send_multiple_vdev_restart_req_cmd) |
| 6559 | return wmi_handle->ops->send_multiple_vdev_restart_req_cmd( |
| 6560 | wmi_handle, |
| 6561 | param); |
| 6562 | |
| 6563 | return QDF_STATUS_E_FAILURE; |
| 6564 | } |
| 6565 | |
Manikandan Mohan | 31a13e2 | 2016-12-13 13:14:06 -0800 | [diff] [blame] | 6566 | QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, |
| 6567 | struct sar_limit_cmd_params *params) |
| 6568 | { |
| 6569 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6570 | |
| 6571 | if (wmi_handle->ops->send_sar_limit_cmd) |
| 6572 | return wmi_handle->ops->send_sar_limit_cmd( |
| 6573 | wmi_handle, |
| 6574 | params); |
| 6575 | return QDF_STATUS_E_FAILURE; |
| 6576 | } |
| 6577 | |
Jeff Johnson | 4783f90 | 2017-12-14 15:50:16 -0800 | [diff] [blame] | 6578 | QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl) |
| 6579 | { |
| 6580 | wmi_unified_t wmi_handle = wmi_hdl; |
| 6581 | |
| 6582 | if (wmi_handle->ops->get_sar_limit_cmd) |
| 6583 | return wmi_handle->ops->get_sar_limit_cmd(wmi_handle); |
| 6584 | |
| 6585 | return QDF_STATUS_E_FAILURE; |
| 6586 | } |
| 6587 | |
| 6588 | QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl, |
| 6589 | uint8_t *evt_buf, |
| 6590 | struct sar_limit_event *event) |
| 6591 | { |
| 6592 | wmi_unified_t wmi_handle = wmi_hdl; |
| 6593 | |
| 6594 | if (wmi_handle->ops->extract_sar_limit_event) |
| 6595 | return wmi_handle->ops->extract_sar_limit_event(wmi_handle, |
| 6596 | evt_buf, |
| 6597 | event); |
| 6598 | |
| 6599 | return QDF_STATUS_E_FAILURE; |
| 6600 | } |
| 6601 | |
Kabilan Kannan | 0d0f935 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 6602 | QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle, |
| 6603 | uint8_t *event, uint32_t len) |
| 6604 | { |
| 6605 | wmi_unified_t wmi_handle = handle; |
| 6606 | |
| 6607 | if (wmi_handle->ops->extract_sar2_result_event) |
| 6608 | return wmi_handle->ops->extract_sar2_result_event(wmi_handle, |
| 6609 | event, |
| 6610 | len); |
| 6611 | |
| 6612 | return QDF_STATUS_E_FAILURE; |
| 6613 | } |
Jeff Johnson | 4783f90 | 2017-12-14 15:50:16 -0800 | [diff] [blame] | 6614 | |
Nachiket Kukade | ab4cbc2 | 2017-12-15 12:36:58 +0530 | [diff] [blame] | 6615 | #ifdef WLAN_FEATURE_DISA |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6616 | QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl, |
Nachiket Kukade | 03e7ab2 | 2017-12-20 17:28:29 +0530 | [diff] [blame] | 6617 | struct disa_encrypt_decrypt_req_params *params) |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6618 | { |
| 6619 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6620 | |
| 6621 | if (wmi_handle->ops->send_encrypt_decrypt_send_cmd) |
| 6622 | return wmi_handle->ops->send_encrypt_decrypt_send_cmd( |
| 6623 | wmi_handle, |
| 6624 | params); |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6625 | return QDF_STATUS_E_FAILURE; |
| 6626 | } |
Nachiket Kukade | 03e7ab2 | 2017-12-20 17:28:29 +0530 | [diff] [blame] | 6627 | |
| 6628 | QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, |
| 6629 | uint8_t *evt_buf, |
| 6630 | struct disa_encrypt_decrypt_resp_params *resp) |
| 6631 | { |
| 6632 | struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; |
| 6633 | |
| 6634 | if (wmi_handle->ops->extract_encrypt_decrypt_resp_event) |
| 6635 | return wmi_handle->ops->extract_encrypt_decrypt_resp_event( |
| 6636 | wmi_handle, evt_buf, resp); |
| 6637 | |
| 6638 | return QDF_STATUS_E_FAILURE; |
| 6639 | } |
| 6640 | |
Nachiket Kukade | ab4cbc2 | 2017-12-15 12:36:58 +0530 | [diff] [blame] | 6641 | #endif |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6642 | |
| 6643 | /* |
| 6644 | * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands |
| 6645 | * @wmi_handle: wmi handle |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6646 | * @param : wmi btcoex cfg params |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6647 | * |
| 6648 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 6649 | * |
| 6650 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6651 | */ |
| 6652 | QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6653 | struct btcoex_cfg_params *param) |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 6654 | { |
| 6655 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6656 | |
| 6657 | if (wmi->ops->send_btcoex_wlan_priority_cmd) |
| 6658 | return wmi->ops->send_btcoex_wlan_priority_cmd(wmi, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 6659 | param); |
| 6660 | |
| 6661 | return QDF_STATUS_E_FAILURE; |
| 6662 | } |
| 6663 | /** |
| 6664 | * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands |
| 6665 | * @wmi_handle: wmi handle |
| 6666 | * @param: wmi btcoex cfg params |
| 6667 | * |
| 6668 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 6669 | * |
| 6670 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6671 | */ |
| 6672 | QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, |
| 6673 | struct btcoex_cfg_params *param) |
| 6674 | { |
| 6675 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 6676 | |
| 6677 | if (wmi->ops->send_btcoex_duty_cycle_cmd) |
| 6678 | return wmi->ops->send_btcoex_duty_cycle_cmd(wmi, |
| 6679 | param); |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 6680 | |
| 6681 | return QDF_STATUS_E_FAILURE; |
| 6682 | } |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6683 | |
| 6684 | /* |
| 6685 | * wmi_extract_service_ready_ext() - extract extended service ready |
| 6686 | * @wmi_handle: wmi handle |
| 6687 | * @param: wmi power debug parameter |
| 6688 | * |
| 6689 | * |
| 6690 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6691 | */ |
| 6692 | 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] | 6693 | struct wlan_psoc_host_service_ext_param *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6694 | { |
| 6695 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6696 | |
| 6697 | if (wmi_handle->ops->extract_service_ready_ext) |
| 6698 | return wmi_handle->ops->extract_service_ready_ext(wmi_handle, |
| 6699 | evt_buf, param); |
| 6700 | |
| 6701 | return QDF_STATUS_E_FAILURE; |
| 6702 | } |
| 6703 | |
| 6704 | /** |
Kabilan Kannan | 0d0f935 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 6705 | * wmi_extract_sar_cap_service_ready_ext() - |
| 6706 | * extract sar cap from service ready event |
| 6707 | * @wmi_handle: wmi handle |
| 6708 | * @evt_buf: pointer to event buffer |
| 6709 | * @ext_param: extended target info |
| 6710 | * |
| 6711 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6712 | */ |
| 6713 | QDF_STATUS wmi_extract_sar_cap_service_ready_ext( |
| 6714 | void *wmi_hdl, |
| 6715 | uint8_t *evt_buf, |
| 6716 | struct wlan_psoc_host_service_ext_param *ext_param) |
| 6717 | { |
| 6718 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6719 | |
| 6720 | if (wmi_handle->ops->extract_sar_cap_service_ready_ext) |
| 6721 | return wmi_handle->ops->extract_sar_cap_service_ready_ext( |
| 6722 | wmi_handle, |
| 6723 | evt_buf, ext_param); |
| 6724 | |
| 6725 | return QDF_STATUS_E_FAILURE; |
| 6726 | } |
| 6727 | |
| 6728 | /** |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6729 | * wmi_extract_hw_mode_cap_service_ready_ext() - |
| 6730 | * extract HW mode cap from service ready event |
| 6731 | * @wmi_handle: wmi handle |
| 6732 | * @param evt_buf: pointer to event buffer |
| 6733 | * @param param: Pointer to hold evt buf |
| 6734 | * @param hw_mode_idx: hw mode idx should be less than num_mode |
| 6735 | * |
| 6736 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6737 | */ |
| 6738 | QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( |
| 6739 | void *wmi_hdl, |
| 6740 | uint8_t *evt_buf, uint8_t hw_mode_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6741 | struct wlan_psoc_host_hw_mode_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6742 | { |
| 6743 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6744 | |
| 6745 | if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext) |
| 6746 | return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext( |
| 6747 | wmi_handle, |
| 6748 | evt_buf, hw_mode_idx, param); |
| 6749 | |
| 6750 | return QDF_STATUS_E_FAILURE; |
| 6751 | } |
| 6752 | /** |
| 6753 | * wmi_extract_mac_phy_cap_service_ready_ext() - |
| 6754 | * extract MAC phy cap from service ready event |
| 6755 | * @wmi_handle: wmi handle |
| 6756 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6757 | * @param hw_mode_id: hw mode id of hw_mode_caps |
| 6758 | * @param phy_id: phy_id within hw_mode_cap |
| 6759 | * @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] | 6760 | * |
| 6761 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6762 | */ |
| 6763 | QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( |
| 6764 | void *wmi_hdl, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6765 | uint8_t *evt_buf, |
| 6766 | uint8_t hw_mode_id, |
| 6767 | uint8_t phy_id, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6768 | struct wlan_psoc_host_mac_phy_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6769 | { |
| 6770 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6771 | |
| 6772 | if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext) |
| 6773 | return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext( |
| 6774 | wmi_handle, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 6775 | evt_buf, hw_mode_id, phy_id, param); |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6776 | |
| 6777 | return QDF_STATUS_E_FAILURE; |
| 6778 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6779 | |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6780 | /** |
| 6781 | * wmi_extract_reg_cap_service_ready_ext() - |
| 6782 | * extract REG cap from service ready event |
| 6783 | * @wmi_handle: wmi handle |
| 6784 | * @param evt_buf: pointer to event buffer |
| 6785 | * @param param: Pointer to hold evt buf |
| 6786 | * @param phy_idx: phy idx should be less than num_mode |
| 6787 | * |
| 6788 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6789 | */ |
| 6790 | QDF_STATUS wmi_extract_reg_cap_service_ready_ext( |
| 6791 | void *wmi_hdl, |
| 6792 | uint8_t *evt_buf, uint8_t phy_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 6793 | struct wlan_psoc_host_hal_reg_capabilities_ext *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 6794 | { |
| 6795 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6796 | |
| 6797 | if (wmi_handle->ops->extract_reg_cap_service_ready_ext) |
| 6798 | return wmi_handle->ops->extract_reg_cap_service_ready_ext( |
| 6799 | wmi_handle, |
| 6800 | evt_buf, phy_idx, param); |
| 6801 | |
| 6802 | return QDF_STATUS_E_FAILURE; |
| 6803 | } |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 6804 | |
Sathish Kumar | f396c72 | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 6805 | QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( |
| 6806 | void *wmi_hdl, |
| 6807 | uint8_t *evt_buf, uint8_t idx, |
| 6808 | struct wlan_psoc_host_dbr_ring_caps *param) |
| 6809 | { |
| 6810 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6811 | |
| 6812 | if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext) |
| 6813 | return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext( |
| 6814 | wmi_handle, |
| 6815 | evt_buf, idx, param); |
| 6816 | |
| 6817 | return QDF_STATUS_E_FAILURE; |
| 6818 | } |
| 6819 | |
| 6820 | QDF_STATUS wmi_extract_dbr_buf_release_fixed( |
| 6821 | void *wmi_hdl, |
| 6822 | uint8_t *evt_buf, |
| 6823 | struct direct_buf_rx_rsp *param) |
| 6824 | { |
| 6825 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6826 | |
| 6827 | if (wmi_handle->ops->extract_dbr_buf_release_fixed) |
| 6828 | return wmi_handle->ops->extract_dbr_buf_release_fixed( |
| 6829 | wmi_handle, |
| 6830 | evt_buf, param); |
| 6831 | |
| 6832 | return QDF_STATUS_E_FAILURE; |
| 6833 | } |
| 6834 | |
| 6835 | QDF_STATUS wmi_extract_dbr_buf_release_entry( |
| 6836 | void *wmi_hdl, |
| 6837 | uint8_t *evt_buf, uint8_t idx, |
| 6838 | struct direct_buf_rx_entry *param) |
| 6839 | { |
| 6840 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6841 | |
| 6842 | if (wmi_handle->ops->extract_dbr_buf_release_entry) |
| 6843 | return wmi_handle->ops->extract_dbr_buf_release_entry( |
| 6844 | wmi_handle, |
| 6845 | evt_buf, idx, param); |
| 6846 | |
| 6847 | return QDF_STATUS_E_FAILURE; |
| 6848 | } |
| 6849 | |
Edayilliam Jayadev | 9265122 | 2018-04-06 16:37:17 +0530 | [diff] [blame] | 6850 | QDF_STATUS wmi_extract_dbr_buf_metadata( |
| 6851 | void *wmi_hdl, |
| 6852 | uint8_t *evt_buf, uint8_t idx, |
| 6853 | struct direct_buf_rx_metadata *param) |
| 6854 | { |
| 6855 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 6856 | |
| 6857 | if (wmi_handle->ops->extract_dbr_buf_metadata) |
| 6858 | return wmi_handle->ops->extract_dbr_buf_metadata( |
| 6859 | wmi_handle, |
| 6860 | evt_buf, idx, param); |
| 6861 | |
| 6862 | return QDF_STATUS_E_FAILURE; |
| 6863 | } |
| 6864 | |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 6865 | /** |
| 6866 | * wmi_extract_pdev_utf_event() - |
| 6867 | * extract UTF data from pdev utf event |
| 6868 | * @wmi_handle: wmi handle |
| 6869 | * @param evt_buf: pointer to event buffer |
| 6870 | * @param param: Pointer to hold evt buf |
| 6871 | * |
| 6872 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6873 | */ |
| 6874 | QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, |
| 6875 | uint8_t *evt_buf, |
| 6876 | struct wmi_host_pdev_utf_event *param) |
| 6877 | { |
| 6878 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6879 | |
| 6880 | if (wmi_handle->ops->extract_pdev_utf_event) |
| 6881 | return wmi_handle->ops->extract_pdev_utf_event( |
| 6882 | wmi_handle, |
| 6883 | evt_buf, param); |
| 6884 | |
| 6885 | return QDF_STATUS_E_FAILURE; |
| 6886 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6887 | |
| 6888 | /** |
Kiran Venkatappa | 316357d | 2017-02-28 14:19:17 +0530 | [diff] [blame] | 6889 | * wmi_extract_pdev_qvit_event() - |
| 6890 | * extract UTF data from pdev qvit event |
| 6891 | * @wmi_handle: wmi handle |
| 6892 | * @param evt_buf: pointer to event buffer |
| 6893 | * @param param: Pointer to hold evt buf |
| 6894 | * |
| 6895 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6896 | */ |
| 6897 | QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, |
| 6898 | uint8_t *evt_buf, |
| 6899 | struct wmi_host_pdev_qvit_event *param) |
| 6900 | { |
| 6901 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6902 | |
| 6903 | if (wmi_handle->ops->extract_pdev_qvit_event) |
| 6904 | return wmi_handle->ops->extract_pdev_qvit_event( |
| 6905 | wmi_handle, |
| 6906 | evt_buf, param); |
| 6907 | |
| 6908 | return QDF_STATUS_E_FAILURE; |
| 6909 | } |
| 6910 | |
| 6911 | /** |
Sathish Kumar | 58a9fb9 | 2017-01-19 14:57:37 +0530 | [diff] [blame] | 6912 | * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command |
| 6913 | * @wmi_handle: wmi handle |
| 6914 | * @param: wmi coex ver cfg params |
| 6915 | * |
| 6916 | * Send WMI_COEX_VERSION_CFG_CMID parameters to fw. |
| 6917 | * |
| 6918 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6919 | */ |
| 6920 | QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, |
| 6921 | coex_ver_cfg_t *param) |
| 6922 | { |
| 6923 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6924 | |
| 6925 | if (wmi_handle->ops->send_coex_ver_cfg_cmd) |
| 6926 | return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle, |
| 6927 | param); |
| 6928 | |
| 6929 | return QDF_STATUS_E_FAILURE; |
| 6930 | } |
| 6931 | |
| 6932 | /** |
Sathish Kumar | 80f4f38 | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 6933 | * wmi_unified_send_coex_config_cmd() - send coex ver cfg command |
| 6934 | * @wmi_handle: wmi handle |
| 6935 | * @param: wmi coex cfg cmd params |
| 6936 | * |
| 6937 | * Send WMI_COEX_CFG_CMD parameters to fw. |
| 6938 | * |
| 6939 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 6940 | */ |
| 6941 | QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, |
| 6942 | struct coex_config_params *param) |
| 6943 | { |
| 6944 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6945 | |
| 6946 | if (wmi_handle->ops->send_coex_config_cmd) |
| 6947 | return wmi_handle->ops->send_coex_config_cmd(wmi_handle, |
| 6948 | param); |
| 6949 | |
| 6950 | return QDF_STATUS_E_FAILURE; |
| 6951 | } |
| 6952 | |
Rajeev Kumar Sirasanagandla | ab4275d | 2016-11-22 21:28:54 +0530 | [diff] [blame] | 6953 | QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, |
| 6954 | struct rcpi_req *get_rcpi_param) |
| 6955 | { |
| 6956 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6957 | |
| 6958 | if (wmi_handle->ops->send_get_rcpi_cmd) |
| 6959 | return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle, |
| 6960 | get_rcpi_param); |
| 6961 | |
| 6962 | return QDF_STATUS_E_FAILURE; |
| 6963 | } |
| 6964 | |
| 6965 | QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, |
| 6966 | struct rcpi_res *res) |
| 6967 | { |
| 6968 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 6969 | struct wmi_ops *ops = wmi_handle->ops; |
| 6970 | |
| 6971 | if (ops->extract_rcpi_response_event) |
| 6972 | return ops->extract_rcpi_response_event(wmi_handle, evt_buf, |
| 6973 | res); |
| 6974 | |
| 6975 | return QDF_STATUS_E_FAILURE; |
| 6976 | } |
| 6977 | |
Sathish Kumar | 80f4f38 | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 6978 | /** |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 6979 | * wmi_extract_peer_delete_response_event() - |
| 6980 | * extract vdev id and peer mac addresse from peer delete response event |
| 6981 | * @wmi_handle: wmi handle |
| 6982 | * @param evt_buf: pointer to event buffer |
| 6983 | * @param param: Pointer to hold evt buf |
| 6984 | * |
| 6985 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 6986 | */ |
| 6987 | QDF_STATUS wmi_extract_peer_delete_response_event( |
| 6988 | void *wmi_hdl, |
| 6989 | uint8_t *evt_buf, |
| 6990 | struct wmi_host_peer_delete_response_event *param) |
| 6991 | { |
| 6992 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 6993 | |
| 6994 | if (wmi_handle->ops->extract_peer_delete_response_event) |
| 6995 | return wmi_handle->ops->extract_peer_delete_response_event( |
| 6996 | wmi_handle, |
| 6997 | evt_buf, param); |
| 6998 | |
| 6999 | return QDF_STATUS_E_FAILURE; |
| 7000 | } |
Arif Hussain | f00be1d | 2017-01-07 18:21:55 -0800 | [diff] [blame] | 7001 | |
| 7002 | QDF_STATUS |
| 7003 | wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, |
| 7004 | uint32_t pdev_id) |
| 7005 | { |
| 7006 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7007 | |
| 7008 | if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd) |
| 7009 | return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd( |
| 7010 | wmi_handle, pdev_id); |
| 7011 | |
| 7012 | return QDF_STATUS_E_FAILURE; |
| 7013 | } |
| 7014 | |
| 7015 | QDF_STATUS |
| 7016 | wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, |
| 7017 | uint32_t pdev_id) |
| 7018 | { |
| 7019 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7020 | |
| 7021 | if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd) |
| 7022 | return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd( |
| 7023 | wmi_handle, pdev_id); |
| 7024 | |
| 7025 | return QDF_STATUS_E_FAILURE; |
| 7026 | } |
Vikram Kandukuri | 45fc858 | 2017-03-07 18:40:13 +0530 | [diff] [blame] | 7027 | |
| 7028 | /* |
| 7029 | * wmi_extract_chainmask_tables_tlv() - extract chain mask tables |
| 7030 | * @wmi_handle: wmi handle |
| 7031 | * @evt_buf: pointer to event buffer. |
| 7032 | * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table |
| 7033 | * |
| 7034 | * |
| 7035 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 7036 | */ |
| 7037 | QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, |
| 7038 | struct wlan_psoc_host_chainmask_table *chainmask_table) |
| 7039 | { |
| 7040 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7041 | |
| 7042 | if (wmi_handle->ops->extract_chainmask_tables) |
| 7043 | return wmi_handle->ops->extract_chainmask_tables(wmi_handle, |
| 7044 | evt_buf, chainmask_table); |
| 7045 | |
| 7046 | return QDF_STATUS_E_FAILURE; |
| 7047 | } |
Kiran Kumar Lokere | daf91e3 | 2017-04-24 00:56:03 -0700 | [diff] [blame] | 7048 | /** |
| 7049 | * wmi_unified_set_country_cmd_send() - WMI set country function |
| 7050 | * @param wmi_handle : handle to WMI. |
| 7051 | * @param param : pointer to hold set country cmd parameter |
| 7052 | * |
| 7053 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 7054 | */ |
| 7055 | QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, |
| 7056 | struct set_country *param) |
| 7057 | { |
| 7058 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7059 | |
| 7060 | if (wmi_handle->ops->send_set_country_cmd) |
| 7061 | return wmi_handle->ops->send_set_country_cmd(wmi_handle, |
| 7062 | param); |
| 7063 | |
| 7064 | return QDF_STATUS_E_FAILURE; |
| 7065 | } |
| 7066 | |
Nitesh Shah | 52323d0 | 2017-05-22 15:49:00 +0530 | [diff] [blame] | 7067 | /** |
| 7068 | * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of |
| 7069 | * DBS scan selection configuration params |
| 7070 | * @wma_handle: wma handler |
| 7071 | * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params |
| 7072 | * |
| 7073 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure |
| 7074 | */ |
| 7075 | QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl, |
| 7076 | struct wmi_dbs_scan_sel_params *dbs_scan_params) |
| 7077 | { |
| 7078 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7079 | |
| 7080 | if (wmi_handle->ops->send_dbs_scan_sel_params_cmd) |
| 7081 | return wmi_handle->ops-> |
| 7082 | send_dbs_scan_sel_params_cmd(wmi_handle, |
| 7083 | dbs_scan_params); |
| 7084 | |
| 7085 | return QDF_STATUS_E_FAILURE; |
| 7086 | } |
Ganesh Kondabattini | 40252f5 | 2017-07-10 11:54:11 +0530 | [diff] [blame] | 7087 | |
Rajeev Kumar Sirasanagandla | daadf83 | 2017-09-18 16:47:52 +0530 | [diff] [blame] | 7088 | #ifdef WLAN_FEATURE_ACTION_OUI |
| 7089 | QDF_STATUS |
| 7090 | wmi_unified_send_action_oui_cmd(void *wmi_hdl, |
| 7091 | struct action_oui_request *req) |
| 7092 | { |
| 7093 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7094 | |
| 7095 | if (wmi_handle->ops->send_action_oui_cmd) |
| 7096 | return wmi_handle->ops->send_action_oui_cmd(wmi_handle, |
| 7097 | req); |
| 7098 | |
| 7099 | return QDF_STATUS_E_FAILURE; |
| 7100 | } |
| 7101 | #endif |
| 7102 | |
Ganesh Kondabattini | 40252f5 | 2017-07-10 11:54:11 +0530 | [diff] [blame] | 7103 | /** |
| 7104 | * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel |
| 7105 | * configuration params |
| 7106 | * @wmi_hdl: wmi handler |
| 7107 | * @limit_off_chan_param: pointer to wmi_limit_off_chan_param |
| 7108 | * |
| 7109 | * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure |
| 7110 | */ |
| 7111 | QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl, |
| 7112 | struct wmi_limit_off_chan_param *limit_off_chan_param) |
| 7113 | { |
| 7114 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7115 | |
| 7116 | if (wmi_handle->ops->send_limit_off_chan_cmd) |
| 7117 | return wmi_handle->ops->send_limit_off_chan_cmd(wmi_handle, |
| 7118 | limit_off_chan_param); |
| 7119 | |
| 7120 | return QDF_STATUS_E_FAILURE; |
| 7121 | } |
Kiran Venkatappa | 7fe3afc | 2017-11-08 19:32:23 +0530 | [diff] [blame] | 7122 | |
| 7123 | /** |
| 7124 | * wmi_send_bcn_offload_control_cmd - send beacon ofload control cmd to fw |
| 7125 | * @wmi_hdl: wmi handle |
| 7126 | * @bcn_ctrl_param: pointer to bcn_offload_control param |
| 7127 | * |
| 7128 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 7129 | */ |
| 7130 | QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl, |
| 7131 | struct bcn_offload_control *bcn_ctrl_param) |
| 7132 | { |
| 7133 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7134 | |
| 7135 | if (wmi_handle->ops->send_bcn_offload_control_cmd) |
| 7136 | return wmi_handle->ops->send_bcn_offload_control_cmd(wmi_handle, |
| 7137 | bcn_ctrl_param); |
| 7138 | |
| 7139 | return QDF_STATUS_E_FAILURE; |
| 7140 | } |
Rathees kumar Chinannan | e3d6feb | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 7141 | |
| 7142 | /** |
| 7143 | * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of |
| 7144 | * wds entries from FW |
| 7145 | * @wmi_handle: wmi handle |
| 7146 | * |
| 7147 | * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. |
| 7148 | * |
| 7149 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 7150 | */ |
| 7151 | QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl) |
| 7152 | { |
| 7153 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7154 | |
| 7155 | if (wmi_handle->ops->send_wds_entry_list_cmd) |
| 7156 | return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle); |
| 7157 | |
| 7158 | return QDF_STATUS_E_FAILURE; |
| 7159 | } |
| 7160 | |
| 7161 | /** |
| 7162 | * wmi_extract_wds_entry - api to extract wds entry |
| 7163 | * @wmi_handle: wma handle |
| 7164 | * @evt_buf: pointer to event buffer |
| 7165 | * @wds_entry: wds entry |
| 7166 | * @idx: index to point wds entry in event buffer |
| 7167 | * |
| 7168 | * Return: QDF_STATUS_SUCCESS for successful event parse |
| 7169 | * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE |
| 7170 | */ |
| 7171 | QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, |
| 7172 | struct wdsentry *wds_entry, |
| 7173 | u_int32_t idx) |
| 7174 | { |
| 7175 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7176 | |
| 7177 | if (wmi_handle->ops->extract_wds_entry) |
| 7178 | return wmi_handle->ops->extract_wds_entry(wmi_handle, |
| 7179 | evt_buf, wds_entry, idx); |
| 7180 | |
| 7181 | return QDF_STATUS_E_FAILURE; |
| 7182 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 7183 | qdf_export_symbol(wmi_extract_wds_entry); |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7184 | |
| 7185 | #ifdef WLAN_FEATURE_NAN_CONVERGENCE |
| 7186 | QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl, |
| 7187 | struct nan_datapath_initiator_req *req) |
| 7188 | { |
| 7189 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7190 | |
| 7191 | if (wmi_handle->ops->send_ndp_initiator_req_cmd) |
| 7192 | return wmi_handle->ops->send_ndp_initiator_req_cmd(wmi_handle, |
| 7193 | req); |
| 7194 | |
| 7195 | return QDF_STATUS_E_FAILURE; |
| 7196 | } |
| 7197 | |
| 7198 | QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl, |
| 7199 | struct nan_datapath_responder_req *req) |
| 7200 | { |
| 7201 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7202 | |
| 7203 | if (wmi_handle->ops->send_ndp_responder_req_cmd) |
| 7204 | return wmi_handle->ops->send_ndp_responder_req_cmd(wmi_handle, |
| 7205 | req); |
| 7206 | |
| 7207 | return QDF_STATUS_E_FAILURE; |
| 7208 | } |
| 7209 | |
| 7210 | QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl, |
| 7211 | struct nan_datapath_end_req *req) |
| 7212 | { |
| 7213 | wmi_unified_t wmi_handle = wmi_hdl; |
| 7214 | |
| 7215 | if (wmi_handle->ops->send_ndp_end_req_cmd) |
| 7216 | return wmi_handle->ops->send_ndp_end_req_cmd(wmi_handle, |
| 7217 | req); |
| 7218 | |
| 7219 | return QDF_STATUS_E_FAILURE; |
| 7220 | } |
| 7221 | |
| 7222 | QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7223 | uint8_t *data, struct nan_datapath_initiator_rsp *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7224 | { |
| 7225 | if (wmi_handle->ops->extract_ndp_initiator_rsp) |
| 7226 | return wmi_handle->ops->extract_ndp_initiator_rsp(wmi_handle, |
| 7227 | data, rsp); |
| 7228 | |
| 7229 | return QDF_STATUS_E_FAILURE; |
| 7230 | } |
| 7231 | |
| 7232 | 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] | 7233 | struct nan_datapath_indication_event *ind) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7234 | { |
| 7235 | if (wmi_handle->ops->extract_ndp_ind) |
| 7236 | return wmi_handle->ops->extract_ndp_ind(wmi_handle, |
| 7237 | data, ind); |
| 7238 | |
| 7239 | return QDF_STATUS_E_FAILURE; |
| 7240 | } |
| 7241 | |
| 7242 | 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] | 7243 | struct nan_datapath_confirm_event *ev) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7244 | { |
| 7245 | if (wmi_handle->ops->extract_ndp_confirm) |
| 7246 | return wmi_handle->ops->extract_ndp_confirm(wmi_handle, |
| 7247 | data, ev); |
| 7248 | |
| 7249 | return QDF_STATUS_E_FAILURE; |
| 7250 | } |
| 7251 | |
| 7252 | QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle, |
Naveen Rawat | 3aa16c4 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 7253 | uint8_t *data, struct nan_datapath_responder_rsp *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7254 | { |
| 7255 | if (wmi_handle->ops->extract_ndp_responder_rsp) |
| 7256 | return wmi_handle->ops->extract_ndp_responder_rsp(wmi_handle, |
| 7257 | data, rsp); |
| 7258 | |
| 7259 | return QDF_STATUS_E_FAILURE; |
| 7260 | } |
| 7261 | |
| 7262 | 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] | 7263 | struct nan_datapath_end_rsp_event *rsp) |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7264 | { |
| 7265 | if (wmi_handle->ops->extract_ndp_end_rsp) |
| 7266 | return wmi_handle->ops->extract_ndp_end_rsp(wmi_handle, |
| 7267 | data, rsp); |
| 7268 | |
| 7269 | return QDF_STATUS_E_FAILURE; |
| 7270 | } |
| 7271 | |
| 7272 | QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data, |
| 7273 | struct nan_datapath_end_indication_event **ind) |
| 7274 | { |
| 7275 | if (wmi_handle->ops->extract_ndp_end_ind) |
| 7276 | return wmi_handle->ops->extract_ndp_end_ind(wmi_handle, |
| 7277 | data, ind); |
| 7278 | |
| 7279 | return QDF_STATUS_E_FAILURE; |
| 7280 | } |
Naveen Rawat | d42ce38 | 2018-01-09 17:54:41 -0800 | [diff] [blame] | 7281 | |
| 7282 | QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data, |
| 7283 | struct nan_datapath_sch_update_event *ind) |
| 7284 | { |
| 7285 | if (wmi_handle->ops->extract_ndp_sch_update) |
| 7286 | return wmi_handle->ops->extract_ndp_sch_update(wmi_handle, |
| 7287 | data, ind); |
| 7288 | |
| 7289 | return QDF_STATUS_E_FAILURE; |
| 7290 | } |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 7291 | #endif |
yeshwanth sriram guntuka | 07a15b8 | 2017-09-01 17:56:07 +0530 | [diff] [blame] | 7292 | QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, |
| 7293 | struct wmi_btm_config *params) |
| 7294 | { |
| 7295 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7296 | |
| 7297 | if (wmi_handle->ops->send_btm_config) |
| 7298 | return wmi_handle->ops->send_btm_config(wmi_handle, |
| 7299 | params); |
| 7300 | |
| 7301 | return QDF_STATUS_E_FAILURE; |
| 7302 | } |
Arif Hussain | c5bfe07 | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 7303 | |
| 7304 | QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, |
| 7305 | struct wmi_obss_detection_cfg_param *obss_cfg_param) |
| 7306 | { |
| 7307 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7308 | |
| 7309 | if (wmi_handle->ops->send_obss_detection_cfg_cmd) |
| 7310 | return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle, |
| 7311 | obss_cfg_param); |
| 7312 | |
| 7313 | return QDF_STATUS_E_FAILURE; |
| 7314 | } |
Arif Hussain | 33d9850 | 2018-01-12 13:15:04 -0800 | [diff] [blame] | 7315 | |
| 7316 | QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, |
| 7317 | uint8_t *data, |
| 7318 | struct wmi_obss_detect_info |
| 7319 | *info) |
| 7320 | { |
| 7321 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7322 | |
| 7323 | if (wmi_handle->ops->extract_obss_detection_info) |
| 7324 | return wmi_handle->ops->extract_obss_detection_info(data, info); |
| 7325 | |
| 7326 | return QDF_STATUS_E_FAILURE; |
| 7327 | } |
Vignesh Viswanathan | 7f05777 | 2018-01-18 19:06:40 +0530 | [diff] [blame] | 7328 | |
| 7329 | QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, |
| 7330 | struct wmi_11k_offload_params *params) |
| 7331 | { |
| 7332 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7333 | |
| 7334 | if (wmi_handle->ops->send_offload_11k_cmd) |
| 7335 | return wmi_handle->ops->send_offload_11k_cmd( |
| 7336 | wmi_handle, params); |
| 7337 | |
| 7338 | return QDF_STATUS_E_FAILURE; |
| 7339 | } |
| 7340 | |
| 7341 | QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, |
| 7342 | struct wmi_invoke_neighbor_report_params *params) |
| 7343 | { |
| 7344 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 7345 | |
| 7346 | if (wmi_handle->ops->send_invoke_neighbor_report_cmd) |
| 7347 | return wmi_handle->ops->send_invoke_neighbor_report_cmd( |
| 7348 | wmi_handle, params); |
| 7349 | |
| 7350 | return QDF_STATUS_E_FAILURE; |
| 7351 | } |
Himanshu Agarwal | 157e478 | 2018-01-24 22:24:17 +0530 | [diff] [blame] | 7352 | |
| 7353 | #ifdef WLAN_SUPPORT_GREEN_AP |
| 7354 | QDF_STATUS wmi_extract_green_ap_egap_status_info( |
| 7355 | void *wmi_hdl, uint8_t *evt_buf, |
| 7356 | struct wlan_green_ap_egap_status_info *egap_status_info_params) |
| 7357 | { |
| 7358 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7359 | |
| 7360 | if (wmi_handle->ops->extract_green_ap_egap_status_info) |
| 7361 | return wmi_handle->ops->extract_green_ap_egap_status_info( |
| 7362 | evt_buf, egap_status_info_params); |
| 7363 | |
| 7364 | return QDF_STATUS_E_FAILURE; |
| 7365 | } |
| 7366 | #endif |
Arif Hussain | ec5cd3c | 2018-01-22 01:19:36 -0800 | [diff] [blame] | 7367 | |
| 7368 | QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, |
| 7369 | uint32_t vdev_id, |
| 7370 | bool enable) |
| 7371 | { |
| 7372 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7373 | |
| 7374 | if (wmi_handle->ops->send_bss_color_change_enable_cmd) |
| 7375 | return wmi_handle->ops->send_bss_color_change_enable_cmd( |
| 7376 | wmi_handle, vdev_id, enable); |
| 7377 | |
| 7378 | return QDF_STATUS_E_FAILURE; |
| 7379 | } |
| 7380 | |
| 7381 | QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, |
| 7382 | struct wmi_obss_color_collision_cfg_param *cfg) |
| 7383 | { |
| 7384 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7385 | |
| 7386 | if (wmi_handle->ops->send_obss_color_collision_cfg_cmd) |
| 7387 | return wmi_handle->ops->send_obss_color_collision_cfg_cmd( |
| 7388 | wmi_handle, cfg); |
| 7389 | |
| 7390 | return QDF_STATUS_E_FAILURE; |
| 7391 | } |
| 7392 | |
| 7393 | QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, |
| 7394 | uint8_t *data, struct wmi_obss_color_collision_info *info) |
| 7395 | { |
| 7396 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7397 | |
| 7398 | if (wmi_handle->ops->extract_obss_color_collision_info) |
| 7399 | return wmi_handle->ops->extract_obss_color_collision_info(data, |
| 7400 | info); |
| 7401 | |
| 7402 | return QDF_STATUS_E_FAILURE; |
| 7403 | } |
Naveen Rawat | 2630545 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 7404 | |
| 7405 | wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, |
| 7406 | WMI_HOST_WLAN_PHY_MODE phymode) |
| 7407 | { |
| 7408 | /* |
| 7409 | * this API does translation between host only strcutres, hence |
| 7410 | * does not need separate TLV, non-TLV definitions |
| 7411 | */ |
| 7412 | |
| 7413 | if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX) |
| 7414 | return mode_to_width[phymode]; |
| 7415 | else |
| 7416 | return WMI_HOST_CHAN_WIDTH_20; |
| 7417 | } |
Naveen Rawat | 963ee94 | 2018-04-13 16:38:36 -0700 | [diff] [blame] | 7418 | |
| 7419 | #ifdef QCA_SUPPORT_CP_STATS |
| 7420 | QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, |
| 7421 | struct wmi_host_congestion_stats *stats) |
| 7422 | { |
| 7423 | if (wmi_handle->ops->extract_cca_stats) |
| 7424 | return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf, |
| 7425 | stats); |
| 7426 | |
| 7427 | return QDF_STATUS_E_FAILURE; |
| 7428 | } |
| 7429 | #endif /* QCA_SUPPORT_CP_STATS */ |
Shashikala Prabhu | 5f65ac7 | 2018-05-16 10:08:09 +0530 | [diff] [blame] | 7430 | |
| 7431 | #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) |
| 7432 | QDF_STATUS |
| 7433 | wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, |
| 7434 | struct dfs_radar_found_params *params) |
| 7435 | { |
| 7436 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7437 | |
| 7438 | if (wmi_handle->ops->send_dfs_average_radar_params_cmd) |
| 7439 | return wmi_handle->ops->send_dfs_average_radar_params_cmd( |
| 7440 | wmi_handle, params); |
| 7441 | |
| 7442 | return QDF_STATUS_E_FAILURE; |
| 7443 | } |
| 7444 | |
| 7445 | QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, |
| 7446 | uint32_t *dfs_status_check) |
| 7447 | { |
| 7448 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7449 | |
| 7450 | if (wmi_handle->ops->extract_dfs_status_from_fw) |
| 7451 | return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle, |
| 7452 | evt_buf, dfs_status_check); |
| 7453 | |
| 7454 | return QDF_STATUS_E_FAILURE; |
| 7455 | } |
| 7456 | #endif |
c_cgodav | 758d99f | 2017-02-13 10:14:42 +0530 | [diff] [blame] | 7457 | |
| 7458 | #ifdef OL_ATH_SMART_LOGGING |
| 7459 | QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl, |
| 7460 | uint32_t param) |
| 7461 | { |
| 7462 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7463 | |
| 7464 | if (wmi_handle->ops->send_smart_logging_enable_cmd) |
| 7465 | return wmi_handle->ops->send_smart_logging_enable_cmd( |
| 7466 | wmi_handle, |
| 7467 | param); |
| 7468 | |
| 7469 | return QDF_STATUS_E_FAILURE; |
| 7470 | } |
| 7471 | |
| 7472 | QDF_STATUS |
| 7473 | wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl, |
| 7474 | struct wmi_debug_fatal_events *param) |
| 7475 | { |
| 7476 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7477 | |
| 7478 | if (wmi_handle->ops->send_smart_logging_fatal_cmd) |
| 7479 | return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle, |
| 7480 | param); |
| 7481 | |
| 7482 | return QDF_STATUS_E_FAILURE; |
| 7483 | } |
| 7484 | |
| 7485 | QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl, |
| 7486 | void *evt_buf, |
| 7487 | struct wmi_debug_fatal_events *ev) |
| 7488 | { |
| 7489 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 7490 | |
| 7491 | if (wmi->ops->extract_smartlog_event) |
| 7492 | return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev); |
| 7493 | |
| 7494 | return QDF_STATUS_E_FAILURE; |
| 7495 | } |
| 7496 | #endif /* OL_ATH_SMART_LOGGING */ |
Rajeev Kumar Sirasanagandla | d2d1a5e | 2018-03-02 21:12:16 +0530 | [diff] [blame] | 7497 | |
| 7498 | QDF_STATUS |
| 7499 | wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl, |
| 7500 | struct wmi_roam_scan_stats_req *params) |
| 7501 | { |
| 7502 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 7503 | |
| 7504 | if (wmi_handle->ops->send_roam_scan_stats_cmd) |
| 7505 | return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle, |
| 7506 | params); |
| 7507 | |
| 7508 | return QDF_STATUS_E_FAILURE; |
| 7509 | } |
| 7510 | |
| 7511 | QDF_STATUS |
| 7512 | wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, |
| 7513 | uint32_t *vdev_id, |
| 7514 | struct wmi_roam_scan_stats_res **res_param) |
| 7515 | { |
| 7516 | if (wmi->ops->extract_roam_scan_stats_res_evt) |
| 7517 | return wmi->ops->extract_roam_scan_stats_res_evt(wmi, |
| 7518 | evt_buf, |
| 7519 | vdev_id, res_param); |
| 7520 | |
| 7521 | return QDF_STATUS_E_FAILURE; |
| 7522 | } |