Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /** |
| 29 | * @addtogroup WMIAPI |
| 30 | ***@{ |
| 31 | */ |
| 32 | |
| 33 | /** @file |
| 34 | * This file specifies the WMI interface for the Software Architecture. |
| 35 | * |
| 36 | * It includes definitions of all the commands and events. Commands are messages |
| 37 | * from the host to the target. Events and Replies are messages from the target |
| 38 | * to the host. |
| 39 | * |
| 40 | * Ownership of correctness in regards to WMI commands |
| 41 | * belongs to the host driver and the target is not required to validate |
| 42 | * parameters for value, proper range, or any other checking. |
| 43 | * |
| 44 | * Guidelines for extending this interface are below. |
| 45 | * |
| 46 | * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff |
| 47 | * 2. Use ONLY A_UINT32 type for defining member variables within WMI command/event |
| 48 | * structures. Do not use A_UINT8, A_UINT16, A_BOOL or enum types within these structures. |
| 49 | * 3. DO NOT define bit fields within structures. Implement bit fields using masks |
| 50 | * if necessary. Do not use the programming language's bit field definition. |
| 51 | * 4. Define macros for encode/decode of A_UINT8, A_UINT16 fields within the A_UINT32 |
| 52 | * variables. Use these macros for set/get of these fields. Try to use this to |
| 53 | * optimize the structure without bloating it with A_UINT32 variables for every lower |
| 54 | * sized field. |
| 55 | * 5. Do not use PACK/UNPACK attributes for the structures as each member variable is |
| 56 | * already 4-byte aligned by virtue of being a A_UINT32 type. |
| 57 | * 6. Comment each parameter part of the WMI command/event structure by using the |
| 58 | * 2 stars at the begining of C comment instead of one star to enable HTML document |
| 59 | * generation using Doxygen. |
| 60 | * |
| 61 | */ |
| 62 | |
| 63 | #ifndef _WMI_UNIFIED_H_ |
| 64 | #define _WMI_UNIFIED_H_ |
| 65 | |
| 66 | #ifdef __cplusplus |
| 67 | extern "C" { |
| 68 | #endif |
| 69 | |
| 70 | #include <wlan_defs.h> |
| 71 | #include <wmi_services.h> |
| 72 | #include <dbglog.h> |
| 73 | |
| 74 | #define ATH_MAC_LEN 6 /**< length of MAC in bytes */ |
| 75 | #define WMI_EVENT_STATUS_SUCCESS 0 /* Success return status to host */ |
| 76 | #define WMI_EVENT_STATUS_FAILURE 1 /* Failure return status to host */ |
| 77 | |
| 78 | #define MAX_TX_RATE_VALUES 10 /*Max Tx Rates */ |
| 79 | #define MAX_RSSI_VALUES 10 /*Max Rssi values */ |
Himanshu Agarwal | 2906132 | 2016-05-27 14:09:27 +0530 | [diff] [blame] | 80 | #define WMI_MAX_CHAINS 8 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | |
| 82 | /* The WLAN_MAX_AC macro cannot be changed without breaking |
| 83 | * WMI compatibility. |
| 84 | * The maximum value of access category |
| 85 | */ |
| 86 | #define WLAN_MAX_AC 4 |
| 87 | |
| 88 | /* |
| 89 | * These don't necessarily belong here; but as the MS/SM macros require |
| 90 | * ar6000_internal.h to be included, it may not be defined as yet. |
| 91 | */ |
| 92 | #define WMI_F_MS(_v, _f) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 93 | (((_v) & (_f)) >> (_f ## _S)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 94 | |
| 95 | /* |
| 96 | * This breaks the "good macro practice" of only referencing each |
| 97 | * macro field once (to avoid things like field++ from causing issues.) |
| 98 | */ |
| 99 | #define WMI_F_RMW(_var, _v, _f) \ |
| 100 | do { \ |
| 101 | (_var) &= ~(_f); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 102 | (_var) |= (((_v) << (_f ## _S)) & (_f)); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 103 | } while (0) |
| 104 | |
| 105 | #define WMI_GET_BITS(_val, _index, _num_bits) \ |
| 106 | (((_val) >> (_index)) & ((1 << (_num_bits)) - 1)) |
| 107 | |
| 108 | #define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \ |
| 109 | (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \ |
| 110 | (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \ |
| 111 | } while (0) |
| 112 | |
| 113 | /** |
| 114 | * A packed array is an array where each entry in the array is less than |
| 115 | * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array. |
| 116 | * For example, if each entry in the array is 11 bits, then you can stuff |
| 117 | * an array of 4 11-bit values into an array of 2 A_UINT32 values. |
| 118 | * The first 2 11-bit values will be stored in the first A_UINT32, |
| 119 | * and the last 2 11-bit values will be stored in the second A_UINT32. |
| 120 | */ |
| 121 | #define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \ |
| 122 | (((num_entries) / (32 / (bits_per_entry))) + \ |
| 123 | (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0)) |
| 124 | |
Govind Singh | 55b8daf | 2016-06-09 16:02:47 +0530 | [diff] [blame] | 125 | static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 *arr, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 126 | A_UINT32 entry_index, A_UINT32 bits_per_entry) |
| 127 | { |
| 128 | A_UINT32 entries_per_uint = (32 / bits_per_entry); |
| 129 | A_UINT32 uint_index = (entry_index / entries_per_uint); |
| 130 | A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint); |
| 131 | A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints); |
| 132 | A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry); |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 133 | return (arr[uint_index] >> start_bit_in_uint) & |
| 134 | ((1 << bits_per_entry) - 1); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 135 | } |
| 136 | |
Govind Singh | 55b8daf | 2016-06-09 16:02:47 +0530 | [diff] [blame] | 137 | static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 138 | A_UINT32 bits_per_entry, A_UINT32 val) |
| 139 | { |
| 140 | A_UINT32 entries_per_uint = (32 / bits_per_entry); |
| 141 | A_UINT32 uint_index = (entry_index / entries_per_uint); |
| 142 | A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint); |
| 143 | A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints); |
| 144 | A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry); |
| 145 | |
| 146 | arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint); |
| 147 | arr[uint_index] |= |
| 148 | ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint); |
| 149 | } |
| 150 | |
| 151 | /** 2 word representation of MAC addr */ |
| 152 | typedef struct { |
| 153 | /** upper 4 bytes of MAC address */ |
| 154 | A_UINT32 mac_addr31to0; |
| 155 | /** lower 2 bytes of MAC address */ |
| 156 | A_UINT32 mac_addr47to32; |
| 157 | } wmi_mac_addr; |
| 158 | |
| 159 | /** macro to convert MAC address from WMI word format to char array */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 160 | #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 161 | (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 162 | (c_macaddr)[1] = (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \ |
| 163 | (c_macaddr)[2] = (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \ |
| 164 | (c_macaddr)[3] = (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 165 | (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 166 | (c_macaddr)[5] = (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \ |
| 167 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 168 | |
| 169 | /** macro to convert MAC address from char array to WMI word format */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 170 | #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr, pwmi_mac_addr) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 171 | (pwmi_mac_addr)->mac_addr31to0 = \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 172 | ((c_macaddr)[0] | ((c_macaddr)[1] << 8) \ |
| 173 | | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24)); \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 174 | (pwmi_mac_addr)->mac_addr47to32 = \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 175 | ((c_macaddr)[4] | ((c_macaddr)[5] << 8)); \ |
| 176 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 177 | |
| 178 | /* |
| 179 | * wmi command groups. |
| 180 | */ |
| 181 | typedef enum { |
| 182 | /* 0 to 2 are reserved */ |
| 183 | WMI_GRP_START = 0x3, |
Himanshu Agarwal | a143815 | 2016-05-13 21:40:19 +0530 | [diff] [blame] | 184 | WMI_GRP_SCAN = WMI_GRP_START, /* 0x3 */ |
| 185 | WMI_GRP_PDEV, /* 0x4 */ |
| 186 | WMI_GRP_VDEV, /* 0x5 */ |
| 187 | WMI_GRP_PEER, /* 0x6 */ |
| 188 | WMI_GRP_MGMT, /* 0x7 */ |
| 189 | WMI_GRP_BA_NEG, /* 0x8 */ |
| 190 | WMI_GRP_STA_PS, /* 0x9 */ |
| 191 | WMI_GRP_DFS, /* 0xa */ |
| 192 | WMI_GRP_ROAM, /* 0xb */ |
| 193 | WMI_GRP_OFL_SCAN, /* 0xc */ |
| 194 | WMI_GRP_P2P, /* 0xd */ |
| 195 | WMI_GRP_AP_PS, /* 0xe */ |
| 196 | WMI_GRP_RATE_CTRL, /* 0xf */ |
| 197 | WMI_GRP_PROFILE, /* 0x10 */ |
| 198 | WMI_GRP_SUSPEND, /* 0x11 */ |
| 199 | WMI_GRP_BCN_FILTER, /* 0x12 */ |
| 200 | WMI_GRP_WOW, /* 0x13 */ |
| 201 | WMI_GRP_RTT, /* 0x14 */ |
| 202 | WMI_GRP_SPECTRAL, /* 0x15 */ |
| 203 | WMI_GRP_STATS, /* 0x16 */ |
| 204 | WMI_GRP_ARP_NS_OFL, /* 0x17 */ |
| 205 | WMI_GRP_NLO_OFL, /* 0x18 */ |
| 206 | WMI_GRP_GTK_OFL, /* 0x19 */ |
| 207 | WMI_GRP_CSA_OFL, /* 0x1a */ |
| 208 | WMI_GRP_CHATTER, /* 0x1b */ |
| 209 | WMI_GRP_TID_ADDBA, /* 0x1c */ |
| 210 | WMI_GRP_MISC, /* 0x1d */ |
| 211 | WMI_GRP_GPIO, /* 0x1e */ |
| 212 | WMI_GRP_FWTEST, /* 0x1f */ |
| 213 | WMI_GRP_TDLS, /* 0x20 */ |
| 214 | WMI_GRP_RESMGR, /* 0x21 */ |
| 215 | WMI_GRP_STA_SMPS, /* 0x22 */ |
| 216 | WMI_GRP_WLAN_HB, /* 0x23 */ |
| 217 | WMI_GRP_RMC, /* 0x24 */ |
| 218 | WMI_GRP_MHF_OFL, /* 0x25 */ |
| 219 | WMI_GRP_LOCATION_SCAN, /* 0x26 */ |
| 220 | WMI_GRP_OEM, /* 0x27 */ |
| 221 | WMI_GRP_NAN, /* 0x28 */ |
| 222 | WMI_GRP_COEX, /* 0x29 */ |
| 223 | WMI_GRP_OBSS_OFL, /* 0x2a */ |
| 224 | WMI_GRP_LPI, /* 0x2b */ |
| 225 | WMI_GRP_EXTSCAN, /* 0x2c */ |
| 226 | WMI_GRP_DHCP_OFL, /* 0x2d */ |
| 227 | WMI_GRP_IPA, /* 0x2e */ |
| 228 | WMI_GRP_MDNS_OFL, /* 0x2f */ |
| 229 | WMI_GRP_SAP_OFL, /* 0x30 */ |
| 230 | WMI_GRP_OCB, /* 0x31 */ |
| 231 | WMI_GRP_SOC, /* 0x32 */ |
| 232 | WMI_GRP_PKT_FILTER, /* 0x33 */ |
| 233 | WMI_GRP_MAWC, /* 0x34 */ |
| 234 | WMI_GRP_PMF_OFFLOAD, /* 0x35 */ |
| 235 | WMI_GRP_BPF_OFFLOAD, /* 0x36 Berkeley Packet Filter */ |
| 236 | WMI_GRP_NAN_DATA, /* 0x37 */ |
| 237 | WMI_GRP_PROTOTYPE, /* 0x38 */ |
Anurag Chouhan | 11b53a1 | 2016-07-28 12:39:46 +0530 | [diff] [blame] | 238 | WMI_GRP_MONITOR, /* 0x39 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 239 | } WMI_GRP_ID; |
| 240 | |
| 241 | #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 242 | #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 243 | |
| 244 | /** |
| 245 | * Command IDs and commange events |
| 246 | */ |
| 247 | typedef enum { |
| 248 | /** initialize the wlan sub system */ |
| 249 | WMI_INIT_CMDID = 0x1, |
| 250 | |
| 251 | /* Scan specific commands */ |
| 252 | |
| 253 | /** start scan request to FW */ |
| 254 | WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN), |
| 255 | /** stop scan request to FW */ |
| 256 | WMI_STOP_SCAN_CMDID, |
| 257 | /** full list of channels as defined by the regulatory that will be used by scanner */ |
| 258 | WMI_SCAN_CHAN_LIST_CMDID, |
| 259 | /** overwrite default priority table in scan scheduler */ |
| 260 | WMI_SCAN_SCH_PRIO_TBL_CMDID, |
| 261 | /** This command to adjust the priority and min.max_rest_time |
| 262 | * of an on ongoing scan request. |
| 263 | */ |
| 264 | WMI_SCAN_UPDATE_REQUEST_CMDID, |
| 265 | |
| 266 | /** set OUI to be used in probe request if enabled */ |
| 267 | WMI_SCAN_PROB_REQ_OUI_CMDID, |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 268 | /** config adaptive dwell scan */ |
| 269 | WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 270 | |
| 271 | /* PDEV(physical device) specific commands */ |
| 272 | /** set regulatorty ctl id used by FW to determine the exact ctl power limits */ |
| 273 | WMI_PDEV_SET_REGDOMAIN_CMDID = |
| 274 | WMI_CMD_GRP_START_ID(WMI_GRP_PDEV), |
| 275 | /** set channel. mainly used for supporting monitor mode */ |
| 276 | WMI_PDEV_SET_CHANNEL_CMDID, |
| 277 | /** set pdev specific parameters */ |
| 278 | WMI_PDEV_SET_PARAM_CMDID, |
| 279 | /** enable packet log */ |
| 280 | WMI_PDEV_PKTLOG_ENABLE_CMDID, |
| 281 | /** disable packet log*/ |
| 282 | WMI_PDEV_PKTLOG_DISABLE_CMDID, |
| 283 | /** set wmm parameters */ |
| 284 | WMI_PDEV_SET_WMM_PARAMS_CMDID, |
| 285 | /** set HT cap ie that needs to be carried probe requests HT/VHT channels */ |
| 286 | WMI_PDEV_SET_HT_CAP_IE_CMDID, |
| 287 | /** set VHT cap ie that needs to be carried on probe requests on VHT channels */ |
| 288 | WMI_PDEV_SET_VHT_CAP_IE_CMDID, |
| 289 | |
| 290 | /** Command to send the DSCP-to-TID map to the target */ |
| 291 | WMI_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 292 | /** set quiet ie parameters. primarily used in AP mode */ |
| 293 | WMI_PDEV_SET_QUIET_MODE_CMDID, |
| 294 | /** Enable/Disable Green AP Power Save */ |
| 295 | WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 296 | /** get TPC config for the current operating channel */ |
| 297 | WMI_PDEV_GET_TPC_CONFIG_CMDID, |
| 298 | |
| 299 | /** set the base MAC address for the physical device before a VDEV is created. |
| 300 | * For firmware that doesn't support this feature and this command, the pdev |
| 301 | * MAC address will not be changed. */ |
| 302 | WMI_PDEV_SET_BASE_MACADDR_CMDID, |
| 303 | |
| 304 | /* eeprom content dump , the same to bdboard data */ |
| 305 | WMI_PDEV_DUMP_CMDID, |
| 306 | /* set LED configuration */ |
| 307 | WMI_PDEV_SET_LED_CONFIG_CMDID, |
| 308 | /* Get Current temprature of chip in Celcius degree */ |
| 309 | WMI_PDEV_GET_TEMPERATURE_CMDID, |
| 310 | /* Set LED flashing behavior */ |
| 311 | WMI_PDEV_SET_LED_FLASHING_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 312 | /** Enable/Disable Smart Antenna */ |
| 313 | WMI_PDEV_SMART_ANT_ENABLE_CMDID, |
| 314 | /** Set Smart Antenna RX antenna*/ |
| 315 | WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID, |
| 316 | /** Override the antenna switch table */ |
| 317 | WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID, |
| 318 | /** Override the CTL table */ |
| 319 | WMI_PDEV_SET_CTL_TABLE_CMDID, |
| 320 | /** Override the array gain table */ |
| 321 | WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID, |
| 322 | /** FIPS test mode command */ |
| 323 | WMI_PDEV_FIPS_CMDID, |
| 324 | /** get CCK ANI level */ |
| 325 | WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID, |
| 326 | /** get OFDM ANI level */ |
| 327 | WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID, |
| 328 | /** NF Cal Power dBr/dBm */ |
| 329 | WMI_PDEV_GET_NFCAL_POWER_CMDID, |
| 330 | /** TxPPDU TPC */ |
| 331 | WMI_PDEV_GET_TPC_CMDID, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 332 | /* Set to enable MIB stats collection */ |
| 333 | WMI_MIB_STATS_ENABLE_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 334 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 335 | /** Set preferred channel list for DBS Mgr */ |
| 336 | WMI_PDEV_SET_PCL_CMDID, |
| 337 | /** Set HW mode. Eg: single MAC, DBS & SBS, |
| 338 | * see soc_hw_mode_t for values |
| 339 | */ |
| 340 | WMI_PDEV_SET_HW_MODE_CMDID, |
| 341 | /** Set DFS, SCAN modes and other FW configurations */ |
| 342 | WMI_PDEV_SET_MAC_CONFIG_CMDID, |
| 343 | /** Set per band and per pdev antenna chains */ |
| 344 | WMI_PDEV_SET_ANTENNA_MODE_CMDID, |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 345 | /** Periodic channel stats request command */ |
| 346 | WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID, |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 347 | /** WMI command for power debug framework */ |
| 348 | WMI_PDEV_WAL_POWER_DEBUG_CMDID, |
Nitesh Shah | 5de1cf8 | 2016-06-29 20:13:17 +0530 | [diff] [blame] | 349 | /** set per-AC rx reorder timeouts */ |
| 350 | WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID, |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 351 | /** WMI command for WOW gpio and type */ |
| 352 | WMI_PDEV_SET_WAKEUP_CONFIG_CMDID, |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 353 | /* Get current ANT's per chain's RSSI info */ |
| 354 | WMI_PDEV_GET_ANTDIV_STATUS_CMDID, |
Anurag Chouhan | e326c92 | 2016-08-04 18:43:19 +0530 | [diff] [blame] | 355 | /** WMI command for getting Chip Power Stats */ |
| 356 | WMI_PDEV_GET_CHIP_POWER_STATS_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 357 | |
Nitesh Shah | 5de1cf8 | 2016-06-29 20:13:17 +0530 | [diff] [blame] | 358 | /* VDEV (virtual device) specific commands */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 359 | /** vdev create */ |
| 360 | WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV), |
| 361 | /** vdev delete */ |
| 362 | WMI_VDEV_DELETE_CMDID, |
| 363 | /** vdev start request */ |
| 364 | WMI_VDEV_START_REQUEST_CMDID, |
| 365 | /** vdev restart request (RX only, NO TX, used for CAC period)*/ |
| 366 | WMI_VDEV_RESTART_REQUEST_CMDID, |
| 367 | /** vdev up request */ |
| 368 | WMI_VDEV_UP_CMDID, |
| 369 | /** vdev stop request */ |
| 370 | WMI_VDEV_STOP_CMDID, |
| 371 | /** vdev down request */ |
| 372 | WMI_VDEV_DOWN_CMDID, |
| 373 | /* set a vdev param */ |
| 374 | WMI_VDEV_SET_PARAM_CMDID, |
| 375 | /* set a key (used for setting per peer unicast and per vdev multicast) */ |
| 376 | WMI_VDEV_INSTALL_KEY_CMDID, |
| 377 | |
| 378 | /* wnm sleep mode command */ |
| 379 | WMI_VDEV_WNM_SLEEPMODE_CMDID, |
| 380 | WMI_VDEV_WMM_ADDTS_CMDID, |
| 381 | WMI_VDEV_WMM_DELTS_CMDID, |
| 382 | WMI_VDEV_SET_WMM_PARAMS_CMDID, |
| 383 | WMI_VDEV_SET_GTX_PARAMS_CMDID, |
| 384 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID, |
| 385 | |
| 386 | WMI_VDEV_PLMREQ_START_CMDID, |
| 387 | WMI_VDEV_PLMREQ_STOP_CMDID, |
| 388 | /* TSF timestamp action for specified vdev */ |
| 389 | WMI_VDEV_TSF_TSTAMP_ACTION_CMDID, |
| 390 | /* |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 391 | * set the additional IEs in probe requests for scan or |
| 392 | * assoc req etc for frames FW locally generates |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 393 | */ |
| 394 | WMI_VDEV_SET_IE_CMDID, |
| 395 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 396 | WMI_VDEV_RATEMASK_CMDID, |
| 397 | /** ATF VDEV REQUEST commands. */ |
| 398 | WMI_VDEV_ATF_REQUEST_CMDID, |
| 399 | /** Command to send the DSCP-to-TID map to the target for VAP */ |
| 400 | WMI_VDEV_SET_DSCP_TID_MAP_CMDID, |
| 401 | /* |
| 402 | * Configure filter for Neighbor Rx Pkt |
| 403 | * (smart mesh selective listening) |
| 404 | */ |
| 405 | WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 406 | /** set quiet ie parameters. primarily used in AP mode */ |
| 407 | WMI_VDEV_SET_QUIET_MODE_CMDID, |
Krishna Kumaar Natarajan | ea0a796 | 2016-04-16 14:09:09 +0530 | [diff] [blame] | 408 | /** To set custom aggregation size for per vdev */ |
| 409 | WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 410 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 411 | /* peer specific commands */ |
| 412 | |
| 413 | /** create a peer */ |
| 414 | WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER), |
| 415 | /** delete a peer */ |
| 416 | WMI_PEER_DELETE_CMDID, |
| 417 | /** flush specific tid queues of a peer */ |
| 418 | WMI_PEER_FLUSH_TIDS_CMDID, |
| 419 | /** set a parameter of a peer */ |
| 420 | WMI_PEER_SET_PARAM_CMDID, |
| 421 | /** set peer to associated state. will cary all parameters determined during assocication time */ |
| 422 | WMI_PEER_ASSOC_CMDID, |
| 423 | /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 424 | WMI_PEER_ADD_WDS_ENTRY_CMDID, |
| 425 | /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 426 | WMI_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 427 | /** set up mcast group infor for multicast to unicast conversion */ |
| 428 | WMI_PEER_MCAST_GROUP_CMDID, |
| 429 | /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */ |
| 430 | WMI_PEER_INFO_REQ_CMDID, |
| 431 | |
| 432 | /** request the estimated link speed for the peer. FW shall respond with |
| 433 | * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID. |
| 434 | */ |
| 435 | WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID, |
| 436 | /* |
| 437 | * Set the conditions to report peer justified rate to driver |
| 438 | * The justified rate means the the user-rate is justified by PER. |
| 439 | */ |
| 440 | WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 441 | /** update a wds (4 address) entry */ |
| 442 | WMI_PEER_UPDATE_WDS_ENTRY_CMDID, |
| 443 | /** add a proxy sta entry */ |
| 444 | WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID, |
| 445 | /** Set Smart Antenna TX antenna */ |
| 446 | WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID, |
| 447 | /** Set Smart Antenna TX train info */ |
| 448 | WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID, |
| 449 | /** Set SA node config options */ |
| 450 | WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID, |
| 451 | /** ATF PEER REQUEST commands */ |
| 452 | WMI_PEER_ATF_REQUEST_CMDID, |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 453 | /** bandwidth fairness (BWF) peer configuration request command */ |
| 454 | WMI_PEER_BWF_REQUEST_CMDID, |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 455 | /** rx reorder queue setup for peer/tid */ |
| 456 | WMI_PEER_REORDER_QUEUE_SETUP_CMDID, |
| 457 | /** rx reorder queue remove for peer/tid */ |
| 458 | WMI_PEER_REORDER_QUEUE_REMOVE_CMDID, |
Nitesh Shah | 5de1cf8 | 2016-06-29 20:13:17 +0530 | [diff] [blame] | 459 | /** specify a limit for rx A-MPDU block size */ |
| 460 | WMI_PEER_SET_RX_BLOCKSIZE_CMDID, |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 461 | /** |
| 462 | * request peer antdiv info from FW. FW shall respond with |
| 463 | * PEER_ANTDIV_INFO_EVENTID |
| 464 | */ |
| 465 | WMI_PEER_ANTDIV_INFO_REQ_CMDID, |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 466 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 467 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 468 | /* beacon/management specific commands */ |
| 469 | |
| 470 | /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */ |
| 471 | WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT), |
| 472 | /** transmit beacon by value */ |
| 473 | WMI_PDEV_SEND_BCN_CMDID, |
| 474 | /** set the beacon template. used in beacon offload mode to setup the |
| 475 | * the common beacon template with the FW to be used by FW to generate beacons */ |
| 476 | WMI_BCN_TMPL_CMDID, |
| 477 | /** set beacon filter with FW */ |
| 478 | WMI_BCN_FILTER_RX_CMDID, |
| 479 | /* enable/disable filtering of probe requests in the firmware */ |
| 480 | WMI_PRB_REQ_FILTER_RX_CMDID, |
| 481 | /** transmit management frame by value. will be deprecated */ |
| 482 | WMI_MGMT_TX_CMDID, |
| 483 | /** set the probe response template. used in beacon offload mode to setup the |
| 484 | * the common probe response template with the FW to be used by FW to generate |
| 485 | * probe responses */ |
| 486 | WMI_PRB_TMPL_CMDID, |
| 487 | /** Transmit Mgmt frame by reference */ |
| 488 | WMI_MGMT_TX_SEND_CMDID, |
| 489 | |
| 490 | /** commands to directly control ba negotiation directly from host. only used in test mode */ |
| 491 | |
| 492 | /** turn off FW Auto addba mode and let host control addba */ |
| 493 | WMI_ADDBA_CLEAR_RESP_CMDID = |
| 494 | WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG), |
| 495 | /** send add ba request */ |
| 496 | WMI_ADDBA_SEND_CMDID, |
| 497 | WMI_ADDBA_STATUS_CMDID, |
| 498 | /** send del ba */ |
| 499 | WMI_DELBA_SEND_CMDID, |
| 500 | /** set add ba response will be used by FW to generate addba response*/ |
| 501 | WMI_ADDBA_SET_RESP_CMDID, |
| 502 | /** send single VHT MPDU with AMSDU */ |
| 503 | WMI_SEND_SINGLEAMSDU_CMDID, |
| 504 | |
| 505 | /** Station power save specific config */ |
| 506 | /** enable/disable station powersave */ |
| 507 | WMI_STA_POWERSAVE_MODE_CMDID = |
| 508 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS), |
| 509 | /** set station power save specific parameter */ |
| 510 | WMI_STA_POWERSAVE_PARAM_CMDID, |
| 511 | /** set station mimo powersave mode */ |
| 512 | WMI_STA_MIMO_PS_MODE_CMDID, |
| 513 | |
| 514 | /** DFS-specific commands */ |
| 515 | /** enable DFS (radar detection)*/ |
| 516 | WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS), |
| 517 | /** disable DFS (radar detection)*/ |
| 518 | WMI_PDEV_DFS_DISABLE_CMDID, |
| 519 | /** enable DFS phyerr/parse filter offload */ |
| 520 | WMI_DFS_PHYERR_FILTER_ENA_CMDID, |
| 521 | /** enable DFS phyerr/parse filter offload */ |
| 522 | WMI_DFS_PHYERR_FILTER_DIS_CMDID, |
| 523 | |
| 524 | /* Roaming specific commands */ |
| 525 | /** set roam scan mode */ |
| 526 | WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM), |
| 527 | /** set roam scan rssi threshold below which roam scan is enabled */ |
| 528 | WMI_ROAM_SCAN_RSSI_THRESHOLD, |
| 529 | /** set roam scan period for periodic roam scan mode */ |
| 530 | WMI_ROAM_SCAN_PERIOD, |
| 531 | /** set roam scan trigger rssi change threshold */ |
| 532 | WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 533 | /** set roam AP profile */ |
| 534 | WMI_ROAM_AP_PROFILE, |
| 535 | /** set channel list for roam scans */ |
| 536 | WMI_ROAM_CHAN_LIST, |
| 537 | /** Stop scan command */ |
| 538 | WMI_ROAM_SCAN_CMD, |
| 539 | /** roaming sme offload sync complete */ |
| 540 | WMI_ROAM_SYNCH_COMPLETE, |
| 541 | /** set ric request element for 11r roaming */ |
| 542 | WMI_ROAM_SET_RIC_REQUEST_CMDID, |
| 543 | /** Invoke roaming forcefully */ |
| 544 | WMI_ROAM_INVOKE_CMDID, |
| 545 | /** roaming filter cmd to allow further filtering of roaming candidate */ |
| 546 | WMI_ROAM_FILTER_CMDID, |
| 547 | /** set gateway ip, mac and retries for subnet change detection */ |
| 548 | WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID, |
| 549 | /** configure thresholds for MAWC */ |
| 550 | WMI_ROAM_CONFIGURE_MAWC_CMDID, |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 551 | /** configure MultiBand Operation(refer WFA MBO spec) parameter */ |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 552 | WMI_ROAM_SET_MBO_PARAM_CMDID, /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 553 | |
| 554 | /** offload scan specific commands */ |
| 555 | /** set offload scan AP profile */ |
| 556 | WMI_OFL_SCAN_ADD_AP_PROFILE = |
| 557 | WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN), |
| 558 | /** remove offload scan AP profile */ |
| 559 | WMI_OFL_SCAN_REMOVE_AP_PROFILE, |
| 560 | /** set offload scan period */ |
| 561 | WMI_OFL_SCAN_PERIOD, |
| 562 | |
| 563 | /* P2P specific commands */ |
| 564 | /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response |
| 565 | * generated during p2p listen and for p2p discoverability */ |
| 566 | WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P), |
| 567 | /** enable/disable p2p discoverability on STA/AP VDEVs */ |
| 568 | WMI_P2P_DEV_SET_DISCOVERABILITY, |
| 569 | /** set p2p ie to be carried in beacons generated by FW for GO */ |
| 570 | WMI_P2P_GO_SET_BEACON_IE, |
| 571 | /** set p2p ie to be carried in probe response frames generated by FW for GO */ |
| 572 | WMI_P2P_GO_SET_PROBE_RESP_IE, |
| 573 | /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA |
| 574 | * attribute in the beacons/probe responses received. |
| 575 | */ |
| 576 | WMI_P2P_SET_VENDOR_IE_DATA_CMDID, |
| 577 | /** set the configure of p2p find offload */ |
| 578 | WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID, |
| 579 | /** set the vendor specific p2p ie data for p2p find offload using */ |
| 580 | WMI_P2P_DISC_OFFLOAD_APPIE_CMDID, |
| 581 | /** set the BSSID/device name pattern of p2p find offload */ |
| 582 | WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID, |
| 583 | /** set OppPS related parameters **/ |
| 584 | WMI_P2P_SET_OPPPS_PARAM_CMDID, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 585 | /** set listen offload start related parameters */ |
| 586 | WMI_P2P_LISTEN_OFFLOAD_START_CMDID, |
| 587 | /** set listen offload stop related parameters */ |
| 588 | WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 589 | |
| 590 | /** AP power save specific config */ |
| 591 | /** set AP power save specific param */ |
| 592 | WMI_AP_PS_PEER_PARAM_CMDID = |
| 593 | WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS), |
| 594 | /** set AP UAPSD coex pecific param */ |
| 595 | WMI_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 596 | |
| 597 | /** set Enhanced Green AP param */ |
| 598 | WMI_AP_PS_EGAP_PARAM_CMDID, |
| 599 | |
| 600 | /** Rate-control specific commands */ |
| 601 | WMI_PEER_RATE_RETRY_SCHED_CMDID = |
| 602 | WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL), |
| 603 | |
| 604 | /** WLAN Profiling commands. */ |
| 605 | WMI_WLAN_PROFILE_TRIGGER_CMDID = |
| 606 | WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE), |
| 607 | WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 608 | WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 609 | WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 610 | WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 611 | |
| 612 | /** Suspend resume command Ids */ |
| 613 | WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND), |
| 614 | WMI_PDEV_RESUME_CMDID, |
| 615 | |
| 616 | /* Beacon filter commands */ |
| 617 | /** add a beacon filter */ |
| 618 | WMI_ADD_BCN_FILTER_CMDID = |
| 619 | WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER), |
| 620 | /** remove a beacon filter */ |
| 621 | WMI_RMV_BCN_FILTER_CMDID, |
| 622 | |
| 623 | /* WOW Specific WMI commands */ |
| 624 | /** add pattern for awake */ |
| 625 | WMI_WOW_ADD_WAKE_PATTERN_CMDID = |
| 626 | WMI_CMD_GRP_START_ID(WMI_GRP_WOW), |
| 627 | /** deleta a wake pattern */ |
| 628 | WMI_WOW_DEL_WAKE_PATTERN_CMDID, |
| 629 | /** enable/deisable wake event */ |
| 630 | WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 631 | /** enable WOW */ |
| 632 | WMI_WOW_ENABLE_CMDID, |
| 633 | /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */ |
| 634 | WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 635 | /* IOAC add keep alive cmd. */ |
| 636 | WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID, |
| 637 | /* IOAC del keep alive cmd. */ |
| 638 | WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID, |
| 639 | /* IOAC add pattern for awake */ |
| 640 | WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID, |
| 641 | /* IOAC deleta a wake pattern */ |
| 642 | WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID, |
| 643 | /* D0-WOW enable or disable cmd */ |
| 644 | WMI_D0_WOW_ENABLE_DISABLE_CMDID, |
| 645 | /* enable extend WoW */ |
| 646 | WMI_EXTWOW_ENABLE_CMDID, |
| 647 | /* Extend WoW command to configure app type1 parameter */ |
| 648 | WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID, |
| 649 | /* Extend WoW command to configure app type2 parameter */ |
| 650 | WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID, |
| 651 | /* enable ICMPv6 Network advertisement filtering */ |
| 652 | WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID, |
| 653 | /* |
| 654 | * Set a pattern to match UDP packet in WOW mode. |
| 655 | * If match, construct a tx frame in a local buffer |
| 656 | * to send through the peer AP to the entity in the |
| 657 | * IP network that sent the UDP packet to this STA. |
| 658 | */ |
| 659 | WMI_WOW_UDP_SVC_OFLD_CMDID, |
| 660 | |
| 661 | /* configure WOW host wakeup PIN pattern */ |
| 662 | WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID, |
| 663 | |
Anurag Chouhan | 86eab9b | 2016-04-21 16:22:47 +0530 | [diff] [blame] | 664 | /* Set which action category should wake the host from suspend */ |
| 665 | WMI_WOW_SET_ACTION_WAKE_UP_CMDID, |
| 666 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 667 | /* RTT measurement related cmd */ |
| 668 | /** request to make an RTT measurement */ |
| 669 | WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT), |
| 670 | /** request to report a tsf measurement */ |
| 671 | WMI_RTT_TSF_CMDID, |
| 672 | |
| 673 | /** spectral scan command */ |
| 674 | /** configure spectral scan */ |
| 675 | WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = |
| 676 | WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL), |
| 677 | /** enable/disable spectral scan and trigger */ |
| 678 | WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 679 | |
| 680 | /* F/W stats */ |
| 681 | /** one time request for stats */ |
| 682 | WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS), |
| 683 | /** Push MCC Adaptive Scheduler Stats to Firmware */ |
| 684 | WMI_MCC_SCHED_TRAFFIC_STATS_CMDID, |
| 685 | /** one time request for txrx stats */ |
| 686 | WMI_REQUEST_STATS_EXT_CMDID, |
| 687 | |
| 688 | /* Link Layer stats */ |
| 689 | /** Request for link layer stats */ |
| 690 | WMI_REQUEST_LINK_STATS_CMDID, |
| 691 | /** Request for setting params to link layer stats */ |
| 692 | WMI_START_LINK_STATS_CMDID, |
| 693 | /** Request to clear stats*/ |
| 694 | WMI_CLEAR_LINK_STATS_CMDID, |
| 695 | |
| 696 | /** Request for getting the Firmware Memory Dump */ |
| 697 | WMI_GET_FW_MEM_DUMP_CMDID, |
| 698 | |
| 699 | /** Request to flush of the buffered debug messages */ |
| 700 | WMI_DEBUG_MESG_FLUSH_CMDID, |
| 701 | |
| 702 | /** Cmd to configure the verbose level */ |
| 703 | WMI_DIAG_EVENT_LOG_CONFIG_CMDID, |
| 704 | |
| 705 | /** ARP OFFLOAD REQUEST*/ |
| 706 | WMI_SET_ARP_NS_OFFLOAD_CMDID = |
| 707 | WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), |
| 708 | |
| 709 | /** Proactive ARP Response Add Pattern Command*/ |
| 710 | WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 711 | |
| 712 | /** Proactive ARP Response Del Pattern Command*/ |
| 713 | WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 714 | |
| 715 | /** NS offload config*/ |
| 716 | WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = |
| 717 | WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 718 | |
| 719 | /** APFIND Config */ |
| 720 | WMI_APFIND_CMDID, |
| 721 | |
| 722 | /** Passpoint list config */ |
| 723 | WMI_PASSPOINT_LIST_CONFIG_CMDID, |
| 724 | |
| 725 | /** configure supprssing parameters for MAWC */ |
| 726 | WMI_NLO_CONFIGURE_MAWC_CMDID, |
| 727 | |
| 728 | /* GTK offload Specific WMI commands */ |
| 729 | WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 730 | |
| 731 | /* CSA offload Specific WMI commands */ |
| 732 | /** csa offload enable */ |
| 733 | WMI_CSA_OFFLOAD_ENABLE_CMDID = |
| 734 | WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 735 | /** chan switch command */ |
| 736 | WMI_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| 737 | |
| 738 | /* Chatter commands */ |
| 739 | /* Change chatter mode of operation */ |
| 740 | WMI_CHATTER_SET_MODE_CMDID = |
| 741 | WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER), |
| 742 | /** chatter add coalescing filter command */ |
| 743 | WMI_CHATTER_ADD_COALESCING_FILTER_CMDID, |
| 744 | /** chatter delete coalescing filter command */ |
| 745 | WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID, |
| 746 | /** chatter coalecing query command */ |
| 747 | WMI_CHATTER_COALESCING_QUERY_CMDID, |
| 748 | |
| 749 | /**addba specific commands */ |
| 750 | /** start the aggregation on this TID */ |
| 751 | WMI_PEER_TID_ADDBA_CMDID = |
| 752 | WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA), |
| 753 | /** stop the aggregation on this TID */ |
| 754 | WMI_PEER_TID_DELBA_CMDID, |
| 755 | |
| 756 | /** set station mimo powersave method */ |
| 757 | WMI_STA_DTIM_PS_METHOD_CMDID, |
| 758 | /** Configure the Station UAPSD AC Auto Trigger Parameters */ |
| 759 | WMI_STA_UAPSD_AUTO_TRIG_CMDID, |
| 760 | /** Configure the Keep Alive Parameters */ |
| 761 | WMI_STA_KEEPALIVE_CMDID, |
| 762 | |
| 763 | /* Request ssn from target for a sta/tid pair */ |
| 764 | WMI_BA_REQ_SSN_CMDID, |
| 765 | /* misc command group */ |
| 766 | /** echo command mainly used for testing */ |
| 767 | WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC), |
| 768 | |
| 769 | /* !!IMPORTANT!! |
| 770 | * If you need to add a new WMI command to the WMI_GRP_MISC sub-group, |
| 771 | * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID, |
| 772 | * as we MUST have a fixed value here to maintain compatibility between |
| 773 | * UTF and the ART2 driver |
| 774 | */ |
| 775 | /** UTF WMI commands */ |
| 776 | WMI_PDEV_UTF_CMDID, |
| 777 | |
| 778 | /** set debug log config */ |
| 779 | WMI_DBGLOG_CFG_CMDID, |
| 780 | /* QVIT specific command id */ |
| 781 | WMI_PDEV_QVIT_CMDID, |
| 782 | /* Factory Testing Mode request command |
| 783 | * used for integrated chipsets */ |
| 784 | WMI_PDEV_FTM_INTG_CMDID, |
| 785 | /* set and get keepalive parameters command */ |
| 786 | WMI_VDEV_SET_KEEPALIVE_CMDID, |
| 787 | WMI_VDEV_GET_KEEPALIVE_CMDID, |
| 788 | /* For fw recovery test command */ |
| 789 | WMI_FORCE_FW_HANG_CMDID, |
| 790 | /* Set Mcast/Bdcast filter */ |
| 791 | WMI_SET_MCASTBCAST_FILTER_CMDID, |
| 792 | /** set thermal management params **/ |
| 793 | WMI_THERMAL_MGMT_CMDID, |
| 794 | /** set host auto shutdown params **/ |
| 795 | WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID, |
| 796 | /** set tpc chainmask config command */ |
| 797 | WMI_TPC_CHAINMASK_CONFIG_CMDID, |
| 798 | /** set Antenna diversity command */ |
| 799 | WMI_SET_ANTENNA_DIVERSITY_CMDID, |
| 800 | /** Set OCB Sched Request, deprecated */ |
| 801 | WMI_OCB_SET_SCHED_CMDID, |
| 802 | /* Set rssi monitoring config command */ |
| 803 | WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID, |
| 804 | /* Enable/disable Large Receive Offload processing; |
| 805 | * provide cfg params */ |
| 806 | WMI_LRO_CONFIG_CMDID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 807 | /*transfer data from host to firmware to write flash */ |
| 808 | WMI_TRANSFER_DATA_TO_FLASH_CMDID, |
Sreelakshmi Konamki | 58f4d62 | 2016-04-14 18:03:21 +0530 | [diff] [blame] | 809 | /** Command to enable/disable filtering of multicast IP with unicast mac */ |
| 810 | WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 811 | /** Command to control WISA mode */ |
| 812 | WMI_VDEV_WISA_CMDID, |
Himanshu Agarwal | b0497b5 | 2016-05-13 21:03:37 +0530 | [diff] [blame] | 813 | /** set debug log time stamp sync up with host */ |
| 814 | WMI_DBGLOG_TIME_STAMP_SYNC_CMDID, |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 815 | /** Command for host to set/delete multiple mcast filters */ |
| 816 | WMI_SET_MULTIPLE_MCAST_FILTER_CMDID, |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame] | 817 | /** upload a requested section of data from firmware flash to host */ |
| 818 | WMI_READ_DATA_FROM_FLASH_CMDID, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 819 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 820 | /* GPIO Configuration */ |
| 821 | WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO), |
| 822 | WMI_GPIO_OUTPUT_CMDID, |
| 823 | |
| 824 | /* Txbf configuration command */ |
| 825 | WMI_TXBF_CMDID, |
| 826 | |
| 827 | /* FWTEST Commands */ |
| 828 | WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = |
| 829 | WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST), |
| 830 | /** set NoA descs **/ |
| 831 | WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID, |
| 832 | /* UNIT Tests */ |
| 833 | WMI_UNIT_TEST_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 834 | /* set debug and tuning parameters */ |
| 835 | WMI_FWTEST_CMDID, |
| 836 | /* Q-Boost configuration test commands */ |
| 837 | WMI_QBOOST_CFG_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 838 | |
| 839 | /** TDLS Configuration */ |
| 840 | /** enable/disable TDLS */ |
| 841 | WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS), |
| 842 | /** set tdls peer state */ |
| 843 | WMI_TDLS_PEER_UPDATE_CMDID, |
| 844 | /** TDLS Offchannel control */ |
| 845 | WMI_TDLS_SET_OFFCHAN_MODE_CMDID, |
| 846 | |
| 847 | /** Resmgr Configuration */ |
| 848 | /** Adaptive OCS is enabled by default in the FW. This command is used to |
| 849 | * disable FW based adaptive OCS. |
| 850 | */ |
| 851 | WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = |
| 852 | WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR), |
| 853 | /** set the requested channel time quota for the home channels */ |
| 854 | WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID, |
| 855 | /** set the requested latency for the home channels */ |
| 856 | WMI_RESMGR_SET_CHAN_LATENCY_CMDID, |
| 857 | |
| 858 | /** STA SMPS Configuration */ |
| 859 | /** force SMPS mode */ |
| 860 | WMI_STA_SMPS_FORCE_MODE_CMDID = |
| 861 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS), |
| 862 | /** set SMPS parameters */ |
| 863 | WMI_STA_SMPS_PARAM_CMDID, |
| 864 | |
| 865 | /* Wlan HB commands */ |
| 866 | /* enalbe/disable wlan HB */ |
| 867 | WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB), |
| 868 | /* set tcp parameters for wlan HB */ |
| 869 | WMI_HB_SET_TCP_PARAMS_CMDID, |
| 870 | /* set tcp pkt filter for wlan HB */ |
| 871 | WMI_HB_SET_TCP_PKT_FILTER_CMDID, |
| 872 | /* set udp parameters for wlan HB */ |
| 873 | WMI_HB_SET_UDP_PARAMS_CMDID, |
| 874 | /* set udp pkt filter for wlan HB */ |
| 875 | WMI_HB_SET_UDP_PKT_FILTER_CMDID, |
| 876 | |
| 877 | /** Wlan RMC commands*/ |
| 878 | /** enable/disable RMC */ |
| 879 | WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC), |
| 880 | /** configure action frame period */ |
| 881 | WMI_RMC_SET_ACTION_PERIOD_CMDID, |
| 882 | /** For debug/future enhancement purposes only, |
| 883 | * configures/finetunes RMC algorithms */ |
| 884 | WMI_RMC_CONFIG_CMDID, |
| 885 | |
| 886 | /** WLAN MHF offload commands */ |
| 887 | /** enable/disable MHF offload */ |
| 888 | WMI_MHF_OFFLOAD_SET_MODE_CMDID = |
| 889 | WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL), |
| 890 | /** Plumb routing table for MHF offload */ |
| 891 | WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID, |
| 892 | |
| 893 | /*location scan commands */ |
| 894 | /*start batch scan */ |
| 895 | WMI_BATCH_SCAN_ENABLE_CMDID = |
| 896 | WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 897 | /*stop batch scan */ |
| 898 | WMI_BATCH_SCAN_DISABLE_CMDID, |
| 899 | /*get batch scan result */ |
| 900 | WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID, |
| 901 | /* OEM related cmd */ |
Manikandan Mohan | 05ac7ee | 2015-12-23 14:18:36 -0800 | [diff] [blame] | 902 | WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM), |
| 903 | WMI_OEM_REQUEST_CMDID, /* UNUSED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 904 | |
| 905 | /** Nan Request */ |
| 906 | WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN), |
| 907 | |
| 908 | /** Modem power state command */ |
| 909 | WMI_MODEM_POWER_STATE_CMDID = |
| 910 | WMI_CMD_GRP_START_ID(WMI_GRP_COEX), |
| 911 | WMI_CHAN_AVOID_UPDATE_CMDID, |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 912 | WMI_COEX_CONFIG_CMDID, |
Sandeep Puligilla | ff55fec | 2016-03-09 12:54:23 -0800 | [diff] [blame] | 913 | WMI_CHAN_AVOID_RPT_ALLOW_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 914 | |
| 915 | /** |
| 916 | * OBSS scan offload enable/disable commands |
| 917 | * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true: |
| 918 | * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready, |
| 919 | * 2. STA connect to a 2.4Ghz ht20/ht40 AP, |
| 920 | * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response) |
| 921 | * If OBSS parameters from beacon changed, also use enable CMD to update parameters. |
| 922 | * OBSS scan disable CMD will send to FW if have enabled when tearing down connection. |
| 923 | */ |
| 924 | WMI_OBSS_SCAN_ENABLE_CMDID = |
| 925 | WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL), |
| 926 | WMI_OBSS_SCAN_DISABLE_CMDID, |
| 927 | |
| 928 | /**LPI commands*/ |
| 929 | /**LPI mgmt snooping config command*/ |
| 930 | WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = |
| 931 | WMI_CMD_GRP_START_ID(WMI_GRP_LPI), |
| 932 | /**LPI scan start command*/ |
| 933 | WMI_LPI_START_SCAN_CMDID, |
| 934 | /**LPI scan stop command*/ |
| 935 | WMI_LPI_STOP_SCAN_CMDID, |
| 936 | |
| 937 | /** ExtScan commands */ |
| 938 | WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 939 | WMI_EXTSCAN_STOP_CMDID, |
| 940 | WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID, |
| 941 | WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID, |
| 942 | WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID, |
| 943 | WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID, |
| 944 | WMI_EXTSCAN_SET_CAPABILITIES_CMDID, |
| 945 | WMI_EXTSCAN_GET_CAPABILITIES_CMDID, |
| 946 | WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID, |
| 947 | WMI_EXTSCAN_CONFIGURE_MAWC_CMDID, |
| 948 | |
| 949 | /** DHCP server offload commands */ |
| 950 | WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = |
| 951 | WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL), |
| 952 | |
| 953 | /** IPA Offload features related commands */ |
| 954 | WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = |
| 955 | WMI_CMD_GRP_START_ID(WMI_GRP_IPA), |
| 956 | |
| 957 | /** mDNS responder offload commands */ |
| 958 | WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 959 | WMI_MDNS_SET_FQDN_CMDID, |
| 960 | WMI_MDNS_SET_RESPONSE_CMDID, |
| 961 | WMI_MDNS_GET_STATS_CMDID, |
| 962 | |
| 963 | /* enable/disable AP Authentication offload */ |
| 964 | WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 965 | WMI_SAP_SET_BLACKLIST_PARAM_CMDID, |
| 966 | |
| 967 | /** Out-of-context-of-BSS (OCB) commands */ |
| 968 | WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB), |
| 969 | WMI_OCB_SET_UTC_TIME_CMDID, |
| 970 | WMI_OCB_START_TIMING_ADVERT_CMDID, |
| 971 | WMI_OCB_STOP_TIMING_ADVERT_CMDID, |
| 972 | WMI_OCB_GET_TSF_TIMER_CMDID, |
| 973 | WMI_DCC_GET_STATS_CMDID, |
| 974 | WMI_DCC_CLEAR_STATS_CMDID, |
| 975 | WMI_DCC_UPDATE_NDL_CMDID, |
| 976 | /* System-On-Chip commands */ |
| 977 | WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC), |
| 978 | WMI_SOC_SET_HW_MODE_CMDID, |
| 979 | WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID, |
| 980 | WMI_SOC_SET_ANTENNA_MODE_CMDID, |
| 981 | |
| 982 | /* packet filter commands */ |
| 983 | WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER), |
| 984 | WMI_PACKET_FILTER_ENABLE_CMDID, |
| 985 | /** Motion Aided WiFi Connectivity (MAWC) commands */ |
| 986 | WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC), |
| 987 | |
| 988 | /** WMI commands related to PMF 11w Offload */ |
| 989 | WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = |
| 990 | WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD), |
| 991 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 992 | /** WMI commands related to pkt filter (BPF) offload */ |
| 993 | WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD), |
| 994 | WMI_BPF_GET_VDEV_STATS_CMDID, |
| 995 | WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID, |
| 996 | WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID, |
Anurag Chouhan | 11b53a1 | 2016-07-28 12:39:46 +0530 | [diff] [blame] | 997 | |
| 998 | /** WMI commands related to monitor mode. */ |
| 999 | WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR), |
| 1000 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1001 | /** |
| 1002 | * Nan Data commands |
| 1003 | * NDI - NAN Data Interface |
| 1004 | * NDP - NAN Data Path |
| 1005 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 1006 | /* Commands in prototyping phase */ |
| 1007 | WMI_NDI_GET_CAP_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PROTOTYPE), |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1008 | WMI_NDP_INITIATOR_REQ_CMDID, |
| 1009 | WMI_NDP_RESPONDER_REQ_CMDID, |
| 1010 | WMI_NDP_END_REQ_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1011 | } WMI_CMD_ID; |
| 1012 | |
| 1013 | typedef enum { |
| 1014 | /** WMI service is ready; after this event WMI messages can be sent/received */ |
| 1015 | WMI_SERVICE_READY_EVENTID = 0x1, |
| 1016 | /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */ |
| 1017 | WMI_READY_EVENTID, |
| 1018 | |
Nitesh Shah | ca1b2d0 | 2016-07-21 12:59:24 +0530 | [diff] [blame] | 1019 | /** |
| 1020 | * Specify what WMI services the target supports |
| 1021 | * (for services beyond what fits in the WMI_SERVICE_READY_EVENT |
| 1022 | * message's wmi_service_bitmap) |
| 1023 | */ |
| 1024 | WMI_SERVICE_AVAILABLE_EVENTID, |
| 1025 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1026 | /** Scan specific events */ |
| 1027 | WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), |
| 1028 | |
| 1029 | /* PDEV specific events */ |
| 1030 | /** TPC config for the current operating channel */ |
| 1031 | WMI_PDEV_TPC_CONFIG_EVENTID = |
| 1032 | WMI_EVT_GRP_START_ID(WMI_GRP_PDEV), |
| 1033 | /** Channel stats event */ |
| 1034 | WMI_CHAN_INFO_EVENTID, |
| 1035 | |
| 1036 | /** PHY Error specific WMI event */ |
| 1037 | WMI_PHYERR_EVENTID, |
| 1038 | |
| 1039 | /** eeprom dump event */ |
| 1040 | WMI_PDEV_DUMP_EVENTID, |
| 1041 | |
| 1042 | /** traffic pause event */ |
| 1043 | WMI_TX_PAUSE_EVENTID, |
| 1044 | |
| 1045 | /** DFS radar event */ |
| 1046 | WMI_DFS_RADAR_EVENTID, |
| 1047 | |
| 1048 | /** track L1SS entry and residency event */ |
| 1049 | WMI_PDEV_L1SS_TRACK_EVENTID, |
| 1050 | |
| 1051 | /** Report current temprature of the chip in Celcius degree */ |
| 1052 | WMI_PDEV_TEMPERATURE_EVENTID, |
| 1053 | |
| 1054 | /* Extension of WMI_SERVICE_READY msg with |
| 1055 | * extra target capability info |
| 1056 | */ |
| 1057 | WMI_SERVICE_READY_EXT_EVENTID, |
| 1058 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1059 | /** FIPS test mode event */ |
| 1060 | WMI_PDEV_FIPS_EVENTID, |
| 1061 | |
| 1062 | /** Channel hopping avoidance */ |
| 1063 | WMI_PDEV_CHANNEL_HOPPING_EVENTID, |
| 1064 | |
| 1065 | /** CCK ANI level event */ |
| 1066 | WMI_PDEV_ANI_CCK_LEVEL_EVENTID, |
| 1067 | |
| 1068 | /** OFDM ANI level event */ |
| 1069 | WMI_PDEV_ANI_OFDM_LEVEL_EVENTID, |
| 1070 | |
| 1071 | /** Tx PPDU params */ |
| 1072 | WMI_PDEV_TPC_EVENTID, |
| 1073 | |
| 1074 | /** NF Cal Power in DBR/DBM for all channels */ |
| 1075 | WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 1076 | |
| 1077 | /** SOC/PDEV events */ |
| 1078 | WMI_PDEV_SET_HW_MODE_RESP_EVENTID, |
| 1079 | WMI_PDEV_HW_MODE_TRANSITION_EVENTID, |
| 1080 | WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID, |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 1081 | /** Report ANT DIV feature's status */ |
| 1082 | WMI_PDEV_ANTDIV_STATUS_EVENTID, |
Anurag Chouhan | e326c92 | 2016-08-04 18:43:19 +0530 | [diff] [blame] | 1083 | /** Chip level Power stats */ |
| 1084 | WMI_PDEV_CHIP_POWER_STATS_EVENTID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 1085 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1086 | /* VDEV specific events */ |
| 1087 | /** VDEV started event in response to VDEV_START request */ |
| 1088 | WMI_VDEV_START_RESP_EVENTID = |
| 1089 | WMI_EVT_GRP_START_ID(WMI_GRP_VDEV), |
| 1090 | /** vdev stopped event , generated in response to VDEV_STOP request */ |
| 1091 | WMI_VDEV_STOPPED_EVENTID, |
| 1092 | /* Indicate the set key (used for setting per |
| 1093 | * peer unicast and per vdev multicast) |
| 1094 | * operation has completed */ |
| 1095 | WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID, |
| 1096 | /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please |
| 1097 | don't use this for any new implementations */ |
| 1098 | /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario. |
| 1099 | This request is valid only for vdevs operating in soft AP or P2P GO mode */ |
| 1100 | WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID, |
| 1101 | |
| 1102 | /* Return the TSF timestamp of specified vdev */ |
| 1103 | WMI_VDEV_TSF_REPORT_EVENTID, |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 1104 | |
| 1105 | /* FW response to Host for vdev delete cmdid */ |
| 1106 | WMI_VDEV_DELETE_RESP_EVENTID, |
| 1107 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1108 | /* peer specific events */ |
| 1109 | /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ |
| 1110 | WMI_PEER_STA_KICKOUT_EVENTID = |
| 1111 | WMI_EVT_GRP_START_ID(WMI_GRP_PEER), |
| 1112 | |
| 1113 | /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */ |
| 1114 | WMI_PEER_INFO_EVENTID, |
| 1115 | |
| 1116 | /** Event indicating that TX fail count reaching threshold */ |
| 1117 | WMI_PEER_TX_FAIL_CNT_THR_EVENTID, |
| 1118 | /** Return the estimate link speed for the Peer specified in the |
| 1119 | * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command. |
| 1120 | */ |
| 1121 | WMI_PEER_ESTIMATED_LINKSPEED_EVENTID, |
| 1122 | /* Return the peer state |
| 1123 | * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE |
| 1124 | */ |
| 1125 | WMI_PEER_STATE_EVENTID, |
| 1126 | |
| 1127 | /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD. |
| 1128 | * After that, host will send Mx message. |
| 1129 | * Otherwise, host will pause any Mx(STA:M2/M4) message |
| 1130 | */ |
| 1131 | WMI_PEER_ASSOC_CONF_EVENTID, |
| 1132 | |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 1133 | /* FW response to Host for peer delete cmdid */ |
| 1134 | WMI_PEER_DELETE_RESP_EVENTID, |
| 1135 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1136 | /** Valid rate code list for peer */ |
| 1137 | WMI_PEER_RATECODE_LIST_EVENTID, |
| 1138 | WMI_WDS_PEER_EVENTID, |
| 1139 | WMI_PEER_STA_PS_STATECHG_EVENTID, |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 1140 | /** Peer Ant Div Info Event with rssi per chain, etc */ |
| 1141 | WMI_PEER_ANTDIV_INFO_EVENTID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1142 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1143 | /* beacon/mgmt specific events */ |
| 1144 | /** RX management frame. the entire frame is carried along with the event. */ |
| 1145 | WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT), |
| 1146 | /** software beacon alert event to Host requesting host to Queue a beacon for transmission |
| 1147 | use only in host beacon mode */ |
| 1148 | WMI_HOST_SWBA_EVENTID, |
| 1149 | /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value. |
| 1150 | tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in |
| 1151 | staggered beacon transmission mode */ |
| 1152 | WMI_TBTTOFFSET_UPDATE_EVENTID, |
| 1153 | |
| 1154 | /** event after the first beacon is transmitted following |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1155 | a change in the template.*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1156 | WMI_OFFLOAD_BCN_TX_STATUS_EVENTID, |
| 1157 | /** event after the first probe response is transmitted following |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1158 | a change in the template.*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1159 | WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID, |
| 1160 | /** Event for Mgmt TX completion event */ |
| 1161 | WMI_MGMT_TX_COMPLETION_EVENTID, |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 1162 | /** Event for Mgmt TX bundle completion event */ |
| 1163 | WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID, |
| 1164 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1165 | |
| 1166 | /*ADDBA Related WMI Events */ |
| 1167 | /** Indication the completion of the prior |
| 1168 | WMI_PEER_TID_DELBA_CMDID(initiator) */ |
| 1169 | WMI_TX_DELBA_COMPLETE_EVENTID = |
| 1170 | WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG), |
| 1171 | /** Indication the completion of the prior |
| 1172 | *WMI_PEER_TID_ADDBA_CMDID(initiator) */ |
| 1173 | WMI_TX_ADDBA_COMPLETE_EVENTID, |
| 1174 | |
| 1175 | /* Seq num returned from hw for a sta/tid pair */ |
| 1176 | WMI_BA_RSP_SSN_EVENTID, |
| 1177 | |
| 1178 | /* Aggregation state requested by BTC */ |
| 1179 | WMI_AGGR_STATE_TRIG_EVENTID, |
| 1180 | |
| 1181 | /** Roam event to trigger roaming on host */ |
| 1182 | WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM), |
| 1183 | |
| 1184 | /** matching AP found from list of profiles */ |
| 1185 | WMI_PROFILE_MATCH, |
| 1186 | /** roam synch event */ |
| 1187 | WMI_ROAM_SYNCH_EVENTID, |
| 1188 | |
| 1189 | /** P2P disc found */ |
| 1190 | WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1191 | /*send noa info to host when noa is changed for beacon tx offload enable */ |
| 1192 | WMI_P2P_NOA_EVENTID, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 1193 | /** send p2p listen offload stopped event with different reason */ |
| 1194 | WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1195 | |
| 1196 | /** Send EGAP Info to host */ |
| 1197 | WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS), |
| 1198 | |
| 1199 | /* send pdev resume event to host after pdev resume. */ |
| 1200 | WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND), |
| 1201 | |
| 1202 | /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. |
| 1203 | will cary wake reason */ |
| 1204 | WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW), |
| 1205 | WMI_D0_WOW_DISABLE_ACK_EVENTID, |
| 1206 | WMI_WOW_INITIAL_WAKEUP_EVENTID, |
| 1207 | |
| 1208 | /*RTT related event ID */ |
| 1209 | /** RTT measurement report */ |
| 1210 | WMI_RTT_MEASUREMENT_REPORT_EVENTID = |
| 1211 | WMI_EVT_GRP_START_ID(WMI_GRP_RTT), |
| 1212 | /** TSF measurement report */ |
| 1213 | WMI_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1214 | /** RTT error report */ |
| 1215 | WMI_RTT_ERROR_REPORT_EVENTID, |
| 1216 | /*STATS specific events */ |
| 1217 | /** txrx stats event requested by host */ |
| 1218 | WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS), |
| 1219 | /** FW iface link stats Event */ |
| 1220 | WMI_IFACE_LINK_STATS_EVENTID, |
| 1221 | /** FW iface peer link stats Event */ |
| 1222 | WMI_PEER_LINK_STATS_EVENTID, |
| 1223 | /** FW Update radio stats Event */ |
| 1224 | WMI_RADIO_LINK_STATS_EVENTID, |
| 1225 | /** Firmware memory dump Complete event*/ |
| 1226 | WMI_UPDATE_FW_MEM_DUMP_EVENTID, |
| 1227 | |
| 1228 | /** Event indicating the DIAG logs/events supported by FW */ |
| 1229 | WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID, |
| 1230 | |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 1231 | /** Instantaneous RSSI event */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1232 | WMI_INST_RSSI_STATS_EVENTID, |
| 1233 | |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 1234 | /** FW update tx power levels event */ |
| 1235 | WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID, |
| 1236 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1237 | /** NLO specific events */ |
| 1238 | /** NLO match event after the first match */ |
| 1239 | WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 1240 | |
| 1241 | /** NLO scan complete event */ |
| 1242 | WMI_NLO_SCAN_COMPLETE_EVENTID, |
| 1243 | |
| 1244 | /** APFIND specific events */ |
| 1245 | WMI_APFIND_EVENTID, |
| 1246 | |
| 1247 | /** passpoint network match event */ |
| 1248 | WMI_PASSPOINT_MATCH_EVENTID, |
| 1249 | |
| 1250 | /** GTK offload stautus event requested by host */ |
| 1251 | WMI_GTK_OFFLOAD_STATUS_EVENTID = |
| 1252 | WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 1253 | |
| 1254 | /** GTK offload failed to rekey event */ |
| 1255 | WMI_GTK_REKEY_FAIL_EVENTID, |
| 1256 | /* CSA IE received event */ |
| 1257 | WMI_CSA_HANDLING_EVENTID = |
| 1258 | WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 1259 | |
| 1260 | /*chatter query reply event */ |
| 1261 | WMI_CHATTER_PC_QUERY_EVENTID = |
| 1262 | WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER), |
| 1263 | |
| 1264 | /** echo event in response to echo command */ |
| 1265 | WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC), |
| 1266 | |
| 1267 | /* !!IMPORTANT!! |
| 1268 | * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group, |
| 1269 | * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID, |
| 1270 | * as we MUST have a fixed value here to maintain compatibility between |
| 1271 | * UTF and the ART2 driver |
| 1272 | */ |
| 1273 | /** UTF specific WMI event */ |
| 1274 | WMI_PDEV_UTF_EVENTID, |
| 1275 | |
| 1276 | /** event carries buffered debug messages */ |
| 1277 | WMI_DEBUG_MESG_EVENTID, |
| 1278 | /** FW stats(periodic or on shot) */ |
| 1279 | WMI_UPDATE_STATS_EVENTID, |
| 1280 | /** debug print message used for tracing FW code while debugging */ |
| 1281 | WMI_DEBUG_PRINT_EVENTID, |
| 1282 | /** DCS wlan or non-wlan interference event |
| 1283 | */ |
| 1284 | WMI_DCS_INTERFERENCE_EVENTID, |
| 1285 | /** VI spoecific event */ |
| 1286 | WMI_PDEV_QVIT_EVENTID, |
| 1287 | /** FW code profile data in response to profile request */ |
| 1288 | WMI_WLAN_PROFILE_DATA_EVENTID, |
| 1289 | /* Factory Testing Mode request event |
| 1290 | * used for integrated chipsets */ |
| 1291 | WMI_PDEV_FTM_INTG_EVENTID, |
| 1292 | /* avoid list of frequencies . |
| 1293 | */ |
| 1294 | WMI_WLAN_FREQ_AVOID_EVENTID, |
| 1295 | /* Indicate the keepalive parameters */ |
| 1296 | WMI_VDEV_GET_KEEPALIVE_EVENTID, |
| 1297 | /* Thermal Management event */ |
| 1298 | WMI_THERMAL_MGMT_EVENTID, |
| 1299 | |
| 1300 | /* Container for QXDM/DIAG events */ |
| 1301 | WMI_DIAG_DATA_CONTAINER_EVENTID, |
| 1302 | |
| 1303 | /* host auto shutdown event */ |
| 1304 | WMI_HOST_AUTO_SHUTDOWN_EVENTID, |
| 1305 | |
| 1306 | /*update mib counters together with WMI_UPDATE_STATS_EVENTID */ |
| 1307 | WMI_UPDATE_WHAL_MIB_STATS_EVENTID, |
| 1308 | |
| 1309 | /*update ht/vht info based on vdev (rx and tx NSS and preamble) */ |
| 1310 | WMI_UPDATE_VDEV_RATE_STATS_EVENTID, |
| 1311 | |
| 1312 | WMI_DIAG_EVENTID, |
| 1313 | |
| 1314 | /** Set OCB Sched Response, deprecated */ |
| 1315 | WMI_OCB_SET_SCHED_EVENTID, |
| 1316 | |
| 1317 | /* event to indicate the flush of the buffered debug messages is complete*/ |
| 1318 | WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID, |
| 1319 | /* event to report mix/max RSSI breach events */ |
| 1320 | WMI_RSSI_BREACH_EVENTID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 1321 | /* event to report completion of data storage into flash memory */ |
| 1322 | WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1323 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 1324 | /** event to report SCPC calibrated data to host */ |
| 1325 | WMI_PDEV_UTF_SCPC_EVENTID, |
| 1326 | |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame] | 1327 | /** event to provide requested data from the target's flash memory */ |
| 1328 | WMI_READ_DATA_FROM_FLASH_EVENTID, |
| 1329 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1330 | /* GPIO Event */ |
| 1331 | WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), |
| 1332 | /** upload H_CV info WMI event |
| 1333 | * to indicate uploaded H_CV info to host |
| 1334 | */ |
| 1335 | WMI_UPLOADH_EVENTID, |
| 1336 | |
| 1337 | /** capture H info WMI event |
| 1338 | * to indicate captured H info to host |
| 1339 | */ |
| 1340 | WMI_CAPTUREH_EVENTID, |
| 1341 | /* hw RFkill */ |
| 1342 | WMI_RFKILL_STATE_CHANGE_EVENTID, |
| 1343 | |
| 1344 | /* TDLS Event */ |
| 1345 | WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS), |
| 1346 | |
Manikandan Mohan | 55c94d6 | 2015-12-04 13:47:58 -0800 | [diff] [blame] | 1347 | /* STA SMPS Event */ |
| 1348 | /* force SMPS mode */ |
| 1349 | WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = |
| 1350 | WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS), |
| 1351 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1352 | /*location scan event */ |
| 1353 | /*report the firmware's capability of batch scan */ |
| 1354 | WMI_BATCH_SCAN_ENABLED_EVENTID = |
| 1355 | WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 1356 | /*batch scan result */ |
| 1357 | WMI_BATCH_SCAN_RESULT_EVENTID, |
| 1358 | /* OEM Event */ |
Krishna Kumaar Natarajan | 1dfa353 | 2015-11-19 16:16:20 -0800 | [diff] [blame] | 1359 | WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */ |
| 1360 | WMI_EVT_GRP_START_ID(WMI_GRP_OEM), |
| 1361 | WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */ |
| 1362 | WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */ |
| 1363 | WMI_OEM_RESPONSE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1364 | |
| 1365 | /* NAN Event */ |
| 1366 | WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN), |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1367 | WMI_NAN_DISC_IFACE_CREATED_EVENTID, |
| 1368 | WMI_NAN_DISC_IFACE_DELETED_EVENTID, |
| 1369 | WMI_NAN_STARTED_CLUSTER_EVENTID, |
| 1370 | WMI_NAN_JOINED_CLUSTER_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1371 | |
| 1372 | /* LPI Event */ |
| 1373 | WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI), |
| 1374 | WMI_LPI_STATUS_EVENTID, |
| 1375 | WMI_LPI_HANDOFF_EVENTID, |
| 1376 | |
| 1377 | /* ExtScan events */ |
| 1378 | WMI_EXTSCAN_START_STOP_EVENTID = |
| 1379 | WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 1380 | WMI_EXTSCAN_OPERATION_EVENTID, |
| 1381 | WMI_EXTSCAN_TABLE_USAGE_EVENTID, |
| 1382 | WMI_EXTSCAN_CACHED_RESULTS_EVENTID, |
| 1383 | WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID, |
| 1384 | WMI_EXTSCAN_HOTLIST_MATCH_EVENTID, |
| 1385 | WMI_EXTSCAN_CAPABILITIES_EVENTID, |
| 1386 | WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID, |
| 1387 | |
| 1388 | /* mDNS offload events */ |
| 1389 | WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 1390 | |
| 1391 | /* SAP Authentication offload events */ |
| 1392 | WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 1393 | WMI_SAP_OFL_DEL_STA_EVENTID, |
| 1394 | |
| 1395 | /** Out-of-context-of-bss (OCB) events */ |
| 1396 | WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB), |
| 1397 | WMI_OCB_GET_TSF_TIMER_RESP_EVENTID, |
| 1398 | WMI_DCC_GET_STATS_RESP_EVENTID, |
| 1399 | WMI_DCC_UPDATE_NDL_RESP_EVENTID, |
| 1400 | WMI_DCC_STATS_EVENTID, |
| 1401 | /* System-On-Chip events */ |
| 1402 | WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC), |
| 1403 | WMI_SOC_HW_MODE_TRANSITION_EVENTID, |
| 1404 | WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID, |
| 1405 | /** Motion Aided WiFi Connectivity (MAWC) events */ |
| 1406 | WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC), |
| 1407 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 1408 | /** pkt filter (BPF) offload relevant events */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 1409 | WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD), |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 1410 | WMI_BPF_VDEV_STATS_INFO_EVENTID, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1411 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 1412 | /* Events in Prototyping phase */ |
| 1413 | WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE), |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1414 | WMI_NDP_INITIATOR_RSP_EVENTID, |
| 1415 | WMI_NDP_RESPONDER_RSP_EVENTID, |
| 1416 | WMI_NDP_END_RSP_EVENTID, |
| 1417 | WMI_NDP_INDICATION_EVENTID, |
| 1418 | WMI_NDP_CONFIRM_EVENTID, |
| 1419 | WMI_NDP_END_INDICATION_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1420 | } WMI_EVT_ID; |
| 1421 | |
| 1422 | /* defines for OEM message sub-types */ |
| 1423 | #define WMI_OEM_CAPABILITY_REQ 0x01 |
| 1424 | #define WMI_OEM_CAPABILITY_RSP 0x02 |
| 1425 | #define WMI_OEM_MEASUREMENT_REQ 0x03 |
| 1426 | #define WMI_OEM_MEASUREMENT_RSP 0x04 |
| 1427 | #define WMI_OEM_ERROR_REPORT_RSP 0x05 |
| 1428 | #define WMI_OEM_NAN_MEAS_REQ 0x06 |
| 1429 | #define WMI_OEM_NAN_MEAS_RSP 0x07 |
| 1430 | #define WMI_OEM_NAN_PEER_INFO 0x08 |
| 1431 | #define WMI_OEM_CONFIGURE_LCR 0x09 |
| 1432 | #define WMI_OEM_CONFIGURE_LCI 0x0A |
| 1433 | |
| 1434 | /* below message subtype is internal to CLD. Target should |
| 1435 | * never use internal response type |
| 1436 | */ |
| 1437 | #define WMI_OEM_INTERNAL_RSP 0xdeadbeef |
| 1438 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1439 | #define WMI_CHAN_LIST_TAG 0x1 |
| 1440 | #define WMI_SSID_LIST_TAG 0x2 |
| 1441 | #define WMI_BSSID_LIST_TAG 0x3 |
| 1442 | #define WMI_IE_TAG 0x4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1443 | |
| 1444 | typedef struct { |
| 1445 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */ |
| 1446 | /** primary 20 MHz channel frequency in mhz */ |
| 1447 | A_UINT32 mhz; |
| 1448 | /** Center frequency 1 in MHz*/ |
| 1449 | A_UINT32 band_center_freq1; |
| 1450 | /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ |
| 1451 | A_UINT32 band_center_freq2; |
| 1452 | /** channel info described below */ |
| 1453 | A_UINT32 info; |
| 1454 | /** contains min power, max power, reg power and reg class id. */ |
| 1455 | A_UINT32 reg_info_1; |
| 1456 | /** contains antennamax */ |
| 1457 | A_UINT32 reg_info_2; |
| 1458 | } wmi_channel; |
| 1459 | |
| 1460 | typedef enum { |
| 1461 | WMI_CHANNEL_CHANGE_CAUSE_NONE = 0, |
| 1462 | WMI_CHANNEL_CHANGE_CAUSE_CSA, |
| 1463 | } wmi_channel_change_cause; |
| 1464 | |
| 1465 | /** channel info consists of 6 bits of channel mode */ |
| 1466 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1467 | #define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1468 | (pwmi_channel)->info &= 0xffffffc0; \ |
| 1469 | (pwmi_channel)->info |= (val); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1470 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1471 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1472 | #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1473 | |
| 1474 | #define WMI_CHAN_FLAG_HT40_PLUS 6 |
| 1475 | #define WMI_CHAN_FLAG_PASSIVE 7 |
| 1476 | #define WMI_CHAN_ADHOC_ALLOWED 8 |
| 1477 | #define WMI_CHAN_AP_DISABLED 9 |
| 1478 | #define WMI_CHAN_FLAG_DFS 10 |
| 1479 | #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */ |
| 1480 | #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */ |
| 1481 | #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */ |
| 1482 | #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */ |
| 1483 | #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 1484 | /* Enable radar event reporting for sec80 in VHT80p80 */ |
| 1485 | #define WMI_CHAN_FLAG_DFS_CFREQ2 16 |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1486 | #define WMI_CHAN_FLAG_ALLOW_HE 17 /* HE (11ax) is allowed on this channel */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1487 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1488 | #define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1489 | (pwmi_channel)->info |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1490 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1491 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1492 | #define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1493 | (((pwmi_channel)->info & (1 << flag)) >> flag) |
| 1494 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1495 | #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1496 | (pwmi_channel)->reg_info_1 &= 0xffffff00; \ |
| 1497 | (pwmi_channel)->reg_info_1 |= (val&0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1498 | } while (0) |
| 1499 | #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1500 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1501 | #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1502 | (pwmi_channel)->reg_info_1 &= 0xffff00ff; \ |
| 1503 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1504 | } while (0) |
| 1505 | #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 8) & 0xff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1506 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1507 | #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1508 | (pwmi_channel)->reg_info_1 &= 0xff00ffff; \ |
| 1509 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1510 | } while (0) |
| 1511 | #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff) |
| 1512 | #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1513 | (pwmi_channel)->reg_info_1 &= 0x00ffffff; \ |
| 1514 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1515 | } while (0) |
| 1516 | #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 24) & 0xff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1517 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1518 | #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1519 | (pwmi_channel)->reg_info_2 &= 0xffffff00; \ |
| 1520 | (pwmi_channel)->reg_info_2 |= (val&0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1521 | } while (0) |
| 1522 | #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1523 | |
| 1524 | /* max tx power is in 1 dBm units */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1525 | #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1526 | (pwmi_channel)->reg_info_2 &= 0xffff00ff; \ |
| 1527 | (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1528 | } while (0) |
| 1529 | #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1530 | |
| 1531 | |
| 1532 | /** HT Capabilities*/ |
| 1533 | #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ |
| 1534 | #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */ |
| 1535 | #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ |
| 1536 | #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ |
| 1537 | #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3 |
| 1538 | #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ |
| 1539 | #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4 |
| 1540 | #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */ |
| 1541 | #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ |
| 1542 | #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
| 1543 | #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
| 1544 | #define WMI_HT_CAP_HT40_SGI 0x0800 |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1545 | #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */ |
| 1546 | #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1547 | |
| 1548 | /* These macros should be used when we wish to advertise STBC support for |
| 1549 | * only 1SS or 2SS or 3SS. */ |
| 1550 | #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ |
| 1551 | #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ |
| 1552 | #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ |
| 1553 | |
| 1554 | #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ |
| 1555 | WMI_HT_CAP_HT20_SGI | \ |
| 1556 | WMI_HT_CAP_HT40_SGI | \ |
| 1557 | WMI_HT_CAP_TX_STBC | \ |
| 1558 | WMI_HT_CAP_RX_STBC | \ |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1559 | WMI_HT_CAP_LDPC | \ |
| 1560 | WMI_HT_CAP_TX_LDPC | \ |
| 1561 | WMI_HT_CAP_RX_LDPC) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1562 | |
| 1563 | /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information |
| 1564 | field. The fields not defined here are not supported, or reserved. |
| 1565 | Do not change these masks and if you have to add new one follow the |
| 1566 | bitmask as specified by 802.11ac draft. |
| 1567 | */ |
| 1568 | |
| 1569 | #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001 |
| 1570 | #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 |
| 1571 | #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 |
| 1572 | #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004 |
| 1573 | #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008 |
| 1574 | #define WMI_VHT_CAP_RX_LDPC 0x00000010 |
| 1575 | #define WMI_VHT_CAP_SGI_80MHZ 0x00000020 |
| 1576 | #define WMI_VHT_CAP_SGI_160MHZ 0x00000040 |
| 1577 | #define WMI_VHT_CAP_TX_STBC 0x00000080 |
| 1578 | #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300 |
| 1579 | #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8 |
| 1580 | #define WMI_VHT_CAP_SU_BFORMER 0x00000800 |
| 1581 | #define WMI_VHT_CAP_SU_BFORMEE 0x00001000 |
| 1582 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 |
| 1583 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 |
| 1584 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 |
| 1585 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 |
| 1586 | #define WMI_VHT_CAP_MU_BFORMER 0x00080000 |
| 1587 | #define WMI_VHT_CAP_MU_BFORMEE 0x00100000 |
| 1588 | #define WMI_VHT_CAP_TXOP_PS 0x00200000 |
| 1589 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 |
| 1590 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23 |
| 1591 | #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000 |
| 1592 | #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000 |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1593 | #define WMI_VHT_CAP_TX_LDPC 0x40000000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1594 | |
| 1595 | /* TEMPORARY: |
| 1596 | * Preserve the incorrect old name as an alias for the correct new name |
| 1597 | * until all references to the old name have been removed from all hosts |
| 1598 | * and targets. |
| 1599 | */ |
| 1600 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT |
| 1601 | |
| 1602 | /* These macros should be used when we wish to advertise STBC support for |
| 1603 | * only 1SS or 2SS or 3SS. */ |
| 1604 | #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100 |
| 1605 | #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200 |
| 1606 | #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300 |
| 1607 | |
| 1608 | /* TEMPORARY: |
| 1609 | * Preserve the incorrect old name as an alias for the correct new name |
| 1610 | * until all references to the old name have been removed from all hosts |
| 1611 | * and targets. |
| 1612 | */ |
| 1613 | #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS |
| 1614 | |
| 1615 | #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \ |
| 1616 | WMI_VHT_CAP_SGI_80MHZ | \ |
| 1617 | WMI_VHT_CAP_TX_STBC | \ |
| 1618 | WMI_VHT_CAP_RX_STBC_MASK | \ |
| 1619 | WMI_VHT_CAP_RX_LDPC | \ |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1620 | WMI_VHT_CAP_TX_LDPC | \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1621 | WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \ |
| 1622 | WMI_VHT_CAP_RX_FIXED_ANT | \ |
| 1623 | WMI_VHT_CAP_TX_FIXED_ANT) |
| 1624 | |
| 1625 | /* Interested readers refer to Rx/Tx MCS Map definition as defined in |
| 1626 | 802.11ac |
| 1627 | */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1628 | #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1629 | #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 |
| 1630 | #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 |
| 1631 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1632 | /** 11ax capabilities */ |
| 1633 | #define WMI_HE_CAP_PPE_PRESENT 0x00000001 |
| 1634 | #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002 |
| 1635 | #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004 |
| 1636 | #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018 |
| 1637 | #define WMI_HE_FRAG_SUPPORT_SHIFT 3 |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 1638 | |
| 1639 | |
| 1640 | /* fragmentation support field value */ |
| 1641 | enum { |
| 1642 | WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */ |
| 1643 | /* |
| 1644 | * support for fragments within a VHT single MPDU, |
| 1645 | * no support for fragments within AMPDU |
| 1646 | */ |
| 1647 | WMI_HE_FRAG_SUPPORT_LEVEL1, |
| 1648 | /* support for up to 1 fragment per MSDU within a single A-MPDU */ |
| 1649 | WMI_HE_FRAG_SUPPORT_LEVEL2, |
| 1650 | /* support for multiple fragments per MSDU within an A-MPDU */ |
| 1651 | WMI_HE_FRAG_SUPPORT_LEVEL3, |
| 1652 | }; |
| 1653 | |
| 1654 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1655 | /** NOTE: This defs cannot be changed in the future without |
| 1656 | * breaking WMI compatibility |
| 1657 | */ |
| 1658 | #define WMI_MAX_NUM_SS 8 |
| 1659 | #define WMI_MAX_NUM_RU 4 |
| 1660 | |
| 1661 | /* |
| 1662 | * Figure 8 554ae: -PPE Threshold Info field format |
| 1663 | * we pack PPET16 and PPT8 for four RU's in one element of array. |
| 1664 | * |
| 1665 | * ppet16_ppet8_ru3_ru0 array element 0 holds: |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1666 | * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1667 | *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1| |
| 1668 | *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 | |
| 1669 | * |
| 1670 | * ppet16_ppet8_ru3_ru0 array element 1 holds: |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1671 | * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1672 | *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1| |
| 1673 | *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 | |
| 1674 | * |
| 1675 | * etc. |
| 1676 | */ |
| 1677 | |
| 1678 | /* |
| 1679 | * Note that in these macros, "ru" is one-based, not zero-based, while |
| 1680 | * nssm1 is zero-based. |
| 1681 | */ |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1682 | #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1683 | do { \ |
| 1684 | ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \ |
| 1685 | ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \ |
| 1686 | } while (0) |
| 1687 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1688 | #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1689 | ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7) |
| 1690 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1691 | #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1692 | do { \ |
| 1693 | ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \ |
| 1694 | ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \ |
| 1695 | } while (0) |
| 1696 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1697 | #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1698 | ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7) |
| 1699 | |
| 1700 | typedef struct _wmi_ppe_threshold { |
| 1701 | A_UINT32 numss_m1; /** NSS - 1*/ |
| 1702 | A_UINT32 ru_count; /** Max RU count */ |
| 1703 | /** ppet8 and ppet16 for max num ss */ |
| 1704 | A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; |
| 1705 | } wmi_ppe_threshold; |
| 1706 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1707 | /* WMI_SYS_CAPS_* refer to the capabilities that system support |
| 1708 | */ |
| 1709 | #define WMI_SYS_CAP_ENABLE 0x00000001 |
| 1710 | #define WMI_SYS_CAP_TXPOWER 0x00000002 |
| 1711 | |
| 1712 | /* |
| 1713 | * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions. |
| 1714 | * Bits 5:0 are reserved |
| 1715 | */ |
| 1716 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28) |
| 1717 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24) |
| 1718 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20) |
| 1719 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16) |
| 1720 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12) |
| 1721 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8) |
| 1722 | #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7) |
| 1723 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6) |
| 1724 | |
| 1725 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1726 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1727 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1728 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1729 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1730 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1731 | #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1732 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1733 | |
| 1734 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \ |
| 1735 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value) |
| 1736 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \ |
| 1737 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value) |
| 1738 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \ |
| 1739 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value) |
| 1740 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \ |
| 1741 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value) |
| 1742 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \ |
| 1743 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value) |
| 1744 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \ |
| 1745 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value) |
| 1746 | #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \ |
| 1747 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value) |
| 1748 | #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \ |
| 1749 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value) |
| 1750 | |
| 1751 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \ |
| 1752 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1753 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \ |
| 1754 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1755 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \ |
| 1756 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1757 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \ |
| 1758 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1759 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \ |
| 1760 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1761 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \ |
| 1762 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1763 | #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \ |
| 1764 | ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1765 | #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \ |
| 1766 | ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1767 | |
| 1768 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31) |
| 1769 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30) |
| 1770 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29) |
| 1771 | |
| 1772 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1773 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1774 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1775 | |
| 1776 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \ |
| 1777 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value) |
| 1778 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \ |
| 1779 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value) |
| 1780 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \ |
| 1781 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value) |
| 1782 | |
| 1783 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \ |
| 1784 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1785 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \ |
| 1786 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1787 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \ |
| 1788 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1789 | |
| 1790 | #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31) |
| 1791 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30) |
| 1792 | |
| 1793 | #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1794 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1795 | |
| 1796 | #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \ |
| 1797 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value) |
| 1798 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \ |
| 1799 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value) |
| 1800 | |
| 1801 | #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \ |
| 1802 | ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1803 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \ |
| 1804 | ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1805 | |
| 1806 | /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */ |
| 1807 | typedef struct _wmi_abi_version { |
| 1808 | A_UINT32 abi_version_0; |
| 1809 | /** WMI Major and Minor versions */ |
| 1810 | A_UINT32 abi_version_1; |
| 1811 | /** WMI change revision */ |
| 1812 | A_UINT32 abi_version_ns_0; |
| 1813 | /** ABI version namespace first four dwords */ |
| 1814 | A_UINT32 abi_version_ns_1; |
| 1815 | /** ABI version namespace second four dwords */ |
| 1816 | A_UINT32 abi_version_ns_2; |
| 1817 | /** ABI version namespace third four dwords */ |
| 1818 | A_UINT32 abi_version_ns_3; |
| 1819 | /** ABI version namespace fourth four dwords */ |
| 1820 | } wmi_abi_version; |
| 1821 | |
| 1822 | /* |
| 1823 | * maximum number of memroy requests allowed from FW. |
| 1824 | */ |
| 1825 | #define WMI_MAX_MEM_REQS 16 |
| 1826 | |
| 1827 | /* !!NOTE!!: |
| 1828 | * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility. |
| 1829 | * Please don't change it. |
| 1830 | */ |
| 1831 | #define HW_BD_INFO_SIZE 5 |
| 1832 | |
| 1833 | /** |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 1834 | * PDEV ID to identify the physical device, |
| 1835 | * value 0 reserved for SOC level commands/event |
| 1836 | */ |
| 1837 | #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */ |
| 1838 | #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */ |
| 1839 | #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */ |
| 1840 | #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */ |
| 1841 | |
| 1842 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1843 | * The following struct holds optional payload for |
| 1844 | * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the |
| 1845 | * device capability to the host. |
| 1846 | */ |
| 1847 | typedef struct { |
| 1848 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */ |
| 1849 | A_UINT32 fw_build_vers; /* firmware build number */ |
| 1850 | wmi_abi_version fw_abi_vers; |
| 1851 | A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */ |
| 1852 | A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */ |
| 1853 | A_UINT32 num_rf_chains; |
| 1854 | /* The following field is only valid for service type WMI_SERVICE_11AC */ |
| 1855 | A_UINT32 ht_cap_info; /* WMI HT Capability */ |
| 1856 | A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */ |
| 1857 | A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */ |
| 1858 | A_UINT32 hw_min_tx_power; |
| 1859 | A_UINT32 hw_max_tx_power; |
| 1860 | A_UINT32 sys_cap_info; |
| 1861 | A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ |
| 1862 | /** Max beacon and Probe Response IE offload size (includes |
| 1863 | * optional P2P IEs) */ |
| 1864 | A_UINT32 max_bcn_ie_size; |
| 1865 | /* |
| 1866 | * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT. |
| 1867 | * FW uses this as FW extesnsion memory for saving its data structures. Only valid |
| 1868 | * for low latency interfaces like PCIE where FW can access this memory directly (or) |
| 1869 | * by DMA. |
| 1870 | */ |
| 1871 | A_UINT32 num_mem_reqs; |
| 1872 | /* Max No. scan channels target can support |
| 1873 | * If FW is too old and doesn't indicate this number, host side value will default to |
| 1874 | * 0, and host will take the original compatible value (62) for future scan channel |
| 1875 | * setup. |
| 1876 | */ |
| 1877 | A_UINT32 max_num_scan_channels; |
| 1878 | |
| 1879 | /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID. |
| 1880 | * Default 0 means tha hw_bd_info[] is invalid(legacy board). |
| 1881 | */ |
| 1882 | A_UINT32 hw_bd_id; |
| 1883 | A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */ |
| 1884 | |
| 1885 | /* |
| 1886 | * Number of MACs supported, i.e. a DBS-capable device will return 2 |
| 1887 | */ |
| 1888 | A_UINT32 max_supported_macs; |
| 1889 | |
| 1890 | /* |
| 1891 | * FW sub-feature capabilities to be used in concurrence with |
| 1892 | * wmi_service_bitmap |
| 1893 | * values from enum WMI_FW_SUB_FEAT_CAPS |
| 1894 | */ |
| 1895 | A_UINT32 wmi_fw_sub_feat_caps; |
| 1896 | /* |
| 1897 | * Number of Dual Band Simultaneous (DBS) hardware modes |
| 1898 | */ |
| 1899 | A_UINT32 num_dbs_hw_modes; |
| 1900 | /* |
| 1901 | * txrx_chainmask |
| 1902 | * [7:0] - 2G band tx chain mask |
| 1903 | * [15:8] - 2G band rx chain mask |
| 1904 | * [23:16] - 5G band tx chain mask |
| 1905 | * [31:24] - 5G band rx chain mask |
| 1906 | * |
| 1907 | */ |
| 1908 | A_UINT32 txrx_chainmask; |
| 1909 | |
| 1910 | /* |
| 1911 | * default Dual Band Simultaneous (DBS) hardware mode |
| 1912 | */ |
| 1913 | A_UINT32 default_dbs_hw_mode_index; |
| 1914 | |
| 1915 | /* |
| 1916 | * Number of msdu descriptors target would use |
| 1917 | */ |
| 1918 | A_UINT32 num_msdu_desc; |
| 1919 | |
| 1920 | /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV. |
| 1921 | * HAL_REG_CAPABILITIES hal_reg_capabilities; |
| 1922 | * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE]; |
| 1923 | * wlan_host_mem_req mem_reqs[]; |
| 1924 | * wlan_dbs_hw_mode_list[]; |
| 1925 | */ |
| 1926 | } wmi_service_ready_event_fixed_param; |
| 1927 | |
Nitesh Shah | ca1b2d0 | 2016-07-21 12:59:24 +0530 | [diff] [blame] | 1928 | #define WMI_SERVICE_SEGMENT_BM_SIZE32 4 /* 4x A_UINT32 = 128 bits */ |
| 1929 | typedef struct { |
| 1930 | /** |
| 1931 | * TLV tag and len; tag equals |
| 1932 | * WMITLV_TAG_STRUC_wmi_service_available_event_fixed_param |
| 1933 | */ |
| 1934 | A_UINT32 tlv_header; |
| 1935 | /** |
| 1936 | * The wmi_service_segment offset field specifies the position |
| 1937 | * within the logical bitmap of WMI service flags at which the |
| 1938 | * WMI service flags specified within this message begin. |
| 1939 | * Since the first 128 WMI service flags are specified within |
| 1940 | * the wmi_service_bitmap field of the WMI_SERVICE_READY_EVENT |
| 1941 | * message, the wmi_service_segment_offset value is expected to |
| 1942 | * be 128 or more. |
| 1943 | */ |
| 1944 | A_UINT32 wmi_service_segment_offset; |
| 1945 | A_UINT32 wmi_service_segment_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32]; |
| 1946 | } wmi_service_available_event_fixed_param; |
| 1947 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1948 | typedef struct { |
| 1949 | /* TLV tag and len; tag equals |
| 1950 | *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT |
| 1951 | */ |
| 1952 | A_UINT32 tlv_header; |
| 1953 | /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */ |
| 1954 | A_UINT32 default_conc_scan_config_bits; |
| 1955 | /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */ |
| 1956 | A_UINT32 default_fw_config_bits; |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1957 | wmi_ppe_threshold ppet; |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 1958 | /* |
| 1959 | * see section 8.4.2.213 from draft r8 of 802.11ax; |
| 1960 | * see WMI_HE_FRAG_SUPPORT enum |
| 1961 | */ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1962 | A_UINT32 he_cap_info; |
Govind Singh | 76d82bc | 2016-02-22 15:39:48 +0530 | [diff] [blame] | 1963 | /* |
| 1964 | * An HT STA shall not allow transmission of more than one MPDU start |
| 1965 | * within the time limit described in the MPDU maximum density field. |
| 1966 | */ |
| 1967 | A_UINT32 mpdu_density; /* units are microseconds */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 1968 | /* |
| 1969 | * Maximum no of BSSID based RX filters host can program |
| 1970 | * Value 0 means FW hasn't given any limit to host. |
| 1971 | */ |
| 1972 | A_UINT32 max_bssid_rx_filters; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1973 | } wmi_service_ready_ext_event_fixed_param; |
| 1974 | |
| 1975 | typedef enum { |
| 1976 | WMI_HWBD_NONE = 0, /* No hw board information is given */ |
| 1977 | WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */ |
| 1978 | WMI_HWBD_QCA2582 = 2, /* Killer 1525 */ |
| 1979 | } WMI_HWBD_ID; |
| 1980 | |
| 1981 | typedef enum { |
| 1982 | WMI_FW_STA_RTT_INITR = 0x00000001, |
| 1983 | WMI_FW_STA_RTT_RESPR = 0x00000002, |
| 1984 | WMI_FW_P2P_CLI_RTT_INITR = 0x00000004, |
| 1985 | WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008, |
| 1986 | WMI_FW_P2P_GO_RTT_INITR = 0x00000010, |
| 1987 | WMI_FW_P2P_GO_RTT_RESPR = 0x00000020, |
| 1988 | WMI_FW_AP_RTT_INITR = 0x00000040, |
| 1989 | WMI_FW_AP_RTT_RESPR = 0x00000080, |
| 1990 | WMI_FW_NAN_RTT_INITR = 0x00000100, |
| 1991 | WMI_FW_NAN_RTT_RESPR = 0x00000200, |
| 1992 | /* |
| 1993 | * New fw sub feature capabilites before |
| 1994 | * WMI_FW_MAX_SUB_FEAT_CAP |
| 1995 | */ |
| 1996 | WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000, |
| 1997 | } WMI_FW_SUB_FEAT_CAPS; |
| 1998 | |
| 1999 | #define ATH_BD_DATA_REV_MASK 0x000000FF |
| 2000 | #define ATH_BD_DATA_REV_SHIFT 0 |
| 2001 | |
| 2002 | #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00 |
| 2003 | #define ATH_BD_DATA_PROJ_ID_SHIFT 8 |
| 2004 | |
| 2005 | #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000 |
| 2006 | #define ATH_BD_DATA_CUST_ID_SHIFT 16 |
| 2007 | |
| 2008 | #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000 |
| 2009 | #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24 |
| 2010 | |
| 2011 | #define SET_BD_DATA_REV(bd_data_ver, value) \ |
| 2012 | ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT)) |
| 2013 | |
| 2014 | #define GET_BD_DATA_REV(bd_data_ver) \ |
| 2015 | (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT) |
| 2016 | |
| 2017 | #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \ |
| 2018 | ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT)) |
| 2019 | |
| 2020 | #define GET_BD_DATA_PROJ_ID(bd_data_ver) \ |
| 2021 | (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT) |
| 2022 | |
| 2023 | #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \ |
| 2024 | ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT)) |
| 2025 | |
| 2026 | #define GET_BD_DATA_CUST_ID(bd_data_ver) \ |
| 2027 | (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT) |
| 2028 | |
| 2029 | #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \ |
| 2030 | ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT)) |
| 2031 | |
| 2032 | #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \ |
| 2033 | (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT) |
| 2034 | |
| 2035 | #ifdef ROME_LTE_COEX_FREQ_AVOID |
| 2036 | typedef struct { |
| 2037 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 2038 | A_UINT32 end_freq; /* end frequency */ |
| 2039 | } avoid_freq_range_desc; |
| 2040 | |
| 2041 | typedef struct { |
| 2042 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 2043 | A_UINT32 num_freq_ranges; |
| 2044 | /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */ |
| 2045 | avoid_freq_range_desc avd_freq_range[0]; |
| 2046 | } wmi_wlan_avoid_freq_ranges_event; |
| 2047 | #endif |
| 2048 | |
| 2049 | /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */ |
| 2050 | #define WLAN_INIT_STATUS_SUCCESS 0x0 |
| 2051 | #define WLAN_INIT_STATUS_GEN_FAILED 0x1 |
| 2052 | #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) |
| 2053 | #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) |
| 2054 | |
| 2055 | typedef A_UINT32 WLAN_INIT_STATUS; |
| 2056 | |
| 2057 | typedef struct { |
| 2058 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */ |
| 2059 | wmi_abi_version fw_abi_vers; |
| 2060 | wmi_mac_addr mac_addr; |
| 2061 | A_UINT32 status; |
Rajeev Kumar | e18f528 | 2016-04-15 14:08:29 -0700 | [diff] [blame] | 2062 | A_UINT32 num_dscp_table; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2063 | } wmi_ready_event_fixed_param; |
| 2064 | |
| 2065 | typedef struct { |
| 2066 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */ |
| 2067 | /** |
| 2068 | * @brief num_vdev - number of virtual devices (VAPs) to support |
| 2069 | */ |
| 2070 | A_UINT32 num_vdevs; |
| 2071 | /** |
| 2072 | * @brief num_peers - number of peer nodes to support |
| 2073 | */ |
| 2074 | A_UINT32 num_peers; |
| 2075 | /* |
| 2076 | * @brief In offload mode target supports features like WOW, chatter and other |
| 2077 | * protocol offloads. In order to support them some functionalities like |
| 2078 | * reorder buffering, PN checking need to be done in target. This determines |
| 2079 | * maximum number of peers suported by target in offload mode |
| 2080 | */ |
| 2081 | A_UINT32 num_offload_peers; |
| 2082 | /* @brief Number of reorder buffers available for doing target based reorder |
| 2083 | * Rx reorder buffering |
| 2084 | */ |
| 2085 | A_UINT32 num_offload_reorder_buffs; |
| 2086 | /** |
| 2087 | * @brief num_peer_keys - number of keys per peer |
| 2088 | */ |
| 2089 | A_UINT32 num_peer_keys; |
| 2090 | /** |
| 2091 | * @brief num_peer_tids - number of TIDs to provide storage for per peer. |
| 2092 | */ |
| 2093 | A_UINT32 num_tids; |
| 2094 | /** |
| 2095 | * @brief ast_skid_limit - max skid for resolving hash collisions |
| 2096 | * @details |
| 2097 | * The address search table is sparse, so that if two MAC addresses |
| 2098 | * result in the same hash value, the second of these conflicting |
| 2099 | * entries can slide to the next index in the address search table, |
| 2100 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 2101 | * specifies the upper bound on how many subsequent indices to search |
| 2102 | * over to find an unoccupied space. |
| 2103 | */ |
| 2104 | A_UINT32 ast_skid_limit; |
| 2105 | /** |
| 2106 | * @brief tx_chain_mask - the nominal chain mask for transmit |
| 2107 | * @details |
| 2108 | * The chain mask may be modified dynamically, e.g. to operate AP tx with |
| 2109 | * a reduced number of chains if no clients are associated. |
| 2110 | * This configuration parameter specifies the nominal chain-mask that |
| 2111 | * should be used when not operating with a reduced set of tx chains. |
| 2112 | */ |
| 2113 | A_UINT32 tx_chain_mask; |
| 2114 | /** |
| 2115 | * @brief rx_chain_mask - the nominal chain mask for receive |
| 2116 | * @details |
| 2117 | * The chain mask may be modified dynamically, e.g. for a client to use |
| 2118 | * a reduced number of chains for receive if the traffic to the client |
| 2119 | * is low enough that it doesn't require downlink MIMO or antenna |
| 2120 | * diversity. |
| 2121 | * This configuration parameter specifies the nominal chain-mask that |
| 2122 | * should be used when not operating with a reduced set of rx chains. |
| 2123 | */ |
| 2124 | A_UINT32 rx_chain_mask; |
| 2125 | /** |
| 2126 | * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC |
| 2127 | * @details |
| 2128 | * Each WMM access class (voice, video, best-effort, background) will |
| 2129 | * have its own timeout value to dictate how long to wait for missing |
| 2130 | * rx MPDUs to arrive before flushing subsequent MPDUs that have already |
| 2131 | * been received. |
| 2132 | * This parameter specifies the timeout in milliseconds for each class . |
| 2133 | * NOTE: the number of class (defined as 4) cannot be |
| 2134 | * changed in the future without breaking WMI compatibility. |
| 2135 | */ |
| 2136 | A_UINT32 rx_timeout_pri[4]; |
| 2137 | /** |
| 2138 | * @brief rx_decap mode - what mode the rx should decap packets to |
| 2139 | * @details |
| 2140 | * MAC can decap to RAW (no decap), native wifi or Ethernet types |
| 2141 | * THis setting also determines the default TX behavior, however TX |
| 2142 | * behavior can be modified on a per VAP basis during VAP init |
| 2143 | */ |
| 2144 | A_UINT32 rx_decap_mode; |
| 2145 | /** |
| 2146 | * @brief scan_max_pending_req - what is the maximum scan requests than can be queued |
| 2147 | */ |
| 2148 | A_UINT32 scan_max_pending_req; |
| 2149 | |
| 2150 | /** |
| 2151 | * @brief maximum VDEV that could use BMISS offload |
| 2152 | */ |
| 2153 | A_UINT32 bmiss_offload_max_vdev; |
| 2154 | |
| 2155 | /** |
| 2156 | * @brief maximum VDEV that could use offload roaming |
| 2157 | */ |
| 2158 | A_UINT32 roam_offload_max_vdev; |
| 2159 | |
| 2160 | /** |
| 2161 | * @brief maximum AP profiles that would push to offload roaming |
| 2162 | */ |
| 2163 | A_UINT32 roam_offload_max_ap_profiles; |
| 2164 | |
| 2165 | /** |
| 2166 | * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion |
| 2167 | * @details |
| 2168 | * The target's WAL maintains a table to hold information regarding which |
| 2169 | * peers belong to a given multicast group, so that if multicast->unicast |
| 2170 | * conversion is enabled, the target can convert multicast tx frames to a |
| 2171 | * series of unicast tx frames, to each peer within the multicast group. |
| 2172 | * This num_mcast_groups configuration parameter tells the target how |
| 2173 | * many multicast groups to provide storage for within its multicast |
| 2174 | * group membership table. |
| 2175 | */ |
| 2176 | A_UINT32 num_mcast_groups; |
| 2177 | |
| 2178 | /** |
| 2179 | * @brief num_mcast_table_elems - size to alloc for the mcast membership table |
| 2180 | * @details |
| 2181 | * This num_mcast_table_elems configuration parameter tells the target |
| 2182 | * how many peer elements it needs to provide storage for in its |
| 2183 | * multicast group membership table. |
| 2184 | * These multicast group membership table elements are shared by the |
| 2185 | * multicast groups stored within the table. |
| 2186 | */ |
| 2187 | A_UINT32 num_mcast_table_elems; |
| 2188 | |
| 2189 | /** |
| 2190 | * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion |
| 2191 | * @details |
| 2192 | * This configuration parameter specifies whether the target should |
| 2193 | * perform multicast --> unicast conversion on transmit, and if so, |
| 2194 | * what to do if it finds no entries in its multicast group membership |
| 2195 | * table for the multicast IP address in the tx frame. |
| 2196 | * Configuration value: |
| 2197 | * 0 -> Do not perform multicast to unicast conversion. |
| 2198 | * 1 -> Convert multicast frames to unicast, if the IP multicast address |
| 2199 | * from the tx frame is found in the multicast group membership |
| 2200 | * table. If the IP multicast address is not found, drop the frame. |
| 2201 | * 2 -> Convert multicast frames to unicast, if the IP multicast address |
| 2202 | * from the tx frame is found in the multicast group membership |
| 2203 | * table. If the IP multicast address is not found, transmit the |
| 2204 | * frame as multicast. |
| 2205 | */ |
| 2206 | A_UINT32 mcast2ucast_mode; |
| 2207 | |
| 2208 | /** |
| 2209 | * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log |
| 2210 | * @details |
| 2211 | * This parameter controls how much memory the target will allocate to |
| 2212 | * store a log of tx PPDU meta-information (how large the PPDU was, |
| 2213 | * when it was sent, whether it was successful, etc.) |
| 2214 | */ |
| 2215 | A_UINT32 tx_dbg_log_size; |
| 2216 | |
| 2217 | /** |
| 2218 | * @brief num_wds_entries - how many AST entries to be allocated for WDS |
| 2219 | */ |
| 2220 | A_UINT32 num_wds_entries; |
| 2221 | |
| 2222 | /** |
| 2223 | * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI |
| 2224 | * this limit can be 0 -default, 1 256B |
| 2225 | */ |
| 2226 | A_UINT32 dma_burst_size; |
| 2227 | |
| 2228 | /** |
| 2229 | * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU |
| 2230 | * to account for interface latency to avoid underrun. |
| 2231 | */ |
| 2232 | A_UINT32 mac_aggr_delim; |
| 2233 | /** |
| 2234 | * @brief rx_skip_defrag_timeout_dup_detection_check |
| 2235 | * @details |
| 2236 | * determine whether target is responsible for detecting duplicate |
| 2237 | * non-aggregate MPDU and timing out stale fragments. |
| 2238 | * |
| 2239 | * A-MPDU reordering is always performed on the target. |
| 2240 | * |
| 2241 | * 0: target responsible for frag timeout and dup checking |
| 2242 | * 1: host responsible for frag timeout and dup checking |
| 2243 | */ |
| 2244 | A_UINT32 rx_skip_defrag_timeout_dup_detection_check; |
| 2245 | |
| 2246 | /** |
| 2247 | * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported |
| 2248 | * and Max no of descriptors for each Video link (node). |
| 2249 | */ |
| 2250 | A_UINT32 vow_config; |
| 2251 | |
| 2252 | /** |
| 2253 | * @brief maximum VDEV that could use GTK offload |
| 2254 | */ |
| 2255 | A_UINT32 gtk_offload_max_vdev; |
| 2256 | |
| 2257 | /** |
| 2258 | * @brief num_msdu_desc - Number of msdu descriptors target should use |
| 2259 | */ |
| 2260 | A_UINT32 num_msdu_desc; /* Number of msdu desc */ |
| 2261 | /** |
| 2262 | * @brief max_frag_entry - Max. number of Tx fragments per MSDU |
| 2263 | * @details |
| 2264 | * This parameter controls the max number of Tx fragments per MSDU. |
| 2265 | * This is sent by the target as part of the WMI_SERVICE_READY event |
| 2266 | * and is overriden by the OS shim as required. |
| 2267 | */ |
| 2268 | A_UINT32 max_frag_entries; |
| 2269 | |
| 2270 | /** |
| 2271 | * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS |
| 2272 | * @brief num_msdu_desc - Number of vdev that can support beacon offload |
| 2273 | */ |
| 2274 | |
| 2275 | A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */ |
| 2276 | |
| 2277 | /** |
| 2278 | * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev |
| 2279 | * @details |
| 2280 | * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of |
| 2281 | * peers in a connection tracking table for possible TDLS link creation |
| 2282 | * or deletion. This controls the number of tracked peers per vdev. |
| 2283 | */ |
| 2284 | A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */ |
| 2285 | A_UINT32 beacon_tx_offload_max_vdev; |
| 2286 | A_UINT32 num_multicast_filter_entries; |
| 2287 | A_UINT32 num_wow_filters; /*host can configure the number of wow filters */ |
| 2288 | |
| 2289 | /** |
| 2290 | * @brief num_keep_alive_pattern - Num of keep alive patterns configured |
| 2291 | * from host. |
| 2292 | */ |
| 2293 | A_UINT32 num_keep_alive_pattern; |
| 2294 | /** |
| 2295 | * @brief keep_alive_pattern_size - keep alive pattern size. |
| 2296 | */ |
| 2297 | A_UINT32 keep_alive_pattern_size; |
| 2298 | |
| 2299 | /** |
| 2300 | * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported |
| 2301 | * @details |
| 2302 | * Each TDLS STA can become a sleep STA independently. This parameter |
| 2303 | * mentions how many such sleep STAs can be supported concurrently. |
| 2304 | */ |
| 2305 | A_UINT32 max_tdls_concurrent_sleep_sta; |
| 2306 | |
| 2307 | /** |
| 2308 | * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported |
| 2309 | * @details |
| 2310 | * Each TDLS STA can become a buffer STA independently. This parameter |
| 2311 | * mentions how many such buffer STAs can be supported concurrently. |
| 2312 | */ |
| 2313 | A_UINT32 max_tdls_concurrent_buffer_sta; |
| 2314 | |
| 2315 | /** |
| 2316 | * @brief wmi_send_separate - host configures fw to send the wmi separately |
| 2317 | */ |
| 2318 | A_UINT32 wmi_send_separate; |
| 2319 | |
| 2320 | /** |
| 2321 | * @brief num_ocb_vdevs - Number of vdevs used for OCB support |
| 2322 | */ |
| 2323 | A_UINT32 num_ocb_vdevs; |
| 2324 | |
| 2325 | /** |
| 2326 | * @brief num_ocb_channels - The supported number of simultaneous OCB channels |
| 2327 | */ |
| 2328 | A_UINT32 num_ocb_channels; |
| 2329 | |
| 2330 | /** |
| 2331 | * @brief num_ocb_schedules - The supported number of OCB schedule segments |
| 2332 | */ |
| 2333 | A_UINT32 num_ocb_schedules; |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2334 | /** |
| 2335 | * @brief specific configuration from host, such as per platform configuration |
| 2336 | */ |
| 2337 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0 |
| 2338 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1 |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2339 | |
| 2340 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1 |
| 2341 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2 |
| 2342 | |
| 2343 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2 |
| 2344 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4 |
| 2345 | |
| 2346 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3 |
| 2347 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8 |
| 2348 | |
| 2349 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4 |
| 2350 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10 |
| 2351 | |
| 2352 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5 |
| 2353 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20 |
| 2354 | |
| 2355 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6 |
| 2356 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40 |
| 2357 | |
| 2358 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7 |
| 2359 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80 |
| 2360 | |
| 2361 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8 |
| 2362 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100 |
| 2363 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 2364 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9 |
| 2365 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200 |
| 2366 | |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2367 | A_UINT32 flag1; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2368 | |
| 2369 | /** @brief smart_ant_cap - Smart Antenna capabilities information |
| 2370 | * @details |
| 2371 | * 1 - Smart antenna is enabled. |
| 2372 | * 0 - Smart antenna is disabled. |
| 2373 | * In future this can contain smart antenna specifc capabilities. |
| 2374 | */ |
| 2375 | A_UINT32 smart_ant_cap; |
| 2376 | |
| 2377 | /** |
| 2378 | * User can configure the buffers allocated for each AC (BE, BK, VI, VO) |
| 2379 | * during init |
| 2380 | */ |
| 2381 | A_UINT32 BK_Minfree; |
| 2382 | A_UINT32 BE_Minfree; |
| 2383 | A_UINT32 VI_Minfree; |
| 2384 | A_UINT32 VO_Minfree; |
| 2385 | |
| 2386 | /** |
| 2387 | * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment |
| 2388 | * descriptor memory allocation. |
| 2389 | * 1 - Allocate fragment descriptor memory for data packet in firmware. |
| 2390 | * If host wants to transmit data packet at its desired rate, |
| 2391 | * this field must be set. |
| 2392 | * 0 - Don't allocate fragment descriptor for data packet. |
| 2393 | */ |
| 2394 | A_UINT32 alloc_frag_desc_for_data_pkt; |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 2395 | |
| 2396 | /* |
| 2397 | * how much space to allocate for NDP NS (neighbor solicitation) |
| 2398 | * specs |
| 2399 | */ |
| 2400 | A_UINT32 num_ns_ext_tuples_cfg; |
Sandeep Puligilla | b6ddc26 | 2016-03-09 13:06:16 -0800 | [diff] [blame] | 2401 | /** |
| 2402 | * size (in bytes) of the buffer the FW shall allocate to store |
| 2403 | * packet filtering instructions |
| 2404 | */ |
| 2405 | A_UINT32 bpf_instruction_size; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 2406 | /** |
| 2407 | * Maximum no of BSSID based RX filters host would program |
| 2408 | * Value 0 means host doesn't given any limit to FW. |
| 2409 | */ |
| 2410 | A_UINT32 max_bssid_rx_filters; |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 2411 | /** |
| 2412 | * Use PDEV ID instead of MAC ID, added for backward compatibility with |
| 2413 | * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID. |
| 2414 | */ |
| 2415 | A_UINT32 use_pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2416 | } wmi_resource_config; |
| 2417 | |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2418 | #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \ |
| 2419 | do { \ |
| 2420 | (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \ |
| 2421 | (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \ |
| 2422 | WMI_RSRC_CFG_FLAG_ ## flag ## _M; \ |
| 2423 | } while (0) |
| 2424 | #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \ |
| 2425 | (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \ |
| 2426 | WMI_RSRC_CFG_FLAG_ ## flag ## _S) |
| 2427 | |
| 2428 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \ |
| 2429 | WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value)) |
| 2430 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \ |
| 2431 | WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST) |
| 2432 | |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2433 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \ |
| 2434 | WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value)) |
| 2435 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \ |
| 2436 | WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT) |
| 2437 | |
| 2438 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \ |
| 2439 | WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value)) |
| 2440 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \ |
| 2441 | WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT) |
| 2442 | |
| 2443 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \ |
| 2444 | WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value)) |
| 2445 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \ |
| 2446 | WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF) |
| 2447 | |
| 2448 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \ |
| 2449 | WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value)) |
| 2450 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \ |
| 2451 | WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF) |
| 2452 | |
| 2453 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \ |
| 2454 | WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value)) |
| 2455 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \ |
| 2456 | WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64) |
| 2457 | |
| 2458 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \ |
| 2459 | WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value)) |
| 2460 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \ |
| 2461 | WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE) |
| 2462 | |
| 2463 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \ |
| 2464 | WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value)) |
| 2465 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \ |
| 2466 | WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE) |
| 2467 | |
| 2468 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \ |
| 2469 | WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value)) |
| 2470 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \ |
| 2471 | WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE) |
| 2472 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 2473 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \ |
| 2474 | WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value)) |
| 2475 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \ |
| 2476 | WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT) |
| 2477 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2478 | typedef struct { |
| 2479 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ |
| 2480 | |
| 2481 | /** The following indicate the WMI versions to be supported by |
| 2482 | * the host driver. Note that the host driver decide to |
| 2483 | * "downgrade" its WMI version support and this may not be the |
| 2484 | * native version of the host driver. */ |
| 2485 | wmi_abi_version host_abi_vers; |
| 2486 | |
| 2487 | A_UINT32 num_host_mem_chunks; |
| 2488 | /** size of array host_mem_chunks[] */ |
Pradeep Reddy POTTETI | a280b5c | 2016-06-20 14:16:23 +0530 | [diff] [blame] | 2489 | /* The TLVs for resource_config, host_mem_chunks[], and |
| 2490 | * hw_mode_config will follow. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2491 | * wmi_resource_config resource_config; |
| 2492 | * wlan_host_memory_chunk host_mem_chunks[]; |
Pradeep Reddy POTTETI | a280b5c | 2016-06-20 14:16:23 +0530 | [diff] [blame] | 2493 | * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config; |
| 2494 | * Note that the hw_mode_config, in spite of its "pdev" name, |
| 2495 | * applies to the entire target rather than for a single pdev |
| 2496 | * within the target. |
| 2497 | * To avoid specifying a HW mode for the target, the host should |
| 2498 | * fill hw_mode_config's fields with 0x0. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2499 | */ |
| 2500 | |
| 2501 | } wmi_init_cmd_fixed_param; |
| 2502 | |
| 2503 | /** |
| 2504 | * TLV for channel list |
| 2505 | */ |
| 2506 | typedef struct { |
| 2507 | /** WMI_CHAN_LIST_TAG */ |
| 2508 | A_UINT32 tag; |
| 2509 | /** # of channels to scan */ |
| 2510 | A_UINT32 num_chan; |
| 2511 | /** channels in Mhz */ |
| 2512 | A_UINT32 channel_list[1]; |
| 2513 | } wmi_chan_list; |
| 2514 | |
| 2515 | /** |
| 2516 | * TLV for bssid list |
| 2517 | */ |
| 2518 | typedef struct { |
| 2519 | /** WMI_BSSID_LIST_TAG */ |
| 2520 | A_UINT32 tag; |
| 2521 | /** number of bssids */ |
| 2522 | A_UINT32 num_bssid; |
| 2523 | /** bssid list */ |
| 2524 | wmi_mac_addr bssid_list[1]; |
| 2525 | } wmi_bssid_list; |
| 2526 | |
| 2527 | /** |
| 2528 | * TLV for ie data. |
| 2529 | */ |
| 2530 | typedef struct { |
| 2531 | /** WMI_IE_TAG */ |
| 2532 | A_UINT32 tag; |
| 2533 | /** number of bytes in ie data */ |
| 2534 | A_UINT32 ie_len; |
| 2535 | /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */ |
| 2536 | A_UINT32 ie_data[1]; |
| 2537 | } wmi_ie_data; |
| 2538 | |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 2539 | /** |
| 2540 | * TLV used for length/buffer |
| 2541 | */ |
| 2542 | typedef struct { |
| 2543 | /** |
| 2544 | * TLV tag and len; tag equals |
| 2545 | * WMITLV_TAG_STRUC_wmi_tlv_buf_len_param |
| 2546 | */ |
| 2547 | A_UINT32 tlv_header; |
| 2548 | A_UINT32 buf_len; /** Length of buf */ |
| 2549 | /** |
| 2550 | * Following this structure is the TLV byte stream of buf |
| 2551 | * of length buf_len: |
| 2552 | * A_UINT8 buf[]; |
| 2553 | * |
| 2554 | */ |
| 2555 | } wmi_tlv_buf_len_param; |
| 2556 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2557 | typedef struct { |
| 2558 | /** Len of the SSID */ |
| 2559 | A_UINT32 ssid_len; |
| 2560 | /** SSID */ |
| 2561 | A_UINT32 ssid[8]; |
| 2562 | } wmi_ssid; |
| 2563 | |
| 2564 | typedef struct { |
| 2565 | /** WMI_SSID_LIST_TAG */ |
| 2566 | A_UINT32 tag; |
| 2567 | A_UINT32 num_ssids; |
| 2568 | wmi_ssid ssids[1]; |
| 2569 | } wmi_ssid_list; |
| 2570 | |
| 2571 | /* prefix used by scan requestor ids on the host */ |
| 2572 | #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 2573 | /* prefix used by scan request ids generated on the host */ |
| 2574 | /* host cycles through the lower 12 bits to generate ids */ |
| 2575 | #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000 |
| 2576 | |
| 2577 | #define WLAN_SCAN_PARAMS_MAX_SSID 16 |
| 2578 | #define WLAN_SCAN_PARAMS_MAX_BSSID 4 |
| 2579 | #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512 |
| 2580 | |
| 2581 | typedef struct { |
| 2582 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 2583 | /** Scan ID */ |
| 2584 | A_UINT32 scan_id; |
| 2585 | /** Scan requestor ID */ |
| 2586 | A_UINT32 scan_req_id; |
| 2587 | /** VDEV id(interface) that is requesting scan */ |
| 2588 | A_UINT32 vdev_id; |
| 2589 | /** Scan Priority, input to scan scheduler */ |
| 2590 | A_UINT32 scan_priority; |
| 2591 | /** Scan events subscription */ |
| 2592 | A_UINT32 notify_scan_events; |
| 2593 | /** dwell time in msec on active channels */ |
| 2594 | A_UINT32 dwell_time_active; |
| 2595 | /** dwell time in msec on passive channels */ |
| 2596 | A_UINT32 dwell_time_passive; |
| 2597 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 2598 | A_UINT32 min_rest_time; |
| 2599 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 2600 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 2601 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 2602 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 2603 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 2604 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 2605 | */ |
| 2606 | A_UINT32 max_rest_time; |
| 2607 | /** time before sending next set of probe requests. |
| 2608 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 2609 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 2610 | */ |
| 2611 | A_UINT32 repeat_probe_time; |
| 2612 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 2613 | A_UINT32 probe_spacing_time; |
| 2614 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 2615 | A_UINT32 idle_time; |
| 2616 | /** maximum time in msec allowed for scan */ |
| 2617 | A_UINT32 max_scan_time; |
| 2618 | /** delay in msec before sending first probe request after switching to a channel */ |
| 2619 | A_UINT32 probe_delay; |
| 2620 | /** Scan control flags */ |
| 2621 | A_UINT32 scan_ctrl_flags; |
| 2622 | /** Burst duration time in msec*/ |
| 2623 | A_UINT32 burst_duration; |
| 2624 | |
| 2625 | /** # if channels to scan. In the TLV channel_list[] */ |
| 2626 | A_UINT32 num_chan; |
| 2627 | /** number of bssids. In the TLV bssid_list[] */ |
| 2628 | A_UINT32 num_bssid; |
| 2629 | /** number of ssid. In the TLV ssid_list[] */ |
| 2630 | A_UINT32 num_ssids; |
| 2631 | /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */ |
| 2632 | A_UINT32 ie_len; |
| 2633 | /** Max number of probes to be sent */ |
| 2634 | A_UINT32 n_probes; |
| 2635 | |
| 2636 | /** |
| 2637 | * TLV (tag length value ) parameters follow the scan_cmd |
| 2638 | * structure. The TLV's are: |
| 2639 | * A_UINT32 channel_list[]; |
| 2640 | * wmi_ssid ssid_list[]; |
| 2641 | * wmi_mac_addr bssid_list[]; |
| 2642 | * A_UINT8 ie_data[]; |
| 2643 | */ |
| 2644 | } wmi_start_scan_cmd_fixed_param; |
| 2645 | |
| 2646 | /** |
| 2647 | * scan control flags. |
| 2648 | */ |
| 2649 | |
| 2650 | /** passively scan all channels including active channels */ |
| 2651 | #define WMI_SCAN_FLAG_PASSIVE 0x1 |
| 2652 | /** add wild card ssid probe request even though ssid_list is specified. */ |
| 2653 | #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2 |
| 2654 | /** add cck rates to rates/xrate ie for the generated probe request */ |
| 2655 | #define WMI_SCAN_ADD_CCK_RATES 0x4 |
| 2656 | /** add ofdm rates to rates/xrate ie for the generated probe request */ |
| 2657 | #define WMI_SCAN_ADD_OFDM_RATES 0x8 |
| 2658 | /** To enable indication of Chan load and Noise floor to host */ |
| 2659 | #define WMI_SCAN_CHAN_STAT_EVENT 0x10 |
| 2660 | /** Filter Probe request frames */ |
| 2661 | #define WMI_SCAN_FILTER_PROBE_REQ 0x20 |
| 2662 | /**When set, not to scan DFS channels*/ |
| 2663 | #define WMI_SCAN_BYPASS_DFS_CHN 0x40 |
| 2664 | /**When set, certain errors are ignored and scan continues. |
| 2665 | * Different FW scan engine may use its own logic to decide what errors to ignore*/ |
| 2666 | #define WMI_SCAN_CONTINUE_ON_ERROR 0x80 |
| 2667 | /** Enable promiscous mode for ese */ |
| 2668 | #define WMI_SCAN_FILTER_PROMISCOUS 0x100 |
| 2669 | /** allow to send probe req on DFS channel */ |
| 2670 | #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200 |
| 2671 | /** add TPC content in probe req frame */ |
| 2672 | #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400 |
| 2673 | /** add DS content in probe req frame */ |
| 2674 | #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800 |
| 2675 | /** use random mac address for TA for probe request frame and add |
| 2676 | * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame. |
| 2677 | * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/ |
| 2678 | #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 2679 | /** allow mgmt transmission during off channel scan */ |
| 2680 | #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000 |
| 2681 | /** allow data transmission during off channel scan */ |
| 2682 | #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000 |
| 2683 | /** allow capture ppdu with phy errrors */ |
| 2684 | #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000 |
Sandeep Puligilla | 1d9a8d8 | 2016-03-09 13:07:58 -0800 | [diff] [blame] | 2685 | /** always do passive scan on passive channels */ |
| 2686 | #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000 |
Pradeep Reddy POTTETI | b36e8fc | 2016-06-20 15:10:26 +0530 | [diff] [blame] | 2687 | /** set HALF (10MHz) rate support */ |
| 2688 | #define WMI_SCAN_FLAG_HALF_RATE_SUPPORT 0x20000 |
| 2689 | /** set Quarter (5MHz) rate support */ |
| 2690 | #define WMI_SCAN_FLAG_QUARTER_RATE_SUPPORT 0x40000 |
| 2691 | |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 2692 | /** for adaptive scan mode using 3 bits (21 - 23 bits) */ |
| 2693 | #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000 |
| 2694 | #define WMI_SCAN_DWELL_MODE_SHIFT 21 |
| 2695 | |
| 2696 | typedef enum { |
| 2697 | WMI_SCAN_DWELL_MODE_DEFAULT = 0, |
| 2698 | WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1, |
| 2699 | WMI_SCAN_DWELL_MODE_MODERATE = 2, |
| 2700 | WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3, |
| 2701 | WMI_SCAN_DWELL_MODE_STATIC = 4, |
| 2702 | } WMI_SCAN_DWELL_MODE; |
| 2703 | |
| 2704 | #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \ |
| 2705 | do { \ |
| 2706 | (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \ |
| 2707 | WMI_SCAN_DWELL_MODE_MASK); \ |
| 2708 | } while (0) |
| 2709 | |
| 2710 | #define WMI_SCAN_GET_DWELL_MODE(flag) \ |
| 2711 | (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT) |
| 2712 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2713 | /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */ |
| 2714 | #define WMI_SCAN_CLASS_MASK 0xFF000000 |
| 2715 | |
| 2716 | /* |
| 2717 | * Masks identifying types/ID of scans |
| 2718 | * Scan_Stop macros should be the same value as below defined in UMAC |
| 2719 | * #define IEEE80211_SPECIFIC_SCAN 0x00000000 |
| 2720 | * #define IEEE80211_VAP_SCAN 0x01000000 |
| 2721 | * #define IEEE80211_ALL_SCANS 0x04000000 |
| 2722 | */ |
| 2723 | #define WMI_SCAN_STOP_ONE 0x00000000 |
| 2724 | #define WMI_SCN_STOP_VAP_ALL 0x01000000 |
| 2725 | #define WMI_SCAN_STOP_ALL 0x04000000 |
| 2726 | |
| 2727 | typedef struct { |
| 2728 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 2729 | /** requestor requesting cancel */ |
| 2730 | A_UINT32 requestor; |
| 2731 | /** Scan ID */ |
| 2732 | A_UINT32 scan_id; |
| 2733 | /** |
| 2734 | * Req Type |
| 2735 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 2736 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 2737 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 2738 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 2739 | */ |
| 2740 | A_UINT32 req_type; |
| 2741 | /** |
| 2742 | * vDev ID |
| 2743 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 2744 | */ |
| 2745 | A_UINT32 vdev_id; |
| 2746 | } wmi_stop_scan_cmd_fixed_param; |
| 2747 | |
| 2748 | #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */ |
| 2749 | #define APPEND_TO_EXISTING_CHAN_LIST 1 |
| 2750 | |
| 2751 | typedef struct { |
| 2752 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */ |
| 2753 | A_UINT32 num_scan_chans; |
| 2754 | /** no of elements in chan_info[] */ |
| 2755 | A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */ |
| 2756 | /** Followed by the variable length TLV chan_info: |
| 2757 | * wmi_channel chan_info[] */ |
| 2758 | } wmi_scan_chan_list_cmd_fixed_param; |
| 2759 | |
| 2760 | /* |
| 2761 | * Priority numbers must be sequential, starting with 0. |
| 2762 | */ |
| 2763 | /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */ |
| 2764 | typedef enum { |
| 2765 | WMI_SCAN_PRIORITY_VERY_LOW = 0, |
| 2766 | WMI_SCAN_PRIORITY_LOW, |
| 2767 | WMI_SCAN_PRIORITY_MEDIUM, |
| 2768 | WMI_SCAN_PRIORITY_HIGH, |
| 2769 | WMI_SCAN_PRIORITY_VERY_HIGH, |
| 2770 | |
| 2771 | WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */ |
| 2772 | } wmi_scan_priority; |
| 2773 | |
| 2774 | /* Five Levels for Requested Priority */ |
| 2775 | /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */ |
| 2776 | typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT]; |
| 2777 | |
| 2778 | /** |
| 2779 | * to keep align with UMAC implementation, we pass only vdev_type but not vdev_subtype when we overwrite an entry for a specific vdev_subtype |
| 2780 | * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA |
| 2781 | * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact |
| 2782 | */ |
| 2783 | typedef struct { |
| 2784 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */ |
| 2785 | /** |
| 2786 | * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table |
| 2787 | * vdev_type should be one of enum in WLAN_OPMODE which inculdes WLAN_M_IBSS, WLAN_M_STA, WLAN_M_AP and WLAN_M_MONITOR currently |
| 2788 | */ |
| 2789 | A_UINT32 vdev_type; |
| 2790 | /** |
| 2791 | * number of rows in mapping_table for a specific vdev |
| 2792 | * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition) |
| 2793 | */ |
| 2794 | A_UINT32 number_rows; |
| 2795 | /** mapping_table for a specific vdev follows this TLV |
| 2796 | * WLAN_PRIORITY_MAPPING mapping_table[]; */ |
| 2797 | } wmi_scan_sch_priority_table_cmd_fixed_param; |
| 2798 | |
| 2799 | /** update flags */ |
| 2800 | #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1 |
| 2801 | #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2 |
| 2802 | #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4 |
| 2803 | |
| 2804 | typedef struct { |
| 2805 | A_UINT32 tlv_header; |
| 2806 | /** requestor requesting update scan request */ |
| 2807 | A_UINT32 requestor; |
| 2808 | /** Scan ID of the scan request that need to be update */ |
| 2809 | A_UINT32 scan_id; |
| 2810 | /** update flags, indicating which of the following fields are valid and need to be updated*/ |
| 2811 | A_UINT32 scan_update_flags; |
| 2812 | /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */ |
| 2813 | A_UINT32 scan_priority; |
| 2814 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */ |
| 2815 | A_UINT32 min_rest_time; |
| 2816 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */ |
| 2817 | A_UINT32 max_rest_time; |
| 2818 | } wmi_scan_update_request_cmd_fixed_param; |
| 2819 | |
| 2820 | typedef struct { |
| 2821 | A_UINT32 tlv_header; |
| 2822 | /** oui to be used in probe request frame when random mac addresss is |
| 2823 | * requested part of scan parameters. this is applied to both FW internal scans and |
| 2824 | * host initated scans. host can request for random mac address with |
| 2825 | * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */ |
| 2826 | A_UINT32 prob_req_oui; |
| 2827 | } wmi_scan_prob_req_oui_cmd_fixed_param; |
| 2828 | |
| 2829 | enum wmi_scan_event_type { |
| 2830 | WMI_SCAN_EVENT_STARTED = 0x1, |
| 2831 | WMI_SCAN_EVENT_COMPLETED = 0x2, |
| 2832 | WMI_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 2833 | WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 2834 | WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */ |
| 2835 | WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */ |
| 2836 | WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */ |
Manikandan Mohan | 46b95c0 | 2015-12-09 12:23:08 -0800 | [diff] [blame] | 2837 | WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */ |
| 2838 | WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 2839 | WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */ |
| 2840 | WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2841 | WMI_SCAN_EVENT_MAX = 0x8000 |
| 2842 | }; |
| 2843 | |
| 2844 | enum wmi_scan_completion_reason { |
| 2845 | /** scan related events */ |
| 2846 | WMI_SCAN_REASON_NONE = 0xFF, |
| 2847 | WMI_SCAN_REASON_COMPLETED = 0, |
| 2848 | WMI_SCAN_REASON_CANCELLED = 1, |
| 2849 | WMI_SCAN_REASON_PREEMPTED = 2, |
| 2850 | WMI_SCAN_REASON_TIMEDOUT = 3, |
| 2851 | WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */ |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 2852 | WMI_SCAN_REASON_SUSPENDED = 5, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2853 | WMI_SCAN_REASON_MAX, |
| 2854 | }; |
| 2855 | |
| 2856 | typedef struct { |
| 2857 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */ |
| 2858 | /** scan event (wmi_scan_event_type) */ |
| 2859 | A_UINT32 event; |
| 2860 | /** status of the scan completion event */ |
| 2861 | A_UINT32 reason; |
| 2862 | /** channel freq , only valid for FOREIGN channel event*/ |
| 2863 | A_UINT32 channel_freq; |
| 2864 | /**id of the requestor whose scan is in progress */ |
| 2865 | A_UINT32 requestor; |
| 2866 | /**id of the scan that is in progress */ |
| 2867 | A_UINT32 scan_id; |
| 2868 | /**id of VDEV that requested the scan */ |
| 2869 | A_UINT32 vdev_id; |
| 2870 | } wmi_scan_event_fixed_param; |
| 2871 | |
| 2872 | /* WMI Diag event */ |
| 2873 | typedef struct { |
| 2874 | A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */ |
| 2875 | A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */ |
| 2876 | A_UINT32 count; /* Number of diag frames added to current event */ |
| 2877 | A_UINT32 dropped; |
| 2878 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 2879 | } wmi_diag_event_fixed_param; |
| 2880 | |
| 2881 | /* |
| 2882 | * If FW has multiple active channels due to MCC(multi channel concurrency), |
| 2883 | * then these stats are combined stats for all the active channels. |
| 2884 | */ |
| 2885 | typedef struct { |
| 2886 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */ |
| 2887 | /** ack count, it is an incremental number, not accumulated number */ |
| 2888 | A_UINT32 ackRcvBad; |
| 2889 | /** bad rts count, it is an incremental number, not accumulated number */ |
| 2890 | A_UINT32 rtsBad; |
| 2891 | /** good rts, it is an incremental number, not accumulated number */ |
| 2892 | A_UINT32 rtsGood; |
| 2893 | /** fcs count, it is an incremental number, not accumulated number */ |
| 2894 | A_UINT32 fcsBad; |
| 2895 | /** beacon count, it is an incremental number, not accumulated number */ |
| 2896 | A_UINT32 noBeacons; |
| 2897 | } wmi_update_whal_mib_stats_event_fixed_param; |
| 2898 | |
| 2899 | /* |
| 2900 | * This defines how much headroom is kept in the |
| 2901 | * receive frame between the descriptor and the |
| 2902 | * payload, in order for the WMI PHY error and |
| 2903 | * management handler to insert header contents. |
| 2904 | * |
| 2905 | * This is in bytes. |
| 2906 | */ |
| 2907 | #define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr) |
| 2908 | |
| 2909 | /** This event will be used for sending scan results |
| 2910 | * as well as rx mgmt frames to the host. The rx buffer |
| 2911 | * will be sent as part of this WMI event. It would be a |
| 2912 | * good idea to pass all the fields in the RX status |
| 2913 | * descriptor up to the host. |
| 2914 | */ |
| 2915 | /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */ |
| 2916 | #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */ |
| 2917 | |
| 2918 | /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */ |
| 2919 | #define WMI_MGMT_RX_HDR_EXTSCAN 0x01 |
| 2920 | |
| 2921 | /** |
| 2922 | * flag indicating that the the mgmt frame (probe req/beacon) is received in |
| 2923 | * the context of matched network by FW ENLO |
| 2924 | */ |
| 2925 | #define WMI_MGMT_RX_HDR_ENLO 0x02 |
| 2926 | |
| 2927 | typedef struct { |
| 2928 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */ |
| 2929 | /** channel on which this frame is received. */ |
| 2930 | A_UINT32 channel; |
| 2931 | /** snr information used to cal rssi */ |
| 2932 | A_UINT32 snr; |
| 2933 | /** Rate kbps */ |
| 2934 | A_UINT32 rate; |
| 2935 | /** rx phy mode WLAN_PHY_MODE */ |
| 2936 | A_UINT32 phy_mode; |
| 2937 | /** length of the frame */ |
| 2938 | A_UINT32 buf_len; |
| 2939 | /** rx status */ |
| 2940 | A_UINT32 status; |
| 2941 | /** RSSI of PRI 20MHz for each chain. */ |
| 2942 | A_UINT32 rssi_ctl[ATH_MAX_ANTENNA]; |
| 2943 | /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */ |
| 2944 | A_UINT32 flags; |
| 2945 | /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */ |
| 2946 | A_INT32 rssi; |
| 2947 | |
| 2948 | /** delta between local TSF(TSF timestamp when frame was RXd) |
| 2949 | * and remote TSF(TSF timestamp in the IE for mgmt frame |
| 2950 | * beacon,proberesp for e.g). If remote TSF is not available, |
| 2951 | * delta set to 0. |
| 2952 | * Although tsf_delta is stored as A_UINT32, it can be negative, |
| 2953 | * and thus would need to be sign-extended if added to a value |
| 2954 | * larger than 32 bits. |
| 2955 | */ |
| 2956 | A_UINT32 tsf_delta; |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 2957 | /* |
| 2958 | * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from |
| 2959 | * TSF timestamp in the RX MAC descriptor provided by HW. |
| 2960 | */ |
| 2961 | A_UINT32 rx_tsf_l32; |
| 2962 | |
| 2963 | /* |
| 2964 | *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register |
| 2965 | * after the packet is received. |
| 2966 | */ |
| 2967 | A_UINT32 rx_tsf_u32; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2968 | /* This TLV is followed by array of bytes: |
| 2969 | * // management frame buffer |
| 2970 | * A_UINT8 bufp[]; |
| 2971 | */ |
| 2972 | } wmi_mgmt_rx_hdr; |
| 2973 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2974 | typedef struct { |
| 2975 | /** TSF timestamp */ |
| 2976 | A_UINT32 tsf_timestamp; |
| 2977 | |
| 2978 | /** |
| 2979 | * Current freq1, freq2 |
| 2980 | * |
| 2981 | * [7:0]: freq1[lo] |
| 2982 | * [15:8] : freq1[hi] |
| 2983 | * [23:16]: freq2[lo] |
| 2984 | * [31:24]: freq2[hi] |
| 2985 | */ |
| 2986 | A_UINT32 freq_info_1; |
| 2987 | |
| 2988 | /** |
| 2989 | * Combined RSSI over all chains and channel width for this PHY error |
| 2990 | * |
| 2991 | * [7:0]: RSSI combined |
| 2992 | * [15:8]: Channel width (MHz) |
| 2993 | * [23:16]: PHY error code |
| 2994 | * [24:16]: reserved (future use) |
| 2995 | */ |
| 2996 | A_UINT32 freq_info_2; |
| 2997 | |
| 2998 | /** |
| 2999 | * RSSI on chain 0 through 3 |
| 3000 | * |
| 3001 | * This is formatted the same as the PPDU_START RX descriptor |
| 3002 | * field: |
| 3003 | * |
| 3004 | * [7:0]: pri20 |
| 3005 | * [15:8]: sec20 |
| 3006 | * [23:16]: sec40 |
| 3007 | * [31:24]: sec80 |
| 3008 | */ |
| 3009 | A_UINT32 rssi_chain0; |
| 3010 | A_UINT32 rssi_chain1; |
| 3011 | A_UINT32 rssi_chain2; |
| 3012 | A_UINT32 rssi_chain3; |
| 3013 | |
| 3014 | /** |
| 3015 | * Last calibrated NF value for chain 0 through 3 |
| 3016 | * |
| 3017 | * nf_list_1: |
| 3018 | * |
| 3019 | * + [15:0] - chain 0 |
| 3020 | * + [31:16] - chain 1 |
| 3021 | * |
| 3022 | * nf_list_2: |
| 3023 | * |
| 3024 | * + [15:0] - chain 2 |
| 3025 | * + [31:16] - chain 3 |
| 3026 | */ |
| 3027 | A_UINT32 nf_list_1; |
| 3028 | A_UINT32 nf_list_2; |
| 3029 | |
| 3030 | /** Length of the frame */ |
| 3031 | A_UINT32 buf_len; |
| 3032 | } wmi_single_phyerr_rx_hdr; |
| 3033 | |
| 3034 | #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff |
| 3035 | #define WMI_UNIFIED_FREQINFO_1_LO_S 0 |
| 3036 | #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00 |
| 3037 | #define WMI_UNIFIED_FREQINFO_1_HI_S 8 |
| 3038 | #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000 |
| 3039 | #define WMI_UNIFIED_FREQINFO_2_LO_S 16 |
| 3040 | #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000 |
| 3041 | #define WMI_UNIFIED_FREQINFO_2_HI_S 24 |
| 3042 | |
| 3043 | /* |
| 3044 | * Please keep in mind that these _SET macros break macro side effect |
| 3045 | * assumptions; don't be clever with them. |
| 3046 | */ |
| 3047 | #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 3048 | (WMI_F_MS((hdr)->freq_info_1, \ |
| 3049 | WMI_UNIFIED_FREQINFO_ ## f ## _LO) \ |
| 3050 | | (WMI_F_MS((hdr)->freq_info_1, \ |
| 3051 | WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3052 | |
| 3053 | #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \ |
| 3054 | do { \ |
| 3055 | WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \ |
| 3056 | WMI_UNIFIED_FREQINFO_ ## f ## _LO); \ |
| 3057 | WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \ |
| 3058 | WMI_UNIFIED_FREQINFO_ ## f ## _HI); \ |
| 3059 | } while (0) |
| 3060 | |
| 3061 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff |
| 3062 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0 |
| 3063 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00 |
| 3064 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8 |
| 3065 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000 |
| 3066 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16 |
| 3067 | |
| 3068 | #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 3069 | ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3070 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB))) |
| 3071 | |
| 3072 | #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \ |
| 3073 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 3074 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB); |
| 3075 | |
| 3076 | #define WMI_UNIFIED_CHWIDTH_GET(hdr) \ |
| 3077 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH) |
| 3078 | |
| 3079 | #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \ |
| 3080 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 3081 | WMI_UNIFIED_FREQINFO_2_CHWIDTH); |
| 3082 | |
| 3083 | #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \ |
| 3084 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE) |
| 3085 | |
| 3086 | #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \ |
| 3087 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 3088 | WMI_UNIFIED_FREQINFO_2_PHYERRCODE); |
| 3089 | |
| 3090 | #define WMI_UNIFIED_CHAIN_0 0x0000ffff |
| 3091 | #define WMI_UNIFIED_CHAIN_0_S 0 |
| 3092 | #define WMI_UNIFIED_CHAIN_1 0xffff0000 |
| 3093 | #define WMI_UNIFIED_CHAIN_1_S 16 |
| 3094 | #define WMI_UNIFIED_CHAIN_2 0x0000ffff |
| 3095 | #define WMI_UNIFIED_CHAIN_2_S 0 |
| 3096 | #define WMI_UNIFIED_CHAIN_3 0xffff0000 |
| 3097 | #define WMI_UNIFIED_CHAIN_3_S 16 |
| 3098 | |
| 3099 | #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1 |
| 3100 | #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1 |
| 3101 | #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2 |
| 3102 | #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2 |
| 3103 | |
| 3104 | #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \ |
| 3105 | ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \ |
| 3106 | WMI_UNIFIED_CHAIN_ ## c))) |
| 3107 | |
| 3108 | #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \ |
| 3109 | WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \ |
| 3110 | WMI_UNIFIED_CHAIN_ ## c); |
| 3111 | |
| 3112 | /* |
| 3113 | * For now, this matches what the underlying hardware is doing. |
| 3114 | * Update ar6000ProcRxDesc() to use these macros when populating |
| 3115 | * the rx descriptor and then we can just copy the field over |
| 3116 | * to the WMI PHY notification without worrying about breaking |
| 3117 | * things. |
| 3118 | */ |
| 3119 | #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff |
| 3120 | #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0 |
| 3121 | #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00 |
| 3122 | #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8 |
| 3123 | #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000 |
| 3124 | #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16 |
| 3125 | #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000 |
| 3126 | #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24 |
| 3127 | |
| 3128 | #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \ |
| 3129 | WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \ |
| 3130 | WMI_UNIFIED_RSSI_CHAN_ ## ch); |
| 3131 | |
| 3132 | #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \ |
| 3133 | ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \ |
| 3134 | WMI_UNIFIED_RSSI_CHAN_ ## ch))) |
| 3135 | |
| 3136 | typedef struct { |
| 3137 | /** Phy error event header */ |
| 3138 | wmi_single_phyerr_rx_hdr hdr; |
| 3139 | /** frame buffer */ |
| 3140 | A_UINT8 bufp[1]; |
| 3141 | } wmi_single_phyerr_rx_event; |
| 3142 | |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3143 | /* PHY ERROR MASK 0 */ |
| 3144 | /* bits 1:0 defined but not published */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 3145 | #define WMI_PHY_ERROR_MASK0_RADAR (1<<2) |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3146 | /* bits 23:3 defined but not published */ |
| 3147 | #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24) |
| 3148 | /* bits 25:24 defined but not published */ |
| 3149 | #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26) |
| 3150 | /* bits 31:27 defined but not published */ |
| 3151 | |
| 3152 | /* PHY ERROR MASK 1 |
| 3153 | * bits 13:0 defined but not published |
| 3154 | * bits 31:14 reserved |
| 3155 | */ |
| 3156 | |
| 3157 | /* PHY ERROR MASK 2 |
| 3158 | * bits 31:0 reserved |
| 3159 | */ |
| 3160 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3161 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3162 | /* TLV tag and len; tag equals |
| 3163 | * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr |
| 3164 | */ |
| 3165 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3166 | /** Phy error phy error count */ |
| 3167 | A_UINT32 num_phyerr_events; |
| 3168 | A_UINT32 tsf_l32; |
| 3169 | A_UINT32 tsf_u32; |
| 3170 | A_UINT32 buf_len; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3171 | union { |
| 3172 | /* OBSOLETE - will be removed once all refs are gone */ |
| 3173 | A_UINT32 pmac_id; |
| 3174 | /** pdev_id for identifying the MAC |
| 3175 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3176 | */ |
| 3177 | A_UINT32 pdev_id; |
| 3178 | }; |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3179 | A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */ |
| 3180 | A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */ |
| 3181 | A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */ |
| 3182 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3183 | /* This TLV is followed by array of bytes: |
| 3184 | * // frame buffer - contains multiple payloads in the order: |
| 3185 | * // header - payload, header - payload... |
| 3186 | * (The header is of type: wmi_single_phyerr_rx_hdr) |
| 3187 | * A_UINT8 bufp[]; |
| 3188 | */ |
| 3189 | } wmi_comb_phyerr_rx_hdr; |
| 3190 | |
| 3191 | /* WMI MGMT TX */ |
| 3192 | typedef struct { |
| 3193 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */ |
| 3194 | /** unique id identifying the VDEV, generated by the caller */ |
| 3195 | A_UINT32 vdev_id; |
| 3196 | /** peer MAC address */ |
| 3197 | wmi_mac_addr peer_macaddr; |
| 3198 | /** xmit rate */ |
| 3199 | A_UINT32 tx_rate; |
| 3200 | /** xmit power */ |
| 3201 | A_UINT32 tx_power; |
| 3202 | /** Buffer length in bytes */ |
| 3203 | A_UINT32 buf_len; |
| 3204 | /* This TLV is followed by array of bytes: |
| 3205 | * // management frame buffer |
| 3206 | * A_UINT8 bufp[]; |
| 3207 | */ |
| 3208 | } wmi_mgmt_tx_hdr; |
| 3209 | |
| 3210 | typedef struct { |
| 3211 | /* |
| 3212 | * TLV tag and len; |
| 3213 | * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param |
| 3214 | */ |
| 3215 | A_UINT32 tlv_header; |
| 3216 | A_UINT32 vdev_id; |
| 3217 | /* echoed in tx_compl_event */ |
| 3218 | A_UINT32 desc_id; |
| 3219 | /* MHz units */ |
| 3220 | A_UINT32 chanfreq; |
| 3221 | A_UINT32 paddr_lo; |
| 3222 | A_UINT32 paddr_hi; |
| 3223 | A_UINT32 frame_len; |
| 3224 | /* Buffer length in bytes */ |
| 3225 | A_UINT32 buf_len; |
| 3226 | /* |
| 3227 | * This TLV is followed by array of bytes: |
| 3228 | * First 64 bytes of management frame |
| 3229 | * A_UINT8 bufp[]; |
| 3230 | */ |
| 3231 | } wmi_mgmt_tx_send_cmd_fixed_param; |
| 3232 | |
| 3233 | typedef struct { |
| 3234 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */ |
| 3235 | A_UINT32 value; |
| 3236 | } wmi_echo_event_fixed_param; |
| 3237 | |
| 3238 | typedef struct { |
| 3239 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */ |
| 3240 | A_UINT32 value; |
| 3241 | } wmi_echo_cmd_fixed_param; |
| 3242 | |
| 3243 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3244 | /* TLV tag and len; tag equals |
| 3245 | * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param |
| 3246 | */ |
| 3247 | A_UINT32 tlv_header; |
| 3248 | /** pdev_id for identifying the MAC |
| 3249 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3250 | */ |
| 3251 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3252 | /** reg domain code */ |
| 3253 | A_UINT32 reg_domain; |
| 3254 | A_UINT32 reg_domain_2G; |
| 3255 | A_UINT32 reg_domain_5G; |
| 3256 | A_UINT32 conformance_test_limit_2G; |
| 3257 | A_UINT32 conformance_test_limit_5G; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3258 | A_UINT32 dfs_domain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3259 | } wmi_pdev_set_regdomain_cmd_fixed_param; |
| 3260 | |
| 3261 | typedef struct { |
| 3262 | /** true for scan start and flase for scan end */ |
| 3263 | A_UINT32 scan_start; |
| 3264 | } wmi_pdev_scan_cmd; |
| 3265 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 3266 | /* WMI support for setting ratemask in target */ |
| 3267 | |
| 3268 | typedef struct { |
| 3269 | A_UINT32 tlv_header; |
| 3270 | /* |
| 3271 | * TLV tag and len; tag equals |
| 3272 | * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param |
| 3273 | */ |
| 3274 | A_UINT32 vdev_id; |
| 3275 | /* |
| 3276 | * 0 - cck/ofdm |
| 3277 | * 1 - HT |
| 3278 | * 2 - VHT */ |
| 3279 | A_UINT32 type; |
| 3280 | |
| 3281 | A_UINT32 mask_lower32; |
| 3282 | A_UINT32 mask_higher32; |
| 3283 | } wmi_vdev_config_ratemask_cmd_fixed_param; |
| 3284 | |
| 3285 | /* nrp action - Filter Neighbor Rx Packets - add/remove filter */ |
| 3286 | enum { |
| 3287 | WMI_FILTER_NRP_ACTION_ADD = 0x1, |
| 3288 | WMI_FILTER_NRP_ACTION_REMOVE = 0x2, |
| 3289 | WMI_FILTER_NRP_ACTION_GET_LIST = 0x3, |
| 3290 | }; /* nrp - Neighbor Rx Packets */ |
| 3291 | |
| 3292 | /* nrp type - Filter Neighbor Rx Packets - ap/client addr */ |
| 3293 | enum { |
| 3294 | WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1, |
| 3295 | WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2, |
| 3296 | }; |
| 3297 | |
| 3298 | /* nrp flag - Filter Neighbor Rx Packets |
| 3299 | * (capture flag, 2 & 3 not initially supported) |
| 3300 | */ |
| 3301 | enum { |
| 3302 | WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1, |
| 3303 | WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2, |
| 3304 | WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3, |
| 3305 | }; |
| 3306 | |
| 3307 | /* Filter for Neighbor Rx Packets */ |
| 3308 | typedef struct { |
| 3309 | A_UINT32 tlv_header; |
| 3310 | /* |
| 3311 | * TLV tag and len; tag equals |
| 3312 | * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param |
| 3313 | */ |
| 3314 | A_UINT32 vdev_id; |
| 3315 | /* AP Bssid or Client Mac-addr */ |
| 3316 | wmi_mac_addr addr; |
| 3317 | /* Add/Remove NRF Filter */ |
| 3318 | A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */ |
| 3319 | /* client/ap filter */ |
| 3320 | A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */ |
| 3321 | /* optional - tx/rx capture */ |
| 3322 | A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */ |
| 3323 | /* BSSID index - index of the BSSID register */ |
| 3324 | A_UINT32 bssid_idx; |
| 3325 | } wmi_vdev_filter_nrp_config_cmd_fixed_param; |
| 3326 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3327 | /*Command to set/unset chip in quiet mode*/ |
| 3328 | typedef struct { |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 3329 | /* |
| 3330 | * TLV tag and len; tag equals |
| 3331 | * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param |
| 3332 | */ |
| 3333 | A_UINT32 tlv_header; |
| 3334 | /* |
| 3335 | * pdev_id for identifying the MAC, See macros |
| 3336 | * starting with WMI_PDEV_ID_ for values. |
| 3337 | */ |
| 3338 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3339 | A_UINT32 period; /*period in TUs */ |
| 3340 | A_UINT32 duration; /*duration in TUs */ |
| 3341 | A_UINT32 next_start; /*offset in TUs */ |
| 3342 | A_UINT32 enabled; /*enable/disable */ |
| 3343 | } wmi_pdev_set_quiet_cmd_fixed_param; |
| 3344 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3345 | typedef struct { |
| 3346 | /* TLV tag and len; tag equals |
| 3347 | * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param |
| 3348 | */ |
| 3349 | A_UINT32 tlv_header; |
| 3350 | A_UINT32 vdev_id; /* Virtual interface ID */ |
| 3351 | A_UINT32 period; /* period in TUs */ |
| 3352 | A_UINT32 duration; /* duration in TUs */ |
| 3353 | A_UINT32 next_start; /* offset in TUs */ |
| 3354 | A_UINT32 enabled; /* enable/disable */ |
| 3355 | } wmi_vdev_set_quiet_cmd_fixed_param; |
| 3356 | |
Krishna Kumaar Natarajan | ea0a796 | 2016-04-16 14:09:09 +0530 | [diff] [blame] | 3357 | typedef struct { |
| 3358 | /* |
| 3359 | * TLV tag and len; tag equals |
| 3360 | * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param |
| 3361 | */ |
| 3362 | A_UINT32 tlv_header; |
| 3363 | /* |
| 3364 | * vdev id indicating to which the vdev custom aggregation size |
| 3365 | * will be applied. |
| 3366 | */ |
| 3367 | A_UINT32 vdev_id; |
| 3368 | /* |
| 3369 | * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev |
| 3370 | * mentioned in vdev id |
| 3371 | */ |
| 3372 | A_UINT32 tx_aggr_size; |
| 3373 | /* |
| 3374 | * Size for rx aggregation (block ack window size limit) for |
| 3375 | * the vdev mentioned in vdev id |
| 3376 | */ |
| 3377 | A_UINT32 rx_aggr_size; |
| 3378 | } wmi_vdev_set_custom_aggr_size_cmd_fixed_param; |
| 3379 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3380 | /* |
| 3381 | * Command to enable/disable Green AP Power Save. |
| 3382 | * This helps conserve power during AP operation. When the AP has no |
| 3383 | * stations associated with it, the host can enable Green AP Power Save |
| 3384 | * to request the firmware to shut down all but one transmit and receive |
| 3385 | * chains. |
| 3386 | */ |
| 3387 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3388 | /** TLV tag and len; tag equals |
| 3389 | * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param |
| 3390 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3391 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3392 | /** pdev_id for identifying the MAC |
| 3393 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3394 | */ |
| 3395 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3396 | A_UINT32 enable; /*1:enable, 0:disable */ |
| 3397 | } wmi_pdev_green_ap_ps_enable_cmd_fixed_param; |
| 3398 | |
| 3399 | #define MAX_HT_IE_LEN 32 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3400 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3401 | typedef struct { |
| 3402 | A_UINT32 tlv_header; |
| 3403 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */ |
| 3404 | A_UINT32 reserved0; |
| 3405 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3406 | A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */ |
| 3407 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 3408 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 3409 | /** The TLV for the HT IE follows: |
| 3410 | * A_UINT32 ie_data[]; |
| 3411 | */ |
| 3412 | } wmi_pdev_set_ht_ie_cmd_fixed_param; |
| 3413 | |
| 3414 | #define MAX_VHT_IE_LEN 32 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3415 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3416 | typedef struct { |
| 3417 | A_UINT32 tlv_header; |
| 3418 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */ |
| 3419 | A_UINT32 reserved0; |
| 3420 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3421 | A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */ |
| 3422 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 3423 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 3424 | /** The TLV for the VHT IE follows: |
| 3425 | * A_UINT32 ie_data[]; |
| 3426 | */ |
| 3427 | } wmi_pdev_set_vht_ie_cmd_fixed_param; |
| 3428 | |
| 3429 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3430 | /** TLV tag and len; tag equals |
| 3431 | * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param |
| 3432 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3433 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3434 | /** pdev_id for identifying the MAC |
| 3435 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3436 | */ |
| 3437 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3438 | wmi_mac_addr base_macaddr; |
| 3439 | } wmi_pdev_set_base_macaddr_cmd_fixed_param; |
| 3440 | |
| 3441 | /* |
| 3442 | * For now, the spectral configuration is global rather than |
| 3443 | * per-vdev. The vdev is a placeholder and will be ignored |
| 3444 | * by the firmware. |
| 3445 | */ |
| 3446 | typedef struct { |
| 3447 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */ |
| 3448 | A_UINT32 vdev_id; |
| 3449 | A_UINT32 spectral_scan_count; |
| 3450 | A_UINT32 spectral_scan_period; |
| 3451 | A_UINT32 spectral_scan_priority; |
| 3452 | A_UINT32 spectral_scan_fft_size; |
| 3453 | A_UINT32 spectral_scan_gc_ena; |
| 3454 | A_UINT32 spectral_scan_restart_ena; |
| 3455 | A_UINT32 spectral_scan_noise_floor_ref; |
| 3456 | A_UINT32 spectral_scan_init_delay; |
| 3457 | A_UINT32 spectral_scan_nb_tone_thr; |
| 3458 | A_UINT32 spectral_scan_str_bin_thr; |
| 3459 | A_UINT32 spectral_scan_wb_rpt_mode; |
| 3460 | A_UINT32 spectral_scan_rssi_rpt_mode; |
| 3461 | A_UINT32 spectral_scan_rssi_thr; |
| 3462 | A_UINT32 spectral_scan_pwr_format; |
| 3463 | A_UINT32 spectral_scan_rpt_mode; |
| 3464 | A_UINT32 spectral_scan_bin_scale; |
| 3465 | A_UINT32 spectral_scan_dBm_adj; |
| 3466 | A_UINT32 spectral_scan_chn_mask; |
| 3467 | } wmi_vdev_spectral_configure_cmd_fixed_param; |
| 3468 | |
| 3469 | /* |
| 3470 | * Enabling, disabling and triggering the spectral scan |
| 3471 | * is a per-vdev operation. That is, it will set channel |
| 3472 | * flags per vdev rather than globally; so concurrent scan/run |
| 3473 | * and multiple STA (eg p2p, tdls, multi-band STA) is possible. |
| 3474 | */ |
| 3475 | typedef struct { |
| 3476 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */ |
| 3477 | A_UINT32 vdev_id; |
| 3478 | /* 0 - ignore; 1 - trigger, 2 - clear trigger */ |
| 3479 | A_UINT32 trigger_cmd; |
| 3480 | /* 0 - ignore; 1 - enable, 2 - disable */ |
| 3481 | A_UINT32 enable_cmd; |
| 3482 | } wmi_vdev_spectral_enable_cmd_fixed_param; |
| 3483 | |
| 3484 | typedef enum { |
| 3485 | WMI_CSA_IE_PRESENT = 0x00000001, |
| 3486 | WMI_XCSA_IE_PRESENT = 0x00000002, |
| 3487 | WMI_WBW_IE_PRESENT = 0x00000004, |
| 3488 | WMI_CSWARP_IE_PRESENT = 0x00000008, |
| 3489 | } WMI_CSA_EVENT_IES_PRESENT_FLAG; |
| 3490 | |
| 3491 | /* wmi CSA receive event from beacon frame */ |
| 3492 | typedef struct { |
| 3493 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */ |
| 3494 | A_UINT32 i_fc_dur; |
| 3495 | /* Bit 0-15: FC */ |
| 3496 | /* Bit 16-31: DUR */ |
| 3497 | wmi_mac_addr i_addr1; |
| 3498 | wmi_mac_addr i_addr2; |
| 3499 | /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be |
| 3500 | * changed in the future without breaking WMI compatibility */ |
| 3501 | A_UINT32 csa_ie[2]; |
| 3502 | A_UINT32 xcsa_ie[2]; |
| 3503 | A_UINT32 wb_ie[2]; |
| 3504 | A_UINT32 cswarp_ie; |
| 3505 | A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */ |
| 3506 | } wmi_csa_event_fixed_param; |
| 3507 | |
| 3508 | typedef enum { |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3509 | WAL_PEER_MCAST2UCAST_DISABLED = 0, |
| 3510 | /* Drop the frames if match is not found */ |
| 3511 | WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, |
| 3512 | /* Send as mcast if match is not found */ |
| 3513 | WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, |
| 3514 | } WMI_PEER_MCAST2UCAST_MODE; |
| 3515 | |
| 3516 | typedef enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3517 | /** TX chain mask */ |
| 3518 | WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
| 3519 | /** RX chain mask */ |
| 3520 | WMI_PDEV_PARAM_RX_CHAIN_MASK, |
| 3521 | /** TX power limit for 2G Radio */ |
| 3522 | WMI_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 3523 | /** TX power limit for 5G Radio */ |
| 3524 | WMI_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 3525 | /** TX power scale */ |
| 3526 | WMI_PDEV_PARAM_TXPOWER_SCALE, |
| 3527 | /** Beacon generation mode . 0: host, 1: target */ |
| 3528 | WMI_PDEV_PARAM_BEACON_GEN_MODE, |
| 3529 | /** Beacon generation mode . 0: staggered 1: bursted */ |
| 3530 | WMI_PDEV_PARAM_BEACON_TX_MODE, |
| 3531 | /** Resource manager off chan mode . |
| 3532 | * 0: turn off off chan mode. 1: turn on offchan mode |
| 3533 | */ |
| 3534 | WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 3535 | /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */ |
| 3536 | WMI_PDEV_PARAM_PROTECTION_MODE, |
| 3537 | /** Dynamic bandwidth 0: disable 1: enable */ |
| 3538 | WMI_PDEV_PARAM_DYNAMIC_BW, |
| 3539 | /** Non aggregrate/ 11g sw retry threshold.0-disable */ |
| 3540 | WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 3541 | /** aggregrate sw retry threshold. 0-disable*/ |
| 3542 | WMI_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 3543 | /** Station kickout threshold (non of consecutive failures).0-disable */ |
| 3544 | WMI_PDEV_PARAM_STA_KICKOUT_TH, |
| 3545 | /** Aggerate size scaling configuration per AC */ |
| 3546 | WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 3547 | /** LTR enable */ |
| 3548 | WMI_PDEV_PARAM_LTR_ENABLE, |
| 3549 | /** LTR latency for BE, in us */ |
| 3550 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 3551 | /** LTR latency for BK, in us */ |
| 3552 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 3553 | /** LTR latency for VI, in us */ |
| 3554 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 3555 | /** LTR latency for VO, in us */ |
| 3556 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 3557 | /** LTR AC latency timeout, in ms */ |
| 3558 | WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 3559 | /** LTR platform latency override, in us */ |
| 3560 | WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 3561 | /** LTR-M override, in us */ |
| 3562 | WMI_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 3563 | /** Tx activity timeout for LTR, in us */ |
| 3564 | WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 3565 | /** L1SS state machine enable */ |
| 3566 | WMI_PDEV_PARAM_L1SS_ENABLE, |
| 3567 | /** Deep sleep state machine enable */ |
| 3568 | WMI_PDEV_PARAM_DSLEEP_ENABLE, |
| 3569 | /** RX buffering flush enable */ |
| 3570 | WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| 3571 | /** RX buffering matermark */ |
| 3572 | WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| 3573 | /** RX buffering timeout enable */ |
| 3574 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| 3575 | /** RX buffering timeout value */ |
| 3576 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| 3577 | /** pdev level stats update period in ms */ |
| 3578 | WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 3579 | /** vdev level stats update period in ms */ |
| 3580 | WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 3581 | /** peer level stats update period in ms */ |
| 3582 | WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 3583 | /** beacon filter status update period */ |
| 3584 | WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 3585 | /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */ |
| 3586 | WMI_PDEV_PARAM_PMF_QOS, |
| 3587 | /** Access category on which ARP frames are sent */ |
| 3588 | WMI_PDEV_PARAM_ARP_AC_OVERRIDE, |
| 3589 | /** DCS configuration */ |
| 3590 | WMI_PDEV_PARAM_DCS, |
| 3591 | /** Enable/Disable ANI on target */ |
| 3592 | WMI_PDEV_PARAM_ANI_ENABLE, |
| 3593 | /** configure the ANI polling period */ |
| 3594 | WMI_PDEV_PARAM_ANI_POLL_PERIOD, |
| 3595 | /** configure the ANI listening period */ |
| 3596 | WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 3597 | /** configure OFDM immunity level */ |
| 3598 | WMI_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 3599 | /** configure CCK immunity level */ |
| 3600 | WMI_PDEV_PARAM_ANI_CCK_LEVEL, |
| 3601 | /** Enable/Disable CDD for 1x1 STAs in rate control module */ |
| 3602 | WMI_PDEV_PARAM_DYNTXCHAIN, |
| 3603 | /** Enable/Disable proxy STA */ |
| 3604 | WMI_PDEV_PARAM_PROXY_STA, |
| 3605 | /** Enable/Disable low power state when all VDEVs are inactive/idle. */ |
| 3606 | WMI_PDEV_PARAM_IDLE_PS_CONFIG, |
| 3607 | /** Enable/Disable power gating sleep */ |
| 3608 | WMI_PDEV_PARAM_POWER_GATING_SLEEP, |
| 3609 | /** Enable/Disable Rfkill */ |
| 3610 | WMI_PDEV_PARAM_RFKILL_ENABLE, |
| 3611 | /** Set Bursting DUR */ |
| 3612 | WMI_PDEV_PARAM_BURST_DUR, |
| 3613 | /** Set Bursting ENABLE */ |
| 3614 | WMI_PDEV_PARAM_BURST_ENABLE, |
| 3615 | /** HW rfkill config */ |
| 3616 | WMI_PDEV_PARAM_HW_RFKILL_CONFIG, |
| 3617 | /** Enable radio low power features */ |
| 3618 | WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, |
| 3619 | /** L1SS entry and residency time track */ |
| 3620 | WMI_PDEV_PARAM_L1SS_TRACK, |
| 3621 | /** set hyst at runtime, requirement from SS */ |
| 3622 | WMI_PDEV_PARAM_HYST_EN, |
| 3623 | /** Enable/ Disable POWER COLLAPSE */ |
| 3624 | WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, |
| 3625 | /** configure LED system state */ |
| 3626 | WMI_PDEV_PARAM_LED_SYS_STATE, |
| 3627 | /** Enable/Disable LED */ |
| 3628 | WMI_PDEV_PARAM_LED_ENABLE, |
| 3629 | /** set DIRECT AUDIO time latency */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3630 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3631 | /** set DIRECT AUDIO Feature ENABLE */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3632 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3633 | /** pdev level whal mib stats update enable */ |
| 3634 | WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, |
| 3635 | /** ht/vht info based on vdev */ |
| 3636 | WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, |
| 3637 | /** Set CTS channel BW for dynamic BW adjustment feature */ |
| 3638 | WMI_PDEV_PARAM_CTS_CBW, |
| 3639 | /** Set GPIO pin info used by WNTS */ |
| 3640 | WMI_PDEV_PARAM_WNTS_CONFIG, |
| 3641 | /** Enable/Disable hardware adaptive early rx feature */ |
| 3642 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, |
| 3643 | /** The minimum early rx duration, to ensure early rx duration is non-zero */ |
| 3644 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, |
| 3645 | /** Increasing/decreasing step used by hardware */ |
| 3646 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, |
| 3647 | /** The fixed early rx duration when adaptive early rx is disabled */ |
| 3648 | WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, |
| 3649 | /** Enable/Disable bmiss based adaptive beacon timeout feature */ |
| 3650 | WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, |
| 3651 | /* |
| 3652 | * The minimum beacon timeout duration, to ensure beacon timeout |
| 3653 | * duration is non-zero |
| 3654 | */ |
| 3655 | WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, |
| 3656 | /** Increasing/decreasing step used by hardware */ |
| 3657 | WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, |
| 3658 | /* |
| 3659 | * The fixed beacon timeout duration when bmiss based adaptive beacon |
| 3660 | * timeout is disabled |
| 3661 | */ |
| 3662 | WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, |
| 3663 | /* |
| 3664 | * Enable/Disable Congestion Estimator based adaptive beacon |
| 3665 | * timeout feature */ |
| 3666 | WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, |
| 3667 | /* |
| 3668 | * combo value of ce_id, ce_threshold, ce_time, refer |
| 3669 | * to WMI_CE_BTO_CE_ID_MASK |
| 3670 | */ |
| 3671 | WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, |
| 3672 | /** 2G TX chain mask */ |
| 3673 | WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, |
| 3674 | /** 2G RX chain mask */ |
| 3675 | WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, |
| 3676 | /** 5G TX chain mask */ |
| 3677 | WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, |
| 3678 | /** 5G RX chain mask */ |
| 3679 | WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, |
| 3680 | /* Set tx chain mask for CCK rates */ |
| 3681 | WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, |
| 3682 | /* Set tx chain mask for 1SS stream */ |
| 3683 | WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, |
Nirav Shah | e1e4a81 | 2015-11-05 11:15:54 +0530 | [diff] [blame] | 3684 | /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/ |
| 3685 | WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 3686 | /* TX power backoff in dB: tx power -= param value |
| 3687 | * Host passes values(DB) to Halphy, Halphy reduces the power table by |
| 3688 | * the values. Safety check will happen in Halphy |
| 3689 | */ |
| 3690 | WMI_PDEV_PARAM_TXPOWER_DECR_DB, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3691 | /** enable and disable aggregate burst along with duration */ |
| 3692 | WMI_PDEV_PARAM_AGGR_BURST, |
| 3693 | /** Set the global RX decap mode */ |
| 3694 | WMI_PDEV_PARAM_RX_DECAP_MODE, |
| 3695 | /** Enable/Disable Fast channel reset */ |
| 3696 | WMI_PDEV_PARAM_FAST_CHANNEL_RESET, |
| 3697 | /** Default antenna for Smart antenna */ |
| 3698 | WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, |
| 3699 | /** Set the user-specified antenna gain */ |
| 3700 | WMI_PDEV_PARAM_ANTENNA_GAIN, |
| 3701 | /** Set the user-specified RX filter */ |
| 3702 | WMI_PDEV_PARAM_RX_FILTER, |
| 3703 | /* |
| 3704 | * configure the user-specified MCAST tid for managed mcast feature |
| 3705 | * 0-15 is the valid range. 0xff will clear the tid setting |
| 3706 | */ |
| 3707 | WMI_PDEV_SET_MCAST_TO_UCAST_TID, |
| 3708 | /** Enable/Disable Proxy sta mode */ |
| 3709 | WMI_PDEV_PARAM_PROXY_STA_MODE, |
| 3710 | /* |
| 3711 | * configure the mcast2ucast mode for the pdev->peer_mcast. |
| 3712 | * See WMI_PEER_MCAST2UCAST_MODE for possible values |
| 3713 | */ |
| 3714 | WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, |
| 3715 | /** Sets the Mcast buffers for cloning, to support Mcast enhancement */ |
| 3716 | WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, |
| 3717 | /** Remove the Mcast buffers added by host */ |
| 3718 | WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, |
| 3719 | /** En/disable station power save state indication */ |
| 3720 | WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, |
| 3721 | /** Access category on which ARP frames are sent */ |
| 3722 | WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, |
| 3723 | /** allow or disallow interbss frame forwarding */ |
| 3724 | WMI_PDEV_PARAM_BLOCK_INTERBSS, |
| 3725 | /** Enable/Disable reset */ |
| 3726 | WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, |
| 3727 | /** Enable/Disable/Set MSDU_TTL in milliseconds. */ |
| 3728 | WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, |
| 3729 | /** Set global PPDU duration limit (usec). */ |
| 3730 | WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, |
| 3731 | /** set txbf sounding period of vap in milliseconds */ |
| 3732 | WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, |
| 3733 | /** Set promiscuous mode */ |
| 3734 | WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, |
| 3735 | /** Set burst mode */ |
| 3736 | WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, |
| 3737 | /** enable enhanced stats */ |
| 3738 | WMI_PDEV_PARAM_EN_STATS, |
| 3739 | /** Set mu-grouping policy */ |
| 3740 | WMI_PDEV_PARAM_MU_GROUP_POLICY, |
| 3741 | /** Channel Hopping Enable */ |
| 3742 | WMI_PDEV_PARAM_NOISE_DETECTION, |
| 3743 | /** Set Channel Hopping NF threshold in dBm */ |
| 3744 | WMI_PDEV_PARAM_NOISE_THRESHOLD, |
| 3745 | /** Set PAPRD policy */ |
| 3746 | WMI_PDEV_PARAM_DPD_ENABLE, |
| 3747 | /** Enable/disable mcast/bcast echo, used by ProxySTA */ |
| 3748 | WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, |
| 3749 | /** ATF enable/disable strict schedule */ |
| 3750 | WMI_PDEV_PARAM_ATF_STRICT_SCH, |
| 3751 | /** ATF set access category duration, B0-B29 duration, B30-B31: AC */ |
| 3752 | WMI_PDEV_PARAM_ATF_SCHED_DURATION, |
| 3753 | /** Default antenna polarization */ |
| 3754 | WMI_PDEV_PARAM_ANT_PLZN, |
| 3755 | /** Set mgmt retry limit */ |
| 3756 | WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, |
| 3757 | /** Set CCA sensitivity level in dBm */ |
| 3758 | WMI_PDEV_PARAM_SENSITIVITY_LEVEL, |
| 3759 | /** Set 2G positive and negative Tx power in 0.5dBm units */ |
| 3760 | WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, |
| 3761 | /** Set 5G positive and negative Tx power in 0.5dBm units */ |
| 3762 | WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, |
| 3763 | /** Enable/disble AMSDU for tids */ |
| 3764 | WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, |
| 3765 | /** Enable/disable AMPDU for tids */ |
| 3766 | WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, |
| 3767 | /** Set CCA threshold in dBm */ |
| 3768 | WMI_PDEV_PARAM_CCA_THRESHOLD, |
| 3769 | /** RTS Fixed rate setting */ |
| 3770 | WMI_PDEV_PARAM_RTS_FIXED_RATE, |
| 3771 | /** Pdev reset */ |
| 3772 | WMI_PDEV_PARAM_PDEV_RESET, |
| 3773 | /** wapi mbssid offset **/ |
| 3774 | WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, |
| 3775 | /** ARP DEBUG source address*/ |
| 3776 | WMI_PDEV_PARAM_ARP_DBG_SRCADDR, |
| 3777 | /** ARP DEBUG destination address*/ |
| 3778 | WMI_PDEV_PARAM_ARP_DBG_DSTADDR, |
| 3779 | /** ATF enable/disable obss noise scheduling */ |
| 3780 | WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, |
| 3781 | /** ATF obss noise scaling factor */ |
| 3782 | WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, |
| 3783 | /** |
| 3784 | * TX power reduction scaling exponent - final tx power is the |
| 3785 | * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by |
| 3786 | * 2^(scale exponent). For example: |
| 3787 | * If this scale exponent is 0, the power is unchanged (divided by 2^0) |
| 3788 | * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB |
| 3789 | * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB |
| 3790 | * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB |
| 3791 | */ |
| 3792 | WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, |
| 3793 | /** ATF enabe/disabe dynamically */ |
| 3794 | WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, |
Nitesh Shah | 49eecf0 | 2016-06-29 20:36:58 +0530 | [diff] [blame] | 3795 | /** Set tx retry limit for control frames. 0 = disable, 31 = max */ |
| 3796 | WMI_PDEV_PARAM_CTRL_RETRY_LIMIT, |
| 3797 | /** Set propagation delay for 2G / 5G band. |
| 3798 | * The propagation delay is fundamentally a per-peer property, but |
| 3799 | * the target may not support per-peer settings for ack timeouts. |
| 3800 | * This pdev parameter allows the MAC-level ack timeout to be set to |
| 3801 | * a value suitable for the worst-case propagation delay of any peer |
| 3802 | * within that pdev. |
| 3803 | * Units are microseconds. |
| 3804 | */ |
| 3805 | WMI_PDEV_PARAM_PROPAGATION_DELAY, |
Nitesh Shah | a43b09d | 2016-07-20 17:20:07 +0530 | [diff] [blame] | 3806 | /** |
| 3807 | * Host can enable/disable ANT DIV feature |
| 3808 | * if it's been enabled in BDF |
| 3809 | */ |
| 3810 | WMI_PDEV_PARAM_ENA_ANT_DIV, |
| 3811 | /** Host can force one chain to select a specific ANT */ |
| 3812 | WMI_PDEV_PARAM_FORCE_CHAIN_ANT, |
| 3813 | /** |
| 3814 | * Start a cycle ANT self test periodically. |
| 3815 | * In the test, the FW would select each ANT pair |
| 3816 | * one by one, the cycle time could be configured |
| 3817 | * via WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL |
| 3818 | */ |
| 3819 | WMI_PDEV_PARAM_ANT_DIV_SELFTEST, |
| 3820 | /** |
| 3821 | * Configure the cycle time of ANT self test, |
| 3822 | * the unit is micro second. Per the timer |
| 3823 | * limitation, too small value could be not so |
| 3824 | * accurate. |
| 3825 | */ |
| 3826 | WMI_PDEV_PARAM_ANT_DIV_SELFTEST_INTVL, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3827 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3828 | } WMI_PDEV_PARAM; |
| 3829 | |
| 3830 | typedef enum { |
| 3831 | /** Set the loglevel */ |
| 3832 | WMI_DBGLOG_LOG_LEVEL = 0x1, |
| 3833 | /** Enable VAP level debug */ |
| 3834 | WMI_DBGLOG_VAP_ENABLE, |
| 3835 | /** Disable VAP level debug */ |
| 3836 | WMI_DBGLOG_VAP_DISABLE, |
| 3837 | /** Enable MODULE level debug */ |
| 3838 | WMI_DBGLOG_MODULE_ENABLE, |
| 3839 | /** Disable MODULE level debug */ |
| 3840 | WMI_DBGLOG_MODULE_DISABLE, |
| 3841 | /** Enable MODULE level debug */ |
| 3842 | WMI_DBGLOG_MOD_LOG_LEVEL, |
| 3843 | /** set type of the debug output */ |
| 3844 | WMI_DBGLOG_TYPE, |
| 3845 | /** Enable Disable debug */ |
| 3846 | WMI_DBGLOG_REPORT_ENABLE |
| 3847 | } WMI_DBG_PARAM; |
| 3848 | |
| 3849 | /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */ |
| 3850 | typedef enum { |
| 3851 | WMI_CTS_CBW_INVALID = 0, |
| 3852 | WMI_CTS_CBW_20, |
| 3853 | WMI_CTS_CBW_40, |
| 3854 | WMI_CTS_CBW_80, |
| 3855 | WMI_CTS_CBW_80_80, |
| 3856 | WMI_CTS_CBW_160, |
| 3857 | } WMI_CTS_CBW; |
| 3858 | |
| 3859 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3860 | /** TLV tag and len; tag equals |
| 3861 | * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param |
| 3862 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3863 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3864 | /** pdev_id for identifying the MAC |
| 3865 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3866 | */ |
| 3867 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3868 | /** parameter id */ |
| 3869 | A_UINT32 param_id; |
| 3870 | /** parametr value */ |
| 3871 | A_UINT32 param_value; |
| 3872 | } wmi_pdev_set_param_cmd_fixed_param; |
| 3873 | |
| 3874 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3875 | /** TLV tag and len; tag equals |
| 3876 | * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param |
| 3877 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3878 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3879 | /** pdev_id for identifying the MAC |
| 3880 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3881 | */ |
| 3882 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3883 | /** parameter */ |
| 3884 | A_UINT32 param; |
| 3885 | } wmi_pdev_get_tpc_config_cmd_fixed_param; |
| 3886 | |
| 3887 | #define WMI_FAST_DIVERSITY_BIT_OFFSET 0 |
| 3888 | #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1 |
| 3889 | |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 3890 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2 |
| 3891 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \ |
| 3892 | (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) |
| 3893 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \ |
| 3894 | (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \ |
| 3895 | WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) |
| 3896 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \ |
| 3897 | do { \ |
| 3898 | (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \ |
| 3899 | (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \ |
| 3900 | WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \ |
| 3901 | } while (0) |
| 3902 | |
| 3903 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6 |
| 3904 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \ |
| 3905 | (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) |
| 3906 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \ |
| 3907 | (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \ |
| 3908 | WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) |
| 3909 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \ |
| 3910 | do { \ |
| 3911 | (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \ |
| 3912 | (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \ |
| 3913 | WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \ |
| 3914 | } while (0) |
| 3915 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3916 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3917 | /** TLV tag and len; tag equals |
| 3918 | * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param |
| 3919 | */ |
| 3920 | A_UINT32 tlv_header; |
| 3921 | union { |
| 3922 | /* OBSOLETE - will be removed once all refs are gone */ |
| 3923 | A_UINT32 mac_id; |
| 3924 | /** pdev_id for identifying the MAC |
| 3925 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3926 | */ |
| 3927 | A_UINT32 pdev_id; |
| 3928 | }; |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 3929 | /* |
| 3930 | * The following "value" field is divided into bit fields as follows: |
| 3931 | * bits | purpose |
| 3932 | * -----+--------------------------------------- |
| 3933 | * 0 | enable/disable FAST diversity |
| 3934 | * 1 | enable/disable SLOW diversity |
| 3935 | * 5:2 | chain0 slow-diversity weighting factor |
| 3936 | * 9:6 | chain1 slow-diversity weighting factor |
| 3937 | * 31:10| currenty unused (set to 0x0) |
| 3938 | * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants. |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3939 | */ |
| 3940 | A_UINT32 value; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3941 | } wmi_pdev_set_antenna_diversity_cmd_fixed_param; |
| 3942 | |
| 3943 | #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3 |
| 3944 | |
| 3945 | typedef struct { |
| 3946 | /* |
| 3947 | * TLV tag and len; tag equals |
| 3948 | * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param |
| 3949 | */ |
| 3950 | A_UINT32 tlv_header; |
| 3951 | /* vdev_id, where RSSI monitoring will take place */ |
| 3952 | A_UINT32 vdev_id; |
| 3953 | /* |
| 3954 | * host will configure request_id and firmware echo |
| 3955 | * this id in RSSI_BREACH_EVENT |
| 3956 | */ |
| 3957 | A_UINT32 request_id; |
| 3958 | /* |
| 3959 | * bit [0-2] = low_rssi_breach_enabled[0-2] |
| 3960 | * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] |
| 3961 | */ |
| 3962 | A_UINT32 enabled_bitmap; |
| 3963 | /* unit dBm. host driver to make sure [0] > [1] > [2] */ |
| 3964 | A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3965 | /* unit dBm. host driver to make sure [0] < [1] < [2] */ |
| 3966 | A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3967 | /* |
| 3968 | * unit dBm. once low rssi[] breached, same event |
| 3969 | * bitmap will be generated only after signal gets better |
| 3970 | * than this level. This value is adopted for all low_rssi_breach_threshold[3] |
| 3971 | */ |
| 3972 | A_UINT32 lo_rssi_reenable_hysteresis; |
| 3973 | /* |
| 3974 | * unit dBm. once hi rssi[] breached, same event bitmap |
| 3975 | * will be generated only after signal gets worse than this |
| 3976 | * level. This value is adopted for all hi_rssi_breach_threshold[3] |
| 3977 | */ |
| 3978 | A_UINT32 hi_rssi_reenable_histeresis; |
| 3979 | /* |
| 3980 | * After last event is generated, we wait |
| 3981 | * until this interval to generate next event |
| 3982 | */ |
| 3983 | A_UINT32 min_report_interval; |
| 3984 | /* this is to suppress number of event to be generated */ |
| 3985 | A_UINT32 max_num_report; |
| 3986 | } wmi_rssi_breach_monitor_config_fixed_param; |
| 3987 | |
| 3988 | typedef struct { |
| 3989 | /** parameter */ |
| 3990 | A_UINT32 param; |
| 3991 | } wmi_pdev_dump_cmd; |
| 3992 | |
| 3993 | typedef enum { |
| 3994 | PAUSE_TYPE_CHOP = 0x1, |
| 3995 | /** for MCC (switch channel), only vdev_map is valid */ |
| 3996 | PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */ |
| 3997 | PAUSE_TYPE_UAPSD = 0x3, |
| 3998 | /** for uapsd, only peer_id and tid_map are valid. */ |
| 3999 | PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, |
| 4000 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 4001 | PAUSE_TYPE_P2P_GO_PS = 0x5, |
| 4002 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 4003 | PAUSE_TYPE_STA_ADD_BA = 0x6, |
| 4004 | /** only peer_id and tid_map are valid, actually only one tid is set at one time */ |
| 4005 | PAUSE_TYPE_AP_PS = 0x7, |
| 4006 | /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */ |
| 4007 | PAUSE_TYPE_IBSS_PS = 0x8, |
| 4008 | /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */ |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 4009 | PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, |
| 4010 | /* |
| 4011 | * for TDLS offchannel MCC (switch channel), only vdev_map is valid, |
| 4012 | * TDLS connection tracker needs to be notified |
| 4013 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4014 | PAUSE_TYPE_HOST = 0x15, |
| 4015 | /** host is requesting vdev pause */ |
| 4016 | } wmi_tx_pause_type; |
| 4017 | |
| 4018 | typedef enum { |
| 4019 | ACTION_PAUSE = 0x0, |
| 4020 | ACTION_UNPAUSE = 0x1, |
| 4021 | } wmi_tx_pause_action; |
| 4022 | |
| 4023 | typedef struct { |
| 4024 | A_UINT32 tlv_header; |
| 4025 | A_UINT32 pause_type; |
| 4026 | A_UINT32 action; |
| 4027 | A_UINT32 vdev_map; |
| 4028 | A_UINT32 peer_id; |
| 4029 | A_UINT32 tid_map; |
| 4030 | } wmi_tx_pause_event_fixed_param; |
| 4031 | |
| 4032 | typedef enum { |
| 4033 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0, |
| 4034 | WMI_MGMT_TX_COMP_TYPE_DISCARD, |
| 4035 | WMI_MGMT_TX_COMP_TYPE_INSPECT, |
| 4036 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK, |
| 4037 | WMI_MGMT_TX_COMP_TYPE_MAX, |
| 4038 | } WMI_MGMT_TX_COMP_STATUS_TYPE; |
| 4039 | |
| 4040 | typedef struct { |
| 4041 | A_UINT32 tlv_header; |
| 4042 | A_UINT32 desc_id; /* from tx_send_cmd */ |
| 4043 | A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */ |
| 4044 | } wmi_mgmt_tx_compl_event_fixed_param; |
| 4045 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 4046 | typedef struct { |
| 4047 | A_UINT32 tlv_header; |
| 4048 | A_UINT32 num_reports; |
| 4049 | /* tlv for completion |
| 4050 | * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd |
| 4051 | * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE |
| 4052 | */ |
| 4053 | } wmi_mgmt_tx_compl_bundle_event_fixed_param; |
| 4054 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4055 | #define WMI_TPC_RATE_MAX 160 |
| 4056 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */ |
| 4057 | #define WMI_TPC_TX_NUM_CHAIN 4 |
| 4058 | |
| 4059 | typedef enum { |
| 4060 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, |
| 4061 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, |
| 4062 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, |
| 4063 | } WMI_TPC_CONFIG_EVENT_FLAG; |
| 4064 | |
| 4065 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4066 | /* TLV tag and len; tag equals |
| 4067 | * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param |
| 4068 | */ |
| 4069 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4070 | A_UINT32 regDomain; |
| 4071 | A_UINT32 chanFreq; |
| 4072 | A_UINT32 phyMode; |
| 4073 | A_UINT32 twiceAntennaReduction; |
| 4074 | A_UINT32 twiceMaxRDPower; |
| 4075 | A_INT32 twiceAntennaGain; |
| 4076 | A_UINT32 powerLimit; |
| 4077 | A_UINT32 rateMax; |
| 4078 | A_UINT32 numTxChain; |
| 4079 | A_UINT32 ctl; |
| 4080 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4081 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without |
| 4082 | * breaking the WMI compatibility |
| 4083 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4084 | A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN]; |
| 4085 | A_INT8 |
| 4086 | maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN] |
| 4087 | [WMI_TPC_TX_NUM_CHAIN]; |
| 4088 | A_INT8 |
| 4089 | maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN] |
| 4090 | [WMI_TPC_TX_NUM_CHAIN]; |
| 4091 | A_INT8 |
| 4092 | maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN] |
| 4093 | [WMI_TPC_TX_NUM_CHAIN]; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4094 | /** pdev_id for identifying the MAC |
| 4095 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4096 | */ |
| 4097 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4098 | /* This TLV is followed by a byte array: |
| 4099 | * A_UINT8 ratesArray[]; |
| 4100 | */ |
| 4101 | } wmi_pdev_tpc_config_event_fixed_param; |
| 4102 | |
| 4103 | typedef struct { |
| 4104 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */ |
| 4105 | A_UINT32 periodCnt; |
| 4106 | A_UINT32 L1Cnt; |
| 4107 | A_UINT32 L11Cnt; |
| 4108 | A_UINT32 L12Cnt; |
| 4109 | A_UINT32 L1Entry; |
| 4110 | A_UINT32 L11Entry; |
| 4111 | A_UINT32 L12Entry; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4112 | /** pdev_id for identifying the MAC |
| 4113 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4114 | */ |
| 4115 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4116 | } wmi_pdev_l1ss_track_event_fixed_param; |
| 4117 | |
| 4118 | typedef struct { |
| 4119 | A_UINT32 len; |
| 4120 | A_UINT32 msgref; |
| 4121 | A_UINT32 segmentInfo; |
| 4122 | } wmi_pdev_seg_hdr_info; |
| 4123 | |
| 4124 | /* |
| 4125 | * Transmit power scale factor. |
| 4126 | * |
| 4127 | */ |
| 4128 | typedef enum { |
| 4129 | WMI_TP_SCALE_MAX = 0, /* no scaling (default) */ |
| 4130 | WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ |
| 4131 | WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ |
| 4132 | WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ |
| 4133 | WMI_TP_SCALE_MIN = 4, /* min, but still on */ |
| 4134 | WMI_TP_SCALE_SIZE = 5, /* max num of enum */ |
| 4135 | } WMI_TP_SCALE; |
| 4136 | |
| 4137 | #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32) |
| 4138 | |
| 4139 | typedef struct { |
| 4140 | /** message buffer, NULL terminated */ |
| 4141 | char bufp[WMI_MAX_DEBUG_MESG]; |
| 4142 | } wmi_debug_mesg_event; |
| 4143 | |
| 4144 | enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4145 | /** P2P device */ |
| 4146 | VDEV_SUBTYPE_P2PDEV = 0, |
| 4147 | /** P2P client */ |
| 4148 | VDEV_SUBTYPE_P2PCLI, |
| 4149 | /** P2P GO */ |
| 4150 | VDEV_SUBTYPE_P2PGO, |
| 4151 | /** BT3.0 HS */ |
| 4152 | VDEV_SUBTYPE_BT, |
| 4153 | }; |
| 4154 | |
| 4155 | typedef struct { |
| 4156 | /** idnore power , only use flags , mode and freq */ |
| 4157 | wmi_channel chan; |
| 4158 | } wmi_pdev_set_channel_cmd; |
| 4159 | |
| 4160 | typedef enum { |
| 4161 | WMI_PKTLOG_EVENT_RX = 0x1, |
| 4162 | WMI_PKTLOG_EVENT_TX = 0x2, |
| 4163 | WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */ |
| 4164 | WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */ |
| 4165 | /* 0x10 used by deprecated DBG_PRINT */ |
| 4166 | WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */ |
Anurag Chouhan | e28b1f0 | 2016-07-29 11:15:29 +0530 | [diff] [blame] | 4167 | WMI_PKTLOG_EVENT_SW = 0x40, /* To support SW defined events */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4168 | } WMI_PKTLOG_EVENT; |
| 4169 | |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 4170 | typedef enum { |
| 4171 | /* (default) FW will decide under what conditions to enable pktlog */ |
| 4172 | WMI_PKTLOG_ENABLE_AUTO = 0, |
| 4173 | WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */ |
| 4174 | } WMI_PKTLOG_ENABLE; |
| 4175 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4176 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4177 | /** TLV tag and len; tag equals |
| 4178 | * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param |
| 4179 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4180 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4181 | /** pdev_id for identifying the MAC |
| 4182 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4183 | */ |
| 4184 | A_UINT32 pdev_id; |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 4185 | A_UINT32 evlist; /* WMI_PKTLOG_EVENT */ |
| 4186 | A_UINT32 enable; /* WMI_PKTLOG_ENABLE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4187 | } wmi_pdev_pktlog_enable_cmd_fixed_param; |
| 4188 | |
| 4189 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4190 | /** TLV tag and len; tag equals |
| 4191 | * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param |
| 4192 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4193 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4194 | /** pdev_id for identifying the MAC |
| 4195 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4196 | */ |
| 4197 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4198 | } wmi_pdev_pktlog_disable_cmd_fixed_param; |
| 4199 | |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4200 | typedef struct { |
| 4201 | /* |
| 4202 | * TLV tag and len; tag equals |
| 4203 | * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param |
| 4204 | */ |
| 4205 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4206 | /** pdev_id for identifying the MAC |
| 4207 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4208 | */ |
| 4209 | A_UINT32 pdev_id; |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4210 | /* |
| 4211 | * enable for mib stats collection. |
| 4212 | * Stats are delivered to host in wmi_mib_stats structure. |
| 4213 | * If enable_Mib=1, stats collection is enabled. |
| 4214 | * If enable_Mib=0, stats collection does not happen |
| 4215 | */ |
| 4216 | A_UINT32 enable_Mib; |
| 4217 | } wmi_mib_stats_enable_cmd_fixed_param; |
| 4218 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4219 | /** Customize the DSCP (bit) to TID (0-7) mapping for QOS. |
| 4220 | * NOTE: This constant cannot be changed without breaking |
| 4221 | * WMI Compatibility. */ |
| 4222 | |
| 4223 | #define WMI_DSCP_MAP_MAX (64) |
| 4224 | /* |
| 4225 | * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target |
| 4226 | * @details |
| 4227 | * Create an API for sending the custom DSCP-to-TID map to the target |
| 4228 | * If this is a request from the user space or from above the UMAC |
| 4229 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 4230 | * Provide a place holder for this API in the ieee80211com (ic). |
| 4231 | * |
| 4232 | * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping |
| 4233 | * in the target should be directed to the function pointer in the ic. |
| 4234 | * |
| 4235 | * Implementation details of the API to send the map to the target are as described- |
| 4236 | * |
| 4237 | * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map. |
| 4238 | * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate |
| 4239 | * 64 TID values for 2^6 (64) DSCP ids. |
| 4240 | * Example: |
| 4241 | * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = { |
| 4242 | * 0, 0, 0, 0, 0, 0, 0, 0, |
| 4243 | * 1, 1, 1, 1, 1, 1, 1, 1, |
| 4244 | * 2, 2, 2, 2, 2, 2, 2, 2, |
| 4245 | * 3, 3, 3, 3, 3, 3, 3, 3, |
| 4246 | * 4, 4, 4, 4, 4, 4, 4, 4, |
| 4247 | * 5, 5, 5, 5, 5, 5, 5, 5, |
| 4248 | * 6, 6, 6, 6, 6, 6, 6, 6, |
| 4249 | * 7, 7, 7, 7, 7, 7, 7, 7, |
| 4250 | * }; |
| 4251 | * |
| 4252 | * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map. |
| 4253 | * |
| 4254 | * 3. Copy the DSCP-to-TID map into the WMI buffer. |
| 4255 | * |
| 4256 | * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the |
| 4257 | * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API |
| 4258 | * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and |
| 4259 | * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id. |
| 4260 | * |
| 4261 | */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4262 | |
| 4263 | /* DEPRECATED - use VDEV level command instead |
| 4264 | * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param) |
| 4265 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4266 | typedef struct { |
| 4267 | A_UINT32 tlv_header; |
| 4268 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */ |
| 4269 | A_UINT32 reserved0; |
| 4270 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 4271 | /* map indicating DSCP to TID conversion */ |
| 4272 | A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
| 4273 | } wmi_pdev_set_dscp_tid_map_cmd_fixed_param; |
| 4274 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 4275 | typedef struct { |
| 4276 | A_UINT32 tlv_header; |
| 4277 | /* |
| 4278 | * TLV tag and len; tag equals |
| 4279 | * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param |
| 4280 | */ |
| 4281 | A_UINT32 vdev_id; |
| 4282 | /** map indicating DSCP to TID conversion */ |
| 4283 | A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
Rajeev Kumar | e18f528 | 2016-04-15 14:08:29 -0700 | [diff] [blame] | 4284 | A_UINT32 enable_override; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 4285 | } wmi_vdev_set_dscp_tid_map_cmd_fixed_param; |
| 4286 | |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 4287 | enum WMI_WAKE_GPIO_TYPE { |
| 4288 | WMI_WAKE_GPIO_LOW = 1, |
| 4289 | WMI_WAKE_GPIO_HIGH = 2, |
| 4290 | WMI_WAKE_GPIO_RISING_EDGE = 3, |
| 4291 | WMI_WAKE_GPIO_FALLING_EDGE = 4, |
| 4292 | }; |
| 4293 | |
| 4294 | /** |
| 4295 | * Set GPIO numbers used to wakeup host and wakeup target. |
| 4296 | */ |
| 4297 | typedef struct { |
| 4298 | /** |
| 4299 | * TLV tag and len; tag equals |
| 4300 | * WMITLV_TAG_STRUC_WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param |
| 4301 | */ |
| 4302 | A_UINT32 tlv_header; |
| 4303 | /* gpio num used to wakeup host, 0xff disable wakeup gpio */ |
| 4304 | A_UINT32 host_wakeup_gpio; |
| 4305 | /* refer to WMI_WAKE_GPIO_TYPE */ |
| 4306 | A_UINT32 host_wakeup_type; |
| 4307 | /* gpio num used to wakeup target, 0xff disable wakeup gpio */ |
| 4308 | A_UINT32 target_wakeup_gpio; |
| 4309 | /* refer to WMI_WAKE_GPIO_TYPE */ |
| 4310 | A_UINT32 target_wakeup_type; |
| 4311 | } WMI_PDEV_SET_WAKEUP_CONFIG_CMDID_fixed_param; |
| 4312 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4313 | /** Fixed rate (rate-code) for broadcast/ multicast data frames */ |
| 4314 | /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames |
| 4315 | * @details |
| 4316 | * Create an API for setting the custom rate for the MCAST and BCAST frames |
| 4317 | * in the target. If this is a request from the user space or from above the UMAC |
| 4318 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 4319 | * Provide a place holder for this API in the ieee80211com (ic). |
| 4320 | * |
| 4321 | * Implementation details of the API to set custom rates for MCAST and BCAST in |
| 4322 | * the target are as described- |
| 4323 | * |
| 4324 | * 1. The function will have 3 arguments- |
| 4325 | * vap structure, |
| 4326 | * MCAST/ BCAST identifier code, |
| 4327 | * 8 bit rate code |
| 4328 | * |
| 4329 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 4330 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 4331 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 4332 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 4333 | * OFDM : 0: OFDM 48 Mbps |
| 4334 | * 1: OFDM 24 Mbps |
| 4335 | * 2: OFDM 12 Mbps |
| 4336 | * 3: OFDM 6 Mbps |
| 4337 | * 4: OFDM 54 Mbps |
| 4338 | * 5: OFDM 36 Mbps |
| 4339 | * 6: OFDM 18 Mbps |
| 4340 | * 7: OFDM 9 Mbps |
| 4341 | * CCK (pream == 1) |
| 4342 | * 0: CCK 11 Mbps Long |
| 4343 | * 1: CCK 5.5 Mbps Long |
| 4344 | * 2: CCK 2 Mbps Long |
| 4345 | * 3: CCK 1 Mbps Long |
| 4346 | * 4: CCK 11 Mbps Short |
| 4347 | * 5: CCK 5.5 Mbps Short |
| 4348 | * 6: CCK 2 Mbps Short |
| 4349 | * HT/VHT (pream == 2/3) |
| 4350 | * 0..7: MCS0..MCS7 (HT) |
| 4351 | * 0..9: MCS0..MCS9 (VHT) |
| 4352 | * |
| 4353 | * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value |
| 4354 | * to the target. |
| 4355 | * Arguments to the API are- |
| 4356 | * wmi handle, |
| 4357 | * VAP interface id (av_if_id) defined in ol_ath_vap_net80211, |
| 4358 | * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 4359 | * rate value. |
| 4360 | */ |
| 4361 | typedef enum { |
| 4362 | WMI_SET_MCAST_RATE, |
| 4363 | WMI_SET_BCAST_RATE |
| 4364 | } MCAST_BCAST_RATE_ID; |
| 4365 | |
| 4366 | typedef struct { |
| 4367 | MCAST_BCAST_RATE_ID rate_id; |
| 4368 | A_UINT32 rate; |
| 4369 | } mcast_bcast_rate; |
| 4370 | |
| 4371 | typedef struct { |
| 4372 | A_UINT32 tlv_header; |
| 4373 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */ |
| 4374 | A_UINT32 cwmin; |
| 4375 | A_UINT32 cwmax; |
| 4376 | A_UINT32 aifs; |
| 4377 | A_UINT32 txoplimit; |
| 4378 | A_UINT32 acm; |
| 4379 | A_UINT32 no_ack; |
| 4380 | } wmi_wmm_params; |
| 4381 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4382 | /* DEPRECATED - use VDEV level command instead |
| 4383 | * (wmi_vdev_set_wmm_params_cmd_fixed_param) |
| 4384 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4385 | typedef struct { |
| 4386 | A_UINT32 tlv_header; |
| 4387 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */ |
| 4388 | A_UINT32 reserved0; |
| 4389 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 4390 | A_UINT32 dg_type; |
| 4391 | |
| 4392 | /* The TLVs for the 4 AC follows: |
| 4393 | * wmi_wmm_params wmm_params_ac_be; |
| 4394 | * wmi_wmm_params wmm_params_ac_bk; |
| 4395 | * wmi_wmm_params wmm_params_ac_vi; |
| 4396 | * wmi_wmm_params wmm_params_ac_vo; |
| 4397 | */ |
| 4398 | } wmi_pdev_set_wmm_params_cmd_fixed_param; |
| 4399 | |
| 4400 | typedef enum { |
| 4401 | WMI_REQUEST_PEER_STAT = 0x01, |
| 4402 | WMI_REQUEST_AP_STAT = 0x02, |
| 4403 | WMI_REQUEST_PDEV_STAT = 0x04, |
| 4404 | WMI_REQUEST_VDEV_STAT = 0x08, |
| 4405 | WMI_REQUEST_BCNFLT_STAT = 0x10, |
| 4406 | WMI_REQUEST_VDEV_RATE_STAT = 0x20, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 4407 | WMI_REQUEST_INST_STAT = 0x40, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4408 | WMI_REQUEST_MIB_STAT = 0x80, |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 4409 | WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4410 | } wmi_stats_id; |
| 4411 | |
| 4412 | typedef struct { |
| 4413 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */ |
| 4414 | wmi_stats_id stats_id; |
| 4415 | /** unique id identifying the VDEV, generated by the caller */ |
| 4416 | A_UINT32 vdev_id; |
| 4417 | /** peer MAC address */ |
| 4418 | wmi_mac_addr peer_macaddr; |
| 4419 | } wmi_request_stats_cmd_fixed_param; |
| 4420 | |
| 4421 | /* stats type bitmap */ |
| 4422 | #define WMI_LINK_STATS_RADIO 0x00000001 |
| 4423 | #define WMI_LINK_STATS_IFACE 0x00000002 |
| 4424 | #define WMI_LINK_STATS_ALL_PEER 0x00000004 |
| 4425 | #define WMI_LINK_STATS_PER_PEER 0x00000008 |
| 4426 | |
| 4427 | /* wifi clear statistics bitmap */ |
| 4428 | #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */ |
| 4429 | #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */ |
| 4430 | #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */ |
| 4431 | #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */ |
| 4432 | #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */ |
| 4433 | #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */ |
| 4434 | #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */ |
| 4435 | #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */ |
| 4436 | #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */ |
| 4437 | #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */ |
| 4438 | |
| 4439 | /** Default value for stats if the stats collection has not started */ |
| 4440 | #define WMI_STATS_VALUE_INVALID 0xffffffff |
| 4441 | |
| 4442 | #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16) |
| 4443 | #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value) |
| 4444 | #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1) |
| 4445 | #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value) |
| 4446 | #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 4447 | #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 4448 | |
| 4449 | typedef struct { |
| 4450 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */ |
| 4451 | A_UINT32 num_of_diag_events_logs; |
| 4452 | /* The TLVs will follow. |
| 4453 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 4454 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 4455 | * Bit 17 Indicate if the DIAG type is Enabled/Disabled. |
| 4456 | */ |
| 4457 | } wmi_diag_event_log_config_fixed_param; |
| 4458 | |
| 4459 | #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 4460 | #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 4461 | #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1) |
| 4462 | #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value) |
| 4463 | |
| 4464 | typedef struct { |
| 4465 | A_UINT32 tlv_header; |
| 4466 | A_UINT32 num_of_diag_events_logs; |
| 4467 | /* The TLVs will follow. |
| 4468 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 4469 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 4470 | * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0 |
| 4471 | * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework |
| 4472 | */ |
| 4473 | } wmi_diag_event_log_supported_event_fixed_params; |
| 4474 | |
| 4475 | typedef struct { |
| 4476 | /** |
| 4477 | * TLV tag and len; tag equals |
| 4478 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param |
| 4479 | */ |
| 4480 | A_UINT32 tlv_header; |
| 4481 | /** placeholder for future */ |
| 4482 | A_UINT32 reserved0; |
| 4483 | } wmi_debug_mesg_flush_fixed_param; |
| 4484 | |
| 4485 | typedef struct { |
| 4486 | /** |
| 4487 | * TLV tag and len; tag equals |
| 4488 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param |
| 4489 | */ |
| 4490 | A_UINT32 tlv_header; |
| 4491 | /** placeholder for future */ |
| 4492 | A_UINT32 reserved0; |
| 4493 | } wmi_debug_mesg_flush_complete_fixed_param; |
| 4494 | |
| 4495 | |
| 4496 | typedef struct { |
| 4497 | /* |
| 4498 | * TLV tag and len; tag equals |
| 4499 | * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param |
| 4500 | * vdev_id, where RSSI breach event occurred |
| 4501 | */ |
| 4502 | A_UINT32 tlv_header; |
| 4503 | A_UINT32 vdev_id; |
| 4504 | /* request id */ |
| 4505 | A_UINT32 request_id; |
| 4506 | /* |
| 4507 | * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is |
| 4508 | * corresponding to hi_rssi[0-2] |
| 4509 | */ |
| 4510 | A_UINT32 event_bitmap; |
| 4511 | /* rssi at the time of RSSI breach. Unit dBm */ |
| 4512 | A_UINT32 rssi; |
| 4513 | /* bssid of the monitored AP's */ |
| 4514 | wmi_mac_addr bssid; |
| 4515 | } wmi_rssi_breach_event_fixed_param; |
| 4516 | |
| 4517 | |
| 4518 | typedef struct { |
| 4519 | /** TLV tag and len; tag equals |
| 4520 | * WMITLV_TAG_STRUC_wmi_fw_mem_dump */ |
| 4521 | A_UINT32 tlv_header; |
| 4522 | /** unique id identifying the segment */ |
| 4523 | A_UINT32 seg_id; |
| 4524 | /** Start address of the segment to be read */ |
| 4525 | A_UINT32 seg_start_addr_lo; |
| 4526 | A_UINT32 seg_start_addr_hi; |
| 4527 | /** Length of the segment to be read */ |
| 4528 | A_UINT32 seg_length; |
| 4529 | /** Host bufeer address to which the segment will be read and dumped */ |
| 4530 | A_UINT32 dest_addr_lo; |
| 4531 | A_UINT32 dest_addr_hi; |
| 4532 | } wmi_fw_mem_dump; |
| 4533 | |
| 4534 | /* Command to get firmware memory dump*/ |
| 4535 | typedef struct { |
| 4536 | /** TLV tag and len; tag equals |
| 4537 | * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */ |
| 4538 | A_UINT32 tlv_header; |
| 4539 | /** unique id identifying the request */ |
| 4540 | A_UINT32 request_id; |
| 4541 | /** number of memory dump segments */ |
| 4542 | A_UINT32 num_fw_mem_dump_segs; |
| 4543 | /** |
| 4544 | * This TLV is followed by another TLV |
| 4545 | * wmi_fw_mem_dump fw_mem_dump[]; |
| 4546 | */ |
| 4547 | } wmi_get_fw_mem_dump_fixed_param; |
| 4548 | |
| 4549 | /** Event to indicate the completion of fw mem dump */ |
| 4550 | typedef struct { |
| 4551 | /* TLV tag and len; tag equals |
| 4552 | * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */ |
| 4553 | A_UINT32 tlv_header; |
| 4554 | /** unique id identifying the request, given |
| 4555 | * in the request stats command */ |
| 4556 | A_UINT32 request_id; |
| 4557 | /*In case of Firmware memory dump */ |
| 4558 | A_UINT32 fw_mem_dump_complete; |
| 4559 | } wmi_update_fw_mem_dump_fixed_param; |
| 4560 | |
| 4561 | typedef enum { |
| 4562 | WMI_ROAMING_IDLE = 0, |
| 4563 | WMI_ROAMING_ACTIVE = 1, |
| 4564 | } wmi_roam_state; |
| 4565 | |
| 4566 | /* access categories */ |
| 4567 | typedef enum { |
| 4568 | WMI_AC_VO = 0, |
| 4569 | WMI_AC_VI = 1, |
| 4570 | WMI_AC_BE = 2, |
| 4571 | WMI_AC_BK = 3, |
| 4572 | WMI_AC_MAX = 4, |
| 4573 | } wmi_traffic_ac; |
| 4574 | |
| 4575 | typedef enum { |
| 4576 | WMI_STA_STATS = 0, |
| 4577 | WMI_SOFTAP_STATS = 1, |
| 4578 | WMI_IBSS_STATS = 2, |
| 4579 | WMI_P2P_CLIENT_STATS = 3, |
| 4580 | WMI_P2P_GO_STATS = 4, |
| 4581 | WMI_NAN_STATS = 5, |
| 4582 | WMI_MESH_STATS = 6, |
| 4583 | } wmi_link_iface_type; |
| 4584 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4585 | /*Clear stats*/ |
| 4586 | typedef struct { |
| 4587 | A_UINT32 tlv_header; |
| 4588 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */ |
| 4589 | /** unique id identifying the VDEV, generated by the caller */ |
| 4590 | A_UINT32 vdev_id; |
| 4591 | /** stop_stats_collection_req = 1 will imply stop the statistics collection */ |
| 4592 | A_UINT32 stop_stats_collection_req; |
| 4593 | /** identifies what stats to be cleared */ |
| 4594 | A_UINT32 stats_clear_req_mask; |
| 4595 | /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */ |
| 4596 | wmi_mac_addr peer_macaddr; |
| 4597 | } wmi_clear_link_stats_cmd_fixed_param; |
| 4598 | |
| 4599 | /* Link Stats configuration params. Trigger the link layer statistics collection*/ |
| 4600 | typedef struct { |
| 4601 | A_UINT32 tlv_header; |
| 4602 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */ |
| 4603 | /** threshold to classify the pkts as short or long */ |
| 4604 | A_UINT32 mpdu_size_threshold; |
| 4605 | /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/ |
| 4606 | A_UINT32 aggressive_statistics_gathering; |
| 4607 | } wmi_start_link_stats_cmd_fixed_param; |
| 4608 | |
| 4609 | typedef struct { |
| 4610 | A_UINT32 tlv_header; |
| 4611 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */ |
| 4612 | /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */ |
| 4613 | A_UINT32 stats_type; |
| 4614 | /** unique id identifying the VDEV, generated by the caller */ |
| 4615 | A_UINT32 vdev_id; |
| 4616 | /** unique id identifying the request, generated by the caller */ |
| 4617 | A_UINT32 request_id; |
| 4618 | /** peer MAC address */ |
| 4619 | wmi_mac_addr peer_macaddr; |
| 4620 | } wmi_request_link_stats_cmd_fixed_param; |
| 4621 | |
| 4622 | /* channel statistics */ |
| 4623 | typedef struct { |
| 4624 | A_UINT32 tlv_header; |
| 4625 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */ |
| 4626 | /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/ |
| 4627 | A_UINT32 channel_width; |
| 4628 | /** Primary 20 MHz channel */ |
| 4629 | A_UINT32 center_freq; |
| 4630 | /** center frequency (MHz) first segment */ |
| 4631 | A_UINT32 center_freq0; |
| 4632 | /** center frequency (MHz) second segment */ |
| 4633 | A_UINT32 center_freq1; |
| 4634 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 4635 | A_UINT32 radio_awake_time; |
| 4636 | /** msecs the CCA register is busy (32 bits number accruing over time) */ |
| 4637 | A_UINT32 cca_busy_time; |
| 4638 | } wmi_channel_stats; |
| 4639 | |
Krishna Kumaar Natarajan | ee6cfa7 | 2016-03-25 14:05:03 -0700 | [diff] [blame] | 4640 | /* |
| 4641 | * Each step represents 0.5 dB. The starting value is 0 dBm. |
| 4642 | * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps. |
| 4643 | */ |
| 4644 | #define MAX_TPC_LEVELS 64 |
| 4645 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4646 | /* radio statistics */ |
| 4647 | typedef struct { |
| 4648 | A_UINT32 tlv_header; |
| 4649 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */ |
| 4650 | /** Wifi radio (if multiple radio supported) */ |
| 4651 | A_UINT32 radio_id; |
| 4652 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 4653 | A_UINT32 on_time; |
| 4654 | /** msecs the radio is transmitting (32 bits number accruing over time) */ |
| 4655 | A_UINT32 tx_time; |
| 4656 | /** msecs the radio is in active receive (32 bits number accruing over time) */ |
| 4657 | A_UINT32 rx_time; |
| 4658 | /** msecs the radio is awake due to all scan (32 bits number accruing over time) */ |
| 4659 | A_UINT32 on_time_scan; |
| 4660 | /** msecs the radio is awake due to NAN (32 bits number accruing over time) */ |
| 4661 | A_UINT32 on_time_nbd; |
| 4662 | /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */ |
| 4663 | A_UINT32 on_time_gscan; |
| 4664 | /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */ |
| 4665 | A_UINT32 on_time_roam_scan; |
| 4666 | /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */ |
| 4667 | A_UINT32 on_time_pno_scan; |
| 4668 | /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */ |
| 4669 | A_UINT32 on_time_hs20; |
| 4670 | /** number of channels */ |
| 4671 | A_UINT32 num_channels; |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4672 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4673 | * tx time per TPC level - DEPRECATED |
| 4674 | * This field is deprecated. |
| 4675 | * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID |
| 4676 | * message. |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4677 | */ |
Krishna Kumaar Natarajan | ee6cfa7 | 2016-03-25 14:05:03 -0700 | [diff] [blame] | 4678 | A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS]; |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4679 | } wmi_radio_link_stats; |
| 4680 | |
| 4681 | /** tx time per power level statistics */ |
| 4682 | typedef struct { |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4683 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4684 | * TLV tag and len; tag equals |
| 4685 | * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4686 | */ |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4687 | A_UINT32 tlv_header; |
| 4688 | /* total number of tx power levels */ |
| 4689 | A_UINT32 total_num_tx_power_levels; |
| 4690 | /* number of tx power levels that are carried in this event */ |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4691 | A_UINT32 num_tx_power_levels; |
| 4692 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4693 | * offset of current stats |
| 4694 | * If ((num_tx_power_levels + power_level_offset)) == |
| 4695 | * total_num_tx_power_levels) |
| 4696 | * this message completes the report of tx time per power levels. |
| 4697 | * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID |
| 4698 | * messages will be sent by the target to deliver the remainder of the |
| 4699 | * tx time per power level stats. |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4700 | */ |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4701 | A_UINT32 power_level_offset; |
| 4702 | /* |
| 4703 | * This TLV will be followed by a TLV containing a variable-length |
| 4704 | * array of A_UINT32 with tx time per power level data |
| 4705 | * A_UINT32 tx_time_per_power_level[num_tx_power_levels] |
| 4706 | * The tx time is in units of milliseconds. |
| 4707 | * The power levels are board-specific values; a board-specific |
| 4708 | * translation has to be applied to determine what actual power |
| 4709 | * corresponds to each power level. |
| 4710 | * Just as the host has a BDF file available, the host should also have |
| 4711 | * a data file available that provides the power level to power |
| 4712 | * translations. |
| 4713 | */ |
| 4714 | } wmi_tx_power_level_stats_evt_fixed_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4715 | |
| 4716 | /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */ |
| 4717 | typedef struct { |
| 4718 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 4719 | /** unique id identifying the request, given in the request stats command */ |
| 4720 | A_UINT32 request_id; |
| 4721 | /** Number of radios*/ |
| 4722 | A_UINT32 num_radio; |
| 4723 | /** more_data will be set depending on the number of radios */ |
| 4724 | A_UINT32 more_radio_events; |
| 4725 | /* |
| 4726 | * This TLV is followed by another TLV of array of bytes |
| 4727 | * size of(struct wmi_radio_link_stats); |
| 4728 | * |
| 4729 | * This TLV is followed by another TLV of array of bytes |
| 4730 | * num_channels * size of(struct wmi_channel_stats) |
| 4731 | */ |
| 4732 | |
| 4733 | } wmi_radio_link_stats_event_fixed_param; |
| 4734 | |
| 4735 | /* per rate statistics */ |
| 4736 | typedef struct { |
| 4737 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */ |
| 4738 | /** rate information |
| 4739 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 4740 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 4741 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 4742 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 4743 | * OFDM : 0: OFDM 48 Mbps |
| 4744 | * 1: OFDM 24 Mbps |
| 4745 | * 2: OFDM 12 Mbps |
| 4746 | * 3: OFDM 6 Mbps |
| 4747 | * 4: OFDM 54 Mbps |
| 4748 | * 5: OFDM 36 Mbps |
| 4749 | * 6: OFDM 18 Mbps |
| 4750 | * 7: OFDM 9 Mbps |
| 4751 | * CCK (pream == 1) |
| 4752 | * 0: CCK 11 Mbps Long |
| 4753 | * 1: CCK 5.5 Mbps Long |
| 4754 | * 2: CCK 2 Mbps Long |
| 4755 | * 3: CCK 1 Mbps Long |
| 4756 | * 4: CCK 11 Mbps Short |
| 4757 | * 5: CCK 5.5 Mbps Short |
| 4758 | * 6: CCK 2 Mbps Short |
| 4759 | * HT/VHT (pream == 2/3) |
| 4760 | * 0..7: MCS0..MCS7 (HT) |
| 4761 | * 0..9: MCS0..MCS9 (VHT) |
| 4762 | */ |
| 4763 | A_UINT32 rate; |
| 4764 | /** units of 100 Kbps */ |
| 4765 | A_UINT32 bitrate; |
| 4766 | /** number of successfully transmitted data pkts (ACK rcvd) */ |
| 4767 | A_UINT32 tx_mpdu; |
| 4768 | /** number of received data pkts */ |
| 4769 | A_UINT32 rx_mpdu; |
| 4770 | /** number of data packet losses (no ACK) */ |
| 4771 | A_UINT32 mpdu_lost; |
| 4772 | /** total number of data pkt retries */ |
| 4773 | A_UINT32 retries; |
| 4774 | /** number of short data pkt retries */ |
| 4775 | A_UINT32 retries_short; |
| 4776 | /** number of long data pkt retries */ |
| 4777 | A_UINT32 retries_long; |
| 4778 | } wmi_rate_stats; |
| 4779 | |
| 4780 | typedef struct { |
| 4781 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */ |
| 4782 | /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/ |
| 4783 | A_UINT32 peer_type; |
| 4784 | /** mac address */ |
| 4785 | wmi_mac_addr peer_mac_address; |
| 4786 | /** peer wmi_CAPABILITY_XXX */ |
| 4787 | A_UINT32 capabilities; |
| 4788 | /** number of rates */ |
| 4789 | A_UINT32 num_rates; |
| 4790 | } wmi_peer_link_stats; |
| 4791 | |
| 4792 | /** PEER statistics (once started) reset and start afresh after each connection */ |
| 4793 | typedef struct { |
| 4794 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */ |
| 4795 | /** unique id identifying the request, given in the request stats command */ |
| 4796 | A_UINT32 request_id; |
| 4797 | /** number of peers accomidated in this particular event */ |
| 4798 | A_UINT32 num_peers; |
| 4799 | /** Indicates the fragment number */ |
| 4800 | A_UINT32 peer_event_number; |
| 4801 | /** Indicates if there are more peers which will be sent as seperate peer_stats event */ |
| 4802 | A_UINT32 more_data; |
| 4803 | |
| 4804 | /** |
| 4805 | * This TLV is followed by another TLV |
| 4806 | * num_peers * size of(struct wmi_peer_stats) |
| 4807 | * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers. |
| 4808 | */ |
| 4809 | } wmi_peer_stats_event_fixed_param; |
| 4810 | |
| 4811 | /* per access category statistics */ |
| 4812 | typedef struct { |
| 4813 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */ |
| 4814 | /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/ |
| 4815 | A_UINT32 ac_type; |
| 4816 | /** number of successfully transmitted unicast data pkts (ACK rcvd) */ |
| 4817 | A_UINT32 tx_mpdu; |
| 4818 | /** number of received unicast mpdus */ |
| 4819 | A_UINT32 rx_mpdu; |
| 4820 | /** number of succesfully transmitted multicast data packets */ |
| 4821 | /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */ |
| 4822 | A_UINT32 tx_mcast; |
| 4823 | /** number of received multicast data packets */ |
| 4824 | A_UINT32 rx_mcast; |
| 4825 | /** number of received unicast a-mpdus */ |
| 4826 | A_UINT32 rx_ampdu; |
| 4827 | /** number of transmitted unicast a-mpdus */ |
| 4828 | A_UINT32 tx_ampdu; |
| 4829 | /** number of data pkt losses (no ACK) */ |
| 4830 | A_UINT32 mpdu_lost; |
| 4831 | /** total number of data pkt retries */ |
| 4832 | A_UINT32 retries; |
| 4833 | /** number of short data pkt retries */ |
| 4834 | A_UINT32 retries_short; |
| 4835 | /** number of long data pkt retries */ |
| 4836 | A_UINT32 retries_long; |
| 4837 | /** data pkt min contention time (usecs) */ |
| 4838 | A_UINT32 contention_time_min; |
| 4839 | /** data pkt max contention time (usecs) */ |
| 4840 | A_UINT32 contention_time_max; |
| 4841 | /** data pkt avg contention time (usecs) */ |
| 4842 | A_UINT32 contention_time_avg; |
| 4843 | /** num of data pkts used for contention statistics */ |
| 4844 | A_UINT32 contention_num_samples; |
| 4845 | } wmi_wmm_ac_stats; |
| 4846 | |
| 4847 | /* interface statistics */ |
| 4848 | typedef struct { |
| 4849 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */ |
| 4850 | /** access point beacon received count from connected AP */ |
| 4851 | A_UINT32 beacon_rx; |
| 4852 | /** access point mgmt frames received count from connected AP (including Beacon) */ |
| 4853 | A_UINT32 mgmt_rx; |
| 4854 | /** action frames received count */ |
| 4855 | A_UINT32 mgmt_action_rx; |
| 4856 | /** action frames transmit count */ |
| 4857 | A_UINT32 mgmt_action_tx; |
| 4858 | /** access Point Beacon and Management frames RSSI (averaged) */ |
| 4859 | A_UINT32 rssi_mgmt; |
| 4860 | /** access Point Data Frames RSSI (averaged) from connected AP */ |
| 4861 | A_UINT32 rssi_data; |
| 4862 | /** access Point ACK RSSI (averaged) from connected AP */ |
| 4863 | A_UINT32 rssi_ack; |
| 4864 | /** number of peers */ |
| 4865 | A_UINT32 num_peers; |
| 4866 | /** Indicates how many peer_stats events will be sent depending on the num_peers. */ |
| 4867 | A_UINT32 num_peer_events; |
| 4868 | /** number of ac */ |
| 4869 | A_UINT32 num_ac; |
| 4870 | /** Roaming Stat */ |
| 4871 | A_UINT32 roam_state; |
| 4872 | /** |
| 4873 | * Average Beacon spread offset is the averaged time delay between TBTT |
| 4874 | * and beacon TSF */ |
| 4875 | /** Upper 32 bits of averaged 64 bit beacon spread offset */ |
| 4876 | A_UINT32 avg_bcn_spread_offset_high; |
| 4877 | /** Lower 32 bits of averaged 64 bit beacon spread offset */ |
| 4878 | A_UINT32 avg_bcn_spread_offset_low; |
| 4879 | /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */ |
| 4880 | A_UINT32 is_leaky_ap; |
| 4881 | /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */ |
| 4882 | A_UINT32 avg_rx_frms_leaked; |
| 4883 | /** Rx leak watch window currently in force to minimize data loss |
| 4884 | * because of leaky AP. Rx leak window is the |
| 4885 | * time driver waits before shutting down the radio or switching the |
| 4886 | * channel and after receiving an ACK for |
| 4887 | * a data frame with PM bit set) */ |
| 4888 | A_UINT32 rx_leak_window; |
| 4889 | } wmi_iface_link_stats; |
| 4890 | |
| 4891 | /** Interface statistics (once started) reset and start afresh after each connection */ |
| 4892 | typedef struct { |
| 4893 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */ |
| 4894 | /** unique id identifying the request, given in the request stats command */ |
| 4895 | A_UINT32 request_id; |
| 4896 | /** unique id identifying the VDEV, generated by the caller */ |
| 4897 | A_UINT32 vdev_id; |
| 4898 | /* |
| 4899 | * This TLV is followed by another TLV |
| 4900 | * wmi_iface_link_stats iface_link_stats; |
| 4901 | * num_ac * size of(struct wmi_wmm_ac_stats) |
| 4902 | */ |
| 4903 | } wmi_iface_link_stats_event_fixed_param; |
| 4904 | |
| 4905 | /** Suspend option */ |
| 4906 | enum { |
| 4907 | WMI_PDEV_SUSPEND, /* suspend */ |
| 4908 | WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */ |
| 4909 | }; |
| 4910 | |
| 4911 | typedef struct { |
| 4912 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */ |
| 4913 | /* suspend option sent to target */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 4914 | /* |
| 4915 | * pdev_id for identifying the MAC, See macros |
| 4916 | * starting with WMI_PDEV_ID_ for values. |
| 4917 | */ |
| 4918 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4919 | A_UINT32 suspend_opt; |
| 4920 | } wmi_pdev_suspend_cmd_fixed_param; |
| 4921 | |
| 4922 | typedef struct { |
| 4923 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 4924 | /* |
| 4925 | * pdev_id for identifying the MAC, See macros |
| 4926 | * starting with WMI_PDEV_ID_ for values. |
| 4927 | */ |
| 4928 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4929 | } wmi_pdev_resume_cmd_fixed_param; |
| 4930 | |
| 4931 | typedef struct { |
| 4932 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */ |
| 4933 | A_UINT32 num_vdev_stats; /* number of vdevs */ |
| 4934 | } wmi_vdev_rate_stats_event_fixed_param; |
| 4935 | |
| 4936 | typedef struct { |
| 4937 | A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */ |
| 4938 | A_UINT32 vdevid; /* Id of the wlan vdev */ |
| 4939 | A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */ |
| 4940 | A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */ |
| 4941 | A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */ |
| 4942 | A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */ |
| 4943 | } wmi_vdev_rate_ht_info; |
| 4944 | |
| 4945 | typedef struct { |
| 4946 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 4947 | wmi_stats_id stats_id; |
| 4948 | /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */ |
| 4949 | A_UINT32 num_pdev_stats; |
| 4950 | /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */ |
| 4951 | A_UINT32 num_vdev_stats; |
| 4952 | /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */ |
| 4953 | A_UINT32 num_peer_stats; |
| 4954 | A_UINT32 num_bcnflt_stats; |
| 4955 | /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */ |
| 4956 | A_UINT32 num_chan_stats; |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4957 | /** number of MIB stats event structures (wmi_mib_stats) */ |
| 4958 | A_UINT32 num_mib_stats; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4959 | /* This TLV is followed by another TLV of array of bytes |
| 4960 | * A_UINT8 data[]; |
| 4961 | * This data array contains |
| 4962 | * num_pdev_stats * size of(struct wmi_pdev_stats) |
| 4963 | * num_vdev_stats * size of(struct wmi_vdev_stats) |
| 4964 | * num_peer_stats * size of(struct wmi_peer_stats) |
| 4965 | * num_bcnflt_stats * size_of() |
| 4966 | * num_chan_stats * size of(struct wmi_chan_stats) |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4967 | * num_mib_stats * size of(struct wmi_mib_stats) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4968 | * |
| 4969 | */ |
| 4970 | } wmi_stats_event_fixed_param; |
| 4971 | |
| 4972 | /** |
| 4973 | * PDEV statistics |
| 4974 | * @todo |
| 4975 | * add all PDEV stats here |
| 4976 | */ |
| 4977 | typedef struct { |
| 4978 | /** Channel noise floor */ |
| 4979 | A_INT32 chan_nf; |
| 4980 | /** TX frame count */ |
| 4981 | A_UINT32 tx_frame_count; |
| 4982 | /** RX frame count */ |
| 4983 | A_UINT32 rx_frame_count; |
| 4984 | /** rx clear count */ |
| 4985 | A_UINT32 rx_clear_count; |
| 4986 | /** cycle count */ |
| 4987 | A_UINT32 cycle_count; |
| 4988 | /** Phy error count */ |
| 4989 | A_UINT32 phy_err_count; |
| 4990 | /** Channel Tx Power */ |
| 4991 | A_UINT32 chan_tx_pwr; |
| 4992 | /** WAL dbg stats */ |
| 4993 | struct wlan_dbg_stats pdev_stats; |
| 4994 | |
| 4995 | } wmi_pdev_stats; |
| 4996 | |
| 4997 | /** |
| 4998 | * VDEV statistics |
| 4999 | * @todo |
| 5000 | * add all VDEV stats here |
| 5001 | */ |
| 5002 | |
| 5003 | typedef struct { |
| 5004 | A_INT32 bcn_snr; |
| 5005 | A_INT32 dat_snr; |
| 5006 | } wmi_snr_info; |
| 5007 | |
| 5008 | typedef struct { |
| 5009 | /** unique id identifying the VDEV, generated by the caller */ |
| 5010 | A_UINT32 vdev_id; |
| 5011 | wmi_snr_info vdev_snr; |
| 5012 | A_UINT32 tx_frm_cnt[WLAN_MAX_AC]; /* Total number of packets(per AC) that were successfully transmitted(with and without retries, including multi-cast, broadcast) */ |
| 5013 | A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */ |
| 5014 | A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /*The number of MSDU packets and MMPDU frames per AC |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5015 | that the 802.11 station successfully transmitted after more than one retransmission attempt */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5016 | A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */ |
| 5017 | A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */ |
| 5018 | A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */ |
| 5019 | A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */ |
| 5020 | A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */ |
| 5021 | A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */ |
| 5022 | A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */ |
| 5023 | A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */ |
| 5024 | } wmi_vdev_stats; |
| 5025 | |
| 5026 | /** |
| 5027 | * peer statistics. |
| 5028 | * |
| 5029 | * @todo |
| 5030 | * add more stats |
| 5031 | * |
| 5032 | */ |
| 5033 | typedef struct { |
| 5034 | /** peer MAC address */ |
| 5035 | wmi_mac_addr peer_macaddr; |
| 5036 | /** rssi */ |
| 5037 | A_UINT32 peer_rssi; |
| 5038 | /** last tx data rate used for peer */ |
| 5039 | A_UINT32 peer_tx_rate; |
| 5040 | /** last rx data rate used for peer */ |
| 5041 | A_UINT32 peer_rx_rate; |
| 5042 | } wmi_peer_stats; |
| 5043 | |
| 5044 | typedef struct { |
| 5045 | /** Primary channel freq of the channel for which stats are sent */ |
| 5046 | A_UINT32 chan_mhz; |
| 5047 | /** Time spent on the channel */ |
| 5048 | A_UINT32 sampling_period_us; |
| 5049 | /** Aggregate duration over a sampling period for which channel activity was observed */ |
| 5050 | A_UINT32 rx_clear_count; |
| 5051 | /** Accumalation of the TX PPDU duration over a sampling period */ |
| 5052 | A_UINT32 tx_duration_us; |
| 5053 | /** Accumalation of the RX PPDU duration over a sampling period */ |
| 5054 | A_UINT32 rx_duration_us; |
| 5055 | } wmi_chan_stats; |
| 5056 | |
| 5057 | typedef struct { |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 5058 | A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */ |
| 5059 | A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */ |
| 5060 | A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/ |
| 5061 | A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/ |
| 5062 | A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/ |
| 5063 | A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/ |
| 5064 | A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/ |
| 5065 | A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/ |
| 5066 | A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */ |
| 5067 | A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/ |
| 5068 | A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/ |
| 5069 | /*dot11QosTransmittedFragmentCount */ |
| 5070 | A_UINT32 tx_Qos_mpdu_grp_frag_cnt; |
| 5071 | A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */ |
| 5072 | A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */ |
| 5073 | A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/ |
| 5074 | A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/ |
| 5075 | A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/ |
| 5076 | A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/ |
| 5077 | A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/ |
| 5078 | A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/ |
| 5079 | A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/ |
| 5080 | A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/ |
| 5081 | /*dot11RSNAStatsRobustMgmtCCMPReplays */ |
| 5082 | A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; |
| 5083 | A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/ |
| 5084 | A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/ |
| 5085 | /*dot11RSNAStatsCCMPDecryptErrors */ |
| 5086 | A_UINT32 rsna_CCMP_decrypt_err_cnt; |
| 5087 | A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/ |
| 5088 | A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/ |
| 5089 | /*dot11TransmittedMPDUsInAMPDUCount*/ |
| 5090 | A_UINT32 tx_mpdu_cnt_in_ampdu; |
| 5091 | /*dot11TransmittedOctetsInAMPDUCount*/ |
| 5092 | union { |
| 5093 | A_UINT64 counter; /* for use by target only */ |
| 5094 | struct { |
| 5095 | A_UINT32 low; |
| 5096 | A_UINT32 high; |
| 5097 | } upload; /* for use by host */ |
| 5098 | } tx_octets_in_ampdu; |
| 5099 | A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/ |
| 5100 | A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/ |
| 5101 | union { |
| 5102 | A_UINT64 counter; /* for use by target only */ |
| 5103 | struct { |
| 5104 | A_UINT32 rx_octets_in_ampdu_low; |
| 5105 | A_UINT32 rx_octets_in_ampdu_high; |
| 5106 | } upload; /* for use by host */ |
| 5107 | } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/ |
| 5108 | A_UINT32 reserved_1; |
| 5109 | A_UINT32 reserved_2; |
| 5110 | A_UINT32 reserved_3; |
| 5111 | A_UINT32 reserved_4; |
| 5112 | } wmi_mib_stats; |
| 5113 | |
| 5114 | typedef struct { |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 5115 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */ |
| 5116 | A_UINT32 tlv_header; |
| 5117 | A_UINT32 vdev_id; |
Himanshu Agarwal | 2906132 | 2016-05-27 14:09:27 +0530 | [diff] [blame] | 5118 | A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS]; |
| 5119 | A_INT32 rssi_avg_data[WMI_MAX_CHAINS]; |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 5120 | wmi_mac_addr peer_macaddr; |
| 5121 | } wmi_rssi_stats; |
| 5122 | |
| 5123 | typedef struct { |
| 5124 | /* |
| 5125 | * TLV tag and len; tag equals |
| 5126 | * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats |
| 5127 | */ |
| 5128 | A_UINT32 tlv_header; |
| 5129 | A_UINT32 num_per_chain_rssi_stats; |
| 5130 | /* |
| 5131 | * This TLV is followed by another TLV of array of structs: |
| 5132 | * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats]; |
| 5133 | */ |
| 5134 | } wmi_per_chain_rssi_stats; |
| 5135 | |
| 5136 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5137 | A_UINT32 tlv_header; |
| 5138 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */ |
| 5139 | /** unique id identifying the VDEV, generated by the caller */ |
| 5140 | A_UINT32 vdev_id; |
| 5141 | /** VDEV type (AP,STA,IBSS,MONITOR) */ |
| 5142 | A_UINT32 vdev_type; |
| 5143 | /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/ |
| 5144 | A_UINT32 vdev_subtype; |
| 5145 | /** VDEV MAC address */ |
| 5146 | wmi_mac_addr vdev_macaddr; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 5147 | /** Number of configured txrx streams */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5148 | A_UINT32 num_cfg_txrx_streams; |
| 5149 | /* |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 5150 | * pdev_id for identifying the MAC, |
| 5151 | * See macros starting with WMI_PDEV_ID_ for values. |
| 5152 | */ |
| 5153 | A_UINT32 pdev_id; |
| 5154 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5155 | * This TLV is followed by another TLV of array of structures |
| 5156 | * wmi_vdev_txrx_streams cfg_txrx_streams[]; |
| 5157 | */ |
| 5158 | } wmi_vdev_create_cmd_fixed_param; |
| 5159 | |
| 5160 | typedef struct { |
| 5161 | /* |
| 5162 | * TLV tag and len; tag equals |
| 5163 | * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams |
| 5164 | */ |
| 5165 | A_UINT32 tlv_header; |
| 5166 | /* band - Should take values from wmi_channel_band_mask */ |
| 5167 | A_UINT32 band; |
| 5168 | /* max supported tx streams per given band for this vdev */ |
| 5169 | A_UINT32 supported_tx_streams; |
| 5170 | /* max supported rx streams per given band for this vdev */ |
| 5171 | A_UINT32 supported_rx_streams; |
| 5172 | } wmi_vdev_txrx_streams; |
| 5173 | |
| 5174 | /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */ |
| 5175 | typedef struct { |
| 5176 | A_UINT32 tlv_header; |
| 5177 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */ |
| 5178 | A_UINT32 type_count; |
| 5179 | /** 255: continuous schedule, 0: reserved */ |
| 5180 | A_UINT32 duration; |
| 5181 | /** Absent period duration in micro seconds */ |
| 5182 | A_UINT32 interval; |
| 5183 | /** Absent period interval in micro seconds */ |
| 5184 | A_UINT32 start_time; |
| 5185 | /** 32 bit tsf time when in starts */ |
| 5186 | } wmi_p2p_noa_descriptor; |
| 5187 | |
| 5188 | /** values for vdev_type */ |
| 5189 | #define WMI_VDEV_TYPE_AP 0x1 |
| 5190 | #define WMI_VDEV_TYPE_STA 0x2 |
| 5191 | #define WMI_VDEV_TYPE_IBSS 0x3 |
| 5192 | #define WMI_VDEV_TYPE_MONITOR 0x4 |
| 5193 | |
| 5194 | /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed |
| 5195 | * by FW to execute the NAN specific WMI commands and also implement NAN specific |
| 5196 | * operations like Network discovery, service provisioning and service |
| 5197 | * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create |
| 5198 | * WMI command to create this VDEV once during initialization and host is not |
| 5199 | * expected to use any VDEV specific WMI commands on this VDEV. |
| 5200 | **/ |
| 5201 | #define WMI_VDEV_TYPE_NAN 0x5 |
| 5202 | |
| 5203 | #define WMI_VDEV_TYPE_OCB 0x6 |
| 5204 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 5205 | /* NAN Data Interface */ |
| 5206 | #define WMI_VDEV_TYPE_NDI 0x7 |
| 5207 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5208 | /** values for vdev_subtype */ |
| 5209 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1 |
| 5210 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2 |
| 5211 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 5212 | #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4 |
| 5213 | #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5 |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 5214 | /* |
| 5215 | * new subtype for 11S mesh is required as 11S functionality differs |
| 5216 | * in many ways from proprietary mesh |
| 5217 | * 11S uses 6-addr frame format and supports peering between mesh |
| 5218 | * stations and dynamic best path selection between mesh stations. |
| 5219 | * While in proprietary mesh, neighboring mesh station MAC is manually |
| 5220 | * added to AST table for traffic flow between mesh stations |
| 5221 | */ |
| 5222 | #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5223 | |
| 5224 | /** values for vdev_start_request flags */ |
| 5225 | /** Indicates that AP VDEV uses hidden ssid. only valid for |
| 5226 | * AP/GO */ |
| 5227 | #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0) |
| 5228 | /** Indicates if robust management frame/management frame |
| 5229 | * protection is enabled. For GO/AP vdevs, it indicates that |
| 5230 | * it may support station/client associations with RMF enabled. |
| 5231 | * For STA/client vdevs, it indicates that sta will |
| 5232 | * associate with AP with RMF enabled. */ |
| 5233 | #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1) |
| 5234 | |
| 5235 | /* |
| 5236 | * Host is sending bcn_tx_rate to override the beacon tx rates. |
| 5237 | */ |
| 5238 | #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2) |
| 5239 | |
| 5240 | typedef struct { |
| 5241 | A_UINT32 tlv_header; |
| 5242 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */ |
| 5243 | /** unique id identifying the VDEV, generated by the caller */ |
| 5244 | A_UINT32 vdev_id; |
| 5245 | /** requestor id identifying the caller module */ |
| 5246 | A_UINT32 requestor_id; |
| 5247 | /** beacon interval from received beacon */ |
| 5248 | A_UINT32 beacon_interval; |
| 5249 | /** DTIM Period from the received beacon */ |
| 5250 | A_UINT32 dtim_period; |
| 5251 | /** Flags */ |
| 5252 | A_UINT32 flags; |
| 5253 | /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */ |
| 5254 | wmi_ssid ssid; |
| 5255 | /** beacon/probe reponse xmit rate. Applicable for SoftAP. */ |
| 5256 | /** This field will be invalid and ignored unless the */ |
| 5257 | /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */ |
| 5258 | /** When valid, this field contains the fixed tx rate for the beacon */ |
| 5259 | /** and probe response frames send by the GO or SoftAP */ |
| 5260 | A_UINT32 bcn_tx_rate; |
| 5261 | /** beacon/probe reponse xmit power. Applicable for SoftAP. */ |
| 5262 | A_UINT32 bcn_txPower; |
| 5263 | /** number of p2p NOA descriptor(s) from scan entry */ |
| 5264 | A_UINT32 num_noa_descriptors; |
| 5265 | /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID. |
| 5266 | During CAC, Our HW shouldn't ack ditected frames */ |
| 5267 | A_UINT32 disable_hw_ack; |
| 5268 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 5269 | /** The DBS policy manager indicates the preferred number of transmit streams. */ |
| 5270 | A_UINT32 preferred_tx_streams; |
| 5271 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 5272 | /** the DBS policy manager indicates the preferred number of receive streams. */ |
| 5273 | A_UINT32 preferred_rx_streams; |
| 5274 | /* The TLVs follows this structure: |
| 5275 | * wmi_channel chan; //WMI channel |
| 5276 | * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry |
| 5277 | */ |
| 5278 | } wmi_vdev_start_request_cmd_fixed_param; |
| 5279 | |
| 5280 | typedef struct { |
| 5281 | A_UINT32 tlv_header; |
| 5282 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */ |
| 5283 | /** unique id identifying the VDEV, generated by the caller */ |
| 5284 | A_UINT32 vdev_id; |
| 5285 | } wmi_vdev_delete_cmd_fixed_param; |
| 5286 | |
| 5287 | typedef struct { |
| 5288 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */ |
| 5289 | /** unique id identifying the VDEV, generated by the caller */ |
| 5290 | A_UINT32 vdev_id; |
| 5291 | /** aid (assoc id) received in association response for STA VDEV */ |
| 5292 | A_UINT32 vdev_assoc_id; |
| 5293 | /** bssid of the BSS the VDEV is joining */ |
| 5294 | wmi_mac_addr vdev_bssid; |
| 5295 | } wmi_vdev_up_cmd_fixed_param; |
| 5296 | |
| 5297 | typedef struct { |
| 5298 | A_UINT32 tlv_header; |
| 5299 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */ |
| 5300 | /** unique id identifying the VDEV, generated by the caller */ |
| 5301 | A_UINT32 vdev_id; |
| 5302 | } wmi_vdev_stop_cmd_fixed_param; |
| 5303 | |
| 5304 | typedef struct { |
| 5305 | A_UINT32 tlv_header; |
| 5306 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */ |
| 5307 | /** unique id identifying the VDEV, generated by the caller */ |
| 5308 | A_UINT32 vdev_id; |
| 5309 | } wmi_vdev_down_cmd_fixed_param; |
| 5310 | |
| 5311 | typedef struct { |
| 5312 | /** unique id identifying the VDEV, generated by the caller */ |
| 5313 | A_UINT32 vdev_id; |
| 5314 | } wmi_vdev_standby_response_cmd; |
| 5315 | |
| 5316 | typedef struct { |
| 5317 | /** unique id identifying the VDEV, generated by the caller */ |
| 5318 | A_UINT32 vdev_id; |
| 5319 | } wmi_vdev_resume_response_cmd; |
| 5320 | |
| 5321 | typedef struct { |
| 5322 | A_UINT32 tlv_header; |
| 5323 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */ |
| 5324 | /** unique id identifying the VDEV, generated by the caller */ |
| 5325 | A_UINT32 vdev_id; |
| 5326 | /** parameter id */ |
| 5327 | A_UINT32 param_id; |
| 5328 | /** parameter value */ |
| 5329 | A_UINT32 param_value; |
| 5330 | } wmi_vdev_set_param_cmd_fixed_param; |
| 5331 | |
| 5332 | typedef struct { |
| 5333 | A_UINT32 key_seq_counter_l; |
| 5334 | A_UINT32 key_seq_counter_h; |
| 5335 | } wmi_key_seq_counter; |
| 5336 | |
| 5337 | #define WMI_CIPHER_NONE 0x0 /* clear key */ |
| 5338 | #define WMI_CIPHER_WEP 0x1 |
| 5339 | #define WMI_CIPHER_TKIP 0x2 |
| 5340 | #define WMI_CIPHER_AES_OCB 0x3 |
| 5341 | #define WMI_CIPHER_AES_CCM 0x4 |
| 5342 | #define WMI_CIPHER_WAPI 0x5 |
| 5343 | #define WMI_CIPHER_CKIP 0x6 |
| 5344 | #define WMI_CIPHER_AES_CMAC 0x7 |
| 5345 | #define WMI_CIPHER_ANY 0x8 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5346 | #define WMI_CIPHER_AES_GCM 0x9 |
| 5347 | #define WMI_CIPHER_AES_GMAC 0xa |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5348 | |
| 5349 | typedef struct { |
| 5350 | A_UINT32 tlv_header; |
| 5351 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */ |
| 5352 | /** unique id identifying the VDEV, generated by the caller */ |
| 5353 | A_UINT32 vdev_id; |
| 5354 | /** MAC address used for installing */ |
| 5355 | wmi_mac_addr peer_macaddr; |
| 5356 | /** key index */ |
| 5357 | A_UINT32 key_ix; |
| 5358 | /** key flags */ |
| 5359 | A_UINT32 key_flags; |
| 5360 | /** key cipher, defined above */ |
| 5361 | A_UINT32 key_cipher; |
| 5362 | /** key rsc counter */ |
| 5363 | wmi_key_seq_counter key_rsc_counter; |
| 5364 | /** global key rsc counter */ |
| 5365 | wmi_key_seq_counter key_global_rsc_counter; |
| 5366 | /** global key tsc counter */ |
| 5367 | wmi_key_seq_counter key_tsc_counter; |
| 5368 | /** WAPI key rsc counter */ |
| 5369 | A_UINT8 wpi_key_rsc_counter[16]; |
| 5370 | /** WAPI key tsc counter */ |
| 5371 | A_UINT8 wpi_key_tsc_counter[16]; |
| 5372 | /** key length */ |
| 5373 | A_UINT32 key_len; |
| 5374 | /** key tx mic length */ |
| 5375 | A_UINT32 key_txmic_len; |
| 5376 | /** key rx mic length */ |
| 5377 | A_UINT32 key_rxmic_len; |
| 5378 | /* |
| 5379 | * Following this struct are this TLV. |
| 5380 | * // actual key data |
| 5381 | * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic |
| 5382 | */ |
| 5383 | } wmi_vdev_install_key_cmd_fixed_param; |
| 5384 | |
| 5385 | /** Preamble types to be used with VDEV fixed rate configuration */ |
| 5386 | typedef enum { |
| 5387 | WMI_RATE_PREAMBLE_OFDM, |
| 5388 | WMI_RATE_PREAMBLE_CCK, |
| 5389 | WMI_RATE_PREAMBLE_HT, |
| 5390 | WMI_RATE_PREAMBLE_VHT, |
| 5391 | } WMI_RATE_PREAMBLE; |
| 5392 | |
| 5393 | /** Value to disable fixed rate setting */ |
| 5394 | #define WMI_FIXED_RATE_NONE (0xff) |
| 5395 | |
| 5396 | /** the definition of different VDEV parameters */ |
| 5397 | typedef enum { |
| 5398 | /** RTS Threshold */ |
| 5399 | WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 5400 | /** Fragmentation threshold */ |
| 5401 | WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 5402 | /** beacon interval in TUs */ |
| 5403 | WMI_VDEV_PARAM_BEACON_INTERVAL, |
| 5404 | /** Listen interval in TUs */ |
| 5405 | WMI_VDEV_PARAM_LISTEN_INTERVAL, |
| 5406 | /** muticast rate in Mbps */ |
| 5407 | WMI_VDEV_PARAM_MULTICAST_RATE, |
| 5408 | /** management frame rate in Mbps */ |
| 5409 | WMI_VDEV_PARAM_MGMT_TX_RATE, |
| 5410 | /** slot time (long vs short) */ |
| 5411 | WMI_VDEV_PARAM_SLOT_TIME, |
| 5412 | /** preamble (long vs short) */ |
| 5413 | WMI_VDEV_PARAM_PREAMBLE, |
| 5414 | /** SWBA time (time before tbtt in msec) */ |
| 5415 | WMI_VDEV_PARAM_SWBA_TIME, |
| 5416 | /** time period for updating VDEV stats */ |
| 5417 | WMI_VDEV_STATS_UPDATE_PERIOD, |
| 5418 | /** age out time in msec for frames queued for station in power save*/ |
| 5419 | WMI_VDEV_PWRSAVE_AGEOUT_TIME, |
| 5420 | /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */ |
| 5421 | WMI_VDEV_HOST_SWBA_INTERVAL, |
| 5422 | /** DTIM period (specified in units of num beacon intervals) */ |
| 5423 | WMI_VDEV_PARAM_DTIM_PERIOD, |
| 5424 | /** scheduler air time limit for this VDEV. used by off chan scheduler */ |
| 5425 | WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 5426 | /** enable/dsiable WDS for this VDEV */ |
| 5427 | WMI_VDEV_PARAM_WDS, |
| 5428 | /** ATIM Window */ |
| 5429 | WMI_VDEV_PARAM_ATIM_WINDOW, |
| 5430 | /** BMISS max */ |
| 5431 | WMI_VDEV_PARAM_BMISS_COUNT_MAX, |
| 5432 | /** BMISS first time */ |
| 5433 | WMI_VDEV_PARAM_BMISS_FIRST_BCNT, |
| 5434 | /** BMISS final time */ |
| 5435 | WMI_VDEV_PARAM_BMISS_FINAL_BCNT, |
| 5436 | /** WMM enables/disabled */ |
| 5437 | WMI_VDEV_PARAM_FEATURE_WMM, |
| 5438 | /** Channel width */ |
| 5439 | WMI_VDEV_PARAM_CHWIDTH, |
| 5440 | /** Channel Offset */ |
| 5441 | WMI_VDEV_PARAM_CHEXTOFFSET, |
| 5442 | /** Disable HT Protection */ |
| 5443 | WMI_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 5444 | /** Quick STA Kickout */ |
| 5445 | WMI_VDEV_PARAM_STA_QUICKKICKOUT, |
| 5446 | /** Rate to be used with Management frames */ |
| 5447 | WMI_VDEV_PARAM_MGMT_RATE, |
| 5448 | /** Protection Mode */ |
| 5449 | WMI_VDEV_PARAM_PROTECTION_MODE, |
| 5450 | /** Fixed rate setting */ |
| 5451 | WMI_VDEV_PARAM_FIXED_RATE, |
| 5452 | /** Short GI Enable/Disable */ |
| 5453 | WMI_VDEV_PARAM_SGI, |
| 5454 | /** Enable LDPC */ |
| 5455 | WMI_VDEV_PARAM_LDPC, |
| 5456 | /** Enable Tx STBC */ |
| 5457 | WMI_VDEV_PARAM_TX_STBC, |
| 5458 | /** Enable Rx STBC */ |
| 5459 | WMI_VDEV_PARAM_RX_STBC, |
| 5460 | /** Intra BSS forwarding */ |
| 5461 | WMI_VDEV_PARAM_INTRA_BSS_FWD, |
| 5462 | /** Setting Default xmit key for Vdev */ |
| 5463 | WMI_VDEV_PARAM_DEF_KEYID, |
| 5464 | /** NSS width */ |
| 5465 | WMI_VDEV_PARAM_NSS, |
| 5466 | /** Set the custom rate for the broadcast data frames */ |
| 5467 | WMI_VDEV_PARAM_BCAST_DATA_RATE, |
| 5468 | /** Set the custom rate (rate-code) for multicast data frames */ |
| 5469 | WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 5470 | /** Tx multicast packet indicate Enable/Disable */ |
| 5471 | WMI_VDEV_PARAM_MCAST_INDICATE, |
| 5472 | /** Tx DHCP packet indicate Enable/Disable */ |
| 5473 | WMI_VDEV_PARAM_DHCP_INDICATE, |
| 5474 | /** Enable host inspection of Tx unicast packet to unknown destination */ |
| 5475 | WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 5476 | |
| 5477 | /* The minimum amount of time AP begins to consider STA inactive */ |
| 5478 | WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 5479 | |
| 5480 | /* An associated STA is considered inactive when there is no recent TX/RX |
| 5481 | * activity and no downlink frames are buffered for it. Once a STA exceeds |
| 5482 | * the maximum idle inactive time, the AP will send an 802.11 data-null as |
| 5483 | * a keep alive to verify the STA is still associated. If the STA does ACK |
| 5484 | * the data-null, or if the data-null is buffered and the STA does not |
| 5485 | * retrieve it, the STA will be considered unresponsive (see |
| 5486 | * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */ |
| 5487 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 5488 | |
| 5489 | /* An associated STA is considered unresponsive if there is no recent |
| 5490 | * TX/RX activity and downlink frames are buffered for it. Once a STA |
| 5491 | * exceeds the maximum unresponsive time, the AP will send a |
| 5492 | * WMI_STA_KICKOUT event to the host so the STA can be deleted. */ |
| 5493 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 5494 | |
| 5495 | /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */ |
| 5496 | WMI_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 5497 | /** Enable/Disable RTS-CTS */ |
| 5498 | WMI_VDEV_PARAM_ENABLE_RTSCTS, |
| 5499 | /* Enable TXBFee/er */ |
| 5500 | WMI_VDEV_PARAM_TXBF, |
| 5501 | |
| 5502 | /**Set packet power save */ |
| 5503 | WMI_VDEV_PARAM_PACKET_POWERSAVE, |
| 5504 | |
| 5505 | /**Drops un-encrypted packets if any received in an encryted connection |
| 5506 | * otherwise forwards to host |
| 5507 | */ |
| 5508 | WMI_VDEV_PARAM_DROP_UNENCRY, |
| 5509 | |
| 5510 | /* |
| 5511 | * Set TX encap type. |
| 5512 | * |
| 5513 | * enum wmi_pkt_type is to be used as the parameter |
| 5514 | * specifying the encap type. |
| 5515 | */ |
| 5516 | WMI_VDEV_PARAM_TX_ENCAP_TYPE, |
| 5517 | |
| 5518 | /* |
| 5519 | * Try to detect stations that woke-up and exited power save but did not |
| 5520 | * successfully transmit data-null with PM=0 to AP. When this happens, |
| 5521 | * STA and AP power save state are out-of-sync. Use buffered but |
| 5522 | * undelivered MSDU to the STA as a hint that the STA is really awake |
| 5523 | * and expecting normal ASAP delivery, rather than retrieving BU with |
| 5524 | * PS-Poll, U-APSD trigger, etc. |
| 5525 | * |
| 5526 | * 0 disables out-of-sync detection. Maximum time is 255 seconds. |
| 5527 | */ |
| 5528 | WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| 5529 | |
| 5530 | /* Enable/Disable early rx dynamic adjust feature. |
| 5531 | * Early-rx dynamic adjust is a advance power save feature. |
| 5532 | * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various |
| 5533 | * timing discrepancies in the system. |
| 5534 | * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum. |
| 5535 | * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed |
| 5536 | * properly to minimum the power consume.*/ |
| 5537 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, |
| 5538 | |
| 5539 | /* set target bmiss number per sample cycle if bmiss adjust was chosen. |
| 5540 | * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate |
| 5541 | * which can be set by user through WMI command. |
| 5542 | */ |
| 5543 | WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, |
| 5544 | |
| 5545 | /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */ |
| 5546 | WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, |
| 5547 | |
| 5548 | /* set slop_step */ |
| 5549 | WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, |
| 5550 | |
| 5551 | /* set init slop */ |
| 5552 | WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, |
| 5553 | |
| 5554 | /* pause adjust enable/disable */ |
| 5555 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, |
| 5556 | |
| 5557 | /* Set channel pwr limit value of the vdev the minimal value of all |
| 5558 | * vdevs operating on this channel will be set as channel tx power |
| 5559 | * limit, which is used to configure ratearray |
| 5560 | */ |
| 5561 | WMI_VDEV_PARAM_TX_PWRLIMIT, |
| 5562 | |
| 5563 | /* set the count of snr value for calculation in snr monitor */ |
| 5564 | WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, |
| 5565 | |
| 5566 | /** Roaming offload */ |
| 5567 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, |
| 5568 | |
| 5569 | /** Enable Leader request RX functionality for RMC */ |
| 5570 | WMI_VDEV_PARAM_ENABLE_RMC, |
| 5571 | |
| 5572 | /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event |
| 5573 | * by himself. If the beacon lost time exceed this threshold, the peer is |
| 5574 | * thought to be gone. */ |
| 5575 | WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, |
| 5576 | |
| 5577 | /** max rate in kpbs, transmit rate can't go beyond it */ |
| 5578 | WMI_VDEV_PARAM_MAX_RATE, |
| 5579 | |
| 5580 | /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */ |
| 5581 | WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, |
| 5582 | /* set Tx failure count threshold for the vdev */ |
| 5583 | WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, |
| 5584 | |
| 5585 | /* set ebt resync timeout value, in the unit of TU */ |
| 5586 | WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, |
| 5587 | |
| 5588 | /* Enable Aggregation State Trigger Event */ |
| 5589 | WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, |
| 5590 | |
| 5591 | /* This parameter indicates whether IBSS station can enter into power save |
| 5592 | * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay |
| 5593 | * awake all the time and should never set PM=1 in its transmitted frames. |
| 5594 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH |
| 5595 | * is non-zero. */ |
| 5596 | WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, |
| 5597 | |
| 5598 | /* This parameter indicates if this station can enter into power collapse |
| 5599 | * for the remaining beacon interval after the ATIM window. |
| 5600 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED |
| 5601 | * is set to true. */ |
| 5602 | WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, |
| 5603 | |
| 5604 | /* This parameter indicates whether IBSS station exit power save mode and |
| 5605 | * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window) |
| 5606 | * whenever there is a TX/RX activity. */ |
| 5607 | WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, |
| 5608 | |
| 5609 | /* If Awake on TX/RX activity is enabled, this parameter indicates |
| 5610 | * the data inactivity time in number of beacon intervals after which |
| 5611 | * IBSS station reenters power save by sending Null frame with PM=1. */ |
| 5612 | WMI_VDEV_PARAM_INACTIVITY_CNT, |
| 5613 | |
| 5614 | /* Inactivity time in msec after which TX Service Period (SP) is |
| 5615 | * terminated by sending a Qos Null frame with EOSP. |
| 5616 | * If value is 0, TX SP is terminated with the last buffered packet itself |
| 5617 | * instead of waiting for the inactivity timeout. */ |
| 5618 | WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, |
| 5619 | |
| 5620 | /** DTIM policy */ |
| 5621 | WMI_VDEV_PARAM_DTIM_POLICY, |
| 5622 | |
| 5623 | /* When IBSS network is initialized, PS-supporting device |
| 5624 | * does not enter protocol sleep state during first |
| 5625 | * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */ |
| 5626 | WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, |
| 5627 | |
| 5628 | /* Enable/Disable 1 RX chain usage during the ATIM window */ |
| 5629 | WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, |
| 5630 | /** |
| 5631 | * RX Leak window is the time driver waits before shutting down |
| 5632 | * the radio or switching the channel and after receiving an ACK |
| 5633 | * for a data frame with PM bit set) |
| 5634 | */ |
| 5635 | WMI_VDEV_PARAM_RX_LEAK_WINDOW, |
| 5636 | |
| 5637 | /** |
| 5638 | * Averaging factor(16 bit value) is used in the calculations to |
| 5639 | * perform averaging of different link level statistics like average |
| 5640 | * beacon spread or average number of frames leaked |
| 5641 | */ |
| 5642 | WMI_VDEV_PARAM_STATS_AVG_FACTOR, |
| 5643 | /* |
| 5644 | * disconnect threshold, once the consecutive error for specific peer |
| 5645 | * exceed this threhold, FW will send kickout event to host |
| 5646 | */ |
| 5647 | WMI_VDEV_PARAM_DISCONNECT_TH, |
| 5648 | /* |
| 5649 | * The rate_code of RTS_CTS changed by host. Now FW can support |
| 5650 | * more non-HT rates rather than 1Mbps or 6Mbps */ |
| 5651 | WMI_VDEV_PARAM_RTSCTS_RATE, |
| 5652 | |
| 5653 | /** This parameter indicates whether using a long duration RTS-CTS |
| 5654 | * protection when a SAP goes off channel in MCC mode */ |
| 5655 | WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, |
| 5656 | |
| 5657 | /* |
| 5658 | * This parameter indicates whether using a broadcast probe response |
| 5659 | * to increase the detectability of SAP in MCC mode |
| 5660 | */ |
| 5661 | WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 5662 | |
| 5663 | /* This parameter indicates the power backoff in percentage |
| 5664 | * currently supports 100%, 50%, 25%, 12.5%, and minimum |
| 5665 | * Host passes 0, 1, 2, 3, 4 to Firmware |
| 5666 | * 0 --> 100% --> no changes, 1 --> 50% --> -3dB, |
| 5667 | * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB |
| 5668 | */ |
| 5669 | WMI_VDEV_PARAM_TXPOWER_SCALE, |
| 5670 | |
| 5671 | /* TX power backoff in dB: tx power -= param value |
| 5672 | * Host passes values(DB) to Halphy, Halphy reduces the power table |
| 5673 | * by the values. Safety check will happen in Halphy. |
| 5674 | */ |
| 5675 | WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 5676 | /** Multicast to Unicast conversion setting */ |
| 5677 | WMI_VDEV_PARAM_MCAST2UCAST_SET, |
| 5678 | |
| 5679 | /** Total number of HW retries */ |
| 5680 | WMI_VDEV_PARAM_RC_NUM_RETRIES, |
| 5681 | |
| 5682 | /** Max tx percentage for cabq */ |
| 5683 | WMI_VDEV_PARAM_CABQ_MAXDUR, |
| 5684 | |
| 5685 | /** MFPTEST settings */ |
| 5686 | WMI_VDEV_PARAM_MFPTEST_SET, |
| 5687 | |
| 5688 | /** RTS Fixed rate setting */ |
| 5689 | WMI_VDEV_PARAM_RTS_FIXED_RATE, |
| 5690 | |
| 5691 | /** VHT SGI MASK */ |
| 5692 | WMI_VDEV_PARAM_VHT_SGIMASK, |
| 5693 | |
| 5694 | /** VHT80 Auto Rate MASK */ |
| 5695 | WMI_VDEV_PARAM_VHT80_RATEMASK, |
| 5696 | |
| 5697 | /** set Proxy STA features for this vap */ |
| 5698 | WMI_VDEV_PARAM_PROXY_STA, |
| 5699 | |
| 5700 | /** set virtual cell mode - enable/disable */ |
| 5701 | WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, |
| 5702 | |
| 5703 | /** Set receive packet type */ |
| 5704 | WMI_VDEV_PARAM_RX_DECAP_TYPE, |
| 5705 | |
| 5706 | /** Set ratemask with specific Bandwidth and NSS */ |
| 5707 | WMI_VDEV_PARAM_BW_NSS_RATEMASK, |
| 5708 | |
| 5709 | /** Set SENSOR Support */ |
| 5710 | WMI_VDEV_PARAM_SENSOR_AP, |
| 5711 | |
| 5712 | /** Set beacon rate */ |
| 5713 | WMI_VDEV_PARAM_BEACON_RATE, |
| 5714 | |
| 5715 | /** Enable CTS to self for DTIM beacon */ |
| 5716 | WMI_VDEV_PARAM_DTIM_ENABLE_CTS, |
| 5717 | |
| 5718 | /** Disable station kickout at Vap level */ |
| 5719 | WMI_VDEV_PARAM_STA_KICKOUT, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 5720 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5721 | /* VDEV capabilities */ |
| 5722 | WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 5723 | /* |
| 5724 | * Increment TSF in micro seconds to avoid beacon collision on mesh VAP |
| 5725 | * The host must ensure that either no other vdevs share the TSF with |
| 5726 | * this vdev, or else that it is acceptable to apply this TSF adjustment |
| 5727 | * to all vdevs sharing the TSF |
| 5728 | */ |
| 5729 | WMI_VDEV_PARAM_TSF_INCREMENT, |
Himanshu Agarwal | b953a26 | 2016-06-03 10:48:23 +0530 | [diff] [blame] | 5730 | WMI_VDEV_PARAM_PLACE_HOLDER_1, |
Himanshu Agarwal | a143815 | 2016-05-13 21:40:19 +0530 | [diff] [blame] | 5731 | |
| 5732 | /* |
| 5733 | * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames. |
| 5734 | * Used mainly for mesh-vap. |
| 5735 | * The parameter value delivered with the RX_FILTER vdev param contains |
| 5736 | * a bit-or mask of wmi_vdev_param_filter enum values. |
| 5737 | */ |
| 5738 | WMI_VDEV_PARAM_RX_FILTER, |
Himanshu Agarwal | e93c55e | 2016-05-20 12:18:15 +0530 | [diff] [blame] | 5739 | /* vdev-specific mgmt tx power in dBm units (signed integer value) */ |
| 5740 | WMI_VDEV_PARAM_MGMT_TX_POWER, |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 5741 | |
| 5742 | /* |
Himanshu Agarwal | 5e9ed45 | 2016-06-08 15:09:16 +0530 | [diff] [blame] | 5743 | * Vdev level non aggregration/11g sw retry threshold. |
| 5744 | * 0-disable, min:0, max:31, default:15 |
| 5745 | */ |
| 5746 | WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 5747 | /* |
| 5748 | * Vdev level aggregration sw retry threshold. |
| 5749 | * 0-disable, min:0, max:31, default:15 |
| 5750 | */ |
| 5751 | WMI_VDEV_PARAM_AGG_SW_RETRY_TH, |
| 5752 | |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 5753 | /** disable dynamic bw RTS **/ |
| 5754 | WMI_VDEV_PARAM_DISABLE_DYN_BW_RTS, |
| 5755 | |
Himanshu Agarwal | 5e9ed45 | 2016-06-08 15:09:16 +0530 | [diff] [blame] | 5756 | /* |
Nitesh Shah | 0f933b8 | 2016-07-20 16:05:03 +0530 | [diff] [blame] | 5757 | * Per ssid (vdev) based ATF strict/fair scheduling policy |
| 5758 | * Param values are WMI_ATF_SSID_FAIR_SCHED or |
| 5759 | * WMI_ATF_SSID_STRICT_SCHED |
| 5760 | */ |
| 5761 | WMI_VDEV_PARAM_ATF_SSID_SCHED_POLICY, |
| 5762 | |
| 5763 | /* |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 5764 | * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === |
| 5765 | * The below vdev param types are used for prototyping, and are |
| 5766 | * prone to change. |
| 5767 | */ |
| 5768 | WMI_VDEV_PARAM_PROTOTYPE = 0x8000, |
| 5769 | /* 11AX SPECIFIC defines */ |
| 5770 | WMI_VDEV_PARAM_BSS_COLOR, |
| 5771 | /* In case of AP this will enable / disable MU-MIMO mode */ |
| 5772 | WMI_VDEV_PARAM_SET_UL_MU_MIMO, |
| 5773 | /* |
| 5774 | * set fragmentation level of the vdev's peers. |
| 5775 | * Values can be WMI_HE_FRAG_SUPPORT_LEVEL0..WMI_HE_FRAG_SUPPORT_LEVEL3 |
| 5776 | */ |
| 5777 | WMI_VDEV_PARAM_SET_FRAG_LEVEL, |
| 5778 | /* |
| 5779 | * control different features of HEControl: |
| 5780 | * Bit 0:- 1/0-> Enable/Disable transmssion of UL scheduling. |
| 5781 | * Bit 1:- 1/0-> Enable / disable honoring of ROMI from a peer. |
| 5782 | * Applicable in AP mode only. |
| 5783 | */ |
| 5784 | WMI_VDEV_PARAM_SET_HECONTROL, |
| 5785 | /* |
| 5786 | * enable / disable trigger access for a AP vdev's peers. |
| 5787 | * For a STA mode vdev this will enable/disable triggered access |
| 5788 | * and enable/disable Multi User mode of operation. |
| 5789 | */ |
| 5790 | WMI_VDEV_PARAM_SET_HEMU_MODE, |
| 5791 | /* |
| 5792 | * For Tx OFDMA this will set values of CP length or guard interval |
| 5793 | * to be |
| 5794 | * 0: Auto |
| 5795 | * 1: 0.8 us |
| 5796 | * 2: 1.6 us |
| 5797 | * 3: 3.2 us |
| 5798 | * Similar to Guard Interval |
| 5799 | */ |
| 5800 | WMI_VDEV_PARAM_TX_OFDMA_CPLEN, |
| 5801 | /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5802 | } WMI_VDEV_PARAM; |
| 5803 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5804 | /* vdev capabilities bit mask */ |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 5805 | #define WMI_VDEV_BEACON_SUPPORT 0x1 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5806 | #define WMI_VDEV_WDS_LRN_ENABLED 0x2 |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 5807 | #define WMI_VDEV_VOW_ENABLED 0x4 |
| 5808 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5809 | #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT) |
| 5810 | #define WMI_VDEV_IS_WDS_LRN_ENABLED(param) ((param) & WMI_VDEV_WDS_LRN_ENABLED) |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 5811 | #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED) |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5812 | |
| 5813 | /* TXBF capabilities masks */ |
| 5814 | #define WMI_TXBF_CONF_SU_TX_BFEE_S 0 |
| 5815 | #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1 |
| 5816 | #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \ |
| 5817 | WMI_TXBF_CONF_SU_TX_BFEE_S) |
| 5818 | #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE) |
| 5819 | #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\ |
| 5820 | WMI_TXBF_CONF_SU_TX_BFEE) |
| 5821 | |
| 5822 | #define WMI_TXBF_CONF_MU_TX_BFEE_S 1 |
| 5823 | #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1 |
| 5824 | #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \ |
| 5825 | WMI_TXBF_CONF_MU_TX_BFEE_S) |
| 5826 | #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE) |
| 5827 | #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \ |
| 5828 | WMI_TXBF_CONF_MU_TX_BFEE) |
| 5829 | |
| 5830 | #define WMI_TXBF_CONF_SU_TX_BFER_S 2 |
| 5831 | #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1 |
| 5832 | #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \ |
| 5833 | WMI_TXBF_CONF_SU_TX_BFER_S) |
| 5834 | #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER) |
| 5835 | #define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \ |
| 5836 | WMI_TXBF_CONF_SU_TX_BFER) |
| 5837 | |
| 5838 | #define WMI_TXBF_CONF_MU_TX_BFER_S 3 |
| 5839 | #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1 |
| 5840 | #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \ |
| 5841 | WMI_TXBF_CONF_MU_TX_BFER_S) |
| 5842 | #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER) |
| 5843 | #define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \ |
| 5844 | WMI_TXBF_CONF_MU_TX_BFER) |
| 5845 | |
| 5846 | #define WMI_TXBF_CONF_STS_CAP_S 4 |
| 5847 | #define WMI_TXBF_CONF_STS_CAP_M 0x7 |
| 5848 | #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \ |
| 5849 | WMI_TXBF_CONF_STS_CAP_S) |
| 5850 | #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP); |
| 5851 | #define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \ |
| 5852 | WMI_TXBF_CONF_STS_CAP) |
| 5853 | |
| 5854 | #define WMI_TXBF_CONF_IMPLICIT_BF_S 7 |
| 5855 | #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1 |
| 5856 | #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \ |
| 5857 | WMI_TXBF_CONF_IMPLICIT_BF_S) |
| 5858 | #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF) |
| 5859 | #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \ |
| 5860 | WMI_TXBF_CONF_IMPLICIT_BF) |
| 5861 | |
| 5862 | #define WMI_TXBF_CONF_BF_SND_DIM_S 8 |
| 5863 | #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7 |
| 5864 | #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \ |
| 5865 | WMI_TXBF_CONF_BF_SND_DIM_S) |
| 5866 | #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM) |
| 5867 | #define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \ |
| 5868 | WMI_TXBF_CONF_BF_SND_DIM) |
| 5869 | |
| 5870 | /* TXBF capabilities */ |
| 5871 | typedef struct { |
| 5872 | A_UINT32 txbf_cap; |
| 5873 | } wmi_vdev_txbf_cap; |
| 5874 | |
Himanshu Agarwal | a143815 | 2016-05-13 21:40:19 +0530 | [diff] [blame] | 5875 | /* vdev rx filters (for mesh) */ |
| 5876 | typedef enum { |
| 5877 | /* Don't drop any frames - Default */ |
| 5878 | WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, |
| 5879 | /* Drop FromDS frames */ |
| 5880 | WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, |
| 5881 | /* Drop ToDS frames */ |
| 5882 | WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, |
| 5883 | /* Drop NODS frames */ |
| 5884 | WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, |
| 5885 | /* Drop RA frames */ |
| 5886 | WMI_VDEV_RX_FILTER_OUT_RA = 0x8, |
| 5887 | /* Drop TA frames */ |
| 5888 | WMI_VDEV_RX_FILTER_OUT_TA = 0x10, |
| 5889 | } wmi_vdev_param_filter; |
| 5890 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5891 | /* Length of ATIM Window in TU */ |
| 5892 | #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW |
| 5893 | |
| 5894 | enum wmi_pkt_type { |
| 5895 | WMI_PKT_TYPE_RAW = 0, |
| 5896 | WMI_PKT_TYPE_NATIVE_WIFI = 1, |
| 5897 | WMI_PKT_TYPE_ETHERNET = 2, |
| 5898 | }; |
| 5899 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5900 | /******************************************************************* |
| 5901 | * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap |
| 5902 | * Do not use it! |
| 5903 | *******************************************************************/ |
| 5904 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5905 | typedef struct { |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5906 | A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5907 | #if defined(AR900B) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5908 | txb_sts_cap:3, implicit_bf:1; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5909 | #else |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5910 | reserved:4; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5911 | #endif |
| 5912 | } wmi_vdev_txbf_en; |
| 5913 | |
| 5914 | /** Upto 8 bits are available for Roaming module to be sent along with |
| 5915 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/ |
| 5916 | /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */ |
| 5917 | #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1 |
| 5918 | /* Enable Roaming module in FW to do scan based on Final BMISS */ |
| 5919 | #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2 |
| 5920 | |
| 5921 | /** slot time long */ |
| 5922 | #define WMI_VDEV_SLOT_TIME_LONG 0x1 |
| 5923 | /** slot time short */ |
| 5924 | #define WMI_VDEV_SLOT_TIME_SHORT 0x2 |
| 5925 | /** preablbe long */ |
| 5926 | #define WMI_VDEV_PREAMBLE_LONG 0x1 |
| 5927 | /** preablbe short */ |
| 5928 | #define WMI_VDEV_PREAMBLE_SHORT 0x2 |
| 5929 | |
| 5930 | /** the definition of different START/RESTART Event response */ |
| 5931 | typedef enum { |
| 5932 | /* Event respose of START CMD */ |
| 5933 | WMI_VDEV_START_RESP_EVENT = 0, |
| 5934 | /* Event respose of RESTART CMD */ |
| 5935 | WMI_VDEV_RESTART_RESP_EVENT, |
| 5936 | } WMI_START_EVENT_PARAM; |
| 5937 | |
| 5938 | typedef struct { |
| 5939 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */ |
| 5940 | /** unique id identifying the VDEV, generated by the caller */ |
| 5941 | A_UINT32 vdev_id; |
| 5942 | /** requestor id that requested the VDEV start request */ |
| 5943 | A_UINT32 requestor_id; |
| 5944 | /* Respose of Event type START/RESTART */ |
| 5945 | WMI_START_EVENT_PARAM resp_type; |
| 5946 | /** status of the response */ |
| 5947 | A_UINT32 status; |
| 5948 | /** Vdev chain mask */ |
| 5949 | A_UINT32 chain_mask; |
| 5950 | /** Vdev mimo power save mode */ |
| 5951 | A_UINT32 smps_mode; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5952 | union { |
| 5953 | /* OBSOLETE - will be removed once all refs are gone */ |
| 5954 | A_UINT32 mac_id; |
| 5955 | /** pdev_id for identifying the MAC |
| 5956 | * See macros starting with WMI_PDEV_ID_ for values. |
| 5957 | */ |
| 5958 | A_UINT32 pdev_id; |
| 5959 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5960 | /** Configured Transmit Streams **/ |
| 5961 | A_UINT32 cfgd_tx_streams; |
| 5962 | /** Configured Receive Streams **/ |
| 5963 | A_UINT32 cfgd_rx_streams; |
| 5964 | } wmi_vdev_start_response_event_fixed_param; |
| 5965 | |
| 5966 | typedef struct { |
| 5967 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */ |
| 5968 | /** unique id identifying the VDEV, generated by the caller */ |
| 5969 | A_UINT32 vdev_id; |
| 5970 | } wmi_vdev_stopped_event_fixed_param; |
| 5971 | |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 5972 | typedef struct { |
| 5973 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */ |
| 5974 | /** unique id identifying the VDEV, generated by the caller */ |
| 5975 | A_UINT32 vdev_id; |
| 5976 | } wmi_vdev_delete_resp_event_fixed_param; |
| 5977 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5978 | /** common structure used for simple events (stopped, resume_req, standby response) */ |
| 5979 | typedef struct { |
| 5980 | A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */ |
| 5981 | /** unique id identifying the VDEV, generated by the caller */ |
| 5982 | A_UINT32 vdev_id; |
| 5983 | } wmi_vdev_simple_event_fixed_param; |
| 5984 | |
| 5985 | /** VDEV start response status codes */ |
| 5986 | #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */ |
| 5987 | #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */ |
| 5988 | #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */ |
| 5989 | |
| 5990 | /** Beacon processing related command and event structures */ |
| 5991 | typedef struct { |
| 5992 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */ |
| 5993 | /** unique id identifying the VDEV, generated by the caller */ |
| 5994 | A_UINT32 vdev_id; |
| 5995 | /** xmit rate */ |
| 5996 | A_UINT32 tx_rate; |
| 5997 | /** xmit power */ |
| 5998 | A_UINT32 txPower; |
| 5999 | /** beacon buffer length in bytes */ |
| 6000 | A_UINT32 buf_len; |
| 6001 | /* This TLV is followed by array of bytes: |
| 6002 | * // beacon frame buffer |
| 6003 | * A_UINT8 bufp[]; |
| 6004 | */ |
| 6005 | } wmi_bcn_tx_hdr; |
| 6006 | |
| 6007 | /* Beacon filter */ |
| 6008 | #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */ |
| 6009 | #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */ |
| 6010 | #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */ |
| 6011 | #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */ |
| 6012 | #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */ |
| 6013 | |
| 6014 | typedef struct { |
| 6015 | /** Filter ID */ |
| 6016 | A_UINT32 bcn_filter_id; |
| 6017 | /** Filter type - wmi_bcn_filter */ |
| 6018 | A_UINT32 bcn_filter; |
| 6019 | /** Buffer len */ |
| 6020 | A_UINT32 bcn_filter_len; |
| 6021 | /** Filter info (threshold, BSSID, RSSI) */ |
| 6022 | A_UINT8 *bcn_filter_buf; |
| 6023 | } wmi_bcn_filter_rx_cmd; |
| 6024 | |
| 6025 | /** Capabilities and IEs to be passed to firmware */ |
| 6026 | typedef struct { |
| 6027 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */ |
| 6028 | /** Capabilities */ |
| 6029 | A_UINT32 caps; |
| 6030 | /** ERP info */ |
| 6031 | A_UINT32 erp; |
| 6032 | /** Advanced capabilities */ |
| 6033 | /** HT capabilities */ |
| 6034 | /** HT Info */ |
| 6035 | /** ibss_dfs */ |
| 6036 | /** wpa Info */ |
| 6037 | /** rsn Info */ |
| 6038 | /** rrm info */ |
| 6039 | /** ath_ext */ |
| 6040 | /** app IE */ |
| 6041 | } wmi_bcn_prb_info; |
| 6042 | |
| 6043 | typedef struct { |
| 6044 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */ |
| 6045 | /** unique id identifying the VDEV, generated by the caller */ |
| 6046 | A_UINT32 vdev_id; |
| 6047 | /** TIM IE offset from the beginning of the template. */ |
| 6048 | A_UINT32 tim_ie_offset; |
| 6049 | /** beacon buffer length. data is in TLV data[] */ |
| 6050 | A_UINT32 buf_len; |
| 6051 | /* |
| 6052 | * The TLVs follows: |
| 6053 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 6054 | * A_UINT8 data[]; //Variable length data |
| 6055 | */ |
| 6056 | } wmi_bcn_tmpl_cmd_fixed_param; |
| 6057 | |
| 6058 | typedef struct { |
| 6059 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */ |
| 6060 | /** unique id identifying the VDEV, generated by the caller */ |
| 6061 | A_UINT32 vdev_id; |
| 6062 | /** beacon buffer length. data is in TLV data[] */ |
| 6063 | A_UINT32 buf_len; |
| 6064 | /* |
| 6065 | * The TLVs follows: |
| 6066 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 6067 | * A_UINT8 data[]; //Variable length data |
| 6068 | */ |
| 6069 | } wmi_prb_tmpl_cmd_fixed_param; |
| 6070 | |
| 6071 | typedef struct { |
| 6072 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */ |
| 6073 | A_UINT32 tlv_header; |
| 6074 | /** unique id identifying the VDEV */ |
| 6075 | A_UINT32 vdev_id; |
| 6076 | /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 6077 | A_UINT32 tx_status; |
| 6078 | } wmi_offload_bcn_tx_status_event_fixed_param; |
| 6079 | |
| 6080 | enum wmi_sta_ps_mode { |
| 6081 | /** enable power save for the given STA VDEV */ |
| 6082 | WMI_STA_PS_MODE_DISABLED = 0, |
| 6083 | /** disable power save for a given STA VDEV */ |
| 6084 | WMI_STA_PS_MODE_ENABLED = 1, |
| 6085 | }; |
| 6086 | |
| 6087 | typedef struct { |
| 6088 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */ |
| 6089 | /** unique id identifying the VDEV, generated by the caller */ |
| 6090 | A_UINT32 vdev_id; |
| 6091 | |
| 6092 | /** Power save mode |
| 6093 | * |
| 6094 | * (see enum wmi_sta_ps_mode) |
| 6095 | */ |
| 6096 | A_UINT32 sta_ps_mode; |
| 6097 | } wmi_sta_powersave_mode_cmd_fixed_param; |
| 6098 | |
| 6099 | enum wmi_csa_offload_en { |
| 6100 | WMI_CSA_OFFLOAD_DISABLE = 0, |
| 6101 | WMI_CSA_OFFLOAD_ENABLE = 1, |
| 6102 | }; |
| 6103 | |
| 6104 | typedef struct { |
| 6105 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */ |
| 6106 | A_UINT32 vdev_id; |
| 6107 | A_UINT32 csa_offload_enable; |
| 6108 | } wmi_csa_offload_enable_cmd_fixed_param; |
| 6109 | |
| 6110 | typedef struct { |
| 6111 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */ |
| 6112 | A_UINT32 vdev_id; |
| 6113 | /* |
| 6114 | * The TLVs follows: |
| 6115 | * wmi_channel chan; |
| 6116 | */ |
| 6117 | } wmi_csa_offload_chanswitch_cmd_fixed_param; |
| 6118 | /** |
| 6119 | * This parameter controls the policy for retrieving frames from AP while the |
| 6120 | * STA is in sleep state. |
| 6121 | * |
| 6122 | * Only takes affect if the sta_ps_mode is enabled |
| 6123 | */ |
| 6124 | enum wmi_sta_ps_param_rx_wake_policy { |
| 6125 | /* Wake up when ever there is an RX activity on the VDEV. In this mode |
| 6126 | * the Power save SM(state machine) will come out of sleep by either |
| 6127 | * sending null frame (or) a data frame (with PS==0) in response to TIM |
| 6128 | * bit set in the received beacon frame from AP. |
| 6129 | */ |
| 6130 | WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0, |
| 6131 | |
| 6132 | /* Here the power save state machine will not wakeup in response to TIM |
| 6133 | * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD |
| 6134 | * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all |
| 6135 | * access categories are delivery-enabled, the station will send a UAPSD |
| 6136 | * trigger frame, otherwise it will send a PS-Poll. |
| 6137 | */ |
| 6138 | WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, |
| 6139 | }; |
| 6140 | |
| 6141 | /** Number of tx frames/beacon that cause the power save SM to wake up. |
| 6142 | * |
| 6143 | * Value 1 causes the SM to wake up for every TX. Value 0 has a special |
| 6144 | * meaning, It will cause the SM to never wake up. This is useful if you want |
| 6145 | * to keep the system to sleep all the time for some kind of test mode . host |
| 6146 | * can change this parameter any time. It will affect at the next tx frame. |
| 6147 | */ |
| 6148 | enum wmi_sta_ps_param_tx_wake_threshold { |
| 6149 | WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, |
| 6150 | WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, |
| 6151 | |
| 6152 | /* Values greater than one indicate that many TX attempts per beacon |
| 6153 | * interval before the STA will wake up |
| 6154 | */ |
| 6155 | }; |
| 6156 | |
| 6157 | /** |
| 6158 | * The maximum number of PS-Poll frames the FW will send in response to |
| 6159 | * traffic advertised in TIM before waking up (by sending a null frame with PS |
| 6160 | * = 0). Value 0 has a special meaning: there is no maximum count and the FW |
| 6161 | * will send as many PS-Poll as are necessary to retrieve buffered BU. This |
| 6162 | * parameter is used when the RX wake policy is |
| 6163 | * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake |
| 6164 | * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE. |
| 6165 | */ |
| 6166 | enum wmi_sta_ps_param_pspoll_count { |
| 6167 | WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0, |
| 6168 | /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW |
| 6169 | * will send before waking up. |
| 6170 | */ |
| 6171 | }; |
| 6172 | |
| 6173 | /* |
| 6174 | * This will include the delivery and trigger enabled state for every AC. |
| 6175 | * This is the negotiated state with AP. The host MLME needs to set this based |
| 6176 | * on AP capability and the state Set in the association request by the |
| 6177 | * station MLME.Lower 8 bits of the value specify the UAPSD configuration. |
| 6178 | */ |
| 6179 | #define WMI_UAPSD_AC_TYPE_DELI 0 |
| 6180 | #define WMI_UAPSD_AC_TYPE_TRIG 1 |
| 6181 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 6182 | #define WMI_UAPSD_AC_BIT_MASK(ac, type) \ |
| 6183 | do { \ |
| 6184 | (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \ |
| 6185 | (1<<((ac<<1)+1)) \ |
| 6186 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6187 | |
| 6188 | enum wmi_sta_ps_param_uapsd { |
| 6189 | WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 6190 | WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 6191 | WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 6192 | WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 6193 | WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 6194 | WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 6195 | WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 6196 | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 6197 | }; |
| 6198 | |
| 6199 | enum wmi_sta_powersave_param { |
| 6200 | /** |
| 6201 | * Controls how frames are retrievd from AP while STA is sleeping |
| 6202 | * |
| 6203 | * (see enum wmi_sta_ps_param_rx_wake_policy) |
| 6204 | */ |
| 6205 | WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0, |
| 6206 | |
| 6207 | /** |
| 6208 | * The STA will go active after this many TX |
| 6209 | * |
| 6210 | * (see enum wmi_sta_ps_param_tx_wake_threshold) |
| 6211 | */ |
| 6212 | WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, |
| 6213 | |
| 6214 | /** |
| 6215 | * Number of PS-Poll to send before STA wakes up |
| 6216 | * |
| 6217 | * (see enum wmi_sta_ps_param_pspoll_count) |
| 6218 | * |
| 6219 | */ |
| 6220 | WMI_STA_PS_PARAM_PSPOLL_COUNT = 2, |
| 6221 | |
| 6222 | /** |
| 6223 | * TX/RX inactivity time in msec before going to sleep. |
| 6224 | * |
| 6225 | * The power save SM will monitor tx/rx activity on the VDEV, if no |
| 6226 | * activity for the specified msec of the parameter the Power save SM will |
| 6227 | * go to sleep. |
| 6228 | */ |
| 6229 | WMI_STA_PS_PARAM_INACTIVITY_TIME = 3, |
| 6230 | |
| 6231 | /** |
| 6232 | * Set uapsd configuration. |
| 6233 | * |
| 6234 | * (see enum wmi_sta_ps_param_uapsd) |
| 6235 | */ |
| 6236 | WMI_STA_PS_PARAM_UAPSD = 4, |
| 6237 | /** |
| 6238 | * Number of PS-Poll to send before STA wakes up in QPower Mode |
| 6239 | */ |
| 6240 | WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5, |
| 6241 | |
| 6242 | /** |
| 6243 | * Enable QPower |
| 6244 | */ |
| 6245 | WMI_STA_PS_ENABLE_QPOWER = 6, |
| 6246 | |
| 6247 | /** |
| 6248 | * Number of TX frames before the entering the Active state |
| 6249 | */ |
| 6250 | WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7, |
| 6251 | |
| 6252 | /** |
| 6253 | * QPower SPEC PSPOLL interval |
| 6254 | */ |
| 6255 | WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8, |
| 6256 | |
| 6257 | /** |
| 6258 | * Max SPEC PSPOLL to be sent when the PSPOLL response has |
| 6259 | * no-data bit set |
| 6260 | */ |
| 6261 | WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9, |
| 6262 | }; |
| 6263 | |
| 6264 | typedef struct { |
| 6265 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */ |
| 6266 | /** unique id identifying the VDEV, generated by the caller */ |
| 6267 | A_UINT32 vdev_id; |
| 6268 | /** station power save parameter (see enum wmi_sta_powersave_param) */ |
| 6269 | A_UINT32 param; |
| 6270 | A_UINT32 value; |
| 6271 | } wmi_sta_powersave_param_cmd_fixed_param; |
| 6272 | |
| 6273 | /** No MIMO power save */ |
| 6274 | #define WMI_STA_MIMO_PS_MODE_DISABLE |
| 6275 | /** mimo powersave mode static*/ |
| 6276 | #define WMI_STA_MIMO_PS_MODE_STATIC |
| 6277 | /** mimo powersave mode dynamic */ |
| 6278 | #define WMI_STA_MIMO_PS_MODE_DYNAMI |
| 6279 | |
| 6280 | typedef struct { |
| 6281 | /** unique id identifying the VDEV, generated by the caller */ |
| 6282 | A_UINT32 vdev_id; |
| 6283 | /** mimo powersave mode as defined above */ |
| 6284 | A_UINT32 mimo_pwrsave_mode; |
| 6285 | } wmi_sta_mimo_ps_mode_cmd; |
| 6286 | |
| 6287 | /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ |
| 6288 | enum wmi_ap_ps_param_uapsd { |
| 6289 | WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 6290 | WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 6291 | WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 6292 | WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 6293 | WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 6294 | WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 6295 | WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 6296 | WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 6297 | }; |
| 6298 | |
| 6299 | /** U-APSD maximum service period of peer station */ |
| 6300 | enum wmi_ap_ps_peer_param_max_sp { |
| 6301 | WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, |
| 6302 | WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1, |
| 6303 | WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2, |
| 6304 | WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3, |
| 6305 | |
| 6306 | /* keep last! */ |
| 6307 | MAX_WMI_AP_PS_PEER_PARAM_MAX_SP, |
| 6308 | }; |
| 6309 | |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6310 | /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */ |
| 6311 | enum wmi_ap_ps_param_sifs_resp_frmtype { |
| 6312 | WMI_SIFS_RESP_PSPOLL = (1 << 0), |
| 6313 | WMI_SIFS_RESP_UAPSD = (1 << 1), |
| 6314 | WMI_SIFS_RESP_QBST_EXP = (1 << 2), |
| 6315 | WMI_SIFS_RESP_QBST_DATA = (1 << 3), |
| 6316 | WMI_SIFS_RESP_QBST_BAR = (1 << 4), |
| 6317 | }; |
| 6318 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6319 | /** |
| 6320 | * AP power save parameter |
| 6321 | * Set a power save specific parameter for a peer station |
| 6322 | */ |
| 6323 | enum wmi_ap_ps_peer_param { |
| 6324 | /** Set uapsd configuration for a given peer. |
| 6325 | * |
| 6326 | * This will include the delivery and trigger enabled state for every AC. |
| 6327 | * The host MLME needs to set this based on AP capability and stations |
| 6328 | * request Set in the association request received from the station. |
| 6329 | * |
| 6330 | * Lower 8 bits of the value specify the UAPSD configuration. |
| 6331 | * |
| 6332 | * (see enum wmi_ap_ps_param_uapsd) |
| 6333 | * The default value is 0. |
| 6334 | */ |
| 6335 | WMI_AP_PS_PEER_PARAM_UAPSD = 0, |
| 6336 | |
| 6337 | /** |
| 6338 | * Set the service period for a UAPSD capable station |
| 6339 | * |
| 6340 | * The service period from wme ie in the (re)assoc request frame. |
| 6341 | * |
| 6342 | * (see enum wmi_ap_ps_peer_param_max_sp) |
| 6343 | */ |
| 6344 | WMI_AP_PS_PEER_PARAM_MAX_SP = 1, |
| 6345 | |
| 6346 | /** Time in seconds for aging out buffered frames for STA in power save */ |
| 6347 | WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6348 | /** |
| 6349 | * Specify frame types that are considered SIFS RESP trigger frame |
| 6350 | * (see enum wmi_ap_ps_param_sifs_resp_frmtype) |
| 6351 | */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 6352 | WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3, |
| 6353 | |
| 6354 | /* |
| 6355 | * Specifies the trigger state of TID. |
| 6356 | * Valid only for UAPSD frame type |
| 6357 | */ |
| 6358 | WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4, |
| 6359 | |
| 6360 | /** Specifies the WNM sleep state of a STA */ |
| 6361 | WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6362 | }; |
| 6363 | |
| 6364 | typedef struct { |
| 6365 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */ |
| 6366 | /** unique id identifying the VDEV, generated by the caller */ |
| 6367 | A_UINT32 vdev_id; |
| 6368 | /** peer MAC address */ |
| 6369 | wmi_mac_addr peer_macaddr; |
| 6370 | /** AP powersave param (see enum wmi_ap_ps_peer_param) */ |
| 6371 | A_UINT32 param; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6372 | /** AP powersave param value (see defines) */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6373 | A_UINT32 value; |
| 6374 | } wmi_ap_ps_peer_cmd_fixed_param; |
| 6375 | |
| 6376 | /** Configure peer station 11v U-APSD coexistance |
| 6377 | * |
| 6378 | * Two parameters from uaspd coexistence ie info (as specified in 11v) are |
| 6379 | * sent down to FW along with this command. |
| 6380 | * |
| 6381 | * The semantics of these fields are described in the following text extracted |
| 6382 | * from 802.11v. |
| 6383 | * |
| 6384 | * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the |
| 6385 | * U-APSD Coexistence element, the AP should not transmit frames to the |
| 6386 | * non-AP STA outside of the U-APSD Coexistence Service Period, which |
| 6387 | * begins when the AP receives the U-APSD trigger frame and ends after |
| 6388 | * the transmission period specified by the result of the following |
| 6389 | * calculation: |
| 6390 | * |
| 6391 | * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval)) |
| 6392 | * |
| 6393 | * Where T is the time the U-APSD trigger frame was received at the AP |
| 6394 | * Interval is the UAPSD Coexistence element Duration/Interval field |
| 6395 | * value (see 7.3.2.91) or upon the successful transmission of a frame |
| 6396 | * with EOSP bit set to 1, whichever is earlier. |
| 6397 | * |
| 6398 | * |
| 6399 | * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD |
| 6400 | * Coexistence element, the AP should not transmit frames to the non-AP |
| 6401 | * STA outside of the U-APSD Coexistence Service Period, which begins |
| 6402 | * when the AP receives a U-APSD trigger frame and ends after the |
| 6403 | * transmission period specified by the result of the following |
| 6404 | * calculation: End of transmission period = T + Duration |
| 6405 | */ |
| 6406 | typedef struct { |
| 6407 | /** unique id identifying the VDEV, generated by the caller */ |
| 6408 | A_UINT32 vdev_id; |
| 6409 | /** peer MAC address */ |
| 6410 | wmi_mac_addr peer_macaddr; |
| 6411 | /** Enable U-APSD coexistence support for this peer |
| 6412 | * |
| 6413 | * 0 -> disabled (default) |
| 6414 | * 1 -> enabled |
| 6415 | */ |
| 6416 | A_UINT32 enabled; |
| 6417 | /** Duration/Interval as defined by 11v U-ASPD coexistance */ |
| 6418 | A_UINT32 duration_interval; |
| 6419 | /** Upper 32 bits of 64-bit TSF offset */ |
| 6420 | A_UINT32 tsf_offset_high; |
| 6421 | /** Lower 32 bits of 64-bit TSF offset */ |
| 6422 | A_UINT32 tsf_offset_low; |
| 6423 | } wmi_ap_powersave_peer_uapsd_coex_cmd; |
| 6424 | |
| 6425 | typedef enum { |
| 6426 | WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001, |
| 6427 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002, |
| 6428 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004, |
| 6429 | |
| 6430 | WMI_AP_PS_EGAP_FLAG_MAX = 0x8000 |
| 6431 | } wmi_ap_ps_egap_flag_type; |
| 6432 | |
| 6433 | /** |
| 6434 | * configure ehanced green ap parameters |
| 6435 | */ |
| 6436 | typedef struct { |
| 6437 | /* |
| 6438 | * TLV tag and len; tag equals |
| 6439 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 6440 | */ |
| 6441 | A_UINT32 tlv_header; |
| 6442 | /** Enable enhanced green ap |
| 6443 | * 0 -> disabled |
| 6444 | * 1 -> enabled |
| 6445 | */ |
| 6446 | A_UINT32 enable; |
| 6447 | /** The param indicates a duration that all STAs connected |
| 6448 | * to S-AP have no traffic. |
| 6449 | */ |
| 6450 | A_UINT32 inactivity_time; /* in unit of milliseconds */ |
| 6451 | /** The param indicates a duration that all STAs connected |
| 6452 | * to S-AP have no traffic, after all STAs have entered powersave. |
| 6453 | */ |
| 6454 | A_UINT32 wait_time; /* in unit of milliseconds */ |
| 6455 | /** The param is used to turn on/off some functions within E-GAP. |
| 6456 | */ |
| 6457 | A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */ |
| 6458 | } wmi_ap_ps_egap_param_cmd_fixed_param; |
| 6459 | |
| 6460 | typedef enum { |
| 6461 | WMI_AP_PS_EGAP_STATUS_IDLE = 1, |
| 6462 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2, |
| 6463 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3, |
| 6464 | |
| 6465 | WMI_AP_PS_EGAP_STATUS_MAX = 15 |
| 6466 | } wmi_ap_ps_egap_status_type; |
| 6467 | |
| 6468 | /** |
| 6469 | * send ehanced green ap status to host |
| 6470 | */ |
| 6471 | typedef struct { |
Manikandan Mohan | 0c7ae40 | 2015-12-03 17:56:41 -0800 | [diff] [blame] | 6472 | /* TLV tag and len; tag equals |
| 6473 | * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list |
| 6474 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6475 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 6476 | union { |
| 6477 | /* OBSOLETE - will be removed once all refs are gone */ |
| 6478 | A_UINT32 mac_id; |
| 6479 | /** pdev_id for identifying the MAC |
| 6480 | * See macros starting with WMI_PDEV_ID_ for values. |
| 6481 | */ |
| 6482 | A_UINT32 pdev_id; |
| 6483 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6484 | /** The param indicates the current tx chainmask with the mac id. */ |
| 6485 | A_UINT32 tx_chainmask; |
| 6486 | /** The param indicates the current rx chainmask with the mac id. */ |
| 6487 | A_UINT32 rx_chainmask; |
| 6488 | } wmi_ap_ps_egap_info_chainmask_list; |
| 6489 | |
| 6490 | typedef struct { |
| 6491 | /* |
| 6492 | * TLV tag and len; tag equals |
| 6493 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 6494 | */ |
| 6495 | A_UINT32 tlv_header; |
| 6496 | /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */ |
| 6497 | A_UINT32 status; |
| 6498 | /* This TLV is followed by |
| 6499 | * wmi_ap_ps_egap_info_chainmask_list chainmask_list[]; |
| 6500 | */ |
| 6501 | } wmi_ap_ps_egap_info_event_fixed_param; |
| 6502 | |
| 6503 | |
| 6504 | /* 128 clients = 4 words */ |
| 6505 | /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */ |
| 6506 | #define WMI_TIM_BITMAP_ARRAY_SIZE 4 |
| 6507 | |
| 6508 | typedef struct { |
| 6509 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */ |
| 6510 | /** TIM bitmap len (in bytes)*/ |
| 6511 | A_UINT32 tim_len; |
| 6512 | /** TIM Partial Virtual Bitmap */ |
| 6513 | A_UINT32 tim_mcast; |
| 6514 | A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE]; |
| 6515 | A_UINT32 tim_changed; |
| 6516 | A_UINT32 tim_num_ps_pending; |
| 6517 | } wmi_tim_info; |
| 6518 | |
| 6519 | typedef struct { |
| 6520 | /** Flag to enable quiet period IE support */ |
| 6521 | A_UINT32 is_enabled; |
| 6522 | /** Quiet start */ |
| 6523 | A_UINT32 tbttcount; |
| 6524 | /** Beacon intervals between quiets*/ |
| 6525 | A_UINT32 period; |
| 6526 | /** TUs of each quiet*/ |
| 6527 | A_UINT32 duration; |
| 6528 | /** TUs of from TBTT of quiet start*/ |
| 6529 | A_UINT32 offset; |
| 6530 | } wmi_quiet_info; |
| 6531 | |
| 6532 | /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */ |
| 6533 | #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */ |
| 6534 | |
| 6535 | typedef struct { |
| 6536 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */ |
| 6537 | /** Bit 0: Flag to indicate an update in NOA schedule |
| 6538 | * Bits 7-1: Reserved |
| 6539 | * Bits 15-8: Index (identifies the instance of NOA sub element) |
| 6540 | * Bit 16: Opp PS state of the AP |
| 6541 | * Bits 23-17: Ctwindow in TUs |
| 6542 | * Bits 31-24: Number of NOA descriptors |
| 6543 | */ |
| 6544 | A_UINT32 noa_attributes; |
| 6545 | wmi_p2p_noa_descriptor |
| 6546 | noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS]; |
| 6547 | } wmi_p2p_noa_info; |
| 6548 | |
| 6549 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1 |
| 6550 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0 |
| 6551 | |
| 6552 | #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \ |
| 6553 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED) |
| 6554 | |
| 6555 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \ |
| 6556 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 6557 | WMI_UNIFIED_NOA_ATTR_MODIFIED); |
| 6558 | |
| 6559 | #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00 |
| 6560 | #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8 |
| 6561 | |
| 6562 | #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \ |
| 6563 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX) |
| 6564 | |
| 6565 | #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \ |
| 6566 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 6567 | WMI_UNIFIED_NOA_ATTR_INDEX); |
| 6568 | |
| 6569 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000 |
| 6570 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16 |
| 6571 | |
| 6572 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \ |
| 6573 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS) |
| 6574 | |
| 6575 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \ |
| 6576 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 6577 | WMI_UNIFIED_NOA_ATTR_OPP_PS); |
| 6578 | |
| 6579 | #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000 |
| 6580 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17 |
| 6581 | |
| 6582 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \ |
| 6583 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN) |
| 6584 | |
| 6585 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \ |
| 6586 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \ |
| 6587 | WMI_UNIFIED_NOA_ATTR_CTWIN); |
| 6588 | |
| 6589 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000 |
| 6590 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24 |
| 6591 | |
| 6592 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \ |
| 6593 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC) |
| 6594 | |
| 6595 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \ |
| 6596 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 6597 | WMI_UNIFIED_NOA_ATTR_NUM_DESC); |
| 6598 | |
| 6599 | typedef struct { |
| 6600 | /** TIM info */ |
| 6601 | wmi_tim_info tim_info; |
| 6602 | /** P2P NOA info */ |
| 6603 | wmi_p2p_noa_info p2p_noa_info; |
| 6604 | /* TBD: More info elements to be added later */ |
| 6605 | } wmi_bcn_info; |
| 6606 | |
| 6607 | typedef struct { |
| 6608 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */ |
| 6609 | /** bitmap identifying the VDEVs, generated by the caller */ |
| 6610 | A_UINT32 vdev_map; |
| 6611 | /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap : |
| 6612 | * wmi_tim_info tim_info[]; |
| 6613 | * wmi_p2p_noa_info p2p_noa_info[]; |
| 6614 | * |
| 6615 | */ |
| 6616 | } wmi_host_swba_event_fixed_param; |
| 6617 | |
| 6618 | #define WMI_MAX_AP_VDEV 16 |
| 6619 | |
| 6620 | typedef struct { |
| 6621 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */ |
| 6622 | /** bimtap of VDEVs that has tbtt offset updated */ |
| 6623 | A_UINT32 vdev_map; |
| 6624 | /* The TLVs for tbttoffset_list will follow this TLV. |
| 6625 | * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap |
| 6626 | * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV]; |
| 6627 | */ |
| 6628 | } wmi_tbtt_offset_event_fixed_param; |
| 6629 | |
| 6630 | /* Peer Specific commands and events */ |
| 6631 | |
| 6632 | typedef struct { |
| 6633 | A_UINT32 percentage; /* in unit of 12.5% */ |
| 6634 | A_UINT32 min_delta; /* in unit of Mbps */ |
| 6635 | } rate_delta_t; |
| 6636 | |
| 6637 | #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01 |
| 6638 | #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02 |
| 6639 | #define MAX_NUM_OF_RATE_THRESH 4 |
| 6640 | |
| 6641 | typedef struct { |
| 6642 | /* |
| 6643 | * PEER_RATE_REPORT_COND_FLAG_DELTA, |
| 6644 | * PEER_RATE_REPORT_COND_FLAG_THRESHOLD |
| 6645 | * Any of these two conditions or both of |
| 6646 | * them can be set. |
| 6647 | */ |
| 6648 | A_UINT32 val_cond_flags; |
| 6649 | rate_delta_t rate_delta; |
| 6650 | /* |
| 6651 | * In unit of Mbps. There are at most 4 thresholds |
| 6652 | * If the threshold count is less than 4, set zero to |
| 6653 | * the one following the last threshold |
| 6654 | */ |
| 6655 | A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; |
| 6656 | } report_cond_per_phy_t; |
| 6657 | |
| 6658 | |
| 6659 | enum peer_rate_report_cond_phy_type { |
| 6660 | PEER_RATE_REPORT_COND_11B = 0, |
| 6661 | PEER_RATE_REPORT_COND_11A_G, |
| 6662 | PEER_RATE_REPORT_COND_11N, |
| 6663 | PEER_RATE_REPORT_COND_11AC, |
| 6664 | PEER_RATE_REPORT_COND_MAX_NUM |
| 6665 | }; |
| 6666 | |
| 6667 | typedef struct { |
| 6668 | /* |
| 6669 | * TLV tag and len; tag equals |
| 6670 | * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param |
| 6671 | */ |
| 6672 | A_UINT32 tlv_header; |
| 6673 | /* 1= enable, 0=disable */ |
| 6674 | A_UINT32 enable_rate_report; |
| 6675 | A_UINT32 report_backoff_time; /* in unit of msecond */ |
| 6676 | A_UINT32 report_timer_period; /* in unit of msecond */ |
| 6677 | /* |
| 6678 | *In the following field, the array index means the phy type, |
| 6679 | * please see enum peer_rate_report_cond_phy_type for detail |
| 6680 | */ |
| 6681 | report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM]; |
| 6682 | } wmi_peer_set_rate_report_condition_fixed_param; |
| 6683 | |
| 6684 | /* Peer Type: |
| 6685 | * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based |
| 6686 | * on address and vdev opmode. This is largely here to allow host to indicate that |
| 6687 | * peer is explicitly a TDLS peer |
| 6688 | */ |
| 6689 | enum wmi_peer_type { |
| 6690 | WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */ |
| 6691 | WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */ |
| 6692 | WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */ |
| 6693 | WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 6694 | WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6695 | WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 6696 | * is assigned up to 127 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6697 | /* Reserved from 128 - 255 for |
| 6698 | * target internal use.*/ |
| 6699 | WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */ |
| 6700 | }; |
| 6701 | |
| 6702 | typedef struct { |
| 6703 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */ |
| 6704 | /** unique id identifying the VDEV, generated by the caller */ |
| 6705 | A_UINT32 vdev_id; |
| 6706 | /** peer MAC address */ |
| 6707 | wmi_mac_addr peer_macaddr; |
| 6708 | /** peer type: see enum values above */ |
| 6709 | A_UINT32 peer_type; |
| 6710 | } wmi_peer_create_cmd_fixed_param; |
| 6711 | |
| 6712 | typedef struct { |
| 6713 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */ |
| 6714 | /** unique id identifying the VDEV, generated by the caller */ |
| 6715 | A_UINT32 vdev_id; |
| 6716 | /** peer MAC address */ |
| 6717 | wmi_mac_addr peer_macaddr; |
| 6718 | } wmi_peer_delete_cmd_fixed_param; |
| 6719 | |
| 6720 | typedef struct { |
Nitesh Shah | 5de1cf8 | 2016-06-29 20:13:17 +0530 | [diff] [blame] | 6721 | /** |
| 6722 | * TLV tag and len; tag equals |
| 6723 | * WMITLV_TAG_STRUC_wmi_peer_set_rx_blocksize_cmd_fixed_param |
| 6724 | */ |
| 6725 | A_UINT32 tlv_header; |
| 6726 | /** unique id identifying the VDEV, generated by the caller */ |
| 6727 | A_UINT32 vdev_id; |
| 6728 | /** peer MAC address */ |
| 6729 | wmi_mac_addr peer_macaddr; |
| 6730 | /** |
| 6731 | * maximum block ack window size to use during a rx block ack |
| 6732 | * negotiation, i.e. the maximum number of MPDUs per A-MPDU |
| 6733 | * that will be received |
| 6734 | */ |
| 6735 | A_UINT32 rx_block_ack_win_limit; |
| 6736 | } wmi_peer_set_rx_blocksize_cmd_fixed_param; |
| 6737 | |
| 6738 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6739 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */ |
| 6740 | /** unique id identifying the VDEV, generated by the caller */ |
| 6741 | A_UINT32 vdev_id; |
| 6742 | /** peer MAC address */ |
| 6743 | wmi_mac_addr peer_macaddr; |
| 6744 | /** tid bitmap identifying the tids to flush */ |
| 6745 | A_UINT32 peer_tid_bitmap; |
| 6746 | } wmi_peer_flush_tids_cmd_fixed_param; |
| 6747 | |
| 6748 | typedef struct { |
| 6749 | /** rate mode . 0: disable fixed rate (auto rate) |
| 6750 | * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps |
| 6751 | * 2: ht20 11n rate specified as mcs index |
| 6752 | * 3: ht40 11n rate specified as mcs index |
| 6753 | */ |
| 6754 | A_UINT32 rate_mode; |
| 6755 | /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB) |
| 6756 | * and series 3 is stored at byte 3 (MSB) */ |
| 6757 | A_UINT32 rate_series; |
| 6758 | /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB) |
| 6759 | * and retry count for rate 3 is stored at byte 3 (MSB) */ |
| 6760 | A_UINT32 rate_retries; |
| 6761 | } wmi_fixed_rate; |
| 6762 | |
| 6763 | typedef struct { |
| 6764 | /** unique id identifying the VDEV, generated by the caller */ |
| 6765 | A_UINT32 vdev_id; |
| 6766 | /** peer MAC address */ |
| 6767 | wmi_mac_addr peer_macaddr; |
| 6768 | /** fixed rate */ |
| 6769 | wmi_fixed_rate peer_fixed_rate; |
| 6770 | } wmi_peer_fixed_rate_cmd; |
| 6771 | |
| 6772 | #define WMI_MGMT_TID 17 |
| 6773 | |
| 6774 | typedef struct { |
| 6775 | A_UINT32 tlv_header; |
| 6776 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */ |
| 6777 | /** unique id identifying the VDEV, generated by the caller */ |
| 6778 | A_UINT32 vdev_id; |
| 6779 | /** peer MAC address */ |
| 6780 | wmi_mac_addr peer_macaddr; |
| 6781 | } wmi_addba_clear_resp_cmd_fixed_param; |
| 6782 | |
| 6783 | typedef struct { |
| 6784 | A_UINT32 tlv_header; |
| 6785 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */ |
| 6786 | /** unique id identifying the VDEV, generated by the caller */ |
| 6787 | A_UINT32 vdev_id; |
| 6788 | /** peer MAC address */ |
| 6789 | wmi_mac_addr peer_macaddr; |
| 6790 | /** Tid number */ |
| 6791 | A_UINT32 tid; |
| 6792 | /** Buffer/Window size*/ |
| 6793 | A_UINT32 buffersize; |
| 6794 | } wmi_addba_send_cmd_fixed_param; |
| 6795 | |
| 6796 | typedef struct { |
| 6797 | A_UINT32 tlv_header; |
| 6798 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */ |
| 6799 | /** unique id identifying the VDEV, generated by the caller */ |
| 6800 | A_UINT32 vdev_id; |
| 6801 | /** peer MAC address */ |
| 6802 | wmi_mac_addr peer_macaddr; |
| 6803 | /** Tid number */ |
| 6804 | A_UINT32 tid; |
| 6805 | /** Is Initiator */ |
| 6806 | A_UINT32 initiator; |
| 6807 | /** Reason code */ |
| 6808 | A_UINT32 reasoncode; |
| 6809 | } wmi_delba_send_cmd_fixed_param; |
| 6810 | |
| 6811 | typedef struct { |
| 6812 | A_UINT32 tlv_header; |
| 6813 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */ |
| 6814 | /** unique id identifying the vdev, generated by the caller */ |
| 6815 | A_UINT32 vdev_id; |
| 6816 | /** peer mac address */ |
| 6817 | wmi_mac_addr peer_macaddr; |
| 6818 | /** Tid number */ |
| 6819 | A_UINT32 tid; |
| 6820 | /** status code */ |
| 6821 | A_UINT32 statuscode; |
| 6822 | } wmi_addba_setresponse_cmd_fixed_param; |
| 6823 | |
| 6824 | typedef struct { |
| 6825 | A_UINT32 tlv_header; |
| 6826 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */ |
| 6827 | /** unique id identifying the vdev, generated by the caller */ |
| 6828 | A_UINT32 vdev_id; |
| 6829 | /** peer mac address */ |
| 6830 | wmi_mac_addr peer_macaddr; |
| 6831 | /** Tid number */ |
| 6832 | A_UINT32 tid; |
| 6833 | } wmi_send_singleamsdu_cmd_fixed_param; |
| 6834 | |
| 6835 | /* Type of Station DTIM Power Save method */ |
| 6836 | enum { |
| 6837 | /* For NORMAL DTIM, the parameter is the number of beacon intervals and |
| 6838 | * also the same value as the listen interval. For this method, the |
| 6839 | * station will wake up based on the listen interval. If this |
| 6840 | * listen interval is not equal to DTIM, then the station may |
| 6841 | * miss certain DTIM beacons. If this value is 1, then the |
| 6842 | * station will wake up for every beacon. |
| 6843 | */ |
| 6844 | WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01, |
| 6845 | /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip. |
| 6846 | * When this value is 1, then the station will wake at every DTIM beacon. |
| 6847 | * If this value is >1, then the station will skip certain DTIM beacons. |
| 6848 | * This value is the multiple of DTIM intervals that the station will |
| 6849 | * wake up to receive the DTIM beacons. |
| 6850 | */ |
| 6851 | WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02, |
| 6852 | }; |
| 6853 | |
| 6854 | /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */ |
| 6855 | typedef struct { |
| 6856 | A_UINT32 tlv_header; |
| 6857 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */ |
| 6858 | /** unique id identifying the VDEV, generated by the caller */ |
| 6859 | A_UINT32 vdev_id; |
| 6860 | /* Station DTIM Power Save method as defined above */ |
| 6861 | A_UINT32 dtim_pwrsave_method; |
| 6862 | /* DTIM PS value. Contents depends on the method */ |
| 6863 | A_UINT32 value; |
| 6864 | /* Modulated DTIM value */ |
| 6865 | A_UINT32 MaxLIModulatedDTIM; |
| 6866 | } wmi_sta_dtim_ps_method_cmd_fixed_param; |
| 6867 | |
| 6868 | /* |
| 6869 | * For Station UAPSD Auto Trigger feature, the Firmware monitors the |
| 6870 | * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs. |
| 6871 | * If there is no uplink/download for the specified service interval (field service_interval), |
| 6872 | * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value |
| 6873 | * specified in the UP (field user_priority). |
| 6874 | * Firmware also monitors the responses for these QOS-NULL triggers. |
| 6875 | * If the peer does not have any delivery frames, it will respond with |
| 6876 | * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all |
| 6877 | * firmware implementation. For this basic implementation, the suspend_interval and delay_interval |
| 6878 | * are unused and should be set to 0. |
| 6879 | * When service_interval is 0, then the firmware will not send any trigger frames. This is for |
| 6880 | * certain host-based implementations that don't want this firmware offload. |
| 6881 | * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals |
| 6882 | * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms |
| 6883 | * and rest of the AC default to 300 ms. |
| 6884 | * |
| 6885 | * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature |
| 6886 | * of variable auto trigger is supported. The suspend_interval and delay_interval is used in |
| 6887 | * the more advanced monitoring method. |
| 6888 | * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the |
| 6889 | * suspend interval (field suspend_interval), firmware will change its auto trigger interval |
| 6890 | * to delay interval (field delay_interval). This way, when there is no traffic, the station |
| 6891 | * will save more power by waking up less and sending less trigger frames. |
| 6892 | * The (service_interval < suspend_interval) and (service_interval < delay_interval). |
| 6893 | * If this variable auto trigger is not required, then the suspend_interval and delay_interval |
| 6894 | * should be 0. |
| 6895 | */ |
| 6896 | typedef struct { |
| 6897 | A_UINT32 tlv_header; |
| 6898 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */ |
| 6899 | /** WMM Access category from 0 to 3 */ |
| 6900 | A_UINT32 wmm_ac; |
| 6901 | /** User priority to use in trigger frames. It is the TID |
| 6902 | * value. This field needs to be specified and may not be |
| 6903 | * equivalent to AC since some implementation may use the TSPEC |
| 6904 | * to enable UAPSD and negotiate a particular user priority. */ |
| 6905 | A_UINT32 user_priority; |
| 6906 | /** service interval in ms */ |
| 6907 | A_UINT32 service_interval; |
| 6908 | /** Suspend interval in ms */ |
| 6909 | A_UINT32 suspend_interval; |
| 6910 | /** delay interval in ms */ |
| 6911 | A_UINT32 delay_interval; |
| 6912 | } wmi_sta_uapsd_auto_trig_param; |
| 6913 | |
| 6914 | typedef struct { |
| 6915 | A_UINT32 tlv_header; |
| 6916 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */ |
| 6917 | /** unique id identifying the VDEV, generated by the caller */ |
| 6918 | A_UINT32 vdev_id; |
| 6919 | /** peer mac address */ |
| 6920 | wmi_mac_addr peer_macaddr; |
| 6921 | /** Number of AC to specify */ |
| 6922 | A_UINT32 num_ac; |
| 6923 | /* |
| 6924 | * Following this struc is the TLV: |
| 6925 | * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac) |
| 6926 | */ |
| 6927 | |
| 6928 | } wmi_sta_uapsd_auto_trig_cmd_fixed_param; |
| 6929 | |
| 6930 | /** mimo powersave state */ |
| 6931 | #define WMI_PEER_MIMO_PS_STATE 0x1 |
| 6932 | /** enable/disable AMPDU . initial value (enabled) */ |
| 6933 | #define WMI_PEER_AMPDU 0x2 |
| 6934 | /** authorize/unauthorize peer. initial value is unauthorized (0) */ |
| 6935 | #define WMI_PEER_AUTHORIZE 0x3 |
| 6936 | /** peer channel bandwidth */ |
| 6937 | #define WMI_PEER_CHWIDTH 0x4 |
| 6938 | /** peer NSS */ |
| 6939 | #define WMI_PEER_NSS 0x5 |
| 6940 | /** USE 4 ADDR */ |
| 6941 | #define WMI_PEER_USE_4ADDR 0x6 |
| 6942 | /* set group membership status */ |
| 6943 | #define WMI_PEER_MEMBERSHIP 0x7 |
| 6944 | #define WMI_PEER_USERPOS 0x8 |
| 6945 | /* |
| 6946 | * A critical high-level protocol is being used with this peer. Target |
| 6947 | * should take appropriate measures (if possible) to ensure more |
| 6948 | * reliable link with minimal latency. This *may* include modifying the |
| 6949 | * station power save policy, enabling more RX chains, increased |
| 6950 | * priority of channel scheduling, etc. |
| 6951 | * |
| 6952 | * NOTE: This parameter should only be considered a hint as specific |
| 6953 | * behavior will depend on many factors including current network load |
| 6954 | * and vdev/peer configuration. |
| 6955 | * |
| 6956 | * For STA VDEV this peer corresponds to the AP's BSS peer. |
| 6957 | * For AP VDEV this peer corresponds to the remote peer STA. |
| 6958 | */ |
| 6959 | #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9 |
| 6960 | /* set Tx failure count threshold for the peer - Currently unused */ |
| 6961 | #define WMI_PEER_TX_FAIL_CNT_THR 0xA |
| 6962 | /* Enable H/W retry and Enable H/W Send CTS2S before Data */ |
| 6963 | #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB |
| 6964 | |
| 6965 | /* Set peer advertised IBSS atim window length */ |
| 6966 | #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC |
| 6967 | |
| 6968 | /** peer phy mode */ |
| 6969 | #define WMI_PEER_PHYMODE 0xD |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 6970 | /** Use FIXED Pwr */ |
| 6971 | #define WMI_PEER_USE_FIXED_PWR 0xE |
| 6972 | /** Set peer fixed rate */ |
| 6973 | #define WMI_PEER_PARAM_FIXED_RATE 0xF |
| 6974 | /** Whitelist peer TIDs */ |
| 6975 | #define WMI_PEER_SET_MU_WHITELIST 0x10 |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 6976 | /** Set peer max tx rate (MCS) in adaptive rate ctrl */ |
| 6977 | #define WMI_PEER_SET_MAX_TX_RATE 0x11 |
| 6978 | /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */ |
| 6979 | #define WMI_PEER_SET_MIN_TX_RATE 0x12 |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 6980 | /** |
| 6981 | * default ring routing for peer data packets, |
| 6982 | * param_value = bit 0 for hash based routing enabled or not |
| 6983 | * (value 1 is enabled, value 0 is disabled) |
| 6984 | * bits 1:5 are for ring 32 (i.e. ring id value |
| 6985 | * selected from 0 to 31 values) |
| 6986 | */ |
| 6987 | #define WMI_PEER_SET_DEFAULT_ROUTING 0x13 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6988 | |
| 6989 | /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */ |
| 6990 | #define WMI_PEER_MIMO_PS_NONE 0x0 |
| 6991 | #define WMI_PEER_MIMO_PS_STATIC 0x1 |
| 6992 | #define WMI_PEER_MIMO_PS_DYNAMIC 0x2 |
| 6993 | |
| 6994 | typedef struct { |
| 6995 | A_UINT32 tlv_header; |
| 6996 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */ |
| 6997 | /** unique id identifying the VDEV, generated by the caller */ |
| 6998 | A_UINT32 vdev_id; |
| 6999 | /** peer MAC address */ |
| 7000 | wmi_mac_addr peer_macaddr; |
| 7001 | /** parameter id */ |
| 7002 | A_UINT32 param_id; |
| 7003 | /** parametr value */ |
| 7004 | A_UINT32 param_value; |
| 7005 | } wmi_peer_set_param_cmd_fixed_param; |
| 7006 | |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 7007 | typedef union { |
| 7008 | /* |
| 7009 | * The A_UINT16 "mode" and "tx_rate" fields can only be directly used |
| 7010 | * by the target or a little-endian host. |
| 7011 | * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET |
| 7012 | * macros on the A_UINT32 "value" field. |
| 7013 | */ |
| 7014 | struct { |
| 7015 | /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */ |
| 7016 | A_UINT16 mode; |
| 7017 | A_UINT16 tx_rate; /* see per-mode specs below */ |
| 7018 | }; |
| 7019 | A_UINT32 value; /* for use by big-endian host */ |
| 7020 | } wmi_peer_max_min_tx_rate; |
| 7021 | |
| 7022 | /* |
| 7023 | * Any access to the mode/tx_rate in an big endian system should use |
| 7024 | * the below Macros on the wmi_peer_max_min_tx_rate.value field. |
| 7025 | */ |
| 7026 | #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16) |
| 7027 | #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode) |
| 7028 | |
| 7029 | #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16) |
| 7030 | #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode) |
| 7031 | |
| 7032 | /* |
| 7033 | * CCK max/min tx Rate description |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 7034 | * tx_rate = 0: 1 Mbps |
| 7035 | * tx_rate = 1: 2 Mbps |
| 7036 | * tx_rate = 2: 5.5 Mbps |
| 7037 | * tx_rate = 3: 11 Mbps |
| 7038 | * tx_rate = else: invalid |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 7039 | */ |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 7040 | enum { |
| 7041 | WMI_MAX_CCK_TX_RATE_1M, /* up to 1M CCK Rate avaliable */ |
| 7042 | WMI_MAX_CCK_TX_RATE_2M, /* up to 2M CCK Rate avaliable */ |
| 7043 | WMI_MAX_CCK_TX_RATE_5_5M, /* up to 5.5M CCK Rate avaliable */ |
| 7044 | WMI_MAX_CCK_TX_RATE_11M, /* up to 11M CCK Rate avaliable */ |
| 7045 | WMI_MAX_CCK_TX_RATE = WMI_MAX_CCK_TX_RATE_11M, |
| 7046 | }; |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 7047 | |
| 7048 | /* |
| 7049 | * OFDM max/min tx Rate description |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 7050 | * tx_rate = 0: 6 Mbps |
| 7051 | * tx_rate = 1: 9 Mbps |
| 7052 | * tx_rate = 2: 12 Mbps |
| 7053 | * tx_rate = 3: 18 Mbps |
| 7054 | * tx_rate = 4: 24 Mbps |
| 7055 | * tx_rate = 5: 32 Mbps |
| 7056 | * tx_rate = 6: 48 Mbps |
| 7057 | * tx_rate = 7: 54 Mbps |
| 7058 | * tx_rate = else: invalid |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 7059 | */ |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 7060 | enum { |
| 7061 | WMI_MAX_OFDM_TX_RATE_6M, /* up to 6M OFDM Rate avaliable */ |
| 7062 | WMI_MAX_OFDM_TX_RATE_9M, /* up to 9M OFDM Rate avaliable */ |
| 7063 | WMI_MAX_OFDM_TX_RATE_12M, /* up to 12M OFDM Rate avaliable */ |
| 7064 | WMI_MAX_OFDM_TX_RATE_18M, /* up to 18M OFDM Rate avaliable */ |
| 7065 | WMI_MAX_OFDM_TX_RATE_24M, /* up to 24M OFDM Rate avaliable */ |
| 7066 | WMI_MAX_OFDM_TX_RATE_36M, /* up to 36M OFDM Rate avaliable */ |
| 7067 | WMI_MAX_OFDM_TX_RATE_48M, /* up to 48M OFDM Rate avaliable */ |
| 7068 | WMI_MAX_OFDM_TX_RATE_54M, /* up to 54M OFDM Rate avaliable */ |
| 7069 | WMI_MAX_OFDM_TX_RATE = WMI_MAX_OFDM_TX_RATE_54M, |
| 7070 | }; |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 7071 | |
| 7072 | /* |
| 7073 | * HT max/min tx rate description |
| 7074 | * tx_rate = 0~7 : MCS Rate 0~7 |
| 7075 | * tx_rate=else : invalid. |
| 7076 | */ |
| 7077 | #define WMI_MAX_HT_TX_MCS 0x07 |
| 7078 | |
| 7079 | /* |
| 7080 | * VHT max/min tx rate description |
| 7081 | * tx_rate = 0~9 : MCS Rate 0~9 |
| 7082 | * tx_rate=else : invalid. |
| 7083 | */ |
| 7084 | #define WMI_MAX_VHT_TX_MCS 0x09 |
| 7085 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7086 | #define MAX_SUPPORTED_RATES 128 |
| 7087 | |
| 7088 | typedef struct { |
| 7089 | /** total number of rates */ |
| 7090 | A_UINT32 num_rates; |
| 7091 | /** |
| 7092 | * rates (each 8bit value) packed into a 32 bit word. |
| 7093 | * the rates are filled from least significant byte to most |
| 7094 | * significant byte. |
| 7095 | */ |
| 7096 | A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1]; |
| 7097 | } wmi_rate_set; |
| 7098 | |
| 7099 | /* NOTE: It would bea good idea to represent the Tx MCS |
| 7100 | * info in one word and Rx in another word. This is split |
| 7101 | * into multiple words for convenience |
| 7102 | */ |
| 7103 | typedef struct { |
| 7104 | A_UINT32 tlv_header; |
| 7105 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */ |
| 7106 | A_UINT32 rx_max_rate; /* Max Rx data rate */ |
| 7107 | A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */ |
| 7108 | A_UINT32 tx_max_rate; /* Max Tx data rate */ |
| 7109 | A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7110 | A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7111 | } wmi_vht_rate_set; |
| 7112 | |
| 7113 | /* |
| 7114 | * IMPORTANT: Make sure the bit definitions here are consistent |
| 7115 | * with the ni_flags definitions in wlan_peer.h |
| 7116 | */ |
| 7117 | #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */ |
| 7118 | #define WMI_PEER_QOS 0x00000002 /* QoS enabled */ |
| 7119 | #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */ |
| 7120 | #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */ |
| 7121 | #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */ |
| 7122 | #define WMI_PEER_HT 0x00001000 /* HT enabled */ |
| 7123 | #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */ |
| 7124 | #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */ |
| 7125 | #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */ |
| 7126 | #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */ |
| 7127 | #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */ |
| 7128 | #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */ |
| 7129 | #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */ |
| 7130 | #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */ |
| 7131 | #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */ |
| 7132 | /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */ |
| 7133 | #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */ |
| 7134 | #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */ |
| 7135 | #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */ |
| 7136 | |
| 7137 | /** |
| 7138 | * Peer rate capabilities. |
| 7139 | * |
| 7140 | * This is of interest to the ratecontrol |
| 7141 | * module which resides in the firmware. The bit definitions are |
| 7142 | * consistent with that defined in if_athrate.c. |
| 7143 | * |
| 7144 | * @todo |
| 7145 | * Move this to a common header file later so there is no need to |
| 7146 | * duplicate the definitions or maintain consistency. |
| 7147 | */ |
| 7148 | #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */ |
| 7149 | #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */ |
| 7150 | #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */ |
| 7151 | #define WMI_RC_HT_FLAG 0x08 /* HT */ |
| 7152 | #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ |
| 7153 | #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */ |
| 7154 | #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */ |
| 7155 | #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ |
| 7156 | #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ |
| 7157 | #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ |
| 7158 | #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */ |
| 7159 | #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ |
| 7160 | |
| 7161 | typedef struct { |
| 7162 | A_UINT32 tlv_header; |
| 7163 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */ |
| 7164 | /** peer MAC address */ |
| 7165 | wmi_mac_addr peer_macaddr; |
| 7166 | /** VDEV id */ |
| 7167 | A_UINT32 vdev_id; |
| 7168 | /** assoc = 1 reassoc = 0 */ |
| 7169 | A_UINT32 peer_new_assoc; |
| 7170 | /** peer associd (16 bits) */ |
| 7171 | A_UINT32 peer_associd; |
| 7172 | /** peer station flags: see definition above */ |
| 7173 | A_UINT32 peer_flags; |
| 7174 | /** negotiated capabilities (lower 16 bits)*/ |
| 7175 | A_UINT32 peer_caps; |
| 7176 | /** Listen interval */ |
| 7177 | A_UINT32 peer_listen_intval; |
| 7178 | /** HT capabilties of the peer */ |
| 7179 | A_UINT32 peer_ht_caps; |
| 7180 | /** maximum rx A-MPDU length */ |
| 7181 | A_UINT32 peer_max_mpdu; |
| 7182 | /** mpdu density of the peer in usec(0 to 16) */ |
| 7183 | A_UINT32 peer_mpdu_density; |
| 7184 | /** peer rate capabilties see flags above */ |
| 7185 | A_UINT32 peer_rate_caps; |
| 7186 | /** num spatial streams */ |
| 7187 | A_UINT32 peer_nss; |
| 7188 | /** VHT capabilties of the peer */ |
| 7189 | A_UINT32 peer_vht_caps; |
| 7190 | /** phy mode */ |
| 7191 | A_UINT32 peer_phymode; |
| 7192 | /** HT Operation Element of the peer. Five bytes packed in 2 |
| 7193 | * INT32 array and filled from lsb to msb. |
| 7194 | * Note that the size of array peer_ht_info[] cannotbe changed |
| 7195 | * without breaking WMI Compatibility. */ |
| 7196 | A_UINT32 peer_ht_info[2]; |
| 7197 | /** total number of negotiated legacy rate set. Also the sizeof |
| 7198 | * peer_legacy_rates[] */ |
| 7199 | A_UINT32 num_peer_legacy_rates; |
| 7200 | /** total number of negotiated ht rate set. Also the sizeof |
| 7201 | * peer_ht_rates[] */ |
| 7202 | A_UINT32 num_peer_ht_rates; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 7203 | /* |
| 7204 | * Bitmap providing customized mapping of bandwidths to max Rx NSS |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7205 | * for this peer. |
| 7206 | * This is required since 802.11 standard currently facilitates peer to |
| 7207 | * be able to advertise only a single max Rx NSS value across all |
| 7208 | * bandwidths. |
| 7209 | * Some QCA chipsets might need to be able to advertise a different max |
| 7210 | * Rx NSS value for 160 MHz, than that for 80 MHz and lower. |
| 7211 | * |
| 7212 | * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz |
| 7213 | * bit[30:3]: Reserved |
| 7214 | * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be |
| 7215 | * set to 0 by host |
| 7216 | */ |
| 7217 | A_UINT32 peer_bw_rxnss_override; |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 7218 | /* 802.11ax capabilities */ |
| 7219 | wmi_ppe_threshold peer_ppet; |
| 7220 | /* protocol-defined HE / 11ax capability flags */ |
| 7221 | A_UINT32 peer_he_cap_info; |
| 7222 | A_UINT32 peer_he_ops; /* HE operation contains BSS color */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7223 | /* Following this struc are the TLV's: |
| 7224 | * A_UINT8 peer_legacy_rates[]; |
| 7225 | * A_UINT8 peer_ht_rates[]; |
| 7226 | * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer |
| 7227 | */ |
| 7228 | } wmi_peer_assoc_complete_cmd_fixed_param; |
| 7229 | |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7230 | /* WDS Entry Flags */ |
| 7231 | #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */ |
| 7232 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7233 | typedef struct { |
| 7234 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */ |
| 7235 | /** peer MAC address */ |
| 7236 | wmi_mac_addr peer_macaddr; |
| 7237 | /** wds MAC addr */ |
| 7238 | wmi_mac_addr wds_macaddr; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7239 | /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */ |
| 7240 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7241 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7242 | } wmi_peer_add_wds_entry_cmd_fixed_param; |
| 7243 | |
| 7244 | typedef struct { |
| 7245 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */ |
| 7246 | /** wds MAC addr */ |
| 7247 | wmi_mac_addr wds_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7248 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7249 | } wmi_peer_remove_wds_entry_cmd_fixed_param; |
| 7250 | |
| 7251 | typedef struct { |
| 7252 | /** peer MAC address */ |
| 7253 | wmi_mac_addr peer_macaddr; |
| 7254 | } wmi_peer_q_empty_callback_event; |
| 7255 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 7256 | /* |
| 7257 | * Command to update an already existing WDS entry. Different address setting |
| 7258 | * combinations are possible. |
| 7259 | * |
| 7260 | * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated. |
| 7261 | * Valid wds and null peer -> Associated WDS entry flags will be updated. |
| 7262 | * Null wds and Valid peer-> Flags will be updated for all WDS entries |
| 7263 | * behind the peer. |
| 7264 | * Null wds and peer -> Flags will be updated for all WDS entries. |
| 7265 | */ |
| 7266 | typedef struct { |
| 7267 | /* |
| 7268 | * TLV tag and len; tag equals |
| 7269 | * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param |
| 7270 | */ |
| 7271 | A_UINT32 tlv_header; |
| 7272 | /** peer MAC address */ |
| 7273 | wmi_mac_addr peer_macaddr; |
| 7274 | /** wds MAC addr */ |
| 7275 | wmi_mac_addr wds_macaddr; |
| 7276 | /* Flags associated with WDS entry */ |
| 7277 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7278 | A_UINT32 vdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 7279 | } wmi_peer_update_wds_entry_cmd_fixed_param; |
| 7280 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7281 | /** |
| 7282 | * Channel info WMI event |
| 7283 | */ |
| 7284 | typedef struct { |
| 7285 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */ |
| 7286 | /** Error code */ |
| 7287 | A_UINT32 err_code; |
| 7288 | /** Channel freq */ |
| 7289 | A_UINT32 freq; |
| 7290 | /** Read flags */ |
| 7291 | A_UINT32 cmd_flags; |
| 7292 | /** Noise Floor value */ |
| 7293 | A_UINT32 noise_floor; |
| 7294 | /** rx clear count */ |
| 7295 | A_UINT32 rx_clear_count; |
| 7296 | /** cycle count */ |
| 7297 | A_UINT32 cycle_count; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7298 | /** channel tx power per range in 0.5dBm steps */ |
| 7299 | A_UINT32 chan_tx_pwr_range; |
| 7300 | /** channel tx power per throughput */ |
| 7301 | A_UINT32 chan_tx_pwr_tp; |
| 7302 | /** rx frame count (cumulative) */ |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 7303 | A_UINT32 rx_frame_count; |
| 7304 | /** BSS rx cycle count */ |
| 7305 | A_UINT32 my_bss_rx_cycle_count; |
| 7306 | /** b-mode data rx time (units are microseconds) */ |
| 7307 | A_UINT32 rx_11b_mode_data_duration; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7308 | } wmi_chan_info_event_fixed_param; |
| 7309 | |
| 7310 | /** |
| 7311 | * Non wlan interference event |
| 7312 | */ |
| 7313 | typedef struct { |
| 7314 | A_UINT32 tlv_header; |
| 7315 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */ |
| 7316 | A_UINT32 channel; /* either number or freq in mhz */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7317 | } wlan_dcs_cw_int; |
| 7318 | #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7319 | |
| 7320 | /** |
| 7321 | * wlan_dcs_im_tgt_stats |
| 7322 | * |
| 7323 | */ |
| 7324 | typedef struct _wlan_dcs_im_tgt_stats { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7325 | /** TLV tag and len; tag equals |
| 7326 | * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t |
| 7327 | */ |
| 7328 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7329 | /** current running TSF from the TSF-1 */ |
| 7330 | A_UINT32 reg_tsf32; |
| 7331 | |
| 7332 | /** Known last frame rssi, in case of multiple stations, if |
| 7333 | * and at different ranges, this would not gaurantee that |
| 7334 | * this is the least rssi. |
| 7335 | */ |
| 7336 | A_UINT32 last_ack_rssi; |
| 7337 | |
| 7338 | /** Sum of all the failed durations in the last one second interval. |
| 7339 | */ |
| 7340 | A_UINT32 tx_waste_time; |
| 7341 | /** count how many times the hal_rxerr_phy is marked, in this |
| 7342 | * time period |
| 7343 | */ |
| 7344 | A_UINT32 rx_time; |
| 7345 | A_UINT32 phyerr_cnt; |
| 7346 | |
| 7347 | /** |
| 7348 | * WLAN IM stats from target to host |
| 7349 | * |
| 7350 | * Below statistics are sent from target to host periodically. |
| 7351 | * These are collected at target as long as target is running |
| 7352 | * and target chip is not in sleep. |
| 7353 | * |
| 7354 | */ |
| 7355 | |
| 7356 | /** listen time from ANI */ |
| 7357 | A_INT32 listen_time; |
| 7358 | |
| 7359 | /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */ |
| 7360 | A_UINT32 reg_tx_frame_cnt; |
| 7361 | |
| 7362 | /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */ |
| 7363 | A_UINT32 reg_rx_frame_cnt; |
| 7364 | |
| 7365 | /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */ |
| 7366 | A_UINT32 reg_rxclr_cnt; |
| 7367 | |
| 7368 | /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */ |
| 7369 | A_UINT32 reg_cycle_cnt; /* delta cycle count */ |
| 7370 | |
| 7371 | /** extenstion channel rx clear count */ |
| 7372 | A_UINT32 reg_rxclr_ext_cnt; |
| 7373 | |
| 7374 | /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */ |
| 7375 | A_UINT32 reg_ofdm_phyerr_cnt; |
| 7376 | |
| 7377 | /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */ |
| 7378 | A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */ |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 7379 | /** Channel noise floor (units are dBm) */ |
| 7380 | A_INT32 chan_nf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7381 | |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 7382 | /** BSS rx cycle count */ |
| 7383 | A_UINT32 my_bss_rx_cycle_count; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7384 | } wlan_dcs_im_tgt_stats_t; |
| 7385 | |
| 7386 | /** |
| 7387 | * wmi_dcs_interference_event_t |
| 7388 | * |
| 7389 | * Right now this is event and stats together. Partly this is |
| 7390 | * because cw interference is handled in target now. This |
| 7391 | * can be done at host itself, if we can carry the NF alone |
| 7392 | * as a stats event. In future this would be done and this |
| 7393 | * event would carry only stats. |
| 7394 | */ |
| 7395 | typedef struct { |
| 7396 | A_UINT32 tlv_header; |
| 7397 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */ |
| 7398 | /** |
| 7399 | * Type of the event present, either the cw interference event, or the wlan_im stats |
| 7400 | */ |
| 7401 | A_UINT32 interference_type; /* type of interference, wlan or cw */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 7402 | /** pdev_id for identifying the MAC |
| 7403 | * See macros starting with WMI_PDEV_ID_ for values. |
| 7404 | */ |
| 7405 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7406 | /* |
| 7407 | * Following this struct are these TLVs. Note that they are both array of structures |
| 7408 | * but can have at most one element. Which TLV is empty or has one element depends |
| 7409 | * on the field interference_type. This is to emulate an union with cw_int and wlan_stat |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7410 | * elements (not arrays). union { wlan_dcs_cw_int cw_int; |
| 7411 | * wlan_dcs_im_tgt_stats_t wlan_stat; } |
| 7412 | * int_event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7413 | * |
| 7414 | * //cw_interference event |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7415 | * wlan_dcs_cw_int cw_int[]; this element |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7416 | * // wlan im interfernce stats |
| 7417 | * wlan_dcs_im_tgt_stats_t wlan_stat[]; |
| 7418 | */ |
| 7419 | } wmi_dcs_interference_event_fixed_param; |
| 7420 | |
| 7421 | enum wmi_peer_mcast_group_action { |
| 7422 | wmi_peer_mcast_group_action_add = 0, |
| 7423 | wmi_peer_mcast_group_action_del = 1 |
| 7424 | }; |
| 7425 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1 |
| 7426 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0 |
| 7427 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2 |
| 7428 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7429 | /* flag to exclude an ip while filtering.set to exclude */ |
| 7430 | #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 |
| 7431 | #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2 |
| 7432 | /* flag to say ipv4/ipv6. Will be set for ipv6 */ |
| 7433 | #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 |
| 7434 | #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3 |
| 7435 | /* delete all mcast table entries. */ |
| 7436 | #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 |
| 7437 | #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4 |
| 7438 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7439 | /* multicast group membership commands */ |
| 7440 | /* TODO: Converting this will be tricky since it uses an union. |
| 7441 | Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */ |
| 7442 | typedef struct { |
| 7443 | A_UINT32 tlv_header; |
| 7444 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */ |
| 7445 | A_UINT32 flags; |
| 7446 | wmi_mac_addr ucast_mac_addr; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7447 | /* |
| 7448 | * for ipv4, bytes (12-15) should contain ip address and |
| 7449 | * other lower bytes 0. ipv6 should have all bytes valid |
| 7450 | */ |
| 7451 | A_UINT8 mcast_ip_addr[16]; /* in network byte order */ |
| 7452 | /* |
| 7453 | * for ipv6, all 16 bytes has to be valid; |
| 7454 | * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s |
| 7455 | */ |
| 7456 | A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */ |
| 7457 | /* number of address filters - irrespective of ipv4/ipv6 addresses */ |
| 7458 | A_UINT32 num_filter_addr; |
| 7459 | /* |
| 7460 | * this array should contain the src IPs that are to be filtered |
| 7461 | * during find. The array should be packed. If there are 2 ipv4 |
| 7462 | * addresses, there should be 8 bytes and rest all 0s |
| 7463 | */ |
| 7464 | A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */ |
| 7465 | A_UINT8 vdev_id; /* vdev of this mcast group */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7466 | } wmi_peer_mcast_group_cmd_fixed_param; |
| 7467 | |
| 7468 | /** Offload Scan and Roaming related commands */ |
| 7469 | /** The FW performs 2 different kinds of offload scans independent |
| 7470 | * of host. One is Roam scan which is primarily performed on a |
| 7471 | * station VDEV after association to look for a better AP that |
| 7472 | * the station VDEV can roam to. The second scan is connect scan |
| 7473 | * which is mainly performed when the station is not associated |
| 7474 | * and to look for a matching AP profile from a list of |
| 7475 | * configured profiles. */ |
| 7476 | |
| 7477 | /** |
| 7478 | * WMI_ROAM_SCAN_MODE: Set Roam Scan mode |
| 7479 | * the roam scan mode is one of the periodic, rssi change, both, none. |
| 7480 | * None : Disable Roam scan. No Roam scan at all. |
| 7481 | * Periodic : Scan periodically with a configurable period. |
| 7482 | * Rssi change : Scan when ever rssi to current AP changes by the threshold value |
| 7483 | * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command. |
| 7484 | * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount) |
| 7485 | * |
| 7486 | */ |
| 7487 | typedef struct { |
| 7488 | A_UINT32 tlv_header; |
| 7489 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */ |
| 7490 | A_UINT32 roam_scan_mode; |
| 7491 | A_UINT32 vdev_id; |
| 7492 | } wmi_roam_scan_mode_fixed_param; |
| 7493 | |
| 7494 | #define WMI_ROAM_SCAN_MODE_NONE 0x0 |
| 7495 | #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1 |
| 7496 | #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2 |
| 7497 | #define WMI_ROAM_SCAN_MODE_BOTH 0x3 |
| 7498 | /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */ |
| 7499 | #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4 |
| 7500 | |
| 7501 | typedef struct { |
| 7502 | A_UINT32 tlv_header; |
| 7503 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */ |
| 7504 | A_UINT32 vdev_id; |
| 7505 | A_UINT32 command_arg; |
| 7506 | } wmi_roam_scan_cmd_fixed_param; |
| 7507 | |
| 7508 | #define WMI_ROAM_SCAN_STOP_CMD 0x1 |
| 7509 | |
| 7510 | /** |
| 7511 | * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold |
| 7512 | * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans. |
| 7513 | * Applicable when WMI_ROAM_SCAN_MODE is not set to none. |
| 7514 | */ |
| 7515 | typedef struct { |
| 7516 | A_UINT32 tlv_header; |
| 7517 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */ |
| 7518 | /** unique id identifying the VDEV, generated by the caller */ |
| 7519 | A_UINT32 vdev_id; |
| 7520 | /** roam scan rssi threshold */ |
| 7521 | A_UINT32 roam_scan_rssi_thresh; |
| 7522 | /** When using Hw generated beacon RSSI interrupts */ |
| 7523 | A_UINT32 roam_rssi_thresh_diff; |
| 7524 | /** 5G scan max count */ |
| 7525 | A_UINT32 hirssi_scan_max_count; |
| 7526 | /** 5G scan rssi change threshold value */ |
| 7527 | A_UINT32 hirssi_scan_delta; |
| 7528 | /** 5G scan upper bound */ |
| 7529 | A_UINT32 hirssi_upper_bound; |
| 7530 | /* The TLVs will follow. |
| 7531 | * wmi_roam_scan_extended_threshold_param extended_param; |
| 7532 | * wmi_roam_earlystop_rssi_thres_param earlystop_param; |
Govind Singh | ce8fd91 | 2016-01-21 10:24:19 +0530 | [diff] [blame] | 7533 | * wmi_roam_dense_thres_param dense_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7534 | */ |
| 7535 | } wmi_roam_scan_rssi_threshold_fixed_param; |
| 7536 | |
| 7537 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0 |
| 7538 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1 |
| 7539 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2 |
| 7540 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3 |
| 7541 | |
| 7542 | typedef struct { |
| 7543 | /** TLV tag and len; tag equals |
| 7544 | *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */ |
| 7545 | A_UINT32 tlv_header; |
| 7546 | A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */ |
| 7547 | A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */ |
| 7548 | A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 7549 | A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */ |
| 7550 | A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 7551 | A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */ |
| 7552 | A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */ |
| 7553 | A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */ |
| 7554 | /** |
| 7555 | * RSSI below which roam is kicked in by background scan |
| 7556 | * although rssi is still good |
| 7557 | */ |
| 7558 | A_UINT32 good_rssi_threshold; |
| 7559 | } wmi_roam_scan_extended_threshold_param; |
| 7560 | |
| 7561 | |
| 7562 | /** |
| 7563 | * WMI_ROAM_SCAN_PERIOD: period for roam scan. |
| 7564 | * Applicable when the scan mode is Periodic or both. |
| 7565 | */ |
| 7566 | typedef struct { |
| 7567 | A_UINT32 tlv_header; |
| 7568 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */ |
| 7569 | /** unique id identifying the VDEV, generated by the caller */ |
| 7570 | A_UINT32 vdev_id; |
| 7571 | /** roam scan period value */ |
| 7572 | A_UINT32 roam_scan_period; |
| 7573 | /** Aging for Roam scans */ |
| 7574 | A_UINT32 roam_scan_age; |
| 7575 | } wmi_roam_scan_period_fixed_param; |
| 7576 | |
| 7577 | /** |
| 7578 | * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan. |
| 7579 | * Rssi change threshold used when mode is Rssi change (or) Both. |
| 7580 | * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter. |
| 7581 | * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD |
| 7582 | */ |
| 7583 | typedef struct { |
| 7584 | A_UINT32 tlv_header; |
| 7585 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */ |
| 7586 | /** unique id identifying the VDEV, generated by the caller */ |
| 7587 | A_UINT32 vdev_id; |
| 7588 | /** roam scan rssi change threshold value */ |
| 7589 | A_UINT32 roam_scan_rssi_change_thresh; |
| 7590 | /** When using Hw generated beacon RSSI interrupts */ |
| 7591 | A_UINT32 bcn_rssi_weight; |
| 7592 | /** Minimum delay between two 5G scans */ |
| 7593 | A_UINT32 hirssi_delay_btw_scans; |
| 7594 | } wmi_roam_scan_rssi_change_threshold_fixed_param; |
| 7595 | |
| 7596 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1 |
| 7597 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2 |
| 7598 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3 |
| 7599 | /** |
| 7600 | * TLV for roaming channel list |
| 7601 | */ |
| 7602 | typedef struct { |
| 7603 | A_UINT32 tlv_header; |
| 7604 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */ |
| 7605 | /** unique id identifying the VDEV, generated by the caller */ |
| 7606 | A_UINT32 vdev_id; |
| 7607 | /** WMI_CHAN_LIST_TAG */ |
| 7608 | A_UINT32 chan_list_type; |
| 7609 | /** # if channels to scan */ |
| 7610 | A_UINT32 num_chan; |
| 7611 | /** |
| 7612 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 7613 | * structure. The TLV's are: |
| 7614 | * A_UINT32 channel_list[]; |
| 7615 | **/ |
| 7616 | } wmi_roam_chan_list_fixed_param; |
| 7617 | |
| 7618 | /** Authentication modes */ |
| 7619 | enum { |
| 7620 | WMI_AUTH_NONE, /* no upper level auth */ |
| 7621 | WMI_AUTH_OPEN, /* open */ |
| 7622 | WMI_AUTH_SHARED, /* shared-key */ |
| 7623 | WMI_AUTH_8021X, /* 802.1x */ |
| 7624 | WMI_AUTH_AUTO, /* Auto */ |
| 7625 | WMI_AUTH_WPA, /* WPA */ |
| 7626 | WMI_AUTH_RSNA, /* WPA2/RSNA */ |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 7627 | WMI_AUTH_CCKM, /* CCKM */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7628 | WMI_AUTH_WAPI, /* WAPI */ |
| 7629 | WMI_AUTH_AUTO_PSK, |
| 7630 | WMI_AUTH_WPA_PSK, |
| 7631 | WMI_AUTH_RSNA_PSK, |
| 7632 | WMI_AUTH_WAPI_PSK, |
| 7633 | WMI_AUTH_FT_RSNA, /* 11r FT */ |
| 7634 | WMI_AUTH_FT_RSNA_PSK, |
| 7635 | WMI_AUTH_RSNA_PSK_SHA256, |
| 7636 | WMI_AUTH_RSNA_8021X_SHA256, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 7637 | WMI_AUTH_CCKM_WPA, |
| 7638 | WMI_AUTH_CCKM_RSNA, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7639 | }; |
| 7640 | |
| 7641 | typedef struct { |
| 7642 | /** authentication mode (defined above) */ |
| 7643 | A_UINT32 rsn_authmode; |
| 7644 | /** unicast cipher set */ |
| 7645 | A_UINT32 rsn_ucastcipherset; |
| 7646 | /** mcast/group cipher set */ |
| 7647 | A_UINT32 rsn_mcastcipherset; |
| 7648 | /** mcast/group management frames cipher set */ |
| 7649 | A_UINT32 rsn_mcastmgmtcipherset; |
| 7650 | } wmi_rsn_params; |
| 7651 | |
| 7652 | /** looking for a wps enabled AP */ |
| 7653 | #define WMI_AP_PROFILE_FLAG_WPS 0x1 |
| 7654 | /** looking for a secure AP */ |
| 7655 | #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2 |
| 7656 | /** looking for a PMF enabled AP */ |
| 7657 | #define WMI_AP_PROFILE_FLAG_PMF 0x4 |
| 7658 | |
| 7659 | /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 7660 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear. |
| 7661 | * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 7662 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be set . |
| 7663 | */ |
| 7664 | |
| 7665 | typedef struct { |
| 7666 | A_UINT32 tlv_header; |
| 7667 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */ |
| 7668 | /** flags as defined above */ |
| 7669 | A_UINT32 flags; |
| 7670 | /** |
| 7671 | * rssi thresold value: the value of the the candidate AP should |
| 7672 | * higher by this threshold than the rssi of the currrently associated AP. |
| 7673 | */ |
| 7674 | A_UINT32 rssi_threshold; |
| 7675 | /** |
| 7676 | * ssid vlaue to be matched. |
| 7677 | */ |
| 7678 | wmi_ssid ssid; |
| 7679 | |
| 7680 | /** |
| 7681 | * security params to be matched. |
| 7682 | */ |
| 7683 | /** authentication mode (defined above) */ |
| 7684 | A_UINT32 rsn_authmode; |
| 7685 | /** unicast cipher set */ |
| 7686 | A_UINT32 rsn_ucastcipherset; |
| 7687 | /** mcast/group cipher set */ |
| 7688 | A_UINT32 rsn_mcastcipherset; |
| 7689 | /** mcast/group management frames cipher set */ |
| 7690 | A_UINT32 rsn_mcastmgmtcipherset; |
| 7691 | } wmi_ap_profile; |
| 7692 | |
| 7693 | /** Support early stop roaming scanning when finding a strong candidate AP |
| 7694 | * A 'strong' candidate is |
| 7695 | * 1) Is eligible candidate |
| 7696 | * (all conditions are met in existing candidate selection). |
| 7697 | * 2) Its rssi is better than earlystop threshold. |
| 7698 | * Earlystop threshold will be relaxed as each channel is scanned. |
| 7699 | */ |
| 7700 | typedef struct { |
| 7701 | A_UINT32 tlv_header; |
| 7702 | /* Minimum RSSI threshold value for early stop, unit is dB above NF. */ |
| 7703 | A_UINT32 roam_earlystop_thres_min; |
| 7704 | /* Maminum RSSI threshold value for early stop, unit is dB above NF. */ |
| 7705 | A_UINT32 roam_earlystop_thres_max; |
| 7706 | } wmi_roam_earlystop_rssi_thres_param; |
| 7707 | |
Govind Singh | ce8fd91 | 2016-01-21 10:24:19 +0530 | [diff] [blame] | 7708 | typedef struct { |
| 7709 | /* TLV tag and len; |
| 7710 | * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param |
| 7711 | */ |
| 7712 | A_UINT32 tlv_header; |
| 7713 | /* rssi threshold offset under trffic and dense env */ |
| 7714 | A_UINT32 roam_dense_rssi_thres_offset; |
| 7715 | /* minimum number of APs to determine dense env */ |
| 7716 | A_UINT32 roam_dense_min_aps; |
| 7717 | /* initial dense status detected by host |
| 7718 | * at the time of initial connection */ |
| 7719 | A_UINT32 roam_dense_status; |
| 7720 | /* traffic threshold to enable aggressive roaming in dense env; |
| 7721 | * units are percent of medium occupancy, 0 - 100 |
| 7722 | */ |
| 7723 | A_UINT32 roam_dense_traffic_thres; |
| 7724 | } wmi_roam_dense_thres_param; |
| 7725 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7726 | /** Beacon filter wmi command info */ |
| 7727 | |
| 7728 | #define BCN_FLT_MAX_SUPPORTED_IES 256 |
| 7729 | #define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32 |
| 7730 | |
| 7731 | typedef struct bss_bcn_stats { |
| 7732 | A_UINT32 vdev_id; |
| 7733 | A_UINT32 bss_bcnsdropped; |
| 7734 | A_UINT32 bss_bcnsdelivered; |
| 7735 | } wmi_bss_bcn_stats_t; |
| 7736 | |
| 7737 | typedef struct bcn_filter_stats { |
| 7738 | A_UINT32 bcns_dropped; |
| 7739 | A_UINT32 bcns_delivered; |
| 7740 | A_UINT32 activefilters; |
| 7741 | wmi_bss_bcn_stats_t bss_stats; |
| 7742 | } wmi_bcnfilter_stats_t; |
| 7743 | |
| 7744 | typedef struct wmi_add_bcn_filter_cmd { |
| 7745 | A_UINT32 tlv_header; |
| 7746 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */ |
| 7747 | A_UINT32 vdev_id; |
| 7748 | /* |
| 7749 | * Following this structure is the TLV: |
| 7750 | * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST]; |
| 7751 | */ |
| 7752 | } wmi_add_bcn_filter_cmd_fixed_param; |
| 7753 | |
| 7754 | typedef struct wmi_rmv_bcn_filter_cmd { |
| 7755 | A_UINT32 tlv_header; |
| 7756 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */ |
| 7757 | A_UINT32 vdev_id; |
| 7758 | } wmi_rmv_bcn_filter_cmd_fixed_param; |
| 7759 | |
| 7760 | #define WMI_BCN_SEND_DTIM_ZERO 1 |
| 7761 | #define WMI_BCN_SEND_DTIM_BITCTL_SET 2 |
| 7762 | typedef struct wmi_bcn_send_from_host { |
| 7763 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */ |
| 7764 | A_UINT32 vdev_id; |
| 7765 | A_UINT32 data_len; |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 7766 | union { |
| 7767 | A_UINT32 frag_ptr; /* Physical address of the frame */ |
| 7768 | A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */ |
| 7769 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7770 | A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */ |
| 7771 | A_UINT32 dtim_flag; /* to control CABQ traffic */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7772 | A_UINT32 bcn_antenna; /* Antenna for beacon transmission */ |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 7773 | A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7774 | } wmi_bcn_send_from_host_cmd_fixed_param; |
| 7775 | |
| 7776 | /* cmd to support bcn snd for all vaps at once */ |
| 7777 | typedef struct wmi_pdev_send_bcn { |
| 7778 | A_UINT32 num_vdevs; |
| 7779 | wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1]; |
| 7780 | } wmi_pdev_send_bcn_cmd_t; |
| 7781 | |
| 7782 | /* |
| 7783 | * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming. |
| 7784 | */ |
| 7785 | typedef struct { |
| 7786 | A_UINT32 tlv_header; |
| 7787 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */ |
| 7788 | /** id of AP criteria */ |
| 7789 | A_UINT32 id; |
| 7790 | |
| 7791 | /** unique id identifying the VDEV, generated by the caller */ |
| 7792 | A_UINT32 vdev_id; |
| 7793 | |
| 7794 | /* |
| 7795 | * Following this structure is the TLV: |
| 7796 | * wmi_ap_profile ap_profile; //AP profile info |
| 7797 | */ |
| 7798 | } wmi_roam_ap_profile_fixed_param; |
| 7799 | |
| 7800 | /** |
| 7801 | * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile. |
| 7802 | */ |
| 7803 | typedef struct { |
| 7804 | /** id of AP criteria */ |
| 7805 | A_UINT32 id; |
| 7806 | |
| 7807 | /** unique id identifying the VDEV, generated by the caller */ |
| 7808 | A_UINT32 vdev_id; |
| 7809 | |
| 7810 | /** AP profile info */ |
| 7811 | wmi_ap_profile ap_profile; |
| 7812 | |
| 7813 | } wmi_ofl_scan_add_ap_profile; |
| 7814 | |
| 7815 | /** |
| 7816 | * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile. |
| 7817 | */ |
| 7818 | typedef struct { |
| 7819 | /** id of AP criteria */ |
| 7820 | A_UINT32 id; |
| 7821 | /** unique id identifying the VDEV, generated by the caller */ |
| 7822 | A_UINT32 vdev_id; |
| 7823 | } wmi_ofl_scan_remove_ap_profile; |
| 7824 | |
| 7825 | /** |
| 7826 | * WMI_OFL_SCAN_PERIOD: period in msec for offload scan. |
| 7827 | * 0 will disable ofload scan and a very low value will perform a continous |
| 7828 | * scan. |
| 7829 | */ |
| 7830 | typedef struct { |
| 7831 | /** offload scan period value, used for scans used when not connected */ |
| 7832 | A_UINT32 ofl_scan_period; |
| 7833 | } wmi_ofl_scan_period; |
| 7834 | |
| 7835 | /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */ |
| 7836 | #define ROAM_OFFLOAD_PMK_BYTES (32) |
| 7837 | #define ROAM_OFFLOAD_PSK_MSK_BYTES (32) |
| 7838 | #define ROAM_OFFLOAD_KRK_BYTES (16) |
| 7839 | #define ROAM_OFFLOAD_BTK_BYTES (32) |
| 7840 | #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48) |
| 7841 | #define ROAM_OFFLOAD_NUM_MCS_SET (16) |
| 7842 | |
| 7843 | /* This TLV will be filled only in case roam offload |
| 7844 | * for wpa2-psk/okc/ese/11r is enabled */ |
| 7845 | typedef struct { |
| 7846 | A_UINT32 tlv_header; |
| 7847 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */ |
| 7848 | A_UINT32 rssi_cat_gap; /* gap for every category bucket */ |
| 7849 | A_UINT32 prefer_5g; /* prefer select 5G candidate */ |
| 7850 | A_UINT32 select_5g_margin; |
| 7851 | A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */ |
| 7852 | A_UINT32 capability; |
| 7853 | A_UINT32 ht_caps_info; |
| 7854 | A_UINT32 ampdu_param; |
| 7855 | A_UINT32 ht_ext_cap; |
| 7856 | A_UINT32 ht_txbf; |
| 7857 | A_UINT32 asel_cap; |
| 7858 | A_UINT32 qos_enabled; |
| 7859 | A_UINT32 qos_caps; |
| 7860 | A_UINT32 wmm_caps; |
| 7861 | A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned, |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7862 | * we don't declare it as |
| 7863 | * tlv array */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7864 | } wmi_roam_offload_tlv_param; |
| 7865 | |
| 7866 | /* flags for 11i offload */ |
| 7867 | #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */ |
| 7868 | /* from bit 1 to bit 31 are reserved */ |
| 7869 | |
| 7870 | #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \ |
| 7871 | (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7872 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7873 | |
| 7874 | #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \ |
| 7875 | (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7876 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7877 | |
| 7878 | #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \ |
| 7879 | ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED)) |
| 7880 | |
| 7881 | /* This TLV will be filled only in case of wpa-psk/wpa2-psk */ |
| 7882 | typedef struct { |
| 7883 | A_UINT32 tlv_header; |
| 7884 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */ |
| 7885 | A_UINT32 flags; |
| 7886 | /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */ |
| 7887 | A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7888 | A_UINT32 pmk_len; |
| 7889 | /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/ |
| 7890 | } wmi_roam_11i_offload_tlv_param; |
| 7891 | |
| 7892 | /* This TLV will be filled only in case of 11R*/ |
| 7893 | typedef struct { |
| 7894 | A_UINT32 tlv_header; |
| 7895 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */ |
| 7896 | A_UINT32 mdie_present; |
| 7897 | A_UINT32 mdid; |
| 7898 | A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2]; |
| 7899 | A_UINT32 r0kh_id_len; |
| 7900 | A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES >> 2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7901 | A_UINT32 psk_msk_len; |
| 7902 | /**length of psk_msk*/ |
| 7903 | } wmi_roam_11r_offload_tlv_param; |
| 7904 | |
| 7905 | /* This TLV will be filled only in case of ESE */ |
| 7906 | typedef struct { |
| 7907 | A_UINT32 tlv_header; |
| 7908 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */ |
| 7909 | A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7910 | A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7911 | } wmi_roam_ese_offload_tlv_param; |
| 7912 | |
| 7913 | /** WMI_ROAM_EVENT: roam event triggering the host roam logic. |
| 7914 | * generated when ever a better AP is found in the recent roam scan (or) |
| 7915 | * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received |
| 7916 | * from the current AP. |
| 7917 | */ |
| 7918 | typedef struct { |
| 7919 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */ |
| 7920 | /** unique id identifying the VDEV, generated by the caller */ |
| 7921 | A_UINT32 vdev_id; |
| 7922 | /** reason for roam event */ |
| 7923 | A_UINT32 reason; |
| 7924 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/ |
| 7925 | A_UINT32 rssi; |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7926 | /** roam notification */ |
| 7927 | A_UINT32 notif; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7928 | |
| 7929 | } wmi_roam_event_fixed_param; |
| 7930 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7931 | /* roam_reason: bits 0-3 */ |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7932 | |
| 7933 | /** invalid reason. Do not interpret reason field */ |
| 7934 | #define WMI_ROAM_REASON_INVALID 0x0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7935 | #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */ |
| 7936 | #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */ |
| 7937 | #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */ |
| 7938 | #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */ |
| 7939 | #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7940 | SSID and Security profile in |
| 7941 | WMI_ROAM_AP_PROFILE, found during scan |
| 7942 | triggered upon FINAL_BMISS **/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7943 | #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */ |
Govind Singh | d0c80a3 | 2016-02-01 17:57:48 +0530 | [diff] [blame] | 7944 | |
| 7945 | /* |
| 7946 | * WMI_ROAM_REASON_INVOKE_ROAM_FAIL: |
| 7947 | * Result code of WMI_ROAM_INVOKE_CMDID. |
| 7948 | * Any roaming failure before reassociation will be indicated to host |
| 7949 | * with this reason. |
| 7950 | * Any roaming failure after reassociation will be indicated to host with |
| 7951 | * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not. |
| 7952 | */ |
| 7953 | #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6 |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7954 | /* reserved up through 0xF */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7955 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7956 | /* subnet status: bits 4-5 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7957 | typedef enum { |
| 7958 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0, |
| 7959 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED, |
| 7960 | WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED, |
| 7961 | } wmi_roam_subnet_change_status; |
| 7962 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7963 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30 |
| 7964 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4 |
| 7965 | |
| 7966 | #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \ |
| 7967 | do { \ |
| 7968 | (roam_reason) |= \ |
| 7969 | (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \ |
| 7970 | WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \ |
| 7971 | } while (0) |
| 7972 | |
| 7973 | #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \ |
| 7974 | (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \ |
| 7975 | WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) |
| 7976 | |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7977 | /* roaming notification */ |
| 7978 | /** invalid notification. Do not interpret notif field */ |
| 7979 | #define WMI_ROAM_NOTIF_INVALID 0x0 |
| 7980 | /** indicate that roaming is started. sent only in non WOW state */ |
| 7981 | #define WMI_ROAM_NOTIF_ROAM_START 0x1 |
| 7982 | /** indicate that roaming is aborted. sent only in non WOW state */ |
| 7983 | #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 |
| 7984 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7985 | /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc) |
| 7986 | * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations |
| 7987 | */ |
| 7988 | typedef struct { |
| 7989 | A_UINT32 tlv_header; |
| 7990 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */ |
| 7991 | A_UINT32 vdev_id; |
| 7992 | /**unique id identifying the VDEV, generated by the caller*/ |
| 7993 | A_UINT32 num_ric_request; |
| 7994 | /**number of ric request ie send to firmware.(max value is 2 now)*/ |
| 7995 | A_UINT32 is_add_ric; |
| 7996 | /**support add ric or delete ric*/ |
| 7997 | } wmi_ric_request_fixed_param; |
| 7998 | |
| 7999 | /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec |
| 8000 | * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming |
| 8001 | */ |
| 8002 | typedef struct { |
| 8003 | A_UINT32 tlv_header; |
| 8004 | A_UINT32 ts_info; /** bits value of TS Info field.*/ |
| 8005 | A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/ |
| 8006 | A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/ |
| 8007 | A_UINT32 min_service_interval; /**The Minimum Service Interval field*/ |
| 8008 | A_UINT32 max_service_interval; /**The Maximum Service Interval field*/ |
| 8009 | A_UINT32 inactivity_interval; /**The Inactivity Interval field*/ |
| 8010 | A_UINT32 suspension_interval; /**The Suspension Interval field*/ |
| 8011 | A_UINT32 svc_start_time; /**The Service Start Time field*/ |
| 8012 | A_UINT32 min_data_rate; /**The Minimum Data Rate field*/ |
| 8013 | A_UINT32 mean_data_rate; /**The Mean Data Rate field*/ |
| 8014 | A_UINT32 peak_data_rate; /**The Peak Data Rate field*/ |
| 8015 | A_UINT32 max_burst_size; /**The Burst Size field*/ |
| 8016 | A_UINT32 delay_bound; /**The Delay Bound field*/ |
| 8017 | A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/ |
| 8018 | A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/ |
| 8019 | A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/ |
| 8020 | } wmi_ric_tspec; |
| 8021 | |
| 8022 | /* flags for roam_invoke_cmd */ |
| 8023 | /* add this channel into roam cache channel list after this command is finished */ |
| 8024 | #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0 |
Govind Singh | d0c80a3 | 2016-02-01 17:57:48 +0530 | [diff] [blame] | 8025 | /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */ |
| 8026 | #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1 |
Nitesh Shah | 3a94306 | 2016-06-29 20:28:43 +0530 | [diff] [blame] | 8027 | /* during host-invoked roaming, don't send null data frame to AP */ |
| 8028 | #define WMI_ROAM_INVOKE_FLAG_NO_NULL_FRAME_TO_AP 2 |
| 8029 | /* from bit 3 to bit 31 are reserved */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8030 | |
| 8031 | #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 8032 | (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 8033 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8034 | |
| 8035 | #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 8036 | (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 8037 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8038 | |
| 8039 | #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 8040 | ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8041 | |
| 8042 | |
| 8043 | #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */ |
| 8044 | #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */ |
| 8045 | #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */ |
| 8046 | |
| 8047 | #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */ |
| 8048 | #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */ |
| 8049 | |
| 8050 | /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully |
| 8051 | * |
| 8052 | * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed. |
| 8053 | * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed |
| 8054 | * |
| 8055 | * This command can be used to add specific channel into roam cached channel list by following |
| 8056 | * <roam_scan_ch_mode> = 0 |
| 8057 | * <roam_ap_sel_mode> = 0 |
| 8058 | * <roam_delay> = 0 |
| 8059 | * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE |
| 8060 | * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given) |
| 8061 | * <channel_no> = channel list to be added |
| 8062 | */ |
| 8063 | typedef struct { |
| 8064 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */ |
| 8065 | A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */ |
| 8066 | A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */ |
| 8067 | A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */ |
| 8068 | A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */ |
| 8069 | A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */ |
| 8070 | A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */ |
| 8071 | A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */ |
| 8072 | /** |
| 8073 | * TLV (tag length value ) parameters follows roam_invoke_req |
| 8074 | * The TLV's are: |
| 8075 | * A_UINT32 channel_list[]; |
| 8076 | * wmi_mac_addr bssid_list[]; |
| 8077 | */ |
| 8078 | } wmi_roam_invoke_cmd_fixed_param; |
| 8079 | |
| 8080 | /* Definition for op_bitmap */ |
| 8081 | enum { |
| 8082 | ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1, |
| 8083 | ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2, |
| 8084 | ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4, |
| 8085 | }; |
| 8086 | |
| 8087 | typedef struct { |
| 8088 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */ |
| 8089 | A_UINT32 tlv_header; |
| 8090 | /** Unique id identifying the VDEV on which roaming filter is adopted */ |
| 8091 | A_UINT32 vdev_id; |
| 8092 | A_UINT32 flags; /** flags for filter */ |
| 8093 | /** 32 bit bitmap to be set on. |
| 8094 | * bit0 = first param, |
| 8095 | * bit 1 = second param...etc. Can be or'ed |
| 8096 | */ |
| 8097 | A_UINT32 op_bitmap; |
| 8098 | /* number of blacklist in the TLV variable bssid_black_list */ |
| 8099 | A_UINT32 num_bssid_black_list; |
| 8100 | /* number of whitelist in the TLV variable ssid_white_list */ |
| 8101 | A_UINT32 num_ssid_white_list; |
| 8102 | /* only for lfr 3.0. number of preferred list & factor in the TLV */ |
| 8103 | A_UINT32 num_bssid_preferred_list; |
| 8104 | /** |
| 8105 | * TLV (tag length value ) parameters follows roam_filter_list_cmd |
| 8106 | * The TLV's are: |
| 8107 | * wmi_mac_addr bssid_black_list[]; |
| 8108 | * wmi_ssid ssid_white_list[]; |
| 8109 | * wmi_mac_addr bssid_preferred_list[]; |
| 8110 | * A_UINT32 bssid_preferred_factor[]; |
| 8111 | */ |
| 8112 | } wmi_roam_filter_fixed_param; |
| 8113 | |
| 8114 | typedef struct { |
| 8115 | A_UINT8 address[4]; /* IPV4 address in Network Byte Order */ |
| 8116 | } WMI_IPV4_ADDR; |
| 8117 | |
| 8118 | typedef struct _WMI_IPV6_ADDR { |
| 8119 | A_UINT8 address[16]; /* IPV6 in Network Byte Order */ |
| 8120 | } WMI_IPV6_ADDR; |
| 8121 | |
| 8122 | /* flags for subnet change detection */ |
| 8123 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0 |
| 8124 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1 |
| 8125 | /* bit 2 to bit 31 are reserved */ |
| 8126 | |
| 8127 | /* set IPv4 enabled/disabled flag and get the flag */ |
| 8128 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \ |
| 8129 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 8130 | } while (0) |
| 8131 | |
| 8132 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \ |
| 8133 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 8134 | } while (0) |
| 8135 | |
| 8136 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \ |
| 8137 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED)) |
| 8138 | |
| 8139 | /* set IPv6 enabled flag, disabled and get the flag */ |
| 8140 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \ |
| 8141 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 8142 | } while (0) |
| 8143 | |
| 8144 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \ |
| 8145 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 8146 | } while (0) |
| 8147 | |
| 8148 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \ |
| 8149 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED)) |
| 8150 | |
| 8151 | /** |
| 8152 | * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses |
| 8153 | * to FW. FW uses these parameters for subnet change detection. |
| 8154 | */ |
| 8155 | typedef struct { |
| 8156 | /* |
| 8157 | * TLV tag and len; tag equals |
| 8158 | * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param |
| 8159 | */ |
| 8160 | A_UINT32 tlv_header; |
| 8161 | /** unique id identifying the VDEV, generated by the caller */ |
| 8162 | A_UINT32 vdev_id; |
| 8163 | /** IPv4/IPv6 enabled/disabled */ |
| 8164 | /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/ |
| 8165 | DISABLED */ |
| 8166 | A_UINT32 flag; |
| 8167 | /** Gateway MAC address */ |
| 8168 | wmi_mac_addr inet_gw_mac_addr; |
| 8169 | /** IP addresses */ |
| 8170 | WMI_IPV4_ADDR inet_gw_ip_v4_addr; |
| 8171 | WMI_IPV6_ADDR inet_gw_ip_v6_addr; |
| 8172 | /** Number of software retries for ARP/Neighbor solicitation request */ |
| 8173 | A_UINT32 max_retries; |
| 8174 | /** timeout in milliseconds for each ARP request*/ |
| 8175 | A_UINT32 timeout; |
| 8176 | /** number of skipped aps **/ |
| 8177 | A_UINT32 num_skip_subnet_change_detection_bssid_list; |
| 8178 | /** |
| 8179 | * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd |
| 8180 | * structure. The TLV's are: |
| 8181 | * wmi_mac_addr skip_subnet_change_detection_bssid_list []; |
| 8182 | **/ |
| 8183 | } wmi_roam_subnet_change_config_fixed_param; |
| 8184 | |
| 8185 | /** WMI_PROFILE_MATCH_EVENT: offload scan |
| 8186 | * generated when ever atleast one of the matching profiles is found |
| 8187 | * in recent NLO scan. no data is carried with the event. |
| 8188 | */ |
| 8189 | |
| 8190 | /** P2P specific commands */ |
| 8191 | |
| 8192 | /** |
| 8193 | * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by |
| 8194 | * FW to generate P2P IE tobe carried in probe response frames. |
| 8195 | * FW will respond to probe requests while in listen state. |
| 8196 | */ |
| 8197 | typedef struct { |
| 8198 | /* number of secondary device types,supported */ |
| 8199 | A_UINT32 num_secondary_dev_types; |
| 8200 | /** |
| 8201 | * followed by 8 bytes of primary device id and |
| 8202 | * num_secondary_dev_types * 8 bytes of secondary device |
| 8203 | * id. |
| 8204 | */ |
| 8205 | } wmi_p2p_dev_set_device_info; |
| 8206 | |
| 8207 | /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability |
| 8208 | * state. if enabled, an active STA/AP will respond to P2P probe requests on |
| 8209 | * the operating channel of the VDEV. |
| 8210 | */ |
| 8211 | |
| 8212 | typedef struct { |
| 8213 | /* 1:enable disoverability, 0:disable discoverability */ |
| 8214 | A_UINT32 enable_discoverability; |
| 8215 | } wmi_p2p_set_discoverability; |
| 8216 | |
| 8217 | /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to |
| 8218 | * beacons generated by FW. used in FW beacon mode. |
| 8219 | * the FW will add this IE to beacon in addition to the beacon |
| 8220 | * template set by WMI_BCN_TMPL_CMDID command. |
| 8221 | */ |
| 8222 | typedef struct { |
| 8223 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */ |
| 8224 | /** unique id identifying the VDEV, generated by the caller */ |
| 8225 | A_UINT32 vdev_id; |
| 8226 | /* ie length */ |
| 8227 | A_UINT32 ie_buf_len; |
| 8228 | /* Following this structure is the TLV byte stream of ie data of length ie_buf_len: |
| 8229 | * A_UINT8 ie_data[]; // length in byte given by field num_data. |
| 8230 | */ |
| 8231 | |
| 8232 | } wmi_p2p_go_set_beacon_ie_fixed_param; |
| 8233 | |
| 8234 | /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to |
| 8235 | * probe response generated by FW. used in FW beacon mode. |
| 8236 | * the FW will add this IE to probe response in addition to the probe response |
| 8237 | * template set by WMI_PRB_TMPL_CMDID command. |
| 8238 | */ |
| 8239 | typedef struct { |
| 8240 | /** unique id identifying the VDEV, generated by the caller */ |
| 8241 | A_UINT32 vdev_id; |
| 8242 | /* ie length */ |
| 8243 | A_UINT32 ie_buf_len; |
| 8244 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 8245 | } wmi_p2p_go_set_probe_resp_ie; |
| 8246 | |
| 8247 | /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will |
| 8248 | * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes |
| 8249 | * and action frames received by the P2P Client. |
| 8250 | */ |
| 8251 | typedef struct { |
| 8252 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */ |
| 8253 | /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */ |
| 8254 | A_UINT32 p2p_ie_oui_type; |
| 8255 | /** OS specific NoA Attribute ID */ |
| 8256 | A_UINT32 p2p_noa_attribute; |
| 8257 | } wmi_p2p_set_vendor_ie_data_cmd_fixed_param; |
| 8258 | |
| 8259 | /*----P2P disc offload definition ----*/ |
| 8260 | |
| 8261 | typedef struct { |
| 8262 | A_UINT32 pattern_type; |
| 8263 | /** |
| 8264 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 8265 | * TLV can contain bssid list, ssid list and |
| 8266 | * ie. the TLV tags are defined above; |
| 8267 | */ |
| 8268 | } wmi_p2p_disc_offload_pattern_cmd; |
| 8269 | |
| 8270 | typedef struct { |
| 8271 | /* unique id identifying the VDEV, generated by the caller */ |
| 8272 | A_UINT32 vdev_id; |
| 8273 | /* mgmt type of the ie */ |
| 8274 | A_UINT32 mgmt_type; |
| 8275 | /* ie length */ |
| 8276 | A_UINT32 ie_buf_len; |
| 8277 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 8278 | } wmi_p2p_disc_offload_appie_cmd; |
| 8279 | |
| 8280 | typedef struct { |
| 8281 | /* enable/disable p2p find offload */ |
| 8282 | A_UINT32 enable; |
| 8283 | /* unique id identifying the VDEV, generated by the caller */ |
| 8284 | A_UINT32 vdev_id; |
| 8285 | /* p2p find type */ |
| 8286 | A_UINT32 disc_type; |
| 8287 | /* p2p find perodic */ |
| 8288 | A_UINT32 perodic; |
| 8289 | /* p2p find listen channel */ |
| 8290 | A_UINT32 listen_channel; |
| 8291 | /* p2p find full channel number */ |
| 8292 | A_UINT32 num_scan_chans; |
| 8293 | /** |
| 8294 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 8295 | * TLV contain channel list |
| 8296 | */ |
| 8297 | } wmi_p2p_disc_offload_config_cmd; |
| 8298 | |
| 8299 | /*----P2P OppPS definition ----*/ |
| 8300 | typedef struct { |
| 8301 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */ |
| 8302 | A_UINT32 tlv_header; |
| 8303 | /* unique id identifying the VDEV, generated by the caller */ |
| 8304 | A_UINT32 vdev_id; |
| 8305 | /* OppPS attributes */ |
| 8306 | /** Bit 0: Indicate enable/disable of OppPS |
| 8307 | * Bits 7-1: Ctwindow in TUs |
| 8308 | * Bits 31-8: Reserved |
| 8309 | */ |
| 8310 | A_UINT32 oppps_attr; |
| 8311 | } wmi_p2p_set_oppps_cmd_fixed_param; |
| 8312 | |
| 8313 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1 |
| 8314 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0 |
| 8315 | |
| 8316 | #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \ |
| 8317 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED) |
| 8318 | |
| 8319 | #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \ |
| 8320 | WMI_F_RMW((hdr)->oppps_attr, 0x1, \ |
| 8321 | WMI_UNIFIED_OPPPS_ATTR_ENALBED); |
| 8322 | |
| 8323 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe |
| 8324 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1 |
| 8325 | |
| 8326 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \ |
| 8327 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN) |
| 8328 | |
| 8329 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \ |
| 8330 | WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \ |
| 8331 | WMI_UNIFIED_OPPPS_ATTR_CTWIN); |
| 8332 | |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 8333 | typedef enum p2p_lo_start_ctrl_flags_e { |
| 8334 | /* flush prob. req when host is awake */ |
| 8335 | P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, |
| 8336 | } p2p_lo_start_ctrl_flags; |
| 8337 | |
| 8338 | typedef struct { |
| 8339 | A_UINT32 tlv_header; |
| 8340 | A_UINT32 vdev_id; |
| 8341 | A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */ |
| 8342 | A_UINT32 channel; /* MHz */ |
| 8343 | A_UINT32 period; /* ms */ |
| 8344 | A_UINT32 interval; /* ms, interval should be larger than period */ |
| 8345 | A_UINT32 count; /* 0 means forever */ |
| 8346 | /* |
| 8347 | * device_types_len specifies the number of bytes in the |
| 8348 | * device_types_data[] byte-array TLV that follows this TLV. |
| 8349 | * The data in device_types_data[] is in 8-byte elements, so |
| 8350 | * device_types_len will be a multiple of 8. |
| 8351 | */ |
| 8352 | A_UINT32 device_types_len; |
| 8353 | /* |
| 8354 | * prob_resp_len specifies the number of bytes in the |
| 8355 | * prob_resp_data[] byte-array TLV that follows this TLV. |
| 8356 | */ |
| 8357 | A_UINT32 prob_resp_len; |
| 8358 | /* |
| 8359 | * Two other TLVs follow this TLV: |
| 8360 | * A_UINT8 device_types_data[device_types_len]; |
| 8361 | * A_UINT8 prob_resp_data[prob_resp_len]; |
| 8362 | * The information in device_types_data[] and prob_resp_data[] |
| 8363 | * needs to be provided to the target in over-the-air byte order. |
| 8364 | * On a big-endian host, if device_types_data and prob_resp_data |
| 8365 | * are initially in the correct over-the-air byte order, |
| 8366 | * the automatic byteswap for endianness-correction during WMI |
| 8367 | * message download will mess up the byte order. |
| 8368 | * Thus, a big-endian host needs to explicitly byte-swap the bytes |
| 8369 | * within each quad-byte segment of device_types_data[] and |
| 8370 | * prob_resp_data[], so that the automatic byte-swap applied during |
| 8371 | * WMI download from a big-endian host to the little-endian target |
| 8372 | * will restore device_types_data and prob_resp_data into the |
| 8373 | * correct byte ordering. |
| 8374 | */ |
| 8375 | } wmi_p2p_lo_start_cmd_fixed_param; |
| 8376 | |
| 8377 | typedef struct { |
| 8378 | A_UINT32 tlv_header; |
| 8379 | A_UINT32 vdev_id; |
| 8380 | } wmi_p2p_lo_stop_cmd_fixed_param; |
| 8381 | |
| 8382 | typedef enum p2p_lo_stopped_reason_e { |
| 8383 | /* finished as scheduled */ |
| 8384 | P2P_LO_STOPPED_REASON_COMPLETE = 0, |
| 8385 | /* host stops it */ |
| 8386 | P2P_LO_STOPPED_REASON_RECV_STOP_CMD, |
| 8387 | /* invalid listen offload par */ |
| 8388 | P2P_LO_STOPPED_REASON_INVALID_LO_PAR, |
| 8389 | /* vdev cannot support it right now */ |
| 8390 | P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, |
| 8391 | } p2p_lo_stopped_reason; |
| 8392 | |
| 8393 | typedef struct { |
| 8394 | A_UINT32 tlv_header; |
| 8395 | A_UINT32 vdev_id; |
| 8396 | A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */ |
| 8397 | } wmi_p2p_lo_stopped_event_fixed_param; |
| 8398 | |
Anurag Chouhan | 11b53a1 | 2016-07-28 12:39:46 +0530 | [diff] [blame] | 8399 | typedef enum { |
| 8400 | WMI_MNT_FILTER_CONFIG_MANAGER, |
| 8401 | WMI_MNT_FILTER_CONFIG_CONTROL, |
| 8402 | WMI_MNT_FILTER_CONFIG_DATA, |
| 8403 | WMI_MNT_FILTER_CONFIG_ALL, |
| 8404 | WMI_MNT_FILTER_CONFIG_UNKNOWN, |
| 8405 | } WMI_MNT_FILTER_CONFIG_TYPE; |
| 8406 | |
| 8407 | typedef struct { |
| 8408 | A_UINT32 tlv_header; |
| 8409 | A_UINT32 vdev_id; |
| 8410 | A_UINT32 clear_or_set; |
| 8411 | A_UINT32 configure_type; /* see WMI_MNT_FILTER_CONFIG_TYPE */ |
| 8412 | } wmi_mnt_filter_cmd_fixed_param; |
| 8413 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8414 | typedef struct { |
| 8415 | A_UINT32 time32; /* upper 32 bits of time stamp */ |
| 8416 | A_UINT32 time0; /* lower 32 bits of time stamp */ |
| 8417 | } A_TIME64; |
| 8418 | |
| 8419 | typedef enum wmi_peer_sta_kickout_reason { |
| 8420 | WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */ |
| 8421 | WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1, |
| 8422 | WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2, |
| 8423 | WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3, |
| 8424 | WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */ |
| 8425 | WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5, |
| 8426 | } PEER_KICKOUT_REASON; |
| 8427 | |
| 8428 | typedef struct { |
| 8429 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */ |
| 8430 | /** peer mac address */ |
| 8431 | wmi_mac_addr peer_macaddr; |
| 8432 | /** Reason code, defined as above */ |
| 8433 | A_UINT32 reason; |
| 8434 | /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */ |
| 8435 | A_UINT32 rssi; |
| 8436 | } wmi_peer_sta_kickout_event_fixed_param; |
| 8437 | |
| 8438 | #define WMI_WLAN_PROFILE_MAX_HIST 3 |
| 8439 | #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32 |
| 8440 | |
| 8441 | typedef struct _wmi_wlan_profile_t { |
| 8442 | A_UINT32 tlv_header; |
| 8443 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */ |
| 8444 | A_UINT32 id; |
| 8445 | A_UINT32 cnt; |
| 8446 | A_UINT32 tot; |
| 8447 | A_UINT32 min; |
| 8448 | A_UINT32 max; |
| 8449 | A_UINT32 hist_intvl; |
| 8450 | A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST]; |
| 8451 | } wmi_wlan_profile_t; |
| 8452 | |
| 8453 | typedef struct _wmi_wlan_profile_ctx_t { |
| 8454 | A_UINT32 tlv_header; |
| 8455 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */ |
| 8456 | A_UINT32 tot; /* time in us */ |
| 8457 | A_UINT32 tx_msdu_cnt; |
| 8458 | A_UINT32 tx_mpdu_cnt; |
| 8459 | A_UINT32 tx_ppdu_cnt; |
| 8460 | A_UINT32 rx_msdu_cnt; |
| 8461 | A_UINT32 rx_mpdu_cnt; |
| 8462 | A_UINT32 bin_count; |
| 8463 | } wmi_wlan_profile_ctx_t; |
| 8464 | |
| 8465 | typedef struct { |
| 8466 | A_UINT32 tlv_header; |
| 8467 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */ |
| 8468 | A_UINT32 enable; |
| 8469 | } wmi_wlan_profile_trigger_cmd_fixed_param; |
| 8470 | |
| 8471 | typedef struct { |
| 8472 | A_UINT32 tlv_header; |
| 8473 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */ |
| 8474 | A_UINT32 value; |
| 8475 | } wmi_wlan_profile_get_prof_data_cmd_fixed_param; |
| 8476 | |
| 8477 | typedef struct { |
| 8478 | A_UINT32 tlv_header; |
| 8479 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */ |
| 8480 | A_UINT32 profile_id; |
| 8481 | A_UINT32 value; |
| 8482 | } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param; |
| 8483 | |
| 8484 | typedef struct { |
| 8485 | A_UINT32 tlv_header; |
| 8486 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */ |
| 8487 | A_UINT32 profile_id; |
| 8488 | A_UINT32 enable; |
| 8489 | } wmi_wlan_profile_enable_profile_id_cmd_fixed_param; |
| 8490 | |
| 8491 | /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20. |
| 8492 | 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS |
| 8493 | when comparing wifi header.*/ |
| 8494 | /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */ |
| 8495 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146 |
| 8496 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */ |
| 8497 | #define WOW_DEFAULT_BITMASK_SIZE 146 |
| 8498 | #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37 |
| 8499 | #define WOW_MAX_BITMAP_FILTERS 32 |
| 8500 | #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16 |
| 8501 | #define WOW_EXTEND_PATTERN_MATCH_CNT 16 |
| 8502 | #define WOW_SHORT_PATTERN_MATCH_CNT 8 |
| 8503 | #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found. |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 8504 | The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8505 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6 |
| 8506 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2 |
| 8507 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6 |
| 8508 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2 |
| 8509 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120 |
| 8510 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30 |
| 8511 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32 |
| 8512 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8 |
| 8513 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32 |
| 8514 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8 |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 8515 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128 |
| 8516 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8517 | |
| 8518 | typedef enum pattern_type_e { |
| 8519 | WOW_PATTERN_MIN = 0, |
| 8520 | WOW_BITMAP_PATTERN = WOW_PATTERN_MIN, |
| 8521 | WOW_IPV4_SYNC_PATTERN, |
| 8522 | WOW_IPV6_SYNC_PATTERN, |
| 8523 | WOW_WILD_CARD_PATTERN, |
| 8524 | WOW_TIMER_PATTERN, |
| 8525 | WOW_MAGIC_PATTERN, |
| 8526 | WOW_IPV6_RA_PATTERN, |
| 8527 | WOW_IOAC_PKT_PATTERN, |
| 8528 | WOW_IOAC_TMR_PATTERN, |
| 8529 | WOW_IOAC_SOCK_PATTERN, |
| 8530 | WOW_PATTERN_MAX |
| 8531 | } WOW_PATTERN_TYPE; |
| 8532 | |
| 8533 | typedef enum event_type_e { |
| 8534 | WOW_BMISS_EVENT = 0, |
| 8535 | WOW_BETTER_AP_EVENT, |
| 8536 | WOW_DEAUTH_RECVD_EVENT, |
| 8537 | WOW_MAGIC_PKT_RECVD_EVENT, |
| 8538 | WOW_GTK_ERR_EVENT, |
| 8539 | WOW_FOURWAY_HSHAKE_EVENT, |
| 8540 | WOW_EAPOL_RECVD_EVENT, |
| 8541 | WOW_NLO_DETECTED_EVENT, |
| 8542 | WOW_DISASSOC_RECVD_EVENT, |
| 8543 | WOW_PATTERN_MATCH_EVENT, |
| 8544 | WOW_CSA_IE_EVENT, |
| 8545 | WOW_PROBE_REQ_WPS_IE_EVENT, |
| 8546 | WOW_AUTH_REQ_EVENT, |
| 8547 | WOW_ASSOC_REQ_EVENT, |
| 8548 | WOW_HTT_EVENT, |
| 8549 | WOW_RA_MATCH_EVENT, |
| 8550 | WOW_HOST_AUTO_SHUTDOWN_EVENT, |
| 8551 | WOW_IOAC_MAGIC_EVENT, |
| 8552 | WOW_IOAC_SHORT_EVENT, |
| 8553 | WOW_IOAC_EXTEND_EVENT, |
| 8554 | WOW_IOAC_TIMER_EVENT, |
| 8555 | WOW_DFS_PHYERR_RADAR_EVENT, |
| 8556 | WOW_BEACON_EVENT, |
| 8557 | WOW_CLIENT_KICKOUT_EVENT, |
| 8558 | WOW_NAN_EVENT, |
| 8559 | WOW_EXTSCAN_EVENT, |
| 8560 | WOW_IOAC_REV_KA_FAIL_EVENT, |
| 8561 | WOW_IOAC_SOCK_EVENT, |
| 8562 | WOW_NLO_SCAN_COMPLETE_EVENT, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 8563 | WOW_NAN_DATA_EVENT, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 8564 | WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */ |
| 8565 | /* reuse deprecated event value */ |
| 8566 | WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, |
Krishna Kumaar Natarajan | 3bd7364 | 2016-03-25 13:59:54 -0700 | [diff] [blame] | 8567 | WOW_TDLS_CONN_TRACKER_EVENT, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 8568 | WOW_CRITICAL_LOG_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8569 | } WOW_WAKE_EVENT_TYPE; |
| 8570 | |
| 8571 | typedef enum wake_reason_e { |
| 8572 | WOW_REASON_UNSPECIFIED = -1, |
| 8573 | WOW_REASON_NLOD = 0, |
| 8574 | WOW_REASON_AP_ASSOC_LOST, |
| 8575 | WOW_REASON_LOW_RSSI, |
| 8576 | WOW_REASON_DEAUTH_RECVD, |
| 8577 | WOW_REASON_DISASSOC_RECVD, |
| 8578 | WOW_REASON_GTK_HS_ERR, |
| 8579 | WOW_REASON_EAP_REQ, |
| 8580 | WOW_REASON_FOURWAY_HS_RECV, |
| 8581 | WOW_REASON_TIMER_INTR_RECV, |
| 8582 | WOW_REASON_PATTERN_MATCH_FOUND, |
| 8583 | WOW_REASON_RECV_MAGIC_PATTERN, |
| 8584 | WOW_REASON_P2P_DISC, |
| 8585 | WOW_REASON_WLAN_HB, |
| 8586 | WOW_REASON_CSA_EVENT, |
| 8587 | WOW_REASON_PROBE_REQ_WPS_IE_RECV, |
| 8588 | WOW_REASON_AUTH_REQ_RECV, |
| 8589 | WOW_REASON_ASSOC_REQ_RECV, |
| 8590 | WOW_REASON_HTT_EVENT, |
| 8591 | WOW_REASON_RA_MATCH, |
| 8592 | WOW_REASON_HOST_AUTO_SHUTDOWN, |
| 8593 | WOW_REASON_IOAC_MAGIC_EVENT, |
| 8594 | WOW_REASON_IOAC_SHORT_EVENT, |
| 8595 | WOW_REASON_IOAC_EXTEND_EVENT, |
| 8596 | WOW_REASON_IOAC_TIMER_EVENT, |
| 8597 | WOW_REASON_ROAM_HO, |
| 8598 | WOW_REASON_DFS_PHYERR_RADADR_EVENT, |
| 8599 | WOW_REASON_BEACON_RECV, |
| 8600 | WOW_REASON_CLIENT_KICKOUT_EVENT, |
| 8601 | WOW_REASON_NAN_EVENT, |
| 8602 | WOW_REASON_EXTSCAN, |
| 8603 | WOW_REASON_RSSI_BREACH_EVENT, |
| 8604 | WOW_REASON_IOAC_REV_KA_FAIL_EVENT, |
| 8605 | WOW_REASON_IOAC_SOCK_EVENT, |
| 8606 | WOW_REASON_NLO_SCAN_COMPLETE, |
| 8607 | WOW_REASON_PACKET_FILTER_MATCH, |
| 8608 | WOW_REASON_ASSOC_RES_RECV, |
| 8609 | WOW_REASON_REASSOC_REQ_RECV, |
| 8610 | WOW_REASON_REASSOC_RES_RECV, |
| 8611 | WOW_REASON_ACTION_FRAME_RECV, |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 8612 | WOW_REASON_BPF_ALLOW, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 8613 | WOW_REASON_NAN_DATA, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 8614 | WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */ |
| 8615 | /* reuse deprecated reason value */ |
| 8616 | WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, |
Krishna Kumaar Natarajan | 3bd7364 | 2016-03-25 13:59:54 -0700 | [diff] [blame] | 8617 | WOW_REASON_TDLS_CONN_TRACKER_EVENT, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 8618 | WOW_REASON_CRITICAL_LOG, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 8619 | WOW_REASON_P2P_LISTEN_OFFLOAD, |
Nitesh Shah | 44611be | 2016-07-21 15:27:37 +0530 | [diff] [blame] | 8620 | WOW_REASON_NAN_EVENT_WAKE_HOST, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8621 | WOW_REASON_DEBUG_TEST = 0xFF, |
| 8622 | } WOW_WAKE_REASON_TYPE; |
| 8623 | |
| 8624 | typedef enum { |
| 8625 | WOW_IFACE_PAUSE_ENABLED, |
| 8626 | WOW_IFACE_PAUSE_DISABLED |
| 8627 | } WOW_IFACE_STATUS; |
| 8628 | |
| 8629 | enum { |
| 8630 | /* some win10 platfrom will not assert pcie_reset for wow.*/ |
| 8631 | WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, |
Govind Singh | b5158e2 | 2016-02-04 15:38:30 +0530 | [diff] [blame] | 8632 | /* |
| 8633 | * WMI_WOW_FLAG_SEND_PM_PME |
| 8634 | * Some platforms have issues if the PM_PME message is sent after WoW, |
| 8635 | * so don't send PM_PME after WoW unless the host uses this flag |
| 8636 | * to request it. |
| 8637 | */ |
| 8638 | WMI_WOW_FLAG_SEND_PM_PME = 0x00000002, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8639 | }; |
| 8640 | |
| 8641 | |
| 8642 | typedef struct { |
| 8643 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */ |
| 8644 | A_UINT32 enable; |
| 8645 | A_UINT32 pause_iface_config; |
| 8646 | A_UINT32 flags; /* WMI_WOW_FLAG enums */ |
| 8647 | } wmi_wow_enable_cmd_fixed_param; |
| 8648 | |
| 8649 | typedef struct { |
| 8650 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */ |
| 8651 | /** Reserved for future use */ |
| 8652 | A_UINT32 reserved0; |
| 8653 | } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param; |
| 8654 | |
| 8655 | #define WOW_ICMPV6_NA_FILTER_DISABLE 0 |
| 8656 | #define WOW_ICMPV6_NA_FILTER_ENABLE 1 |
| 8657 | |
| 8658 | typedef struct { |
| 8659 | /* TLV tag and len; |
| 8660 | * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param |
| 8661 | */ |
| 8662 | A_UINT32 tlv_header; |
| 8663 | A_UINT32 vdev_id; |
| 8664 | A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */ |
| 8665 | } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param; |
| 8666 | |
| 8667 | typedef struct bitmap_pattern_s { |
| 8668 | A_UINT32 tlv_header; |
| 8669 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */ |
| 8670 | A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD]; |
| 8671 | A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD]; |
| 8672 | A_UINT32 pattern_offset; |
| 8673 | A_UINT32 pattern_len; |
| 8674 | A_UINT32 bitmask_len; |
| 8675 | A_UINT32 pattern_id; /* must be less than max_bitmap_filters */ |
| 8676 | } WOW_BITMAP_PATTERN_T; |
| 8677 | |
| 8678 | typedef struct ipv4_sync_s { |
| 8679 | A_UINT32 tlv_header; |
| 8680 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */ |
| 8681 | A_UINT32 ipv4_src_addr; |
| 8682 | A_UINT32 ipv4_dst_addr; |
| 8683 | A_UINT32 tcp_src_prt; |
| 8684 | A_UINT32 tcp_dst_prt; |
| 8685 | } WOW_IPV4_SYNC_PATTERN_T; |
| 8686 | |
| 8687 | typedef struct ipv6_sync_s { |
| 8688 | A_UINT32 tlv_header; |
| 8689 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */ |
| 8690 | A_UINT32 ipv6_src_addr[4]; |
| 8691 | A_UINT32 ipv6_dst_addr[4]; |
| 8692 | A_UINT32 tcp_src_prt; |
| 8693 | A_UINT32 tcp_dst_prt; |
| 8694 | } WOW_IPV6_SYNC_PATTERN_T; |
| 8695 | |
| 8696 | typedef struct WOW_MAGIC_PATTERN_CMD { |
| 8697 | A_UINT32 tlv_header; |
| 8698 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */ |
| 8699 | wmi_mac_addr macaddr; |
| 8700 | } WOW_MAGIC_PATTERN_CMD; |
| 8701 | |
| 8702 | typedef enum wow_ioac_pattern_type { |
| 8703 | WOW_IOAC_MAGIC_PATTERN = 1, |
| 8704 | WOW_IOAC_SHORT_PATTERN, |
| 8705 | WOW_IOAC_EXTEND_PATTERN, |
| 8706 | } WOW_IOAC_PATTERN_TYPE; |
| 8707 | |
| 8708 | typedef struct ioac_sock_pattern_s { |
| 8709 | /** |
| 8710 | * TLV tag and len; |
| 8711 | * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T |
| 8712 | */ |
| 8713 | A_UINT32 tlv_header; |
| 8714 | A_UINT32 id; |
| 8715 | A_UINT32 local_ipv4; |
| 8716 | A_UINT32 remote_ipv4; |
| 8717 | A_UINT32 local_port; |
| 8718 | A_UINT32 remote_port; |
| 8719 | A_UINT32 pattern_len; /* units = bytes */ |
| 8720 | A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD]; |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 8721 | WMI_IPV6_ADDR local_ipv6; |
| 8722 | WMI_IPV6_ADDR remote_ipv6; |
| 8723 | A_UINT32 ack_nak_len; |
| 8724 | A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
| 8725 | A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8726 | } WOW_IOAC_SOCK_PATTERN_T; |
| 8727 | |
| 8728 | typedef struct ioac_pkt_pattern_s { |
| 8729 | A_UINT32 tlv_header; |
| 8730 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */ |
| 8731 | A_UINT32 pattern_type; |
| 8732 | A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD]; |
| 8733 | A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD]; |
| 8734 | A_UINT32 pattern_len; |
| 8735 | A_UINT32 random_len; |
| 8736 | } WOW_IOAC_PKT_PATTERN_T; |
| 8737 | |
| 8738 | typedef struct ioac_tmr_pattern_s { |
| 8739 | A_UINT32 tlv_header; |
| 8740 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */ |
| 8741 | A_UINT32 wake_in_s; |
| 8742 | A_UINT32 vdev_id; |
| 8743 | } WOW_IOAC_TMR_PATTERN_T; |
| 8744 | |
| 8745 | typedef struct { |
| 8746 | A_UINT32 tlv_header; |
| 8747 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */ |
| 8748 | A_UINT32 nID; |
| 8749 | } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param; |
| 8750 | |
| 8751 | typedef struct { |
| 8752 | A_UINT32 tlv_header; |
| 8753 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */ |
| 8754 | A_UINT32 nID; |
| 8755 | } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param; |
| 8756 | |
| 8757 | typedef struct ioac_keepalive_s { |
| 8758 | A_UINT32 tlv_header; |
| 8759 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */ |
| 8760 | A_UINT32 |
| 8761 | keepalive_pkt_buf |
| 8762 | [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD]; |
| 8763 | A_UINT32 keepalive_pkt_len; |
| 8764 | A_UINT32 period_in_ms; |
| 8765 | A_UINT32 vdev_id; |
| 8766 | A_UINT32 max_loss_cnt; |
| 8767 | A_UINT32 local_ipv4; |
| 8768 | A_UINT32 remote_ipv4; |
| 8769 | A_UINT32 local_port; |
| 8770 | A_UINT32 remote_port; |
| 8771 | A_UINT32 recv_period_in_ms; |
| 8772 | A_UINT32 rev_ka_size; |
| 8773 | A_UINT32 rev_ka_data[WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD]; |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 8774 | WMI_IPV6_ADDR local_ipv6; |
| 8775 | WMI_IPV6_ADDR remote_ipv6; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8776 | } WMI_WOW_IOAC_KEEPALIVE_T; |
| 8777 | |
| 8778 | typedef struct { |
| 8779 | A_UINT32 tlv_header; |
| 8780 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */ |
| 8781 | A_UINT32 vdev_id; |
| 8782 | A_UINT32 pattern_type; |
| 8783 | /* |
| 8784 | * Following this struct are these TLVs. Note that they are all array of structures |
| 8785 | * but can have at most one element. Which TLV is empty or has one element depends |
| 8786 | * on the field pattern_type. This is to emulate an union. |
| 8787 | * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[]; |
| 8788 | * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[]; |
| 8789 | */ |
| 8790 | } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param; |
| 8791 | |
| 8792 | typedef struct { |
| 8793 | A_UINT32 tlv_header; |
| 8794 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */ |
| 8795 | A_UINT32 vdev_id; |
| 8796 | A_UINT32 pattern_type; |
| 8797 | A_UINT32 pattern_id; |
| 8798 | } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param; |
| 8799 | |
| 8800 | typedef struct { |
| 8801 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */ |
| 8802 | A_UINT32 vdev_id; |
| 8803 | A_UINT32 pattern_id; |
| 8804 | A_UINT32 pattern_type; |
| 8805 | /* |
| 8806 | * Following this struct are these TLVs. Note that they are all array of structures |
| 8807 | * but can have at most one element. Which TLV is empty or has one element depends |
| 8808 | * on the field pattern_type. This is to emulate an union. |
| 8809 | * WOW_BITMAP_PATTERN_T pattern_info_bitmap[]; |
| 8810 | * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[]; |
| 8811 | * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[]; |
| 8812 | * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[]; |
| 8813 | * A_UINT32 pattern_info_timeout[]; |
| 8814 | * A_UINT32 ra_ratelimit_interval; |
| 8815 | */ |
| 8816 | } WMI_WOW_ADD_PATTERN_CMD_fixed_param; |
| 8817 | |
| 8818 | typedef struct { |
| 8819 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */ |
| 8820 | A_UINT32 vdev_id; |
| 8821 | A_UINT32 pattern_id; |
| 8822 | A_UINT32 pattern_type; |
| 8823 | } WMI_WOW_DEL_PATTERN_CMD_fixed_param; |
| 8824 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 8825 | #define WMI_WOW_MAX_EVENT_BM_LEN 4 |
| 8826 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8827 | typedef struct { |
| 8828 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */ |
| 8829 | A_UINT32 vdev_id; |
| 8830 | A_UINT32 is_add; |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 8831 | union { |
| 8832 | A_UINT32 event_bitmap; |
| 8833 | A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN]; |
| 8834 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8835 | } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param; |
| 8836 | |
| 8837 | /* |
| 8838 | * This structure is used to set the pattern to check UDP packet in WOW mode. |
| 8839 | * If match, construct a tx frame in a local buffer to send through the peer |
| 8840 | * AP to the entity in the IP network that sent the UDP packet to this STA. |
| 8841 | */ |
| 8842 | typedef struct { |
| 8843 | /* |
| 8844 | * TLV tag and len; |
| 8845 | * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param |
| 8846 | */ |
| 8847 | A_UINT32 tlv_header; |
| 8848 | A_UINT32 vdev_id; |
| 8849 | A_UINT32 enable; /* 1: enable, 0: disable */ |
| 8850 | /* |
| 8851 | * dest_port - |
| 8852 | * bits 7:0 contain the LSB of the UDP dest port, |
| 8853 | * bits 15:8 contain the MSB of the UDP dest port |
| 8854 | */ |
| 8855 | A_UINT32 dest_port; |
| 8856 | A_UINT32 pattern_len; /* length in byte of pattern[] */ |
| 8857 | A_UINT32 response_len; /* length in byte of response[] */ |
| 8858 | /* |
| 8859 | * Following this struct are the TLV's: |
| 8860 | * payload of UDP packet to be checked, network byte order |
| 8861 | * A_UINT8 pattern[]; |
| 8862 | * payload of UDP packet to be response, network byte order |
| 8863 | * A_UINT8 response[]; |
| 8864 | */ |
| 8865 | } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param; |
| 8866 | |
| 8867 | /* |
| 8868 | * This structure is used to set the pattern for WOW host wakeup pin pulse |
| 8869 | * pattern confirguration. |
| 8870 | */ |
| 8871 | typedef struct { |
| 8872 | /* |
| 8873 | * TLV tag and len; tag equals |
| 8874 | * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param |
| 8875 | */ |
| 8876 | A_UINT32 tlv_header; |
| 8877 | |
| 8878 | /* 1: enable, 0: disable */ |
| 8879 | A_UINT32 enable; |
| 8880 | |
| 8881 | /* pin for host wakeup */ |
| 8882 | A_UINT32 pin; |
| 8883 | |
| 8884 | /* interval for keeping low voltage, unit: ms */ |
| 8885 | A_UINT32 interval_low; |
| 8886 | |
| 8887 | /* interval for keeping high voltage, unit: ms */ |
| 8888 | A_UINT32 interval_high; |
| 8889 | |
| 8890 | /* repeat times for pulse (0xffffffff means forever) */ |
| 8891 | A_UINT32 repeat_cnt; |
| 8892 | } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param; |
| 8893 | |
Anurag Chouhan | 86eab9b | 2016-04-21 16:22:47 +0530 | [diff] [blame] | 8894 | #define MAX_SUPPORTED_ACTION_CATEGORY 256 |
| 8895 | #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32) |
| 8896 | |
| 8897 | typedef enum { |
| 8898 | WOW_ACTION_WAKEUP_OPERATION_RESET = 0, |
| 8899 | WOW_ACTION_WAKEUP_OPERATION_SET, |
| 8900 | WOW_ACTION_WAKEUP_OPERATION_ADD_SET, |
| 8901 | WOW_ACTION_WAKEUP_OPERATION_DELETE_SET, |
| 8902 | } WOW_ACTION_WAKEUP_OPERATION; |
| 8903 | |
| 8904 | typedef struct { |
| 8905 | /* |
| 8906 | * TLV tag and len; tag equals |
| 8907 | * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param |
| 8908 | */ |
| 8909 | A_UINT32 tlv_header; |
| 8910 | A_UINT32 vdev_id; |
| 8911 | /* |
| 8912 | * 0 reset to fw default, 1 set the bits, 2 add the setting bits, |
| 8913 | * 3 delete the setting bits |
| 8914 | */ |
| 8915 | A_UINT32 operation; |
| 8916 | A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST]; |
| 8917 | } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param; |
| 8918 | |
| 8919 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8920 | typedef struct wow_event_info_s { |
| 8921 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */ |
| 8922 | A_UINT32 vdev_id; |
| 8923 | A_UINT32 flag; /*This is current reserved. */ |
| 8924 | A_INT32 wake_reason; |
| 8925 | A_UINT32 data_len; |
| 8926 | } WOW_EVENT_INFO_fixed_param; |
| 8927 | |
| 8928 | typedef struct wow_initial_wakeup_event_s { |
| 8929 | /* |
| 8930 | * TLV tag and len; tag equals |
| 8931 | * WOW_INITIAL_WAKEUP_EVENT_fixed_param |
| 8932 | */ |
| 8933 | A_UINT32 tlv_header; |
| 8934 | A_UINT32 vdev_id; |
| 8935 | } WOW_INITIAL_WAKEUP_EVENT_fixed_param; |
| 8936 | |
| 8937 | typedef enum { |
| 8938 | WOW_EVENT_INFO_TYPE_PACKET = 0x0001, |
| 8939 | WOW_EVENT_INFO_TYPE_BITMAP, |
| 8940 | WOW_EVENT_INFO_TYPE_GTKIGTK, |
| 8941 | } WOW_EVENT_INFO_TYPE; |
| 8942 | |
| 8943 | typedef struct wow_event_info_section_s { |
| 8944 | A_UINT32 data_type; |
| 8945 | A_UINT32 data_len; |
| 8946 | } WOW_EVENT_INFO_SECTION; |
| 8947 | |
| 8948 | typedef struct wow_event_info_section_packet_s { |
| 8949 | A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE]; |
| 8950 | } WOW_EVENT_INFO_SECTION_PACKET; |
| 8951 | |
| 8952 | typedef struct wow_event_info_section_bitmap_s { |
| 8953 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */ |
| 8954 | A_UINT32 flag; /*This is current reserved. */ |
| 8955 | A_UINT32 value; /*This could be the pattern id for bitmap pattern. */ |
| 8956 | A_UINT32 org_len; /*The length of the orginal packet. */ |
| 8957 | } WOW_EVENT_INFO_SECTION_BITMAP; |
| 8958 | |
| 8959 | /** |
| 8960 | * This command is sent from WLAN host driver to firmware to |
| 8961 | * enable or disable D0-WOW. D0-WOW means APSS suspend with |
| 8962 | * PCIe link and DDR being active. |
| 8963 | * |
| 8964 | * |
| 8965 | * Entering D0-WOW Mode (based on kernel suspend request): |
| 8966 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1) |
| 8967 | * target: Take action (e.g. dbglog suspend) |
| 8968 | * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message) |
| 8969 | * |
| 8970 | * Exiting D0-WOW mode (based on kernel resume OR target->host message received) |
| 8971 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0) |
| 8972 | * target: Take action (e.g. dbglog resume) |
| 8973 | * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID |
| 8974 | * |
| 8975 | * This command is applicable only on the PCIE LL systems |
| 8976 | * Host can enter either D0-WOW or WOW mode, but NOT both at same time |
| 8977 | * Decision to enter D0-WOW or WOW is based on active interfaces |
| 8978 | * |
| 8979 | */ |
| 8980 | typedef struct { |
| 8981 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */ |
| 8982 | A_UINT32 enable; /* 1 = enable, 0 = disable */ |
| 8983 | } wmi_d0_wow_enable_disable_cmd_fixed_param; |
| 8984 | |
| 8985 | typedef enum extend_wow_type_e { |
| 8986 | EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */ |
| 8987 | EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */ |
| 8988 | EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */ |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 8989 | EXTWOW_TYPE_APP_PULSETEST, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8990 | EXTWOW_DISABLED = 255, |
| 8991 | } EXTWOW_TYPE; |
| 8992 | |
| 8993 | typedef struct { |
| 8994 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */ |
| 8995 | A_UINT32 vdev_id; |
| 8996 | A_UINT32 type; |
| 8997 | A_UINT32 wakeup_pin_num; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 8998 | A_UINT32 swol_pulsetest_type; |
| 8999 | A_UINT32 swol_pulsetest_application; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9000 | } wmi_extwow_enable_cmd_fixed_param; |
| 9001 | |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 9002 | #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8 |
| 9003 | #define SWOL_INDOOR_KEY_LEN 16 |
| 9004 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9005 | typedef struct { |
| 9006 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */ |
| 9007 | A_UINT32 vdev_id; |
| 9008 | wmi_mac_addr wakee_mac; |
| 9009 | A_UINT8 ident[8]; |
| 9010 | A_UINT8 passwd[16]; |
| 9011 | A_UINT32 ident_len; |
| 9012 | A_UINT32 passwd_len; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 9013 | |
| 9014 | /* indoor check parameters */ |
| 9015 | /* key for mac addresses specified in swol_indoor_key_mac |
| 9016 | * Big-endian hosts need to byte-swap the bytes within each 4-byte |
| 9017 | * segment of this array, so the bytes will return to their original |
| 9018 | * order when the entire WMI message contents are byte-swapped to |
| 9019 | * convert from big-endian to little-endian format. |
| 9020 | */ |
| 9021 | A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN]; |
| 9022 | /* key length for specified mac address index |
| 9023 | * Big-endian hosts need to byte-swap the bytes within each 4-byte |
| 9024 | * segment of this array, so the bytes will return to their original |
| 9025 | * order when the entire WMI message contents are byte-swapped to |
| 9026 | * convert from big-endian to little-endian format. |
| 9027 | */ |
| 9028 | A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 9029 | /* mac address array allowed to wakeup host*/ |
| 9030 | wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 9031 | /* app mask for the mac addresses specified in swol_indoor_key_mac */ |
| 9032 | A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 9033 | A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */ |
| 9034 | A_UINT32 swol_indoor_pw_check; /* whether to check password */ |
| 9035 | A_UINT32 swol_indoor_pattern; /* wakeup pattern */ |
| 9036 | A_UINT32 swol_indoor_exception; /* wakeup when exception happens */ |
| 9037 | A_UINT32 swol_indoor_exception_app; |
Nitesh Shah | 8cb6a3d | 2016-07-08 11:38:02 +0530 | [diff] [blame] | 9038 | A_UINT32 swol_assist_enable; /* whether to enable IoT mode */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9039 | } wmi_extwow_set_app_type1_params_cmd_fixed_param; |
| 9040 | |
| 9041 | typedef struct { |
| 9042 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */ |
| 9043 | A_UINT32 vdev_id; |
| 9044 | |
| 9045 | A_UINT8 rc4_key[16]; |
| 9046 | A_UINT32 rc4_key_len; |
| 9047 | |
| 9048 | /** ip header parameter */ |
| 9049 | A_UINT32 ip_id; /* NC id */ |
| 9050 | A_UINT32 ip_device_ip; /* NC IP address */ |
| 9051 | A_UINT32 ip_server_ip; /* Push server IP address */ |
| 9052 | |
| 9053 | /** tcp header parameter */ |
| 9054 | A_UINT16 tcp_src_port; /* NC TCP port */ |
| 9055 | A_UINT16 tcp_dst_port; /* Push server TCP port */ |
| 9056 | A_UINT32 tcp_seq; |
| 9057 | A_UINT32 tcp_ack_seq; |
| 9058 | |
| 9059 | A_UINT32 keepalive_init; /* Initial ping interval */ |
| 9060 | A_UINT32 keepalive_min; /* Minimum ping interval */ |
| 9061 | A_UINT32 keepalive_max; /* Maximum ping interval */ |
| 9062 | A_UINT32 keepalive_inc; /* Increment of ping interval */ |
| 9063 | |
| 9064 | wmi_mac_addr gateway_mac; |
| 9065 | A_UINT32 tcp_tx_timeout_val; |
| 9066 | A_UINT32 tcp_rx_timeout_val; |
| 9067 | |
| 9068 | /** add extra parameter for backward-compatible */ |
| 9069 | /* |
| 9070 | * For all byte arrays, natural order is used. E.g. |
| 9071 | * rc4_write_sandbox[0] holds the 1st RC4 S-box byte, |
| 9072 | * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc. |
| 9073 | */ |
| 9074 | |
| 9075 | /* used to encrypt transmit packet such as keep-alive */ |
| 9076 | A_UINT8 rc4_write_sandbox[256]; |
| 9077 | A_UINT32 rc4_write_x; |
| 9078 | A_UINT32 rc4_write_y; |
| 9079 | |
| 9080 | /* used to decrypt received packet such as wow data */ |
| 9081 | A_UINT8 rc4_read_sandbox[256]; |
| 9082 | A_UINT32 rc4_read_x; |
| 9083 | A_UINT32 rc4_read_y; |
| 9084 | |
| 9085 | /* used to caculate HMAC hash for transmit packet such as keep-alive */ |
| 9086 | A_UINT8 ssl_write_seq[8]; |
| 9087 | A_UINT8 ssl_sha1_write_key[64]; |
| 9088 | A_UINT32 ssl_sha1_write_key_len; |
| 9089 | |
| 9090 | /* used to calculate HAMC hash for receive packet such as wow data */ |
| 9091 | A_UINT8 ssl_read_seq[8]; |
| 9092 | A_UINT8 ssl_sha1_read_key[64]; |
| 9093 | A_UINT32 ssl_sha1_read_key_len; |
| 9094 | |
| 9095 | /* optional element for specifying TCP options data to include in |
| 9096 | * transmit packets such as keep-alive |
| 9097 | */ |
| 9098 | A_UINT32 tcp_options_len; |
| 9099 | A_UINT8 tcp_options[40]; |
| 9100 | |
| 9101 | A_UINT32 async_id; /* keep-alive request id */ |
| 9102 | } wmi_extwow_set_app_type2_params_cmd_fixed_param; |
| 9103 | |
| 9104 | #define WMI_RXERR_CRC 0x01 /* CRC error on frame */ |
| 9105 | #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ |
| 9106 | #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */ |
| 9107 | #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ |
| 9108 | |
| 9109 | typedef enum { |
| 9110 | PKT_PWR_SAVE_PAID_MATCH = 0x0001, |
| 9111 | PKT_PWR_SAVE_GID_MATCH = 0x0002, |
| 9112 | PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004, |
| 9113 | PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008, |
| 9114 | PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010, |
| 9115 | PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020, |
| 9116 | PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040, |
| 9117 | PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080, |
| 9118 | PKT_PWR_SAVE_RSSI_CHECK = 0x0100, |
| 9119 | PKT_PWR_SAVE_5G_EBT = 0x0200, |
| 9120 | PKT_PWR_SAVE_2G_EBT = 0x0400, |
| 9121 | WMI_PKT_PWR_SAVE_MAX = 0x0800, |
| 9122 | } WMI_PKT_PWR_SAVE_TYPE; |
| 9123 | |
| 9124 | typedef struct { |
| 9125 | A_UINT32 tlv_header; |
| 9126 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */ |
| 9127 | A_UINT32 num_data; |
| 9128 | /** length in byte of data[]. */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 9129 | /** pdev_id for identifying the MAC |
| 9130 | * See macros starting with WMI_PDEV_ID_ for values. |
| 9131 | */ |
| 9132 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9133 | /* This structure is used to send Factory Test Mode [FTM] command |
| 9134 | * from host to firmware for integrated chips which are binary blobs. |
| 9135 | * Following this structure is the TLV: |
| 9136 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 9137 | */ |
| 9138 | } wmi_ftm_intg_cmd_fixed_param; |
| 9139 | |
| 9140 | typedef struct { |
| 9141 | A_UINT32 tlv_header; |
| 9142 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */ |
| 9143 | A_UINT32 num_data; |
| 9144 | /** length in byte of data[]. */ |
| 9145 | /* This structure is used to receive Factory Test Mode [FTM] event |
| 9146 | * from firmware to host for integrated chips which are binary blobs. |
| 9147 | * Following this structure is the TLV: |
| 9148 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 9149 | */ |
| 9150 | } wmi_ftm_intg_event_fixed_param; |
| 9151 | |
| 9152 | #define WMI_MAX_NS_OFFLOADS 2 |
| 9153 | #define WMI_MAX_ARP_OFFLOADS 2 |
| 9154 | |
| 9155 | #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 9156 | #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 9157 | #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */ |
| 9158 | |
| 9159 | typedef struct { |
| 9160 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */ |
| 9161 | A_UINT32 flags; /* flags */ |
| 9162 | A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */ |
| 9163 | A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */ |
| 9164 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 9165 | } WMI_ARP_OFFLOAD_TUPLE; |
| 9166 | |
| 9167 | #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 9168 | #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 9169 | #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */ |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 9170 | /* whether the configured IPv6 address is anycast */ |
| 9171 | #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9172 | |
| 9173 | #define WMI_NSOFF_MAX_TARGET_IPS 2 |
| 9174 | |
| 9175 | typedef struct { |
| 9176 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */ |
| 9177 | A_UINT32 flags; /* flags */ |
| 9178 | /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */ |
| 9179 | WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */ |
| 9180 | WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */ |
| 9181 | WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */ |
| 9182 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 9183 | } WMI_NS_OFFLOAD_TUPLE; |
| 9184 | |
| 9185 | typedef struct { |
| 9186 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */ |
| 9187 | A_UINT32 flags; |
| 9188 | A_UINT32 vdev_id; |
| 9189 | A_UINT32 num_ns_ext_tuples; |
| 9190 | /* Following this structure are the TLVs: |
| 9191 | * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS]; |
| 9192 | * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS]; |
| 9193 | * size of ns_ext_tuples is based on num_ns_ext_tuples |
| 9194 | * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; |
| 9195 | */ |
| 9196 | } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param; |
| 9197 | |
| 9198 | typedef struct { |
| 9199 | A_UINT32 tlv_header; |
| 9200 | A_UINT32 vdev_id; |
| 9201 | A_UINT32 pattern_id; |
| 9202 | A_UINT32 timeout; |
| 9203 | A_UINT32 length; |
| 9204 | /* Following this would be the pattern |
| 9205 | A_UINT8 pattern[] of length specifed by length |
| 9206 | field in the structure. */ |
| 9207 | } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 9208 | |
| 9209 | typedef struct { |
| 9210 | A_UINT32 tlv_header; |
| 9211 | A_UINT32 vdev_id; |
| 9212 | A_UINT32 pattern_id; |
| 9213 | } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 9214 | |
| 9215 | typedef struct { |
| 9216 | A_UINT32 tlv_header; |
| 9217 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */ |
| 9218 | /** unique id identifying the VDEV, generated by the caller */ |
| 9219 | A_UINT32 vdev_id; |
| 9220 | /** peer MAC address */ |
| 9221 | wmi_mac_addr peer_macaddr; |
| 9222 | /** Tid number */ |
| 9223 | A_UINT32 tid; |
| 9224 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 9225 | A_UINT32 initiator; |
| 9226 | /** size of the negotiated window */ |
| 9227 | A_UINT32 window_size; |
| 9228 | /** starting sequence number (only valid for initiator) */ |
| 9229 | A_UINT32 ssn; |
| 9230 | /** timeout field represents the time to wait for Block Ack in |
| 9231 | * initiator case and the time to wait for BAR in responder |
| 9232 | * case. 0 represents no timeout. */ |
| 9233 | A_UINT32 timeout; |
| 9234 | /* BA policy: immediate ACK (0) or delayed ACK (1) */ |
| 9235 | A_UINT32 policy; |
| 9236 | } wmi_peer_tid_addba_cmd_fixed_param; |
| 9237 | |
| 9238 | typedef struct { |
| 9239 | A_UINT32 tlv_header; |
| 9240 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */ |
| 9241 | /** unique id identifying the VDEV, generated by the caller */ |
| 9242 | A_UINT32 vdev_id; |
| 9243 | /** peer MAC address */ |
| 9244 | wmi_mac_addr peer_macaddr; |
| 9245 | /** Tid number */ |
| 9246 | A_UINT32 tid; |
| 9247 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 9248 | A_UINT32 initiator; |
| 9249 | } wmi_peer_tid_delba_cmd_fixed_param; |
| 9250 | |
| 9251 | typedef struct { |
| 9252 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */ |
| 9253 | /** unique id identifying the VDEV, generated by the caller */ |
| 9254 | A_UINT32 vdev_id; |
| 9255 | /** peer MAC address */ |
| 9256 | wmi_mac_addr peer_macaddr; |
| 9257 | /** Tid number */ |
| 9258 | A_UINT32 tid; |
| 9259 | /** Event status */ |
| 9260 | A_UINT32 status; |
| 9261 | } wmi_tx_addba_complete_event_fixed_param; |
| 9262 | |
| 9263 | typedef struct { |
| 9264 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */ |
| 9265 | /** unique id identifying the VDEV, generated by the caller */ |
| 9266 | A_UINT32 vdev_id; |
| 9267 | /** peer MAC address */ |
| 9268 | wmi_mac_addr peer_macaddr; |
| 9269 | /** Tid number */ |
| 9270 | A_UINT32 tid; |
| 9271 | /** Event status */ |
| 9272 | A_UINT32 status; |
| 9273 | } wmi_tx_delba_complete_event_fixed_param; |
| 9274 | /* |
| 9275 | * Structure to request sequence numbers for a given |
| 9276 | * peer station on different TIDs. The TIDs are |
| 9277 | * indicated in the tidBitMap, tid 0 would |
| 9278 | * be represented by LSB bit 0. tid 1 would be |
| 9279 | * represented by LSB bit 1 etc. |
| 9280 | * The target will retrieve the current sequence |
| 9281 | * numbers for the peer on all the TIDs requested |
| 9282 | * and send back a response in a WMI event. |
| 9283 | */ |
| 9284 | typedef struct { |
| 9285 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9286 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9287 | wmi_mac_addr peer_macaddr; |
| 9288 | A_UINT32 tidBitmap; |
| 9289 | } wmi_ba_req_ssn; |
| 9290 | |
| 9291 | typedef struct { |
| 9292 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9293 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9294 | /** unique id identifying the VDEV, generated by the caller */ |
| 9295 | A_UINT32 vdev_id; |
| 9296 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 9297 | A_UINT32 num_ba_req_ssn; |
| 9298 | /* Following this struc are the TLV's: |
| 9299 | * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 9300 | */ |
| 9301 | } wmi_ba_req_ssn_cmd_fixed_param; |
| 9302 | |
| 9303 | /* |
| 9304 | * Max transmit categories |
| 9305 | * |
| 9306 | * Note: In future if we need to increase WMI_MAX_TC definition |
| 9307 | * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID. |
| 9308 | */ |
| 9309 | #define WMI_MAX_TC 8 |
| 9310 | |
| 9311 | /* |
| 9312 | * Structure to send response sequence numbers |
| 9313 | * for a give peer and tidmap. |
| 9314 | */ |
| 9315 | typedef struct { |
| 9316 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9317 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9318 | wmi_mac_addr peer_macaddr; |
| 9319 | /* A bool to indicate if ssn is present */ |
| 9320 | A_UINT32 ssn_present_for_tid[WMI_MAX_TC]; |
| 9321 | /* The ssn from target, valid only if |
| 9322 | * ssn_present_for_tid[tidn] equals 1 |
| 9323 | */ |
| 9324 | A_UINT32 ssn_for_tid[WMI_MAX_TC]; |
| 9325 | } wmi_ba_event_ssn; |
| 9326 | |
| 9327 | typedef struct { |
| 9328 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9329 | WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9330 | /** unique id identifying the VDEV, generated by the caller */ |
| 9331 | A_UINT32 vdev_id; |
| 9332 | /** Event status, success or failure of the overall operation */ |
| 9333 | A_UINT32 status; |
| 9334 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 9335 | A_UINT32 num_ba_event_ssn; |
| 9336 | /* Following this struc are the TLV's: |
| 9337 | * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 9338 | */ |
| 9339 | } wmi_ba_rsp_ssn_event_fixed_param; |
| 9340 | |
| 9341 | enum wmi_aggr_state_req_type { |
| 9342 | WMI_DISABLE_AGGREGATION, |
| 9343 | WMI_ENABLE_AGGREGATION |
| 9344 | }; |
| 9345 | |
| 9346 | /* |
| 9347 | * This event is generated by the COEX module |
| 9348 | * when esco call is begins the coex module in fw genrated this event to host to |
| 9349 | * disable the RX aggregation and after completion of the esco call fw will indicate to |
| 9350 | * enable back the Rx aggregation . |
| 9351 | */ |
| 9352 | |
| 9353 | typedef struct { |
| 9354 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */ |
| 9355 | /** unique id identifying the VDEV, generated by the caller */ |
| 9356 | A_UINT32 vdev_id; |
| 9357 | /** req_type contains values from enum |
| 9358 | * wmi_aggr_state_req_type; 0 (disable) 1(enable) */ |
| 9359 | A_UINT32 req_type; |
| 9360 | } wmi_aggr_state_trig_event_fixed_param; |
| 9361 | |
| 9362 | typedef struct { |
| 9363 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */ |
| 9364 | /** unique id identifying the VDEV, generated by the caller */ |
| 9365 | A_UINT32 vdev_id; |
| 9366 | /** MAC address used for installing */ |
| 9367 | wmi_mac_addr peer_macaddr; |
| 9368 | /** key index */ |
| 9369 | A_UINT32 key_ix; |
| 9370 | /** key flags */ |
| 9371 | A_UINT32 key_flags; |
| 9372 | /** Event status */ |
| 9373 | A_UINT32 status; |
| 9374 | } wmi_vdev_install_key_complete_event_fixed_param; |
| 9375 | |
| 9376 | typedef enum _WMI_NLO_AUTH_ALGORITHM { |
| 9377 | WMI_NLO_AUTH_ALGO_80211_OPEN = 1, |
| 9378 | WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2, |
| 9379 | WMI_NLO_AUTH_ALGO_WPA = 3, |
| 9380 | WMI_NLO_AUTH_ALGO_WPA_PSK = 4, |
| 9381 | WMI_NLO_AUTH_ALGO_WPA_NONE = 5, |
| 9382 | WMI_NLO_AUTH_ALGO_RSNA = 6, |
| 9383 | WMI_NLO_AUTH_ALGO_RSNA_PSK = 7, |
| 9384 | } WMI_NLO_AUTH_ALGORITHM; |
| 9385 | |
| 9386 | typedef enum _WMI_NLO_CIPHER_ALGORITHM { |
| 9387 | WMI_NLO_CIPHER_ALGO_NONE = 0x00, |
| 9388 | WMI_NLO_CIPHER_ALGO_WEP40 = 0x01, |
| 9389 | WMI_NLO_CIPHER_ALGO_TKIP = 0x02, |
| 9390 | WMI_NLO_CIPHER_ALGO_CCMP = 0x04, |
| 9391 | WMI_NLO_CIPHER_ALGO_WEP104 = 0x05, |
| 9392 | WMI_NLO_CIPHER_ALGO_BIP = 0x06, |
| 9393 | WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100, |
| 9394 | WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100, |
| 9395 | WMI_NLO_CIPHER_ALGO_WEP = 0x101, |
| 9396 | } WMI_NLO_CIPHER_ALGORITHM; |
| 9397 | |
| 9398 | /* SSID broadcast type passed in NLO params */ |
| 9399 | typedef enum _WMI_NLO_SSID_BcastNwType { |
| 9400 | WMI_NLO_BCAST_UNKNOWN = 0, |
| 9401 | WMI_NLO_BCAST_NORMAL = 1, |
| 9402 | WMI_NLO_BCAST_HIDDEN = 2, |
| 9403 | } WMI_NLO_SSID_BcastNwType; |
| 9404 | |
| 9405 | #define WMI_NLO_MAX_SSIDS 16 |
| 9406 | #define WMI_NLO_MAX_CHAN 48 |
| 9407 | |
| 9408 | #define WMI_NLO_CONFIG_STOP (0x1 << 0) |
| 9409 | #define WMI_NLO_CONFIG_START (0x1 << 1) |
| 9410 | #define WMI_NLO_CONFIG_RESET (0x1 << 2) |
| 9411 | #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4) |
| 9412 | #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5) |
| 9413 | #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6) |
| 9414 | /* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only |
| 9415 | * one of them can be enabled at a given time */ |
| 9416 | #define WMI_NLO_CONFIG_ENLO (0x1 << 7) |
| 9417 | #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8) |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9418 | #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9419 | |
| 9420 | /* Whether directed scan needs to be performed (for hidden SSIDs) */ |
| 9421 | #define WMI_ENLO_FLAG_DIRECTED_SCAN 1 |
| 9422 | /* Whether PNO event shall be triggered if the network is found on A band */ |
| 9423 | #define WMI_ENLO_FLAG_A_BAND 2 |
| 9424 | /* Whether PNO event shall be triggered if the network is found on G band */ |
| 9425 | #define WMI_ENLO_FLAG_G_BAND 4 |
| 9426 | /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */ |
| 9427 | #define WMI_ENLO_FLAG_STRICT_MATCH 8 |
| 9428 | /* Code for matching the beacon AUTH IE - additional codes TBD open */ |
| 9429 | #define WMI_ENLO_AUTH_CODE_OPEN 1 |
| 9430 | /* WPA_PSK or WPA2PSK */ |
| 9431 | #define WMI_ENLO_AUTH_CODE_PSK 2 |
| 9432 | /* any EAPOL */ |
| 9433 | #define WMI_ENLO_AUTH_CODE_EAPOL 4 |
| 9434 | |
| 9435 | /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */ |
| 9436 | typedef struct wmi_nlo_ssid_param { |
| 9437 | A_UINT32 valid; |
| 9438 | wmi_ssid ssid; |
| 9439 | } wmi_nlo_ssid_param; |
| 9440 | |
| 9441 | /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */ |
| 9442 | typedef struct wmi_nlo_enc_param { |
| 9443 | A_UINT32 valid; |
| 9444 | A_UINT32 enc_type; |
| 9445 | } wmi_nlo_enc_param; |
| 9446 | |
| 9447 | /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */ |
| 9448 | typedef struct wmi_nlo_auth_param { |
| 9449 | A_UINT32 valid; |
| 9450 | A_UINT32 auth_type; |
| 9451 | } wmi_nlo_auth_param; |
| 9452 | |
| 9453 | /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */ |
| 9454 | typedef struct wmi_nlo_bcast_nw_param { |
| 9455 | A_UINT32 valid; |
| 9456 | /** |
| 9457 | * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value |
| 9458 | * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used |
| 9459 | * as a bit flag contains WMI_ENLO_FLAG_XXX |
| 9460 | */ |
| 9461 | A_UINT32 bcast_nw_type; |
| 9462 | } wmi_nlo_bcast_nw_param; |
| 9463 | |
| 9464 | /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */ |
| 9465 | typedef struct wmi_nlo_rssi_param { |
| 9466 | A_UINT32 valid; |
| 9467 | A_INT32 rssi; |
| 9468 | } wmi_nlo_rssi_param; |
| 9469 | |
| 9470 | typedef struct nlo_configured_parameters { |
| 9471 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */ |
| 9472 | wmi_nlo_ssid_param ssid; |
| 9473 | wmi_nlo_enc_param enc_type; |
| 9474 | wmi_nlo_auth_param auth_type; |
| 9475 | wmi_nlo_rssi_param rssi_cond; |
| 9476 | wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */ |
| 9477 | } nlo_configured_parameters; |
| 9478 | |
| 9479 | /* Support channel prediction for PNO scan after scanning top_k_num channels |
| 9480 | * if stationary_threshold is met. |
| 9481 | */ |
| 9482 | typedef struct nlo_channel_prediction_cfg { |
| 9483 | A_UINT32 tlv_header; |
| 9484 | /* Enable or disable this feature. */ |
| 9485 | A_UINT32 enable; |
| 9486 | /* Top K channels will be scanned before deciding whether to further |
| 9487 | * scan or stop. Minimum value is 3 and maximum is 5. */ |
| 9488 | A_UINT32 top_k_num; |
| 9489 | /* Preconfigured stationary threshold. Lesser value means more |
| 9490 | * conservative. Bigger value means more aggressive. |
| 9491 | * Maximum is 100 and mininum is 0. */ |
| 9492 | A_UINT32 stationary_threshold; |
| 9493 | /* Periodic full channel scan in milliseconds unit. |
| 9494 | * After full_scan_period_ms since last full scan, channel prediction |
| 9495 | * scan is suppressed and will do full scan. |
| 9496 | * This is to help detecting sudden AP power-on or -off. |
| 9497 | * Value 0 means no full scan at all (not recommended). |
| 9498 | */ |
| 9499 | A_UINT32 full_scan_period_ms; |
| 9500 | } nlo_channel_prediction_cfg; |
| 9501 | |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9502 | typedef struct enlo_candidate_score_params_t { |
| 9503 | /* |
| 9504 | * TLV tag and len; |
| 9505 | * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param |
| 9506 | */ |
| 9507 | A_UINT32 tlv_header; |
| 9508 | /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */ |
| 9509 | A_INT32 min5GHz_rssi; |
| 9510 | /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */ |
| 9511 | A_INT32 min24GHz_rssi; |
| 9512 | /* the maximum score that a network can have before bonuses */ |
| 9513 | A_UINT32 initial_score_max; |
| 9514 | /* current_connection_bonus: |
| 9515 | * only report when there is a network's score this much higher |
| 9516 | * than the current connection |
| 9517 | */ |
| 9518 | A_UINT32 current_connection_bonus; |
| 9519 | /* score bonus for all networks with the same network flag */ |
| 9520 | A_UINT32 same_network_bonus; |
| 9521 | /* score bonus for networks that are not open */ |
| 9522 | A_UINT32 secure_bonus; |
| 9523 | /* 5GHz RSSI score bonus (applied to all 5GHz networks) */ |
| 9524 | A_UINT32 band5GHz_bonus; |
| 9525 | } enlo_candidate_score_params; |
| 9526 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9527 | typedef struct wmi_nlo_config { |
| 9528 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */ |
| 9529 | A_UINT32 flags; |
| 9530 | A_UINT32 vdev_id; |
| 9531 | A_UINT32 fast_scan_max_cycles; |
| 9532 | A_UINT32 active_dwell_time; |
| 9533 | A_UINT32 passive_dwell_time; /* PDT in msecs */ |
| 9534 | A_UINT32 probe_bundle_size; |
| 9535 | A_UINT32 rest_time; /* ART = IRT */ |
| 9536 | A_UINT32 max_rest_time; /* Max value that can be reached after SBM */ |
| 9537 | A_UINT32 scan_backoff_multiplier; /* SBM */ |
| 9538 | A_UINT32 fast_scan_period; /* SCBM */ |
| 9539 | A_UINT32 slow_scan_period; /* specific to windows */ |
| 9540 | A_UINT32 no_of_ssids; |
| 9541 | A_UINT32 num_of_channels; |
| 9542 | A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */ |
| 9543 | /* The TLVs will follow. |
| 9544 | * nlo_configured_parameters nlo_list[]; |
| 9545 | * A_UINT32 channel_list[]; |
| 9546 | * nlo_channel_prediction_cfg ch_prediction_cfg; |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9547 | * enlo_candidate_score_params candidate_score_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9548 | */ |
| 9549 | |
| 9550 | } wmi_nlo_config_cmd_fixed_param; |
| 9551 | |
| 9552 | typedef struct wmi_nlo_event { |
| 9553 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */ |
| 9554 | A_UINT32 vdev_id; |
| 9555 | } wmi_nlo_event; |
| 9556 | |
| 9557 | /* WMI_PASSPOINT_CONFIG_SET |
| 9558 | * Sets a list for passpoint networks for PNO purposes; |
| 9559 | * it should be matched against any passpoint networks found |
| 9560 | * during regular PNO scan. |
| 9561 | */ |
| 9562 | #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0) |
| 9563 | /* WMI_PASSPOINT_CONFIG_RESET |
| 9564 | * Reset passpoint network list - |
| 9565 | * no Passpoint networks should be matched after this. |
| 9566 | */ |
| 9567 | #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1) |
| 9568 | #define PASSPOINT_REALM_LEN 256 |
| 9569 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5 |
| 9570 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 |
| 9571 | #define PASSPOINT_PLMN_ID_LEN 3 |
| 9572 | #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \ |
| 9573 | (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2) |
| 9574 | |
| 9575 | /* |
| 9576 | * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the |
| 9577 | * A_UINT8 realm[PASSPOINT_REALM_LEN] |
| 9578 | * array will end on a 4-byte boundary. |
| 9579 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 9580 | */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9581 | A_COMPILE_TIME_ASSERT(check_passpoint_realm_size, (PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9582 | |
| 9583 | /* |
| 9584 | * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and |
| 9585 | * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the |
| 9586 | * roaming_consortium_ids array below will end on a 4-byte boundary. |
| 9587 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 9588 | */ |
| 9589 | A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size, |
| 9590 | ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0); |
| 9591 | |
| 9592 | /* wildcard ID to allow an action (reset) to apply to all networks */ |
| 9593 | #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF |
| 9594 | typedef struct wmi_passpoint_config { |
| 9595 | /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */ |
| 9596 | A_UINT32 tlv_header; |
| 9597 | /* (network) id |
| 9598 | * identifier of the matched network, report this in event |
| 9599 | * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD) |
| 9600 | * that indicates the action should be applied to all networks. |
| 9601 | * Currently, the only action that is applied to all networks is "reset". |
| 9602 | * If a non-wildcard ID is specified, that particular network is configured. |
| 9603 | * If a wildcard ID is specified, all networks are reset. |
| 9604 | */ |
| 9605 | A_UINT32 id; |
| 9606 | A_UINT32 req_id; |
| 9607 | /*null terminated UTF8 encoded realm, 0 if unspecified*/ |
| 9608 | A_UINT8 realm[PASSPOINT_REALM_LEN]; |
| 9609 | /*roaming consortium ids to match, 0s if unspecified*/ |
| 9610 | A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; |
| 9611 | /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/ |
| 9612 | /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */ |
| 9613 | A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; |
| 9614 | } wmi_passpoint_config_cmd_fixed_param; |
| 9615 | |
| 9616 | typedef struct { |
| 9617 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 9618 | wmi_passpoint_event_hdr */ |
| 9619 | A_UINT32 id; /* identifier of the matched network */ |
| 9620 | A_UINT32 vdev_id; |
| 9621 | A_UINT32 timestamp; /* time since boot (in microsecond) when the |
| 9622 | result was retrieved*/ |
| 9623 | wmi_ssid ssid; |
| 9624 | wmi_mac_addr bssid; /* bssid of the network */ |
| 9625 | A_UINT32 channel_mhz; /* channel frequency in MHz */ |
| 9626 | A_UINT32 rssi; /* rssi value */ |
| 9627 | A_UINT32 rtt; /* timestamp in nanoseconds*/ |
| 9628 | A_UINT32 rtt_sd; /* standard deviation in rtt */ |
| 9629 | A_UINT32 beacon_period; /* beacon advertised in the beacon */ |
| 9630 | A_UINT32 capability; /* capabilities advertised in the beacon */ |
| 9631 | A_UINT32 ie_length; /* size of the ie_data blob */ |
| 9632 | A_UINT32 anqp_length; /* length of ANQP blob */ |
| 9633 | /** |
| 9634 | * Following this structure is the byte stream of ie data of length ie_buf_len: |
| 9635 | * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon |
| 9636 | * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE |
| 9637 | * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes |
| 9638 | * stream of each ie should be same as BEACON/Action-frm by 802.11 spec |
| 9639 | */ |
| 9640 | } wmi_passpoint_event_hdr; |
| 9641 | |
| 9642 | #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000 |
| 9643 | /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */ |
| 9644 | #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000 |
| 9645 | /** Disable GTK offload */ |
| 9646 | #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000 |
| 9647 | /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */ |
| 9648 | #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000 |
| 9649 | enum wmi_chatter_mode { |
| 9650 | /* Chatter enter/exit happens |
| 9651 | * automatically based on preset |
| 9652 | * params |
| 9653 | */ |
| 9654 | WMI_CHATTER_MODE_AUTO, |
| 9655 | /* Chatter enter is triggered |
| 9656 | * manually by the user |
| 9657 | */ |
| 9658 | WMI_CHATTER_MODE_MANUAL_ENTER, |
| 9659 | /* Chatter exit is triggered |
| 9660 | * manually by the user |
| 9661 | */ |
| 9662 | WMI_CHATTER_MODE_MANUAL_EXIT, |
| 9663 | /* Placeholder max value, always last */ |
| 9664 | WMI_CHATTER_MODE_MAX |
| 9665 | }; |
| 9666 | |
| 9667 | enum wmi_chatter_query_type { |
| 9668 | /*query coalescing filter match counter */ |
| 9669 | WMI_CHATTER_QUERY_FILTER_MATCH_CNT, |
| 9670 | WMI_CHATTER_QUERY_MAX |
| 9671 | }; |
| 9672 | |
| 9673 | typedef struct { |
| 9674 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */ |
| 9675 | A_UINT32 chatter_mode; |
| 9676 | } wmi_chatter_set_mode_cmd_fixed_param; |
| 9677 | |
| 9678 | /** maximum number of filter supported*/ |
| 9679 | #define CHATTER_MAX_COALESCING_RULES 11 |
| 9680 | /** maximum number of field tests per filter*/ |
| 9681 | #define CHATTER_MAX_FIELD_TEST 5 |
| 9682 | /** maximum field length in number of DWORDS*/ |
| 9683 | #define CHATTER_MAX_TEST_FIELD_LEN32 2 |
| 9684 | |
| 9685 | /** field test kinds*/ |
| 9686 | #define CHATTER_COALESCING_TEST_EQUAL 1 |
| 9687 | #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2 |
| 9688 | #define CHATTER_COALESCING_TEST_NOT_EQUAL 3 |
| 9689 | |
| 9690 | /** packet type*/ |
| 9691 | #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0) |
| 9692 | #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1) |
| 9693 | #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2) |
| 9694 | |
| 9695 | /** coalescing field test*/ |
| 9696 | typedef struct _chatter_pkt_coalescing_hdr_test { |
| 9697 | /** offset from start of mac header, for windows native wifi host driver |
| 9698 | * should assume standard 802.11 frame format without QoS info and address4 |
| 9699 | * FW would account for any non-stand fields for final offset value. |
| 9700 | */ |
| 9701 | A_UINT32 offset; |
| 9702 | A_UINT32 length; /* length of test field */ |
| 9703 | A_UINT32 test; /*equal, not equal or masked equal */ |
| 9704 | A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */ |
| 9705 | A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */ |
| 9706 | } chatter_pkt_coalescing_hdr_test; |
| 9707 | |
| 9708 | /** packet coalescing filter*/ |
| 9709 | typedef struct _chatter_pkt_coalescing_filter { |
| 9710 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */ |
| 9711 | A_UINT32 filter_id; /*unique id assigned by OS */ |
| 9712 | A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */ |
| 9713 | A_UINT32 pkt_type; /*unicast/multicast/broadcast */ |
| 9714 | A_UINT32 num_of_test_field; /*number of field test in table */ |
| 9715 | chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */ |
| 9716 | } chatter_pkt_coalescing_filter; |
| 9717 | |
| 9718 | /** packet coalescing filter add command*/ |
| 9719 | typedef struct { |
| 9720 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */ |
| 9721 | A_UINT32 num_of_filters; |
| 9722 | /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter |
| 9723 | chatter_pkt_coalescing_filter rx_filter[1]; */ |
| 9724 | } wmi_chatter_coalescing_add_filter_cmd_fixed_param; |
| 9725 | /** packet coalescing filter delete command*/ |
| 9726 | typedef struct { |
| 9727 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */ |
| 9728 | A_UINT32 filter_id; /*filter id which will be deleted */ |
| 9729 | } wmi_chatter_coalescing_delete_filter_cmd_fixed_param; |
| 9730 | /** packet coalescing query command*/ |
| 9731 | typedef struct { |
| 9732 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */ |
| 9733 | A_UINT32 type; /*type of query */ |
| 9734 | } wmi_chatter_coalescing_query_cmd_fixed_param; |
| 9735 | /** chatter query reply event*/ |
| 9736 | typedef struct { |
| 9737 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */ |
| 9738 | A_UINT32 type; /*query type */ |
| 9739 | A_UINT32 filter_match_cnt; /*coalescing filter match counter */ |
| 9740 | } wmi_chatter_query_reply_event_fixed_param; |
| 9741 | |
| 9742 | /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES |
| 9743 | * cannot be changed without breaking WMI compatibility. */ |
| 9744 | #define GTK_OFFLOAD_KEK_BYTES 16 |
| 9745 | #define GTK_OFFLOAD_KCK_BYTES 16 |
| 9746 | /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */ |
| 9747 | #define GTK_REPLAY_COUNTER_BYTES 8 |
| 9748 | #define WMI_MAX_KEY_LEN 32 |
| 9749 | #define IGTK_PN_SIZE 6 |
| 9750 | |
| 9751 | typedef struct { |
| 9752 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */ |
| 9753 | A_UINT32 vdev_id; |
| 9754 | /** unique id identifying the VDEV */ |
| 9755 | A_UINT32 flags; /* status flags */ |
| 9756 | A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */ |
| 9757 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */ |
| 9758 | A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */ |
| 9759 | A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */ |
| 9760 | A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */ |
| 9761 | A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */ |
| 9762 | } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param; |
| 9763 | |
| 9764 | typedef struct { |
| 9765 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */ |
| 9766 | A_UINT32 vdev_id; /** unique id identifying the VDEV */ |
| 9767 | A_UINT32 flags; /* control flags, GTK offload command use high byte */ |
| 9768 | /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */ |
| 9769 | A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */ |
| 9770 | A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */ |
| 9771 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */ |
| 9772 | } WMI_GTK_OFFLOAD_CMD_fixed_param; |
| 9773 | |
| 9774 | typedef struct { |
| 9775 | /* TLV tag and len; tag equals |
| 9776 | * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param |
| 9777 | */ |
| 9778 | A_UINT32 tlv_header; |
| 9779 | A_UINT32 vdev_id; |
| 9780 | A_UINT32 sa_query_retry_interval; /* in msec */ |
| 9781 | A_UINT32 sa_query_max_retry_count; |
| 9782 | } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param; |
| 9783 | |
| 9784 | typedef enum { |
| 9785 | WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */ |
| 9786 | WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */ |
| 9787 | WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */ |
| 9788 | /* gratuitous ARP req*/ |
| 9789 | WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, |
| 9790 | } WMI_STA_KEEPALIVE_METHOD; |
| 9791 | |
| 9792 | typedef struct { |
| 9793 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */ |
| 9794 | WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */ |
| 9795 | WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */ |
| 9796 | wmi_mac_addr dest_mac_addr; /* destination MAC address */ |
| 9797 | } WMI_STA_KEEPALVE_ARP_RESPONSE; |
| 9798 | |
| 9799 | typedef struct { |
| 9800 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */ |
| 9801 | A_UINT32 vdev_id; |
| 9802 | A_UINT32 enable; /* 1 - Enable, 0 - disable */ |
| 9803 | A_UINT32 method; /* keep alive method */ |
| 9804 | A_UINT32 interval; /* time interval in seconds */ |
| 9805 | /* |
| 9806 | * NOTE: following this structure is the TLV for ARP Resonse: |
| 9807 | * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response |
| 9808 | */ |
| 9809 | } WMI_STA_KEEPALIVE_CMD_fixed_param; |
| 9810 | |
| 9811 | typedef struct { |
| 9812 | A_UINT32 tlv_header; |
| 9813 | A_UINT32 vdev_id; |
| 9814 | A_UINT32 action; |
| 9815 | } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param; |
| 9816 | typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD; |
| 9817 | |
| 9818 | typedef struct { |
| 9819 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */ |
| 9820 | A_UINT32 vdev_id; |
| 9821 | A_UINT32 keepaliveInterval; /* seconds */ |
| 9822 | A_UINT32 keepaliveMethod; |
| 9823 | } wmi_vdev_set_keepalive_cmd_fixed_param; |
| 9824 | |
| 9825 | typedef struct { |
| 9826 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */ |
| 9827 | A_UINT32 vdev_id; |
| 9828 | } wmi_vdev_get_keepalive_cmd_fixed_param; |
| 9829 | |
| 9830 | typedef struct { |
| 9831 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */ |
| 9832 | A_UINT32 vdev_id; |
| 9833 | A_UINT32 keepaliveInterval; /* seconds */ |
| 9834 | A_UINT32 keepaliveMethod; /* seconds */ |
| 9835 | } wmi_vdev_get_keepalive_event_fixed_param; |
| 9836 | |
| 9837 | #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0 |
| 9838 | #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1 |
| 9839 | |
| 9840 | typedef struct { |
| 9841 | A_UINT32 tlv_header; |
| 9842 | A_UINT32 vdev_id; |
| 9843 | A_UINT32 action; |
| 9844 | } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param; |
| 9845 | |
| 9846 | typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param |
| 9847 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD; |
| 9848 | |
| 9849 | typedef struct { |
| 9850 | A_UINT32 tlv_header; |
| 9851 | A_UINT32 vdev_id; |
| 9852 | A_UINT32 mcc_tbttmode; |
| 9853 | wmi_mac_addr mcc_bssid; |
| 9854 | } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param; |
| 9855 | |
| 9856 | typedef struct { |
| 9857 | A_UINT32 tlv_header; |
| 9858 | A_UINT32 vdev_id; /* home vdev id */ |
| 9859 | A_UINT32 meas_token; /* from measure request frame */ |
| 9860 | A_UINT32 dialog_token; |
| 9861 | A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */ |
| 9862 | A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */ |
| 9863 | A_UINT32 burst_cycle; /* times cycle through within one burst */ |
| 9864 | A_UINT32 tx_power; /* for path frame */ |
| 9865 | A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */ |
| 9866 | wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */ |
| 9867 | A_UINT32 num_chans; |
| 9868 | } wmi_vdev_plmreq_start_cmd_fixed_param; |
| 9869 | |
| 9870 | typedef struct { |
| 9871 | A_UINT32 tlv_header; |
| 9872 | A_UINT32 vdev_id; |
| 9873 | A_UINT32 meas_token; /* same value from req */ |
| 9874 | } wmi_vdev_plmreq_stop_cmd_fixed_param; |
| 9875 | |
| 9876 | typedef struct { |
| 9877 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */ |
| 9878 | A_UINT32 tlv_header; |
| 9879 | /* unique id identifying the VDEV, generated by the caller */ |
| 9880 | A_UINT32 vdev_id; |
| 9881 | /* enable/disable NoA */ |
| 9882 | A_UINT32 enable; |
| 9883 | /** number of NoA desc. In the TLV noa_descriptor[] */ |
| 9884 | A_UINT32 num_noa; |
| 9885 | /** |
| 9886 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 9887 | * TLV contain NoA desc with num of num_noa |
| 9888 | */ |
| 9889 | } wmi_p2p_set_noa_cmd_fixed_param; |
| 9890 | |
| 9891 | typedef struct { |
| 9892 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */ |
| 9893 | A_UINT32 tlv_header; |
| 9894 | /* unique id identifying the VDEV, generated by the caller */ |
| 9895 | A_UINT32 vdev_id; |
| 9896 | /* Identify the wlan module */ |
| 9897 | A_UINT32 module_id; |
| 9898 | /* Num of test arguments passed */ |
| 9899 | A_UINT32 num_args; |
| 9900 | /** |
| 9901 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 9902 | * structure. The TLV's are: |
| 9903 | * A_UINT32 args[]; |
| 9904 | **/ |
| 9905 | } wmi_unit_test_cmd_fixed_param; |
| 9906 | |
| 9907 | /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic |
| 9908 | * after it received WMI_ROAM_SYNCH_EVENTID. |
| 9909 | */ |
| 9910 | typedef struct { |
| 9911 | A_UINT32 tlv_header; |
| 9912 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */ |
| 9913 | /** unique id identifying the VDEV, generated by the caller */ |
| 9914 | A_UINT32 vdev_id; |
| 9915 | } wmi_roam_synch_complete_fixed_param; |
| 9916 | |
| 9917 | typedef enum { |
| 9918 | RECOVERY_SIM_ASSERT = 0x01, |
| 9919 | RECOVERY_SIM_NO_DETECT = 0x02, |
| 9920 | RECOVERY_SIM_CTR_EP_FULL = 0x03, |
| 9921 | RECOVERY_SIM_EMPTY_POINT = 0x04, |
| 9922 | RECOVERY_SIM_STACK_OV = 0x05, |
| 9923 | RECOVERY_SIM_INFINITE_LOOP = 0x06, |
| 9924 | RECOVERY_SIM_PCIE_LINKDOWN = 0x07, |
| 9925 | RECOVERY_SIM_SELF_RECOVERY = 0x08, |
| 9926 | } RECOVERY_SIM_TYPE; |
| 9927 | |
| 9928 | /* WMI_FORCE_FW_HANG_CMDID */ |
| 9929 | typedef struct { |
| 9930 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */ |
| 9931 | A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */ |
| 9932 | A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */ |
| 9933 | } WMI_FORCE_FW_HANG_CMD_fixed_param; |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 9934 | |
| 9935 | typedef enum { |
| 9936 | WMI_MCAST_FILTER_SET = 1, |
| 9937 | WMI_MCAST_FILTER_DELETE |
| 9938 | } WMI_SET_SINGLE_MCAST_FILTER_OP; |
| 9939 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9940 | typedef struct { |
| 9941 | A_UINT32 tlv_header; |
| 9942 | A_UINT32 vdev_id; |
| 9943 | A_UINT32 index; |
| 9944 | A_UINT32 action; |
| 9945 | wmi_mac_addr mcastbdcastaddr; |
| 9946 | } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param; |
| 9947 | |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 9948 | typedef enum { |
| 9949 | WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */ |
| 9950 | /* clear all previous mc list, and set new list */ |
| 9951 | WMI_MULTIPLE_MCAST_FILTER_SET, |
| 9952 | WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */ |
| 9953 | WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */ |
| 9954 | } WMI_MULTIPLE_MCAST_FILTER_OP; |
| 9955 | |
| 9956 | typedef struct { |
| 9957 | A_UINT32 tlv_header; |
| 9958 | A_UINT32 vdev_id; |
| 9959 | A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */ |
| 9960 | /* number of elements in the subsequent mcast addr list */ |
| 9961 | A_UINT32 num_mcastaddrs; |
| 9962 | /** |
| 9963 | * TLV (tag length value) parameters follow the |
| 9964 | * structure. The TLV's are: |
| 9965 | * wmi_mac_addr mcastaddr_list[num_mcastaddrs]; |
| 9966 | */ |
| 9967 | } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param; |
| 9968 | |
| 9969 | |
Himanshu Agarwal | b0497b5 | 2016-05-13 21:03:37 +0530 | [diff] [blame] | 9970 | /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */ |
| 9971 | typedef enum { |
| 9972 | WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */ |
| 9973 | WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */ |
| 9974 | } WMI_TIME_STAMP_SYNC_MODE; |
| 9975 | |
| 9976 | typedef struct { |
| 9977 | /* |
| 9978 | * TLV tag and len; tag equals |
| 9979 | * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param |
| 9980 | */ |
| 9981 | A_UINT32 tlv_header; |
| 9982 | /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */ |
| 9983 | A_UINT32 mode; |
| 9984 | A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */ |
| 9985 | A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */ |
| 9986 | } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param; |
| 9987 | |
| 9988 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9989 | /* GPIO Command and Event data structures */ |
| 9990 | |
| 9991 | /* WMI_GPIO_CONFIG_CMDID */ |
| 9992 | enum { |
| 9993 | WMI_GPIO_PULL_NONE, |
| 9994 | WMI_GPIO_PULL_UP, |
| 9995 | WMI_GPIO_PULL_DOWN, |
| 9996 | }; |
| 9997 | |
| 9998 | enum { |
| 9999 | WMI_GPIO_INTTYPE_DISABLE, |
| 10000 | WMI_GPIO_INTTYPE_RISING_EDGE, |
| 10001 | WMI_GPIO_INTTYPE_FALLING_EDGE, |
| 10002 | WMI_GPIO_INTTYPE_BOTH_EDGE, |
| 10003 | WMI_GPIO_INTTYPE_LEVEL_LOW, |
| 10004 | WMI_GPIO_INTTYPE_LEVEL_HIGH |
| 10005 | }; |
| 10006 | |
| 10007 | typedef struct { |
| 10008 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */ |
| 10009 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 10010 | A_UINT32 input; /* 0 - Output/ 1 - Input */ |
| 10011 | A_UINT32 pull_type; /* Pull type defined above */ |
| 10012 | A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */ |
| 10013 | } wmi_gpio_config_cmd_fixed_param; |
| 10014 | |
| 10015 | /* WMI_GPIO_OUTPUT_CMDID */ |
| 10016 | typedef struct { |
| 10017 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */ |
| 10018 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 10019 | A_UINT32 set; /* Set the GPIO pin */ |
| 10020 | } wmi_gpio_output_cmd_fixed_param; |
| 10021 | |
| 10022 | /* WMI_GPIO_INPUT_EVENTID */ |
| 10023 | typedef struct { |
| 10024 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */ |
| 10025 | A_UINT32 gpio_num; /* GPIO number which changed state */ |
| 10026 | } wmi_gpio_input_event_fixed_param; |
| 10027 | |
| 10028 | /* WMI_P2P_DISC_EVENTID */ |
| 10029 | enum { |
| 10030 | P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */ |
| 10031 | P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */ |
| 10032 | }; |
| 10033 | |
| 10034 | enum { |
| 10035 | P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */ |
| 10036 | P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */ |
| 10037 | P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */ |
| 10038 | }; |
| 10039 | |
| 10040 | enum { |
| 10041 | P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */ |
| 10042 | P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */ |
| 10043 | }; |
| 10044 | |
| 10045 | typedef struct { |
| 10046 | A_UINT32 vdev_id; |
| 10047 | A_UINT32 reason; /* P2P DISC wake up reason */ |
| 10048 | } wmi_p2p_disc_event; |
| 10049 | |
| 10050 | typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param |
| 10051 | WOW_EVENT_INFO_SECTION_GTKIGTK; |
| 10052 | |
| 10053 | typedef enum { |
| 10054 | WMI_FAKE_TXBFER_SEND_NDPA, |
| 10055 | WMI_FAKE_TXBFER_SEND_MU, |
| 10056 | WMI_FAKE_TXBFER_NDPA_FBTYPE, |
| 10057 | WMI_FAKE_TXBFER_NDPA_NCIDX, |
| 10058 | WMI_FAKE_TXBFER_NDPA_POLL, |
| 10059 | WMI_FAKE_TXBFER_NDPA_BW, |
| 10060 | WMI_FAKE_TXBFER_NDPA_PREAMBLE, |
| 10061 | WMI_FAKE_TXBFER_NDPA_RATE, |
| 10062 | WMI_FAKE_TXBFER_NDP_BW, |
| 10063 | WMI_FAKE_TXBFER_NDP_NSS, |
| 10064 | WMI_TXBFEE_ENABLE_UPLOAD_H, |
| 10065 | WMI_TXBFEE_ENABLE_CAPTURE_H, |
| 10066 | WMI_TXBFEE_SET_CBF_TBL, |
| 10067 | WMI_TXBFEE_CBF_TBL_LSIG, |
| 10068 | WMI_TXBFEE_CBF_TBL_SIGA1, |
| 10069 | WMI_TXBFEE_CBF_TBL_SIGA2, |
| 10070 | WMI_TXBFEE_CBF_TBL_SIGB, |
| 10071 | WMI_TXBFEE_CBF_TBL_PAD, |
| 10072 | WMI_TXBFEE_CBF_TBL_DUR, |
| 10073 | WMI_TXBFEE_SU_NCIDX, |
| 10074 | WMI_TXBFEE_CBIDX, |
| 10075 | WMI_TXBFEE_NGIDX, |
| 10076 | } WMI_TXBF_PARAM_ID; |
| 10077 | |
| 10078 | typedef struct { |
| 10079 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */ |
| 10080 | /** parameter id */ |
| 10081 | A_UINT32 param_id; |
| 10082 | /** parameter value */ |
| 10083 | A_UINT32 param_value; |
| 10084 | } wmi_txbf_cmd_fixed_param; |
| 10085 | |
| 10086 | typedef struct { |
| 10087 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */ |
| 10088 | A_UINT32 h_length; |
| 10089 | A_UINT32 cv_length; |
| 10090 | /* This TLV is followed by array of bytes: |
| 10091 | * // h_cv info buffer |
| 10092 | * A_UINT8 bufp[]; |
| 10093 | */ |
| 10094 | } wmi_upload_h_hdr; |
| 10095 | |
| 10096 | typedef struct { |
| 10097 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */ |
| 10098 | A_UINT32 svd_num; |
| 10099 | A_UINT32 tone_num; |
| 10100 | A_UINT32 reserved; |
| 10101 | } wmi_capture_h_event_hdr; |
| 10102 | |
| 10103 | typedef struct { |
| 10104 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */ |
| 10105 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 10106 | A_UINT32 end_freq; /* end frequency */ |
| 10107 | } wmi_avoid_freq_range_desc; |
| 10108 | |
| 10109 | typedef struct { |
| 10110 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */ |
| 10111 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 10112 | A_UINT32 num_freq_ranges; |
| 10113 | |
| 10114 | /* The TLVs will follow. |
| 10115 | * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc |
| 10116 | * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated |
| 10117 | */ |
| 10118 | } wmi_avoid_freq_ranges_event_fixed_param; |
| 10119 | |
| 10120 | typedef struct { |
| 10121 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */ |
| 10122 | /** Reserved for future use */ |
| 10123 | A_UINT32 reserved0; |
| 10124 | A_UINT32 vdev_id; |
| 10125 | } wmi_gtk_rekey_fail_event_fixed_param; |
| 10126 | |
| 10127 | enum wmm_ac_downgrade_policy { |
| 10128 | WMM_AC_DOWNGRADE_DEPRIO, |
| 10129 | WMM_AC_DOWNGRADE_DROP, |
| 10130 | WMM_AC_DOWNGRADE_INVALID, |
| 10131 | }; |
| 10132 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 10133 | /* WMM EDCA Params type */ |
| 10134 | #define WMM_PARAM_TYPE_LEGACY 0 |
| 10135 | /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */ |
| 10136 | #define WMM_PARAM_TYPE_11AX_EDCA 1 |
| 10137 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10138 | typedef struct { |
| 10139 | A_UINT32 tlv_header; |
| 10140 | A_UINT32 cwmin; |
| 10141 | A_UINT32 cwmax; |
| 10142 | A_UINT32 aifs; |
| 10143 | A_UINT32 txoplimit; |
| 10144 | A_UINT32 acm; |
| 10145 | A_UINT32 no_ack; |
| 10146 | } wmi_wmm_vparams; |
| 10147 | |
| 10148 | typedef struct { |
| 10149 | A_UINT32 tlv_header; |
| 10150 | A_UINT32 vdev_id; |
| 10151 | wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */ |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 10152 | A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10153 | } wmi_vdev_set_wmm_params_cmd_fixed_param; |
| 10154 | |
| 10155 | typedef struct { |
| 10156 | A_UINT32 tlv_header; |
| 10157 | A_UINT32 vdev_id; |
| 10158 | A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */ |
| 10159 | A_UINT32 userGtxMask; /* host request for GTX mask */ |
| 10160 | A_UINT32 gtxPERThreshold; /* default: 10% */ |
| 10161 | A_UINT32 gtxPERMargin; /* default: 2% */ |
| 10162 | A_UINT32 gtxTPCstep; /* default: 1 */ |
| 10163 | A_UINT32 gtxTPCMin; /* default: 5 */ |
| 10164 | A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */ |
| 10165 | } wmi_vdev_set_gtx_params_cmd_fixed_param; |
| 10166 | |
| 10167 | typedef struct { |
| 10168 | A_UINT32 tlv_header; |
| 10169 | A_UINT32 vdev_id; |
| 10170 | A_UINT32 ac; |
| 10171 | A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */ |
| 10172 | A_UINT32 downgrade_type; |
| 10173 | } wmi_vdev_wmm_addts_cmd_fixed_param; |
| 10174 | |
| 10175 | typedef struct { |
| 10176 | A_UINT32 tlv_header; |
| 10177 | A_UINT32 vdev_id; |
| 10178 | A_UINT32 ac; |
| 10179 | } wmi_vdev_wmm_delts_cmd_fixed_param; |
| 10180 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10181 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10182 | typedef struct { |
| 10183 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */ |
| 10184 | /** Reserved for future use */ |
| 10185 | A_UINT32 reserved0; |
| 10186 | } wmi_pdev_dfs_enable_cmd_fixed_param; |
| 10187 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10188 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10189 | typedef struct { |
| 10190 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10191 | /** pdev_id for identifying the MAC |
| 10192 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10193 | */ |
| 10194 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10195 | } wmi_pdev_dfs_disable_cmd_fixed_param; |
| 10196 | |
| 10197 | typedef struct { |
| 10198 | /** TLV tag and len; tag equals |
| 10199 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param |
| 10200 | */ |
| 10201 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10202 | /** pdev_id for identifying the MAC |
| 10203 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10204 | */ |
| 10205 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10206 | } wmi_dfs_phyerr_filter_ena_cmd_fixed_param; |
| 10207 | |
| 10208 | typedef struct { |
| 10209 | /** TLV tag and len; tag equals |
| 10210 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param |
| 10211 | */ |
| 10212 | A_UINT32 tlv_header; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 10213 | /** pdev_id for identifying the MAC |
| 10214 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10215 | */ |
| 10216 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10217 | } wmi_dfs_phyerr_filter_dis_cmd_fixed_param; |
| 10218 | |
| 10219 | /** TDLS COMMANDS */ |
| 10220 | |
| 10221 | /* WMI_TDLS_SET_STATE_CMDID */ |
| 10222 | /* TDLS State */ |
| 10223 | enum wmi_tdls_state { |
| 10224 | /** TDLS disable */ |
| 10225 | WMI_TDLS_DISABLE, |
| 10226 | /** TDLS enabled - no firmware connection tracking/notifications */ |
| 10227 | WMI_TDLS_ENABLE_PASSIVE, |
| 10228 | /** TDLS enabled - with firmware connection tracking/notifications */ |
| 10229 | WMI_TDLS_ENABLE_ACTIVE, |
| 10230 | /* TDLS enabled - firmware waits for peer mac for connection tracking */ |
| 10231 | WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10232 | /** TDLS enabled - TDLS connection tracking is done in host */ |
| 10233 | WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10234 | }; |
| 10235 | |
| 10236 | /* TDLS Options */ |
| 10237 | #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */ |
| 10238 | #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */ |
| 10239 | #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */ |
| 10240 | |
| 10241 | typedef struct { |
| 10242 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */ |
| 10243 | A_UINT32 tlv_header; |
| 10244 | /** unique id identifying the VDEV */ |
| 10245 | A_UINT32 vdev_id; |
| 10246 | /** Enable/Disable TDLS (wmi_tdls_state) */ |
| 10247 | A_UINT32 state; |
| 10248 | /* Duration (in ms) over which to calculate tx/rx threshold |
| 10249 | * to trigger TDLS Discovery |
| 10250 | */ |
| 10251 | A_UINT32 notification_interval_ms; |
| 10252 | /** number of packets OVER which notify/suggest TDLS Discovery: |
| 10253 | * if current tx pps counter / notification interval >= threshold |
| 10254 | * then a notification will be sent to host to advise TDLS Discovery */ |
| 10255 | A_UINT32 tx_discovery_threshold; |
| 10256 | /** number of packets UNDER which notify/suggest TDLS Teardown: |
| 10257 | * if current tx pps counter / notification interval < threshold |
| 10258 | * then a notification will be sent to host to advise TDLS Tear down */ |
| 10259 | A_UINT32 tx_teardown_threshold; |
| 10260 | /** Absolute RSSI value under which notify/suggest TDLS Teardown */ |
| 10261 | A_INT32 rssi_teardown_threshold; |
| 10262 | /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */ |
| 10263 | A_INT32 rssi_delta; |
| 10264 | /** TDLS Option Control |
| 10265 | * Off-Channel, Buffer STA, (later)Sleep STA support */ |
| 10266 | A_UINT32 tdls_options; |
| 10267 | /* Buffering time in number of beacon intervals */ |
| 10268 | A_UINT32 tdls_peer_traffic_ind_window; |
| 10269 | /* Wait time for PTR frame */ |
| 10270 | A_UINT32 tdls_peer_traffic_response_timeout_ms; |
| 10271 | /* Self PUAPSD mask */ |
| 10272 | A_UINT32 tdls_puapsd_mask; |
| 10273 | /* Inactivity timeout */ |
| 10274 | A_UINT32 tdls_puapsd_inactivity_time_ms; |
| 10275 | /* Max of rx frame during SP */ |
| 10276 | A_UINT32 tdls_puapsd_rx_frame_threshold; |
| 10277 | /* Duration (in ms) over which to check whether TDLS link |
| 10278 | * needs to be torn down |
| 10279 | */ |
| 10280 | A_UINT32 teardown_notification_ms; |
| 10281 | /* STA kickout threshold for TDLS peer */ |
| 10282 | A_UINT32 tdls_peer_kickout_threshold; |
| 10283 | } wmi_tdls_set_state_cmd_fixed_param; |
| 10284 | |
| 10285 | /* WMI_TDLS_PEER_UPDATE_CMDID */ |
| 10286 | |
| 10287 | enum wmi_tdls_peer_state { |
| 10288 | /** tx peer TDLS link setup now starting, traffic to DA should be |
| 10289 | * paused (except TDLS frames) until state is moved to CONNECTED (or |
| 10290 | * TEARDOWN on setup failure) */ |
| 10291 | WMI_TDLS_PEER_STATE_PEERING, |
| 10292 | /** tx peer TDLS link established, running (all traffic to DA unpaused) */ |
| 10293 | WMI_TDLS_PEER_STATE_CONNECTED, |
| 10294 | /** tx peer TDLS link tear down started (link paused, any frames |
| 10295 | * queued for DA will be requeued back through the AP)*/ |
| 10296 | WMI_TDLS_PEER_STATE_TEARDOWN, |
| 10297 | /* Add peer mac into connection table */ |
| 10298 | WMI_TDLS_PEER_ADD_MAC_ADDR, |
| 10299 | /* Remove peer mac from connection table */ |
| 10300 | WMI_TDLS_PEER_REMOVE_MAC_ADDR, |
| 10301 | }; |
| 10302 | |
| 10303 | /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */ |
| 10304 | #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 10305 | typedef struct { |
| 10306 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */ |
| 10307 | A_UINT32 tlv_header; |
| 10308 | /* Peer's QoS Info - for U-APSD */ |
| 10309 | /* AC FLAGS - accessed through macros below */ |
| 10310 | /* Ack, SP, More Data Ack - accessed through macros below */ |
| 10311 | A_UINT32 peer_qos; |
| 10312 | /*TDLS Peer's U-APSD Buffer STA Support */ |
| 10313 | A_UINT32 buff_sta_support; |
| 10314 | /*TDLS off channel related params */ |
| 10315 | A_UINT32 off_chan_support; |
| 10316 | A_UINT32 peer_curr_operclass; |
| 10317 | A_UINT32 self_curr_operclass; |
| 10318 | /* Number of channels available for off channel operation */ |
| 10319 | A_UINT32 peer_chan_len; |
| 10320 | A_UINT32 peer_operclass_len; |
| 10321 | A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 10322 | /* Is peer initiator or responder of TDLS setup request */ |
| 10323 | A_UINT32 is_peer_responder; |
| 10324 | /* Preferred off channel number as configured by user */ |
| 10325 | A_UINT32 pref_offchan_num; |
| 10326 | /* Preferred off channel bandwidth as configured by user */ |
| 10327 | A_UINT32 pref_offchan_bw; |
| 10328 | |
| 10329 | /** Followed by the variable length TLV peer_chan_list: |
| 10330 | * wmi_channel peer_chan_list[]. |
| 10331 | * Array size would be peer_chan_len. |
| 10332 | * This array is intersected channels which is supported by both peer |
| 10333 | * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0. |
| 10334 | * FW shall compute BW for an offchan based on peer's ht/vht cap |
| 10335 | * received in peer_assoc cmd during change STA operation |
| 10336 | */ |
| 10337 | } wmi_tdls_peer_capabilities; |
| 10338 | |
| 10339 | #define WMI_TDLS_QOS_VO_FLAG 0 |
| 10340 | #define WMI_TDLS_QOS_VI_FLAG 1 |
| 10341 | #define WMI_TDLS_QOS_BK_FLAG 2 |
| 10342 | #define WMI_TDLS_QOS_BE_FLAG 3 |
| 10343 | #define WMI_TDLS_QOS_ACK_FLAG 4 |
| 10344 | #define WMI_TDLS_QOS_SP_FLAG 5 |
| 10345 | #define WMI_TDLS_QOS_MOREDATA_FLAG 7 |
| 10346 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10347 | #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10348 | (ppeer_caps)->peer_qos |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10349 | } while (0) |
| 10350 | #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10351 | (((ppeer_caps)->peer_qos & (1 << flag)) >> flag) |
| 10352 | |
| 10353 | #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 10354 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 10355 | #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 10356 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 10357 | #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 10358 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 10359 | #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 10360 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 10361 | #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 10362 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 10363 | #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 10364 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 10365 | #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 10366 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 10367 | #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 10368 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 10369 | #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 10370 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 10371 | #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 10372 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 10373 | /* SP has 2 bits */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10374 | #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10375 | (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10376 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10377 | #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \ |
| 10378 | (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 10379 | |
| 10380 | #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 10381 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10382 | #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 10383 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10384 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10385 | #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10386 | (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10387 | } while (0) |
| 10388 | #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10389 | (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag) |
| 10390 | |
| 10391 | #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 10392 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 10393 | #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 10394 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 10395 | #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 10396 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 10397 | #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 10398 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 10399 | #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \ |
| 10400 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 10401 | #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \ |
| 10402 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 10403 | #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 10404 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 10405 | #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 10406 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 10407 | #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 10408 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 10409 | #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 10410 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 10411 | /* SP has 2 bits */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10412 | #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10413 | (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10414 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10415 | #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \ |
| 10416 | (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 10417 | |
| 10418 | #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 10419 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10420 | #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 10421 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10422 | |
| 10423 | typedef struct { |
| 10424 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */ |
| 10425 | A_UINT32 tlv_header; |
| 10426 | /** unique id identifying the VDEV */ |
| 10427 | A_UINT32 vdev_id; |
| 10428 | /** peer MAC address */ |
| 10429 | wmi_mac_addr peer_macaddr; |
| 10430 | /** new TDLS state for peer (wmi_tdls_peer_state) */ |
| 10431 | A_UINT32 peer_state; |
| 10432 | /* The TLV for wmi_tdls_peer_capabilities will follow. |
| 10433 | * wmi_tdls_peer_capabilities peer_caps; |
| 10434 | */ |
| 10435 | /** Followed by the variable length TLV chan_info: |
| 10436 | * wmi_channel chan_info[] */ |
| 10437 | } wmi_tdls_peer_update_cmd_fixed_param; |
| 10438 | |
| 10439 | /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */ |
| 10440 | |
| 10441 | /* bitmap 20, 40, 80 or 160 MHz wide channel */ |
| 10442 | #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */ |
| 10443 | #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */ |
| 10444 | #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */ |
| 10445 | #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */ |
| 10446 | |
| 10447 | enum wmi_tdls_offchan_mode { |
| 10448 | WMI_TDLS_ENABLE_OFFCHANNEL, |
| 10449 | WMI_TDLS_DISABLE_OFFCHANNEL |
| 10450 | }; |
| 10451 | |
| 10452 | typedef struct { |
| 10453 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */ |
| 10454 | A_UINT32 tlv_header; |
| 10455 | /** unique id identifying the VDEV */ |
| 10456 | A_UINT32 vdev_id; |
| 10457 | /** Enable/Disable TDLS offchannel */ |
| 10458 | A_UINT32 offchan_mode; |
| 10459 | /** peer MAC address */ |
| 10460 | wmi_mac_addr peer_macaddr; |
| 10461 | /* Is peer initiator or responder of TDLS setup request */ |
| 10462 | A_UINT32 is_peer_responder; |
| 10463 | /* off channel number */ |
| 10464 | A_UINT32 offchan_num; |
| 10465 | /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */ |
| 10466 | A_UINT32 offchan_bw_bitmap; |
| 10467 | /* operating class for offchan */ |
| 10468 | A_UINT32 offchan_oper_class; |
| 10469 | } wmi_tdls_set_offchan_mode_cmd_fixed_param; |
| 10470 | |
| 10471 | /** TDLS EVENTS */ |
| 10472 | enum wmi_tdls_peer_notification { |
| 10473 | /** tdls discovery recommended for peer (based |
| 10474 | * on tx bytes per second > tx_discover threshold) */ |
| 10475 | WMI_TDLS_SHOULD_DISCOVER, |
| 10476 | /** tdls link tear down recommended for peer |
| 10477 | * due to tx bytes per second below tx_teardown_threshold |
| 10478 | * NB: this notification sent once */ |
| 10479 | WMI_TDLS_SHOULD_TEARDOWN, |
| 10480 | /** tx peer TDLS link tear down complete */ |
| 10481 | WMI_TDLS_PEER_DISCONNECTED, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10482 | /** TDLS/BT role change notification for connection tracker */ |
| 10483 | WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10484 | }; |
| 10485 | |
| 10486 | enum wmi_tdls_peer_reason { |
| 10487 | /** tdls teardown recommended due to low transmits */ |
| 10488 | WMI_TDLS_TEARDOWN_REASON_TX, |
| 10489 | /** tdls link tear down recommended due to poor RSSI */ |
| 10490 | WMI_TDLS_TEARDOWN_REASON_RSSI, |
| 10491 | /** tdls link tear down recommended due to offchannel scan */ |
| 10492 | WMI_TDLS_TEARDOWN_REASON_SCAN, |
| 10493 | /** tdls peer disconnected due to peer deletion */ |
| 10494 | WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE, |
| 10495 | /** tdls peer disconnected due to PTR timeout */ |
| 10496 | WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT, |
| 10497 | /** tdls peer disconnected due wrong PTR format */ |
| 10498 | WMI_TDLS_TEARDOWN_REASON_BAD_PTR, |
| 10499 | /** tdls peer not responding */ |
| 10500 | WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10501 | /* |
| 10502 | * tdls entered buffer STA role, TDLS connection tracker |
| 10503 | * needs to handle this |
| 10504 | */ |
| 10505 | WMI_TDLS_ENTER_BUF_STA, |
| 10506 | /* |
| 10507 | * tdls exited buffer STA role, TDLS connection tracker |
| 10508 | * needs to handle this |
| 10509 | */ |
| 10510 | WMI_TDLS_EXIT_BUF_STA, |
| 10511 | /* BT entered busy mode, TDLS connection tracker needs to handle this */ |
| 10512 | WMI_TDLS_ENTER_BT_BUSY_MODE, |
| 10513 | /** BT exited busy mode, TDLS connection tracker needs to handle this */ |
| 10514 | WMI_TDLS_EXIT_BT_BUSY_MODE, |
Selvaraj, Sridhar | 217e9a9 | 2016-06-28 14:49:13 +0530 | [diff] [blame] | 10515 | /* |
| 10516 | * TDLS module received a scan start event, TDLS connection tracker |
| 10517 | * needs to handle this |
| 10518 | */ |
| 10519 | WMI_TDLS_SCAN_STARTED_EVENT, |
| 10520 | /* |
| 10521 | * TDLS module received a scan complete event, TDLS connection tracker |
| 10522 | * needs to handle this |
| 10523 | */ |
| 10524 | WMI_TDLS_SCAN_COMPLETED_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10525 | }; |
| 10526 | |
| 10527 | /* WMI_TDLS_PEER_EVENTID */ |
| 10528 | typedef struct { |
| 10529 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */ |
| 10530 | A_UINT32 tlv_header; |
| 10531 | /** peer MAC address */ |
| 10532 | wmi_mac_addr peer_macaddr; |
| 10533 | /** TDLS peer status (wmi_tdls_peer_notification)*/ |
| 10534 | A_UINT32 peer_status; |
| 10535 | /** TDLS peer reason (wmi_tdls_peer_reason) */ |
| 10536 | A_UINT32 peer_reason; |
| 10537 | /** unique id identifying the VDEV */ |
| 10538 | A_UINT32 vdev_id; |
| 10539 | } wmi_tdls_peer_event_fixed_param; |
| 10540 | |
| 10541 | /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please |
| 10542 | don't use this for any new implementations */ |
| 10543 | typedef struct { |
| 10544 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */ |
| 10545 | /** unique id identifying the VDEV, generated by the caller */ |
| 10546 | A_UINT32 vdev_id; |
| 10547 | /* New beacon interval to be used for the specified VDEV suggested by firmware */ |
| 10548 | A_UINT32 new_bcn_intvl; |
| 10549 | } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param; |
| 10550 | |
| 10551 | /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */ |
| 10552 | typedef struct { |
| 10553 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */ |
| 10554 | A_UINT32 tlv_header; |
| 10555 | /** 1: enable fw based adaptive ocs, |
| 10556 | * 0: disable fw based adaptive ocs |
| 10557 | */ |
| 10558 | A_UINT32 enable; |
| 10559 | /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10560 | union { |
| 10561 | /* OBSOLETE - will be removed once all refs are gone */ |
| 10562 | A_UINT32 mac_id; |
| 10563 | /** pdev_id for identifying the MAC |
| 10564 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10565 | */ |
| 10566 | A_UINT32 pdev_id; |
| 10567 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10568 | } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param; |
| 10569 | |
| 10570 | /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */ |
| 10571 | typedef struct { |
| 10572 | /* Frequency of the channel for which the quota is set */ |
| 10573 | A_UINT32 chan_mhz; |
| 10574 | /* Requested channel time quota expressed as percentage */ |
| 10575 | A_UINT32 channel_time_quota; |
| 10576 | } wmi_resmgr_chan_time_quota; |
| 10577 | |
| 10578 | typedef struct { |
| 10579 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */ |
| 10580 | A_UINT32 tlv_header; |
| 10581 | /** number of channel time quota command structures |
| 10582 | * (wmi_resmgr_chan_time_quota) 1 or 2 |
| 10583 | */ |
| 10584 | A_UINT32 num_chans; |
| 10585 | /* This TLV is followed by another TLV of array of bytes |
| 10586 | * A_UINT8 data[]; |
| 10587 | * This data array contains |
| 10588 | * num_chans * size of(struct wmi_resmgr_chan_time_quota) |
| 10589 | */ |
| 10590 | } wmi_resmgr_set_chan_time_quota_cmd_fixed_param; |
| 10591 | |
| 10592 | /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */ |
| 10593 | typedef struct { |
| 10594 | /* Frequency of the channel for which the latency is set */ |
| 10595 | A_UINT32 chan_mhz; |
| 10596 | /* Requested channel latency in milliseconds */ |
| 10597 | A_UINT32 latency; |
| 10598 | } wmi_resmgr_chan_latency; |
| 10599 | |
| 10600 | typedef struct { |
| 10601 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */ |
| 10602 | A_UINT32 tlv_header; |
| 10603 | /** number of channel latency command structures |
| 10604 | * (wmi_resmgr_chan_latency) 1 or 2 |
| 10605 | */ |
| 10606 | A_UINT32 num_chans; |
| 10607 | /* This TLV is followed by another TLV of array of bytes |
| 10608 | * A_UINT8 data[]; |
| 10609 | * This data array contains |
| 10610 | * num_chans * size of(struct wmi_resmgr_chan_latency) |
| 10611 | */ |
| 10612 | } wmi_resmgr_set_chan_latency_cmd_fixed_param; |
| 10613 | |
| 10614 | /* WMI_STA_SMPS_FORCE_MODE_CMDID */ |
| 10615 | |
| 10616 | /** STA SMPS Forced Mode */ |
| 10617 | typedef enum { |
| 10618 | WMI_SMPS_FORCED_MODE_NONE = 0, |
| 10619 | WMI_SMPS_FORCED_MODE_DISABLED, |
| 10620 | WMI_SMPS_FORCED_MODE_STATIC, |
| 10621 | WMI_SMPS_FORCED_MODE_DYNAMIC |
| 10622 | } wmi_sta_smps_forced_mode; |
| 10623 | |
| 10624 | typedef struct { |
| 10625 | /** TLV tag and len; tag equals |
| 10626 | * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */ |
| 10627 | A_UINT32 tlv_header; |
| 10628 | /** Unique id identifying the VDEV */ |
| 10629 | A_UINT32 vdev_id; |
| 10630 | /** The mode of SMPS that is to be forced in the FW. */ |
| 10631 | A_UINT32 forced_mode; |
| 10632 | } wmi_sta_smps_force_mode_cmd_fixed_param; |
| 10633 | |
| 10634 | /** wlan HB commands */ |
| 10635 | #define WMI_WLAN_HB_ITEM_UDP 0x1 |
| 10636 | #define WMI_WLAN_HB_ITEM_TCP 0x2 |
| 10637 | #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */ |
| 10638 | |
| 10639 | typedef struct { |
| 10640 | /** TLV tag and len; tag equals |
| 10641 | * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */ |
| 10642 | A_UINT32 tlv_header; |
| 10643 | A_UINT32 vdev_id; |
| 10644 | A_UINT32 enable; |
| 10645 | A_UINT32 item; |
| 10646 | A_UINT32 session; |
| 10647 | } wmi_hb_set_enable_cmd_fixed_param; |
| 10648 | |
| 10649 | typedef struct { |
| 10650 | /** TLV tag and len; tag equals |
| 10651 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */ |
| 10652 | A_UINT32 tlv_header; |
| 10653 | A_UINT32 vdev_id; |
| 10654 | A_UINT32 srv_ip; |
| 10655 | A_UINT32 dev_ip; |
| 10656 | A_UINT32 seq; |
| 10657 | A_UINT32 src_port; |
| 10658 | A_UINT32 dst_port; |
| 10659 | A_UINT32 interval; |
| 10660 | A_UINT32 timeout; |
| 10661 | A_UINT32 session; |
| 10662 | wmi_mac_addr gateway_mac; |
| 10663 | } wmi_hb_set_tcp_params_cmd_fixed_param; |
| 10664 | |
| 10665 | typedef struct { |
| 10666 | /** TLV tag and len; tag equals |
| 10667 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */ |
| 10668 | A_UINT32 tlv_header; |
| 10669 | A_UINT32 vdev_id; |
| 10670 | A_UINT32 length; |
| 10671 | A_UINT32 offset; |
| 10672 | A_UINT32 session; |
| 10673 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 10674 | } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param; |
| 10675 | |
| 10676 | typedef struct { |
| 10677 | /** TLV tag and len; tag equals |
| 10678 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */ |
| 10679 | A_UINT32 tlv_header; |
| 10680 | A_UINT32 vdev_id; |
| 10681 | A_UINT32 srv_ip; |
| 10682 | A_UINT32 dev_ip; |
| 10683 | A_UINT32 src_port; |
| 10684 | A_UINT32 dst_port; |
| 10685 | A_UINT32 interval; |
| 10686 | A_UINT32 timeout; |
| 10687 | A_UINT32 session; |
| 10688 | wmi_mac_addr gateway_mac; |
| 10689 | } wmi_hb_set_udp_params_cmd_fixed_param; |
| 10690 | |
| 10691 | typedef struct { |
| 10692 | /** TLV tag and len; tag equals |
| 10693 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */ |
| 10694 | A_UINT32 tlv_header; |
| 10695 | A_UINT32 vdev_id; |
| 10696 | A_UINT32 length; |
| 10697 | A_UINT32 offset; |
| 10698 | A_UINT32 session; |
| 10699 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 10700 | } wmi_hb_set_udp_pkt_filter_cmd_fixed_param; |
| 10701 | |
| 10702 | /** wlan HB events */ |
| 10703 | typedef enum { |
| 10704 | WMI_WLAN_HB_REASON_UNKNOWN = 0, |
| 10705 | WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1, |
| 10706 | WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2, |
| 10707 | } WMI_HB_WAKEUP_REASON; |
| 10708 | |
| 10709 | typedef struct { |
| 10710 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */ |
| 10711 | A_UINT32 vdev_id; /* unique id identifying the VDEV */ |
| 10712 | A_UINT32 session; /* Session ID from driver */ |
| 10713 | A_UINT32 reason; /* wakeup reason */ |
| 10714 | } wmi_hb_ind_event_fixed_param; |
| 10715 | |
| 10716 | /** WMI_STA_SMPS_PARAM_CMDID */ |
| 10717 | typedef enum { |
| 10718 | /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */ |
| 10719 | WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0, |
| 10720 | /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or |
| 10721 | * to enter D-SMPS mode from Stalled-D-SMPS mode */ |
| 10722 | WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1, |
| 10723 | /** RSSI threshold to disable SMPS modes */ |
| 10724 | WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2, |
| 10725 | /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */ |
| 10726 | WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3, |
| 10727 | /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */ |
| 10728 | WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4, |
| 10729 | /** Enable/Disable DTIM 1chRx feature */ |
| 10730 | WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5 |
| 10731 | } wmi_sta_smps_param; |
| 10732 | |
| 10733 | typedef struct { |
| 10734 | /** TLV tag and len; tag equals |
| 10735 | * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */ |
| 10736 | A_UINT32 tlv_header; |
| 10737 | /** Unique id identifying the VDEV */ |
| 10738 | A_UINT32 vdev_id; |
| 10739 | /** SMPS parameter (see wmi_sta_smps_param) */ |
| 10740 | A_UINT32 param; |
| 10741 | /** Value of SMPS parameter */ |
| 10742 | A_UINT32 value; |
| 10743 | } wmi_sta_smps_param_cmd_fixed_param; |
| 10744 | |
| 10745 | typedef struct { |
| 10746 | /** TLV tag and len; tag equals |
| 10747 | * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */ |
| 10748 | A_UINT32 tlv_header; |
| 10749 | /* TX stats */ |
| 10750 | A_UINT32 txBytesPushed; |
| 10751 | A_UINT32 txPacketsPushed; |
| 10752 | /* RX stats */ |
| 10753 | A_UINT32 rxBytesRcvd; |
| 10754 | A_UINT32 rxPacketsRcvd; |
| 10755 | A_UINT32 rxTimeTotal; |
| 10756 | /** peer MAC address */ |
| 10757 | wmi_mac_addr peer_macaddr; |
| 10758 | } wmi_mcc_sched_sta_traffic_stats; |
| 10759 | |
| 10760 | typedef struct { |
| 10761 | /** TLV tag and len; tag equals |
| 10762 | * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */ |
| 10763 | A_UINT32 tlv_header; |
| 10764 | /** Duration over which the host stats were collected */ |
| 10765 | A_UINT32 duration; |
| 10766 | /** Number of stations filled in following stats array */ |
| 10767 | A_UINT32 num_sta; |
| 10768 | /* Following this struct are the TLVs: |
| 10769 | * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list; |
| 10770 | */ |
| 10771 | } wmi_mcc_sched_traffic_stats_cmd_fixed_param; |
| 10772 | |
| 10773 | typedef struct { |
| 10774 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */ |
| 10775 | /* unique id identifying the VDEV, generated by the caller */ |
| 10776 | A_UINT32 vdev_id; |
| 10777 | /*Batch scan enable command parameters */ |
| 10778 | A_UINT32 scanInterval; |
| 10779 | A_UINT32 numScan2Batch; |
| 10780 | A_UINT32 bestNetworks; |
| 10781 | A_UINT32 rfBand; |
| 10782 | A_UINT32 rtt; |
| 10783 | } wmi_batch_scan_enable_cmd_fixed_param; |
| 10784 | |
| 10785 | typedef struct { |
| 10786 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */ |
| 10787 | A_UINT32 supportedMscan; |
| 10788 | } wmi_batch_scan_enabled_event_fixed_param; |
| 10789 | |
| 10790 | typedef struct { |
| 10791 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */ |
| 10792 | /* unique id identifying the VDEV, generated by the caller */ |
| 10793 | A_UINT32 vdev_id; |
| 10794 | A_UINT32 param; |
| 10795 | } wmi_batch_scan_disable_cmd_fixed_param; |
| 10796 | |
| 10797 | typedef struct { |
| 10798 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */ |
| 10799 | /** unique id identifying the VDEV, generated by the caller */ |
| 10800 | A_UINT32 vdev_id; |
| 10801 | A_UINT32 param; |
| 10802 | } wmi_batch_scan_trigger_result_cmd_fixed_param; |
| 10803 | |
| 10804 | typedef struct { |
| 10805 | A_UINT32 tlv_header; |
| 10806 | wmi_mac_addr bssid; /* BSSID */ |
| 10807 | wmi_ssid ssid; /* SSID */ |
| 10808 | A_UINT32 ch; /* Channel */ |
| 10809 | A_UINT32 rssi; /* RSSI or Level */ |
| 10810 | /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */ |
| 10811 | A_UINT32 timestamp; |
| 10812 | } wmi_batch_scan_result_network_info; |
| 10813 | |
| 10814 | typedef struct { |
| 10815 | A_UINT32 tlv_header; |
| 10816 | A_UINT32 scanId; /* Scan List ID. */ |
| 10817 | /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */ |
| 10818 | A_UINT32 numNetworksInScanList; |
| 10819 | A_UINT32 netWorkStartIndex; /* indicate the start index of network info */ |
| 10820 | } wmi_batch_scan_result_scan_list; |
| 10821 | |
| 10822 | #define LPI_IE_BITMAP_BSSID 0x00000001 /* if this bit is set, bssid of the scan response frame is sent as the first IE in the data buffer sent to LOWI LP.*/ |
| 10823 | #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/ |
| 10824 | #define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/ |
| 10825 | #define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/ |
| 10826 | #define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/ |
| 10827 | #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/ |
| 10828 | #define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/ |
| 10829 | #define LPI_IE_BITMAP_80211_MC_SUPPORT 0x00000080 /*send true or false based on the received scan rsp was from a 11mc supported AP or not.*/ |
| 10830 | #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/ |
| 10831 | #define LPI_IE_BITMAP_AGE_OF_MEASUREMENT 0x00000200 /* current system time - received time) = duration of time scan rsp frame data is kept in the buffer before sending to LOWI LP.*/ |
| 10832 | /* |
| 10833 | * TEMPORARY alias of incorrect old name the correct name. |
| 10834 | * This alias will be removed once all references to the old name have been fixed. |
| 10835 | */ |
| 10836 | #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT |
| 10837 | #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/ |
| 10838 | #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/ |
| 10839 | #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/ |
| 10840 | #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/ |
| 10841 | #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/ |
| 10842 | #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/ |
| 10843 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/ |
| 10844 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/ |
| 10845 | #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/ |
| 10846 | #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/ |
| 10847 | #define LPI_IE_BITMAP_SCAN_ID 0x00100000 /*extscan inserts the scan cycle count for this value; other scan clients can insert the scan id of the scan, if needed.*/ |
| 10848 | #define LPI_IE_BITMAP_FLAGS 0x00200000 /* reserved as a bitmap to indicate more scan information; one such use being to indicate if the on-going scan is interrupted or not*/ |
| 10849 | #define LPI_IE_BITMAP_CACHING_REQD 0x00400000 /*extscan will use this field to indicate if this frame info needs to be cached in LOWI LP or not*/ |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 10850 | /* |
| 10851 | * extscan will use this field to indicate to |
| 10852 | * LOWI LP whether to report result to context hub or not |
| 10853 | */ |
| 10854 | #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10855 | #define LPI_IE_BITMAP_ALL 0xFFFFFFFF |
| 10856 | |
| 10857 | typedef struct { |
| 10858 | A_UINT32 tlv_header; |
| 10859 | /**A_BOOL indicates LPI mgmt snooping enable/disable*/ |
| 10860 | A_UINT32 enable; |
| 10861 | /**LPI snooping mode*/ |
| 10862 | A_UINT32 snooping_mode; |
| 10863 | /** LPI interested IEs in snooping context */ |
| 10864 | A_UINT32 ie_bitmap; |
| 10865 | } wmi_lpi_mgmt_snooping_config_cmd_fixed_param; |
| 10866 | |
| 10867 | typedef struct { |
| 10868 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 10869 | /** Scan ID */ |
| 10870 | A_UINT32 scan_id; |
| 10871 | /** Scan requestor ID */ |
| 10872 | A_UINT32 scan_req_id; |
| 10873 | /** VDEV id(interface) that is requesting scan */ |
| 10874 | A_UINT32 vdev_id; |
| 10875 | /** LPI interested IEs in scan context */ |
| 10876 | A_UINT32 ie_bitmap; |
| 10877 | /** Scan Priority, input to scan scheduler */ |
| 10878 | A_UINT32 scan_priority; |
| 10879 | /** dwell time in msec on active channels */ |
| 10880 | A_UINT32 dwell_time_active; |
| 10881 | /** dwell time in msec on passive channels */ |
| 10882 | A_UINT32 dwell_time_passive; |
| 10883 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 10884 | A_UINT32 min_rest_time; |
| 10885 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 10886 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 10887 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 10888 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 10889 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 10890 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 10891 | */ |
| 10892 | A_UINT32 max_rest_time; |
| 10893 | /** time before sending next set of probe requests. |
| 10894 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 10895 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 10896 | */ |
| 10897 | A_UINT32 repeat_probe_time; |
| 10898 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 10899 | A_UINT32 probe_spacing_time; |
| 10900 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 10901 | A_UINT32 idle_time; |
| 10902 | /** maximum time in msec allowed for scan */ |
| 10903 | A_UINT32 max_scan_time; |
| 10904 | /** delay in msec before sending first probe request after switching to a channel */ |
| 10905 | A_UINT32 probe_delay; |
| 10906 | /** Scan control flags */ |
| 10907 | A_UINT32 scan_ctrl_flags; |
| 10908 | /** Burst duration time in msec*/ |
| 10909 | A_UINT32 burst_duration; |
| 10910 | |
| 10911 | /** # if channels to scan. In the TLV channel_list[] */ |
| 10912 | A_UINT32 num_chan; |
| 10913 | /** number of bssids. In the TLV bssid_list[] */ |
| 10914 | A_UINT32 num_bssid; |
| 10915 | /** number of ssid. In the TLV ssid_list[] */ |
| 10916 | A_UINT32 num_ssids; |
| 10917 | /** number of bytes in ie data. In the TLV ie_data[] */ |
| 10918 | A_UINT32 ie_len; |
| 10919 | |
| 10920 | /** |
| 10921 | * TLV (tag length value ) parameters follow the scan_cmd |
| 10922 | * structure. The TLV's are: |
| 10923 | * A_UINT32 channel_list[]; |
| 10924 | * wmi_ssid ssid_list[]; |
| 10925 | * wmi_mac_addr bssid_list[]; |
| 10926 | * A_UINT8 ie_data[]; |
| 10927 | */ |
| 10928 | } wmi_lpi_start_scan_cmd_fixed_param; |
| 10929 | |
| 10930 | typedef struct { |
| 10931 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 10932 | /** Scan requestor ID */ |
| 10933 | A_UINT32 scan_req_id; |
| 10934 | /** Scan ID */ |
| 10935 | A_UINT32 scan_id; |
| 10936 | /** |
| 10937 | * Req Type |
| 10938 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 10939 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 10940 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 10941 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 10942 | */ |
| 10943 | A_UINT32 req_type; |
| 10944 | /** |
| 10945 | * vDev ID |
| 10946 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 10947 | */ |
| 10948 | A_UINT32 vdev_id; |
| 10949 | } wmi_lpi_stop_scan_cmd_fixed_param; |
| 10950 | |
| 10951 | typedef enum { |
| 10952 | WMI_LPI_DEVICE_TYPE_AP = 1, |
| 10953 | WMI_LPI_DEVICE_TYPE_P2P = 2, |
| 10954 | WMI_LPI_DEVICE_TYPE_NAN = 3, |
| 10955 | } wmi_lpi_device_type; |
| 10956 | |
| 10957 | typedef struct { |
| 10958 | A_UINT32 tlv_header; |
| 10959 | /** Scan requestor ID */ |
| 10960 | A_UINT32 scan_req_id; |
| 10961 | A_UINT32 ie_bitmap; |
| 10962 | A_UINT32 data_len; |
| 10963 | } wmi_lpi_result_event_fixed_param; |
| 10964 | |
| 10965 | typedef enum { |
| 10966 | /** User scan Request completed */ |
| 10967 | WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0, |
| 10968 | /** User Request was never serviced */ |
| 10969 | WMI_LPI_STATUS_DROPPED_REQ = 1, |
| 10970 | /** Illegal channel Req */ |
| 10971 | WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2, |
| 10972 | /** Illegal Operation Req */ |
| 10973 | WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3, |
| 10974 | /** Request Aborted */ |
| 10975 | WMI_LPI_STATUS_REQ_ABORTED = 4, |
| 10976 | /** Request Timed Out */ |
| 10977 | WMI_LPI_STATUS_REQ_TIME_OUT = 5, |
| 10978 | /** Medium Busy, already there |
| 10979 | * is a scan is going on */ |
| 10980 | WMI_LPI_STATUS_MEDIUM_BUSY = 6, |
| 10981 | /* Extscan is the scan client whose scan complete event is triggered */ |
| 10982 | WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7, |
| 10983 | } wmi_lpi_staus; |
| 10984 | |
| 10985 | typedef struct { |
| 10986 | A_UINT32 tlv_header; |
| 10987 | wmi_lpi_staus status; |
| 10988 | /** Scan requestor ID */ |
| 10989 | A_UINT32 scan_req_id; |
| 10990 | } wmi_lpi_status_event_fixed_param; |
| 10991 | |
| 10992 | typedef struct { |
| 10993 | A_UINT32 tlv_header; |
| 10994 | wmi_mac_addr bssid; |
| 10995 | wmi_ssid ssid; |
| 10996 | A_UINT32 freq; |
| 10997 | A_UINT32 rssi; |
| 10998 | A_UINT32 vdev_id; |
| 10999 | } wmi_lpi_handoff_event_fixed_param; |
| 11000 | |
| 11001 | typedef struct { |
| 11002 | A_UINT32 tlv_header; |
| 11003 | A_UINT32 timestamp; /*timestamp of batch scan event */ |
| 11004 | A_UINT32 numScanLists; /*number of scan in this event */ |
| 11005 | A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */ |
| 11006 | } wmi_batch_scan_result_event_fixed_param; |
| 11007 | |
| 11008 | typedef struct { |
| 11009 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */ |
| 11010 | A_UINT32 vdev_id; |
| 11011 | /* This TLV is followed by p2p_noa_info for vdev : |
| 11012 | * wmi_p2p_noa_info p2p_noa_info; |
| 11013 | */ |
| 11014 | } wmi_p2p_noa_event_fixed_param; |
| 11015 | |
| 11016 | #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6 |
| 11017 | #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1 |
| 11018 | |
| 11019 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 11020 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f |
| 11021 | |
| 11022 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7 |
| 11023 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf |
| 11024 | |
| 11025 | typedef struct { |
| 11026 | /** TLV tag and len; tag equals |
| 11027 | * */ |
| 11028 | A_UINT32 tlv_header; |
| 11029 | /** gpip pin number */ |
| 11030 | A_UINT32 gpio_pin_num; |
| 11031 | /** gpio interupt type */ |
| 11032 | A_UINT32 int_type; |
| 11033 | /** RF radio status */ |
| 11034 | A_UINT32 radio_state; |
| 11035 | } wmi_rfkill_mode_param; |
| 11036 | |
| 11037 | typedef enum { |
| 11038 | WMI_SET_LED_SYS_POWEROFF, |
| 11039 | WMI_SET_LED_SYS_S3_SUSPEND, |
| 11040 | WMI_SET_LED_SYS_S4_S5, |
| 11041 | WMI_SET_LED_SYS_DRIVER_DISABLE, |
| 11042 | WMI_SET_LED_SYS_WAKEUP, |
| 11043 | WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */ |
| 11044 | WMI_SET_LED_SYS_POWERON, |
| 11045 | } wmi_led_sys_state_param; |
| 11046 | |
| 11047 | typedef enum { |
| 11048 | WMI_CONFIG_LED_TO_VDD = 0, |
| 11049 | WMI_CONFIG_LED_TO_GND = 1, |
| 11050 | } wmi_config_led_connect_type; |
| 11051 | |
| 11052 | typedef enum { |
| 11053 | WMI_CONFIG_LED_NOT_WITH_BT = 0, |
| 11054 | WMI_CONFIG_LED_WITH_BT = 1, |
| 11055 | } wmi_config_led_with_bt_flag; |
| 11056 | |
| 11057 | typedef enum { |
| 11058 | WMI_CONFIG_LED_DISABLE = 0, |
| 11059 | WMI_CONFIG_LED_ENABLE = 1, |
| 11060 | } wmi_config_led_enable_flag; |
| 11061 | |
Sreelakshmi Konamki | f9bde84 | 2016-03-03 19:03:02 +0530 | [diff] [blame] | 11062 | typedef enum { |
| 11063 | WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0, |
| 11064 | WMI_CONFIG_LED_HIGH_OFF = 1, |
| 11065 | WMI_CONFIG_LED_HIGH_ON = 2, |
| 11066 | } wmi_config_led_on_flag; |
| 11067 | |
| 11068 | typedef enum { |
| 11069 | WMI_CONFIG_LED_UNSPECIFIED = 0, |
| 11070 | WMI_CONFIG_LED_ON = 1, |
| 11071 | WMI_CONFIG_LED_OFF = 2, |
| 11072 | WMI_CONFIG_LED_DIM = 3, |
| 11073 | WMI_CONFIG_LED_BLINK = 4, |
| 11074 | WMI_CONFIG_LED_TXRX = 5, |
| 11075 | } wmi_config_led_operation_type; |
| 11076 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11077 | typedef struct { |
| 11078 | /** TLV tag and len; tag equals |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11079 | * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11080 | A_UINT32 tlv_header; |
| 11081 | /* Set GPIO pin */ |
| 11082 | A_UINT32 led_gpio_pin; |
| 11083 | /* Set connect type defined in wmi_config_led_connect_type */ |
| 11084 | A_UINT32 connect_type; |
| 11085 | /* Set flag defined in wmi_config_led_with_bt_flag */ |
| 11086 | A_UINT32 with_bt; |
| 11087 | /* Set LED enablement defined in wmi_config_led_enable_flag */ |
| 11088 | A_UINT32 led_enable; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11089 | /** pdev_id for identifying the MAC |
| 11090 | * See macros starting with WMI_PDEV_ID_ for values. |
| 11091 | */ |
| 11092 | A_UINT32 pdev_id; |
Sreelakshmi Konamki | f9bde84 | 2016-03-03 19:03:02 +0530 | [diff] [blame] | 11093 | /* see wmi_config_led_operation_type enum */ |
| 11094 | A_UINT32 led_operation_type; |
| 11095 | /* see wmi_config_led_on_flag enum */ |
| 11096 | A_UINT32 led_on_flag; /* configure high/low on/off sense */ |
| 11097 | A_UINT32 led_on_interval; /* for blink function; unit: ms */ |
| 11098 | A_UINT32 led_off_interval; /* for blink function; unit: ms */ |
| 11099 | A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11100 | } wmi_pdev_set_led_config_cmd_fixed_param; |
| 11101 | |
| 11102 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 11103 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff |
| 11104 | |
| 11105 | /** WMI_PEER_INFO_REQ_CMDID |
| 11106 | * Request FW to provide peer info */ |
| 11107 | typedef struct { |
| 11108 | /** TLV tag and len; tag equals |
| 11109 | * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */ |
| 11110 | A_UINT32 tlv_header; |
| 11111 | /** In order to get the peer info for a single peer, host shall |
| 11112 | * issue the peer_mac_address of that peer. For getting the |
| 11113 | * info all peers, the host shall issue 0xFFFFFFFF as the mac |
| 11114 | * address. The firmware will return the peer info for all the |
| 11115 | * peers on the specified vdev_id */ |
| 11116 | wmi_mac_addr peer_mac_address; |
| 11117 | /** vdev id */ |
| 11118 | A_UINT32 vdev_id; |
| 11119 | } wmi_peer_info_req_cmd_fixed_param; |
| 11120 | |
| 11121 | typedef struct { |
| 11122 | /** TLV tag and len; tag equals |
| 11123 | * WMITLV_TAG_STRUC_wmi_peer_info */ |
| 11124 | A_UINT32 tlv_header; |
| 11125 | /** mac addr of the peer */ |
| 11126 | wmi_mac_addr peer_mac_address; |
| 11127 | /** data_rate of the peer */ |
| 11128 | A_UINT32 data_rate; |
| 11129 | /** rssi of the peer */ |
| 11130 | A_UINT32 rssi; |
| 11131 | /** tx fail count */ |
| 11132 | A_UINT32 tx_fail_cnt; |
| 11133 | } wmi_peer_info; |
| 11134 | |
| 11135 | /** FW response with the peer info */ |
| 11136 | typedef struct { |
| 11137 | /** TLV tag and len; tag equals |
| 11138 | * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */ |
| 11139 | A_UINT32 tlv_header; |
| 11140 | /** number of peers in peer_info */ |
| 11141 | A_UINT32 num_peers; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11142 | /* Set to 1 only if vdev_id field is valid */ |
| 11143 | A_UINT32 valid_vdev_id; |
| 11144 | /* VDEV to which the peer belongs to */ |
| 11145 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11146 | /* This TLV is followed by another TLV of array of structs |
| 11147 | * wmi_peer_info peer_info[]; |
| 11148 | */ |
| 11149 | } wmi_peer_info_event_fixed_param; |
| 11150 | |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 11151 | /** |
| 11152 | * WMI_PEER_ANTDIV_INFO_REQ_CMDID |
| 11153 | * Request FW to provide peer info |
| 11154 | */ |
| 11155 | typedef struct { |
| 11156 | /** |
| 11157 | * TLV tag and len; tag equals |
| 11158 | * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_req_cmd_fixed_param |
| 11159 | */ |
| 11160 | A_UINT32 tlv_header; |
| 11161 | /** |
| 11162 | * In order to get the peer antdiv info for a single peer, host shall |
| 11163 | * issue the peer_mac_address of that peer. For getting the |
| 11164 | * info all peers, the host shall issue 0xFFFFFFFF as the mac |
| 11165 | * address. The firmware will return the peer info for all the |
| 11166 | * peers on the specified vdev_id |
| 11167 | */ |
| 11168 | wmi_mac_addr peer_mac_address; |
| 11169 | /** vdev id */ |
| 11170 | A_UINT32 vdev_id; |
| 11171 | } wmi_peer_antdiv_info_req_cmd_fixed_param; |
| 11172 | |
| 11173 | /** FW response with the peer antdiv info */ |
| 11174 | typedef struct { |
| 11175 | /** TLV tag and len; tag equals |
| 11176 | * WMITLV_TAG_STRUC_wmi_peer_antdiv_info_event_fixed_param |
| 11177 | */ |
| 11178 | A_UINT32 tlv_header; |
| 11179 | /** number of peers in peer_info */ |
| 11180 | A_UINT32 num_peers; |
| 11181 | /** VDEV to which the peer belongs to */ |
| 11182 | A_UINT32 vdev_id; |
| 11183 | /** |
| 11184 | * This TLV is followed by another TLV of array of structs |
| 11185 | * wmi_peer_antdiv_info peer_antdiv_info[]; |
| 11186 | */ |
| 11187 | } wmi_peer_antdiv_info_event_fixed_param; |
| 11188 | |
| 11189 | typedef struct { |
| 11190 | /** |
| 11191 | * TLV tag and len; tag equals |
| 11192 | * WMITLV_TAG_STRUC_wmi_peer_antdiv_info |
| 11193 | */ |
| 11194 | A_UINT32 tlv_header; |
| 11195 | /** mac addr of the peer */ |
| 11196 | wmi_mac_addr peer_mac_address; |
| 11197 | /** |
| 11198 | * per chain rssi of the peer, for up to 8 chains. |
| 11199 | * Each chain's entry reports the RSSI for different bandwidths: |
| 11200 | * bits 7:0 -> primary 20 MHz |
| 11201 | * bits 15:8 -> secondary 20 MHz of 40 MHz channel (if applicable) |
| 11202 | * bits 23:16 -> secondary 40 MHz of 80 MHz channel (if applicable) |
| 11203 | * bits 31:24 -> secondary 80 MHz of 160 MHz channel (if applicable) |
| 11204 | * Each of these 8-bit RSSI reports is in dB units, with respect to |
| 11205 | * the noise floor. |
| 11206 | * 0x80 means invalid. |
| 11207 | * All unused bytes within used chain_rssi indices shall be |
| 11208 | * set to 0x80. |
| 11209 | * All unused chain_rssi indices shall be set to 0x80808080. |
| 11210 | */ |
| 11211 | A_INT32 chain_rssi[8]; |
| 11212 | } wmi_peer_antdiv_info; |
| 11213 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11214 | /** FW response when tx failure count has reached threshold |
| 11215 | * for a peer */ |
| 11216 | typedef struct { |
| 11217 | /** TLV tag and len; tag equals |
| 11218 | * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */ |
| 11219 | A_UINT32 tlv_header; |
| 11220 | /** vdev id*/ |
| 11221 | A_UINT32 vdev_id; |
| 11222 | /** mac address */ |
| 11223 | wmi_mac_addr peer_mac_address; |
| 11224 | /** tx failure count- will eventually be removed and not used * */ |
| 11225 | A_UINT32 tx_fail_cnt; |
| 11226 | /** seq number of the nth tx_fail_event */ |
| 11227 | A_UINT32 seq_no; |
| 11228 | } wmi_peer_tx_fail_cnt_thr_event_fixed_param; |
| 11229 | |
| 11230 | enum wmi_rmc_mode { |
| 11231 | /** Disable RMC */ |
| 11232 | WMI_RMC_MODE_DISABLED = 0, |
| 11233 | /** Enable RMC */ |
| 11234 | WMI_RMC_MODE_ENABLED = 1, |
| 11235 | }; |
| 11236 | |
| 11237 | /** Enable RMC transmitter functionality. Upon |
| 11238 | * receiving this, the FW shall mutlicast frames with |
| 11239 | * reliablity. This is a vendor |
| 11240 | * proprietary feature. */ |
| 11241 | typedef struct { |
| 11242 | /** TLV tag and len; tag equals |
| 11243 | * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */ |
| 11244 | A_UINT32 tlv_header; |
| 11245 | /** vdev id*/ |
| 11246 | A_UINT32 vdev_id; |
| 11247 | /** enable_rmc contains values from enum wmi_rmc_mode; |
| 11248 | * Default value: 0 (disabled) */ |
| 11249 | A_UINT32 enable_rmc; |
| 11250 | } wmi_rmc_set_mode_cmd_fixed_param; |
| 11251 | |
| 11252 | /** Configure transmission periodicity of action frames in a |
| 11253 | * RMC network for the multicast transmitter */ |
| 11254 | typedef struct { |
| 11255 | /** TLV tag and len; tag equals |
| 11256 | * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */ |
| 11257 | A_UINT32 tlv_header; |
| 11258 | /** vdev id */ |
| 11259 | A_UINT32 vdev_id; |
| 11260 | /** time period in milliseconds. Default: 300 ms. |
| 11261 | An action frame indicating the current leader is transmitted by the |
| 11262 | RMC transmitter once every 'periodity_msec' */ |
| 11263 | A_UINT32 periodicity_msec; |
| 11264 | } wmi_rmc_set_action_period_cmd_fixed_param; |
| 11265 | |
| 11266 | /** Optimise Leader selection process in RMC functionality. For |
| 11267 | * Enhancement/Debug purposes only */ |
| 11268 | typedef struct { |
| 11269 | /** TLV tag and len; tag equals |
| 11270 | * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */ |
| 11271 | A_UINT32 tlv_header; |
| 11272 | /** vdev id */ |
| 11273 | A_UINT32 vdev_id; |
| 11274 | /** flags :: |
| 11275 | * 0x0001 - Enable beacon averaging |
| 11276 | * 0x0002 - Force leader selection |
| 11277 | * 0x0004 - Enable Timer based leader switch |
| 11278 | * 0x0008 - Use qos/NULL based for multicast reliability */ |
| 11279 | A_UINT32 flags; |
| 11280 | /** control leader change timeperiod (in seconds) */ |
| 11281 | A_UINT32 peridocity_leader_switch; |
| 11282 | /** control activity timeout value for data rx (in seconds) */ |
| 11283 | A_UINT32 data_activity_timeout; |
| 11284 | /** mac address of leader */ |
| 11285 | wmi_mac_addr forced_leader_mac_addr; |
| 11286 | } wmi_rmc_config_cmd_fixed_param; |
| 11287 | |
| 11288 | /** MHF is generally implemented in |
| 11289 | * the kernel. To decrease system power consumption, the |
| 11290 | * driver can enable offloading this to the chipset. In |
| 11291 | * order for the offload, the firmware needs the routing table. |
| 11292 | * The host shall plumb the routing table into FW. The firmware |
| 11293 | * shall perform an IP address lookup and forward the packet to |
| 11294 | * the next hop using next hop's mac address. This is a vendor |
| 11295 | * proprietary feature. */ |
| 11296 | enum wmi_mhf_ofl_mode { |
| 11297 | /** Disable MHF offload */ |
| 11298 | WMI_MHF_OFL_MODE_DISABLED = 0, |
| 11299 | /** Enable MHF offload */ |
| 11300 | WMI_MHF_OFL_MODE_ENABLED = 1, |
| 11301 | }; |
| 11302 | |
| 11303 | typedef struct { |
| 11304 | /** TLV tag and len; tag equals |
| 11305 | * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */ |
| 11306 | A_UINT32 tlv_header; |
| 11307 | /** vdev id*/ |
| 11308 | A_UINT32 vdev_id; |
| 11309 | /** enable_mhf_ofl contains values from enum |
| 11310 | * wmi_mhf_ofl_mode; Default value: 0 (disabled) */ |
| 11311 | A_UINT32 enable_mhf_ofl; |
| 11312 | } wmi_mhf_offload_set_mode_cmd_fixed_param; |
| 11313 | |
| 11314 | enum wmi_mhf_ofl_table_action { |
| 11315 | /** Create forwarding offload table in FW */ |
| 11316 | WMI_MHF_OFL_TBL_CREATE = 0, |
| 11317 | /** Append to existing MHF offload table */ |
| 11318 | WMI_MHF_OFL_TBL_APPEND = 1, |
| 11319 | /** Flush entire MHF offload table in FW */ |
| 11320 | WMI_MHF_OFL_TBL_FLUSH = 2, |
| 11321 | }; |
| 11322 | |
| 11323 | typedef struct { |
| 11324 | /** TLV tag and len; tag equals |
| 11325 | * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */ |
| 11326 | A_UINT32 tlv_header; |
| 11327 | /** vdev id*/ |
| 11328 | A_UINT32 vdev_id; |
| 11329 | /** action corresponds to values from enum |
| 11330 | * wmi_mhf_ofl_table_action */ |
| 11331 | A_UINT32 action; |
| 11332 | /** number of entries in the table */ |
| 11333 | A_UINT32 num_entries; |
| 11334 | /** Followed by the variable length TLV |
| 11335 | * wmi_mhf_offload_routing_table_entry entries[] */ |
| 11336 | } wmi_mhf_offload_plumb_routing_table_cmd; |
| 11337 | |
| 11338 | typedef struct { |
| 11339 | /** TLV tag and len; tag equals |
| 11340 | * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */ |
| 11341 | A_UINT32 tlv_header; |
| 11342 | /** Destination node's IP address */ |
| 11343 | WMI_IPV4_ADDR dest_ipv4_addr; |
| 11344 | /** Next hop node's MAC address */ |
| 11345 | wmi_mac_addr next_hop_mac_addr; |
| 11346 | } wmi_mhf_offload_routing_table_entry; |
| 11347 | |
| 11348 | typedef struct { |
| 11349 | /** tlv tag and len, tag equals |
| 11350 | * WMITLV_TAG_STRUC_wmi_dfs_radar_event */ |
| 11351 | A_UINT32 tlv_header; |
| 11352 | |
| 11353 | /** full 64 tsf timestamp get from MAC tsf timer indicates |
| 11354 | * the time that the radar event uploading to host, split |
| 11355 | * it to high 32 bit and lower 32 bit in fulltsf_high and |
| 11356 | * full_tsf_low |
| 11357 | */ |
| 11358 | A_UINT32 upload_fullts_low; |
| 11359 | A_UINT32 upload_fullts_high; |
| 11360 | |
| 11361 | /** timestamp indicates the time when DFS pulse is detected |
| 11362 | * equal to ppdu_end_ts - radar_pusle_summary_ts_offset |
| 11363 | */ |
| 11364 | A_UINT32 pulse_detect_ts; |
| 11365 | |
| 11366 | /** the duaration of the pulse in us */ |
| 11367 | A_UINT32 pulse_duration; |
| 11368 | |
| 11369 | /** the center frequency of the radar pulse detected, KHz */ |
| 11370 | A_UINT32 pulse_center_freq; |
| 11371 | |
| 11372 | /** bandwidth of current DFS channel, MHz */ |
| 11373 | A_UINT32 ch_bandwidth; |
| 11374 | |
| 11375 | /** center channel frequency1 of current DFS channel, MHz */ |
| 11376 | A_UINT16 ch_center_freq1; |
| 11377 | |
| 11378 | /** center channel frequency2 of current DFS channel, MHz, |
| 11379 | * reserved for 160 BW mode |
| 11380 | */ |
| 11381 | A_UINT16 ch_center_freq2; |
| 11382 | |
| 11383 | /** flag to indicate if this pulse is chirp */ |
| 11384 | A_UINT8 pulse_is_chirp; |
| 11385 | |
| 11386 | /** RSSI recorded in the ppdu */ |
| 11387 | A_UINT8 rssi; |
| 11388 | |
| 11389 | /** extened RSSI info */ |
| 11390 | A_UINT8 rssi_ext; |
| 11391 | |
| 11392 | /** For 4-byte aligment padding */ |
| 11393 | A_UINT8 reserved; |
| 11394 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11395 | union { |
| 11396 | /* OBSOLETE - will be removed once all refs are gone */ |
| 11397 | A_UINT8 pmac_id; |
| 11398 | /** pdev_id for identifying the MAC |
| 11399 | * See macros starting with WMI_PDEV_ID_ for values. |
| 11400 | */ |
| 11401 | A_UINT8 pdev_id; |
| 11402 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11403 | |
| 11404 | /** index of peak magnitude bin (signed) */ |
| 11405 | A_INT32 peak_sidx; |
| 11406 | |
| 11407 | } wmi_dfs_radar_event_fixed_param; |
| 11408 | |
| 11409 | typedef struct { |
| 11410 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */ |
| 11411 | |
| 11412 | /*Thermal thresholds */ |
| 11413 | A_UINT32 lower_thresh_degreeC; /* in degree C */ |
| 11414 | A_UINT32 upper_thresh_degreeC; /* in degree C */ |
| 11415 | |
| 11416 | /*Enable/Disable Thermal Monitoring for Mitigation */ |
| 11417 | A_UINT32 enable; |
| 11418 | } wmi_thermal_mgmt_cmd_fixed_param; |
| 11419 | |
| 11420 | typedef struct { |
| 11421 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */ |
| 11422 | |
| 11423 | A_UINT32 temperature_degreeC; /* temperature in degree C */ |
| 11424 | } wmi_thermal_mgmt_event_fixed_param; |
| 11425 | |
| 11426 | /** |
| 11427 | * This command is sent from WLAN host driver to firmware to |
| 11428 | * request firmware to configure auto shutdown timer in fw |
| 11429 | * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum> |
| 11430 | */ |
| 11431 | typedef struct { |
| 11432 | A_UINT32 tlv_header; |
| 11433 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */ |
| 11434 | A_UINT32 timer_value; |
| 11435 | /** timer value; 0=disable */ |
| 11436 | } wmi_host_auto_shutdown_cfg_cmd_fixed_param; |
| 11437 | |
| 11438 | enum wmi_host_auto_shutdown_reason { |
| 11439 | WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0, |
| 11440 | WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1, |
| 11441 | WMI_HOST_AUTO_SHUTDOWN_REASON_MAX, |
| 11442 | }; |
| 11443 | |
| 11444 | /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */ |
| 11445 | typedef struct { |
| 11446 | A_UINT32 tlv_header; |
| 11447 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */ |
| 11448 | A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */ |
| 11449 | } wmi_host_auto_shutdown_event_fixed_param; |
| 11450 | |
| 11451 | /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command. |
| 11452 | * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet. |
| 11453 | * This command is only used by some customer for verification test. It is not for end-user. |
| 11454 | * |
| 11455 | * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions. |
| 11456 | * |
| 11457 | * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet, |
| 11458 | * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple |
| 11459 | * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the |
| 11460 | * <channel, ack_offset> pair is unique. |
| 11461 | * |
| 11462 | * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word |
| 11463 | * called basic_config_info by bitmap |
| 11464 | * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination. |
| 11465 | * |
| 11466 | * 'rate bit' or 'channel bit' field of basic_config_info indicate validity of the channel and rate fields.if rate bit is 0 then the rate field |
| 11467 | * is ignored. |
| 11468 | * disable will remove preious conditions from FW. |
| 11469 | * conditions from the later command will over write conditions stored from a previous command. |
| 11470 | * |
| 11471 | */ |
| 11472 | |
| 11473 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */ |
| 11474 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */ |
| 11475 | #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */ |
| 11476 | #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */ |
| 11477 | |
| 11478 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */ |
| 11479 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */ |
| 11480 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */ |
| 11481 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */ |
| 11482 | |
| 11483 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */ |
| 11484 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */ |
| 11485 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */ |
| 11486 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */ |
| 11487 | |
| 11488 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */ |
| 11489 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */ |
| 11490 | |
| 11491 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */ |
| 11492 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */ |
| 11493 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */ |
| 11494 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */ |
| 11495 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */ |
| 11496 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */ |
| 11497 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */ |
| 11498 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */ |
| 11499 | |
| 11500 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */ |
| 11501 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */ |
| 11502 | |
| 11503 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */ |
| 11504 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */ |
| 11505 | |
| 11506 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */ |
| 11507 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */ |
| 11508 | |
| 11509 | /** Bit map definition for basic_config_info starts */ |
| 11510 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0 |
| 11511 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11512 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET) |
| 11513 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11514 | |
| 11515 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5 |
| 11516 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11517 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET) |
| 11518 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x, z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11519 | |
| 11520 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10 |
| 11521 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11522 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK) |
| 11523 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11524 | |
| 11525 | #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12 |
| 11526 | #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11527 | #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT) |
| 11528 | #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x, z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_BT) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11529 | |
| 11530 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14 |
| 11531 | #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11532 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC) |
| 11533 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x, z) WMI_F_RMW(x, (z) & 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11534 | |
| 11535 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16 |
| 11536 | #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11537 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND) |
| 11538 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x, z) WMI_F_RMW(x, (z) & 0x1, WMI_TPC_CHAINMASK_CONFIG_BAND) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11539 | |
| 11540 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17 |
| 11541 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11542 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM) |
| 11543 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11544 | |
| 11545 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18 |
| 11546 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11547 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE) |
| 11548 | #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x, z) WMI_F_RMW(x, (z)&0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11549 | |
| 11550 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21 |
| 11551 | /* |
| 11552 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST) |
| 11553 | * is temporarily maintained as an alias for the correct name |
| 11554 | * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 11555 | */ |
| 11556 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL |
| 11557 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11558 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 11559 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11560 | |
| 11561 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22 |
| 11562 | /* |
| 11563 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST) |
| 11564 | * is temporarily maintained as an alias for the correct name |
| 11565 | * (WMI_TPC_CHAINMASK_CONFIG_RATE) |
| 11566 | */ |
| 11567 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE |
| 11568 | #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S) |
| 11569 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11570 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x, z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_RATE) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11571 | |
| 11572 | /** Bit map definition for basic_config_info ends */ |
| 11573 | |
| 11574 | typedef struct { |
| 11575 | A_UINT32 tlv_header; |
| 11576 | /** Basic condition defined as bit map above, bitmap is chosen to save memory. |
| 11577 | * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed |
| 11578 | * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed |
| 11579 | * Bit10 ~ Bit11: chainmask b'00: don't care, b'01: force to use chain0, b'10: force to use chain1, b'11: force to use chain0&chain1 |
| 11580 | * Bit12 ~ Bit13: bt condition b'00: don't care, b'01: apply only when bt on, b'10: apply only when bt off, b'11: reserved |
| 11581 | * Bit14 ~ Bit15: stbc condition b'00: don't care, b'01: apply only when stbc on, b'10: apply only when stbc off, b'11: reserved |
| 11582 | * Bit16 : band condition b'0: 2G, b'1: 5G |
| 11583 | * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams |
| 11584 | * Bit18 ~ Bit20: phy mode condition: b'000: 11b 2g, b'001: 11g 2g, b'010: 11n 2g, b'011: 11n+11ac 2g, b'100: 11a, b'101: 11n 5g, b'110: 11ac 5g, b'111: 11n+11ac 5g |
| 11585 | * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored |
| 11586 | * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored. |
| 11587 | * Bit23 ~ Bit31: reserved |
| 11588 | */ |
| 11589 | A_UINT32 basic_config_info; |
| 11590 | |
| 11591 | /** channel mapping bit rule: The lower bit corresponds with smaller channel. |
| 11592 | * it depends on Bit14 of basic_config_info |
| 11593 | * Total 24 channels for 5G |
| 11594 | * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 |
| 11595 | * Total 14 channels for 2G |
| 11596 | * 1 ~ 14 |
| 11597 | */ |
| 11598 | A_UINT32 channel; |
| 11599 | |
| 11600 | /** rate mapping bit rule: The lower bit corresponds with lower rate. |
| 11601 | * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition" |
| 11602 | * Legacy rates , 11b, 11g, 11A |
| 11603 | * 11n one stream ( ht20, ht40 ) 8+8 |
| 11604 | * 11n two streams ( ht20, ht40 ) 8+8 |
| 11605 | * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10 |
| 11606 | * 11ac two streams (vht20, vht40, vht80 ) 10+10+10 |
| 11607 | */ |
| 11608 | A_UINT32 rate0; |
| 11609 | /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true. |
| 11610 | * For example, for 11g/11a, when rate0 equals 0xf0,it means "54Mbps", "48Mbps", "36Mbps", "24Mb's" is selected, while "18Mbps", "12Mbps", "9Mbps", "6Mbps" is not selected |
| 11611 | */ |
| 11612 | |
| 11613 | /** only used for "11n+11ac" combined phy_mode, (WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G , WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G) in this case, 11n rates begins on rate0, while 11ac rates begins on rate1 |
| 11614 | */ |
| 11615 | A_UINT32 rate1; |
| 11616 | } wmi_tpc_chainmask_config; |
| 11617 | |
| 11618 | #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/ |
| 11619 | #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/ |
| 11620 | |
| 11621 | typedef struct { |
| 11622 | A_UINT32 tlv_header; |
| 11623 | A_UINT32 enable; |
| 11624 | /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */ |
| 11625 | A_UINT32 num_tpc_chainmask_configs; |
| 11626 | /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */ |
| 11627 | } wmi_tpc_chainmask_config_cmd_fixed_param; |
| 11628 | |
| 11629 | typedef struct { |
| 11630 | A_UINT32 tlv_header; |
| 11631 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */ |
| 11632 | A_UINT32 data_len; |
| 11633 | /** length in byte of data[]. */ |
| 11634 | /* This structure is used to send REQ binary blobs |
| 11635 | * from application/service to firmware where Host drv is pass through . |
| 11636 | * Following this structure is the TLV: |
| 11637 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 11638 | */ |
| 11639 | } wmi_nan_cmd_param; |
| 11640 | |
| 11641 | typedef struct { |
| 11642 | A_UINT32 tlv_header; |
| 11643 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */ |
| 11644 | A_UINT32 data_len; |
| 11645 | /** length in byte of data[]. */ |
| 11646 | /* This structure is used to send REQ binary blobs |
| 11647 | * from firmware to application/service where Host drv is pass through . |
| 11648 | * Following this structure is the TLV: |
| 11649 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 11650 | */ |
| 11651 | } wmi_nan_event_hdr; |
| 11652 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11653 | /** |
| 11654 | * Event to indicate NAN discovery interface created |
| 11655 | */ |
| 11656 | typedef struct { |
| 11657 | /* |
| 11658 | * TLV tag and len; tag equals |
| 11659 | * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param |
| 11660 | */ |
| 11661 | A_UINT32 tlv_header; |
| 11662 | /** Unique id identifying the VDEV */ |
| 11663 | A_UINT32 vdev_id; |
| 11664 | /** NAN interface MAC address */ |
| 11665 | wmi_mac_addr nan_interface_macaddr; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11666 | } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE; |
| 11667 | |
| 11668 | #define wmi_nan_disc_iface_created_event_fixed_param wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11669 | |
| 11670 | /** |
| 11671 | * Event to indicate NAN discovery interface deleted |
| 11672 | */ |
| 11673 | typedef struct { |
| 11674 | /* |
| 11675 | * TLV tag and len; tag equals |
| 11676 | * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param |
| 11677 | */ |
| 11678 | A_UINT32 tlv_header; |
| 11679 | /** Unique id identifying the VDEV */ |
| 11680 | A_UINT32 vdev_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11681 | } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE; |
| 11682 | |
| 11683 | #define wmi_nan_disc_iface_deleted_event_fixed_param wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11684 | |
| 11685 | /** |
| 11686 | * Event to indicate NAN device started new cluster |
| 11687 | */ |
| 11688 | typedef struct { |
| 11689 | /* |
| 11690 | * TLV tag and len; tag equals |
| 11691 | * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param |
| 11692 | */ |
| 11693 | A_UINT32 tlv_header; |
| 11694 | /** Unique id identifying the VDEV */ |
| 11695 | A_UINT32 vdev_id; |
| 11696 | /** NAN Cluster ID */ |
| 11697 | A_UINT32 nan_cluster_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11698 | } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE; |
| 11699 | |
| 11700 | #define wmi_nan_started_cluster_event_fixed_param wmi_nan_started_cluster_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11701 | |
| 11702 | /** |
| 11703 | * Event to indicate NAN device joined to cluster |
| 11704 | */ |
| 11705 | typedef struct { |
| 11706 | /* |
| 11707 | * TLV tag and len; tag equals |
| 11708 | * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param |
| 11709 | */ |
| 11710 | A_UINT32 tlv_header; |
| 11711 | /** Unique id identifying the VDEV */ |
| 11712 | A_UINT32 vdev_id; |
| 11713 | /** NAN Cluster ID */ |
| 11714 | A_UINT32 nan_cluster_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11715 | } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE; |
| 11716 | |
| 11717 | #define wmi_nan_joined_cluster_event_fixed_param wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11718 | |
| 11719 | /** NAN DATA CMD's */ |
| 11720 | |
| 11721 | /** |
| 11722 | * NAN Data get capabilities req |
| 11723 | */ |
| 11724 | typedef struct { |
| 11725 | /* |
| 11726 | * TLV tag and len; tag equals |
| 11727 | * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param |
| 11728 | */ |
| 11729 | A_UINT32 tlv_header; |
| 11730 | /** unique id generated in upper layer for the transaction */ |
| 11731 | A_UINT32 transaction_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11732 | } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11733 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11734 | #define wmi_ndi_get_cap_req_fixed_param wmi_ndi_get_cap_req_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11735 | |
| 11736 | /** |
| 11737 | * NDP Response code |
| 11738 | */ |
| 11739 | typedef enum { |
| 11740 | NDP_RSP_CODE_REQUEST_ACCEPT = 0x00, |
| 11741 | NDP_RSP_CODE_REQUEST_REJECT = 0x01, |
| 11742 | NDP_RSP_CODE_REQUEST_DEFER = 0x02, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11743 | } wmi_ndp_rsp_code_PROTOTYPE; |
| 11744 | |
| 11745 | #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11746 | |
| 11747 | /** |
| 11748 | * NDP Initiator requesting a data session |
| 11749 | */ |
| 11750 | typedef struct { |
| 11751 | /* |
| 11752 | * TLV tag and len; tag equals |
| 11753 | * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param |
| 11754 | */ |
| 11755 | A_UINT32 tlv_header; |
| 11756 | /** Unique id identifying the VDEV */ |
| 11757 | A_UINT32 vdev_id; |
| 11758 | /** unique id generated in upper layer for the transaction */ |
| 11759 | A_UINT32 transaction_id; |
| 11760 | /** Unique Instance Id identifying the Responder's service */ |
| 11761 | A_UINT32 service_instance_id; |
| 11762 | /** Discovery MAC addr of the publisher/peer */ |
| 11763 | wmi_mac_addr peer_discovery_mac_addr; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11764 | /* Actual number of bytes in TLV ndp_cfg */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11765 | A_UINT32 ndp_cfg_len; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11766 | /* Actual number of bytes in TLV ndp_app_info */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11767 | A_UINT32 ndp_app_info_len; |
| 11768 | /** |
| 11769 | * TLV (tag length value ) parameters follow the ndp_initiator_req |
| 11770 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11771 | * wmi_channel channel; |
| 11772 | * A_UINT8 ndp_cfg[]; |
| 11773 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11774 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11775 | } wmi_ndp_initiator_req_fixed_param_PROTOTYPE; |
| 11776 | |
| 11777 | #define wmi_ndp_initiator_req_fixed_param wmi_ndp_initiator_req_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11778 | |
| 11779 | /** |
| 11780 | * Initiate a data response on the responder side |
| 11781 | * for data request indication from the peer |
| 11782 | */ |
| 11783 | typedef struct { |
| 11784 | /* |
| 11785 | * TLV tag and len; tag equals |
| 11786 | * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param |
| 11787 | */ |
| 11788 | A_UINT32 tlv_header; |
| 11789 | /** Unique id identifying the VDEV */ |
| 11790 | A_UINT32 vdev_id; |
| 11791 | /** unique id generated in upper layer for the transaction */ |
| 11792 | A_UINT32 transaction_id; |
| 11793 | /** |
| 11794 | * Unique token Id generated on the initiator/responder |
| 11795 | * side used for a NDP session between two NAN devices |
| 11796 | */ |
| 11797 | A_UINT32 ndp_instance_id; |
| 11798 | /** Response Code defined in wmi_ndp_rsp_code */ |
| 11799 | A_UINT32 rsp_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11800 | /** Number of bytes in TLV ndp_cfg */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11801 | A_UINT32 ndp_cfg_len; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11802 | /** Number of bytes in TLV ndp_app_info */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11803 | A_UINT32 ndp_app_info_len; |
| 11804 | /** |
| 11805 | * TLV (tag length value ) parameters follow the ndp_responder_req |
| 11806 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11807 | * A_UINT8 ndp_cfg[]; |
| 11808 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11809 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11810 | } wmi_ndp_responder_req_fixed_param_PROTOTYPE; |
| 11811 | |
| 11812 | #define wmi_ndp_responder_req_fixed_param wmi_ndp_responder_req_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11813 | |
| 11814 | /** |
| 11815 | * NDP end type |
| 11816 | */ |
| 11817 | typedef enum { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11818 | WMI_NDP_END_TYPE_UNSPECIFIED = 0x00, |
| 11819 | WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01, |
| 11820 | WMI_NDP_END_TYPE_OTA_FRAME = 0x02, |
| 11821 | } wmi_ndp_end_type_PROTOTYPE; |
| 11822 | |
| 11823 | #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11824 | |
| 11825 | /** |
| 11826 | * NDP end reason code |
| 11827 | */ |
| 11828 | typedef enum { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11829 | WMI_NDP_END_REASON_UNSPECIFIED = 0x00, |
| 11830 | WMI_NDP_END_REASON_INACTIVITY = 0x01, |
| 11831 | WMI_NDP_END_REASON_PEER_DATA_END = 0x02, |
| 11832 | } wmi_ndp_end_reason_code_PROTOTYPE; |
| 11833 | |
| 11834 | #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11835 | |
| 11836 | /** |
| 11837 | * NDP end request |
| 11838 | */ |
| 11839 | typedef struct { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11840 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */ |
| 11841 | A_UINT32 tlv_header; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11842 | /** NDP instance id */ |
| 11843 | A_UINT32 ndp_instance_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11844 | } wmi_ndp_end_req_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11845 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11846 | #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11847 | |
| 11848 | /** |
| 11849 | * NDP End request |
| 11850 | */ |
| 11851 | typedef struct { |
| 11852 | /* |
| 11853 | * TLV tag and len; tag equals |
| 11854 | * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param |
| 11855 | */ |
| 11856 | A_UINT32 tlv_header; |
| 11857 | /** unique id generated in upper layer for the transaction */ |
| 11858 | A_UINT32 transaction_id; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11859 | /** |
| 11860 | * TLV (tag length value ) parameters follow the ndp_end_req |
| 11861 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11862 | * wmi_ndp_end_req ndp_end_req_list[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11863 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11864 | } wmi_ndp_end_req_fixed_param_PROTOTYPE; |
| 11865 | |
| 11866 | #define wmi_ndp_end_req_fixed_param wmi_ndp_end_req_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11867 | |
| 11868 | /* NAN DATA RSP EVENTS */ |
| 11869 | |
| 11870 | /** |
| 11871 | * Event to indicate NAN Data Interface capabilities cmd |
| 11872 | */ |
| 11873 | typedef struct { |
| 11874 | /* |
| 11875 | * TLV tag and len; tag equals |
| 11876 | * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param |
| 11877 | */ |
| 11878 | A_UINT32 tlv_header; |
| 11879 | /** Copy of transaction_id received in wmi_ndi_get_cap_req */ |
| 11880 | A_UINT32 transaction_id; |
| 11881 | /** Max ndi interface support */ |
| 11882 | A_UINT32 max_ndi_interfaces; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11883 | /** Max ndp sessions can support */ |
| 11884 | A_UINT32 max_ndp_sessions; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11885 | /** Max number of peer's per ndi */ |
| 11886 | A_UINT32 max_peers_per_ndi; |
Anurag Chouhan | 19aa3bf | 2016-08-04 19:10:12 +0530 | [diff] [blame^] | 11887 | /** which combination of bands is supported - see NAN_DATA_SUPPORTED_BAND enums */ |
| 11888 | A_UINT32 nan_data_supported_bands; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11889 | } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE; |
| 11890 | |
| 11891 | #define wmi_ndi_cap_rsp_event_fixed_param wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11892 | |
| 11893 | /** |
| 11894 | * NDP command response code |
| 11895 | */ |
| 11896 | typedef enum { |
| 11897 | NDP_CMD_RSP_STATUS_SUCCESS = 0x00, |
| 11898 | NDP_CMD_RSP_STATUS_ERROR = 0x01, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11899 | } wmi_ndp_cmd_rsp_status_PROTOTYPE; |
| 11900 | |
| 11901 | #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11902 | |
| 11903 | /** |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11904 | * Event response for wmi_ndp_initiator_req |
| 11905 | */ |
| 11906 | typedef struct { |
| 11907 | /* |
| 11908 | * TLV tag and len; tag equals |
| 11909 | * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param |
| 11910 | */ |
| 11911 | A_UINT32 tlv_header; |
| 11912 | /** Unique id identifying the VDEV */ |
| 11913 | A_UINT32 vdev_id; |
| 11914 | /** Copy of transaction_id received in wmi_ndp_initiator_req */ |
| 11915 | A_UINT32 transaction_id; |
| 11916 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 11917 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11918 | A_UINT32 reason_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11919 | /* |
| 11920 | * Unique token Id generated on the initiator/responder |
| 11921 | * side used for a NDP session between two NAN devices |
| 11922 | */ |
| 11923 | A_UINT32 ndp_instance_id; |
| 11924 | } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE; |
| 11925 | |
| 11926 | #define wmi_ndp_initiator_rsp_event_fixed_param wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11927 | |
| 11928 | /** |
| 11929 | * Event response for wmi_ndp_responder_req cmd |
| 11930 | */ |
| 11931 | typedef struct { |
| 11932 | /* |
| 11933 | * TLV tag and len; tag equals |
| 11934 | * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param |
| 11935 | */ |
| 11936 | A_UINT32 tlv_header; |
| 11937 | /** Unique id identifying the VDEV */ |
| 11938 | A_UINT32 vdev_id; |
| 11939 | /** Copy of transaction_id received in wmi_ndp_responder_req */ |
| 11940 | A_UINT32 transaction_id; |
| 11941 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 11942 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11943 | A_UINT32 reason_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11944 | /* |
| 11945 | * Unique token Id generated on the initiator/responder |
| 11946 | * side used for a NDP session between two NAN devices |
| 11947 | */ |
| 11948 | A_UINT32 ndp_instance_id; |
| 11949 | /* NDI mac address of the peer */ |
| 11950 | wmi_mac_addr peer_ndi_mac_addr; |
| 11951 | } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE; |
| 11952 | |
| 11953 | #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE |
| 11954 | /** |
| 11955 | * Active ndp instance id |
| 11956 | */ |
| 11957 | typedef struct { |
| 11958 | /* |
| 11959 | * TLV tag and len; tag equals |
| 11960 | * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id |
| 11961 | */ |
| 11962 | A_UINT32 tlv_header; |
| 11963 | /* NDP instance id */ |
| 11964 | A_UINT32 ndp_instance_id; |
| 11965 | } wmi_active_ndp_instance_id_PROTOTYPE; |
| 11966 | |
| 11967 | #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11968 | |
| 11969 | /** |
| 11970 | * NDP end response per ndi |
| 11971 | */ |
| 11972 | typedef struct { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11973 | /* |
| 11974 | * TLV tag and len; tag equals |
| 11975 | * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi |
| 11976 | */ |
| 11977 | A_UINT32 tlv_header; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11978 | /** Unique id identifying the VDEV */ |
| 11979 | A_UINT32 vdev_id; |
| 11980 | /** Peer MAC addr */ |
| 11981 | wmi_mac_addr peer_mac_addr; |
| 11982 | /** Number of active ndps on this ndi */ |
| 11983 | A_UINT32 num_active_ndps_on_ndi; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11984 | } wmi_ndp_end_rsp_per_ndi_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11985 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11986 | #define wmi_ndp_end_rsp_per_ndi wmi_ndp_end_rsp_per_ndi_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11987 | |
| 11988 | /** |
| 11989 | * Event response for wmi_ndp_end_req cmd |
| 11990 | */ |
| 11991 | typedef struct { |
| 11992 | /* |
| 11993 | * TLV tag and len; tag equals |
| 11994 | * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param |
| 11995 | */ |
| 11996 | A_UINT32 tlv_header; |
| 11997 | /** Copy of transaction_id received in wmi_ndp_end_req */ |
| 11998 | A_UINT32 transaction_id; |
| 11999 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 12000 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12001 | A_UINT32 reason_code; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12002 | /** |
| 12003 | * TLV (tag length value ) parameters follow the ndp_end_rsp |
| 12004 | * structure. The TLV's are: |
| 12005 | * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[]; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12006 | * wmi_active_ndp_instance_id active_ndp_instances_id[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12007 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12008 | } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE; |
| 12009 | |
| 12010 | #define wmi_ndp_end_rsp_event_fixed_param wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12011 | |
| 12012 | /** NAN DATA EVENTS */ |
| 12013 | |
| 12014 | /** |
| 12015 | * NDP self role |
| 12016 | */ |
| 12017 | typedef enum { |
| 12018 | WMI_NDP_INITIATOR_ROLE, |
| 12019 | WMI_NDP_RESPONDER_ROLE, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12020 | } wmi_ndp_self_role_PROTOTYPE; |
| 12021 | |
| 12022 | #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12023 | |
| 12024 | /** |
| 12025 | * NDP accept policy |
| 12026 | */ |
| 12027 | typedef enum { |
| 12028 | WMI_NDP_ACCEPT_POLICY_NONE, |
| 12029 | WMI_NDP_ACCEPT_POLICY_ALL, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12030 | } wmi_ndp_accept_policy_PROTOTYPE; |
| 12031 | |
| 12032 | #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12033 | |
| 12034 | /** |
| 12035 | * Event indication received on the responder side when a NDP Initiator request/ |
| 12036 | * NDP session is initiated on the Initiator side |
| 12037 | * (self role will be NDP_RESPONDER_ROLE) |
| 12038 | * |
| 12039 | * Event indication received on the initiator side when a |
| 12040 | * NDP responder request on the Initiator side |
| 12041 | * (self role will be NDP_INITIATOR_ROLE) |
| 12042 | */ |
| 12043 | typedef struct { |
| 12044 | /* |
| 12045 | * TLV tag and len; tag equals |
| 12046 | * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param |
| 12047 | */ |
| 12048 | A_UINT32 tlv_header; |
| 12049 | /** Unique id identifying the VDEV */ |
| 12050 | A_UINT32 vdev_id; |
| 12051 | /** Self NDP Role defined in wmi_ndp_self_role */ |
| 12052 | A_UINT32 self_ndp_role; |
| 12053 | /** Accept policy defined in wmi_ndp_accept_policy */ |
| 12054 | A_UINT32 accept_policy; |
| 12055 | /** Unique Instance Id corresponding to a service/session. */ |
| 12056 | A_UINT32 service_instance_id; |
| 12057 | /** Discovery MAC addr of the peer/initiator */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12058 | wmi_mac_addr peer_discovery_mac_addr; |
| 12059 | /* NDI mac address of the peer */ |
| 12060 | wmi_mac_addr peer_ndi_mac_addr; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12061 | /** |
| 12062 | * Unique token Id generated on the initiator/responder |
| 12063 | * side used for a NDP session between two NAN devices |
| 12064 | */ |
| 12065 | A_UINT32 ndp_instance_id; |
| 12066 | /** Number of bytes in TLV wmi_ndp_cfg */ |
| 12067 | A_UINT32 ndp_cfg_len; |
| 12068 | /** Number of bytes in TLV wmi_ndp_app_info */ |
| 12069 | A_UINT32 ndp_app_info_len; |
| 12070 | /** |
| 12071 | * TLV (tag length value ) parameters follow the ndp_indication |
| 12072 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12073 | * A_UINT8 ndp_cfg[]; |
| 12074 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12075 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12076 | } wmi_ndp_indication_event_fixed_param_PROTOTYPE; |
| 12077 | |
| 12078 | #define wmi_ndp_indication_event_fixed_param wmi_ndp_indication_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12079 | |
| 12080 | /** |
| 12081 | * Event indication of data confirm is received on both |
| 12082 | * initiator and responder side confirming a NDP session |
| 12083 | */ |
| 12084 | typedef struct { |
| 12085 | /* |
| 12086 | * TLV tag and len; tag equals |
| 12087 | * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param |
| 12088 | */ |
| 12089 | A_UINT32 tlv_header; |
| 12090 | /** Unique id identifying the VDEV */ |
| 12091 | A_UINT32 vdev_id; |
| 12092 | /** |
| 12093 | * Unique token Id generated on the initiator/responder |
| 12094 | * side used for a NDP session between two NAN devices |
| 12095 | */ |
| 12096 | A_UINT32 ndp_instance_id; |
| 12097 | /* |
| 12098 | * NDI mac address of the peer |
| 12099 | * (required to derive target ipv6 address) |
| 12100 | */ |
| 12101 | wmi_mac_addr peer_ndi_mac_addr; |
| 12102 | /** Response Code defined in wmi_ndp_rsp_code */ |
| 12103 | A_UINT32 rsp_code; |
| 12104 | /** Number of bytes in TLV wmi_ndp_cfg */ |
| 12105 | A_UINT32 ndp_cfg_len; |
| 12106 | /** Number of bytes in TLV wmi_ndp_app_info */ |
| 12107 | A_UINT32 ndp_app_info_len; |
Anurag Chouhan | b36db51 | 2016-04-27 16:13:35 +0530 | [diff] [blame] | 12108 | /** Reason Code */ |
| 12109 | A_UINT32 reason_code; |
| 12110 | /** Number of active ndps on this peer */ |
| 12111 | A_UINT32 num_active_ndps_on_peer; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12112 | /** |
| 12113 | * TLV (tag length value ) parameters follow the ndp_confirm |
| 12114 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12115 | * A_UINT8 ndp_cfg[]; |
| 12116 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12117 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12118 | } wmi_ndp_confirm_event_fixed_param_PROTOTYPE; |
| 12119 | |
| 12120 | #define wmi_ndp_confirm_event_fixed_param wmi_ndp_confirm_event_fixed_param_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12121 | |
| 12122 | /** |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12123 | * Event indication received on the initiator/responder side terminating a NDP session |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12124 | */ |
| 12125 | typedef struct { |
| 12126 | /* |
| 12127 | * TLV tag and len; tag equals |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12128 | * WMITLV_TAG_STRUC_wmi_ndp_end_indication |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12129 | */ |
| 12130 | A_UINT32 tlv_header; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12131 | /** type defined in wmi_ndp_end_type */ |
| 12132 | A_UINT32 type; |
| 12133 | /* Unique id identifying the VDEV */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12134 | A_UINT32 vdev_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 12135 | /** reason_code defined in wmi_ndp_end_reason_code */ |
| 12136 | A_UINT32 reason_code; |
| 12137 | /** NDP instance id */ |
| 12138 | A_UINT32 ndp_instance_id; |
| 12139 | /* NDI MAC addr of the peer */ |
| 12140 | wmi_mac_addr peer_ndi_mac_addr; |
| 12141 | /* Number of active ndps on this peer */ |
| 12142 | A_UINT32 num_active_ndps_on_peer; |
| 12143 | } wmi_ndp_end_indication_PROTOTYPE; |
| 12144 | |
| 12145 | #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 12146 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12147 | typedef struct { |
| 12148 | A_UINT32 tlv_header; |
| 12149 | A_UINT32 num_data; |
| 12150 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 12151 | } wmi_diag_data_container_event_fixed_param; |
| 12152 | |
| 12153 | enum { |
| 12154 | WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0, |
| 12155 | WMI_PDEV_PARAM_TXPOWER_REASON_SAR, |
| 12156 | WMI_PDEV_PARAM_TXPOWER_REASON_MAX |
| 12157 | }; |
| 12158 | |
| 12159 | #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF |
| 12160 | #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0 |
| 12161 | |
| 12162 | #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00 |
| 12163 | #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8 |
| 12164 | |
| 12165 | #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \ |
| 12166 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT)) |
| 12167 | |
| 12168 | #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \ |
| 12169 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT)) |
| 12170 | |
| 12171 | #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \ |
| 12172 | (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT) |
| 12173 | |
| 12174 | #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \ |
| 12175 | (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT) |
| 12176 | |
| 12177 | /** |
| 12178 | * This command is sent from WLAN host driver to firmware to |
| 12179 | * notify the current modem power state. Host would receive a |
| 12180 | * message from modem when modem is powered on. Host driver |
| 12181 | * would then send this command to firmware. Firmware would then |
| 12182 | * power on WCI-2 (UART) interface for LTE/MWS Coex. |
| 12183 | * |
| 12184 | * This command is only applicable for APQ platform which has |
| 12185 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 12186 | * this command can be dropped by firmware. |
| 12187 | * |
| 12188 | * This is a requirement from modem team that WCN can't toggle |
| 12189 | * UART before modem is powered on. |
| 12190 | */ |
| 12191 | typedef struct { |
| 12192 | /** TLV tag and len; tag equals |
| 12193 | * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */ |
| 12194 | A_UINT32 tlv_header; |
| 12195 | |
| 12196 | /** Modem power state parameter */ |
| 12197 | A_UINT32 modem_power_state; |
| 12198 | } wmi_modem_power_state_cmd_param; |
| 12199 | |
| 12200 | enum { |
| 12201 | WMI_MODEM_STATE_OFF = 0, |
| 12202 | WMI_MODEM_STATE_ON |
| 12203 | }; |
| 12204 | |
| 12205 | #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */ |
| 12206 | #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */ |
| 12207 | |
| 12208 | /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic |
| 12209 | generated whenever firmware roamed to new AP silently and |
| 12210 | (a) If the host is awake, FW sends the event to the host immediately . |
| 12211 | (b) If host is in sleep then either |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12212 | (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12213 | command to FW (part of host wake up sequence from low power mode) before sending the event host. |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12214 | (2) data/mgmt frame is received from roamed AP, which needs to return to host |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12215 | */ |
| 12216 | |
| 12217 | typedef struct { |
| 12218 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */ |
| 12219 | A_UINT32 tlv_header; |
| 12220 | |
| 12221 | A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */ |
| 12222 | A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */ |
| 12223 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; |
| 12224 | } wmi_key_material; |
| 12225 | |
| 12226 | typedef struct { |
| 12227 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */ |
| 12228 | /** Unique id identifying the VDEV on which roaming is done by firmware */ |
| 12229 | A_UINT32 vdev_id; |
| 12230 | /** auth_status: connected or authorized */ |
| 12231 | A_UINT32 auth_status; |
| 12232 | /* |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 12233 | * roam_reason: |
| 12234 | * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX |
| 12235 | * bits 4-5 for subnet status see WMI_ROAM_SUBNET_CHANGE_STATUS_XXX. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12236 | */ |
| 12237 | A_UINT32 roam_reason; |
| 12238 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */ |
| 12239 | A_UINT32 rssi; |
| 12240 | /** MAC address of roamed AP */ |
| 12241 | wmi_mac_addr bssid; /* BSSID */ |
| 12242 | /** whether the frame is beacon or probe rsp */ |
| 12243 | A_UINT32 is_beacon; |
| 12244 | /** the length of beacon/probe rsp */ |
| 12245 | A_UINT32 bcn_probe_rsp_len; |
| 12246 | /** the length of reassoc rsp */ |
| 12247 | A_UINT32 reassoc_rsp_len; |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 12248 | /** the length of reassoc req */ |
| 12249 | A_UINT32 reassoc_req_len; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12250 | /** |
| 12251 | * TLV (tag length value ) parameters follows roam_synch_event |
| 12252 | * The TLV's are: |
| 12253 | * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len |
| 12254 | * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len |
| 12255 | * wmi_channel chan; |
| 12256 | * wmi_key_material key; |
| 12257 | * A_UINT32 status; subnet changed status not being used |
| 12258 | * currently. will pass the information using roam_status. |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 12259 | * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12260 | **/ |
| 12261 | } wmi_roam_synch_event_fixed_param; |
| 12262 | |
| 12263 | #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF |
| 12264 | |
| 12265 | typedef struct { |
| 12266 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */ |
| 12267 | A_UINT32 tlv_header; |
| 12268 | /** MAC address of the peer for which the estimated link speed is required. */ |
| 12269 | wmi_mac_addr peer_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 12270 | /* Set to 1 only if vdev_id field is valid */ |
| 12271 | A_UINT32 valid_vdev_id; |
| 12272 | /* VDEV to which the peer belongs to */ |
| 12273 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12274 | } wmi_peer_get_estimated_linkspeed_cmd_fixed_param; |
| 12275 | |
| 12276 | typedef struct { |
| 12277 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */ |
| 12278 | A_UINT32 tlv_header; |
| 12279 | /** MAC address of the peer for which the estimated link speed is required. |
| 12280 | */ |
| 12281 | wmi_mac_addr peer_macaddr; |
| 12282 | /* Estimated link speed in kbps. |
| 12283 | * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID. |
| 12284 | */ |
| 12285 | A_UINT32 est_linkspeed_kbps; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 12286 | /* Set to 1 only if vdev_id field is valid */ |
| 12287 | A_UINT32 valid_vdev_id; |
| 12288 | /* VDEV to which the peer belongs to */ |
| 12289 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12290 | } wmi_peer_estimated_linkspeed_event_fixed_param; |
| 12291 | |
| 12292 | typedef struct { |
| 12293 | A_UINT32 tlv_header; /* TLV tag and len; tag equals */ |
| 12294 | /* vdev ID */ |
| 12295 | A_UINT32 vdev_id; |
| 12296 | A_UINT32 data_len; |
| 12297 | /** length in byte of data[]. */ |
| 12298 | /* This structure is used to send REQ binary blobs |
| 12299 | * from application/service to firmware where Host drv is pass through . |
| 12300 | * Following this structure is the TLV: |
| 12301 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 12302 | */ |
| 12303 | } wmi_req_stats_ext_cmd_fixed_param; |
| 12304 | |
| 12305 | typedef struct { |
| 12306 | A_UINT32 tlv_header; |
| 12307 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */ |
| 12308 | A_UINT32 vdev_id; |
| 12309 | /** vdev ID */ |
| 12310 | A_UINT32 data_len; |
| 12311 | /** length in byte of data[]. */ |
| 12312 | /* This structure is used to send REQ binary blobs |
| 12313 | * from firmware to application/service where Host drv is pass through . |
| 12314 | * Following this structure is the TLV: |
| 12315 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 12316 | */ |
| 12317 | } wmi_stats_ext_event_fixed_param; |
| 12318 | |
| 12319 | typedef struct { |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 12320 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */ |
| 12321 | /** unique id identifying the VDEV, generated by the caller */ |
| 12322 | A_UINT32 vdev_id; |
| 12323 | /** peer MAC address */ |
| 12324 | wmi_mac_addr peer_macaddr; |
| 12325 | } wmi_peer_delete_resp_event_fixed_param; |
| 12326 | |
| 12327 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12328 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */ |
| 12329 | A_UINT32 tlv_header; |
| 12330 | A_UINT32 vdev_id; /* vdev ID */ |
| 12331 | /* MAC address of the peer for which the estimated link speed is required. */ |
| 12332 | wmi_mac_addr peer_macaddr; |
| 12333 | A_UINT32 state; /* peer state */ |
| 12334 | } wmi_peer_state_event_fixed_param; |
| 12335 | |
| 12336 | typedef struct { |
| 12337 | /* |
| 12338 | * TLV tag and len; tag equals |
| 12339 | * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param |
| 12340 | */ |
| 12341 | A_UINT32 tlv_header; |
| 12342 | /* unique id identifying the VDEV, generated by the caller */ |
| 12343 | A_UINT32 vdev_id; |
| 12344 | /* peer MAC address */ |
| 12345 | wmi_mac_addr peer_macaddr; |
| 12346 | } wmi_peer_assoc_conf_event_fixed_param; |
| 12347 | |
| 12348 | enum { |
| 12349 | WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, |
| 12350 | /** scan_type: passive */ |
| 12351 | WMI_2G4_HT40_OBSS_SCAN_ACTIVE, |
| 12352 | /** scan_type: active */ |
| 12353 | }; |
| 12354 | |
| 12355 | typedef struct { |
| 12356 | /** |
| 12357 | * TLV tag and len; |
| 12358 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param |
| 12359 | */ |
| 12360 | A_UINT32 tlv_header; |
| 12361 | A_UINT32 vdev_id; |
| 12362 | /** |
| 12363 | * active or passive. if active all the channels are actively scanned. |
| 12364 | * if passive then all the channels are passively scanned |
| 12365 | */ |
| 12366 | A_UINT32 scan_type; |
| 12367 | /** |
| 12368 | * FW can perform multiple scans with in a OBSS scan interval. |
| 12369 | * For each scan, |
| 12370 | * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel , |
| 12371 | * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel . |
| 12372 | * The unit for these 2 parameters is TUs. |
| 12373 | */ |
| 12374 | A_UINT32 obss_scan_passive_dwell; |
| 12375 | A_UINT32 obss_scan_active_dwell; |
| 12376 | /** |
| 12377 | * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the |
| 12378 | * both min and total per channel dwell time requirement |
| 12379 | */ |
| 12380 | A_UINT32 bss_channel_width_trigger_scan_interval; |
| 12381 | /** |
| 12382 | * FW can perform multiple scans with in a OBSS scan interval. |
| 12383 | * For each scan, |
| 12384 | * the total per channel dwell time across all scans with in OBSS scan interval should be |
| 12385 | * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel |
| 12386 | * for active scans and , |
| 12387 | * The unit for these 2 parameters is TUs. |
| 12388 | */ |
| 12389 | A_UINT32 obss_scan_passive_total_per_channel; |
| 12390 | A_UINT32 obss_scan_active_total_per_channel; |
| 12391 | A_UINT32 bss_width_channel_transition_delay_factor; |
| 12392 | /** parameter to check exemption from scan */ |
| 12393 | A_UINT32 obss_scan_activity_threshold; |
| 12394 | /** parameter to check exemption from scan */ |
| 12395 | /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */ |
| 12396 | A_UINT32 forty_mhz_intolerant; |
| 12397 | /** STA 40M bandwidth intolerant capability */ |
| 12398 | A_UINT32 current_operating_class; |
| 12399 | /** STA current operating class */ |
| 12400 | /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */ |
| 12401 | A_UINT32 channel_len; |
| 12402 | /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */ |
| 12403 | A_UINT32 ie_len; |
| 12404 | } wmi_obss_scan_enable_cmd_fixed_param; |
| 12405 | |
| 12406 | typedef struct { |
| 12407 | /** |
| 12408 | * TLV tag and len; |
| 12409 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param |
| 12410 | */ |
| 12411 | A_UINT32 tlv_header; |
| 12412 | A_UINT32 vdev_id; |
| 12413 | } wmi_obss_scan_disable_cmd_fixed_param; |
| 12414 | |
| 12415 | typedef struct { |
| 12416 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */ |
| 12417 | A_UINT32 tlv_header; |
| 12418 | /** unique id identifying the VDEV */ |
| 12419 | A_UINT32 vdev_id; |
| 12420 | /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 12421 | A_UINT32 tx_status; |
| 12422 | } wmi_offload_prb_rsp_tx_status_event_fixed_param; |
| 12423 | |
| 12424 | typedef enum { |
| 12425 | WMI_FRAME_TX_OK, /* frame tx ok */ |
| 12426 | WMI_FRAME_TX_XRETRY, /* excessivley retried */ |
| 12427 | WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */ |
| 12428 | WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */ |
| 12429 | } WMI_FRAME_TX_STATUS; |
| 12430 | |
| 12431 | /** |
| 12432 | * This command is sent from WLAN host driver to firmware to |
| 12433 | * request firmware to send the latest channel avoidance range |
| 12434 | * to host. |
| 12435 | * |
| 12436 | * This command is only applicable for APQ platform which has |
| 12437 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 12438 | * this command can be dropped by firmware. |
| 12439 | * |
| 12440 | * Host would send this command to firmware to request a channel |
| 12441 | * avoidance information update. |
| 12442 | */ |
| 12443 | typedef struct { |
| 12444 | /** TLV tag and len; tag equals |
| 12445 | * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */ |
| 12446 | A_UINT32 tlv_header; |
| 12447 | } wmi_chan_avoid_update_cmd_param; |
| 12448 | |
| 12449 | /* ExtScan operation mode */ |
| 12450 | typedef enum { |
| 12451 | WMI_EXTSCAN_MODE_NONE = 0x0000, |
| 12452 | WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */ |
| 12453 | WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */ |
| 12454 | WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */ |
| 12455 | } wmi_extscan_operation_mode; |
| 12456 | |
| 12457 | /* Channel Mask */ |
| 12458 | typedef enum { |
| 12459 | WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000, |
| 12460 | WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */ |
| 12461 | WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */ |
| 12462 | WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */ |
| 12463 | } wmi_channel_band_mask; |
| 12464 | |
| 12465 | typedef enum { |
| 12466 | WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001, |
| 12467 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002, |
| 12468 | WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004, |
| 12469 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008, |
| 12470 | WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010, |
| 12471 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020, |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 12472 | WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040, |
| 12473 | WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12474 | |
| 12475 | WMI_EXTSCAN_EVENT_MAX = 0x8000 |
| 12476 | } wmi_extscan_event_type; |
| 12477 | |
| 12478 | #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \ |
| 12479 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT) |
| 12480 | |
| 12481 | #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \ |
| 12482 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \ |
| 12483 | WMI_EXTSCAN_BUCKET_FAILED_EVENT | \ |
| 12484 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT) |
| 12485 | |
| 12486 | typedef enum { |
| 12487 | WMI_EXTSCAN_NO_FORWARDING = 0x0000, |
| 12488 | WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001 |
| 12489 | } wmi_extscan_forwarding_flags; |
| 12490 | |
| 12491 | typedef enum { |
| 12492 | /* Use Motion Sensor Detection */ |
| 12493 | WMI_EXTSCAN_USE_MSD = 0x0001, |
| 12494 | /* Extscan LPASS extended batching feature is supported and enabled */ |
| 12495 | WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, |
| 12496 | } wmi_extscan_configuration_flags; |
| 12497 | typedef enum { |
| 12498 | /* |
| 12499 | * Cache the results of bucket whose |
| 12500 | * configuration flags has this bit set |
| 12501 | */ |
| 12502 | WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 12503 | /* Report ext scan results to context hub or not.*/ |
| 12504 | WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12505 | } wmi_extscan_bucket_configuration_flags; |
| 12506 | |
| 12507 | typedef enum { |
| 12508 | WMI_EXTSCAN_STATUS_OK = 0, |
| 12509 | WMI_EXTSCAN_STATUS_ERROR = 0x80000000, |
| 12510 | WMI_EXTSCAN_STATUS_INVALID_PARAMETERS, |
| 12511 | WMI_EXTSCAN_STATUS_INTERNAL_ERROR |
| 12512 | } wmi_extscan_start_stop_status; |
| 12513 | |
| 12514 | typedef struct { |
| 12515 | /** Request ID - to identify command. Cannot be 0 */ |
| 12516 | A_UINT32 request_id; |
| 12517 | /** Requestor ID - client requesting ExtScan */ |
| 12518 | A_UINT32 requestor_id; |
| 12519 | /** VDEV id(interface) that is requesting scan */ |
| 12520 | A_UINT32 vdev_id; |
| 12521 | } wmi_extscan_command_id; |
| 12522 | |
| 12523 | typedef struct { |
| 12524 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12525 | /** channel number */ |
| 12526 | A_UINT32 channel; |
| 12527 | |
| 12528 | /** dwell time in msec - use defaults if 0 */ |
| 12529 | A_UINT32 min_dwell_time; |
| 12530 | A_UINT32 max_dwell_time; |
| 12531 | /** passive/active channel and other flags */ |
| 12532 | A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */ |
| 12533 | } wmi_extscan_bucket_channel; |
| 12534 | |
| 12535 | /* Scan Bucket specification */ |
| 12536 | typedef struct { |
| 12537 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12538 | /** Bucket ID - 0-based */ |
| 12539 | A_UINT32 bucket_id; |
| 12540 | /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */ |
| 12541 | A_UINT32 notify_extscan_events; |
| 12542 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 12543 | A_UINT32 forwarding_flags; |
| 12544 | /* |
| 12545 | * ExtScan configuration flags - |
| 12546 | * wmi_extscan__bucket_configuration_flags |
| 12547 | */ |
| 12548 | A_UINT32 configuration_flags; |
| 12549 | /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */ |
| 12550 | A_UINT32 base_period_multiplier; |
| 12551 | /** dwell time in msec on active channels - use defaults if 0 */ |
| 12552 | A_UINT32 min_dwell_time_active; |
| 12553 | A_UINT32 max_dwell_time_active; |
| 12554 | /** dwell time in msec on passive channels - use defaults if 0 */ |
| 12555 | A_UINT32 min_dwell_time_passive; |
| 12556 | A_UINT32 max_dwell_time_passive; |
| 12557 | /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */ |
| 12558 | A_UINT32 channel_band; |
| 12559 | /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */ |
| 12560 | A_UINT32 num_channels; |
| 12561 | /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */ |
| 12562 | A_UINT32 min_period; |
| 12563 | /** period above which exponent is not applied anymore */ |
| 12564 | A_UINT32 max_period; |
| 12565 | /** |
| 12566 | * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles |
| 12567 | * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff |
| 12568 | */ |
| 12569 | A_UINT32 exp_backoff; |
| 12570 | /** number of scans performed at a given periodicity after which exponential back off value is |
| 12571 | * applied to current periodicity to obtain a newer one |
| 12572 | */ |
| 12573 | A_UINT32 exp_max_step_count; |
| 12574 | /** Followed by the variable length TLV chan_list: |
| 12575 | * wmi_extscan_bucket_channel chan_list[] */ |
| 12576 | } wmi_extscan_bucket; |
| 12577 | |
| 12578 | typedef struct { |
| 12579 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */ |
| 12580 | /** Request ID - to identify command. Cannot be 0 */ |
| 12581 | A_UINT32 request_id; |
| 12582 | /** Requestor ID - client requesting ExtScan */ |
| 12583 | A_UINT32 requestor_id; |
| 12584 | /** VDEV id(interface) that is requesting scan */ |
| 12585 | A_UINT32 vdev_id; |
| 12586 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12587 | A_UINT32 table_id; |
| 12588 | /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */ |
| 12589 | A_UINT32 base_period; |
| 12590 | /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */ |
| 12591 | A_UINT32 max_iterations; |
| 12592 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 12593 | A_UINT32 forwarding_flags; |
| 12594 | /** ExtScan configuration flags - wmi_extscan_configuration_flags */ |
| 12595 | A_UINT32 configuration_flags; |
| 12596 | /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */ |
| 12597 | A_UINT32 notify_extscan_events; |
| 12598 | /** Scan Priority, input to scan scheduler */ |
| 12599 | A_UINT32 scan_priority; |
| 12600 | /** Maximum number of BSSIDs to cache on each scan cycle */ |
| 12601 | A_UINT32 max_bssids_per_scan_cycle; |
| 12602 | /** Minimum RSSI value to report */ |
| 12603 | A_UINT32 min_rssi; |
| 12604 | /** Maximum table usage in percentage */ |
| 12605 | A_UINT32 max_table_usage; |
| 12606 | /** default dwell time in msec on active channels */ |
| 12607 | A_UINT32 min_dwell_time_active; |
| 12608 | A_UINT32 max_dwell_time_active; |
| 12609 | /** default dwell time in msec on passive channels */ |
| 12610 | A_UINT32 min_dwell_time_passive; |
| 12611 | A_UINT32 max_dwell_time_passive; |
| 12612 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 12613 | A_UINT32 min_rest_time; |
| 12614 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 12615 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 12616 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 12617 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 12618 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 12619 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 12620 | */ |
| 12621 | A_UINT32 max_rest_time; |
| 12622 | /** time before sending next set of probe requests. |
| 12623 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 12624 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 12625 | */ |
| 12626 | /** Max number of probes to be sent */ |
| 12627 | A_UINT32 n_probes; |
| 12628 | /** time in msec between 2 sets of probe requests. */ |
| 12629 | A_UINT32 repeat_probe_time; |
| 12630 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 12631 | A_UINT32 probe_spacing_time; |
| 12632 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 12633 | A_UINT32 idle_time; |
| 12634 | /** maximum time in msec allowed for scan */ |
| 12635 | A_UINT32 max_scan_time; |
| 12636 | /** delay in msec before sending first probe request after switching to a channel */ |
| 12637 | A_UINT32 probe_delay; |
| 12638 | /** Scan control flags */ |
| 12639 | A_UINT32 scan_ctrl_flags; |
| 12640 | /** Burst duration time in msec*/ |
| 12641 | A_UINT32 burst_duration; |
| 12642 | |
| 12643 | /** number of bssids in the TLV bssid_list[] */ |
| 12644 | A_UINT32 num_bssid; |
| 12645 | /** number of ssid in the TLV ssid_list[] */ |
| 12646 | A_UINT32 num_ssids; |
| 12647 | /** number of bytes in TLV ie_data[] */ |
| 12648 | A_UINT32 ie_len; |
| 12649 | /** number of buckets in the TLV bucket_list[] */ |
| 12650 | A_UINT32 num_buckets; |
| 12651 | /** in number of scans, send notifications to host after these many scans */ |
| 12652 | A_UINT32 report_threshold_num_scans; |
| 12653 | |
| 12654 | /** number of channels in channel_list[] determined by the |
| 12655 | sum of wmi_extscan_bucket.num_channels in array */ |
| 12656 | |
| 12657 | /** |
| 12658 | * TLV (tag length value ) parameters follow the extscan_cmd |
| 12659 | * structure. The TLV's are: |
| 12660 | * wmi_ssid ssid_list[]; |
| 12661 | * wmi_mac_addr bssid_list[]; |
| 12662 | * A_UINT8 ie_data[]; |
| 12663 | * wmi_extscan_bucket bucket_list[]; |
| 12664 | * wmi_extscan_bucket_channel channel_list[]; |
| 12665 | */ |
| 12666 | } wmi_extscan_start_cmd_fixed_param; |
| 12667 | |
| 12668 | typedef struct { |
| 12669 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */ |
| 12670 | /** Request ID - to match running command. 0 matches any request */ |
| 12671 | A_UINT32 request_id; |
| 12672 | /** Requestor ID - client requesting stop */ |
| 12673 | A_UINT32 requestor_id; |
| 12674 | /** VDEV id(interface) that is requesting scan */ |
| 12675 | A_UINT32 vdev_id; |
| 12676 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12677 | A_UINT32 table_id; |
| 12678 | } wmi_extscan_stop_cmd_fixed_param; |
| 12679 | |
| 12680 | enum wmi_extscan_get_cached_results_flags { |
| 12681 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000, |
| 12682 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001 |
| 12683 | }; |
| 12684 | |
| 12685 | typedef struct { |
| 12686 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */ |
| 12687 | /** request ID - used to correlate command with events */ |
| 12688 | A_UINT32 request_id; |
| 12689 | /** Requestor ID - client that requested results */ |
| 12690 | A_UINT32 requestor_id; |
| 12691 | /** VDEV id(interface) that is requesting scan */ |
| 12692 | A_UINT32 vdev_id; |
| 12693 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12694 | A_UINT32 table_id; |
| 12695 | /** maximum number of results to be returned */ |
| 12696 | A_UINT32 max_results; |
| 12697 | /** flush BSSID list - wmi_extscan_get_cached_results_flags */ |
| 12698 | A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */ |
| 12699 | } wmi_extscan_get_cached_results_cmd_fixed_param; |
| 12700 | |
| 12701 | typedef struct { |
| 12702 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */ |
| 12703 | /** request ID - used to correlate command with events */ |
| 12704 | A_UINT32 request_id; |
| 12705 | /** Requestor ID - client that requested results */ |
| 12706 | A_UINT32 requestor_id; |
| 12707 | /** VDEV id(interface) that is requesting scan */ |
| 12708 | A_UINT32 vdev_id; |
| 12709 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12710 | A_UINT32 table_id; |
| 12711 | } wmi_extscan_get_wlan_change_results_cmd_fixed_param; |
| 12712 | |
| 12713 | typedef struct { |
| 12714 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12715 | /**bssid */ |
| 12716 | wmi_mac_addr bssid; |
| 12717 | /**channel number */ |
| 12718 | A_UINT32 channel; |
| 12719 | /**upper RSSI limit */ |
| 12720 | A_UINT32 upper_rssi_limit; |
| 12721 | /**lower RSSI limit */ |
| 12722 | A_UINT32 lower_rssi_limit; |
| 12723 | } wmi_extscan_wlan_change_bssid_param; |
| 12724 | |
| 12725 | typedef struct { |
| 12726 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */ |
| 12727 | /** Request ID - to identify command. Cannot be 0 */ |
| 12728 | A_UINT32 request_id; |
| 12729 | /** Requestor ID - client requesting wlan change monitoring */ |
| 12730 | A_UINT32 requestor_id; |
| 12731 | /** VDEV id(interface) that is requesting scan */ |
| 12732 | A_UINT32 vdev_id; |
| 12733 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12734 | A_UINT32 table_id; |
| 12735 | /** operation mode: start/stop */ |
| 12736 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12737 | /** number of rssi samples to store */ |
| 12738 | A_UINT32 max_rssi_samples; |
| 12739 | /** number of samples to use to calculate RSSI average */ |
| 12740 | A_UINT32 rssi_averaging_samples; |
| 12741 | /** number of scans to confirm loss of contact with RSSI */ |
| 12742 | A_UINT32 lost_ap_scan_count; |
| 12743 | /** number of out-of-range BSSIDs necessary to send event */ |
| 12744 | A_UINT32 max_out_of_range_count; |
| 12745 | /** total number of bssid signal descriptors (in all pages) */ |
| 12746 | A_UINT32 total_entries; |
| 12747 | /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/ |
| 12748 | A_UINT32 first_entry_index; |
| 12749 | /** number of bssid signal descriptors in this page */ |
| 12750 | A_UINT32 num_entries_in_page; |
| 12751 | /* Following this structure is the TLV: |
| 12752 | * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries. |
| 12753 | */ |
| 12754 | } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param; |
| 12755 | |
| 12756 | typedef struct { |
| 12757 | /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12758 | A_UINT32 tlv_header; |
| 12759 | /**ssid */ |
| 12760 | wmi_ssid ssid; |
| 12761 | /**band */ |
| 12762 | A_UINT32 band; |
| 12763 | /**RSSI threshold for reporting */ |
| 12764 | A_UINT32 min_rssi; |
| 12765 | A_UINT32 max_rssi; |
| 12766 | } wmi_extscan_hotlist_ssid_entry; |
| 12767 | |
| 12768 | typedef struct { |
| 12769 | /** |
| 12770 | * TLV tag and len; tag equals |
| 12771 | * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param |
| 12772 | */ |
| 12773 | A_UINT32 tlv_header; |
| 12774 | /** Request ID - to identify command. Cannot be 0 */ |
| 12775 | A_UINT32 request_id; |
| 12776 | /** Requestor ID - client requesting hotlist ssid monitoring */ |
| 12777 | A_UINT32 requestor_id; |
| 12778 | /** VDEV id(interface) that is requesting scan */ |
| 12779 | A_UINT32 vdev_id; |
| 12780 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12781 | A_UINT32 table_id; |
| 12782 | /** operation mode: start/stop */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12783 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12784 | /**total number of ssids (in all pages) */ |
| 12785 | A_UINT32 total_entries; |
| 12786 | /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/ |
| 12787 | A_UINT32 first_entry_index; |
| 12788 | /**number of ssids in this page */ |
| 12789 | A_UINT32 num_entries_in_page; |
| 12790 | /** number of consecutive scans to confirm loss of an ssid **/ |
| 12791 | A_UINT32 lost_ap_scan_count; |
| 12792 | /* Following this structure is the TLV: |
| 12793 | * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; |
| 12794 | * number of element given by field num_page_entries. |
| 12795 | */ |
| 12796 | } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param; |
| 12797 | |
| 12798 | typedef struct { |
| 12799 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12800 | /**bssid */ |
| 12801 | wmi_mac_addr bssid; |
| 12802 | /**RSSI min threshold for reporting */ |
| 12803 | A_UINT32 min_rssi; |
| 12804 | /**Deprecated entry channel number */ |
| 12805 | A_UINT32 channel; |
| 12806 | /** RSSI max threshold for reporting */ |
| 12807 | A_UINT32 max_rssi; |
| 12808 | } wmi_extscan_hotlist_entry; |
| 12809 | |
| 12810 | typedef struct { |
| 12811 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */ |
| 12812 | /** Request ID - to identify command. Cannot be 0 */ |
| 12813 | A_UINT32 request_id; |
| 12814 | /** Requestor ID - client requesting hotlist monitoring */ |
| 12815 | A_UINT32 requestor_id; |
| 12816 | /** VDEV id(interface) that is requesting scan */ |
| 12817 | A_UINT32 vdev_id; |
| 12818 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12819 | A_UINT32 table_id; |
| 12820 | /** operation mode: start/stop */ |
| 12821 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12822 | /**total number of bssids (in all pages) */ |
| 12823 | A_UINT32 total_entries; |
| 12824 | /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/ |
| 12825 | A_UINT32 first_entry_index; |
| 12826 | /**number of bssids in this page */ |
| 12827 | A_UINT32 num_entries_in_page; |
| 12828 | /** number of consecutive scans to confirm loss of contact with AP */ |
| 12829 | A_UINT32 lost_ap_scan_count; |
| 12830 | /* Following this structure is the TLV: |
| 12831 | * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries. |
| 12832 | */ |
| 12833 | } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param; |
| 12834 | |
| 12835 | typedef struct { |
| 12836 | /* TLV tag and len; tag equals |
| 12837 | *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 12838 | A_UINT32 tlv_header; |
| 12839 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */ |
| 12840 | A_UINT32 config_request_id; |
| 12841 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID |
| 12842 | that configured the table */ |
| 12843 | A_UINT32 config_requestor_id; |
| 12844 | /** |
| 12845 | * VDEV id(interface) of the |
| 12846 | * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table |
| 12847 | */ |
| 12848 | A_UINT32 config_vdev_id; |
| 12849 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12850 | A_UINT32 table_id; |
| 12851 | /**total number of ssids (in all pages) */ |
| 12852 | A_UINT32 total_entries; |
| 12853 | /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 12854 | A_UINT32 first_entry_index; |
| 12855 | /**number of ssids in this page */ |
| 12856 | A_UINT32 num_entries_in_page; |
| 12857 | /* Following this structure is the TLV: |
| 12858 | * wmi_extscan_wlan_descriptor hotlist_match[]; |
| 12859 | * number of descriptors given by field num_entries_in_page |
| 12860 | */ |
| 12861 | } wmi_extscan_hotlist_ssid_match_event_fixed_param; |
| 12862 | |
| 12863 | typedef struct { |
| 12864 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12865 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12866 | A_UINT32 table_id; |
| 12867 | /** size in bytes of scan cache entry */ |
| 12868 | A_UINT32 scan_cache_entry_size; |
| 12869 | /** maximum number of scan cache entries */ |
| 12870 | A_UINT32 max_scan_cache_entries; |
| 12871 | /** maximum number of buckets per extscan request */ |
| 12872 | A_UINT32 max_buckets; |
| 12873 | /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */ |
| 12874 | A_UINT32 max_bssid_per_scan; |
| 12875 | /** table usage level at which indication must be sent to host */ |
| 12876 | A_UINT32 max_table_usage_threshold; |
| 12877 | } wmi_extscan_cache_capabilities; |
| 12878 | |
| 12879 | typedef struct { |
| 12880 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12881 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12882 | A_UINT32 table_id; |
| 12883 | /** size in bytes of wlan change entry */ |
| 12884 | A_UINT32 wlan_change_entry_size; |
| 12885 | /** maximum number of entries in wlan change table */ |
| 12886 | A_UINT32 max_wlan_change_entries; |
| 12887 | /** number of RSSI samples used for averaging RSSI */ |
| 12888 | A_UINT32 max_rssi_averaging_samples; |
| 12889 | /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */ |
| 12890 | A_UINT32 max_rssi_history_entries; |
| 12891 | } wmi_extscan_wlan_change_monitor_capabilities; |
| 12892 | |
| 12893 | typedef struct { |
| 12894 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12895 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12896 | A_UINT32 table_id; |
| 12897 | /** size in bytes of hotlist entry */ |
| 12898 | A_UINT32 wlan_hotlist_entry_size; |
| 12899 | /** maximum number of entries in wlan change table */ |
| 12900 | A_UINT32 max_hotlist_entries; |
| 12901 | } wmi_extscan_hotlist_monitor_capabilities; |
| 12902 | |
| 12903 | typedef struct { |
| 12904 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */ |
| 12905 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 12906 | A_UINT32 request_id; |
| 12907 | /** Requestor ID - client requesting stop */ |
| 12908 | A_UINT32 requestor_id; |
| 12909 | /** number of extscan caches */ |
| 12910 | A_UINT32 num_extscan_cache_tables; |
| 12911 | /** number of wlan change lists */ |
| 12912 | A_UINT32 num_wlan_change_monitor_tables; |
| 12913 | /** number of hotlists */ |
| 12914 | A_UINT32 num_hotlist_monitor_tables; |
| 12915 | /** if one sided rtt data collection is supported */ |
| 12916 | A_UINT32 rtt_one_sided_supported; |
| 12917 | /** if 11v data collection is supported */ |
| 12918 | A_UINT32 rtt_11v_supported; |
| 12919 | /** if 11mc data collection is supported */ |
| 12920 | A_UINT32 rtt_ftm_supported; |
| 12921 | /** number of extscan cache capabilities (one per table) */ |
| 12922 | A_UINT32 num_extscan_cache_capabilities; |
| 12923 | /** number of wlan change capabilities (one per table) */ |
| 12924 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 12925 | /** number of extscan hotlist capabilities (one per table) */ |
| 12926 | A_UINT32 num_extscan_hotlist_capabilities; |
| 12927 | /* Following this structure is the TLV: |
| 12928 | * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches |
| 12929 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables |
| 12930 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables |
| 12931 | */ |
| 12932 | } wmi_extscan_set_capabilities_cmd_fixed_param; |
| 12933 | |
| 12934 | typedef struct { |
| 12935 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */ |
| 12936 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 12937 | A_UINT32 request_id; |
| 12938 | /** Requestor ID - client requesting capabilities */ |
| 12939 | A_UINT32 requestor_id; |
| 12940 | } wmi_extscan_get_capabilities_cmd_fixed_param; |
| 12941 | |
| 12942 | typedef struct { |
| 12943 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */ |
| 12944 | /** Request ID of the operation that was started/stopped */ |
| 12945 | A_UINT32 request_id; |
| 12946 | /** Requestor ID of the operation that was started/stopped */ |
| 12947 | A_UINT32 requestor_id; |
| 12948 | /** VDEV id(interface) of the operation that was started/stopped */ |
| 12949 | A_UINT32 vdev_id; |
| 12950 | /** extscan WMI command */ |
| 12951 | A_UINT32 command; |
| 12952 | /** operation mode: start/stop */ |
| 12953 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12954 | /**success/failure */ |
| 12955 | A_UINT32 status; /* enum wmi_extscan_start_stop_status */ |
| 12956 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12957 | A_UINT32 table_id; |
| 12958 | } wmi_extscan_start_stop_event_fixed_param; |
| 12959 | |
| 12960 | typedef struct { |
| 12961 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */ |
| 12962 | /** Request ID of the extscan operation that is currently running */ |
| 12963 | A_UINT32 request_id; |
| 12964 | /** Requestor ID of the extscan operation that is currently running */ |
| 12965 | A_UINT32 requestor_id; |
| 12966 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 12967 | A_UINT32 vdev_id; |
| 12968 | /** scan event (wmi_scan_event_type) */ |
| 12969 | A_UINT32 event; /* wmi_extscan_event_type */ |
| 12970 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12971 | A_UINT32 table_id; |
| 12972 | /**number of buckets */ |
| 12973 | A_UINT32 num_buckets; |
| 12974 | /* Following this structure is the TLV: |
| 12975 | * A_UINT32 bucket_id[]; // number of elements given by field num_buckets. |
| 12976 | */ |
| 12977 | } wmi_extscan_operation_event_fixed_param; |
| 12978 | |
| 12979 | /* Types of extscan tables */ |
| 12980 | typedef enum { |
| 12981 | EXTSCAN_TABLE_NONE = 0, |
| 12982 | EXTSCAN_TABLE_BSSID = 1, |
| 12983 | EXTSCAN_TABLE_RSSI = 2, |
| 12984 | } wmi_extscan_table_type; |
| 12985 | |
| 12986 | typedef struct { |
| 12987 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */ |
| 12988 | /** Request ID of the extscan operation that is currently running */ |
| 12989 | A_UINT32 request_id; |
| 12990 | /** Requestor ID of the extscan operation that is currently running */ |
| 12991 | A_UINT32 requestor_id; |
| 12992 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 12993 | A_UINT32 vdev_id; |
| 12994 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12995 | A_UINT32 table_id; |
| 12996 | /**see wmi_extscan_table_type for table reporting usage */ |
| 12997 | A_UINT32 table_type; |
| 12998 | /**number of entries in use */ |
| 12999 | A_UINT32 entries_in_use; |
| 13000 | /**maximum number of entries in table */ |
| 13001 | A_UINT32 maximum_entries; |
| 13002 | } wmi_extscan_table_usage_event_fixed_param; |
| 13003 | |
| 13004 | typedef enum { |
| 13005 | /** |
| 13006 | * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec) |
| 13007 | * this can be used to discard scan results |
| 13008 | */ |
| 13009 | WMI_SCAN_STATUS_INTERRUPTED = 1 |
| 13010 | } wmi_scan_status_flags; |
| 13011 | |
| 13012 | |
| 13013 | typedef struct { |
| 13014 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
Anurag Chouhan | cc474b7 | 2016-04-18 17:36:23 +0530 | [diff] [blame] | 13015 | /** RSSI */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13016 | A_UINT32 rssi; |
Anurag Chouhan | cc474b7 | 2016-04-18 17:36:23 +0530 | [diff] [blame] | 13017 | /** time stamp in milliseconds */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13018 | A_UINT32 tstamp; |
| 13019 | /** Extscan cycle during which this entry was scanned */ |
| 13020 | A_UINT32 scan_cycle_id; |
| 13021 | /** |
| 13022 | * flag to indicate if the given result was obtained as part of |
| 13023 | * interrupted (aborted/large time gap preempted) scan |
| 13024 | */ |
| 13025 | A_UINT32 flags; |
Anurag Chouhan | cc474b7 | 2016-04-18 17:36:23 +0530 | [diff] [blame] | 13026 | /** Bitmask of buckets (i.e. sets of channels) scanned */ |
| 13027 | A_UINT32 buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13028 | } wmi_extscan_rssi_info; |
| 13029 | |
| 13030 | typedef struct { |
| 13031 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 13032 | /**bssid */ |
| 13033 | wmi_mac_addr bssid; |
| 13034 | /**ssid */ |
| 13035 | wmi_ssid ssid; |
| 13036 | /**channel number */ |
| 13037 | A_UINT32 channel; |
| 13038 | /* capabilities */ |
| 13039 | A_UINT32 capabilities; |
| 13040 | /* beacon interval in TUs */ |
| 13041 | A_UINT32 beacon_interval; |
| 13042 | /**time stamp in milliseconds - time last seen */ |
| 13043 | A_UINT32 tstamp; |
| 13044 | /**flags - _tExtScanEntryFlags */ |
| 13045 | A_UINT32 flags; |
| 13046 | /**RTT in ns */ |
| 13047 | A_UINT32 rtt; |
| 13048 | /**rtt standard deviation */ |
| 13049 | A_UINT32 rtt_sd; |
| 13050 | /* rssi information */ |
| 13051 | A_UINT32 number_rssi_samples; |
| 13052 | /** IE length */ |
| 13053 | A_UINT32 ie_length; /* length of IE data */ |
| 13054 | } wmi_extscan_wlan_descriptor; |
| 13055 | |
| 13056 | typedef struct { |
| 13057 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */ |
| 13058 | /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 13059 | A_UINT32 request_id; |
| 13060 | /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 13061 | A_UINT32 requestor_id; |
| 13062 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 13063 | A_UINT32 vdev_id; |
| 13064 | /** Request ID of the extscan operation that is currently running */ |
| 13065 | A_UINT32 extscan_request_id; |
| 13066 | /** Requestor ID of the extscan operation that is currently running */ |
| 13067 | A_UINT32 extscan_requestor_id; |
| 13068 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 13069 | A_UINT32 extscan_vdev_id; |
| 13070 | /** table ID - to allow support for multiple simultaneous tables */ |
| 13071 | A_UINT32 table_id; |
| 13072 | /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */ |
| 13073 | A_UINT32 current_tstamp; |
| 13074 | /**total number of bssids (in all pages) */ |
| 13075 | A_UINT32 total_entries; |
| 13076 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 13077 | A_UINT32 first_entry_index; |
| 13078 | /**number of bssids in this page */ |
| 13079 | A_UINT32 num_entries_in_page; |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 13080 | /* number of buckets scanned */ |
| 13081 | A_UINT32 buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13082 | /* Followed by the variable length TLVs |
| 13083 | * wmi_extscan_wlan_descriptor bssid_list[] |
| 13084 | * wmi_extscan_rssi_info rssi_list[] |
| 13085 | * A_UINT8 ie_list[] |
| 13086 | */ |
| 13087 | } wmi_extscan_cached_results_event_fixed_param; |
| 13088 | |
| 13089 | typedef enum { |
| 13090 | EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00, |
| 13091 | EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01, |
| 13092 | EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02, |
| 13093 | } wmi_extscan_wlan_change_flags; |
| 13094 | |
| 13095 | typedef struct { |
| 13096 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 13097 | /**bssid */ |
| 13098 | wmi_mac_addr bssid; |
| 13099 | /**time stamp in milliseconds */ |
| 13100 | A_UINT32 tstamp; |
| 13101 | /**upper RSSI limit */ |
| 13102 | A_UINT32 upper_rssi_limit; |
| 13103 | /**lower RSSI limit */ |
| 13104 | A_UINT32 lower_rssi_limit; |
| 13105 | /** channel */ |
| 13106 | A_UINT32 channel; /* in MHz */ |
| 13107 | /**current RSSI average */ |
| 13108 | A_UINT32 rssi_average; |
| 13109 | /**flags - wmi_extscan_wlan_change_flags */ |
| 13110 | A_UINT32 flags; |
| 13111 | /**legnth of RSSI history to follow (number of values) */ |
| 13112 | A_UINT32 num_rssi_samples; |
| 13113 | } wmi_extscan_wlan_change_result_bssid; |
| 13114 | |
| 13115 | typedef struct { |
| 13116 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */ |
| 13117 | /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 13118 | A_UINT32 request_id; |
| 13119 | /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 13120 | A_UINT32 requestor_id; |
| 13121 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 13122 | A_UINT32 vdev_id; |
| 13123 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 13124 | A_UINT32 config_request_id; |
| 13125 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 13126 | A_UINT32 config_requestor_id; |
| 13127 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 13128 | A_UINT32 config_vdev_id; |
| 13129 | /** table ID - to allow support for multiple simultaneous tables */ |
| 13130 | A_UINT32 table_id; |
| 13131 | /**number of entries with RSSI out of range or BSSID not detected */ |
| 13132 | A_UINT32 change_count; |
| 13133 | /**total number of bssid signal descriptors (in all pages) */ |
| 13134 | A_UINT32 total_entries; |
| 13135 | /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 13136 | A_UINT32 first_entry_index; |
| 13137 | /**number of bssids signal descriptors in this page */ |
| 13138 | A_UINT32 num_entries_in_page; |
| 13139 | /* Following this structure is the TLV: |
| 13140 | * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page. |
| 13141 | * Following this structure is the list of RSSI values (each is an A_UINT8): |
| 13142 | * A_UINT8 rssi_list[]; // last N RSSI values. |
| 13143 | */ |
| 13144 | } wmi_extscan_wlan_change_results_event_fixed_param; |
| 13145 | |
| 13146 | enum _tExtScanEntryFlags { |
| 13147 | WMI_HOTLIST_FLAG_NONE = 0x00, |
| 13148 | WMI_HOTLIST_FLAG_PRESENCE = 0x01, |
| 13149 | WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80, |
| 13150 | }; |
| 13151 | |
| 13152 | typedef struct { |
| 13153 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 13154 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 13155 | A_UINT32 config_request_id; |
| 13156 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 13157 | A_UINT32 config_requestor_id; |
| 13158 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 13159 | A_UINT32 config_vdev_id; |
| 13160 | /** table ID - to allow support for multiple simultaneous tables */ |
| 13161 | A_UINT32 table_id; |
| 13162 | /**total number of bssids (in all pages) */ |
| 13163 | A_UINT32 total_entries; |
| 13164 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 13165 | A_UINT32 first_entry_index; |
| 13166 | /**number of bssids in this page */ |
| 13167 | A_UINT32 num_entries_in_page; |
| 13168 | /* Following this structure is the TLV: |
| 13169 | * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page. |
| 13170 | */ |
| 13171 | } wmi_extscan_hotlist_match_event_fixed_param; |
| 13172 | |
| 13173 | typedef struct { |
| 13174 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */ |
| 13175 | /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 13176 | A_UINT32 request_id; |
| 13177 | /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 13178 | A_UINT32 requestor_id; |
| 13179 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 13180 | A_UINT32 vdev_id; |
| 13181 | /** number of extscan caches */ |
| 13182 | A_UINT32 num_extscan_cache_tables; |
| 13183 | /** number of wlan change lists */ |
| 13184 | A_UINT32 num_wlan_change_monitor_tables; |
| 13185 | /** number of hotlists */ |
| 13186 | A_UINT32 num_hotlist_monitor_tables; |
| 13187 | /** if one sided rtt data collection is supported */ |
| 13188 | A_UINT32 rtt_one_sided_supported; |
| 13189 | /** if 11v data collection is supported */ |
| 13190 | A_UINT32 rtt_11v_supported; |
| 13191 | /** if 11mc data collection is supported */ |
| 13192 | A_UINT32 rtt_ftm_supported; |
| 13193 | /** number of extscan cache capabilities (one per table) */ |
| 13194 | A_UINT32 num_extscan_cache_capabilities; |
| 13195 | /** number of wlan change capabilities (one per table) */ |
| 13196 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 13197 | /** number of extscan hotlist capabilities (one per table) */ |
| 13198 | A_UINT32 num_extscan_hotlist_capabilities; |
| 13199 | /* max number of roaming ssid whitelist firmware can support */ |
| 13200 | A_UINT32 num_roam_ssid_whitelist; |
| 13201 | /* max number of blacklist bssid firmware can support */ |
| 13202 | A_UINT32 num_roam_bssid_blacklist; |
| 13203 | /* max number of preferred list firmware can support */ |
| 13204 | A_UINT32 num_roam_bssid_preferred_list; |
| 13205 | /* max number of hotlist ssids firmware can support */ |
| 13206 | A_UINT32 num_extscan_hotlist_ssid; |
| 13207 | /* max number of epno networks firmware can support */ |
| 13208 | A_UINT32 num_epno_networks; |
| 13209 | |
| 13210 | /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically |
| 13211 | * supports multiple lists of each type. |
| 13212 | * |
| 13213 | * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists) |
| 13214 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables |
| 13215 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables |
| 13216 | */ |
| 13217 | } wmi_extscan_capabilities_event_fixed_param; |
| 13218 | |
| 13219 | /* WMI_D0_WOW_DISABLE_ACK_EVENTID */ |
| 13220 | typedef struct { |
| 13221 | A_UINT32 tlv_header; |
| 13222 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */ |
| 13223 | A_UINT32 reserved0; /* for future need */ |
| 13224 | } wmi_d0_wow_disable_ack_event_fixed_param; |
| 13225 | |
| 13226 | /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */ |
| 13227 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 13228 | /** TLV tag and len; tag equals |
| 13229 | * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param |
| 13230 | */ |
| 13231 | A_UINT32 tlv_header; |
| 13232 | /** pdev_id for identifying the MAC |
| 13233 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13234 | */ |
| 13235 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13236 | } wmi_pdev_resume_event_fixed_param; |
| 13237 | |
| 13238 | /** value representing all modules */ |
| 13239 | #define WMI_DEBUG_LOG_MODULE_ALL 0xffff |
| 13240 | |
| 13241 | /* param definitions */ |
| 13242 | |
| 13243 | /** |
| 13244 | * Log level for a given module. Value contains both module id and log level. |
| 13245 | * here is the bitmap definition for value. |
| 13246 | * module Id : 16 |
| 13247 | * Flags : reserved |
| 13248 | * Level : 8 |
| 13249 | * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global). |
| 13250 | * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting. |
| 13251 | */ |
| 13252 | #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1 |
| 13253 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13254 | #define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13255 | (val) |= (lvl & 0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13256 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13257 | |
| 13258 | #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff) |
| 13259 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13260 | #define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13261 | (val) |= ((mid & 0xffff) << 16); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13262 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13263 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13264 | #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13265 | |
| 13266 | /** |
| 13267 | * Enable the debug log for a given vdev. Value is vdev id |
| 13268 | */ |
| 13269 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2 |
| 13270 | |
| 13271 | /** |
| 13272 | * Disable the debug log for a given vdev. Value is vdev id |
| 13273 | * All the log level for a given VDEV is disabled except the ERROR log messages |
| 13274 | */ |
| 13275 | |
| 13276 | #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3 |
| 13277 | |
| 13278 | /** |
| 13279 | * set vdev enable bitmap. value is the vden enable bitmap |
| 13280 | */ |
| 13281 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4 |
| 13282 | |
| 13283 | /** |
| 13284 | * set a given log level to all the modules specified in the module bitmap. |
| 13285 | * and set the log levle for all other modules to DBGLOG_ERR. |
| 13286 | * value: log levelt to be set. |
| 13287 | * module_id_bitmap : identifies the modules for which the log level should be set and |
| 13288 | * modules for which the log level should be reset to DBGLOG_ERR. |
| 13289 | */ |
| 13290 | #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5 |
| 13291 | |
| 13292 | #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3) |
| 13293 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13294 | #define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \ |
| 13295 | ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \ |
| 13296 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13297 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13298 | #define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \ |
| 13299 | ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \ |
| 13300 | (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13301 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13302 | #define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \ |
| 13303 | (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \ |
| 13304 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13305 | |
| 13306 | #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */ |
| 13307 | typedef struct { |
| 13308 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */ |
| 13309 | A_UINT32 dbg_log_param; |
| 13310 | /** param types are defined above */ |
| 13311 | A_UINT32 value; |
| 13312 | /* The below array will follow this tlv ->fixed length module_id_bitmap[] |
| 13313 | A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS]; |
| 13314 | */ |
| 13315 | } wmi_debug_log_config_cmd_fixed_param; |
| 13316 | |
| 13317 | typedef struct { |
| 13318 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */ |
| 13319 | A_UINT32 param; /* Reserved for future use */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 13320 | /** pdev_id for identifying the MAC |
| 13321 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13322 | */ |
| 13323 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13324 | } wmi_pdev_get_temperature_cmd_fixed_param; |
| 13325 | |
| 13326 | typedef struct { |
| 13327 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */ |
| 13328 | A_INT32 value; /* temprature value in Celcius degree */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 13329 | /** pdev_id for identifying the MAC |
| 13330 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13331 | */ |
| 13332 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13333 | } wmi_pdev_temperature_event_fixed_param; |
| 13334 | |
Nitesh Shah | fcedd3b | 2016-07-21 17:24:35 +0530 | [diff] [blame] | 13335 | typedef enum { |
| 13336 | ANTDIV_HW_CFG_STATUS, |
| 13337 | ANTDIV_SW_CFG_STATUS, |
| 13338 | ANTDIV_MAX_STATUS_TYPE_NUM |
| 13339 | } ANTDIV_STATUS_TYPE; |
| 13340 | |
| 13341 | typedef struct { |
| 13342 | /** |
| 13343 | * TLV tag and len; tag equals |
| 13344 | * WMITLV_TAG_STRUC_wmi_pdev_get_antdiv_status_cmd_fixed_param |
| 13345 | */ |
| 13346 | A_UINT32 tlv_header; |
| 13347 | /* Status event ID - see ANTDIV_STATUS_TYPE */ |
| 13348 | A_UINT32 status_event_id; |
| 13349 | /** |
| 13350 | * pdev_id for identifying the MAC |
| 13351 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13352 | */ |
| 13353 | A_UINT32 pdev_id; |
| 13354 | } wmi_pdev_get_antdiv_status_cmd_fixed_param; |
| 13355 | |
| 13356 | typedef struct { |
| 13357 | /** |
| 13358 | * TLV tag and len; tag equals |
| 13359 | * WMITLV_TAG_STRUC_wmi_pdev_antdiv_status_event_fixed_param |
| 13360 | */ |
| 13361 | A_UINT32 tlv_header; |
| 13362 | /* ANT DIV feature enabled or not */ |
| 13363 | A_UINT32 support; |
| 13364 | A_UINT32 chain_num; /* how many chain supported */ |
| 13365 | /* how many ANT supported, 32 max */ |
| 13366 | A_UINT32 ant_num; |
| 13367 | /** |
| 13368 | * Each entry is for a tx/rx chain, and contains a bitmap |
| 13369 | * identifying the antennas attached to that tx/rx chain. |
| 13370 | */ |
| 13371 | A_UINT32 selectable_ant_mask[8]; |
| 13372 | /** |
| 13373 | * pdev_id for identifying the MAC |
| 13374 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13375 | */ |
| 13376 | A_UINT32 pdev_id; |
| 13377 | } wmi_pdev_antdiv_status_event_fixed_param; |
| 13378 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13379 | typedef struct { |
| 13380 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */ |
| 13381 | A_UINT32 vdev_id; |
| 13382 | A_UINT32 enable; |
| 13383 | A_UINT32 srv_ipv4; /* server IP */ |
| 13384 | A_UINT32 start_lsb; /* starting address assigned to client */ |
| 13385 | A_UINT32 num_client; /* number of clients we support */ |
| 13386 | } wmi_set_dhcp_server_offload_cmd_fixed_param; |
| 13387 | |
| 13388 | typedef enum { |
| 13389 | AP_RX_DATA_OFFLOAD = 0x00, |
| 13390 | STA_RX_DATA_OFFLOAD = 0x01, |
| 13391 | } wmi_ipa_offload_types; |
| 13392 | |
| 13393 | /** |
| 13394 | * This command is sent from WLAN host driver to firmware for |
| 13395 | * enabling/disabling IPA data-path offload features. |
| 13396 | * |
| 13397 | * |
| 13398 | * Enabling data path offload to IPA(based on host INI configuration), example: |
| 13399 | * when STA interface comes up, |
| 13400 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 13401 | * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 13402 | * |
| 13403 | * Disabling data path offload to IPA, example: |
| 13404 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 13405 | * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 13406 | * |
| 13407 | * |
| 13408 | * This command is applicable only on the PCIE LL systems |
| 13409 | * |
| 13410 | */ |
| 13411 | typedef struct { |
| 13412 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */ |
| 13413 | A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */ |
| 13414 | A_UINT32 vdev_id; |
| 13415 | A_UINT32 enable; /* 1 == enable, 0 == disable */ |
| 13416 | } wmi_ipa_offload_enable_disable_cmd_fixed_param; |
| 13417 | |
| 13418 | typedef enum { |
| 13419 | WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0, |
| 13420 | WMI_LED_FLASHING_PATTERN_CONNECTED = 1, |
| 13421 | WMI_LED_FLASHING_PATTERN_RESERVED = 2, |
| 13422 | } wmi_set_led_flashing_type; |
| 13423 | |
| 13424 | /** |
| 13425 | The state of the LED GPIO control is determined by two 32 bit values(X_0 and X_1) to produce a 64 bit value. |
| 13426 | Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will |
| 13427 | remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts |
| 13428 | with the MSB of X_0 and continues to the LSB of X_1. After executing the timer interval of the LSB of X_1, the |
| 13429 | pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to |
| 13430 | High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of |
| 13431 | Zero is reached, it is skipped and moves on to the next interval. |
| 13432 | */ |
| 13433 | typedef struct { |
| 13434 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */ |
| 13435 | A_UINT32 pattern_id; /* pattern identifier */ |
| 13436 | A_UINT32 led_x0; /* led flashing parameter0 */ |
| 13437 | A_UINT32 led_x1; /* led flashing parameter1 */ |
| 13438 | A_UINT32 gpio_num; /* GPIO number */ |
| 13439 | } wmi_set_led_flashing_cmd_fixed_param; |
| 13440 | |
| 13441 | /** |
| 13442 | * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses |
| 13443 | * within small networks that do not include a local name server. |
| 13444 | * It utilizes essentially the same programming interfaces, packet formats and operating semantics |
| 13445 | * as the unicast DNS, and the advantage is zero configuration service while no need for central or |
| 13446 | * global server. |
| 13447 | * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services |
| 13448 | * by type in a specified domain using standard DNS queries. |
| 13449 | * Here, we provide the ability to advertise the available services by responding to mDNS queries. |
| 13450 | */ |
| 13451 | typedef struct { |
| 13452 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */ |
| 13453 | A_UINT32 vdev_id; |
| 13454 | A_UINT32 enable; |
| 13455 | } wmi_mdns_offload_cmd_fixed_param; |
| 13456 | |
| 13457 | #define WMI_MAX_MDNS_FQDN_LEN 64 |
| 13458 | #define WMI_MAX_MDNS_RESP_LEN 512 |
| 13459 | #define WMI_MDNS_FQDN_TYPE_GENERAL 0 |
| 13460 | #define WMI_MDNS_FQDN_TYPE_UNIQUE 1 |
| 13461 | |
| 13462 | typedef struct { |
| 13463 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */ |
| 13464 | A_UINT32 vdev_id; |
| 13465 | /** type of fqdn, general or unique */ |
| 13466 | A_UINT32 type; |
| 13467 | /** length of fqdn */ |
| 13468 | A_UINT32 fqdn_len; |
| 13469 | /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len |
| 13470 | * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries |
| 13471 | */ |
| 13472 | } wmi_mdns_set_fqdn_cmd_fixed_param; |
| 13473 | |
| 13474 | typedef struct { |
| 13475 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */ |
| 13476 | A_UINT32 vdev_id; |
| 13477 | /** Answer Resource Record count */ |
| 13478 | A_UINT32 AR_count; |
| 13479 | /** length of response */ |
| 13480 | A_UINT32 resp_len; |
| 13481 | /* Following this structure is the TLV byte stream of resp data of length resp_len |
| 13482 | * A_UINT8 resp_data[]; // responses consisits of Resource Records |
| 13483 | */ |
| 13484 | } wmi_mdns_set_resp_cmd_fixed_param; |
| 13485 | |
| 13486 | typedef struct { |
| 13487 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */ |
| 13488 | A_UINT32 vdev_id; |
| 13489 | } wmi_mdns_get_stats_cmd_fixed_param; |
| 13490 | |
| 13491 | typedef struct { |
| 13492 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */ |
| 13493 | A_UINT32 vdev_id; |
| 13494 | /** curTimestamp in milliseconds */ |
| 13495 | A_UINT32 curTimestamp; |
| 13496 | /** last received Query in milliseconds */ |
| 13497 | A_UINT32 lastQueryTimestamp; |
| 13498 | /** last sent Response in milliseconds */ |
| 13499 | A_UINT32 lastResponseTimestamp; |
| 13500 | /** stats of received queries */ |
| 13501 | A_UINT32 totalQueries; |
| 13502 | /** stats of macth queries */ |
| 13503 | A_UINT32 totalMatches; |
| 13504 | /** stats of responses */ |
| 13505 | A_UINT32 totalResponses; |
| 13506 | /** indicate the current status of mDNS offload */ |
| 13507 | A_UINT32 status; |
| 13508 | } wmi_mdns_stats_event_fixed_param; |
| 13509 | |
| 13510 | /** |
| 13511 | * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process |
| 13512 | * down to the firmware. When this feature is enabled, firmware can process the association/disassociation |
| 13513 | * request and create/remove connection even host is suspended. |
| 13514 | * 3 major components are offloaded: |
| 13515 | * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response. |
| 13516 | * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4. |
| 13517 | * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK. |
| 13518 | * Current implementation only supports WPA2 CCMP. |
| 13519 | */ |
| 13520 | |
| 13521 | typedef struct { |
| 13522 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */ |
| 13523 | /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */ |
| 13524 | A_UINT32 vdev_id; |
| 13525 | /** enable/disable sap auth offload */ |
| 13526 | A_UINT32 enable; |
| 13527 | /** sap ssid */ |
| 13528 | wmi_ssid ap_ssid; |
| 13529 | /** authentication mode (defined above) */ |
| 13530 | A_UINT32 rsn_authmode; |
| 13531 | /** unicast cipher set */ |
| 13532 | A_UINT32 rsn_ucastcipherset; |
| 13533 | /** mcast/group cipher set */ |
| 13534 | A_UINT32 rsn_mcastcipherset; |
| 13535 | /** mcast/group management frames cipher set */ |
| 13536 | A_UINT32 rsn_mcastmgmtcipherset; |
| 13537 | /** sap channel */ |
| 13538 | A_UINT32 channel; |
| 13539 | /** length of psk */ |
| 13540 | A_UINT32 psk_len; |
| 13541 | /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len |
| 13542 | * A_UINT8 psk[]; |
| 13543 | */ |
| 13544 | } wmi_sap_ofl_enable_cmd_fixed_param; |
| 13545 | |
| 13546 | typedef struct { |
| 13547 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */ |
| 13548 | /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */ |
| 13549 | A_UINT32 vdev_id; |
| 13550 | /** aid (association id) of this station */ |
| 13551 | A_UINT32 assoc_id; |
| 13552 | /** peer station's mac addr */ |
| 13553 | wmi_mac_addr peer_macaddr; |
| 13554 | /** length of association request frame */ |
| 13555 | A_UINT32 data_len; |
| 13556 | /* Following this structure is the TLV byte stream of a whole association request frame of length data_len |
| 13557 | * A_UINT8 bufp[]; |
| 13558 | */ |
| 13559 | } wmi_sap_ofl_add_sta_event_fixed_param; |
| 13560 | |
| 13561 | typedef enum { |
| 13562 | SAP_OFL_DEL_STA_FLAG_NONE = 0x00, |
| 13563 | SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01, |
| 13564 | } wmi_sap_ofl_del_sta_flags; |
| 13565 | |
| 13566 | typedef struct { |
| 13567 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */ |
| 13568 | /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */ |
| 13569 | A_UINT32 vdev_id; |
| 13570 | /** aid (association id) of this station */ |
| 13571 | A_UINT32 assoc_id; |
| 13572 | /** peer station's mac addr */ |
| 13573 | wmi_mac_addr peer_macaddr; |
| 13574 | /** disassociation reason */ |
| 13575 | A_UINT32 reason; |
| 13576 | /** flags - wmi_sap_ofl_del_sta_flags */ |
| 13577 | A_UINT32 flags; |
| 13578 | } wmi_sap_ofl_del_sta_event_fixed_param; |
| 13579 | |
| 13580 | typedef struct { |
| 13581 | /* |
| 13582 | * TLV tag and len; tag equals |
| 13583 | * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param |
| 13584 | */ |
| 13585 | A_UINT32 tlv_header; |
| 13586 | A_UINT32 vdev_id; |
| 13587 | /* Number of client failure connection attempt */ |
| 13588 | A_UINT32 num_retry; |
| 13589 | /*Time in milliseconds to record the client's failure connection attempts*/ |
| 13590 | A_UINT32 retry_allow_time_ms; |
| 13591 | /* |
| 13592 | * Time in milliseconds to drop the connection request if |
| 13593 | * client is blacklisted |
| 13594 | */ |
| 13595 | A_UINT32 blackout_time_ms; |
| 13596 | } wmi_sap_set_blacklist_param_cmd_fixed_param; |
| 13597 | |
| 13598 | typedef struct { |
| 13599 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */ |
| 13600 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 13601 | /** This structure is used to send REQ binary blobs |
| 13602 | * from application/service to firmware where Host drv is pass through . |
| 13603 | * Following this structure is the TLV: |
| 13604 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 13605 | */ |
| 13606 | } wmi_apfind_cmd_param; |
| 13607 | |
| 13608 | typedef enum apfind_event_type_e { |
| 13609 | APFIND_MATCH_EVENT = 0, |
| 13610 | APFIND_WAKEUP_EVENT, |
| 13611 | } APFIND_EVENT_TYPE; |
| 13612 | |
| 13613 | typedef struct { |
| 13614 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */ |
| 13615 | A_UINT32 event_type; /** APFIND_EVENT_TYPE */ |
| 13616 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 13617 | /** This structure is used to send event binary blobs |
| 13618 | * from firmware to application/service and Host drv. |
| 13619 | * Following this structure is the TLV: |
| 13620 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 13621 | */ |
| 13622 | } wmi_apfind_event_hdr; |
| 13623 | |
| 13624 | /** |
| 13625 | * OCB DCC types and structures. |
| 13626 | */ |
| 13627 | |
| 13628 | /** |
| 13629 | * DCC types as described in ETSI TS 102 687 |
| 13630 | * Type Format stepSize referenceValue numBits |
| 13631 | * ------------------------------------------------------------------------- |
| 13632 | * ndlType_acPrio INTEGER (0...7) 1 number 3 |
| 13633 | * ndlType_controlLoop INTEGER (0...7) 1 0 3 |
| 13634 | * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13 |
| 13635 | * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10 |
| 13636 | * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13 |
| 13637 | * ndlType_datarate INTEGER (0..7) Table 8 3 |
| 13638 | * ndlType_distance INTEGER (0..4095) 1 m 0 12 |
| 13639 | * ndlType_numberElements INTEGER (0..63) number 6 |
| 13640 | * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11 |
| 13641 | * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10 |
| 13642 | * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5 |
| 13643 | * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7 |
| 13644 | * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7 |
| 13645 | * ndlType_timing INTEGER (0..4095) 10 ms 0 12 |
| 13646 | * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7 |
| 13647 | * ndlType_ratio INTEGER (0..100) 1 % 0 % 7 |
| 13648 | * ndlType_exponent INTEGER (0..100) 0.1 0 7 |
| 13649 | * ndlType_queueStatus Enumeration Table A.2 1 |
| 13650 | * ndlType_dccMechanism Bitset Table A.2 6 |
| 13651 | * |
| 13652 | * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE) |
| 13653 | * cannot be changed without breaking WMI compatibility. |
| 13654 | * |
| 13655 | * NOTE: For each of the types, one additional bit is allocated. This |
| 13656 | * leftmost bit is used to indicate that the value is invalid. |
| 13657 | */ |
| 13658 | #define SIZE_NDLTYPE_ACPRIO (1 + 3) |
| 13659 | #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3) |
| 13660 | #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13) |
| 13661 | #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10) |
| 13662 | #define SIZE_NDLTYPE_CHANNELUSE (1 + 13) |
| 13663 | #define SIZE_NDLTYPE_DATARATE (1 + 3) |
| 13664 | #define SIZE_NDLTYPE_DISTANCE (1 + 12) |
| 13665 | #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6) |
| 13666 | #define SIZE_NDLTYPE_PACKETDURATION (1 + 11) |
| 13667 | #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10) |
| 13668 | #define SIZE_NDLTYPE_PATHLOSS (1 + 5) |
| 13669 | #define SIZE_NDLTYPE_RXPOWER (1 + 7) |
| 13670 | #define SIZE_NDLTYPE_SNR (1 + 7) |
| 13671 | #define SIZE_NDLTYPE_TIMING (1 + 12) |
| 13672 | #define SIZE_NDLTYPE_TXPOWER (1 + 7) |
| 13673 | #define SIZE_NDLTYPE_RATIO (1 + 7) |
| 13674 | #define SIZE_NDLTYPE_EXPONENT (1 + 7) |
| 13675 | #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1) |
| 13676 | #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6) |
| 13677 | #define SIZE_BYTE (8) |
| 13678 | |
| 13679 | #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1) |
| 13680 | #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1) |
| 13681 | #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1) |
| 13682 | #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1) |
| 13683 | #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1) |
| 13684 | #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1) |
| 13685 | #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1) |
| 13686 | #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1) |
| 13687 | #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1) |
| 13688 | #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1) |
| 13689 | #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1) |
| 13690 | #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1) |
| 13691 | #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1) |
| 13692 | #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1) |
| 13693 | #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1) |
| 13694 | #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1) |
| 13695 | #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1) |
| 13696 | #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1) |
| 13697 | #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1) |
| 13698 | |
| 13699 | /** |
| 13700 | * The MCS_COUNT macro cannot be modified without breaking |
| 13701 | * WMI compatibility. |
| 13702 | */ |
| 13703 | #define MCS_COUNT (8) |
| 13704 | |
| 13705 | /** |
| 13706 | * Flags for ndlType_dccMechanism. |
| 13707 | */ |
| 13708 | typedef enum { |
| 13709 | DCC_MECHANISM_TPC = 1, |
| 13710 | DCC_MECHANISM_TRC = 2, |
| 13711 | DCC_MECHANISM_TDC = 4, |
| 13712 | DCC_MECHANISM_DSC = 8, |
| 13713 | DCC_MECHANISM_TAC = 16, |
| 13714 | DCC_MECHANISM_RESERVED = 32, |
| 13715 | DCC_MECHANISM_ALL = 0x3f, |
| 13716 | } wmi_dcc_ndl_type_dcc_mechanism; |
| 13717 | |
| 13718 | /** Values for ndlType_queueStatus. */ |
| 13719 | typedef enum { |
| 13720 | DCC_QUEUE_CLOSED = 0, |
| 13721 | DCC_QUEUE_OPEN = 1, |
| 13722 | } wmi_dcc_ndl_type_queue_status; |
| 13723 | |
| 13724 | /** |
| 13725 | * For ndlType_acPrio, use the values in wmi_traffic_ac. |
| 13726 | * Values for ndlType_datarate. |
| 13727 | */ |
| 13728 | typedef enum { |
| 13729 | DCC_DATARATE_3_MBPS = 0, |
| 13730 | DCC_DATARATE_4_5_MBPS = 1, |
| 13731 | DCC_DATARATE_6_MBPS = 2, |
| 13732 | DCC_DATARATE_9_MBPS = 3, |
| 13733 | DCC_DATARATE_12_MBPS = 4, |
| 13734 | DCC_DATARATE_18_MBPS = 5, |
| 13735 | DCC_DATARATE_24_MBPS = 6, |
| 13736 | DCC_DATARATE_27_MBPS = 7, |
| 13737 | } wmi_dcc_ndl_type_datarate; |
| 13738 | |
| 13739 | /** Data structure for active state configuration. */ |
| 13740 | typedef struct { |
| 13741 | /** TLV tag and len; tag equals |
| 13742 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config |
| 13743 | */ |
| 13744 | A_UINT32 tlv_header; |
| 13745 | /** |
| 13746 | * NDL_asStateId, ndlType_numberElements, 1+6 bits. |
| 13747 | * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits. |
| 13748 | */ |
| 13749 | A_UINT32 state_info; |
| 13750 | /** |
| 13751 | * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits. |
| 13752 | * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits. |
| 13753 | * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits. |
| 13754 | * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits. |
| 13755 | */ |
| 13756 | A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)]; |
| 13757 | /** |
| 13758 | * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 13759 | * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 13760 | * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 13761 | * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 13762 | */ |
| 13763 | A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 13764 | /** |
| 13765 | * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 13766 | * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 13767 | * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 13768 | * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits. |
| 13769 | */ |
| 13770 | A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 13771 | /** |
| 13772 | * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 13773 | * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 13774 | * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 13775 | * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 13776 | */ |
| 13777 | A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 13778 | /** |
| 13779 | * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits. |
| 13780 | * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits. |
| 13781 | * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits. |
| 13782 | * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits. |
| 13783 | */ |
| 13784 | A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)]; |
| 13785 | } wmi_dcc_ndl_active_state_config; |
| 13786 | |
| 13787 | #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7) |
| 13788 | #define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val) |
| 13789 | #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11) |
| 13790 | #define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val) |
| 13791 | #define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM) |
| 13792 | #define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val) |
| 13793 | #define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 13794 | #define WMI_NDL_AS_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val) |
| 13795 | #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 13796 | #define WMI_NDL_AS_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val) |
| 13797 | #define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 13798 | #define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 13799 | #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER) |
| 13800 | #define WMI_NDL_AS_CARRIER_SENSE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER, val) |
| 13801 | |
| 13802 | /** Data structure for EDCA/QOS parameters. */ |
| 13803 | typedef struct { |
| 13804 | /** TLV tag and len; tag equals |
| 13805 | * WMITLV_TAG_STRUC_wmi_qos_parameter */ |
| 13806 | A_UINT32 tlv_header; |
| 13807 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 13808 | A_UINT32 aifsn; |
| 13809 | /** Contention Window minimum. Range: 1 - 10 */ |
| 13810 | A_UINT32 cwmin; |
| 13811 | /** Contention Window maximum. Range: 1 - 10 */ |
| 13812 | A_UINT32 cwmax; |
| 13813 | } wmi_qos_parameter; |
| 13814 | |
| 13815 | /** Data structure for information specific to a channel. */ |
| 13816 | typedef struct { |
| 13817 | /** TLV tag and len; tag equals |
| 13818 | * WMITLV_TAG_STRUC_wmi_ocb_channel */ |
| 13819 | A_UINT32 tlv_header; |
| 13820 | A_UINT32 bandwidth; /* MHz units */ |
| 13821 | wmi_mac_addr mac_address; |
| 13822 | } wmi_ocb_channel; |
| 13823 | |
| 13824 | /** Data structure for an element of the schedule array. */ |
| 13825 | typedef struct { |
| 13826 | /** TLV tag and len; tag equals |
| 13827 | * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */ |
| 13828 | A_UINT32 tlv_header; |
| 13829 | A_UINT32 channel_freq; /* MHz units */ |
| 13830 | A_UINT32 total_duration; /* ms units */ |
| 13831 | A_UINT32 guard_interval; /* ms units */ |
| 13832 | } wmi_ocb_schedule_element; |
| 13833 | |
| 13834 | /** Data structure for OCB configuration. */ |
| 13835 | typedef struct { |
| 13836 | /** TLV tag and len; tag equals |
| 13837 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */ |
| 13838 | A_UINT32 tlv_header; |
| 13839 | /** VDEV id(interface) that is being configured */ |
| 13840 | A_UINT32 vdev_id; |
| 13841 | A_UINT32 channel_count; |
| 13842 | A_UINT32 schedule_size; |
| 13843 | A_UINT32 flags; |
| 13844 | |
| 13845 | /** This is followed by a TLV array of wmi_channel. |
| 13846 | * This is followed by a TLV array of wmi_ocb_channel. |
| 13847 | * This is followed by a TLV array of wmi_qos_parameter. |
| 13848 | * This is followed by a TLV array of wmi_dcc_ndl_chan. |
| 13849 | * This is followed by a TLV array of wmi_dcc_ndl_active_state_config. |
| 13850 | * This is followed by a TLV array of wmi_ocb_schedule_element. |
| 13851 | */ |
| 13852 | } wmi_ocb_set_config_cmd_fixed_param; |
| 13853 | |
| 13854 | |
| 13855 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0 |
| 13856 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1 |
| 13857 | |
| 13858 | #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \ |
| 13859 | (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET) |
| 13860 | |
| 13861 | |
| 13862 | /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */ |
| 13863 | typedef struct { |
| 13864 | /** TLV tag and len; tag equals |
| 13865 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param |
| 13866 | */ |
| 13867 | A_UINT32 tlv_header; |
| 13868 | /* VDEV id(interface)*/ |
| 13869 | A_UINT32 vdev_id; |
| 13870 | A_UINT32 status; |
| 13871 | } wmi_ocb_set_config_resp_event_fixed_param; |
| 13872 | |
| 13873 | /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking |
| 13874 | * WMI compatibility. |
| 13875 | */ |
| 13876 | /* The size of the utc time in bytes. */ |
| 13877 | #define SIZE_UTC_TIME (10) |
| 13878 | /* The size of the utc time error in bytes. */ |
| 13879 | #define SIZE_UTC_TIME_ERROR (5) |
| 13880 | |
| 13881 | /** Data structure to set the UTC time. */ |
| 13882 | typedef struct { |
| 13883 | /** TLV tag and len; tag equals |
| 13884 | * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */ |
| 13885 | A_UINT32 tlv_header; |
| 13886 | /*VDEV Identifier*/ |
| 13887 | A_UINT32 vdev_id; |
| 13888 | /** 10 bytes of the utc time. */ |
| 13889 | A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)]; |
| 13890 | /** 5 bytes of the time error. */ |
| 13891 | A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)]; |
| 13892 | } wmi_ocb_set_utc_time_cmd_fixed_param; |
| 13893 | |
| 13894 | #define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE) |
| 13895 | #define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val) |
| 13896 | #define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE) |
| 13897 | #define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val) |
| 13898 | |
| 13899 | /** Data structure start the timing advertisement. The template for the |
| 13900 | * timing advertisement frame follows this structure in the WMI command. |
| 13901 | */ |
| 13902 | typedef struct { |
| 13903 | /** TLV tag and len; tag equals |
| 13904 | * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */ |
| 13905 | A_UINT32 tlv_header; |
| 13906 | /*VDEV Identifier*/ |
| 13907 | A_UINT32 vdev_id; |
| 13908 | /** Number of times the TA is sent every 5 seconds. */ |
| 13909 | A_UINT32 repeat_rate; |
| 13910 | /** The frequency on which to transmit. */ |
| 13911 | A_UINT32 channel_freq; /* MHz units */ |
| 13912 | /** The offset into the template of the timestamp. */ |
| 13913 | A_UINT32 timestamp_offset; |
| 13914 | /** The offset into the template of the time value. */ |
| 13915 | A_UINT32 time_value_offset; |
| 13916 | /** The length of the timing advertisement template. The |
| 13917 | * template is in the TLV data. */ |
| 13918 | A_UINT32 timing_advert_template_length; |
| 13919 | /** This is followed by a binary array containing the TA template. */ |
| 13920 | } wmi_ocb_start_timing_advert_cmd_fixed_param; |
| 13921 | |
| 13922 | /** Data structure to stop the timing advertisement. */ |
| 13923 | typedef struct { |
| 13924 | /** TLV tag and len; tag equals |
| 13925 | * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */ |
| 13926 | A_UINT32 tlv_header; |
| 13927 | /*VDEV Identifier*/ |
| 13928 | A_UINT32 vdev_id; |
| 13929 | A_UINT32 channel_freq; /* MHz units */ |
| 13930 | } wmi_ocb_stop_timing_advert_cmd_fixed_param; |
| 13931 | |
| 13932 | /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 13933 | typedef struct { |
| 13934 | /** TLV tag and len; tag equals |
| 13935 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */ |
| 13936 | A_UINT32 tlv_header; |
| 13937 | /*VDEV Identifier*/ |
| 13938 | A_UINT32 vdev_id; |
| 13939 | A_UINT32 reserved; |
| 13940 | } wmi_ocb_get_tsf_timer_cmd_fixed_param; |
| 13941 | |
| 13942 | /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 13943 | typedef struct { |
| 13944 | /** TLV tag and len; tag equals |
| 13945 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */ |
| 13946 | A_UINT32 tlv_header; |
| 13947 | /*VDEV Identifier*/ |
| 13948 | A_UINT32 vdev_id; |
| 13949 | A_UINT32 tsf_timer_high; |
| 13950 | A_UINT32 tsf_timer_low; |
| 13951 | } wmi_ocb_get_tsf_timer_resp_event_fixed_param; |
| 13952 | |
| 13953 | /** Data structure for DCC stats configuration per channel. */ |
| 13954 | typedef struct { |
| 13955 | /** TLV tag and len; tag equals |
| 13956 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */ |
| 13957 | A_UINT32 tlv_header; |
| 13958 | |
| 13959 | /*VDEV Identifier*/ |
| 13960 | A_UINT32 vdev_id; |
| 13961 | |
| 13962 | /** The channel for which this applies, 16 bits. |
| 13963 | * The dcc_stats_bitmap, 8 bits. */ |
| 13964 | A_UINT32 chan_info; |
| 13965 | |
| 13966 | /** Demodulation model parameters. |
| 13967 | * |
| 13968 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 13969 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 13970 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 13971 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 13972 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 13973 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 13974 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 13975 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 13976 | */ |
| 13977 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 13978 | |
| 13979 | /** Communication ranges. |
| 13980 | * |
| 13981 | * tx_power, ndlType_txPower, 1+7 bits. |
| 13982 | * datarate, ndlType_datarate, 1+3 bits. |
| 13983 | */ |
| 13984 | A_UINT32 tx_power_datarate; |
| 13985 | /** |
| 13986 | * NDL_carrierSenseRange, ndlType_distance, 1+12 bits. |
| 13987 | * NDL_estCommRange, ndlType_distance, 1+12 bits. |
| 13988 | */ |
| 13989 | A_UINT32 carrier_sense_est_comm_range; |
| 13990 | |
| 13991 | /** Channel load measures. */ |
| 13992 | /** |
| 13993 | * dccSensitivity, ndlType_rxPower, 1+7 bits. |
| 13994 | * carrierSense, ndlType_rxPower, 1+7 bits. |
| 13995 | * NDL_channelLoad, ndlType_channelLoad, 1+10 bits. |
| 13996 | */ |
| 13997 | A_UINT32 dcc_stats; |
| 13998 | /** |
| 13999 | * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits. |
| 14000 | * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits. |
| 14001 | */ |
| 14002 | A_UINT32 packet_stats; |
| 14003 | /** |
| 14004 | * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits. |
| 14005 | */ |
| 14006 | A_UINT32 channel_busy_time; |
| 14007 | /** |
| 14008 | *Transmit packet statistics. |
| 14009 | * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 14010 | * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 14011 | * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 14012 | * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 14013 | */ |
| 14014 | A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 14015 | /** |
| 14016 | * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 14017 | * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 14018 | * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 14019 | * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 14020 | */ |
| 14021 | A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 14022 | /** |
| 14023 | * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 14024 | * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 14025 | * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 14026 | * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 14027 | */ |
| 14028 | A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 14029 | /** |
| 14030 | * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 14031 | * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 14032 | * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 14033 | * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 14034 | */ |
| 14035 | A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 14036 | } wmi_dcc_ndl_stats_per_channel; |
| 14037 | |
| 14038 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 14039 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 14040 | #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 14041 | #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 14042 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8) |
| 14043 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val) |
| 14044 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 14045 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 14046 | #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8) |
| 14047 | #define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val) |
| 14048 | #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4) |
| 14049 | #define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val) |
| 14050 | #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13) |
| 14051 | #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val) |
| 14052 | #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13) |
| 14053 | #define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val) |
| 14054 | #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8) |
| 14055 | #define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val) |
| 14056 | #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8) |
| 14057 | #define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val) |
| 14058 | #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11) |
| 14059 | #define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val) |
| 14060 | #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14) |
| 14061 | #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val) |
| 14062 | #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12) |
| 14063 | #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val) |
| 14064 | #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11) |
| 14065 | #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val) |
| 14066 | |
| 14067 | #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE) |
| 14068 | #define WMI_NDL_TX_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val) |
| 14069 | #define WMI_NDL_TX_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION) |
| 14070 | #define WMI_NDL_TX_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val) |
| 14071 | #define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 14072 | #define WMI_NDL_TX_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val) |
| 14073 | #define WMI_NDL_TX_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 14074 | #define WMI_NDL_TX_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tx_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val) |
| 14075 | |
| 14076 | /** Bitmap for DCC stats. */ |
| 14077 | typedef enum { |
| 14078 | DCC_STATS_DEMODULATION_MODEL = 1, |
| 14079 | DCC_STATS_COMMUNICATION_RANGES = 2, |
| 14080 | DCC_STATS_CHANNEL_LOAD_MEASURES = 4, |
| 14081 | DCC_STATS_TRANSMIT_PACKET_STATS = 8, |
| 14082 | DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16, |
| 14083 | DCC_STATS_ALL = 0xff, |
| 14084 | } wmi_dcc_stats_bitmap; |
| 14085 | |
| 14086 | /** Data structure for getting the DCC stats. */ |
| 14087 | typedef struct { |
| 14088 | /** |
| 14089 | * TLV tag and len; tag equals |
| 14090 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param |
| 14091 | */ |
| 14092 | A_UINT32 tlv_header; |
| 14093 | /* VDEV identifier */ |
| 14094 | A_UINT32 vdev_id; |
| 14095 | /**The number of channels for which stats are being requested. */ |
| 14096 | A_UINT32 num_channels; |
| 14097 | /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */ |
| 14098 | } wmi_dcc_get_stats_cmd_fixed_param; |
| 14099 | |
| 14100 | typedef struct { |
| 14101 | /** |
| 14102 | * TLV tag and len; tag equals |
| 14103 | * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request. |
| 14104 | */ |
| 14105 | A_UINT32 tlv_header; |
| 14106 | /** The channel for which this applies. */ |
| 14107 | A_UINT32 chan_freq; /* MHz units */ |
| 14108 | /** The DCC stats being requested. */ |
| 14109 | A_UINT32 dcc_stats_bitmap; |
| 14110 | } wmi_dcc_channel_stats_request; |
| 14111 | |
| 14112 | /** Data structure for the response with the DCC stats. */ |
| 14113 | typedef struct { |
| 14114 | /** |
| 14115 | * TLV tag and len; tag equals |
| 14116 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param |
| 14117 | */ |
| 14118 | A_UINT32 tlv_header; |
| 14119 | /* VDEV identifier */ |
| 14120 | A_UINT32 vdev_id; |
| 14121 | /** Number of channels in the response. */ |
| 14122 | A_UINT32 num_channels; |
| 14123 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 14124 | } wmi_dcc_get_stats_resp_event_fixed_param; |
| 14125 | |
| 14126 | /** Data structure for clearing the DCC stats. */ |
| 14127 | typedef struct { |
| 14128 | /** |
| 14129 | * TLV tag and len; tag equals |
| 14130 | * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param |
| 14131 | */ |
| 14132 | A_UINT32 tlv_header; |
| 14133 | /* VDEV identifier */ |
| 14134 | A_UINT32 vdev_id; |
| 14135 | A_UINT32 dcc_stats_bitmap; |
| 14136 | } wmi_dcc_clear_stats_cmd_fixed_param; |
| 14137 | |
| 14138 | /** Data structure for the pushed DCC stats */ |
| 14139 | typedef struct { |
| 14140 | /** |
| 14141 | * TLV tag and len; tag equals |
| 14142 | * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param |
| 14143 | */ |
| 14144 | A_UINT32 tlv_header; |
| 14145 | /* VDEV identifier */ |
| 14146 | A_UINT32 vdev_id; |
| 14147 | /** The number of channels in the response. */ |
| 14148 | A_UINT32 num_channels; |
| 14149 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 14150 | } wmi_dcc_stats_event_fixed_param; |
| 14151 | |
| 14152 | /** Data structure for updating NDL per channel. */ |
| 14153 | typedef struct { |
| 14154 | /** |
| 14155 | * TLV tag and len; tag equals |
| 14156 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan |
| 14157 | */ |
| 14158 | A_UINT32 tlv_header; |
| 14159 | /** |
| 14160 | * Channel frequency, 16 bits |
| 14161 | * NDL_numActiveState, ndlType_numberElements, 1+6 bits |
| 14162 | */ |
| 14163 | A_UINT32 chan_info; |
| 14164 | /** |
| 14165 | * NDL_minDccSampling, 10 bits. |
| 14166 | * Maximum time interval between subsequent checks of the DCC rules. |
| 14167 | */ |
| 14168 | A_UINT32 ndl_min_dcc_sampling; |
| 14169 | /** |
| 14170 | * dcc_enable, 1 bit. |
| 14171 | * dcc_stats_enable, 1 bit. |
| 14172 | * dcc_stats_interval, 16 bits. |
| 14173 | */ |
| 14174 | A_UINT32 dcc_flags; |
| 14175 | /** General DCC configuration. |
| 14176 | * NDL_timeUp, ndlType_timing, 1+12 bits. |
| 14177 | * NDL_timeDown, ndlType_timing, 1+12 bits. |
| 14178 | */ |
| 14179 | A_UINT32 general_config; |
| 14180 | /** Transmit power thresholds. |
| 14181 | * NDL_minTxPower, ndlType_txPower, 1+7 bits. |
| 14182 | * NDL_maxTxPower, ndlType_txPower, 1+7 bits. |
| 14183 | */ |
| 14184 | /* see "ETSI TS 102 687" table above for units */ |
| 14185 | A_UINT32 min_max_tx_power; |
| 14186 | /** |
| 14187 | * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 14188 | * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 14189 | * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 14190 | * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 14191 | */ |
| 14192 | /* see "ETSI TS 102 687" table above for units */ |
| 14193 | A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 14194 | /** Packet timing thresholds. |
| 14195 | * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 14196 | * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 14197 | * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 14198 | * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 14199 | */ |
| 14200 | A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 14201 | /** |
| 14202 | * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 14203 | * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 14204 | */ |
| 14205 | A_UINT32 min_max_packet_interval; |
| 14206 | /** |
| 14207 | * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 14208 | * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 14209 | * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 14210 | * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits |
| 14211 | */ |
| 14212 | A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 14213 | /** Packet datarate thresholds. |
| 14214 | * NDL_minDatarate, ndlType_datarate, 1+3 bits. |
| 14215 | * NDL_maxDatarate, ndlType_datarate, 1+3 bits. |
| 14216 | */ |
| 14217 | A_UINT32 min_max_datarate; |
| 14218 | /** |
| 14219 | * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 14220 | * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 14221 | * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 14222 | * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 14223 | */ |
| 14224 | A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 14225 | /** Receive signal thresholds. |
| 14226 | * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits. |
| 14227 | * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits. |
| 14228 | * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits. |
| 14229 | */ |
| 14230 | A_UINT32 min_max_def_carrier_sense; |
| 14231 | |
| 14232 | /** Receive model parameter. |
| 14233 | * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits. |
| 14234 | * NDL_maxCsRange, ndlType_distance, 1+12 bits. |
| 14235 | * NDL_refPathLoss, ndlType_pathloss, 1+5 bits. |
| 14236 | */ |
| 14237 | A_UINT32 receive_model_parameter; |
| 14238 | |
| 14239 | /** |
| 14240 | * NDL_minSNR, ndlType_snr, 1+7 bits. |
| 14241 | */ |
| 14242 | A_UINT32 receive_model_parameter_2; |
| 14243 | |
| 14244 | /** Demodulation model parameters. |
| 14245 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 14246 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 14247 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 14248 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 14249 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 14250 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 14251 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 14252 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 14253 | */ |
| 14254 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 14255 | /** Transmit model parameters. |
| 14256 | * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 14257 | * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 14258 | * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 14259 | * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 14260 | */ |
| 14261 | A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 14262 | /** |
| 14263 | * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 14264 | * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 14265 | * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 14266 | * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 14267 | */ |
| 14268 | A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 14269 | /** |
| 14270 | * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 14271 | * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 14272 | * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 14273 | * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 14274 | */ |
| 14275 | A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 14276 | /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */ |
| 14277 | A_UINT32 tm_max_channel_use; |
| 14278 | /** |
| 14279 | * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 14280 | * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 14281 | * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 14282 | * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 14283 | */ |
| 14284 | A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 14285 | /** Channel load thresholds. |
| 14286 | * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 14287 | * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 14288 | */ |
| 14289 | A_UINT32 min_max_channel_load; |
| 14290 | /** Transmit queue parameters. |
| 14291 | * NDL_numQueue, ndlType_acPrio, 1+3 bits. |
| 14292 | * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit. |
| 14293 | * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit. |
| 14294 | * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit. |
| 14295 | * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit. |
| 14296 | */ |
| 14297 | A_UINT32 transmit_queue_parameters; |
| 14298 | /** |
| 14299 | * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits. |
| 14300 | * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits. |
| 14301 | * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits. |
| 14302 | * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits. |
| 14303 | */ |
| 14304 | A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)]; |
| 14305 | } wmi_dcc_ndl_chan; |
| 14306 | |
| 14307 | #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 14308 | #define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 14309 | #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7) |
| 14310 | #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val) |
| 14311 | |
| 14312 | #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10) |
| 14313 | #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val) |
| 14314 | |
| 14315 | #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16) |
| 14316 | #define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val) |
| 14317 | |
| 14318 | |
| 14319 | #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1) |
| 14320 | #define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val) |
| 14321 | #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1) |
| 14322 | #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val) |
| 14323 | #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16) |
| 14324 | #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val) |
| 14325 | |
| 14326 | #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13) |
| 14327 | #define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val) |
| 14328 | #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13) |
| 14329 | #define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val) |
| 14330 | |
| 14331 | #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8) |
| 14332 | #define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val) |
| 14333 | #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8) |
| 14334 | #define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val) |
| 14335 | |
| 14336 | #define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 14337 | #define WMI_NDL_DEF_TX_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val) |
| 14338 | |
| 14339 | #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION) |
| 14340 | #define WMI_NDL_MAX_PACKET_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val) |
| 14341 | #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11) |
| 14342 | #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val) |
| 14343 | #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11) |
| 14344 | #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val) |
| 14345 | #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 14346 | #define WMI_NDL_DEF_PACKET_INTERVAL_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL, val) |
| 14347 | |
| 14348 | #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4) |
| 14349 | #define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val) |
| 14350 | #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4) |
| 14351 | #define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val) |
| 14352 | #define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 14353 | #define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 14354 | |
| 14355 | #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8) |
| 14356 | #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val) |
| 14357 | #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8) |
| 14358 | #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val) |
| 14359 | #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8) |
| 14360 | #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val) |
| 14361 | |
| 14362 | #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8) |
| 14363 | #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val) |
| 14364 | #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13) |
| 14365 | #define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val) |
| 14366 | #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6) |
| 14367 | #define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val) |
| 14368 | |
| 14369 | #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8) |
| 14370 | #define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val) |
| 14371 | |
| 14372 | #define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 14373 | #define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 14374 | |
| 14375 | #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE) |
| 14376 | #define WMI_NDL_TM_PACKET_ARRIVAL_RATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_arrival_rate_ac, acprio, SIZE_NDLTYPE_ARRIVALRATE, val) |
| 14377 | #define WMI_NDL_TM_PACKET_AVG_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION) |
| 14378 | #define WMI_NDL_TM_PACKET_AVG_DURATION_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_packet_avg_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION, val) |
| 14379 | #define WMI_NDL_TM_SIGNAL_AVG_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 14380 | #define WMI_NDL_TM_SIGNAL_AVG_POWER_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_signal_avg_power_ac, acprio, SIZE_NDLTYPE_TXPOWER, val) |
| 14381 | #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14) |
| 14382 | #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val) |
| 14383 | #define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 14384 | #define WMI_NDL_TM_CHANNEL_USE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE, val) |
| 14385 | |
| 14386 | #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11) |
| 14387 | #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val) |
| 14388 | #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11) |
| 14389 | #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val) |
| 14390 | |
| 14391 | #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4) |
| 14392 | #define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val) |
| 14393 | #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2) |
| 14394 | #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val) |
| 14395 | #define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS) |
| 14396 | #define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val) |
| 14397 | |
| 14398 | /** Data structure for updating the NDL. */ |
| 14399 | typedef struct { |
| 14400 | /** TLV tag and len; tag equals |
| 14401 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */ |
| 14402 | A_UINT32 tlv_header; |
| 14403 | /* VDEV identifier */ |
| 14404 | A_UINT32 vdev_id; |
| 14405 | /** The number of channels in the request. */ |
| 14406 | A_UINT32 num_channel; |
| 14407 | /** This is followed by a TLV array of wmi_dcc_ndl_chan. */ |
| 14408 | /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */ |
| 14409 | } wmi_dcc_update_ndl_cmd_fixed_param; |
| 14410 | |
| 14411 | typedef struct { |
| 14412 | /** |
| 14413 | * TLV tag and len; tag equals |
| 14414 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param |
| 14415 | */ |
| 14416 | A_UINT32 tlv_header; |
| 14417 | /* VDEV identifier */ |
| 14418 | A_UINT32 vdev_id; |
| 14419 | A_UINT32 status; |
| 14420 | } wmi_dcc_update_ndl_resp_event_fixed_param; |
| 14421 | |
| 14422 | /* Actions for TSF timestamp */ |
| 14423 | typedef enum { |
| 14424 | TSF_TSTAMP_CAPTURE_REQ = 1, |
| 14425 | TSF_TSTAMP_CAPTURE_RESET = 2, |
| 14426 | TSF_TSTAMP_READ_VALUE = 3, |
Govind Singh | d2970e3 | 2016-01-21 10:30:02 +0530 | [diff] [blame] | 14427 | TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14428 | } wmi_tsf_tstamp_action; |
| 14429 | |
| 14430 | typedef struct { |
| 14431 | /** TLV tag and len; tag equals |
| 14432 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */ |
| 14433 | A_UINT32 tlv_header; |
| 14434 | /** unique id identifying the VDEV, generated by the caller */ |
| 14435 | A_UINT32 vdev_id; |
| 14436 | /* action type, refer to wmi_tsf_tstamp_action */ |
| 14437 | A_UINT32 tsf_action; |
| 14438 | } wmi_vdev_tsf_tstamp_action_cmd_fixed_param; |
| 14439 | |
| 14440 | typedef struct { |
| 14441 | /* TLV tag and len; tag equals |
| 14442 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */ |
| 14443 | A_UINT32 tlv_header; |
| 14444 | /* VDEV identifier */ |
| 14445 | A_UINT32 vdev_id; |
| 14446 | /* low 32bit of tsf */ |
| 14447 | A_UINT32 tsf_low; |
| 14448 | /* high 32 bit of tsf */ |
| 14449 | A_UINT32 tsf_high; |
Krishna Kumaar Natarajan | 40b3c11 | 2016-03-25 14:36:18 -0700 | [diff] [blame] | 14450 | /* low 32 bits of qtimer */ |
| 14451 | A_UINT32 qtimer_low; |
| 14452 | /* high 32 bits of qtimer */ |
| 14453 | A_UINT32 qtimer_high; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14454 | } wmi_vdev_tsf_report_event_fixed_param; |
| 14455 | |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 14456 | /** |
| 14457 | * ie_id values: |
| 14458 | * 0 to 255 are used for individual IEEE802.11 Information Element types |
| 14459 | */ |
| 14460 | #define WMI_SET_VDEV_IE_ID_SCAN_SET_DEFAULT_IE 256 |
| 14461 | |
| 14462 | /* source values: */ |
| 14463 | #define WMI_SET_VDEV_IE_SOURCE_HOST 0x0 |
| 14464 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14465 | typedef struct { |
| 14466 | /** TLV tag and len; tag equals |
| 14467 | * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */ |
| 14468 | A_UINT32 tlv_header; |
| 14469 | /* unique id identifying the VDEV, generated by the caller */ |
| 14470 | A_UINT32 vdev_id; |
| 14471 | /* unique id to identify the ie_data as defined by ieee 802.11 spec */ |
| 14472 | A_UINT32 ie_id; |
| 14473 | /* ie_len corresponds to num of bytes in ie_data[] */ |
| 14474 | A_UINT32 ie_len; |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 14475 | /** source of this command */ |
| 14476 | A_UINT32 ie_source; /* see WMI_SET_VDEV_IE_SOURCE_ defs */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14477 | /* |
| 14478 | * Following this structure is the TLV byte stream of ie data of length |
| 14479 | * buf_len: |
| 14480 | * A_UINT8 ie_data[]; |
| 14481 | */ |
| 14482 | } wmi_vdev_set_ie_cmd_fixed_param; |
| 14483 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14484 | /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14485 | typedef struct { |
| 14486 | /* |
| 14487 | * TLV tag and len; tag equals |
| 14488 | * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param |
| 14489 | * Set Preferred Channel List |
| 14490 | */ |
| 14491 | A_UINT32 tlv_header; |
| 14492 | |
| 14493 | /* # of channels to scan */ |
| 14494 | A_UINT32 num_chan; |
| 14495 | /* |
| 14496 | * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd |
| 14497 | * structure. The TLV's are: |
| 14498 | * A_UINT32 channel_list[]; |
| 14499 | */ |
| 14500 | } wmi_soc_set_pcl_cmd_fixed_param; |
| 14501 | |
Anurag Chouhan | 11b53a1 | 2016-07-28 12:39:46 +0530 | [diff] [blame] | 14502 | /* Values for channel_weight */ |
| 14503 | typedef enum { |
| 14504 | WMI_PCL_WEIGHT_DISALLOW = 0, |
| 14505 | WMI_PCL_WEIGHT_LOW = 1, |
| 14506 | WMI_PCL_WEIGHT_MEDIUM = 2, |
| 14507 | WMI_PCL_WEIGHT_HIGH = 3, |
| 14508 | WMI_PCL_WEIGHT_VERY_HIGH = 4, |
| 14509 | } wmi_pcl_chan_weight; |
| 14510 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14511 | typedef struct { |
| 14512 | /* TLV tag and len; tag equals |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14513 | * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param |
| 14514 | */ |
| 14515 | A_UINT32 tlv_header; |
| 14516 | /** Set Preferred Channel List **/ |
| 14517 | |
| 14518 | /** pdev_id for identifying the MAC |
| 14519 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14520 | */ |
| 14521 | A_UINT32 pdev_id; |
| 14522 | |
| 14523 | /** # of channels to scan */ |
| 14524 | A_UINT32 num_chan; |
| 14525 | /** |
| 14526 | * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd |
| 14527 | * structure. The TLV's are: |
| 14528 | * A_UINT32 channel_weight[]; |
| 14529 | * channel order & size will be as per the list provided |
| 14530 | * in WMI_SCAN_CHAN_LIST_CMDID |
| 14531 | **/ |
| 14532 | } wmi_pdev_set_pcl_cmd_fixed_param; |
| 14533 | |
| 14534 | /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */ |
| 14535 | typedef struct { |
| 14536 | /* TLV tag and len; tag equals |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14537 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param |
| 14538 | * Set Hardware Mode */ |
| 14539 | A_UINT32 tlv_header; |
| 14540 | |
| 14541 | /* Hardware Mode Index */ |
| 14542 | A_UINT32 hw_mode_index; |
| 14543 | } wmi_soc_set_hw_mode_cmd_fixed_param; |
| 14544 | |
| 14545 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14546 | /* TLV tag and len; tag equals |
| 14547 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param |
| 14548 | */ |
| 14549 | A_UINT32 tlv_header; |
| 14550 | /** Set Hardware Mode **/ |
| 14551 | |
| 14552 | /** pdev_id for identifying the MAC |
| 14553 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14554 | */ |
| 14555 | A_UINT32 pdev_id; |
| 14556 | |
| 14557 | /* Hardware Mode Index */ |
| 14558 | A_UINT32 hw_mode_index; |
| 14559 | } wmi_pdev_set_hw_mode_cmd_fixed_param; |
| 14560 | |
| 14561 | /* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */ |
| 14562 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14563 | /* |
| 14564 | * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param |
| 14565 | * Set Dual MAC Firmware Configuration |
| 14566 | */ |
| 14567 | A_UINT32 tlv_header; |
| 14568 | |
| 14569 | /* Concurrent scan configuration bits */ |
| 14570 | A_UINT32 concurrent_scan_config_bits; |
| 14571 | /* Firmware mode configuration bits */ |
| 14572 | A_UINT32 fw_mode_config_bits; |
| 14573 | } wmi_soc_set_dual_mac_config_cmd_fixed_param; |
| 14574 | |
| 14575 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14576 | /* TLV tag and len; tag equals |
| 14577 | * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param |
| 14578 | */ |
| 14579 | A_UINT32 tlv_header; |
| 14580 | /** Set Dual MAC Firmware Configuration **/ |
| 14581 | |
| 14582 | /** pdev_id for identifying the MAC |
| 14583 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14584 | */ |
| 14585 | A_UINT32 pdev_id; |
| 14586 | |
| 14587 | /* Concurrent scan configuration bits */ |
| 14588 | A_UINT32 concurrent_scan_config_bits; |
| 14589 | /* Firmware mode configuration bits */ |
| 14590 | A_UINT32 fw_mode_config_bits; |
| 14591 | } wmi_pdev_set_mac_config_cmd_fixed_param; |
| 14592 | |
| 14593 | typedef struct { /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14594 | A_UINT32 num_tx_chains; |
| 14595 | A_UINT32 num_rx_chains; |
| 14596 | A_UINT32 reserved[2]; |
| 14597 | } soc_num_tx_rx_chains; |
| 14598 | |
| 14599 | typedef struct { |
| 14600 | A_UINT32 num_tx_chains_2g; |
| 14601 | A_UINT32 num_rx_chains_2g; |
| 14602 | A_UINT32 num_tx_chains_5g; |
| 14603 | A_UINT32 num_rx_chains_5g; |
| 14604 | } band_num_tx_rx_chains; |
| 14605 | |
| 14606 | typedef union { |
| 14607 | soc_num_tx_rx_chains soc_txrx_chain_setting; |
| 14608 | band_num_tx_rx_chains band_txrx_chain_setting; |
| 14609 | } antenna_num_tx_rx_chains; |
| 14610 | |
| 14611 | typedef enum { |
| 14612 | ANTENNA_MODE_DISABLED = 0x0, |
| 14613 | ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01, |
| 14614 | /* reserved */ |
| 14615 | } antenna_mode_reason; |
| 14616 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14617 | /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14618 | typedef struct { |
| 14619 | /* |
| 14620 | * TLV tag and len; |
| 14621 | * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param |
| 14622 | */ |
| 14623 | A_UINT32 tlv_header; |
| 14624 | |
| 14625 | /* the reason for setting antenna mode, refer antenna_mode_reason */ |
| 14626 | A_UINT32 reason; |
| 14627 | |
| 14628 | /* |
| 14629 | * The above reason parameter will select whether the following union |
| 14630 | * is soc_num_tx_rx_chains or band_num_tx_rx_chains. |
| 14631 | */ |
| 14632 | antenna_num_tx_rx_chains num_txrx_chains_setting; |
| 14633 | } wmi_soc_set_antenna_mode_cmd_fixed_param; |
| 14634 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14635 | typedef struct { |
| 14636 | /* TLV tag and len; tag equals |
| 14637 | * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param |
| 14638 | */ |
| 14639 | A_UINT32 tlv_header; |
| 14640 | |
| 14641 | /** pdev_id for identifying the MAC |
| 14642 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14643 | */ |
| 14644 | A_UINT32 pdev_id; |
| 14645 | |
| 14646 | /* Bits 0-15 is the number of RX chains and |
| 14647 | * 16-31 is the number of TX chains |
| 14648 | */ |
| 14649 | A_UINT32 num_txrx_chains; |
| 14650 | } wmi_pdev_set_antenna_mode_cmd_fixed_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14651 | |
| 14652 | /** Data structure for information specific to a VDEV to MAC mapping. */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14653 | /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14654 | typedef struct { |
| 14655 | /* |
| 14656 | * TLV tag and len; tag equals |
| 14657 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */ |
| 14658 | A_UINT32 tlv_header; |
| 14659 | A_UINT32 vdev_id; /* VDEV ID */ |
| 14660 | A_UINT32 mac_id; /* MAC ID */ |
| 14661 | } wmi_soc_set_hw_mode_response_vdev_mac_entry; |
| 14662 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14663 | /** Data structure for information specific to a VDEV to MAC mapping. */ |
| 14664 | typedef struct { |
| 14665 | /** TLV tag and len; tag equals |
| 14666 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */ |
| 14667 | A_UINT32 tlv_header; |
| 14668 | |
| 14669 | /** pdev_id for identifying the MAC |
| 14670 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14671 | */ |
| 14672 | A_UINT32 pdev_id; |
| 14673 | |
| 14674 | A_UINT32 vdev_id; |
| 14675 | } wmi_pdev_set_hw_mode_response_vdev_mac_entry; |
| 14676 | |
| 14677 | /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14678 | typedef struct { |
| 14679 | /* TLV tag and len; tag equals |
| 14680 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param |
| 14681 | * Set Hardware Mode Response Event **/ |
| 14682 | A_UINT32 tlv_header; |
| 14683 | |
| 14684 | /* Status of set_hw_mode command |
| 14685 | * Values for Status: |
| 14686 | * 0 - OK; command successful |
| 14687 | * 1 - EINVAL; Requested invalid hw_mode |
| 14688 | * 2 - ECANCELED; HW mode change canceled |
| 14689 | * 3 - ENOTSUP; HW mode not supported |
| 14690 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14691 | * 5 - EPENDING; HW mode change is pending |
| 14692 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14693 | */ |
| 14694 | A_UINT32 status; |
| 14695 | /* Configured Hardware Mode */ |
| 14696 | A_UINT32 cfgd_hw_mode_index; |
| 14697 | /* Number of Vdev to Mac entries */ |
| 14698 | A_UINT32 num_vdev_mac_entries; |
| 14699 | /* |
| 14700 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 14701 | * structure. The TLV's are: |
| 14702 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14703 | */ |
| 14704 | } wmi_soc_set_hw_mode_response_event_fixed_param; |
| 14705 | |
| 14706 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14707 | /* TLV tag and len; tag equals |
| 14708 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param |
| 14709 | */ |
| 14710 | A_UINT32 tlv_header; |
| 14711 | /** Set Hardware Mode Response Event **/ |
| 14712 | |
| 14713 | /** pdev_id for identifying the MAC |
| 14714 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14715 | */ |
| 14716 | A_UINT32 pdev_id; |
| 14717 | |
| 14718 | /* Status of set_hw_mode command */ |
| 14719 | /* |
| 14720 | * Values for Status: |
| 14721 | * 0 - OK; command successful |
| 14722 | * 1 - EINVAL; Requested invalid hw_mode |
| 14723 | * 2 - ECANCELED; HW mode change canceled |
| 14724 | * 3 - ENOTSUP; HW mode not supported |
| 14725 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14726 | * 5 - EPENDING; HW mode change is pending |
| 14727 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14728 | */ |
| 14729 | A_UINT32 status; |
| 14730 | /* Configured Hardware Mode */ |
| 14731 | A_UINT32 cfgd_hw_mode_index; |
| 14732 | /* Number of Vdev to Mac entries */ |
| 14733 | A_UINT32 num_vdev_mac_entries; |
| 14734 | /** |
| 14735 | * TLV (tag length value ) parameters follow the |
| 14736 | * soc_set_hw_mode_response_event structure. The TLV's are: |
| 14737 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14738 | */ |
| 14739 | } wmi_pdev_set_hw_mode_response_event_fixed_param; |
| 14740 | |
| 14741 | /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */ |
| 14742 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14743 | /* |
| 14744 | * TLV tag and len; tag equals |
| 14745 | * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param |
| 14746 | * Hardware Mode Transition Event |
| 14747 | */ |
| 14748 | A_UINT32 tlv_header; |
| 14749 | /* Original or old Hardware mode */ |
| 14750 | A_UINT32 old_hw_mode_index; |
| 14751 | /* New Hardware Mode */ |
| 14752 | A_UINT32 new_hw_mode_index; |
| 14753 | /* Number of Vdev to Mac entries */ |
| 14754 | A_UINT32 num_vdev_mac_entries; |
| 14755 | |
| 14756 | /** |
| 14757 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 14758 | * structure. The TLV's are: |
| 14759 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14760 | */ |
| 14761 | } wmi_soc_hw_mode_transition_event_fixed_param; |
| 14762 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14763 | typedef struct { |
| 14764 | /* TLV tag and len; tag equals |
| 14765 | * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param |
| 14766 | */ |
| 14767 | A_UINT32 tlv_header; |
| 14768 | /** Hardware Mode Transition Event **/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14769 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14770 | /** pdev_id for identifying the MAC |
| 14771 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14772 | */ |
| 14773 | A_UINT32 pdev_id; |
| 14774 | |
| 14775 | /* Original or old Hardware mode */ |
| 14776 | A_UINT32 old_hw_mode_index; |
| 14777 | /* New Hardware Mode */ |
| 14778 | A_UINT32 new_hw_mode_index; |
| 14779 | /* Number of Vdev to Mac entries */ |
| 14780 | A_UINT32 num_vdev_mac_entries; |
| 14781 | |
| 14782 | /** |
| 14783 | * TLV (tag length value ) parameters follow the |
| 14784 | * soc_set_hw_mode_response_event structure. The TLV's are: |
| 14785 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14786 | */ |
| 14787 | } wmi_pdev_hw_mode_transition_event_fixed_param; |
| 14788 | |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 14789 | /** |
| 14790 | * This command is sent from WLAN host driver to firmware for |
| 14791 | * plugging in reorder queue desc to lithium hw. |
| 14792 | * |
| 14793 | * Example: plug-in queue desc for TID 5 |
| 14794 | * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID, |
| 14795 | * (vdev_id = PEER vdev id, |
| 14796 | * peer_macaddr = PEER mac addr, |
| 14797 | * tid = 5, |
| 14798 | * queue_ptr_lo = queue desc addr lower 32 bits, |
| 14799 | * queue_ptr_hi = queue desc addr higher 32 bits, |
| 14800 | * queue_no = 16-bit number assigned by host for queue, |
| 14801 | * stored in bits 15:0 of queue_no field) |
| 14802 | */ |
| 14803 | typedef struct { |
| 14804 | /* TLV tag and len; tag equals |
| 14805 | * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param |
| 14806 | */ |
| 14807 | A_UINT32 tlv_header; |
| 14808 | A_UINT32 vdev_id; |
| 14809 | /* peer mac address */ |
| 14810 | wmi_mac_addr peer_macaddr; |
| 14811 | /* 0 to 15 = QoS TIDs, 16 = non-qos TID */ |
| 14812 | A_UINT32 tid; |
| 14813 | /* lower 32 bits of queue desc adddress */ |
| 14814 | A_UINT32 queue_ptr_lo; |
| 14815 | /* upper 32 bits of queue desc adddress */ |
| 14816 | A_UINT32 queue_ptr_hi; |
| 14817 | /* 16-bit number assigned by host for queue, |
| 14818 | * stored in bits 15:0 of queue_no field |
| 14819 | */ |
| 14820 | A_UINT32 queue_no; |
| 14821 | } wmi_peer_reorder_queue_setup_cmd_fixed_param; |
| 14822 | |
| 14823 | /** |
| 14824 | * This command is sent from WLAN host driver to firmware for |
| 14825 | * removing one or more reorder queue desc to lithium hw. |
| 14826 | * |
| 14827 | * Example: remove queue desc for all TIDs |
| 14828 | * host->target: WMI_PEER_REORDER_REMOVE_CMDID, |
| 14829 | * (vdev_id = PEER vdev id, |
| 14830 | * peer_macaddr = PEER mac addr, |
| 14831 | * tid = 0x1FFFF, |
| 14832 | */ |
| 14833 | typedef struct { |
| 14834 | /* TLV tag and len; |
| 14835 | * tag equals |
| 14836 | * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param |
| 14837 | */ |
| 14838 | A_UINT32 tlv_header; |
| 14839 | A_UINT32 vdev_id; |
| 14840 | /* peer mac address */ |
| 14841 | wmi_mac_addr peer_macaddr; |
| 14842 | /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */ |
| 14843 | A_UINT32 tid_mask; |
| 14844 | } wmi_peer_reorder_queue_remove_cmd_fixed_param; |
| 14845 | |
| 14846 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14847 | /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param |
| 14848 | * instead |
| 14849 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14850 | typedef struct { |
| 14851 | /* |
| 14852 | * TLV tag and len; tag equals |
| 14853 | * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param |
| 14854 | * Set Dual MAC Config Response Event |
| 14855 | */ |
| 14856 | A_UINT32 tlv_header; |
| 14857 | |
| 14858 | /* Status for set_dual_mac_config command */ |
| 14859 | /* |
| 14860 | * Values for Status: |
| 14861 | * 0 - OK; command successful |
| 14862 | * 1 - EINVAL; Requested invalid hw_mode |
| 14863 | * 3 - ENOTSUP; HW mode not supported |
| 14864 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14865 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14866 | */ |
| 14867 | A_UINT32 status; |
| 14868 | } wmi_soc_set_dual_mac_config_response_event_fixed_param; |
| 14869 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14870 | typedef struct { |
| 14871 | /* TLV tag and len; tag equals |
| 14872 | * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param |
| 14873 | */ |
| 14874 | A_UINT32 tlv_header; |
| 14875 | /** Set Dual MAC Config Response Event **/ |
| 14876 | |
| 14877 | /** pdev_id for identifying the MAC |
| 14878 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14879 | */ |
| 14880 | A_UINT32 pdev_id; |
| 14881 | |
| 14882 | /* Status for set_dual_mac_config command */ |
| 14883 | /* |
| 14884 | * Values for Status: |
| 14885 | * 0 - OK; command successful |
| 14886 | * 1 - EINVAL; Requested invalid hw_mode |
| 14887 | * 3 - ENOTSUP; HW mode not supported |
| 14888 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14889 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14890 | */ |
| 14891 | A_UINT32 status; |
| 14892 | } wmi_pdev_set_mac_config_response_event_fixed_param; |
| 14893 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14894 | typedef enum { |
| 14895 | MAWC_MOTION_STATE_UNKNOWN, |
| 14896 | MAWC_MOTION_STATE_STATIONARY, |
| 14897 | MAWC_MOTION_STATE_WALK, |
| 14898 | MAWC_MOTION_STATE_TRANSIT, |
| 14899 | } MAWC_MOTION_STATE; |
| 14900 | |
| 14901 | typedef enum { |
| 14902 | MAWC_SENSOR_STATUS_OK, |
| 14903 | MAWC_SENSOR_STATUS_FAILED_TO_ENABLE, |
| 14904 | MAWC_SENSOR_STATUS_SHUTDOWN, |
| 14905 | } MAWC_SENSOR_STATUS; |
| 14906 | |
| 14907 | typedef struct { |
| 14908 | /* TLV tag and len; tag equals |
| 14909 | * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */ |
| 14910 | A_UINT32 tlv_header; |
| 14911 | /** new motion state, MAWC_MOTION_STATE */ |
| 14912 | A_UINT32 motion_state; |
| 14913 | /** status code of sensor, MAWC_SENSOR_STATUS */ |
| 14914 | A_UINT32 sensor_status; |
| 14915 | } wmi_mawc_sensor_report_ind_cmd_fixed_param; |
| 14916 | |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 14917 | /* MBO flag field definition */ |
| 14918 | /* |
| 14919 | * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP |
| 14920 | * 1 - Allow to connect to MBO AP only |
| 14921 | * Bit 1-31 : reserved. |
| 14922 | */ |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 14923 | #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) /* DEPRECATED */ |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 14924 | |
| 14925 | typedef struct { |
| 14926 | /* |
| 14927 | * TLV tag and len; tag equals |
| 14928 | * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param |
| 14929 | */ |
| 14930 | A_UINT32 tlv_header; |
| 14931 | /** vdev id */ |
| 14932 | A_UINT32 vdev_id; |
| 14933 | /** enable or disable MBO */ |
| 14934 | A_UINT32 enable; |
| 14935 | /** MBO flags, refer to definition of MBO flags*/ |
| 14936 | A_UINT32 flags; |
Nitesh Shah | e5aa26b | 2016-07-08 12:03:44 +0530 | [diff] [blame] | 14937 | } wmi_roam_set_mbo_fixed_param; /* DEPRECATED */ |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 14938 | |
| 14939 | typedef struct { |
| 14940 | /* |
| 14941 | * TLV tag and len; tag equals |
| 14942 | * WMITLV_TAG_ARRAY_STRUC |
| 14943 | */ |
| 14944 | A_UINT32 tlv_header; |
| 14945 | /** Current operating class number */ |
| 14946 | A_UINT32 cur_op_class; |
| 14947 | /* |
| 14948 | * Country string of current reg domain, |
| 14949 | * the expected value should be same as country str defined |
| 14950 | * in country IE. |
| 14951 | * 3 octets (COUNTRY_STR) + 1 octet (always 0) |
| 14952 | * The ordering of this array must be maintained, |
| 14953 | * even when a big-endian host's WMI messages undergo |
| 14954 | * automatic byte reordering for conversion to the |
| 14955 | * little-endian ordering required by the target. |
| 14956 | * On big-endian hosts, this array may need to be byte-swapped |
| 14957 | * by the host, so the subsequent automatic byte-swap |
| 14958 | * will result in the correct final byte order. |
| 14959 | * global operating class: set country_str[0]=0 |
| 14960 | */ |
| 14961 | A_UINT8 country_str[4]; |
| 14962 | /** Supported operating class number in current regdomain */ |
| 14963 | A_UINT32 supp_op_class_num; |
| 14964 | /* The TLVs will follow. */ |
| 14965 | /* A_UINT32 supp_op_class_list[] */ |
| 14966 | } wmi_supported_operating_class_param; |
| 14967 | |
| 14968 | typedef struct { |
| 14969 | /* |
| 14970 | * TLV tag and len; tag equals |
| 14971 | * WMITLV_TAG_ARRAY_STRUC |
| 14972 | */ |
| 14973 | A_UINT32 tlv_header; |
| 14974 | /** non preferred channel attribute length */ |
| 14975 | A_UINT32 non_prefer_ch_attr_len; |
| 14976 | /* The TLVs will follow. */ |
| 14977 | /** A_UINT8 non_prefer_ch_attr[];*/ |
| 14978 | } wmi_mbo_non_preferred_channel_report_param; |
| 14979 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14980 | typedef struct { |
| 14981 | /* TLV tag and len; tag equals |
| 14982 | * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */ |
| 14983 | A_UINT32 tlv_header; |
| 14984 | /* enable(1) or disable(0) */ |
| 14985 | A_UINT32 enable; |
| 14986 | } wmi_mawc_enable_sensor_event_fixed_param; |
| 14987 | |
| 14988 | typedef struct { |
| 14989 | /* TLV tag and len; tag equals |
| 14990 | * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */ |
| 14991 | A_UINT32 tlv_header; |
| 14992 | /* Unique id identifying the VDEV */ |
| 14993 | A_UINT32 vdev_id; |
| 14994 | /* enable(1) or disable(0) MAWC */ |
| 14995 | A_UINT32 enable; |
| 14996 | /* ratio of skipping suppressing scan, skip one out of x */ |
| 14997 | A_UINT32 suppress_ratio; |
| 14998 | } wmi_extscan_configure_mawc_cmd_fixed_param; |
| 14999 | |
| 15000 | typedef struct { |
| 15001 | /* TLV tag and len; tag equals |
| 15002 | * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */ |
| 15003 | A_UINT32 tlv_header; |
| 15004 | /* Unique id identifying the VDEV */ |
| 15005 | A_UINT32 vdev_id; |
| 15006 | /* enable(1) or disable(0) MAWC */ |
| 15007 | A_UINT32 enable; |
| 15008 | /* ratio of exponential backoff, next = current + current*ratio/100 */ |
| 15009 | A_UINT32 exp_backoff_ratio; |
| 15010 | /* initial scan interval(msec) */ |
| 15011 | A_UINT32 init_scan_interval; |
| 15012 | /* max scan interval(msec) */ |
| 15013 | A_UINT32 max_scan_interval; |
| 15014 | } wmi_nlo_configure_mawc_cmd_fixed_param; |
| 15015 | |
| 15016 | typedef struct { |
| 15017 | /* TLV tag and len; tag equals |
| 15018 | * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */ |
| 15019 | A_UINT32 tlv_header; |
| 15020 | /* Unique id identifying the VDEV */ |
| 15021 | A_UINT32 vdev_id; |
| 15022 | /* enable(1) or disable(0) MAWC */ |
| 15023 | A_UINT32 enable; |
| 15024 | /* data traffic load (kBps) to register CMC */ |
| 15025 | A_UINT32 traffic_load_threshold; |
| 15026 | /* RSSI threshold (dBm) to scan for Best AP */ |
| 15027 | A_UINT32 best_ap_rssi_threshold; |
| 15028 | /* high RSSI threshold adjustment in Stationary to suppress scan */ |
| 15029 | A_UINT32 rssi_stationary_high_adjust; |
| 15030 | /* low RSSI threshold adjustment in Stationary to suppress scan */ |
| 15031 | A_UINT32 rssi_stationary_low_adjust; |
| 15032 | } wmi_roam_configure_mawc_cmd_fixed_param; |
| 15033 | |
| 15034 | #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2 |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 15035 | #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 15036 | |
| 15037 | typedef enum { |
| 15038 | PACKET_FILTER_TYPE_INVALID = 0, |
| 15039 | PACKET_FILTER_TYPE_FILTER_PKT, |
| 15040 | PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */ |
| 15041 | PACKET_FILTER_TYPE_MAX_ENUM_SIZE |
| 15042 | } WMI_PACKET_FILTER_FILTER_TYPE; |
| 15043 | |
| 15044 | typedef enum { |
| 15045 | PACKET_FILTER_PROTO_TYPE_INVALID = 0, |
| 15046 | |
| 15047 | /* L2 header */ |
| 15048 | PACKET_FILTER_PROTO_TYPE_MAC, |
| 15049 | PACKET_FILTER_PROTO_TYPE_SNAP, |
| 15050 | |
| 15051 | /* L3 header (EtherType) */ |
| 15052 | PACKET_FILTER_PROTO_TYPE_IPV4, |
| 15053 | PACKET_FILTER_PROTO_TYPE_IPV6, |
| 15054 | |
| 15055 | /* L4 header (IP protocol) */ |
| 15056 | PACKET_FILTER_PROTO_TYPE_UDP, |
| 15057 | PACKET_FILTER_PROTO_TYPE_TCP, |
| 15058 | PACKET_FILTER_PROTO_TYPE_ICMPV6, |
| 15059 | |
| 15060 | PACKET_FILTER_PROTO_TYPE_MAX |
| 15061 | } WMI_PACKET_FILTER_PROTO_TYPE; |
| 15062 | |
| 15063 | typedef enum { |
| 15064 | PACKET_FILTER_CMP_TYPE_INVALID = 0, |
| 15065 | PACKET_FILTER_CMP_TYPE_EQUAL, |
| 15066 | PACKET_FILTER_CMP_TYPE_MASK_EQUAL, |
| 15067 | PACKET_FILTER_CMP_TYPE_NOT_EQUAL, |
| 15068 | PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL, |
| 15069 | PACKET_FILTER_CMP_TYPE_ADDRTYPE, |
| 15070 | PACKET_FILTER_CMP_TYPE_MAX |
| 15071 | } WMI_PACKET_FILTER_CMP_TYPE; |
| 15072 | |
| 15073 | typedef enum { |
| 15074 | PACKET_FILTER_SET_INACTIVE = 0, |
| 15075 | PACKET_FILTER_SET_ACTIVE |
| 15076 | } WMI_PACKET_FILTER_ACTION; |
| 15077 | |
| 15078 | typedef enum { |
| 15079 | PACKET_FILTER_SET_DISABLE = 0, |
| 15080 | PACKET_FILTER_SET_ENABLE |
| 15081 | } WMI_PACKET_FILTER_RUNTIME_ENABLE; |
| 15082 | |
| 15083 | typedef struct { |
| 15084 | A_UINT32 proto_type; |
| 15085 | A_UINT32 cmp_type; |
| 15086 | A_UINT32 data_length; /* Length of the data to compare (units = bytes) */ |
| 15087 | /* |
| 15088 | * from start of the respective frame header ( |
| 15089 | * units = bytes) |
| 15090 | */ |
| 15091 | A_UINT32 data_offset; |
| 15092 | /* Data to compare, little-endian order */ |
| 15093 | A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 15094 | /* Mask to be applied on rcvd packet data before compare, little-endian order */ |
| 15095 | A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 15096 | } WMI_PACKET_FILTER_PARAMS_TYPE; |
| 15097 | |
| 15098 | typedef struct { |
| 15099 | A_UINT32 tlv_header; |
| 15100 | A_UINT32 vdev_id; |
| 15101 | A_UINT32 filter_id; |
| 15102 | A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */ |
| 15103 | A_UINT32 filter_type; |
| 15104 | A_UINT32 num_params; /* how many entries in paramsData are valid */ |
| 15105 | A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */ |
| 15106 | WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER]; |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 15107 | /* |
| 15108 | * deprecated0: |
| 15109 | * This field simply provides filler space to retain the |
| 15110 | * original message format while reducing |
| 15111 | * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5. |
| 15112 | */ |
| 15113 | WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 15114 | } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param; |
| 15115 | |
| 15116 | /* enable / disable all filters within the specified vdev */ |
| 15117 | typedef struct { |
| 15118 | A_UINT32 tlv_header; |
| 15119 | A_UINT32 vdev_id; |
| 15120 | A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */ |
| 15121 | } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param; |
| 15122 | |
| 15123 | |
| 15124 | #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0 |
| 15125 | #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9 |
| 15126 | |
| 15127 | #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \ |
| 15128 | WMI_SET_BITS(tcp_flag_u32, \ |
| 15129 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 15130 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \ |
| 15131 | tcp_flag_values) |
| 15132 | #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \ |
| 15133 | WMI_GET_BITS(tcp_flag_u32, \ |
| 15134 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 15135 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS) |
| 15136 | |
| 15137 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9 |
| 15138 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9 |
| 15139 | |
| 15140 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \ |
| 15141 | WMI_SET_BITS(tcp_flag_u32, \ |
| 15142 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 15143 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \ |
| 15144 | tcp_flags_mask) |
| 15145 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \ |
| 15146 | WMI_GET_BITS(tcp_flag_u32, \ |
| 15147 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 15148 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS) |
| 15149 | |
| 15150 | typedef struct { |
| 15151 | A_UINT32 tlv_header; |
| 15152 | /** |
| 15153 | * @brief lro_enable - indicates whether lro is enabled |
| 15154 | * [0] LRO Enable |
| 15155 | */ |
| 15156 | A_UINT32 lro_enable; |
| 15157 | /** |
| 15158 | * @brief tcp_flag_u32 - mask of which TCP flags to check and |
| 15159 | * values to check for |
| 15160 | * [8:0] TCP flag values - If the TCP flags from the packet do not match |
| 15161 | * the values in this field after masking with TCP flags mask |
| 15162 | * below,LRO eligible will not be set |
| 15163 | * [17:9] TCP flags mask - Mask field for comparing the TCP values |
| 15164 | * provided above with the TCP flags field in the received packet |
| 15165 | * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK |
| 15166 | * macros to isolate the mask field and values field that are packed |
| 15167 | * into this u32 "word". |
| 15168 | */ |
| 15169 | A_UINT32 tcp_flag_u32; |
| 15170 | /** |
| 15171 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 15172 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 15173 | * bytes 0 to 3 |
| 15174 | * |
| 15175 | * In this and all the below toeplitz_hash fields, the bytes are |
| 15176 | * specified in little-endian order. For example: |
| 15177 | * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0 |
| 15178 | * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1 |
| 15179 | * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2 |
| 15180 | * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3 |
| 15181 | */ |
| 15182 | A_UINT32 toeplitz_hash_ipv4_0_3; |
| 15183 | |
| 15184 | /** |
| 15185 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 15186 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 15187 | * bytes 4 to 7 |
| 15188 | */ |
| 15189 | A_UINT32 toeplitz_hash_ipv4_4_7; |
| 15190 | |
| 15191 | /** |
| 15192 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 15193 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 15194 | * bytes 8 to 11 |
| 15195 | */ |
| 15196 | A_UINT32 toeplitz_hash_ipv4_8_11; |
| 15197 | |
| 15198 | /** |
| 15199 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 15200 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 15201 | * bytes 12 to 15 |
| 15202 | */ |
| 15203 | A_UINT32 toeplitz_hash_ipv4_12_15; |
| 15204 | |
| 15205 | /** |
| 15206 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 15207 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 15208 | * byte 16 |
| 15209 | */ |
| 15210 | A_UINT32 toeplitz_hash_ipv4_16; |
| 15211 | |
| 15212 | /** |
| 15213 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15214 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15215 | * bytes 0 to 3 |
| 15216 | */ |
| 15217 | A_UINT32 toeplitz_hash_ipv6_0_3; |
| 15218 | |
| 15219 | /** |
| 15220 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15221 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15222 | * bytes 4 to 7 |
| 15223 | */ |
| 15224 | A_UINT32 toeplitz_hash_ipv6_4_7; |
| 15225 | |
| 15226 | /** |
| 15227 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15228 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15229 | * bytes 8 to 11 |
| 15230 | */ |
| 15231 | A_UINT32 toeplitz_hash_ipv6_8_11; |
| 15232 | |
| 15233 | /** |
| 15234 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15235 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15236 | * bytes 12 to 15 |
| 15237 | */ |
| 15238 | A_UINT32 toeplitz_hash_ipv6_12_15; |
| 15239 | |
| 15240 | /** |
| 15241 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15242 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15243 | * bytes 16 to 19 |
| 15244 | */ |
| 15245 | A_UINT32 toeplitz_hash_ipv6_16_19; |
| 15246 | |
| 15247 | /** |
| 15248 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15249 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15250 | * bytes 20 to 22 |
| 15251 | */ |
| 15252 | A_UINT32 toeplitz_hash_ipv6_20_23; |
| 15253 | |
| 15254 | /** |
| 15255 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15256 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15257 | * bytes 24 to 27 |
| 15258 | */ |
| 15259 | A_UINT32 toeplitz_hash_ipv6_24_27; |
| 15260 | |
| 15261 | /** |
| 15262 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15263 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15264 | * bytes 28 to 31 |
| 15265 | */ |
| 15266 | A_UINT32 toeplitz_hash_ipv6_28_31; |
| 15267 | |
| 15268 | /** |
| 15269 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15270 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15271 | * bytes 32 to 35 |
| 15272 | */ |
| 15273 | A_UINT32 toeplitz_hash_ipv6_32_35; |
| 15274 | |
| 15275 | /** |
| 15276 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15277 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15278 | * bytes 36 to 39 |
| 15279 | */ |
| 15280 | A_UINT32 toeplitz_hash_ipv6_36_39; |
| 15281 | |
| 15282 | /** |
| 15283 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 15284 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 15285 | * byte 40 |
| 15286 | */ |
| 15287 | A_UINT32 toeplitz_hash_ipv6_40; |
| 15288 | } wmi_lro_info_cmd_fixed_param; |
| 15289 | |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 15290 | typedef struct { |
| 15291 | /* |
| 15292 | * TLV tag and len; tag equals |
| 15293 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param |
| 15294 | */ |
| 15295 | A_UINT32 tlv_header; |
| 15296 | /* flash offset to write, starting from 0 */ |
| 15297 | A_UINT32 offset; |
| 15298 | /* vaild data length in buffer, unit: byte */ |
| 15299 | A_UINT32 length; |
| 15300 | } wmi_transfer_data_to_flash_cmd_fixed_param; |
| 15301 | |
| 15302 | typedef struct { |
| 15303 | /* |
| 15304 | * TLV tag and len; tag equals |
| 15305 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param |
| 15306 | */ |
| 15307 | A_UINT32 tlv_header; |
| 15308 | /* Return status. 0 for success, non-zero otherwise */ |
| 15309 | A_UINT32 status; |
| 15310 | } wmi_transfer_data_to_flash_complete_event_fixed_param; |
| 15311 | |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame] | 15312 | typedef struct { |
| 15313 | /* |
| 15314 | * TLV tag and len; tag equals |
| 15315 | * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param |
| 15316 | */ |
| 15317 | A_UINT32 tlv_header; |
| 15318 | A_UINT32 offset; /* flash offset to read, starting from 0 */ |
| 15319 | A_UINT32 length; /* data length to read, unit: byte */ |
| 15320 | } wmi_read_data_from_flash_cmd_fixed_param; |
| 15321 | |
| 15322 | typedef struct { |
| 15323 | /* |
| 15324 | * TLV tag and len; tag equals |
| 15325 | * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param |
| 15326 | */ |
| 15327 | A_UINT32 tlv_header; |
| 15328 | A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */ |
| 15329 | A_UINT32 offset; /* flash offset reading from, starting from 0 */ |
| 15330 | A_UINT32 length; /* length of data being reported, unit: byte */ |
| 15331 | } wmi_read_data_from_flash_event_fixed_param; |
| 15332 | |
Sreelakshmi Konamki | 58f4d62 | 2016-04-14 18:03:21 +0530 | [diff] [blame] | 15333 | typedef enum { |
| 15334 | ENHANCED_MCAST_FILTER_DISABLED, |
| 15335 | ENHANCED_MCAST_FILTER_ENABLED |
| 15336 | } ENHANCED_MCAST_FILTER_CONFIG; |
| 15337 | |
| 15338 | /* |
| 15339 | * Command to enable/disable filtering of multicast IP with unicast mac |
| 15340 | */ |
| 15341 | typedef struct { |
| 15342 | /* |
| 15343 | * TLV tag and len; tag equals |
| 15344 | * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param |
| 15345 | */ |
| 15346 | A_UINT32 tlv_header; |
| 15347 | /* Unique id identifying the VDEV */ |
| 15348 | A_UINT32 vdev_id; |
| 15349 | /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */ |
| 15350 | A_UINT32 enable; |
| 15351 | } wmi_config_enhanced_mcast_filter_cmd_fixed_param; |
| 15352 | |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 15353 | typedef struct { |
| 15354 | /* |
| 15355 | * TLV tag and len; tag equals |
| 15356 | * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param |
| 15357 | */ |
| 15358 | A_UINT32 tlv_header; |
| 15359 | /* unique id identifying the VDEV, generated by the caller */ |
| 15360 | A_UINT32 vdev_id; |
| 15361 | /* WISA enable / disable mode */ |
| 15362 | A_UINT32 wisa_mode; |
| 15363 | } wmi_vdev_wisa_cmd_fixed_param; |
| 15364 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 15365 | /* |
Manikandan Mohan | 55c94d6 | 2015-12-04 13:47:58 -0800 | [diff] [blame] | 15366 | * This structure is used to report SMPS force mode set complete to host. |
| 15367 | */ |
| 15368 | typedef struct { |
| 15369 | /* TLV tag and len; tag equals |
| 15370 | * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param |
| 15371 | */ |
| 15372 | A_UINT32 tlv_header; |
| 15373 | /* Unique id identifying the VDEV */ |
| 15374 | A_UINT32 vdev_id; |
| 15375 | /* Return status. 0 for success, non-zero otherwise */ |
| 15376 | A_UINT32 status; |
| 15377 | } wmi_sta_smps_force_mode_complete_event_fixed_param; |
| 15378 | |
| 15379 | /* |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 15380 | * This structure is used to report SCPC calibrated data to host. |
| 15381 | */ |
| 15382 | typedef struct { |
| 15383 | /* TLV tag and len; tag equals |
| 15384 | * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param |
| 15385 | */ |
| 15386 | A_UINT32 tlv_header; |
| 15387 | /* number of BDF patches. Each patch contains offset, length and data */ |
| 15388 | A_UINT32 num_patch; |
| 15389 | /* This TLV is followed by another TLV of array of bytes |
| 15390 | * A_UINT8 data[]; |
| 15391 | * This data array contains, for example |
| 15392 | * patch1 offset(byte3~0), patch1 data length(byte7~4), |
| 15393 | * patch1 data(byte11~8) |
| 15394 | * patch2 offset(byte15~12), patch2 data length(byte19~16), |
| 15395 | * patch2 data(byte47~20) |
| 15396 | */ |
| 15397 | } wmi_scpc_event_fixed_param; |
| 15398 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 15399 | /* bpf interface structure */ |
| 15400 | typedef struct wmi_bpf_get_capability_cmd_s { |
| 15401 | A_UINT32 tlv_header; |
| 15402 | A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */ |
| 15403 | } wmi_bpf_get_capability_cmd_fixed_param; |
| 15404 | |
| 15405 | typedef struct wmi_bpf_capability_info_evt_s { |
| 15406 | A_UINT32 tlv_header; |
| 15407 | A_UINT32 bpf_version; /* fw's implement version */ |
| 15408 | A_UINT32 max_bpf_filters; /* max filters that fw supports */ |
| 15409 | A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */ |
| 15410 | } wmi_bpf_capability_info_evt_fixed_param; |
| 15411 | |
| 15412 | /* bit 0 of flags: report counters */ |
| 15413 | #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0 |
| 15414 | #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1 |
| 15415 | typedef struct wmi_bpf_get_vdev_stats_cmd_s { |
| 15416 | A_UINT32 tlv_header; |
| 15417 | A_UINT32 flags; |
| 15418 | A_UINT32 vdev_id; |
| 15419 | } wmi_bpf_get_vdev_stats_cmd_fixed_param; |
| 15420 | |
| 15421 | typedef struct wmi_bpf_vdev_stats_info_evt_s { |
| 15422 | A_UINT32 tlv_header; |
| 15423 | A_UINT32 vdev_id; |
| 15424 | A_UINT32 num_filters; |
| 15425 | A_UINT32 num_checked_pkts; |
| 15426 | A_UINT32 num_dropped_pkts; |
| 15427 | } wmi_bpf_vdev_stats_info_evt_fixed_param; |
| 15428 | |
| 15429 | typedef struct wmi_bpf_set_vdev_instructions_cmd_s { |
| 15430 | A_UINT32 tlv_header; |
| 15431 | A_UINT32 vdev_id; |
| 15432 | A_UINT32 filter_id; |
| 15433 | A_UINT32 bpf_version; /* host bpf version */ |
| 15434 | A_UINT32 total_length; |
| 15435 | A_UINT32 current_offset; |
| 15436 | A_UINT32 current_length; |
Manikandan Mohan | 05ac7ee | 2015-12-23 14:18:36 -0800 | [diff] [blame] | 15437 | /* |
| 15438 | * The TLV follows: |
| 15439 | * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions |
| 15440 | */ |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 15441 | } wmi_bpf_set_vdev_instructions_cmd_fixed_param; |
| 15442 | |
| 15443 | #define BPF_FILTER_ID_ALL 0xFFFFFFFF |
| 15444 | typedef struct wmi_bpf_del_vdev_instructions_cmd_s { |
| 15445 | A_UINT32 tlv_header; |
| 15446 | A_UINT32 vdev_id; |
| 15447 | A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */ |
| 15448 | } wmi_bpf_del_vdev_instructions_cmd_fixed_param; |
| 15449 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15450 | #define AES_BLOCK_LEN 16 /* in bytes */ |
| 15451 | #define FIPS_KEY_LENGTH_128 16 /* in bytes */ |
| 15452 | #define FIPS_KEY_LENGTH_256 32 /* in bytes */ |
| 15453 | #define FIPS_ENCRYPT_CMD 0 |
| 15454 | #define FIPS_DECRYPT_CMD 1 |
| 15455 | #define FIPS_ENGINE_AES_CTR 0 |
| 15456 | #define FIPS_ENGINE_AES_MIC 1 |
| 15457 | #define FIPS_ERROR_OPER_TIMEOUT 1 |
| 15458 | |
| 15459 | /* WMI_PDEV_FIPS_CMDID */ |
| 15460 | typedef struct { |
| 15461 | /* |
| 15462 | * TLV tag and len; tag equals |
| 15463 | * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param |
| 15464 | */ |
| 15465 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15466 | union { |
| 15467 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15468 | A_UINT32 mac_id; |
| 15469 | /** pdev_id for identifying the MAC |
| 15470 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15471 | */ |
| 15472 | A_UINT32 pdev_id; |
| 15473 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15474 | A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */ |
| 15475 | /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */ |
| 15476 | A_UINT32 mode; |
| 15477 | /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */ |
| 15478 | A_UINT32 key_len; |
| 15479 | A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */ |
| 15480 | A_UINT32 data_len; /* data length */ |
| 15481 | /* |
| 15482 | * Following this structure is the TLV: |
| 15483 | * A_UINT32 data[1]; - In Data (keep this in the end) |
| 15484 | */ |
| 15485 | } wmi_pdev_fips_cmd_fixed_param; |
| 15486 | |
| 15487 | typedef struct { |
| 15488 | /* |
| 15489 | * TLV tag and len; tag equals |
| 15490 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param |
| 15491 | */ |
| 15492 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15493 | union { |
| 15494 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15495 | A_UINT32 mac_id; |
| 15496 | /** pdev_id for identifying the MAC |
| 15497 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15498 | */ |
| 15499 | A_UINT32 pdev_id; |
| 15500 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15501 | A_UINT32 enable; /* 1:enable, 0:disable */ |
| 15502 | /* 1:GPIO parallel mode, 0:GPIO serial mode */ |
| 15503 | A_UINT32 mode; |
| 15504 | A_UINT32 rx_antenna; /* rx antenna */ |
| 15505 | A_UINT32 tx_default_antenna; /* tx default antenna */ |
| 15506 | /* |
| 15507 | * Following this structure is the TLV: |
| 15508 | * wmi_pdev_smart_ant_gpio_handle |
| 15509 | */ |
| 15510 | } wmi_pdev_smart_ant_enable_cmd_fixed_param; |
| 15511 | |
| 15512 | /** GPIO pins/function values to control antennas */ |
| 15513 | typedef struct { |
| 15514 | /* |
| 15515 | * TLV tag and len; tag equals |
| 15516 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle |
| 15517 | */ |
| 15518 | A_UINT32 tlv_header; |
| 15519 | /* For serial: index 0-strobe index 1-data, For Parallel: per stream */ |
| 15520 | A_UINT32 gpio_pin; |
| 15521 | A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15522 | /** pdev_id for identifying the MAC |
| 15523 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15524 | */ |
| 15525 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15526 | } wmi_pdev_smart_ant_gpio_handle; |
| 15527 | |
| 15528 | typedef struct { |
| 15529 | /* |
| 15530 | * TLV tag and len; tag equals |
| 15531 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param |
| 15532 | */ |
| 15533 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15534 | union { |
| 15535 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15536 | A_UINT32 mac_id; |
| 15537 | /** pdev_id for identifying the MAC |
| 15538 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15539 | */ |
| 15540 | A_UINT32 pdev_id; |
| 15541 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15542 | A_UINT32 rx_antenna; |
| 15543 | } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param; |
| 15544 | |
| 15545 | typedef struct { |
| 15546 | /* |
| 15547 | * TLV tag and len; tag equals |
| 15548 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param |
| 15549 | */ |
| 15550 | A_UINT32 tlv_header; |
| 15551 | /** unique id identifying the vdev, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15552 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15553 | /** peer MAC address */ |
| 15554 | wmi_mac_addr peer_macaddr; |
| 15555 | /* |
| 15556 | * Following this structure is the TLV: |
| 15557 | * wmi_peer_smart_ant_set_tx_antenna_series |
| 15558 | */ |
| 15559 | } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param; |
| 15560 | |
| 15561 | typedef struct { |
| 15562 | /* |
| 15563 | * TLV tag and len; tag equals |
| 15564 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series |
| 15565 | */ |
| 15566 | A_UINT32 tlv_header; |
| 15567 | /* antenna array */ |
| 15568 | A_UINT32 antenna_series; |
| 15569 | } wmi_peer_smart_ant_set_tx_antenna_series; |
| 15570 | |
| 15571 | typedef struct { |
| 15572 | /* |
| 15573 | * TLV tag and len; tag equals |
| 15574 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param |
| 15575 | */ |
| 15576 | A_UINT32 tlv_header; |
| 15577 | /* rate array */ |
| 15578 | A_UINT32 train_rate_series; |
| 15579 | /* antenna array */ |
| 15580 | A_UINT32 train_antenna_series; |
| 15581 | /* Rate flags */ |
| 15582 | /* TODO: For future use? */ |
| 15583 | A_UINT32 rc_flags; |
| 15584 | } wmi_peer_smart_ant_set_train_antenna_param; |
| 15585 | |
| 15586 | typedef struct { |
| 15587 | /* |
| 15588 | * TLV tag and len; tag equals |
| 15589 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param |
| 15590 | */ |
| 15591 | A_UINT32 tlv_header; |
| 15592 | /** unique id identifying the VDEV, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15593 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15594 | /** peer MAC address */ |
| 15595 | wmi_mac_addr peer_macaddr; |
| 15596 | /* num packets; 0-stop training */ |
| 15597 | A_UINT32 num_pkts; |
| 15598 | /* |
| 15599 | * Following this structure is the TLV: |
| 15600 | * wmi_peer_smart_ant_set_train_antenna_param |
| 15601 | */ |
| 15602 | } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param; |
| 15603 | |
| 15604 | typedef struct { |
| 15605 | /* |
| 15606 | * TLV tag and len; tag equals |
| 15607 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param |
| 15608 | */ |
| 15609 | A_UINT32 tlv_header; |
| 15610 | /** unique id identifying the vdev, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15611 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15612 | /** peer MAC address */ |
| 15613 | wmi_mac_addr peer_macaddr; |
| 15614 | /* command id*/ |
| 15615 | A_UINT32 cmd_id; |
| 15616 | /* number of arguments passed */ |
| 15617 | A_UINT32 args_count; |
| 15618 | /* |
| 15619 | * Following this structure is the TLV: |
| 15620 | * A_UINT32 args[]; // argument list |
| 15621 | */ |
| 15622 | } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param; |
| 15623 | |
| 15624 | typedef struct { |
| 15625 | /* |
| 15626 | * TLV tag and len; tag equals |
| 15627 | * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain |
| 15628 | */ |
| 15629 | A_UINT32 tlv_header; |
| 15630 | A_UINT32 antCtrlChain; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15631 | /** pdev_id for identifying the MAC |
| 15632 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15633 | */ |
| 15634 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15635 | } wmi_pdev_set_ant_ctrl_chain; |
| 15636 | |
| 15637 | typedef struct { |
| 15638 | /* |
| 15639 | * TLV tag and len; tag equals |
| 15640 | * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param |
| 15641 | */ |
| 15642 | A_UINT32 tlv_header; |
| 15643 | A_UINT32 mac_id; /* MAC ID */ |
| 15644 | A_UINT32 antCtrlCommon1; |
| 15645 | A_UINT32 antCtrlCommon2; |
| 15646 | /* |
| 15647 | * Following this structure is the TLV: |
| 15648 | * wmi_pdev_set_ant_ctrl_chain |
| 15649 | */ |
| 15650 | } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param; |
| 15651 | |
| 15652 | typedef struct { |
| 15653 | /* TLV tag and len; tag equals |
| 15654 | * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param |
| 15655 | */ |
| 15656 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15657 | union { |
| 15658 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15659 | A_UINT32 mac_id; |
| 15660 | /** pdev_id for identifying the MAC |
| 15661 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15662 | */ |
| 15663 | A_UINT32 pdev_id; |
| 15664 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15665 | /** len of CTL info */ |
| 15666 | A_UINT32 ctl_len; |
| 15667 | /* ctl array (len adjusted to number of words) |
| 15668 | * Following this structure is the TLV: |
| 15669 | * A_UINT32 ctl_info[1]; |
| 15670 | */ |
| 15671 | } wmi_pdev_set_ctl_table_cmd_fixed_param; |
| 15672 | |
| 15673 | typedef struct { |
| 15674 | /* |
| 15675 | * TLV tag and len; tag equals |
| 15676 | * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param |
| 15677 | */ |
| 15678 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15679 | union { |
| 15680 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15681 | A_UINT32 mac_id; |
| 15682 | /** pdev_id for identifying the MAC |
| 15683 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15684 | */ |
| 15685 | A_UINT32 pdev_id; |
| 15686 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15687 | A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */ |
| 15688 | /* |
| 15689 | * Bit 7:0 len of array gain table |
| 15690 | * Bit 8 bypass multi chain gain or not |
| 15691 | */ |
| 15692 | /* |
| 15693 | * array gain table(s) (len adjusted to number of words). |
| 15694 | * Following this structure is the TLV: |
| 15695 | * A_UINT32 arraygain_tbl[1]; |
| 15696 | */ |
| 15697 | } wmi_pdev_set_mimogain_table_cmd_fixed_param; |
| 15698 | |
| 15699 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0 |
| 15700 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S) |
| 15701 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN) |
| 15702 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN) |
| 15703 | |
| 15704 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8 |
| 15705 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S) |
| 15706 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS) |
| 15707 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS) |
| 15708 | |
| 15709 | |
| 15710 | typedef struct { |
| 15711 | /* |
| 15712 | * TLV tag and len; tag equals |
| 15713 | * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param |
| 15714 | */ |
| 15715 | A_UINT32 tlv_header; |
| 15716 | /** parameter id */ |
| 15717 | A_UINT32 param_id; |
| 15718 | /** parameter value */ |
| 15719 | A_UINT32 param_value; |
| 15720 | } wmi_fwtest_set_param_cmd_fixed_param; |
| 15721 | |
| 15722 | /* Expressed in 1 part in 1000 (permille) */ |
| 15723 | #define WMI_ATF_DENOMINATION 1000 |
| 15724 | |
Nitesh Shah | 0f933b8 | 2016-07-20 16:05:03 +0530 | [diff] [blame] | 15725 | #define WMI_ATF_SSID_FAIR_SCHED 0 /** Fair ATF scheduling for vdev */ |
| 15726 | #define WMI_ATF_SSID_STRICT_SCHED 1 /** Strict ATF scheduling for vdev */ |
| 15727 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15728 | typedef struct { |
| 15729 | /* |
| 15730 | * TLV tag and len; tag equals |
| 15731 | * WMITLV_TAG_STRUC_wmi_atf_peer_info |
| 15732 | */ |
| 15733 | A_UINT32 tlv_header; |
| 15734 | wmi_mac_addr peer_macaddr; |
| 15735 | A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */ |
| 15736 | A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */ |
| 15737 | /* Peer congestion threshold for future use */ |
| 15738 | A_UINT32 atf_units_reserved; |
| 15739 | } wmi_atf_peer_info; |
| 15740 | |
| 15741 | typedef struct { |
| 15742 | /* |
| 15743 | * TLV tag and len; tag equals |
| 15744 | * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param |
| 15745 | */ |
| 15746 | A_UINT32 tlv_header; |
| 15747 | A_UINT32 num_peers; |
| 15748 | /* |
| 15749 | * Following this structure is the TLV: |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 15750 | * struct wmi_atf_peer_info peer_info[num_peers]; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15751 | */ |
| 15752 | } wmi_peer_atf_request_fixed_param; |
| 15753 | |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 15754 | /* Structure for Bandwidth Fairness peer information */ |
| 15755 | typedef struct { |
| 15756 | /* |
| 15757 | * TLV tag and len; tag equals |
| 15758 | * WMITLV_TAG_STRUC_wmi_bwf_peer_info |
| 15759 | */ |
| 15760 | A_UINT32 tlv_header; |
| 15761 | wmi_mac_addr peer_macaddr; |
| 15762 | /* BWF guaranteed_bandwidth for the peers in mbps */ |
| 15763 | A_UINT32 bwf_guaranteed_bandwidth; |
| 15764 | /* |
| 15765 | * BWF Maximum airtime percentage that can be allocated |
| 15766 | * to the peer to meet the guaranteed_bandwidth |
| 15767 | */ |
| 15768 | A_UINT32 bwf_max_airtime; |
| 15769 | /* BWF priority of the peer to allocate the tokens dynamically */ |
| 15770 | A_UINT32 bwf_peer_priority; |
| 15771 | } wmi_bwf_peer_info; |
| 15772 | |
| 15773 | /* Structure for Bandwidth Fairness peer request */ |
| 15774 | typedef struct { |
| 15775 | /* |
| 15776 | * TLV tag and len; tag equals |
| 15777 | * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param |
| 15778 | */ |
| 15779 | A_UINT32 tlv_header; |
| 15780 | A_UINT32 num_peers; |
| 15781 | /* |
| 15782 | * Following this structure is the TLV: |
| 15783 | * struct wmi_bwf_peer_info peer_info[num_peers]; |
| 15784 | */ |
| 15785 | } wmi_peer_bwf_request_fixed_param; |
| 15786 | |
| 15787 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15788 | /* Equal distribution of ATF air time within an VDEV. */ |
| 15789 | typedef struct { |
| 15790 | /* |
| 15791 | * TLV tag and len; tag equals |
| 15792 | * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param |
| 15793 | */ |
| 15794 | A_UINT32 tlv_header; |
| 15795 | A_UINT32 vdev_id; |
| 15796 | A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */ |
| 15797 | } wmi_vdev_atf_request_fixed_param; |
| 15798 | |
| 15799 | typedef struct { |
| 15800 | /* |
| 15801 | * TLV tag and len; tag equals |
| 15802 | * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param |
| 15803 | */ |
| 15804 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15805 | /** pdev_id for identifying the MAC |
| 15806 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15807 | */ |
| 15808 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15809 | /** parameter */ |
| 15810 | A_UINT32 param; |
| 15811 | } wmi_pdev_get_ani_cck_config_cmd_fixed_param; |
| 15812 | |
| 15813 | typedef struct { |
| 15814 | /* |
| 15815 | * TLV tag and len; tag equals |
| 15816 | * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param |
| 15817 | */ |
| 15818 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15819 | /** pdev_id for identifying the MAC |
| 15820 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15821 | */ |
| 15822 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15823 | /** parameter */ |
| 15824 | A_UINT32 param; |
| 15825 | } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param; |
| 15826 | |
| 15827 | typedef struct { |
| 15828 | /* |
| 15829 | * TLV tag and len; tag equals |
| 15830 | * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param |
| 15831 | */ |
| 15832 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15833 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15834 | A_UINT32 qb_enable; |
| 15835 | wmi_mac_addr peer_macaddr; |
| 15836 | } WMI_QBOOST_CFG_CMD_fixed_param; |
| 15837 | |
| 15838 | #define WMI_INST_STATS_INVALID_RSSI 0 |
| 15839 | |
| 15840 | typedef struct { |
| 15841 | /* |
| 15842 | * TLV tag and len; tag equals |
| 15843 | * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param |
| 15844 | */ |
| 15845 | A_UINT32 tlv_header; |
| 15846 | A_UINT32 iRSSI; /* dBm above the noise floor */ |
| 15847 | /* peer MAC address */ |
| 15848 | wmi_mac_addr peer_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15849 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15850 | } wmi_inst_rssi_stats_resp_fixed_param; |
| 15851 | |
| 15852 | typedef struct { |
| 15853 | /* |
| 15854 | * TLV tag and len; tag equals |
| 15855 | * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info |
| 15856 | */ |
| 15857 | A_UINT32 tlv_header; |
| 15858 | A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */ |
| 15859 | } wmi_peer_cck_ofdm_rate_info; |
| 15860 | |
| 15861 | typedef struct { |
| 15862 | /* |
| 15863 | * TLV tag and len; tag equals |
| 15864 | * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info |
| 15865 | */ |
| 15866 | A_UINT32 tlv_header; |
| 15867 | A_UINT32 ratecode_20; /* Rate code for 20MHz BW */ |
| 15868 | A_UINT32 ratecode_40; /* Rate code for 40MHz BW */ |
| 15869 | A_UINT32 ratecode_80; /* Rate code for 80MHz BW */ |
| 15870 | } wmi_peer_mcs_rate_info; |
| 15871 | |
| 15872 | typedef struct { |
| 15873 | /* |
| 15874 | * TLV tag and len; tag equals |
| 15875 | * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param |
| 15876 | */ |
| 15877 | A_UINT32 tlv_header; |
| 15878 | wmi_mac_addr peer_macaddr; |
| 15879 | A_UINT32 ratecount; /* Max Rate count for each mode */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15880 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15881 | /* |
| 15882 | * Following this structure are the TLV |
| 15883 | * struct wmi_peer_cck_ofdm_rate_info; |
| 15884 | * struct wmi_peer_mcs_rate_info; |
| 15885 | */ |
| 15886 | } wmi_peer_ratecode_list_event_fixed_param; |
| 15887 | |
| 15888 | typedef struct wmi_wds_addr_event { |
| 15889 | /* |
| 15890 | * TLV tag and len; tag equals |
| 15891 | * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param |
| 15892 | */ |
| 15893 | A_UINT32 tlv_header; |
| 15894 | A_UINT32 event_type[4]; |
| 15895 | wmi_mac_addr peer_mac; |
| 15896 | wmi_mac_addr dest_mac; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15897 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15898 | } wmi_wds_addr_event_fixed_param; |
| 15899 | |
| 15900 | typedef struct { |
| 15901 | /* |
| 15902 | * TLV tag and len; tag equals |
| 15903 | * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param |
| 15904 | */ |
| 15905 | A_UINT32 tlv_header; |
| 15906 | wmi_mac_addr peer_macaddr; |
| 15907 | A_UINT32 peer_ps_state; |
| 15908 | } wmi_peer_sta_ps_statechange_event_fixed_param; |
| 15909 | |
| 15910 | /* WMI_PDEV_FIPS_EVENTID */ |
| 15911 | typedef struct { |
| 15912 | /* |
| 15913 | * TLV tag and len; tag equals |
| 15914 | * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param |
| 15915 | */ |
| 15916 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15917 | union { |
| 15918 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15919 | A_UINT32 mac_id; |
| 15920 | /** pdev_id for identifying the MAC |
| 15921 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15922 | */ |
| 15923 | A_UINT32 pdev_id; |
| 15924 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15925 | /* Error status: 0 (no err), 1, or OPER_TIMEOUT */ |
| 15926 | A_UINT32 error_status; |
| 15927 | A_UINT32 data_len; /* Data length */ |
| 15928 | /* |
| 15929 | * Following this structure is the TLV: |
| 15930 | * A_UINT32 data[1]; // Out Data (keep this in the end) |
| 15931 | */ |
| 15932 | } wmi_pdev_fips_event_fixed_param; |
| 15933 | |
| 15934 | typedef struct { |
| 15935 | /* |
| 15936 | * TLV tag and len; tag equals |
| 15937 | * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param |
| 15938 | */ |
| 15939 | A_UINT32 tlv_header; |
| 15940 | A_UINT32 mac_id; /* MAC ID */ |
| 15941 | /* Noise threshold iterations with high values */ |
| 15942 | A_UINT32 noise_floor_report_iter; |
| 15943 | /* Total noise threshold iterations */ |
| 15944 | A_UINT32 noise_floor_total_iter; |
| 15945 | } wmi_pdev_channel_hopping_event_fixed_param; |
| 15946 | |
| 15947 | enum { |
| 15948 | WMI_PDEV_RESERVE_AST_ENTRY_OK, |
| 15949 | WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION, |
| 15950 | WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY, |
| 15951 | }; |
| 15952 | |
| 15953 | typedef struct { |
| 15954 | /* |
| 15955 | * TLV tag and len; tag equals |
| 15956 | * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param |
| 15957 | */ |
| 15958 | A_UINT32 tlv_header; |
| 15959 | A_UINT32 mac_id; /* MAC ID */ |
| 15960 | A_UINT32 rate_flags; |
| 15961 | /** |
| 15962 | * FLAG_ONE_CHAIN 0x001 - one chain mask |
| 15963 | * FLAG_TWO_CHAIN 0x005 - two chain mask |
| 15964 | * FLAG_THREE_CHAIN 0x007 - three chain mask |
| 15965 | * FLAG_FOUR_CHAIN 0x00F - four chain mask |
| 15966 | * FLAG_STBC 0x010 - STBC is set |
| 15967 | * FLAG_40MHZ 0x020 |
| 15968 | * FLAG_80MHZ 0x040 |
| 15969 | * FLAG_160MHZ 0x080 |
| 15970 | * FLAG_TXBF 0x0100 - Tx Bf enabled |
| 15971 | * FLAG_RTSENA 0x0200 - RTS enabled |
| 15972 | * FLAG_CTSENA 0x0400 - CTS enabled |
| 15973 | * FLAG_LDPC 0x0800 - LDPC set |
| 15974 | * FLAG_SERIES1 0x1000 - |
| 15975 | * FLAG_SGI 0x2000 - Short gaurd interval |
| 15976 | * FLAG_MU2 0x4000 - MU2 data |
| 15977 | * FLAG_MU3 0x8000 - MU3 data |
| 15978 | * */ |
| 15979 | A_UINT32 nss; |
| 15980 | /** |
| 15981 | * NSS 0x0 - 0x3 |
| 15982 | * */ |
| 15983 | A_UINT32 preamble; |
| 15984 | /** |
| 15985 | * PREAM_OFDM - 0x0 |
| 15986 | * PREAM_CCK - 0x1 |
| 15987 | * PREAM_HT - 0x2 |
| 15988 | * PREAM_VHT - 0x3 |
| 15989 | * */ |
| 15990 | A_UINT32 hw_rate; |
| 15991 | /** |
| 15992 | * *** HW_OFDM_RATE *** |
| 15993 | * OFDM_48_MBPS - 0x0 |
| 15994 | * OFDM_24_MBPS - 0x1 |
| 15995 | * OFDM_12_MBPS - 0x2 |
| 15996 | * OFDM_6_MBPS - 0x3 |
| 15997 | * OFDM_54_MBPS - 0x4 |
| 15998 | * OFDM_36_MBPS - 0x5 |
| 15999 | * OFDM_18_MBPS - 0x6 |
| 16000 | * OFDM_9_MBPS - 0x7 |
| 16001 | * |
| 16002 | * *** HW_CCK_RATE *** |
| 16003 | * CCK_11_LONG_MBPS - 0x0 |
| 16004 | * CCK_5_5_LONG_MBPS - 0x1 |
| 16005 | * CCK_2_LONG_MBPS - 0x2 |
| 16006 | * CCK_1_LONG_MBPS - 0x3 |
| 16007 | * CCK_11_SHORT_MBPS - 0x4 |
| 16008 | * CCK_5_5_SHORT_MBPS - 0x5 |
| 16009 | * CCK_2_SHORT_MBPS - 0x6 |
| 16010 | * |
| 16011 | * *** HW_HT / VHT_RATE *** |
| 16012 | * MCS 0x0 - 0x9 |
| 16013 | * */ |
| 16014 | } wmi_pdev_get_tpc_cmd_fixed_param; |
| 16015 | |
| 16016 | typedef struct { |
Anurag Chouhan | e326c92 | 2016-08-04 18:43:19 +0530 | [diff] [blame] | 16017 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 16018 | WMITLV_TAG_STRUC_wmi_pdev_get_chip_power_stats_cmd_fixed_param */ |
| 16019 | /** |
| 16020 | * pdev_id for identifying the MAC See macros |
| 16021 | * starting with WMI_PDEV_ID_ for values. |
| 16022 | */ |
| 16023 | A_UINT32 pdev_id; |
| 16024 | } wmi_pdev_get_chip_power_stats_cmd_fixed_param; |
| 16025 | |
| 16026 | |
| 16027 | typedef struct { |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 16028 | /* |
| 16029 | * TLV tag and len; tag equals |
| 16030 | * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param |
| 16031 | */ |
| 16032 | A_UINT32 tlv_header; |
| 16033 | A_UINT32 reserved0; /* for future need */ |
| 16034 | /* |
| 16035 | * Following this structure is the TLV: |
| 16036 | * A_UINT32 tpc[1]; |
| 16037 | */ |
| 16038 | } wmi_pdev_tpc_event_fixed_param; |
| 16039 | |
| 16040 | typedef struct { |
| 16041 | /* |
| 16042 | * TLV tag and len; tag equals |
| 16043 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param |
| 16044 | */ |
| 16045 | A_UINT32 tlv_header; |
| 16046 | A_UINT32 mac_id; /* MAC ID */ |
| 16047 | A_UINT32 nfdBr_len; |
| 16048 | A_UINT32 nfdBm_len; |
| 16049 | A_UINT32 freqNum_len; |
| 16050 | /* |
| 16051 | * Following this structure is the TLV: |
| 16052 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr; |
| 16053 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm; |
| 16054 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum; |
| 16055 | */ |
| 16056 | } wmi_pdev_nfcal_power_all_channels_event_fixed_param; |
| 16057 | |
| 16058 | typedef struct { |
| 16059 | /* |
| 16060 | * TLV tag and len; tag equals |
| 16061 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr |
| 16062 | */ |
| 16063 | A_UINT32 tlv_header; |
| 16064 | A_UINT32 nfdBr; |
| 16065 | } wmi_pdev_nfcal_power_all_channels_nfdBr; |
| 16066 | |
| 16067 | typedef struct { |
| 16068 | /* |
| 16069 | * TLV tag and len; tag equals |
| 16070 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm |
| 16071 | */ |
| 16072 | A_UINT32 tlv_header; |
| 16073 | A_UINT32 nfdBm; |
| 16074 | } wmi_pdev_nfcal_power_all_channels_nfdBm; |
| 16075 | |
| 16076 | typedef struct { |
| 16077 | /* |
| 16078 | * TLV tag and len; tag equals |
| 16079 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum |
| 16080 | */ |
| 16081 | A_UINT32 tlv_header; |
| 16082 | A_UINT32 freqNum; |
| 16083 | } wmi_pdev_nfcal_power_all_channels_freqNum; |
| 16084 | |
| 16085 | typedef struct { |
| 16086 | /* |
| 16087 | * TLV tag and len; tag equals |
| 16088 | * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param |
| 16089 | */ |
| 16090 | A_UINT32 tlv_header; |
| 16091 | A_UINT32 cck_level; |
| 16092 | } wmi_ani_cck_event_fixed_param; |
| 16093 | |
Anurag Chouhan | e326c92 | 2016-08-04 18:43:19 +0530 | [diff] [blame] | 16094 | typedef enum wmi_power_debug_reg_fmt_type { |
| 16095 | /* WMI_POWER_DEBUG_REG_FMT_TYPE_ROME -> Dumps following 12 Registers |
| 16096 | * SOC_SYSTEM_SLEEP |
| 16097 | * WLAN_SYSTEM_SLEEP |
| 16098 | * RTC_SYNC_FORCE_WAKE |
| 16099 | * MAC_DMA_ISR |
| 16100 | * MAC_DMA_TXRX_ISR |
| 16101 | * MAC_DMA_ISR_S1 |
| 16102 | * MAC_DMA_ISR_S2 |
| 16103 | * MAC_DMA_ISR_S3 |
| 16104 | * MAC_DMA_ISR_S4 |
| 16105 | * MAC_DMA_ISR_S5 |
| 16106 | * MAC_DMA_ISR_S6 |
| 16107 | * MAC_DMA_ISR_S7 |
| 16108 | */ |
| 16109 | WMI_POWER_DEBUG_REG_FMT_TYPE_ROME, |
| 16110 | WMI_POWER_DEBUG_REG_FMT_TYPE_MAX = 0xf, |
| 16111 | } WMI_POWER_DEBUG_REG_FMT_TYPE; |
| 16112 | |
| 16113 | typedef struct { |
| 16114 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 16115 | WMITLV_TAG_STRUC_wmi_chip_power_stats_event_fixed_param */ |
| 16116 | /* |
| 16117 | * maximum range is 35 hours, due to conversion from internal |
| 16118 | * 0.03215 ms units to ms |
| 16119 | */ |
| 16120 | A_UINT32 cumulative_sleep_time_ms; |
| 16121 | /* |
| 16122 | * maximum range is 35 hours, due to conversion from internal |
| 16123 | * 0.03215 ms units to ms |
| 16124 | */ |
| 16125 | A_UINT32 cumulative_total_on_time_ms; |
| 16126 | /* count of number of times chip enterred deep sleep */ |
| 16127 | A_UINT32 deep_sleep_enter_counter; |
| 16128 | /* Last Timestamp when Chip went to deep sleep */ |
| 16129 | A_UINT32 last_deep_sleep_enter_tstamp_ms; |
| 16130 | /* |
| 16131 | * WMI_POWER_DEBUG_REG_FMT_TYPE enum, describes debug registers |
| 16132 | * being dumped as part of the event |
| 16133 | */ |
| 16134 | A_UINT32 debug_register_fmt; |
| 16135 | /* number of debug registers being sent to host */ |
| 16136 | A_UINT32 num_debug_register; |
| 16137 | /* |
| 16138 | * Following this structure is the TLV: |
| 16139 | * A_UINT32 debug_registers[num_debug_registers]; |
| 16140 | */ |
| 16141 | } wmi_pdev_chip_power_stats_event_fixed_param; |
| 16142 | |
| 16143 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 16144 | typedef struct { |
| 16145 | /* |
| 16146 | * TLV tag and len; tag equals |
| 16147 | * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param |
| 16148 | */ |
| 16149 | A_UINT32 tlv_header; |
| 16150 | A_UINT32 ofdm_level; |
| 16151 | } wmi_ani_ofdm_event_fixed_param; |
| 16152 | |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 16153 | typedef enum wmi_coex_config_type { |
| 16154 | /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */ |
| 16155 | WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, |
| 16156 | /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */ |
| 16157 | WMI_COEX_CONFIG_PAGE_STA_TDM = 2, |
| 16158 | /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */ |
| 16159 | WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 16160 | /* config during WLAN connection */ |
| 16161 | WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, |
| 16162 | /* config to enable/disable BTC */ |
| 16163 | WMI_COEX_CONFIG_BTC_ENABLE = 5, |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 16164 | } WMI_COEX_CONFIG_TYPE; |
| 16165 | |
| 16166 | typedef struct { |
| 16167 | A_UINT32 tlv_header; |
| 16168 | A_UINT32 vdev_id; |
| 16169 | /* wmi_coex_config_type enum */ |
| 16170 | A_UINT32 config_type; |
| 16171 | A_UINT32 config_arg1; |
| 16172 | A_UINT32 config_arg2; |
| 16173 | } WMI_COEX_CONFIG_CMD_fixed_param; |
| 16174 | |
Sandeep Puligilla | ff55fec | 2016-03-09 12:54:23 -0800 | [diff] [blame] | 16175 | /** |
| 16176 | * This command is sent from WLAN host driver to firmware to |
| 16177 | * request firmware to enable/disable channel avoidance report |
| 16178 | * to host. |
| 16179 | */ |
| 16180 | enum { |
| 16181 | WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0, |
| 16182 | WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1 |
| 16183 | }; |
| 16184 | |
| 16185 | typedef struct { |
| 16186 | /* |
| 16187 | * TLV tag and len; tag equals |
| 16188 | * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param |
| 16189 | */ |
| 16190 | A_UINT32 tlv_header; |
| 16191 | /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */ |
| 16192 | A_UINT32 rpt_allow; |
| 16193 | } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param; |
| 16194 | |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 16195 | /* |
| 16196 | * Periodic channel stats WMI command structure |
| 16197 | * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID |
| 16198 | */ |
| 16199 | typedef struct { |
| 16200 | /* |
| 16201 | * TLV tag and len; tag equals |
| 16202 | * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param |
| 16203 | */ |
| 16204 | A_UINT32 tlv_header; |
| 16205 | /** 1 = enable, 0 = disable */ |
| 16206 | A_UINT32 enable; |
| 16207 | /** periodic stats duration (units are milliseconds) */ |
| 16208 | A_UINT32 stats_period; |
| 16209 | } wmi_set_periodic_channel_stats_config_fixed_param; |
| 16210 | |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 16211 | typedef struct { |
| 16212 | /* |
| 16213 | * TLV tag and len; tag equals |
| 16214 | * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param |
| 16215 | */ |
| 16216 | A_UINT32 tlv_header; |
| 16217 | /* |
| 16218 | * pdev_id for identifying the MAC |
| 16219 | * See macros starting with WMI_PDEV_ID_ for values. |
| 16220 | */ |
| 16221 | A_UINT32 pdev_id; |
| 16222 | /* Identify the wlan module */ |
| 16223 | A_UINT32 module_id; |
| 16224 | /* Num of elements in the following args[] array */ |
| 16225 | A_UINT32 num_args; |
| 16226 | /** |
| 16227 | * Following this structure are the TLVs: |
| 16228 | * A_UINT32 args[]; |
| 16229 | **/ |
| 16230 | } wmi_pdev_wal_power_debug_cmd_fixed_param; |
| 16231 | |
Nitesh Shah | 5de1cf8 | 2016-06-29 20:13:17 +0530 | [diff] [blame] | 16232 | typedef struct { |
| 16233 | /* |
| 16234 | * TLV tag and len; tag equals |
| 16235 | * WMITLV_TAG_STRUC_wmi_pdev_set_reorder_timeout_val_cmd_fixed_param |
| 16236 | */ |
| 16237 | A_UINT32 tlv_header; |
| 16238 | /** |
| 16239 | * @brief rx_timeout_pri - what rx reorder timeout (ms) to use |
| 16240 | * for the AC |
| 16241 | * @details |
| 16242 | * Each WMM access category (voice, video, best-effort, |
| 16243 | * background) will have its own timeout value to dictate |
| 16244 | * how long to wait for missing rx MPDUs to arrive before |
| 16245 | * releasing subsequent MPDUs that have already been |
| 16246 | * received. |
| 16247 | * This parameter specifies the timeout in milliseconds |
| 16248 | * for each access category. |
| 16249 | * The array elements are indexed by the WMI_AC enum to |
| 16250 | * identify which array element corresponds to which AC / |
| 16251 | * traffic type. |
| 16252 | */ |
| 16253 | A_UINT32 rx_timeout_pri[WMI_AC_MAX]; |
| 16254 | } wmi_pdev_set_reorder_timeout_val_cmd_fixed_param; |
| 16255 | |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 16256 | typedef enum { |
| 16257 | WLAN_2G_CAPABILITY = 0x1, |
| 16258 | WLAN_5G_CAPABILITY = 0x2, |
| 16259 | } WLAN_BAND_CAPABILITY; |
| 16260 | |
| 16261 | #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1) |
| 16262 | #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value) |
| 16263 | |
| 16264 | #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1) |
| 16265 | #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value) |
| 16266 | |
| 16267 | #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1) |
| 16268 | #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value) |
| 16269 | |
| 16270 | #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1) |
| 16271 | #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value) |
| 16272 | |
| 16273 | #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1) |
| 16274 | #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value) |
| 16275 | |
| 16276 | #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1) |
| 16277 | #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value) |
| 16278 | |
| 16279 | typedef struct { |
| 16280 | /* |
| 16281 | * TLV tag and len; tag equals |
| 16282 | * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES |
| 16283 | */ |
| 16284 | A_UINT32 tlv_header; |
| 16285 | /* |
| 16286 | * hw_mode_id - identify a particular set of HW characteristics, as |
| 16287 | * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element |
| 16288 | * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using |
| 16289 | * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES |
| 16290 | * elements should be assumed, though in practice the elements may |
| 16291 | * always be ordered by hw_mode_id |
| 16292 | */ |
| 16293 | A_UINT32 hw_mode_id; |
| 16294 | /* |
| 16295 | * pdev_id starts with 1. pdev_id 1 => phy_id 0, |
| 16296 | * pdev_id 2 => phy_id 1 |
| 16297 | */ |
| 16298 | A_UINT32 pdev_id; |
| 16299 | /* phy id. Starts with 0 */ |
| 16300 | A_UINT32 phy_id; |
| 16301 | /* supported modulations */ |
| 16302 | union { |
Himanshu Agarwal | e93c55e | 2016-05-20 12:18:15 +0530 | [diff] [blame] | 16303 | struct { |
| 16304 | A_UINT32 supports_11b:1, |
| 16305 | supports_11g:1, |
| 16306 | supports_11a:1, |
| 16307 | supports_11n:1, |
| 16308 | supports_11ac:1, |
| 16309 | supports_11ax:1; |
| 16310 | }; |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 16311 | A_UINT32 supported_flags; |
| 16312 | }; |
| 16313 | /* supported bands, enum WLAN_BAND_CAPABILITY */ |
| 16314 | A_UINT32 supported_bands; |
| 16315 | /* |
| 16316 | * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us, |
| 16317 | * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us |
| 16318 | */ |
| 16319 | A_UINT32 ampdu_density; |
| 16320 | /* max bw supported 2G, enum wmi_channel_width */ |
| 16321 | A_UINT32 max_bw_supported_2G; |
| 16322 | /* WMI HT Capability, WMI_HT_CAP defines */ |
| 16323 | A_UINT32 ht_cap_info_2G; |
| 16324 | /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */ |
| 16325 | A_UINT32 vht_cap_info_2G; |
| 16326 | /* |
| 16327 | * VHT Supported MCS Set field Rx/Tx same |
| 16328 | * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as |
| 16329 | * follows |
| 16330 | * - 0 indicates support for VHT-MCS 0-7 for n spatial streams |
| 16331 | * - 1 indicates support for VHT-MCS 0-8 for n spatial streams |
| 16332 | * - 2 indicates support for VHT-MCS 0-9 for n spatial streams |
| 16333 | * - 3 indicates that n spatial streams is not supported |
| 16334 | */ |
| 16335 | A_UINT32 vht_supp_mcs_2G; |
| 16336 | /* HE capability info field of 802.11ax, WMI_HE_CAP defines */ |
| 16337 | A_UINT32 he_cap_info_2G; |
| 16338 | /* HE Supported MCS Set field Rx/Tx same */ |
| 16339 | A_UINT32 he_supp_mcs_2G; |
| 16340 | /* Valid Transmit chain mask */ |
| 16341 | A_UINT32 tx_chain_mask_2G; |
| 16342 | /* Valid Receive chain mask */ |
| 16343 | A_UINT32 rx_chain_mask_2G; |
| 16344 | /* max bw supported 5G, enum wmi_channel_width */ |
| 16345 | A_UINT32 max_bw_supported_5G; |
| 16346 | /* WMI HT Capability, WMI_HT_CAP defines */ |
| 16347 | A_UINT32 ht_cap_info_5G; |
| 16348 | /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */ |
| 16349 | A_UINT32 vht_cap_info_5G; |
| 16350 | /* |
| 16351 | * VHT Supported MCS Set field Rx/Tx same |
| 16352 | * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as |
| 16353 | * follows |
| 16354 | * - 0 indicates support for VHT-MCS 0-7 for n spatial streams |
| 16355 | * - 1 indicates support for VHT-MCS 0-8 for n spatial streams |
| 16356 | * - 2 indicates support for VHT-MCS 0-9 for n spatial streams |
| 16357 | * - 3 indicates that n spatial streams is not supported |
| 16358 | */ |
| 16359 | A_UINT32 vht_supp_mcs_5G; |
| 16360 | /* HE capability info field of 802.11ax, WMI_HE_CAP defines */ |
| 16361 | A_UINT32 he_cap_info_5G; |
| 16362 | /* HE Supported MCS Set field Rx/Tx same */ |
| 16363 | A_UINT32 he_supp_mcs_5G; |
| 16364 | /* Valid Transmit chain mask */ |
| 16365 | A_UINT32 tx_chain_mask_5G; |
| 16366 | /* Valid Receive chain mask */ |
| 16367 | A_UINT32 rx_chain_mask_5G; |
| 16368 | } WMI_MAC_PHY_CAPABILITIES; |
| 16369 | |
| 16370 | typedef struct { |
| 16371 | /* |
| 16372 | * TLV tag and len; tag equal |
| 16373 | * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES |
| 16374 | */ |
| 16375 | A_UINT32 tlv_header; |
| 16376 | /* |
| 16377 | * hw_mode_id - identify a particular set of HW characteristics, |
| 16378 | * as specified by the subsequent fields |
| 16379 | */ |
| 16380 | A_UINT32 hw_mode_id; |
| 16381 | /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on */ |
| 16382 | A_UINT32 phy_id_map; |
| 16383 | /* |
| 16384 | * number of bits set in phy_id_map represents number of |
| 16385 | * WMI_MAC_PHY_CAPABILITIES TLV's |
| 16386 | * one for each active PHY for current HW mode |
| 16387 | * identified by hw_mode_id. For example for |
| 16388 | * DBS/SBS mode there will be 2 |
| 16389 | * WMI_MAC_PHY_CAPABILITIES TLVs and for |
| 16390 | * single MAC modes it |
| 16391 | * will be 1 WMI_MAC_PHY_CAPABILITIES |
| 16392 | * TLVs |
| 16393 | */ |
| 16394 | } WMI_HW_MODE_CAPABILITIES; |
| 16395 | |
| 16396 | typedef struct { |
| 16397 | /* |
| 16398 | * TLV tag and len; tag equals |
| 16399 | * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS |
| 16400 | */ |
| 16401 | A_UINT32 tlv_header; |
| 16402 | /* num HW modes */ |
| 16403 | A_UINT32 num_hw_modes; |
| 16404 | /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */ |
| 16405 | } WMI_SOC_MAC_PHY_HW_MODE_CAPS; |
| 16406 | |
| 16407 | /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/ |
| 16408 | typedef struct { |
| 16409 | /* |
| 16410 | * TLV tag and len; tag equals |
| 16411 | * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT |
| 16412 | */ |
| 16413 | A_UINT32 tlv_header; |
| 16414 | /* phy id */ |
| 16415 | A_UINT32 phy_id; |
| 16416 | /* regdomain value specified in EEPROM */ |
| 16417 | A_UINT32 eeprom_reg_domain; |
| 16418 | /* regdomain */ |
| 16419 | A_UINT32 eeprom_reg_domain_ext; |
| 16420 | /* |
| 16421 | * CAP1 capabilities bit map, see REGDMN_CAP1_ |
| 16422 | * defines |
| 16423 | */ |
| 16424 | A_UINT32 regcap1; |
| 16425 | /* |
| 16426 | * REGDMN EEPROM CAP, see |
| 16427 | * REGDMN_EEPROM_EEREGCAP_ defines |
| 16428 | */ |
| 16429 | A_UINT32 regcap2; |
| 16430 | /* REGDMN MODE, see REGDMN_MODE_ enum */ |
| 16431 | A_UINT32 wireless_modes; |
| 16432 | A_UINT32 low_2ghz_chan; |
| 16433 | A_UINT32 high_2ghz_chan; |
| 16434 | A_UINT32 low_5ghz_chan; |
| 16435 | A_UINT32 high_5ghz_chan; |
| 16436 | } WMI_HAL_REG_CAPABILITIES_EXT; |
| 16437 | |
| 16438 | typedef struct { |
| 16439 | /* |
| 16440 | * TLV tag and len; tag equals |
| 16441 | * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES |
| 16442 | */ |
| 16443 | A_UINT32 tlv_header; |
| 16444 | /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */ |
| 16445 | A_UINT32 num_phy; |
| 16446 | } WMI_SOC_HAL_REG_CAPABILITIES; |
| 16447 | |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 16448 | typedef struct { |
| 16449 | /* |
| 16450 | * TLV tag and len; tag equals |
| 16451 | * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv |
| 16452 | */ |
| 16453 | A_UINT32 tlv_header; |
| 16454 | /* |
| 16455 | * global default adaptive dwell mode, |
| 16456 | * used when WMI_SCAN_DWELL_MODE_DEFAULT |
| 16457 | */ |
| 16458 | A_UINT32 default_adaptive_dwell_mode; |
| 16459 | /* |
| 16460 | * the weight to calculate the average low pass filter for |
| 16461 | * channel congestion. 0-100 |
| 16462 | */ |
| 16463 | A_UINT32 adapative_lpf_weight; |
| 16464 | /* interval to monitor passive scan in msec */ |
| 16465 | A_UINT32 passive_monitor_interval_ms; |
| 16466 | /* % of wifi activity to switch from passive to active 0-100 */ |
| 16467 | A_UINT32 wifi_activity_threshold_pct; |
| 16468 | } wmi_scan_adaptive_dwell_parameters_tlv; |
| 16469 | |
| 16470 | typedef struct { |
| 16471 | /* |
| 16472 | * TLV tag and len; tag equals |
| 16473 | * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param |
| 16474 | */ |
| 16475 | A_UINT32 tlv_header; |
| 16476 | /* globally enable/disable adaptive dwell */ |
| 16477 | A_UINT32 enable; |
| 16478 | /* |
| 16479 | * followed by TLV (tag length value) parameters array |
| 16480 | * The TLV's are: |
| 16481 | * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements) |
| 16482 | */ |
| 16483 | } wmi_scan_adaptive_dwell_config_fixed_param; |
| 16484 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16485 | /* ADD NEW DEFS HERE */ |
| 16486 | |
| 16487 | /***************************************************************************** |
| 16488 | * The following structures are deprecated. DO NOT USE THEM! |
| 16489 | */ |
| 16490 | |
| 16491 | /** Max number of channels in the schedule. */ |
| 16492 | #define OCB_CHANNEL_MAX (5) |
| 16493 | |
| 16494 | /* NOTE: Make sure these data structures are identical to those 9235 |
| 16495 | * defined in sirApi.h */ |
| 16496 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16497 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16498 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 16499 | A_UINT32 aifsn; |
| 16500 | /** Contention Window minimum. Range: 1 - 10 */ |
| 16501 | A_UINT32 cwmin; |
| 16502 | /** Contention Window maximum. Range: 1 - 10 */ |
| 16503 | A_UINT32 cwmax; |
| 16504 | } wmi_qos_params_t; |
| 16505 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16506 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16507 | /** Channel frequency in MHz */ |
| 16508 | A_UINT32 chan_freq; |
| 16509 | /** Channel duration in ms */ |
| 16510 | A_UINT32 duration; |
| 16511 | /** Start guard interval in ms */ |
| 16512 | A_UINT32 start_guard_interval; |
| 16513 | /** End guard interval in ms */ |
| 16514 | A_UINT32 end_guard_interval; |
| 16515 | /** Transmit power in dBm, range 0 - 23 */ |
| 16516 | A_UINT32 tx_power; |
| 16517 | /** Transmit datarate in Mbps */ |
| 16518 | A_UINT32 tx_rate; |
| 16519 | /** QoS parameters for each AC */ |
| 16520 | wmi_qos_params_t qos_params[WLAN_MAX_AC]; |
| 16521 | /** 1 to enable RX stats for this channel, 0 otherwise */ |
| 16522 | A_UINT32 rx_stats; |
| 16523 | } wmi_ocb_channel_t; |
| 16524 | |
| 16525 | typedef struct { |
| 16526 | /** TLV tag and len; tag equals |
| 16527 | * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */ |
| 16528 | A_UINT32 tlv_header; |
| 16529 | /* VDEV identifier */ |
| 16530 | A_UINT32 vdev_id; |
| 16531 | /** Number of valid channels in the channels array */ |
| 16532 | A_UINT32 num_channels; |
| 16533 | /** The array of channels */ |
| 16534 | wmi_ocb_channel_t channels[OCB_CHANNEL_MAX]; |
| 16535 | /** 1 to allow off-channel tx, 0 otherwise */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16536 | A_UINT32 off_channel_tx; /* Not supported */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16537 | } wmi_ocb_set_sched_cmd_fixed_param; |
| 16538 | |
| 16539 | typedef struct { |
| 16540 | /** Return status. 0 for success, non-zero otherwise */ |
| 16541 | A_UINT32 status; |
| 16542 | } wmi_ocb_set_sched_event_fixed_param; |
| 16543 | |
| 16544 | /** |
| 16545 | * END DEPRECATED |
| 16546 | */ |
| 16547 | #ifdef __cplusplus |
| 16548 | } |
| 16549 | #endif |
| 16550 | #endif /*_WMI_UNIFIED_H_*/ |
| 16551 | /**@}*/ |