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