Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 1 | /* |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 3 | * |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 19 | #include "wmi_unified_priv.h" |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 20 | #include "wmi_unified_param.h" |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 21 | #include "qdf_module.h" |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 22 | |
Naveen Rawat | 2630545 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 23 | static const wmi_host_channel_width mode_to_width[WMI_HOST_MODE_MAX] = { |
| 24 | [WMI_HOST_MODE_11A] = WMI_HOST_CHAN_WIDTH_20, |
| 25 | [WMI_HOST_MODE_11G] = WMI_HOST_CHAN_WIDTH_20, |
| 26 | [WMI_HOST_MODE_11B] = WMI_HOST_CHAN_WIDTH_20, |
| 27 | [WMI_HOST_MODE_11GONLY] = WMI_HOST_CHAN_WIDTH_20, |
| 28 | [WMI_HOST_MODE_11NA_HT20] = WMI_HOST_CHAN_WIDTH_20, |
| 29 | [WMI_HOST_MODE_11NG_HT20] = WMI_HOST_CHAN_WIDTH_20, |
| 30 | [WMI_HOST_MODE_11AC_VHT20] = WMI_HOST_CHAN_WIDTH_20, |
| 31 | [WMI_HOST_MODE_11AC_VHT20_2G] = WMI_HOST_CHAN_WIDTH_20, |
| 32 | [WMI_HOST_MODE_11NA_HT40] = WMI_HOST_CHAN_WIDTH_40, |
| 33 | [WMI_HOST_MODE_11NG_HT40] = WMI_HOST_CHAN_WIDTH_40, |
| 34 | [WMI_HOST_MODE_11AC_VHT40] = WMI_HOST_CHAN_WIDTH_40, |
| 35 | [WMI_HOST_MODE_11AC_VHT40_2G] = WMI_HOST_CHAN_WIDTH_40, |
| 36 | [WMI_HOST_MODE_11AC_VHT80] = WMI_HOST_CHAN_WIDTH_80, |
| 37 | [WMI_HOST_MODE_11AC_VHT80_2G] = WMI_HOST_CHAN_WIDTH_80, |
| 38 | #if CONFIG_160MHZ_SUPPORT |
| 39 | [WMI_HOST_MODE_11AC_VHT80_80] = WMI_HOST_CHAN_WIDTH_80P80, |
| 40 | [WMI_HOST_MODE_11AC_VHT160] = WMI_HOST_CHAN_WIDTH_160, |
| 41 | #endif |
| 42 | |
| 43 | #if SUPPORT_11AX |
| 44 | [WMI_HOST_MODE_11AX_HE20] = WMI_HOST_CHAN_WIDTH_20, |
| 45 | [WMI_HOST_MODE_11AX_HE40] = WMI_HOST_CHAN_WIDTH_40, |
| 46 | [WMI_HOST_MODE_11AX_HE80] = WMI_HOST_CHAN_WIDTH_80, |
| 47 | [WMI_HOST_MODE_11AX_HE80_80] = WMI_HOST_CHAN_WIDTH_80P80, |
| 48 | [WMI_HOST_MODE_11AX_HE160] = WMI_HOST_CHAN_WIDTH_160, |
| 49 | [WMI_HOST_MODE_11AX_HE20_2G] = WMI_HOST_CHAN_WIDTH_20, |
| 50 | [WMI_HOST_MODE_11AX_HE40_2G] = WMI_HOST_CHAN_WIDTH_40, |
| 51 | [WMI_HOST_MODE_11AX_HE80_2G] = WMI_HOST_CHAN_WIDTH_80, |
| 52 | #endif |
| 53 | }; |
| 54 | |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 55 | /** |
| 56 | * wmi_unified_vdev_create_send() - send VDEV create command to fw |
| 57 | * @wmi_handle: wmi handle |
| 58 | * @param: pointer to hold vdev create parameter |
| 59 | * @macaddr: vdev mac address |
| 60 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 61 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 62 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 63 | QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 64 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 65 | struct vdev_create_params *param) |
| 66 | { |
| 67 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 68 | |
| 69 | if (wmi_handle->ops->send_vdev_create_cmd) |
| 70 | return wmi_handle->ops->send_vdev_create_cmd(wmi_handle, |
| 71 | macaddr, param); |
| 72 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 73 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | /** |
| 77 | * wmi_unified_vdev_delete_send() - send VDEV delete command to fw |
| 78 | * @wmi_handle: wmi handle |
| 79 | * @if_id: vdev id |
| 80 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 81 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 82 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 83 | QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 84 | uint8_t if_id) |
| 85 | { |
| 86 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 87 | |
| 88 | if (wmi_handle->ops->send_vdev_delete_cmd) |
| 89 | return wmi_handle->ops->send_vdev_delete_cmd(wmi_handle, |
| 90 | if_id); |
| 91 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 92 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | /** |
| 96 | * wmi_unified_vdev_stop_send() - send vdev stop command to fw |
| 97 | * @wmi: wmi handle |
| 98 | * @vdev_id: vdev id |
| 99 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 100 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 101 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 102 | QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 103 | uint8_t vdev_id) |
| 104 | { |
| 105 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 106 | |
| 107 | if (wmi_handle->ops->send_vdev_stop_cmd) |
| 108 | return wmi_handle->ops->send_vdev_stop_cmd(wmi_handle, |
| 109 | vdev_id); |
| 110 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 111 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | /** |
| 115 | * wmi_unified_vdev_down_send() - send vdev down command to fw |
| 116 | * @wmi: wmi handle |
| 117 | * @vdev_id: vdev id |
| 118 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 119 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 120 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 121 | QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, uint8_t vdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 122 | { |
| 123 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 124 | |
| 125 | if (wmi_handle->ops->send_vdev_down_cmd) |
| 126 | return wmi_handle->ops->send_vdev_down_cmd(wmi_handle, vdev_id); |
| 127 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 128 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | /** |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 132 | * wmi_unified_vdev_start_send() - send vdev start command to fw |
| 133 | * @wmi: wmi handle |
| 134 | * @vdev_id: vdev id |
| 135 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 136 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 137 | */ |
| 138 | QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl, |
| 139 | struct vdev_start_params *req) |
| 140 | { |
| 141 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 142 | |
| 143 | if (wmi_handle->ops->send_vdev_start_cmd) |
| 144 | return wmi_handle->ops->send_vdev_start_cmd(wmi_handle, req); |
| 145 | |
| 146 | return QDF_STATUS_E_FAILURE; |
| 147 | } |
| 148 | |
| 149 | /** |
Chaithanya Garrepalli | 8a9c38d | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 150 | * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw |
| 151 | * @wmi: wmi handle |
| 152 | * @req: pointer to hold nac rssi request data |
| 153 | * |
| 154 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 155 | */ |
| 156 | QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl, |
| 157 | struct vdev_scan_nac_rssi_params *req) |
| 158 | { |
| 159 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 160 | |
| 161 | if (wmi_handle->ops->send_vdev_set_nac_rssi_cmd) |
| 162 | return wmi_handle->ops->send_vdev_set_nac_rssi_cmd(wmi_handle, req); |
| 163 | |
| 164 | return QDF_STATUS_E_FAILURE; |
| 165 | } |
| 166 | |
| 167 | /** |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 168 | * wmi_unified_hidden_ssid_vdev_restart_send() - restart vdev to set hidden ssid |
| 169 | * @wmi: wmi handle |
| 170 | * @restart_params: vdev restart params |
| 171 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 172 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Himanshu Agarwal | 0007b76 | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 173 | */ |
| 174 | QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl, |
| 175 | struct hidden_ssid_vdev_restart_params *restart_params) |
| 176 | { |
| 177 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 178 | |
| 179 | if (wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd) |
| 180 | return wmi_handle->ops->send_hidden_ssid_vdev_restart_cmd( |
| 181 | wmi_handle, restart_params); |
| 182 | |
| 183 | return QDF_STATUS_E_FAILURE; |
| 184 | } |
| 185 | |
| 186 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 187 | * wmi_unified_peer_flush_tids_send() - flush peer tids packets in fw |
| 188 | * @wmi: wmi handle |
| 189 | * @peer_addr: peer mac address |
| 190 | * @param: pointer to hold peer flush tid parameter |
| 191 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 192 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 193 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 194 | QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 195 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 196 | struct peer_flush_params *param) |
| 197 | { |
| 198 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 199 | |
| 200 | if (wmi_handle->ops->send_peer_flush_tids_cmd) |
| 201 | return wmi_handle->ops->send_peer_flush_tids_cmd(wmi_handle, |
| 202 | peer_addr, param); |
| 203 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 204 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | /** |
| 208 | * wmi_unified_peer_delete_send() - send PEER delete command to fw |
| 209 | * @wmi: wmi handle |
| 210 | * @peer_addr: peer mac addr |
| 211 | * @vdev_id: vdev id |
| 212 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 213 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 214 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 215 | QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 216 | uint8_t |
| 217 | peer_addr[IEEE80211_ADDR_LEN], |
| 218 | uint8_t vdev_id) |
| 219 | { |
| 220 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 221 | |
| 222 | if (wmi_handle->ops->send_peer_delete_cmd) |
| 223 | return wmi_handle->ops->send_peer_delete_cmd(wmi_handle, |
| 224 | peer_addr, vdev_id); |
| 225 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 226 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | /** |
| 230 | * wmi_set_peer_param() - set peer parameter in fw |
| 231 | * @wmi_ctx: wmi handle |
| 232 | * @peer_addr: peer mac address |
| 233 | * @param : pointer to hold peer set parameter |
| 234 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 235 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 236 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 237 | QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 238 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 239 | struct peer_set_params *param) |
| 240 | { |
| 241 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 242 | |
| 243 | if (wmi_handle->ops->send_peer_param_cmd) |
| 244 | return wmi_handle->ops->send_peer_param_cmd(wmi_handle, |
| 245 | peer_addr, param); |
| 246 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 247 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 248 | } |
| 249 | |
| 250 | /** |
| 251 | * wmi_unified_vdev_up_send() - send vdev up command in fw |
| 252 | * @wmi: wmi handle |
| 253 | * @bssid: bssid |
| 254 | * @vdev_up_params: pointer to hold vdev up parameter |
| 255 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 256 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 257 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 258 | QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 259 | uint8_t bssid[IEEE80211_ADDR_LEN], |
| 260 | struct vdev_up_params *params) |
| 261 | { |
| 262 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 263 | |
| 264 | if (wmi_handle->ops->send_vdev_up_cmd) |
| 265 | return wmi_handle->ops->send_vdev_up_cmd(wmi_handle, bssid, |
| 266 | params); |
| 267 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 268 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | /** |
| 272 | * wmi_unified_peer_create_send() - send peer create command to fw |
| 273 | * @wmi: wmi handle |
| 274 | * @peer_addr: peer mac address |
| 275 | * @peer_type: peer type |
| 276 | * @vdev_id: vdev id |
| 277 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 278 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 279 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 280 | QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 281 | struct peer_create_params *param) |
| 282 | { |
| 283 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 284 | |
| 285 | if (wmi_handle->ops->send_peer_create_cmd) |
| 286 | return wmi_handle->ops->send_peer_create_cmd(wmi_handle, param); |
| 287 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 288 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 289 | } |
| 290 | |
Leo Chang | eee4087 | 2016-09-28 13:43:36 -0700 | [diff] [blame] | 291 | /** |
| 292 | * wmi_unified_peer_rx_reorder_queue_setup_send() - send rx reorder queue |
| 293 | * setup command to fw |
| 294 | * @wmi: wmi handle |
| 295 | * @rx_reorder_queue_setup_params: Rx reorder queue setup parameters |
| 296 | * |
| 297 | * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure |
| 298 | */ |
| 299 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl, |
| 300 | struct rx_reorder_queue_setup_params *param) |
| 301 | { |
| 302 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 303 | |
| 304 | if (wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd) |
| 305 | return wmi_handle->ops->send_peer_rx_reorder_queue_setup_cmd( |
| 306 | wmi_handle, param); |
| 307 | |
| 308 | return QDF_STATUS_E_FAILURE; |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * wmi_unified_peer_rx_reorder_queue_remove_send() - send rx reorder queue |
| 313 | * remove command to fw |
| 314 | * @wmi: wmi handle |
| 315 | * @rx_reorder_queue_remove_params: Rx reorder queue remove parameters |
| 316 | * |
| 317 | * Return: QDF_STATUS for success and QDF_STATUS_E_FAILURE for failure |
| 318 | */ |
| 319 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl, |
| 320 | struct rx_reorder_queue_remove_params *param) |
| 321 | { |
| 322 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 323 | |
| 324 | if (wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd) |
| 325 | return wmi_handle->ops->send_peer_rx_reorder_queue_remove_cmd( |
| 326 | wmi_handle, param); |
| 327 | |
| 328 | return QDF_STATUS_E_FAILURE; |
| 329 | } |
| 330 | |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 331 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 332 | /** |
| 333 | * wmi_unified_green_ap_ps_send() - enable green ap powersave command |
| 334 | * @wmi_handle: wmi handle |
| 335 | * @value: value |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 336 | * @pdev_id: pdev id to have radio context |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 337 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 338 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 339 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 340 | QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 341 | uint32_t value, uint8_t pdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 342 | { |
| 343 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 344 | |
| 345 | if (wmi_handle->ops->send_green_ap_ps_cmd) |
| 346 | return wmi_handle->ops->send_green_ap_ps_cmd(wmi_handle, value, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 347 | pdev_id); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 348 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 349 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 350 | } |
| 351 | #else |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 352 | QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 353 | uint32_t value, uint8_t pdev_id) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 354 | { |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 355 | return QDF_STATUS_SUCCESS; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 356 | } |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 357 | #endif /* WLAN_SUPPORT_GREEN_AP */ |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 358 | |
| 359 | /** |
| 360 | * wmi_unified_pdev_utf_cmd() - send utf command to fw |
| 361 | * @wmi_handle: wmi handle |
| 362 | * @param: pointer to pdev_utf_params |
| 363 | * @mac_id: mac id to have radio context |
| 364 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 365 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 366 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 367 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 368 | wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, |
| 369 | struct pdev_utf_params *param, |
| 370 | uint8_t mac_id) |
| 371 | { |
| 372 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 373 | |
| 374 | if (wmi_handle->ops->send_pdev_utf_cmd) |
| 375 | return wmi_handle->ops->send_pdev_utf_cmd(wmi_handle, param, |
| 376 | mac_id); |
| 377 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 378 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 382 | * wmi_unified_pdev_param_send() - set pdev parameters |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 383 | * @wmi_handle: wmi handle |
| 384 | * @param: pointer to pdev parameter |
| 385 | * @mac_id: radio context |
| 386 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 387 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures, |
| 388 | * errno on failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 389 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 390 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 391 | wmi_unified_pdev_param_send(void *wmi_hdl, |
| 392 | struct pdev_params *param, |
| 393 | uint8_t mac_id) |
| 394 | { |
| 395 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 396 | |
| 397 | if (wmi_handle->ops->send_pdev_param_cmd) |
| 398 | return wmi_handle->ops->send_pdev_param_cmd(wmi_handle, param, |
| 399 | mac_id); |
| 400 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 401 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 402 | } |
| 403 | |
| 404 | /** |
| 405 | * wmi_unified_suspend_send() - WMI suspend function |
| 406 | * @param wmi_handle : handle to WMI. |
| 407 | * @param param : pointer to hold suspend parameter |
| 408 | * @mac_id: radio context |
| 409 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 410 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 411 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 412 | QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 413 | struct suspend_params *param, |
| 414 | uint8_t mac_id) |
| 415 | { |
| 416 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 417 | |
| 418 | if (wmi_handle->ops->send_suspend_cmd) |
| 419 | return wmi_handle->ops->send_suspend_cmd(wmi_handle, param, |
| 420 | mac_id); |
| 421 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 422 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 423 | } |
| 424 | |
| 425 | /** |
| 426 | * wmi_unified_resume_send - WMI resume function |
| 427 | * @param wmi_handle : handle to WMI. |
| 428 | * @mac_id: radio context |
| 429 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 430 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 431 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 432 | QDF_STATUS wmi_unified_resume_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 433 | uint8_t mac_id) |
| 434 | { |
| 435 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 436 | |
| 437 | if (wmi_handle->ops->send_resume_cmd) |
| 438 | return wmi_handle->ops->send_resume_cmd(wmi_handle, |
| 439 | mac_id); |
| 440 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 441 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 442 | } |
| 443 | |
| 444 | /** |
| 445 | * wmi_unified_wow_enable_send() - WMI wow enable function |
| 446 | * @param wmi_handle : handle to WMI. |
| 447 | * @param param : pointer to hold wow enable parameter |
| 448 | * @mac_id: radio context |
| 449 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 450 | * 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] | 451 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 452 | QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 453 | struct wow_cmd_params *param, |
| 454 | uint8_t mac_id) |
| 455 | { |
| 456 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 457 | |
| 458 | if (wmi_handle->ops->send_wow_enable_cmd) |
| 459 | return wmi_handle->ops->send_wow_enable_cmd(wmi_handle, param, |
| 460 | mac_id); |
| 461 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 462 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 463 | } |
| 464 | |
| 465 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 466 | * wmi_unified_wow_wakeup_send() - WMI wow wakeup function |
| 467 | * @param wmi_hdl : handle to WMI. |
| 468 | * |
| 469 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 470 | */ |
| 471 | QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl) |
| 472 | { |
| 473 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 474 | |
| 475 | if (wmi_handle->ops->send_wow_wakeup_cmd) |
| 476 | return wmi_handle->ops->send_wow_wakeup_cmd(wmi_handle); |
| 477 | |
| 478 | return QDF_STATUS_E_FAILURE; |
| 479 | } |
| 480 | |
| 481 | /** |
| 482 | * wmi_unified_wow_add_wakeup_event_send() - WMI wow wakeup function |
| 483 | * @param wmi_handle : handle to WMI. |
| 484 | * @param: pointer to wow wakeup event parameter structure |
| 485 | * |
| 486 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 487 | */ |
| 488 | QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl, |
| 489 | struct wow_add_wakeup_params *param) |
| 490 | { |
| 491 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 492 | |
| 493 | if (wmi->ops->send_wow_add_wakeup_event_cmd) |
| 494 | return wmi->ops->send_wow_add_wakeup_event_cmd(wmi, |
| 495 | param); |
| 496 | |
| 497 | return QDF_STATUS_E_FAILURE; |
| 498 | } |
| 499 | |
| 500 | /** |
| 501 | * wmi_unified_wow_add_wakeup_pattern_send() - WMI wow wakeup pattern function |
| 502 | * @param wmi_handle : handle to WMI. |
| 503 | * @param: pointer to wow wakeup pattern parameter structure |
| 504 | * |
| 505 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 506 | */ |
| 507 | QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl, |
| 508 | struct wow_add_wakeup_pattern_params *param) |
| 509 | { |
| 510 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 511 | |
| 512 | if (wmi->ops->send_wow_add_wakeup_pattern_cmd) |
| 513 | return wmi->ops->send_wow_add_wakeup_pattern_cmd(wmi, param); |
| 514 | |
| 515 | return QDF_STATUS_E_FAILURE; |
| 516 | } |
| 517 | |
| 518 | /** |
| 519 | * wmi_unified_wow_remove_wakeup_pattern_send() - WMI wow wakeup pattern function |
| 520 | * @param wmi_handle : handle to WMI. |
| 521 | * @param: pointer to wow wakeup pattern parameter structure |
| 522 | * |
| 523 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 524 | */ |
| 525 | QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl, |
| 526 | struct wow_remove_wakeup_pattern_params *param) |
| 527 | { |
| 528 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 529 | |
| 530 | if (wmi->ops->send_wow_remove_wakeup_pattern_cmd) |
| 531 | return wmi->ops->send_wow_remove_wakeup_pattern_cmd(wmi, param); |
| 532 | |
| 533 | return QDF_STATUS_E_FAILURE; |
| 534 | } |
| 535 | |
| 536 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 537 | * wmi_unified_ap_ps_cmd_send() - set ap powersave parameters |
| 538 | * @wma_ctx: wma context |
| 539 | * @peer_addr: peer mac address |
| 540 | * @param: pointer to ap_ps parameter structure |
| 541 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 542 | * 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] | 543 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 544 | QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 545 | uint8_t *peer_addr, |
| 546 | struct ap_ps_params *param) |
| 547 | { |
| 548 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 549 | |
| 550 | if (wmi_handle->ops->send_set_ap_ps_param_cmd) |
| 551 | return wmi_handle->ops->send_set_ap_ps_param_cmd(wmi_handle, |
| 552 | peer_addr, |
| 553 | param); |
| 554 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 555 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 556 | } |
| 557 | |
| 558 | /** |
| 559 | * wmi_unified_sta_ps_cmd_send() - set sta powersave parameters |
| 560 | * @wma_ctx: wma context |
| 561 | * @peer_addr: peer mac address |
| 562 | * @param: pointer to sta_ps parameter structure |
| 563 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 564 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 565 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 566 | QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 567 | struct sta_ps_params *param) |
| 568 | { |
| 569 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 570 | |
| 571 | if (wmi_handle->ops->send_set_sta_ps_param_cmd) |
| 572 | return wmi_handle->ops->send_set_sta_ps_param_cmd(wmi_handle, |
| 573 | param); |
| 574 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 575 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 576 | } |
| 577 | |
| 578 | /** |
| 579 | * wmi_crash_inject() - inject fw crash |
| 580 | * @wma_handle: wma handle |
Jeff Johnson | bbd428c | 2018-05-06 17:02:16 -0700 | [diff] [blame] | 581 | * @param: ponirt to crash inject parameter structure |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 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_crash_inject(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 586 | struct crash_inject *param) |
| 587 | { |
| 588 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 589 | |
| 590 | if (wmi_handle->ops->send_crash_inject_cmd) |
| 591 | return wmi_handle->ops->send_crash_inject_cmd(wmi_handle, |
| 592 | param); |
| 593 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 594 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 595 | } |
| 596 | |
Wen Gong | ca17401 | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 597 | #ifdef FEATURE_FW_LOG_PARSING |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 598 | /** |
| 599 | * wmi_unified_dbglog_cmd_send() - set debug log level |
| 600 | * @param wmi_handle : handle to WMI. |
| 601 | * @param param : pointer to hold dbglog level parameter |
| 602 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 603 | * 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] | 604 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 605 | QDF_STATUS |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 606 | wmi_unified_dbglog_cmd_send(void *wmi_hdl, |
| 607 | struct dbglog_params *dbglog_param) |
| 608 | { |
| 609 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 610 | |
| 611 | if (wmi_handle->ops->send_dbglog_cmd) |
| 612 | return wmi_handle->ops->send_dbglog_cmd(wmi_handle, |
| 613 | dbglog_param); |
| 614 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 615 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 616 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 617 | qdf_export_symbol(wmi_unified_dbglog_cmd_send); |
Wen Gong | ca17401 | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 618 | #endif |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 619 | |
| 620 | /** |
| 621 | * wmi_unified_vdev_set_param_send() - WMI vdev set parameter function |
| 622 | * @param wmi_handle : handle to WMI. |
| 623 | * @param macaddr : MAC address |
| 624 | * @param param : pointer to hold vdev set parameter |
| 625 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 626 | * 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] | 627 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 628 | QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 629 | struct vdev_set_params *param) |
| 630 | { |
| 631 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 632 | |
| 633 | if (wmi_handle->ops->send_vdev_set_param_cmd) |
| 634 | return wmi_handle->ops->send_vdev_set_param_cmd(wmi_handle, |
| 635 | param); |
| 636 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 637 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 638 | } |
| 639 | |
| 640 | /** |
narayan | d47b346 | 2018-07-01 21:59:41 +0530 | [diff] [blame] | 641 | * wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function |
| 642 | * @param wmi_handle : handle to WMI. |
| 643 | * @param param : pointer to hold sifs trigger parameter |
| 644 | * |
| 645 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 646 | */ |
| 647 | QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl, |
| 648 | struct sifs_trigger_param *param) |
| 649 | { |
| 650 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 651 | |
| 652 | if (wmi_handle->ops->send_vdev_sifs_trigger_cmd) |
| 653 | return wmi_handle->ops->send_vdev_sifs_trigger_cmd(wmi_handle, |
| 654 | param); |
| 655 | |
| 656 | return QDF_STATUS_E_FAILURE; |
| 657 | } |
| 658 | |
| 659 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 660 | * wmi_unified_stats_request_send() - WMI request stats function |
| 661 | * @param wmi_handle : handle to WMI. |
| 662 | * @param macaddr : MAC address |
| 663 | * @param param : pointer to hold stats request parameter |
| 664 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 665 | * 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] | 666 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 667 | QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 668 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 669 | struct stats_request_params *param) |
| 670 | { |
| 671 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 672 | |
| 673 | if (wmi_handle->ops->send_stats_request_cmd) |
| 674 | return wmi_handle->ops->send_stats_request_cmd(wmi_handle, |
| 675 | macaddr, param); |
| 676 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 677 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 678 | } |
| 679 | |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 680 | #ifdef CONFIG_MCL |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 681 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 682 | * wmi_unified_packet_log_enable_send() - WMI request stats function |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 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_packet_log_enable_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 packet_enable_params *param) |
| 692 | { |
| 693 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 694 | |
| 695 | if (wmi_handle->ops->send_packet_log_enable_cmd) |
| 696 | return wmi_handle->ops->send_packet_log_enable_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 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 701 | #else |
| 702 | /** |
| 703 | * wmi_unified_packet_log_enable_send() - WMI request stats function |
| 704 | * @param wmi_handle : handle to WMI. |
| 705 | * @param macaddr : MAC address |
| 706 | * @param param : pointer to hold stats request parameter |
| 707 | * |
| 708 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 709 | */ |
| 710 | QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 711 | WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 712 | { |
| 713 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 714 | |
| 715 | if (wmi_handle->ops->send_packet_log_enable_cmd) |
| 716 | return wmi_handle->ops->send_packet_log_enable_cmd(wmi_handle, |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 717 | PKTLOG_EVENT, mac_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 718 | |
| 719 | return QDF_STATUS_E_FAILURE; |
| 720 | } |
| 721 | |
| 722 | #endif |
| 723 | /** |
| 724 | * wmi_unified_packet_log_disable__send() - WMI pktlog disable function |
| 725 | * @param wmi_handle : handle to WMI. |
| 726 | * @param PKTLOG_EVENT : packet log event |
| 727 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 728 | */ |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 729 | 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] | 730 | { |
| 731 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 732 | |
| 733 | if (wmi_handle->ops->send_packet_log_disable_cmd) |
Keyur Parekh | 7df8ca1 | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 734 | return wmi_handle->ops->send_packet_log_disable_cmd(wmi_handle, |
| 735 | mac_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 736 | |
| 737 | return QDF_STATUS_E_FAILURE; |
| 738 | } |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 739 | |
| 740 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 741 | * wmi_unified_beacon_tmpl_send_cmd() - WMI beacon send function |
| 742 | * @param wmi_handle : handle to WMI. |
| 743 | * @param macaddr : MAC address |
| 744 | * @param param : pointer to hold beacon send cmd parameter |
| 745 | * |
| 746 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 747 | */ |
| 748 | QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl, |
| 749 | struct beacon_tmpl_params *param) |
| 750 | { |
| 751 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 752 | |
| 753 | if (wmi_handle->ops->send_beacon_tmpl_send_cmd) |
| 754 | return wmi_handle->ops->send_beacon_tmpl_send_cmd(wmi_handle, |
| 755 | param); |
| 756 | |
| 757 | return QDF_STATUS_E_FAILURE; |
| 758 | } |
| 759 | /** |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 760 | * wmi_unified_peer_assoc_send() - WMI peer assoc function |
| 761 | * @param wmi_handle : handle to WMI. |
| 762 | * @param macaddr : MAC address |
| 763 | * @param param : pointer to peer assoc parameter |
| 764 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 765 | * 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] | 766 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 767 | QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 768 | struct peer_assoc_params *param) |
| 769 | { |
| 770 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 771 | |
| 772 | if (wmi_handle->ops->send_peer_assoc_cmd) |
| 773 | return wmi_handle->ops->send_peer_assoc_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 774 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 775 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 776 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 777 | } |
| 778 | |
| 779 | /** |
| 780 | * wmi_unified_scan_start_cmd_send() - WMI scan start function |
| 781 | * @param wmi_handle : handle to WMI. |
| 782 | * @param macaddr : MAC address |
| 783 | * @param param : pointer to hold scan start cmd parameter |
| 784 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 785 | * 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] | 786 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 787 | QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 1d83e35 | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 788 | struct scan_req_params *param) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 789 | { |
| 790 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 791 | |
| 792 | if (wmi_handle->ops->send_scan_start_cmd) |
| 793 | return wmi_handle->ops->send_scan_start_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 794 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 795 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 796 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 797 | } |
| 798 | |
| 799 | /** |
| 800 | * wmi_unified_scan_stop_cmd_send() - WMI scan start function |
| 801 | * @param wmi_handle : handle to WMI. |
| 802 | * @param macaddr : MAC address |
| 803 | * @param param : pointer to hold scan start cmd parameter |
| 804 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 805 | * 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] | 806 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 807 | QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 1d83e35 | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 808 | struct scan_cancel_param *param) |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 809 | { |
| 810 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 811 | |
| 812 | if (wmi_handle->ops->send_scan_stop_cmd) |
| 813 | return wmi_handle->ops->send_scan_stop_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 814 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 815 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 816 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 817 | } |
| 818 | |
| 819 | /** |
| 820 | * wmi_unified_scan_chan_list_cmd_send() - WMI scan channel list function |
| 821 | * @param wmi_handle : handle to WMI. |
| 822 | * @param macaddr : MAC address |
| 823 | * @param param : pointer to hold scan channel list parameter |
| 824 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 825 | * 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] | 826 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 827 | QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl, |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 828 | struct scan_chan_list_params *param) |
| 829 | { |
| 830 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 831 | |
| 832 | if (wmi_handle->ops->send_scan_chan_list_cmd) |
| 833 | return wmi_handle->ops->send_scan_chan_list_cmd(wmi_handle, |
Govind Singh | d3156eb | 2016-02-26 17:50:39 +0530 | [diff] [blame] | 834 | param); |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 835 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 836 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 5eb5153 | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 837 | } |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 838 | |
| 839 | /** |
| 840 | * wmi_mgmt_unified_cmd_send() - management cmd over wmi layer |
| 841 | * @wmi_hdl : handle to WMI. |
| 842 | * @param : pointer to hold mgmt cmd parameter |
| 843 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 844 | * 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] | 845 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 846 | QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 847 | struct wmi_mgmt_params *param) |
| 848 | { |
| 849 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 850 | |
| 851 | if (wmi_handle->ops->send_mgmt_cmd) |
| 852 | return wmi_handle->ops->send_mgmt_cmd(wmi_handle, |
| 853 | param); |
| 854 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 855 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 856 | } |
| 857 | |
| 858 | /** |
Kiran Venkatappa | c13fc7b | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 859 | * wmi_offchan_data_tx_cmd_send() - Send offchan data tx cmd over wmi layer |
| 860 | * @wmi_hdl : handle to WMI. |
| 861 | * @param : pointer to hold offchan data cmd parameter |
| 862 | * |
| 863 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 864 | */ |
| 865 | QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, |
| 866 | struct wmi_offchan_data_tx_params *param) |
| 867 | { |
| 868 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 869 | |
| 870 | if (wmi_handle->ops->send_offchan_data_tx_cmd) |
| 871 | return wmi_handle->ops->send_offchan_data_tx_cmd(wmi_handle, |
| 872 | param); |
| 873 | |
| 874 | return QDF_STATUS_E_FAILURE; |
| 875 | } |
| 876 | |
| 877 | /** |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 878 | * wmi_unified_modem_power_state() - set modem power state to fw |
| 879 | * @wmi_hdl: wmi handle |
| 880 | * @param_value: parameter value |
| 881 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 882 | * 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] | 883 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 884 | QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 885 | uint32_t param_value) |
| 886 | { |
| 887 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 888 | |
| 889 | if (wmi_handle->ops->send_modem_power_state_cmd) |
| 890 | return wmi_handle->ops->send_modem_power_state_cmd(wmi_handle, |
| 891 | param_value); |
| 892 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 893 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 894 | } |
| 895 | |
| 896 | /** |
| 897 | * wmi_unified_set_sta_ps_mode() - set sta powersave params in fw |
| 898 | * @wmi_hdl: wmi handle |
| 899 | * @vdev_id: vdev id |
| 900 | * @val: value |
| 901 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 902 | * 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] | 903 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 904 | QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl, |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 905 | uint32_t vdev_id, uint8_t val) |
| 906 | { |
| 907 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 908 | |
| 909 | if (wmi_handle->ops->send_set_sta_ps_mode_cmd) |
| 910 | return wmi_handle->ops->send_set_sta_ps_mode_cmd(wmi_handle, |
| 911 | vdev_id, val); |
| 912 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 913 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 914 | } |
| 915 | |
| 916 | /** |
| 917 | * wmi_set_mimops() - set MIMO powersave |
| 918 | * @wmi_hdl: wmi handle |
| 919 | * @vdev_id: vdev id |
| 920 | * @value: value |
| 921 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 922 | * 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] | 923 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 924 | 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] | 925 | { |
| 926 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 927 | |
| 928 | if (wmi_handle->ops->send_set_mimops_cmd) |
| 929 | return wmi_handle->ops->send_set_mimops_cmd(wmi_handle, |
| 930 | vdev_id, value); |
| 931 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 932 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 933 | } |
| 934 | |
| 935 | /** |
| 936 | * wmi_set_smps_params() - set smps params |
| 937 | * @wmi_hdl: wmi handle |
| 938 | * @vdev_id: vdev id |
| 939 | * @value: value |
| 940 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 941 | * 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] | 942 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 943 | 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] | 944 | int value) |
| 945 | { |
| 946 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 947 | |
| 948 | if (wmi_handle->ops->send_set_smps_params_cmd) |
| 949 | return wmi_handle->ops->send_set_smps_params_cmd(wmi_handle, |
| 950 | vdev_id, value); |
| 951 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 952 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 953 | } |
| 954 | |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 955 | /** |
| 956 | * wmi_get_temperature() - get pdev temperature req |
| 957 | * @wmi_hdl: wmi handle |
| 958 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 959 | * 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] | 960 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 961 | QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl) |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 962 | { |
| 963 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 964 | |
| 965 | if (wmi_handle->ops->send_get_temperature_cmd) |
| 966 | return wmi_handle->ops->send_get_temperature_cmd(wmi_handle); |
| 967 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 968 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 969 | } |
| 970 | |
| 971 | /** |
| 972 | * wmi_unified_set_sta_uapsd_auto_trig_cmd() - set uapsd auto trigger command |
| 973 | * @wmi_hdl: wmi handle |
Jeff Johnson | bbd428c | 2018-05-06 17:02:16 -0700 | [diff] [blame] | 974 | * @end_set_sta_ps_mode_cmd: cmd parameter strcture |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 975 | * |
| 976 | * This function sets the trigger |
| 977 | * uapsd params such as service interval, delay interval |
| 978 | * and suspend interval which will be used by the firmware |
| 979 | * to send trigger frames periodically when there is no |
| 980 | * traffic on the transmit side. |
| 981 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 982 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure. |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 983 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 984 | QDF_STATUS |
Govind Singh | 427ee5a | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 985 | wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, |
| 986 | struct sta_uapsd_trig_params *param) |
| 987 | { |
| 988 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 989 | |
| 990 | if (wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd) |
| 991 | return wmi_handle->ops->send_set_sta_uapsd_auto_trig_cmd(wmi_handle, |
| 992 | param); |
| 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 | } |
Govind Singh | 2edc80f | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 996 | |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 997 | |
| 998 | /** |
| 999 | * wmi_unified_set_thermal_mgmt_cmd() - set thermal mgmt command to fw |
| 1000 | * @wmi_handle: Pointer to wmi handle |
| 1001 | * @thermal_info: Thermal command information |
| 1002 | * |
| 1003 | * This function sends the thermal management command |
| 1004 | * to the firmware |
| 1005 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1006 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1007 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1008 | QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1009 | struct thermal_cmd_params *thermal_info) |
| 1010 | { |
| 1011 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1012 | |
| 1013 | if (wmi_handle->ops->send_set_thermal_mgmt_cmd) |
| 1014 | return wmi_handle->ops->send_set_thermal_mgmt_cmd(wmi_handle, |
| 1015 | thermal_info); |
| 1016 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1017 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1018 | } |
| 1019 | |
| 1020 | |
| 1021 | /** |
| 1022 | * wmi_unified_lro_config_cmd() - process the LRO config command |
| 1023 | * @wmi: Pointer to wmi handle |
| 1024 | * @wmi_lro_cmd: Pointer to LRO configuration parameters |
| 1025 | * |
| 1026 | * This function sends down the LRO configuration parameters to |
| 1027 | * the firmware to enable LRO, sets the TCP flags and sets the |
| 1028 | * seed values for the toeplitz hash generation |
| 1029 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1030 | * 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] | 1031 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1032 | QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1033 | struct wmi_lro_config_cmd_t *wmi_lro_cmd) |
| 1034 | { |
| 1035 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1036 | |
| 1037 | if (wmi_handle->ops->send_lro_config_cmd) |
| 1038 | return wmi_handle->ops->send_lro_config_cmd(wmi_handle, |
| 1039 | wmi_lro_cmd); |
| 1040 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1041 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 17a9cfa | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 1042 | } |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1043 | |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1044 | #ifdef CONFIG_MCL |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1045 | /** |
Poddar, Siddarth | 98281c4 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 1046 | * wmi_unified_peer_rate_report_cmd() - process the peer rate report command |
| 1047 | * @wmi_hdl: Pointer to wmi handle |
| 1048 | * @rate_report_params: Pointer to peer rate report parameters |
| 1049 | * |
| 1050 | * |
| 1051 | * Return: QDF_STATUS_SUCCESS for success otherwise failure |
| 1052 | */ |
| 1053 | QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, |
| 1054 | struct wmi_peer_rate_report_params *rate_report_params) |
| 1055 | { |
| 1056 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1057 | |
| 1058 | if (wmi_handle->ops->send_peer_rate_report_cmd) |
| 1059 | return wmi_handle->ops->send_peer_rate_report_cmd(wmi_handle, |
| 1060 | rate_report_params); |
| 1061 | |
| 1062 | return QDF_STATUS_E_FAILURE; |
| 1063 | } |
| 1064 | |
| 1065 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1066 | * wmi_unified_bcn_buf_ll_cmd() - prepare and send beacon buffer to fw for LL |
| 1067 | * @wmi_hdl: wmi handle |
| 1068 | * @param: bcn ll cmd parameter |
| 1069 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1070 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1071 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1072 | QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1073 | wmi_bcn_send_from_host_cmd_fixed_param *param) |
| 1074 | { |
| 1075 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1076 | |
| 1077 | if (wmi_handle->ops->send_bcn_buf_ll_cmd) |
| 1078 | return wmi_handle->ops->send_bcn_buf_ll_cmd(wmi_handle, |
| 1079 | param); |
| 1080 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1081 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1082 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1083 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1084 | |
| 1085 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1086 | * wmi_unified_process_update_edca_param() - update EDCA params |
| 1087 | * @wmi_hdl: wmi handle |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1088 | * @vdev_id: vdev id. |
Kiran Kumar Lokere | a536eac | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 1089 | * @mu_edca_param: mu_edca_param. |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1090 | * @wmm_vparams: edca parameters |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1091 | * |
| 1092 | * This function updates EDCA parameters to the target |
| 1093 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1094 | * 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] | 1095 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1096 | QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, |
Kiran Kumar Lokere | a536eac | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 1097 | uint8_t vdev_id, bool mu_edca_param, |
Vikram Kandukuri | 3bb482b | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 1098 | struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1099 | { |
| 1100 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1101 | |
| 1102 | if (wmi_handle->ops->send_process_update_edca_param_cmd) |
| 1103 | 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] | 1104 | vdev_id, mu_edca_param, wmm_vparams); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1105 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1106 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1107 | } |
| 1108 | |
| 1109 | /** |
| 1110 | * wmi_unified_probe_rsp_tmpl_send_cmd() - send probe response template to fw |
| 1111 | * @wmi_hdl: wmi handle |
| 1112 | * @vdev_id: vdev id |
| 1113 | * @probe_rsp_info: probe response info |
| 1114 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1115 | * 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] | 1116 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1117 | QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1118 | uint8_t vdev_id, |
Krunal Soni | 8942686 | 2017-11-14 15:42:48 -0800 | [diff] [blame] | 1119 | struct wmi_probe_resp_params *probe_rsp_info) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1120 | { |
| 1121 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1122 | |
| 1123 | if (wmi_handle->ops->send_probe_rsp_tmpl_send_cmd) |
| 1124 | return wmi_handle->ops->send_probe_rsp_tmpl_send_cmd(wmi_handle, |
Krunal Soni | 8942686 | 2017-11-14 15:42:48 -0800 | [diff] [blame] | 1125 | vdev_id, probe_rsp_info); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1126 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1127 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1128 | } |
| 1129 | |
| 1130 | /** |
Himanshu Agarwal | 712622f | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 1131 | * wmi_unified_setup_install_key_cmd - send key to install to fw |
| 1132 | * @wmi_hdl: wmi handle |
| 1133 | * @key_params: key parameters |
| 1134 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1135 | * 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] | 1136 | */ |
| 1137 | QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, |
| 1138 | struct set_key_params *key_params) |
| 1139 | { |
| 1140 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1141 | |
| 1142 | if (wmi_handle->ops->send_setup_install_key_cmd) |
| 1143 | return wmi_handle->ops->send_setup_install_key_cmd(wmi_handle, |
| 1144 | key_params); |
| 1145 | |
| 1146 | return QDF_STATUS_E_FAILURE; |
| 1147 | } |
| 1148 | |
| 1149 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1150 | * wmi_unified_p2p_go_set_beacon_ie_cmd() - set beacon IE for p2p go |
| 1151 | * @wma_handle: wma handle |
| 1152 | * @vdev_id: vdev id |
| 1153 | * @p2p_ie: p2p IE |
| 1154 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1155 | * 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] | 1156 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1157 | QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, |
Vivek | c582309 | 2018-03-22 23:27:21 +0530 | [diff] [blame] | 1158 | uint32_t vdev_id, uint8_t *p2p_ie) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1159 | { |
| 1160 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1161 | |
| 1162 | if (wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd) |
| 1163 | return wmi_handle->ops->send_p2p_go_set_beacon_ie_cmd(wmi_handle, |
| 1164 | vdev_id, p2p_ie); |
| 1165 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1166 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1167 | } |
| 1168 | |
| 1169 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1170 | * wmi_unified_scan_probe_setoui_cmd() - set scan probe OUI |
| 1171 | * @wmi_hdl: wmi handle |
| 1172 | * @psetoui: OUI parameters |
| 1173 | * |
| 1174 | * set scan probe OUI parameters in firmware |
| 1175 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1176 | * 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] | 1177 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1178 | QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1179 | struct scan_mac_oui *psetoui) |
| 1180 | { |
| 1181 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1182 | |
| 1183 | if (wmi_handle->ops->send_scan_probe_setoui_cmd) |
| 1184 | return wmi_handle->ops->send_scan_probe_setoui_cmd(wmi_handle, |
| 1185 | psetoui); |
| 1186 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1187 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1188 | } |
| 1189 | |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1190 | #ifdef IPA_OFFLOAD |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1191 | /** wmi_unified_ipa_offload_control_cmd() - ipa offload control parameter |
| 1192 | * @wmi_hdl: wmi handle |
| 1193 | * @ipa_offload: ipa offload control parameter |
| 1194 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1195 | * Returns: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures, |
| 1196 | * error number otherwise |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1197 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1198 | QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1199 | struct ipa_uc_offload_control_params *ipa_offload) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1200 | { |
| 1201 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1202 | |
Amar Singhal | ca7aba3 | 2018-09-18 10:14:30 -0700 | [diff] [blame] | 1203 | if (!wmi_handle) |
| 1204 | return QDF_STATUS_E_FAILURE; |
| 1205 | |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1206 | if (wmi_handle->ops->send_ipa_offload_control_cmd) |
| 1207 | return wmi_handle->ops->send_ipa_offload_control_cmd(wmi_handle, |
| 1208 | ipa_offload); |
| 1209 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1210 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1211 | } |
Sravan Kumar Kairam | 963cad9 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 1212 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1213 | |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1214 | /** |
| 1215 | * send_pno_stop_cmd() - PNO stop request |
| 1216 | * @wmi_hdl: wmi handle |
| 1217 | * @vdev_id: vdev id |
| 1218 | * |
| 1219 | * This function request FW to stop ongoing PNO operation. |
| 1220 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1221 | * 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] | 1222 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1223 | 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] | 1224 | { |
| 1225 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1226 | |
| 1227 | if (wmi_handle->ops->send_pno_stop_cmd) |
| 1228 | return wmi_handle->ops->send_pno_stop_cmd(wmi_handle, |
| 1229 | vdev_id); |
| 1230 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1231 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1232 | } |
| 1233 | |
| 1234 | /** |
| 1235 | * wmi_unified_pno_start_cmd() - PNO start request |
| 1236 | * @wmi_hdl: wmi handle |
| 1237 | * @pno: PNO request |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1238 | * |
| 1239 | * This function request FW to start PNO request. |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1240 | * 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] | 1241 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1242 | #ifdef FEATURE_WLAN_SCAN_PNO |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1243 | QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1244 | struct pno_scan_req_params *pno) |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1245 | { |
| 1246 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1247 | |
| 1248 | if (wmi_handle->ops->send_pno_start_cmd) |
| 1249 | return wmi_handle->ops->send_pno_start_cmd(wmi_handle, |
Abhishek Singh | 5987b63 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 1250 | pno); |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1251 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1252 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1253 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1254 | #endif |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1255 | |
Varun Reddy Yeturu | eac038b | 2017-07-24 16:11:22 -0700 | [diff] [blame] | 1256 | /** |
| 1257 | * wmi_unified_nlo_mawc_cmd() - NLO MAWC cmd configuration |
| 1258 | * @wmi_hdl: wmi handle |
| 1259 | * @params: Configuration parameters |
| 1260 | * |
| 1261 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1262 | */ |
| 1263 | QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, |
| 1264 | struct nlo_mawc_params *params) |
| 1265 | { |
| 1266 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1267 | |
| 1268 | if (wmi_handle->ops->send_nlo_mawc_cmd) |
| 1269 | return wmi_handle->ops->send_nlo_mawc_cmd(wmi_handle, params); |
| 1270 | |
| 1271 | return QDF_STATUS_E_FAILURE; |
| 1272 | } |
| 1273 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1274 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1275 | /** |
| 1276 | * wmi_unified_process_ll_stats_clear_cmd() - clear link layer stats |
| 1277 | * @wmi_hdl: wmi handle |
| 1278 | * @clear_req: ll stats clear request command params |
| 1279 | * @addr: mac address |
| 1280 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1281 | * 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] | 1282 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1283 | QDF_STATUS wmi_unified_process_ll_stats_clear_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1284 | const struct ll_stats_clear_params *clear_req, |
| 1285 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1286 | { |
| 1287 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1288 | |
| 1289 | if (wmi_handle->ops->send_process_ll_stats_clear_cmd) |
| 1290 | return wmi_handle->ops->send_process_ll_stats_clear_cmd(wmi_handle, |
| 1291 | clear_req, addr); |
| 1292 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1293 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1294 | } |
| 1295 | |
| 1296 | /** |
| 1297 | * wmi_unified_process_ll_stats_get_cmd() - link layer stats get request |
| 1298 | * @wmi_hdl:wmi handle |
| 1299 | * @get_req:ll stats get request command params |
| 1300 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1301 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1302 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1303 | QDF_STATUS wmi_unified_process_ll_stats_get_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1304 | const struct ll_stats_get_params *get_req, |
| 1305 | uint8_t addr[IEEE80211_ADDR_LEN]) |
| 1306 | { |
| 1307 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1308 | |
| 1309 | if (wmi_handle->ops->send_process_ll_stats_get_cmd) |
| 1310 | return wmi_handle->ops->send_process_ll_stats_get_cmd(wmi_handle, |
| 1311 | get_req, addr); |
| 1312 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1313 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1314 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1315 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1316 | |
| 1317 | /** |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1318 | * wmi_unified_congestion_request_cmd() - send request to fw to get CCA |
| 1319 | * @wmi_hdl: wma handle |
| 1320 | * @vdev_id: vdev id |
| 1321 | * |
| 1322 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1323 | */ |
| 1324 | QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, |
| 1325 | uint8_t vdev_id) |
| 1326 | { |
| 1327 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1328 | |
| 1329 | if (wmi_handle->ops->send_congestion_cmd) |
| 1330 | return wmi_handle->ops->send_congestion_cmd(wmi_handle, |
| 1331 | vdev_id); |
| 1332 | |
| 1333 | return QDF_STATUS_E_FAILURE; |
| 1334 | } |
| 1335 | |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1336 | #ifdef WLAN_FEATURE_LINK_LAYER_STATS |
Padma, Santhosh Kumar | cb1ee46 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 1337 | /** |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1338 | * wmi_unified_process_ll_stats_set_cmd() - link layer stats set request |
| 1339 | * @wmi_handle: wmi handle |
| 1340 | * @set_req: ll stats set request command params |
| 1341 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1342 | * 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] | 1343 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1344 | QDF_STATUS wmi_unified_process_ll_stats_set_cmd(void *wmi_hdl, |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1345 | const struct ll_stats_set_params *set_req) |
| 1346 | { |
| 1347 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1348 | |
| 1349 | if (wmi_handle->ops->send_process_ll_stats_set_cmd) |
| 1350 | return wmi_handle->ops->send_process_ll_stats_set_cmd(wmi_handle, |
| 1351 | set_req); |
| 1352 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1353 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 4eacd2b | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 1354 | } |
Qiwei Cai | 1ccba22 | 2018-05-21 16:49:39 +0800 | [diff] [blame] | 1355 | #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1356 | |
| 1357 | /** |
| 1358 | * wmi_unified_snr_request_cmd() - send request to fw to get RSSI stats |
| 1359 | * @wmi_handle: wmi handle |
| 1360 | * @rssi_req: get RSSI request |
| 1361 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1362 | * 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] | 1363 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1364 | QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1365 | { |
| 1366 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1367 | |
| 1368 | if (wmi_handle->ops->send_snr_request_cmd) |
| 1369 | return wmi_handle->ops->send_snr_request_cmd(wmi_handle); |
| 1370 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1371 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1372 | } |
| 1373 | |
| 1374 | /** |
| 1375 | * wmi_unified_snr_cmd() - get RSSI from fw |
| 1376 | * @wmi_handle: wmi handle |
| 1377 | * @vdev_id: vdev id |
| 1378 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1379 | * 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] | 1380 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1381 | 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] | 1382 | { |
| 1383 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1384 | |
| 1385 | if (wmi_handle->ops->send_snr_cmd) |
| 1386 | return wmi_handle->ops->send_snr_cmd(wmi_handle, |
| 1387 | vdev_id); |
| 1388 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1389 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1390 | } |
| 1391 | |
| 1392 | /** |
| 1393 | * wmi_unified_link_status_req_cmd() - process link status request from UMAC |
| 1394 | * @wmi_handle: wmi handle |
| 1395 | * @link_status: get link params |
| 1396 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1397 | * 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] | 1398 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1399 | QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1400 | struct link_status_params *link_status) |
| 1401 | { |
| 1402 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1403 | |
| 1404 | if (wmi_handle->ops->send_link_status_req_cmd) |
| 1405 | return wmi_handle->ops->send_link_status_req_cmd(wmi_handle, |
| 1406 | link_status); |
| 1407 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1408 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1409 | } |
| 1410 | |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 1411 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1412 | /** |
| 1413 | * wmi_unified_egap_conf_params_cmd() - send wmi cmd of egap configuration params |
| 1414 | * @wmi_handle: wmi handler |
| 1415 | * @egap_params: pointer to egap_params |
| 1416 | * |
| 1417 | * Return: 0 for success, otherwise appropriate error code |
| 1418 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1419 | QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, |
Himanshu Agarwal | 66d4a16 | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 1420 | struct wlan_green_ap_egap_params *egap_params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1421 | { |
| 1422 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1423 | |
| 1424 | if (wmi_handle->ops->send_egap_conf_params_cmd) |
| 1425 | return wmi_handle->ops->send_egap_conf_params_cmd(wmi_handle, |
| 1426 | egap_params); |
| 1427 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1428 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1429 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1430 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1431 | |
| 1432 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1433 | * wmi_unified_csa_offload_enable() - send CSA offload enable command |
| 1434 | * @wmi_hdl: wmi handle |
| 1435 | * @vdev_id: vdev id |
| 1436 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1437 | * 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] | 1438 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1439 | 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] | 1440 | { |
| 1441 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1442 | |
| 1443 | if (wmi_handle->ops->send_csa_offload_enable_cmd) |
| 1444 | return wmi_handle->ops->send_csa_offload_enable_cmd(wmi_handle, |
| 1445 | vdev_id); |
| 1446 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1447 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1448 | } |
Naveen Rawat | 42cd1e6 | 2017-05-13 15:56:57 -0700 | [diff] [blame] | 1449 | |
| 1450 | #ifdef WLAN_FEATURE_CIF_CFR |
| 1451 | QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, |
| 1452 | wmi_oem_dma_ring_cfg_req_fixed_param *cfg) |
| 1453 | { |
| 1454 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1455 | |
| 1456 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 1457 | return wmi_handle->ops->send_oem_dma_cfg_cmd(wmi_handle, cfg); |
| 1458 | |
| 1459 | return QDF_STATUS_E_FAILURE; |
| 1460 | } |
| 1461 | #endif |
| 1462 | |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1463 | /** |
| 1464 | * wmi_unified_start_oem_data_cmd() - start OEM data request to target |
| 1465 | * @wmi_handle: wmi handle |
| 1466 | * @startOemDataReq: start request params |
| 1467 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1468 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1469 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1470 | QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, |
Krishna Kumaar Natarajan | b16bb27 | 2016-07-21 15:02:44 -0700 | [diff] [blame] | 1471 | uint32_t data_len, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1472 | uint8_t *data) |
| 1473 | { |
| 1474 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1475 | |
| 1476 | if (wmi_handle->ops->send_start_oem_data_cmd) |
| 1477 | return wmi_handle->ops->send_start_oem_data_cmd(wmi_handle, |
| 1478 | data_len, data); |
| 1479 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1480 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1481 | } |
| 1482 | |
| 1483 | /** |
| 1484 | * wmi_unified_dfs_phyerr_filter_offload_en_cmd() - enable dfs phyerr filter |
| 1485 | * @wmi_handle: wmi handle |
| 1486 | * @dfs_phyerr_filter_offload: is dfs phyerr filter offload |
| 1487 | * |
| 1488 | * Send WMI_DFS_PHYERR_FILTER_ENA_CMDID or |
| 1489 | * WMI_DFS_PHYERR_FILTER_DIS_CMDID command |
| 1490 | * to firmware based on phyerr filtering |
| 1491 | * offload status. |
| 1492 | * |
| 1493 | * Return: 1 success, 0 failure |
| 1494 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1495 | QDF_STATUS |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1496 | wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, |
| 1497 | bool dfs_phyerr_filter_offload) |
| 1498 | { |
| 1499 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1500 | |
| 1501 | if (wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd) |
| 1502 | return wmi_handle->ops->send_dfs_phyerr_filter_offload_en_cmd(wmi_handle, |
| 1503 | dfs_phyerr_filter_offload); |
| 1504 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1505 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1506 | } |
| 1507 | |
| 1508 | #if !defined(REMOVE_PKT_LOG) |
| 1509 | /** |
| 1510 | * wmi_unified_pktlog_wmi_send_cmd() - send pktlog enable/disable command to target |
| 1511 | * @wmi_handle: wmi handle |
| 1512 | * @pktlog_event: pktlog event |
| 1513 | * @cmd_id: pktlog cmd id |
| 1514 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1515 | * 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] | 1516 | */ |
Kiran Venkatappa | 1d5f5ab | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 1517 | #ifdef CONFIG_MCL |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1518 | QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1519 | WMI_PKTLOG_EVENT pktlog_event, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 1520 | uint32_t cmd_id, |
| 1521 | uint8_t user_triggered) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1522 | { |
| 1523 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1524 | |
| 1525 | if (wmi_handle->ops->send_pktlog_wmi_send_cmd) |
| 1526 | return wmi_handle->ops->send_pktlog_wmi_send_cmd(wmi_handle, |
Nirav Shah | 47ec248 | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 1527 | pktlog_event, cmd_id, user_triggered); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1528 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1529 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1530 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1531 | #endif |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1532 | #endif /* REMOVE_PKT_LOG */ |
| 1533 | |
| 1534 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1535 | * wmi_unified_stats_ext_req_cmd() - request ext stats from fw |
| 1536 | * @wmi_handle: wmi handle |
| 1537 | * @preq: stats ext params |
| 1538 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1539 | * 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] | 1540 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1541 | QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1542 | struct stats_ext_params *preq) |
| 1543 | { |
| 1544 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1545 | |
| 1546 | if (wmi_handle->ops->send_stats_ext_req_cmd) |
| 1547 | return wmi_handle->ops->send_stats_ext_req_cmd(wmi_handle, |
| 1548 | preq); |
| 1549 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1550 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1551 | } |
| 1552 | |
| 1553 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1554 | * wmi_unified_process_dhcpserver_offload_cmd() - enable DHCP server offload |
| 1555 | * @wmi_handle: wmi handle |
| 1556 | * @pDhcpSrvOffloadInfo: DHCP server offload info |
| 1557 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1558 | * 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] | 1559 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1560 | QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 1561 | struct dhcp_offload_info_params *params) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1562 | { |
| 1563 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1564 | |
| 1565 | if (wmi_handle->ops->send_process_dhcpserver_offload_cmd) |
| 1566 | return wmi_handle->ops->send_process_dhcpserver_offload_cmd(wmi_handle, |
Jeff Johnson | a87370f | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 1567 | params); |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1568 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1569 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1570 | } |
| 1571 | |
| 1572 | /** |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1573 | * wmi_unified_send_regdomain_info_to_fw_cmd() - send regdomain info to fw |
| 1574 | * @wmi_handle: wmi handle |
| 1575 | * @reg_dmn: reg domain |
| 1576 | * @regdmn2G: 2G reg domain |
| 1577 | * @regdmn5G: 5G reg domain |
| 1578 | * @ctl2G: 2G test limit |
| 1579 | * @ctl5G: 5G test limit |
| 1580 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1581 | * 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] | 1582 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1583 | 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] | 1584 | uint32_t reg_dmn, uint16_t regdmn2G, |
Rajeev Kumar Sirasanagandla | 4c1fecd | 2017-06-06 13:27:56 +0530 | [diff] [blame] | 1585 | uint16_t regdmn5G, uint8_t ctl2G, |
| 1586 | uint8_t ctl5G) |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1587 | { |
| 1588 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1589 | |
| 1590 | if (wmi_handle->ops->send_regdomain_info_to_fw_cmd) |
| 1591 | return wmi_handle->ops->send_regdomain_info_to_fw_cmd(wmi_handle, |
| 1592 | reg_dmn, regdmn2G, |
| 1593 | regdmn5G, ctl2G, |
| 1594 | ctl5G); |
| 1595 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1596 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 20c5dac | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 1597 | } |
| 1598 | |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 1599 | /** |
| 1600 | * wmi_unified_save_fw_version_cmd() - save fw version |
| 1601 | * @wmi_handle: pointer to wmi handle |
| 1602 | * @res_cfg: resource config |
| 1603 | * @num_mem_chunks: no of mem chunck |
| 1604 | * @mem_chunk: pointer to mem chunck structure |
| 1605 | * |
| 1606 | * This function sends IE information to firmware |
| 1607 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1608 | * 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] | 1609 | * |
| 1610 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1611 | QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 1612 | void *evt_buf) |
| 1613 | { |
| 1614 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1615 | |
| 1616 | if (wmi_handle->ops->save_fw_version_cmd) |
| 1617 | return wmi_handle->ops->save_fw_version_cmd(wmi_handle, |
| 1618 | evt_buf); |
| 1619 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1620 | return QDF_STATUS_E_FAILURE; |
Govind Singh | 9ddd516 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 1621 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1622 | |
| 1623 | /** |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1624 | * wmi_unified_log_supported_evt_cmd() - Enable/Disable FW diag/log events |
| 1625 | * @wmi_hdl: wmi handle |
| 1626 | * @event: Event received from FW |
| 1627 | * @len: Length of the event |
| 1628 | * |
| 1629 | * Enables the low frequency events and disables the high frequency |
| 1630 | * events. Bit 17 indicates if the event if low/high frequency. |
| 1631 | * 1 - high frequency, 0 - low frequency |
| 1632 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1633 | * 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] | 1634 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1635 | QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1636 | uint8_t *event, |
| 1637 | uint32_t len) |
| 1638 | { |
| 1639 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1640 | |
| 1641 | if (wmi_handle->ops->send_log_supported_evt_cmd) |
| 1642 | return wmi_handle->ops->send_log_supported_evt_cmd(wmi_handle, |
| 1643 | event, len); |
| 1644 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1645 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1646 | } |
| 1647 | |
gaurank kathpalia | cdfb445 | 2018-02-21 18:58:29 +0530 | [diff] [blame] | 1648 | void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl) |
| 1649 | { |
| 1650 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1651 | if (wmi_handle->ops->send_time_stamp_sync_cmd) |
| 1652 | wmi_handle->ops->send_time_stamp_sync_cmd(wmi_handle); |
| 1653 | |
| 1654 | } |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1655 | /** |
| 1656 | * wmi_unified_enable_specific_fw_logs_cmd() - Start/Stop logging of diag log id |
| 1657 | * @wmi_hdl: wmi handle |
| 1658 | * @start_log: Start logging related parameters |
| 1659 | * |
| 1660 | * Send the command to the FW based on which specific logging of diag |
| 1661 | * event/log id can be started/stopped |
| 1662 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1663 | * 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] | 1664 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1665 | QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1666 | struct wmi_wifi_start_log *start_log) |
| 1667 | { |
| 1668 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1669 | |
| 1670 | if (wmi_handle->ops->send_enable_specific_fw_logs_cmd) |
| 1671 | return wmi_handle->ops->send_enable_specific_fw_logs_cmd(wmi_handle, |
| 1672 | start_log); |
| 1673 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1674 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1675 | } |
| 1676 | |
| 1677 | /** |
| 1678 | * wmi_unified_flush_logs_to_fw_cmd() - Send log flush command to FW |
| 1679 | * @wmi_hdl: WMI handle |
| 1680 | * |
| 1681 | * This function is used to send the flush command to the FW, |
| 1682 | * that will flush the fw logs that are residue in 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 |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1685 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1686 | QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl) |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1687 | { |
| 1688 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1689 | |
| 1690 | if (wmi_handle->ops->send_flush_logs_to_fw_cmd) |
| 1691 | return wmi_handle->ops->send_flush_logs_to_fw_cmd(wmi_handle); |
| 1692 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1693 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1694 | } |
| 1695 | |
| 1696 | /** |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1697 | * wmi_unified_set_ssid_hotlist_cmd() - Handle an SSID hotlist set request |
| 1698 | * @wmi_hdl: wmi handle |
| 1699 | * @request: SSID hotlist set request |
| 1700 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1701 | * 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] | 1702 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1703 | QDF_STATUS |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1704 | wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, |
| 1705 | struct ssid_hotlist_request_params *request) |
| 1706 | { |
| 1707 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1708 | |
| 1709 | if (wmi_handle->ops->send_set_ssid_hotlist_cmd) |
| 1710 | return wmi_handle->ops->send_set_ssid_hotlist_cmd(wmi_handle, |
| 1711 | request); |
| 1712 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1713 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1714 | } |
| 1715 | |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1716 | /** |
Anurag Chouhan | 459e015 | 2016-07-22 20:19:54 +0530 | [diff] [blame] | 1717 | * wmi_unified_fw_test_cmd() - send fw test command to fw. |
| 1718 | * @wmi_hdl: wmi handle |
| 1719 | * @wmi_fwtest: fw test command |
| 1720 | * |
| 1721 | * This function sends fw test command to fw. |
| 1722 | * |
| 1723 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1724 | */ |
| 1725 | QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, |
| 1726 | struct set_fwtest_params *wmi_fwtest) |
| 1727 | { |
| 1728 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1729 | |
| 1730 | if (wmi_handle->ops->send_fw_test_cmd) |
| 1731 | return wmi_handle->ops->send_fw_test_cmd(wmi_handle, |
| 1732 | wmi_fwtest); |
| 1733 | |
| 1734 | return QDF_STATUS_E_FAILURE; |
| 1735 | |
| 1736 | } |
| 1737 | |
| 1738 | /** |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1739 | * wmi_unified_unit_test_cmd() - send unit test command to fw. |
| 1740 | * @wmi_hdl: wmi handle |
| 1741 | * @wmi_utest: unit test command |
| 1742 | * |
| 1743 | * This function send unit test command to fw. |
| 1744 | * |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1745 | * 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] | 1746 | */ |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1747 | QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1748 | struct wmi_unit_test_cmd *wmi_utest) |
| 1749 | { |
| 1750 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1751 | |
| 1752 | if (wmi_handle->ops->send_unit_test_cmd) |
| 1753 | return wmi_handle->ops->send_unit_test_cmd(wmi_handle, |
| 1754 | wmi_utest); |
| 1755 | |
Govind Singh | b53420c | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 1756 | return QDF_STATUS_E_FAILURE; |
Govind Singh | a4836fd | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 1757 | } |
| 1758 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 1759 | #ifdef FEATURE_WLAN_APF |
Nachiket Kukade | ae35a2c | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 1760 | QDF_STATUS |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 1761 | 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] | 1762 | enum wmi_host_active_apf_mode ucast_mode, |
| 1763 | enum wmi_host_active_apf_mode |
| 1764 | mcast_bcast_mode) |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 1765 | { |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 1766 | if (wmi->ops->send_set_active_apf_mode_cmd) |
| 1767 | return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id, |
| 1768 | ucast_mode, |
| 1769 | mcast_bcast_mode); |
| 1770 | return QDF_STATUS_E_FAILURE; |
Dustin Brown | 4423f63 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 1771 | } |
| 1772 | |
Nachiket Kukade | e06beaa | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 1773 | QDF_STATUS |
| 1774 | wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi, |
| 1775 | uint32_t vdev_id, bool enable) |
| 1776 | { |
| 1777 | if (wmi->ops->send_apf_enable_cmd) |
| 1778 | return wmi->ops->send_apf_enable_cmd(wmi, vdev_id, enable); |
| 1779 | return QDF_STATUS_E_FAILURE; |
| 1780 | } |
| 1781 | |
| 1782 | QDF_STATUS |
| 1783 | wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi, |
| 1784 | struct wmi_apf_write_memory_params |
| 1785 | *write_params) |
| 1786 | { |
| 1787 | if (wmi->ops->send_apf_write_work_memory_cmd) |
| 1788 | return wmi->ops->send_apf_write_work_memory_cmd(wmi, |
| 1789 | write_params); |
| 1790 | |
| 1791 | return QDF_STATUS_E_FAILURE; |
| 1792 | } |
| 1793 | |
| 1794 | QDF_STATUS |
| 1795 | wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi, |
| 1796 | struct wmi_apf_read_memory_params |
| 1797 | *read_params) |
| 1798 | { |
| 1799 | if (wmi->ops->send_apf_read_work_memory_cmd) |
| 1800 | return wmi->ops->send_apf_read_work_memory_cmd(wmi, |
| 1801 | read_params); |
| 1802 | |
| 1803 | return QDF_STATUS_E_FAILURE; |
| 1804 | } |
| 1805 | |
| 1806 | QDF_STATUS |
| 1807 | wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf, |
| 1808 | struct wmi_apf_read_memory_resp_event_params |
| 1809 | *read_mem_evt) |
| 1810 | { |
| 1811 | if (wmi->ops->extract_apf_read_memory_resp_event) |
| 1812 | return wmi->ops->extract_apf_read_memory_resp_event(wmi, |
| 1813 | evt_buf, |
| 1814 | read_mem_evt); |
| 1815 | |
| 1816 | return QDF_STATUS_E_FAILURE; |
| 1817 | } |
| 1818 | #endif /* FEATURE_WLAN_APF */ |
| 1819 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1820 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1821 | * wmi_unified_pdev_fips_cmd_send() - WMI pdev fips cmd function |
| 1822 | * @param wmi_handle : handle to WMI. |
| 1823 | * @param param : pointer to hold pdev fips param |
| 1824 | * |
| 1825 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1826 | */ |
| 1827 | QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, |
| 1828 | struct fips_params *param) |
| 1829 | { |
| 1830 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1831 | |
| 1832 | if (wmi_handle->ops->send_pdev_fips_cmd) |
| 1833 | return wmi_handle->ops->send_pdev_fips_cmd(wmi_handle, param); |
| 1834 | |
| 1835 | return QDF_STATUS_E_FAILURE; |
| 1836 | } |
| 1837 | |
| 1838 | /** |
| 1839 | * wmi_unified_wlan_profile_enable_cmd_send() - WMI wlan profile enable cmd function |
| 1840 | * @param wmi_handle : handle to WMI. |
| 1841 | * @param param : pointer to hold wlan profile param |
| 1842 | * |
| 1843 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1844 | */ |
| 1845 | QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, |
| 1846 | struct wlan_profile_params *param) |
| 1847 | { |
| 1848 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1849 | |
| 1850 | if (wmi_handle->ops->send_wlan_profile_enable_cmd) |
| 1851 | return wmi_handle->ops->send_wlan_profile_enable_cmd(wmi_handle, |
| 1852 | param); |
| 1853 | |
| 1854 | return QDF_STATUS_E_FAILURE; |
| 1855 | } |
| 1856 | |
| 1857 | /** |
| 1858 | * wmi_unified_wlan_profile_trigger_cmd_send() - WMI wlan profile trigger cmd function |
| 1859 | * @param wmi_handle : handle to WMI. |
| 1860 | * @param param : pointer to hold wlan profile param |
| 1861 | * |
| 1862 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1863 | */ |
| 1864 | QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, |
| 1865 | struct wlan_profile_params *param) |
| 1866 | { |
| 1867 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 1868 | |
| 1869 | if (wmi->ops->send_wlan_profile_trigger_cmd) |
| 1870 | return wmi->ops->send_wlan_profile_trigger_cmd(wmi, |
| 1871 | param); |
| 1872 | |
| 1873 | return QDF_STATUS_E_FAILURE; |
| 1874 | } |
| 1875 | |
| 1876 | /** |
| 1877 | * wmi_unified_set_chan_cmd_send() - WMI set channel cmd function |
| 1878 | * @param wmi_handle : handle to WMI. |
| 1879 | * @param param : pointer to hold channel param |
| 1880 | * |
| 1881 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1882 | */ |
| 1883 | QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, |
| 1884 | struct channel_param *param) |
| 1885 | { |
| 1886 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1887 | |
| 1888 | if (wmi_handle->ops->send_pdev_set_chan_cmd) |
| 1889 | return wmi_handle->ops->send_pdev_set_chan_cmd(wmi_handle, |
| 1890 | param); |
| 1891 | |
| 1892 | return QDF_STATUS_E_FAILURE; |
| 1893 | } |
| 1894 | |
| 1895 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1896 | * wmi_unified_set_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 1897 | * @param wmi_handle : handle to WMI. |
| 1898 | * @param param : pointer to hold ratepwr table param |
| 1899 | * |
| 1900 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1901 | */ |
| 1902 | QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, |
| 1903 | struct ratepwr_table_params *param) |
| 1904 | { |
| 1905 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1906 | |
| 1907 | if (wmi_handle->ops->send_set_ratepwr_table_cmd) |
| 1908 | return wmi_handle->ops->send_set_ratepwr_table_cmd(wmi_handle, |
| 1909 | param); |
| 1910 | |
| 1911 | return QDF_STATUS_E_FAILURE; |
| 1912 | } |
| 1913 | |
| 1914 | /** |
| 1915 | * wmi_unified_get_ratepwr_table_cmd_send() - WMI ratepwr table cmd function |
| 1916 | * @param wmi_handle : handle to WMI. |
| 1917 | * |
| 1918 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1919 | */ |
| 1920 | QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl) |
| 1921 | { |
| 1922 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1923 | |
| 1924 | if (wmi_handle->ops->send_get_ratepwr_table_cmd) |
| 1925 | return wmi_handle->ops->send_get_ratepwr_table_cmd(wmi_handle); |
| 1926 | |
| 1927 | return QDF_STATUS_E_FAILURE; |
| 1928 | } |
| 1929 | |
| 1930 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1931 | * wmi_unified_set_ratepwr_chainmsk_cmd_send() - WMI ratepwr |
| 1932 | * chainmsk cmd function |
| 1933 | * @param wmi_handle : handle to WMI. |
| 1934 | * @param param : pointer to hold ratepwr chainmsk param |
| 1935 | * |
| 1936 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1937 | */ |
| 1938 | QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, |
| 1939 | struct ratepwr_chainmsk_params *param) |
| 1940 | { |
| 1941 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 1942 | |
| 1943 | if (wmi->ops->send_set_ratepwr_chainmsk_cmd) |
| 1944 | return wmi->ops->send_set_ratepwr_chainmsk_cmd(wmi, param); |
| 1945 | |
| 1946 | return QDF_STATUS_E_FAILURE; |
| 1947 | } |
| 1948 | |
| 1949 | /** |
| 1950 | * wmi_unified_set_macaddr_cmd_send() - WMI set macaddr cmd function |
| 1951 | * @param wmi_handle : handle to WMI. |
| 1952 | * @param param : pointer to hold macaddr param |
| 1953 | * |
| 1954 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1955 | */ |
| 1956 | QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, |
| 1957 | struct macaddr_params *param) |
| 1958 | { |
| 1959 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1960 | |
| 1961 | if (wmi_handle->ops->send_set_macaddr_cmd) |
| 1962 | return wmi_handle->ops->send_set_macaddr_cmd(wmi_handle, param); |
| 1963 | |
| 1964 | return QDF_STATUS_E_FAILURE; |
| 1965 | } |
| 1966 | |
| 1967 | /** |
| 1968 | * wmi_unified_pdev_scan_start_cmd_send() - WMI pdev scan start cmd function |
| 1969 | * @param wmi_handle : handle to WMI. |
| 1970 | * |
| 1971 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1972 | */ |
| 1973 | QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl) |
| 1974 | { |
| 1975 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1976 | |
| 1977 | if (wmi_handle->ops->send_pdev_scan_start_cmd) |
| 1978 | return wmi_handle->ops->send_pdev_scan_start_cmd(wmi_handle); |
| 1979 | |
| 1980 | return QDF_STATUS_E_FAILURE; |
| 1981 | } |
| 1982 | |
| 1983 | /** |
| 1984 | * wmi_unified_pdev_scan_end_cmd_send() - WMI pdev scan end cmd function |
| 1985 | * @param wmi_handle : handle to WMI. |
| 1986 | * |
| 1987 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1988 | */ |
| 1989 | QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl) |
| 1990 | { |
| 1991 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 1992 | |
| 1993 | if (wmi_handle->ops->send_pdev_scan_end_cmd) |
| 1994 | return wmi_handle->ops->send_pdev_scan_end_cmd(wmi_handle); |
| 1995 | |
| 1996 | return QDF_STATUS_E_FAILURE; |
| 1997 | } |
| 1998 | |
| 1999 | /** |
| 2000 | * wmi_unified_set_acparams_cmd_send() - WMI set acparams cmd function |
| 2001 | * @param wmi_handle : handle to WMI. |
| 2002 | * @param param : pointer to hold acparams param |
| 2003 | * |
| 2004 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2005 | */ |
| 2006 | QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, |
| 2007 | struct acparams_params *param) |
| 2008 | { |
| 2009 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2010 | |
| 2011 | if (wmi_handle->ops->send_set_acparams_cmd) |
| 2012 | return wmi_handle->ops->send_set_acparams_cmd(wmi_handle, |
| 2013 | param); |
| 2014 | |
| 2015 | return QDF_STATUS_E_FAILURE; |
| 2016 | } |
| 2017 | |
| 2018 | /** |
| 2019 | * wmi_unified_set_vap_dscp_tid_map_cmd_send() - WMI set vap dscp |
| 2020 | * tid map cmd function |
| 2021 | * @param wmi_handle : handle to WMI. |
| 2022 | * @param param : pointer to hold dscp param |
| 2023 | * |
| 2024 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2025 | */ |
| 2026 | QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, |
| 2027 | struct vap_dscp_tid_map_params *param) |
| 2028 | { |
| 2029 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2030 | |
| 2031 | if (wmi->ops->send_set_vap_dscp_tid_map_cmd) |
| 2032 | return wmi->ops->send_set_vap_dscp_tid_map_cmd(wmi, param); |
| 2033 | |
| 2034 | return QDF_STATUS_E_FAILURE; |
| 2035 | } |
| 2036 | |
| 2037 | /** |
| 2038 | * wmi_unified_proxy_ast_reserve_cmd_send() - WMI proxy ast |
| 2039 | * reserve cmd function |
| 2040 | * @param wmi_handle : handle to WMI. |
| 2041 | * @param param : pointer to hold ast param |
| 2042 | * |
| 2043 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2044 | */ |
| 2045 | QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, |
| 2046 | struct proxy_ast_reserve_params *param) |
| 2047 | { |
| 2048 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2049 | |
| 2050 | if (wmi_handle->ops->send_proxy_ast_reserve_cmd) |
| 2051 | return wmi_handle->ops->send_proxy_ast_reserve_cmd(wmi_handle, |
| 2052 | param); |
| 2053 | |
| 2054 | return QDF_STATUS_E_FAILURE; |
| 2055 | } |
| 2056 | |
| 2057 | /** |
Jeevan Kukkalli | 0aeff78 | 2017-06-16 18:07:28 +0530 | [diff] [blame] | 2058 | * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function |
| 2059 | * @param wmi_hdl : handle to WMI. |
| 2060 | * @param param : pointer to hold bridge mac addr param |
| 2061 | * |
| 2062 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2063 | */ |
| 2064 | QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, |
| 2065 | struct set_bridge_mac_addr_params *param) |
| 2066 | { |
| 2067 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2068 | |
| 2069 | if (wmi_handle->ops->send_set_bridge_mac_addr_cmd) |
| 2070 | return wmi_handle->ops->send_set_bridge_mac_addr_cmd(wmi_handle, |
| 2071 | param); |
| 2072 | |
| 2073 | return QDF_STATUS_E_FAILURE; |
| 2074 | } |
| 2075 | |
| 2076 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2077 | * wmi_unified_phyerr_enable_cmd_send() - WMI phyerr enable cmd function |
| 2078 | * @param wmi_handle : handle to WMI. |
| 2079 | * @param param : pointer to hold phyerr enable param |
| 2080 | * |
| 2081 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2082 | */ |
| 2083 | QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl) |
| 2084 | { |
| 2085 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2086 | |
| 2087 | if (wmi_handle->ops->send_phyerr_enable_cmd) |
| 2088 | return wmi_handle->ops->send_phyerr_enable_cmd(wmi_handle); |
| 2089 | |
| 2090 | return QDF_STATUS_E_FAILURE; |
| 2091 | } |
| 2092 | |
| 2093 | /** |
| 2094 | * wmi_unified_phyerr_disable_cmd_send() - WMI phyerr disable cmd function |
| 2095 | * @param wmi_handle : handle to WMI. |
| 2096 | * @param param : pointer to hold phyerr disable param |
| 2097 | * |
| 2098 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2099 | */ |
| 2100 | QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl) |
| 2101 | { |
| 2102 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2103 | |
| 2104 | if (wmi_handle->ops->send_phyerr_disable_cmd) |
| 2105 | return wmi_handle->ops->send_phyerr_disable_cmd(wmi_handle); |
| 2106 | |
| 2107 | return QDF_STATUS_E_FAILURE; |
| 2108 | } |
| 2109 | |
| 2110 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2111 | * wmi_unified_smart_ant_enable_tx_feedback_cmd_send() - WMI set tx antenna function |
| 2112 | * @param wmi_handle : handle to WMI. |
| 2113 | * @param param : pointer to hold antenna param |
| 2114 | * |
| 2115 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2116 | */ |
| 2117 | QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, |
| 2118 | struct smart_ant_enable_tx_feedback_params *param) |
| 2119 | { |
| 2120 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2121 | |
| 2122 | if (wmi->ops->send_smart_ant_enable_tx_feedback_cmd) |
| 2123 | return wmi->ops->send_smart_ant_enable_tx_feedback_cmd(wmi, |
| 2124 | param); |
| 2125 | |
| 2126 | return QDF_STATUS_E_FAILURE; |
| 2127 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 2128 | qdf_export_symbol(wmi_unified_smart_ant_enable_tx_feedback_cmd_send); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2129 | |
| 2130 | /** |
| 2131 | * wmi_unified_vdev_spectral_configure_cmd_send() - WMI set spectral config function |
| 2132 | * @param wmi_handle : handle to WMI. |
| 2133 | * @param param : pointer to hold spectral config param |
| 2134 | * |
| 2135 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2136 | */ |
| 2137 | QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, |
| 2138 | struct vdev_spectral_configure_params *param) |
| 2139 | { |
| 2140 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2141 | |
| 2142 | if (wmi->ops->send_vdev_spectral_configure_cmd) |
| 2143 | return wmi->ops->send_vdev_spectral_configure_cmd(wmi, param); |
| 2144 | |
| 2145 | return QDF_STATUS_E_FAILURE; |
| 2146 | } |
| 2147 | |
| 2148 | /** |
| 2149 | * wmi_unified_vdev_spectral_enable_cmd_send() - WMI enable spectral function |
| 2150 | * @param wmi_handle : handle to WMI. |
| 2151 | * @param param : pointer to hold enable spectral param |
| 2152 | * |
| 2153 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2154 | */ |
| 2155 | QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, |
| 2156 | struct vdev_spectral_enable_params *param) |
| 2157 | { |
| 2158 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2159 | |
| 2160 | if (wmi->ops->send_vdev_spectral_enable_cmd) |
| 2161 | return wmi->ops->send_vdev_spectral_enable_cmd(wmi, param); |
| 2162 | |
| 2163 | return QDF_STATUS_E_FAILURE; |
| 2164 | } |
| 2165 | |
| 2166 | /** |
| 2167 | * wmi_unified_bss_chan_info_request_cmd_send() - WMI bss chan info request function |
| 2168 | * @param wmi_handle : handle to WMI. |
| 2169 | * @param param : pointer to hold chan info param |
| 2170 | * |
| 2171 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2172 | */ |
| 2173 | QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, |
| 2174 | struct bss_chan_info_request_params *param) |
| 2175 | { |
| 2176 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2177 | |
| 2178 | if (wmi->ops->send_bss_chan_info_request_cmd) |
| 2179 | return wmi->ops->send_bss_chan_info_request_cmd(wmi, param); |
| 2180 | |
| 2181 | return QDF_STATUS_E_FAILURE; |
| 2182 | } |
| 2183 | |
| 2184 | /** |
| 2185 | * wmi_unified_thermal_mitigation_param_cmd_send() - WMI thermal mitigation function |
| 2186 | * @param wmi_handle : handle to WMI. |
| 2187 | * @param param : pointer to hold thermal mitigation param |
| 2188 | * |
| 2189 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2190 | */ |
| 2191 | QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, |
| 2192 | struct thermal_mitigation_params *param) |
| 2193 | { |
| 2194 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2195 | |
| 2196 | if (wmi->ops->send_thermal_mitigation_param_cmd) |
| 2197 | return wmi->ops->send_thermal_mitigation_param_cmd(wmi, param); |
| 2198 | |
| 2199 | return QDF_STATUS_E_FAILURE; |
| 2200 | } |
| 2201 | |
| 2202 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2203 | * wmi_unified_vdev_set_fwtest_param_cmd_send() - WMI set fwtest function |
| 2204 | * @param wmi_handle : handle to WMI. |
| 2205 | * @param param : pointer to hold fwtest param |
| 2206 | * |
| 2207 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2208 | */ |
| 2209 | QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, |
| 2210 | struct set_fwtest_params *param) |
| 2211 | { |
| 2212 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2213 | |
| 2214 | if (wmi->ops->send_vdev_set_fwtest_param_cmd) |
| 2215 | return wmi->ops->send_vdev_set_fwtest_param_cmd(wmi, param); |
| 2216 | |
| 2217 | return QDF_STATUS_E_FAILURE; |
| 2218 | } |
| 2219 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2220 | /** |
Sathish Kumar | 6011c74 | 2017-11-08 14:49:58 +0530 | [diff] [blame] | 2221 | * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr |
| 2222 | * size function |
| 2223 | * @param wmi_handle : handle to WMI |
| 2224 | * @param param : pointer to hold custom aggr size param |
| 2225 | * |
| 2226 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 2227 | */ |
| 2228 | QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, |
| 2229 | struct set_custom_aggr_size_params *param) |
| 2230 | { |
| 2231 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 2232 | |
| 2233 | if (wmi->ops->send_vdev_set_custom_aggr_size_cmd) |
| 2234 | return wmi->ops->send_vdev_set_custom_aggr_size_cmd(wmi, param); |
| 2235 | |
| 2236 | return QDF_STATUS_E_FAILURE; |
| 2237 | } |
| 2238 | |
| 2239 | /** |
Venkateswara Swamy Bandaru | 9983ac5 | 2017-12-22 17:16:19 +0530 | [diff] [blame] | 2240 | * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold |
| 2241 | * @param wmi_handle : handle to WMI |
| 2242 | * @param param : pointer to hold qdepth threshold params |
| 2243 | * |
| 2244 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_R_FAILURE for failure |
| 2245 | */ |
| 2246 | QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, |
| 2247 | struct set_qdepth_thresh_params *param) |
| 2248 | { |
| 2249 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 2250 | |
| 2251 | if (wmi->ops->send_vdev_set_qdepth_thresh_cmd) |
| 2252 | return wmi->ops->send_vdev_set_qdepth_thresh_cmd(wmi, param); |
| 2253 | |
| 2254 | return QDF_STATUS_E_FAILURE; |
| 2255 | } |
| 2256 | |
| 2257 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2258 | * wmi_unified_pdev_set_regdomain_params_cmd_send() - WMI set regdomain function |
| 2259 | * @param wmi_handle : handle to WMI. |
| 2260 | * @param param : pointer to hold regdomain param |
| 2261 | * |
| 2262 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2263 | */ |
| 2264 | QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, |
| 2265 | struct pdev_set_regdomain_params *param) |
| 2266 | { |
| 2267 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2268 | |
| 2269 | if (wmi_handle->ops->send_pdev_set_regdomain_cmd) |
| 2270 | return wmi_handle->ops->send_pdev_set_regdomain_cmd(wmi_handle, |
| 2271 | param); |
| 2272 | |
| 2273 | return QDF_STATUS_E_FAILURE; |
| 2274 | } |
| 2275 | |
| 2276 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2277 | * wmi_unified_set_beacon_filter_cmd_send() - WMI set beacon filter function |
| 2278 | * @param wmi_handle : handle to WMI. |
| 2279 | * @param param : pointer to hold beacon filter param |
| 2280 | * |
| 2281 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2282 | */ |
| 2283 | QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, |
| 2284 | struct set_beacon_filter_params *param) |
| 2285 | { |
| 2286 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2287 | |
| 2288 | if (wmi_handle->ops->send_set_beacon_filter_cmd) |
| 2289 | return wmi_handle->ops->send_set_beacon_filter_cmd(wmi_handle, |
| 2290 | param); |
| 2291 | |
| 2292 | return QDF_STATUS_E_FAILURE; |
| 2293 | } |
| 2294 | |
| 2295 | /** |
| 2296 | * wmi_unified_remove_beacon_filter_cmd_send() - WMI set beacon filter function |
| 2297 | * @param wmi_handle : handle to WMI. |
| 2298 | * @param param : pointer to hold beacon filter param |
| 2299 | * |
| 2300 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2301 | */ |
| 2302 | QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, |
| 2303 | struct remove_beacon_filter_params *param) |
| 2304 | { |
| 2305 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2306 | |
| 2307 | if (wmi->ops->send_remove_beacon_filter_cmd) |
| 2308 | return wmi->ops->send_remove_beacon_filter_cmd(wmi, param); |
| 2309 | |
| 2310 | return QDF_STATUS_E_FAILURE; |
| 2311 | } |
| 2312 | |
| 2313 | /** |
| 2314 | * wmi_unified_mgmt_cmd_send() - WMI mgmt cmd function |
| 2315 | * @param wmi_handle : handle to WMI. |
| 2316 | * @param macaddr : MAC address |
| 2317 | * @param param : pointer to hold mgmt parameter |
| 2318 | * |
| 2319 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2320 | */ |
| 2321 | #if 0 |
| 2322 | QDF_STATUS wmi_unified_mgmt_cmd_send(void *wmi_hdl, |
| 2323 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2324 | struct mgmt_params *param) |
| 2325 | { |
| 2326 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2327 | |
| 2328 | if (wmi_handle->ops->send_mgmt_cmd) |
| 2329 | return wmi_handle->ops->send_mgmt_cmd(wmi_handle, |
| 2330 | macaddr, param); |
| 2331 | |
| 2332 | return QDF_STATUS_E_FAILURE; |
| 2333 | } |
| 2334 | #endif |
| 2335 | |
| 2336 | /** |
| 2337 | * wmi_unified_addba_clearresponse_cmd_send() - WMI addba resp cmd function |
| 2338 | * @param wmi_handle : handle to WMI. |
| 2339 | * @param macaddr : MAC address |
| 2340 | * @param param : pointer to hold addba resp parameter |
| 2341 | * |
| 2342 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2343 | */ |
| 2344 | QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, |
| 2345 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2346 | struct addba_clearresponse_params *param) |
| 2347 | { |
| 2348 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2349 | |
| 2350 | if (wmi_handle->ops->send_addba_clearresponse_cmd) |
| 2351 | return wmi_handle->ops->send_addba_clearresponse_cmd(wmi_handle, |
| 2352 | macaddr, param); |
| 2353 | |
| 2354 | return QDF_STATUS_E_FAILURE; |
| 2355 | } |
| 2356 | |
| 2357 | /** |
| 2358 | * wmi_unified_addba_send_cmd_send() - WMI addba send function |
| 2359 | * @param wmi_handle : handle to WMI. |
| 2360 | * @param macaddr : MAC address |
| 2361 | * @param param : pointer to hold addba parameter |
| 2362 | * |
| 2363 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2364 | */ |
| 2365 | QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, |
| 2366 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2367 | struct addba_send_params *param) |
| 2368 | { |
| 2369 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2370 | |
| 2371 | if (wmi_handle->ops->send_addba_send_cmd) |
| 2372 | return wmi_handle->ops->send_addba_send_cmd(wmi_handle, |
| 2373 | macaddr, param); |
| 2374 | |
| 2375 | return QDF_STATUS_E_FAILURE; |
| 2376 | } |
| 2377 | |
| 2378 | /** |
| 2379 | * wmi_unified_delba_send_cmd_send() - WMI delba cmd function |
| 2380 | * @param wmi_handle : handle to WMI. |
| 2381 | * @param macaddr : MAC address |
| 2382 | * @param param : pointer to hold delba parameter |
| 2383 | * |
| 2384 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2385 | */ |
| 2386 | QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, |
| 2387 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2388 | struct delba_send_params *param) |
| 2389 | { |
| 2390 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2391 | |
| 2392 | if (wmi_handle->ops->send_delba_send_cmd) |
| 2393 | return wmi_handle->ops->send_delba_send_cmd(wmi_handle, |
| 2394 | macaddr, param); |
| 2395 | |
| 2396 | return QDF_STATUS_E_FAILURE; |
| 2397 | } |
| 2398 | |
| 2399 | /** |
| 2400 | * wmi_unified_addba_setresponse_cmd_send() - WMI addba set resp cmd function |
| 2401 | * @param wmi_handle : handle to WMI. |
| 2402 | * @param macaddr : MAC address |
| 2403 | * @param param : pointer to hold addba set resp parameter |
| 2404 | * |
| 2405 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2406 | */ |
| 2407 | QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, |
| 2408 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2409 | struct addba_setresponse_params *param) |
| 2410 | { |
| 2411 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2412 | |
| 2413 | if (wmi_handle->ops->send_addba_setresponse_cmd) |
| 2414 | return wmi_handle->ops->send_addba_setresponse_cmd(wmi_handle, |
| 2415 | macaddr, param); |
| 2416 | |
| 2417 | return QDF_STATUS_E_FAILURE; |
| 2418 | } |
| 2419 | |
| 2420 | /** |
| 2421 | * wmi_unified_singleamsdu_cmd_send() - WMI singleamsdu function |
| 2422 | * @param wmi_handle : handle to WMI. |
| 2423 | * @param macaddr : MAC address |
| 2424 | * @param param : pointer to hold singleamsdu parameter |
| 2425 | * |
| 2426 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2427 | */ |
| 2428 | QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, |
| 2429 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 2430 | struct singleamsdu_params *param) |
| 2431 | { |
| 2432 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2433 | |
| 2434 | if (wmi_handle->ops->send_singleamsdu_cmd) |
| 2435 | return wmi_handle->ops->send_singleamsdu_cmd(wmi_handle, |
| 2436 | macaddr, param); |
| 2437 | |
| 2438 | return QDF_STATUS_E_FAILURE; |
| 2439 | } |
| 2440 | |
| 2441 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2442 | * wmi_unified_mu_scan_cmd_send() - WMI set mu scan function |
| 2443 | * @param wmi_handle : handle to WMI. |
| 2444 | * @param param : pointer to hold mu scan param |
| 2445 | * |
| 2446 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2447 | */ |
| 2448 | QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, |
| 2449 | struct mu_scan_params *param) |
| 2450 | { |
| 2451 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2452 | |
| 2453 | if (wmi_handle->ops->send_mu_scan_cmd) |
| 2454 | return wmi_handle->ops->send_mu_scan_cmd(wmi_handle, param); |
| 2455 | |
| 2456 | return QDF_STATUS_E_FAILURE; |
| 2457 | } |
| 2458 | |
| 2459 | /** |
| 2460 | * wmi_unified_lteu_config_cmd_send() - WMI set mu scan function |
| 2461 | * @param wmi_handle : handle to WMI. |
| 2462 | * @param param : pointer to hold mu scan param |
| 2463 | * |
| 2464 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2465 | */ |
| 2466 | QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, |
| 2467 | struct lteu_config_params *param) |
| 2468 | { |
| 2469 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2470 | |
| 2471 | if (wmi_handle->ops->send_lteu_config_cmd) |
| 2472 | return wmi_handle->ops->send_lteu_config_cmd(wmi_handle, param); |
| 2473 | |
| 2474 | return QDF_STATUS_E_FAILURE; |
| 2475 | } |
| 2476 | |
| 2477 | /** |
| 2478 | * wmi_unified_set_psmode_cmd_send() - WMI set mu scan function |
| 2479 | * @param wmi_handle : handle to WMI. |
| 2480 | * @param param : pointer to hold mu scan param |
| 2481 | * |
| 2482 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2483 | */ |
| 2484 | QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, |
| 2485 | struct set_ps_mode_params *param) |
| 2486 | { |
| 2487 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2488 | |
| 2489 | if (wmi_handle->ops->send_set_ps_mode_cmd) |
| 2490 | return wmi_handle->ops->send_set_ps_mode_cmd(wmi_handle, param); |
| 2491 | |
| 2492 | return QDF_STATUS_E_FAILURE; |
| 2493 | } |
| 2494 | |
| 2495 | /** |
| 2496 | * wmi_unified_init_cmd_send() - send initialization cmd to fw |
| 2497 | * @wmi_handle: wmi handle |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 2498 | * @param param: pointer to wmi init param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2499 | * |
| 2500 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2501 | */ |
| 2502 | QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 2503 | struct wmi_init_cmd_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2504 | { |
| 2505 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2506 | |
| 2507 | if (wmi_handle->ops->init_cmd_send) |
Kiran Venkatappa | 2611705 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 2508 | return wmi_handle->ops->init_cmd_send(wmi_handle, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2509 | |
| 2510 | return QDF_STATUS_E_FAILURE; |
| 2511 | } |
| 2512 | |
| 2513 | /** |
| 2514 | * wmi_save_service_bitmap() - save service bitmap |
| 2515 | * @wmi_handle: wmi handle |
| 2516 | * @param evt_buf: pointer to event buffer |
| 2517 | * |
| 2518 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2519 | */ |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 2520 | QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 2521 | void *bitmap_buf) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2522 | { |
| 2523 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 2524 | |
| 2525 | if (wmi_handle->ops->save_service_bitmap) { |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 2526 | return wmi_handle->ops->save_service_bitmap(wmi_handle, evt_buf, |
Rajeev Kumar | 7790147 | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 2527 | bitmap_buf); |
Kiran Venkatappa | 7d73914 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 2528 | } |
| 2529 | return QDF_STATUS_E_FAILURE; |
| 2530 | } |
| 2531 | |
| 2532 | /** |
| 2533 | * wmi_save_ext_service_bitmap() - save extended service bitmap |
| 2534 | * @wmi_handle: wmi handle |
| 2535 | * @param evt_buf: pointer to event buffer |
| 2536 | * |
| 2537 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2538 | */ |
| 2539 | QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 2540 | void *bitmap_buf) |
| 2541 | { |
| 2542 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 2543 | |
| 2544 | if (wmi_handle->ops->save_ext_service_bitmap) { |
| 2545 | return wmi_handle->ops->save_ext_service_bitmap(wmi_handle, |
| 2546 | evt_buf, bitmap_buf); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2547 | } |
| 2548 | return QDF_STATUS_E_FAILURE; |
| 2549 | } |
| 2550 | |
| 2551 | /** |
| 2552 | * wmi_save_fw_version() - Save fw version |
| 2553 | * @wmi_handle: wmi handle |
| 2554 | * @param evt_buf: pointer to event buffer |
| 2555 | * |
| 2556 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2557 | */ |
| 2558 | QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf) |
| 2559 | { |
| 2560 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 2561 | |
| 2562 | if (wmi_handle->ops->save_fw_version) { |
| 2563 | wmi_handle->ops->save_fw_version(wmi_handle, evt_buf); |
| 2564 | return 0; |
| 2565 | } |
| 2566 | return QDF_STATUS_E_FAILURE; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2567 | } |
| 2568 | |
| 2569 | /** |
| 2570 | * wmi_check_and_update_fw_version() - Ready and fw version check |
| 2571 | * @wmi_handle: wmi handle |
| 2572 | * @param evt_buf: pointer to event buffer |
| 2573 | * |
| 2574 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2575 | */ |
| 2576 | QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *evt_buf) |
| 2577 | { |
| 2578 | struct wmi_unified *wmi_handle = (struct wmi_unified *) wmi_hdl; |
| 2579 | |
| 2580 | if (wmi_handle->ops->check_and_update_fw_version) |
| 2581 | return wmi_handle->ops->check_and_update_fw_version(wmi_handle, |
| 2582 | evt_buf); |
| 2583 | |
| 2584 | return QDF_STATUS_E_FAILURE; |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2585 | } |
| 2586 | |
| 2587 | /** |
| 2588 | * wmi_service_enabled() - Check if service enabled |
| 2589 | * @param wmi_handle: wmi handle |
| 2590 | * @param service_id: service identifier |
| 2591 | * |
| 2592 | * Return: 1 enabled, 0 disabled |
| 2593 | */ |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2594 | bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id) |
| 2595 | { |
| 2596 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2597 | |
| 2598 | if ((service_id < wmi_services_max) && |
| 2599 | (wmi_handle->services[service_id] != WMI_SERVICE_UNAVAILABLE)) { |
| 2600 | if (wmi_handle->ops->is_service_enabled) { |
| 2601 | return wmi_handle->ops->is_service_enabled(wmi_handle, |
| 2602 | wmi_handle->services[service_id]); |
| 2603 | } |
| 2604 | } else { |
Sathish Kumar | 686d08d | 2018-06-26 11:01:11 +0530 | [diff] [blame] | 2605 | WMI_LOGI("Service %d not supported", service_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2606 | } |
Sourav Mohapatra | a7b454d | 2017-12-03 11:44:44 +0530 | [diff] [blame] | 2607 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2608 | return false; |
| 2609 | } |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2610 | |
| 2611 | /** |
| 2612 | * wmi_get_target_cap_from_service_ready() - extract service ready event |
| 2613 | * @wmi_handle: wmi handle |
| 2614 | * @param evt_buf: pointer to received event buffer |
| 2615 | * @param ev: pointer to hold target capability information extracted from even |
| 2616 | * |
| 2617 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2618 | */ |
| 2619 | QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 2620 | void *evt_buf, struct wlan_psoc_target_capability_info *ev) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2621 | { |
| 2622 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2623 | |
| 2624 | if (wmi->ops->get_target_cap_from_service_ready) |
| 2625 | return wmi->ops->get_target_cap_from_service_ready(wmi, |
| 2626 | evt_buf, ev); |
| 2627 | |
| 2628 | return QDF_STATUS_E_FAILURE; |
| 2629 | } |
| 2630 | |
| 2631 | /** |
| 2632 | * wmi_extract_fw_version() - extract fw version |
| 2633 | * @wmi_handle: wmi handle |
| 2634 | * @param evt_buf: pointer to event buffer |
| 2635 | * @param fw_ver: Pointer to hold fw version |
| 2636 | * |
| 2637 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2638 | */ |
| 2639 | QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, |
| 2640 | void *evt_buf, struct wmi_host_fw_ver *fw_ver) |
| 2641 | { |
| 2642 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2643 | |
| 2644 | if (wmi_handle->ops->extract_fw_version) |
| 2645 | return wmi_handle->ops->extract_fw_version(wmi_handle, |
| 2646 | evt_buf, fw_ver); |
| 2647 | |
| 2648 | return QDF_STATUS_E_FAILURE; |
| 2649 | } |
| 2650 | |
| 2651 | /** |
| 2652 | * wmi_extract_fw_abi_version() - extract fw abi version |
| 2653 | * @wmi_handle: wmi handle |
| 2654 | * @param evt_buf: Pointer to event buffer |
| 2655 | * @param fw_ver: Pointer to hold fw abi version |
| 2656 | * |
| 2657 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2658 | */ |
| 2659 | QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, |
| 2660 | void *evt_buf, struct wmi_host_fw_abi_ver *fw_ver) |
| 2661 | { |
| 2662 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2663 | |
| 2664 | if (wmi_handle->ops->extract_fw_abi_version) |
| 2665 | return wmi_handle->ops->extract_fw_abi_version(wmi_handle, |
| 2666 | evt_buf, fw_ver); |
| 2667 | |
| 2668 | return QDF_STATUS_E_FAILURE; |
| 2669 | } |
| 2670 | |
| 2671 | /** |
| 2672 | * wmi_extract_hal_reg_cap() - extract HAL registered capabilities |
| 2673 | * @wmi_handle: wmi handle |
| 2674 | * @param evt_buf: Pointer to event buffer |
| 2675 | * @param hal_reg_cap: pointer to hold HAL reg capabilities |
| 2676 | * |
| 2677 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2678 | */ |
| 2679 | 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] | 2680 | struct wlan_psoc_hal_reg_capability *hal_reg_cap) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2681 | { |
| 2682 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2683 | |
| 2684 | if (wmi_handle->ops->extract_hal_reg_cap) |
| 2685 | return wmi_handle->ops->extract_hal_reg_cap(wmi_handle, |
| 2686 | evt_buf, hal_reg_cap); |
| 2687 | |
| 2688 | return QDF_STATUS_E_FAILURE; |
| 2689 | } |
| 2690 | |
| 2691 | /** |
| 2692 | * wmi_extract_host_mem_req_from_service_ready() - Extract host memory |
| 2693 | * request event |
| 2694 | * @wmi_handle: wmi handle |
| 2695 | * @param evt_buf: pointer to event buffer |
| 2696 | * @param num_entries: pointer to hold number of entries requested |
| 2697 | * |
| 2698 | * Return: Number of entries requested |
| 2699 | */ |
| 2700 | host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, |
| 2701 | void *evt_buf, uint8_t *num_entries) |
| 2702 | { |
| 2703 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2704 | |
| 2705 | if (wmi_handle->ops->extract_host_mem_req) |
| 2706 | return wmi_handle->ops->extract_host_mem_req(wmi_handle, |
| 2707 | evt_buf, num_entries); |
| 2708 | |
| 2709 | *num_entries = 0; |
| 2710 | return NULL; |
| 2711 | } |
| 2712 | |
| 2713 | /** |
| 2714 | * wmi_ready_extract_init_status() - Extract init status from ready event |
| 2715 | * @wmi_handle: wmi handle |
| 2716 | * @param ev: Pointer to event buffer |
| 2717 | * |
| 2718 | * Return: ready status |
| 2719 | */ |
| 2720 | uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev) |
| 2721 | { |
| 2722 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2723 | |
| 2724 | if (wmi_handle->ops->ready_extract_init_status) |
| 2725 | return wmi_handle->ops->ready_extract_init_status(wmi_handle, |
| 2726 | ev); |
| 2727 | |
| 2728 | |
| 2729 | return 1; |
| 2730 | |
| 2731 | } |
| 2732 | |
| 2733 | /** |
| 2734 | * wmi_ready_extract_mac_addr() - extract mac address from ready event |
| 2735 | * @wmi_handle: wmi handle |
| 2736 | * @param ev: pointer to event buffer |
| 2737 | * @param macaddr: Pointer to hold MAC address |
| 2738 | * |
| 2739 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2740 | */ |
| 2741 | QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr) |
| 2742 | { |
| 2743 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2744 | |
| 2745 | if (wmi_handle->ops->ready_extract_mac_addr) |
| 2746 | return wmi_handle->ops->ready_extract_mac_addr(wmi_handle, |
| 2747 | ev, macaddr); |
| 2748 | |
| 2749 | |
| 2750 | return QDF_STATUS_E_FAILURE; |
| 2751 | } |
| 2752 | |
| 2753 | /** |
Manoj Ekbote | dd27390 | 2017-07-09 23:28:56 -0700 | [diff] [blame] | 2754 | * wmi_ready_extract_mac_addr() - extract MAC address list from ready event |
| 2755 | * @wmi_handle: wmi handle |
| 2756 | * @param ev: pointer to event buffer |
| 2757 | * @param num_mac_addr: Pointer to number of entries |
| 2758 | * |
| 2759 | * Return: address to start of mac addr list |
| 2760 | */ |
| 2761 | wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, |
| 2762 | uint8_t *num_mac_addr) |
| 2763 | { |
| 2764 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2765 | |
| 2766 | if (wmi_handle->ops->ready_extract_mac_addr_list) |
| 2767 | return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle, |
| 2768 | ev, num_mac_addr); |
| 2769 | |
| 2770 | *num_mac_addr = 0; |
| 2771 | |
| 2772 | return NULL; |
| 2773 | } |
| 2774 | |
| 2775 | /** |
Kiran Venkatappa | 094c24f | 2017-11-10 20:50:12 +0530 | [diff] [blame] | 2776 | * wmi_extract_ready_params() - Extract data from ready event apart from |
| 2777 | * status, macaddr and version. |
| 2778 | * @wmi_handle: Pointer to WMI handle. |
| 2779 | * @evt_buf: Pointer to Ready event buffer. |
| 2780 | * @ev_param: Pointer to host defined struct to copy the data from event. |
| 2781 | * |
| 2782 | * Return: QDF_STATUS_SUCCESS on success. |
| 2783 | */ |
| 2784 | QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, |
| 2785 | void *evt_buf, struct wmi_host_ready_ev_param *ev_param) |
| 2786 | { |
| 2787 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2788 | |
| 2789 | if (wmi_handle->ops->extract_ready_event_params) |
| 2790 | return wmi_handle->ops->extract_ready_event_params(wmi_handle, |
| 2791 | evt_buf, ev_param); |
| 2792 | |
| 2793 | return QDF_STATUS_E_FAILURE; |
| 2794 | } |
| 2795 | |
| 2796 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2797 | * wmi_extract_dbglog_data_len() - extract debuglog data length |
| 2798 | * @wmi_handle: wmi handle |
| 2799 | * @param evt_buf: pointer to event buffer |
| 2800 | * @param len: length of buffer |
| 2801 | * |
| 2802 | * Return: length |
| 2803 | */ |
| 2804 | 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] | 2805 | uint32_t *len) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2806 | { |
| 2807 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2808 | |
| 2809 | if (wmi_handle->ops->extract_dbglog_data_len) |
| 2810 | return wmi_handle->ops->extract_dbglog_data_len(wmi_handle, |
| 2811 | evt_buf, len); |
| 2812 | |
| 2813 | |
| 2814 | return NULL; |
| 2815 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 2816 | qdf_export_symbol(wmi_extract_dbglog_data_len); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2817 | |
| 2818 | /** |
| 2819 | * wmi_send_ext_resource_config() - send extended resource configuration |
| 2820 | * @wmi_handle: wmi handle |
| 2821 | * @param ext_cfg: pointer to extended resource configuration |
| 2822 | * |
| 2823 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2824 | */ |
| 2825 | QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, |
| 2826 | wmi_host_ext_resource_config *ext_cfg) |
| 2827 | { |
| 2828 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2829 | |
| 2830 | if (wmi_handle->ops->send_ext_resource_config) |
| 2831 | return wmi_handle->ops->send_ext_resource_config(wmi_handle, |
| 2832 | ext_cfg); |
| 2833 | |
| 2834 | return QDF_STATUS_E_FAILURE; |
| 2835 | } |
| 2836 | |
| 2837 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 2838 | * wmi_unified_rtt_meas_req_test_cmd_send() - WMI rtt meas req test function |
| 2839 | * @param wmi_handle : handle to WMI. |
| 2840 | * @param param : pointer to hold rtt meas req test param |
| 2841 | * |
| 2842 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2843 | */ |
| 2844 | QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, |
| 2845 | struct rtt_meas_req_test_params *param) |
| 2846 | { |
| 2847 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2848 | |
| 2849 | if (wmi_handle->ops->send_rtt_meas_req_test_cmd) |
| 2850 | return wmi_handle->ops->send_rtt_meas_req_test_cmd(wmi_handle, |
| 2851 | param); |
| 2852 | |
| 2853 | return QDF_STATUS_E_FAILURE; |
| 2854 | } |
| 2855 | |
| 2856 | /** |
| 2857 | * wmi_unified_rtt_meas_req_cmd_send() - WMI rtt meas req function |
| 2858 | * @param wmi_handle : handle to WMI. |
| 2859 | * @param param : pointer to hold rtt meas req param |
| 2860 | * |
| 2861 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2862 | */ |
| 2863 | QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, |
| 2864 | struct rtt_meas_req_params *param) |
| 2865 | { |
| 2866 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2867 | |
| 2868 | if (wmi_handle->ops->send_rtt_meas_req_cmd) |
| 2869 | return wmi_handle->ops->send_rtt_meas_req_cmd(wmi_handle, |
| 2870 | param); |
| 2871 | |
| 2872 | return QDF_STATUS_E_FAILURE; |
| 2873 | } |
| 2874 | |
| 2875 | /** |
| 2876 | * wmi_unified_lci_set_cmd_send() - WMI lci set function |
| 2877 | * @param wmi_handle : handle to WMI. |
| 2878 | * @param param : pointer to hold lci param |
| 2879 | * |
| 2880 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2881 | */ |
| 2882 | QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, |
| 2883 | struct lci_set_params *param) |
| 2884 | { |
| 2885 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2886 | |
| 2887 | if (wmi_handle->ops->send_lci_set_cmd) |
| 2888 | return wmi_handle->ops->send_lci_set_cmd(wmi_handle, param); |
| 2889 | |
| 2890 | return QDF_STATUS_E_FAILURE; |
| 2891 | } |
| 2892 | |
| 2893 | /** |
| 2894 | * wmi_unified_lcr_set_cmd_send() - WMI lcr set function |
| 2895 | * @param wmi_handle : handle to WMI. |
| 2896 | * @param param : pointer to hold lcr param |
| 2897 | * |
| 2898 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2899 | */ |
| 2900 | QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, |
| 2901 | struct lcr_set_params *param) |
| 2902 | { |
| 2903 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2904 | |
| 2905 | if (wmi_handle->ops->send_lcr_set_cmd) |
| 2906 | return wmi_handle->ops->send_lcr_set_cmd(wmi_handle, param); |
| 2907 | |
| 2908 | return QDF_STATUS_E_FAILURE; |
| 2909 | } |
| 2910 | |
| 2911 | /** |
| 2912 | * wmi_unified_rtt_keepalive_req_cmd_send() - WMI rtt meas req test function |
| 2913 | * @param wmi_handle : handle to WMI. |
| 2914 | * @param param : pointer to hold rtt meas req test param |
| 2915 | * |
| 2916 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2917 | */ |
| 2918 | QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, |
| 2919 | struct rtt_keepalive_req_params *param) |
| 2920 | { |
| 2921 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2922 | |
| 2923 | if (wmi_handle->ops->send_rtt_keepalive_req_cmd) |
| 2924 | return wmi_handle->ops->send_rtt_keepalive_req_cmd(wmi_handle, |
| 2925 | param); |
| 2926 | |
| 2927 | return QDF_STATUS_E_FAILURE; |
| 2928 | } |
| 2929 | |
| 2930 | /** |
| 2931 | * wmi_unified_send_periodic_chan_stats_config_cmd() - send periodic chan stats cmd |
| 2932 | * to fw |
| 2933 | * @wmi_handle: wmi handle |
| 2934 | * @param: pointer to hold periodic chan stats param |
| 2935 | * |
| 2936 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2937 | */ |
| 2938 | QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, |
| 2939 | struct periodic_chan_stats_params *param) |
| 2940 | { |
| 2941 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2942 | |
| 2943 | if (wmi->ops->send_periodic_chan_stats_config_cmd) |
| 2944 | return wmi->ops->send_periodic_chan_stats_config_cmd(wmi, |
| 2945 | param); |
| 2946 | |
| 2947 | return QDF_STATUS_E_FAILURE; |
| 2948 | } |
| 2949 | |
Jeffin Mammen | 095050b | 2018-07-24 14:20:08 +0530 | [diff] [blame] | 2950 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 2951 | * wmi_send_get_user_position_cmd() - send get user position command to fw |
| 2952 | * @wmi_handle: wmi handle |
| 2953 | * |
| 2954 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2955 | */ |
| 2956 | QDF_STATUS |
| 2957 | wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value) |
| 2958 | { |
| 2959 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 2960 | |
| 2961 | if (wmi_handle->ops->send_get_user_position_cmd) |
| 2962 | return wmi_handle->ops->send_get_user_position_cmd(wmi_handle, |
| 2963 | value); |
| 2964 | |
| 2965 | return QDF_STATUS_E_FAILURE; |
| 2966 | } |
| 2967 | |
| 2968 | /** |
| 2969 | * 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] | 2970 | * command to fw |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 2971 | * @wmi_handle: wmi handle |
| 2972 | * @value: user pos value |
| 2973 | * |
| 2974 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2975 | */ |
| 2976 | QDF_STATUS |
| 2977 | wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 2978 | { |
| 2979 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2980 | |
| 2981 | if (wmi->ops->send_get_peer_mumimo_tx_count_cmd) |
| 2982 | return wmi->ops->send_get_peer_mumimo_tx_count_cmd(wmi, value); |
| 2983 | |
| 2984 | return QDF_STATUS_E_FAILURE; |
| 2985 | } |
| 2986 | |
| 2987 | /** |
| 2988 | * wmi_send_reset_peer_mumimo_tx_count_cmd() - send reset peer mumimo |
Sathish Kumar | efb25bf | 2018-10-02 11:03:59 +0530 | [diff] [blame] | 2989 | * tx count to fw |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 2990 | * @wmi_handle: wmi handle |
| 2991 | * @value: reset tx count value |
| 2992 | * |
| 2993 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 2994 | */ |
| 2995 | QDF_STATUS |
| 2996 | wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value) |
| 2997 | { |
| 2998 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 2999 | |
| 3000 | if (wmi->ops->send_reset_peer_mumimo_tx_count_cmd) |
| 3001 | return wmi->ops->send_reset_peer_mumimo_tx_count_cmd(wmi, |
| 3002 | value); |
| 3003 | |
| 3004 | return QDF_STATUS_E_FAILURE; |
| 3005 | } |
| 3006 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3007 | /* Extract - APIs */ |
| 3008 | /** |
Alok Singh | 0243e7d | 2018-09-20 16:07:28 +0530 | [diff] [blame] | 3009 | * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl data |
| 3010 | * from event |
| 3011 | * @wmi_handle: wmi handle |
| 3012 | * @param evt_buf: pointer to event buffer |
| 3013 | * @param param: Pointer to hold ctl data |
| 3014 | * |
| 3015 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3016 | */ |
| 3017 | QDF_STATUS |
| 3018 | wmi_extract_ctl_failsafe_check_ev_param(void *wmi_hdl, |
| 3019 | void *evt_buf, |
| 3020 | struct wmi_host_pdev_ctl_failsafe_event |
| 3021 | *param) |
| 3022 | { |
| 3023 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 3024 | |
| 3025 | if (wmi->ops->extract_ctl_failsafe_check_ev_param) |
| 3026 | return wmi->ops->extract_ctl_failsafe_check_ev_param( |
| 3027 | wmi, evt_buf, param); |
| 3028 | |
| 3029 | return QDF_STATUS_E_FAILURE; |
| 3030 | } |
| 3031 | |
| 3032 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3033 | * wmi_extract_fips_event_data() - extract fips event data |
| 3034 | * @wmi_handle: wmi handle |
| 3035 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 3036 | * @param param: pointer to FIPS event param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3037 | * |
| 3038 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3039 | */ |
| 3040 | 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] | 3041 | struct wmi_host_fips_event_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3042 | { |
| 3043 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3044 | |
| 3045 | if (wmi_handle->ops->extract_fips_event_data) { |
| 3046 | return wmi_handle->ops->extract_fips_event_data(wmi_handle, |
Kiran Venkatappa | c813ec9 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 3047 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3048 | } |
| 3049 | return QDF_STATUS_E_FAILURE; |
| 3050 | } |
| 3051 | |
| 3052 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3053 | * wmi_extract_mgmt_rx_params() - extract management rx params from event |
| 3054 | * @wmi_handle: wmi handle |
| 3055 | * @param evt_buf: pointer to event buffer |
| 3056 | * @param hdr: Pointer to hold header |
| 3057 | * @param bufp: Pointer to hold pointer to rx param buffer |
| 3058 | * |
| 3059 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3060 | */ |
| 3061 | 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] | 3062 | struct mgmt_rx_event_params *hdr, uint8_t **bufp) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3063 | { |
| 3064 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3065 | |
| 3066 | if (wmi_handle->ops->extract_mgmt_rx_params) |
| 3067 | return wmi_handle->ops->extract_mgmt_rx_params(wmi_handle, |
| 3068 | evt_buf, hdr, bufp); |
| 3069 | |
| 3070 | return QDF_STATUS_E_FAILURE; |
| 3071 | } |
| 3072 | |
| 3073 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3074 | * wmi_extract_vdev_roam_param() - extract vdev roam param from event |
| 3075 | * @wmi_handle: wmi handle |
| 3076 | * @param evt_buf: pointer to event buffer |
| 3077 | * @param param: Pointer to hold roam param |
| 3078 | * |
| 3079 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3080 | */ |
| 3081 | QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, |
| 3082 | wmi_host_roam_event *param) |
| 3083 | { |
| 3084 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3085 | |
| 3086 | if (wmi_handle->ops->extract_vdev_roam_param) |
| 3087 | return wmi_handle->ops->extract_vdev_roam_param(wmi_handle, |
| 3088 | evt_buf, param); |
| 3089 | |
| 3090 | return QDF_STATUS_E_FAILURE; |
| 3091 | } |
| 3092 | |
| 3093 | /** |
| 3094 | * wmi_extract_vdev_scan_ev_param() - extract vdev scan param from event |
| 3095 | * @wmi_handle: wmi handle |
| 3096 | * @param evt_buf: pointer to event buffer |
| 3097 | * @param param: Pointer to hold vdev scan param |
| 3098 | * |
| 3099 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3100 | */ |
| 3101 | 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] | 3102 | struct scan_event *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3103 | { |
| 3104 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3105 | |
| 3106 | if (wmi_handle->ops->extract_vdev_scan_ev_param) |
| 3107 | return wmi_handle->ops->extract_vdev_scan_ev_param(wmi_handle, |
| 3108 | evt_buf, param); |
| 3109 | |
| 3110 | return QDF_STATUS_E_FAILURE; |
| 3111 | } |
| 3112 | |
| 3113 | /** |
| 3114 | * wmi_extract_mu_ev_param() - extract mu param from event |
| 3115 | * @wmi_handle: wmi handle |
| 3116 | * @param evt_buf: pointer to event buffer |
| 3117 | * @param param: Pointer to hold mu report |
| 3118 | * |
| 3119 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3120 | */ |
| 3121 | QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, |
| 3122 | wmi_host_mu_report_event *param) |
| 3123 | { |
| 3124 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3125 | |
| 3126 | if (wmi_handle->ops->extract_mu_ev_param) |
| 3127 | return wmi_handle->ops->extract_mu_ev_param(wmi_handle, evt_buf, |
| 3128 | param); |
| 3129 | |
| 3130 | return QDF_STATUS_E_FAILURE; |
| 3131 | } |
| 3132 | |
| 3133 | /** |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 3134 | * wmi_extract_mu_db_entry() - extract mu db entry from event |
| 3135 | * @wmi_handle: wmi handle |
| 3136 | * @param evt_buf: pointer to event buffer |
| 3137 | * @param param: Pointer to hold mu db entry |
| 3138 | * |
| 3139 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3140 | */ |
| 3141 | QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, |
| 3142 | uint8_t idx, wmi_host_mu_db_entry *param) |
| 3143 | { |
| 3144 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3145 | |
| 3146 | if (wmi_handle->ops->extract_mu_db_entry) |
| 3147 | return wmi_handle->ops->extract_mu_db_entry(wmi_handle, evt_buf, |
| 3148 | idx, param); |
| 3149 | |
| 3150 | return QDF_STATUS_E_FAILURE; |
| 3151 | } |
| 3152 | |
| 3153 | /** |
| 3154 | * wmi_extract_mumimo_tx_count_ev_param() - extract mumimo tx count from event |
| 3155 | * @wmi_handle: wmi handle |
| 3156 | * @param evt_buf: pointer to event buffer |
| 3157 | * @param param: Pointer to hold mumimo tx count |
| 3158 | * |
| 3159 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3160 | */ |
| 3161 | QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, |
| 3162 | wmi_host_peer_txmu_cnt_event *param) |
| 3163 | { |
| 3164 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3165 | |
| 3166 | if (wmi->ops->extract_mumimo_tx_count_ev_param) |
| 3167 | return wmi->ops->extract_mumimo_tx_count_ev_param(wmi, |
| 3168 | evt_buf, param); |
| 3169 | |
| 3170 | return QDF_STATUS_E_FAILURE; |
| 3171 | } |
| 3172 | |
| 3173 | /** |
| 3174 | * wmi_extract_peer_gid_userpos_list_ev_param() - extract peer userpos list |
Sathish Kumar | efb25bf | 2018-10-02 11:03:59 +0530 | [diff] [blame] | 3175 | * from event |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 3176 | * @wmi_handle: wmi handle |
| 3177 | * @param evt_buf: pointer to event buffer |
| 3178 | * @param param: Pointer to hold peer gid userposition list |
| 3179 | * |
| 3180 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3181 | */ |
| 3182 | QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, |
| 3183 | void *evt_buf, |
| 3184 | wmi_host_peer_gid_userpos_list_event *param) |
| 3185 | { |
| 3186 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3187 | |
| 3188 | if (wmi->ops->extract_peer_gid_userpos_list_ev_param) |
| 3189 | return wmi->ops->extract_peer_gid_userpos_list_ev_param(wmi, |
| 3190 | evt_buf, param); |
| 3191 | |
| 3192 | return QDF_STATUS_E_FAILURE; |
| 3193 | } |
| 3194 | |
| 3195 | /** |
Anirban Sirkhell | 23467ce | 2017-08-25 16:01:50 +0530 | [diff] [blame] | 3196 | * wmi_extract_esp_estimate_ev_param() - extract air time from event |
| 3197 | * @wmi_handle: wmi handle |
| 3198 | * @evt_buf: pointer to event buffer |
| 3199 | * @param: Pointer to hold esp event |
| 3200 | * |
| 3201 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3202 | */ |
| 3203 | QDF_STATUS |
| 3204 | wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf, |
| 3205 | struct esp_estimation_event *param) |
| 3206 | { |
| 3207 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 3208 | |
| 3209 | if (wmi_handle->ops->extract_esp_estimation_ev_param) |
| 3210 | return wmi_handle->ops->extract_esp_estimation_ev_param( |
| 3211 | wmi_handle, evt_buf, param); |
| 3212 | |
| 3213 | return QDF_STATUS_E_FAILURE; |
| 3214 | } |
| 3215 | |
| 3216 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3217 | * wmi_extract_gpio_input_ev_param() - extract gpio input param from event |
| 3218 | * @wmi_handle: wmi handle |
| 3219 | * @param evt_buf: pointer to event buffer |
| 3220 | * @param gpio_num: Pointer to hold gpio number |
| 3221 | * |
| 3222 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3223 | */ |
| 3224 | QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, |
| 3225 | void *evt_buf, uint32_t *gpio_num) |
| 3226 | { |
| 3227 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3228 | |
| 3229 | if (wmi_handle->ops->extract_gpio_input_ev_param) |
| 3230 | return wmi_handle->ops->extract_gpio_input_ev_param(wmi_handle, |
| 3231 | evt_buf, gpio_num); |
| 3232 | |
| 3233 | return QDF_STATUS_E_FAILURE; |
| 3234 | } |
| 3235 | |
| 3236 | /** |
| 3237 | * wmi_extract_pdev_reserve_ast_ev_param() - extract reserve ast entry |
| 3238 | * param from event |
| 3239 | * @wmi_handle: wmi handle |
| 3240 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 3241 | * @param param: Pointer to hold reserve ast entry param |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3242 | * |
| 3243 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3244 | */ |
| 3245 | QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 3246 | void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3247 | { |
| 3248 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3249 | |
| 3250 | if (wmi->ops->extract_pdev_reserve_ast_ev_param) |
| 3251 | return wmi->ops->extract_pdev_reserve_ast_ev_param(wmi, |
Kiran Venkatappa | 5050aa8 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 3252 | evt_buf, param); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3253 | |
| 3254 | return QDF_STATUS_E_FAILURE; |
| 3255 | } |
| 3256 | |
| 3257 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3258 | * wmi_extract_pdev_generic_buffer_ev_param() - extract pdev generic buffer |
| 3259 | * from event |
| 3260 | * @wmi_handle: wmi handle |
| 3261 | * @param evt_buf: pointer to event buffer |
| 3262 | * @param param: Pointer to generic buffer param |
| 3263 | * |
| 3264 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3265 | */ |
| 3266 | QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, |
| 3267 | void *evt_buf, wmi_host_pdev_generic_buffer_event *param) |
| 3268 | { |
| 3269 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3270 | |
| 3271 | if (wmi->ops->extract_pdev_generic_buffer_ev_param) |
| 3272 | return wmi->ops->extract_pdev_generic_buffer_ev_param(wmi, |
| 3273 | evt_buf, param); |
| 3274 | |
| 3275 | return QDF_STATUS_E_FAILURE; |
| 3276 | |
| 3277 | } |
| 3278 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3279 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3280 | * wmi_extract_peer_ratecode_list_ev() - extract peer ratecode from event |
| 3281 | * @wmi_handle: wmi handle |
| 3282 | * @param evt_buf: pointer to event buffer |
| 3283 | * @param peer_mac: Pointer to hold peer mac address |
| 3284 | * @param rate_cap: Pointer to hold ratecode |
| 3285 | * |
| 3286 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3287 | */ |
| 3288 | QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, |
| 3289 | uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap) |
| 3290 | { |
| 3291 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3292 | |
| 3293 | if (wmi->ops->extract_peer_ratecode_list_ev) |
| 3294 | return wmi->ops->extract_peer_ratecode_list_ev(wmi, |
| 3295 | evt_buf, peer_mac, rate_cap); |
| 3296 | |
| 3297 | return QDF_STATUS_E_FAILURE; |
| 3298 | |
| 3299 | } |
| 3300 | |
| 3301 | /** |
| 3302 | * wmi_extract_comb_phyerr() - extract comb phy error from event |
| 3303 | * @wmi_handle: wmi handle |
| 3304 | * @param evt_buf: pointer to event buffer |
| 3305 | * @param datalen: data length of event buffer |
| 3306 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 3307 | * post extraction |
| 3308 | * @param phyer: Pointer to hold phyerr |
| 3309 | * |
| 3310 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3311 | */ |
| 3312 | QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, |
| 3313 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 3314 | { |
| 3315 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3316 | |
| 3317 | if (wmi_handle->ops->extract_comb_phyerr) |
| 3318 | return wmi_handle->ops->extract_comb_phyerr(wmi_handle, |
| 3319 | evt_buf, datalen, buf_offset, phyerr); |
| 3320 | |
| 3321 | return QDF_STATUS_E_FAILURE; |
| 3322 | |
| 3323 | } |
| 3324 | |
| 3325 | /** |
| 3326 | * wmi_extract_single_phyerr() - extract single phy error from event |
| 3327 | * @wmi_handle: wmi handle |
| 3328 | * @param evt_buf: pointer to event buffer |
| 3329 | * @param datalen: data length of event buffer |
| 3330 | * @param buf_offset: Pointer to hold value of current event buffer offset |
| 3331 | * post extraction |
| 3332 | * @param phyerr: Pointer to hold phyerr |
| 3333 | * |
| 3334 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3335 | */ |
| 3336 | QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, |
| 3337 | uint16_t datalen, uint16_t *buf_offset, wmi_host_phyerr_t *phyerr) |
| 3338 | { |
| 3339 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3340 | |
| 3341 | if (wmi_handle->ops->extract_single_phyerr) |
| 3342 | return wmi_handle->ops->extract_single_phyerr(wmi_handle, |
| 3343 | evt_buf, datalen, buf_offset, phyerr); |
| 3344 | |
| 3345 | return QDF_STATUS_E_FAILURE; |
| 3346 | |
| 3347 | } |
| 3348 | |
| 3349 | /** |
| 3350 | * wmi_extract_composite_phyerr() - extract composite phy error from event |
| 3351 | * @wmi_handle: wmi handle |
| 3352 | * @param evt_buf: pointer to event buffer |
| 3353 | * @param datalen: Length of event buffer |
| 3354 | * @param phyerr: Pointer to hold phy error |
| 3355 | * |
| 3356 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3357 | */ |
| 3358 | QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, |
| 3359 | uint16_t datalen, wmi_host_phyerr_t *phyerr) |
| 3360 | { |
| 3361 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3362 | |
| 3363 | if (wmi_handle->ops->extract_composite_phyerr) |
| 3364 | return wmi_handle->ops->extract_composite_phyerr(wmi_handle, |
| 3365 | evt_buf, datalen, phyerr); |
| 3366 | |
| 3367 | return QDF_STATUS_E_FAILURE; |
| 3368 | |
| 3369 | } |
| 3370 | |
| 3371 | /** |
| 3372 | * wmi_extract_stats_param() - extract all stats count from event |
| 3373 | * @wmi_handle: wmi handle |
| 3374 | * @param evt_buf: pointer to event buffer |
| 3375 | * @param stats_param: Pointer to hold stats count |
| 3376 | * |
| 3377 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3378 | */ |
| 3379 | QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, |
| 3380 | wmi_host_stats_event *stats_param) |
| 3381 | { |
| 3382 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3383 | |
| 3384 | if (wmi_handle->ops->extract_all_stats_count) |
| 3385 | return wmi_handle->ops->extract_all_stats_count(wmi_handle, |
| 3386 | evt_buf, stats_param); |
| 3387 | |
| 3388 | return QDF_STATUS_E_FAILURE; |
| 3389 | } |
| 3390 | |
| 3391 | /** |
| 3392 | * wmi_extract_pdev_stats() - extract pdev stats from event |
| 3393 | * @wmi_handle: wmi handle |
| 3394 | * @param evt_buf: pointer to event buffer |
| 3395 | * @param index: Index into pdev stats |
| 3396 | * @param pdev_stats: Pointer to hold pdev stats |
| 3397 | * |
| 3398 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3399 | */ |
| 3400 | QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, |
| 3401 | uint32_t index, wmi_host_pdev_stats *pdev_stats) |
| 3402 | { |
| 3403 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3404 | |
| 3405 | if (wmi_handle->ops->extract_pdev_stats) |
| 3406 | return wmi_handle->ops->extract_pdev_stats(wmi_handle, |
| 3407 | evt_buf, index, pdev_stats); |
| 3408 | |
| 3409 | return QDF_STATUS_E_FAILURE; |
| 3410 | } |
| 3411 | |
| 3412 | /** |
Adil Saeed Musthafa | d280596 | 2017-08-23 17:32:11 -0700 | [diff] [blame] | 3413 | * extract_unit_test() - extract unit test from event |
| 3414 | * @wmi_handle: wmi handle |
| 3415 | * @param evt_buf: pointer to event buffer |
| 3416 | * @param unit_test: Pointer to hold unit-test header |
| 3417 | * @param maxspace: The amount of space in evt_buf |
| 3418 | * |
| 3419 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3420 | */ |
| 3421 | QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, |
| 3422 | wmi_unit_test_event *unit_test, uint32_t maxspace) |
| 3423 | { |
| 3424 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3425 | |
| 3426 | if (wmi_handle->ops->extract_unit_test) |
| 3427 | return wmi_handle->ops->extract_unit_test(wmi_handle, |
| 3428 | evt_buf, unit_test, maxspace); |
| 3429 | |
| 3430 | return QDF_STATUS_E_FAILURE; |
| 3431 | } |
| 3432 | |
| 3433 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3434 | * wmi_extract_pdev_ext_stats() - extract extended pdev stats from event |
| 3435 | * @wmi_handle: wmi handle |
| 3436 | * @param evt_buf: pointer to event buffer |
| 3437 | * @param index: Index into extended pdev stats |
| 3438 | * @param pdev_ext_stats: Pointer to hold extended pdev stats |
| 3439 | * |
| 3440 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3441 | */ |
| 3442 | QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, |
| 3443 | uint32_t index, wmi_host_pdev_ext_stats *pdev_ext_stats) |
| 3444 | { |
| 3445 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3446 | |
| 3447 | if (wmi_handle->ops->extract_pdev_ext_stats) |
| 3448 | return wmi_handle->ops->extract_pdev_ext_stats(wmi_handle, |
| 3449 | evt_buf, index, pdev_ext_stats); |
| 3450 | |
| 3451 | return QDF_STATUS_E_FAILURE; |
| 3452 | } |
| 3453 | |
| 3454 | /** |
| 3455 | * wmi_extract_peer_stats() - extract peer stats from event |
| 3456 | * @wmi_handle: wmi handle |
| 3457 | * @param evt_buf: pointer to event buffer |
| 3458 | * @param index: Index into peer stats |
| 3459 | * @param peer_stats: Pointer to hold peer stats |
| 3460 | * |
| 3461 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3462 | */ |
| 3463 | QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, |
| 3464 | uint32_t index, wmi_host_peer_stats *peer_stats) |
| 3465 | { |
| 3466 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3467 | |
| 3468 | if (wmi_handle->ops->extract_peer_stats) |
| 3469 | return wmi_handle->ops->extract_peer_stats(wmi_handle, |
| 3470 | evt_buf, index, peer_stats); |
| 3471 | |
| 3472 | return QDF_STATUS_E_FAILURE; |
| 3473 | } |
| 3474 | |
| 3475 | /** |
| 3476 | * wmi_extract_vdev_stats() - extract vdev stats from event |
| 3477 | * @wmi_handle: wmi handle |
| 3478 | * @param evt_buf: pointer to event buffer |
| 3479 | * @param index: Index into vdev stats |
| 3480 | * @param vdev_stats: Pointer to hold vdev stats |
| 3481 | * |
| 3482 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3483 | */ |
| 3484 | QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, |
| 3485 | uint32_t index, wmi_host_vdev_stats *vdev_stats) |
| 3486 | { |
| 3487 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3488 | |
| 3489 | if (wmi_handle->ops->extract_vdev_stats) |
| 3490 | return wmi_handle->ops->extract_vdev_stats(wmi_handle, |
| 3491 | evt_buf, index, vdev_stats); |
| 3492 | |
| 3493 | return QDF_STATUS_E_FAILURE; |
| 3494 | } |
| 3495 | |
| 3496 | /** |
Naveen Rawat | d211572 | 2018-04-12 08:17:55 -0700 | [diff] [blame] | 3497 | * wmi_extract_per_chain_rssi_stats() - extract rssi stats from event |
| 3498 | * @wmi_handle: wmi handle |
| 3499 | * @param evt_buf: pointer to event buffer |
| 3500 | * @param index: Index into rssi stats |
| 3501 | * @param rssi_stats: Pointer to hold rssi stats |
| 3502 | * |
| 3503 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3504 | */ |
| 3505 | QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 3506 | uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats) |
| 3507 | { |
| 3508 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3509 | |
| 3510 | if (wmi_handle->ops->extract_per_chain_rssi_stats) |
| 3511 | return wmi_handle->ops->extract_per_chain_rssi_stats(wmi_handle, |
| 3512 | evt_buf, index, rssi_stats); |
| 3513 | |
| 3514 | return QDF_STATUS_E_FAILURE; |
| 3515 | } |
| 3516 | |
| 3517 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3518 | * wmi_extract_rtt_hdr() - extract rtt header from event |
| 3519 | * @wmi_handle: wmi handle |
| 3520 | * @param evt_buf: pointer to event buffer |
| 3521 | * @param ev: Pointer to hold rtt header |
| 3522 | * |
| 3523 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3524 | */ |
| 3525 | QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, |
| 3526 | wmi_host_rtt_event_hdr *ev) |
| 3527 | { |
| 3528 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3529 | |
| 3530 | if (wmi_handle->ops->extract_rtt_hdr) |
| 3531 | return wmi_handle->ops->extract_rtt_hdr(wmi_handle, |
| 3532 | evt_buf, ev); |
| 3533 | |
| 3534 | return QDF_STATUS_E_FAILURE; |
| 3535 | } |
| 3536 | |
| 3537 | /** |
| 3538 | * wmi_extract_bcnflt_stats() - extract bcn fault stats from event |
| 3539 | * @wmi_handle: wmi handle |
| 3540 | * @param evt_buf: pointer to event buffer |
| 3541 | * @param index: Index into bcn fault stats |
| 3542 | * @param bcnflt_stats: Pointer to hold bcn fault stats |
| 3543 | * |
| 3544 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3545 | */ |
| 3546 | QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, |
| 3547 | uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats) |
| 3548 | { |
| 3549 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3550 | |
| 3551 | if (wmi_handle->ops->extract_bcnflt_stats) |
| 3552 | return wmi_handle->ops->extract_bcnflt_stats(wmi_handle, |
| 3553 | evt_buf, index, bcnflt_stats); |
| 3554 | |
| 3555 | return QDF_STATUS_E_FAILURE; |
| 3556 | } |
| 3557 | |
| 3558 | /** |
| 3559 | * wmi_extract_rtt_ev() - extract rtt event |
| 3560 | * @wmi_handle: wmi handle |
| 3561 | * @param evt_buf: Pointer to event buffer |
| 3562 | * @param ev: Pointer to hold rtt event |
| 3563 | * @param hdump: Pointer to hold hex dump |
| 3564 | * @param hdump_len: hex dump length |
| 3565 | * |
| 3566 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3567 | */ |
| 3568 | QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, |
| 3569 | wmi_host_rtt_meas_event *ev, uint8_t *hdump, uint16_t hdump_len) |
| 3570 | { |
| 3571 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3572 | |
| 3573 | if (wmi_handle->ops->extract_rtt_ev) |
| 3574 | return wmi_handle->ops->extract_rtt_ev(wmi_handle, |
| 3575 | evt_buf, ev, hdump, hdump_len); |
| 3576 | |
| 3577 | return QDF_STATUS_E_FAILURE; |
| 3578 | } |
| 3579 | |
| 3580 | /** |
| 3581 | * wmi_extract_peer_extd_stats() - extract extended peer stats from event |
| 3582 | * @wmi_handle: wmi handle |
| 3583 | * @param evt_buf: pointer to event buffer |
| 3584 | * @param index: Index into extended peer stats |
| 3585 | * @param peer_extd_stats: Pointer to hold extended peer stats |
| 3586 | * |
| 3587 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3588 | */ |
| 3589 | QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, |
| 3590 | uint32_t index, wmi_host_peer_extd_stats *peer_extd_stats) |
| 3591 | { |
| 3592 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3593 | |
| 3594 | if (wmi_handle->ops->extract_peer_extd_stats) |
| 3595 | return wmi_handle->ops->extract_peer_extd_stats(wmi_handle, |
| 3596 | evt_buf, index, peer_extd_stats); |
| 3597 | |
| 3598 | return QDF_STATUS_E_FAILURE; |
| 3599 | } |
| 3600 | |
Uraj Sasan | 78b6ac9 | 2018-09-20 09:39:49 +0530 | [diff] [blame] | 3601 | QDF_STATUS wmi_extract_peer_retry_stats(void *wmi_hdl, void *evt_buf, |
| 3602 | uint32_t index, struct wmi_host_peer_retry_stats *peer_retry_stats) |
| 3603 | { |
| 3604 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 3605 | |
| 3606 | if (wmi_handle->ops->extract_peer_retry_stats) |
| 3607 | return wmi_handle->ops->extract_peer_retry_stats(wmi_handle, |
| 3608 | evt_buf, index, peer_retry_stats); |
| 3609 | |
| 3610 | return QDF_STATUS_E_FAILURE; |
| 3611 | } |
| 3612 | |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3613 | /** |
| 3614 | * wmi_extract_rtt_error_report_ev() - extract rtt error report from event |
| 3615 | * @wmi_handle: wmi handle |
| 3616 | * @param evt_buf: pointer to event buffer |
| 3617 | * @param wds_ev: Pointer to hold rtt error report |
| 3618 | * |
| 3619 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3620 | */ |
| 3621 | QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, |
| 3622 | wmi_host_rtt_error_report_event *ev) |
| 3623 | { |
| 3624 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3625 | |
| 3626 | if (wmi_handle->ops->extract_rtt_error_report_ev) |
| 3627 | return wmi_handle->ops->extract_rtt_error_report_ev(wmi_handle, |
| 3628 | evt_buf, ev); |
| 3629 | |
| 3630 | return QDF_STATUS_E_FAILURE; |
| 3631 | } |
| 3632 | |
| 3633 | /** |
| 3634 | * wmi_extract_chan_stats() - extract chan stats from event |
| 3635 | * @wmi_handle: wmi handle |
| 3636 | * @param evt_buf: pointer to event buffer |
| 3637 | * @param index: Index into chan stats |
| 3638 | * @param chanstats: Pointer to hold chan stats |
| 3639 | * |
| 3640 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3641 | */ |
| 3642 | QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, |
| 3643 | uint32_t index, wmi_host_chan_stats *chan_stats) |
| 3644 | { |
| 3645 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3646 | |
| 3647 | if (wmi_handle->ops->extract_chan_stats) |
| 3648 | return wmi_handle->ops->extract_chan_stats(wmi_handle, |
| 3649 | evt_buf, index, chan_stats); |
| 3650 | |
| 3651 | return QDF_STATUS_E_FAILURE; |
| 3652 | } |
| 3653 | |
| 3654 | /** |
| 3655 | * wmi_extract_thermal_stats() - extract thermal stats from event |
| 3656 | * @wmi_handle: wmi handle |
| 3657 | * @param evt_buf: Pointer to event buffer |
| 3658 | * @param temp: Pointer to hold extracted temperature |
| 3659 | * @param level: Pointer to hold extracted level |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 3660 | * @param pdev_id: Pointer to hold extracted pdev_id |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3661 | * |
| 3662 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3663 | */ |
| 3664 | 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] | 3665 | uint32_t *temp, uint32_t *level, uint32_t *pdev_id) |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3666 | { |
| 3667 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3668 | |
| 3669 | if (wmi_handle->ops->extract_thermal_stats) |
| 3670 | return wmi_handle->ops->extract_thermal_stats(wmi_handle, |
Om Prakash Tripathi | c569cdb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 3671 | evt_buf, temp, level, pdev_id); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3672 | |
| 3673 | return QDF_STATUS_E_FAILURE; |
| 3674 | } |
| 3675 | |
| 3676 | /** |
| 3677 | * wmi_extract_profile_ctx() - extract profile context from event |
| 3678 | * @wmi_handle: wmi handle |
| 3679 | * @param evt_buf: pointer to event buffer |
| 3680 | * @param profile_ctx: Pointer to hold profile context |
| 3681 | * |
| 3682 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3683 | */ |
| 3684 | QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, |
| 3685 | wmi_host_wlan_profile_ctx_t *profile_ctx) |
| 3686 | { |
| 3687 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3688 | |
| 3689 | if (wmi_handle->ops->extract_profile_ctx) |
| 3690 | return wmi_handle->ops->extract_profile_ctx(wmi_handle, |
| 3691 | evt_buf, profile_ctx); |
| 3692 | |
| 3693 | return QDF_STATUS_E_FAILURE; |
| 3694 | } |
| 3695 | |
| 3696 | /** |
| 3697 | * wmi_extract_thermal_level_stats() - extract thermal level stats from |
| 3698 | * event |
| 3699 | * @wmi_handle: wmi handle |
| 3700 | * @param evt_buf: pointer to event buffer |
| 3701 | * @param idx: Index to level stats |
| 3702 | * @param levelcount: Pointer to hold levelcount |
| 3703 | * @param dccount: Pointer to hold dccount |
| 3704 | * |
| 3705 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3706 | */ |
| 3707 | QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, |
| 3708 | uint8_t idx, uint32_t *levelcount, uint32_t *dccount) |
| 3709 | { |
| 3710 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3711 | |
| 3712 | if (wmi_handle->ops->extract_thermal_level_stats) |
| 3713 | return wmi_handle->ops->extract_thermal_level_stats(wmi_handle, |
| 3714 | evt_buf, idx, levelcount, dccount); |
| 3715 | |
| 3716 | return QDF_STATUS_E_FAILURE; |
| 3717 | } |
| 3718 | |
| 3719 | /** |
| 3720 | * wmi_extract_profile_data() - extract profile data from event |
| 3721 | * @wmi_handle: wmi handle |
| 3722 | * @param evt_buf: pointer to event buffer |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 3723 | * @idx index: index of profile data |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3724 | * @param profile_data: Pointer to hold profile data |
| 3725 | * |
| 3726 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3727 | */ |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 3728 | 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] | 3729 | wmi_host_wlan_profile_t *profile_data) |
| 3730 | { |
| 3731 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3732 | |
| 3733 | if (wmi_handle->ops->extract_profile_data) |
| 3734 | return wmi_handle->ops->extract_profile_data(wmi_handle, |
Govind Singh | fdb1bb3 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 3735 | evt_buf, idx, profile_data); |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3736 | |
| 3737 | return QDF_STATUS_E_FAILURE; |
| 3738 | } |
| 3739 | |
| 3740 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3741 | * wmi_extract_bss_chan_info_event() - extract bss channel information |
| 3742 | * from event |
| 3743 | * @wmi_handle: wmi handle |
| 3744 | * @param evt_buf: pointer to event buffer |
| 3745 | * @param bss_chan_info: Pointer to hold bss channel information |
| 3746 | * |
| 3747 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3748 | */ |
| 3749 | QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 3750 | wmi_host_pdev_bss_chan_info_event *bss_chan_info) |
| 3751 | { |
| 3752 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3753 | |
| 3754 | if (wmi_handle->ops->extract_bss_chan_info_event) |
| 3755 | return wmi_handle->ops->extract_bss_chan_info_event(wmi_handle, |
| 3756 | evt_buf, bss_chan_info); |
| 3757 | |
| 3758 | return QDF_STATUS_E_FAILURE; |
| 3759 | } |
| 3760 | |
| 3761 | /** |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3762 | * wmi_extract_tx_data_traffic_ctrl_ev() - extract tx data traffic control |
| 3763 | * from event |
| 3764 | * @wmi_handle: wmi handle |
| 3765 | * @param evt_buf: pointer to event buffer |
Govind Singh | e7d9f3e | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 3766 | * @param ev: Pointer to hold data traffic control |
| 3767 | * |
| 3768 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3769 | */ |
| 3770 | QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, |
| 3771 | wmi_host_tx_data_traffic_ctrl_event *ev) |
| 3772 | { |
| 3773 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3774 | |
| 3775 | if (wmi->ops->extract_tx_data_traffic_ctrl_ev) |
| 3776 | return wmi->ops->extract_tx_data_traffic_ctrl_ev(wmi, |
| 3777 | evt_buf, ev); |
| 3778 | |
| 3779 | return QDF_STATUS_E_FAILURE; |
| 3780 | } |
| 3781 | |
| 3782 | /** |
| 3783 | * wmi_extract_vdev_extd_stats() - extract extended vdev stats from event |
| 3784 | * @wmi_handle: wmi handle |
| 3785 | * @param evt_buf: pointer to event buffer |
| 3786 | * @param index: Index into extended vdev stats |
| 3787 | * @param vdev_extd_stats: Pointer to hold extended vdev stats |
| 3788 | * |
| 3789 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3790 | */ |
| 3791 | QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, |
| 3792 | uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats) |
| 3793 | { |
| 3794 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3795 | |
| 3796 | if (wmi_handle->ops->extract_vdev_extd_stats) |
| 3797 | return wmi_handle->ops->extract_vdev_extd_stats(wmi_handle, |
| 3798 | evt_buf, index, vdev_extd_stats); |
Gupta, Kapil | 2e68598 | 2016-04-25 19:14:19 +0530 | [diff] [blame] | 3799 | return QDF_STATUS_E_FAILURE; |
| 3800 | } |
| 3801 | |
| 3802 | /** |
Gurumoorthi Gnanasambandhan | b5fb836 | 2017-11-06 22:04:17 +0530 | [diff] [blame] | 3803 | * wmi_extract_bcn_stats() - extract beacon stats from event |
| 3804 | * @wmi_handle: wmi handle |
| 3805 | * @evt_buf: pointer to event buffer |
| 3806 | * @index: Index into beacon stats |
| 3807 | * @vdev_bcn_stats: Pointer to hold beacon stats |
| 3808 | * |
| 3809 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3810 | */ |
| 3811 | QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, |
| 3812 | uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats) |
| 3813 | { |
| 3814 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3815 | |
| 3816 | if (wmi_handle->ops->extract_bcn_stats) |
| 3817 | return wmi_handle->ops->extract_bcn_stats(wmi_handle, |
| 3818 | evt_buf, index, vdev_bcn_stats); |
| 3819 | return QDF_STATUS_E_FAILURE; |
| 3820 | } |
| 3821 | |
| 3822 | /** |
Chaithanya Garrepalli | 8a9c38d | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 3823 | * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event |
| 3824 | * @wmi_handle: wmi handle |
| 3825 | * @param evt_buf: pointer to event buffer |
| 3826 | * @param vdev_extd_stats: Pointer to hold nac rssi stats |
| 3827 | * |
| 3828 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 3829 | */ |
| 3830 | QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 3831 | struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats) |
| 3832 | { |
| 3833 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3834 | |
| 3835 | if (wmi_handle->ops->extract_vdev_nac_rssi_stats) |
| 3836 | return wmi_handle->ops->extract_vdev_nac_rssi_stats(wmi_handle, |
| 3837 | evt_buf, vdev_nac_rssi_stats); |
| 3838 | |
| 3839 | return QDF_STATUS_E_FAILURE; |
| 3840 | } |
| 3841 | |
| 3842 | /** |
Govind Singh | bca3b1b | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 3843 | * wmi_unified_send_power_dbg_cmd() - send power debug commands |
| 3844 | * @wmi_handle: wmi handle |
| 3845 | * @param: wmi power debug parameter |
| 3846 | * |
| 3847 | * Send WMI_POWER_DEBUG_CMDID parameters to fw. |
| 3848 | * |
| 3849 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 3850 | */ |
| 3851 | QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, |
| 3852 | struct wmi_power_dbg_params *param) |
| 3853 | { |
| 3854 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3855 | |
| 3856 | if (wmi_handle->ops->send_power_dbg_cmd) |
| 3857 | return wmi_handle->ops->send_power_dbg_cmd(wmi_handle, |
| 3858 | param); |
| 3859 | |
| 3860 | return QDF_STATUS_E_FAILURE; |
| 3861 | } |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 3862 | |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 3863 | /* |
| 3864 | * wmi_unified_send_btcoex_wlan_priority_cmd() - send btcoex priority commands |
| 3865 | * @wmi_handle: wmi handle |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 3866 | * @param : wmi btcoex cfg params |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 3867 | * |
| 3868 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 3869 | * |
| 3870 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 3871 | */ |
| 3872 | QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 3873 | struct btcoex_cfg_params *param) |
Sathish Kumar | 6878938 | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 3874 | { |
| 3875 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3876 | |
| 3877 | if (wmi->ops->send_btcoex_wlan_priority_cmd) |
| 3878 | return wmi->ops->send_btcoex_wlan_priority_cmd(wmi, |
Sathish Kumar | 699f6b5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 3879 | param); |
| 3880 | |
| 3881 | return QDF_STATUS_E_FAILURE; |
| 3882 | } |
| 3883 | /** |
| 3884 | * wmi_unified_send_btcoex_duty_cycle_cmd() - send btcoex duty cycle commands |
| 3885 | * @wmi_handle: wmi handle |
| 3886 | * @param: wmi btcoex cfg params |
| 3887 | * |
| 3888 | * Send WMI_BTCOEX_CFG_CMDID parameters to fw. |
| 3889 | * |
| 3890 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 3891 | */ |
| 3892 | QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, |
| 3893 | struct btcoex_cfg_params *param) |
| 3894 | { |
| 3895 | wmi_unified_t wmi = (wmi_unified_t) wmi_hdl; |
| 3896 | |
| 3897 | if (wmi->ops->send_btcoex_duty_cycle_cmd) |
| 3898 | return wmi->ops->send_btcoex_duty_cycle_cmd(wmi, |
| 3899 | param); |
Padma, Santhosh Kumar | 8394bae | 2016-09-11 18:24:59 +0530 | [diff] [blame] | 3900 | |
| 3901 | return QDF_STATUS_E_FAILURE; |
| 3902 | } |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3903 | |
| 3904 | /* |
| 3905 | * wmi_extract_service_ready_ext() - extract extended service ready |
| 3906 | * @wmi_handle: wmi handle |
| 3907 | * @param: wmi power debug parameter |
| 3908 | * |
| 3909 | * |
| 3910 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 3911 | */ |
| 3912 | 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] | 3913 | struct wlan_psoc_host_service_ext_param *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3914 | { |
| 3915 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3916 | |
| 3917 | if (wmi_handle->ops->extract_service_ready_ext) |
| 3918 | return wmi_handle->ops->extract_service_ready_ext(wmi_handle, |
| 3919 | evt_buf, param); |
| 3920 | |
| 3921 | return QDF_STATUS_E_FAILURE; |
| 3922 | } |
| 3923 | |
| 3924 | /** |
Kabilan Kannan | 0d0f935 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 3925 | * wmi_extract_sar_cap_service_ready_ext() - |
| 3926 | * extract sar cap from service ready event |
| 3927 | * @wmi_handle: wmi handle |
| 3928 | * @evt_buf: pointer to event buffer |
| 3929 | * @ext_param: extended target info |
| 3930 | * |
| 3931 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 3932 | */ |
| 3933 | QDF_STATUS wmi_extract_sar_cap_service_ready_ext( |
| 3934 | void *wmi_hdl, |
| 3935 | uint8_t *evt_buf, |
| 3936 | struct wlan_psoc_host_service_ext_param *ext_param) |
| 3937 | { |
| 3938 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3939 | |
| 3940 | if (wmi_handle->ops->extract_sar_cap_service_ready_ext) |
| 3941 | return wmi_handle->ops->extract_sar_cap_service_ready_ext( |
| 3942 | wmi_handle, |
| 3943 | evt_buf, ext_param); |
| 3944 | |
| 3945 | return QDF_STATUS_E_FAILURE; |
| 3946 | } |
| 3947 | |
| 3948 | /** |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3949 | * wmi_extract_hw_mode_cap_service_ready_ext() - |
| 3950 | * extract HW mode cap from service ready event |
| 3951 | * @wmi_handle: wmi handle |
| 3952 | * @param evt_buf: pointer to event buffer |
| 3953 | * @param param: Pointer to hold evt buf |
| 3954 | * @param hw_mode_idx: hw mode idx should be less than num_mode |
| 3955 | * |
| 3956 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 3957 | */ |
| 3958 | QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( |
| 3959 | void *wmi_hdl, |
| 3960 | uint8_t *evt_buf, uint8_t hw_mode_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 3961 | struct wlan_psoc_host_hw_mode_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3962 | { |
| 3963 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3964 | |
| 3965 | if (wmi_handle->ops->extract_hw_mode_cap_service_ready_ext) |
| 3966 | return wmi_handle->ops->extract_hw_mode_cap_service_ready_ext( |
| 3967 | wmi_handle, |
| 3968 | evt_buf, hw_mode_idx, param); |
| 3969 | |
| 3970 | return QDF_STATUS_E_FAILURE; |
| 3971 | } |
| 3972 | /** |
| 3973 | * wmi_extract_mac_phy_cap_service_ready_ext() - |
| 3974 | * extract MAC phy cap from service ready event |
| 3975 | * @wmi_handle: wmi handle |
| 3976 | * @param evt_buf: pointer to event buffer |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 3977 | * @param hw_mode_id: hw mode id of hw_mode_caps |
| 3978 | * @param phy_id: phy_id within hw_mode_cap |
| 3979 | * @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] | 3980 | * |
| 3981 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 3982 | */ |
| 3983 | QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( |
| 3984 | void *wmi_hdl, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 3985 | uint8_t *evt_buf, |
| 3986 | uint8_t hw_mode_id, |
| 3987 | uint8_t phy_id, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 3988 | struct wlan_psoc_host_mac_phy_caps *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3989 | { |
| 3990 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 3991 | |
| 3992 | if (wmi_handle->ops->extract_mac_phy_cap_service_ready_ext) |
| 3993 | return wmi_handle->ops->extract_mac_phy_cap_service_ready_ext( |
| 3994 | wmi_handle, |
Kiran Venkatappa | 2b1b0d2 | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 3995 | evt_buf, hw_mode_id, phy_id, param); |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 3996 | |
| 3997 | return QDF_STATUS_E_FAILURE; |
| 3998 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 3999 | |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 4000 | /** |
| 4001 | * wmi_extract_reg_cap_service_ready_ext() - |
| 4002 | * extract REG cap from service ready event |
| 4003 | * @wmi_handle: wmi handle |
| 4004 | * @param evt_buf: pointer to event buffer |
| 4005 | * @param param: Pointer to hold evt buf |
| 4006 | * @param phy_idx: phy idx should be less than num_mode |
| 4007 | * |
| 4008 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 4009 | */ |
| 4010 | QDF_STATUS wmi_extract_reg_cap_service_ready_ext( |
| 4011 | void *wmi_hdl, |
| 4012 | uint8_t *evt_buf, uint8_t phy_idx, |
Rajeev Kumar | 037799b | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 4013 | struct wlan_psoc_host_hal_reg_capabilities_ext *param) |
Kiran Venkatappa | 0652082 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 4014 | { |
| 4015 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4016 | |
| 4017 | if (wmi_handle->ops->extract_reg_cap_service_ready_ext) |
| 4018 | return wmi_handle->ops->extract_reg_cap_service_ready_ext( |
| 4019 | wmi_handle, |
| 4020 | evt_buf, phy_idx, param); |
| 4021 | |
| 4022 | return QDF_STATUS_E_FAILURE; |
| 4023 | } |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 4024 | |
Sathish Kumar | f396c72 | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 4025 | QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( |
| 4026 | void *wmi_hdl, |
| 4027 | uint8_t *evt_buf, uint8_t idx, |
| 4028 | struct wlan_psoc_host_dbr_ring_caps *param) |
| 4029 | { |
| 4030 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4031 | |
| 4032 | if (wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext) |
| 4033 | return wmi_handle->ops->extract_dbr_ring_cap_service_ready_ext( |
| 4034 | wmi_handle, |
| 4035 | evt_buf, idx, param); |
| 4036 | |
| 4037 | return QDF_STATUS_E_FAILURE; |
| 4038 | } |
| 4039 | |
Sathish Kumar | 27ee0a3 | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 4040 | /** |
| 4041 | * wmi_extract_pdev_utf_event() - |
| 4042 | * extract UTF data from pdev utf event |
| 4043 | * @wmi_handle: wmi handle |
| 4044 | * @param evt_buf: pointer to event buffer |
| 4045 | * @param param: Pointer to hold evt buf |
| 4046 | * |
| 4047 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 4048 | */ |
| 4049 | QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, |
| 4050 | uint8_t *evt_buf, |
| 4051 | struct wmi_host_pdev_utf_event *param) |
| 4052 | { |
| 4053 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4054 | |
| 4055 | if (wmi_handle->ops->extract_pdev_utf_event) |
| 4056 | return wmi_handle->ops->extract_pdev_utf_event( |
| 4057 | wmi_handle, |
| 4058 | evt_buf, param); |
| 4059 | |
| 4060 | return QDF_STATUS_E_FAILURE; |
| 4061 | } |
Vijay Pamidipati | d814b8d | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 4062 | |
| 4063 | /** |
Kiran Venkatappa | 316357d | 2017-02-28 14:19:17 +0530 | [diff] [blame] | 4064 | * wmi_extract_pdev_qvit_event() - |
| 4065 | * extract UTF data from pdev qvit event |
| 4066 | * @wmi_handle: wmi handle |
| 4067 | * @param evt_buf: pointer to event buffer |
| 4068 | * @param param: Pointer to hold evt buf |
| 4069 | * |
| 4070 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 4071 | */ |
| 4072 | QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, |
| 4073 | uint8_t *evt_buf, |
| 4074 | struct wmi_host_pdev_qvit_event *param) |
| 4075 | { |
| 4076 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4077 | |
| 4078 | if (wmi_handle->ops->extract_pdev_qvit_event) |
| 4079 | return wmi_handle->ops->extract_pdev_qvit_event( |
| 4080 | wmi_handle, |
| 4081 | evt_buf, param); |
| 4082 | |
| 4083 | return QDF_STATUS_E_FAILURE; |
| 4084 | } |
| 4085 | |
| 4086 | /** |
Sathish Kumar | 58a9fb9 | 2017-01-19 14:57:37 +0530 | [diff] [blame] | 4087 | * wmi_unified_send_coex_ver_cfg_cmd() - send coex ver cfg command |
| 4088 | * @wmi_handle: wmi handle |
| 4089 | * @param: wmi coex ver cfg params |
| 4090 | * |
| 4091 | * Send WMI_COEX_VERSION_CFG_CMID parameters to fw. |
| 4092 | * |
| 4093 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 4094 | */ |
| 4095 | QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, |
| 4096 | coex_ver_cfg_t *param) |
| 4097 | { |
| 4098 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4099 | |
| 4100 | if (wmi_handle->ops->send_coex_ver_cfg_cmd) |
| 4101 | return wmi_handle->ops->send_coex_ver_cfg_cmd(wmi_handle, |
| 4102 | param); |
| 4103 | |
| 4104 | return QDF_STATUS_E_FAILURE; |
| 4105 | } |
| 4106 | |
| 4107 | /** |
Sathish Kumar | 80f4f38 | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 4108 | * wmi_unified_send_coex_config_cmd() - send coex ver cfg command |
| 4109 | * @wmi_handle: wmi handle |
| 4110 | * @param: wmi coex cfg cmd params |
| 4111 | * |
| 4112 | * Send WMI_COEX_CFG_CMD parameters to fw. |
| 4113 | * |
| 4114 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 4115 | */ |
| 4116 | QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, |
| 4117 | struct coex_config_params *param) |
| 4118 | { |
| 4119 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4120 | |
| 4121 | if (wmi_handle->ops->send_coex_config_cmd) |
| 4122 | return wmi_handle->ops->send_coex_config_cmd(wmi_handle, |
| 4123 | param); |
| 4124 | |
| 4125 | return QDF_STATUS_E_FAILURE; |
| 4126 | } |
| 4127 | |
Rajeev Kumar Sirasanagandla | ab4275d | 2016-11-22 21:28:54 +0530 | [diff] [blame] | 4128 | QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, |
| 4129 | struct rcpi_req *get_rcpi_param) |
| 4130 | { |
| 4131 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4132 | |
| 4133 | if (wmi_handle->ops->send_get_rcpi_cmd) |
| 4134 | return wmi_handle->ops->send_get_rcpi_cmd(wmi_handle, |
| 4135 | get_rcpi_param); |
| 4136 | |
| 4137 | return QDF_STATUS_E_FAILURE; |
| 4138 | } |
| 4139 | |
| 4140 | QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, |
| 4141 | struct rcpi_res *res) |
| 4142 | { |
| 4143 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4144 | struct wmi_ops *ops = wmi_handle->ops; |
| 4145 | |
| 4146 | if (ops->extract_rcpi_response_event) |
| 4147 | return ops->extract_rcpi_response_event(wmi_handle, evt_buf, |
| 4148 | res); |
| 4149 | |
| 4150 | return QDF_STATUS_E_FAILURE; |
| 4151 | } |
| 4152 | |
Arif Hussain | f00be1d | 2017-01-07 18:21:55 -0800 | [diff] [blame] | 4153 | QDF_STATUS |
| 4154 | wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, |
| 4155 | uint32_t pdev_id) |
| 4156 | { |
| 4157 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4158 | |
| 4159 | if (wmi_handle->ops->send_dfs_phyerr_offload_en_cmd) |
| 4160 | return wmi_handle->ops->send_dfs_phyerr_offload_en_cmd( |
| 4161 | wmi_handle, pdev_id); |
| 4162 | |
| 4163 | return QDF_STATUS_E_FAILURE; |
| 4164 | } |
| 4165 | |
| 4166 | QDF_STATUS |
| 4167 | wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, |
| 4168 | uint32_t pdev_id) |
| 4169 | { |
| 4170 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4171 | |
| 4172 | if (wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd) |
| 4173 | return wmi_handle->ops->send_dfs_phyerr_offload_dis_cmd( |
| 4174 | wmi_handle, pdev_id); |
| 4175 | |
| 4176 | return QDF_STATUS_E_FAILURE; |
| 4177 | } |
Vikram Kandukuri | 45fc858 | 2017-03-07 18:40:13 +0530 | [diff] [blame] | 4178 | |
| 4179 | /* |
| 4180 | * wmi_extract_chainmask_tables_tlv() - extract chain mask tables |
| 4181 | * @wmi_handle: wmi handle |
| 4182 | * @evt_buf: pointer to event buffer. |
| 4183 | * @chainmask_table: pointer to struct wlan_psoc_host_chainmask_table |
| 4184 | * |
| 4185 | * |
| 4186 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 4187 | */ |
| 4188 | QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, |
| 4189 | struct wlan_psoc_host_chainmask_table *chainmask_table) |
| 4190 | { |
| 4191 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4192 | |
| 4193 | if (wmi_handle->ops->extract_chainmask_tables) |
| 4194 | return wmi_handle->ops->extract_chainmask_tables(wmi_handle, |
| 4195 | evt_buf, chainmask_table); |
| 4196 | |
| 4197 | return QDF_STATUS_E_FAILURE; |
| 4198 | } |
Kiran Kumar Lokere | daf91e3 | 2017-04-24 00:56:03 -0700 | [diff] [blame] | 4199 | /** |
| 4200 | * wmi_unified_set_country_cmd_send() - WMI set country function |
| 4201 | * @param wmi_handle : handle to WMI. |
| 4202 | * @param param : pointer to hold set country cmd parameter |
| 4203 | * |
| 4204 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 4205 | */ |
| 4206 | QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, |
| 4207 | struct set_country *param) |
| 4208 | { |
| 4209 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4210 | |
| 4211 | if (wmi_handle->ops->send_set_country_cmd) |
| 4212 | return wmi_handle->ops->send_set_country_cmd(wmi_handle, |
| 4213 | param); |
| 4214 | |
| 4215 | return QDF_STATUS_E_FAILURE; |
| 4216 | } |
| 4217 | |
Rajeev Kumar Sirasanagandla | daadf83 | 2017-09-18 16:47:52 +0530 | [diff] [blame] | 4218 | #ifdef WLAN_FEATURE_ACTION_OUI |
| 4219 | QDF_STATUS |
| 4220 | wmi_unified_send_action_oui_cmd(void *wmi_hdl, |
| 4221 | struct action_oui_request *req) |
| 4222 | { |
| 4223 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4224 | |
| 4225 | if (wmi_handle->ops->send_action_oui_cmd) |
| 4226 | return wmi_handle->ops->send_action_oui_cmd(wmi_handle, |
| 4227 | req); |
| 4228 | |
| 4229 | return QDF_STATUS_E_FAILURE; |
| 4230 | } |
| 4231 | #endif |
| 4232 | |
Ganesh Kondabattini | 40252f5 | 2017-07-10 11:54:11 +0530 | [diff] [blame] | 4233 | /** |
Rathees kumar Chinannan | e3d6feb | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 4234 | * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of |
| 4235 | * wds entries from FW |
| 4236 | * @wmi_handle: wmi handle |
| 4237 | * |
| 4238 | * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. |
| 4239 | * |
| 4240 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 4241 | */ |
| 4242 | QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl) |
| 4243 | { |
| 4244 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4245 | |
| 4246 | if (wmi_handle->ops->send_wds_entry_list_cmd) |
| 4247 | return wmi_handle->ops->send_wds_entry_list_cmd(wmi_handle); |
| 4248 | |
| 4249 | return QDF_STATUS_E_FAILURE; |
| 4250 | } |
| 4251 | |
| 4252 | /** |
| 4253 | * wmi_extract_wds_entry - api to extract wds entry |
| 4254 | * @wmi_handle: wma handle |
| 4255 | * @evt_buf: pointer to event buffer |
| 4256 | * @wds_entry: wds entry |
| 4257 | * @idx: index to point wds entry in event buffer |
| 4258 | * |
| 4259 | * Return: QDF_STATUS_SUCCESS for successful event parse |
| 4260 | * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE |
| 4261 | */ |
| 4262 | QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, |
| 4263 | struct wdsentry *wds_entry, |
| 4264 | u_int32_t idx) |
| 4265 | { |
| 4266 | wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; |
| 4267 | |
| 4268 | if (wmi_handle->ops->extract_wds_entry) |
| 4269 | return wmi_handle->ops->extract_wds_entry(wmi_handle, |
| 4270 | evt_buf, wds_entry, idx); |
| 4271 | |
| 4272 | return QDF_STATUS_E_FAILURE; |
| 4273 | } |
Pratik Gandhi | 67da1bb | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 4274 | qdf_export_symbol(wmi_extract_wds_entry); |
Naveen Rawat | 4f1e2ac | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 4275 | |
Arif Hussain | c5bfe07 | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 4276 | QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, |
| 4277 | struct wmi_obss_detection_cfg_param *obss_cfg_param) |
| 4278 | { |
| 4279 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4280 | |
| 4281 | if (wmi_handle->ops->send_obss_detection_cfg_cmd) |
| 4282 | return wmi_handle->ops->send_obss_detection_cfg_cmd(wmi_handle, |
| 4283 | obss_cfg_param); |
| 4284 | |
| 4285 | return QDF_STATUS_E_FAILURE; |
| 4286 | } |
Arif Hussain | 33d9850 | 2018-01-12 13:15:04 -0800 | [diff] [blame] | 4287 | |
| 4288 | QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, |
| 4289 | uint8_t *data, |
| 4290 | struct wmi_obss_detect_info |
| 4291 | *info) |
| 4292 | { |
| 4293 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4294 | |
| 4295 | if (wmi_handle->ops->extract_obss_detection_info) |
| 4296 | return wmi_handle->ops->extract_obss_detection_info(data, info); |
| 4297 | |
| 4298 | return QDF_STATUS_E_FAILURE; |
| 4299 | } |
Vignesh Viswanathan | 7f05777 | 2018-01-18 19:06:40 +0530 | [diff] [blame] | 4300 | |
Himanshu Agarwal | 157e478 | 2018-01-24 22:24:17 +0530 | [diff] [blame] | 4301 | #ifdef WLAN_SUPPORT_GREEN_AP |
| 4302 | QDF_STATUS wmi_extract_green_ap_egap_status_info( |
| 4303 | void *wmi_hdl, uint8_t *evt_buf, |
| 4304 | struct wlan_green_ap_egap_status_info *egap_status_info_params) |
| 4305 | { |
| 4306 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4307 | |
| 4308 | if (wmi_handle->ops->extract_green_ap_egap_status_info) |
| 4309 | return wmi_handle->ops->extract_green_ap_egap_status_info( |
| 4310 | evt_buf, egap_status_info_params); |
| 4311 | |
| 4312 | return QDF_STATUS_E_FAILURE; |
| 4313 | } |
| 4314 | #endif |
Arif Hussain | ec5cd3c | 2018-01-22 01:19:36 -0800 | [diff] [blame] | 4315 | |
Naveen Rawat | 2630545 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 4316 | wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, |
| 4317 | WMI_HOST_WLAN_PHY_MODE phymode) |
| 4318 | { |
| 4319 | /* |
| 4320 | * this API does translation between host only strcutres, hence |
| 4321 | * does not need separate TLV, non-TLV definitions |
| 4322 | */ |
| 4323 | |
| 4324 | if (phymode >= WMI_HOST_MODE_11A && phymode < WMI_HOST_MODE_MAX) |
| 4325 | return mode_to_width[phymode]; |
| 4326 | else |
| 4327 | return WMI_HOST_CHAN_WIDTH_20; |
| 4328 | } |
Naveen Rawat | 963ee94 | 2018-04-13 16:38:36 -0700 | [diff] [blame] | 4329 | |
| 4330 | #ifdef QCA_SUPPORT_CP_STATS |
| 4331 | QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, |
| 4332 | struct wmi_host_congestion_stats *stats) |
| 4333 | { |
| 4334 | if (wmi_handle->ops->extract_cca_stats) |
| 4335 | return wmi_handle->ops->extract_cca_stats(wmi_handle, evt_buf, |
| 4336 | stats); |
| 4337 | |
| 4338 | return QDF_STATUS_E_FAILURE; |
| 4339 | } |
| 4340 | #endif /* QCA_SUPPORT_CP_STATS */ |
Shashikala Prabhu | 5f65ac7 | 2018-05-16 10:08:09 +0530 | [diff] [blame] | 4341 | |
| 4342 | #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) |
| 4343 | QDF_STATUS |
| 4344 | wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, |
| 4345 | struct dfs_radar_found_params *params) |
| 4346 | { |
| 4347 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4348 | |
| 4349 | if (wmi_handle->ops->send_dfs_average_radar_params_cmd) |
| 4350 | return wmi_handle->ops->send_dfs_average_radar_params_cmd( |
| 4351 | wmi_handle, params); |
| 4352 | |
| 4353 | return QDF_STATUS_E_FAILURE; |
| 4354 | } |
| 4355 | |
| 4356 | QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, |
| 4357 | uint32_t *dfs_status_check) |
| 4358 | { |
| 4359 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4360 | |
| 4361 | if (wmi_handle->ops->extract_dfs_status_from_fw) |
| 4362 | return wmi_handle->ops->extract_dfs_status_from_fw(wmi_handle, |
| 4363 | evt_buf, dfs_status_check); |
| 4364 | |
| 4365 | return QDF_STATUS_E_FAILURE; |
| 4366 | } |
| 4367 | #endif |
c_cgodav | 758d99f | 2017-02-13 10:14:42 +0530 | [diff] [blame] | 4368 | |
| 4369 | #ifdef OL_ATH_SMART_LOGGING |
| 4370 | QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl, |
| 4371 | uint32_t param) |
| 4372 | { |
| 4373 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4374 | |
| 4375 | if (wmi_handle->ops->send_smart_logging_enable_cmd) |
| 4376 | return wmi_handle->ops->send_smart_logging_enable_cmd( |
| 4377 | wmi_handle, |
| 4378 | param); |
| 4379 | |
| 4380 | return QDF_STATUS_E_FAILURE; |
| 4381 | } |
| 4382 | |
| 4383 | QDF_STATUS |
| 4384 | wmi_unified_send_smart_logging_fatal_cmd(void *wmi_hdl, |
| 4385 | struct wmi_debug_fatal_events *param) |
| 4386 | { |
| 4387 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4388 | |
| 4389 | if (wmi_handle->ops->send_smart_logging_fatal_cmd) |
| 4390 | return wmi_handle->ops->send_smart_logging_fatal_cmd(wmi_handle, |
| 4391 | param); |
| 4392 | |
| 4393 | return QDF_STATUS_E_FAILURE; |
| 4394 | } |
| 4395 | |
| 4396 | QDF_STATUS wmi_extract_smartlog_ev(void *wmi_hdl, |
| 4397 | void *evt_buf, |
| 4398 | struct wmi_debug_fatal_events *ev) |
| 4399 | { |
| 4400 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4401 | |
| 4402 | if (wmi->ops->extract_smartlog_event) |
| 4403 | return wmi->ops->extract_smartlog_event(wmi, evt_buf, ev); |
| 4404 | |
| 4405 | return QDF_STATUS_E_FAILURE; |
| 4406 | } |
| 4407 | #endif /* OL_ATH_SMART_LOGGING */ |
Rajeev Kumar Sirasanagandla | d2d1a5e | 2018-03-02 21:12:16 +0530 | [diff] [blame] | 4408 | |
| 4409 | QDF_STATUS |
| 4410 | wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl, |
| 4411 | struct wmi_roam_scan_stats_req *params) |
| 4412 | { |
| 4413 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4414 | |
| 4415 | if (wmi_handle->ops->send_roam_scan_stats_cmd) |
| 4416 | return wmi_handle->ops->send_roam_scan_stats_cmd(wmi_handle, |
| 4417 | params); |
| 4418 | |
| 4419 | return QDF_STATUS_E_FAILURE; |
| 4420 | } |
| 4421 | |
| 4422 | QDF_STATUS |
| 4423 | wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, |
| 4424 | uint32_t *vdev_id, |
| 4425 | struct wmi_roam_scan_stats_res **res_param) |
| 4426 | { |
| 4427 | if (wmi->ops->extract_roam_scan_stats_res_evt) |
| 4428 | return wmi->ops->extract_roam_scan_stats_res_evt(wmi, |
| 4429 | evt_buf, |
| 4430 | vdev_id, res_param); |
| 4431 | |
| 4432 | return QDF_STATUS_E_FAILURE; |
| 4433 | } |
Pratik Gandhi | 3fd97d6 | 2018-09-17 16:47:12 +0530 | [diff] [blame] | 4434 | |
Gyanranjan Hazarika | ff074e9 | 2018-10-04 11:26:20 -0700 | [diff] [blame] | 4435 | QDF_STATUS |
| 4436 | wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf, |
| 4437 | uint32_t *vdev_id, |
| 4438 | uint32_t *tx_status) { |
| 4439 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4440 | |
| 4441 | if (wmi->ops->extract_offload_bcn_tx_status_evt) |
| 4442 | return wmi->ops->extract_offload_bcn_tx_status_evt(wmi, |
| 4443 | evt_buf, |
| 4444 | vdev_id, tx_status); |
| 4445 | |
| 4446 | return QDF_STATUS_E_FAILURE; |
| 4447 | } |
| 4448 | |
Pratik Gandhi | 3fd97d6 | 2018-09-17 16:47:12 +0530 | [diff] [blame] | 4449 | #ifdef OBSS_PD |
| 4450 | QDF_STATUS |
| 4451 | wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_hdl, |
| 4452 | struct wmi_host_obss_spatial_reuse_set_param |
| 4453 | *obss_spatial_reuse_param) |
| 4454 | { |
| 4455 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4456 | |
| 4457 | if (wmi->ops->send_obss_spatial_reuse_set) |
| 4458 | return wmi->ops->send_obss_spatial_reuse_set(wmi, |
| 4459 | obss_spatial_reuse_param); |
| 4460 | |
| 4461 | return QDF_STATUS_E_FAILURE; |
| 4462 | } |
Arif Hussain | 4d4c894 | 2018-10-17 18:48:29 -0700 | [diff] [blame] | 4463 | |
| 4464 | QDF_STATUS |
| 4465 | wmi_unified_send_obss_spatial_reuse_set_def_thresh_cmd(void *wmi_hdl, |
| 4466 | struct wmi_host_obss_spatial_reuse_set_def_thresh *thresh) |
| 4467 | { |
| 4468 | wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; |
| 4469 | |
| 4470 | if (wmi->ops->send_obss_spatial_reuse_set_def_thresh) |
| 4471 | return wmi->ops->send_obss_spatial_reuse_set_def_thresh(wmi, |
| 4472 | thresh); |
| 4473 | |
| 4474 | return QDF_STATUS_E_FAILURE; |
| 4475 | } |
Pratik Gandhi | 3fd97d6 | 2018-09-17 16:47:12 +0530 | [diff] [blame] | 4476 | #endif |
Shashikala Prabhu | b91325c | 2018-09-24 13:54:23 +0530 | [diff] [blame] | 4477 | |
| 4478 | QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl, |
| 4479 | uint32_t host_pdev_id, |
| 4480 | uint32_t *target_pdev_id) |
| 4481 | { |
| 4482 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4483 | |
| 4484 | if (wmi_handle->ops->convert_pdev_id_host_to_target) { |
| 4485 | *target_pdev_id = |
| 4486 | wmi_handle->ops->convert_pdev_id_host_to_target( |
| 4487 | host_pdev_id); |
| 4488 | return QDF_STATUS_SUCCESS; |
| 4489 | } |
| 4490 | |
| 4491 | return QDF_STATUS_E_FAILURE; |
| 4492 | } |
Qiwei Cai | 3d26b2e | 2018-09-17 19:17:13 +0800 | [diff] [blame] | 4493 | |
| 4494 | QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, |
| 4495 | uint32_t vdev_id, |
| 4496 | bool enable) |
| 4497 | { |
| 4498 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4499 | |
| 4500 | if (wmi_handle->ops->send_bss_color_change_enable_cmd) |
| 4501 | return wmi_handle->ops->send_bss_color_change_enable_cmd( |
| 4502 | wmi_handle, vdev_id, enable); |
| 4503 | |
| 4504 | return QDF_STATUS_E_FAILURE; |
| 4505 | } |
| 4506 | |
| 4507 | QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, |
| 4508 | struct wmi_obss_color_collision_cfg_param *cfg) |
| 4509 | { |
| 4510 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4511 | |
| 4512 | if (wmi_handle->ops->send_obss_color_collision_cfg_cmd) |
| 4513 | return wmi_handle->ops->send_obss_color_collision_cfg_cmd( |
| 4514 | wmi_handle, cfg); |
| 4515 | |
| 4516 | return QDF_STATUS_E_FAILURE; |
| 4517 | } |
| 4518 | |
| 4519 | QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, |
| 4520 | uint8_t *data, struct wmi_obss_color_collision_info *info) |
| 4521 | { |
| 4522 | wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl; |
| 4523 | |
| 4524 | if (wmi_handle->ops->extract_obss_color_collision_info) |
| 4525 | return wmi_handle->ops->extract_obss_color_collision_info(data, |
| 4526 | info); |
| 4527 | |
| 4528 | return QDF_STATUS_E_FAILURE; |
| 4529 | } |