Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /* |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 29 | * This file contains the API definitions for the Unified Wireless |
| 30 | * Module Interface (WMI). |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 31 | */ |
| 32 | #ifndef _WMI_UNIFIED_PRIV_H_ |
| 33 | #define _WMI_UNIFIED_PRIV_H_ |
| 34 | #include <osdep.h> |
| 35 | #include "a_types.h" |
| 36 | #include "wmi.h" |
| 37 | #include "wmi_unified.h" |
| 38 | #include "cdf_atomic.h" |
| 39 | |
| 40 | #define WMI_UNIFIED_MAX_EVENT 0x100 |
| 41 | #define WMI_MAX_CMDS 1024 |
| 42 | |
| 43 | typedef cdf_nbuf_t wmi_buf_t; |
| 44 | |
| 45 | #ifdef WMI_INTERFACE_EVENT_LOGGING |
| 46 | |
| 47 | #define WMI_EVENT_DEBUG_MAX_ENTRY (1024) |
| 48 | |
| 49 | struct wmi_command_debug { |
| 50 | uint32_t command; |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 51 | uint32_t data[4]; /*16 bytes of WMI cmd excluding TLV and WMI headers */ |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 52 | uint64_t time; |
| 53 | }; |
| 54 | |
| 55 | struct wmi_event_debug { |
| 56 | uint32_t event; |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 57 | uint32_t data[4]; /*16 bytes of WMI event data excluding TLV header */ |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 58 | uint64_t time; |
| 59 | }; |
| 60 | |
| 61 | #endif /*WMI_INTERFACE_EVENT_LOGGING */ |
| 62 | |
| 63 | #ifdef WLAN_OPEN_SOURCE |
| 64 | struct fwdebug { |
| 65 | struct sk_buff_head fwlog_queue; |
| 66 | struct completion fwlog_completion; |
| 67 | A_BOOL fwlog_open; |
| 68 | }; |
| 69 | #endif /* WLAN_OPEN_SOURCE */ |
| 70 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 71 | struct wmi_ops { |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 72 | CDF_STATUS (*send_vdev_create_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 73 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 74 | struct vdev_create_params *param); |
| 75 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 76 | CDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 77 | uint8_t if_id); |
| 78 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 79 | CDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 80 | uint8_t vdev_id); |
| 81 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 82 | CDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 83 | uint8_t vdev_id); |
| 84 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 85 | CDF_STATUS (*send_peer_flush_tids_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 86 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 87 | struct peer_flush_params *param); |
| 88 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 89 | CDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 90 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 91 | uint8_t vdev_id); |
| 92 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 93 | CDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 94 | uint8_t peer_addr[IEEE80211_ADDR_LEN], |
| 95 | struct peer_set_params *param); |
| 96 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 97 | CDF_STATUS (*send_vdev_up_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 98 | uint8_t bssid[IEEE80211_ADDR_LEN], |
| 99 | struct vdev_up_params *params); |
| 100 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 101 | CDF_STATUS (*send_peer_create_cmd)(wmi_unified_t wmi, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 102 | struct peer_create_params *param); |
| 103 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 104 | CDF_STATUS (*send_green_ap_ps_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 105 | uint32_t value, uint8_t mac_id); |
| 106 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 107 | CDF_STATUS |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 108 | (*send_pdev_utf_cmd)(wmi_unified_t wmi_handle, |
| 109 | struct pdev_utf_params *param, |
| 110 | uint8_t mac_id); |
| 111 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 112 | CDF_STATUS |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 113 | (*send_pdev_param_cmd)(wmi_unified_t wmi_handle, |
| 114 | struct pdev_params *param, |
| 115 | uint8_t mac_id); |
| 116 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 117 | CDF_STATUS (*send_suspend_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 118 | struct suspend_params *param, |
| 119 | uint8_t mac_id); |
| 120 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 121 | CDF_STATUS (*send_resume_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 122 | uint8_t mac_id); |
| 123 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 124 | CDF_STATUS (*send_wow_enable_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 125 | struct wow_cmd_params *param, |
| 126 | uint8_t mac_id); |
| 127 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 128 | CDF_STATUS (*send_set_ap_ps_param_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 129 | uint8_t *peer_addr, |
| 130 | struct ap_ps_params *param); |
| 131 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 132 | CDF_STATUS (*send_set_sta_ps_param_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 133 | struct sta_ps_params *param); |
| 134 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 135 | CDF_STATUS (*send_crash_inject_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 136 | struct crash_inject *param); |
| 137 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 138 | CDF_STATUS |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 139 | (*send_dbglog_cmd)(wmi_unified_t wmi_handle, |
| 140 | struct dbglog_params *dbglog_param); |
| 141 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 142 | CDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 143 | struct vdev_set_params *param); |
| 144 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 145 | CDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 146 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 147 | struct stats_request_params *param); |
| 148 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 149 | CDF_STATUS (*send_packet_log_enable_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 150 | uint8_t macaddr[IEEE80211_ADDR_LEN], |
| 151 | struct packet_enable_params *param); |
| 152 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 153 | CDF_STATUS (*send_beacon_send_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 154 | struct beacon_params *param); |
| 155 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 156 | CDF_STATUS (*send_peer_assoc_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 157 | struct peer_assoc_params *param); |
| 158 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 159 | CDF_STATUS (*send_scan_start_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 160 | struct scan_start_params *param); |
| 161 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 162 | CDF_STATUS (*send_scan_stop_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 163 | struct scan_stop_params *param); |
| 164 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 165 | CDF_STATUS (*send_scan_chan_list_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 166 | struct scan_chan_list_params *param); |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 167 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 168 | CDF_STATUS (*send_mgmt_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 169 | struct wmi_mgmt_params *param); |
| 170 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 171 | CDF_STATUS (*send_modem_power_state_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 172 | uint32_t param_value); |
| 173 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 174 | CDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 175 | uint32_t vdev_id, uint8_t val); |
| 176 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 177 | CDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle); |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 178 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 179 | CDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 180 | struct p2p_ps_params *oppps); |
| 181 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 182 | CDF_STATUS (*send_set_p2pgo_noa_req_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 183 | struct p2p_ps_params *noa); |
| 184 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 185 | CDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle, |
| 186 | uint8_t vdev_id, |
| 187 | int value); |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 188 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 189 | CDF_STATUS (*send_set_mimops_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 190 | uint8_t vdev_id, int value); |
| 191 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 192 | CDF_STATUS (*send_set_sta_uapsd_auto_trig_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 50988cc | 2016-02-26 18:09:36 +0530 | [diff] [blame] | 193 | struct sta_uapsd_trig_params *param); |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 194 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 195 | CDF_STATUS (*send_ocb_set_utc_time_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 196 | struct ocb_utc_param *utc); |
| 197 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 198 | CDF_STATUS (*send_ocb_get_tsf_timer_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 199 | uint8_t vdev_id); |
| 200 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 201 | CDF_STATUS (*send_ocb_start_timing_advert_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 202 | struct ocb_timing_advert_param *timing_advert); |
| 203 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 204 | CDF_STATUS (*send_ocb_stop_timing_advert_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 205 | struct ocb_timing_advert_param *timing_advert); |
| 206 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 207 | CDF_STATUS (*send_dcc_get_stats_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 208 | struct dcc_get_stats_param *get_stats_param); |
| 209 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 210 | CDF_STATUS (*send_dcc_clear_stats_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 211 | uint32_t vdev_id, uint32_t dcc_stats_bitmap); |
| 212 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 213 | CDF_STATUS (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 214 | struct dcc_update_ndl_param *update_ndl_param); |
| 215 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 216 | CDF_STATUS (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | e7b800c | 2016-03-01 15:30:53 +0530 | [diff] [blame] | 217 | struct ocb_config_param *config, uint32_t *ch_mhz); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 218 | |
| 219 | CDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 220 | struct wmi_lro_config_cmd_t *wmi_lro_cmd); |
| 221 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 222 | CDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle, |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 223 | struct thermal_cmd_params *thermal_info); |
| 224 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 225 | CDF_STATUS (*send_set_mcc_channel_time_quota_cmd) |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 226 | (wmi_unified_t wmi_handle, |
| 227 | uint32_t adapter_1_chan_freq, |
| 228 | uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq); |
| 229 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 230 | CDF_STATUS (*send_set_mcc_channel_time_latency_cmd) |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 231 | (wmi_unified_t wmi_handle, |
| 232 | uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency); |
| 233 | |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 234 | CDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)( |
Govind Singh | 9bad000 | 2016-03-01 15:54:59 +0530 | [diff] [blame] | 235 | wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler); |
Govind Singh | ae85536 | 2016-03-07 14:24:22 +0530 | [diff] [blame] | 236 | |
| 237 | CDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle, |
| 238 | A_UINT32 vdev_id, uint8_t *p2p_ie); |
| 239 | |
| 240 | CDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle, |
| 241 | uint8_t vdev_id, |
| 242 | struct wmi_probe_resp_params *probe_rsp_info, |
| 243 | uint8_t *frm); |
| 244 | |
| 245 | CDF_STATUS (*send_process_update_edca_param_cmd)(wmi_unified_t wmi_handle, |
| 246 | uint8_t vdev_id, |
| 247 | wmi_wmm_vparams gwmm_param[WMI_MAX_NUM_AC]); |
| 248 | |
| 249 | CDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle, |
| 250 | uint32_t if_id, |
| 251 | struct wmi_gtx_config *gtx_info); |
| 252 | |
| 253 | CDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle, |
| 254 | struct sta_params *params); |
| 255 | |
| 256 | CDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle, |
| 257 | uint8_t vdev_id, uint32_t max_retries, |
| 258 | uint32_t retry_interval); |
| 259 | |
| 260 | CDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle, |
| 261 | wmi_bcn_send_from_host_cmd_fixed_param *param); |
| 262 | |
| 263 | CDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle, |
| 264 | struct gateway_update_req_param *req); |
| 265 | |
| 266 | CDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle, |
| 267 | struct rssi_monitor_param *req); |
| 268 | |
| 269 | CDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle, |
| 270 | struct scan_mac_oui *psetoui); |
| 271 | |
| 272 | CDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle, |
| 273 | struct wifi_passpoint_req_param *req); |
| 274 | |
| 275 | CDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle, |
| 276 | struct wifi_passpoint_req_param *req); |
| 277 | |
| 278 | CDF_STATUS (*send_set_epno_network_list_cmd)(wmi_unified_t wmi_handle, |
| 279 | struct wifi_enhanched_pno_params *req); |
| 280 | |
| 281 | CDF_STATUS (*send_extscan_get_capabilities_cmd)(wmi_unified_t wmi_handle, |
| 282 | struct extscan_capabilities_params *pgetcapab); |
| 283 | |
| 284 | CDF_STATUS (*send_extscan_get_cached_results_cmd)(wmi_unified_t wmi_handle, |
| 285 | struct extscan_cached_result_params *pcached_results); |
| 286 | |
| 287 | CDF_STATUS (*send_extscan_stop_change_monitor_cmd)(wmi_unified_t wmi_handle, |
| 288 | struct extscan_capabilities_reset_params *reset_req); |
| 289 | |
| 290 | CDF_STATUS (*send_extscan_start_change_monitor_cmd)(wmi_unified_t wmi_handle, |
| 291 | struct extscan_set_sig_changereq_params * |
| 292 | psigchange); |
| 293 | |
| 294 | CDF_STATUS (*send_extscan_stop_hotlist_monitor_cmd)(wmi_unified_t wmi_handle, |
| 295 | struct extscan_bssid_hotlist_reset_params *photlist_reset); |
| 296 | |
| 297 | CDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle, |
| 298 | struct extscan_stop_req_params *pstopcmd); |
| 299 | |
| 300 | CDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle, |
| 301 | struct wifi_scan_cmd_req_params *pstart); |
| 302 | |
| 303 | CDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle, |
| 304 | const struct plm_req_params *plm); |
| 305 | |
| 306 | CDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle, |
| 307 | const struct plm_req_params *plm, |
| 308 | uint32_t *gchannel_list); |
| 309 | |
| 310 | CDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle, |
| 311 | uint8_t vdev_id); |
| 312 | |
| 313 | CDF_STATUS (*send_pno_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); |
| 314 | |
| 315 | CDF_STATUS (*send_pno_start_cmd)(wmi_unified_t wmi_handle, |
| 316 | struct pno_scan_req_params *pno, |
| 317 | uint32_t *gchannel_freq_list); |
| 318 | |
| 319 | CDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle, |
| 320 | struct ipa_offload_control_params *ipa_offload); |
| 321 | |
| 322 | CDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg, |
| 323 | uint8_t is_add_ts); |
| 324 | |
| 325 | CDF_STATUS (*send_process_ll_stats_clear_cmd) |
| 326 | (wmi_unified_t wmi_handle, |
| 327 | const struct ll_stats_clear_params *clear_req, |
| 328 | uint8_t addr[IEEE80211_ADDR_LEN]); |
| 329 | |
| 330 | CDF_STATUS (*send_process_ll_stats_set_cmd) |
| 331 | (wmi_unified_t wmi_handle, const struct ll_stats_set_params *set_req); |
| 332 | |
| 333 | CDF_STATUS (*send_process_ll_stats_get_cmd) |
| 334 | (wmi_unified_t wmi_handle, const struct ll_stats_get_params *get_req, |
| 335 | uint8_t addr[IEEE80211_ADDR_LEN]); |
| 336 | |
| 337 | CDF_STATUS (*send_get_stats_cmd)(wmi_unified_t wmi_handle, |
| 338 | struct pe_stats_req *get_stats_param, |
| 339 | uint8_t addr[IEEE80211_ADDR_LEN]); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 340 | |
| 341 | CDF_STATUS (*send_snr_request_cmd)(wmi_unified_t wmi_handle); |
| 342 | |
| 343 | CDF_STATUS (*send_snr_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); |
| 344 | |
| 345 | CDF_STATUS (*send_link_status_req_cmd)(wmi_unified_t wmi_handle, |
| 346 | struct link_status_params *link_status); |
| 347 | |
| 348 | CDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle, |
| 349 | wmi_hb_set_enable_cmd_fixed_param *params); |
| 350 | |
| 351 | CDF_STATUS (*send_lphb_config_tcp_params_cmd)(wmi_unified_t wmi_handle, |
| 352 | wmi_hb_set_tcp_params_cmd_fixed_param *lphb_conf_req); |
| 353 | |
| 354 | CDF_STATUS (*send_lphb_config_tcp_pkt_filter_cmd)(wmi_unified_t wmi_handle, |
| 355 | wmi_hb_set_tcp_pkt_filter_cmd_fixed_param *g_hb_tcp_filter_fp); |
| 356 | |
| 357 | CDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle, |
| 358 | wmi_hb_set_udp_params_cmd_fixed_param *lphb_conf_req); |
| 359 | |
| 360 | CDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle, |
| 361 | wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req); |
| 362 | |
| 363 | CDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle, |
| 364 | wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); |
| 365 | |
| 366 | CDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle, |
| 367 | wmi_mac_addr peer_macaddr); |
| 368 | |
| 369 | CDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle, |
| 370 | wmi_ap_ps_egap_param_cmd_fixed_param *egap_params); |
| 371 | |
| 372 | CDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle, |
| 373 | uint32_t cmd, uint32_t value1, uint32_t value2); |
| 374 | |
| 375 | CDF_STATUS (*send_wow_sta_ra_filter_cmd)(wmi_unified_t wmi_handle, |
| 376 | uint8_t vdev_id, uint8_t default_pattern, |
| 377 | uint16_t rate_limit_interval); |
| 378 | |
| 379 | CDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); |
| 380 | |
| 381 | CDF_STATUS (*send_start_oem_data_cmd)(wmi_unified_t wmi_handle, |
| 382 | uint8_t data_len, |
| 383 | uint8_t *data); |
| 384 | |
| 385 | CDF_STATUS |
| 386 | (*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle, |
| 387 | bool dfs_phyerr_filter_offload); |
| 388 | |
| 389 | CDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle, |
| 390 | WMI_PKTLOG_EVENT pktlog_event, |
| 391 | WMI_CMD_ID cmd_id); |
| 392 | |
| 393 | CDF_STATUS (*send_add_wow_wakeup_event_cmd)(wmi_unified_t wmi_handle, |
| 394 | uint32_t vdev_id, |
| 395 | uint32_t bitmap, |
| 396 | bool enable); |
| 397 | |
| 398 | CDF_STATUS (*send_wow_patterns_to_fw_cmd)(wmi_unified_t wmi_handle, |
| 399 | uint8_t vdev_id, uint8_t ptrn_id, |
| 400 | const uint8_t *ptrn, uint8_t ptrn_len, |
| 401 | uint8_t ptrn_offset, const uint8_t *mask, |
| 402 | uint8_t mask_len, bool user, |
| 403 | uint8_t default_patterns); |
| 404 | |
| 405 | CDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id, |
| 406 | uint8_t vdev_id); |
| 407 | |
| 408 | CDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle); |
| 409 | |
| 410 | CDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, |
| 411 | uint8_t ac); |
| 412 | |
| 413 | CDF_STATUS (*send_aggr_qos_cmd)(wmi_unified_t wmi_handle, |
| 414 | struct aggr_add_ts_param *aggr_qos_rsp_msg); |
| 415 | |
| 416 | CDF_STATUS (*send_add_ts_cmd)(wmi_unified_t wmi_handle, |
| 417 | struct add_ts_param *msg); |
| 418 | |
| 419 | CDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle, |
| 420 | uint8_t vdev_id, bool enable); |
| 421 | |
| 422 | CDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle, |
| 423 | uint8_t vdev_id, struct rcv_pkt_filter_config *rcv_filter_param, |
| 424 | uint8_t filter_id, bool enable); |
| 425 | |
| 426 | CDF_STATUS (*send_add_clear_mcbc_filter_cmd)(wmi_unified_t wmi_handle, |
| 427 | uint8_t vdev_id, |
| 428 | struct cdf_mac_addr multicast_addr, |
| 429 | bool clearList); |
| 430 | |
| 431 | CDF_STATUS (*send_gtk_offload_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, |
| 432 | struct gtk_offload_params *params, |
| 433 | bool enable_offload, |
| 434 | uint32_t gtk_offload_opcode); |
| 435 | |
| 436 | CDF_STATUS (*send_process_gtk_offload_getinfo_cmd)(wmi_unified_t wmi_handle, |
| 437 | uint8_t vdev_id, |
| 438 | uint64_t offload_req_opcode); |
| 439 | |
| 440 | CDF_STATUS (*send_process_add_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle, |
| 441 | struct periodic_tx_pattern * |
| 442 | pAddPeriodicTxPtrnParams, |
| 443 | uint8_t vdev_id); |
| 444 | |
| 445 | CDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle, |
| 446 | uint8_t vdev_id, |
| 447 | uint8_t pattern_id); |
| 448 | |
| 449 | CDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle, |
| 450 | struct stats_ext_params *preq); |
| 451 | |
| 452 | CDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle, |
| 453 | struct ext_wow_params *params); |
| 454 | |
| 455 | CDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle, |
| 456 | struct app_type2_params *appType2Params); |
| 457 | |
| 458 | CDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle, |
| 459 | uint32_t timer_val); |
| 460 | |
| 461 | CDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle, |
| 462 | struct nan_req_params *nan_req); |
| 463 | |
| 464 | CDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle, |
| 465 | struct dhcp_offload_info_params *pDhcpSrvOffloadInfo); |
| 466 | |
| 467 | CDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle); |
| 468 | |
| 469 | CDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle, |
| 470 | uint32_t reg_dmn, uint16_t regdmn2G, |
| 471 | uint16_t regdmn5G, int8_t ctl2G, |
| 472 | int8_t ctl5G); |
| 473 | |
| 474 | CDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle, |
| 475 | struct tdls_channel_switch_params *chan_switch_params); |
| 476 | |
| 477 | CDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle, |
| 478 | void *tdls_param, uint8_t tdls_state); |
| 479 | |
| 480 | CDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle, |
| 481 | struct tdls_peer_state_params *peerStateParams, |
| 482 | uint32_t *ch_mhz); |
| 483 | |
| 484 | |
| 485 | CDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle, |
| 486 | struct fw_dump_req_param *mem_dump_req); |
| 487 | |
| 488 | CDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle, |
| 489 | struct vdev_ie_info_param *ie_info); |
Govind Singh | 71ee2d7 | 2016-03-07 16:30:32 +0530 | [diff] [blame^] | 490 | |
| 491 | CDF_STATUS (*send_init_cmd)(wmi_unified_t wmi_handle, |
| 492 | wmi_resource_config *res_cfg, |
| 493 | uint8_t num_mem_chunks, struct wmi_host_mem_chunk *mem_chunk, |
| 494 | bool action); |
| 495 | |
| 496 | CDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf); |
| 497 | |
| 498 | CDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev); |
| 499 | |
| 500 | CDF_STATUS (*send_saved_init_cmd)(wmi_unified_t wmi_handle); |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 501 | /** |
| 502 | * struct wmi_init_cmd - Saved wmi INIT command |
| 503 | * @buf: Buffer containing the wmi INIT command |
| 504 | * @buf_len: Length of the buffer |
| 505 | */ |
| 506 | struct wmi_init_cmd { |
| 507 | wmi_buf_t buf; |
| 508 | uint32_t buf_len; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 509 | }; |
| 510 | |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 511 | struct wmi_unified { |
| 512 | ol_scn_t scn_handle; /* handle to device */ |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 513 | osdev_t osdev; /* handle to use OS-independent services */ |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 514 | cdf_atomic_t pending_cmds; |
| 515 | HTC_ENDPOINT_ID wmi_endpoint_id; |
| 516 | uint16_t max_msg_len; |
| 517 | WMI_EVT_ID event_id[WMI_UNIFIED_MAX_EVENT]; |
| 518 | wmi_unified_event_handler event_handler[WMI_UNIFIED_MAX_EVENT]; |
Govind Singh | 4ec6ff9 | 2016-03-09 12:03:29 +0530 | [diff] [blame] | 519 | enum wmi_rx_exec_ctx ctx[WMI_UNIFIED_MAX_EVENT]; |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 520 | uint32_t max_event_idx; |
| 521 | void *htc_handle; |
| 522 | cdf_spinlock_t eventq_lock; |
| 523 | cdf_nbuf_queue_t event_queue; |
| 524 | struct work_struct rx_event_work; |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 525 | int wmi_stop_in_progress; |
Govind Singh | 229bc0d | 2016-03-07 15:33:31 +0530 | [diff] [blame] | 526 | struct _wmi_abi_version fw_abi_version; |
| 527 | struct _wmi_abi_version final_abi_vers; |
| 528 | struct wmi_init_cmd saved_wmi_init_cmd; |
| 529 | uint32_t num_of_diag_events_logs; |
| 530 | uint32_t *events_logs_list; |
| 531 | struct host_offload_req_param arp_info; |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 532 | #ifdef WLAN_OPEN_SOURCE |
| 533 | struct fwdebug dbglog; |
| 534 | struct dentry *debugfs_phy; |
| 535 | #endif /* WLAN_OPEN_SOURCE */ |
| 536 | |
| 537 | #ifdef WMI_INTERFACE_EVENT_LOGGING |
| 538 | cdf_spinlock_t wmi_record_lock; |
| 539 | #endif /*WMI_INTERFACE_EVENT_LOGGING */ |
| 540 | |
| 541 | cdf_atomic_t is_target_suspended; |
| 542 | |
| 543 | #ifdef FEATURE_RUNTIME_PM |
| 544 | cdf_atomic_t runtime_pm_inprogress; |
| 545 | #endif |
| 546 | |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 547 | struct wmi_rx_ops rx_ops; |
| 548 | struct wmi_ops *ops; |
Govind Singh | 6ad6ada | 2016-02-04 18:42:30 +0530 | [diff] [blame] | 549 | void *event_handler_cookie[WMI_UNIFIED_MAX_EVENT]; |
| 550 | bool use_cookie; |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 551 | }; |
Govind Singh | 3ddda1f | 2016-03-09 11:34:12 +0530 | [diff] [blame] | 552 | struct wmi_ops *wmi_get_tlv_ops(void); |
| 553 | struct wmi_ops *wmi_get_non_tlv_ops(void); |
Govind Singh | d475ea9 | 2016-03-06 19:55:02 +0530 | [diff] [blame] | 554 | #endif |