Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 1 | /* |
Naveen Rawat | 79a787c | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 2 | * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 3 | * |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +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 | |
| 19 | /* |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 20 | * This file contains the API definitions for the Unified Wireless Module |
| 21 | * Interface (WMI). |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 22 | */ |
| 23 | |
| 24 | #ifndef _WMI_UNIFIED_API_H_ |
| 25 | #define _WMI_UNIFIED_API_H_ |
| 26 | |
| 27 | #include <osdep.h> |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 28 | #ifdef CONFIG_MCL |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 29 | #include "wmi.h" |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 30 | #endif |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 31 | #include "htc_api.h" |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 32 | #include "wmi_unified_param.h" |
Srinivas Pitla | 83aad50 | 2018-01-08 16:55:36 +0530 | [diff] [blame] | 33 | #include "service_ready_param.h" |
Mukul Sharma | 36d159b | 2017-01-30 19:55:40 +0530 | [diff] [blame] | 34 | #include "wlan_objmgr_psoc_obj.h" |
Himanshu Agarwal | 53d526b | 2017-01-05 14:23:18 +0530 | [diff] [blame] | 35 | #include "wlan_mgmt_txrx_utils_api.h" |
Wu Gao | 2a3bc05 | 2018-05-17 16:14:00 +0800 | [diff] [blame] | 36 | #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD |
Mukul Sharma | ba196f5 | 2017-02-25 01:50:47 +0530 | [diff] [blame] | 37 | #include "wmi_unified_pmo_api.h" |
| 38 | #endif |
Om Prakash Tripathi | 91452bf | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 39 | #include "wlan_scan_public_structs.h" |
Nachiket Kukade | a6ffaab | 2017-12-15 12:36:58 +0530 | [diff] [blame] | 40 | #ifdef WLAN_FEATURE_DISA |
| 41 | #include "wlan_disa_public_struct.h" |
| 42 | #endif |
Rajeev Kumar Sirasanagandla | 9d7a69f | 2017-09-18 16:47:52 +0530 | [diff] [blame] | 43 | #ifdef WLAN_FEATURE_ACTION_OUI |
| 44 | #include "wlan_action_oui_public_struct.h" |
| 45 | #endif |
Himanshu Agarwal | 0d578ff | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 46 | #ifdef WLAN_SUPPORT_GREEN_AP |
| 47 | #include "wlan_green_ap_api.h" |
| 48 | #endif |
Zhang Qian | 74a66aa | 2018-01-05 16:50:53 +0800 | [diff] [blame] | 49 | #ifdef WLAN_FEATURE_DSRC |
| 50 | #include "wlan_ocb_public_structs.h" |
| 51 | #endif |
Kiran Venkatappa | 2d881fd | 2018-02-05 10:56:43 +0530 | [diff] [blame] | 52 | #ifdef WLAN_SUPPORT_TWT |
| 53 | #include "wmi_unified_twt_param.h" |
| 54 | #include "wmi_unified_twt_api.h" |
| 55 | #endif |
Naveen Rawat | 79a787c | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 56 | |
Wen Gong | 5b1429d | 2018-05-18 16:03:41 +0800 | [diff] [blame] | 57 | #ifdef FEATURE_WLAN_EXTSCAN |
| 58 | #include "wmi_unified_extscan_api.h" |
| 59 | #endif |
| 60 | |
Sravan Kumar Kairam | dcb5f80 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 61 | #ifdef IPA_OFFLOAD |
| 62 | #include "wlan_ipa_public_struct.h" |
| 63 | #endif |
| 64 | |
Sathish Kumar | 637da89 | 2018-10-02 11:03:59 +0530 | [diff] [blame] | 65 | #ifdef WMI_SMART_ANT_SUPPORT |
| 66 | #include "wmi_unified_smart_ant_api.h" |
| 67 | #endif |
| 68 | |
| 69 | #ifdef WMI_DBR_SUPPORT |
| 70 | #include "wmi_unified_dbr_api.h" |
| 71 | #endif |
| 72 | |
| 73 | #ifdef WMI_ATF_SUPPORT |
| 74 | #include "wmi_unified_atf_api.h" |
| 75 | #endif |
| 76 | |
| 77 | #ifdef WMI_AP_SUPPORT |
| 78 | #include "wmi_unified_ap_api.h" |
| 79 | #endif |
| 80 | |
Qiwei Cai | 1f36626 | 2018-09-17 19:17:13 +0800 | [diff] [blame] | 81 | #ifdef WLAN_FEATURE_DSRC |
| 82 | #include "wmi_unified_ocb_api.h" |
| 83 | #endif |
| 84 | |
| 85 | #ifdef WLAN_FEATURE_NAN_CONVERGENCE |
| 86 | #include "wmi_unified_nan_api.h" |
| 87 | #endif |
| 88 | |
| 89 | #ifdef CONVERGED_P2P_ENABLE |
| 90 | #include <wmi_unified_p2p_api.h> |
| 91 | #endif |
| 92 | |
| 93 | #ifdef WMI_ROAM_SUPPORT |
| 94 | #include "wmi_unified_roam_api.h" |
| 95 | #endif |
| 96 | |
| 97 | #ifdef WMI_CONCURRENCY_SUPPORT |
| 98 | #include "wmi_unified_concurrency_api.h" |
| 99 | #endif |
| 100 | |
| 101 | #ifdef WMI_STA_SUPPORT |
| 102 | #include "wmi_unified_sta_api.h" |
| 103 | #endif |
| 104 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 105 | typedef qdf_nbuf_t wmi_buf_t; |
| 106 | #define wmi_buf_data(_buf) qdf_nbuf_data(_buf) |
| 107 | |
| 108 | #define WMI_LOGD(args ...) \ |
| 109 | QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG, ## args) |
| 110 | #define WMI_LOGI(args ...) \ |
| 111 | QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_INFO, ## args) |
| 112 | #define WMI_LOGW(args ...) \ |
| 113 | QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_WARN, ## args) |
| 114 | #define WMI_LOGE(args ...) \ |
| 115 | QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, ## args) |
| 116 | #define WMI_LOGP(args ...) \ |
| 117 | QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_FATAL, ## args) |
| 118 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 119 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 120 | |
Arif Hussain | f6b0c99 | 2018-03-01 14:40:59 -0800 | [diff] [blame] | 121 | #define PHYERROR_MAX_BUFFER_LENGTH 0x7F000000 |
| 122 | |
Kiran Venkatappa | 929dd29 | 2017-02-10 16:57:59 +0530 | [diff] [blame] | 123 | struct wmi_soc; |
Srinivas Girigowda | c461aef | 2018-02-15 14:30:05 -0800 | [diff] [blame] | 124 | struct policy_mgr_dual_mac_config; |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 125 | /** |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 126 | * struct wmi_ops - service callbacks to upper layer |
| 127 | * @service_ready_cbk: service ready callback |
| 128 | * @service_ready_ext_cbk: service ready ext callback |
| 129 | * @ready_cbk: ready calback |
| 130 | * @wma_process_fw_event_handler_cbk: generic event handler callback |
| 131 | */ |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 132 | struct wmi_rx_ops { |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 133 | |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 134 | int (*wma_process_fw_event_handler_cbk)(void *ctx, |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 135 | void *ev, uint8_t rx_ctx); |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 136 | }; |
| 137 | |
| 138 | /** |
| 139 | * enum wmi_target_type - type of supported wmi command |
| 140 | * @WMI_TLV_TARGET: tlv based target |
| 141 | * @WMI_NON_TLV_TARGET: non-tlv based target |
| 142 | * |
| 143 | */ |
| 144 | enum wmi_target_type { |
| 145 | WMI_TLV_TARGET, |
Pratik Gandhi | 073fa00 | 2018-01-30 19:05:41 +0530 | [diff] [blame] | 146 | WMI_NON_TLV_TARGET, |
| 147 | WMI_MAX_TARGET_TYPE |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 148 | }; |
| 149 | |
| 150 | /** |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 151 | * enum wmi_rx_exec_ctx - wmi rx execution context |
| 152 | * @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer |
| 153 | * @WMI_RX_UMAC_CTX: execution context provided by umac layer |
| 154 | * |
| 155 | */ |
| 156 | enum wmi_rx_exec_ctx { |
| 157 | WMI_RX_WORK_CTX, |
| 158 | WMI_RX_UMAC_CTX |
| 159 | }; |
| 160 | |
| 161 | /** |
Chaithanya Garrepalli | 0974401 | 2017-12-01 14:55:26 +0530 | [diff] [blame] | 162 | * struct wmi_unified_attach_params - wmi init parameters |
| 163 | * @param osdev : NIC device |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 164 | * @param target_type : type of supported wmi command |
| 165 | * @param use_cookie : flag to indicate cookie based allocation |
| 166 | * @param ops : handle to wmi ops |
Mukul Sharma | 36d159b | 2017-01-30 19:55:40 +0530 | [diff] [blame] | 167 | * @psoc : objmgr psoc |
Chaithanya Garrepalli | 0974401 | 2017-12-01 14:55:26 +0530 | [diff] [blame] | 168 | * @max_commands : max commands |
| 169 | */ |
| 170 | struct wmi_unified_attach_params { |
| 171 | osdev_t osdev; |
| 172 | enum wmi_target_type target_type; |
| 173 | bool use_cookie; |
| 174 | struct wmi_rx_ops *rx_ops; |
| 175 | struct wlan_objmgr_psoc *psoc; |
| 176 | uint16_t max_commands; |
c_priys | cc79b35 | 2018-06-12 16:53:51 +0530 | [diff] [blame] | 177 | uint32_t soc_id; |
Chaithanya Garrepalli | 0974401 | 2017-12-01 14:55:26 +0530 | [diff] [blame] | 178 | }; |
| 179 | |
| 180 | /** |
| 181 | * attach for unified WMI |
| 182 | * |
| 183 | * @param scn_handle : handle to SCN. |
| 184 | * @param params : attach params for WMI |
| 185 | * |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 186 | */ |
| 187 | void *wmi_unified_attach(void *scn_handle, |
Chaithanya Garrepalli | 0974401 | 2017-12-01 14:55:26 +0530 | [diff] [blame] | 188 | struct wmi_unified_attach_params *params); |
Mukul Sharma | 36d159b | 2017-01-30 19:55:40 +0530 | [diff] [blame] | 189 | |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 190 | |
Sandeep Puligilla | 38a294f | 2016-06-13 15:42:55 -0700 | [diff] [blame] | 191 | |
Sandeep Puligilla | 20fb76b | 2016-07-19 13:20:57 -0700 | [diff] [blame] | 192 | /** |
| 193 | * wmi_mgmt_cmd_record() - Wrapper function for mgmt command logging macro |
| 194 | * |
| 195 | * @wmi_handle: wmi handle |
| 196 | * @cmd: mgmt command |
| 197 | * @header: pointer to 802.11 header |
| 198 | * @vdev_id: vdev id |
| 199 | * @chanfreq: channel frequency |
| 200 | * |
| 201 | * Return: none |
| 202 | */ |
Himanshu Agarwal | 56c292f | 2016-07-19 15:41:51 +0530 | [diff] [blame] | 203 | void wmi_mgmt_cmd_record(wmi_unified_t wmi_handle, uint32_t cmd, |
Sandeep Puligilla | 20fb76b | 2016-07-19 13:20:57 -0700 | [diff] [blame] | 204 | void *header, uint32_t vdev_id, uint32_t chanfreq); |
Sandeep Puligilla | 38a294f | 2016-06-13 15:42:55 -0700 | [diff] [blame] | 205 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 206 | /** |
| 207 | * detach for unified WMI |
| 208 | * |
| 209 | * @param wmi_handle : handle to WMI. |
| 210 | * @return void. |
| 211 | */ |
| 212 | void wmi_unified_detach(struct wmi_unified *wmi_handle); |
| 213 | |
gaurank kathpalia | a2a2c71 | 2018-02-21 18:58:29 +0530 | [diff] [blame] | 214 | /** |
| 215 | * API to sync time between host and firmware |
| 216 | * |
| 217 | * @param wmi_handle : handle to WMI. |
| 218 | * @return void. |
| 219 | */ |
| 220 | void wmi_send_time_stamp_sync_cmd_tlv(void *wmi_hdl); |
| 221 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 222 | void |
| 223 | wmi_unified_remove_work(struct wmi_unified *wmi_handle); |
| 224 | |
| 225 | /** |
| 226 | * generic function to allocate WMI buffer |
| 227 | * |
| 228 | * @param wmi_handle : handle to WMI. |
| 229 | * @param len : length of the buffer |
| 230 | * @return wmi_buf_t. |
| 231 | */ |
Shiva Krishna Pittala | 9241643 | 2018-04-02 17:23:42 +0530 | [diff] [blame] | 232 | #ifdef NBUF_MEMORY_DEBUG |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 233 | #define wmi_buf_alloc(h, l) wmi_buf_alloc_debug(h, l, __FILE__, __LINE__) |
| 234 | wmi_buf_t |
Debasis Das | 9d1359f | 2018-04-04 17:17:55 +0530 | [diff] [blame] | 235 | wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len, |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 236 | uint8_t *file_name, uint32_t line_num); |
| 237 | #else |
Arif Hussain | 7aee544 | 2018-07-19 14:15:36 -0700 | [diff] [blame] | 238 | /** |
| 239 | * wmi_buf_alloc() - generic function to allocate WMI buffer |
| 240 | * @wmi_handle: handle to WMI. |
| 241 | * @len: length of the buffer |
| 242 | * |
| 243 | * Return: return wmi_buf_t or null if memory alloc fails |
| 244 | */ |
| 245 | #define wmi_buf_alloc(wmi_handle, len) \ |
| 246 | wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__) |
| 247 | |
| 248 | wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len, |
| 249 | const char *func, uint32_t line); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 250 | #endif |
| 251 | |
| 252 | /** |
| 253 | * generic function frees WMI net buffer |
| 254 | * |
| 255 | * @param net_buf : Pointer ot net_buf to be freed |
| 256 | */ |
| 257 | void wmi_buf_free(wmi_buf_t net_buf); |
| 258 | |
| 259 | /** |
Arif Hussain | 6acb51f | 2018-07-19 15:05:16 -0700 | [diff] [blame] | 260 | * wmi_unified_cmd_send() - generic function to send unified WMI command |
| 261 | * @wmi_handle: handle to WMI. |
| 262 | * @buf: wmi command buffer |
| 263 | * @buflen: wmi command buffer length |
| 264 | * @cmd_id: WMI cmd id |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 265 | * |
Arif Hussain | 6acb51f | 2018-07-19 15:05:16 -0700 | [diff] [blame] | 266 | * Note, it is NOT safe to access buf after calling this function! |
| 267 | * |
| 268 | * Return: QDF_STATUS |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 269 | */ |
Arif Hussain | 6acb51f | 2018-07-19 15:05:16 -0700 | [diff] [blame] | 270 | #define wmi_unified_cmd_send(wmi_handle, buf, buflen, cmd_id) \ |
| 271 | wmi_unified_cmd_send_fl(wmi_handle, buf, buflen, \ |
| 272 | cmd_id, __func__, __LINE__) |
| 273 | |
Houston Hoffman | 09f96f9 | 2016-09-27 23:29:49 -0700 | [diff] [blame] | 274 | QDF_STATUS |
Arif Hussain | 6acb51f | 2018-07-19 15:05:16 -0700 | [diff] [blame] | 275 | wmi_unified_cmd_send_fl(wmi_unified_t wmi_handle, wmi_buf_t buf, |
| 276 | uint32_t buflen, uint32_t cmd_id, |
| 277 | const char *func, uint32_t line); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 278 | |
| 279 | /** |
Soumya Bhat | 49a8481 | 2017-03-22 14:41:01 +0530 | [diff] [blame] | 280 | * wmi_unified_register_event() - WMI event handler |
| 281 | * registration function for converged components |
| 282 | * |
| 283 | * @wmi_handle: handle to WMI. |
| 284 | * @event_id: WMI event ID |
| 285 | * @handler_func: Event handler call back function |
| 286 | * |
| 287 | * @return 0 on success and -ve on failure. |
| 288 | */ |
| 289 | int |
| 290 | wmi_unified_register_event(wmi_unified_t wmi_handle, |
| 291 | uint32_t event_id, |
| 292 | wmi_unified_event_handler handler_func); |
| 293 | |
| 294 | /** |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 295 | * wmi_unified_register_event_handler() - WMI event handler |
| 296 | * registration function |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 297 | * |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 298 | * @wmi_handle: handle to WMI. |
| 299 | * @event_id: WMI event ID |
| 300 | * @handler_func: Event handler call back function |
| 301 | * @rx_ctx: rx event processing context |
| 302 | * |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 303 | * @return 0 on success and -ve on failure. |
| 304 | */ |
| 305 | int |
| 306 | wmi_unified_register_event_handler(wmi_unified_t wmi_handle, |
Mukul Sharma | 6faf5a8 | 2017-11-03 19:26:54 +0530 | [diff] [blame] | 307 | wmi_conv_event_id event_id, |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 308 | wmi_unified_event_handler handler_func, |
| 309 | uint8_t rx_ctx); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 310 | |
| 311 | /** |
Soumya Bhat | 070cd05 | 2017-03-27 12:26:56 +0530 | [diff] [blame] | 312 | * WMI event handler unregister function for converged componets |
| 313 | * |
| 314 | * @param wmi_handle : handle to WMI. |
| 315 | * @param event_id : WMI event ID |
| 316 | * @return 0 on success and -ve on failure. |
| 317 | */ |
| 318 | int |
| 319 | wmi_unified_unregister_event(wmi_unified_t wmi_handle, |
| 320 | uint32_t event_id); |
| 321 | |
| 322 | /** |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 323 | * WMI event handler unregister function |
| 324 | * |
| 325 | * @param wmi_handle : handle to WMI. |
| 326 | * @param event_id : WMI event ID |
| 327 | * @return 0 on success and -ve on failure. |
| 328 | */ |
| 329 | int |
| 330 | wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, |
Mukul Sharma | 6faf5a8 | 2017-11-03 19:26:54 +0530 | [diff] [blame] | 331 | wmi_conv_event_id event_id); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 332 | |
| 333 | /** |
| 334 | * request wmi to connet its htc service. |
| 335 | * @param wmi_handle : handle to WMI. |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 336 | * @param htc_handle : handle to HTC. |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 337 | * @return void |
| 338 | */ |
Kiran Venkatappa | 929dd29 | 2017-02-10 16:57:59 +0530 | [diff] [blame] | 339 | QDF_STATUS |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 340 | wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle, |
| 341 | void *htc_handle); |
| 342 | |
| 343 | /* |
| 344 | * WMI API to verify the host has enough credits to suspend |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 345 | * @param wmi_handle : handle to WMI. |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 346 | */ |
| 347 | |
| 348 | int wmi_is_suspend_ready(wmi_unified_t wmi_handle); |
| 349 | |
| 350 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 351 | * WMI API to get updated host_credits |
| 352 | * @param wmi_handle : handle to WMI. |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 353 | */ |
| 354 | |
| 355 | int wmi_get_host_credits(wmi_unified_t wmi_handle); |
| 356 | |
| 357 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 358 | * WMI API to get WMI Pending Commands in the HTC queue |
| 359 | * @param wmi_handle : handle to WMI. |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 360 | */ |
| 361 | |
| 362 | int wmi_get_pending_cmds(wmi_unified_t wmi_handle); |
| 363 | |
| 364 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 365 | * WMI API to set target suspend state |
| 366 | * @param wmi_handle : handle to WMI. |
| 367 | * @param val : suspend state boolean |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 368 | */ |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 369 | void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val); |
| 370 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 371 | /** |
Sarada Prasanna Garnayak | d49444c | 2017-01-05 19:30:07 +0530 | [diff] [blame] | 372 | * WMI API to set bus suspend state |
| 373 | * @param wmi_handle: handle to WMI. |
| 374 | * @param val: suspend state boolean |
| 375 | */ |
| 376 | void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val); |
| 377 | |
| 378 | /** |
| 379 | * WMI API to set crash injection state |
| 380 | * @param wmi_handle: handle to WMI. |
| 381 | * @param val: crash injection state boolean |
| 382 | */ |
| 383 | void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag); |
| 384 | |
| 385 | /** |
Ravi Kumar Bokka | df1f3ea | 2016-11-09 18:07:56 +0530 | [diff] [blame] | 386 | * WMI API to set target assert |
| 387 | * @param wmi_handle: handle to WMI. |
| 388 | * @param val: target assert config value. |
| 389 | * |
| 390 | * Return: none. |
| 391 | */ |
| 392 | void wmi_set_tgt_assert(wmi_unified_t wmi_handle, bool val); |
| 393 | |
| 394 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 395 | * generic function to block unified WMI command |
| 396 | * @param wmi_handle : handle to WMI. |
| 397 | * @return 0 on success and -ve on failure. |
| 398 | */ |
| 399 | int |
| 400 | wmi_stop(wmi_unified_t wmi_handle); |
| 401 | |
| 402 | /** |
| 403 | * API to flush all the previous packets associated with the wmi endpoint |
| 404 | * |
| 405 | * @param wmi_handle : handle to WMI. |
| 406 | */ |
| 407 | void |
| 408 | wmi_flush_endpoint(wmi_unified_t wmi_handle); |
| 409 | |
| 410 | /** |
Kiran Venkatappa | 4934104 | 2017-05-10 16:24:51 +0530 | [diff] [blame] | 411 | * wmi_pdev_id_conversion_enable() - API to enable pdev_id conversion in WMI |
| 412 | * By default pdev_id conversion is not done in WMI. |
| 413 | * This API can be used enable conversion in WMI. |
| 414 | * @param wmi_handle : handle to WMI |
| 415 | * Return none |
| 416 | */ |
| 417 | void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle); |
| 418 | |
| 419 | /** |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 420 | * API to handle wmi rx event after UMAC has taken care of execution |
| 421 | * context |
| 422 | * |
| 423 | * @param wmi_handle : handle to WMI. |
| 424 | * @param evt_buf : wmi event buffer |
| 425 | */ |
| 426 | void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 427 | #ifdef FEATURE_RUNTIME_PM |
| 428 | void |
| 429 | wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val); |
| 430 | bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle); |
| 431 | #else |
| 432 | static inline void |
| 433 | wmi_set_runtime_pm_inprogress(wmi_unified_t wmi_handle, bool val) |
| 434 | { |
| 435 | return; |
| 436 | } |
| 437 | static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle) |
| 438 | { |
| 439 | return false; |
| 440 | } |
| 441 | #endif |
| 442 | |
Kiran Venkatappa | 929dd29 | 2017-02-10 16:57:59 +0530 | [diff] [blame] | 443 | void *wmi_unified_get_soc_handle(struct wmi_unified *wmi_handle); |
| 444 | |
| 445 | void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx); |
| 446 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 447 | /** |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 448 | * UMAC Callback to process fw event. |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 449 | * @param wmi_handle : handle to WMI. |
| 450 | * @param evt_buf : wmi event buffer |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 451 | */ |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 452 | void wmi_process_fw_event(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf); |
| 453 | uint16_t wmi_get_max_msg_len(wmi_unified_t wmi_handle); |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 454 | |
| 455 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 456 | QDF_STATUS wmi_unified_vdev_create_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 457 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 458 | struct vdev_create_params *param); |
| 459 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 460 | QDF_STATUS wmi_unified_vdev_delete_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 461 | uint8_t if_id); |
| 462 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 463 | QDF_STATUS wmi_unified_vdev_stop_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 464 | uint8_t vdev_id); |
| 465 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 466 | QDF_STATUS wmi_unified_vdev_up_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 467 | uint8_t bssid[IEEE80211_ADDR_LEN], |
| 468 | struct vdev_up_params *params); |
| 469 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 470 | QDF_STATUS wmi_unified_vdev_down_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 471 | uint8_t vdev_id); |
| 472 | |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 473 | QDF_STATUS wmi_unified_vdev_start_send(void *wmi_hdl, |
| 474 | struct vdev_start_params *req); |
Chaithanya Garrepalli | 140a053 | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 475 | /** |
| 476 | * wmi_unified_vdev_set_nac_rssi_send() - send NAC_RSSI command to fw |
| 477 | * @param wmi_handle : handle to WMI |
| 478 | * @param req : pointer to hold nac rssi request data |
| 479 | * |
| 480 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 481 | */ |
| 482 | QDF_STATUS wmi_unified_vdev_set_nac_rssi_send(void *wmi_hdl, |
| 483 | struct vdev_scan_nac_rssi_params *req); |
Himanshu Agarwal | 7e4f4bc | 2016-03-09 16:49:38 +0530 | [diff] [blame] | 484 | |
| 485 | QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl, |
| 486 | struct hidden_ssid_vdev_restart_params *restart_params); |
| 487 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 488 | QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 489 | struct vdev_set_params *param); |
| 490 | |
narayan | e1b4466 | 2018-07-01 21:59:41 +0530 | [diff] [blame] | 491 | QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl, |
| 492 | struct sifs_trigger_param *param); |
| 493 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 494 | QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 495 | uint8_t |
| 496 | peer_addr[IEEE80211_ADDR_LEN], |
| 497 | uint8_t vdev_id); |
| 498 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 499 | QDF_STATUS wmi_unified_peer_flush_tids_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 500 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 501 | struct peer_flush_params *param); |
| 502 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 503 | QDF_STATUS wmi_set_peer_param_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 504 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 505 | struct peer_set_params *param); |
| 506 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 507 | QDF_STATUS wmi_unified_peer_create_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 508 | struct peer_create_params *param); |
| 509 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 510 | QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 511 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 512 | struct stats_request_params *param); |
| 513 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 514 | QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, |
Himanshu Agarwal | 0d578ff | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 515 | uint32_t value, uint8_t pdev_id); |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 516 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 517 | QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 518 | struct wow_cmd_params *param, |
| 519 | uint8_t mac_id); |
| 520 | |
Jeff Johnson | 6b8bda4 | 2016-10-07 13:03:02 -0700 | [diff] [blame] | 521 | QDF_STATUS wmi_unified_wow_wakeup_send(void *wmi_hdl); |
| 522 | |
| 523 | QDF_STATUS wmi_unified_wow_add_wakeup_event_send(void *wmi_hdl, |
| 524 | struct wow_add_wakeup_params *param); |
| 525 | |
| 526 | QDF_STATUS wmi_unified_wow_add_wakeup_pattern_send(void *wmi_hdl, |
| 527 | struct wow_add_wakeup_pattern_params *param); |
| 528 | |
| 529 | QDF_STATUS wmi_unified_wow_remove_wakeup_pattern_send(void *wmi_hdl, |
| 530 | struct wow_remove_wakeup_pattern_params *param); |
| 531 | |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 532 | #ifndef CONFIG_MCL |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 533 | QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, |
Keyur Parekh | 483138e | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 534 | WMI_HOST_PKTLOG_EVENT PKTLOG_EVENT, uint8_t mac_id); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 535 | #else |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 536 | QDF_STATUS wmi_unified_packet_log_enable_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 537 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 538 | struct packet_enable_params *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 539 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 540 | |
Keyur Parekh | 483138e | 2017-05-07 08:54:47 -0700 | [diff] [blame] | 541 | QDF_STATUS wmi_unified_packet_log_disable_send(void *wmi_hdl, uint8_t mac_id); |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 542 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 543 | QDF_STATUS wmi_unified_suspend_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 544 | struct suspend_params *param, |
| 545 | uint8_t mac_id); |
| 546 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 547 | QDF_STATUS wmi_unified_resume_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 548 | uint8_t mac_id); |
| 549 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 550 | QDF_STATUS |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 551 | wmi_unified_pdev_param_send(void *wmi_hdl, |
| 552 | struct pdev_params *param, |
| 553 | uint8_t mac_id); |
| 554 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 555 | QDF_STATUS wmi_unified_beacon_tmpl_send_cmd(void *wmi_hdl, |
| 556 | struct beacon_tmpl_params *param); |
| 557 | |
| 558 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 559 | QDF_STATUS wmi_unified_peer_assoc_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 560 | struct peer_assoc_params *param); |
| 561 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 562 | QDF_STATUS wmi_unified_sta_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 563 | struct sta_ps_params *param); |
| 564 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 565 | QDF_STATUS wmi_unified_ap_ps_cmd_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 566 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 567 | struct ap_ps_params *param); |
| 568 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 569 | QDF_STATUS wmi_unified_scan_start_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 91452bf | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 570 | struct scan_req_params *param); |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 571 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 572 | QDF_STATUS wmi_unified_scan_stop_cmd_send(void *wmi_hdl, |
Om Prakash Tripathi | 91452bf | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 573 | struct scan_cancel_param *param); |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 574 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 575 | QDF_STATUS wmi_unified_scan_chan_list_cmd_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 576 | struct scan_chan_list_params *param); |
| 577 | |
| 578 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 579 | QDF_STATUS wmi_crash_inject(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 580 | struct crash_inject *param); |
| 581 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 582 | QDF_STATUS wmi_unified_pdev_utf_cmd_send(void *wmi_hdl, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 583 | struct pdev_utf_params *param, |
| 584 | uint8_t mac_id); |
| 585 | |
Wen Gong | 59d1dbe | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 586 | #ifdef FEATURE_FW_LOG_PARSING |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 587 | QDF_STATUS wmi_unified_dbglog_cmd_send(void *wmi_hdl, |
Wen Gong | 59d1dbe | 2018-04-20 16:56:28 +0800 | [diff] [blame] | 588 | struct dbglog_params *param); |
| 589 | #else |
| 590 | static inline QDF_STATUS |
| 591 | wmi_unified_dbglog_cmd_send(void *wmi_hdl, |
| 592 | struct dbglog_params *param) |
| 593 | { |
| 594 | return QDF_STATUS_SUCCESS; |
| 595 | } |
| 596 | #endif |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 597 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 598 | QDF_STATUS wmi_mgmt_unified_cmd_send(void *wmi_hdl, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 599 | struct wmi_mgmt_params *param); |
| 600 | |
Kiran Venkatappa | 25c4702 | 2017-03-19 22:58:09 +0530 | [diff] [blame] | 601 | QDF_STATUS wmi_offchan_data_tx_cmd_send(void *wmi_hdl, |
| 602 | struct wmi_offchan_data_tx_params *param); |
| 603 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 604 | QDF_STATUS wmi_unified_modem_power_state(void *wmi_hdl, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 605 | uint32_t param_value); |
| 606 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 607 | QDF_STATUS wmi_unified_set_sta_ps_mode(void *wmi_hdl, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 608 | uint32_t vdev_id, uint8_t val); |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 609 | QDF_STATUS |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 610 | wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, |
| 611 | struct sta_uapsd_trig_params *param); |
| 612 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 613 | QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl); |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 614 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 615 | QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 616 | int value); |
| 617 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 618 | QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value); |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 619 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 620 | QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 621 | struct wmi_lro_config_cmd_t *wmi_lro_cmd); |
| 622 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 623 | QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 624 | struct thermal_cmd_params *thermal_info); |
| 625 | |
Poddar, Siddarth | 794b996 | 2016-04-28 15:49:11 +0530 | [diff] [blame] | 626 | QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, |
| 627 | struct wmi_peer_rate_report_params *rate_report_params); |
| 628 | |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 629 | #ifdef CONFIG_MCL |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 630 | QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl, |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 631 | wmi_bcn_send_from_host_cmd_fixed_param *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 632 | #endif |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 633 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 634 | QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, |
Kiran Kumar Lokere | af132c1 | 2018-04-06 16:56:47 -0700 | [diff] [blame] | 635 | uint8_t vdev_id, bool mu_edca_param, |
Vikram Kandukuri | d2e7580 | 2017-06-01 16:47:51 +0530 | [diff] [blame] | 636 | struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 637 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 638 | QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 639 | uint8_t vdev_id, |
Krunal Soni | 36f17d4 | 2017-11-14 15:42:48 -0800 | [diff] [blame] | 640 | struct wmi_probe_resp_params *probe_rsp_info); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 641 | |
Himanshu Agarwal | 9efd9bf | 2016-03-09 18:49:18 +0530 | [diff] [blame] | 642 | QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, |
| 643 | struct set_key_params *key_params); |
| 644 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 645 | QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, |
Vivek | 7346528 | 2018-03-22 23:27:21 +0530 | [diff] [blame] | 646 | uint32_t vdev_id, uint8_t *p2p_ie); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 647 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 648 | QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 649 | struct scan_mac_oui *psetoui); |
| 650 | |
Sravan Kumar Kairam | dcb5f80 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 651 | #ifdef IPA_OFFLOAD |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 652 | QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, |
Sravan Kumar Kairam | dcb5f80 | 2018-02-15 23:28:34 +0530 | [diff] [blame] | 653 | struct ipa_uc_offload_control_params *ipa_offload); |
| 654 | #endif |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 655 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 656 | QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 657 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 658 | #ifdef FEATURE_WLAN_SCAN_PNO |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 659 | QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, |
Abhishek Singh | d418466 | 2017-03-03 22:09:07 +0530 | [diff] [blame] | 660 | struct pno_scan_req_params *pno); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 661 | #endif |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 662 | |
Varun Reddy Yeturu | 4fa519b | 2017-07-24 16:11:22 -0700 | [diff] [blame] | 663 | QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, |
| 664 | struct nlo_mawc_params *params); |
| 665 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 666 | QDF_STATUS wmi_unified_process_ll_stats_clear_cmd |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 667 | (void *wmi_hdl, const struct ll_stats_clear_params *clear_req, |
| 668 | uint8_t addr[IEEE80211_ADDR_LEN]); |
| 669 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 670 | QDF_STATUS wmi_unified_process_ll_stats_set_cmd |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 671 | (void *wmi_hdl, const struct ll_stats_set_params *set_req); |
| 672 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 673 | QDF_STATUS wmi_unified_process_ll_stats_get_cmd |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 674 | (void *wmi_hdl, const struct ll_stats_get_params *get_req, |
| 675 | uint8_t addr[IEEE80211_ADDR_LEN]); |
| 676 | |
Padma, Santhosh Kumar | d326190 | 2017-03-21 19:09:35 +0530 | [diff] [blame] | 677 | /** |
| 678 | * wmi_unified_congestion_request_cmd() - send request to fw to get CCA |
| 679 | * @wmi_hdl: wma handle |
| 680 | * @vdev_id: vdev id |
| 681 | * |
| 682 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 683 | */ |
| 684 | QDF_STATUS wmi_unified_congestion_request_cmd(void *wmi_hdl, |
| 685 | uint8_t vdev_id); |
| 686 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 687 | QDF_STATUS wmi_unified_snr_request_cmd(void *wmi_hdl); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 688 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 689 | QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 690 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 691 | QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 692 | struct link_status_params *link_status); |
| 693 | |
Himanshu Agarwal | 0d578ff | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 694 | #ifdef WLAN_SUPPORT_GREEN_AP |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 695 | QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, |
Himanshu Agarwal | 0d578ff | 2018-01-10 14:21:53 +0530 | [diff] [blame] | 696 | struct wlan_green_ap_egap_params *egap_params); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 697 | #endif |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 698 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 699 | QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 700 | |
Naveen Rawat | 90bc8fd | 2017-05-13 15:56:57 -0700 | [diff] [blame] | 701 | #ifdef WLAN_FEATURE_CIF_CFR |
| 702 | /** |
| 703 | * wmi_unified_oem_dma_ring_cfg() - configure OEM DMA rings |
| 704 | * @wmi_handle: wmi handle |
| 705 | * @data_len: len of dma cfg req |
| 706 | * @data: dma cfg req |
| 707 | * |
| 708 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 709 | */ |
| 710 | QDF_STATUS wmi_unified_oem_dma_ring_cfg(void *wmi_hdl, |
| 711 | wmi_oem_dma_ring_cfg_req_fixed_param *cfg); |
| 712 | #endif |
| 713 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 714 | QDF_STATUS wmi_unified_start_oem_data_cmd(void *wmi_hdl, |
Krishna Kumaar Natarajan | 7a59ca0 | 2016-07-21 15:02:44 -0700 | [diff] [blame] | 715 | uint32_t data_len, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 716 | uint8_t *data); |
| 717 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 718 | QDF_STATUS wmi_unified_dfs_phyerr_filter_offload_en_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 719 | bool dfs_phyerr_filter_offload); |
| 720 | |
Kiran Venkatappa | 9da7e04 | 2016-08-09 22:52:35 +0530 | [diff] [blame] | 721 | #ifdef CONFIG_MCL |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 722 | QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 723 | WMI_PKTLOG_EVENT pktlog_event, |
Nirav Shah | 9d1f1ac | 2016-07-27 19:06:13 +0530 | [diff] [blame] | 724 | uint32_t cmd_id, |
| 725 | uint8_t user_triggered); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 726 | #endif |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 727 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 728 | QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 729 | struct stats_ext_params *preq); |
| 730 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 731 | QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, |
Jeff Johnson | 645f7a1 | 2017-10-04 19:19:20 -0700 | [diff] [blame] | 732 | struct dhcp_offload_info_params *params); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 733 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 734 | QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 735 | uint32_t reg_dmn, uint16_t regdmn2G, |
Rajeev Kumar Sirasanagandla | acf22bf | 2017-06-06 13:27:56 +0530 | [diff] [blame] | 736 | uint16_t regdmn5G, uint8_t ctl2G, |
| 737 | uint8_t ctl5G); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 738 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 739 | QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl, |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 740 | struct fw_dump_req_param *mem_dump_req); |
| 741 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 742 | QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, |
Govind Singh | 71ee2d7 | 2016-03-07 16:30:32 +0530 | [diff] [blame] | 743 | void *evt_buf); |
| 744 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 745 | QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, |
Govind Singh | 2ae9437 | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 746 | uint8_t *event, |
| 747 | uint32_t len); |
| 748 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 749 | QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, |
Govind Singh | 2ae9437 | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 750 | struct wmi_wifi_start_log *start_log); |
| 751 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 752 | QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl); |
Govind Singh | 2ae9437 | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 753 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 754 | QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, |
Govind Singh | 2ae9437 | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 755 | struct ssid_hotlist_request_params *request); |
| 756 | |
Govind Singh | d7468a5 | 2016-03-09 14:32:57 +0530 | [diff] [blame] | 757 | QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, |
Govind Singh | 2ae9437 | 2016-03-07 16:45:38 +0530 | [diff] [blame] | 758 | struct wmi_unit_test_cmd *wmi_utest); |
| 759 | |
Nachiket Kukade | 74cce66 | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 760 | #ifdef FEATURE_WLAN_APF |
Dustin Brown | 4def316 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 761 | /** |
Nachiket Kukade | e8ce862 | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 762 | * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW |
Nachiket Kukade | 74cce66 | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 763 | * @wmi: the WMI handle |
Dustin Brown | 4def316 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 764 | * @vdev_id: the Id of the vdev to apply the configuration to |
Nachiket Kukade | e8ce862 | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 765 | * @ucast_mode: the active APF mode to configure for unicast packets |
| 766 | * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast |
Dustin Brown | 4def316 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 767 | * packets |
| 768 | */ |
Nachiket Kukade | e8ce862 | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 769 | QDF_STATUS |
Nachiket Kukade | 74cce66 | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 770 | wmi_unified_set_active_apf_mode_cmd(wmi_unified_t wmi, uint8_t vdev_id, |
Nachiket Kukade | e8ce862 | 2018-05-22 12:17:15 +0530 | [diff] [blame] | 771 | enum wmi_host_active_apf_mode ucast_mode, |
| 772 | enum wmi_host_active_apf_mode |
| 773 | mcast_bcast_mode); |
Dustin Brown | 4def316 | 2017-01-13 15:24:07 -0800 | [diff] [blame] | 774 | |
Nachiket Kukade | 74cce66 | 2018-05-25 14:52:55 +0530 | [diff] [blame] | 775 | /** |
| 776 | * wmi_unified_send_apf_enable_cmd() - send apf enable/disable cmd |
| 777 | * @wmi: wmi handle |
| 778 | * @vdev_id: VDEV id |
| 779 | * @enable: true: enable, false: disable |
| 780 | * |
| 781 | * This function passes the apf enable command to fw |
| 782 | * |
| 783 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 784 | */ |
| 785 | QDF_STATUS wmi_unified_send_apf_enable_cmd(wmi_unified_t wmi, |
| 786 | uint32_t vdev_id, bool enable); |
| 787 | |
| 788 | /** |
| 789 | * wmi_unified_send_apf_write_work_memory_cmd() - send cmd to write into the APF |
| 790 | * work memory. |
| 791 | * @wmi: wmi handle |
| 792 | * @write_params: parameters and buffer pointer for the write |
| 793 | * |
| 794 | * This function passes the write apf work mem command to fw |
| 795 | * |
| 796 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 797 | */ |
| 798 | QDF_STATUS wmi_unified_send_apf_write_work_memory_cmd(wmi_unified_t wmi, |
| 799 | struct wmi_apf_write_memory_params *write_params); |
| 800 | |
| 801 | /** |
| 802 | * wmi_unified_send_apf_read_work_memory_cmd() - send cmd to read part of APF |
| 803 | * work memory |
| 804 | * @wmi: wmi handle |
| 805 | * @read_params: contains relative address and length to read from |
| 806 | * |
| 807 | * This function passes the read apf work mem command to fw |
| 808 | * |
| 809 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 810 | */ |
| 811 | QDF_STATUS wmi_unified_send_apf_read_work_memory_cmd(wmi_unified_t wmi, |
| 812 | struct wmi_apf_read_memory_params *read_params); |
| 813 | |
| 814 | /** |
| 815 | * wmi_extract_apf_read_memory_resp_event() - exctract read mem resp event |
| 816 | * @wmi: wmi handle |
| 817 | * @evt_buf: Pointer to the event buffer |
| 818 | * @resp: pointer to memory to extract event parameters into |
| 819 | * |
| 820 | * This function exctracts read mem response event into the given structure ptr |
| 821 | * |
| 822 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 823 | */ |
| 824 | QDF_STATUS |
| 825 | wmi_extract_apf_read_memory_resp_event(wmi_unified_t wmi, void *evt_buf, |
| 826 | struct wmi_apf_read_memory_resp_event_params |
| 827 | *read_mem_evt); |
| 828 | #endif /* FEATURE_WLAN_APF */ |
| 829 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 830 | QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, |
| 831 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 832 | struct stats_request_params *param); |
| 833 | |
Sathish Kumar | 7e2eaed | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 834 | QDF_STATUS wmi_send_get_user_position_cmd(void *wmi_hdl, uint32_t value); |
| 835 | |
| 836 | QDF_STATUS wmi_send_get_peer_mumimo_tx_count_cmd(void *wmi_hdl, uint32_t value); |
| 837 | |
| 838 | QDF_STATUS wmi_send_reset_peer_mumimo_tx_count_cmd(void *wmi_hdl, |
| 839 | uint32_t value); |
| 840 | |
Sathish Kumar | 7e2eaed | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 841 | QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, |
Sathish Kumar | 7e566c5 | 2016-11-10 15:30:22 +0530 | [diff] [blame] | 842 | struct btcoex_cfg_params *param); |
| 843 | |
| 844 | QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, |
| 845 | struct btcoex_cfg_params *param); |
Sathish Kumar | 7e2eaed | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 846 | |
Sathish Kumar | 612d0c2 | 2017-01-19 14:57:37 +0530 | [diff] [blame] | 847 | QDF_STATUS wmi_unified_send_coex_ver_cfg_cmd(void *wmi_hdl, |
| 848 | coex_ver_cfg_t *param); |
| 849 | |
Sathish Kumar | 125754e | 2017-04-24 11:36:00 +0530 | [diff] [blame] | 850 | QDF_STATUS wmi_unified_send_coex_config_cmd(void *wmi_hdl, |
| 851 | struct coex_config_params *param); |
| 852 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 853 | QDF_STATUS wmi_unified_pdev_fips_cmd_send(void *wmi_hdl, |
| 854 | struct fips_params *param); |
| 855 | |
| 856 | QDF_STATUS wmi_unified_wlan_profile_enable_cmd_send(void *wmi_hdl, |
| 857 | struct wlan_profile_params *param); |
| 858 | |
| 859 | QDF_STATUS wmi_unified_wlan_profile_trigger_cmd_send(void *wmi_hdl, |
| 860 | struct wlan_profile_params *param); |
| 861 | |
| 862 | QDF_STATUS wmi_unified_set_chan_cmd_send(void *wmi_hdl, |
| 863 | struct channel_param *param); |
| 864 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 865 | QDF_STATUS wmi_unified_set_ratepwr_table_cmd_send(void *wmi_hdl, |
| 866 | struct ratepwr_table_params *param); |
| 867 | |
| 868 | QDF_STATUS wmi_unified_get_ratepwr_table_cmd_send(void *wmi_hdl); |
| 869 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 870 | QDF_STATUS wmi_unified_set_ratepwr_chainmsk_cmd_send(void *wmi_hdl, |
| 871 | struct ratepwr_chainmsk_params *param); |
| 872 | |
| 873 | QDF_STATUS wmi_unified_set_macaddr_cmd_send(void *wmi_hdl, |
| 874 | struct macaddr_params *param); |
| 875 | |
| 876 | QDF_STATUS wmi_unified_pdev_scan_start_cmd_send(void *wmi_hdl); |
| 877 | |
| 878 | QDF_STATUS wmi_unified_pdev_scan_end_cmd_send(void *wmi_hdl); |
| 879 | |
| 880 | QDF_STATUS wmi_unified_set_acparams_cmd_send(void *wmi_hdl, |
| 881 | struct acparams_params *param); |
| 882 | |
| 883 | QDF_STATUS wmi_unified_set_vap_dscp_tid_map_cmd_send(void *wmi_hdl, |
| 884 | struct vap_dscp_tid_map_params *param); |
| 885 | |
| 886 | QDF_STATUS wmi_unified_proxy_ast_reserve_cmd_send(void *wmi_hdl, |
| 887 | struct proxy_ast_reserve_params *param); |
| 888 | |
Jeevan Kukkalli | 28e8a16 | 2017-06-16 18:07:28 +0530 | [diff] [blame] | 889 | /** |
| 890 | * wmi_unified_set_bridge_mac_addr_cmd_send() - WMI set bridge mac addr cmd function |
| 891 | * @param wmi_hdl : handle to WMI. |
| 892 | * @param param : pointer to hold bridge mac addr param |
| 893 | * |
| 894 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 895 | */ |
| 896 | QDF_STATUS wmi_unified_set_bridge_mac_addr_cmd_send(void *wmi_hdl, |
| 897 | struct set_bridge_mac_addr_params *param); |
| 898 | |
| 899 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 900 | QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); |
| 901 | |
| 902 | QDF_STATUS wmi_unified_phyerr_enable_cmd_send(void *wmi_hdl); |
| 903 | |
| 904 | QDF_STATUS wmi_unified_phyerr_disable_cmd_send(void *wmi_hdl); |
| 905 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 906 | QDF_STATUS wmi_unified_smart_ant_enable_tx_feedback_cmd_send(void *wmi_hdl, |
| 907 | struct smart_ant_enable_tx_feedback_params *param); |
| 908 | |
| 909 | QDF_STATUS wmi_unified_vdev_spectral_configure_cmd_send(void *wmi_hdl, |
| 910 | struct vdev_spectral_configure_params *param); |
| 911 | |
| 912 | QDF_STATUS wmi_unified_vdev_spectral_enable_cmd_send(void *wmi_hdl, |
| 913 | struct vdev_spectral_enable_params *param); |
| 914 | |
| 915 | QDF_STATUS wmi_unified_bss_chan_info_request_cmd_send(void *wmi_hdl, |
| 916 | struct bss_chan_info_request_params *param); |
| 917 | |
| 918 | QDF_STATUS wmi_unified_thermal_mitigation_param_cmd_send(void *wmi_hdl, |
| 919 | struct thermal_mitigation_params *param); |
| 920 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 921 | QDF_STATUS wmi_unified_vdev_set_fwtest_param_cmd_send(void *wmi_hdl, |
| 922 | struct set_fwtest_params *param); |
| 923 | |
Sathish Kumar | 6190e77 | 2017-11-08 14:49:58 +0530 | [diff] [blame] | 924 | /** |
| 925 | * wmi_unified_vdev_set_custom_aggr_size_cmd_send() - WMI set custom aggr |
| 926 | * size command |
| 927 | * @param wmi_hdl : handle to WMI. |
| 928 | * @param param : pointer to hold custom aggr size param |
| 929 | * |
| 930 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 931 | */ |
| 932 | QDF_STATUS wmi_unified_vdev_set_custom_aggr_size_cmd_send(void *wmi_hdl, |
| 933 | struct set_custom_aggr_size_params *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 934 | |
Venkateswara Swamy Bandaru | 81f40dc | 2017-12-22 17:16:19 +0530 | [diff] [blame] | 935 | /** |
| 936 | * wmi_unified_vdev_set_qdepth_thresh_cmd_send() - WMI set qdepth threshold |
| 937 | * @param wmi_hdl : handle to WMI. |
| 938 | * @param param : pointer to hold set qdepth thresh param |
| 939 | * |
| 940 | * @return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 941 | */ |
| 942 | QDF_STATUS wmi_unified_vdev_set_qdepth_thresh_cmd_send(void *wmi_hdl, |
| 943 | struct set_qdepth_thresh_params *param); |
| 944 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 945 | QDF_STATUS wmi_unified_pdev_set_regdomain_cmd_send(void *wmi_hdl, |
| 946 | struct pdev_set_regdomain_params *param); |
| 947 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 948 | QDF_STATUS wmi_unified_set_beacon_filter_cmd_send(void *wmi_hdl, |
| 949 | struct set_beacon_filter_params *param); |
| 950 | |
| 951 | QDF_STATUS wmi_unified_remove_beacon_filter_cmd_send(void *wmi_hdl, |
| 952 | struct remove_beacon_filter_params *param); |
| 953 | |
| 954 | QDF_STATUS wmi_unified_addba_clearresponse_cmd_send(void *wmi_hdl, |
| 955 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 956 | struct addba_clearresponse_params *param); |
| 957 | |
| 958 | QDF_STATUS wmi_unified_addba_send_cmd_send(void *wmi_hdl, |
| 959 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 960 | struct addba_send_params *param); |
| 961 | |
| 962 | QDF_STATUS wmi_unified_delba_send_cmd_send(void *wmi_hdl, |
| 963 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 964 | struct delba_send_params *param); |
| 965 | |
| 966 | QDF_STATUS wmi_unified_addba_setresponse_cmd_send(void *wmi_hdl, |
| 967 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 968 | struct addba_setresponse_params *param); |
| 969 | |
| 970 | QDF_STATUS wmi_unified_singleamsdu_cmd_send(void *wmi_hdl, |
| 971 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 972 | struct singleamsdu_params *param); |
| 973 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 974 | QDF_STATUS wmi_unified_mu_scan_cmd_send(void *wmi_hdl, |
| 975 | struct mu_scan_params *param); |
| 976 | |
| 977 | QDF_STATUS wmi_unified_lteu_config_cmd_send(void *wmi_hdl, |
| 978 | struct lteu_config_params *param); |
| 979 | |
| 980 | QDF_STATUS wmi_unified_set_psmode_cmd_send(void *wmi_hdl, |
| 981 | struct set_ps_mode_params *param); |
| 982 | |
| 983 | QDF_STATUS wmi_unified_init_cmd_send(void *wmi_hdl, |
Kiran Venkatappa | af1dae3 | 2016-12-23 19:58:54 +0530 | [diff] [blame] | 984 | struct wmi_init_cmd_param *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 985 | |
| 986 | bool wmi_service_enabled(void *wmi_hdl, uint32_t service_id); |
| 987 | |
Kiran Venkatappa | 34bea52 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 988 | /** |
| 989 | * wmi_save_service_bitmap() - save service bitmap |
| 990 | * @wmi_handle: wmi handle |
| 991 | * @param evt_buf: pointer to event buffer |
| 992 | * |
| 993 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code |
| 994 | */ |
Rajeev Kumar | 5d8497b | 2017-02-12 02:12:17 -0800 | [diff] [blame] | 995 | QDF_STATUS wmi_save_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 996 | void *bitmap_buf); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 997 | |
Kiran Venkatappa | 34bea52 | 2017-09-01 17:02:34 +0530 | [diff] [blame] | 998 | /** |
| 999 | * wmi_save_ext_service_bitmap() - save extended service bitmap |
| 1000 | * @wmi_handle: wmi handle |
| 1001 | * @param evt_buf: pointer to event buffer |
| 1002 | * |
| 1003 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS failure code |
| 1004 | */ |
| 1005 | QDF_STATUS wmi_save_ext_service_bitmap(void *wmi_hdl, void *evt_buf, |
| 1006 | void *bitmap_buf); |
| 1007 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1008 | QDF_STATUS wmi_save_fw_version(void *wmi_hdl, void *evt_buf); |
| 1009 | |
| 1010 | QDF_STATUS wmi_get_target_cap_from_service_ready(void *wmi_hdl, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1011 | void *evt_buf, |
| 1012 | struct wlan_psoc_target_capability_info *ev); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1013 | |
| 1014 | QDF_STATUS wmi_extract_hal_reg_cap(void *wmi_hdl, void *evt_buf, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1015 | struct wlan_psoc_hal_reg_capability *hal_reg_cap); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1016 | |
| 1017 | host_mem_req *wmi_extract_host_mem_req_from_service_ready(void *wmi_hdl, |
| 1018 | void *evt_buf, uint8_t *num_entries); |
| 1019 | |
| 1020 | uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev); |
| 1021 | |
| 1022 | QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, |
| 1023 | void *ev, uint8_t *macaddr); |
| 1024 | |
Manoj Ekbote | 6649639 | 2017-07-09 23:28:56 -0700 | [diff] [blame] | 1025 | wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev, |
| 1026 | uint8_t *num_mac_addr); |
| 1027 | |
Kiran Venkatappa | a40870a | 2017-11-10 20:50:12 +0530 | [diff] [blame] | 1028 | /** |
| 1029 | * wmi_extract_ready_params() - Extract data from ready event apart from |
| 1030 | * status, macaddr and version. |
| 1031 | * @wmi_handle: Pointer to WMI handle. |
| 1032 | * @evt_buf: Pointer to Ready event buffer. |
| 1033 | * @ev_param: Pointer to host defined struct to copy the data from event. |
| 1034 | * |
| 1035 | * Return: QDF_STATUS_SUCCESS on success. |
| 1036 | */ |
| 1037 | QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl, |
| 1038 | void *evt_buf, struct wmi_host_ready_ev_param *ev_param); |
| 1039 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1040 | QDF_STATUS wmi_extract_fw_version(void *wmi_hdl, |
| 1041 | void *ev, struct wmi_host_fw_ver *fw_ver); |
| 1042 | |
| 1043 | QDF_STATUS wmi_extract_fw_abi_version(void *wmi_hdl, |
| 1044 | void *ev, struct wmi_host_fw_abi_ver *fw_ver); |
| 1045 | |
| 1046 | QDF_STATUS wmi_check_and_update_fw_version(void *wmi_hdl, void *ev); |
| 1047 | |
| 1048 | uint8_t *wmi_extract_dbglog_data_len(void *wmi_hdl, |
Rajeev Kumar | 45fdf7f | 2017-01-25 12:46:21 -0800 | [diff] [blame] | 1049 | void *evt_b, uint32_t *len); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1050 | |
| 1051 | QDF_STATUS wmi_send_ext_resource_config(void *wmi_hdl, |
| 1052 | wmi_host_ext_resource_config *ext_cfg); |
| 1053 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1054 | QDF_STATUS wmi_unified_rtt_meas_req_test_cmd_send(void *wmi_hdl, |
| 1055 | struct rtt_meas_req_test_params *param); |
| 1056 | |
| 1057 | QDF_STATUS wmi_unified_rtt_meas_req_cmd_send(void *wmi_hdl, |
| 1058 | struct rtt_meas_req_params *param); |
| 1059 | |
| 1060 | QDF_STATUS wmi_unified_rtt_keepalive_req_cmd_send(void *wmi_hdl, |
| 1061 | struct rtt_keepalive_req_params *param); |
| 1062 | |
| 1063 | QDF_STATUS wmi_unified_lci_set_cmd_send(void *wmi_hdl, |
| 1064 | struct lci_set_params *param); |
| 1065 | |
| 1066 | QDF_STATUS wmi_unified_lcr_set_cmd_send(void *wmi_hdl, |
| 1067 | struct lcr_set_params *param); |
| 1068 | |
| 1069 | QDF_STATUS wmi_unified_send_periodic_chan_stats_config_cmd(void *wmi_hdl, |
| 1070 | struct periodic_chan_stats_params *param); |
| 1071 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1072 | /* Extract APIs */ |
| 1073 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1074 | QDF_STATUS wmi_extract_fips_event_data(void *wmi_hdl, void *evt_buf, |
Kiran Venkatappa | 9f5fcc0 | 2016-12-29 22:07:14 +0530 | [diff] [blame] | 1075 | struct wmi_host_fips_event_param *param); |
| 1076 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1077 | QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf, |
Himanshu Agarwal | 53d526b | 2017-01-05 14:23:18 +0530 | [diff] [blame] | 1078 | struct mgmt_rx_event_params *hdr, uint8_t **bufp); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1079 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1080 | QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, |
| 1081 | wmi_host_roam_event *ev); |
| 1082 | |
| 1083 | QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf, |
Om Prakash Tripathi | 91452bf | 2017-02-25 15:53:30 +0530 | [diff] [blame] | 1084 | struct scan_event *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1085 | |
| 1086 | QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, |
| 1087 | wmi_host_mu_report_event *param); |
| 1088 | |
Sathish Kumar | 7e2eaed | 2016-11-14 17:44:29 +0530 | [diff] [blame] | 1089 | QDF_STATUS wmi_extract_mu_db_entry(void *wmi_hdl, void *evt_buf, |
| 1090 | uint8_t idx, wmi_host_mu_db_entry *param); |
| 1091 | |
| 1092 | QDF_STATUS wmi_extract_mumimo_tx_count_ev_param(void *wmi_hdl, void *evt_buf, |
| 1093 | wmi_host_peer_txmu_cnt_event *param); |
| 1094 | |
| 1095 | QDF_STATUS wmi_extract_peer_gid_userpos_list_ev_param(void *wmi_hdl, |
| 1096 | void *evt_buf, wmi_host_peer_gid_userpos_list_event *param); |
| 1097 | |
Anirban Sirkhell | 08c0193 | 2017-08-25 16:01:50 +0530 | [diff] [blame] | 1098 | QDF_STATUS |
| 1099 | wmi_extract_esp_estimate_ev_param(void *wmi_hdl, void *evt_buf, |
| 1100 | struct esp_estimation_event *param); |
| 1101 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1102 | QDF_STATUS wmi_extract_gpio_input_ev_param(void *wmi_hdl, |
| 1103 | void *evt_buf, uint32_t *gpio_num); |
| 1104 | |
| 1105 | QDF_STATUS wmi_extract_pdev_reserve_ast_ev_param(void *wmi_hdl, |
Kiran Venkatappa | 3f061a9 | 2017-02-08 14:57:16 +0530 | [diff] [blame] | 1106 | void *evt_buf, struct wmi_host_proxy_ast_reserve_param *param); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1107 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1108 | QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, |
| 1109 | void *evt_buf, |
| 1110 | wmi_host_pdev_generic_buffer_event *param); |
| 1111 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1112 | QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, |
| 1113 | uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap); |
| 1114 | |
Jeff Johnson | 6b8bda4 | 2016-10-07 13:03:02 -0700 | [diff] [blame] | 1115 | QDF_STATUS wmi_extract_bcnflt_stats(void *wmi_hdl, void *evt_buf, |
| 1116 | uint32_t index, wmi_host_bcnflt_stats *bcnflt_stats); |
| 1117 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1118 | QDF_STATUS wmi_extract_rtt_hdr(void *wmi_hdl, void *evt_buf, |
| 1119 | wmi_host_rtt_event_hdr *ev); |
| 1120 | |
| 1121 | QDF_STATUS wmi_extract_rtt_ev(void *wmi_hdl, void *evt_buf, |
| 1122 | wmi_host_rtt_meas_event *ev, uint8_t *hdump, |
| 1123 | uint16_t hdump_len); |
| 1124 | |
| 1125 | QDF_STATUS wmi_extract_rtt_error_report_ev(void *wmi_hdl, void *evt_buf, |
| 1126 | wmi_host_rtt_error_report_event *ev); |
| 1127 | |
Jeff Johnson | 6b8bda4 | 2016-10-07 13:03:02 -0700 | [diff] [blame] | 1128 | QDF_STATUS wmi_extract_chan_stats(void *wmi_hdl, void *evt_buf, |
| 1129 | uint32_t index, wmi_host_chan_stats *chan_stats); |
| 1130 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1131 | QDF_STATUS wmi_extract_thermal_stats(void *wmi_hdl, void *evt_buf, |
Om Prakash Tripathi | 2f54fbb | 2017-04-19 16:57:31 +0530 | [diff] [blame] | 1132 | uint32_t *temp, uint32_t *level, uint32_t *pdev_id); |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1133 | |
| 1134 | QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf, |
| 1135 | uint8_t idx, uint32_t *levelcount, uint32_t *dccount); |
| 1136 | |
| 1137 | QDF_STATUS wmi_extract_comb_phyerr(void *wmi_hdl, void *evt_buf, |
| 1138 | uint16_t datalen, uint16_t *buf_offset, |
| 1139 | wmi_host_phyerr_t *phyerr); |
| 1140 | |
| 1141 | QDF_STATUS wmi_extract_single_phyerr(void *wmi_hdl, void *evt_buf, |
| 1142 | uint16_t datalen, uint16_t *buf_offset, |
| 1143 | wmi_host_phyerr_t *phyerr); |
| 1144 | |
| 1145 | QDF_STATUS wmi_extract_composite_phyerr(void *wmi_hdl, void *evt_buf, |
| 1146 | uint16_t datalen, wmi_host_phyerr_t *phyerr); |
| 1147 | |
| 1148 | QDF_STATUS wmi_extract_profile_ctx(void *wmi_hdl, void *evt_buf, |
| 1149 | wmi_host_wlan_profile_ctx_t *profile_ctx); |
| 1150 | |
Govind Singh | 41da315 | 2016-05-06 20:20:25 +0530 | [diff] [blame] | 1151 | QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx, |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1152 | wmi_host_wlan_profile_t *profile_data); |
| 1153 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1154 | QDF_STATUS wmi_extract_stats_param(void *wmi_hdl, void *evt_buf, |
| 1155 | wmi_host_stats_event *stats_param); |
| 1156 | |
| 1157 | QDF_STATUS wmi_extract_pdev_stats(void *wmi_hdl, void *evt_buf, |
| 1158 | uint32_t index, |
| 1159 | wmi_host_pdev_stats *pdev_stats); |
| 1160 | |
Adil Saeed Musthafa | 0b6c760 | 2017-08-23 17:32:11 -0700 | [diff] [blame] | 1161 | QDF_STATUS wmi_extract_unit_test(void *wmi_hdl, void *evt_buf, |
| 1162 | wmi_unit_test_event *unit_test, uint32_t maxspace); |
| 1163 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1164 | QDF_STATUS wmi_extract_pdev_ext_stats(void *wmi_hdl, void *evt_buf, |
| 1165 | uint32_t index, |
| 1166 | wmi_host_pdev_ext_stats *pdev_ext_stats); |
| 1167 | |
| 1168 | QDF_STATUS wmi_extract_peer_extd_stats(void *wmi_hdl, void *evt_buf, |
| 1169 | uint32_t index, |
| 1170 | wmi_host_peer_extd_stats *peer_extd_stats); |
| 1171 | |
| 1172 | QDF_STATUS wmi_extract_bss_chan_info_event(void *wmi_hdl, void *evt_buf, |
| 1173 | wmi_host_pdev_bss_chan_info_event *bss_chan_info); |
| 1174 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1175 | QDF_STATUS wmi_extract_peer_stats(void *wmi_hdl, void *evt_buf, |
| 1176 | uint32_t index, wmi_host_peer_stats *peer_stats); |
| 1177 | |
| 1178 | QDF_STATUS wmi_extract_tx_data_traffic_ctrl_ev(void *wmi_hdl, void *evt_buf, |
| 1179 | wmi_host_tx_data_traffic_ctrl_event *ev); |
| 1180 | |
| 1181 | QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, |
| 1182 | uint32_t index, wmi_host_vdev_stats *vdev_stats); |
| 1183 | |
Naveen Rawat | 9734fa9 | 2018-04-12 08:17:55 -0700 | [diff] [blame] | 1184 | QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 1185 | uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats); |
| 1186 | |
Govind Singh | 8972788 | 2016-04-15 13:58:27 +0530 | [diff] [blame] | 1187 | QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, |
| 1188 | uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats); |
Govind Singh | c10bde8 | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 1189 | |
Gurumoorthi Gnanasambandhan | 1897755 | 2017-11-06 22:04:17 +0530 | [diff] [blame] | 1190 | QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf, |
| 1191 | uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats); |
| 1192 | |
Chaithanya Garrepalli | 140a053 | 2018-01-18 14:19:41 +0530 | [diff] [blame] | 1193 | /** |
| 1194 | * wmi_extract_vdev_nac_rssi_stats() - extract NAC_RSSI stats from event |
| 1195 | * @wmi_handle: wmi handle |
| 1196 | * @param evt_buf: pointer to event buffer |
| 1197 | * @param vdev_extd_stats: Pointer to hold nac rssi stats |
| 1198 | * |
| 1199 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1200 | */ |
| 1201 | QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, |
| 1202 | struct wmi_host_vdev_nac_rssi_event *vdev_nac_rssi_stats); |
| 1203 | |
Govind Singh | c10bde8 | 2016-05-02 17:59:24 +0530 | [diff] [blame] | 1204 | QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, |
| 1205 | struct wmi_power_dbg_params *param); |
Sathish Kumar | 907a746 | 2017-02-27 10:35:40 +0530 | [diff] [blame] | 1206 | |
Jeff Johnson | efb4339 | 2017-12-14 15:50:16 -0800 | [diff] [blame] | 1207 | /** |
Kabilan Kannan | a348b62 | 2018-06-21 16:55:47 -0700 | [diff] [blame] | 1208 | * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from |
| 1209 | * FW service ready event |
| 1210 | * @wmi_hdl: wmi handle |
| 1211 | * @evt_buf: event buffer received from firmware |
| 1212 | * @ext_param: extended target info |
| 1213 | * |
| 1214 | * Return: QDF_STATUS_SUCCESS for success or error code |
| 1215 | */ |
| 1216 | QDF_STATUS wmi_extract_sar_cap_service_ready_ext( |
| 1217 | void *wmi_hdl, |
| 1218 | uint8_t *evt_buf, |
| 1219 | struct wlan_psoc_host_service_ext_param *ext_param); |
| 1220 | |
Anurag Chouhan | 4d41be7 | 2016-07-22 20:19:54 +0530 | [diff] [blame] | 1221 | QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, |
| 1222 | struct set_fwtest_params *wmi_fwtest); |
| 1223 | |
Leo Chang | 8184e9c | 2016-09-28 13:43:36 -0700 | [diff] [blame] | 1224 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_setup_send(void *wmi_hdl, |
| 1225 | struct rx_reorder_queue_setup_params *param); |
| 1226 | QDF_STATUS wmi_unified_peer_rx_reorder_queue_remove_send(void *wmi_hdl, |
| 1227 | struct rx_reorder_queue_remove_params *param); |
Kiran Venkatappa | 9c71b36 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 1228 | |
| 1229 | QDF_STATUS wmi_extract_service_ready_ext(void *wmi_hdl, uint8_t *evt_buf, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1230 | struct wlan_psoc_host_service_ext_param *param); |
Kiran Venkatappa | 9c71b36 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 1231 | QDF_STATUS wmi_extract_hw_mode_cap_service_ready_ext( |
| 1232 | void *wmi_hdl, |
| 1233 | uint8_t *evt_buf, uint8_t hw_mode_idx, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1234 | struct wlan_psoc_host_hw_mode_caps *param); |
Kiran Venkatappa | 9c71b36 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 1235 | QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( |
| 1236 | void *wmi_hdl, |
Kiran Venkatappa | 176fe6c | 2016-12-26 15:38:06 +0530 | [diff] [blame] | 1237 | uint8_t *evt_buf, |
| 1238 | uint8_t hw_mode_id, |
| 1239 | uint8_t phy_id, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1240 | struct wlan_psoc_host_mac_phy_caps *param); |
Kiran Venkatappa | 9c71b36 | 2016-08-10 23:55:40 +0530 | [diff] [blame] | 1241 | QDF_STATUS wmi_extract_reg_cap_service_ready_ext( |
| 1242 | void *wmi_hdl, |
| 1243 | uint8_t *evt_buf, uint8_t phy_idx, |
Rajeev Kumar | 0b6b285 | 2017-02-03 00:39:49 -0800 | [diff] [blame] | 1244 | struct wlan_psoc_host_hal_reg_capabilities_ext *param); |
Sathish Kumar | 3d3cf4f | 2017-11-17 17:30:41 +0530 | [diff] [blame] | 1245 | |
| 1246 | /** |
| 1247 | * wmi_extract_dbr_ring_cap_service_ready_ext: Extract direct buffer rx |
| 1248 | * capability received through |
| 1249 | * extended service ready event |
| 1250 | * @wmi_hdl: WMI handle |
| 1251 | * @evt_buf: Event buffer |
| 1252 | * @idx: Index of the module for which capability is received |
| 1253 | * @param: Pointer to direct buffer rx ring cap struct |
| 1254 | * |
| 1255 | * Return: QDF status of operation |
| 1256 | */ |
| 1257 | QDF_STATUS wmi_extract_dbr_ring_cap_service_ready_ext( |
| 1258 | void *wmi_hdl, |
| 1259 | uint8_t *evt_buf, uint8_t idx, |
| 1260 | struct wlan_psoc_host_dbr_ring_caps *param); |
| 1261 | |
Sathish Kumar | 617535c | 2017-01-24 17:51:26 +0530 | [diff] [blame] | 1262 | QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, |
| 1263 | uint8_t *evt_buf, |
| 1264 | struct wmi_host_pdev_utf_event *param); |
Vijay Pamidipati | add0ba7 | 2017-01-17 12:53:05 +0530 | [diff] [blame] | 1265 | |
Kiran Venkatappa | 3d51498 | 2017-02-28 14:19:17 +0530 | [diff] [blame] | 1266 | QDF_STATUS wmi_extract_pdev_qvit_event(void *wmi_hdl, |
| 1267 | uint8_t *evt_buf, |
| 1268 | struct wmi_host_pdev_qvit_event *param); |
| 1269 | |
Vikram Kandukuri | c83feb6 | 2017-03-07 18:40:13 +0530 | [diff] [blame] | 1270 | QDF_STATUS wmi_extract_chainmask_tables(void *wmi_hdl, uint8_t *evt_buf, |
| 1271 | struct wlan_psoc_host_chainmask_table *chainmask_table); |
Arif Hussain | 85604fb | 2017-01-07 18:21:55 -0800 | [diff] [blame] | 1272 | /** |
| 1273 | * wmi_unified_dfs_phyerr_offload_en_cmd() - enable dfs phyerr offload |
| 1274 | * @wmi_handle: wmi handle |
| 1275 | * @pdev_id: pdev id |
| 1276 | * |
| 1277 | * Return: QDF_STATUS |
| 1278 | */ |
| 1279 | QDF_STATUS wmi_unified_dfs_phyerr_offload_en_cmd(void *wmi_hdl, |
| 1280 | uint32_t pdev_id); |
| 1281 | |
| 1282 | /** |
| 1283 | * wmi_unified_dfs_phyerr_offload_dis_cmd() - disable dfs phyerr offload |
| 1284 | * @wmi_handle: wmi handle |
| 1285 | * @pdev_id: pdev id |
| 1286 | * |
| 1287 | * Return: QDF_STATUS |
| 1288 | */ |
| 1289 | QDF_STATUS wmi_unified_dfs_phyerr_offload_dis_cmd(void *wmi_hdl, |
| 1290 | uint32_t pdev_id); |
Dustin Brown | e58fbc7 | 2017-04-03 17:00:07 -0700 | [diff] [blame] | 1291 | |
Kiran Kumar Lokere | e70e605 | 2017-04-24 00:56:03 -0700 | [diff] [blame] | 1292 | QDF_STATUS wmi_unified_set_country_cmd_send(void *wmi_hdl, |
| 1293 | struct set_country *param); |
Rajeev Kumar Sirasanagandla | 9d7a69f | 2017-09-18 16:47:52 +0530 | [diff] [blame] | 1294 | |
| 1295 | #ifdef WLAN_FEATURE_ACTION_OUI |
| 1296 | /** |
| 1297 | * wmi_unified_send_action_oui_cmd() - send action oui cmd to fw |
| 1298 | * @wmi_hdl: wma handle |
| 1299 | * @req: wmi action oui message to be send |
| 1300 | * |
| 1301 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1302 | */ |
| 1303 | QDF_STATUS |
| 1304 | wmi_unified_send_action_oui_cmd(void *wmi_hdl, |
| 1305 | struct action_oui_request *req); |
| 1306 | #endif /* WLAN_FEATURE_ACTION_OUI */ |
| 1307 | |
Rajeev Kumar Sirasanagandla | cddf6fe | 2016-11-22 21:28:54 +0530 | [diff] [blame] | 1308 | /** |
| 1309 | * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value |
| 1310 | * @wmi_hdl: wma handle |
| 1311 | * @get_rcpi_param: rcpi params |
| 1312 | * |
| 1313 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1314 | */ |
| 1315 | QDF_STATUS wmi_unified_send_request_get_rcpi_cmd(void *wmi_hdl, |
| 1316 | struct rcpi_req *get_rcpi_param); |
| 1317 | |
| 1318 | /** |
| 1319 | * wmi_extract_rcpi_response_event - api to extract RCPI event params |
| 1320 | * @wmi_handle: wma handle |
| 1321 | * @evt_buf: pointer to event buffer |
| 1322 | * @res: pointer to hold rcpi response from firmware |
| 1323 | * |
| 1324 | * Return: QDF_STATUS_SUCCESS for successful event parse |
| 1325 | * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE |
| 1326 | */ |
| 1327 | QDF_STATUS wmi_extract_rcpi_response_event(void *wmi_hdl, void *evt_buf, |
| 1328 | struct rcpi_res *res); |
| 1329 | |
Dustin Brown | e58fbc7 | 2017-04-03 17:00:07 -0700 | [diff] [blame] | 1330 | #ifdef WMI_INTERFACE_EVENT_LOGGING |
| 1331 | void wmi_print_cmd_log(wmi_unified_t wmi, uint32_t count, |
| 1332 | qdf_abstract_print *print, void *print_priv); |
| 1333 | |
| 1334 | void wmi_print_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, |
| 1335 | qdf_abstract_print *print, void *print_priv); |
| 1336 | |
| 1337 | void wmi_print_mgmt_cmd_log(wmi_unified_t wmi, uint32_t count, |
| 1338 | qdf_abstract_print *print, void *print_priv); |
| 1339 | |
| 1340 | void wmi_print_mgmt_cmd_tx_cmp_log(wmi_unified_t wmi, uint32_t count, |
| 1341 | qdf_abstract_print *print, void *print_priv); |
| 1342 | |
| 1343 | void wmi_print_event_log(wmi_unified_t wmi, uint32_t count, |
| 1344 | qdf_abstract_print *print, void *print_priv); |
| 1345 | |
| 1346 | void wmi_print_rx_event_log(wmi_unified_t wmi, uint32_t count, |
| 1347 | qdf_abstract_print *print, void *print_priv); |
| 1348 | |
| 1349 | void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count, |
| 1350 | qdf_abstract_print *print, void *print_priv); |
Kiran Kumar Lokere | e70e605 | 2017-04-24 00:56:03 -0700 | [diff] [blame] | 1351 | |
Dustin Brown | e58fbc7 | 2017-04-03 17:00:07 -0700 | [diff] [blame] | 1352 | #endif /* WMI_INTERFACE_EVENT_LOGGING */ |
| 1353 | |
Kiran Venkatappa | f9b1de3 | 2017-11-08 19:32:23 +0530 | [diff] [blame] | 1354 | /** |
Rathees kumar Chinannan | aff64b0 | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 1355 | * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of |
| 1356 | * wds entries from FW |
Arif Hussain | 2cfde1d | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 1357 | * @wmi_hdl: wmi handle |
Rathees kumar Chinannan | aff64b0 | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 1358 | * |
| 1359 | * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. |
| 1360 | * |
| 1361 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 1362 | */ |
| 1363 | |
| 1364 | QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl); |
| 1365 | |
| 1366 | /** |
| 1367 | * wmi_extract_wds_entry - api to extract wds entry |
Arif Hussain | 2cfde1d | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 1368 | * @wmi_hdl: wmi handle |
Rathees kumar Chinannan | aff64b0 | 2017-11-22 17:03:57 +0530 | [diff] [blame] | 1369 | * @evt_buf: pointer to event buffer |
| 1370 | * @wds_entry: wds entry |
| 1371 | * @idx: index to point wds entry in event buffer |
| 1372 | * |
| 1373 | * Return: QDF_STATUS_SUCCESS for successful event parse |
| 1374 | * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE |
| 1375 | */ |
| 1376 | |
| 1377 | QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, |
| 1378 | struct wdsentry *wds_entry, u_int32_t idx); |
Naveen Rawat | 79a787c | 2017-12-14 13:24:31 -0800 | [diff] [blame] | 1379 | |
Arif Hussain | 2cfde1d | 2017-12-27 16:23:45 -0800 | [diff] [blame] | 1380 | /** |
| 1381 | * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss |
| 1382 | * detection configuration to FW. |
| 1383 | * @wmi_hdl: wmi handle |
| 1384 | * @cfg: obss detection configuration |
| 1385 | * |
| 1386 | * Send WMI_SAP_OBSS_DETECTION_CFG_CMDID parameters to fw. |
| 1387 | * |
| 1388 | * Return: QDF_STATUS |
| 1389 | */ |
| 1390 | |
| 1391 | QDF_STATUS wmi_unified_send_obss_detection_cfg_cmd(void *wmi_hdl, |
| 1392 | struct wmi_obss_detection_cfg_param *cfg); |
Arif Hussain | f9f26b5 | 2018-01-12 13:15:04 -0800 | [diff] [blame] | 1393 | |
| 1394 | /** |
| 1395 | * wmi_unified_extract_obss_detection_info() - WMI function to extract obss |
| 1396 | * detection info from FW. |
| 1397 | * @wmi_hdl: wmi handle |
| 1398 | * @data: event data from firmware |
| 1399 | * @info: Pointer to hold obss detection info |
| 1400 | * |
| 1401 | * This function is used to extract obss info from firmware. |
| 1402 | * |
| 1403 | * Return: QDF_STATUS |
| 1404 | */ |
| 1405 | |
| 1406 | QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, |
| 1407 | uint8_t *data, |
| 1408 | struct wmi_obss_detect_info |
| 1409 | *info); |
| 1410 | |
Himanshu Agarwal | 3f5d65a | 2018-01-24 22:24:17 +0530 | [diff] [blame] | 1411 | #ifdef WLAN_SUPPORT_GREEN_AP |
| 1412 | QDF_STATUS wmi_extract_green_ap_egap_status_info( |
| 1413 | void *wmi_hdl, uint8_t *evt_buf, |
| 1414 | struct wlan_green_ap_egap_status_info *egap_status_info_params); |
| 1415 | #endif |
| 1416 | |
Vignesh Viswanathan | 51994e3 | 2018-01-18 19:06:40 +0530 | [diff] [blame] | 1417 | /** |
Rajeev Kumar Sirasanagandla | dfa2486 | 2018-03-02 21:12:16 +0530 | [diff] [blame] | 1418 | * wmi_unified_send_roam_scan_stats_cmd() - Wrapper to request roam scan stats |
| 1419 | * @wmi_hdl: wmi handle |
| 1420 | * @params: request params |
| 1421 | * |
| 1422 | * This function is used to send the roam scan stats request command to |
| 1423 | * firmware. |
| 1424 | * |
| 1425 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1426 | */ |
| 1427 | QDF_STATUS |
| 1428 | wmi_unified_send_roam_scan_stats_cmd(void *wmi_hdl, |
| 1429 | struct wmi_roam_scan_stats_req *params); |
| 1430 | |
| 1431 | /** |
| 1432 | * wmi_extract_roam_scan_stats_res_evt() - API to extract roam scan stats res |
| 1433 | * @wmi: wmi handle |
| 1434 | * @evt_buf: pointer to the event buffer |
| 1435 | * @vdev_id: output pointer to hold vdev id |
| 1436 | * @res_param: output pointer to hold extracted memory |
| 1437 | * |
| 1438 | * Return: QDF_STATUS |
| 1439 | */ |
| 1440 | QDF_STATUS |
| 1441 | wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, |
| 1442 | uint32_t *vdev_id, |
| 1443 | struct wmi_roam_scan_stats_res **res_param); |
Gyanranjan Hazarika | 97b1c5a | 2018-10-04 11:26:20 -0700 | [diff] [blame] | 1444 | |
| 1445 | /** |
| 1446 | * wmi_extract_offload_bcn_tx_status_evt() - API to extract bcn tx status event |
| 1447 | * @wmi: wmi handle |
| 1448 | * @evt_buf: pointer to the event buffer |
| 1449 | * @vdev_id: output pointer to hold vdev id |
| 1450 | * @tx_status: output pointer to hold bcn tx status |
| 1451 | * |
| 1452 | * Return: QDF_STATUS |
| 1453 | */ |
| 1454 | QDF_STATUS |
| 1455 | wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf, |
| 1456 | uint32_t *vdev_id, uint32_t *tx_status); |
Naveen Rawat | 1d095b0 | 2018-02-02 15:13:05 -0800 | [diff] [blame] | 1457 | |
Naveen Rawat | 13dbfb7 | 2018-02-02 15:18:33 -0800 | [diff] [blame] | 1458 | /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width |
| 1459 | * @wmi_hdl: wmi handle |
| 1460 | * @phymode: phy mode |
| 1461 | * |
| 1462 | * Return: wmi channel width |
| 1463 | */ |
| 1464 | wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, |
| 1465 | WMI_HOST_WLAN_PHY_MODE phymode); |
| 1466 | |
Naveen Rawat | 96afb7f | 2018-04-13 16:38:36 -0700 | [diff] [blame] | 1467 | #ifdef QCA_SUPPORT_CP_STATS |
| 1468 | /** |
| 1469 | * wmi_extract_cca_stats() - api to extract congestion stats from event buffer |
| 1470 | * @wmi_handle: wma handle |
| 1471 | * @evt_buf: event buffer |
| 1472 | * @datalen: length of buffer |
| 1473 | * @stats: buffer to populated after stats extraction |
| 1474 | * |
| 1475 | * Return: status of operation |
| 1476 | */ |
| 1477 | QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf, |
| 1478 | struct wmi_host_congestion_stats *stats); |
| 1479 | #endif /* QCA_SUPPORT_CP_STATS */ |
| 1480 | |
Shashikala Prabhu | 6c90a3e | 2018-05-16 10:08:09 +0530 | [diff] [blame] | 1481 | #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) |
| 1482 | /** |
| 1483 | * wmi_unified_dfs_send_avg_params_cmd() - send average radar parameters cmd. |
| 1484 | * @wmi_hdl: wmi handle |
| 1485 | * @params: radar found params |
| 1486 | * |
| 1487 | * This function passes the average radar parameters to fw |
| 1488 | * |
| 1489 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1490 | */ |
| 1491 | QDF_STATUS |
| 1492 | wmi_unified_dfs_send_avg_params_cmd(void *wmi_hdl, |
| 1493 | struct dfs_radar_found_params *params); |
| 1494 | |
| 1495 | /** |
| 1496 | * wmi_extract_dfs_status_from_fw() - extract host dfs status from fw. |
| 1497 | * @wmi_hdl: wmi handle |
| 1498 | * @evt_buf: pointer to event buffer |
| 1499 | * @dfs_status_check: pointer to the host dfs status |
| 1500 | * |
| 1501 | * This function extracts the result of host dfs from fw |
| 1502 | * |
| 1503 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1504 | */ |
| 1505 | QDF_STATUS wmi_extract_dfs_status_from_fw(void *wmi_hdl, void *evt_buf, |
| 1506 | uint32_t *dfs_status_check); |
| 1507 | #endif |
c_cgodav | a5eb9a2 | 2017-02-13 10:14:42 +0530 | [diff] [blame] | 1508 | #ifdef OL_ATH_SMART_LOGGING |
| 1509 | /** |
| 1510 | * wmi_unified_send_smart_logging_enable_cmd() - send smart logging enable cmd |
| 1511 | * @wmi_hdl: wmi handle |
| 1512 | * @params: enable/disable |
| 1513 | * |
| 1514 | * This function enables/disable the smart logging feature |
| 1515 | * |
| 1516 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1517 | */ |
| 1518 | QDF_STATUS wmi_unified_send_smart_logging_enable_cmd(void *wmi_hdl, |
| 1519 | uint32_t param); |
| 1520 | |
| 1521 | /** |
| 1522 | * wmi_unified_send_smart_logging_fatal_cmd() - send smart logging fatal cmd |
| 1523 | * @wmi_hdl: wmi handle |
| 1524 | * @param: Fatal event |
| 1525 | * |
| 1526 | * This function sends the smart log fatal events to the FW |
| 1527 | * |
| 1528 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1529 | */ |
| 1530 | QDF_STATUS wmi_unified_send_smart_logging_fatal_cmd |
| 1531 | (void *wmi_hdl, |
| 1532 | struct wmi_debug_fatal_events *param); |
| 1533 | |
| 1534 | /** |
| 1535 | * wmi_extract_smartlog_ev() - extract smartlog event info from event |
| 1536 | * @wmi_handle: wmi handle |
| 1537 | * @param evt_buf: pointer to event buffer |
| 1538 | * @param ev: Pointer to hold fatal events |
| 1539 | * |
| 1540 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1541 | */ |
| 1542 | QDF_STATUS wmi_extract_smartlog_ev |
| 1543 | (void *wmi_hdl, void *evt_buf, |
| 1544 | struct wmi_debug_fatal_events *ev); |
Amar Singhal | 07f8314 | 2018-06-26 16:45:54 -0700 | [diff] [blame] | 1545 | |
c_cgodav | a5eb9a2 | 2017-02-13 10:14:42 +0530 | [diff] [blame] | 1546 | #endif /* OL_ATH_SMART_LOGGING */ |
Amar Singhal | 07f8314 | 2018-06-26 16:45:54 -0700 | [diff] [blame] | 1547 | |
| 1548 | void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle, |
| 1549 | HTC_PACKET * htc_packet); |
| 1550 | |
Pratik Gandhi | 13b34f8 | 2018-09-17 16:47:12 +0530 | [diff] [blame] | 1551 | #ifdef OBSS_PD |
| 1552 | /** |
| 1553 | * wmi_extract_smartlog_ev() - extract smartlog event info from event |
| 1554 | * @wmi_handle: wmi handle |
| 1555 | * @param evt_buf: pointer to event buffer |
| 1556 | * @param ev: Pointer to hold fatal events |
| 1557 | * |
| 1558 | * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure |
| 1559 | */ |
| 1560 | QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_handle, |
| 1561 | struct wmi_host_obss_spatial_reuse_set_param *obss_spatial_reuse_param); |
| 1562 | #endif /* OBSS_PD */ |
Shashikala Prabhu | 9032a3c | 2018-09-24 13:54:23 +0530 | [diff] [blame] | 1563 | |
| 1564 | /** |
| 1565 | * wmi_convert_pdev_id_host_to_target() - Convert pdev_id from host to target |
| 1566 | * defines. For legacy there is not conversion required. Just return pdev_id as |
| 1567 | * it is. |
| 1568 | * @wmi_hdl: wmi handle |
| 1569 | * @host_pdev_id: host pdev_id to be converted. |
| 1570 | * @target_pdev_id: Output target pdev id. |
| 1571 | * |
| 1572 | * Return: QDF_STATUS |
| 1573 | */ |
| 1574 | QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl, |
| 1575 | uint32_t host_pdev_id, |
| 1576 | uint32_t *target_pdev_id); |
Qiwei Cai | 1f36626 | 2018-09-17 19:17:13 +0800 | [diff] [blame] | 1577 | |
| 1578 | /** |
| 1579 | * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss |
| 1580 | * color change enable to FW. |
| 1581 | * @wmi_hdl: wmi handle |
| 1582 | * @vdev_id: vdev ID |
| 1583 | * @enable: enable or disable color change handeling within firmware |
| 1584 | * |
| 1585 | * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw, |
| 1586 | * thereby firmware updates bss color when AP announces bss color change. |
| 1587 | * |
| 1588 | * Return: QDF_STATUS |
| 1589 | */ |
| 1590 | QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, |
| 1591 | uint32_t vdev_id, |
| 1592 | bool enable); |
| 1593 | |
| 1594 | /** |
| 1595 | * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss |
| 1596 | * color collision detection configuration to FW. |
| 1597 | * @wmi_hdl: wmi handle |
| 1598 | * @cfg: obss color collision detection configuration |
| 1599 | * |
| 1600 | * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw. |
| 1601 | * |
| 1602 | * Return: QDF_STATUS |
| 1603 | */ |
| 1604 | QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, |
| 1605 | struct wmi_obss_color_collision_cfg_param *cfg); |
| 1606 | |
| 1607 | /** |
| 1608 | * wmi_unified_extract_obss_color_collision_info() - WMI function to extract |
| 1609 | * obss color collision info from FW. |
| 1610 | * @wmi_hdl: wmi handle |
| 1611 | * @data: event data from firmware |
| 1612 | * @info: Pointer to hold bss color collision info |
| 1613 | * |
| 1614 | * This function is used to extract bss collision info from firmware. |
| 1615 | * |
| 1616 | * Return: QDF_STATUS |
| 1617 | */ |
| 1618 | QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, |
| 1619 | uint8_t *data, struct wmi_obss_color_collision_info *info); |
| 1620 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 1621 | #endif /* _WMI_UNIFIED_API_H_ */ |