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