Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2005-2011 Atheros Communications Inc. |
| 3 | * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. |
| 4 | * |
| 5 | * Permission to use, copy, modify, and/or distribute this software for any |
| 6 | * purpose with or without fee is hereby granted, provided that the above |
| 7 | * copyright notice and this permission notice appear in all copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | */ |
| 17 | |
| 18 | #ifndef _WMI_H_ |
| 19 | #define _WMI_H_ |
| 20 | |
| 21 | #include <linux/types.h> |
| 22 | #include <net/mac80211.h> |
| 23 | |
| 24 | /* |
| 25 | * This file specifies the WMI interface for the Unified Software |
| 26 | * Architecture. |
| 27 | * |
| 28 | * It includes definitions of all the commands and events. Commands are |
| 29 | * messages from the host to the target. Events and Replies are messages |
| 30 | * from the target to the host. |
| 31 | * |
| 32 | * Ownership of correctness in regards to WMI commands belongs to the host |
| 33 | * driver and the target is not required to validate parameters for value, |
| 34 | * proper range, or any other checking. |
| 35 | * |
| 36 | * Guidelines for extending this interface are below. |
| 37 | * |
| 38 | * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff |
| 39 | * |
| 40 | * 2. Use ONLY u32 type for defining member variables within WMI |
| 41 | * command/event structures. Do not use u8, u16, bool or |
| 42 | * enum types within these structures. |
| 43 | * |
| 44 | * 3. DO NOT define bit fields within structures. Implement bit fields |
| 45 | * using masks if necessary. Do not use the programming language's bit |
| 46 | * field definition. |
| 47 | * |
| 48 | * 4. Define macros for encode/decode of u8, u16 fields within |
| 49 | * the u32 variables. Use these macros for set/get of these fields. |
| 50 | * Try to use this to optimize the structure without bloating it with |
| 51 | * u32 variables for every lower sized field. |
| 52 | * |
| 53 | * 5. Do not use PACK/UNPACK attributes for the structures as each member |
| 54 | * variable is already 4-byte aligned by virtue of being a u32 |
| 55 | * type. |
| 56 | * |
| 57 | * 6. Comment each parameter part of the WMI command/event structure by |
| 58 | * using the 2 stars at the begining of C comment instead of one star to |
| 59 | * enable HTML document generation using Doxygen. |
| 60 | * |
| 61 | */ |
| 62 | |
| 63 | /* Control Path */ |
| 64 | struct wmi_cmd_hdr { |
| 65 | __le32 cmd_id; |
| 66 | } __packed; |
| 67 | |
| 68 | #define WMI_CMD_HDR_CMD_ID_MASK 0x00FFFFFF |
| 69 | #define WMI_CMD_HDR_CMD_ID_LSB 0 |
| 70 | #define WMI_CMD_HDR_PLT_PRIV_MASK 0xFF000000 |
| 71 | #define WMI_CMD_HDR_PLT_PRIV_LSB 24 |
| 72 | |
| 73 | #define HTC_PROTOCOL_VERSION 0x0002 |
| 74 | #define WMI_PROTOCOL_VERSION 0x0002 |
| 75 | |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 76 | enum wmi_service { |
| 77 | WMI_SERVICE_BEACON_OFFLOAD = 0, |
| 78 | WMI_SERVICE_SCAN_OFFLOAD, |
| 79 | WMI_SERVICE_ROAM_OFFLOAD, |
| 80 | WMI_SERVICE_BCN_MISS_OFFLOAD, |
| 81 | WMI_SERVICE_STA_PWRSAVE, |
| 82 | WMI_SERVICE_STA_ADVANCED_PWRSAVE, |
| 83 | WMI_SERVICE_AP_UAPSD, |
| 84 | WMI_SERVICE_AP_DFS, |
| 85 | WMI_SERVICE_11AC, |
| 86 | WMI_SERVICE_BLOCKACK, |
| 87 | WMI_SERVICE_PHYERR, |
| 88 | WMI_SERVICE_BCN_FILTER, |
| 89 | WMI_SERVICE_RTT, |
| 90 | WMI_SERVICE_RATECTRL, |
| 91 | WMI_SERVICE_WOW, |
| 92 | WMI_SERVICE_RATECTRL_CACHE, |
| 93 | WMI_SERVICE_IRAM_TIDS, |
| 94 | WMI_SERVICE_ARPNS_OFFLOAD, |
| 95 | WMI_SERVICE_NLO, |
| 96 | WMI_SERVICE_GTK_OFFLOAD, |
| 97 | WMI_SERVICE_SCAN_SCH, |
| 98 | WMI_SERVICE_CSA_OFFLOAD, |
| 99 | WMI_SERVICE_CHATTER, |
| 100 | WMI_SERVICE_COEX_FREQAVOID, |
| 101 | WMI_SERVICE_PACKET_POWER_SAVE, |
| 102 | WMI_SERVICE_FORCE_FW_HANG, |
| 103 | WMI_SERVICE_GPIO, |
| 104 | WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, |
| 105 | WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, |
| 106 | WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, |
| 107 | WMI_SERVICE_STA_KEEP_ALIVE, |
| 108 | WMI_SERVICE_TX_ENCAP, |
| 109 | WMI_SERVICE_BURST, |
| 110 | WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, |
| 111 | WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, |
Michal Kazior | ca996ec | 2014-12-03 10:11:32 +0200 | [diff] [blame] | 112 | WMI_SERVICE_ROAM_SCAN_OFFLOAD, |
| 113 | WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, |
| 114 | WMI_SERVICE_EARLY_RX, |
| 115 | WMI_SERVICE_STA_SMPS, |
| 116 | WMI_SERVICE_FWTEST, |
| 117 | WMI_SERVICE_STA_WMMAC, |
| 118 | WMI_SERVICE_TDLS, |
| 119 | WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE, |
| 120 | WMI_SERVICE_ADAPTIVE_OCS, |
| 121 | WMI_SERVICE_BA_SSN_SUPPORT, |
| 122 | WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE, |
| 123 | WMI_SERVICE_WLAN_HB, |
| 124 | WMI_SERVICE_LTE_ANT_SHARE_SUPPORT, |
| 125 | WMI_SERVICE_BATCH_SCAN, |
| 126 | WMI_SERVICE_QPOWER, |
| 127 | WMI_SERVICE_PLMREQ, |
| 128 | WMI_SERVICE_THERMAL_MGMT, |
| 129 | WMI_SERVICE_RMC, |
| 130 | WMI_SERVICE_MHF_OFFLOAD, |
| 131 | WMI_SERVICE_COEX_SAR, |
| 132 | WMI_SERVICE_BCN_TXRATE_OVERRIDE, |
| 133 | WMI_SERVICE_NAN, |
| 134 | WMI_SERVICE_L1SS_STAT, |
| 135 | WMI_SERVICE_ESTIMATE_LINKSPEED, |
| 136 | WMI_SERVICE_OBSS_SCAN, |
| 137 | WMI_SERVICE_TDLS_OFFCHAN, |
| 138 | WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, |
| 139 | WMI_SERVICE_TDLS_UAPSD_SLEEP_STA, |
| 140 | WMI_SERVICE_IBSS_PWRSAVE, |
| 141 | WMI_SERVICE_LPASS, |
| 142 | WMI_SERVICE_EXTSCAN, |
| 143 | WMI_SERVICE_D0WOW, |
| 144 | WMI_SERVICE_HSOFFLOAD, |
| 145 | WMI_SERVICE_ROAM_HO_OFFLOAD, |
| 146 | WMI_SERVICE_RX_FULL_REORDER, |
| 147 | WMI_SERVICE_DHCP_OFFLOAD, |
| 148 | WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT, |
| 149 | WMI_SERVICE_MDNS_OFFLOAD, |
| 150 | WMI_SERVICE_SAP_AUTH_OFFLOAD, |
Yanbo Li | 52c22a6 | 2015-04-15 15:28:07 +0300 | [diff] [blame] | 151 | WMI_SERVICE_ATF, |
Yanbo Li | de0c789b | 2015-04-15 15:28:08 +0300 | [diff] [blame] | 152 | WMI_SERVICE_COEX_GPIO, |
Raja Mani | 840357c | 2015-06-22 20:10:10 +0530 | [diff] [blame] | 153 | WMI_SERVICE_ENHANCED_PROXY_STA, |
| 154 | WMI_SERVICE_TT, |
| 155 | WMI_SERVICE_PEER_CACHING, |
| 156 | WMI_SERVICE_AUX_SPECTRAL_INTF, |
| 157 | WMI_SERVICE_AUX_CHAN_LOAD_INTF, |
| 158 | WMI_SERVICE_BSS_CHANNEL_INFO_64, |
Michal Kazior | c4f8c83 | 2014-09-04 10:18:32 +0200 | [diff] [blame] | 159 | |
| 160 | /* keep last */ |
| 161 | WMI_SERVICE_MAX, |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 162 | }; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 163 | |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 164 | enum wmi_10x_service { |
| 165 | WMI_10X_SERVICE_BEACON_OFFLOAD = 0, |
| 166 | WMI_10X_SERVICE_SCAN_OFFLOAD, |
| 167 | WMI_10X_SERVICE_ROAM_OFFLOAD, |
| 168 | WMI_10X_SERVICE_BCN_MISS_OFFLOAD, |
| 169 | WMI_10X_SERVICE_STA_PWRSAVE, |
| 170 | WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE, |
| 171 | WMI_10X_SERVICE_AP_UAPSD, |
| 172 | WMI_10X_SERVICE_AP_DFS, |
| 173 | WMI_10X_SERVICE_11AC, |
| 174 | WMI_10X_SERVICE_BLOCKACK, |
| 175 | WMI_10X_SERVICE_PHYERR, |
| 176 | WMI_10X_SERVICE_BCN_FILTER, |
| 177 | WMI_10X_SERVICE_RTT, |
| 178 | WMI_10X_SERVICE_RATECTRL, |
| 179 | WMI_10X_SERVICE_WOW, |
| 180 | WMI_10X_SERVICE_RATECTRL_CACHE, |
| 181 | WMI_10X_SERVICE_IRAM_TIDS, |
| 182 | WMI_10X_SERVICE_BURST, |
| 183 | |
| 184 | /* introduced in 10.2 */ |
| 185 | WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT, |
| 186 | WMI_10X_SERVICE_FORCE_FW_HANG, |
| 187 | WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT, |
Yanbo Li | 52c22a6 | 2015-04-15 15:28:07 +0300 | [diff] [blame] | 188 | WMI_10X_SERVICE_ATF, |
Yanbo Li | de0c789b | 2015-04-15 15:28:08 +0300 | [diff] [blame] | 189 | WMI_10X_SERVICE_COEX_GPIO, |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 190 | }; |
| 191 | |
| 192 | enum wmi_main_service { |
| 193 | WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0, |
| 194 | WMI_MAIN_SERVICE_SCAN_OFFLOAD, |
| 195 | WMI_MAIN_SERVICE_ROAM_OFFLOAD, |
| 196 | WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD, |
| 197 | WMI_MAIN_SERVICE_STA_PWRSAVE, |
| 198 | WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE, |
| 199 | WMI_MAIN_SERVICE_AP_UAPSD, |
| 200 | WMI_MAIN_SERVICE_AP_DFS, |
| 201 | WMI_MAIN_SERVICE_11AC, |
| 202 | WMI_MAIN_SERVICE_BLOCKACK, |
| 203 | WMI_MAIN_SERVICE_PHYERR, |
| 204 | WMI_MAIN_SERVICE_BCN_FILTER, |
| 205 | WMI_MAIN_SERVICE_RTT, |
| 206 | WMI_MAIN_SERVICE_RATECTRL, |
| 207 | WMI_MAIN_SERVICE_WOW, |
| 208 | WMI_MAIN_SERVICE_RATECTRL_CACHE, |
| 209 | WMI_MAIN_SERVICE_IRAM_TIDS, |
| 210 | WMI_MAIN_SERVICE_ARPNS_OFFLOAD, |
| 211 | WMI_MAIN_SERVICE_NLO, |
| 212 | WMI_MAIN_SERVICE_GTK_OFFLOAD, |
| 213 | WMI_MAIN_SERVICE_SCAN_SCH, |
| 214 | WMI_MAIN_SERVICE_CSA_OFFLOAD, |
| 215 | WMI_MAIN_SERVICE_CHATTER, |
| 216 | WMI_MAIN_SERVICE_COEX_FREQAVOID, |
| 217 | WMI_MAIN_SERVICE_PACKET_POWER_SAVE, |
| 218 | WMI_MAIN_SERVICE_FORCE_FW_HANG, |
| 219 | WMI_MAIN_SERVICE_GPIO, |
| 220 | WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM, |
| 221 | WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, |
| 222 | WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, |
| 223 | WMI_MAIN_SERVICE_STA_KEEP_ALIVE, |
| 224 | WMI_MAIN_SERVICE_TX_ENCAP, |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 225 | }; |
| 226 | |
Raja Mani | 840357c | 2015-06-22 20:10:10 +0530 | [diff] [blame] | 227 | enum wmi_10_4_service { |
| 228 | WMI_10_4_SERVICE_BEACON_OFFLOAD = 0, |
| 229 | WMI_10_4_SERVICE_SCAN_OFFLOAD, |
| 230 | WMI_10_4_SERVICE_ROAM_OFFLOAD, |
| 231 | WMI_10_4_SERVICE_BCN_MISS_OFFLOAD, |
| 232 | WMI_10_4_SERVICE_STA_PWRSAVE, |
| 233 | WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE, |
| 234 | WMI_10_4_SERVICE_AP_UAPSD, |
| 235 | WMI_10_4_SERVICE_AP_DFS, |
| 236 | WMI_10_4_SERVICE_11AC, |
| 237 | WMI_10_4_SERVICE_BLOCKACK, |
| 238 | WMI_10_4_SERVICE_PHYERR, |
| 239 | WMI_10_4_SERVICE_BCN_FILTER, |
| 240 | WMI_10_4_SERVICE_RTT, |
| 241 | WMI_10_4_SERVICE_RATECTRL, |
| 242 | WMI_10_4_SERVICE_WOW, |
| 243 | WMI_10_4_SERVICE_RATECTRL_CACHE, |
| 244 | WMI_10_4_SERVICE_IRAM_TIDS, |
| 245 | WMI_10_4_SERVICE_BURST, |
| 246 | WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT, |
| 247 | WMI_10_4_SERVICE_GTK_OFFLOAD, |
| 248 | WMI_10_4_SERVICE_SCAN_SCH, |
| 249 | WMI_10_4_SERVICE_CSA_OFFLOAD, |
| 250 | WMI_10_4_SERVICE_CHATTER, |
| 251 | WMI_10_4_SERVICE_COEX_FREQAVOID, |
| 252 | WMI_10_4_SERVICE_PACKET_POWER_SAVE, |
| 253 | WMI_10_4_SERVICE_FORCE_FW_HANG, |
| 254 | WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT, |
| 255 | WMI_10_4_SERVICE_GPIO, |
| 256 | WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, |
| 257 | WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, |
| 258 | WMI_10_4_SERVICE_STA_KEEP_ALIVE, |
| 259 | WMI_10_4_SERVICE_TX_ENCAP, |
| 260 | WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, |
| 261 | WMI_10_4_SERVICE_EARLY_RX, |
| 262 | WMI_10_4_SERVICE_ENHANCED_PROXY_STA, |
| 263 | WMI_10_4_SERVICE_TT, |
| 264 | WMI_10_4_SERVICE_ATF, |
| 265 | WMI_10_4_SERVICE_PEER_CACHING, |
| 266 | WMI_10_4_SERVICE_COEX_GPIO, |
| 267 | WMI_10_4_SERVICE_AUX_SPECTRAL_INTF, |
| 268 | WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF, |
| 269 | WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64, |
| 270 | }; |
| 271 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 272 | static inline char *wmi_service_name(int service_id) |
| 273 | { |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 274 | #define SVCSTR(x) case x: return #x |
| 275 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 276 | switch (service_id) { |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 277 | SVCSTR(WMI_SERVICE_BEACON_OFFLOAD); |
| 278 | SVCSTR(WMI_SERVICE_SCAN_OFFLOAD); |
| 279 | SVCSTR(WMI_SERVICE_ROAM_OFFLOAD); |
| 280 | SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD); |
| 281 | SVCSTR(WMI_SERVICE_STA_PWRSAVE); |
| 282 | SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE); |
| 283 | SVCSTR(WMI_SERVICE_AP_UAPSD); |
| 284 | SVCSTR(WMI_SERVICE_AP_DFS); |
| 285 | SVCSTR(WMI_SERVICE_11AC); |
| 286 | SVCSTR(WMI_SERVICE_BLOCKACK); |
| 287 | SVCSTR(WMI_SERVICE_PHYERR); |
| 288 | SVCSTR(WMI_SERVICE_BCN_FILTER); |
| 289 | SVCSTR(WMI_SERVICE_RTT); |
| 290 | SVCSTR(WMI_SERVICE_RATECTRL); |
| 291 | SVCSTR(WMI_SERVICE_WOW); |
| 292 | SVCSTR(WMI_SERVICE_RATECTRL_CACHE); |
| 293 | SVCSTR(WMI_SERVICE_IRAM_TIDS); |
| 294 | SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD); |
| 295 | SVCSTR(WMI_SERVICE_NLO); |
| 296 | SVCSTR(WMI_SERVICE_GTK_OFFLOAD); |
| 297 | SVCSTR(WMI_SERVICE_SCAN_SCH); |
| 298 | SVCSTR(WMI_SERVICE_CSA_OFFLOAD); |
| 299 | SVCSTR(WMI_SERVICE_CHATTER); |
| 300 | SVCSTR(WMI_SERVICE_COEX_FREQAVOID); |
| 301 | SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE); |
| 302 | SVCSTR(WMI_SERVICE_FORCE_FW_HANG); |
| 303 | SVCSTR(WMI_SERVICE_GPIO); |
| 304 | SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM); |
| 305 | SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG); |
| 306 | SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG); |
| 307 | SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE); |
| 308 | SVCSTR(WMI_SERVICE_TX_ENCAP); |
| 309 | SVCSTR(WMI_SERVICE_BURST); |
| 310 | SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT); |
| 311 | SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT); |
Michal Kazior | ca996ec | 2014-12-03 10:11:32 +0200 | [diff] [blame] | 312 | SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD); |
| 313 | SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC); |
| 314 | SVCSTR(WMI_SERVICE_EARLY_RX); |
| 315 | SVCSTR(WMI_SERVICE_STA_SMPS); |
| 316 | SVCSTR(WMI_SERVICE_FWTEST); |
| 317 | SVCSTR(WMI_SERVICE_STA_WMMAC); |
| 318 | SVCSTR(WMI_SERVICE_TDLS); |
| 319 | SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE); |
| 320 | SVCSTR(WMI_SERVICE_ADAPTIVE_OCS); |
| 321 | SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT); |
| 322 | SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE); |
| 323 | SVCSTR(WMI_SERVICE_WLAN_HB); |
| 324 | SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT); |
| 325 | SVCSTR(WMI_SERVICE_BATCH_SCAN); |
| 326 | SVCSTR(WMI_SERVICE_QPOWER); |
| 327 | SVCSTR(WMI_SERVICE_PLMREQ); |
| 328 | SVCSTR(WMI_SERVICE_THERMAL_MGMT); |
| 329 | SVCSTR(WMI_SERVICE_RMC); |
| 330 | SVCSTR(WMI_SERVICE_MHF_OFFLOAD); |
| 331 | SVCSTR(WMI_SERVICE_COEX_SAR); |
| 332 | SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE); |
| 333 | SVCSTR(WMI_SERVICE_NAN); |
| 334 | SVCSTR(WMI_SERVICE_L1SS_STAT); |
| 335 | SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED); |
| 336 | SVCSTR(WMI_SERVICE_OBSS_SCAN); |
| 337 | SVCSTR(WMI_SERVICE_TDLS_OFFCHAN); |
| 338 | SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA); |
| 339 | SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA); |
| 340 | SVCSTR(WMI_SERVICE_IBSS_PWRSAVE); |
| 341 | SVCSTR(WMI_SERVICE_LPASS); |
| 342 | SVCSTR(WMI_SERVICE_EXTSCAN); |
| 343 | SVCSTR(WMI_SERVICE_D0WOW); |
| 344 | SVCSTR(WMI_SERVICE_HSOFFLOAD); |
| 345 | SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD); |
| 346 | SVCSTR(WMI_SERVICE_RX_FULL_REORDER); |
| 347 | SVCSTR(WMI_SERVICE_DHCP_OFFLOAD); |
| 348 | SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT); |
| 349 | SVCSTR(WMI_SERVICE_MDNS_OFFLOAD); |
| 350 | SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD); |
Yanbo Li | 52c22a6 | 2015-04-15 15:28:07 +0300 | [diff] [blame] | 351 | SVCSTR(WMI_SERVICE_ATF); |
Yanbo Li | de0c789b | 2015-04-15 15:28:08 +0300 | [diff] [blame] | 352 | SVCSTR(WMI_SERVICE_COEX_GPIO); |
Raja Mani | 840357c | 2015-06-22 20:10:10 +0530 | [diff] [blame] | 353 | SVCSTR(WMI_SERVICE_ENHANCED_PROXY_STA); |
| 354 | SVCSTR(WMI_SERVICE_TT); |
| 355 | SVCSTR(WMI_SERVICE_PEER_CACHING); |
| 356 | SVCSTR(WMI_SERVICE_AUX_SPECTRAL_INTF); |
| 357 | SVCSTR(WMI_SERVICE_AUX_CHAN_LOAD_INTF); |
| 358 | SVCSTR(WMI_SERVICE_BSS_CHANNEL_INFO_64); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 359 | default: |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 360 | return NULL; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 361 | } |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 362 | |
| 363 | #undef SVCSTR |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 364 | } |
| 365 | |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 366 | #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \ |
| 367 | ((svc_id) < (len) && \ |
| 368 | __le32_to_cpu((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \ |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 369 | BIT((svc_id)%(sizeof(u32)))) |
| 370 | |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 371 | #define SVCMAP(x, y, len) \ |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 372 | do { \ |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 373 | if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \ |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 374 | __set_bit(y, out); \ |
| 375 | } while (0) |
| 376 | |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 377 | static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out, |
| 378 | size_t len) |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 379 | { |
| 380 | SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 381 | WMI_SERVICE_BEACON_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 382 | SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 383 | WMI_SERVICE_SCAN_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 384 | SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 385 | WMI_SERVICE_ROAM_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 386 | SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 387 | WMI_SERVICE_BCN_MISS_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 388 | SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 389 | WMI_SERVICE_STA_PWRSAVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 390 | SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 391 | WMI_SERVICE_STA_ADVANCED_PWRSAVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 392 | SVCMAP(WMI_10X_SERVICE_AP_UAPSD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 393 | WMI_SERVICE_AP_UAPSD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 394 | SVCMAP(WMI_10X_SERVICE_AP_DFS, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 395 | WMI_SERVICE_AP_DFS, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 396 | SVCMAP(WMI_10X_SERVICE_11AC, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 397 | WMI_SERVICE_11AC, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 398 | SVCMAP(WMI_10X_SERVICE_BLOCKACK, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 399 | WMI_SERVICE_BLOCKACK, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 400 | SVCMAP(WMI_10X_SERVICE_PHYERR, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 401 | WMI_SERVICE_PHYERR, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 402 | SVCMAP(WMI_10X_SERVICE_BCN_FILTER, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 403 | WMI_SERVICE_BCN_FILTER, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 404 | SVCMAP(WMI_10X_SERVICE_RTT, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 405 | WMI_SERVICE_RTT, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 406 | SVCMAP(WMI_10X_SERVICE_RATECTRL, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 407 | WMI_SERVICE_RATECTRL, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 408 | SVCMAP(WMI_10X_SERVICE_WOW, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 409 | WMI_SERVICE_WOW, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 410 | SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 411 | WMI_SERVICE_RATECTRL_CACHE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 412 | SVCMAP(WMI_10X_SERVICE_IRAM_TIDS, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 413 | WMI_SERVICE_IRAM_TIDS, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 414 | SVCMAP(WMI_10X_SERVICE_BURST, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 415 | WMI_SERVICE_BURST, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 416 | SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 417 | WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 418 | SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 419 | WMI_SERVICE_FORCE_FW_HANG, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 420 | SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 421 | WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len); |
Yanbo Li | 52c22a6 | 2015-04-15 15:28:07 +0300 | [diff] [blame] | 422 | SVCMAP(WMI_10X_SERVICE_ATF, |
| 423 | WMI_SERVICE_ATF, len); |
Yanbo Li | de0c789b | 2015-04-15 15:28:08 +0300 | [diff] [blame] | 424 | SVCMAP(WMI_10X_SERVICE_COEX_GPIO, |
| 425 | WMI_SERVICE_COEX_GPIO, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 426 | } |
| 427 | |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 428 | static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out, |
| 429 | size_t len) |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 430 | { |
| 431 | SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 432 | WMI_SERVICE_BEACON_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 433 | SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 434 | WMI_SERVICE_SCAN_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 435 | SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 436 | WMI_SERVICE_ROAM_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 437 | SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 438 | WMI_SERVICE_BCN_MISS_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 439 | SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 440 | WMI_SERVICE_STA_PWRSAVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 441 | SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 442 | WMI_SERVICE_STA_ADVANCED_PWRSAVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 443 | SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 444 | WMI_SERVICE_AP_UAPSD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 445 | SVCMAP(WMI_MAIN_SERVICE_AP_DFS, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 446 | WMI_SERVICE_AP_DFS, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 447 | SVCMAP(WMI_MAIN_SERVICE_11AC, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 448 | WMI_SERVICE_11AC, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 449 | SVCMAP(WMI_MAIN_SERVICE_BLOCKACK, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 450 | WMI_SERVICE_BLOCKACK, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 451 | SVCMAP(WMI_MAIN_SERVICE_PHYERR, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 452 | WMI_SERVICE_PHYERR, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 453 | SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 454 | WMI_SERVICE_BCN_FILTER, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 455 | SVCMAP(WMI_MAIN_SERVICE_RTT, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 456 | WMI_SERVICE_RTT, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 457 | SVCMAP(WMI_MAIN_SERVICE_RATECTRL, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 458 | WMI_SERVICE_RATECTRL, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 459 | SVCMAP(WMI_MAIN_SERVICE_WOW, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 460 | WMI_SERVICE_WOW, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 461 | SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 462 | WMI_SERVICE_RATECTRL_CACHE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 463 | SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 464 | WMI_SERVICE_IRAM_TIDS, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 465 | SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 466 | WMI_SERVICE_ARPNS_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 467 | SVCMAP(WMI_MAIN_SERVICE_NLO, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 468 | WMI_SERVICE_NLO, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 469 | SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 470 | WMI_SERVICE_GTK_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 471 | SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 472 | WMI_SERVICE_SCAN_SCH, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 473 | SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 474 | WMI_SERVICE_CSA_OFFLOAD, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 475 | SVCMAP(WMI_MAIN_SERVICE_CHATTER, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 476 | WMI_SERVICE_CHATTER, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 477 | SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 478 | WMI_SERVICE_COEX_FREQAVOID, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 479 | SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 480 | WMI_SERVICE_PACKET_POWER_SAVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 481 | SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 482 | WMI_SERVICE_FORCE_FW_HANG, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 483 | SVCMAP(WMI_MAIN_SERVICE_GPIO, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 484 | WMI_SERVICE_GPIO, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 485 | SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 486 | WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 487 | SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 488 | WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 489 | SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 490 | WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 491 | SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 492 | WMI_SERVICE_STA_KEEP_ALIVE, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 493 | SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP, |
Michal Kazior | 37b9f93 | 2014-11-27 10:11:16 +0100 | [diff] [blame] | 494 | WMI_SERVICE_TX_ENCAP, len); |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 495 | } |
| 496 | |
Raja Mani | 840357c | 2015-06-22 20:10:10 +0530 | [diff] [blame] | 497 | static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out, |
| 498 | size_t len) |
| 499 | { |
| 500 | SVCMAP(WMI_10_4_SERVICE_BEACON_OFFLOAD, |
| 501 | WMI_SERVICE_BEACON_OFFLOAD, len); |
| 502 | SVCMAP(WMI_10_4_SERVICE_SCAN_OFFLOAD, |
| 503 | WMI_SERVICE_SCAN_OFFLOAD, len); |
| 504 | SVCMAP(WMI_10_4_SERVICE_ROAM_OFFLOAD, |
| 505 | WMI_SERVICE_ROAM_OFFLOAD, len); |
| 506 | SVCMAP(WMI_10_4_SERVICE_BCN_MISS_OFFLOAD, |
| 507 | WMI_SERVICE_BCN_MISS_OFFLOAD, len); |
| 508 | SVCMAP(WMI_10_4_SERVICE_STA_PWRSAVE, |
| 509 | WMI_SERVICE_STA_PWRSAVE, len); |
| 510 | SVCMAP(WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE, |
| 511 | WMI_SERVICE_STA_ADVANCED_PWRSAVE, len); |
| 512 | SVCMAP(WMI_10_4_SERVICE_AP_UAPSD, |
| 513 | WMI_SERVICE_AP_UAPSD, len); |
| 514 | SVCMAP(WMI_10_4_SERVICE_AP_DFS, |
| 515 | WMI_SERVICE_AP_DFS, len); |
| 516 | SVCMAP(WMI_10_4_SERVICE_11AC, |
| 517 | WMI_SERVICE_11AC, len); |
| 518 | SVCMAP(WMI_10_4_SERVICE_BLOCKACK, |
| 519 | WMI_SERVICE_BLOCKACK, len); |
| 520 | SVCMAP(WMI_10_4_SERVICE_PHYERR, |
| 521 | WMI_SERVICE_PHYERR, len); |
| 522 | SVCMAP(WMI_10_4_SERVICE_BCN_FILTER, |
| 523 | WMI_SERVICE_BCN_FILTER, len); |
| 524 | SVCMAP(WMI_10_4_SERVICE_RTT, |
| 525 | WMI_SERVICE_RTT, len); |
| 526 | SVCMAP(WMI_10_4_SERVICE_RATECTRL, |
| 527 | WMI_SERVICE_RATECTRL, len); |
| 528 | SVCMAP(WMI_10_4_SERVICE_WOW, |
| 529 | WMI_SERVICE_WOW, len); |
| 530 | SVCMAP(WMI_10_4_SERVICE_RATECTRL_CACHE, |
| 531 | WMI_SERVICE_RATECTRL_CACHE, len); |
| 532 | SVCMAP(WMI_10_4_SERVICE_IRAM_TIDS, |
| 533 | WMI_SERVICE_IRAM_TIDS, len); |
| 534 | SVCMAP(WMI_10_4_SERVICE_BURST, |
| 535 | WMI_SERVICE_BURST, len); |
| 536 | SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT, |
| 537 | WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len); |
| 538 | SVCMAP(WMI_10_4_SERVICE_GTK_OFFLOAD, |
| 539 | WMI_SERVICE_GTK_OFFLOAD, len); |
| 540 | SVCMAP(WMI_10_4_SERVICE_SCAN_SCH, |
| 541 | WMI_SERVICE_SCAN_SCH, len); |
| 542 | SVCMAP(WMI_10_4_SERVICE_CSA_OFFLOAD, |
| 543 | WMI_SERVICE_CSA_OFFLOAD, len); |
| 544 | SVCMAP(WMI_10_4_SERVICE_CHATTER, |
| 545 | WMI_SERVICE_CHATTER, len); |
| 546 | SVCMAP(WMI_10_4_SERVICE_COEX_FREQAVOID, |
| 547 | WMI_SERVICE_COEX_FREQAVOID, len); |
| 548 | SVCMAP(WMI_10_4_SERVICE_PACKET_POWER_SAVE, |
| 549 | WMI_SERVICE_PACKET_POWER_SAVE, len); |
| 550 | SVCMAP(WMI_10_4_SERVICE_FORCE_FW_HANG, |
| 551 | WMI_SERVICE_FORCE_FW_HANG, len); |
| 552 | SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT, |
| 553 | WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len); |
| 554 | SVCMAP(WMI_10_4_SERVICE_GPIO, |
| 555 | WMI_SERVICE_GPIO, len); |
| 556 | SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, |
| 557 | WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len); |
| 558 | SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, |
| 559 | WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len); |
| 560 | SVCMAP(WMI_10_4_SERVICE_STA_KEEP_ALIVE, |
| 561 | WMI_SERVICE_STA_KEEP_ALIVE, len); |
| 562 | SVCMAP(WMI_10_4_SERVICE_TX_ENCAP, |
| 563 | WMI_SERVICE_TX_ENCAP, len); |
| 564 | SVCMAP(WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, |
| 565 | WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, len); |
| 566 | SVCMAP(WMI_10_4_SERVICE_EARLY_RX, |
| 567 | WMI_SERVICE_EARLY_RX, len); |
| 568 | SVCMAP(WMI_10_4_SERVICE_ENHANCED_PROXY_STA, |
| 569 | WMI_SERVICE_ENHANCED_PROXY_STA, len); |
| 570 | SVCMAP(WMI_10_4_SERVICE_TT, |
| 571 | WMI_SERVICE_TT, len); |
| 572 | SVCMAP(WMI_10_4_SERVICE_ATF, |
| 573 | WMI_SERVICE_ATF, len); |
| 574 | SVCMAP(WMI_10_4_SERVICE_PEER_CACHING, |
| 575 | WMI_SERVICE_PEER_CACHING, len); |
| 576 | SVCMAP(WMI_10_4_SERVICE_COEX_GPIO, |
| 577 | WMI_SERVICE_COEX_GPIO, len); |
| 578 | SVCMAP(WMI_10_4_SERVICE_AUX_SPECTRAL_INTF, |
| 579 | WMI_SERVICE_AUX_SPECTRAL_INTF, len); |
| 580 | SVCMAP(WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF, |
| 581 | WMI_SERVICE_AUX_CHAN_LOAD_INTF, len); |
| 582 | SVCMAP(WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64, |
| 583 | WMI_SERVICE_BSS_CHANNEL_INFO_64, len); |
| 584 | } |
| 585 | |
Michal Kazior | cff990c | 2014-08-04 09:18:33 +0300 | [diff] [blame] | 586 | #undef SVCMAP |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 587 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 588 | /* 2 word representation of MAC addr */ |
| 589 | struct wmi_mac_addr { |
| 590 | union { |
| 591 | u8 addr[6]; |
| 592 | struct { |
| 593 | u32 word0; |
| 594 | u32 word1; |
| 595 | } __packed; |
| 596 | } __packed; |
| 597 | } __packed; |
| 598 | |
Bartosz Markowski | ce42870 | 2013-09-26 17:47:05 +0200 | [diff] [blame] | 599 | struct wmi_cmd_map { |
| 600 | u32 init_cmdid; |
| 601 | u32 start_scan_cmdid; |
| 602 | u32 stop_scan_cmdid; |
| 603 | u32 scan_chan_list_cmdid; |
| 604 | u32 scan_sch_prio_tbl_cmdid; |
| 605 | u32 pdev_set_regdomain_cmdid; |
| 606 | u32 pdev_set_channel_cmdid; |
| 607 | u32 pdev_set_param_cmdid; |
| 608 | u32 pdev_pktlog_enable_cmdid; |
| 609 | u32 pdev_pktlog_disable_cmdid; |
| 610 | u32 pdev_set_wmm_params_cmdid; |
| 611 | u32 pdev_set_ht_cap_ie_cmdid; |
| 612 | u32 pdev_set_vht_cap_ie_cmdid; |
| 613 | u32 pdev_set_dscp_tid_map_cmdid; |
| 614 | u32 pdev_set_quiet_mode_cmdid; |
| 615 | u32 pdev_green_ap_ps_enable_cmdid; |
| 616 | u32 pdev_get_tpc_config_cmdid; |
| 617 | u32 pdev_set_base_macaddr_cmdid; |
| 618 | u32 vdev_create_cmdid; |
| 619 | u32 vdev_delete_cmdid; |
| 620 | u32 vdev_start_request_cmdid; |
| 621 | u32 vdev_restart_request_cmdid; |
| 622 | u32 vdev_up_cmdid; |
| 623 | u32 vdev_stop_cmdid; |
| 624 | u32 vdev_down_cmdid; |
| 625 | u32 vdev_set_param_cmdid; |
| 626 | u32 vdev_install_key_cmdid; |
| 627 | u32 peer_create_cmdid; |
| 628 | u32 peer_delete_cmdid; |
| 629 | u32 peer_flush_tids_cmdid; |
| 630 | u32 peer_set_param_cmdid; |
| 631 | u32 peer_assoc_cmdid; |
| 632 | u32 peer_add_wds_entry_cmdid; |
| 633 | u32 peer_remove_wds_entry_cmdid; |
| 634 | u32 peer_mcast_group_cmdid; |
| 635 | u32 bcn_tx_cmdid; |
| 636 | u32 pdev_send_bcn_cmdid; |
| 637 | u32 bcn_tmpl_cmdid; |
| 638 | u32 bcn_filter_rx_cmdid; |
| 639 | u32 prb_req_filter_rx_cmdid; |
| 640 | u32 mgmt_tx_cmdid; |
| 641 | u32 prb_tmpl_cmdid; |
| 642 | u32 addba_clear_resp_cmdid; |
| 643 | u32 addba_send_cmdid; |
| 644 | u32 addba_status_cmdid; |
| 645 | u32 delba_send_cmdid; |
| 646 | u32 addba_set_resp_cmdid; |
| 647 | u32 send_singleamsdu_cmdid; |
| 648 | u32 sta_powersave_mode_cmdid; |
| 649 | u32 sta_powersave_param_cmdid; |
| 650 | u32 sta_mimo_ps_mode_cmdid; |
| 651 | u32 pdev_dfs_enable_cmdid; |
| 652 | u32 pdev_dfs_disable_cmdid; |
| 653 | u32 roam_scan_mode; |
| 654 | u32 roam_scan_rssi_threshold; |
| 655 | u32 roam_scan_period; |
| 656 | u32 roam_scan_rssi_change_threshold; |
| 657 | u32 roam_ap_profile; |
| 658 | u32 ofl_scan_add_ap_profile; |
| 659 | u32 ofl_scan_remove_ap_profile; |
| 660 | u32 ofl_scan_period; |
| 661 | u32 p2p_dev_set_device_info; |
| 662 | u32 p2p_dev_set_discoverability; |
| 663 | u32 p2p_go_set_beacon_ie; |
| 664 | u32 p2p_go_set_probe_resp_ie; |
| 665 | u32 p2p_set_vendor_ie_data_cmdid; |
| 666 | u32 ap_ps_peer_param_cmdid; |
| 667 | u32 ap_ps_peer_uapsd_coex_cmdid; |
| 668 | u32 peer_rate_retry_sched_cmdid; |
| 669 | u32 wlan_profile_trigger_cmdid; |
| 670 | u32 wlan_profile_set_hist_intvl_cmdid; |
| 671 | u32 wlan_profile_get_profile_data_cmdid; |
| 672 | u32 wlan_profile_enable_profile_id_cmdid; |
| 673 | u32 wlan_profile_list_profile_id_cmdid; |
| 674 | u32 pdev_suspend_cmdid; |
| 675 | u32 pdev_resume_cmdid; |
| 676 | u32 add_bcn_filter_cmdid; |
| 677 | u32 rmv_bcn_filter_cmdid; |
| 678 | u32 wow_add_wake_pattern_cmdid; |
| 679 | u32 wow_del_wake_pattern_cmdid; |
| 680 | u32 wow_enable_disable_wake_event_cmdid; |
| 681 | u32 wow_enable_cmdid; |
| 682 | u32 wow_hostwakeup_from_sleep_cmdid; |
| 683 | u32 rtt_measreq_cmdid; |
| 684 | u32 rtt_tsf_cmdid; |
| 685 | u32 vdev_spectral_scan_configure_cmdid; |
| 686 | u32 vdev_spectral_scan_enable_cmdid; |
| 687 | u32 request_stats_cmdid; |
| 688 | u32 set_arp_ns_offload_cmdid; |
| 689 | u32 network_list_offload_config_cmdid; |
| 690 | u32 gtk_offload_cmdid; |
| 691 | u32 csa_offload_enable_cmdid; |
| 692 | u32 csa_offload_chanswitch_cmdid; |
| 693 | u32 chatter_set_mode_cmdid; |
| 694 | u32 peer_tid_addba_cmdid; |
| 695 | u32 peer_tid_delba_cmdid; |
| 696 | u32 sta_dtim_ps_method_cmdid; |
| 697 | u32 sta_uapsd_auto_trig_cmdid; |
| 698 | u32 sta_keepalive_cmd; |
| 699 | u32 echo_cmdid; |
| 700 | u32 pdev_utf_cmdid; |
| 701 | u32 dbglog_cfg_cmdid; |
| 702 | u32 pdev_qvit_cmdid; |
| 703 | u32 pdev_ftm_intg_cmdid; |
| 704 | u32 vdev_set_keepalive_cmdid; |
| 705 | u32 vdev_get_keepalive_cmdid; |
| 706 | u32 force_fw_hang_cmdid; |
| 707 | u32 gpio_config_cmdid; |
| 708 | u32 gpio_output_cmdid; |
Rajkumar Manoharan | a57a6a2 | 2014-12-17 12:22:17 +0200 | [diff] [blame] | 709 | u32 pdev_get_temperature_cmdid; |
Michal Kazior | 6d492fe | 2015-01-28 09:57:22 +0200 | [diff] [blame] | 710 | u32 vdev_set_wmm_params_cmdid; |
Marek Puzyniak | ad45c88 | 2015-03-30 09:51:53 +0300 | [diff] [blame] | 711 | u32 tdls_set_state_cmdid; |
| 712 | u32 tdls_peer_update_cmdid; |
Michal Kazior | 5b272e3 | 2015-03-31 10:26:22 +0000 | [diff] [blame] | 713 | u32 adaptive_qcs_cmdid; |
Raja Mani | 2d491e6 | 2015-06-22 20:10:11 +0530 | [diff] [blame] | 714 | u32 scan_update_request_cmdid; |
| 715 | u32 vdev_standby_response_cmdid; |
| 716 | u32 vdev_resume_response_cmdid; |
| 717 | u32 wlan_peer_caching_add_peer_cmdid; |
| 718 | u32 wlan_peer_caching_evict_peer_cmdid; |
| 719 | u32 wlan_peer_caching_restore_peer_cmdid; |
| 720 | u32 wlan_peer_caching_print_all_peers_info_cmdid; |
| 721 | u32 peer_update_wds_entry_cmdid; |
| 722 | u32 peer_add_proxy_sta_entry_cmdid; |
| 723 | u32 rtt_keepalive_cmdid; |
| 724 | u32 oem_req_cmdid; |
| 725 | u32 nan_cmdid; |
| 726 | u32 vdev_ratemask_cmdid; |
| 727 | u32 qboost_cfg_cmdid; |
| 728 | u32 pdev_smart_ant_enable_cmdid; |
| 729 | u32 pdev_smart_ant_set_rx_antenna_cmdid; |
| 730 | u32 peer_smart_ant_set_tx_antenna_cmdid; |
| 731 | u32 peer_smart_ant_set_train_info_cmdid; |
| 732 | u32 peer_smart_ant_set_node_config_ops_cmdid; |
| 733 | u32 pdev_set_antenna_switch_table_cmdid; |
| 734 | u32 pdev_set_ctl_table_cmdid; |
| 735 | u32 pdev_set_mimogain_table_cmdid; |
| 736 | u32 pdev_ratepwr_table_cmdid; |
| 737 | u32 pdev_ratepwr_chainmsk_table_cmdid; |
| 738 | u32 pdev_fips_cmdid; |
| 739 | u32 tt_set_conf_cmdid; |
| 740 | u32 fwtest_cmdid; |
| 741 | u32 vdev_atf_request_cmdid; |
| 742 | u32 peer_atf_request_cmdid; |
| 743 | u32 pdev_get_ani_cck_config_cmdid; |
| 744 | u32 pdev_get_ani_ofdm_config_cmdid; |
| 745 | u32 pdev_reserve_ast_entry_cmdid; |
| 746 | u32 pdev_get_nfcal_power_cmdid; |
| 747 | u32 pdev_get_tpc_cmdid; |
| 748 | u32 pdev_get_ast_info_cmdid; |
| 749 | u32 vdev_set_dscp_tid_map_cmdid; |
| 750 | u32 pdev_get_info_cmdid; |
| 751 | u32 vdev_get_info_cmdid; |
| 752 | u32 vdev_filter_neighbor_rx_packets_cmdid; |
| 753 | u32 mu_cal_start_cmdid; |
| 754 | u32 set_cca_params_cmdid; |
| 755 | u32 pdev_bss_chan_info_request_cmdid; |
Bartosz Markowski | ce42870 | 2013-09-26 17:47:05 +0200 | [diff] [blame] | 756 | }; |
| 757 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 758 | /* |
| 759 | * wmi command groups. |
| 760 | */ |
| 761 | enum wmi_cmd_group { |
| 762 | /* 0 to 2 are reserved */ |
| 763 | WMI_GRP_START = 0x3, |
| 764 | WMI_GRP_SCAN = WMI_GRP_START, |
| 765 | WMI_GRP_PDEV, |
| 766 | WMI_GRP_VDEV, |
| 767 | WMI_GRP_PEER, |
| 768 | WMI_GRP_MGMT, |
| 769 | WMI_GRP_BA_NEG, |
| 770 | WMI_GRP_STA_PS, |
| 771 | WMI_GRP_DFS, |
| 772 | WMI_GRP_ROAM, |
| 773 | WMI_GRP_OFL_SCAN, |
| 774 | WMI_GRP_P2P, |
| 775 | WMI_GRP_AP_PS, |
| 776 | WMI_GRP_RATE_CTRL, |
| 777 | WMI_GRP_PROFILE, |
| 778 | WMI_GRP_SUSPEND, |
| 779 | WMI_GRP_BCN_FILTER, |
| 780 | WMI_GRP_WOW, |
| 781 | WMI_GRP_RTT, |
| 782 | WMI_GRP_SPECTRAL, |
| 783 | WMI_GRP_STATS, |
| 784 | WMI_GRP_ARP_NS_OFL, |
| 785 | WMI_GRP_NLO_OFL, |
| 786 | WMI_GRP_GTK_OFL, |
| 787 | WMI_GRP_CSA_OFL, |
| 788 | WMI_GRP_CHATTER, |
| 789 | WMI_GRP_TID_ADDBA, |
| 790 | WMI_GRP_MISC, |
| 791 | WMI_GRP_GPIO, |
| 792 | }; |
| 793 | |
| 794 | #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1) |
| 795 | #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 796 | |
Bartosz Markowski | 34957b2 | 2013-10-15 09:55:31 +0200 | [diff] [blame] | 797 | #define WMI_CMD_UNSUPPORTED 0 |
Bartosz Markowski | b7e3adf | 2013-09-26 17:47:06 +0200 | [diff] [blame] | 798 | |
| 799 | /* Command IDs and command events for MAIN FW. */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 800 | enum wmi_cmd_id { |
| 801 | WMI_INIT_CMDID = 0x1, |
| 802 | |
| 803 | /* Scan specific commands */ |
| 804 | WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN), |
| 805 | WMI_STOP_SCAN_CMDID, |
| 806 | WMI_SCAN_CHAN_LIST_CMDID, |
| 807 | WMI_SCAN_SCH_PRIO_TBL_CMDID, |
| 808 | |
| 809 | /* PDEV (physical device) specific commands */ |
| 810 | WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV), |
| 811 | WMI_PDEV_SET_CHANNEL_CMDID, |
| 812 | WMI_PDEV_SET_PARAM_CMDID, |
| 813 | WMI_PDEV_PKTLOG_ENABLE_CMDID, |
| 814 | WMI_PDEV_PKTLOG_DISABLE_CMDID, |
| 815 | WMI_PDEV_SET_WMM_PARAMS_CMDID, |
| 816 | WMI_PDEV_SET_HT_CAP_IE_CMDID, |
| 817 | WMI_PDEV_SET_VHT_CAP_IE_CMDID, |
| 818 | WMI_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 819 | WMI_PDEV_SET_QUIET_MODE_CMDID, |
| 820 | WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 821 | WMI_PDEV_GET_TPC_CONFIG_CMDID, |
| 822 | WMI_PDEV_SET_BASE_MACADDR_CMDID, |
| 823 | |
| 824 | /* VDEV (virtual device) specific commands */ |
| 825 | WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV), |
| 826 | WMI_VDEV_DELETE_CMDID, |
| 827 | WMI_VDEV_START_REQUEST_CMDID, |
| 828 | WMI_VDEV_RESTART_REQUEST_CMDID, |
| 829 | WMI_VDEV_UP_CMDID, |
| 830 | WMI_VDEV_STOP_CMDID, |
| 831 | WMI_VDEV_DOWN_CMDID, |
| 832 | WMI_VDEV_SET_PARAM_CMDID, |
| 833 | WMI_VDEV_INSTALL_KEY_CMDID, |
| 834 | |
| 835 | /* peer specific commands */ |
| 836 | WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER), |
| 837 | WMI_PEER_DELETE_CMDID, |
| 838 | WMI_PEER_FLUSH_TIDS_CMDID, |
| 839 | WMI_PEER_SET_PARAM_CMDID, |
| 840 | WMI_PEER_ASSOC_CMDID, |
| 841 | WMI_PEER_ADD_WDS_ENTRY_CMDID, |
| 842 | WMI_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 843 | WMI_PEER_MCAST_GROUP_CMDID, |
| 844 | |
| 845 | /* beacon/management specific commands */ |
| 846 | WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT), |
| 847 | WMI_PDEV_SEND_BCN_CMDID, |
| 848 | WMI_BCN_TMPL_CMDID, |
| 849 | WMI_BCN_FILTER_RX_CMDID, |
| 850 | WMI_PRB_REQ_FILTER_RX_CMDID, |
| 851 | WMI_MGMT_TX_CMDID, |
| 852 | WMI_PRB_TMPL_CMDID, |
| 853 | |
| 854 | /* commands to directly control BA negotiation directly from host. */ |
| 855 | WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG), |
| 856 | WMI_ADDBA_SEND_CMDID, |
| 857 | WMI_ADDBA_STATUS_CMDID, |
| 858 | WMI_DELBA_SEND_CMDID, |
| 859 | WMI_ADDBA_SET_RESP_CMDID, |
| 860 | WMI_SEND_SINGLEAMSDU_CMDID, |
| 861 | |
| 862 | /* Station power save specific config */ |
| 863 | WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS), |
| 864 | WMI_STA_POWERSAVE_PARAM_CMDID, |
| 865 | WMI_STA_MIMO_PS_MODE_CMDID, |
| 866 | |
| 867 | /** DFS-specific commands */ |
| 868 | WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS), |
| 869 | WMI_PDEV_DFS_DISABLE_CMDID, |
| 870 | |
| 871 | /* Roaming specific commands */ |
| 872 | WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM), |
| 873 | WMI_ROAM_SCAN_RSSI_THRESHOLD, |
| 874 | WMI_ROAM_SCAN_PERIOD, |
| 875 | WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 876 | WMI_ROAM_AP_PROFILE, |
| 877 | |
| 878 | /* offload scan specific commands */ |
| 879 | WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN), |
| 880 | WMI_OFL_SCAN_REMOVE_AP_PROFILE, |
| 881 | WMI_OFL_SCAN_PERIOD, |
| 882 | |
| 883 | /* P2P specific commands */ |
| 884 | WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P), |
| 885 | WMI_P2P_DEV_SET_DISCOVERABILITY, |
| 886 | WMI_P2P_GO_SET_BEACON_IE, |
| 887 | WMI_P2P_GO_SET_PROBE_RESP_IE, |
| 888 | WMI_P2P_SET_VENDOR_IE_DATA_CMDID, |
| 889 | |
| 890 | /* AP power save specific config */ |
| 891 | WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS), |
| 892 | WMI_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 893 | |
| 894 | /* Rate-control specific commands */ |
| 895 | WMI_PEER_RATE_RETRY_SCHED_CMDID = |
| 896 | WMI_CMD_GRP(WMI_GRP_RATE_CTRL), |
| 897 | |
| 898 | /* WLAN Profiling commands. */ |
| 899 | WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE), |
| 900 | WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 901 | WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 902 | WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 903 | WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 904 | |
| 905 | /* Suspend resume command Ids */ |
| 906 | WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND), |
| 907 | WMI_PDEV_RESUME_CMDID, |
| 908 | |
| 909 | /* Beacon filter commands */ |
| 910 | WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER), |
| 911 | WMI_RMV_BCN_FILTER_CMDID, |
| 912 | |
| 913 | /* WOW Specific WMI commands*/ |
| 914 | WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW), |
| 915 | WMI_WOW_DEL_WAKE_PATTERN_CMDID, |
| 916 | WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 917 | WMI_WOW_ENABLE_CMDID, |
| 918 | WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 919 | |
| 920 | /* RTT measurement related cmd */ |
| 921 | WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT), |
| 922 | WMI_RTT_TSF_CMDID, |
| 923 | |
| 924 | /* spectral scan commands */ |
| 925 | WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL), |
| 926 | WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 927 | |
| 928 | /* F/W stats */ |
| 929 | WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS), |
| 930 | |
| 931 | /* ARP OFFLOAD REQUEST*/ |
| 932 | WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL), |
| 933 | |
| 934 | /* NS offload confid*/ |
| 935 | WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL), |
| 936 | |
| 937 | /* GTK offload Specific WMI commands*/ |
| 938 | WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL), |
| 939 | |
| 940 | /* CSA offload Specific WMI commands*/ |
| 941 | WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL), |
| 942 | WMI_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| 943 | |
| 944 | /* Chatter commands*/ |
| 945 | WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER), |
| 946 | |
| 947 | /* addba specific commands */ |
| 948 | WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA), |
| 949 | WMI_PEER_TID_DELBA_CMDID, |
| 950 | |
| 951 | /* set station mimo powersave method */ |
| 952 | WMI_STA_DTIM_PS_METHOD_CMDID, |
| 953 | /* Configure the Station UAPSD AC Auto Trigger Parameters */ |
| 954 | WMI_STA_UAPSD_AUTO_TRIG_CMDID, |
| 955 | |
| 956 | /* STA Keep alive parameter configuration, |
| 957 | Requires WMI_SERVICE_STA_KEEP_ALIVE */ |
| 958 | WMI_STA_KEEPALIVE_CMD, |
| 959 | |
| 960 | /* misc command group */ |
| 961 | WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC), |
| 962 | WMI_PDEV_UTF_CMDID, |
| 963 | WMI_DBGLOG_CFG_CMDID, |
| 964 | WMI_PDEV_QVIT_CMDID, |
| 965 | WMI_PDEV_FTM_INTG_CMDID, |
| 966 | WMI_VDEV_SET_KEEPALIVE_CMDID, |
| 967 | WMI_VDEV_GET_KEEPALIVE_CMDID, |
Michal Kazior | 9cfbce7 | 2013-07-16 09:54:36 +0200 | [diff] [blame] | 968 | WMI_FORCE_FW_HANG_CMDID, |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 969 | |
| 970 | /* GPIO Configuration */ |
| 971 | WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO), |
| 972 | WMI_GPIO_OUTPUT_CMDID, |
| 973 | }; |
| 974 | |
| 975 | enum wmi_event_id { |
| 976 | WMI_SERVICE_READY_EVENTID = 0x1, |
| 977 | WMI_READY_EVENTID, |
| 978 | |
| 979 | /* Scan specific events */ |
| 980 | WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), |
| 981 | |
| 982 | /* PDEV specific events */ |
| 983 | WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV), |
| 984 | WMI_CHAN_INFO_EVENTID, |
| 985 | WMI_PHYERR_EVENTID, |
| 986 | |
| 987 | /* VDEV specific events */ |
| 988 | WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV), |
| 989 | WMI_VDEV_STOPPED_EVENTID, |
| 990 | WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID, |
| 991 | |
| 992 | /* peer specific events */ |
| 993 | WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER), |
| 994 | |
| 995 | /* beacon/mgmt specific events */ |
| 996 | WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT), |
| 997 | WMI_HOST_SWBA_EVENTID, |
| 998 | WMI_TBTTOFFSET_UPDATE_EVENTID, |
| 999 | |
| 1000 | /* ADDBA Related WMI Events*/ |
| 1001 | WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG), |
| 1002 | WMI_TX_ADDBA_COMPLETE_EVENTID, |
| 1003 | |
| 1004 | /* Roam event to trigger roaming on host */ |
| 1005 | WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM), |
| 1006 | WMI_PROFILE_MATCH, |
| 1007 | |
| 1008 | /* WoW */ |
| 1009 | WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW), |
| 1010 | |
| 1011 | /* RTT */ |
| 1012 | WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT), |
| 1013 | WMI_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1014 | WMI_RTT_ERROR_REPORT_EVENTID, |
| 1015 | |
| 1016 | /* GTK offload */ |
| 1017 | WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 1018 | WMI_GTK_REKEY_FAIL_EVENTID, |
| 1019 | |
| 1020 | /* CSA IE received event */ |
| 1021 | WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 1022 | |
| 1023 | /* Misc events */ |
| 1024 | WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC), |
| 1025 | WMI_PDEV_UTF_EVENTID, |
| 1026 | WMI_DEBUG_MESG_EVENTID, |
| 1027 | WMI_UPDATE_STATS_EVENTID, |
| 1028 | WMI_DEBUG_PRINT_EVENTID, |
| 1029 | WMI_DCS_INTERFERENCE_EVENTID, |
| 1030 | WMI_PDEV_QVIT_EVENTID, |
| 1031 | WMI_WLAN_PROFILE_DATA_EVENTID, |
| 1032 | WMI_PDEV_FTM_INTG_EVENTID, |
| 1033 | WMI_WLAN_FREQ_AVOID_EVENTID, |
| 1034 | WMI_VDEV_GET_KEEPALIVE_EVENTID, |
| 1035 | |
| 1036 | /* GPIO Event */ |
| 1037 | WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), |
| 1038 | }; |
| 1039 | |
Bartosz Markowski | b7e3adf | 2013-09-26 17:47:06 +0200 | [diff] [blame] | 1040 | /* Command IDs and command events for 10.X firmware */ |
| 1041 | enum wmi_10x_cmd_id { |
| 1042 | WMI_10X_START_CMDID = 0x9000, |
| 1043 | WMI_10X_END_CMDID = 0x9FFF, |
| 1044 | |
| 1045 | /* initialize the wlan sub system */ |
| 1046 | WMI_10X_INIT_CMDID, |
| 1047 | |
| 1048 | /* Scan specific commands */ |
| 1049 | |
| 1050 | WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID, |
| 1051 | WMI_10X_STOP_SCAN_CMDID, |
| 1052 | WMI_10X_SCAN_CHAN_LIST_CMDID, |
| 1053 | WMI_10X_ECHO_CMDID, |
| 1054 | |
| 1055 | /* PDEV(physical device) specific commands */ |
| 1056 | WMI_10X_PDEV_SET_REGDOMAIN_CMDID, |
| 1057 | WMI_10X_PDEV_SET_CHANNEL_CMDID, |
| 1058 | WMI_10X_PDEV_SET_PARAM_CMDID, |
| 1059 | WMI_10X_PDEV_PKTLOG_ENABLE_CMDID, |
| 1060 | WMI_10X_PDEV_PKTLOG_DISABLE_CMDID, |
| 1061 | WMI_10X_PDEV_SET_WMM_PARAMS_CMDID, |
| 1062 | WMI_10X_PDEV_SET_HT_CAP_IE_CMDID, |
| 1063 | WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID, |
| 1064 | WMI_10X_PDEV_SET_BASE_MACADDR_CMDID, |
| 1065 | WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 1066 | WMI_10X_PDEV_SET_QUIET_MODE_CMDID, |
| 1067 | WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 1068 | WMI_10X_PDEV_GET_TPC_CONFIG_CMDID, |
| 1069 | |
| 1070 | /* VDEV(virtual device) specific commands */ |
| 1071 | WMI_10X_VDEV_CREATE_CMDID, |
| 1072 | WMI_10X_VDEV_DELETE_CMDID, |
| 1073 | WMI_10X_VDEV_START_REQUEST_CMDID, |
| 1074 | WMI_10X_VDEV_RESTART_REQUEST_CMDID, |
| 1075 | WMI_10X_VDEV_UP_CMDID, |
| 1076 | WMI_10X_VDEV_STOP_CMDID, |
| 1077 | WMI_10X_VDEV_DOWN_CMDID, |
| 1078 | WMI_10X_VDEV_STANDBY_RESPONSE_CMDID, |
| 1079 | WMI_10X_VDEV_RESUME_RESPONSE_CMDID, |
| 1080 | WMI_10X_VDEV_SET_PARAM_CMDID, |
| 1081 | WMI_10X_VDEV_INSTALL_KEY_CMDID, |
| 1082 | |
| 1083 | /* peer specific commands */ |
| 1084 | WMI_10X_PEER_CREATE_CMDID, |
| 1085 | WMI_10X_PEER_DELETE_CMDID, |
| 1086 | WMI_10X_PEER_FLUSH_TIDS_CMDID, |
| 1087 | WMI_10X_PEER_SET_PARAM_CMDID, |
| 1088 | WMI_10X_PEER_ASSOC_CMDID, |
| 1089 | WMI_10X_PEER_ADD_WDS_ENTRY_CMDID, |
| 1090 | WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 1091 | WMI_10X_PEER_MCAST_GROUP_CMDID, |
| 1092 | |
| 1093 | /* beacon/management specific commands */ |
| 1094 | |
| 1095 | WMI_10X_BCN_TX_CMDID, |
| 1096 | WMI_10X_BCN_PRB_TMPL_CMDID, |
| 1097 | WMI_10X_BCN_FILTER_RX_CMDID, |
| 1098 | WMI_10X_PRB_REQ_FILTER_RX_CMDID, |
| 1099 | WMI_10X_MGMT_TX_CMDID, |
| 1100 | |
| 1101 | /* commands to directly control ba negotiation directly from host. */ |
| 1102 | WMI_10X_ADDBA_CLEAR_RESP_CMDID, |
| 1103 | WMI_10X_ADDBA_SEND_CMDID, |
| 1104 | WMI_10X_ADDBA_STATUS_CMDID, |
| 1105 | WMI_10X_DELBA_SEND_CMDID, |
| 1106 | WMI_10X_ADDBA_SET_RESP_CMDID, |
| 1107 | WMI_10X_SEND_SINGLEAMSDU_CMDID, |
| 1108 | |
| 1109 | /* Station power save specific config */ |
| 1110 | WMI_10X_STA_POWERSAVE_MODE_CMDID, |
| 1111 | WMI_10X_STA_POWERSAVE_PARAM_CMDID, |
| 1112 | WMI_10X_STA_MIMO_PS_MODE_CMDID, |
| 1113 | |
| 1114 | /* set debug log config */ |
| 1115 | WMI_10X_DBGLOG_CFG_CMDID, |
| 1116 | |
| 1117 | /* DFS-specific commands */ |
| 1118 | WMI_10X_PDEV_DFS_ENABLE_CMDID, |
| 1119 | WMI_10X_PDEV_DFS_DISABLE_CMDID, |
| 1120 | |
| 1121 | /* QVIT specific command id */ |
| 1122 | WMI_10X_PDEV_QVIT_CMDID, |
| 1123 | |
| 1124 | /* Offload Scan and Roaming related commands */ |
| 1125 | WMI_10X_ROAM_SCAN_MODE, |
| 1126 | WMI_10X_ROAM_SCAN_RSSI_THRESHOLD, |
| 1127 | WMI_10X_ROAM_SCAN_PERIOD, |
| 1128 | WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 1129 | WMI_10X_ROAM_AP_PROFILE, |
| 1130 | WMI_10X_OFL_SCAN_ADD_AP_PROFILE, |
| 1131 | WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE, |
| 1132 | WMI_10X_OFL_SCAN_PERIOD, |
| 1133 | |
| 1134 | /* P2P specific commands */ |
| 1135 | WMI_10X_P2P_DEV_SET_DEVICE_INFO, |
| 1136 | WMI_10X_P2P_DEV_SET_DISCOVERABILITY, |
| 1137 | WMI_10X_P2P_GO_SET_BEACON_IE, |
| 1138 | WMI_10X_P2P_GO_SET_PROBE_RESP_IE, |
| 1139 | |
| 1140 | /* AP power save specific config */ |
| 1141 | WMI_10X_AP_PS_PEER_PARAM_CMDID, |
| 1142 | WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 1143 | |
| 1144 | /* Rate-control specific commands */ |
| 1145 | WMI_10X_PEER_RATE_RETRY_SCHED_CMDID, |
| 1146 | |
| 1147 | /* WLAN Profiling commands. */ |
| 1148 | WMI_10X_WLAN_PROFILE_TRIGGER_CMDID, |
| 1149 | WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 1150 | WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 1151 | WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 1152 | WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 1153 | |
| 1154 | /* Suspend resume command Ids */ |
| 1155 | WMI_10X_PDEV_SUSPEND_CMDID, |
| 1156 | WMI_10X_PDEV_RESUME_CMDID, |
| 1157 | |
| 1158 | /* Beacon filter commands */ |
| 1159 | WMI_10X_ADD_BCN_FILTER_CMDID, |
| 1160 | WMI_10X_RMV_BCN_FILTER_CMDID, |
| 1161 | |
| 1162 | /* WOW Specific WMI commands*/ |
| 1163 | WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID, |
| 1164 | WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID, |
| 1165 | WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 1166 | WMI_10X_WOW_ENABLE_CMDID, |
| 1167 | WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 1168 | |
| 1169 | /* RTT measurement related cmd */ |
| 1170 | WMI_10X_RTT_MEASREQ_CMDID, |
| 1171 | WMI_10X_RTT_TSF_CMDID, |
| 1172 | |
| 1173 | /* transmit beacon by value */ |
| 1174 | WMI_10X_PDEV_SEND_BCN_CMDID, |
| 1175 | |
| 1176 | /* F/W stats */ |
| 1177 | WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| 1178 | WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 1179 | WMI_10X_REQUEST_STATS_CMDID, |
| 1180 | |
| 1181 | /* GPIO Configuration */ |
| 1182 | WMI_10X_GPIO_CONFIG_CMDID, |
| 1183 | WMI_10X_GPIO_OUTPUT_CMDID, |
| 1184 | |
| 1185 | WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1, |
| 1186 | }; |
| 1187 | |
| 1188 | enum wmi_10x_event_id { |
| 1189 | WMI_10X_SERVICE_READY_EVENTID = 0x8000, |
| 1190 | WMI_10X_READY_EVENTID, |
| 1191 | WMI_10X_START_EVENTID = 0x9000, |
| 1192 | WMI_10X_END_EVENTID = 0x9FFF, |
| 1193 | |
| 1194 | /* Scan specific events */ |
| 1195 | WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID, |
| 1196 | WMI_10X_ECHO_EVENTID, |
| 1197 | WMI_10X_DEBUG_MESG_EVENTID, |
| 1198 | WMI_10X_UPDATE_STATS_EVENTID, |
| 1199 | |
| 1200 | /* Instantaneous RSSI event */ |
| 1201 | WMI_10X_INST_RSSI_STATS_EVENTID, |
| 1202 | |
| 1203 | /* VDEV specific events */ |
| 1204 | WMI_10X_VDEV_START_RESP_EVENTID, |
| 1205 | WMI_10X_VDEV_STANDBY_REQ_EVENTID, |
| 1206 | WMI_10X_VDEV_RESUME_REQ_EVENTID, |
| 1207 | WMI_10X_VDEV_STOPPED_EVENTID, |
| 1208 | |
| 1209 | /* peer specific events */ |
| 1210 | WMI_10X_PEER_STA_KICKOUT_EVENTID, |
| 1211 | |
| 1212 | /* beacon/mgmt specific events */ |
| 1213 | WMI_10X_HOST_SWBA_EVENTID, |
| 1214 | WMI_10X_TBTTOFFSET_UPDATE_EVENTID, |
| 1215 | WMI_10X_MGMT_RX_EVENTID, |
| 1216 | |
| 1217 | /* Channel stats event */ |
| 1218 | WMI_10X_CHAN_INFO_EVENTID, |
| 1219 | |
| 1220 | /* PHY Error specific WMI event */ |
| 1221 | WMI_10X_PHYERR_EVENTID, |
| 1222 | |
| 1223 | /* Roam event to trigger roaming on host */ |
| 1224 | WMI_10X_ROAM_EVENTID, |
| 1225 | |
| 1226 | /* matching AP found from list of profiles */ |
| 1227 | WMI_10X_PROFILE_MATCH, |
| 1228 | |
| 1229 | /* debug print message used for tracing FW code while debugging */ |
| 1230 | WMI_10X_DEBUG_PRINT_EVENTID, |
| 1231 | /* VI spoecific event */ |
| 1232 | WMI_10X_PDEV_QVIT_EVENTID, |
| 1233 | /* FW code profile data in response to profile request */ |
| 1234 | WMI_10X_WLAN_PROFILE_DATA_EVENTID, |
| 1235 | |
| 1236 | /*RTT related event ID*/ |
| 1237 | WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID, |
| 1238 | WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1239 | WMI_10X_RTT_ERROR_REPORT_EVENTID, |
| 1240 | |
| 1241 | WMI_10X_WOW_WAKEUP_HOST_EVENTID, |
| 1242 | WMI_10X_DCS_INTERFERENCE_EVENTID, |
| 1243 | |
| 1244 | /* TPC config for the current operating channel */ |
| 1245 | WMI_10X_PDEV_TPC_CONFIG_EVENTID, |
| 1246 | |
| 1247 | WMI_10X_GPIO_INPUT_EVENTID, |
| 1248 | WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1, |
| 1249 | }; |
| 1250 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 1251 | enum wmi_10_2_cmd_id { |
| 1252 | WMI_10_2_START_CMDID = 0x9000, |
| 1253 | WMI_10_2_END_CMDID = 0x9FFF, |
| 1254 | WMI_10_2_INIT_CMDID, |
| 1255 | WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID, |
| 1256 | WMI_10_2_STOP_SCAN_CMDID, |
| 1257 | WMI_10_2_SCAN_CHAN_LIST_CMDID, |
| 1258 | WMI_10_2_ECHO_CMDID, |
| 1259 | WMI_10_2_PDEV_SET_REGDOMAIN_CMDID, |
| 1260 | WMI_10_2_PDEV_SET_CHANNEL_CMDID, |
| 1261 | WMI_10_2_PDEV_SET_PARAM_CMDID, |
| 1262 | WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID, |
| 1263 | WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID, |
| 1264 | WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID, |
| 1265 | WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID, |
| 1266 | WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID, |
| 1267 | WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID, |
| 1268 | WMI_10_2_PDEV_SET_QUIET_MODE_CMDID, |
| 1269 | WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 1270 | WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID, |
| 1271 | WMI_10_2_VDEV_CREATE_CMDID, |
| 1272 | WMI_10_2_VDEV_DELETE_CMDID, |
| 1273 | WMI_10_2_VDEV_START_REQUEST_CMDID, |
| 1274 | WMI_10_2_VDEV_RESTART_REQUEST_CMDID, |
| 1275 | WMI_10_2_VDEV_UP_CMDID, |
| 1276 | WMI_10_2_VDEV_STOP_CMDID, |
| 1277 | WMI_10_2_VDEV_DOWN_CMDID, |
| 1278 | WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID, |
| 1279 | WMI_10_2_VDEV_RESUME_RESPONSE_CMDID, |
| 1280 | WMI_10_2_VDEV_SET_PARAM_CMDID, |
| 1281 | WMI_10_2_VDEV_INSTALL_KEY_CMDID, |
| 1282 | WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID, |
| 1283 | WMI_10_2_PEER_CREATE_CMDID, |
| 1284 | WMI_10_2_PEER_DELETE_CMDID, |
| 1285 | WMI_10_2_PEER_FLUSH_TIDS_CMDID, |
| 1286 | WMI_10_2_PEER_SET_PARAM_CMDID, |
| 1287 | WMI_10_2_PEER_ASSOC_CMDID, |
| 1288 | WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID, |
| 1289 | WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID, |
| 1290 | WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 1291 | WMI_10_2_PEER_MCAST_GROUP_CMDID, |
| 1292 | WMI_10_2_BCN_TX_CMDID, |
| 1293 | WMI_10_2_BCN_PRB_TMPL_CMDID, |
| 1294 | WMI_10_2_BCN_FILTER_RX_CMDID, |
| 1295 | WMI_10_2_PRB_REQ_FILTER_RX_CMDID, |
| 1296 | WMI_10_2_MGMT_TX_CMDID, |
| 1297 | WMI_10_2_ADDBA_CLEAR_RESP_CMDID, |
| 1298 | WMI_10_2_ADDBA_SEND_CMDID, |
| 1299 | WMI_10_2_ADDBA_STATUS_CMDID, |
| 1300 | WMI_10_2_DELBA_SEND_CMDID, |
| 1301 | WMI_10_2_ADDBA_SET_RESP_CMDID, |
| 1302 | WMI_10_2_SEND_SINGLEAMSDU_CMDID, |
| 1303 | WMI_10_2_STA_POWERSAVE_MODE_CMDID, |
| 1304 | WMI_10_2_STA_POWERSAVE_PARAM_CMDID, |
| 1305 | WMI_10_2_STA_MIMO_PS_MODE_CMDID, |
| 1306 | WMI_10_2_DBGLOG_CFG_CMDID, |
| 1307 | WMI_10_2_PDEV_DFS_ENABLE_CMDID, |
| 1308 | WMI_10_2_PDEV_DFS_DISABLE_CMDID, |
| 1309 | WMI_10_2_PDEV_QVIT_CMDID, |
| 1310 | WMI_10_2_ROAM_SCAN_MODE, |
| 1311 | WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD, |
| 1312 | WMI_10_2_ROAM_SCAN_PERIOD, |
| 1313 | WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 1314 | WMI_10_2_ROAM_AP_PROFILE, |
| 1315 | WMI_10_2_OFL_SCAN_ADD_AP_PROFILE, |
| 1316 | WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE, |
| 1317 | WMI_10_2_OFL_SCAN_PERIOD, |
| 1318 | WMI_10_2_P2P_DEV_SET_DEVICE_INFO, |
| 1319 | WMI_10_2_P2P_DEV_SET_DISCOVERABILITY, |
| 1320 | WMI_10_2_P2P_GO_SET_BEACON_IE, |
| 1321 | WMI_10_2_P2P_GO_SET_PROBE_RESP_IE, |
| 1322 | WMI_10_2_AP_PS_PEER_PARAM_CMDID, |
| 1323 | WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 1324 | WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID, |
| 1325 | WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID, |
| 1326 | WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 1327 | WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 1328 | WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 1329 | WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 1330 | WMI_10_2_PDEV_SUSPEND_CMDID, |
| 1331 | WMI_10_2_PDEV_RESUME_CMDID, |
| 1332 | WMI_10_2_ADD_BCN_FILTER_CMDID, |
| 1333 | WMI_10_2_RMV_BCN_FILTER_CMDID, |
| 1334 | WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID, |
| 1335 | WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID, |
| 1336 | WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 1337 | WMI_10_2_WOW_ENABLE_CMDID, |
| 1338 | WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 1339 | WMI_10_2_RTT_MEASREQ_CMDID, |
| 1340 | WMI_10_2_RTT_TSF_CMDID, |
| 1341 | WMI_10_2_RTT_KEEPALIVE_CMDID, |
| 1342 | WMI_10_2_PDEV_SEND_BCN_CMDID, |
| 1343 | WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| 1344 | WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 1345 | WMI_10_2_REQUEST_STATS_CMDID, |
| 1346 | WMI_10_2_GPIO_CONFIG_CMDID, |
| 1347 | WMI_10_2_GPIO_OUTPUT_CMDID, |
| 1348 | WMI_10_2_VDEV_RATEMASK_CMDID, |
| 1349 | WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID, |
| 1350 | WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID, |
| 1351 | WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID, |
| 1352 | WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID, |
| 1353 | WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID, |
| 1354 | WMI_10_2_FORCE_FW_HANG_CMDID, |
| 1355 | WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID, |
| 1356 | WMI_10_2_PDEV_SET_CTL_TABLE_CMDID, |
| 1357 | WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID, |
| 1358 | WMI_10_2_PDEV_RATEPWR_TABLE_CMDID, |
| 1359 | WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID, |
Rajkumar Manoharan | a57a6a2 | 2014-12-17 12:22:17 +0200 | [diff] [blame] | 1360 | WMI_10_2_PDEV_GET_INFO, |
| 1361 | WMI_10_2_VDEV_GET_INFO, |
| 1362 | WMI_10_2_VDEV_ATF_REQUEST_CMDID, |
| 1363 | WMI_10_2_PEER_ATF_REQUEST_CMDID, |
| 1364 | WMI_10_2_PDEV_GET_TEMPERATURE_CMDID, |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 1365 | WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1, |
| 1366 | }; |
| 1367 | |
| 1368 | enum wmi_10_2_event_id { |
| 1369 | WMI_10_2_SERVICE_READY_EVENTID = 0x8000, |
| 1370 | WMI_10_2_READY_EVENTID, |
| 1371 | WMI_10_2_DEBUG_MESG_EVENTID, |
| 1372 | WMI_10_2_START_EVENTID = 0x9000, |
| 1373 | WMI_10_2_END_EVENTID = 0x9FFF, |
| 1374 | WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID, |
| 1375 | WMI_10_2_ECHO_EVENTID, |
| 1376 | WMI_10_2_UPDATE_STATS_EVENTID, |
| 1377 | WMI_10_2_INST_RSSI_STATS_EVENTID, |
| 1378 | WMI_10_2_VDEV_START_RESP_EVENTID, |
| 1379 | WMI_10_2_VDEV_STANDBY_REQ_EVENTID, |
| 1380 | WMI_10_2_VDEV_RESUME_REQ_EVENTID, |
| 1381 | WMI_10_2_VDEV_STOPPED_EVENTID, |
| 1382 | WMI_10_2_PEER_STA_KICKOUT_EVENTID, |
| 1383 | WMI_10_2_HOST_SWBA_EVENTID, |
| 1384 | WMI_10_2_TBTTOFFSET_UPDATE_EVENTID, |
| 1385 | WMI_10_2_MGMT_RX_EVENTID, |
| 1386 | WMI_10_2_CHAN_INFO_EVENTID, |
| 1387 | WMI_10_2_PHYERR_EVENTID, |
| 1388 | WMI_10_2_ROAM_EVENTID, |
| 1389 | WMI_10_2_PROFILE_MATCH, |
| 1390 | WMI_10_2_DEBUG_PRINT_EVENTID, |
| 1391 | WMI_10_2_PDEV_QVIT_EVENTID, |
| 1392 | WMI_10_2_WLAN_PROFILE_DATA_EVENTID, |
| 1393 | WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID, |
| 1394 | WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1395 | WMI_10_2_RTT_ERROR_REPORT_EVENTID, |
| 1396 | WMI_10_2_RTT_KEEPALIVE_EVENTID, |
| 1397 | WMI_10_2_WOW_WAKEUP_HOST_EVENTID, |
| 1398 | WMI_10_2_DCS_INTERFERENCE_EVENTID, |
| 1399 | WMI_10_2_PDEV_TPC_CONFIG_EVENTID, |
| 1400 | WMI_10_2_GPIO_INPUT_EVENTID, |
| 1401 | WMI_10_2_PEER_RATECODE_LIST_EVENTID, |
| 1402 | WMI_10_2_GENERIC_BUFFER_EVENTID, |
| 1403 | WMI_10_2_MCAST_BUF_RELEASE_EVENTID, |
| 1404 | WMI_10_2_MCAST_LIST_AGEOUT_EVENTID, |
| 1405 | WMI_10_2_WDS_PEER_EVENTID, |
Rajkumar Manoharan | a57a6a2 | 2014-12-17 12:22:17 +0200 | [diff] [blame] | 1406 | WMI_10_2_PEER_STA_PS_STATECHG_EVENTID, |
| 1407 | WMI_10_2_PDEV_TEMPERATURE_EVENTID, |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 1408 | WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1, |
| 1409 | }; |
| 1410 | |
Raja Mani | 2d491e6 | 2015-06-22 20:10:11 +0530 | [diff] [blame] | 1411 | enum wmi_10_4_cmd_id { |
| 1412 | WMI_10_4_START_CMDID = 0x9000, |
| 1413 | WMI_10_4_END_CMDID = 0x9FFF, |
| 1414 | WMI_10_4_INIT_CMDID, |
| 1415 | WMI_10_4_START_SCAN_CMDID = WMI_10_4_START_CMDID, |
| 1416 | WMI_10_4_STOP_SCAN_CMDID, |
| 1417 | WMI_10_4_SCAN_CHAN_LIST_CMDID, |
| 1418 | WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID, |
| 1419 | WMI_10_4_SCAN_UPDATE_REQUEST_CMDID, |
| 1420 | WMI_10_4_ECHO_CMDID, |
| 1421 | WMI_10_4_PDEV_SET_REGDOMAIN_CMDID, |
| 1422 | WMI_10_4_PDEV_SET_CHANNEL_CMDID, |
| 1423 | WMI_10_4_PDEV_SET_PARAM_CMDID, |
| 1424 | WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID, |
| 1425 | WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID, |
| 1426 | WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID, |
| 1427 | WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID, |
| 1428 | WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID, |
| 1429 | WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID, |
| 1430 | WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 1431 | WMI_10_4_PDEV_SET_QUIET_MODE_CMDID, |
| 1432 | WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 1433 | WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID, |
| 1434 | WMI_10_4_VDEV_CREATE_CMDID, |
| 1435 | WMI_10_4_VDEV_DELETE_CMDID, |
| 1436 | WMI_10_4_VDEV_START_REQUEST_CMDID, |
| 1437 | WMI_10_4_VDEV_RESTART_REQUEST_CMDID, |
| 1438 | WMI_10_4_VDEV_UP_CMDID, |
| 1439 | WMI_10_4_VDEV_STOP_CMDID, |
| 1440 | WMI_10_4_VDEV_DOWN_CMDID, |
| 1441 | WMI_10_4_VDEV_STANDBY_RESPONSE_CMDID, |
| 1442 | WMI_10_4_VDEV_RESUME_RESPONSE_CMDID, |
| 1443 | WMI_10_4_VDEV_SET_PARAM_CMDID, |
| 1444 | WMI_10_4_VDEV_INSTALL_KEY_CMDID, |
| 1445 | WMI_10_4_WLAN_PEER_CACHING_ADD_PEER_CMDID, |
| 1446 | WMI_10_4_WLAN_PEER_CACHING_EVICT_PEER_CMDID, |
| 1447 | WMI_10_4_WLAN_PEER_CACHING_RESTORE_PEER_CMDID, |
| 1448 | WMI_10_4_WLAN_PEER_CACHING_PRINT_ALL_PEERS_INFO_CMDID, |
| 1449 | WMI_10_4_PEER_CREATE_CMDID, |
| 1450 | WMI_10_4_PEER_DELETE_CMDID, |
| 1451 | WMI_10_4_PEER_FLUSH_TIDS_CMDID, |
| 1452 | WMI_10_4_PEER_SET_PARAM_CMDID, |
| 1453 | WMI_10_4_PEER_ASSOC_CMDID, |
| 1454 | WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID, |
| 1455 | WMI_10_4_PEER_UPDATE_WDS_ENTRY_CMDID, |
| 1456 | WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 1457 | WMI_10_4_PEER_ADD_PROXY_STA_ENTRY_CMDID, |
| 1458 | WMI_10_4_PEER_MCAST_GROUP_CMDID, |
| 1459 | WMI_10_4_BCN_TX_CMDID, |
| 1460 | WMI_10_4_PDEV_SEND_BCN_CMDID, |
| 1461 | WMI_10_4_BCN_PRB_TMPL_CMDID, |
| 1462 | WMI_10_4_BCN_FILTER_RX_CMDID, |
| 1463 | WMI_10_4_PRB_REQ_FILTER_RX_CMDID, |
| 1464 | WMI_10_4_MGMT_TX_CMDID, |
| 1465 | WMI_10_4_PRB_TMPL_CMDID, |
| 1466 | WMI_10_4_ADDBA_CLEAR_RESP_CMDID, |
| 1467 | WMI_10_4_ADDBA_SEND_CMDID, |
| 1468 | WMI_10_4_ADDBA_STATUS_CMDID, |
| 1469 | WMI_10_4_DELBA_SEND_CMDID, |
| 1470 | WMI_10_4_ADDBA_SET_RESP_CMDID, |
| 1471 | WMI_10_4_SEND_SINGLEAMSDU_CMDID, |
| 1472 | WMI_10_4_STA_POWERSAVE_MODE_CMDID, |
| 1473 | WMI_10_4_STA_POWERSAVE_PARAM_CMDID, |
| 1474 | WMI_10_4_STA_MIMO_PS_MODE_CMDID, |
| 1475 | WMI_10_4_DBGLOG_CFG_CMDID, |
| 1476 | WMI_10_4_PDEV_DFS_ENABLE_CMDID, |
| 1477 | WMI_10_4_PDEV_DFS_DISABLE_CMDID, |
| 1478 | WMI_10_4_PDEV_QVIT_CMDID, |
| 1479 | WMI_10_4_ROAM_SCAN_MODE, |
| 1480 | WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD, |
| 1481 | WMI_10_4_ROAM_SCAN_PERIOD, |
| 1482 | WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 1483 | WMI_10_4_ROAM_AP_PROFILE, |
| 1484 | WMI_10_4_OFL_SCAN_ADD_AP_PROFILE, |
| 1485 | WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE, |
| 1486 | WMI_10_4_OFL_SCAN_PERIOD, |
| 1487 | WMI_10_4_P2P_DEV_SET_DEVICE_INFO, |
| 1488 | WMI_10_4_P2P_DEV_SET_DISCOVERABILITY, |
| 1489 | WMI_10_4_P2P_GO_SET_BEACON_IE, |
| 1490 | WMI_10_4_P2P_GO_SET_PROBE_RESP_IE, |
| 1491 | WMI_10_4_P2P_SET_VENDOR_IE_DATA_CMDID, |
| 1492 | WMI_10_4_AP_PS_PEER_PARAM_CMDID, |
| 1493 | WMI_10_4_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 1494 | WMI_10_4_PEER_RATE_RETRY_SCHED_CMDID, |
| 1495 | WMI_10_4_WLAN_PROFILE_TRIGGER_CMDID, |
| 1496 | WMI_10_4_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 1497 | WMI_10_4_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 1498 | WMI_10_4_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 1499 | WMI_10_4_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 1500 | WMI_10_4_PDEV_SUSPEND_CMDID, |
| 1501 | WMI_10_4_PDEV_RESUME_CMDID, |
| 1502 | WMI_10_4_ADD_BCN_FILTER_CMDID, |
| 1503 | WMI_10_4_RMV_BCN_FILTER_CMDID, |
| 1504 | WMI_10_4_WOW_ADD_WAKE_PATTERN_CMDID, |
| 1505 | WMI_10_4_WOW_DEL_WAKE_PATTERN_CMDID, |
| 1506 | WMI_10_4_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 1507 | WMI_10_4_WOW_ENABLE_CMDID, |
| 1508 | WMI_10_4_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 1509 | WMI_10_4_RTT_MEASREQ_CMDID, |
| 1510 | WMI_10_4_RTT_TSF_CMDID, |
| 1511 | WMI_10_4_RTT_KEEPALIVE_CMDID, |
| 1512 | WMI_10_4_OEM_REQ_CMDID, |
| 1513 | WMI_10_4_NAN_CMDID, |
| 1514 | WMI_10_4_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| 1515 | WMI_10_4_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 1516 | WMI_10_4_REQUEST_STATS_CMDID, |
| 1517 | WMI_10_4_GPIO_CONFIG_CMDID, |
| 1518 | WMI_10_4_GPIO_OUTPUT_CMDID, |
| 1519 | WMI_10_4_VDEV_RATEMASK_CMDID, |
| 1520 | WMI_10_4_CSA_OFFLOAD_ENABLE_CMDID, |
| 1521 | WMI_10_4_GTK_OFFLOAD_CMDID, |
| 1522 | WMI_10_4_QBOOST_CFG_CMDID, |
| 1523 | WMI_10_4_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| 1524 | WMI_10_4_PDEV_SMART_ANT_ENABLE_CMDID, |
| 1525 | WMI_10_4_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID, |
| 1526 | WMI_10_4_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID, |
| 1527 | WMI_10_4_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID, |
| 1528 | WMI_10_4_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID, |
| 1529 | WMI_10_4_VDEV_SET_KEEPALIVE_CMDID, |
| 1530 | WMI_10_4_VDEV_GET_KEEPALIVE_CMDID, |
| 1531 | WMI_10_4_FORCE_FW_HANG_CMDID, |
| 1532 | WMI_10_4_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID, |
| 1533 | WMI_10_4_PDEV_SET_CTL_TABLE_CMDID, |
| 1534 | WMI_10_4_PDEV_SET_MIMOGAIN_TABLE_CMDID, |
| 1535 | WMI_10_4_PDEV_RATEPWR_TABLE_CMDID, |
| 1536 | WMI_10_4_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID, |
| 1537 | WMI_10_4_PDEV_FIPS_CMDID, |
| 1538 | WMI_10_4_TT_SET_CONF_CMDID, |
| 1539 | WMI_10_4_FWTEST_CMDID, |
| 1540 | WMI_10_4_VDEV_ATF_REQUEST_CMDID, |
| 1541 | WMI_10_4_PEER_ATF_REQUEST_CMDID, |
| 1542 | WMI_10_4_PDEV_GET_ANI_CCK_CONFIG_CMDID, |
| 1543 | WMI_10_4_PDEV_GET_ANI_OFDM_CONFIG_CMDID, |
| 1544 | WMI_10_4_PDEV_RESERVE_AST_ENTRY_CMDID, |
| 1545 | WMI_10_4_PDEV_GET_NFCAL_POWER_CMDID, |
| 1546 | WMI_10_4_PDEV_GET_TPC_CMDID, |
| 1547 | WMI_10_4_PDEV_GET_AST_INFO_CMDID, |
| 1548 | WMI_10_4_VDEV_SET_DSCP_TID_MAP_CMDID, |
| 1549 | WMI_10_4_PDEV_GET_TEMPERATURE_CMDID, |
| 1550 | WMI_10_4_PDEV_GET_INFO_CMDID, |
| 1551 | WMI_10_4_VDEV_GET_INFO_CMDID, |
| 1552 | WMI_10_4_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID, |
| 1553 | WMI_10_4_MU_CAL_START_CMDID, |
| 1554 | WMI_10_4_SET_CCA_PARAMS_CMDID, |
| 1555 | WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID, |
| 1556 | WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1, |
| 1557 | }; |
| 1558 | |
| 1559 | enum wmi_10_4_event_id { |
| 1560 | WMI_10_4_SERVICE_READY_EVENTID = 0x8000, |
| 1561 | WMI_10_4_READY_EVENTID, |
| 1562 | WMI_10_4_DEBUG_MESG_EVENTID, |
| 1563 | WMI_10_4_START_EVENTID = 0x9000, |
| 1564 | WMI_10_4_END_EVENTID = 0x9FFF, |
| 1565 | WMI_10_4_SCAN_EVENTID = WMI_10_4_START_EVENTID, |
| 1566 | WMI_10_4_ECHO_EVENTID, |
| 1567 | WMI_10_4_UPDATE_STATS_EVENTID, |
| 1568 | WMI_10_4_INST_RSSI_STATS_EVENTID, |
| 1569 | WMI_10_4_VDEV_START_RESP_EVENTID, |
| 1570 | WMI_10_4_VDEV_STANDBY_REQ_EVENTID, |
| 1571 | WMI_10_4_VDEV_RESUME_REQ_EVENTID, |
| 1572 | WMI_10_4_VDEV_STOPPED_EVENTID, |
| 1573 | WMI_10_4_PEER_STA_KICKOUT_EVENTID, |
| 1574 | WMI_10_4_HOST_SWBA_EVENTID, |
| 1575 | WMI_10_4_TBTTOFFSET_UPDATE_EVENTID, |
| 1576 | WMI_10_4_MGMT_RX_EVENTID, |
| 1577 | WMI_10_4_CHAN_INFO_EVENTID, |
| 1578 | WMI_10_4_PHYERR_EVENTID, |
| 1579 | WMI_10_4_ROAM_EVENTID, |
| 1580 | WMI_10_4_PROFILE_MATCH, |
| 1581 | WMI_10_4_DEBUG_PRINT_EVENTID, |
| 1582 | WMI_10_4_PDEV_QVIT_EVENTID, |
| 1583 | WMI_10_4_WLAN_PROFILE_DATA_EVENTID, |
| 1584 | WMI_10_4_RTT_MEASUREMENT_REPORT_EVENTID, |
| 1585 | WMI_10_4_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1586 | WMI_10_4_RTT_ERROR_REPORT_EVENTID, |
| 1587 | WMI_10_4_RTT_KEEPALIVE_EVENTID, |
| 1588 | WMI_10_4_OEM_CAPABILITY_EVENTID, |
| 1589 | WMI_10_4_OEM_MEASUREMENT_REPORT_EVENTID, |
| 1590 | WMI_10_4_OEM_ERROR_REPORT_EVENTID, |
| 1591 | WMI_10_4_NAN_EVENTID, |
| 1592 | WMI_10_4_WOW_WAKEUP_HOST_EVENTID, |
| 1593 | WMI_10_4_GTK_OFFLOAD_STATUS_EVENTID, |
| 1594 | WMI_10_4_GTK_REKEY_FAIL_EVENTID, |
| 1595 | WMI_10_4_DCS_INTERFERENCE_EVENTID, |
| 1596 | WMI_10_4_PDEV_TPC_CONFIG_EVENTID, |
| 1597 | WMI_10_4_CSA_HANDLING_EVENTID, |
| 1598 | WMI_10_4_GPIO_INPUT_EVENTID, |
| 1599 | WMI_10_4_PEER_RATECODE_LIST_EVENTID, |
| 1600 | WMI_10_4_GENERIC_BUFFER_EVENTID, |
| 1601 | WMI_10_4_MCAST_BUF_RELEASE_EVENTID, |
| 1602 | WMI_10_4_MCAST_LIST_AGEOUT_EVENTID, |
| 1603 | WMI_10_4_VDEV_GET_KEEPALIVE_EVENTID, |
| 1604 | WMI_10_4_WDS_PEER_EVENTID, |
| 1605 | WMI_10_4_PEER_STA_PS_STATECHG_EVENTID, |
| 1606 | WMI_10_4_PDEV_FIPS_EVENTID, |
| 1607 | WMI_10_4_TT_STATS_EVENTID, |
| 1608 | WMI_10_4_PDEV_CHANNEL_HOPPING_EVENTID, |
| 1609 | WMI_10_4_PDEV_ANI_CCK_LEVEL_EVENTID, |
| 1610 | WMI_10_4_PDEV_ANI_OFDM_LEVEL_EVENTID, |
| 1611 | WMI_10_4_PDEV_RESERVE_AST_ENTRY_EVENTID, |
| 1612 | WMI_10_4_PDEV_NFCAL_POWER_EVENTID, |
| 1613 | WMI_10_4_PDEV_TPC_EVENTID, |
| 1614 | WMI_10_4_PDEV_GET_AST_INFO_EVENTID, |
| 1615 | WMI_10_4_PDEV_TEMPERATURE_EVENTID, |
| 1616 | WMI_10_4_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID, |
| 1617 | WMI_10_4_PDEV_BSS_CHAN_INFO_EVENTID, |
| 1618 | WMI_10_4_PDEV_UTF_EVENTID = WMI_10_4_END_EVENTID - 1, |
| 1619 | }; |
| 1620 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1621 | enum wmi_phy_mode { |
| 1622 | MODE_11A = 0, /* 11a Mode */ |
| 1623 | MODE_11G = 1, /* 11b/g Mode */ |
| 1624 | MODE_11B = 2, /* 11b Mode */ |
| 1625 | MODE_11GONLY = 3, /* 11g only Mode */ |
| 1626 | MODE_11NA_HT20 = 4, /* 11a HT20 mode */ |
| 1627 | MODE_11NG_HT20 = 5, /* 11g HT20 mode */ |
| 1628 | MODE_11NA_HT40 = 6, /* 11a HT40 mode */ |
| 1629 | MODE_11NG_HT40 = 7, /* 11g HT40 mode */ |
| 1630 | MODE_11AC_VHT20 = 8, |
| 1631 | MODE_11AC_VHT40 = 9, |
| 1632 | MODE_11AC_VHT80 = 10, |
| 1633 | /* MODE_11AC_VHT160 = 11, */ |
| 1634 | MODE_11AC_VHT20_2G = 11, |
| 1635 | MODE_11AC_VHT40_2G = 12, |
| 1636 | MODE_11AC_VHT80_2G = 13, |
| 1637 | MODE_UNKNOWN = 14, |
| 1638 | MODE_MAX = 14 |
| 1639 | }; |
| 1640 | |
Kalle Valo | 38a1d47 | 2013-09-08 17:56:14 +0300 | [diff] [blame] | 1641 | static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode) |
| 1642 | { |
| 1643 | switch (mode) { |
| 1644 | case MODE_11A: |
| 1645 | return "11a"; |
| 1646 | case MODE_11G: |
| 1647 | return "11g"; |
| 1648 | case MODE_11B: |
| 1649 | return "11b"; |
| 1650 | case MODE_11GONLY: |
| 1651 | return "11gonly"; |
| 1652 | case MODE_11NA_HT20: |
| 1653 | return "11na-ht20"; |
| 1654 | case MODE_11NG_HT20: |
| 1655 | return "11ng-ht20"; |
| 1656 | case MODE_11NA_HT40: |
| 1657 | return "11na-ht40"; |
| 1658 | case MODE_11NG_HT40: |
| 1659 | return "11ng-ht40"; |
| 1660 | case MODE_11AC_VHT20: |
| 1661 | return "11ac-vht20"; |
| 1662 | case MODE_11AC_VHT40: |
| 1663 | return "11ac-vht40"; |
| 1664 | case MODE_11AC_VHT80: |
| 1665 | return "11ac-vht80"; |
| 1666 | case MODE_11AC_VHT20_2G: |
| 1667 | return "11ac-vht20-2g"; |
| 1668 | case MODE_11AC_VHT40_2G: |
| 1669 | return "11ac-vht40-2g"; |
| 1670 | case MODE_11AC_VHT80_2G: |
| 1671 | return "11ac-vht80-2g"; |
| 1672 | case MODE_UNKNOWN: |
| 1673 | /* skip */ |
| 1674 | break; |
| 1675 | |
| 1676 | /* no default handler to allow compiler to check that the |
| 1677 | * enum is fully handled */ |
| 1678 | }; |
| 1679 | |
| 1680 | return "<unknown>"; |
| 1681 | } |
| 1682 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1683 | #define WMI_CHAN_LIST_TAG 0x1 |
| 1684 | #define WMI_SSID_LIST_TAG 0x2 |
| 1685 | #define WMI_BSSID_LIST_TAG 0x3 |
| 1686 | #define WMI_IE_TAG 0x4 |
| 1687 | |
| 1688 | struct wmi_channel { |
| 1689 | __le32 mhz; |
| 1690 | __le32 band_center_freq1; |
| 1691 | __le32 band_center_freq2; /* valid for 11ac, 80plus80 */ |
| 1692 | union { |
| 1693 | __le32 flags; /* WMI_CHAN_FLAG_ */ |
| 1694 | struct { |
| 1695 | u8 mode; /* only 6 LSBs */ |
| 1696 | } __packed; |
| 1697 | } __packed; |
| 1698 | union { |
| 1699 | __le32 reginfo0; |
| 1700 | struct { |
Michal Kazior | 0225693 | 2013-10-23 04:02:14 -0700 | [diff] [blame] | 1701 | /* note: power unit is 0.5 dBm */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1702 | u8 min_power; |
| 1703 | u8 max_power; |
| 1704 | u8 reg_power; |
| 1705 | u8 reg_classid; |
| 1706 | } __packed; |
| 1707 | } __packed; |
| 1708 | union { |
| 1709 | __le32 reginfo1; |
| 1710 | struct { |
| 1711 | u8 antenna_max; |
| 1712 | } __packed; |
| 1713 | } __packed; |
| 1714 | } __packed; |
| 1715 | |
| 1716 | struct wmi_channel_arg { |
| 1717 | u32 freq; |
| 1718 | u32 band_center_freq1; |
| 1719 | bool passive; |
| 1720 | bool allow_ibss; |
| 1721 | bool allow_ht; |
| 1722 | bool allow_vht; |
| 1723 | bool ht40plus; |
Marek Puzyniak | e8a50f8 | 2013-11-20 09:59:47 +0200 | [diff] [blame] | 1724 | bool chan_radar; |
Michal Kazior | 0225693 | 2013-10-23 04:02:14 -0700 | [diff] [blame] | 1725 | /* note: power unit is 0.5 dBm */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1726 | u32 min_power; |
| 1727 | u32 max_power; |
| 1728 | u32 max_reg_power; |
| 1729 | u32 max_antenna_gain; |
| 1730 | u32 reg_class_id; |
| 1731 | enum wmi_phy_mode mode; |
| 1732 | }; |
| 1733 | |
| 1734 | enum wmi_channel_change_cause { |
| 1735 | WMI_CHANNEL_CHANGE_CAUSE_NONE = 0, |
| 1736 | WMI_CHANNEL_CHANGE_CAUSE_CSA, |
| 1737 | }; |
| 1738 | |
| 1739 | #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6) |
| 1740 | #define WMI_CHAN_FLAG_PASSIVE (1 << 7) |
| 1741 | #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8) |
| 1742 | #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9) |
| 1743 | #define WMI_CHAN_FLAG_DFS (1 << 10) |
| 1744 | #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11) |
| 1745 | #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12) |
| 1746 | |
| 1747 | /* Indicate reason for channel switch */ |
| 1748 | #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13) |
| 1749 | |
| 1750 | #define WMI_MAX_SPATIAL_STREAM 3 |
| 1751 | |
| 1752 | /* HT Capabilities*/ |
| 1753 | #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ |
| 1754 | #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */ |
| 1755 | #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ |
| 1756 | #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ |
| 1757 | #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3 |
| 1758 | #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ |
| 1759 | #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4 |
| 1760 | #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */ |
| 1761 | #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ |
| 1762 | #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
| 1763 | #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
| 1764 | #define WMI_HT_CAP_HT40_SGI 0x0800 |
| 1765 | |
| 1766 | #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ |
| 1767 | WMI_HT_CAP_HT20_SGI | \ |
| 1768 | WMI_HT_CAP_HT40_SGI | \ |
| 1769 | WMI_HT_CAP_TX_STBC | \ |
| 1770 | WMI_HT_CAP_RX_STBC | \ |
| 1771 | WMI_HT_CAP_LDPC) |
| 1772 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1773 | /* |
| 1774 | * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information |
| 1775 | * field. The fields not defined here are not supported, or reserved. |
| 1776 | * Do not change these masks and if you have to add new one follow the |
| 1777 | * bitmask as specified by 802.11ac draft. |
| 1778 | */ |
| 1779 | |
| 1780 | #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 |
| 1781 | #define WMI_VHT_CAP_RX_LDPC 0x00000010 |
| 1782 | #define WMI_VHT_CAP_SGI_80MHZ 0x00000020 |
| 1783 | #define WMI_VHT_CAP_TX_STBC 0x00000080 |
| 1784 | #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300 |
| 1785 | #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8 |
| 1786 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 |
| 1787 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23 |
| 1788 | #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000 |
| 1789 | #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000 |
| 1790 | |
| 1791 | /* The following also refer for max HT AMSDU */ |
| 1792 | #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000 |
| 1793 | #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001 |
| 1794 | #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 |
| 1795 | |
| 1796 | #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \ |
| 1797 | WMI_VHT_CAP_RX_LDPC | \ |
| 1798 | WMI_VHT_CAP_SGI_80MHZ | \ |
| 1799 | WMI_VHT_CAP_TX_STBC | \ |
| 1800 | WMI_VHT_CAP_RX_STBC_MASK | \ |
| 1801 | WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \ |
| 1802 | WMI_VHT_CAP_RX_FIXED_ANT | \ |
| 1803 | WMI_VHT_CAP_TX_FIXED_ANT) |
| 1804 | |
| 1805 | /* |
| 1806 | * Interested readers refer to Rx/Tx MCS Map definition as defined in |
| 1807 | * 802.11ac |
| 1808 | */ |
| 1809 | #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1)) |
| 1810 | #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 |
| 1811 | #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 |
| 1812 | |
| 1813 | enum { |
| 1814 | REGDMN_MODE_11A = 0x00001, /* 11a channels */ |
| 1815 | REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */ |
| 1816 | REGDMN_MODE_11B = 0x00004, /* 11b channels */ |
| 1817 | REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */ |
| 1818 | REGDMN_MODE_11G = 0x00008, /* XXX historical */ |
| 1819 | REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */ |
| 1820 | REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */ |
| 1821 | REGDMN_MODE_XR = 0x00100, /* XR channels */ |
| 1822 | REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */ |
| 1823 | REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */ |
| 1824 | REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */ |
| 1825 | REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */ |
| 1826 | REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */ |
| 1827 | REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */ |
| 1828 | REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */ |
| 1829 | REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */ |
| 1830 | REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */ |
| 1831 | REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */ |
| 1832 | REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */ |
| 1833 | REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */ |
| 1834 | REGDMN_MODE_ALL = 0xffffffff |
| 1835 | }; |
| 1836 | |
| 1837 | #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001 |
| 1838 | #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002 |
| 1839 | #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004 |
| 1840 | |
| 1841 | /* regulatory capabilities */ |
| 1842 | #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040 |
| 1843 | #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080 |
| 1844 | #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100 |
| 1845 | #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200 |
| 1846 | #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400 |
| 1847 | #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800 |
| 1848 | |
| 1849 | struct hal_reg_capabilities { |
| 1850 | /* regdomain value specified in EEPROM */ |
| 1851 | __le32 eeprom_rd; |
| 1852 | /*regdomain */ |
| 1853 | __le32 eeprom_rd_ext; |
| 1854 | /* CAP1 capabilities bit map. */ |
| 1855 | __le32 regcap1; |
| 1856 | /* REGDMN EEPROM CAP. */ |
| 1857 | __le32 regcap2; |
| 1858 | /* REGDMN MODE */ |
| 1859 | __le32 wireless_modes; |
| 1860 | __le32 low_2ghz_chan; |
| 1861 | __le32 high_2ghz_chan; |
| 1862 | __le32 low_5ghz_chan; |
| 1863 | __le32 high_5ghz_chan; |
| 1864 | } __packed; |
| 1865 | |
| 1866 | enum wlan_mode_capability { |
| 1867 | WHAL_WLAN_11A_CAPABILITY = 0x1, |
| 1868 | WHAL_WLAN_11G_CAPABILITY = 0x2, |
| 1869 | WHAL_WLAN_11AG_CAPABILITY = 0x3, |
| 1870 | }; |
| 1871 | |
| 1872 | /* structure used by FW for requesting host memory */ |
| 1873 | struct wlan_host_mem_req { |
| 1874 | /* ID of the request */ |
| 1875 | __le32 req_id; |
| 1876 | /* size of the of each unit */ |
| 1877 | __le32 unit_size; |
| 1878 | /* flags to indicate that |
| 1879 | * the number units is dependent |
| 1880 | * on number of resources(num vdevs num peers .. etc) |
| 1881 | */ |
| 1882 | __le32 num_unit_info; |
| 1883 | /* |
| 1884 | * actual number of units to allocate . if flags in the num_unit_info |
| 1885 | * indicate that number of units is tied to number of a particular |
| 1886 | * resource to allocate then num_units filed is set to 0 and host |
| 1887 | * will derive the number units from number of the resources it is |
| 1888 | * requesting. |
| 1889 | */ |
| 1890 | __le32 num_units; |
| 1891 | } __packed; |
| 1892 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1893 | /* |
| 1894 | * The following struct holds optional payload for |
| 1895 | * wmi_service_ready_event,e.g., 11ac pass some of the |
| 1896 | * device capability to the host. |
| 1897 | */ |
| 1898 | struct wmi_service_ready_event { |
| 1899 | __le32 sw_version; |
| 1900 | __le32 sw_version_1; |
| 1901 | __le32 abi_version; |
| 1902 | /* WMI_PHY_CAPABILITY */ |
| 1903 | __le32 phy_capability; |
| 1904 | /* Maximum number of frag table entries that SW will populate less 1 */ |
| 1905 | __le32 max_frag_entry; |
Michal Kazior | c4f8c83 | 2014-09-04 10:18:32 +0200 | [diff] [blame] | 1906 | __le32 wmi_service_bitmap[16]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1907 | __le32 num_rf_chains; |
| 1908 | /* |
| 1909 | * The following field is only valid for service type |
| 1910 | * WMI_SERVICE_11AC |
| 1911 | */ |
| 1912 | __le32 ht_cap_info; /* WMI HT Capability */ |
| 1913 | __le32 vht_cap_info; /* VHT capability info field of 802.11ac */ |
| 1914 | __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */ |
| 1915 | __le32 hw_min_tx_power; |
| 1916 | __le32 hw_max_tx_power; |
| 1917 | struct hal_reg_capabilities hal_reg_capabilities; |
| 1918 | __le32 sys_cap_info; |
| 1919 | __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ |
| 1920 | /* |
| 1921 | * Max beacon and Probe Response IE offload size |
| 1922 | * (includes optional P2P IEs) |
| 1923 | */ |
| 1924 | __le32 max_bcn_ie_size; |
| 1925 | /* |
| 1926 | * request to host to allocate a chuck of memory and pss it down to FW |
| 1927 | * via WM_INIT. FW uses this as FW extesnsion memory for saving its |
| 1928 | * data structures. Only valid for low latency interfaces like PCIE |
| 1929 | * where FW can access this memory directly (or) by DMA. |
| 1930 | */ |
| 1931 | __le32 num_mem_reqs; |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 1932 | struct wlan_host_mem_req mem_reqs[0]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1933 | } __packed; |
| 1934 | |
Bartosz Markowski | 6f97d25 | 2013-09-26 17:47:09 +0200 | [diff] [blame] | 1935 | /* This is the definition from 10.X firmware branch */ |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 1936 | struct wmi_10x_service_ready_event { |
Bartosz Markowski | 6f97d25 | 2013-09-26 17:47:09 +0200 | [diff] [blame] | 1937 | __le32 sw_version; |
| 1938 | __le32 abi_version; |
| 1939 | |
| 1940 | /* WMI_PHY_CAPABILITY */ |
| 1941 | __le32 phy_capability; |
| 1942 | |
| 1943 | /* Maximum number of frag table entries that SW will populate less 1 */ |
| 1944 | __le32 max_frag_entry; |
Michal Kazior | c4f8c83 | 2014-09-04 10:18:32 +0200 | [diff] [blame] | 1945 | __le32 wmi_service_bitmap[16]; |
Bartosz Markowski | 6f97d25 | 2013-09-26 17:47:09 +0200 | [diff] [blame] | 1946 | __le32 num_rf_chains; |
| 1947 | |
| 1948 | /* |
| 1949 | * The following field is only valid for service type |
| 1950 | * WMI_SERVICE_11AC |
| 1951 | */ |
| 1952 | __le32 ht_cap_info; /* WMI HT Capability */ |
| 1953 | __le32 vht_cap_info; /* VHT capability info field of 802.11ac */ |
| 1954 | __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */ |
| 1955 | __le32 hw_min_tx_power; |
| 1956 | __le32 hw_max_tx_power; |
| 1957 | |
| 1958 | struct hal_reg_capabilities hal_reg_capabilities; |
| 1959 | |
| 1960 | __le32 sys_cap_info; |
| 1961 | __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ |
| 1962 | |
| 1963 | /* |
| 1964 | * request to host to allocate a chuck of memory and pss it down to FW |
| 1965 | * via WM_INIT. FW uses this as FW extesnsion memory for saving its |
| 1966 | * data structures. Only valid for low latency interfaces like PCIE |
| 1967 | * where FW can access this memory directly (or) by DMA. |
| 1968 | */ |
| 1969 | __le32 num_mem_reqs; |
| 1970 | |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 1971 | struct wlan_host_mem_req mem_reqs[0]; |
Bartosz Markowski | 6f97d25 | 2013-09-26 17:47:09 +0200 | [diff] [blame] | 1972 | } __packed; |
| 1973 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1974 | #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ) |
| 1975 | #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ) |
| 1976 | |
| 1977 | struct wmi_ready_event { |
| 1978 | __le32 sw_version; |
| 1979 | __le32 abi_version; |
| 1980 | struct wmi_mac_addr mac_addr; |
| 1981 | __le32 status; |
| 1982 | } __packed; |
| 1983 | |
| 1984 | struct wmi_resource_config { |
| 1985 | /* number of virtual devices (VAPs) to support */ |
| 1986 | __le32 num_vdevs; |
| 1987 | |
| 1988 | /* number of peer nodes to support */ |
| 1989 | __le32 num_peers; |
| 1990 | |
| 1991 | /* |
| 1992 | * In offload mode target supports features like WOW, chatter and |
| 1993 | * other protocol offloads. In order to support them some |
| 1994 | * functionalities like reorder buffering, PN checking need to be |
| 1995 | * done in target. This determines maximum number of peers suported |
| 1996 | * by target in offload mode |
| 1997 | */ |
| 1998 | __le32 num_offload_peers; |
| 1999 | |
| 2000 | /* For target-based RX reordering */ |
| 2001 | __le32 num_offload_reorder_bufs; |
| 2002 | |
| 2003 | /* number of keys per peer */ |
| 2004 | __le32 num_peer_keys; |
| 2005 | |
| 2006 | /* total number of TX/RX data TIDs */ |
| 2007 | __le32 num_tids; |
| 2008 | |
| 2009 | /* |
| 2010 | * max skid for resolving hash collisions |
| 2011 | * |
| 2012 | * The address search table is sparse, so that if two MAC addresses |
| 2013 | * result in the same hash value, the second of these conflicting |
| 2014 | * entries can slide to the next index in the address search table, |
| 2015 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 2016 | * specifies the upper bound on how many subsequent indices to search |
| 2017 | * over to find an unoccupied space. |
| 2018 | */ |
| 2019 | __le32 ast_skid_limit; |
| 2020 | |
| 2021 | /* |
| 2022 | * the nominal chain mask for transmit |
| 2023 | * |
| 2024 | * The chain mask may be modified dynamically, e.g. to operate AP |
| 2025 | * tx with a reduced number of chains if no clients are associated. |
| 2026 | * This configuration parameter specifies the nominal chain-mask that |
| 2027 | * should be used when not operating with a reduced set of tx chains. |
| 2028 | */ |
| 2029 | __le32 tx_chain_mask; |
| 2030 | |
| 2031 | /* |
| 2032 | * the nominal chain mask for receive |
| 2033 | * |
| 2034 | * The chain mask may be modified dynamically, e.g. for a client |
| 2035 | * to use a reduced number of chains for receive if the traffic to |
| 2036 | * the client is low enough that it doesn't require downlink MIMO |
| 2037 | * or antenna diversity. |
| 2038 | * This configuration parameter specifies the nominal chain-mask that |
| 2039 | * should be used when not operating with a reduced set of rx chains. |
| 2040 | */ |
| 2041 | __le32 rx_chain_mask; |
| 2042 | |
| 2043 | /* |
| 2044 | * what rx reorder timeout (ms) to use for the AC |
| 2045 | * |
| 2046 | * Each WMM access class (voice, video, best-effort, background) will |
| 2047 | * have its own timeout value to dictate how long to wait for missing |
| 2048 | * rx MPDUs to arrive before flushing subsequent MPDUs that have |
| 2049 | * already been received. |
| 2050 | * This parameter specifies the timeout in milliseconds for each |
| 2051 | * class. |
| 2052 | */ |
| 2053 | __le32 rx_timeout_pri_vi; |
| 2054 | __le32 rx_timeout_pri_vo; |
| 2055 | __le32 rx_timeout_pri_be; |
| 2056 | __le32 rx_timeout_pri_bk; |
| 2057 | |
| 2058 | /* |
| 2059 | * what mode the rx should decap packets to |
| 2060 | * |
| 2061 | * MAC can decap to RAW (no decap), native wifi or Ethernet types |
| 2062 | * THis setting also determines the default TX behavior, however TX |
| 2063 | * behavior can be modified on a per VAP basis during VAP init |
| 2064 | */ |
| 2065 | __le32 rx_decap_mode; |
| 2066 | |
Geert Uytterhoeven | 8e4a4f5 | 2014-03-11 11:23:45 +0100 | [diff] [blame] | 2067 | /* what is the maximum number of scan requests that can be queued */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2068 | __le32 scan_max_pending_reqs; |
| 2069 | |
| 2070 | /* maximum VDEV that could use BMISS offload */ |
| 2071 | __le32 bmiss_offload_max_vdev; |
| 2072 | |
| 2073 | /* maximum VDEV that could use offload roaming */ |
| 2074 | __le32 roam_offload_max_vdev; |
| 2075 | |
| 2076 | /* maximum AP profiles that would push to offload roaming */ |
| 2077 | __le32 roam_offload_max_ap_profiles; |
| 2078 | |
| 2079 | /* |
| 2080 | * how many groups to use for mcast->ucast conversion |
| 2081 | * |
| 2082 | * The target's WAL maintains a table to hold information regarding |
| 2083 | * which peers belong to a given multicast group, so that if |
| 2084 | * multicast->unicast conversion is enabled, the target can convert |
| 2085 | * multicast tx frames to a series of unicast tx frames, to each |
| 2086 | * peer within the multicast group. |
| 2087 | This num_mcast_groups configuration parameter tells the target how |
| 2088 | * many multicast groups to provide storage for within its multicast |
| 2089 | * group membership table. |
| 2090 | */ |
| 2091 | __le32 num_mcast_groups; |
| 2092 | |
| 2093 | /* |
| 2094 | * size to alloc for the mcast membership table |
| 2095 | * |
| 2096 | * This num_mcast_table_elems configuration parameter tells the |
| 2097 | * target how many peer elements it needs to provide storage for in |
| 2098 | * its multicast group membership table. |
| 2099 | * These multicast group membership table elements are shared by the |
| 2100 | * multicast groups stored within the table. |
| 2101 | */ |
| 2102 | __le32 num_mcast_table_elems; |
| 2103 | |
| 2104 | /* |
| 2105 | * whether/how to do multicast->unicast conversion |
| 2106 | * |
| 2107 | * This configuration parameter specifies whether the target should |
| 2108 | * perform multicast --> unicast conversion on transmit, and if so, |
| 2109 | * what to do if it finds no entries in its multicast group |
| 2110 | * membership table for the multicast IP address in the tx frame. |
| 2111 | * Configuration value: |
| 2112 | * 0 -> Do not perform multicast to unicast conversion. |
| 2113 | * 1 -> Convert multicast frames to unicast, if the IP multicast |
| 2114 | * address from the tx frame is found in the multicast group |
| 2115 | * membership table. If the IP multicast address is not found, |
| 2116 | * drop the frame. |
| 2117 | * 2 -> Convert multicast frames to unicast, if the IP multicast |
| 2118 | * address from the tx frame is found in the multicast group |
| 2119 | * membership table. If the IP multicast address is not found, |
| 2120 | * transmit the frame as multicast. |
| 2121 | */ |
| 2122 | __le32 mcast2ucast_mode; |
| 2123 | |
| 2124 | /* |
| 2125 | * how much memory to allocate for a tx PPDU dbg log |
| 2126 | * |
| 2127 | * This parameter controls how much memory the target will allocate |
| 2128 | * to store a log of tx PPDU meta-information (how large the PPDU |
| 2129 | * was, when it was sent, whether it was successful, etc.) |
| 2130 | */ |
| 2131 | __le32 tx_dbg_log_size; |
| 2132 | |
| 2133 | /* how many AST entries to be allocated for WDS */ |
| 2134 | __le32 num_wds_entries; |
| 2135 | |
| 2136 | /* |
| 2137 | * MAC DMA burst size, e.g., For target PCI limit can be |
| 2138 | * 0 -default, 1 256B |
| 2139 | */ |
| 2140 | __le32 dma_burst_size; |
| 2141 | |
| 2142 | /* |
| 2143 | * Fixed delimiters to be inserted after every MPDU to |
| 2144 | * account for interface latency to avoid underrun. |
| 2145 | */ |
| 2146 | __le32 mac_aggr_delim; |
| 2147 | |
| 2148 | /* |
| 2149 | * determine whether target is responsible for detecting duplicate |
| 2150 | * non-aggregate MPDU and timing out stale fragments. |
| 2151 | * |
| 2152 | * A-MPDU reordering is always performed on the target. |
| 2153 | * |
| 2154 | * 0: target responsible for frag timeout and dup checking |
| 2155 | * 1: host responsible for frag timeout and dup checking |
| 2156 | */ |
| 2157 | __le32 rx_skip_defrag_timeout_dup_detection_check; |
| 2158 | |
| 2159 | /* |
| 2160 | * Configuration for VoW : |
| 2161 | * No of Video Nodes to be supported |
| 2162 | * and Max no of descriptors for each Video link (node). |
| 2163 | */ |
| 2164 | __le32 vow_config; |
| 2165 | |
| 2166 | /* maximum VDEV that could use GTK offload */ |
| 2167 | __le32 gtk_offload_max_vdev; |
| 2168 | |
| 2169 | /* Number of msdu descriptors target should use */ |
| 2170 | __le32 num_msdu_desc; |
| 2171 | |
| 2172 | /* |
| 2173 | * Max. number of Tx fragments per MSDU |
| 2174 | * This parameter controls the max number of Tx fragments per MSDU. |
| 2175 | * This is sent by the target as part of the WMI_SERVICE_READY event |
| 2176 | * and is overriden by the OS shim as required. |
| 2177 | */ |
| 2178 | __le32 max_frag_entries; |
| 2179 | } __packed; |
| 2180 | |
Bartosz Markowski | 12b2b9e | 2013-09-26 17:47:13 +0200 | [diff] [blame] | 2181 | struct wmi_resource_config_10x { |
| 2182 | /* number of virtual devices (VAPs) to support */ |
| 2183 | __le32 num_vdevs; |
| 2184 | |
| 2185 | /* number of peer nodes to support */ |
| 2186 | __le32 num_peers; |
| 2187 | |
| 2188 | /* number of keys per peer */ |
| 2189 | __le32 num_peer_keys; |
| 2190 | |
| 2191 | /* total number of TX/RX data TIDs */ |
| 2192 | __le32 num_tids; |
| 2193 | |
| 2194 | /* |
| 2195 | * max skid for resolving hash collisions |
| 2196 | * |
| 2197 | * The address search table is sparse, so that if two MAC addresses |
| 2198 | * result in the same hash value, the second of these conflicting |
| 2199 | * entries can slide to the next index in the address search table, |
| 2200 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 2201 | * specifies the upper bound on how many subsequent indices to search |
| 2202 | * over to find an unoccupied space. |
| 2203 | */ |
| 2204 | __le32 ast_skid_limit; |
| 2205 | |
| 2206 | /* |
| 2207 | * the nominal chain mask for transmit |
| 2208 | * |
| 2209 | * The chain mask may be modified dynamically, e.g. to operate AP |
| 2210 | * tx with a reduced number of chains if no clients are associated. |
| 2211 | * This configuration parameter specifies the nominal chain-mask that |
| 2212 | * should be used when not operating with a reduced set of tx chains. |
| 2213 | */ |
| 2214 | __le32 tx_chain_mask; |
| 2215 | |
| 2216 | /* |
| 2217 | * the nominal chain mask for receive |
| 2218 | * |
| 2219 | * The chain mask may be modified dynamically, e.g. for a client |
| 2220 | * to use a reduced number of chains for receive if the traffic to |
| 2221 | * the client is low enough that it doesn't require downlink MIMO |
| 2222 | * or antenna diversity. |
| 2223 | * This configuration parameter specifies the nominal chain-mask that |
| 2224 | * should be used when not operating with a reduced set of rx chains. |
| 2225 | */ |
| 2226 | __le32 rx_chain_mask; |
| 2227 | |
| 2228 | /* |
| 2229 | * what rx reorder timeout (ms) to use for the AC |
| 2230 | * |
| 2231 | * Each WMM access class (voice, video, best-effort, background) will |
| 2232 | * have its own timeout value to dictate how long to wait for missing |
| 2233 | * rx MPDUs to arrive before flushing subsequent MPDUs that have |
| 2234 | * already been received. |
| 2235 | * This parameter specifies the timeout in milliseconds for each |
| 2236 | * class. |
| 2237 | */ |
| 2238 | __le32 rx_timeout_pri_vi; |
| 2239 | __le32 rx_timeout_pri_vo; |
| 2240 | __le32 rx_timeout_pri_be; |
| 2241 | __le32 rx_timeout_pri_bk; |
| 2242 | |
| 2243 | /* |
| 2244 | * what mode the rx should decap packets to |
| 2245 | * |
| 2246 | * MAC can decap to RAW (no decap), native wifi or Ethernet types |
| 2247 | * THis setting also determines the default TX behavior, however TX |
| 2248 | * behavior can be modified on a per VAP basis during VAP init |
| 2249 | */ |
| 2250 | __le32 rx_decap_mode; |
| 2251 | |
Geert Uytterhoeven | 8e4a4f5 | 2014-03-11 11:23:45 +0100 | [diff] [blame] | 2252 | /* what is the maximum number of scan requests that can be queued */ |
Bartosz Markowski | 12b2b9e | 2013-09-26 17:47:13 +0200 | [diff] [blame] | 2253 | __le32 scan_max_pending_reqs; |
| 2254 | |
| 2255 | /* maximum VDEV that could use BMISS offload */ |
| 2256 | __le32 bmiss_offload_max_vdev; |
| 2257 | |
| 2258 | /* maximum VDEV that could use offload roaming */ |
| 2259 | __le32 roam_offload_max_vdev; |
| 2260 | |
| 2261 | /* maximum AP profiles that would push to offload roaming */ |
| 2262 | __le32 roam_offload_max_ap_profiles; |
| 2263 | |
| 2264 | /* |
| 2265 | * how many groups to use for mcast->ucast conversion |
| 2266 | * |
| 2267 | * The target's WAL maintains a table to hold information regarding |
| 2268 | * which peers belong to a given multicast group, so that if |
| 2269 | * multicast->unicast conversion is enabled, the target can convert |
| 2270 | * multicast tx frames to a series of unicast tx frames, to each |
| 2271 | * peer within the multicast group. |
| 2272 | This num_mcast_groups configuration parameter tells the target how |
| 2273 | * many multicast groups to provide storage for within its multicast |
| 2274 | * group membership table. |
| 2275 | */ |
| 2276 | __le32 num_mcast_groups; |
| 2277 | |
| 2278 | /* |
| 2279 | * size to alloc for the mcast membership table |
| 2280 | * |
| 2281 | * This num_mcast_table_elems configuration parameter tells the |
| 2282 | * target how many peer elements it needs to provide storage for in |
| 2283 | * its multicast group membership table. |
| 2284 | * These multicast group membership table elements are shared by the |
| 2285 | * multicast groups stored within the table. |
| 2286 | */ |
| 2287 | __le32 num_mcast_table_elems; |
| 2288 | |
| 2289 | /* |
| 2290 | * whether/how to do multicast->unicast conversion |
| 2291 | * |
| 2292 | * This configuration parameter specifies whether the target should |
| 2293 | * perform multicast --> unicast conversion on transmit, and if so, |
| 2294 | * what to do if it finds no entries in its multicast group |
| 2295 | * membership table for the multicast IP address in the tx frame. |
| 2296 | * Configuration value: |
| 2297 | * 0 -> Do not perform multicast to unicast conversion. |
| 2298 | * 1 -> Convert multicast frames to unicast, if the IP multicast |
| 2299 | * address from the tx frame is found in the multicast group |
| 2300 | * membership table. If the IP multicast address is not found, |
| 2301 | * drop the frame. |
| 2302 | * 2 -> Convert multicast frames to unicast, if the IP multicast |
| 2303 | * address from the tx frame is found in the multicast group |
| 2304 | * membership table. If the IP multicast address is not found, |
| 2305 | * transmit the frame as multicast. |
| 2306 | */ |
| 2307 | __le32 mcast2ucast_mode; |
| 2308 | |
| 2309 | /* |
| 2310 | * how much memory to allocate for a tx PPDU dbg log |
| 2311 | * |
| 2312 | * This parameter controls how much memory the target will allocate |
| 2313 | * to store a log of tx PPDU meta-information (how large the PPDU |
| 2314 | * was, when it was sent, whether it was successful, etc.) |
| 2315 | */ |
| 2316 | __le32 tx_dbg_log_size; |
| 2317 | |
| 2318 | /* how many AST entries to be allocated for WDS */ |
| 2319 | __le32 num_wds_entries; |
| 2320 | |
| 2321 | /* |
| 2322 | * MAC DMA burst size, e.g., For target PCI limit can be |
| 2323 | * 0 -default, 1 256B |
| 2324 | */ |
| 2325 | __le32 dma_burst_size; |
| 2326 | |
| 2327 | /* |
| 2328 | * Fixed delimiters to be inserted after every MPDU to |
| 2329 | * account for interface latency to avoid underrun. |
| 2330 | */ |
| 2331 | __le32 mac_aggr_delim; |
| 2332 | |
| 2333 | /* |
| 2334 | * determine whether target is responsible for detecting duplicate |
| 2335 | * non-aggregate MPDU and timing out stale fragments. |
| 2336 | * |
| 2337 | * A-MPDU reordering is always performed on the target. |
| 2338 | * |
| 2339 | * 0: target responsible for frag timeout and dup checking |
| 2340 | * 1: host responsible for frag timeout and dup checking |
| 2341 | */ |
| 2342 | __le32 rx_skip_defrag_timeout_dup_detection_check; |
| 2343 | |
| 2344 | /* |
| 2345 | * Configuration for VoW : |
| 2346 | * No of Video Nodes to be supported |
| 2347 | * and Max no of descriptors for each Video link (node). |
| 2348 | */ |
| 2349 | __le32 vow_config; |
| 2350 | |
| 2351 | /* Number of msdu descriptors target should use */ |
| 2352 | __le32 num_msdu_desc; |
| 2353 | |
| 2354 | /* |
| 2355 | * Max. number of Tx fragments per MSDU |
| 2356 | * This parameter controls the max number of Tx fragments per MSDU. |
| 2357 | * This is sent by the target as part of the WMI_SERVICE_READY event |
| 2358 | * and is overriden by the OS shim as required. |
| 2359 | */ |
| 2360 | __le32 max_frag_entries; |
| 2361 | } __packed; |
| 2362 | |
Rajkumar Manoharan | 4a16fbe | 2014-12-17 12:21:12 +0200 | [diff] [blame] | 2363 | enum wmi_10_2_feature_mask { |
| 2364 | WMI_10_2_RX_BATCH_MODE = BIT(0), |
| 2365 | WMI_10_2_ATF_CONFIG = BIT(1), |
Yanbo Li | de0c789b | 2015-04-15 15:28:08 +0300 | [diff] [blame] | 2366 | WMI_10_2_COEX_GPIO = BIT(3), |
Rajkumar Manoharan | 4a16fbe | 2014-12-17 12:21:12 +0200 | [diff] [blame] | 2367 | }; |
| 2368 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2369 | struct wmi_resource_config_10_2 { |
| 2370 | struct wmi_resource_config_10x common; |
| 2371 | __le32 max_peer_ext_stats; |
| 2372 | __le32 smart_ant_cap; /* 0-disable, 1-enable */ |
| 2373 | __le32 bk_min_free; |
| 2374 | __le32 be_min_free; |
| 2375 | __le32 vi_min_free; |
| 2376 | __le32 vo_min_free; |
Rajkumar Manoharan | 4a16fbe | 2014-12-17 12:21:12 +0200 | [diff] [blame] | 2377 | __le32 feature_mask; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2378 | } __packed; |
Bartosz Markowski | 12b2b9e | 2013-09-26 17:47:13 +0200 | [diff] [blame] | 2379 | |
Raja Mani | b039941 | 2015-06-22 20:10:17 +0530 | [diff] [blame] | 2380 | #define NUM_UNITS_IS_NUM_VDEVS BIT(0) |
| 2381 | #define NUM_UNITS_IS_NUM_PEERS BIT(1) |
| 2382 | #define NUM_UNITS_IS_NUM_ACTIVE_PEERS BIT(2) |
Bartosz Markowski | b3effe6 | 2013-09-26 17:47:11 +0200 | [diff] [blame] | 2383 | |
Raja Mani | d1e52a8 | 2015-06-22 20:10:15 +0530 | [diff] [blame] | 2384 | struct wmi_resource_config_10_4 { |
| 2385 | /* Number of virtual devices (VAPs) to support */ |
| 2386 | __le32 num_vdevs; |
| 2387 | |
| 2388 | /* Number of peer nodes to support */ |
| 2389 | __le32 num_peers; |
| 2390 | |
| 2391 | /* Number of active peer nodes to support */ |
| 2392 | __le32 num_active_peers; |
| 2393 | |
| 2394 | /* In offload mode, target supports features like WOW, chatter and other |
| 2395 | * protocol offloads. In order to support them some functionalities like |
| 2396 | * reorder buffering, PN checking need to be done in target. |
| 2397 | * This determines maximum number of peers supported by target in |
| 2398 | * offload mode. |
| 2399 | */ |
| 2400 | __le32 num_offload_peers; |
| 2401 | |
| 2402 | /* Number of reorder buffers available for doing target based reorder |
| 2403 | * Rx reorder buffering |
| 2404 | */ |
| 2405 | __le32 num_offload_reorder_buffs; |
| 2406 | |
| 2407 | /* Number of keys per peer */ |
| 2408 | __le32 num_peer_keys; |
| 2409 | |
| 2410 | /* Total number of TX/RX data TIDs */ |
| 2411 | __le32 num_tids; |
| 2412 | |
| 2413 | /* Max skid for resolving hash collisions. |
| 2414 | * The address search table is sparse, so that if two MAC addresses |
| 2415 | * result in the same hash value, the second of these conflicting |
| 2416 | * entries can slide to the next index in the address search table, |
| 2417 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 2418 | * specifies the upper bound on how many subsequent indices to search |
| 2419 | * over to find an unoccupied space. |
| 2420 | */ |
| 2421 | __le32 ast_skid_limit; |
| 2422 | |
| 2423 | /* The nominal chain mask for transmit. |
| 2424 | * The chain mask may be modified dynamically, e.g. to operate AP tx |
| 2425 | * with a reduced number of chains if no clients are associated. |
| 2426 | * This configuration parameter specifies the nominal chain-mask that |
| 2427 | * should be used when not operating with a reduced set of tx chains. |
| 2428 | */ |
| 2429 | __le32 tx_chain_mask; |
| 2430 | |
| 2431 | /* The nominal chain mask for receive. |
| 2432 | * The chain mask may be modified dynamically, e.g. for a client to use |
| 2433 | * a reduced number of chains for receive if the traffic to the client |
| 2434 | * is low enough that it doesn't require downlink MIMO or antenna |
| 2435 | * diversity. This configuration parameter specifies the nominal |
| 2436 | * chain-mask that should be used when not operating with a reduced |
| 2437 | * set of rx chains. |
| 2438 | */ |
| 2439 | __le32 rx_chain_mask; |
| 2440 | |
| 2441 | /* What rx reorder timeout (ms) to use for the AC. |
| 2442 | * Each WMM access class (voice, video, best-effort, background) will |
| 2443 | * have its own timeout value to dictate how long to wait for missing |
| 2444 | * rx MPDUs to arrive before flushing subsequent MPDUs that have already |
| 2445 | * been received. This parameter specifies the timeout in milliseconds |
| 2446 | * for each class. |
| 2447 | */ |
| 2448 | __le32 rx_timeout_pri[4]; |
| 2449 | |
| 2450 | /* What mode the rx should decap packets to. |
| 2451 | * MAC can decap to RAW (no decap), native wifi or Ethernet types. |
| 2452 | * This setting also determines the default TX behavior, however TX |
| 2453 | * behavior can be modified on a per VAP basis during VAP init |
| 2454 | */ |
| 2455 | __le32 rx_decap_mode; |
| 2456 | |
| 2457 | __le32 scan_max_pending_req; |
| 2458 | |
| 2459 | __le32 bmiss_offload_max_vdev; |
| 2460 | |
| 2461 | __le32 roam_offload_max_vdev; |
| 2462 | |
| 2463 | __le32 roam_offload_max_ap_profiles; |
| 2464 | |
| 2465 | /* How many groups to use for mcast->ucast conversion. |
| 2466 | * The target's WAL maintains a table to hold information regarding |
| 2467 | * which peers belong to a given multicast group, so that if |
| 2468 | * multicast->unicast conversion is enabled, the target can convert |
| 2469 | * multicast tx frames to a series of unicast tx frames, to each peer |
| 2470 | * within the multicast group. This num_mcast_groups configuration |
| 2471 | * parameter tells the target how many multicast groups to provide |
| 2472 | * storage for within its multicast group membership table. |
| 2473 | */ |
| 2474 | __le32 num_mcast_groups; |
| 2475 | |
| 2476 | /* Size to alloc for the mcast membership table. |
| 2477 | * This num_mcast_table_elems configuration parameter tells the target |
| 2478 | * how many peer elements it needs to provide storage for in its |
| 2479 | * multicast group membership table. These multicast group membership |
| 2480 | * table elements are shared by the multicast groups stored within |
| 2481 | * the table. |
| 2482 | */ |
| 2483 | __le32 num_mcast_table_elems; |
| 2484 | |
| 2485 | /* Whether/how to do multicast->unicast conversion. |
| 2486 | * This configuration parameter specifies whether the target should |
| 2487 | * perform multicast --> unicast conversion on transmit, and if so, |
| 2488 | * what to do if it finds no entries in its multicast group membership |
| 2489 | * table for the multicast IP address in the tx frame. |
| 2490 | * Configuration value: |
| 2491 | * 0 -> Do not perform multicast to unicast conversion. |
| 2492 | * 1 -> Convert multicast frames to unicast, if the IP multicast address |
| 2493 | * from the tx frame is found in the multicast group membership |
| 2494 | * table. If the IP multicast address is not found, drop the frame |
| 2495 | * 2 -> Convert multicast frames to unicast, if the IP multicast address |
| 2496 | * from the tx frame is found in the multicast group membership |
| 2497 | * table. If the IP multicast address is not found, transmit the |
| 2498 | * frame as multicast. |
| 2499 | */ |
| 2500 | __le32 mcast2ucast_mode; |
| 2501 | |
| 2502 | /* How much memory to allocate for a tx PPDU dbg log. |
| 2503 | * This parameter controls how much memory the target will allocate to |
| 2504 | * store a log of tx PPDU meta-information (how large the PPDU was, |
| 2505 | * when it was sent, whether it was successful, etc.) |
| 2506 | */ |
| 2507 | __le32 tx_dbg_log_size; |
| 2508 | |
| 2509 | /* How many AST entries to be allocated for WDS */ |
| 2510 | __le32 num_wds_entries; |
| 2511 | |
| 2512 | /* MAC DMA burst size. 0 -default, 1 -256B */ |
| 2513 | __le32 dma_burst_size; |
| 2514 | |
| 2515 | /* Fixed delimiters to be inserted after every MPDU to account for |
| 2516 | * interface latency to avoid underrun. |
| 2517 | */ |
| 2518 | __le32 mac_aggr_delim; |
| 2519 | |
| 2520 | /* Determine whether target is responsible for detecting duplicate |
| 2521 | * non-aggregate MPDU and timing out stale fragments. A-MPDU reordering |
| 2522 | * is always performed on the target. |
| 2523 | * |
| 2524 | * 0: target responsible for frag timeout and dup checking |
| 2525 | * 1: host responsible for frag timeout and dup checking |
| 2526 | */ |
| 2527 | __le32 rx_skip_defrag_timeout_dup_detection_check; |
| 2528 | |
| 2529 | /* Configuration for VoW : No of Video nodes to be supported and max |
| 2530 | * no of descriptors for each video link (node). |
| 2531 | */ |
| 2532 | __le32 vow_config; |
| 2533 | |
| 2534 | /* Maximum vdev that could use gtk offload */ |
| 2535 | __le32 gtk_offload_max_vdev; |
| 2536 | |
| 2537 | /* Number of msdu descriptors target should use */ |
| 2538 | __le32 num_msdu_desc; |
| 2539 | |
| 2540 | /* Max number of tx fragments per MSDU. |
| 2541 | * This parameter controls the max number of tx fragments per MSDU. |
| 2542 | * This will passed by target as part of the WMI_SERVICE_READY event |
| 2543 | * and is overridden by the OS shim as required. |
| 2544 | */ |
| 2545 | __le32 max_frag_entries; |
| 2546 | |
| 2547 | /* Max number of extended peer stats. |
| 2548 | * This parameter controls the max number of peers for which extended |
| 2549 | * statistics are supported by target |
| 2550 | */ |
| 2551 | __le32 max_peer_ext_stats; |
| 2552 | |
| 2553 | /* Smart antenna capabilities information. |
| 2554 | * 1 - Smart antenna is enabled |
| 2555 | * 0 - Smart antenna is disabled |
| 2556 | * In future this can contain smart antenna specific capabilities. |
| 2557 | */ |
| 2558 | __le32 smart_ant_cap; |
| 2559 | |
| 2560 | /* User can configure the buffers allocated for each AC (BE, BK, VI, VO) |
| 2561 | * during init. |
| 2562 | */ |
| 2563 | __le32 bk_minfree; |
| 2564 | __le32 be_minfree; |
| 2565 | __le32 vi_minfree; |
| 2566 | __le32 vo_minfree; |
| 2567 | |
| 2568 | /* Rx batch mode capability. |
| 2569 | * 1 - Rx batch mode enabled |
| 2570 | * 0 - Rx batch mode disabled |
| 2571 | */ |
| 2572 | __le32 rx_batchmode; |
| 2573 | |
| 2574 | /* Thermal throttling capability. |
| 2575 | * 1 - Capable of thermal throttling |
| 2576 | * 0 - Not capable of thermal throttling |
| 2577 | */ |
| 2578 | __le32 tt_support; |
| 2579 | |
| 2580 | /* ATF configuration. |
| 2581 | * 1 - Enable ATF |
| 2582 | * 0 - Disable ATF |
| 2583 | */ |
| 2584 | __le32 atf_config; |
| 2585 | |
| 2586 | /* Configure padding to manage IP header un-alignment |
| 2587 | * 1 - Enable padding |
| 2588 | * 0 - Disable padding |
| 2589 | */ |
| 2590 | __le32 iphdr_pad_config; |
| 2591 | |
| 2592 | /* qwrap configuration |
| 2593 | * 1 - This is qwrap configuration |
| 2594 | * 0 - This is not qwrap |
| 2595 | */ |
| 2596 | __le32 qwrap_config; |
| 2597 | } __packed; |
| 2598 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2599 | /* strucutre describing host memory chunk. */ |
| 2600 | struct host_memory_chunk { |
| 2601 | /* id of the request that is passed up in service ready */ |
| 2602 | __le32 req_id; |
| 2603 | /* the physical address the memory chunk */ |
| 2604 | __le32 ptr; |
| 2605 | /* size of the chunk */ |
| 2606 | __le32 size; |
| 2607 | } __packed; |
| 2608 | |
Michal Kazior | cf9fca8 | 2014-09-18 15:21:22 +0200 | [diff] [blame] | 2609 | struct wmi_host_mem_chunks { |
| 2610 | __le32 count; |
| 2611 | /* some fw revisions require at least 1 chunk regardless of count */ |
| 2612 | struct host_memory_chunk items[1]; |
| 2613 | } __packed; |
| 2614 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2615 | struct wmi_init_cmd { |
| 2616 | struct wmi_resource_config resource_config; |
Michal Kazior | cf9fca8 | 2014-09-18 15:21:22 +0200 | [diff] [blame] | 2617 | struct wmi_host_mem_chunks mem_chunks; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2618 | } __packed; |
| 2619 | |
Bartosz Markowski | 12b2b9e | 2013-09-26 17:47:13 +0200 | [diff] [blame] | 2620 | /* _10x stucture is from 10.X FW API */ |
| 2621 | struct wmi_init_cmd_10x { |
| 2622 | struct wmi_resource_config_10x resource_config; |
Michal Kazior | cf9fca8 | 2014-09-18 15:21:22 +0200 | [diff] [blame] | 2623 | struct wmi_host_mem_chunks mem_chunks; |
Bartosz Markowski | 12b2b9e | 2013-09-26 17:47:13 +0200 | [diff] [blame] | 2624 | } __packed; |
| 2625 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2626 | struct wmi_init_cmd_10_2 { |
| 2627 | struct wmi_resource_config_10_2 resource_config; |
Michal Kazior | cf9fca8 | 2014-09-18 15:21:22 +0200 | [diff] [blame] | 2628 | struct wmi_host_mem_chunks mem_chunks; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2629 | } __packed; |
| 2630 | |
Raja Mani | d1e52a8 | 2015-06-22 20:10:15 +0530 | [diff] [blame] | 2631 | struct wmi_init_cmd_10_4 { |
| 2632 | struct wmi_resource_config_10_4 resource_config; |
| 2633 | struct wmi_host_mem_chunks mem_chunks; |
| 2634 | } __packed; |
| 2635 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2636 | struct wmi_chan_list_entry { |
| 2637 | __le16 freq; |
| 2638 | u8 phy_mode; /* valid for 10.2 only */ |
| 2639 | u8 reserved; |
| 2640 | } __packed; |
| 2641 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2642 | /* TLV for channel list */ |
| 2643 | struct wmi_chan_list { |
| 2644 | __le32 tag; /* WMI_CHAN_LIST_TAG */ |
| 2645 | __le32 num_chan; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2646 | struct wmi_chan_list_entry channel_list[0]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2647 | } __packed; |
| 2648 | |
| 2649 | struct wmi_bssid_list { |
| 2650 | __le32 tag; /* WMI_BSSID_LIST_TAG */ |
| 2651 | __le32 num_bssid; |
| 2652 | struct wmi_mac_addr bssid_list[0]; |
| 2653 | } __packed; |
| 2654 | |
| 2655 | struct wmi_ie_data { |
| 2656 | __le32 tag; /* WMI_IE_TAG */ |
| 2657 | __le32 ie_len; |
| 2658 | u8 ie_data[0]; |
| 2659 | } __packed; |
| 2660 | |
| 2661 | struct wmi_ssid { |
| 2662 | __le32 ssid_len; |
| 2663 | u8 ssid[32]; |
| 2664 | } __packed; |
| 2665 | |
| 2666 | struct wmi_ssid_list { |
| 2667 | __le32 tag; /* WMI_SSID_LIST_TAG */ |
| 2668 | __le32 num_ssids; |
| 2669 | struct wmi_ssid ssids[0]; |
| 2670 | } __packed; |
| 2671 | |
| 2672 | /* prefix used by scan requestor ids on the host */ |
| 2673 | #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 2674 | |
| 2675 | /* prefix used by scan request ids generated on the host */ |
| 2676 | /* host cycles through the lower 12 bits to generate ids */ |
| 2677 | #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000 |
| 2678 | |
| 2679 | #define WLAN_SCAN_PARAMS_MAX_SSID 16 |
| 2680 | #define WLAN_SCAN_PARAMS_MAX_BSSID 4 |
| 2681 | #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256 |
| 2682 | |
Michal Kazior | dcca0bd | 2014-11-24 14:58:32 +0100 | [diff] [blame] | 2683 | /* Values lower than this may be refused by some firmware revisions with a scan |
| 2684 | * completion with a timedout reason. |
| 2685 | */ |
| 2686 | #define WMI_SCAN_CHAN_MIN_TIME_MSEC 40 |
| 2687 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2688 | /* Scan priority numbers must be sequential, starting with 0 */ |
| 2689 | enum wmi_scan_priority { |
| 2690 | WMI_SCAN_PRIORITY_VERY_LOW = 0, |
| 2691 | WMI_SCAN_PRIORITY_LOW, |
| 2692 | WMI_SCAN_PRIORITY_MEDIUM, |
| 2693 | WMI_SCAN_PRIORITY_HIGH, |
| 2694 | WMI_SCAN_PRIORITY_VERY_HIGH, |
| 2695 | WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */ |
| 2696 | }; |
| 2697 | |
Michal Kazior | a6aa5da | 2014-09-18 15:21:27 +0200 | [diff] [blame] | 2698 | struct wmi_start_scan_common { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2699 | /* Scan ID */ |
| 2700 | __le32 scan_id; |
| 2701 | /* Scan requestor ID */ |
| 2702 | __le32 scan_req_id; |
| 2703 | /* VDEV id(interface) that is requesting scan */ |
| 2704 | __le32 vdev_id; |
| 2705 | /* Scan Priority, input to scan scheduler */ |
| 2706 | __le32 scan_priority; |
| 2707 | /* Scan events subscription */ |
| 2708 | __le32 notify_scan_events; |
| 2709 | /* dwell time in msec on active channels */ |
| 2710 | __le32 dwell_time_active; |
| 2711 | /* dwell time in msec on passive channels */ |
| 2712 | __le32 dwell_time_passive; |
| 2713 | /* |
| 2714 | * min time in msec on the BSS channel,only valid if atleast one |
| 2715 | * VDEV is active |
| 2716 | */ |
| 2717 | __le32 min_rest_time; |
| 2718 | /* |
| 2719 | * max rest time in msec on the BSS channel,only valid if at least |
| 2720 | * one VDEV is active |
| 2721 | */ |
| 2722 | /* |
| 2723 | * the scanner will rest on the bss channel at least min_rest_time |
| 2724 | * after min_rest_time the scanner will start checking for tx/rx |
| 2725 | * activity on all VDEVs. if there is no activity the scanner will |
| 2726 | * switch to off channel. if there is activity the scanner will let |
| 2727 | * the radio on the bss channel until max_rest_time expires.at |
| 2728 | * max_rest_time scanner will switch to off channel irrespective of |
| 2729 | * activity. activity is determined by the idle_time parameter. |
| 2730 | */ |
| 2731 | __le32 max_rest_time; |
| 2732 | /* |
| 2733 | * time before sending next set of probe requests. |
| 2734 | * The scanner keeps repeating probe requests transmission with |
| 2735 | * period specified by repeat_probe_time. |
| 2736 | * The number of probe requests specified depends on the ssid_list |
| 2737 | * and bssid_list |
| 2738 | */ |
| 2739 | __le32 repeat_probe_time; |
| 2740 | /* time in msec between 2 consequetive probe requests with in a set. */ |
| 2741 | __le32 probe_spacing_time; |
| 2742 | /* |
| 2743 | * data inactivity time in msec on bss channel that will be used by |
| 2744 | * scanner for measuring the inactivity. |
| 2745 | */ |
| 2746 | __le32 idle_time; |
| 2747 | /* maximum time in msec allowed for scan */ |
| 2748 | __le32 max_scan_time; |
| 2749 | /* |
| 2750 | * delay in msec before sending first probe request after switching |
| 2751 | * to a channel |
| 2752 | */ |
| 2753 | __le32 probe_delay; |
| 2754 | /* Scan control flags */ |
| 2755 | __le32 scan_ctrl_flags; |
Michal Kazior | a6aa5da | 2014-09-18 15:21:27 +0200 | [diff] [blame] | 2756 | } __packed; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2757 | |
Michal Kazior | a6aa5da | 2014-09-18 15:21:27 +0200 | [diff] [blame] | 2758 | struct wmi_start_scan_tlvs { |
| 2759 | /* TLV parameters. These includes channel list, ssid list, bssid list, |
| 2760 | * extra ies. |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2761 | */ |
Michal Kazior | a6aa5da | 2014-09-18 15:21:27 +0200 | [diff] [blame] | 2762 | u8 tlvs[0]; |
| 2763 | } __packed; |
| 2764 | |
| 2765 | struct wmi_start_scan_cmd { |
| 2766 | struct wmi_start_scan_common common; |
| 2767 | __le32 burst_duration_ms; |
| 2768 | struct wmi_start_scan_tlvs tlvs; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2769 | } __packed; |
| 2770 | |
Bartosz Markowski | 89b7e76 | 2013-09-26 17:47:17 +0200 | [diff] [blame] | 2771 | /* This is the definition from 10.X firmware branch */ |
Michal Kazior | a6aa5da | 2014-09-18 15:21:27 +0200 | [diff] [blame] | 2772 | struct wmi_10x_start_scan_cmd { |
| 2773 | struct wmi_start_scan_common common; |
| 2774 | struct wmi_start_scan_tlvs tlvs; |
Bartosz Markowski | 89b7e76 | 2013-09-26 17:47:17 +0200 | [diff] [blame] | 2775 | } __packed; |
| 2776 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2777 | struct wmi_ssid_arg { |
| 2778 | int len; |
| 2779 | const u8 *ssid; |
| 2780 | }; |
| 2781 | |
| 2782 | struct wmi_bssid_arg { |
| 2783 | const u8 *bssid; |
| 2784 | }; |
| 2785 | |
| 2786 | struct wmi_start_scan_arg { |
| 2787 | u32 scan_id; |
| 2788 | u32 scan_req_id; |
| 2789 | u32 vdev_id; |
| 2790 | u32 scan_priority; |
| 2791 | u32 notify_scan_events; |
| 2792 | u32 dwell_time_active; |
| 2793 | u32 dwell_time_passive; |
| 2794 | u32 min_rest_time; |
| 2795 | u32 max_rest_time; |
| 2796 | u32 repeat_probe_time; |
| 2797 | u32 probe_spacing_time; |
| 2798 | u32 idle_time; |
| 2799 | u32 max_scan_time; |
| 2800 | u32 probe_delay; |
| 2801 | u32 scan_ctrl_flags; |
Michal Kazior | dbd3f9f | 2015-03-31 11:03:48 +0000 | [diff] [blame] | 2802 | u32 burst_duration_ms; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2803 | |
| 2804 | u32 ie_len; |
| 2805 | u32 n_channels; |
| 2806 | u32 n_ssids; |
| 2807 | u32 n_bssids; |
| 2808 | |
| 2809 | u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN]; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 2810 | u16 channels[64]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2811 | struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID]; |
| 2812 | struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID]; |
| 2813 | }; |
| 2814 | |
| 2815 | /* scan control flags */ |
| 2816 | |
| 2817 | /* passively scan all channels including active channels */ |
| 2818 | #define WMI_SCAN_FLAG_PASSIVE 0x1 |
| 2819 | /* add wild card ssid probe request even though ssid_list is specified. */ |
| 2820 | #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2 |
| 2821 | /* add cck rates to rates/xrate ie for the generated probe request */ |
| 2822 | #define WMI_SCAN_ADD_CCK_RATES 0x4 |
| 2823 | /* add ofdm rates to rates/xrate ie for the generated probe request */ |
| 2824 | #define WMI_SCAN_ADD_OFDM_RATES 0x8 |
| 2825 | /* To enable indication of Chan load and Noise floor to host */ |
| 2826 | #define WMI_SCAN_CHAN_STAT_EVENT 0x10 |
| 2827 | /* Filter Probe request frames */ |
| 2828 | #define WMI_SCAN_FILTER_PROBE_REQ 0x20 |
| 2829 | /* When set, DFS channels will not be scanned */ |
| 2830 | #define WMI_SCAN_BYPASS_DFS_CHN 0x40 |
| 2831 | /* Different FW scan engine may choose to bail out on errors. |
| 2832 | * Allow the driver to have influence over that. */ |
| 2833 | #define WMI_SCAN_CONTINUE_ON_ERROR 0x80 |
| 2834 | |
| 2835 | /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */ |
| 2836 | #define WMI_SCAN_CLASS_MASK 0xFF000000 |
| 2837 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2838 | enum wmi_stop_scan_type { |
| 2839 | WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */ |
| 2840 | WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */ |
| 2841 | WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */ |
| 2842 | }; |
| 2843 | |
| 2844 | struct wmi_stop_scan_cmd { |
| 2845 | __le32 scan_req_id; |
| 2846 | __le32 scan_id; |
| 2847 | __le32 req_type; |
| 2848 | __le32 vdev_id; |
| 2849 | } __packed; |
| 2850 | |
| 2851 | struct wmi_stop_scan_arg { |
| 2852 | u32 req_id; |
| 2853 | enum wmi_stop_scan_type req_type; |
| 2854 | union { |
| 2855 | u32 scan_id; |
| 2856 | u32 vdev_id; |
| 2857 | } u; |
| 2858 | }; |
| 2859 | |
| 2860 | struct wmi_scan_chan_list_cmd { |
| 2861 | __le32 num_scan_chans; |
| 2862 | struct wmi_channel chan_info[0]; |
| 2863 | } __packed; |
| 2864 | |
| 2865 | struct wmi_scan_chan_list_arg { |
| 2866 | u32 n_channels; |
| 2867 | struct wmi_channel_arg *channels; |
| 2868 | }; |
| 2869 | |
| 2870 | enum wmi_bss_filter { |
| 2871 | WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */ |
| 2872 | WMI_BSS_FILTER_ALL, /* all beacons forwarded */ |
| 2873 | WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */ |
| 2874 | WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */ |
| 2875 | WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */ |
| 2876 | WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */ |
| 2877 | WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */ |
| 2878 | WMI_BSS_FILTER_LAST_BSS, /* marker only */ |
| 2879 | }; |
| 2880 | |
| 2881 | enum wmi_scan_event_type { |
| 2882 | WMI_SCAN_EVENT_STARTED = 0x1, |
| 2883 | WMI_SCAN_EVENT_COMPLETED = 0x2, |
| 2884 | WMI_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 2885 | WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 2886 | WMI_SCAN_EVENT_DEQUEUED = 0x10, |
| 2887 | WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */ |
| 2888 | WMI_SCAN_EVENT_START_FAILED = 0x40, |
| 2889 | WMI_SCAN_EVENT_RESTARTED = 0x80, |
| 2890 | WMI_SCAN_EVENT_MAX = 0x8000 |
| 2891 | }; |
| 2892 | |
| 2893 | enum wmi_scan_completion_reason { |
| 2894 | WMI_SCAN_REASON_COMPLETED, |
| 2895 | WMI_SCAN_REASON_CANCELLED, |
| 2896 | WMI_SCAN_REASON_PREEMPTED, |
| 2897 | WMI_SCAN_REASON_TIMEDOUT, |
| 2898 | WMI_SCAN_REASON_MAX, |
| 2899 | }; |
| 2900 | |
| 2901 | struct wmi_scan_event { |
| 2902 | __le32 event_type; /* %WMI_SCAN_EVENT_ */ |
| 2903 | __le32 reason; /* %WMI_SCAN_REASON_ */ |
| 2904 | __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */ |
| 2905 | __le32 scan_req_id; |
| 2906 | __le32 scan_id; |
| 2907 | __le32 vdev_id; |
| 2908 | } __packed; |
| 2909 | |
| 2910 | /* |
| 2911 | * This defines how much headroom is kept in the |
| 2912 | * receive frame between the descriptor and the |
| 2913 | * payload, in order for the WMI PHY error and |
| 2914 | * management handler to insert header contents. |
| 2915 | * |
| 2916 | * This is in bytes. |
| 2917 | */ |
| 2918 | #define WMI_MGMT_RX_HDR_HEADROOM 52 |
| 2919 | |
| 2920 | /* |
| 2921 | * This event will be used for sending scan results |
| 2922 | * as well as rx mgmt frames to the host. The rx buffer |
| 2923 | * will be sent as part of this WMI event. It would be a |
| 2924 | * good idea to pass all the fields in the RX status |
| 2925 | * descriptor up to the host. |
| 2926 | */ |
Michal Kazior | 0d9b043 | 2013-08-09 10:13:33 +0200 | [diff] [blame] | 2927 | struct wmi_mgmt_rx_hdr_v1 { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2928 | __le32 channel; |
| 2929 | __le32 snr; |
| 2930 | __le32 rate; |
| 2931 | __le32 phy_mode; |
| 2932 | __le32 buf_len; |
| 2933 | __le32 status; /* %WMI_RX_STATUS_ */ |
| 2934 | } __packed; |
| 2935 | |
Michal Kazior | 0d9b043 | 2013-08-09 10:13:33 +0200 | [diff] [blame] | 2936 | struct wmi_mgmt_rx_hdr_v2 { |
| 2937 | struct wmi_mgmt_rx_hdr_v1 v1; |
| 2938 | __le32 rssi_ctl[4]; |
| 2939 | } __packed; |
| 2940 | |
| 2941 | struct wmi_mgmt_rx_event_v1 { |
| 2942 | struct wmi_mgmt_rx_hdr_v1 hdr; |
| 2943 | u8 buf[0]; |
| 2944 | } __packed; |
| 2945 | |
| 2946 | struct wmi_mgmt_rx_event_v2 { |
| 2947 | struct wmi_mgmt_rx_hdr_v2 hdr; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2948 | u8 buf[0]; |
| 2949 | } __packed; |
| 2950 | |
Raja Mani | 1c09296 | 2015-06-22 20:10:16 +0530 | [diff] [blame] | 2951 | struct wmi_10_4_mgmt_rx_hdr { |
| 2952 | __le32 channel; |
| 2953 | __le32 snr; |
| 2954 | u8 rssi_ctl[4]; |
| 2955 | __le32 rate; |
| 2956 | __le32 phy_mode; |
| 2957 | __le32 buf_len; |
| 2958 | __le32 status; |
| 2959 | } __packed; |
| 2960 | |
| 2961 | struct wmi_10_4_mgmt_rx_event { |
| 2962 | struct wmi_10_4_mgmt_rx_hdr hdr; |
| 2963 | u8 buf[0]; |
| 2964 | } __packed; |
| 2965 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2966 | #define WMI_RX_STATUS_OK 0x00 |
| 2967 | #define WMI_RX_STATUS_ERR_CRC 0x01 |
| 2968 | #define WMI_RX_STATUS_ERR_DECRYPT 0x08 |
| 2969 | #define WMI_RX_STATUS_ERR_MIC 0x10 |
| 2970 | #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20 |
| 2971 | |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 2972 | #define PHY_ERROR_SPECTRAL_SCAN 0x26 |
| 2973 | #define PHY_ERROR_FALSE_RADAR_EXT 0x24 |
| 2974 | #define PHY_ERROR_RADAR 0x05 |
| 2975 | |
Michal Kazior | 2332d0a | 2014-09-18 15:21:25 +0200 | [diff] [blame] | 2976 | struct wmi_phyerr { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2977 | __le32 tsf_timestamp; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2978 | __le16 freq1; |
| 2979 | __le16 freq2; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2980 | u8 rssi_combined; |
| 2981 | u8 chan_width_mhz; |
| 2982 | u8 phy_err_code; |
| 2983 | u8 rsvd0; |
Michal Kazior | 2332d0a | 2014-09-18 15:21:25 +0200 | [diff] [blame] | 2984 | __le32 rssi_chains[4]; |
| 2985 | __le16 nf_chains[4]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2986 | __le32 buf_len; |
Michal Kazior | 2332d0a | 2014-09-18 15:21:25 +0200 | [diff] [blame] | 2987 | u8 buf[0]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2988 | } __packed; |
| 2989 | |
Michal Kazior | 2332d0a | 2014-09-18 15:21:25 +0200 | [diff] [blame] | 2990 | struct wmi_phyerr_event { |
| 2991 | __le32 num_phyerrs; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2992 | __le32 tsf_l32; |
| 2993 | __le32 tsf_u32; |
Michal Kazior | 2332d0a | 2014-09-18 15:21:25 +0200 | [diff] [blame] | 2994 | struct wmi_phyerr phyerrs[0]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 2995 | } __packed; |
| 2996 | |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 2997 | #define PHYERR_TLV_SIG 0xBB |
| 2998 | #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB |
| 2999 | #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8 |
Simon Wunderlich | 855aed1 | 2014-08-02 09:12:54 +0300 | [diff] [blame] | 3000 | #define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT 0xF9 |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 3001 | |
| 3002 | struct phyerr_radar_report { |
| 3003 | __le32 reg0; /* RADAR_REPORT_REG0_* */ |
| 3004 | __le32 reg1; /* REDAR_REPORT_REG1_* */ |
| 3005 | } __packed; |
| 3006 | |
| 3007 | #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK 0x80000000 |
| 3008 | #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB 31 |
| 3009 | |
| 3010 | #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK 0x40000000 |
| 3011 | #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB 30 |
| 3012 | |
| 3013 | #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK 0x3FF00000 |
| 3014 | #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB 20 |
| 3015 | |
| 3016 | #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK 0x000F0000 |
| 3017 | #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB 16 |
| 3018 | |
| 3019 | #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK 0x0000FC00 |
| 3020 | #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB 10 |
| 3021 | |
| 3022 | #define RADAR_REPORT_REG0_PULSE_SIDX_MASK 0x000003FF |
| 3023 | #define RADAR_REPORT_REG0_PULSE_SIDX_LSB 0 |
| 3024 | |
| 3025 | #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK 0x80000000 |
| 3026 | #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB 31 |
| 3027 | |
| 3028 | #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK 0x7F000000 |
| 3029 | #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB 24 |
| 3030 | |
| 3031 | #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK 0x00FF0000 |
| 3032 | #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB 16 |
| 3033 | |
| 3034 | #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK 0x0000FF00 |
| 3035 | #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB 8 |
| 3036 | |
| 3037 | #define RADAR_REPORT_REG1_PULSE_DUR_MASK 0x000000FF |
| 3038 | #define RADAR_REPORT_REG1_PULSE_DUR_LSB 0 |
| 3039 | |
| 3040 | struct phyerr_fft_report { |
| 3041 | __le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */ |
| 3042 | __le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */ |
| 3043 | } __packed; |
| 3044 | |
| 3045 | #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK 0xFF800000 |
| 3046 | #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB 23 |
| 3047 | |
| 3048 | #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK 0x007FC000 |
| 3049 | #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB 14 |
| 3050 | |
| 3051 | #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK 0x00003000 |
| 3052 | #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB 12 |
| 3053 | |
| 3054 | #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK 0x00000FFF |
| 3055 | #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB 0 |
| 3056 | |
| 3057 | #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK 0xFC000000 |
| 3058 | #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB 26 |
| 3059 | |
| 3060 | #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK 0x03FC0000 |
| 3061 | #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB 18 |
| 3062 | |
| 3063 | #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK 0x0003FF00 |
| 3064 | #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB 8 |
| 3065 | |
| 3066 | #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK 0x000000FF |
| 3067 | #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB 0 |
| 3068 | |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 3069 | struct phyerr_tlv { |
| 3070 | __le16 len; |
| 3071 | u8 tag; |
| 3072 | u8 sig; |
| 3073 | } __packed; |
| 3074 | |
| 3075 | #define DFS_RSSI_POSSIBLY_FALSE 50 |
| 3076 | #define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE 40 |
| 3077 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3078 | struct wmi_mgmt_tx_hdr { |
| 3079 | __le32 vdev_id; |
| 3080 | struct wmi_mac_addr peer_macaddr; |
| 3081 | __le32 tx_rate; |
| 3082 | __le32 tx_power; |
| 3083 | __le32 buf_len; |
| 3084 | } __packed; |
| 3085 | |
| 3086 | struct wmi_mgmt_tx_cmd { |
| 3087 | struct wmi_mgmt_tx_hdr hdr; |
| 3088 | u8 buf[0]; |
| 3089 | } __packed; |
| 3090 | |
| 3091 | struct wmi_echo_event { |
| 3092 | __le32 value; |
| 3093 | } __packed; |
| 3094 | |
| 3095 | struct wmi_echo_cmd { |
| 3096 | __le32 value; |
| 3097 | } __packed; |
| 3098 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3099 | struct wmi_pdev_set_regdomain_cmd { |
| 3100 | __le32 reg_domain; |
| 3101 | __le32 reg_domain_2G; |
| 3102 | __le32 reg_domain_5G; |
| 3103 | __le32 conformance_test_limit_2G; |
| 3104 | __le32 conformance_test_limit_5G; |
| 3105 | } __packed; |
| 3106 | |
Marek Puzyniak | 821af6a | 2014-03-21 17:46:57 +0200 | [diff] [blame] | 3107 | enum wmi_dfs_region { |
| 3108 | /* Uninitialized dfs domain */ |
| 3109 | WMI_UNINIT_DFS_DOMAIN = 0, |
| 3110 | |
| 3111 | /* FCC3 dfs domain */ |
| 3112 | WMI_FCC_DFS_DOMAIN = 1, |
| 3113 | |
| 3114 | /* ETSI dfs domain */ |
| 3115 | WMI_ETSI_DFS_DOMAIN = 2, |
| 3116 | |
| 3117 | /*Japan dfs domain */ |
| 3118 | WMI_MKK4_DFS_DOMAIN = 3, |
| 3119 | }; |
| 3120 | |
| 3121 | struct wmi_pdev_set_regdomain_cmd_10x { |
| 3122 | __le32 reg_domain; |
| 3123 | __le32 reg_domain_2G; |
| 3124 | __le32 reg_domain_5G; |
| 3125 | __le32 conformance_test_limit_2G; |
| 3126 | __le32 conformance_test_limit_5G; |
| 3127 | |
| 3128 | /* dfs domain from wmi_dfs_region */ |
| 3129 | __le32 dfs_domain; |
| 3130 | } __packed; |
| 3131 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3132 | /* Command to set/unset chip in quiet mode */ |
| 3133 | struct wmi_pdev_set_quiet_cmd { |
| 3134 | /* period in TUs */ |
| 3135 | __le32 period; |
| 3136 | |
| 3137 | /* duration in TUs */ |
| 3138 | __le32 duration; |
| 3139 | |
| 3140 | /* offset in TUs */ |
| 3141 | __le32 next_start; |
| 3142 | |
| 3143 | /* enable/disable */ |
| 3144 | __le32 enabled; |
| 3145 | } __packed; |
| 3146 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3147 | /* |
| 3148 | * 802.11g protection mode. |
| 3149 | */ |
| 3150 | enum ath10k_protmode { |
| 3151 | ATH10K_PROT_NONE = 0, /* no protection */ |
| 3152 | ATH10K_PROT_CTSONLY = 1, /* CTS to self */ |
| 3153 | ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */ |
| 3154 | }; |
| 3155 | |
Marek Kwaczynski | e81bd10 | 2014-03-11 12:58:00 +0200 | [diff] [blame] | 3156 | enum wmi_rtscts_profile { |
| 3157 | WMI_RTSCTS_FOR_NO_RATESERIES = 0, |
| 3158 | WMI_RTSCTS_FOR_SECOND_RATESERIES, |
| 3159 | WMI_RTSCTS_ACROSS_SW_RETRIES |
| 3160 | }; |
| 3161 | |
| 3162 | #define WMI_RTSCTS_ENABLED 1 |
| 3163 | #define WMI_RTSCTS_SET_MASK 0x0f |
| 3164 | #define WMI_RTSCTS_SET_LSB 0 |
| 3165 | |
| 3166 | #define WMI_RTSCTS_PROFILE_MASK 0xf0 |
| 3167 | #define WMI_RTSCTS_PROFILE_LSB 4 |
| 3168 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3169 | enum wmi_beacon_gen_mode { |
| 3170 | WMI_BEACON_STAGGERED_MODE = 0, |
| 3171 | WMI_BEACON_BURST_MODE = 1 |
| 3172 | }; |
| 3173 | |
| 3174 | enum wmi_csa_event_ies_present_flag { |
| 3175 | WMI_CSA_IE_PRESENT = 0x00000001, |
| 3176 | WMI_XCSA_IE_PRESENT = 0x00000002, |
| 3177 | WMI_WBW_IE_PRESENT = 0x00000004, |
| 3178 | WMI_CSWARP_IE_PRESENT = 0x00000008, |
| 3179 | }; |
| 3180 | |
| 3181 | /* wmi CSA receive event from beacon frame */ |
| 3182 | struct wmi_csa_event { |
| 3183 | __le32 i_fc_dur; |
| 3184 | /* Bit 0-15: FC */ |
| 3185 | /* Bit 16-31: DUR */ |
| 3186 | struct wmi_mac_addr i_addr1; |
| 3187 | struct wmi_mac_addr i_addr2; |
| 3188 | __le32 csa_ie[2]; |
| 3189 | __le32 xcsa_ie[2]; |
| 3190 | __le32 wb_ie[2]; |
| 3191 | __le32 cswarp_ie; |
| 3192 | __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */ |
| 3193 | } __packed; |
| 3194 | |
| 3195 | /* the definition of different PDEV parameters */ |
| 3196 | #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500 |
| 3197 | #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500 |
| 3198 | #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500 |
| 3199 | |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 3200 | struct wmi_pdev_param_map { |
| 3201 | u32 tx_chain_mask; |
| 3202 | u32 rx_chain_mask; |
| 3203 | u32 txpower_limit2g; |
| 3204 | u32 txpower_limit5g; |
| 3205 | u32 txpower_scale; |
| 3206 | u32 beacon_gen_mode; |
| 3207 | u32 beacon_tx_mode; |
| 3208 | u32 resmgr_offchan_mode; |
| 3209 | u32 protection_mode; |
| 3210 | u32 dynamic_bw; |
| 3211 | u32 non_agg_sw_retry_th; |
| 3212 | u32 agg_sw_retry_th; |
| 3213 | u32 sta_kickout_th; |
| 3214 | u32 ac_aggrsize_scaling; |
| 3215 | u32 ltr_enable; |
| 3216 | u32 ltr_ac_latency_be; |
| 3217 | u32 ltr_ac_latency_bk; |
| 3218 | u32 ltr_ac_latency_vi; |
| 3219 | u32 ltr_ac_latency_vo; |
| 3220 | u32 ltr_ac_latency_timeout; |
| 3221 | u32 ltr_sleep_override; |
| 3222 | u32 ltr_rx_override; |
| 3223 | u32 ltr_tx_activity_timeout; |
| 3224 | u32 l1ss_enable; |
| 3225 | u32 dsleep_enable; |
| 3226 | u32 pcielp_txbuf_flush; |
| 3227 | u32 pcielp_txbuf_watermark; |
| 3228 | u32 pcielp_txbuf_tmo_en; |
| 3229 | u32 pcielp_txbuf_tmo_value; |
| 3230 | u32 pdev_stats_update_period; |
| 3231 | u32 vdev_stats_update_period; |
| 3232 | u32 peer_stats_update_period; |
| 3233 | u32 bcnflt_stats_update_period; |
| 3234 | u32 pmf_qos; |
| 3235 | u32 arp_ac_override; |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 3236 | u32 dcs; |
| 3237 | u32 ani_enable; |
| 3238 | u32 ani_poll_period; |
| 3239 | u32 ani_listen_period; |
| 3240 | u32 ani_ofdm_level; |
| 3241 | u32 ani_cck_level; |
| 3242 | u32 dyntxchain; |
| 3243 | u32 proxy_sta; |
| 3244 | u32 idle_ps_config; |
| 3245 | u32 power_gating_sleep; |
| 3246 | u32 fast_channel_reset; |
| 3247 | u32 burst_dur; |
| 3248 | u32 burst_enable; |
Peter Oh | a7bd3e9 | 2014-12-02 13:07:14 +0200 | [diff] [blame] | 3249 | u32 cal_period; |
Raja Mani | d86561f | 2015-06-22 20:10:14 +0530 | [diff] [blame] | 3250 | u32 aggr_burst; |
| 3251 | u32 rx_decap_mode; |
| 3252 | u32 smart_antenna_default_antenna; |
| 3253 | u32 igmpmld_override; |
| 3254 | u32 igmpmld_tid; |
| 3255 | u32 antenna_gain; |
| 3256 | u32 rx_filter; |
| 3257 | u32 set_mcast_to_ucast_tid; |
| 3258 | u32 proxy_sta_mode; |
| 3259 | u32 set_mcast2ucast_mode; |
| 3260 | u32 set_mcast2ucast_buffer; |
| 3261 | u32 remove_mcast2ucast_buffer; |
| 3262 | u32 peer_sta_ps_statechg_enable; |
| 3263 | u32 igmpmld_ac_override; |
| 3264 | u32 block_interbss; |
| 3265 | u32 set_disable_reset_cmdid; |
| 3266 | u32 set_msdu_ttl_cmdid; |
| 3267 | u32 set_ppdu_duration_cmdid; |
| 3268 | u32 txbf_sound_period_cmdid; |
| 3269 | u32 set_promisc_mode_cmdid; |
| 3270 | u32 set_burst_mode_cmdid; |
| 3271 | u32 en_stats; |
| 3272 | u32 mu_group_policy; |
| 3273 | u32 noise_detection; |
| 3274 | u32 noise_threshold; |
| 3275 | u32 dpd_enable; |
| 3276 | u32 set_mcast_bcast_echo; |
| 3277 | u32 atf_strict_sch; |
| 3278 | u32 atf_sched_duration; |
| 3279 | u32 ant_plzn; |
| 3280 | u32 mgmt_retry_limit; |
| 3281 | u32 sensitivity_level; |
| 3282 | u32 signed_txpower_2g; |
| 3283 | u32 signed_txpower_5g; |
| 3284 | u32 enable_per_tid_amsdu; |
| 3285 | u32 enable_per_tid_ampdu; |
| 3286 | u32 cca_threshold; |
| 3287 | u32 rts_fixed_rate; |
| 3288 | u32 pdev_reset; |
| 3289 | u32 wapi_mbssid_offset; |
| 3290 | u32 arp_srcaddr; |
| 3291 | u32 arp_dstaddr; |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 3292 | }; |
| 3293 | |
| 3294 | #define WMI_PDEV_PARAM_UNSUPPORTED 0 |
| 3295 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3296 | enum wmi_pdev_param { |
Ben Greear | d0e0a55 | 2014-05-14 16:56:14 +0300 | [diff] [blame] | 3297 | /* TX chain mask */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3298 | WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
Ben Greear | d0e0a55 | 2014-05-14 16:56:14 +0300 | [diff] [blame] | 3299 | /* RX chain mask */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3300 | WMI_PDEV_PARAM_RX_CHAIN_MASK, |
| 3301 | /* TX power limit for 2G Radio */ |
| 3302 | WMI_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 3303 | /* TX power limit for 5G Radio */ |
| 3304 | WMI_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 3305 | /* TX power scale */ |
| 3306 | WMI_PDEV_PARAM_TXPOWER_SCALE, |
| 3307 | /* Beacon generation mode . 0: host, 1: target */ |
| 3308 | WMI_PDEV_PARAM_BEACON_GEN_MODE, |
| 3309 | /* Beacon generation mode . 0: staggered 1: bursted */ |
| 3310 | WMI_PDEV_PARAM_BEACON_TX_MODE, |
| 3311 | /* |
| 3312 | * Resource manager off chan mode . |
| 3313 | * 0: turn off off chan mode. 1: turn on offchan mode |
| 3314 | */ |
| 3315 | WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 3316 | /* |
| 3317 | * Protection mode: |
| 3318 | * 0: no protection 1:use CTS-to-self 2: use RTS/CTS |
| 3319 | */ |
| 3320 | WMI_PDEV_PARAM_PROTECTION_MODE, |
Michal Kazior | c4dd0d0 | 2013-11-13 11:05:10 +0100 | [diff] [blame] | 3321 | /* |
| 3322 | * Dynamic bandwidth - 0: disable, 1: enable |
| 3323 | * |
| 3324 | * When enabled HW rate control tries different bandwidths when |
| 3325 | * retransmitting frames. |
| 3326 | */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3327 | WMI_PDEV_PARAM_DYNAMIC_BW, |
| 3328 | /* Non aggregrate/ 11g sw retry threshold.0-disable */ |
| 3329 | WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 3330 | /* aggregrate sw retry threshold. 0-disable*/ |
| 3331 | WMI_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 3332 | /* Station kickout threshold (non of consecutive failures).0-disable */ |
| 3333 | WMI_PDEV_PARAM_STA_KICKOUT_TH, |
| 3334 | /* Aggerate size scaling configuration per AC */ |
| 3335 | WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 3336 | /* LTR enable */ |
| 3337 | WMI_PDEV_PARAM_LTR_ENABLE, |
| 3338 | /* LTR latency for BE, in us */ |
| 3339 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 3340 | /* LTR latency for BK, in us */ |
| 3341 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 3342 | /* LTR latency for VI, in us */ |
| 3343 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 3344 | /* LTR latency for VO, in us */ |
| 3345 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 3346 | /* LTR AC latency timeout, in ms */ |
| 3347 | WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 3348 | /* LTR platform latency override, in us */ |
| 3349 | WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 3350 | /* LTR-RX override, in us */ |
| 3351 | WMI_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 3352 | /* Tx activity timeout for LTR, in us */ |
| 3353 | WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 3354 | /* L1SS state machine enable */ |
| 3355 | WMI_PDEV_PARAM_L1SS_ENABLE, |
| 3356 | /* Deep sleep state machine enable */ |
| 3357 | WMI_PDEV_PARAM_DSLEEP_ENABLE, |
| 3358 | /* RX buffering flush enable */ |
| 3359 | WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| 3360 | /* RX buffering matermark */ |
| 3361 | WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| 3362 | /* RX buffering timeout enable */ |
| 3363 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| 3364 | /* RX buffering timeout value */ |
| 3365 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| 3366 | /* pdev level stats update period in ms */ |
| 3367 | WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 3368 | /* vdev level stats update period in ms */ |
| 3369 | WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 3370 | /* peer level stats update period in ms */ |
| 3371 | WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 3372 | /* beacon filter status update period */ |
| 3373 | WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 3374 | /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */ |
| 3375 | WMI_PDEV_PARAM_PMF_QOS, |
| 3376 | /* Access category on which ARP frames are sent */ |
| 3377 | WMI_PDEV_PARAM_ARP_AC_OVERRIDE, |
| 3378 | /* DCS configuration */ |
| 3379 | WMI_PDEV_PARAM_DCS, |
| 3380 | /* Enable/Disable ANI on target */ |
| 3381 | WMI_PDEV_PARAM_ANI_ENABLE, |
| 3382 | /* configure the ANI polling period */ |
| 3383 | WMI_PDEV_PARAM_ANI_POLL_PERIOD, |
| 3384 | /* configure the ANI listening period */ |
| 3385 | WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 3386 | /* configure OFDM immunity level */ |
| 3387 | WMI_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 3388 | /* configure CCK immunity level */ |
| 3389 | WMI_PDEV_PARAM_ANI_CCK_LEVEL, |
| 3390 | /* Enable/Disable CDD for 1x1 STAs in rate control module */ |
| 3391 | WMI_PDEV_PARAM_DYNTXCHAIN, |
| 3392 | /* Enable/Disable proxy STA */ |
| 3393 | WMI_PDEV_PARAM_PROXY_STA, |
| 3394 | /* Enable/Disable low power state when all VDEVs are inactive/idle. */ |
| 3395 | WMI_PDEV_PARAM_IDLE_PS_CONFIG, |
| 3396 | /* Enable/Disable power gating sleep */ |
| 3397 | WMI_PDEV_PARAM_POWER_GATING_SLEEP, |
| 3398 | }; |
| 3399 | |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 3400 | enum wmi_10x_pdev_param { |
| 3401 | /* TX chian mask */ |
| 3402 | WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
| 3403 | /* RX chian mask */ |
| 3404 | WMI_10X_PDEV_PARAM_RX_CHAIN_MASK, |
| 3405 | /* TX power limit for 2G Radio */ |
| 3406 | WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 3407 | /* TX power limit for 5G Radio */ |
| 3408 | WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 3409 | /* TX power scale */ |
| 3410 | WMI_10X_PDEV_PARAM_TXPOWER_SCALE, |
| 3411 | /* Beacon generation mode . 0: host, 1: target */ |
| 3412 | WMI_10X_PDEV_PARAM_BEACON_GEN_MODE, |
| 3413 | /* Beacon generation mode . 0: staggered 1: bursted */ |
| 3414 | WMI_10X_PDEV_PARAM_BEACON_TX_MODE, |
| 3415 | /* |
| 3416 | * Resource manager off chan mode . |
| 3417 | * 0: turn off off chan mode. 1: turn on offchan mode |
| 3418 | */ |
| 3419 | WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 3420 | /* |
| 3421 | * Protection mode: |
| 3422 | * 0: no protection 1:use CTS-to-self 2: use RTS/CTS |
| 3423 | */ |
| 3424 | WMI_10X_PDEV_PARAM_PROTECTION_MODE, |
| 3425 | /* Dynamic bandwidth 0: disable 1: enable */ |
| 3426 | WMI_10X_PDEV_PARAM_DYNAMIC_BW, |
| 3427 | /* Non aggregrate/ 11g sw retry threshold.0-disable */ |
| 3428 | WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 3429 | /* aggregrate sw retry threshold. 0-disable*/ |
| 3430 | WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 3431 | /* Station kickout threshold (non of consecutive failures).0-disable */ |
| 3432 | WMI_10X_PDEV_PARAM_STA_KICKOUT_TH, |
| 3433 | /* Aggerate size scaling configuration per AC */ |
| 3434 | WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 3435 | /* LTR enable */ |
| 3436 | WMI_10X_PDEV_PARAM_LTR_ENABLE, |
| 3437 | /* LTR latency for BE, in us */ |
| 3438 | WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 3439 | /* LTR latency for BK, in us */ |
| 3440 | WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 3441 | /* LTR latency for VI, in us */ |
| 3442 | WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 3443 | /* LTR latency for VO, in us */ |
| 3444 | WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 3445 | /* LTR AC latency timeout, in ms */ |
| 3446 | WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 3447 | /* LTR platform latency override, in us */ |
| 3448 | WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 3449 | /* LTR-RX override, in us */ |
| 3450 | WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 3451 | /* Tx activity timeout for LTR, in us */ |
| 3452 | WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 3453 | /* L1SS state machine enable */ |
| 3454 | WMI_10X_PDEV_PARAM_L1SS_ENABLE, |
| 3455 | /* Deep sleep state machine enable */ |
| 3456 | WMI_10X_PDEV_PARAM_DSLEEP_ENABLE, |
| 3457 | /* pdev level stats update period in ms */ |
| 3458 | WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 3459 | /* vdev level stats update period in ms */ |
| 3460 | WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 3461 | /* peer level stats update period in ms */ |
| 3462 | WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 3463 | /* beacon filter status update period */ |
| 3464 | WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 3465 | /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */ |
| 3466 | WMI_10X_PDEV_PARAM_PMF_QOS, |
| 3467 | /* Access category on which ARP and DHCP frames are sent */ |
| 3468 | WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE, |
| 3469 | /* DCS configuration */ |
| 3470 | WMI_10X_PDEV_PARAM_DCS, |
| 3471 | /* Enable/Disable ANI on target */ |
| 3472 | WMI_10X_PDEV_PARAM_ANI_ENABLE, |
| 3473 | /* configure the ANI polling period */ |
| 3474 | WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD, |
| 3475 | /* configure the ANI listening period */ |
| 3476 | WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 3477 | /* configure OFDM immunity level */ |
| 3478 | WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 3479 | /* configure CCK immunity level */ |
| 3480 | WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL, |
| 3481 | /* Enable/Disable CDD for 1x1 STAs in rate control module */ |
| 3482 | WMI_10X_PDEV_PARAM_DYNTXCHAIN, |
| 3483 | /* Enable/Disable Fast channel reset*/ |
| 3484 | WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET, |
| 3485 | /* Set Bursting DUR */ |
| 3486 | WMI_10X_PDEV_PARAM_BURST_DUR, |
| 3487 | /* Set Bursting Enable*/ |
| 3488 | WMI_10X_PDEV_PARAM_BURST_ENABLE, |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 3489 | |
| 3490 | /* following are available as of firmware 10.2 */ |
| 3491 | WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, |
| 3492 | WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE, |
| 3493 | WMI_10X_PDEV_PARAM_IGMPMLD_TID, |
| 3494 | WMI_10X_PDEV_PARAM_ANTENNA_GAIN, |
| 3495 | WMI_10X_PDEV_PARAM_RX_DECAP_MODE, |
| 3496 | WMI_10X_PDEV_PARAM_RX_FILTER, |
| 3497 | WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID, |
| 3498 | WMI_10X_PDEV_PARAM_PROXY_STA_MODE, |
| 3499 | WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE, |
| 3500 | WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, |
| 3501 | WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, |
Peter Oh | b43bf97 | 2014-12-02 13:06:53 +0200 | [diff] [blame] | 3502 | WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE, |
| 3503 | WMI_10X_PDEV_PARAM_RTS_FIXED_RATE, |
| 3504 | WMI_10X_PDEV_PARAM_CAL_PERIOD |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 3505 | }; |
| 3506 | |
Raja Mani | d86561f | 2015-06-22 20:10:14 +0530 | [diff] [blame] | 3507 | enum wmi_10_4_pdev_param { |
| 3508 | WMI_10_4_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
| 3509 | WMI_10_4_PDEV_PARAM_RX_CHAIN_MASK, |
| 3510 | WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 3511 | WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 3512 | WMI_10_4_PDEV_PARAM_TXPOWER_SCALE, |
| 3513 | WMI_10_4_PDEV_PARAM_BEACON_GEN_MODE, |
| 3514 | WMI_10_4_PDEV_PARAM_BEACON_TX_MODE, |
| 3515 | WMI_10_4_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 3516 | WMI_10_4_PDEV_PARAM_PROTECTION_MODE, |
| 3517 | WMI_10_4_PDEV_PARAM_DYNAMIC_BW, |
| 3518 | WMI_10_4_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 3519 | WMI_10_4_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 3520 | WMI_10_4_PDEV_PARAM_STA_KICKOUT_TH, |
| 3521 | WMI_10_4_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 3522 | WMI_10_4_PDEV_PARAM_LTR_ENABLE, |
| 3523 | WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 3524 | WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 3525 | WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 3526 | WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 3527 | WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 3528 | WMI_10_4_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 3529 | WMI_10_4_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 3530 | WMI_10_4_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 3531 | WMI_10_4_PDEV_PARAM_L1SS_ENABLE, |
| 3532 | WMI_10_4_PDEV_PARAM_DSLEEP_ENABLE, |
| 3533 | WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| 3534 | WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| 3535 | WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| 3536 | WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| 3537 | WMI_10_4_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 3538 | WMI_10_4_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 3539 | WMI_10_4_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 3540 | WMI_10_4_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 3541 | WMI_10_4_PDEV_PARAM_PMF_QOS, |
| 3542 | WMI_10_4_PDEV_PARAM_ARP_AC_OVERRIDE, |
| 3543 | WMI_10_4_PDEV_PARAM_DCS, |
| 3544 | WMI_10_4_PDEV_PARAM_ANI_ENABLE, |
| 3545 | WMI_10_4_PDEV_PARAM_ANI_POLL_PERIOD, |
| 3546 | WMI_10_4_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 3547 | WMI_10_4_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 3548 | WMI_10_4_PDEV_PARAM_ANI_CCK_LEVEL, |
| 3549 | WMI_10_4_PDEV_PARAM_DYNTXCHAIN, |
| 3550 | WMI_10_4_PDEV_PARAM_PROXY_STA, |
| 3551 | WMI_10_4_PDEV_PARAM_IDLE_PS_CONFIG, |
| 3552 | WMI_10_4_PDEV_PARAM_POWER_GATING_SLEEP, |
| 3553 | WMI_10_4_PDEV_PARAM_AGGR_BURST, |
| 3554 | WMI_10_4_PDEV_PARAM_RX_DECAP_MODE, |
| 3555 | WMI_10_4_PDEV_PARAM_FAST_CHANNEL_RESET, |
| 3556 | WMI_10_4_PDEV_PARAM_BURST_DUR, |
| 3557 | WMI_10_4_PDEV_PARAM_BURST_ENABLE, |
| 3558 | WMI_10_4_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, |
| 3559 | WMI_10_4_PDEV_PARAM_IGMPMLD_OVERRIDE, |
| 3560 | WMI_10_4_PDEV_PARAM_IGMPMLD_TID, |
| 3561 | WMI_10_4_PDEV_PARAM_ANTENNA_GAIN, |
| 3562 | WMI_10_4_PDEV_PARAM_RX_FILTER, |
| 3563 | WMI_10_4_PDEV_SET_MCAST_TO_UCAST_TID, |
| 3564 | WMI_10_4_PDEV_PARAM_PROXY_STA_MODE, |
| 3565 | WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_MODE, |
| 3566 | WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, |
| 3567 | WMI_10_4_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, |
| 3568 | WMI_10_4_PDEV_PEER_STA_PS_STATECHG_ENABLE, |
| 3569 | WMI_10_4_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, |
| 3570 | WMI_10_4_PDEV_PARAM_BLOCK_INTERBSS, |
| 3571 | WMI_10_4_PDEV_PARAM_SET_DISABLE_RESET_CMDID, |
| 3572 | WMI_10_4_PDEV_PARAM_SET_MSDU_TTL_CMDID, |
| 3573 | WMI_10_4_PDEV_PARAM_SET_PPDU_DURATION_CMDID, |
| 3574 | WMI_10_4_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, |
| 3575 | WMI_10_4_PDEV_PARAM_SET_PROMISC_MODE_CMDID, |
| 3576 | WMI_10_4_PDEV_PARAM_SET_BURST_MODE_CMDID, |
| 3577 | WMI_10_4_PDEV_PARAM_EN_STATS, |
| 3578 | WMI_10_4_PDEV_PARAM_MU_GROUP_POLICY, |
| 3579 | WMI_10_4_PDEV_PARAM_NOISE_DETECTION, |
| 3580 | WMI_10_4_PDEV_PARAM_NOISE_THRESHOLD, |
| 3581 | WMI_10_4_PDEV_PARAM_DPD_ENABLE, |
| 3582 | WMI_10_4_PDEV_PARAM_SET_MCAST_BCAST_ECHO, |
| 3583 | WMI_10_4_PDEV_PARAM_ATF_STRICT_SCH, |
| 3584 | WMI_10_4_PDEV_PARAM_ATF_SCHED_DURATION, |
| 3585 | WMI_10_4_PDEV_PARAM_ANT_PLZN, |
| 3586 | WMI_10_4_PDEV_PARAM_MGMT_RETRY_LIMIT, |
| 3587 | WMI_10_4_PDEV_PARAM_SENSITIVITY_LEVEL, |
| 3588 | WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_2G, |
| 3589 | WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_5G, |
| 3590 | WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMSDU, |
| 3591 | WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMPDU, |
| 3592 | WMI_10_4_PDEV_PARAM_CCA_THRESHOLD, |
| 3593 | WMI_10_4_PDEV_PARAM_RTS_FIXED_RATE, |
| 3594 | WMI_10_4_PDEV_PARAM_CAL_PERIOD, |
| 3595 | WMI_10_4_PDEV_PARAM_PDEV_RESET, |
| 3596 | WMI_10_4_PDEV_PARAM_WAPI_MBSSID_OFFSET, |
| 3597 | WMI_10_4_PDEV_PARAM_ARP_SRCADDR, |
| 3598 | WMI_10_4_PDEV_PARAM_ARP_DSTADDR, |
| 3599 | }; |
| 3600 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3601 | struct wmi_pdev_set_param_cmd { |
| 3602 | __le32 param_id; |
| 3603 | __le32 param_value; |
| 3604 | } __packed; |
| 3605 | |
Peter Oh | a7bd3e9 | 2014-12-02 13:07:14 +0200 | [diff] [blame] | 3606 | /* valid period is 1 ~ 60000ms, unit in millisecond */ |
| 3607 | #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000 |
| 3608 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3609 | struct wmi_pdev_get_tpc_config_cmd { |
| 3610 | /* parameter */ |
| 3611 | __le32 param; |
| 3612 | } __packed; |
| 3613 | |
| 3614 | #define WMI_TPC_RATE_MAX 160 |
| 3615 | #define WMI_TPC_TX_N_CHAIN 4 |
| 3616 | |
| 3617 | enum wmi_tpc_config_event_flag { |
| 3618 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, |
| 3619 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, |
| 3620 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, |
| 3621 | }; |
| 3622 | |
| 3623 | struct wmi_pdev_tpc_config_event { |
| 3624 | __le32 reg_domain; |
| 3625 | __le32 chan_freq; |
| 3626 | __le32 phy_mode; |
| 3627 | __le32 twice_antenna_reduction; |
| 3628 | __le32 twice_max_rd_power; |
| 3629 | s32 twice_antenna_gain; |
| 3630 | __le32 power_limit; |
| 3631 | __le32 rate_max; |
| 3632 | __le32 num_tx_chain; |
| 3633 | __le32 ctl; |
| 3634 | __le32 flags; |
| 3635 | s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN]; |
| 3636 | s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN]; |
| 3637 | s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN]; |
| 3638 | s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN]; |
| 3639 | u8 rates_array[WMI_TPC_RATE_MAX]; |
| 3640 | } __packed; |
| 3641 | |
| 3642 | /* Transmit power scale factor. */ |
| 3643 | enum wmi_tp_scale { |
| 3644 | WMI_TP_SCALE_MAX = 0, /* no scaling (default) */ |
| 3645 | WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ |
| 3646 | WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ |
| 3647 | WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ |
| 3648 | WMI_TP_SCALE_MIN = 4, /* min, but still on */ |
| 3649 | WMI_TP_SCALE_SIZE = 5, /* max num of enum */ |
| 3650 | }; |
| 3651 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3652 | struct wmi_pdev_chanlist_update_event { |
| 3653 | /* number of channels */ |
| 3654 | __le32 num_chan; |
| 3655 | /* array of channels */ |
| 3656 | struct wmi_channel channel_list[1]; |
| 3657 | } __packed; |
| 3658 | |
| 3659 | #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32) |
| 3660 | |
| 3661 | struct wmi_debug_mesg_event { |
| 3662 | /* message buffer, NULL terminated */ |
| 3663 | char bufp[WMI_MAX_DEBUG_MESG]; |
| 3664 | } __packed; |
| 3665 | |
| 3666 | enum { |
| 3667 | /* P2P device */ |
| 3668 | VDEV_SUBTYPE_P2PDEV = 0, |
| 3669 | /* P2P client */ |
| 3670 | VDEV_SUBTYPE_P2PCLI, |
| 3671 | /* P2P GO */ |
| 3672 | VDEV_SUBTYPE_P2PGO, |
| 3673 | /* BT3.0 HS */ |
| 3674 | VDEV_SUBTYPE_BT, |
| 3675 | }; |
| 3676 | |
| 3677 | struct wmi_pdev_set_channel_cmd { |
| 3678 | /* idnore power , only use flags , mode and freq */ |
| 3679 | struct wmi_channel chan; |
| 3680 | } __packed; |
| 3681 | |
Rajkumar Manoharan | 9017445 | 2014-10-03 08:02:33 +0300 | [diff] [blame] | 3682 | struct wmi_pdev_pktlog_enable_cmd { |
| 3683 | __le32 ev_bitmap; |
| 3684 | } __packed; |
| 3685 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3686 | /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */ |
| 3687 | #define WMI_DSCP_MAP_MAX (64) |
| 3688 | struct wmi_pdev_set_dscp_tid_map_cmd { |
| 3689 | /* map indicating DSCP to TID conversion */ |
| 3690 | __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
| 3691 | } __packed; |
| 3692 | |
| 3693 | enum mcast_bcast_rate_id { |
| 3694 | WMI_SET_MCAST_RATE, |
| 3695 | WMI_SET_BCAST_RATE |
| 3696 | }; |
| 3697 | |
| 3698 | struct mcast_bcast_rate { |
| 3699 | enum mcast_bcast_rate_id rate_id; |
| 3700 | __le32 rate; |
| 3701 | } __packed; |
| 3702 | |
| 3703 | struct wmi_wmm_params { |
| 3704 | __le32 cwmin; |
| 3705 | __le32 cwmax; |
| 3706 | __le32 aifs; |
| 3707 | __le32 txop; |
| 3708 | __le32 acm; |
| 3709 | __le32 no_ack; |
| 3710 | } __packed; |
| 3711 | |
| 3712 | struct wmi_pdev_set_wmm_params { |
| 3713 | struct wmi_wmm_params ac_be; |
| 3714 | struct wmi_wmm_params ac_bk; |
| 3715 | struct wmi_wmm_params ac_vi; |
| 3716 | struct wmi_wmm_params ac_vo; |
| 3717 | } __packed; |
| 3718 | |
| 3719 | struct wmi_wmm_params_arg { |
| 3720 | u32 cwmin; |
| 3721 | u32 cwmax; |
| 3722 | u32 aifs; |
| 3723 | u32 txop; |
| 3724 | u32 acm; |
| 3725 | u32 no_ack; |
| 3726 | }; |
| 3727 | |
Michal Kazior | 5e752e4 | 2015-01-19 09:53:41 +0100 | [diff] [blame] | 3728 | struct wmi_wmm_params_all_arg { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3729 | struct wmi_wmm_params_arg ac_be; |
| 3730 | struct wmi_wmm_params_arg ac_bk; |
| 3731 | struct wmi_wmm_params_arg ac_vi; |
| 3732 | struct wmi_wmm_params_arg ac_vo; |
| 3733 | }; |
| 3734 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3735 | struct wmi_pdev_stats_tx { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3736 | /* Num HTT cookies queued to dispatch list */ |
| 3737 | __le32 comp_queued; |
| 3738 | |
| 3739 | /* Num HTT cookies dispatched */ |
| 3740 | __le32 comp_delivered; |
| 3741 | |
| 3742 | /* Num MSDU queued to WAL */ |
| 3743 | __le32 msdu_enqued; |
| 3744 | |
| 3745 | /* Num MPDU queue to WAL */ |
| 3746 | __le32 mpdu_enqued; |
| 3747 | |
| 3748 | /* Num MSDUs dropped by WMM limit */ |
| 3749 | __le32 wmm_drop; |
| 3750 | |
| 3751 | /* Num Local frames queued */ |
| 3752 | __le32 local_enqued; |
| 3753 | |
| 3754 | /* Num Local frames done */ |
| 3755 | __le32 local_freed; |
| 3756 | |
| 3757 | /* Num queued to HW */ |
| 3758 | __le32 hw_queued; |
| 3759 | |
| 3760 | /* Num PPDU reaped from HW */ |
| 3761 | __le32 hw_reaped; |
| 3762 | |
| 3763 | /* Num underruns */ |
| 3764 | __le32 underrun; |
| 3765 | |
| 3766 | /* Num PPDUs cleaned up in TX abort */ |
| 3767 | __le32 tx_abort; |
| 3768 | |
| 3769 | /* Num MPDUs requed by SW */ |
| 3770 | __le32 mpdus_requed; |
| 3771 | |
| 3772 | /* excessive retries */ |
| 3773 | __le32 tx_ko; |
| 3774 | |
| 3775 | /* data hw rate code */ |
| 3776 | __le32 data_rc; |
| 3777 | |
| 3778 | /* Scheduler self triggers */ |
| 3779 | __le32 self_triggers; |
| 3780 | |
| 3781 | /* frames dropped due to excessive sw retries */ |
| 3782 | __le32 sw_retry_failure; |
| 3783 | |
| 3784 | /* illegal rate phy errors */ |
| 3785 | __le32 illgl_rate_phy_err; |
| 3786 | |
| 3787 | /* wal pdev continous xretry */ |
| 3788 | __le32 pdev_cont_xretry; |
| 3789 | |
| 3790 | /* wal pdev continous xretry */ |
| 3791 | __le32 pdev_tx_timeout; |
| 3792 | |
| 3793 | /* wal pdev resets */ |
| 3794 | __le32 pdev_resets; |
| 3795 | |
Bartosz Markowski | 34d714e | 2014-03-28 14:35:16 +0200 | [diff] [blame] | 3796 | /* frames dropped due to non-availability of stateless TIDs */ |
| 3797 | __le32 stateless_tid_alloc_failure; |
| 3798 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3799 | __le32 phy_underrun; |
| 3800 | |
| 3801 | /* MPDU is more than txop limit */ |
| 3802 | __le32 txop_ovf; |
| 3803 | } __packed; |
| 3804 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3805 | struct wmi_pdev_stats_rx { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3806 | /* Cnts any change in ring routing mid-ppdu */ |
| 3807 | __le32 mid_ppdu_route_change; |
| 3808 | |
| 3809 | /* Total number of statuses processed */ |
| 3810 | __le32 status_rcvd; |
| 3811 | |
| 3812 | /* Extra frags on rings 0-3 */ |
| 3813 | __le32 r0_frags; |
| 3814 | __le32 r1_frags; |
| 3815 | __le32 r2_frags; |
| 3816 | __le32 r3_frags; |
| 3817 | |
| 3818 | /* MSDUs / MPDUs delivered to HTT */ |
| 3819 | __le32 htt_msdus; |
| 3820 | __le32 htt_mpdus; |
| 3821 | |
| 3822 | /* MSDUs / MPDUs delivered to local stack */ |
| 3823 | __le32 loc_msdus; |
| 3824 | __le32 loc_mpdus; |
| 3825 | |
| 3826 | /* AMSDUs that have more MSDUs than the status ring size */ |
| 3827 | __le32 oversize_amsdu; |
| 3828 | |
| 3829 | /* Number of PHY errors */ |
| 3830 | __le32 phy_errs; |
| 3831 | |
| 3832 | /* Number of PHY errors drops */ |
| 3833 | __le32 phy_err_drop; |
| 3834 | |
| 3835 | /* Number of mpdu errors - FCS, MIC, ENC etc. */ |
| 3836 | __le32 mpdu_errs; |
| 3837 | } __packed; |
| 3838 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3839 | struct wmi_pdev_stats_peer { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3840 | /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ |
| 3841 | __le32 dummy; |
| 3842 | } __packed; |
| 3843 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3844 | enum wmi_stats_id { |
Michal Kazior | eed5541 | 2015-02-15 16:50:41 +0200 | [diff] [blame] | 3845 | WMI_STAT_PEER = BIT(0), |
| 3846 | WMI_STAT_AP = BIT(1), |
| 3847 | WMI_STAT_PDEV = BIT(2), |
| 3848 | WMI_STAT_VDEV = BIT(3), |
| 3849 | WMI_STAT_BCNFLT = BIT(4), |
| 3850 | WMI_STAT_VDEV_RATE = BIT(5), |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3851 | }; |
| 3852 | |
Ben Greear | db9cdda | 2014-03-28 14:35:15 +0200 | [diff] [blame] | 3853 | struct wlan_inst_rssi_args { |
| 3854 | __le16 cfg_retry_count; |
| 3855 | __le16 retry_count; |
| 3856 | }; |
| 3857 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3858 | struct wmi_request_stats_cmd { |
| 3859 | __le32 stats_id; |
| 3860 | |
Ben Greear | db9cdda | 2014-03-28 14:35:15 +0200 | [diff] [blame] | 3861 | __le32 vdev_id; |
| 3862 | |
| 3863 | /* peer MAC address */ |
| 3864 | struct wmi_mac_addr peer_macaddr; |
| 3865 | |
| 3866 | /* Instantaneous RSSI arguments */ |
| 3867 | struct wlan_inst_rssi_args inst_rssi_args; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3868 | } __packed; |
| 3869 | |
| 3870 | /* Suspend option */ |
| 3871 | enum { |
| 3872 | /* suspend */ |
| 3873 | WMI_PDEV_SUSPEND, |
| 3874 | |
| 3875 | /* suspend and disable all interrupts */ |
| 3876 | WMI_PDEV_SUSPEND_AND_DISABLE_INTR, |
| 3877 | }; |
| 3878 | |
| 3879 | struct wmi_pdev_suspend_cmd { |
| 3880 | /* suspend option sent to target */ |
| 3881 | __le32 suspend_opt; |
| 3882 | } __packed; |
| 3883 | |
| 3884 | struct wmi_stats_event { |
Michal Kazior | eed5541 | 2015-02-15 16:50:41 +0200 | [diff] [blame] | 3885 | __le32 stats_id; /* WMI_STAT_ */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3886 | /* |
| 3887 | * number of pdev stats event structures |
| 3888 | * (wmi_pdev_stats) 0 or 1 |
| 3889 | */ |
| 3890 | __le32 num_pdev_stats; |
| 3891 | /* |
| 3892 | * number of vdev stats event structures |
| 3893 | * (wmi_vdev_stats) 0 or max vdevs |
| 3894 | */ |
| 3895 | __le32 num_vdev_stats; |
| 3896 | /* |
| 3897 | * number of peer stats event structures |
| 3898 | * (wmi_peer_stats) 0 or max peers |
| 3899 | */ |
| 3900 | __le32 num_peer_stats; |
| 3901 | __le32 num_bcnflt_stats; |
| 3902 | /* |
| 3903 | * followed by |
| 3904 | * num_pdev_stats * size of(struct wmi_pdev_stats) |
| 3905 | * num_vdev_stats * size of(struct wmi_vdev_stats) |
| 3906 | * num_peer_stats * size of(struct wmi_peer_stats) |
| 3907 | * |
| 3908 | * By having a zero sized array, the pointer to data area |
| 3909 | * becomes available without increasing the struct size |
| 3910 | */ |
| 3911 | u8 data[0]; |
| 3912 | } __packed; |
| 3913 | |
Michal Kazior | 20de222 | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3914 | struct wmi_10_2_stats_event { |
| 3915 | __le32 stats_id; /* %WMI_REQUEST_ */ |
| 3916 | __le32 num_pdev_stats; |
| 3917 | __le32 num_pdev_ext_stats; |
| 3918 | __le32 num_vdev_stats; |
| 3919 | __le32 num_peer_stats; |
| 3920 | __le32 num_bcnflt_stats; |
| 3921 | u8 data[0]; |
| 3922 | } __packed; |
| 3923 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3924 | /* |
| 3925 | * PDEV statistics |
| 3926 | * TODO: add all PDEV stats here |
| 3927 | */ |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3928 | struct wmi_pdev_stats_base { |
| 3929 | __le32 chan_nf; |
| 3930 | __le32 tx_frame_count; |
| 3931 | __le32 rx_frame_count; |
| 3932 | __le32 rx_clear_count; |
| 3933 | __le32 cycle_count; |
| 3934 | __le32 phy_err_count; |
| 3935 | __le32 chan_tx_pwr; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3936 | } __packed; |
| 3937 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3938 | struct wmi_pdev_stats { |
| 3939 | struct wmi_pdev_stats_base base; |
| 3940 | struct wmi_pdev_stats_tx tx; |
| 3941 | struct wmi_pdev_stats_rx rx; |
| 3942 | struct wmi_pdev_stats_peer peer; |
| 3943 | } __packed; |
| 3944 | |
| 3945 | struct wmi_pdev_stats_extra { |
Chun-Yeow Yeoh | 52e346d | 2014-03-28 14:35:16 +0200 | [diff] [blame] | 3946 | __le32 ack_rx_bad; |
| 3947 | __le32 rts_bad; |
| 3948 | __le32 rts_good; |
| 3949 | __le32 fcs_bad; |
| 3950 | __le32 no_beacons; |
| 3951 | __le32 mib_int_count; |
| 3952 | } __packed; |
| 3953 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3954 | struct wmi_10x_pdev_stats { |
| 3955 | struct wmi_pdev_stats_base base; |
| 3956 | struct wmi_pdev_stats_tx tx; |
| 3957 | struct wmi_pdev_stats_rx rx; |
| 3958 | struct wmi_pdev_stats_peer peer; |
| 3959 | struct wmi_pdev_stats_extra extra; |
| 3960 | } __packed; |
| 3961 | |
Michal Kazior | 20de222 | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 3962 | struct wmi_pdev_stats_mem { |
| 3963 | __le32 dram_free; |
| 3964 | __le32 iram_free; |
| 3965 | } __packed; |
| 3966 | |
| 3967 | struct wmi_10_2_pdev_stats { |
| 3968 | struct wmi_pdev_stats_base base; |
| 3969 | struct wmi_pdev_stats_tx tx; |
| 3970 | __le32 mc_drop; |
| 3971 | struct wmi_pdev_stats_rx rx; |
| 3972 | __le32 pdev_rx_timeout; |
| 3973 | struct wmi_pdev_stats_mem mem; |
| 3974 | struct wmi_pdev_stats_peer peer; |
| 3975 | struct wmi_pdev_stats_extra extra; |
| 3976 | } __packed; |
| 3977 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3978 | /* |
| 3979 | * VDEV statistics |
| 3980 | * TODO: add all VDEV stats here |
| 3981 | */ |
| 3982 | struct wmi_vdev_stats { |
| 3983 | __le32 vdev_id; |
| 3984 | } __packed; |
| 3985 | |
| 3986 | /* |
| 3987 | * peer statistics. |
| 3988 | * TODO: add more stats |
| 3989 | */ |
Michal Kazior | d15fb52 | 2014-09-25 12:33:47 +0200 | [diff] [blame] | 3990 | struct wmi_peer_stats { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 3991 | struct wmi_mac_addr peer_macaddr; |
| 3992 | __le32 peer_rssi; |
| 3993 | __le32 peer_tx_rate; |
| 3994 | } __packed; |
| 3995 | |
Michal Kazior | d15fb52 | 2014-09-25 12:33:47 +0200 | [diff] [blame] | 3996 | struct wmi_10x_peer_stats { |
| 3997 | struct wmi_peer_stats old; |
Ben Greear | 23c3aae | 2014-03-28 14:35:15 +0200 | [diff] [blame] | 3998 | __le32 peer_rx_rate; |
| 3999 | } __packed; |
| 4000 | |
Michal Kazior | 20de222 | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 4001 | struct wmi_10_2_peer_stats { |
| 4002 | struct wmi_peer_stats old; |
| 4003 | __le32 peer_rx_rate; |
| 4004 | __le32 current_per; |
| 4005 | __le32 retries; |
| 4006 | __le32 tx_rate_count; |
| 4007 | __le32 max_4ms_frame_len; |
| 4008 | __le32 total_sub_frames; |
| 4009 | __le32 tx_bytes; |
| 4010 | __le32 num_pkt_loss_overflow[4]; |
| 4011 | __le32 num_pkt_loss_excess_retry[4]; |
| 4012 | } __packed; |
| 4013 | |
| 4014 | struct wmi_10_2_4_peer_stats { |
| 4015 | struct wmi_10_2_peer_stats common; |
| 4016 | __le32 unknown_value; /* FIXME: what is this word? */ |
| 4017 | } __packed; |
| 4018 | |
| 4019 | struct wmi_10_2_pdev_ext_stats { |
| 4020 | __le32 rx_rssi_comb; |
| 4021 | __le32 rx_rssi[4]; |
| 4022 | __le32 rx_mcs[10]; |
| 4023 | __le32 tx_mcs[10]; |
| 4024 | __le32 ack_rssi; |
| 4025 | } __packed; |
| 4026 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4027 | struct wmi_vdev_create_cmd { |
| 4028 | __le32 vdev_id; |
| 4029 | __le32 vdev_type; |
| 4030 | __le32 vdev_subtype; |
| 4031 | struct wmi_mac_addr vdev_macaddr; |
| 4032 | } __packed; |
| 4033 | |
| 4034 | enum wmi_vdev_type { |
| 4035 | WMI_VDEV_TYPE_AP = 1, |
| 4036 | WMI_VDEV_TYPE_STA = 2, |
| 4037 | WMI_VDEV_TYPE_IBSS = 3, |
| 4038 | WMI_VDEV_TYPE_MONITOR = 4, |
| 4039 | }; |
| 4040 | |
| 4041 | enum wmi_vdev_subtype { |
| 4042 | WMI_VDEV_SUBTYPE_NONE = 0, |
| 4043 | WMI_VDEV_SUBTYPE_P2P_DEVICE = 1, |
| 4044 | WMI_VDEV_SUBTYPE_P2P_CLIENT = 2, |
| 4045 | WMI_VDEV_SUBTYPE_P2P_GO = 3, |
| 4046 | }; |
| 4047 | |
| 4048 | /* values for vdev_subtype */ |
| 4049 | |
| 4050 | /* values for vdev_start_request flags */ |
| 4051 | /* |
| 4052 | * Indicates that AP VDEV uses hidden ssid. only valid for |
| 4053 | * AP/GO */ |
| 4054 | #define WMI_VDEV_START_HIDDEN_SSID (1<<0) |
| 4055 | /* |
| 4056 | * Indicates if robust management frame/management frame |
| 4057 | * protection is enabled. For GO/AP vdevs, it indicates that |
| 4058 | * it may support station/client associations with RMF enabled. |
| 4059 | * For STA/client vdevs, it indicates that sta will |
| 4060 | * associate with AP with RMF enabled. */ |
| 4061 | #define WMI_VDEV_START_PMF_ENABLED (1<<1) |
| 4062 | |
| 4063 | struct wmi_p2p_noa_descriptor { |
| 4064 | __le32 type_count; /* 255: continuous schedule, 0: reserved */ |
| 4065 | __le32 duration; /* Absent period duration in micro seconds */ |
| 4066 | __le32 interval; /* Absent period interval in micro seconds */ |
| 4067 | __le32 start_time; /* 32 bit tsf time when in starts */ |
| 4068 | } __packed; |
| 4069 | |
| 4070 | struct wmi_vdev_start_request_cmd { |
| 4071 | /* WMI channel */ |
| 4072 | struct wmi_channel chan; |
| 4073 | /* unique id identifying the VDEV, generated by the caller */ |
| 4074 | __le32 vdev_id; |
| 4075 | /* requestor id identifying the caller module */ |
| 4076 | __le32 requestor_id; |
| 4077 | /* beacon interval from received beacon */ |
| 4078 | __le32 beacon_interval; |
| 4079 | /* DTIM Period from the received beacon */ |
| 4080 | __le32 dtim_period; |
| 4081 | /* Flags */ |
| 4082 | __le32 flags; |
| 4083 | /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */ |
| 4084 | struct wmi_ssid ssid; |
| 4085 | /* beacon/probe reponse xmit rate. Applicable for SoftAP. */ |
| 4086 | __le32 bcn_tx_rate; |
| 4087 | /* beacon/probe reponse xmit power. Applicable for SoftAP. */ |
| 4088 | __le32 bcn_tx_power; |
| 4089 | /* number of p2p NOA descriptor(s) from scan entry */ |
| 4090 | __le32 num_noa_descriptors; |
| 4091 | /* |
| 4092 | * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID. |
| 4093 | * During CAC, Our HW shouldn't ack ditected frames |
| 4094 | */ |
| 4095 | __le32 disable_hw_ack; |
| 4096 | /* actual p2p NOA descriptor from scan entry */ |
| 4097 | struct wmi_p2p_noa_descriptor noa_descriptors[2]; |
| 4098 | } __packed; |
| 4099 | |
| 4100 | struct wmi_vdev_restart_request_cmd { |
| 4101 | struct wmi_vdev_start_request_cmd vdev_start_request_cmd; |
| 4102 | } __packed; |
| 4103 | |
| 4104 | struct wmi_vdev_start_request_arg { |
| 4105 | u32 vdev_id; |
| 4106 | struct wmi_channel_arg channel; |
| 4107 | u32 bcn_intval; |
| 4108 | u32 dtim_period; |
| 4109 | u8 *ssid; |
| 4110 | u32 ssid_len; |
| 4111 | u32 bcn_tx_rate; |
| 4112 | u32 bcn_tx_power; |
| 4113 | bool disable_hw_ack; |
| 4114 | bool hidden_ssid; |
| 4115 | bool pmf_enabled; |
| 4116 | }; |
| 4117 | |
| 4118 | struct wmi_vdev_delete_cmd { |
| 4119 | /* unique id identifying the VDEV, generated by the caller */ |
| 4120 | __le32 vdev_id; |
| 4121 | } __packed; |
| 4122 | |
| 4123 | struct wmi_vdev_up_cmd { |
| 4124 | __le32 vdev_id; |
| 4125 | __le32 vdev_assoc_id; |
| 4126 | struct wmi_mac_addr vdev_bssid; |
| 4127 | } __packed; |
| 4128 | |
| 4129 | struct wmi_vdev_stop_cmd { |
| 4130 | __le32 vdev_id; |
| 4131 | } __packed; |
| 4132 | |
| 4133 | struct wmi_vdev_down_cmd { |
| 4134 | __le32 vdev_id; |
| 4135 | } __packed; |
| 4136 | |
| 4137 | struct wmi_vdev_standby_response_cmd { |
| 4138 | /* unique id identifying the VDEV, generated by the caller */ |
| 4139 | __le32 vdev_id; |
| 4140 | } __packed; |
| 4141 | |
| 4142 | struct wmi_vdev_resume_response_cmd { |
| 4143 | /* unique id identifying the VDEV, generated by the caller */ |
| 4144 | __le32 vdev_id; |
| 4145 | } __packed; |
| 4146 | |
| 4147 | struct wmi_vdev_set_param_cmd { |
| 4148 | __le32 vdev_id; |
| 4149 | __le32 param_id; |
| 4150 | __le32 param_value; |
| 4151 | } __packed; |
| 4152 | |
| 4153 | #define WMI_MAX_KEY_INDEX 3 |
| 4154 | #define WMI_MAX_KEY_LEN 32 |
| 4155 | |
| 4156 | #define WMI_KEY_PAIRWISE 0x00 |
| 4157 | #define WMI_KEY_GROUP 0x01 |
| 4158 | #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */ |
| 4159 | |
| 4160 | struct wmi_key_seq_counter { |
| 4161 | __le32 key_seq_counter_l; |
| 4162 | __le32 key_seq_counter_h; |
| 4163 | } __packed; |
| 4164 | |
| 4165 | #define WMI_CIPHER_NONE 0x0 /* clear key */ |
| 4166 | #define WMI_CIPHER_WEP 0x1 |
| 4167 | #define WMI_CIPHER_TKIP 0x2 |
| 4168 | #define WMI_CIPHER_AES_OCB 0x3 |
| 4169 | #define WMI_CIPHER_AES_CCM 0x4 |
| 4170 | #define WMI_CIPHER_WAPI 0x5 |
| 4171 | #define WMI_CIPHER_CKIP 0x6 |
| 4172 | #define WMI_CIPHER_AES_CMAC 0x7 |
| 4173 | |
| 4174 | struct wmi_vdev_install_key_cmd { |
| 4175 | __le32 vdev_id; |
| 4176 | struct wmi_mac_addr peer_macaddr; |
| 4177 | __le32 key_idx; |
| 4178 | __le32 key_flags; |
| 4179 | __le32 key_cipher; /* %WMI_CIPHER_ */ |
| 4180 | struct wmi_key_seq_counter key_rsc_counter; |
| 4181 | struct wmi_key_seq_counter key_global_rsc_counter; |
| 4182 | struct wmi_key_seq_counter key_tsc_counter; |
| 4183 | u8 wpi_key_rsc_counter[16]; |
| 4184 | u8 wpi_key_tsc_counter[16]; |
| 4185 | __le32 key_len; |
| 4186 | __le32 key_txmic_len; |
| 4187 | __le32 key_rxmic_len; |
| 4188 | |
| 4189 | /* contains key followed by tx mic followed by rx mic */ |
| 4190 | u8 key_data[0]; |
| 4191 | } __packed; |
| 4192 | |
| 4193 | struct wmi_vdev_install_key_arg { |
| 4194 | u32 vdev_id; |
| 4195 | const u8 *macaddr; |
| 4196 | u32 key_idx; |
| 4197 | u32 key_flags; |
| 4198 | u32 key_cipher; |
| 4199 | u32 key_len; |
| 4200 | u32 key_txmic_len; |
| 4201 | u32 key_rxmic_len; |
| 4202 | const void *key_data; |
| 4203 | }; |
| 4204 | |
Janusz Dziedzic | 51ab1a0 | 2014-01-08 09:08:33 +0100 | [diff] [blame] | 4205 | /* |
| 4206 | * vdev fixed rate format: |
| 4207 | * - preamble - b7:b6 - see WMI_RATE_PREMABLE_ |
| 4208 | * - nss - b5:b4 - ss number (0 mean 1ss) |
| 4209 | * - rate_mcs - b3:b0 - as below |
| 4210 | * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps, |
| 4211 | * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s) |
| 4212 | * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps, |
| 4213 | * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps |
| 4214 | * HT/VHT: MCS index |
| 4215 | */ |
| 4216 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4217 | /* Preamble types to be used with VDEV fixed rate configuration */ |
| 4218 | enum wmi_rate_preamble { |
| 4219 | WMI_RATE_PREAMBLE_OFDM, |
| 4220 | WMI_RATE_PREAMBLE_CCK, |
| 4221 | WMI_RATE_PREAMBLE_HT, |
| 4222 | WMI_RATE_PREAMBLE_VHT, |
| 4223 | }; |
| 4224 | |
| 4225 | /* Value to disable fixed rate setting */ |
| 4226 | #define WMI_FIXED_RATE_NONE (0xff) |
| 4227 | |
Bartosz Markowski | 6d1506e | 2013-09-26 17:47:15 +0200 | [diff] [blame] | 4228 | struct wmi_vdev_param_map { |
| 4229 | u32 rts_threshold; |
| 4230 | u32 fragmentation_threshold; |
| 4231 | u32 beacon_interval; |
| 4232 | u32 listen_interval; |
| 4233 | u32 multicast_rate; |
| 4234 | u32 mgmt_tx_rate; |
| 4235 | u32 slot_time; |
| 4236 | u32 preamble; |
| 4237 | u32 swba_time; |
| 4238 | u32 wmi_vdev_stats_update_period; |
| 4239 | u32 wmi_vdev_pwrsave_ageout_time; |
| 4240 | u32 wmi_vdev_host_swba_interval; |
| 4241 | u32 dtim_period; |
| 4242 | u32 wmi_vdev_oc_scheduler_air_time_limit; |
| 4243 | u32 wds; |
| 4244 | u32 atim_window; |
| 4245 | u32 bmiss_count_max; |
| 4246 | u32 bmiss_first_bcnt; |
| 4247 | u32 bmiss_final_bcnt; |
| 4248 | u32 feature_wmm; |
| 4249 | u32 chwidth; |
| 4250 | u32 chextoffset; |
| 4251 | u32 disable_htprotection; |
| 4252 | u32 sta_quickkickout; |
| 4253 | u32 mgmt_rate; |
| 4254 | u32 protection_mode; |
| 4255 | u32 fixed_rate; |
| 4256 | u32 sgi; |
| 4257 | u32 ldpc; |
| 4258 | u32 tx_stbc; |
| 4259 | u32 rx_stbc; |
| 4260 | u32 intra_bss_fwd; |
| 4261 | u32 def_keyid; |
| 4262 | u32 nss; |
| 4263 | u32 bcast_data_rate; |
| 4264 | u32 mcast_data_rate; |
| 4265 | u32 mcast_indicate; |
| 4266 | u32 dhcp_indicate; |
| 4267 | u32 unknown_dest_indicate; |
| 4268 | u32 ap_keepalive_min_idle_inactive_time_secs; |
| 4269 | u32 ap_keepalive_max_idle_inactive_time_secs; |
| 4270 | u32 ap_keepalive_max_unresponsive_time_secs; |
| 4271 | u32 ap_enable_nawds; |
| 4272 | u32 mcast2ucast_set; |
| 4273 | u32 enable_rtscts; |
| 4274 | u32 txbf; |
| 4275 | u32 packet_powersave; |
| 4276 | u32 drop_unencry; |
| 4277 | u32 tx_encap_type; |
| 4278 | u32 ap_detect_out_of_sync_sleeping_sta_time_secs; |
Raja Mani | 93841a1 | 2015-06-22 20:10:13 +0530 | [diff] [blame] | 4279 | u32 rc_num_retries; |
| 4280 | u32 cabq_maxdur; |
| 4281 | u32 mfptest_set; |
| 4282 | u32 rts_fixed_rate; |
| 4283 | u32 vht_sgimask; |
| 4284 | u32 vht80_ratemask; |
| 4285 | u32 early_rx_adjust_enable; |
| 4286 | u32 early_rx_tgt_bmiss_num; |
| 4287 | u32 early_rx_bmiss_sample_cycle; |
| 4288 | u32 early_rx_slop_step; |
| 4289 | u32 early_rx_init_slop; |
| 4290 | u32 early_rx_adjust_pause; |
| 4291 | u32 proxy_sta; |
| 4292 | u32 meru_vc; |
| 4293 | u32 rx_decap_type; |
| 4294 | u32 bw_nss_ratemask; |
Bartosz Markowski | 6d1506e | 2013-09-26 17:47:15 +0200 | [diff] [blame] | 4295 | }; |
| 4296 | |
| 4297 | #define WMI_VDEV_PARAM_UNSUPPORTED 0 |
| 4298 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4299 | /* the definition of different VDEV parameters */ |
| 4300 | enum wmi_vdev_param { |
| 4301 | /* RTS Threshold */ |
| 4302 | WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 4303 | /* Fragmentation threshold */ |
| 4304 | WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 4305 | /* beacon interval in TUs */ |
| 4306 | WMI_VDEV_PARAM_BEACON_INTERVAL, |
| 4307 | /* Listen interval in TUs */ |
| 4308 | WMI_VDEV_PARAM_LISTEN_INTERVAL, |
| 4309 | /* muticast rate in Mbps */ |
| 4310 | WMI_VDEV_PARAM_MULTICAST_RATE, |
| 4311 | /* management frame rate in Mbps */ |
| 4312 | WMI_VDEV_PARAM_MGMT_TX_RATE, |
| 4313 | /* slot time (long vs short) */ |
| 4314 | WMI_VDEV_PARAM_SLOT_TIME, |
| 4315 | /* preamble (long vs short) */ |
| 4316 | WMI_VDEV_PARAM_PREAMBLE, |
| 4317 | /* SWBA time (time before tbtt in msec) */ |
| 4318 | WMI_VDEV_PARAM_SWBA_TIME, |
| 4319 | /* time period for updating VDEV stats */ |
| 4320 | WMI_VDEV_STATS_UPDATE_PERIOD, |
| 4321 | /* age out time in msec for frames queued for station in power save */ |
| 4322 | WMI_VDEV_PWRSAVE_AGEOUT_TIME, |
| 4323 | /* |
| 4324 | * Host SWBA interval (time in msec before tbtt for SWBA event |
| 4325 | * generation). |
| 4326 | */ |
| 4327 | WMI_VDEV_HOST_SWBA_INTERVAL, |
| 4328 | /* DTIM period (specified in units of num beacon intervals) */ |
| 4329 | WMI_VDEV_PARAM_DTIM_PERIOD, |
| 4330 | /* |
| 4331 | * scheduler air time limit for this VDEV. used by off chan |
| 4332 | * scheduler. |
| 4333 | */ |
| 4334 | WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 4335 | /* enable/dsiable WDS for this VDEV */ |
| 4336 | WMI_VDEV_PARAM_WDS, |
| 4337 | /* ATIM Window */ |
| 4338 | WMI_VDEV_PARAM_ATIM_WINDOW, |
| 4339 | /* BMISS max */ |
| 4340 | WMI_VDEV_PARAM_BMISS_COUNT_MAX, |
| 4341 | /* BMISS first time */ |
| 4342 | WMI_VDEV_PARAM_BMISS_FIRST_BCNT, |
| 4343 | /* BMISS final time */ |
| 4344 | WMI_VDEV_PARAM_BMISS_FINAL_BCNT, |
| 4345 | /* WMM enables/disabled */ |
| 4346 | WMI_VDEV_PARAM_FEATURE_WMM, |
| 4347 | /* Channel width */ |
| 4348 | WMI_VDEV_PARAM_CHWIDTH, |
| 4349 | /* Channel Offset */ |
| 4350 | WMI_VDEV_PARAM_CHEXTOFFSET, |
| 4351 | /* Disable HT Protection */ |
| 4352 | WMI_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 4353 | /* Quick STA Kickout */ |
| 4354 | WMI_VDEV_PARAM_STA_QUICKKICKOUT, |
| 4355 | /* Rate to be used with Management frames */ |
| 4356 | WMI_VDEV_PARAM_MGMT_RATE, |
| 4357 | /* Protection Mode */ |
| 4358 | WMI_VDEV_PARAM_PROTECTION_MODE, |
| 4359 | /* Fixed rate setting */ |
| 4360 | WMI_VDEV_PARAM_FIXED_RATE, |
| 4361 | /* Short GI Enable/Disable */ |
| 4362 | WMI_VDEV_PARAM_SGI, |
| 4363 | /* Enable LDPC */ |
| 4364 | WMI_VDEV_PARAM_LDPC, |
| 4365 | /* Enable Tx STBC */ |
| 4366 | WMI_VDEV_PARAM_TX_STBC, |
| 4367 | /* Enable Rx STBC */ |
| 4368 | WMI_VDEV_PARAM_RX_STBC, |
| 4369 | /* Intra BSS forwarding */ |
| 4370 | WMI_VDEV_PARAM_INTRA_BSS_FWD, |
| 4371 | /* Setting Default xmit key for Vdev */ |
| 4372 | WMI_VDEV_PARAM_DEF_KEYID, |
| 4373 | /* NSS width */ |
| 4374 | WMI_VDEV_PARAM_NSS, |
| 4375 | /* Set the custom rate for the broadcast data frames */ |
| 4376 | WMI_VDEV_PARAM_BCAST_DATA_RATE, |
| 4377 | /* Set the custom rate (rate-code) for multicast data frames */ |
| 4378 | WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 4379 | /* Tx multicast packet indicate Enable/Disable */ |
| 4380 | WMI_VDEV_PARAM_MCAST_INDICATE, |
| 4381 | /* Tx DHCP packet indicate Enable/Disable */ |
| 4382 | WMI_VDEV_PARAM_DHCP_INDICATE, |
| 4383 | /* Enable host inspection of Tx unicast packet to unknown destination */ |
| 4384 | WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 4385 | |
| 4386 | /* The minimum amount of time AP begins to consider STA inactive */ |
| 4387 | WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 4388 | |
| 4389 | /* |
| 4390 | * An associated STA is considered inactive when there is no recent |
| 4391 | * TX/RX activity and no downlink frames are buffered for it. Once a |
| 4392 | * STA exceeds the maximum idle inactive time, the AP will send an |
| 4393 | * 802.11 data-null as a keep alive to verify the STA is still |
| 4394 | * associated. If the STA does ACK the data-null, or if the data-null |
| 4395 | * is buffered and the STA does not retrieve it, the STA will be |
| 4396 | * considered unresponsive |
| 4397 | * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). |
| 4398 | */ |
| 4399 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 4400 | |
| 4401 | /* |
| 4402 | * An associated STA is considered unresponsive if there is no recent |
| 4403 | * TX/RX activity and downlink frames are buffered for it. Once a STA |
| 4404 | * exceeds the maximum unresponsive time, the AP will send a |
| 4405 | * WMI_STA_KICKOUT event to the host so the STA can be deleted. */ |
| 4406 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 4407 | |
| 4408 | /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */ |
| 4409 | WMI_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 4410 | /* Enable/Disable RTS-CTS */ |
| 4411 | WMI_VDEV_PARAM_ENABLE_RTSCTS, |
| 4412 | /* Enable TXBFee/er */ |
| 4413 | WMI_VDEV_PARAM_TXBF, |
| 4414 | |
| 4415 | /* Set packet power save */ |
| 4416 | WMI_VDEV_PARAM_PACKET_POWERSAVE, |
| 4417 | |
| 4418 | /* |
| 4419 | * Drops un-encrypted packets if eceived in an encrypted connection |
| 4420 | * otherwise forwards to host. |
| 4421 | */ |
| 4422 | WMI_VDEV_PARAM_DROP_UNENCRY, |
| 4423 | |
| 4424 | /* |
| 4425 | * Set the encapsulation type for frames. |
| 4426 | */ |
| 4427 | WMI_VDEV_PARAM_TX_ENCAP_TYPE, |
| 4428 | }; |
| 4429 | |
Bartosz Markowski | 6d1506e | 2013-09-26 17:47:15 +0200 | [diff] [blame] | 4430 | /* the definition of different VDEV parameters */ |
| 4431 | enum wmi_10x_vdev_param { |
| 4432 | /* RTS Threshold */ |
| 4433 | WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 4434 | /* Fragmentation threshold */ |
| 4435 | WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 4436 | /* beacon interval in TUs */ |
| 4437 | WMI_10X_VDEV_PARAM_BEACON_INTERVAL, |
| 4438 | /* Listen interval in TUs */ |
| 4439 | WMI_10X_VDEV_PARAM_LISTEN_INTERVAL, |
| 4440 | /* muticast rate in Mbps */ |
| 4441 | WMI_10X_VDEV_PARAM_MULTICAST_RATE, |
| 4442 | /* management frame rate in Mbps */ |
| 4443 | WMI_10X_VDEV_PARAM_MGMT_TX_RATE, |
| 4444 | /* slot time (long vs short) */ |
| 4445 | WMI_10X_VDEV_PARAM_SLOT_TIME, |
| 4446 | /* preamble (long vs short) */ |
| 4447 | WMI_10X_VDEV_PARAM_PREAMBLE, |
| 4448 | /* SWBA time (time before tbtt in msec) */ |
| 4449 | WMI_10X_VDEV_PARAM_SWBA_TIME, |
| 4450 | /* time period for updating VDEV stats */ |
| 4451 | WMI_10X_VDEV_STATS_UPDATE_PERIOD, |
| 4452 | /* age out time in msec for frames queued for station in power save */ |
| 4453 | WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME, |
| 4454 | /* |
| 4455 | * Host SWBA interval (time in msec before tbtt for SWBA event |
| 4456 | * generation). |
| 4457 | */ |
| 4458 | WMI_10X_VDEV_HOST_SWBA_INTERVAL, |
| 4459 | /* DTIM period (specified in units of num beacon intervals) */ |
| 4460 | WMI_10X_VDEV_PARAM_DTIM_PERIOD, |
| 4461 | /* |
| 4462 | * scheduler air time limit for this VDEV. used by off chan |
| 4463 | * scheduler. |
| 4464 | */ |
| 4465 | WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 4466 | /* enable/dsiable WDS for this VDEV */ |
| 4467 | WMI_10X_VDEV_PARAM_WDS, |
| 4468 | /* ATIM Window */ |
| 4469 | WMI_10X_VDEV_PARAM_ATIM_WINDOW, |
| 4470 | /* BMISS max */ |
| 4471 | WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX, |
| 4472 | /* WMM enables/disabled */ |
| 4473 | WMI_10X_VDEV_PARAM_FEATURE_WMM, |
| 4474 | /* Channel width */ |
| 4475 | WMI_10X_VDEV_PARAM_CHWIDTH, |
| 4476 | /* Channel Offset */ |
| 4477 | WMI_10X_VDEV_PARAM_CHEXTOFFSET, |
| 4478 | /* Disable HT Protection */ |
| 4479 | WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 4480 | /* Quick STA Kickout */ |
| 4481 | WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT, |
| 4482 | /* Rate to be used with Management frames */ |
| 4483 | WMI_10X_VDEV_PARAM_MGMT_RATE, |
| 4484 | /* Protection Mode */ |
| 4485 | WMI_10X_VDEV_PARAM_PROTECTION_MODE, |
| 4486 | /* Fixed rate setting */ |
| 4487 | WMI_10X_VDEV_PARAM_FIXED_RATE, |
| 4488 | /* Short GI Enable/Disable */ |
| 4489 | WMI_10X_VDEV_PARAM_SGI, |
| 4490 | /* Enable LDPC */ |
| 4491 | WMI_10X_VDEV_PARAM_LDPC, |
| 4492 | /* Enable Tx STBC */ |
| 4493 | WMI_10X_VDEV_PARAM_TX_STBC, |
| 4494 | /* Enable Rx STBC */ |
| 4495 | WMI_10X_VDEV_PARAM_RX_STBC, |
| 4496 | /* Intra BSS forwarding */ |
| 4497 | WMI_10X_VDEV_PARAM_INTRA_BSS_FWD, |
| 4498 | /* Setting Default xmit key for Vdev */ |
| 4499 | WMI_10X_VDEV_PARAM_DEF_KEYID, |
| 4500 | /* NSS width */ |
| 4501 | WMI_10X_VDEV_PARAM_NSS, |
| 4502 | /* Set the custom rate for the broadcast data frames */ |
| 4503 | WMI_10X_VDEV_PARAM_BCAST_DATA_RATE, |
| 4504 | /* Set the custom rate (rate-code) for multicast data frames */ |
| 4505 | WMI_10X_VDEV_PARAM_MCAST_DATA_RATE, |
| 4506 | /* Tx multicast packet indicate Enable/Disable */ |
| 4507 | WMI_10X_VDEV_PARAM_MCAST_INDICATE, |
| 4508 | /* Tx DHCP packet indicate Enable/Disable */ |
| 4509 | WMI_10X_VDEV_PARAM_DHCP_INDICATE, |
| 4510 | /* Enable host inspection of Tx unicast packet to unknown destination */ |
| 4511 | WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 4512 | |
| 4513 | /* The minimum amount of time AP begins to consider STA inactive */ |
| 4514 | WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 4515 | |
| 4516 | /* |
| 4517 | * An associated STA is considered inactive when there is no recent |
| 4518 | * TX/RX activity and no downlink frames are buffered for it. Once a |
| 4519 | * STA exceeds the maximum idle inactive time, the AP will send an |
| 4520 | * 802.11 data-null as a keep alive to verify the STA is still |
| 4521 | * associated. If the STA does ACK the data-null, or if the data-null |
| 4522 | * is buffered and the STA does not retrieve it, the STA will be |
| 4523 | * considered unresponsive |
| 4524 | * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). |
| 4525 | */ |
| 4526 | WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 4527 | |
| 4528 | /* |
| 4529 | * An associated STA is considered unresponsive if there is no recent |
| 4530 | * TX/RX activity and downlink frames are buffered for it. Once a STA |
| 4531 | * exceeds the maximum unresponsive time, the AP will send a |
| 4532 | * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */ |
| 4533 | WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 4534 | |
| 4535 | /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */ |
| 4536 | WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 4537 | |
| 4538 | WMI_10X_VDEV_PARAM_MCAST2UCAST_SET, |
| 4539 | /* Enable/Disable RTS-CTS */ |
| 4540 | WMI_10X_VDEV_PARAM_ENABLE_RTSCTS, |
| 4541 | |
| 4542 | WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 4543 | |
| 4544 | /* following are available as of firmware 10.2 */ |
| 4545 | WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE, |
| 4546 | WMI_10X_VDEV_PARAM_CABQ_MAXDUR, |
| 4547 | WMI_10X_VDEV_PARAM_MFPTEST_SET, |
| 4548 | WMI_10X_VDEV_PARAM_RTS_FIXED_RATE, |
| 4549 | WMI_10X_VDEV_PARAM_VHT_SGIMASK, |
| 4550 | WMI_10X_VDEV_PARAM_VHT80_RATEMASK, |
Bartosz Markowski | 6d1506e | 2013-09-26 17:47:15 +0200 | [diff] [blame] | 4551 | }; |
| 4552 | |
Raja Mani | 93841a1 | 2015-06-22 20:10:13 +0530 | [diff] [blame] | 4553 | enum wmi_10_4_vdev_param { |
| 4554 | WMI_10_4_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 4555 | WMI_10_4_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 4556 | WMI_10_4_VDEV_PARAM_BEACON_INTERVAL, |
| 4557 | WMI_10_4_VDEV_PARAM_LISTEN_INTERVAL, |
| 4558 | WMI_10_4_VDEV_PARAM_MULTICAST_RATE, |
| 4559 | WMI_10_4_VDEV_PARAM_MGMT_TX_RATE, |
| 4560 | WMI_10_4_VDEV_PARAM_SLOT_TIME, |
| 4561 | WMI_10_4_VDEV_PARAM_PREAMBLE, |
| 4562 | WMI_10_4_VDEV_PARAM_SWBA_TIME, |
| 4563 | WMI_10_4_VDEV_STATS_UPDATE_PERIOD, |
| 4564 | WMI_10_4_VDEV_PWRSAVE_AGEOUT_TIME, |
| 4565 | WMI_10_4_VDEV_HOST_SWBA_INTERVAL, |
| 4566 | WMI_10_4_VDEV_PARAM_DTIM_PERIOD, |
| 4567 | WMI_10_4_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 4568 | WMI_10_4_VDEV_PARAM_WDS, |
| 4569 | WMI_10_4_VDEV_PARAM_ATIM_WINDOW, |
| 4570 | WMI_10_4_VDEV_PARAM_BMISS_COUNT_MAX, |
| 4571 | WMI_10_4_VDEV_PARAM_BMISS_FIRST_BCNT, |
| 4572 | WMI_10_4_VDEV_PARAM_BMISS_FINAL_BCNT, |
| 4573 | WMI_10_4_VDEV_PARAM_FEATURE_WMM, |
| 4574 | WMI_10_4_VDEV_PARAM_CHWIDTH, |
| 4575 | WMI_10_4_VDEV_PARAM_CHEXTOFFSET, |
| 4576 | WMI_10_4_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 4577 | WMI_10_4_VDEV_PARAM_STA_QUICKKICKOUT, |
| 4578 | WMI_10_4_VDEV_PARAM_MGMT_RATE, |
| 4579 | WMI_10_4_VDEV_PARAM_PROTECTION_MODE, |
| 4580 | WMI_10_4_VDEV_PARAM_FIXED_RATE, |
| 4581 | WMI_10_4_VDEV_PARAM_SGI, |
| 4582 | WMI_10_4_VDEV_PARAM_LDPC, |
| 4583 | WMI_10_4_VDEV_PARAM_TX_STBC, |
| 4584 | WMI_10_4_VDEV_PARAM_RX_STBC, |
| 4585 | WMI_10_4_VDEV_PARAM_INTRA_BSS_FWD, |
| 4586 | WMI_10_4_VDEV_PARAM_DEF_KEYID, |
| 4587 | WMI_10_4_VDEV_PARAM_NSS, |
| 4588 | WMI_10_4_VDEV_PARAM_BCAST_DATA_RATE, |
| 4589 | WMI_10_4_VDEV_PARAM_MCAST_DATA_RATE, |
| 4590 | WMI_10_4_VDEV_PARAM_MCAST_INDICATE, |
| 4591 | WMI_10_4_VDEV_PARAM_DHCP_INDICATE, |
| 4592 | WMI_10_4_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 4593 | WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 4594 | WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 4595 | WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 4596 | WMI_10_4_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 4597 | WMI_10_4_VDEV_PARAM_MCAST2UCAST_SET, |
| 4598 | WMI_10_4_VDEV_PARAM_ENABLE_RTSCTS, |
| 4599 | WMI_10_4_VDEV_PARAM_RC_NUM_RETRIES, |
| 4600 | WMI_10_4_VDEV_PARAM_TXBF, |
| 4601 | WMI_10_4_VDEV_PARAM_PACKET_POWERSAVE, |
| 4602 | WMI_10_4_VDEV_PARAM_DROP_UNENCRY, |
| 4603 | WMI_10_4_VDEV_PARAM_TX_ENCAP_TYPE, |
| 4604 | WMI_10_4_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| 4605 | WMI_10_4_VDEV_PARAM_CABQ_MAXDUR, |
| 4606 | WMI_10_4_VDEV_PARAM_MFPTEST_SET, |
| 4607 | WMI_10_4_VDEV_PARAM_RTS_FIXED_RATE, |
| 4608 | WMI_10_4_VDEV_PARAM_VHT_SGIMASK, |
| 4609 | WMI_10_4_VDEV_PARAM_VHT80_RATEMASK, |
| 4610 | WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, |
| 4611 | WMI_10_4_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, |
| 4612 | WMI_10_4_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, |
| 4613 | WMI_10_4_VDEV_PARAM_EARLY_RX_SLOP_STEP, |
| 4614 | WMI_10_4_VDEV_PARAM_EARLY_RX_INIT_SLOP, |
| 4615 | WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, |
| 4616 | WMI_10_4_VDEV_PARAM_PROXY_STA, |
| 4617 | WMI_10_4_VDEV_PARAM_MERU_VC, |
| 4618 | WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE, |
| 4619 | WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK, |
| 4620 | }; |
| 4621 | |
Michal Kazior | 139e170 | 2015-02-15 16:50:42 +0200 | [diff] [blame] | 4622 | #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0) |
| 4623 | #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1) |
| 4624 | #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2) |
| 4625 | #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3) |
| 4626 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4627 | /* slot time long */ |
| 4628 | #define WMI_VDEV_SLOT_TIME_LONG 0x1 |
| 4629 | /* slot time short */ |
| 4630 | #define WMI_VDEV_SLOT_TIME_SHORT 0x2 |
| 4631 | /* preablbe long */ |
| 4632 | #define WMI_VDEV_PREAMBLE_LONG 0x1 |
| 4633 | /* preablbe short */ |
| 4634 | #define WMI_VDEV_PREAMBLE_SHORT 0x2 |
| 4635 | |
| 4636 | enum wmi_start_event_param { |
| 4637 | WMI_VDEV_RESP_START_EVENT = 0, |
| 4638 | WMI_VDEV_RESP_RESTART_EVENT, |
| 4639 | }; |
| 4640 | |
| 4641 | struct wmi_vdev_start_response_event { |
| 4642 | __le32 vdev_id; |
| 4643 | __le32 req_id; |
| 4644 | __le32 resp_type; /* %WMI_VDEV_RESP_ */ |
| 4645 | __le32 status; |
| 4646 | } __packed; |
| 4647 | |
| 4648 | struct wmi_vdev_standby_req_event { |
| 4649 | /* unique id identifying the VDEV, generated by the caller */ |
| 4650 | __le32 vdev_id; |
| 4651 | } __packed; |
| 4652 | |
| 4653 | struct wmi_vdev_resume_req_event { |
| 4654 | /* unique id identifying the VDEV, generated by the caller */ |
| 4655 | __le32 vdev_id; |
| 4656 | } __packed; |
| 4657 | |
| 4658 | struct wmi_vdev_stopped_event { |
| 4659 | /* unique id identifying the VDEV, generated by the caller */ |
| 4660 | __le32 vdev_id; |
| 4661 | } __packed; |
| 4662 | |
| 4663 | /* |
| 4664 | * common structure used for simple events |
| 4665 | * (stopped, resume_req, standby response) |
| 4666 | */ |
| 4667 | struct wmi_vdev_simple_event { |
| 4668 | /* unique id identifying the VDEV, generated by the caller */ |
| 4669 | __le32 vdev_id; |
| 4670 | } __packed; |
| 4671 | |
| 4672 | /* VDEV start response status codes */ |
| 4673 | /* VDEV succesfully started */ |
| 4674 | #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 |
| 4675 | |
| 4676 | /* requested VDEV not found */ |
| 4677 | #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 |
| 4678 | |
| 4679 | /* unsupported VDEV combination */ |
| 4680 | #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 |
| 4681 | |
Simon Wunderlich | 855aed1 | 2014-08-02 09:12:54 +0300 | [diff] [blame] | 4682 | /* TODO: please add more comments if you have in-depth information */ |
| 4683 | struct wmi_vdev_spectral_conf_cmd { |
| 4684 | __le32 vdev_id; |
| 4685 | |
| 4686 | /* number of fft samples to send (0 for infinite) */ |
| 4687 | __le32 scan_count; |
| 4688 | __le32 scan_period; |
| 4689 | __le32 scan_priority; |
| 4690 | |
| 4691 | /* number of bins in the FFT: 2^(fft_size - bin_scale) */ |
| 4692 | __le32 scan_fft_size; |
| 4693 | __le32 scan_gc_ena; |
| 4694 | __le32 scan_restart_ena; |
| 4695 | __le32 scan_noise_floor_ref; |
| 4696 | __le32 scan_init_delay; |
| 4697 | __le32 scan_nb_tone_thr; |
| 4698 | __le32 scan_str_bin_thr; |
| 4699 | __le32 scan_wb_rpt_mode; |
| 4700 | __le32 scan_rssi_rpt_mode; |
| 4701 | __le32 scan_rssi_thr; |
| 4702 | __le32 scan_pwr_format; |
| 4703 | |
| 4704 | /* rpt_mode: Format of FFT report to software for spectral scan |
| 4705 | * triggered FFTs: |
| 4706 | * 0: No FFT report (only spectral scan summary report) |
| 4707 | * 1: 2-dword summary of metrics for each completed FFT + spectral |
| 4708 | * scan summary report |
| 4709 | * 2: 2-dword summary of metrics for each completed FFT + |
| 4710 | * 1x- oversampled bins(in-band) per FFT + spectral scan summary |
| 4711 | * report |
| 4712 | * 3: 2-dword summary of metrics for each completed FFT + |
| 4713 | * 2x- oversampled bins (all) per FFT + spectral scan summary |
| 4714 | */ |
| 4715 | __le32 scan_rpt_mode; |
| 4716 | __le32 scan_bin_scale; |
| 4717 | __le32 scan_dbm_adj; |
| 4718 | __le32 scan_chn_mask; |
| 4719 | } __packed; |
| 4720 | |
| 4721 | struct wmi_vdev_spectral_conf_arg { |
| 4722 | u32 vdev_id; |
| 4723 | u32 scan_count; |
| 4724 | u32 scan_period; |
| 4725 | u32 scan_priority; |
| 4726 | u32 scan_fft_size; |
| 4727 | u32 scan_gc_ena; |
| 4728 | u32 scan_restart_ena; |
| 4729 | u32 scan_noise_floor_ref; |
| 4730 | u32 scan_init_delay; |
| 4731 | u32 scan_nb_tone_thr; |
| 4732 | u32 scan_str_bin_thr; |
| 4733 | u32 scan_wb_rpt_mode; |
| 4734 | u32 scan_rssi_rpt_mode; |
| 4735 | u32 scan_rssi_thr; |
| 4736 | u32 scan_pwr_format; |
| 4737 | u32 scan_rpt_mode; |
| 4738 | u32 scan_bin_scale; |
| 4739 | u32 scan_dbm_adj; |
| 4740 | u32 scan_chn_mask; |
| 4741 | }; |
| 4742 | |
| 4743 | #define WMI_SPECTRAL_ENABLE_DEFAULT 0 |
| 4744 | #define WMI_SPECTRAL_COUNT_DEFAULT 0 |
| 4745 | #define WMI_SPECTRAL_PERIOD_DEFAULT 35 |
| 4746 | #define WMI_SPECTRAL_PRIORITY_DEFAULT 1 |
| 4747 | #define WMI_SPECTRAL_FFT_SIZE_DEFAULT 7 |
| 4748 | #define WMI_SPECTRAL_GC_ENA_DEFAULT 1 |
| 4749 | #define WMI_SPECTRAL_RESTART_ENA_DEFAULT 0 |
| 4750 | #define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT -96 |
| 4751 | #define WMI_SPECTRAL_INIT_DELAY_DEFAULT 80 |
| 4752 | #define WMI_SPECTRAL_NB_TONE_THR_DEFAULT 12 |
| 4753 | #define WMI_SPECTRAL_STR_BIN_THR_DEFAULT 8 |
| 4754 | #define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT 0 |
| 4755 | #define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT 0 |
| 4756 | #define WMI_SPECTRAL_RSSI_THR_DEFAULT 0xf0 |
| 4757 | #define WMI_SPECTRAL_PWR_FORMAT_DEFAULT 0 |
| 4758 | #define WMI_SPECTRAL_RPT_MODE_DEFAULT 2 |
| 4759 | #define WMI_SPECTRAL_BIN_SCALE_DEFAULT 1 |
| 4760 | #define WMI_SPECTRAL_DBM_ADJ_DEFAULT 1 |
| 4761 | #define WMI_SPECTRAL_CHN_MASK_DEFAULT 1 |
| 4762 | |
| 4763 | struct wmi_vdev_spectral_enable_cmd { |
| 4764 | __le32 vdev_id; |
| 4765 | __le32 trigger_cmd; |
| 4766 | __le32 enable_cmd; |
| 4767 | } __packed; |
| 4768 | |
| 4769 | #define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER 1 |
| 4770 | #define WMI_SPECTRAL_TRIGGER_CMD_CLEAR 2 |
| 4771 | #define WMI_SPECTRAL_ENABLE_CMD_ENABLE 1 |
| 4772 | #define WMI_SPECTRAL_ENABLE_CMD_DISABLE 2 |
| 4773 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4774 | /* Beacon processing related command and event structures */ |
| 4775 | struct wmi_bcn_tx_hdr { |
| 4776 | __le32 vdev_id; |
| 4777 | __le32 tx_rate; |
| 4778 | __le32 tx_power; |
| 4779 | __le32 bcn_len; |
| 4780 | } __packed; |
| 4781 | |
| 4782 | struct wmi_bcn_tx_cmd { |
| 4783 | struct wmi_bcn_tx_hdr hdr; |
| 4784 | u8 *bcn[0]; |
| 4785 | } __packed; |
| 4786 | |
| 4787 | struct wmi_bcn_tx_arg { |
| 4788 | u32 vdev_id; |
| 4789 | u32 tx_rate; |
| 4790 | u32 tx_power; |
| 4791 | u32 bcn_len; |
| 4792 | const void *bcn; |
| 4793 | }; |
| 4794 | |
Michal Kazior | 748afc4 | 2014-01-23 12:48:21 +0100 | [diff] [blame] | 4795 | enum wmi_bcn_tx_ref_flags { |
| 4796 | WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1, |
| 4797 | WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2, |
| 4798 | }; |
| 4799 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 4800 | /* TODO: It is unclear why "no antenna" works while any other seemingly valid |
| 4801 | * chainmask yields no beacons on the air at all. |
| 4802 | */ |
| 4803 | #define WMI_BCN_TX_REF_DEF_ANTENNA 0 |
| 4804 | |
Michal Kazior | 748afc4 | 2014-01-23 12:48:21 +0100 | [diff] [blame] | 4805 | struct wmi_bcn_tx_ref_cmd { |
| 4806 | __le32 vdev_id; |
| 4807 | __le32 data_len; |
| 4808 | /* physical address of the frame - dma pointer */ |
| 4809 | __le32 data_ptr; |
| 4810 | /* id for host to track */ |
| 4811 | __le32 msdu_id; |
| 4812 | /* frame ctrl to setup PPDU desc */ |
| 4813 | __le32 frame_control; |
| 4814 | /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */ |
| 4815 | __le32 flags; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 4816 | /* introduced in 10.2 */ |
| 4817 | __le32 antenna_mask; |
Michal Kazior | 748afc4 | 2014-01-23 12:48:21 +0100 | [diff] [blame] | 4818 | } __packed; |
| 4819 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4820 | /* Beacon filter */ |
| 4821 | #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */ |
| 4822 | #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */ |
| 4823 | #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */ |
| 4824 | #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */ |
| 4825 | #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */ |
| 4826 | |
| 4827 | struct wmi_bcn_filter_rx_cmd { |
| 4828 | /* Filter ID */ |
| 4829 | __le32 bcn_filter_id; |
| 4830 | /* Filter type - wmi_bcn_filter */ |
| 4831 | __le32 bcn_filter; |
| 4832 | /* Buffer len */ |
| 4833 | __le32 bcn_filter_len; |
| 4834 | /* Filter info (threshold, BSSID, RSSI) */ |
| 4835 | u8 *bcn_filter_buf; |
| 4836 | } __packed; |
| 4837 | |
| 4838 | /* Capabilities and IEs to be passed to firmware */ |
| 4839 | struct wmi_bcn_prb_info { |
| 4840 | /* Capabilities */ |
| 4841 | __le32 caps; |
| 4842 | /* ERP info */ |
| 4843 | __le32 erp; |
| 4844 | /* Advanced capabilities */ |
| 4845 | /* HT capabilities */ |
| 4846 | /* HT Info */ |
| 4847 | /* ibss_dfs */ |
| 4848 | /* wpa Info */ |
| 4849 | /* rsn Info */ |
| 4850 | /* rrm info */ |
| 4851 | /* ath_ext */ |
| 4852 | /* app IE */ |
| 4853 | } __packed; |
| 4854 | |
| 4855 | struct wmi_bcn_tmpl_cmd { |
| 4856 | /* unique id identifying the VDEV, generated by the caller */ |
| 4857 | __le32 vdev_id; |
| 4858 | /* TIM IE offset from the beginning of the template. */ |
| 4859 | __le32 tim_ie_offset; |
| 4860 | /* beacon probe capabilities and IEs */ |
| 4861 | struct wmi_bcn_prb_info bcn_prb_info; |
| 4862 | /* beacon buffer length */ |
| 4863 | __le32 buf_len; |
| 4864 | /* variable length data */ |
| 4865 | u8 data[1]; |
| 4866 | } __packed; |
| 4867 | |
| 4868 | struct wmi_prb_tmpl_cmd { |
| 4869 | /* unique id identifying the VDEV, generated by the caller */ |
| 4870 | __le32 vdev_id; |
| 4871 | /* beacon probe capabilities and IEs */ |
| 4872 | struct wmi_bcn_prb_info bcn_prb_info; |
| 4873 | /* beacon buffer length */ |
| 4874 | __le32 buf_len; |
| 4875 | /* Variable length data */ |
| 4876 | u8 data[1]; |
| 4877 | } __packed; |
| 4878 | |
| 4879 | enum wmi_sta_ps_mode { |
| 4880 | /* enable power save for the given STA VDEV */ |
| 4881 | WMI_STA_PS_MODE_DISABLED = 0, |
| 4882 | /* disable power save for a given STA VDEV */ |
| 4883 | WMI_STA_PS_MODE_ENABLED = 1, |
| 4884 | }; |
| 4885 | |
| 4886 | struct wmi_sta_powersave_mode_cmd { |
| 4887 | /* unique id identifying the VDEV, generated by the caller */ |
| 4888 | __le32 vdev_id; |
| 4889 | |
| 4890 | /* |
| 4891 | * Power save mode |
| 4892 | * (see enum wmi_sta_ps_mode) |
| 4893 | */ |
| 4894 | __le32 sta_ps_mode; |
| 4895 | } __packed; |
| 4896 | |
| 4897 | enum wmi_csa_offload_en { |
| 4898 | WMI_CSA_OFFLOAD_DISABLE = 0, |
| 4899 | WMI_CSA_OFFLOAD_ENABLE = 1, |
| 4900 | }; |
| 4901 | |
| 4902 | struct wmi_csa_offload_enable_cmd { |
| 4903 | __le32 vdev_id; |
| 4904 | __le32 csa_offload_enable; |
| 4905 | } __packed; |
| 4906 | |
| 4907 | struct wmi_csa_offload_chanswitch_cmd { |
| 4908 | __le32 vdev_id; |
| 4909 | struct wmi_channel chan; |
| 4910 | } __packed; |
| 4911 | |
| 4912 | /* |
| 4913 | * This parameter controls the policy for retrieving frames from AP while the |
| 4914 | * STA is in sleep state. |
| 4915 | * |
| 4916 | * Only takes affect if the sta_ps_mode is enabled |
| 4917 | */ |
| 4918 | enum wmi_sta_ps_param_rx_wake_policy { |
| 4919 | /* |
| 4920 | * Wake up when ever there is an RX activity on the VDEV. In this mode |
| 4921 | * the Power save SM(state machine) will come out of sleep by either |
| 4922 | * sending null frame (or) a data frame (with PS==0) in response to TIM |
| 4923 | * bit set in the received beacon frame from AP. |
| 4924 | */ |
| 4925 | WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0, |
| 4926 | |
| 4927 | /* |
| 4928 | * Here the power save state machine will not wakeup in response to TIM |
| 4929 | * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD |
| 4930 | * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all |
| 4931 | * access categories are delivery-enabled, the station will send a |
| 4932 | * UAPSD trigger frame, otherwise it will send a PS-Poll. |
| 4933 | */ |
| 4934 | WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, |
| 4935 | }; |
| 4936 | |
| 4937 | /* |
| 4938 | * Number of tx frames/beacon that cause the power save SM to wake up. |
| 4939 | * |
| 4940 | * Value 1 causes the SM to wake up for every TX. Value 0 has a special |
| 4941 | * meaning, It will cause the SM to never wake up. This is useful if you want |
| 4942 | * to keep the system to sleep all the time for some kind of test mode . host |
| 4943 | * can change this parameter any time. It will affect at the next tx frame. |
| 4944 | */ |
| 4945 | enum wmi_sta_ps_param_tx_wake_threshold { |
| 4946 | WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, |
| 4947 | WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, |
| 4948 | |
| 4949 | /* |
| 4950 | * Values greater than one indicate that many TX attempts per beacon |
| 4951 | * interval before the STA will wake up |
| 4952 | */ |
| 4953 | }; |
| 4954 | |
| 4955 | /* |
| 4956 | * The maximum number of PS-Poll frames the FW will send in response to |
| 4957 | * traffic advertised in TIM before waking up (by sending a null frame with PS |
| 4958 | * = 0). Value 0 has a special meaning: there is no maximum count and the FW |
| 4959 | * will send as many PS-Poll as are necessary to retrieve buffered BU. This |
| 4960 | * parameter is used when the RX wake policy is |
| 4961 | * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake |
| 4962 | * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE. |
| 4963 | */ |
| 4964 | enum wmi_sta_ps_param_pspoll_count { |
| 4965 | WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0, |
| 4966 | /* |
| 4967 | * Values greater than 0 indicate the maximum numer of PS-Poll frames |
| 4968 | * FW will send before waking up. |
| 4969 | */ |
Michal Kazior | 9f9b574 | 2014-12-12 12:41:36 +0100 | [diff] [blame] | 4970 | |
| 4971 | /* When u-APSD is enabled the firmware will be very reluctant to exit |
| 4972 | * STA PS. This could result in very poor Rx performance with STA doing |
| 4973 | * PS-Poll for each and every buffered frame. This value is a bit |
| 4974 | * arbitrary. |
| 4975 | */ |
| 4976 | WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3, |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 4977 | }; |
| 4978 | |
| 4979 | /* |
| 4980 | * This will include the delivery and trigger enabled state for every AC. |
| 4981 | * This is the negotiated state with AP. The host MLME needs to set this based |
| 4982 | * on AP capability and the state Set in the association request by the |
| 4983 | * station MLME.Lower 8 bits of the value specify the UAPSD configuration. |
| 4984 | */ |
| 4985 | #define WMI_UAPSD_AC_TYPE_DELI 0 |
| 4986 | #define WMI_UAPSD_AC_TYPE_TRIG 1 |
| 4987 | |
| 4988 | #define WMI_UAPSD_AC_BIT_MASK(ac, type) \ |
| 4989 | ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1))) |
| 4990 | |
| 4991 | enum wmi_sta_ps_param_uapsd { |
| 4992 | WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 4993 | WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 4994 | WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 4995 | WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 4996 | WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 4997 | WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 4998 | WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 4999 | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 5000 | }; |
| 5001 | |
Janusz Dziedzic | 0c7e477 | 2015-01-24 12:14:52 +0200 | [diff] [blame] | 5002 | #define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX |
| 5003 | |
| 5004 | struct wmi_sta_uapsd_auto_trig_param { |
| 5005 | __le32 wmm_ac; |
| 5006 | __le32 user_priority; |
| 5007 | __le32 service_interval; |
| 5008 | __le32 suspend_interval; |
| 5009 | __le32 delay_interval; |
| 5010 | }; |
| 5011 | |
| 5012 | struct wmi_sta_uapsd_auto_trig_cmd_fixed_param { |
| 5013 | __le32 vdev_id; |
| 5014 | struct wmi_mac_addr peer_macaddr; |
| 5015 | __le32 num_ac; |
| 5016 | }; |
| 5017 | |
| 5018 | struct wmi_sta_uapsd_auto_trig_arg { |
| 5019 | u32 wmm_ac; |
| 5020 | u32 user_priority; |
| 5021 | u32 service_interval; |
| 5022 | u32 suspend_interval; |
| 5023 | u32 delay_interval; |
| 5024 | }; |
| 5025 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5026 | enum wmi_sta_powersave_param { |
| 5027 | /* |
| 5028 | * Controls how frames are retrievd from AP while STA is sleeping |
| 5029 | * |
| 5030 | * (see enum wmi_sta_ps_param_rx_wake_policy) |
| 5031 | */ |
| 5032 | WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0, |
| 5033 | |
| 5034 | /* |
| 5035 | * The STA will go active after this many TX |
| 5036 | * |
| 5037 | * (see enum wmi_sta_ps_param_tx_wake_threshold) |
| 5038 | */ |
| 5039 | WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, |
| 5040 | |
| 5041 | /* |
| 5042 | * Number of PS-Poll to send before STA wakes up |
| 5043 | * |
| 5044 | * (see enum wmi_sta_ps_param_pspoll_count) |
| 5045 | * |
| 5046 | */ |
| 5047 | WMI_STA_PS_PARAM_PSPOLL_COUNT = 2, |
| 5048 | |
| 5049 | /* |
| 5050 | * TX/RX inactivity time in msec before going to sleep. |
| 5051 | * |
| 5052 | * The power save SM will monitor tx/rx activity on the VDEV, if no |
| 5053 | * activity for the specified msec of the parameter the Power save |
| 5054 | * SM will go to sleep. |
| 5055 | */ |
| 5056 | WMI_STA_PS_PARAM_INACTIVITY_TIME = 3, |
| 5057 | |
| 5058 | /* |
| 5059 | * Set uapsd configuration. |
| 5060 | * |
| 5061 | * (see enum wmi_sta_ps_param_uapsd) |
| 5062 | */ |
| 5063 | WMI_STA_PS_PARAM_UAPSD = 4, |
| 5064 | }; |
| 5065 | |
| 5066 | struct wmi_sta_powersave_param_cmd { |
| 5067 | __le32 vdev_id; |
| 5068 | __le32 param_id; /* %WMI_STA_PS_PARAM_ */ |
| 5069 | __le32 param_value; |
| 5070 | } __packed; |
| 5071 | |
| 5072 | /* No MIMO power save */ |
| 5073 | #define WMI_STA_MIMO_PS_MODE_DISABLE |
| 5074 | /* mimo powersave mode static*/ |
| 5075 | #define WMI_STA_MIMO_PS_MODE_STATIC |
| 5076 | /* mimo powersave mode dynamic */ |
| 5077 | #define WMI_STA_MIMO_PS_MODE_DYNAMIC |
| 5078 | |
| 5079 | struct wmi_sta_mimo_ps_mode_cmd { |
| 5080 | /* unique id identifying the VDEV, generated by the caller */ |
| 5081 | __le32 vdev_id; |
| 5082 | /* mimo powersave mode as defined above */ |
| 5083 | __le32 mimo_pwrsave_mode; |
| 5084 | } __packed; |
| 5085 | |
| 5086 | /* U-APSD configuration of peer station from (re)assoc request and TSPECs */ |
| 5087 | enum wmi_ap_ps_param_uapsd { |
| 5088 | WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 5089 | WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 5090 | WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 5091 | WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 5092 | WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 5093 | WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 5094 | WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 5095 | WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 5096 | }; |
| 5097 | |
| 5098 | /* U-APSD maximum service period of peer station */ |
| 5099 | enum wmi_ap_ps_peer_param_max_sp { |
| 5100 | WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, |
| 5101 | WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1, |
| 5102 | WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2, |
| 5103 | WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3, |
| 5104 | MAX_WMI_AP_PS_PEER_PARAM_MAX_SP, |
| 5105 | }; |
| 5106 | |
| 5107 | /* |
| 5108 | * AP power save parameter |
| 5109 | * Set a power save specific parameter for a peer station |
| 5110 | */ |
| 5111 | enum wmi_ap_ps_peer_param { |
| 5112 | /* Set uapsd configuration for a given peer. |
| 5113 | * |
| 5114 | * Include the delivery and trigger enabled state for every AC. |
| 5115 | * The host MLME needs to set this based on AP capability and stations |
| 5116 | * request Set in the association request received from the station. |
| 5117 | * |
| 5118 | * Lower 8 bits of the value specify the UAPSD configuration. |
| 5119 | * |
| 5120 | * (see enum wmi_ap_ps_param_uapsd) |
| 5121 | * The default value is 0. |
| 5122 | */ |
| 5123 | WMI_AP_PS_PEER_PARAM_UAPSD = 0, |
| 5124 | |
| 5125 | /* |
| 5126 | * Set the service period for a UAPSD capable station |
| 5127 | * |
| 5128 | * The service period from wme ie in the (re)assoc request frame. |
| 5129 | * |
| 5130 | * (see enum wmi_ap_ps_peer_param_max_sp) |
| 5131 | */ |
| 5132 | WMI_AP_PS_PEER_PARAM_MAX_SP = 1, |
| 5133 | |
| 5134 | /* Time in seconds for aging out buffered frames for STA in PS */ |
| 5135 | WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, |
| 5136 | }; |
| 5137 | |
| 5138 | struct wmi_ap_ps_peer_cmd { |
| 5139 | /* unique id identifying the VDEV, generated by the caller */ |
| 5140 | __le32 vdev_id; |
| 5141 | |
| 5142 | /* peer MAC address */ |
| 5143 | struct wmi_mac_addr peer_macaddr; |
| 5144 | |
| 5145 | /* AP powersave param (see enum wmi_ap_ps_peer_param) */ |
| 5146 | __le32 param_id; |
| 5147 | |
| 5148 | /* AP powersave param value */ |
| 5149 | __le32 param_value; |
| 5150 | } __packed; |
| 5151 | |
| 5152 | /* 128 clients = 4 words */ |
| 5153 | #define WMI_TIM_BITMAP_ARRAY_SIZE 4 |
| 5154 | |
| 5155 | struct wmi_tim_info { |
| 5156 | __le32 tim_len; |
| 5157 | __le32 tim_mcast; |
| 5158 | __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE]; |
| 5159 | __le32 tim_changed; |
| 5160 | __le32 tim_num_ps_pending; |
| 5161 | } __packed; |
| 5162 | |
Raja Mani | a03fee3 | 2015-06-22 20:22:20 +0530 | [diff] [blame^] | 5163 | struct wmi_tim_info_arg { |
| 5164 | __le32 tim_len; |
| 5165 | __le32 tim_mcast; |
| 5166 | const __le32 *tim_bitmap; |
| 5167 | __le32 tim_changed; |
| 5168 | __le32 tim_num_ps_pending; |
| 5169 | } __packed; |
| 5170 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5171 | /* Maximum number of NOA Descriptors supported */ |
| 5172 | #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 |
| 5173 | #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0) |
| 5174 | #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1 |
| 5175 | #define WMI_P2P_NOA_CHANGED_BIT BIT(0) |
| 5176 | |
| 5177 | struct wmi_p2p_noa_info { |
| 5178 | /* Bit 0 - Flag to indicate an update in NOA schedule |
| 5179 | Bits 7-1 - Reserved */ |
| 5180 | u8 changed; |
| 5181 | /* NOA index */ |
| 5182 | u8 index; |
| 5183 | /* Bit 0 - Opp PS state of the AP |
| 5184 | Bits 1-7 - Ctwindow in TUs */ |
| 5185 | u8 ctwindow_oppps; |
| 5186 | /* Number of NOA descriptors */ |
| 5187 | u8 num_descriptors; |
| 5188 | |
| 5189 | struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS]; |
| 5190 | } __packed; |
| 5191 | |
| 5192 | struct wmi_bcn_info { |
| 5193 | struct wmi_tim_info tim_info; |
| 5194 | struct wmi_p2p_noa_info p2p_noa_info; |
| 5195 | } __packed; |
| 5196 | |
| 5197 | struct wmi_host_swba_event { |
| 5198 | __le32 vdev_map; |
Michal Kazior | 32653cf | 2014-12-03 10:10:26 +0200 | [diff] [blame] | 5199 | struct wmi_bcn_info bcn_info[0]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5200 | } __packed; |
| 5201 | |
| 5202 | #define WMI_MAX_AP_VDEV 16 |
| 5203 | |
| 5204 | struct wmi_tbtt_offset_event { |
| 5205 | __le32 vdev_map; |
| 5206 | __le32 tbttoffset_list[WMI_MAX_AP_VDEV]; |
| 5207 | } __packed; |
| 5208 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5209 | struct wmi_peer_create_cmd { |
| 5210 | __le32 vdev_id; |
| 5211 | struct wmi_mac_addr peer_macaddr; |
| 5212 | } __packed; |
| 5213 | |
Marek Puzyniak | 7390ed3 | 2015-03-30 09:51:52 +0300 | [diff] [blame] | 5214 | enum wmi_peer_type { |
| 5215 | WMI_PEER_TYPE_DEFAULT = 0, |
| 5216 | WMI_PEER_TYPE_BSS = 1, |
| 5217 | WMI_PEER_TYPE_TDLS = 2, |
| 5218 | }; |
| 5219 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5220 | struct wmi_peer_delete_cmd { |
| 5221 | __le32 vdev_id; |
| 5222 | struct wmi_mac_addr peer_macaddr; |
| 5223 | } __packed; |
| 5224 | |
| 5225 | struct wmi_peer_flush_tids_cmd { |
| 5226 | __le32 vdev_id; |
| 5227 | struct wmi_mac_addr peer_macaddr; |
| 5228 | __le32 peer_tid_bitmap; |
| 5229 | } __packed; |
| 5230 | |
| 5231 | struct wmi_fixed_rate { |
| 5232 | /* |
| 5233 | * rate mode . 0: disable fixed rate (auto rate) |
| 5234 | * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps |
| 5235 | * 2: ht20 11n rate specified as mcs index |
| 5236 | * 3: ht40 11n rate specified as mcs index |
| 5237 | */ |
| 5238 | __le32 rate_mode; |
| 5239 | /* |
| 5240 | * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB) |
| 5241 | * and series 3 is stored at byte 3 (MSB) |
| 5242 | */ |
| 5243 | __le32 rate_series; |
| 5244 | /* |
| 5245 | * 4 retry counts for 4 rate series. retry count for rate 0 is stored |
| 5246 | * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3 |
| 5247 | * (MSB) |
| 5248 | */ |
| 5249 | __le32 rate_retries; |
| 5250 | } __packed; |
| 5251 | |
| 5252 | struct wmi_peer_fixed_rate_cmd { |
| 5253 | /* unique id identifying the VDEV, generated by the caller */ |
| 5254 | __le32 vdev_id; |
| 5255 | /* peer MAC address */ |
| 5256 | struct wmi_mac_addr peer_macaddr; |
| 5257 | /* fixed rate */ |
| 5258 | struct wmi_fixed_rate peer_fixed_rate; |
| 5259 | } __packed; |
| 5260 | |
| 5261 | #define WMI_MGMT_TID 17 |
| 5262 | |
| 5263 | struct wmi_addba_clear_resp_cmd { |
| 5264 | /* unique id identifying the VDEV, generated by the caller */ |
| 5265 | __le32 vdev_id; |
| 5266 | /* peer MAC address */ |
| 5267 | struct wmi_mac_addr peer_macaddr; |
| 5268 | } __packed; |
| 5269 | |
| 5270 | struct wmi_addba_send_cmd { |
| 5271 | /* unique id identifying the VDEV, generated by the caller */ |
| 5272 | __le32 vdev_id; |
| 5273 | /* peer MAC address */ |
| 5274 | struct wmi_mac_addr peer_macaddr; |
| 5275 | /* Tid number */ |
| 5276 | __le32 tid; |
| 5277 | /* Buffer/Window size*/ |
| 5278 | __le32 buffersize; |
| 5279 | } __packed; |
| 5280 | |
| 5281 | struct wmi_delba_send_cmd { |
| 5282 | /* unique id identifying the VDEV, generated by the caller */ |
| 5283 | __le32 vdev_id; |
| 5284 | /* peer MAC address */ |
| 5285 | struct wmi_mac_addr peer_macaddr; |
| 5286 | /* Tid number */ |
| 5287 | __le32 tid; |
| 5288 | /* Is Initiator */ |
| 5289 | __le32 initiator; |
| 5290 | /* Reason code */ |
| 5291 | __le32 reasoncode; |
| 5292 | } __packed; |
| 5293 | |
| 5294 | struct wmi_addba_setresponse_cmd { |
| 5295 | /* unique id identifying the vdev, generated by the caller */ |
| 5296 | __le32 vdev_id; |
| 5297 | /* peer mac address */ |
| 5298 | struct wmi_mac_addr peer_macaddr; |
| 5299 | /* Tid number */ |
| 5300 | __le32 tid; |
| 5301 | /* status code */ |
| 5302 | __le32 statuscode; |
| 5303 | } __packed; |
| 5304 | |
| 5305 | struct wmi_send_singleamsdu_cmd { |
| 5306 | /* unique id identifying the vdev, generated by the caller */ |
| 5307 | __le32 vdev_id; |
| 5308 | /* peer mac address */ |
| 5309 | struct wmi_mac_addr peer_macaddr; |
| 5310 | /* Tid number */ |
| 5311 | __le32 tid; |
| 5312 | } __packed; |
| 5313 | |
| 5314 | enum wmi_peer_smps_state { |
| 5315 | WMI_PEER_SMPS_PS_NONE = 0x0, |
| 5316 | WMI_PEER_SMPS_STATIC = 0x1, |
| 5317 | WMI_PEER_SMPS_DYNAMIC = 0x2 |
| 5318 | }; |
| 5319 | |
Michal Kazior | 9797feb | 2014-02-14 14:49:48 +0100 | [diff] [blame] | 5320 | enum wmi_peer_chwidth { |
| 5321 | WMI_PEER_CHWIDTH_20MHZ = 0, |
| 5322 | WMI_PEER_CHWIDTH_40MHZ = 1, |
| 5323 | WMI_PEER_CHWIDTH_80MHZ = 2, |
| 5324 | }; |
| 5325 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5326 | enum wmi_peer_param { |
| 5327 | WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */ |
| 5328 | WMI_PEER_AMPDU = 0x2, |
| 5329 | WMI_PEER_AUTHORIZE = 0x3, |
| 5330 | WMI_PEER_CHAN_WIDTH = 0x4, |
| 5331 | WMI_PEER_NSS = 0x5, |
Michal Kazior | 0a987fb | 2015-02-13 13:30:15 +0100 | [diff] [blame] | 5332 | WMI_PEER_USE_4ADDR = 0x6, |
| 5333 | WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5334 | }; |
| 5335 | |
| 5336 | struct wmi_peer_set_param_cmd { |
| 5337 | __le32 vdev_id; |
| 5338 | struct wmi_mac_addr peer_macaddr; |
| 5339 | __le32 param_id; |
| 5340 | __le32 param_value; |
| 5341 | } __packed; |
| 5342 | |
| 5343 | #define MAX_SUPPORTED_RATES 128 |
| 5344 | |
| 5345 | struct wmi_rate_set { |
| 5346 | /* total number of rates */ |
| 5347 | __le32 num_rates; |
| 5348 | /* |
| 5349 | * rates (each 8bit value) packed into a 32 bit word. |
| 5350 | * the rates are filled from least significant byte to most |
| 5351 | * significant byte. |
| 5352 | */ |
| 5353 | __le32 rates[(MAX_SUPPORTED_RATES/4)+1]; |
| 5354 | } __packed; |
| 5355 | |
| 5356 | struct wmi_rate_set_arg { |
| 5357 | unsigned int num_rates; |
| 5358 | u8 rates[MAX_SUPPORTED_RATES]; |
| 5359 | }; |
| 5360 | |
| 5361 | /* |
| 5362 | * NOTE: It would bea good idea to represent the Tx MCS |
| 5363 | * info in one word and Rx in another word. This is split |
| 5364 | * into multiple words for convenience |
| 5365 | */ |
| 5366 | struct wmi_vht_rate_set { |
| 5367 | __le32 rx_max_rate; /* Max Rx data rate */ |
| 5368 | __le32 rx_mcs_set; /* Negotiated RX VHT rates */ |
| 5369 | __le32 tx_max_rate; /* Max Tx data rate */ |
| 5370 | __le32 tx_mcs_set; /* Negotiated TX VHT rates */ |
| 5371 | } __packed; |
| 5372 | |
| 5373 | struct wmi_vht_rate_set_arg { |
| 5374 | u32 rx_max_rate; |
| 5375 | u32 rx_mcs_set; |
| 5376 | u32 tx_max_rate; |
| 5377 | u32 tx_mcs_set; |
| 5378 | }; |
| 5379 | |
| 5380 | struct wmi_peer_set_rates_cmd { |
| 5381 | /* peer MAC address */ |
| 5382 | struct wmi_mac_addr peer_macaddr; |
| 5383 | /* legacy rate set */ |
| 5384 | struct wmi_rate_set peer_legacy_rates; |
| 5385 | /* ht rate set */ |
| 5386 | struct wmi_rate_set peer_ht_rates; |
| 5387 | } __packed; |
| 5388 | |
| 5389 | struct wmi_peer_set_q_empty_callback_cmd { |
| 5390 | /* unique id identifying the VDEV, generated by the caller */ |
| 5391 | __le32 vdev_id; |
| 5392 | /* peer MAC address */ |
| 5393 | struct wmi_mac_addr peer_macaddr; |
| 5394 | __le32 callback_enable; |
| 5395 | } __packed; |
| 5396 | |
| 5397 | #define WMI_PEER_AUTH 0x00000001 |
| 5398 | #define WMI_PEER_QOS 0x00000002 |
| 5399 | #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 |
| 5400 | #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 |
| 5401 | #define WMI_PEER_APSD 0x00000800 |
| 5402 | #define WMI_PEER_HT 0x00001000 |
| 5403 | #define WMI_PEER_40MHZ 0x00002000 |
| 5404 | #define WMI_PEER_STBC 0x00008000 |
| 5405 | #define WMI_PEER_LDPC 0x00010000 |
| 5406 | #define WMI_PEER_DYN_MIMOPS 0x00020000 |
| 5407 | #define WMI_PEER_STATIC_MIMOPS 0x00040000 |
| 5408 | #define WMI_PEER_SPATIAL_MUX 0x00200000 |
| 5409 | #define WMI_PEER_VHT 0x02000000 |
| 5410 | #define WMI_PEER_80MHZ 0x04000000 |
Yanbo Li | d68bb12 | 2015-01-23 08:18:20 +0800 | [diff] [blame] | 5411 | #define WMI_PEER_VHT_2G 0x08000000 |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5412 | |
| 5413 | /* |
| 5414 | * Peer rate capabilities. |
| 5415 | * |
| 5416 | * This is of interest to the ratecontrol |
| 5417 | * module which resides in the firmware. The bit definitions are |
| 5418 | * consistent with that defined in if_athrate.c. |
| 5419 | */ |
| 5420 | #define WMI_RC_DS_FLAG 0x01 |
| 5421 | #define WMI_RC_CW40_FLAG 0x02 |
| 5422 | #define WMI_RC_SGI_FLAG 0x04 |
| 5423 | #define WMI_RC_HT_FLAG 0x08 |
| 5424 | #define WMI_RC_RTSCTS_FLAG 0x10 |
| 5425 | #define WMI_RC_TX_STBC_FLAG 0x20 |
| 5426 | #define WMI_RC_RX_STBC_FLAG 0xC0 |
| 5427 | #define WMI_RC_RX_STBC_FLAG_S 6 |
| 5428 | #define WMI_RC_WEP_TKIP_FLAG 0x100 |
| 5429 | #define WMI_RC_TS_FLAG 0x200 |
| 5430 | #define WMI_RC_UAPSD_FLAG 0x400 |
| 5431 | |
| 5432 | /* Maximum listen interval supported by hw in units of beacon interval */ |
| 5433 | #define ATH10K_MAX_HW_LISTEN_INTERVAL 5 |
| 5434 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 5435 | struct wmi_common_peer_assoc_complete_cmd { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5436 | struct wmi_mac_addr peer_macaddr; |
| 5437 | __le32 vdev_id; |
| 5438 | __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */ |
| 5439 | __le32 peer_associd; /* 16 LSBs */ |
| 5440 | __le32 peer_flags; |
| 5441 | __le32 peer_caps; /* 16 LSBs */ |
| 5442 | __le32 peer_listen_intval; |
| 5443 | __le32 peer_ht_caps; |
| 5444 | __le32 peer_max_mpdu; |
| 5445 | __le32 peer_mpdu_density; /* 0..16 */ |
| 5446 | __le32 peer_rate_caps; |
| 5447 | struct wmi_rate_set peer_legacy_rates; |
| 5448 | struct wmi_rate_set peer_ht_rates; |
| 5449 | __le32 peer_nss; /* num of spatial streams */ |
| 5450 | __le32 peer_vht_caps; |
| 5451 | __le32 peer_phymode; |
| 5452 | struct wmi_vht_rate_set peer_vht_rates; |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 5453 | }; |
| 5454 | |
| 5455 | struct wmi_main_peer_assoc_complete_cmd { |
| 5456 | struct wmi_common_peer_assoc_complete_cmd cmd; |
| 5457 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5458 | /* HT Operation Element of the peer. Five bytes packed in 2 |
| 5459 | * INT32 array and filled from lsb to msb. */ |
| 5460 | __le32 peer_ht_info[2]; |
| 5461 | } __packed; |
| 5462 | |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 5463 | struct wmi_10_1_peer_assoc_complete_cmd { |
| 5464 | struct wmi_common_peer_assoc_complete_cmd cmd; |
| 5465 | } __packed; |
| 5466 | |
| 5467 | #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0 |
| 5468 | #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f |
| 5469 | #define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4 |
| 5470 | #define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0 |
| 5471 | |
| 5472 | struct wmi_10_2_peer_assoc_complete_cmd { |
| 5473 | struct wmi_common_peer_assoc_complete_cmd cmd; |
| 5474 | __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */ |
| 5475 | } __packed; |
| 5476 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5477 | struct wmi_peer_assoc_complete_arg { |
| 5478 | u8 addr[ETH_ALEN]; |
| 5479 | u32 vdev_id; |
| 5480 | bool peer_reassoc; |
| 5481 | u16 peer_aid; |
| 5482 | u32 peer_flags; /* see %WMI_PEER_ */ |
| 5483 | u16 peer_caps; |
| 5484 | u32 peer_listen_intval; |
| 5485 | u32 peer_ht_caps; |
| 5486 | u32 peer_max_mpdu; |
| 5487 | u32 peer_mpdu_density; /* 0..16 */ |
| 5488 | u32 peer_rate_caps; /* see %WMI_RC_ */ |
| 5489 | struct wmi_rate_set_arg peer_legacy_rates; |
| 5490 | struct wmi_rate_set_arg peer_ht_rates; |
| 5491 | u32 peer_num_spatial_streams; |
| 5492 | u32 peer_vht_caps; |
| 5493 | enum wmi_phy_mode peer_phymode; |
| 5494 | struct wmi_vht_rate_set_arg peer_vht_rates; |
| 5495 | }; |
| 5496 | |
| 5497 | struct wmi_peer_add_wds_entry_cmd { |
| 5498 | /* peer MAC address */ |
| 5499 | struct wmi_mac_addr peer_macaddr; |
| 5500 | /* wds MAC addr */ |
| 5501 | struct wmi_mac_addr wds_macaddr; |
| 5502 | } __packed; |
| 5503 | |
| 5504 | struct wmi_peer_remove_wds_entry_cmd { |
| 5505 | /* wds MAC addr */ |
| 5506 | struct wmi_mac_addr wds_macaddr; |
| 5507 | } __packed; |
| 5508 | |
| 5509 | struct wmi_peer_q_empty_callback_event { |
| 5510 | /* peer MAC address */ |
| 5511 | struct wmi_mac_addr peer_macaddr; |
| 5512 | } __packed; |
| 5513 | |
| 5514 | /* |
| 5515 | * Channel info WMI event |
| 5516 | */ |
| 5517 | struct wmi_chan_info_event { |
| 5518 | __le32 err_code; |
| 5519 | __le32 freq; |
| 5520 | __le32 cmd_flags; |
| 5521 | __le32 noise_floor; |
| 5522 | __le32 rx_clear_count; |
| 5523 | __le32 cycle_count; |
| 5524 | } __packed; |
| 5525 | |
Kalle Valo | 5a13e76 | 2014-01-20 11:01:46 +0200 | [diff] [blame] | 5526 | struct wmi_peer_sta_kickout_event { |
| 5527 | struct wmi_mac_addr peer_macaddr; |
| 5528 | } __packed; |
| 5529 | |
Michal Kazior | 2e1dea4 | 2013-07-31 10:32:40 +0200 | [diff] [blame] | 5530 | #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0) |
Michal Kazior | 2e1dea4 | 2013-07-31 10:32:40 +0200 | [diff] [blame] | 5531 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5532 | /* Beacon filter wmi command info */ |
| 5533 | #define BCN_FLT_MAX_SUPPORTED_IES 256 |
| 5534 | #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32) |
| 5535 | |
| 5536 | struct bss_bcn_stats { |
| 5537 | __le32 vdev_id; |
| 5538 | __le32 bss_bcnsdropped; |
| 5539 | __le32 bss_bcnsdelivered; |
| 5540 | } __packed; |
| 5541 | |
| 5542 | struct bcn_filter_stats { |
| 5543 | __le32 bcns_dropped; |
| 5544 | __le32 bcns_delivered; |
| 5545 | __le32 activefilters; |
| 5546 | struct bss_bcn_stats bss_stats; |
| 5547 | } __packed; |
| 5548 | |
| 5549 | struct wmi_add_bcn_filter_cmd { |
| 5550 | u32 vdev_id; |
| 5551 | u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST]; |
| 5552 | } __packed; |
| 5553 | |
| 5554 | enum wmi_sta_keepalive_method { |
| 5555 | WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, |
| 5556 | WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2, |
| 5557 | }; |
| 5558 | |
Michal Kazior | 46725b15 | 2015-01-28 09:57:49 +0200 | [diff] [blame] | 5559 | #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0 |
| 5560 | |
| 5561 | /* Firmware crashes if keepalive interval exceeds this limit */ |
| 5562 | #define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff |
| 5563 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5564 | /* note: ip4 addresses are in network byte order, i.e. big endian */ |
| 5565 | struct wmi_sta_keepalive_arp_resp { |
| 5566 | __be32 src_ip4_addr; |
| 5567 | __be32 dest_ip4_addr; |
| 5568 | struct wmi_mac_addr dest_mac_addr; |
| 5569 | } __packed; |
| 5570 | |
| 5571 | struct wmi_sta_keepalive_cmd { |
| 5572 | __le32 vdev_id; |
| 5573 | __le32 enabled; |
| 5574 | __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */ |
| 5575 | __le32 interval; /* in seconds */ |
| 5576 | struct wmi_sta_keepalive_arp_resp arp_resp; |
| 5577 | } __packed; |
| 5578 | |
Janusz Dziedzic | 6e8b188 | 2015-01-28 09:57:39 +0200 | [diff] [blame] | 5579 | struct wmi_sta_keepalive_arg { |
| 5580 | u32 vdev_id; |
| 5581 | u32 enabled; |
| 5582 | u32 method; |
| 5583 | u32 interval; |
| 5584 | __be32 src_ip4_addr; |
| 5585 | __be32 dest_ip4_addr; |
| 5586 | const u8 dest_mac_addr[ETH_ALEN]; |
| 5587 | }; |
| 5588 | |
Michal Kazior | 9cfbce7 | 2013-07-16 09:54:36 +0200 | [diff] [blame] | 5589 | enum wmi_force_fw_hang_type { |
| 5590 | WMI_FORCE_FW_HANG_ASSERT = 1, |
| 5591 | WMI_FORCE_FW_HANG_NO_DETECT, |
| 5592 | WMI_FORCE_FW_HANG_CTRL_EP_FULL, |
| 5593 | WMI_FORCE_FW_HANG_EMPTY_POINT, |
| 5594 | WMI_FORCE_FW_HANG_STACK_OVERFLOW, |
| 5595 | WMI_FORCE_FW_HANG_INFINITE_LOOP, |
| 5596 | }; |
| 5597 | |
| 5598 | #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF |
| 5599 | |
| 5600 | struct wmi_force_fw_hang_cmd { |
| 5601 | __le32 type; |
| 5602 | __le32 delay_ms; |
| 5603 | } __packed; |
| 5604 | |
Kalle Valo | f118a3e | 2014-01-03 12:59:31 +0200 | [diff] [blame] | 5605 | enum ath10k_dbglog_level { |
| 5606 | ATH10K_DBGLOG_LEVEL_VERBOSE = 0, |
| 5607 | ATH10K_DBGLOG_LEVEL_INFO = 1, |
| 5608 | ATH10K_DBGLOG_LEVEL_WARN = 2, |
| 5609 | ATH10K_DBGLOG_LEVEL_ERR = 3, |
| 5610 | }; |
| 5611 | |
| 5612 | /* VAP ids to enable dbglog */ |
| 5613 | #define ATH10K_DBGLOG_CFG_VAP_LOG_LSB 0 |
| 5614 | #define ATH10K_DBGLOG_CFG_VAP_LOG_MASK 0x0000ffff |
| 5615 | |
| 5616 | /* to enable dbglog in the firmware */ |
| 5617 | #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB 16 |
| 5618 | #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK 0x00010000 |
| 5619 | |
| 5620 | /* timestamp resolution */ |
| 5621 | #define ATH10K_DBGLOG_CFG_RESOLUTION_LSB 17 |
| 5622 | #define ATH10K_DBGLOG_CFG_RESOLUTION_MASK 0x000E0000 |
| 5623 | |
| 5624 | /* number of queued messages before sending them to the host */ |
| 5625 | #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20 |
| 5626 | #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000 |
| 5627 | |
| 5628 | /* |
| 5629 | * Log levels to enable. This defines the minimum level to enable, this is |
| 5630 | * not a bitmask. See enum ath10k_dbglog_level for the values. |
| 5631 | */ |
| 5632 | #define ATH10K_DBGLOG_CFG_LOG_LVL_LSB 28 |
| 5633 | #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000 |
| 5634 | |
| 5635 | /* |
| 5636 | * Note: this is a cleaned up version of a struct firmware uses. For |
| 5637 | * example, config_valid was hidden inside an array. |
| 5638 | */ |
| 5639 | struct wmi_dbglog_cfg_cmd { |
| 5640 | /* bitmask to hold mod id config*/ |
| 5641 | __le32 module_enable; |
| 5642 | |
| 5643 | /* see ATH10K_DBGLOG_CFG_ */ |
| 5644 | __le32 config_enable; |
| 5645 | |
| 5646 | /* mask of module id bits to be changed */ |
| 5647 | __le32 module_valid; |
| 5648 | |
| 5649 | /* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */ |
| 5650 | __le32 config_valid; |
| 5651 | } __packed; |
| 5652 | |
Michal Kazior | c1a4654 | 2015-03-10 16:21:54 +0200 | [diff] [blame] | 5653 | enum wmi_roam_reason { |
| 5654 | WMI_ROAM_REASON_BETTER_AP = 1, |
| 5655 | WMI_ROAM_REASON_BEACON_MISS = 2, |
| 5656 | WMI_ROAM_REASON_LOW_RSSI = 3, |
| 5657 | WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4, |
| 5658 | WMI_ROAM_REASON_HO_FAILED = 5, |
| 5659 | |
| 5660 | /* keep last */ |
| 5661 | WMI_ROAM_REASON_MAX, |
| 5662 | }; |
| 5663 | |
| 5664 | struct wmi_roam_ev { |
| 5665 | __le32 vdev_id; |
| 5666 | __le32 reason; |
| 5667 | } __packed; |
| 5668 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5669 | #define ATH10K_FRAGMT_THRESHOLD_MIN 540 |
| 5670 | #define ATH10K_FRAGMT_THRESHOLD_MAX 2346 |
| 5671 | |
| 5672 | #define WMI_MAX_EVENT 0x1000 |
| 5673 | /* Maximum number of pending TXed WMI packets */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5674 | #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr) |
| 5675 | |
| 5676 | /* By default disable power save for IBSS */ |
| 5677 | #define ATH10K_DEFAULT_ATIM 0 |
| 5678 | |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 5679 | #define WMI_MAX_MEM_REQS 16 |
| 5680 | |
Michal Kazior | 32653cf | 2014-12-03 10:10:26 +0200 | [diff] [blame] | 5681 | struct wmi_scan_ev_arg { |
| 5682 | __le32 event_type; /* %WMI_SCAN_EVENT_ */ |
| 5683 | __le32 reason; /* %WMI_SCAN_REASON_ */ |
| 5684 | __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */ |
| 5685 | __le32 scan_req_id; |
| 5686 | __le32 scan_id; |
| 5687 | __le32 vdev_id; |
| 5688 | }; |
| 5689 | |
| 5690 | struct wmi_mgmt_rx_ev_arg { |
| 5691 | __le32 channel; |
| 5692 | __le32 snr; |
| 5693 | __le32 rate; |
| 5694 | __le32 phy_mode; |
| 5695 | __le32 buf_len; |
| 5696 | __le32 status; /* %WMI_RX_STATUS_ */ |
| 5697 | }; |
| 5698 | |
| 5699 | struct wmi_ch_info_ev_arg { |
| 5700 | __le32 err_code; |
| 5701 | __le32 freq; |
| 5702 | __le32 cmd_flags; |
| 5703 | __le32 noise_floor; |
| 5704 | __le32 rx_clear_count; |
| 5705 | __le32 cycle_count; |
| 5706 | }; |
| 5707 | |
| 5708 | struct wmi_vdev_start_ev_arg { |
| 5709 | __le32 vdev_id; |
| 5710 | __le32 req_id; |
| 5711 | __le32 resp_type; /* %WMI_VDEV_RESP_ */ |
| 5712 | __le32 status; |
| 5713 | }; |
| 5714 | |
| 5715 | struct wmi_peer_kick_ev_arg { |
| 5716 | const u8 *mac_addr; |
| 5717 | }; |
| 5718 | |
| 5719 | struct wmi_swba_ev_arg { |
| 5720 | __le32 vdev_map; |
Raja Mani | a03fee3 | 2015-06-22 20:22:20 +0530 | [diff] [blame^] | 5721 | struct wmi_tim_info_arg tim_info[WMI_MAX_AP_VDEV]; |
Michal Kazior | 32653cf | 2014-12-03 10:10:26 +0200 | [diff] [blame] | 5722 | const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV]; |
| 5723 | }; |
| 5724 | |
| 5725 | struct wmi_phyerr_ev_arg { |
| 5726 | __le32 num_phyerrs; |
| 5727 | __le32 tsf_l32; |
| 5728 | __le32 tsf_u32; |
| 5729 | __le32 buf_len; |
| 5730 | const struct wmi_phyerr *phyerrs; |
| 5731 | }; |
| 5732 | |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 5733 | struct wmi_svc_rdy_ev_arg { |
| 5734 | __le32 min_tx_power; |
| 5735 | __le32 max_tx_power; |
| 5736 | __le32 ht_cap; |
| 5737 | __le32 vht_cap; |
| 5738 | __le32 sw_ver0; |
| 5739 | __le32 sw_ver1; |
Michal Kazior | ca996ec | 2014-12-03 10:11:32 +0200 | [diff] [blame] | 5740 | __le32 fw_build; |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 5741 | __le32 phy_capab; |
| 5742 | __le32 num_rf_chains; |
| 5743 | __le32 eeprom_rd; |
| 5744 | __le32 num_mem_reqs; |
| 5745 | const __le32 *service_map; |
Michal Kazior | 2a3e60d | 2014-11-27 10:11:15 +0100 | [diff] [blame] | 5746 | size_t service_map_len; |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 5747 | const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS]; |
| 5748 | }; |
| 5749 | |
Michal Kazior | 32653cf | 2014-12-03 10:10:26 +0200 | [diff] [blame] | 5750 | struct wmi_rdy_ev_arg { |
| 5751 | __le32 sw_version; |
| 5752 | __le32 abi_version; |
| 5753 | __le32 status; |
| 5754 | const u8 *mac_addr; |
| 5755 | }; |
| 5756 | |
Michal Kazior | c1a4654 | 2015-03-10 16:21:54 +0200 | [diff] [blame] | 5757 | struct wmi_roam_ev_arg { |
| 5758 | __le32 vdev_id; |
| 5759 | __le32 reason; |
| 5760 | __le32 rssi; |
| 5761 | }; |
| 5762 | |
Rajkumar Manoharan | a57a6a2 | 2014-12-17 12:22:17 +0200 | [diff] [blame] | 5763 | struct wmi_pdev_temperature_event { |
| 5764 | /* temperature value in Celcius degree */ |
| 5765 | __le32 temperature; |
| 5766 | } __packed; |
| 5767 | |
Janusz Dziedzic | f5431e8 | 2015-03-23 17:32:53 +0200 | [diff] [blame] | 5768 | /* WOW structures */ |
| 5769 | enum wmi_wow_wakeup_event { |
| 5770 | WOW_BMISS_EVENT = 0, |
| 5771 | WOW_BETTER_AP_EVENT, |
| 5772 | WOW_DEAUTH_RECVD_EVENT, |
| 5773 | WOW_MAGIC_PKT_RECVD_EVENT, |
| 5774 | WOW_GTK_ERR_EVENT, |
| 5775 | WOW_FOURWAY_HSHAKE_EVENT, |
| 5776 | WOW_EAPOL_RECVD_EVENT, |
| 5777 | WOW_NLO_DETECTED_EVENT, |
| 5778 | WOW_DISASSOC_RECVD_EVENT, |
| 5779 | WOW_PATTERN_MATCH_EVENT, |
| 5780 | WOW_CSA_IE_EVENT, |
| 5781 | WOW_PROBE_REQ_WPS_IE_EVENT, |
| 5782 | WOW_AUTH_REQ_EVENT, |
| 5783 | WOW_ASSOC_REQ_EVENT, |
| 5784 | WOW_HTT_EVENT, |
| 5785 | WOW_RA_MATCH_EVENT, |
| 5786 | WOW_HOST_AUTO_SHUTDOWN_EVENT, |
| 5787 | WOW_IOAC_MAGIC_EVENT, |
| 5788 | WOW_IOAC_SHORT_EVENT, |
| 5789 | WOW_IOAC_EXTEND_EVENT, |
| 5790 | WOW_IOAC_TIMER_EVENT, |
| 5791 | WOW_DFS_PHYERR_RADAR_EVENT, |
| 5792 | WOW_BEACON_EVENT, |
| 5793 | WOW_CLIENT_KICKOUT_EVENT, |
| 5794 | WOW_EVENT_MAX, |
| 5795 | }; |
| 5796 | |
| 5797 | #define C2S(x) case x: return #x |
| 5798 | |
| 5799 | static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev) |
| 5800 | { |
| 5801 | switch (ev) { |
| 5802 | C2S(WOW_BMISS_EVENT); |
| 5803 | C2S(WOW_BETTER_AP_EVENT); |
| 5804 | C2S(WOW_DEAUTH_RECVD_EVENT); |
| 5805 | C2S(WOW_MAGIC_PKT_RECVD_EVENT); |
| 5806 | C2S(WOW_GTK_ERR_EVENT); |
| 5807 | C2S(WOW_FOURWAY_HSHAKE_EVENT); |
| 5808 | C2S(WOW_EAPOL_RECVD_EVENT); |
| 5809 | C2S(WOW_NLO_DETECTED_EVENT); |
| 5810 | C2S(WOW_DISASSOC_RECVD_EVENT); |
| 5811 | C2S(WOW_PATTERN_MATCH_EVENT); |
| 5812 | C2S(WOW_CSA_IE_EVENT); |
| 5813 | C2S(WOW_PROBE_REQ_WPS_IE_EVENT); |
| 5814 | C2S(WOW_AUTH_REQ_EVENT); |
| 5815 | C2S(WOW_ASSOC_REQ_EVENT); |
| 5816 | C2S(WOW_HTT_EVENT); |
| 5817 | C2S(WOW_RA_MATCH_EVENT); |
| 5818 | C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT); |
| 5819 | C2S(WOW_IOAC_MAGIC_EVENT); |
| 5820 | C2S(WOW_IOAC_SHORT_EVENT); |
| 5821 | C2S(WOW_IOAC_EXTEND_EVENT); |
| 5822 | C2S(WOW_IOAC_TIMER_EVENT); |
| 5823 | C2S(WOW_DFS_PHYERR_RADAR_EVENT); |
| 5824 | C2S(WOW_BEACON_EVENT); |
| 5825 | C2S(WOW_CLIENT_KICKOUT_EVENT); |
| 5826 | C2S(WOW_EVENT_MAX); |
| 5827 | default: |
| 5828 | return NULL; |
| 5829 | } |
| 5830 | } |
| 5831 | |
| 5832 | enum wmi_wow_wake_reason { |
| 5833 | WOW_REASON_UNSPECIFIED = -1, |
| 5834 | WOW_REASON_NLOD = 0, |
| 5835 | WOW_REASON_AP_ASSOC_LOST, |
| 5836 | WOW_REASON_LOW_RSSI, |
| 5837 | WOW_REASON_DEAUTH_RECVD, |
| 5838 | WOW_REASON_DISASSOC_RECVD, |
| 5839 | WOW_REASON_GTK_HS_ERR, |
| 5840 | WOW_REASON_EAP_REQ, |
| 5841 | WOW_REASON_FOURWAY_HS_RECV, |
| 5842 | WOW_REASON_TIMER_INTR_RECV, |
| 5843 | WOW_REASON_PATTERN_MATCH_FOUND, |
| 5844 | WOW_REASON_RECV_MAGIC_PATTERN, |
| 5845 | WOW_REASON_P2P_DISC, |
| 5846 | WOW_REASON_WLAN_HB, |
| 5847 | WOW_REASON_CSA_EVENT, |
| 5848 | WOW_REASON_PROBE_REQ_WPS_IE_RECV, |
| 5849 | WOW_REASON_AUTH_REQ_RECV, |
| 5850 | WOW_REASON_ASSOC_REQ_RECV, |
| 5851 | WOW_REASON_HTT_EVENT, |
| 5852 | WOW_REASON_RA_MATCH, |
| 5853 | WOW_REASON_HOST_AUTO_SHUTDOWN, |
| 5854 | WOW_REASON_IOAC_MAGIC_EVENT, |
| 5855 | WOW_REASON_IOAC_SHORT_EVENT, |
| 5856 | WOW_REASON_IOAC_EXTEND_EVENT, |
| 5857 | WOW_REASON_IOAC_TIMER_EVENT, |
| 5858 | WOW_REASON_ROAM_HO, |
| 5859 | WOW_REASON_DFS_PHYERR_RADADR_EVENT, |
| 5860 | WOW_REASON_BEACON_RECV, |
| 5861 | WOW_REASON_CLIENT_KICKOUT_EVENT, |
| 5862 | WOW_REASON_DEBUG_TEST = 0xFF, |
| 5863 | }; |
| 5864 | |
| 5865 | static inline const char *wow_reason(enum wmi_wow_wake_reason reason) |
| 5866 | { |
| 5867 | switch (reason) { |
| 5868 | C2S(WOW_REASON_UNSPECIFIED); |
| 5869 | C2S(WOW_REASON_NLOD); |
| 5870 | C2S(WOW_REASON_AP_ASSOC_LOST); |
| 5871 | C2S(WOW_REASON_LOW_RSSI); |
| 5872 | C2S(WOW_REASON_DEAUTH_RECVD); |
| 5873 | C2S(WOW_REASON_DISASSOC_RECVD); |
| 5874 | C2S(WOW_REASON_GTK_HS_ERR); |
| 5875 | C2S(WOW_REASON_EAP_REQ); |
| 5876 | C2S(WOW_REASON_FOURWAY_HS_RECV); |
| 5877 | C2S(WOW_REASON_TIMER_INTR_RECV); |
| 5878 | C2S(WOW_REASON_PATTERN_MATCH_FOUND); |
| 5879 | C2S(WOW_REASON_RECV_MAGIC_PATTERN); |
| 5880 | C2S(WOW_REASON_P2P_DISC); |
| 5881 | C2S(WOW_REASON_WLAN_HB); |
| 5882 | C2S(WOW_REASON_CSA_EVENT); |
| 5883 | C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV); |
| 5884 | C2S(WOW_REASON_AUTH_REQ_RECV); |
| 5885 | C2S(WOW_REASON_ASSOC_REQ_RECV); |
| 5886 | C2S(WOW_REASON_HTT_EVENT); |
| 5887 | C2S(WOW_REASON_RA_MATCH); |
| 5888 | C2S(WOW_REASON_HOST_AUTO_SHUTDOWN); |
| 5889 | C2S(WOW_REASON_IOAC_MAGIC_EVENT); |
| 5890 | C2S(WOW_REASON_IOAC_SHORT_EVENT); |
| 5891 | C2S(WOW_REASON_IOAC_EXTEND_EVENT); |
| 5892 | C2S(WOW_REASON_IOAC_TIMER_EVENT); |
| 5893 | C2S(WOW_REASON_ROAM_HO); |
| 5894 | C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT); |
| 5895 | C2S(WOW_REASON_BEACON_RECV); |
| 5896 | C2S(WOW_REASON_CLIENT_KICKOUT_EVENT); |
| 5897 | C2S(WOW_REASON_DEBUG_TEST); |
| 5898 | default: |
| 5899 | return NULL; |
| 5900 | } |
| 5901 | } |
| 5902 | |
| 5903 | #undef C2S |
| 5904 | |
| 5905 | struct wmi_wow_ev_arg { |
| 5906 | u32 vdev_id; |
| 5907 | u32 flag; |
| 5908 | enum wmi_wow_wake_reason wake_reason; |
| 5909 | u32 data_len; |
| 5910 | }; |
| 5911 | |
Janusz Dziedzic | 25c8661 | 2015-03-23 17:32:54 +0200 | [diff] [blame] | 5912 | #define WOW_MIN_PATTERN_SIZE 1 |
| 5913 | #define WOW_MAX_PATTERN_SIZE 148 |
| 5914 | #define WOW_MAX_PKT_OFFSET 128 |
| 5915 | |
Marek Puzyniak | ad45c88 | 2015-03-30 09:51:53 +0300 | [diff] [blame] | 5916 | enum wmi_tdls_state { |
| 5917 | WMI_TDLS_DISABLE, |
| 5918 | WMI_TDLS_ENABLE_PASSIVE, |
| 5919 | WMI_TDLS_ENABLE_ACTIVE, |
| 5920 | }; |
| 5921 | |
| 5922 | enum wmi_tdls_peer_state { |
| 5923 | WMI_TDLS_PEER_STATE_PEERING, |
| 5924 | WMI_TDLS_PEER_STATE_CONNECTED, |
| 5925 | WMI_TDLS_PEER_STATE_TEARDOWN, |
| 5926 | }; |
| 5927 | |
| 5928 | struct wmi_tdls_peer_update_cmd_arg { |
| 5929 | u32 vdev_id; |
| 5930 | enum wmi_tdls_peer_state peer_state; |
| 5931 | u8 addr[ETH_ALEN]; |
| 5932 | }; |
| 5933 | |
| 5934 | #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 5935 | |
| 5936 | struct wmi_tdls_peer_capab_arg { |
| 5937 | u8 peer_uapsd_queues; |
| 5938 | u8 peer_max_sp; |
| 5939 | u32 buff_sta_support; |
| 5940 | u32 off_chan_support; |
| 5941 | u32 peer_curr_operclass; |
| 5942 | u32 self_curr_operclass; |
| 5943 | u32 peer_chan_len; |
| 5944 | u32 peer_operclass_len; |
| 5945 | u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 5946 | u32 is_peer_responder; |
| 5947 | u32 pref_offchan_num; |
| 5948 | u32 pref_offchan_bw; |
| 5949 | }; |
| 5950 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5951 | struct ath10k; |
| 5952 | struct ath10k_vif; |
Michal Kazior | 0226d60 | 2014-12-03 10:11:22 +0200 | [diff] [blame] | 5953 | struct ath10k_fw_stats_pdev; |
| 5954 | struct ath10k_fw_stats_peer; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5955 | |
| 5956 | int ath10k_wmi_attach(struct ath10k *ar); |
| 5957 | void ath10k_wmi_detach(struct ath10k *ar); |
| 5958 | int ath10k_wmi_wait_for_service_ready(struct ath10k *ar); |
| 5959 | int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5960 | |
Michal Kazior | 0226d60 | 2014-12-03 10:11:22 +0200 | [diff] [blame] | 5961 | struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len); |
Michal Kazior | 95bf21f | 2014-05-16 17:15:39 +0300 | [diff] [blame] | 5962 | int ath10k_wmi_connect(struct ath10k *ar); |
Kalle Valo | 666a73f3 | 2014-09-10 18:23:23 +0300 | [diff] [blame] | 5963 | |
| 5964 | struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len); |
| 5965 | int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); |
Michal Kazior | d7579d1 | 2014-12-03 10:10:54 +0200 | [diff] [blame] | 5966 | int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, |
| 5967 | u32 cmd_id); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5968 | void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 5969 | |
Michal Kazior | b91251f | 2015-01-24 12:14:49 +0200 | [diff] [blame] | 5970 | void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src, |
| 5971 | struct ath10k_fw_stats_pdev *dst); |
| 5972 | void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src, |
| 5973 | struct ath10k_fw_stats_pdev *dst); |
| 5974 | void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src, |
| 5975 | struct ath10k_fw_stats_pdev *dst); |
| 5976 | void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src, |
| 5977 | struct ath10k_fw_stats_pdev *dst); |
Michal Kazior | 0226d60 | 2014-12-03 10:11:22 +0200 | [diff] [blame] | 5978 | void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, |
| 5979 | struct ath10k_fw_stats_peer *dst); |
| 5980 | void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar, |
| 5981 | struct wmi_host_mem_chunks *chunks); |
| 5982 | void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn, |
| 5983 | const struct wmi_start_scan_arg *arg); |
Michal Kazior | 5e752e4 | 2015-01-19 09:53:41 +0100 | [diff] [blame] | 5984 | void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params, |
| 5985 | const struct wmi_wmm_params_arg *arg); |
Michal Kazior | 0226d60 | 2014-12-03 10:11:22 +0200 | [diff] [blame] | 5986 | void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch, |
| 5987 | const struct wmi_channel_arg *arg); |
| 5988 | int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg); |
| 5989 | |
| 5990 | int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb); |
| 5991 | int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb); |
| 5992 | void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb); |
| 5993 | void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb); |
| 5994 | int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb); |
| 5995 | void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb); |
| 5996 | void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb); |
| 5997 | void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb); |
| 5998 | void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb); |
| 5999 | void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb); |
| 6000 | void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb); |
| 6001 | void ath10k_wmi_event_dfs(struct ath10k *ar, |
| 6002 | const struct wmi_phyerr *phyerr, u64 tsf); |
| 6003 | void ath10k_wmi_event_spectral_scan(struct ath10k *ar, |
| 6004 | const struct wmi_phyerr *phyerr, |
| 6005 | u64 tsf); |
| 6006 | void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb); |
| 6007 | void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb); |
| 6008 | void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb); |
| 6009 | void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb); |
| 6010 | void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb); |
| 6011 | void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb); |
| 6012 | void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar, |
| 6013 | struct sk_buff *skb); |
| 6014 | void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar, |
| 6015 | struct sk_buff *skb); |
| 6016 | void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb); |
| 6017 | void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb); |
| 6018 | void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb); |
| 6019 | void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb); |
| 6020 | void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb); |
| 6021 | void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar, |
| 6022 | struct sk_buff *skb); |
| 6023 | void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb); |
| 6024 | void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb); |
| 6025 | void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb); |
| 6026 | void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar, |
| 6027 | struct sk_buff *skb); |
| 6028 | void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb); |
| 6029 | void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb); |
| 6030 | void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb); |
| 6031 | void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb); |
| 6032 | int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb); |
| 6033 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 6034 | #endif /* _WMI_H_ */ |