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 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 238 | } WMI_GRP_ID; |
| 239 | |
| 240 | #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 241 | #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 242 | |
| 243 | /** |
| 244 | * Command IDs and commange events |
| 245 | */ |
| 246 | typedef enum { |
| 247 | /** initialize the wlan sub system */ |
| 248 | WMI_INIT_CMDID = 0x1, |
| 249 | |
| 250 | /* Scan specific commands */ |
| 251 | |
| 252 | /** start scan request to FW */ |
| 253 | WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN), |
| 254 | /** stop scan request to FW */ |
| 255 | WMI_STOP_SCAN_CMDID, |
| 256 | /** full list of channels as defined by the regulatory that will be used by scanner */ |
| 257 | WMI_SCAN_CHAN_LIST_CMDID, |
| 258 | /** overwrite default priority table in scan scheduler */ |
| 259 | WMI_SCAN_SCH_PRIO_TBL_CMDID, |
| 260 | /** This command to adjust the priority and min.max_rest_time |
| 261 | * of an on ongoing scan request. |
| 262 | */ |
| 263 | WMI_SCAN_UPDATE_REQUEST_CMDID, |
| 264 | |
| 265 | /** set OUI to be used in probe request if enabled */ |
| 266 | WMI_SCAN_PROB_REQ_OUI_CMDID, |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 267 | /** config adaptive dwell scan */ |
| 268 | WMI_SCAN_ADAPTIVE_DWELL_CONFIG_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 269 | |
| 270 | /* PDEV(physical device) specific commands */ |
| 271 | /** set regulatorty ctl id used by FW to determine the exact ctl power limits */ |
| 272 | WMI_PDEV_SET_REGDOMAIN_CMDID = |
| 273 | WMI_CMD_GRP_START_ID(WMI_GRP_PDEV), |
| 274 | /** set channel. mainly used for supporting monitor mode */ |
| 275 | WMI_PDEV_SET_CHANNEL_CMDID, |
| 276 | /** set pdev specific parameters */ |
| 277 | WMI_PDEV_SET_PARAM_CMDID, |
| 278 | /** enable packet log */ |
| 279 | WMI_PDEV_PKTLOG_ENABLE_CMDID, |
| 280 | /** disable packet log*/ |
| 281 | WMI_PDEV_PKTLOG_DISABLE_CMDID, |
| 282 | /** set wmm parameters */ |
| 283 | WMI_PDEV_SET_WMM_PARAMS_CMDID, |
| 284 | /** set HT cap ie that needs to be carried probe requests HT/VHT channels */ |
| 285 | WMI_PDEV_SET_HT_CAP_IE_CMDID, |
| 286 | /** set VHT cap ie that needs to be carried on probe requests on VHT channels */ |
| 287 | WMI_PDEV_SET_VHT_CAP_IE_CMDID, |
| 288 | |
| 289 | /** Command to send the DSCP-to-TID map to the target */ |
| 290 | WMI_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 291 | /** set quiet ie parameters. primarily used in AP mode */ |
| 292 | WMI_PDEV_SET_QUIET_MODE_CMDID, |
| 293 | /** Enable/Disable Green AP Power Save */ |
| 294 | WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 295 | /** get TPC config for the current operating channel */ |
| 296 | WMI_PDEV_GET_TPC_CONFIG_CMDID, |
| 297 | |
| 298 | /** set the base MAC address for the physical device before a VDEV is created. |
| 299 | * For firmware that doesn't support this feature and this command, the pdev |
| 300 | * MAC address will not be changed. */ |
| 301 | WMI_PDEV_SET_BASE_MACADDR_CMDID, |
| 302 | |
| 303 | /* eeprom content dump , the same to bdboard data */ |
| 304 | WMI_PDEV_DUMP_CMDID, |
| 305 | /* set LED configuration */ |
| 306 | WMI_PDEV_SET_LED_CONFIG_CMDID, |
| 307 | /* Get Current temprature of chip in Celcius degree */ |
| 308 | WMI_PDEV_GET_TEMPERATURE_CMDID, |
| 309 | /* Set LED flashing behavior */ |
| 310 | WMI_PDEV_SET_LED_FLASHING_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 311 | /** Enable/Disable Smart Antenna */ |
| 312 | WMI_PDEV_SMART_ANT_ENABLE_CMDID, |
| 313 | /** Set Smart Antenna RX antenna*/ |
| 314 | WMI_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID, |
| 315 | /** Override the antenna switch table */ |
| 316 | WMI_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID, |
| 317 | /** Override the CTL table */ |
| 318 | WMI_PDEV_SET_CTL_TABLE_CMDID, |
| 319 | /** Override the array gain table */ |
| 320 | WMI_PDEV_SET_MIMOGAIN_TABLE_CMDID, |
| 321 | /** FIPS test mode command */ |
| 322 | WMI_PDEV_FIPS_CMDID, |
| 323 | /** get CCK ANI level */ |
| 324 | WMI_PDEV_GET_ANI_CCK_CONFIG_CMDID, |
| 325 | /** get OFDM ANI level */ |
| 326 | WMI_PDEV_GET_ANI_OFDM_CONFIG_CMDID, |
| 327 | /** NF Cal Power dBr/dBm */ |
| 328 | WMI_PDEV_GET_NFCAL_POWER_CMDID, |
| 329 | /** TxPPDU TPC */ |
| 330 | WMI_PDEV_GET_TPC_CMDID, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 331 | /* Set to enable MIB stats collection */ |
| 332 | WMI_MIB_STATS_ENABLE_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 333 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 334 | /** Set preferred channel list for DBS Mgr */ |
| 335 | WMI_PDEV_SET_PCL_CMDID, |
| 336 | /** Set HW mode. Eg: single MAC, DBS & SBS, |
| 337 | * see soc_hw_mode_t for values |
| 338 | */ |
| 339 | WMI_PDEV_SET_HW_MODE_CMDID, |
| 340 | /** Set DFS, SCAN modes and other FW configurations */ |
| 341 | WMI_PDEV_SET_MAC_CONFIG_CMDID, |
| 342 | /** Set per band and per pdev antenna chains */ |
| 343 | WMI_PDEV_SET_ANTENNA_MODE_CMDID, |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 344 | /** Periodic channel stats request command */ |
| 345 | WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID, |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 346 | /** WMI command for power debug framework */ |
| 347 | WMI_PDEV_WAL_POWER_DEBUG_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 348 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 349 | /* VDEV(virtual device) specific commands */ |
| 350 | /** vdev create */ |
| 351 | WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV), |
| 352 | /** vdev delete */ |
| 353 | WMI_VDEV_DELETE_CMDID, |
| 354 | /** vdev start request */ |
| 355 | WMI_VDEV_START_REQUEST_CMDID, |
| 356 | /** vdev restart request (RX only, NO TX, used for CAC period)*/ |
| 357 | WMI_VDEV_RESTART_REQUEST_CMDID, |
| 358 | /** vdev up request */ |
| 359 | WMI_VDEV_UP_CMDID, |
| 360 | /** vdev stop request */ |
| 361 | WMI_VDEV_STOP_CMDID, |
| 362 | /** vdev down request */ |
| 363 | WMI_VDEV_DOWN_CMDID, |
| 364 | /* set a vdev param */ |
| 365 | WMI_VDEV_SET_PARAM_CMDID, |
| 366 | /* set a key (used for setting per peer unicast and per vdev multicast) */ |
| 367 | WMI_VDEV_INSTALL_KEY_CMDID, |
| 368 | |
| 369 | /* wnm sleep mode command */ |
| 370 | WMI_VDEV_WNM_SLEEPMODE_CMDID, |
| 371 | WMI_VDEV_WMM_ADDTS_CMDID, |
| 372 | WMI_VDEV_WMM_DELTS_CMDID, |
| 373 | WMI_VDEV_SET_WMM_PARAMS_CMDID, |
| 374 | WMI_VDEV_SET_GTX_PARAMS_CMDID, |
| 375 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID, |
| 376 | |
| 377 | WMI_VDEV_PLMREQ_START_CMDID, |
| 378 | WMI_VDEV_PLMREQ_STOP_CMDID, |
| 379 | /* TSF timestamp action for specified vdev */ |
| 380 | WMI_VDEV_TSF_TSTAMP_ACTION_CMDID, |
| 381 | /* |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 382 | * set the additional IEs in probe requests for scan or |
| 383 | * assoc req etc for frames FW locally generates |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 384 | */ |
| 385 | WMI_VDEV_SET_IE_CMDID, |
| 386 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 387 | WMI_VDEV_RATEMASK_CMDID, |
| 388 | /** ATF VDEV REQUEST commands. */ |
| 389 | WMI_VDEV_ATF_REQUEST_CMDID, |
| 390 | /** Command to send the DSCP-to-TID map to the target for VAP */ |
| 391 | WMI_VDEV_SET_DSCP_TID_MAP_CMDID, |
| 392 | /* |
| 393 | * Configure filter for Neighbor Rx Pkt |
| 394 | * (smart mesh selective listening) |
| 395 | */ |
| 396 | WMI_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 397 | /** set quiet ie parameters. primarily used in AP mode */ |
| 398 | WMI_VDEV_SET_QUIET_MODE_CMDID, |
Krishna Kumaar Natarajan | ea0a796 | 2016-04-16 14:09:09 +0530 | [diff] [blame] | 399 | /** To set custom aggregation size for per vdev */ |
| 400 | WMI_VDEV_SET_CUSTOM_AGGR_SIZE_CMDID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 401 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 402 | /* peer specific commands */ |
| 403 | |
| 404 | /** create a peer */ |
| 405 | WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER), |
| 406 | /** delete a peer */ |
| 407 | WMI_PEER_DELETE_CMDID, |
| 408 | /** flush specific tid queues of a peer */ |
| 409 | WMI_PEER_FLUSH_TIDS_CMDID, |
| 410 | /** set a parameter of a peer */ |
| 411 | WMI_PEER_SET_PARAM_CMDID, |
| 412 | /** set peer to associated state. will cary all parameters determined during assocication time */ |
| 413 | WMI_PEER_ASSOC_CMDID, |
| 414 | /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 415 | WMI_PEER_ADD_WDS_ENTRY_CMDID, |
| 416 | /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 417 | WMI_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 418 | /** set up mcast group infor for multicast to unicast conversion */ |
| 419 | WMI_PEER_MCAST_GROUP_CMDID, |
| 420 | /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */ |
| 421 | WMI_PEER_INFO_REQ_CMDID, |
| 422 | |
| 423 | /** request the estimated link speed for the peer. FW shall respond with |
| 424 | * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID. |
| 425 | */ |
| 426 | WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID, |
| 427 | /* |
| 428 | * Set the conditions to report peer justified rate to driver |
| 429 | * The justified rate means the the user-rate is justified by PER. |
| 430 | */ |
| 431 | WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 432 | /** update a wds (4 address) entry */ |
| 433 | WMI_PEER_UPDATE_WDS_ENTRY_CMDID, |
| 434 | /** add a proxy sta entry */ |
| 435 | WMI_PEER_ADD_PROXY_STA_ENTRY_CMDID, |
| 436 | /** Set Smart Antenna TX antenna */ |
| 437 | WMI_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID, |
| 438 | /** Set Smart Antenna TX train info */ |
| 439 | WMI_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID, |
| 440 | /** Set SA node config options */ |
| 441 | WMI_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID, |
| 442 | /** ATF PEER REQUEST commands */ |
| 443 | WMI_PEER_ATF_REQUEST_CMDID, |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 444 | /** bandwidth fairness (BWF) peer configuration request command */ |
| 445 | WMI_PEER_BWF_REQUEST_CMDID, |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 446 | /** rx reorder queue setup for peer/tid */ |
| 447 | WMI_PEER_REORDER_QUEUE_SETUP_CMDID, |
| 448 | /** rx reorder queue remove for peer/tid */ |
| 449 | WMI_PEER_REORDER_QUEUE_REMOVE_CMDID, |
| 450 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 451 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 452 | /* beacon/management specific commands */ |
| 453 | |
| 454 | /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */ |
| 455 | WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT), |
| 456 | /** transmit beacon by value */ |
| 457 | WMI_PDEV_SEND_BCN_CMDID, |
| 458 | /** set the beacon template. used in beacon offload mode to setup the |
| 459 | * the common beacon template with the FW to be used by FW to generate beacons */ |
| 460 | WMI_BCN_TMPL_CMDID, |
| 461 | /** set beacon filter with FW */ |
| 462 | WMI_BCN_FILTER_RX_CMDID, |
| 463 | /* enable/disable filtering of probe requests in the firmware */ |
| 464 | WMI_PRB_REQ_FILTER_RX_CMDID, |
| 465 | /** transmit management frame by value. will be deprecated */ |
| 466 | WMI_MGMT_TX_CMDID, |
| 467 | /** set the probe response template. used in beacon offload mode to setup the |
| 468 | * the common probe response template with the FW to be used by FW to generate |
| 469 | * probe responses */ |
| 470 | WMI_PRB_TMPL_CMDID, |
| 471 | /** Transmit Mgmt frame by reference */ |
| 472 | WMI_MGMT_TX_SEND_CMDID, |
| 473 | |
| 474 | /** commands to directly control ba negotiation directly from host. only used in test mode */ |
| 475 | |
| 476 | /** turn off FW Auto addba mode and let host control addba */ |
| 477 | WMI_ADDBA_CLEAR_RESP_CMDID = |
| 478 | WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG), |
| 479 | /** send add ba request */ |
| 480 | WMI_ADDBA_SEND_CMDID, |
| 481 | WMI_ADDBA_STATUS_CMDID, |
| 482 | /** send del ba */ |
| 483 | WMI_DELBA_SEND_CMDID, |
| 484 | /** set add ba response will be used by FW to generate addba response*/ |
| 485 | WMI_ADDBA_SET_RESP_CMDID, |
| 486 | /** send single VHT MPDU with AMSDU */ |
| 487 | WMI_SEND_SINGLEAMSDU_CMDID, |
| 488 | |
| 489 | /** Station power save specific config */ |
| 490 | /** enable/disable station powersave */ |
| 491 | WMI_STA_POWERSAVE_MODE_CMDID = |
| 492 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS), |
| 493 | /** set station power save specific parameter */ |
| 494 | WMI_STA_POWERSAVE_PARAM_CMDID, |
| 495 | /** set station mimo powersave mode */ |
| 496 | WMI_STA_MIMO_PS_MODE_CMDID, |
| 497 | |
| 498 | /** DFS-specific commands */ |
| 499 | /** enable DFS (radar detection)*/ |
| 500 | WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS), |
| 501 | /** disable DFS (radar detection)*/ |
| 502 | WMI_PDEV_DFS_DISABLE_CMDID, |
| 503 | /** enable DFS phyerr/parse filter offload */ |
| 504 | WMI_DFS_PHYERR_FILTER_ENA_CMDID, |
| 505 | /** enable DFS phyerr/parse filter offload */ |
| 506 | WMI_DFS_PHYERR_FILTER_DIS_CMDID, |
| 507 | |
| 508 | /* Roaming specific commands */ |
| 509 | /** set roam scan mode */ |
| 510 | WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM), |
| 511 | /** set roam scan rssi threshold below which roam scan is enabled */ |
| 512 | WMI_ROAM_SCAN_RSSI_THRESHOLD, |
| 513 | /** set roam scan period for periodic roam scan mode */ |
| 514 | WMI_ROAM_SCAN_PERIOD, |
| 515 | /** set roam scan trigger rssi change threshold */ |
| 516 | WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 517 | /** set roam AP profile */ |
| 518 | WMI_ROAM_AP_PROFILE, |
| 519 | /** set channel list for roam scans */ |
| 520 | WMI_ROAM_CHAN_LIST, |
| 521 | /** Stop scan command */ |
| 522 | WMI_ROAM_SCAN_CMD, |
| 523 | /** roaming sme offload sync complete */ |
| 524 | WMI_ROAM_SYNCH_COMPLETE, |
| 525 | /** set ric request element for 11r roaming */ |
| 526 | WMI_ROAM_SET_RIC_REQUEST_CMDID, |
| 527 | /** Invoke roaming forcefully */ |
| 528 | WMI_ROAM_INVOKE_CMDID, |
| 529 | /** roaming filter cmd to allow further filtering of roaming candidate */ |
| 530 | WMI_ROAM_FILTER_CMDID, |
| 531 | /** set gateway ip, mac and retries for subnet change detection */ |
| 532 | WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID, |
| 533 | /** configure thresholds for MAWC */ |
| 534 | WMI_ROAM_CONFIGURE_MAWC_CMDID, |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 535 | /** configure MultiBand Operation(refer WFA MBO spec) parameter */ |
| 536 | WMI_ROAM_SET_MBO_PARAM_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 537 | |
| 538 | /** offload scan specific commands */ |
| 539 | /** set offload scan AP profile */ |
| 540 | WMI_OFL_SCAN_ADD_AP_PROFILE = |
| 541 | WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN), |
| 542 | /** remove offload scan AP profile */ |
| 543 | WMI_OFL_SCAN_REMOVE_AP_PROFILE, |
| 544 | /** set offload scan period */ |
| 545 | WMI_OFL_SCAN_PERIOD, |
| 546 | |
| 547 | /* P2P specific commands */ |
| 548 | /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response |
| 549 | * generated during p2p listen and for p2p discoverability */ |
| 550 | WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P), |
| 551 | /** enable/disable p2p discoverability on STA/AP VDEVs */ |
| 552 | WMI_P2P_DEV_SET_DISCOVERABILITY, |
| 553 | /** set p2p ie to be carried in beacons generated by FW for GO */ |
| 554 | WMI_P2P_GO_SET_BEACON_IE, |
| 555 | /** set p2p ie to be carried in probe response frames generated by FW for GO */ |
| 556 | WMI_P2P_GO_SET_PROBE_RESP_IE, |
| 557 | /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA |
| 558 | * attribute in the beacons/probe responses received. |
| 559 | */ |
| 560 | WMI_P2P_SET_VENDOR_IE_DATA_CMDID, |
| 561 | /** set the configure of p2p find offload */ |
| 562 | WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID, |
| 563 | /** set the vendor specific p2p ie data for p2p find offload using */ |
| 564 | WMI_P2P_DISC_OFFLOAD_APPIE_CMDID, |
| 565 | /** set the BSSID/device name pattern of p2p find offload */ |
| 566 | WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID, |
| 567 | /** set OppPS related parameters **/ |
| 568 | WMI_P2P_SET_OPPPS_PARAM_CMDID, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 569 | /** set listen offload start related parameters */ |
| 570 | WMI_P2P_LISTEN_OFFLOAD_START_CMDID, |
| 571 | /** set listen offload stop related parameters */ |
| 572 | WMI_P2P_LISTEN_OFFLOAD_STOP_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 573 | |
| 574 | /** AP power save specific config */ |
| 575 | /** set AP power save specific param */ |
| 576 | WMI_AP_PS_PEER_PARAM_CMDID = |
| 577 | WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS), |
| 578 | /** set AP UAPSD coex pecific param */ |
| 579 | WMI_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 580 | |
| 581 | /** set Enhanced Green AP param */ |
| 582 | WMI_AP_PS_EGAP_PARAM_CMDID, |
| 583 | |
| 584 | /** Rate-control specific commands */ |
| 585 | WMI_PEER_RATE_RETRY_SCHED_CMDID = |
| 586 | WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL), |
| 587 | |
| 588 | /** WLAN Profiling commands. */ |
| 589 | WMI_WLAN_PROFILE_TRIGGER_CMDID = |
| 590 | WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE), |
| 591 | WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 592 | WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 593 | WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 594 | WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 595 | |
| 596 | /** Suspend resume command Ids */ |
| 597 | WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND), |
| 598 | WMI_PDEV_RESUME_CMDID, |
| 599 | |
| 600 | /* Beacon filter commands */ |
| 601 | /** add a beacon filter */ |
| 602 | WMI_ADD_BCN_FILTER_CMDID = |
| 603 | WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER), |
| 604 | /** remove a beacon filter */ |
| 605 | WMI_RMV_BCN_FILTER_CMDID, |
| 606 | |
| 607 | /* WOW Specific WMI commands */ |
| 608 | /** add pattern for awake */ |
| 609 | WMI_WOW_ADD_WAKE_PATTERN_CMDID = |
| 610 | WMI_CMD_GRP_START_ID(WMI_GRP_WOW), |
| 611 | /** deleta a wake pattern */ |
| 612 | WMI_WOW_DEL_WAKE_PATTERN_CMDID, |
| 613 | /** enable/deisable wake event */ |
| 614 | WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 615 | /** enable WOW */ |
| 616 | WMI_WOW_ENABLE_CMDID, |
| 617 | /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */ |
| 618 | WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 619 | /* IOAC add keep alive cmd. */ |
| 620 | WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID, |
| 621 | /* IOAC del keep alive cmd. */ |
| 622 | WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID, |
| 623 | /* IOAC add pattern for awake */ |
| 624 | WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID, |
| 625 | /* IOAC deleta a wake pattern */ |
| 626 | WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID, |
| 627 | /* D0-WOW enable or disable cmd */ |
| 628 | WMI_D0_WOW_ENABLE_DISABLE_CMDID, |
| 629 | /* enable extend WoW */ |
| 630 | WMI_EXTWOW_ENABLE_CMDID, |
| 631 | /* Extend WoW command to configure app type1 parameter */ |
| 632 | WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID, |
| 633 | /* Extend WoW command to configure app type2 parameter */ |
| 634 | WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID, |
| 635 | /* enable ICMPv6 Network advertisement filtering */ |
| 636 | WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID, |
| 637 | /* |
| 638 | * Set a pattern to match UDP packet in WOW mode. |
| 639 | * If match, construct a tx frame in a local buffer |
| 640 | * to send through the peer AP to the entity in the |
| 641 | * IP network that sent the UDP packet to this STA. |
| 642 | */ |
| 643 | WMI_WOW_UDP_SVC_OFLD_CMDID, |
| 644 | |
| 645 | /* configure WOW host wakeup PIN pattern */ |
| 646 | WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID, |
| 647 | |
Anurag Chouhan | 86eab9b | 2016-04-21 16:22:47 +0530 | [diff] [blame] | 648 | /* Set which action category should wake the host from suspend */ |
| 649 | WMI_WOW_SET_ACTION_WAKE_UP_CMDID, |
| 650 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 651 | /* RTT measurement related cmd */ |
| 652 | /** request to make an RTT measurement */ |
| 653 | WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT), |
| 654 | /** request to report a tsf measurement */ |
| 655 | WMI_RTT_TSF_CMDID, |
| 656 | |
| 657 | /** spectral scan command */ |
| 658 | /** configure spectral scan */ |
| 659 | WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = |
| 660 | WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL), |
| 661 | /** enable/disable spectral scan and trigger */ |
| 662 | WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 663 | |
| 664 | /* F/W stats */ |
| 665 | /** one time request for stats */ |
| 666 | WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS), |
| 667 | /** Push MCC Adaptive Scheduler Stats to Firmware */ |
| 668 | WMI_MCC_SCHED_TRAFFIC_STATS_CMDID, |
| 669 | /** one time request for txrx stats */ |
| 670 | WMI_REQUEST_STATS_EXT_CMDID, |
| 671 | |
| 672 | /* Link Layer stats */ |
| 673 | /** Request for link layer stats */ |
| 674 | WMI_REQUEST_LINK_STATS_CMDID, |
| 675 | /** Request for setting params to link layer stats */ |
| 676 | WMI_START_LINK_STATS_CMDID, |
| 677 | /** Request to clear stats*/ |
| 678 | WMI_CLEAR_LINK_STATS_CMDID, |
| 679 | |
| 680 | /** Request for getting the Firmware Memory Dump */ |
| 681 | WMI_GET_FW_MEM_DUMP_CMDID, |
| 682 | |
| 683 | /** Request to flush of the buffered debug messages */ |
| 684 | WMI_DEBUG_MESG_FLUSH_CMDID, |
| 685 | |
| 686 | /** Cmd to configure the verbose level */ |
| 687 | WMI_DIAG_EVENT_LOG_CONFIG_CMDID, |
| 688 | |
| 689 | /** ARP OFFLOAD REQUEST*/ |
| 690 | WMI_SET_ARP_NS_OFFLOAD_CMDID = |
| 691 | WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), |
| 692 | |
| 693 | /** Proactive ARP Response Add Pattern Command*/ |
| 694 | WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 695 | |
| 696 | /** Proactive ARP Response Del Pattern Command*/ |
| 697 | WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 698 | |
| 699 | /** NS offload config*/ |
| 700 | WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = |
| 701 | WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 702 | |
| 703 | /** APFIND Config */ |
| 704 | WMI_APFIND_CMDID, |
| 705 | |
| 706 | /** Passpoint list config */ |
| 707 | WMI_PASSPOINT_LIST_CONFIG_CMDID, |
| 708 | |
| 709 | /** configure supprssing parameters for MAWC */ |
| 710 | WMI_NLO_CONFIGURE_MAWC_CMDID, |
| 711 | |
| 712 | /* GTK offload Specific WMI commands */ |
| 713 | WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 714 | |
| 715 | /* CSA offload Specific WMI commands */ |
| 716 | /** csa offload enable */ |
| 717 | WMI_CSA_OFFLOAD_ENABLE_CMDID = |
| 718 | WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 719 | /** chan switch command */ |
| 720 | WMI_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| 721 | |
| 722 | /* Chatter commands */ |
| 723 | /* Change chatter mode of operation */ |
| 724 | WMI_CHATTER_SET_MODE_CMDID = |
| 725 | WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER), |
| 726 | /** chatter add coalescing filter command */ |
| 727 | WMI_CHATTER_ADD_COALESCING_FILTER_CMDID, |
| 728 | /** chatter delete coalescing filter command */ |
| 729 | WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID, |
| 730 | /** chatter coalecing query command */ |
| 731 | WMI_CHATTER_COALESCING_QUERY_CMDID, |
| 732 | |
| 733 | /**addba specific commands */ |
| 734 | /** start the aggregation on this TID */ |
| 735 | WMI_PEER_TID_ADDBA_CMDID = |
| 736 | WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA), |
| 737 | /** stop the aggregation on this TID */ |
| 738 | WMI_PEER_TID_DELBA_CMDID, |
| 739 | |
| 740 | /** set station mimo powersave method */ |
| 741 | WMI_STA_DTIM_PS_METHOD_CMDID, |
| 742 | /** Configure the Station UAPSD AC Auto Trigger Parameters */ |
| 743 | WMI_STA_UAPSD_AUTO_TRIG_CMDID, |
| 744 | /** Configure the Keep Alive Parameters */ |
| 745 | WMI_STA_KEEPALIVE_CMDID, |
| 746 | |
| 747 | /* Request ssn from target for a sta/tid pair */ |
| 748 | WMI_BA_REQ_SSN_CMDID, |
| 749 | /* misc command group */ |
| 750 | /** echo command mainly used for testing */ |
| 751 | WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC), |
| 752 | |
| 753 | /* !!IMPORTANT!! |
| 754 | * If you need to add a new WMI command to the WMI_GRP_MISC sub-group, |
| 755 | * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID, |
| 756 | * as we MUST have a fixed value here to maintain compatibility between |
| 757 | * UTF and the ART2 driver |
| 758 | */ |
| 759 | /** UTF WMI commands */ |
| 760 | WMI_PDEV_UTF_CMDID, |
| 761 | |
| 762 | /** set debug log config */ |
| 763 | WMI_DBGLOG_CFG_CMDID, |
| 764 | /* QVIT specific command id */ |
| 765 | WMI_PDEV_QVIT_CMDID, |
| 766 | /* Factory Testing Mode request command |
| 767 | * used for integrated chipsets */ |
| 768 | WMI_PDEV_FTM_INTG_CMDID, |
| 769 | /* set and get keepalive parameters command */ |
| 770 | WMI_VDEV_SET_KEEPALIVE_CMDID, |
| 771 | WMI_VDEV_GET_KEEPALIVE_CMDID, |
| 772 | /* For fw recovery test command */ |
| 773 | WMI_FORCE_FW_HANG_CMDID, |
| 774 | /* Set Mcast/Bdcast filter */ |
| 775 | WMI_SET_MCASTBCAST_FILTER_CMDID, |
| 776 | /** set thermal management params **/ |
| 777 | WMI_THERMAL_MGMT_CMDID, |
| 778 | /** set host auto shutdown params **/ |
| 779 | WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID, |
| 780 | /** set tpc chainmask config command */ |
| 781 | WMI_TPC_CHAINMASK_CONFIG_CMDID, |
| 782 | /** set Antenna diversity command */ |
| 783 | WMI_SET_ANTENNA_DIVERSITY_CMDID, |
| 784 | /** Set OCB Sched Request, deprecated */ |
| 785 | WMI_OCB_SET_SCHED_CMDID, |
| 786 | /* Set rssi monitoring config command */ |
| 787 | WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID, |
| 788 | /* Enable/disable Large Receive Offload processing; |
| 789 | * provide cfg params */ |
| 790 | WMI_LRO_CONFIG_CMDID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 791 | /*transfer data from host to firmware to write flash */ |
| 792 | WMI_TRANSFER_DATA_TO_FLASH_CMDID, |
Sreelakshmi Konamki | 58f4d62 | 2016-04-14 18:03:21 +0530 | [diff] [blame] | 793 | /** Command to enable/disable filtering of multicast IP with unicast mac */ |
| 794 | WMI_CONFIG_ENHANCED_MCAST_FILTER_CMDID, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 795 | /** Command to control WISA mode */ |
| 796 | WMI_VDEV_WISA_CMDID, |
Himanshu Agarwal | b0497b5 | 2016-05-13 21:03:37 +0530 | [diff] [blame] | 797 | /** set debug log time stamp sync up with host */ |
| 798 | WMI_DBGLOG_TIME_STAMP_SYNC_CMDID, |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 799 | /** Command for host to set/delete multiple mcast filters */ |
| 800 | WMI_SET_MULTIPLE_MCAST_FILTER_CMDID, |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame^] | 801 | /** upload a requested section of data from firmware flash to host */ |
| 802 | WMI_READ_DATA_FROM_FLASH_CMDID, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 803 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 804 | /* GPIO Configuration */ |
| 805 | WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO), |
| 806 | WMI_GPIO_OUTPUT_CMDID, |
| 807 | |
| 808 | /* Txbf configuration command */ |
| 809 | WMI_TXBF_CMDID, |
| 810 | |
| 811 | /* FWTEST Commands */ |
| 812 | WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = |
| 813 | WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST), |
| 814 | /** set NoA descs **/ |
| 815 | WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID, |
| 816 | /* UNIT Tests */ |
| 817 | WMI_UNIT_TEST_CMDID, |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 818 | /* set debug and tuning parameters */ |
| 819 | WMI_FWTEST_CMDID, |
| 820 | /* Q-Boost configuration test commands */ |
| 821 | WMI_QBOOST_CFG_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 822 | |
| 823 | /** TDLS Configuration */ |
| 824 | /** enable/disable TDLS */ |
| 825 | WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS), |
| 826 | /** set tdls peer state */ |
| 827 | WMI_TDLS_PEER_UPDATE_CMDID, |
| 828 | /** TDLS Offchannel control */ |
| 829 | WMI_TDLS_SET_OFFCHAN_MODE_CMDID, |
| 830 | |
| 831 | /** Resmgr Configuration */ |
| 832 | /** Adaptive OCS is enabled by default in the FW. This command is used to |
| 833 | * disable FW based adaptive OCS. |
| 834 | */ |
| 835 | WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = |
| 836 | WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR), |
| 837 | /** set the requested channel time quota for the home channels */ |
| 838 | WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID, |
| 839 | /** set the requested latency for the home channels */ |
| 840 | WMI_RESMGR_SET_CHAN_LATENCY_CMDID, |
| 841 | |
| 842 | /** STA SMPS Configuration */ |
| 843 | /** force SMPS mode */ |
| 844 | WMI_STA_SMPS_FORCE_MODE_CMDID = |
| 845 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS), |
| 846 | /** set SMPS parameters */ |
| 847 | WMI_STA_SMPS_PARAM_CMDID, |
| 848 | |
| 849 | /* Wlan HB commands */ |
| 850 | /* enalbe/disable wlan HB */ |
| 851 | WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB), |
| 852 | /* set tcp parameters for wlan HB */ |
| 853 | WMI_HB_SET_TCP_PARAMS_CMDID, |
| 854 | /* set tcp pkt filter for wlan HB */ |
| 855 | WMI_HB_SET_TCP_PKT_FILTER_CMDID, |
| 856 | /* set udp parameters for wlan HB */ |
| 857 | WMI_HB_SET_UDP_PARAMS_CMDID, |
| 858 | /* set udp pkt filter for wlan HB */ |
| 859 | WMI_HB_SET_UDP_PKT_FILTER_CMDID, |
| 860 | |
| 861 | /** Wlan RMC commands*/ |
| 862 | /** enable/disable RMC */ |
| 863 | WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC), |
| 864 | /** configure action frame period */ |
| 865 | WMI_RMC_SET_ACTION_PERIOD_CMDID, |
| 866 | /** For debug/future enhancement purposes only, |
| 867 | * configures/finetunes RMC algorithms */ |
| 868 | WMI_RMC_CONFIG_CMDID, |
| 869 | |
| 870 | /** WLAN MHF offload commands */ |
| 871 | /** enable/disable MHF offload */ |
| 872 | WMI_MHF_OFFLOAD_SET_MODE_CMDID = |
| 873 | WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL), |
| 874 | /** Plumb routing table for MHF offload */ |
| 875 | WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID, |
| 876 | |
| 877 | /*location scan commands */ |
| 878 | /*start batch scan */ |
| 879 | WMI_BATCH_SCAN_ENABLE_CMDID = |
| 880 | WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 881 | /*stop batch scan */ |
| 882 | WMI_BATCH_SCAN_DISABLE_CMDID, |
| 883 | /*get batch scan result */ |
| 884 | WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID, |
| 885 | /* OEM related cmd */ |
Manikandan Mohan | 05ac7ee | 2015-12-23 14:18:36 -0800 | [diff] [blame] | 886 | WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM), |
| 887 | WMI_OEM_REQUEST_CMDID, /* UNUSED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 888 | |
| 889 | /** Nan Request */ |
| 890 | WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN), |
| 891 | |
| 892 | /** Modem power state command */ |
| 893 | WMI_MODEM_POWER_STATE_CMDID = |
| 894 | WMI_CMD_GRP_START_ID(WMI_GRP_COEX), |
| 895 | WMI_CHAN_AVOID_UPDATE_CMDID, |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 896 | WMI_COEX_CONFIG_CMDID, |
Sandeep Puligilla | ff55fec | 2016-03-09 12:54:23 -0800 | [diff] [blame] | 897 | WMI_CHAN_AVOID_RPT_ALLOW_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 898 | |
| 899 | /** |
| 900 | * OBSS scan offload enable/disable commands |
| 901 | * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true: |
| 902 | * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready, |
| 903 | * 2. STA connect to a 2.4Ghz ht20/ht40 AP, |
| 904 | * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response) |
| 905 | * If OBSS parameters from beacon changed, also use enable CMD to update parameters. |
| 906 | * OBSS scan disable CMD will send to FW if have enabled when tearing down connection. |
| 907 | */ |
| 908 | WMI_OBSS_SCAN_ENABLE_CMDID = |
| 909 | WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL), |
| 910 | WMI_OBSS_SCAN_DISABLE_CMDID, |
| 911 | |
| 912 | /**LPI commands*/ |
| 913 | /**LPI mgmt snooping config command*/ |
| 914 | WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = |
| 915 | WMI_CMD_GRP_START_ID(WMI_GRP_LPI), |
| 916 | /**LPI scan start command*/ |
| 917 | WMI_LPI_START_SCAN_CMDID, |
| 918 | /**LPI scan stop command*/ |
| 919 | WMI_LPI_STOP_SCAN_CMDID, |
| 920 | |
| 921 | /** ExtScan commands */ |
| 922 | WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 923 | WMI_EXTSCAN_STOP_CMDID, |
| 924 | WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID, |
| 925 | WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID, |
| 926 | WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID, |
| 927 | WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID, |
| 928 | WMI_EXTSCAN_SET_CAPABILITIES_CMDID, |
| 929 | WMI_EXTSCAN_GET_CAPABILITIES_CMDID, |
| 930 | WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID, |
| 931 | WMI_EXTSCAN_CONFIGURE_MAWC_CMDID, |
| 932 | |
| 933 | /** DHCP server offload commands */ |
| 934 | WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = |
| 935 | WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL), |
| 936 | |
| 937 | /** IPA Offload features related commands */ |
| 938 | WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = |
| 939 | WMI_CMD_GRP_START_ID(WMI_GRP_IPA), |
| 940 | |
| 941 | /** mDNS responder offload commands */ |
| 942 | WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 943 | WMI_MDNS_SET_FQDN_CMDID, |
| 944 | WMI_MDNS_SET_RESPONSE_CMDID, |
| 945 | WMI_MDNS_GET_STATS_CMDID, |
| 946 | |
| 947 | /* enable/disable AP Authentication offload */ |
| 948 | WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 949 | WMI_SAP_SET_BLACKLIST_PARAM_CMDID, |
| 950 | |
| 951 | /** Out-of-context-of-BSS (OCB) commands */ |
| 952 | WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB), |
| 953 | WMI_OCB_SET_UTC_TIME_CMDID, |
| 954 | WMI_OCB_START_TIMING_ADVERT_CMDID, |
| 955 | WMI_OCB_STOP_TIMING_ADVERT_CMDID, |
| 956 | WMI_OCB_GET_TSF_TIMER_CMDID, |
| 957 | WMI_DCC_GET_STATS_CMDID, |
| 958 | WMI_DCC_CLEAR_STATS_CMDID, |
| 959 | WMI_DCC_UPDATE_NDL_CMDID, |
| 960 | /* System-On-Chip commands */ |
| 961 | WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC), |
| 962 | WMI_SOC_SET_HW_MODE_CMDID, |
| 963 | WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID, |
| 964 | WMI_SOC_SET_ANTENNA_MODE_CMDID, |
| 965 | |
| 966 | /* packet filter commands */ |
| 967 | WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER), |
| 968 | WMI_PACKET_FILTER_ENABLE_CMDID, |
| 969 | /** Motion Aided WiFi Connectivity (MAWC) commands */ |
| 970 | WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC), |
| 971 | |
| 972 | /** WMI commands related to PMF 11w Offload */ |
| 973 | WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = |
| 974 | WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD), |
| 975 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 976 | /** WMI commands related to pkt filter (BPF) offload */ |
| 977 | WMI_BPF_GET_CAPABILITY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_BPF_OFFLOAD), |
| 978 | WMI_BPF_GET_VDEV_STATS_CMDID, |
| 979 | WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID, |
| 980 | WMI_BPF_DEL_VDEV_INSTRUCTIONS_CMDID, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 981 | /** |
| 982 | * Nan Data commands |
| 983 | * NDI - NAN Data Interface |
| 984 | * NDP - NAN Data Path |
| 985 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 986 | /* Commands in prototyping phase */ |
| 987 | 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] | 988 | WMI_NDP_INITIATOR_REQ_CMDID, |
| 989 | WMI_NDP_RESPONDER_REQ_CMDID, |
| 990 | WMI_NDP_END_REQ_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 991 | } WMI_CMD_ID; |
| 992 | |
| 993 | typedef enum { |
| 994 | /** WMI service is ready; after this event WMI messages can be sent/received */ |
| 995 | WMI_SERVICE_READY_EVENTID = 0x1, |
| 996 | /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */ |
| 997 | WMI_READY_EVENTID, |
| 998 | |
| 999 | /** Scan specific events */ |
| 1000 | WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), |
| 1001 | |
| 1002 | /* PDEV specific events */ |
| 1003 | /** TPC config for the current operating channel */ |
| 1004 | WMI_PDEV_TPC_CONFIG_EVENTID = |
| 1005 | WMI_EVT_GRP_START_ID(WMI_GRP_PDEV), |
| 1006 | /** Channel stats event */ |
| 1007 | WMI_CHAN_INFO_EVENTID, |
| 1008 | |
| 1009 | /** PHY Error specific WMI event */ |
| 1010 | WMI_PHYERR_EVENTID, |
| 1011 | |
| 1012 | /** eeprom dump event */ |
| 1013 | WMI_PDEV_DUMP_EVENTID, |
| 1014 | |
| 1015 | /** traffic pause event */ |
| 1016 | WMI_TX_PAUSE_EVENTID, |
| 1017 | |
| 1018 | /** DFS radar event */ |
| 1019 | WMI_DFS_RADAR_EVENTID, |
| 1020 | |
| 1021 | /** track L1SS entry and residency event */ |
| 1022 | WMI_PDEV_L1SS_TRACK_EVENTID, |
| 1023 | |
| 1024 | /** Report current temprature of the chip in Celcius degree */ |
| 1025 | WMI_PDEV_TEMPERATURE_EVENTID, |
| 1026 | |
| 1027 | /* Extension of WMI_SERVICE_READY msg with |
| 1028 | * extra target capability info |
| 1029 | */ |
| 1030 | WMI_SERVICE_READY_EXT_EVENTID, |
| 1031 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1032 | /** FIPS test mode event */ |
| 1033 | WMI_PDEV_FIPS_EVENTID, |
| 1034 | |
| 1035 | /** Channel hopping avoidance */ |
| 1036 | WMI_PDEV_CHANNEL_HOPPING_EVENTID, |
| 1037 | |
| 1038 | /** CCK ANI level event */ |
| 1039 | WMI_PDEV_ANI_CCK_LEVEL_EVENTID, |
| 1040 | |
| 1041 | /** OFDM ANI level event */ |
| 1042 | WMI_PDEV_ANI_OFDM_LEVEL_EVENTID, |
| 1043 | |
| 1044 | /** Tx PPDU params */ |
| 1045 | WMI_PDEV_TPC_EVENTID, |
| 1046 | |
| 1047 | /** NF Cal Power in DBR/DBM for all channels */ |
| 1048 | WMI_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID, |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 1049 | |
| 1050 | /** SOC/PDEV events */ |
| 1051 | WMI_PDEV_SET_HW_MODE_RESP_EVENTID, |
| 1052 | WMI_PDEV_HW_MODE_TRANSITION_EVENTID, |
| 1053 | WMI_PDEV_SET_MAC_CONFIG_RESP_EVENTID, |
| 1054 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1055 | /* VDEV specific events */ |
| 1056 | /** VDEV started event in response to VDEV_START request */ |
| 1057 | WMI_VDEV_START_RESP_EVENTID = |
| 1058 | WMI_EVT_GRP_START_ID(WMI_GRP_VDEV), |
| 1059 | /** vdev stopped event , generated in response to VDEV_STOP request */ |
| 1060 | WMI_VDEV_STOPPED_EVENTID, |
| 1061 | /* Indicate the set key (used for setting per |
| 1062 | * peer unicast and per vdev multicast) |
| 1063 | * operation has completed */ |
| 1064 | WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID, |
| 1065 | /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please |
| 1066 | don't use this for any new implementations */ |
| 1067 | /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario. |
| 1068 | This request is valid only for vdevs operating in soft AP or P2P GO mode */ |
| 1069 | WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID, |
| 1070 | |
| 1071 | /* Return the TSF timestamp of specified vdev */ |
| 1072 | WMI_VDEV_TSF_REPORT_EVENTID, |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 1073 | |
| 1074 | /* FW response to Host for vdev delete cmdid */ |
| 1075 | WMI_VDEV_DELETE_RESP_EVENTID, |
| 1076 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1077 | /* peer specific events */ |
| 1078 | /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ |
| 1079 | WMI_PEER_STA_KICKOUT_EVENTID = |
| 1080 | WMI_EVT_GRP_START_ID(WMI_GRP_PEER), |
| 1081 | |
| 1082 | /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */ |
| 1083 | WMI_PEER_INFO_EVENTID, |
| 1084 | |
| 1085 | /** Event indicating that TX fail count reaching threshold */ |
| 1086 | WMI_PEER_TX_FAIL_CNT_THR_EVENTID, |
| 1087 | /** Return the estimate link speed for the Peer specified in the |
| 1088 | * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command. |
| 1089 | */ |
| 1090 | WMI_PEER_ESTIMATED_LINKSPEED_EVENTID, |
| 1091 | /* Return the peer state |
| 1092 | * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE |
| 1093 | */ |
| 1094 | WMI_PEER_STATE_EVENTID, |
| 1095 | |
| 1096 | /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD. |
| 1097 | * After that, host will send Mx message. |
| 1098 | * Otherwise, host will pause any Mx(STA:M2/M4) message |
| 1099 | */ |
| 1100 | WMI_PEER_ASSOC_CONF_EVENTID, |
| 1101 | |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 1102 | /* FW response to Host for peer delete cmdid */ |
| 1103 | WMI_PEER_DELETE_RESP_EVENTID, |
| 1104 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1105 | /** Valid rate code list for peer */ |
| 1106 | WMI_PEER_RATECODE_LIST_EVENTID, |
| 1107 | WMI_WDS_PEER_EVENTID, |
| 1108 | WMI_PEER_STA_PS_STATECHG_EVENTID, |
| 1109 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1110 | /* beacon/mgmt specific events */ |
| 1111 | /** RX management frame. the entire frame is carried along with the event. */ |
| 1112 | WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT), |
| 1113 | /** software beacon alert event to Host requesting host to Queue a beacon for transmission |
| 1114 | use only in host beacon mode */ |
| 1115 | WMI_HOST_SWBA_EVENTID, |
| 1116 | /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value. |
| 1117 | tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in |
| 1118 | staggered beacon transmission mode */ |
| 1119 | WMI_TBTTOFFSET_UPDATE_EVENTID, |
| 1120 | |
| 1121 | /** event after the first beacon is transmitted following |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1122 | a change in the template.*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1123 | WMI_OFFLOAD_BCN_TX_STATUS_EVENTID, |
| 1124 | /** event after the first probe response is transmitted following |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1125 | a change in the template.*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1126 | WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID, |
| 1127 | /** Event for Mgmt TX completion event */ |
| 1128 | WMI_MGMT_TX_COMPLETION_EVENTID, |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 1129 | /** Event for Mgmt TX bundle completion event */ |
| 1130 | WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID, |
| 1131 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1132 | |
| 1133 | /*ADDBA Related WMI Events */ |
| 1134 | /** Indication the completion of the prior |
| 1135 | WMI_PEER_TID_DELBA_CMDID(initiator) */ |
| 1136 | WMI_TX_DELBA_COMPLETE_EVENTID = |
| 1137 | WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG), |
| 1138 | /** Indication the completion of the prior |
| 1139 | *WMI_PEER_TID_ADDBA_CMDID(initiator) */ |
| 1140 | WMI_TX_ADDBA_COMPLETE_EVENTID, |
| 1141 | |
| 1142 | /* Seq num returned from hw for a sta/tid pair */ |
| 1143 | WMI_BA_RSP_SSN_EVENTID, |
| 1144 | |
| 1145 | /* Aggregation state requested by BTC */ |
| 1146 | WMI_AGGR_STATE_TRIG_EVENTID, |
| 1147 | |
| 1148 | /** Roam event to trigger roaming on host */ |
| 1149 | WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM), |
| 1150 | |
| 1151 | /** matching AP found from list of profiles */ |
| 1152 | WMI_PROFILE_MATCH, |
| 1153 | /** roam synch event */ |
| 1154 | WMI_ROAM_SYNCH_EVENTID, |
| 1155 | |
| 1156 | /** P2P disc found */ |
| 1157 | WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1158 | /*send noa info to host when noa is changed for beacon tx offload enable */ |
| 1159 | WMI_P2P_NOA_EVENTID, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 1160 | /** send p2p listen offload stopped event with different reason */ |
| 1161 | WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1162 | |
| 1163 | /** Send EGAP Info to host */ |
| 1164 | WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS), |
| 1165 | |
| 1166 | /* send pdev resume event to host after pdev resume. */ |
| 1167 | WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND), |
| 1168 | |
| 1169 | /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. |
| 1170 | will cary wake reason */ |
| 1171 | WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW), |
| 1172 | WMI_D0_WOW_DISABLE_ACK_EVENTID, |
| 1173 | WMI_WOW_INITIAL_WAKEUP_EVENTID, |
| 1174 | |
| 1175 | /*RTT related event ID */ |
| 1176 | /** RTT measurement report */ |
| 1177 | WMI_RTT_MEASUREMENT_REPORT_EVENTID = |
| 1178 | WMI_EVT_GRP_START_ID(WMI_GRP_RTT), |
| 1179 | /** TSF measurement report */ |
| 1180 | WMI_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1181 | /** RTT error report */ |
| 1182 | WMI_RTT_ERROR_REPORT_EVENTID, |
| 1183 | /*STATS specific events */ |
| 1184 | /** txrx stats event requested by host */ |
| 1185 | WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS), |
| 1186 | /** FW iface link stats Event */ |
| 1187 | WMI_IFACE_LINK_STATS_EVENTID, |
| 1188 | /** FW iface peer link stats Event */ |
| 1189 | WMI_PEER_LINK_STATS_EVENTID, |
| 1190 | /** FW Update radio stats Event */ |
| 1191 | WMI_RADIO_LINK_STATS_EVENTID, |
| 1192 | /** Firmware memory dump Complete event*/ |
| 1193 | WMI_UPDATE_FW_MEM_DUMP_EVENTID, |
| 1194 | |
| 1195 | /** Event indicating the DIAG logs/events supported by FW */ |
| 1196 | WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID, |
| 1197 | |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 1198 | /** Instantaneous RSSI event */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 1199 | WMI_INST_RSSI_STATS_EVENTID, |
| 1200 | |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 1201 | /** FW update tx power levels event */ |
| 1202 | WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID, |
| 1203 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1204 | /** NLO specific events */ |
| 1205 | /** NLO match event after the first match */ |
| 1206 | WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 1207 | |
| 1208 | /** NLO scan complete event */ |
| 1209 | WMI_NLO_SCAN_COMPLETE_EVENTID, |
| 1210 | |
| 1211 | /** APFIND specific events */ |
| 1212 | WMI_APFIND_EVENTID, |
| 1213 | |
| 1214 | /** passpoint network match event */ |
| 1215 | WMI_PASSPOINT_MATCH_EVENTID, |
| 1216 | |
| 1217 | /** GTK offload stautus event requested by host */ |
| 1218 | WMI_GTK_OFFLOAD_STATUS_EVENTID = |
| 1219 | WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 1220 | |
| 1221 | /** GTK offload failed to rekey event */ |
| 1222 | WMI_GTK_REKEY_FAIL_EVENTID, |
| 1223 | /* CSA IE received event */ |
| 1224 | WMI_CSA_HANDLING_EVENTID = |
| 1225 | WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 1226 | |
| 1227 | /*chatter query reply event */ |
| 1228 | WMI_CHATTER_PC_QUERY_EVENTID = |
| 1229 | WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER), |
| 1230 | |
| 1231 | /** echo event in response to echo command */ |
| 1232 | WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC), |
| 1233 | |
| 1234 | /* !!IMPORTANT!! |
| 1235 | * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group, |
| 1236 | * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID, |
| 1237 | * as we MUST have a fixed value here to maintain compatibility between |
| 1238 | * UTF and the ART2 driver |
| 1239 | */ |
| 1240 | /** UTF specific WMI event */ |
| 1241 | WMI_PDEV_UTF_EVENTID, |
| 1242 | |
| 1243 | /** event carries buffered debug messages */ |
| 1244 | WMI_DEBUG_MESG_EVENTID, |
| 1245 | /** FW stats(periodic or on shot) */ |
| 1246 | WMI_UPDATE_STATS_EVENTID, |
| 1247 | /** debug print message used for tracing FW code while debugging */ |
| 1248 | WMI_DEBUG_PRINT_EVENTID, |
| 1249 | /** DCS wlan or non-wlan interference event |
| 1250 | */ |
| 1251 | WMI_DCS_INTERFERENCE_EVENTID, |
| 1252 | /** VI spoecific event */ |
| 1253 | WMI_PDEV_QVIT_EVENTID, |
| 1254 | /** FW code profile data in response to profile request */ |
| 1255 | WMI_WLAN_PROFILE_DATA_EVENTID, |
| 1256 | /* Factory Testing Mode request event |
| 1257 | * used for integrated chipsets */ |
| 1258 | WMI_PDEV_FTM_INTG_EVENTID, |
| 1259 | /* avoid list of frequencies . |
| 1260 | */ |
| 1261 | WMI_WLAN_FREQ_AVOID_EVENTID, |
| 1262 | /* Indicate the keepalive parameters */ |
| 1263 | WMI_VDEV_GET_KEEPALIVE_EVENTID, |
| 1264 | /* Thermal Management event */ |
| 1265 | WMI_THERMAL_MGMT_EVENTID, |
| 1266 | |
| 1267 | /* Container for QXDM/DIAG events */ |
| 1268 | WMI_DIAG_DATA_CONTAINER_EVENTID, |
| 1269 | |
| 1270 | /* host auto shutdown event */ |
| 1271 | WMI_HOST_AUTO_SHUTDOWN_EVENTID, |
| 1272 | |
| 1273 | /*update mib counters together with WMI_UPDATE_STATS_EVENTID */ |
| 1274 | WMI_UPDATE_WHAL_MIB_STATS_EVENTID, |
| 1275 | |
| 1276 | /*update ht/vht info based on vdev (rx and tx NSS and preamble) */ |
| 1277 | WMI_UPDATE_VDEV_RATE_STATS_EVENTID, |
| 1278 | |
| 1279 | WMI_DIAG_EVENTID, |
| 1280 | |
| 1281 | /** Set OCB Sched Response, deprecated */ |
| 1282 | WMI_OCB_SET_SCHED_EVENTID, |
| 1283 | |
| 1284 | /* event to indicate the flush of the buffered debug messages is complete*/ |
| 1285 | WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID, |
| 1286 | /* event to report mix/max RSSI breach events */ |
| 1287 | WMI_RSSI_BREACH_EVENTID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 1288 | /* event to report completion of data storage into flash memory */ |
| 1289 | WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1290 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 1291 | /** event to report SCPC calibrated data to host */ |
| 1292 | WMI_PDEV_UTF_SCPC_EVENTID, |
| 1293 | |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame^] | 1294 | /** event to provide requested data from the target's flash memory */ |
| 1295 | WMI_READ_DATA_FROM_FLASH_EVENTID, |
| 1296 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1297 | /* GPIO Event */ |
| 1298 | WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), |
| 1299 | /** upload H_CV info WMI event |
| 1300 | * to indicate uploaded H_CV info to host |
| 1301 | */ |
| 1302 | WMI_UPLOADH_EVENTID, |
| 1303 | |
| 1304 | /** capture H info WMI event |
| 1305 | * to indicate captured H info to host |
| 1306 | */ |
| 1307 | WMI_CAPTUREH_EVENTID, |
| 1308 | /* hw RFkill */ |
| 1309 | WMI_RFKILL_STATE_CHANGE_EVENTID, |
| 1310 | |
| 1311 | /* TDLS Event */ |
| 1312 | WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS), |
| 1313 | |
Manikandan Mohan | 55c94d6 | 2015-12-04 13:47:58 -0800 | [diff] [blame] | 1314 | /* STA SMPS Event */ |
| 1315 | /* force SMPS mode */ |
| 1316 | WMI_STA_SMPS_FORCE_MODE_COMPLETE_EVENTID = |
| 1317 | WMI_EVT_GRP_START_ID(WMI_GRP_STA_SMPS), |
| 1318 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1319 | /*location scan event */ |
| 1320 | /*report the firmware's capability of batch scan */ |
| 1321 | WMI_BATCH_SCAN_ENABLED_EVENTID = |
| 1322 | WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 1323 | /*batch scan result */ |
| 1324 | WMI_BATCH_SCAN_RESULT_EVENTID, |
| 1325 | /* OEM Event */ |
Krishna Kumaar Natarajan | 1dfa353 | 2015-11-19 16:16:20 -0800 | [diff] [blame] | 1326 | WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */ |
| 1327 | WMI_EVT_GRP_START_ID(WMI_GRP_OEM), |
| 1328 | WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */ |
| 1329 | WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */ |
| 1330 | WMI_OEM_RESPONSE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1331 | |
| 1332 | /* NAN Event */ |
| 1333 | WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN), |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1334 | WMI_NAN_DISC_IFACE_CREATED_EVENTID, |
| 1335 | WMI_NAN_DISC_IFACE_DELETED_EVENTID, |
| 1336 | WMI_NAN_STARTED_CLUSTER_EVENTID, |
| 1337 | WMI_NAN_JOINED_CLUSTER_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1338 | |
| 1339 | /* LPI Event */ |
| 1340 | WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI), |
| 1341 | WMI_LPI_STATUS_EVENTID, |
| 1342 | WMI_LPI_HANDOFF_EVENTID, |
| 1343 | |
| 1344 | /* ExtScan events */ |
| 1345 | WMI_EXTSCAN_START_STOP_EVENTID = |
| 1346 | WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 1347 | WMI_EXTSCAN_OPERATION_EVENTID, |
| 1348 | WMI_EXTSCAN_TABLE_USAGE_EVENTID, |
| 1349 | WMI_EXTSCAN_CACHED_RESULTS_EVENTID, |
| 1350 | WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID, |
| 1351 | WMI_EXTSCAN_HOTLIST_MATCH_EVENTID, |
| 1352 | WMI_EXTSCAN_CAPABILITIES_EVENTID, |
| 1353 | WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID, |
| 1354 | |
| 1355 | /* mDNS offload events */ |
| 1356 | WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 1357 | |
| 1358 | /* SAP Authentication offload events */ |
| 1359 | WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 1360 | WMI_SAP_OFL_DEL_STA_EVENTID, |
| 1361 | |
| 1362 | /** Out-of-context-of-bss (OCB) events */ |
| 1363 | WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB), |
| 1364 | WMI_OCB_GET_TSF_TIMER_RESP_EVENTID, |
| 1365 | WMI_DCC_GET_STATS_RESP_EVENTID, |
| 1366 | WMI_DCC_UPDATE_NDL_RESP_EVENTID, |
| 1367 | WMI_DCC_STATS_EVENTID, |
| 1368 | /* System-On-Chip events */ |
| 1369 | WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC), |
| 1370 | WMI_SOC_HW_MODE_TRANSITION_EVENTID, |
| 1371 | WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID, |
| 1372 | /** Motion Aided WiFi Connectivity (MAWC) events */ |
| 1373 | WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC), |
| 1374 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 1375 | /** pkt filter (BPF) offload relevant events */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 1376 | 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] | 1377 | WMI_BPF_VDEV_STATS_INFO_EVENTID, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1378 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 1379 | /* Events in Prototyping phase */ |
| 1380 | 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] | 1381 | WMI_NDP_INITIATOR_RSP_EVENTID, |
| 1382 | WMI_NDP_RESPONDER_RSP_EVENTID, |
| 1383 | WMI_NDP_END_RSP_EVENTID, |
| 1384 | WMI_NDP_INDICATION_EVENTID, |
| 1385 | WMI_NDP_CONFIRM_EVENTID, |
| 1386 | WMI_NDP_END_INDICATION_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1387 | } WMI_EVT_ID; |
| 1388 | |
| 1389 | /* defines for OEM message sub-types */ |
| 1390 | #define WMI_OEM_CAPABILITY_REQ 0x01 |
| 1391 | #define WMI_OEM_CAPABILITY_RSP 0x02 |
| 1392 | #define WMI_OEM_MEASUREMENT_REQ 0x03 |
| 1393 | #define WMI_OEM_MEASUREMENT_RSP 0x04 |
| 1394 | #define WMI_OEM_ERROR_REPORT_RSP 0x05 |
| 1395 | #define WMI_OEM_NAN_MEAS_REQ 0x06 |
| 1396 | #define WMI_OEM_NAN_MEAS_RSP 0x07 |
| 1397 | #define WMI_OEM_NAN_PEER_INFO 0x08 |
| 1398 | #define WMI_OEM_CONFIGURE_LCR 0x09 |
| 1399 | #define WMI_OEM_CONFIGURE_LCI 0x0A |
| 1400 | |
| 1401 | /* below message subtype is internal to CLD. Target should |
| 1402 | * never use internal response type |
| 1403 | */ |
| 1404 | #define WMI_OEM_INTERNAL_RSP 0xdeadbeef |
| 1405 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 1406 | #define WMI_CHAN_LIST_TAG 0x1 |
| 1407 | #define WMI_SSID_LIST_TAG 0x2 |
| 1408 | #define WMI_BSSID_LIST_TAG 0x3 |
| 1409 | #define WMI_IE_TAG 0x4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1410 | |
| 1411 | typedef struct { |
| 1412 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */ |
| 1413 | /** primary 20 MHz channel frequency in mhz */ |
| 1414 | A_UINT32 mhz; |
| 1415 | /** Center frequency 1 in MHz*/ |
| 1416 | A_UINT32 band_center_freq1; |
| 1417 | /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ |
| 1418 | A_UINT32 band_center_freq2; |
| 1419 | /** channel info described below */ |
| 1420 | A_UINT32 info; |
| 1421 | /** contains min power, max power, reg power and reg class id. */ |
| 1422 | A_UINT32 reg_info_1; |
| 1423 | /** contains antennamax */ |
| 1424 | A_UINT32 reg_info_2; |
| 1425 | } wmi_channel; |
| 1426 | |
| 1427 | typedef enum { |
| 1428 | WMI_CHANNEL_CHANGE_CAUSE_NONE = 0, |
| 1429 | WMI_CHANNEL_CHANGE_CAUSE_CSA, |
| 1430 | } wmi_channel_change_cause; |
| 1431 | |
| 1432 | /** channel info consists of 6 bits of channel mode */ |
| 1433 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1434 | #define WMI_SET_CHANNEL_MODE(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1435 | (pwmi_channel)->info &= 0xffffffc0; \ |
| 1436 | (pwmi_channel)->info |= (val); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1437 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1438 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1439 | #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1440 | |
| 1441 | #define WMI_CHAN_FLAG_HT40_PLUS 6 |
| 1442 | #define WMI_CHAN_FLAG_PASSIVE 7 |
| 1443 | #define WMI_CHAN_ADHOC_ALLOWED 8 |
| 1444 | #define WMI_CHAN_AP_DISABLED 9 |
| 1445 | #define WMI_CHAN_FLAG_DFS 10 |
| 1446 | #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */ |
| 1447 | #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */ |
| 1448 | #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */ |
| 1449 | #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */ |
| 1450 | #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 1451 | /* Enable radar event reporting for sec80 in VHT80p80 */ |
| 1452 | #define WMI_CHAN_FLAG_DFS_CFREQ2 16 |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1453 | #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] | 1454 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1455 | #define WMI_SET_CHANNEL_FLAG(pwmi_channel, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1456 | (pwmi_channel)->info |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1457 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1458 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1459 | #define WMI_GET_CHANNEL_FLAG(pwmi_channel, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1460 | (((pwmi_channel)->info & (1 << flag)) >> flag) |
| 1461 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1462 | #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1463 | (pwmi_channel)->reg_info_1 &= 0xffffff00; \ |
| 1464 | (pwmi_channel)->reg_info_1 |= (val&0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1465 | } while (0) |
| 1466 | #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] | 1467 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1468 | #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1469 | (pwmi_channel)->reg_info_1 &= 0xffff00ff; \ |
| 1470 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1471 | } while (0) |
| 1472 | #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] | 1473 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1474 | #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1475 | (pwmi_channel)->reg_info_1 &= 0xff00ffff; \ |
| 1476 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1477 | } while (0) |
| 1478 | #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_1) >> 16) & 0xff) |
| 1479 | #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1480 | (pwmi_channel)->reg_info_1 &= 0x00ffffff; \ |
| 1481 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1482 | } while (0) |
| 1483 | #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] | 1484 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1485 | #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1486 | (pwmi_channel)->reg_info_2 &= 0xffffff00; \ |
| 1487 | (pwmi_channel)->reg_info_2 |= (val&0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1488 | } while (0) |
| 1489 | #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] | 1490 | |
| 1491 | /* max tx power is in 1 dBm units */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1492 | #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1493 | (pwmi_channel)->reg_info_2 &= 0xffff00ff; \ |
| 1494 | (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1495 | } while (0) |
| 1496 | #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] | 1497 | |
| 1498 | |
| 1499 | /** HT Capabilities*/ |
| 1500 | #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ |
| 1501 | #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */ |
| 1502 | #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ |
| 1503 | #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ |
| 1504 | #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3 |
| 1505 | #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ |
| 1506 | #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4 |
| 1507 | #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */ |
| 1508 | #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ |
| 1509 | #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
| 1510 | #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
| 1511 | #define WMI_HT_CAP_HT40_SGI 0x0800 |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1512 | #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */ |
| 1513 | #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1514 | |
| 1515 | /* These macros should be used when we wish to advertise STBC support for |
| 1516 | * only 1SS or 2SS or 3SS. */ |
| 1517 | #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ |
| 1518 | #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ |
| 1519 | #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ |
| 1520 | |
| 1521 | #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ |
| 1522 | WMI_HT_CAP_HT20_SGI | \ |
| 1523 | WMI_HT_CAP_HT40_SGI | \ |
| 1524 | WMI_HT_CAP_TX_STBC | \ |
| 1525 | WMI_HT_CAP_RX_STBC | \ |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1526 | WMI_HT_CAP_LDPC | \ |
| 1527 | WMI_HT_CAP_TX_LDPC | \ |
| 1528 | WMI_HT_CAP_RX_LDPC) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1529 | |
| 1530 | /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information |
| 1531 | field. The fields not defined here are not supported, or reserved. |
| 1532 | Do not change these masks and if you have to add new one follow the |
| 1533 | bitmask as specified by 802.11ac draft. |
| 1534 | */ |
| 1535 | |
| 1536 | #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001 |
| 1537 | #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 |
| 1538 | #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 |
| 1539 | #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004 |
| 1540 | #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008 |
| 1541 | #define WMI_VHT_CAP_RX_LDPC 0x00000010 |
| 1542 | #define WMI_VHT_CAP_SGI_80MHZ 0x00000020 |
| 1543 | #define WMI_VHT_CAP_SGI_160MHZ 0x00000040 |
| 1544 | #define WMI_VHT_CAP_TX_STBC 0x00000080 |
| 1545 | #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300 |
| 1546 | #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8 |
| 1547 | #define WMI_VHT_CAP_SU_BFORMER 0x00000800 |
| 1548 | #define WMI_VHT_CAP_SU_BFORMEE 0x00001000 |
| 1549 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 |
| 1550 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 |
| 1551 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 |
| 1552 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 |
| 1553 | #define WMI_VHT_CAP_MU_BFORMER 0x00080000 |
| 1554 | #define WMI_VHT_CAP_MU_BFORMEE 0x00100000 |
| 1555 | #define WMI_VHT_CAP_TXOP_PS 0x00200000 |
| 1556 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 |
| 1557 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23 |
| 1558 | #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000 |
| 1559 | #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000 |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1560 | #define WMI_VHT_CAP_TX_LDPC 0x40000000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1561 | |
| 1562 | /* TEMPORARY: |
| 1563 | * Preserve the incorrect old name as an alias for the correct new name |
| 1564 | * until all references to the old name have been removed from all hosts |
| 1565 | * and targets. |
| 1566 | */ |
| 1567 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT |
| 1568 | |
| 1569 | /* These macros should be used when we wish to advertise STBC support for |
| 1570 | * only 1SS or 2SS or 3SS. */ |
| 1571 | #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100 |
| 1572 | #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200 |
| 1573 | #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300 |
| 1574 | |
| 1575 | /* TEMPORARY: |
| 1576 | * Preserve the incorrect old name as an alias for the correct new name |
| 1577 | * until all references to the old name have been removed from all hosts |
| 1578 | * and targets. |
| 1579 | */ |
| 1580 | #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS |
| 1581 | |
| 1582 | #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \ |
| 1583 | WMI_VHT_CAP_SGI_80MHZ | \ |
| 1584 | WMI_VHT_CAP_TX_STBC | \ |
| 1585 | WMI_VHT_CAP_RX_STBC_MASK | \ |
| 1586 | WMI_VHT_CAP_RX_LDPC | \ |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 1587 | WMI_VHT_CAP_TX_LDPC | \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1588 | WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \ |
| 1589 | WMI_VHT_CAP_RX_FIXED_ANT | \ |
| 1590 | WMI_VHT_CAP_TX_FIXED_ANT) |
| 1591 | |
| 1592 | /* Interested readers refer to Rx/Tx MCS Map definition as defined in |
| 1593 | 802.11ac |
| 1594 | */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 1595 | #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] | 1596 | #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 |
| 1597 | #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 |
| 1598 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1599 | /** 11ax capabilities */ |
| 1600 | #define WMI_HE_CAP_PPE_PRESENT 0x00000001 |
| 1601 | #define WMI_HE_CAP_TWT_RESPONDER_SUPPORT 0x00000002 |
| 1602 | #define WMI_HE_CAP_TWT_REQUESTER_SUPPORT 0x00000004 |
| 1603 | #define WMI_HE_FRAG_SUPPORT_MASK 0x00000018 |
| 1604 | #define WMI_HE_FRAG_SUPPORT_SHIFT 3 |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 1605 | |
| 1606 | |
| 1607 | /* fragmentation support field value */ |
| 1608 | enum { |
| 1609 | WMI_HE_FRAG_SUPPORT_LEVEL0, /* No Fragmentation support */ |
| 1610 | /* |
| 1611 | * support for fragments within a VHT single MPDU, |
| 1612 | * no support for fragments within AMPDU |
| 1613 | */ |
| 1614 | WMI_HE_FRAG_SUPPORT_LEVEL1, |
| 1615 | /* support for up to 1 fragment per MSDU within a single A-MPDU */ |
| 1616 | WMI_HE_FRAG_SUPPORT_LEVEL2, |
| 1617 | /* support for multiple fragments per MSDU within an A-MPDU */ |
| 1618 | WMI_HE_FRAG_SUPPORT_LEVEL3, |
| 1619 | }; |
| 1620 | |
| 1621 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1622 | /** NOTE: This defs cannot be changed in the future without |
| 1623 | * breaking WMI compatibility |
| 1624 | */ |
| 1625 | #define WMI_MAX_NUM_SS 8 |
| 1626 | #define WMI_MAX_NUM_RU 4 |
| 1627 | |
| 1628 | /* |
| 1629 | * Figure 8 554ae: -PPE Threshold Info field format |
| 1630 | * we pack PPET16 and PPT8 for four RU's in one element of array. |
| 1631 | * |
| 1632 | * ppet16_ppet8_ru3_ru0 array element 0 holds: |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1633 | * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1634 | *rsvd |NSS1,RU4|NSS1,RU4|NSS1,RU3|NSS1,RU3|NSS1,RU2|NSS1,RU2|NSS1,RU1|NSS1,RU1| |
| 1635 | *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 | |
| 1636 | * |
| 1637 | * ppet16_ppet8_ru3_ru0 array element 1 holds: |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1638 | * | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | PPET8 | PPET16 | |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1639 | *rsvd |NSS2,RU4|NSS2,RU4|NSS2,RU3|NSS2,RU3|NSS2,RU2|NSS2,RU2|NSS2,RU1|NSS2,RU1| |
| 1640 | *31:23| 22:20 | 19:17 | 17:15 | 14:12 | 11:9 | 8:6 | 5:3 | 2:0 | |
| 1641 | * |
| 1642 | * etc. |
| 1643 | */ |
| 1644 | |
| 1645 | /* |
| 1646 | * Note that in these macros, "ru" is one-based, not zero-based, while |
| 1647 | * nssm1 is zero-based. |
| 1648 | */ |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1649 | #define WMI_SET_PPET16(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1650 | do { \ |
| 1651 | ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6)); \ |
| 1652 | ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6)); \ |
| 1653 | } while (0) |
| 1654 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1655 | #define WMI_GET_PPET16(ppet16_ppet8_ru3_ru0, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1656 | ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6))&7) |
| 1657 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1658 | #define WMI_SET_PPET8(ppet16_ppet8_ru3_ru0, ppet, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1659 | do { \ |
| 1660 | ppet16_ppet8_ru3_ru0[nssm1] &= ~(7 << (((ru-1)%4)*6+3)); \ |
| 1661 | ppet16_ppet8_ru3_ru0[nssm1] |= ((ppet&7) << (((ru-1)%4)*6+3)); \ |
| 1662 | } while (0) |
| 1663 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 1664 | #define WMI_GET_PPET8(ppet16_ppet8_ru3_ru0, ru, nssm1) \ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1665 | ((ppet16_ppet8_ru3_ru0[nssm1] >> (((ru-1)%4)*6+3))&7) |
| 1666 | |
| 1667 | typedef struct _wmi_ppe_threshold { |
| 1668 | A_UINT32 numss_m1; /** NSS - 1*/ |
| 1669 | A_UINT32 ru_count; /** Max RU count */ |
| 1670 | /** ppet8 and ppet16 for max num ss */ |
| 1671 | A_UINT32 ppet16_ppet8_ru3_ru0[WMI_MAX_NUM_SS]; |
| 1672 | } wmi_ppe_threshold; |
| 1673 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1674 | /* WMI_SYS_CAPS_* refer to the capabilities that system support |
| 1675 | */ |
| 1676 | #define WMI_SYS_CAP_ENABLE 0x00000001 |
| 1677 | #define WMI_SYS_CAP_TXPOWER 0x00000002 |
| 1678 | |
| 1679 | /* |
| 1680 | * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions. |
| 1681 | * Bits 5:0 are reserved |
| 1682 | */ |
| 1683 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28) |
| 1684 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24) |
| 1685 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20) |
| 1686 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16) |
| 1687 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12) |
| 1688 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8) |
| 1689 | #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7) |
| 1690 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6) |
| 1691 | |
| 1692 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1693 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1694 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1695 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1696 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1697 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1698 | #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1699 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1700 | |
| 1701 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \ |
| 1702 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value) |
| 1703 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \ |
| 1704 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value) |
| 1705 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \ |
| 1706 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value) |
| 1707 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \ |
| 1708 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value) |
| 1709 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \ |
| 1710 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value) |
| 1711 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \ |
| 1712 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value) |
| 1713 | #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \ |
| 1714 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value) |
| 1715 | #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \ |
| 1716 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value) |
| 1717 | |
| 1718 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \ |
| 1719 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1720 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \ |
| 1721 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1722 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \ |
| 1723 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1724 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \ |
| 1725 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1726 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \ |
| 1727 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1728 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \ |
| 1729 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1730 | #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \ |
| 1731 | ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1732 | #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \ |
| 1733 | ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1734 | |
| 1735 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31) |
| 1736 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30) |
| 1737 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29) |
| 1738 | |
| 1739 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1740 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1741 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1742 | |
| 1743 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \ |
| 1744 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value) |
| 1745 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \ |
| 1746 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value) |
| 1747 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \ |
| 1748 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value) |
| 1749 | |
| 1750 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \ |
| 1751 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1752 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \ |
| 1753 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1754 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \ |
| 1755 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1756 | |
| 1757 | #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31) |
| 1758 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30) |
| 1759 | |
| 1760 | #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1761 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1762 | |
| 1763 | #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \ |
| 1764 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value) |
| 1765 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \ |
| 1766 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value) |
| 1767 | |
| 1768 | #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \ |
| 1769 | ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1770 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \ |
| 1771 | ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1772 | |
| 1773 | /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */ |
| 1774 | typedef struct _wmi_abi_version { |
| 1775 | A_UINT32 abi_version_0; |
| 1776 | /** WMI Major and Minor versions */ |
| 1777 | A_UINT32 abi_version_1; |
| 1778 | /** WMI change revision */ |
| 1779 | A_UINT32 abi_version_ns_0; |
| 1780 | /** ABI version namespace first four dwords */ |
| 1781 | A_UINT32 abi_version_ns_1; |
| 1782 | /** ABI version namespace second four dwords */ |
| 1783 | A_UINT32 abi_version_ns_2; |
| 1784 | /** ABI version namespace third four dwords */ |
| 1785 | A_UINT32 abi_version_ns_3; |
| 1786 | /** ABI version namespace fourth four dwords */ |
| 1787 | } wmi_abi_version; |
| 1788 | |
| 1789 | /* |
| 1790 | * maximum number of memroy requests allowed from FW. |
| 1791 | */ |
| 1792 | #define WMI_MAX_MEM_REQS 16 |
| 1793 | |
| 1794 | /* !!NOTE!!: |
| 1795 | * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility. |
| 1796 | * Please don't change it. |
| 1797 | */ |
| 1798 | #define HW_BD_INFO_SIZE 5 |
| 1799 | |
| 1800 | /** |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 1801 | * PDEV ID to identify the physical device, |
| 1802 | * value 0 reserved for SOC level commands/event |
| 1803 | */ |
| 1804 | #define WMI_PDEV_ID_SOC 0 /* SOC level, applicable to all PDEVs */ |
| 1805 | #define WMI_PDEV_ID_1ST 1 /* first pdev (pdev 0) */ |
| 1806 | #define WMI_PDEV_ID_2ND 2 /* second pdev (pdev 1) */ |
| 1807 | #define WMI_PDEV_ID_3RD 3 /* third pdev (pdev 2) */ |
| 1808 | |
| 1809 | /** |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1810 | * The following struct holds optional payload for |
| 1811 | * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the |
| 1812 | * device capability to the host. |
| 1813 | */ |
| 1814 | typedef struct { |
| 1815 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */ |
| 1816 | A_UINT32 fw_build_vers; /* firmware build number */ |
| 1817 | wmi_abi_version fw_abi_vers; |
| 1818 | A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */ |
| 1819 | A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */ |
| 1820 | A_UINT32 num_rf_chains; |
| 1821 | /* The following field is only valid for service type WMI_SERVICE_11AC */ |
| 1822 | A_UINT32 ht_cap_info; /* WMI HT Capability */ |
| 1823 | A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */ |
| 1824 | A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */ |
| 1825 | A_UINT32 hw_min_tx_power; |
| 1826 | A_UINT32 hw_max_tx_power; |
| 1827 | A_UINT32 sys_cap_info; |
| 1828 | A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ |
| 1829 | /** Max beacon and Probe Response IE offload size (includes |
| 1830 | * optional P2P IEs) */ |
| 1831 | A_UINT32 max_bcn_ie_size; |
| 1832 | /* |
| 1833 | * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT. |
| 1834 | * FW uses this as FW extesnsion memory for saving its data structures. Only valid |
| 1835 | * for low latency interfaces like PCIE where FW can access this memory directly (or) |
| 1836 | * by DMA. |
| 1837 | */ |
| 1838 | A_UINT32 num_mem_reqs; |
| 1839 | /* Max No. scan channels target can support |
| 1840 | * If FW is too old and doesn't indicate this number, host side value will default to |
| 1841 | * 0, and host will take the original compatible value (62) for future scan channel |
| 1842 | * setup. |
| 1843 | */ |
| 1844 | A_UINT32 max_num_scan_channels; |
| 1845 | |
| 1846 | /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID. |
| 1847 | * Default 0 means tha hw_bd_info[] is invalid(legacy board). |
| 1848 | */ |
| 1849 | A_UINT32 hw_bd_id; |
| 1850 | A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */ |
| 1851 | |
| 1852 | /* |
| 1853 | * Number of MACs supported, i.e. a DBS-capable device will return 2 |
| 1854 | */ |
| 1855 | A_UINT32 max_supported_macs; |
| 1856 | |
| 1857 | /* |
| 1858 | * FW sub-feature capabilities to be used in concurrence with |
| 1859 | * wmi_service_bitmap |
| 1860 | * values from enum WMI_FW_SUB_FEAT_CAPS |
| 1861 | */ |
| 1862 | A_UINT32 wmi_fw_sub_feat_caps; |
| 1863 | /* |
| 1864 | * Number of Dual Band Simultaneous (DBS) hardware modes |
| 1865 | */ |
| 1866 | A_UINT32 num_dbs_hw_modes; |
| 1867 | /* |
| 1868 | * txrx_chainmask |
| 1869 | * [7:0] - 2G band tx chain mask |
| 1870 | * [15:8] - 2G band rx chain mask |
| 1871 | * [23:16] - 5G band tx chain mask |
| 1872 | * [31:24] - 5G band rx chain mask |
| 1873 | * |
| 1874 | */ |
| 1875 | A_UINT32 txrx_chainmask; |
| 1876 | |
| 1877 | /* |
| 1878 | * default Dual Band Simultaneous (DBS) hardware mode |
| 1879 | */ |
| 1880 | A_UINT32 default_dbs_hw_mode_index; |
| 1881 | |
| 1882 | /* |
| 1883 | * Number of msdu descriptors target would use |
| 1884 | */ |
| 1885 | A_UINT32 num_msdu_desc; |
| 1886 | |
| 1887 | /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV. |
| 1888 | * HAL_REG_CAPABILITIES hal_reg_capabilities; |
| 1889 | * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE]; |
| 1890 | * wlan_host_mem_req mem_reqs[]; |
| 1891 | * wlan_dbs_hw_mode_list[]; |
| 1892 | */ |
| 1893 | } wmi_service_ready_event_fixed_param; |
| 1894 | |
| 1895 | typedef struct { |
| 1896 | /* TLV tag and len; tag equals |
| 1897 | *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT |
| 1898 | */ |
| 1899 | A_UINT32 tlv_header; |
| 1900 | /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */ |
| 1901 | A_UINT32 default_conc_scan_config_bits; |
| 1902 | /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */ |
| 1903 | A_UINT32 default_fw_config_bits; |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1904 | wmi_ppe_threshold ppet; |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 1905 | /* |
| 1906 | * see section 8.4.2.213 from draft r8 of 802.11ax; |
| 1907 | * see WMI_HE_FRAG_SUPPORT enum |
| 1908 | */ |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 1909 | A_UINT32 he_cap_info; |
Govind Singh | 76d82bc | 2016-02-22 15:39:48 +0530 | [diff] [blame] | 1910 | /* |
| 1911 | * An HT STA shall not allow transmission of more than one MPDU start |
| 1912 | * within the time limit described in the MPDU maximum density field. |
| 1913 | */ |
| 1914 | A_UINT32 mpdu_density; /* units are microseconds */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 1915 | /* |
| 1916 | * Maximum no of BSSID based RX filters host can program |
| 1917 | * Value 0 means FW hasn't given any limit to host. |
| 1918 | */ |
| 1919 | A_UINT32 max_bssid_rx_filters; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1920 | } wmi_service_ready_ext_event_fixed_param; |
| 1921 | |
| 1922 | typedef enum { |
| 1923 | WMI_HWBD_NONE = 0, /* No hw board information is given */ |
| 1924 | WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */ |
| 1925 | WMI_HWBD_QCA2582 = 2, /* Killer 1525 */ |
| 1926 | } WMI_HWBD_ID; |
| 1927 | |
| 1928 | typedef enum { |
| 1929 | WMI_FW_STA_RTT_INITR = 0x00000001, |
| 1930 | WMI_FW_STA_RTT_RESPR = 0x00000002, |
| 1931 | WMI_FW_P2P_CLI_RTT_INITR = 0x00000004, |
| 1932 | WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008, |
| 1933 | WMI_FW_P2P_GO_RTT_INITR = 0x00000010, |
| 1934 | WMI_FW_P2P_GO_RTT_RESPR = 0x00000020, |
| 1935 | WMI_FW_AP_RTT_INITR = 0x00000040, |
| 1936 | WMI_FW_AP_RTT_RESPR = 0x00000080, |
| 1937 | WMI_FW_NAN_RTT_INITR = 0x00000100, |
| 1938 | WMI_FW_NAN_RTT_RESPR = 0x00000200, |
| 1939 | /* |
| 1940 | * New fw sub feature capabilites before |
| 1941 | * WMI_FW_MAX_SUB_FEAT_CAP |
| 1942 | */ |
| 1943 | WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000, |
| 1944 | } WMI_FW_SUB_FEAT_CAPS; |
| 1945 | |
| 1946 | #define ATH_BD_DATA_REV_MASK 0x000000FF |
| 1947 | #define ATH_BD_DATA_REV_SHIFT 0 |
| 1948 | |
| 1949 | #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00 |
| 1950 | #define ATH_BD_DATA_PROJ_ID_SHIFT 8 |
| 1951 | |
| 1952 | #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000 |
| 1953 | #define ATH_BD_DATA_CUST_ID_SHIFT 16 |
| 1954 | |
| 1955 | #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000 |
| 1956 | #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24 |
| 1957 | |
| 1958 | #define SET_BD_DATA_REV(bd_data_ver, value) \ |
| 1959 | ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT)) |
| 1960 | |
| 1961 | #define GET_BD_DATA_REV(bd_data_ver) \ |
| 1962 | (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT) |
| 1963 | |
| 1964 | #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \ |
| 1965 | ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT)) |
| 1966 | |
| 1967 | #define GET_BD_DATA_PROJ_ID(bd_data_ver) \ |
| 1968 | (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT) |
| 1969 | |
| 1970 | #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \ |
| 1971 | ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT)) |
| 1972 | |
| 1973 | #define GET_BD_DATA_CUST_ID(bd_data_ver) \ |
| 1974 | (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT) |
| 1975 | |
| 1976 | #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \ |
| 1977 | ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT)) |
| 1978 | |
| 1979 | #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \ |
| 1980 | (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT) |
| 1981 | |
| 1982 | #ifdef ROME_LTE_COEX_FREQ_AVOID |
| 1983 | typedef struct { |
| 1984 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 1985 | A_UINT32 end_freq; /* end frequency */ |
| 1986 | } avoid_freq_range_desc; |
| 1987 | |
| 1988 | typedef struct { |
| 1989 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 1990 | A_UINT32 num_freq_ranges; |
| 1991 | /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */ |
| 1992 | avoid_freq_range_desc avd_freq_range[0]; |
| 1993 | } wmi_wlan_avoid_freq_ranges_event; |
| 1994 | #endif |
| 1995 | |
| 1996 | /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */ |
| 1997 | #define WLAN_INIT_STATUS_SUCCESS 0x0 |
| 1998 | #define WLAN_INIT_STATUS_GEN_FAILED 0x1 |
| 1999 | #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) |
| 2000 | #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) |
| 2001 | |
| 2002 | typedef A_UINT32 WLAN_INIT_STATUS; |
| 2003 | |
| 2004 | typedef struct { |
| 2005 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */ |
| 2006 | wmi_abi_version fw_abi_vers; |
| 2007 | wmi_mac_addr mac_addr; |
| 2008 | A_UINT32 status; |
Rajeev Kumar | e18f528 | 2016-04-15 14:08:29 -0700 | [diff] [blame] | 2009 | A_UINT32 num_dscp_table; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2010 | } wmi_ready_event_fixed_param; |
| 2011 | |
| 2012 | typedef struct { |
| 2013 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */ |
| 2014 | /** |
| 2015 | * @brief num_vdev - number of virtual devices (VAPs) to support |
| 2016 | */ |
| 2017 | A_UINT32 num_vdevs; |
| 2018 | /** |
| 2019 | * @brief num_peers - number of peer nodes to support |
| 2020 | */ |
| 2021 | A_UINT32 num_peers; |
| 2022 | /* |
| 2023 | * @brief In offload mode target supports features like WOW, chatter and other |
| 2024 | * protocol offloads. In order to support them some functionalities like |
| 2025 | * reorder buffering, PN checking need to be done in target. This determines |
| 2026 | * maximum number of peers suported by target in offload mode |
| 2027 | */ |
| 2028 | A_UINT32 num_offload_peers; |
| 2029 | /* @brief Number of reorder buffers available for doing target based reorder |
| 2030 | * Rx reorder buffering |
| 2031 | */ |
| 2032 | A_UINT32 num_offload_reorder_buffs; |
| 2033 | /** |
| 2034 | * @brief num_peer_keys - number of keys per peer |
| 2035 | */ |
| 2036 | A_UINT32 num_peer_keys; |
| 2037 | /** |
| 2038 | * @brief num_peer_tids - number of TIDs to provide storage for per peer. |
| 2039 | */ |
| 2040 | A_UINT32 num_tids; |
| 2041 | /** |
| 2042 | * @brief ast_skid_limit - max skid for resolving hash collisions |
| 2043 | * @details |
| 2044 | * The address search table is sparse, so that if two MAC addresses |
| 2045 | * result in the same hash value, the second of these conflicting |
| 2046 | * entries can slide to the next index in the address search table, |
| 2047 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 2048 | * specifies the upper bound on how many subsequent indices to search |
| 2049 | * over to find an unoccupied space. |
| 2050 | */ |
| 2051 | A_UINT32 ast_skid_limit; |
| 2052 | /** |
| 2053 | * @brief tx_chain_mask - the nominal chain mask for transmit |
| 2054 | * @details |
| 2055 | * The chain mask may be modified dynamically, e.g. to operate AP tx with |
| 2056 | * a reduced number of chains if no clients are associated. |
| 2057 | * This configuration parameter specifies the nominal chain-mask that |
| 2058 | * should be used when not operating with a reduced set of tx chains. |
| 2059 | */ |
| 2060 | A_UINT32 tx_chain_mask; |
| 2061 | /** |
| 2062 | * @brief rx_chain_mask - the nominal chain mask for receive |
| 2063 | * @details |
| 2064 | * The chain mask may be modified dynamically, e.g. for a client to use |
| 2065 | * a reduced number of chains for receive if the traffic to the client |
| 2066 | * is low enough that it doesn't require downlink MIMO or antenna |
| 2067 | * diversity. |
| 2068 | * This configuration parameter specifies the nominal chain-mask that |
| 2069 | * should be used when not operating with a reduced set of rx chains. |
| 2070 | */ |
| 2071 | A_UINT32 rx_chain_mask; |
| 2072 | /** |
| 2073 | * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC |
| 2074 | * @details |
| 2075 | * Each WMM access class (voice, video, best-effort, background) will |
| 2076 | * have its own timeout value to dictate how long to wait for missing |
| 2077 | * rx MPDUs to arrive before flushing subsequent MPDUs that have already |
| 2078 | * been received. |
| 2079 | * This parameter specifies the timeout in milliseconds for each class . |
| 2080 | * NOTE: the number of class (defined as 4) cannot be |
| 2081 | * changed in the future without breaking WMI compatibility. |
| 2082 | */ |
| 2083 | A_UINT32 rx_timeout_pri[4]; |
| 2084 | /** |
| 2085 | * @brief rx_decap mode - what mode the rx should decap packets to |
| 2086 | * @details |
| 2087 | * MAC can decap to RAW (no decap), native wifi or Ethernet types |
| 2088 | * THis setting also determines the default TX behavior, however TX |
| 2089 | * behavior can be modified on a per VAP basis during VAP init |
| 2090 | */ |
| 2091 | A_UINT32 rx_decap_mode; |
| 2092 | /** |
| 2093 | * @brief scan_max_pending_req - what is the maximum scan requests than can be queued |
| 2094 | */ |
| 2095 | A_UINT32 scan_max_pending_req; |
| 2096 | |
| 2097 | /** |
| 2098 | * @brief maximum VDEV that could use BMISS offload |
| 2099 | */ |
| 2100 | A_UINT32 bmiss_offload_max_vdev; |
| 2101 | |
| 2102 | /** |
| 2103 | * @brief maximum VDEV that could use offload roaming |
| 2104 | */ |
| 2105 | A_UINT32 roam_offload_max_vdev; |
| 2106 | |
| 2107 | /** |
| 2108 | * @brief maximum AP profiles that would push to offload roaming |
| 2109 | */ |
| 2110 | A_UINT32 roam_offload_max_ap_profiles; |
| 2111 | |
| 2112 | /** |
| 2113 | * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion |
| 2114 | * @details |
| 2115 | * The target's WAL maintains a table to hold information regarding which |
| 2116 | * peers belong to a given multicast group, so that if multicast->unicast |
| 2117 | * conversion is enabled, the target can convert multicast tx frames to a |
| 2118 | * series of unicast tx frames, to each peer within the multicast group. |
| 2119 | * This num_mcast_groups configuration parameter tells the target how |
| 2120 | * many multicast groups to provide storage for within its multicast |
| 2121 | * group membership table. |
| 2122 | */ |
| 2123 | A_UINT32 num_mcast_groups; |
| 2124 | |
| 2125 | /** |
| 2126 | * @brief num_mcast_table_elems - size to alloc for the mcast membership table |
| 2127 | * @details |
| 2128 | * This num_mcast_table_elems configuration parameter tells the target |
| 2129 | * how many peer elements it needs to provide storage for in its |
| 2130 | * multicast group membership table. |
| 2131 | * These multicast group membership table elements are shared by the |
| 2132 | * multicast groups stored within the table. |
| 2133 | */ |
| 2134 | A_UINT32 num_mcast_table_elems; |
| 2135 | |
| 2136 | /** |
| 2137 | * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion |
| 2138 | * @details |
| 2139 | * This configuration parameter specifies whether the target should |
| 2140 | * perform multicast --> unicast conversion on transmit, and if so, |
| 2141 | * what to do if it finds no entries in its multicast group membership |
| 2142 | * table for the multicast IP address in the tx frame. |
| 2143 | * Configuration value: |
| 2144 | * 0 -> Do not perform multicast to unicast conversion. |
| 2145 | * 1 -> Convert multicast frames to unicast, if the IP multicast address |
| 2146 | * from the tx frame is found in the multicast group membership |
| 2147 | * table. If the IP multicast address is not found, drop the frame. |
| 2148 | * 2 -> Convert multicast frames to unicast, if the IP multicast address |
| 2149 | * from the tx frame is found in the multicast group membership |
| 2150 | * table. If the IP multicast address is not found, transmit the |
| 2151 | * frame as multicast. |
| 2152 | */ |
| 2153 | A_UINT32 mcast2ucast_mode; |
| 2154 | |
| 2155 | /** |
| 2156 | * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log |
| 2157 | * @details |
| 2158 | * This parameter controls how much memory the target will allocate to |
| 2159 | * store a log of tx PPDU meta-information (how large the PPDU was, |
| 2160 | * when it was sent, whether it was successful, etc.) |
| 2161 | */ |
| 2162 | A_UINT32 tx_dbg_log_size; |
| 2163 | |
| 2164 | /** |
| 2165 | * @brief num_wds_entries - how many AST entries to be allocated for WDS |
| 2166 | */ |
| 2167 | A_UINT32 num_wds_entries; |
| 2168 | |
| 2169 | /** |
| 2170 | * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI |
| 2171 | * this limit can be 0 -default, 1 256B |
| 2172 | */ |
| 2173 | A_UINT32 dma_burst_size; |
| 2174 | |
| 2175 | /** |
| 2176 | * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU |
| 2177 | * to account for interface latency to avoid underrun. |
| 2178 | */ |
| 2179 | A_UINT32 mac_aggr_delim; |
| 2180 | /** |
| 2181 | * @brief rx_skip_defrag_timeout_dup_detection_check |
| 2182 | * @details |
| 2183 | * determine whether target is responsible for detecting duplicate |
| 2184 | * non-aggregate MPDU and timing out stale fragments. |
| 2185 | * |
| 2186 | * A-MPDU reordering is always performed on the target. |
| 2187 | * |
| 2188 | * 0: target responsible for frag timeout and dup checking |
| 2189 | * 1: host responsible for frag timeout and dup checking |
| 2190 | */ |
| 2191 | A_UINT32 rx_skip_defrag_timeout_dup_detection_check; |
| 2192 | |
| 2193 | /** |
| 2194 | * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported |
| 2195 | * and Max no of descriptors for each Video link (node). |
| 2196 | */ |
| 2197 | A_UINT32 vow_config; |
| 2198 | |
| 2199 | /** |
| 2200 | * @brief maximum VDEV that could use GTK offload |
| 2201 | */ |
| 2202 | A_UINT32 gtk_offload_max_vdev; |
| 2203 | |
| 2204 | /** |
| 2205 | * @brief num_msdu_desc - Number of msdu descriptors target should use |
| 2206 | */ |
| 2207 | A_UINT32 num_msdu_desc; /* Number of msdu desc */ |
| 2208 | /** |
| 2209 | * @brief max_frag_entry - Max. number of Tx fragments per MSDU |
| 2210 | * @details |
| 2211 | * This parameter controls the max number of Tx fragments per MSDU. |
| 2212 | * This is sent by the target as part of the WMI_SERVICE_READY event |
| 2213 | * and is overriden by the OS shim as required. |
| 2214 | */ |
| 2215 | A_UINT32 max_frag_entries; |
| 2216 | |
| 2217 | /** |
| 2218 | * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS |
| 2219 | * @brief num_msdu_desc - Number of vdev that can support beacon offload |
| 2220 | */ |
| 2221 | |
| 2222 | A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */ |
| 2223 | |
| 2224 | /** |
| 2225 | * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev |
| 2226 | * @details |
| 2227 | * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of |
| 2228 | * peers in a connection tracking table for possible TDLS link creation |
| 2229 | * or deletion. This controls the number of tracked peers per vdev. |
| 2230 | */ |
| 2231 | A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */ |
| 2232 | A_UINT32 beacon_tx_offload_max_vdev; |
| 2233 | A_UINT32 num_multicast_filter_entries; |
| 2234 | A_UINT32 num_wow_filters; /*host can configure the number of wow filters */ |
| 2235 | |
| 2236 | /** |
| 2237 | * @brief num_keep_alive_pattern - Num of keep alive patterns configured |
| 2238 | * from host. |
| 2239 | */ |
| 2240 | A_UINT32 num_keep_alive_pattern; |
| 2241 | /** |
| 2242 | * @brief keep_alive_pattern_size - keep alive pattern size. |
| 2243 | */ |
| 2244 | A_UINT32 keep_alive_pattern_size; |
| 2245 | |
| 2246 | /** |
| 2247 | * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported |
| 2248 | * @details |
| 2249 | * Each TDLS STA can become a sleep STA independently. This parameter |
| 2250 | * mentions how many such sleep STAs can be supported concurrently. |
| 2251 | */ |
| 2252 | A_UINT32 max_tdls_concurrent_sleep_sta; |
| 2253 | |
| 2254 | /** |
| 2255 | * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported |
| 2256 | * @details |
| 2257 | * Each TDLS STA can become a buffer STA independently. This parameter |
| 2258 | * mentions how many such buffer STAs can be supported concurrently. |
| 2259 | */ |
| 2260 | A_UINT32 max_tdls_concurrent_buffer_sta; |
| 2261 | |
| 2262 | /** |
| 2263 | * @brief wmi_send_separate - host configures fw to send the wmi separately |
| 2264 | */ |
| 2265 | A_UINT32 wmi_send_separate; |
| 2266 | |
| 2267 | /** |
| 2268 | * @brief num_ocb_vdevs - Number of vdevs used for OCB support |
| 2269 | */ |
| 2270 | A_UINT32 num_ocb_vdevs; |
| 2271 | |
| 2272 | /** |
| 2273 | * @brief num_ocb_channels - The supported number of simultaneous OCB channels |
| 2274 | */ |
| 2275 | A_UINT32 num_ocb_channels; |
| 2276 | |
| 2277 | /** |
| 2278 | * @brief num_ocb_schedules - The supported number of OCB schedule segments |
| 2279 | */ |
| 2280 | A_UINT32 num_ocb_schedules; |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2281 | /** |
| 2282 | * @brief specific configuration from host, such as per platform configuration |
| 2283 | */ |
| 2284 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_S 0 |
| 2285 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_M 0x1 |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2286 | |
| 2287 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_S 1 |
| 2288 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_M 0x2 |
| 2289 | |
| 2290 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_S 2 |
| 2291 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_M 0x4 |
| 2292 | |
| 2293 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_S 3 |
| 2294 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_M 0x8 |
| 2295 | |
| 2296 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_S 4 |
| 2297 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_M 0x10 |
| 2298 | |
| 2299 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_S 5 |
| 2300 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_M 0x20 |
| 2301 | |
| 2302 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_S 6 |
| 2303 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_M 0x40 |
| 2304 | |
| 2305 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_S 7 |
| 2306 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_M 0x80 |
| 2307 | |
| 2308 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_S 8 |
| 2309 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_M 0x100 |
| 2310 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 2311 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_S 9 |
| 2312 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_M 0x200 |
| 2313 | |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2314 | A_UINT32 flag1; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2315 | |
| 2316 | /** @brief smart_ant_cap - Smart Antenna capabilities information |
| 2317 | * @details |
| 2318 | * 1 - Smart antenna is enabled. |
| 2319 | * 0 - Smart antenna is disabled. |
| 2320 | * In future this can contain smart antenna specifc capabilities. |
| 2321 | */ |
| 2322 | A_UINT32 smart_ant_cap; |
| 2323 | |
| 2324 | /** |
| 2325 | * User can configure the buffers allocated for each AC (BE, BK, VI, VO) |
| 2326 | * during init |
| 2327 | */ |
| 2328 | A_UINT32 BK_Minfree; |
| 2329 | A_UINT32 BE_Minfree; |
| 2330 | A_UINT32 VI_Minfree; |
| 2331 | A_UINT32 VO_Minfree; |
| 2332 | |
| 2333 | /** |
| 2334 | * @brief alloc_frag_desc_for_data_pkt . Controls data packet fragment |
| 2335 | * descriptor memory allocation. |
| 2336 | * 1 - Allocate fragment descriptor memory for data packet in firmware. |
| 2337 | * If host wants to transmit data packet at its desired rate, |
| 2338 | * this field must be set. |
| 2339 | * 0 - Don't allocate fragment descriptor for data packet. |
| 2340 | */ |
| 2341 | A_UINT32 alloc_frag_desc_for_data_pkt; |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 2342 | |
| 2343 | /* |
| 2344 | * how much space to allocate for NDP NS (neighbor solicitation) |
| 2345 | * specs |
| 2346 | */ |
| 2347 | A_UINT32 num_ns_ext_tuples_cfg; |
Sandeep Puligilla | b6ddc26 | 2016-03-09 13:06:16 -0800 | [diff] [blame] | 2348 | /** |
| 2349 | * size (in bytes) of the buffer the FW shall allocate to store |
| 2350 | * packet filtering instructions |
| 2351 | */ |
| 2352 | A_UINT32 bpf_instruction_size; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 2353 | /** |
| 2354 | * Maximum no of BSSID based RX filters host would program |
| 2355 | * Value 0 means host doesn't given any limit to FW. |
| 2356 | */ |
| 2357 | A_UINT32 max_bssid_rx_filters; |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 2358 | /** |
| 2359 | * Use PDEV ID instead of MAC ID, added for backward compatibility with |
| 2360 | * older host which is using MAC ID. 1 means PDEV ID, 0 means MAC ID. |
| 2361 | */ |
| 2362 | A_UINT32 use_pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2363 | } wmi_resource_config; |
| 2364 | |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 2365 | #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \ |
| 2366 | do { \ |
| 2367 | (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \ |
| 2368 | (word32) |= ((value) << WMI_RSRC_CFG_FLAG_ ## flag ## _S) & \ |
| 2369 | WMI_RSRC_CFG_FLAG_ ## flag ## _M; \ |
| 2370 | } while (0) |
| 2371 | #define WMI_RSRC_CFG_FLAG_GET(word32, flag) \ |
| 2372 | (((word32) & WMI_RSRC_CFG_FLAG_ ## flag ## _M) >> \ |
| 2373 | WMI_RSRC_CFG_FLAG_ ## flag ## _S) |
| 2374 | |
| 2375 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_SET(word32, value) \ |
| 2376 | WMI_RSRC_CFG_FLAG_SET((word32), WOW_IGN_PCIE_RST, (value)) |
| 2377 | #define WMI_RSRC_CFG_FLAG_WOW_IGN_PCIE_RST_GET(word32) \ |
| 2378 | WMI_RSRC_CFG_FLAG_GET((word32), WOW_IGN_PCIE_RST) |
| 2379 | |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 2380 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_SET(word32, value) \ |
| 2381 | WMI_RSRC_CFG_FLAG_SET((word32), LTEU_SUPPORT, (value)) |
| 2382 | #define WMI_RSRC_CFG_FLAG_LTEU_SUPPORT_GET(word32) \ |
| 2383 | WMI_RSRC_CFG_FLAG_GET((word32), LTEU_SUPPORT) |
| 2384 | |
| 2385 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_SET(word32, value) \ |
| 2386 | WMI_RSRC_CFG_FLAG_SET((word32), COEX_GPIO_SUPPORT, (value)) |
| 2387 | #define WMI_RSRC_CFG_FLAG_COEX_GPIO_SUPPORT_GET(word32) \ |
| 2388 | WMI_RSRC_CFG_FLAG_GET((word32), COEX_GPIO_SUPPORT) |
| 2389 | |
| 2390 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_SET(word32, value) \ |
| 2391 | WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_SPECTRAL_INTF, (value)) |
| 2392 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_SPECTRAL_INTF_GET(word32) \ |
| 2393 | WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_SPECTRAL_INTF) |
| 2394 | |
| 2395 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_SET(word32, value) \ |
| 2396 | WMI_RSRC_CFG_FLAG_SET((word32), AUX_RADIO_CHAN_LOAD_INTF, (value)) |
| 2397 | #define WMI_RSRC_CFG_FLAG_AUX_RADIO_CHAN_LOAD_INTF_GET(word32) \ |
| 2398 | WMI_RSRC_CFG_FLAG_GET((word32), AUX_RADIO_CHAN_LOAD_INTF) |
| 2399 | |
| 2400 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_SET(word32, value) \ |
| 2401 | WMI_RSRC_CFG_FLAG_SET((word32), BSS_CHANNEL_INFO_64, (value)) |
| 2402 | #define WMI_RSRC_CFG_FLAG_BSS_CHANNEL_INFO_64_GET(word32) \ |
| 2403 | WMI_RSRC_CFG_FLAG_GET((word32), BSS_CHANNEL_INFO_64) |
| 2404 | |
| 2405 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_SET(word32, value) \ |
| 2406 | WMI_RSRC_CFG_FLAG_SET((word32), ATF_CONFIG_ENABLE, (value)) |
| 2407 | #define WMI_RSRC_CFG_FLAG_ATF_CONFIG_ENABLE_GET(word32) \ |
| 2408 | WMI_RSRC_CFG_FLAG_GET((word32), ATF_CONFIG_ENABLE) |
| 2409 | |
| 2410 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_SET(word32, value) \ |
| 2411 | WMI_RSRC_CFG_FLAG_SET((word32), IPHR_PAD_CONFIG_ENABLE, (value)) |
| 2412 | #define WMI_RSRC_CFG_FLAG_IPHR_PAD_CONFIG_ENABLE_GET(word32) \ |
| 2413 | WMI_RSRC_CFG_FLAG_GET((word32), IPHR_PAD_CONFIG_ENABLE) |
| 2414 | |
| 2415 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_SET(word32, value) \ |
| 2416 | WMI_RSRC_CFG_FLAG_SET((word32), QWRAP_MODE_ENABLE, (value)) |
| 2417 | #define WMI_RSRC_CFG_FLAG_QWRAP_MODE_ENABLE_GET(word32) \ |
| 2418 | WMI_RSRC_CFG_FLAG_GET((word32), QWRAP_MODE_ENABLE) |
| 2419 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 2420 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_SET(word32, value) \ |
| 2421 | WMI_RSRC_CFG_FLAG_SET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT, (value)) |
| 2422 | #define WMI_RSRC_CFG_FLAG_MGMT_COMP_EVT_BUNDLE_SUPPORT_GET(word32) \ |
| 2423 | WMI_RSRC_CFG_FLAG_GET((word32), MGMT_COMP_EVT_BUNDLE_SUPPORT) |
| 2424 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2425 | typedef struct { |
| 2426 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ |
| 2427 | |
| 2428 | /** The following indicate the WMI versions to be supported by |
| 2429 | * the host driver. Note that the host driver decide to |
| 2430 | * "downgrade" its WMI version support and this may not be the |
| 2431 | * native version of the host driver. */ |
| 2432 | wmi_abi_version host_abi_vers; |
| 2433 | |
| 2434 | A_UINT32 num_host_mem_chunks; |
| 2435 | /** size of array host_mem_chunks[] */ |
Pradeep Reddy POTTETI | a280b5c | 2016-06-20 14:16:23 +0530 | [diff] [blame] | 2436 | /* The TLVs for resource_config, host_mem_chunks[], and |
| 2437 | * hw_mode_config will follow. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2438 | * wmi_resource_config resource_config; |
| 2439 | * wlan_host_memory_chunk host_mem_chunks[]; |
Pradeep Reddy POTTETI | a280b5c | 2016-06-20 14:16:23 +0530 | [diff] [blame] | 2440 | * wmi_pdev_set_hw_mode_cmd_fixed_param hw_mode_config; |
| 2441 | * Note that the hw_mode_config, in spite of its "pdev" name, |
| 2442 | * applies to the entire target rather than for a single pdev |
| 2443 | * within the target. |
| 2444 | * To avoid specifying a HW mode for the target, the host should |
| 2445 | * fill hw_mode_config's fields with 0x0. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2446 | */ |
| 2447 | |
| 2448 | } wmi_init_cmd_fixed_param; |
| 2449 | |
| 2450 | /** |
| 2451 | * TLV for channel list |
| 2452 | */ |
| 2453 | typedef struct { |
| 2454 | /** WMI_CHAN_LIST_TAG */ |
| 2455 | A_UINT32 tag; |
| 2456 | /** # of channels to scan */ |
| 2457 | A_UINT32 num_chan; |
| 2458 | /** channels in Mhz */ |
| 2459 | A_UINT32 channel_list[1]; |
| 2460 | } wmi_chan_list; |
| 2461 | |
| 2462 | /** |
| 2463 | * TLV for bssid list |
| 2464 | */ |
| 2465 | typedef struct { |
| 2466 | /** WMI_BSSID_LIST_TAG */ |
| 2467 | A_UINT32 tag; |
| 2468 | /** number of bssids */ |
| 2469 | A_UINT32 num_bssid; |
| 2470 | /** bssid list */ |
| 2471 | wmi_mac_addr bssid_list[1]; |
| 2472 | } wmi_bssid_list; |
| 2473 | |
| 2474 | /** |
| 2475 | * TLV for ie data. |
| 2476 | */ |
| 2477 | typedef struct { |
| 2478 | /** WMI_IE_TAG */ |
| 2479 | A_UINT32 tag; |
| 2480 | /** number of bytes in ie data */ |
| 2481 | A_UINT32 ie_len; |
| 2482 | /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */ |
| 2483 | A_UINT32 ie_data[1]; |
| 2484 | } wmi_ie_data; |
| 2485 | |
| 2486 | typedef struct { |
| 2487 | /** Len of the SSID */ |
| 2488 | A_UINT32 ssid_len; |
| 2489 | /** SSID */ |
| 2490 | A_UINT32 ssid[8]; |
| 2491 | } wmi_ssid; |
| 2492 | |
| 2493 | typedef struct { |
| 2494 | /** WMI_SSID_LIST_TAG */ |
| 2495 | A_UINT32 tag; |
| 2496 | A_UINT32 num_ssids; |
| 2497 | wmi_ssid ssids[1]; |
| 2498 | } wmi_ssid_list; |
| 2499 | |
| 2500 | /* prefix used by scan requestor ids on the host */ |
| 2501 | #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 2502 | /* prefix used by scan request ids generated on the host */ |
| 2503 | /* host cycles through the lower 12 bits to generate ids */ |
| 2504 | #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000 |
| 2505 | |
| 2506 | #define WLAN_SCAN_PARAMS_MAX_SSID 16 |
| 2507 | #define WLAN_SCAN_PARAMS_MAX_BSSID 4 |
| 2508 | #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512 |
| 2509 | |
| 2510 | typedef struct { |
| 2511 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 2512 | /** Scan ID */ |
| 2513 | A_UINT32 scan_id; |
| 2514 | /** Scan requestor ID */ |
| 2515 | A_UINT32 scan_req_id; |
| 2516 | /** VDEV id(interface) that is requesting scan */ |
| 2517 | A_UINT32 vdev_id; |
| 2518 | /** Scan Priority, input to scan scheduler */ |
| 2519 | A_UINT32 scan_priority; |
| 2520 | /** Scan events subscription */ |
| 2521 | A_UINT32 notify_scan_events; |
| 2522 | /** dwell time in msec on active channels */ |
| 2523 | A_UINT32 dwell_time_active; |
| 2524 | /** dwell time in msec on passive channels */ |
| 2525 | A_UINT32 dwell_time_passive; |
| 2526 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 2527 | A_UINT32 min_rest_time; |
| 2528 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 2529 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 2530 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 2531 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 2532 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 2533 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 2534 | */ |
| 2535 | A_UINT32 max_rest_time; |
| 2536 | /** time before sending next set of probe requests. |
| 2537 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 2538 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 2539 | */ |
| 2540 | A_UINT32 repeat_probe_time; |
| 2541 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 2542 | A_UINT32 probe_spacing_time; |
| 2543 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 2544 | A_UINT32 idle_time; |
| 2545 | /** maximum time in msec allowed for scan */ |
| 2546 | A_UINT32 max_scan_time; |
| 2547 | /** delay in msec before sending first probe request after switching to a channel */ |
| 2548 | A_UINT32 probe_delay; |
| 2549 | /** Scan control flags */ |
| 2550 | A_UINT32 scan_ctrl_flags; |
| 2551 | /** Burst duration time in msec*/ |
| 2552 | A_UINT32 burst_duration; |
| 2553 | |
| 2554 | /** # if channels to scan. In the TLV channel_list[] */ |
| 2555 | A_UINT32 num_chan; |
| 2556 | /** number of bssids. In the TLV bssid_list[] */ |
| 2557 | A_UINT32 num_bssid; |
| 2558 | /** number of ssid. In the TLV ssid_list[] */ |
| 2559 | A_UINT32 num_ssids; |
| 2560 | /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */ |
| 2561 | A_UINT32 ie_len; |
| 2562 | /** Max number of probes to be sent */ |
| 2563 | A_UINT32 n_probes; |
| 2564 | |
| 2565 | /** |
| 2566 | * TLV (tag length value ) parameters follow the scan_cmd |
| 2567 | * structure. The TLV's are: |
| 2568 | * A_UINT32 channel_list[]; |
| 2569 | * wmi_ssid ssid_list[]; |
| 2570 | * wmi_mac_addr bssid_list[]; |
| 2571 | * A_UINT8 ie_data[]; |
| 2572 | */ |
| 2573 | } wmi_start_scan_cmd_fixed_param; |
| 2574 | |
| 2575 | /** |
| 2576 | * scan control flags. |
| 2577 | */ |
| 2578 | |
| 2579 | /** passively scan all channels including active channels */ |
| 2580 | #define WMI_SCAN_FLAG_PASSIVE 0x1 |
| 2581 | /** add wild card ssid probe request even though ssid_list is specified. */ |
| 2582 | #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2 |
| 2583 | /** add cck rates to rates/xrate ie for the generated probe request */ |
| 2584 | #define WMI_SCAN_ADD_CCK_RATES 0x4 |
| 2585 | /** add ofdm rates to rates/xrate ie for the generated probe request */ |
| 2586 | #define WMI_SCAN_ADD_OFDM_RATES 0x8 |
| 2587 | /** To enable indication of Chan load and Noise floor to host */ |
| 2588 | #define WMI_SCAN_CHAN_STAT_EVENT 0x10 |
| 2589 | /** Filter Probe request frames */ |
| 2590 | #define WMI_SCAN_FILTER_PROBE_REQ 0x20 |
| 2591 | /**When set, not to scan DFS channels*/ |
| 2592 | #define WMI_SCAN_BYPASS_DFS_CHN 0x40 |
| 2593 | /**When set, certain errors are ignored and scan continues. |
| 2594 | * Different FW scan engine may use its own logic to decide what errors to ignore*/ |
| 2595 | #define WMI_SCAN_CONTINUE_ON_ERROR 0x80 |
| 2596 | /** Enable promiscous mode for ese */ |
| 2597 | #define WMI_SCAN_FILTER_PROMISCOUS 0x100 |
| 2598 | /** allow to send probe req on DFS channel */ |
| 2599 | #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200 |
| 2600 | /** add TPC content in probe req frame */ |
| 2601 | #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400 |
| 2602 | /** add DS content in probe req frame */ |
| 2603 | #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800 |
| 2604 | /** use random mac address for TA for probe request frame and add |
| 2605 | * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame. |
| 2606 | * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/ |
| 2607 | #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 2608 | /** allow mgmt transmission during off channel scan */ |
| 2609 | #define WMI_SCAN_OFFCHAN_MGMT_TX 0x2000 |
| 2610 | /** allow data transmission during off channel scan */ |
| 2611 | #define WMI_SCAN_OFFCHAN_DATA_TX 0x4000 |
| 2612 | /** allow capture ppdu with phy errrors */ |
| 2613 | #define WMI_SCAN_CAPTURE_PHY_ERROR 0x8000 |
Sandeep Puligilla | 1d9a8d8 | 2016-03-09 13:07:58 -0800 | [diff] [blame] | 2614 | /** always do passive scan on passive channels */ |
| 2615 | #define WMI_SCAN_FLAG_STRICT_PASSIVE_ON_PCHN 0x1000 |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 2616 | /** for adaptive scan mode using 3 bits (21 - 23 bits) */ |
| 2617 | #define WMI_SCAN_DWELL_MODE_MASK 0x00E00000 |
| 2618 | #define WMI_SCAN_DWELL_MODE_SHIFT 21 |
| 2619 | |
| 2620 | typedef enum { |
| 2621 | WMI_SCAN_DWELL_MODE_DEFAULT = 0, |
| 2622 | WMI_SCAN_DWELL_MODE_CONSERVATIVE = 1, |
| 2623 | WMI_SCAN_DWELL_MODE_MODERATE = 2, |
| 2624 | WMI_SCAN_DWELL_MODE_AGGRESSIVE = 3, |
| 2625 | WMI_SCAN_DWELL_MODE_STATIC = 4, |
| 2626 | } WMI_SCAN_DWELL_MODE; |
| 2627 | |
| 2628 | #define WMI_SCAN_SET_DWELL_MODE(flag, mode) \ |
| 2629 | do { \ |
| 2630 | (flag) |= (((mode) << WMI_SCAN_DWELL_MODE_SHIFT) & \ |
| 2631 | WMI_SCAN_DWELL_MODE_MASK); \ |
| 2632 | } while (0) |
| 2633 | |
| 2634 | #define WMI_SCAN_GET_DWELL_MODE(flag) \ |
| 2635 | (((flag) & WMI_SCAN_DWELL_MODE_MASK) >> WMI_SCAN_DWELL_MODE_SHIFT) |
| 2636 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2637 | /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */ |
| 2638 | #define WMI_SCAN_CLASS_MASK 0xFF000000 |
| 2639 | |
| 2640 | /* |
| 2641 | * Masks identifying types/ID of scans |
| 2642 | * Scan_Stop macros should be the same value as below defined in UMAC |
| 2643 | * #define IEEE80211_SPECIFIC_SCAN 0x00000000 |
| 2644 | * #define IEEE80211_VAP_SCAN 0x01000000 |
| 2645 | * #define IEEE80211_ALL_SCANS 0x04000000 |
| 2646 | */ |
| 2647 | #define WMI_SCAN_STOP_ONE 0x00000000 |
| 2648 | #define WMI_SCN_STOP_VAP_ALL 0x01000000 |
| 2649 | #define WMI_SCAN_STOP_ALL 0x04000000 |
| 2650 | |
| 2651 | typedef struct { |
| 2652 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 2653 | /** requestor requesting cancel */ |
| 2654 | A_UINT32 requestor; |
| 2655 | /** Scan ID */ |
| 2656 | A_UINT32 scan_id; |
| 2657 | /** |
| 2658 | * Req Type |
| 2659 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 2660 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 2661 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 2662 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 2663 | */ |
| 2664 | A_UINT32 req_type; |
| 2665 | /** |
| 2666 | * vDev ID |
| 2667 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 2668 | */ |
| 2669 | A_UINT32 vdev_id; |
| 2670 | } wmi_stop_scan_cmd_fixed_param; |
| 2671 | |
| 2672 | #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */ |
| 2673 | #define APPEND_TO_EXISTING_CHAN_LIST 1 |
| 2674 | |
| 2675 | typedef struct { |
| 2676 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */ |
| 2677 | A_UINT32 num_scan_chans; |
| 2678 | /** no of elements in chan_info[] */ |
| 2679 | A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */ |
| 2680 | /** Followed by the variable length TLV chan_info: |
| 2681 | * wmi_channel chan_info[] */ |
| 2682 | } wmi_scan_chan_list_cmd_fixed_param; |
| 2683 | |
| 2684 | /* |
| 2685 | * Priority numbers must be sequential, starting with 0. |
| 2686 | */ |
| 2687 | /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */ |
| 2688 | typedef enum { |
| 2689 | WMI_SCAN_PRIORITY_VERY_LOW = 0, |
| 2690 | WMI_SCAN_PRIORITY_LOW, |
| 2691 | WMI_SCAN_PRIORITY_MEDIUM, |
| 2692 | WMI_SCAN_PRIORITY_HIGH, |
| 2693 | WMI_SCAN_PRIORITY_VERY_HIGH, |
| 2694 | |
| 2695 | WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */ |
| 2696 | } wmi_scan_priority; |
| 2697 | |
| 2698 | /* Five Levels for Requested Priority */ |
| 2699 | /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */ |
| 2700 | typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT]; |
| 2701 | |
| 2702 | /** |
| 2703 | * 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 |
| 2704 | * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA |
| 2705 | * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact |
| 2706 | */ |
| 2707 | typedef struct { |
| 2708 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */ |
| 2709 | /** |
| 2710 | * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table |
| 2711 | * 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 |
| 2712 | */ |
| 2713 | A_UINT32 vdev_type; |
| 2714 | /** |
| 2715 | * number of rows in mapping_table for a specific vdev |
| 2716 | * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition) |
| 2717 | */ |
| 2718 | A_UINT32 number_rows; |
| 2719 | /** mapping_table for a specific vdev follows this TLV |
| 2720 | * WLAN_PRIORITY_MAPPING mapping_table[]; */ |
| 2721 | } wmi_scan_sch_priority_table_cmd_fixed_param; |
| 2722 | |
| 2723 | /** update flags */ |
| 2724 | #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1 |
| 2725 | #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2 |
| 2726 | #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4 |
| 2727 | |
| 2728 | typedef struct { |
| 2729 | A_UINT32 tlv_header; |
| 2730 | /** requestor requesting update scan request */ |
| 2731 | A_UINT32 requestor; |
| 2732 | /** Scan ID of the scan request that need to be update */ |
| 2733 | A_UINT32 scan_id; |
| 2734 | /** update flags, indicating which of the following fields are valid and need to be updated*/ |
| 2735 | A_UINT32 scan_update_flags; |
| 2736 | /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */ |
| 2737 | A_UINT32 scan_priority; |
| 2738 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */ |
| 2739 | A_UINT32 min_rest_time; |
| 2740 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */ |
| 2741 | A_UINT32 max_rest_time; |
| 2742 | } wmi_scan_update_request_cmd_fixed_param; |
| 2743 | |
| 2744 | typedef struct { |
| 2745 | A_UINT32 tlv_header; |
| 2746 | /** oui to be used in probe request frame when random mac addresss is |
| 2747 | * requested part of scan parameters. this is applied to both FW internal scans and |
| 2748 | * host initated scans. host can request for random mac address with |
| 2749 | * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */ |
| 2750 | A_UINT32 prob_req_oui; |
| 2751 | } wmi_scan_prob_req_oui_cmd_fixed_param; |
| 2752 | |
| 2753 | enum wmi_scan_event_type { |
| 2754 | WMI_SCAN_EVENT_STARTED = 0x1, |
| 2755 | WMI_SCAN_EVENT_COMPLETED = 0x2, |
| 2756 | WMI_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 2757 | WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 2758 | WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */ |
| 2759 | WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */ |
| 2760 | WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */ |
Manikandan Mohan | 46b95c0 | 2015-12-09 12:23:08 -0800 | [diff] [blame] | 2761 | WMI_SCAN_EVENT_RESTARTED = 0x80, /* scan restarted */ |
| 2762 | WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 2763 | WMI_SCAN_EVENT_SUSPENDED = 0x200, /* scan request is suspended */ |
| 2764 | WMI_SCAN_EVENT_RESUMED = 0x400, /* scan request is resumed */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2765 | WMI_SCAN_EVENT_MAX = 0x8000 |
| 2766 | }; |
| 2767 | |
| 2768 | enum wmi_scan_completion_reason { |
| 2769 | /** scan related events */ |
| 2770 | WMI_SCAN_REASON_NONE = 0xFF, |
| 2771 | WMI_SCAN_REASON_COMPLETED = 0, |
| 2772 | WMI_SCAN_REASON_CANCELLED = 1, |
| 2773 | WMI_SCAN_REASON_PREEMPTED = 2, |
| 2774 | WMI_SCAN_REASON_TIMEDOUT = 3, |
| 2775 | 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] | 2776 | WMI_SCAN_REASON_SUSPENDED = 5, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2777 | WMI_SCAN_REASON_MAX, |
| 2778 | }; |
| 2779 | |
| 2780 | typedef struct { |
| 2781 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */ |
| 2782 | /** scan event (wmi_scan_event_type) */ |
| 2783 | A_UINT32 event; |
| 2784 | /** status of the scan completion event */ |
| 2785 | A_UINT32 reason; |
| 2786 | /** channel freq , only valid for FOREIGN channel event*/ |
| 2787 | A_UINT32 channel_freq; |
| 2788 | /**id of the requestor whose scan is in progress */ |
| 2789 | A_UINT32 requestor; |
| 2790 | /**id of the scan that is in progress */ |
| 2791 | A_UINT32 scan_id; |
| 2792 | /**id of VDEV that requested the scan */ |
| 2793 | A_UINT32 vdev_id; |
| 2794 | } wmi_scan_event_fixed_param; |
| 2795 | |
| 2796 | /* WMI Diag event */ |
| 2797 | typedef struct { |
| 2798 | A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */ |
| 2799 | A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */ |
| 2800 | A_UINT32 count; /* Number of diag frames added to current event */ |
| 2801 | A_UINT32 dropped; |
| 2802 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 2803 | } wmi_diag_event_fixed_param; |
| 2804 | |
| 2805 | /* |
| 2806 | * If FW has multiple active channels due to MCC(multi channel concurrency), |
| 2807 | * then these stats are combined stats for all the active channels. |
| 2808 | */ |
| 2809 | typedef struct { |
| 2810 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */ |
| 2811 | /** ack count, it is an incremental number, not accumulated number */ |
| 2812 | A_UINT32 ackRcvBad; |
| 2813 | /** bad rts count, it is an incremental number, not accumulated number */ |
| 2814 | A_UINT32 rtsBad; |
| 2815 | /** good rts, it is an incremental number, not accumulated number */ |
| 2816 | A_UINT32 rtsGood; |
| 2817 | /** fcs count, it is an incremental number, not accumulated number */ |
| 2818 | A_UINT32 fcsBad; |
| 2819 | /** beacon count, it is an incremental number, not accumulated number */ |
| 2820 | A_UINT32 noBeacons; |
| 2821 | } wmi_update_whal_mib_stats_event_fixed_param; |
| 2822 | |
| 2823 | /* |
| 2824 | * This defines how much headroom is kept in the |
| 2825 | * receive frame between the descriptor and the |
| 2826 | * payload, in order for the WMI PHY error and |
| 2827 | * management handler to insert header contents. |
| 2828 | * |
| 2829 | * This is in bytes. |
| 2830 | */ |
| 2831 | #define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr) |
| 2832 | |
| 2833 | /** This event will be used for sending scan results |
| 2834 | * as well as rx mgmt frames to the host. The rx buffer |
| 2835 | * will be sent as part of this WMI event. It would be a |
| 2836 | * good idea to pass all the fields in the RX status |
| 2837 | * descriptor up to the host. |
| 2838 | */ |
| 2839 | /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */ |
| 2840 | #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */ |
| 2841 | |
| 2842 | /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */ |
| 2843 | #define WMI_MGMT_RX_HDR_EXTSCAN 0x01 |
| 2844 | |
| 2845 | /** |
| 2846 | * flag indicating that the the mgmt frame (probe req/beacon) is received in |
| 2847 | * the context of matched network by FW ENLO |
| 2848 | */ |
| 2849 | #define WMI_MGMT_RX_HDR_ENLO 0x02 |
| 2850 | |
| 2851 | typedef struct { |
| 2852 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */ |
| 2853 | /** channel on which this frame is received. */ |
| 2854 | A_UINT32 channel; |
| 2855 | /** snr information used to cal rssi */ |
| 2856 | A_UINT32 snr; |
| 2857 | /** Rate kbps */ |
| 2858 | A_UINT32 rate; |
| 2859 | /** rx phy mode WLAN_PHY_MODE */ |
| 2860 | A_UINT32 phy_mode; |
| 2861 | /** length of the frame */ |
| 2862 | A_UINT32 buf_len; |
| 2863 | /** rx status */ |
| 2864 | A_UINT32 status; |
| 2865 | /** RSSI of PRI 20MHz for each chain. */ |
| 2866 | A_UINT32 rssi_ctl[ATH_MAX_ANTENNA]; |
| 2867 | /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */ |
| 2868 | A_UINT32 flags; |
| 2869 | /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */ |
| 2870 | A_INT32 rssi; |
| 2871 | |
| 2872 | /** delta between local TSF(TSF timestamp when frame was RXd) |
| 2873 | * and remote TSF(TSF timestamp in the IE for mgmt frame |
| 2874 | * beacon,proberesp for e.g). If remote TSF is not available, |
| 2875 | * delta set to 0. |
| 2876 | * Although tsf_delta is stored as A_UINT32, it can be negative, |
| 2877 | * and thus would need to be sign-extended if added to a value |
| 2878 | * larger than 32 bits. |
| 2879 | */ |
| 2880 | A_UINT32 tsf_delta; |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 2881 | /* |
| 2882 | * The lower 32 bits of the TSF (rx_tsf_l32) is copied by FW from |
| 2883 | * TSF timestamp in the RX MAC descriptor provided by HW. |
| 2884 | */ |
| 2885 | A_UINT32 rx_tsf_l32; |
| 2886 | |
| 2887 | /* |
| 2888 | *The Upper 32 bits (rx_tsf_u32) is filled by reading the TSF register |
| 2889 | * after the packet is received. |
| 2890 | */ |
| 2891 | A_UINT32 rx_tsf_u32; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2892 | /* This TLV is followed by array of bytes: |
| 2893 | * // management frame buffer |
| 2894 | * A_UINT8 bufp[]; |
| 2895 | */ |
| 2896 | } wmi_mgmt_rx_hdr; |
| 2897 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2898 | typedef struct { |
| 2899 | /** TSF timestamp */ |
| 2900 | A_UINT32 tsf_timestamp; |
| 2901 | |
| 2902 | /** |
| 2903 | * Current freq1, freq2 |
| 2904 | * |
| 2905 | * [7:0]: freq1[lo] |
| 2906 | * [15:8] : freq1[hi] |
| 2907 | * [23:16]: freq2[lo] |
| 2908 | * [31:24]: freq2[hi] |
| 2909 | */ |
| 2910 | A_UINT32 freq_info_1; |
| 2911 | |
| 2912 | /** |
| 2913 | * Combined RSSI over all chains and channel width for this PHY error |
| 2914 | * |
| 2915 | * [7:0]: RSSI combined |
| 2916 | * [15:8]: Channel width (MHz) |
| 2917 | * [23:16]: PHY error code |
| 2918 | * [24:16]: reserved (future use) |
| 2919 | */ |
| 2920 | A_UINT32 freq_info_2; |
| 2921 | |
| 2922 | /** |
| 2923 | * RSSI on chain 0 through 3 |
| 2924 | * |
| 2925 | * This is formatted the same as the PPDU_START RX descriptor |
| 2926 | * field: |
| 2927 | * |
| 2928 | * [7:0]: pri20 |
| 2929 | * [15:8]: sec20 |
| 2930 | * [23:16]: sec40 |
| 2931 | * [31:24]: sec80 |
| 2932 | */ |
| 2933 | A_UINT32 rssi_chain0; |
| 2934 | A_UINT32 rssi_chain1; |
| 2935 | A_UINT32 rssi_chain2; |
| 2936 | A_UINT32 rssi_chain3; |
| 2937 | |
| 2938 | /** |
| 2939 | * Last calibrated NF value for chain 0 through 3 |
| 2940 | * |
| 2941 | * nf_list_1: |
| 2942 | * |
| 2943 | * + [15:0] - chain 0 |
| 2944 | * + [31:16] - chain 1 |
| 2945 | * |
| 2946 | * nf_list_2: |
| 2947 | * |
| 2948 | * + [15:0] - chain 2 |
| 2949 | * + [31:16] - chain 3 |
| 2950 | */ |
| 2951 | A_UINT32 nf_list_1; |
| 2952 | A_UINT32 nf_list_2; |
| 2953 | |
| 2954 | /** Length of the frame */ |
| 2955 | A_UINT32 buf_len; |
| 2956 | } wmi_single_phyerr_rx_hdr; |
| 2957 | |
| 2958 | #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff |
| 2959 | #define WMI_UNIFIED_FREQINFO_1_LO_S 0 |
| 2960 | #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00 |
| 2961 | #define WMI_UNIFIED_FREQINFO_1_HI_S 8 |
| 2962 | #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000 |
| 2963 | #define WMI_UNIFIED_FREQINFO_2_LO_S 16 |
| 2964 | #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000 |
| 2965 | #define WMI_UNIFIED_FREQINFO_2_HI_S 24 |
| 2966 | |
| 2967 | /* |
| 2968 | * Please keep in mind that these _SET macros break macro side effect |
| 2969 | * assumptions; don't be clever with them. |
| 2970 | */ |
| 2971 | #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 2972 | (WMI_F_MS((hdr)->freq_info_1, \ |
| 2973 | WMI_UNIFIED_FREQINFO_ ## f ## _LO) \ |
| 2974 | | (WMI_F_MS((hdr)->freq_info_1, \ |
| 2975 | WMI_UNIFIED_FREQINFO_ ## f ## _HI) << 8)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2976 | |
| 2977 | #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \ |
| 2978 | do { \ |
| 2979 | WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \ |
| 2980 | WMI_UNIFIED_FREQINFO_ ## f ## _LO); \ |
| 2981 | WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \ |
| 2982 | WMI_UNIFIED_FREQINFO_ ## f ## _HI); \ |
| 2983 | } while (0) |
| 2984 | |
| 2985 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff |
| 2986 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0 |
| 2987 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00 |
| 2988 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8 |
| 2989 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000 |
| 2990 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16 |
| 2991 | |
| 2992 | #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 2993 | ((int8_t) (WMI_F_MS((hdr)->freq_info_2, \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2994 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB))) |
| 2995 | |
| 2996 | #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \ |
| 2997 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 2998 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB); |
| 2999 | |
| 3000 | #define WMI_UNIFIED_CHWIDTH_GET(hdr) \ |
| 3001 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH) |
| 3002 | |
| 3003 | #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \ |
| 3004 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 3005 | WMI_UNIFIED_FREQINFO_2_CHWIDTH); |
| 3006 | |
| 3007 | #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \ |
| 3008 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE) |
| 3009 | |
| 3010 | #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \ |
| 3011 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 3012 | WMI_UNIFIED_FREQINFO_2_PHYERRCODE); |
| 3013 | |
| 3014 | #define WMI_UNIFIED_CHAIN_0 0x0000ffff |
| 3015 | #define WMI_UNIFIED_CHAIN_0_S 0 |
| 3016 | #define WMI_UNIFIED_CHAIN_1 0xffff0000 |
| 3017 | #define WMI_UNIFIED_CHAIN_1_S 16 |
| 3018 | #define WMI_UNIFIED_CHAIN_2 0x0000ffff |
| 3019 | #define WMI_UNIFIED_CHAIN_2_S 0 |
| 3020 | #define WMI_UNIFIED_CHAIN_3 0xffff0000 |
| 3021 | #define WMI_UNIFIED_CHAIN_3_S 16 |
| 3022 | |
| 3023 | #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1 |
| 3024 | #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1 |
| 3025 | #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2 |
| 3026 | #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2 |
| 3027 | |
| 3028 | #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \ |
| 3029 | ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \ |
| 3030 | WMI_UNIFIED_CHAIN_ ## c))) |
| 3031 | |
| 3032 | #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \ |
| 3033 | WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \ |
| 3034 | WMI_UNIFIED_CHAIN_ ## c); |
| 3035 | |
| 3036 | /* |
| 3037 | * For now, this matches what the underlying hardware is doing. |
| 3038 | * Update ar6000ProcRxDesc() to use these macros when populating |
| 3039 | * the rx descriptor and then we can just copy the field over |
| 3040 | * to the WMI PHY notification without worrying about breaking |
| 3041 | * things. |
| 3042 | */ |
| 3043 | #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff |
| 3044 | #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0 |
| 3045 | #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00 |
| 3046 | #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8 |
| 3047 | #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000 |
| 3048 | #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16 |
| 3049 | #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000 |
| 3050 | #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24 |
| 3051 | |
| 3052 | #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \ |
| 3053 | WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \ |
| 3054 | WMI_UNIFIED_RSSI_CHAN_ ## ch); |
| 3055 | |
| 3056 | #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \ |
| 3057 | ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \ |
| 3058 | WMI_UNIFIED_RSSI_CHAN_ ## ch))) |
| 3059 | |
| 3060 | typedef struct { |
| 3061 | /** Phy error event header */ |
| 3062 | wmi_single_phyerr_rx_hdr hdr; |
| 3063 | /** frame buffer */ |
| 3064 | A_UINT8 bufp[1]; |
| 3065 | } wmi_single_phyerr_rx_event; |
| 3066 | |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3067 | /* PHY ERROR MASK 0 */ |
| 3068 | /* bits 1:0 defined but not published */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 3069 | #define WMI_PHY_ERROR_MASK0_RADAR (1<<2) |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3070 | /* bits 23:3 defined but not published */ |
| 3071 | #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24) |
| 3072 | /* bits 25:24 defined but not published */ |
| 3073 | #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26) |
| 3074 | /* bits 31:27 defined but not published */ |
| 3075 | |
| 3076 | /* PHY ERROR MASK 1 |
| 3077 | * bits 13:0 defined but not published |
| 3078 | * bits 31:14 reserved |
| 3079 | */ |
| 3080 | |
| 3081 | /* PHY ERROR MASK 2 |
| 3082 | * bits 31:0 reserved |
| 3083 | */ |
| 3084 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3085 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3086 | /* TLV tag and len; tag equals |
| 3087 | * WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr |
| 3088 | */ |
| 3089 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3090 | /** Phy error phy error count */ |
| 3091 | A_UINT32 num_phyerr_events; |
| 3092 | A_UINT32 tsf_l32; |
| 3093 | A_UINT32 tsf_u32; |
| 3094 | A_UINT32 buf_len; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3095 | union { |
| 3096 | /* OBSOLETE - will be removed once all refs are gone */ |
| 3097 | A_UINT32 pmac_id; |
| 3098 | /** pdev_id for identifying the MAC |
| 3099 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3100 | */ |
| 3101 | A_UINT32 pdev_id; |
| 3102 | }; |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame] | 3103 | A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */ |
| 3104 | A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */ |
| 3105 | A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */ |
| 3106 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3107 | /* This TLV is followed by array of bytes: |
| 3108 | * // frame buffer - contains multiple payloads in the order: |
| 3109 | * // header - payload, header - payload... |
| 3110 | * (The header is of type: wmi_single_phyerr_rx_hdr) |
| 3111 | * A_UINT8 bufp[]; |
| 3112 | */ |
| 3113 | } wmi_comb_phyerr_rx_hdr; |
| 3114 | |
| 3115 | /* WMI MGMT TX */ |
| 3116 | typedef struct { |
| 3117 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */ |
| 3118 | /** unique id identifying the VDEV, generated by the caller */ |
| 3119 | A_UINT32 vdev_id; |
| 3120 | /** peer MAC address */ |
| 3121 | wmi_mac_addr peer_macaddr; |
| 3122 | /** xmit rate */ |
| 3123 | A_UINT32 tx_rate; |
| 3124 | /** xmit power */ |
| 3125 | A_UINT32 tx_power; |
| 3126 | /** Buffer length in bytes */ |
| 3127 | A_UINT32 buf_len; |
| 3128 | /* This TLV is followed by array of bytes: |
| 3129 | * // management frame buffer |
| 3130 | * A_UINT8 bufp[]; |
| 3131 | */ |
| 3132 | } wmi_mgmt_tx_hdr; |
| 3133 | |
| 3134 | typedef struct { |
| 3135 | /* |
| 3136 | * TLV tag and len; |
| 3137 | * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param |
| 3138 | */ |
| 3139 | A_UINT32 tlv_header; |
| 3140 | A_UINT32 vdev_id; |
| 3141 | /* echoed in tx_compl_event */ |
| 3142 | A_UINT32 desc_id; |
| 3143 | /* MHz units */ |
| 3144 | A_UINT32 chanfreq; |
| 3145 | A_UINT32 paddr_lo; |
| 3146 | A_UINT32 paddr_hi; |
| 3147 | A_UINT32 frame_len; |
| 3148 | /* Buffer length in bytes */ |
| 3149 | A_UINT32 buf_len; |
| 3150 | /* |
| 3151 | * This TLV is followed by array of bytes: |
| 3152 | * First 64 bytes of management frame |
| 3153 | * A_UINT8 bufp[]; |
| 3154 | */ |
| 3155 | } wmi_mgmt_tx_send_cmd_fixed_param; |
| 3156 | |
| 3157 | typedef struct { |
| 3158 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */ |
| 3159 | A_UINT32 value; |
| 3160 | } wmi_echo_event_fixed_param; |
| 3161 | |
| 3162 | typedef struct { |
| 3163 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */ |
| 3164 | A_UINT32 value; |
| 3165 | } wmi_echo_cmd_fixed_param; |
| 3166 | |
| 3167 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3168 | /* TLV tag and len; tag equals |
| 3169 | * WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param |
| 3170 | */ |
| 3171 | A_UINT32 tlv_header; |
| 3172 | /** pdev_id for identifying the MAC |
| 3173 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3174 | */ |
| 3175 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3176 | /** reg domain code */ |
| 3177 | A_UINT32 reg_domain; |
| 3178 | A_UINT32 reg_domain_2G; |
| 3179 | A_UINT32 reg_domain_5G; |
| 3180 | A_UINT32 conformance_test_limit_2G; |
| 3181 | A_UINT32 conformance_test_limit_5G; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3182 | A_UINT32 dfs_domain; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3183 | } wmi_pdev_set_regdomain_cmd_fixed_param; |
| 3184 | |
| 3185 | typedef struct { |
| 3186 | /** true for scan start and flase for scan end */ |
| 3187 | A_UINT32 scan_start; |
| 3188 | } wmi_pdev_scan_cmd; |
| 3189 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 3190 | /* WMI support for setting ratemask in target */ |
| 3191 | |
| 3192 | typedef struct { |
| 3193 | A_UINT32 tlv_header; |
| 3194 | /* |
| 3195 | * TLV tag and len; tag equals |
| 3196 | * WMITLV_TAG_STRUC_wmi_vdev_config_ratemask_fixed_param |
| 3197 | */ |
| 3198 | A_UINT32 vdev_id; |
| 3199 | /* |
| 3200 | * 0 - cck/ofdm |
| 3201 | * 1 - HT |
| 3202 | * 2 - VHT */ |
| 3203 | A_UINT32 type; |
| 3204 | |
| 3205 | A_UINT32 mask_lower32; |
| 3206 | A_UINT32 mask_higher32; |
| 3207 | } wmi_vdev_config_ratemask_cmd_fixed_param; |
| 3208 | |
| 3209 | /* nrp action - Filter Neighbor Rx Packets - add/remove filter */ |
| 3210 | enum { |
| 3211 | WMI_FILTER_NRP_ACTION_ADD = 0x1, |
| 3212 | WMI_FILTER_NRP_ACTION_REMOVE = 0x2, |
| 3213 | WMI_FILTER_NRP_ACTION_GET_LIST = 0x3, |
| 3214 | }; /* nrp - Neighbor Rx Packets */ |
| 3215 | |
| 3216 | /* nrp type - Filter Neighbor Rx Packets - ap/client addr */ |
| 3217 | enum { |
| 3218 | WMI_FILTER_NRP_TYPE_AP_BSSID = 0x1, |
| 3219 | WMI_FILTER_NRP_TYPE_STA_MACADDR = 0x2, |
| 3220 | }; |
| 3221 | |
| 3222 | /* nrp flag - Filter Neighbor Rx Packets |
| 3223 | * (capture flag, 2 & 3 not initially supported) |
| 3224 | */ |
| 3225 | enum { |
| 3226 | WMI_FILTER_NRP_CAPTURE_ONLY_RX_PACKETS = 0x1, |
| 3227 | WMI_FILTER_NRP_CAPTURE_ONLY_TX_PACKETS = 0x2, |
| 3228 | WMI_FILTER_NRP_CAPTURE_BOTH_TXRX_PACKETS = 0x3, |
| 3229 | }; |
| 3230 | |
| 3231 | /* Filter for Neighbor Rx Packets */ |
| 3232 | typedef struct { |
| 3233 | A_UINT32 tlv_header; |
| 3234 | /* |
| 3235 | * TLV tag and len; tag equals |
| 3236 | * WMITLV_TAG_STRUC_wmi_vdev_filter_nrp_config_cmd_fixed_param |
| 3237 | */ |
| 3238 | A_UINT32 vdev_id; |
| 3239 | /* AP Bssid or Client Mac-addr */ |
| 3240 | wmi_mac_addr addr; |
| 3241 | /* Add/Remove NRF Filter */ |
| 3242 | A_UINT32 action; /* WMI_FILTER_NRP_ACTION enum */ |
| 3243 | /* client/ap filter */ |
| 3244 | A_UINT32 type; /* WMI_FILTER_NRP_TYPE enum */ |
| 3245 | /* optional - tx/rx capture */ |
| 3246 | A_UINT32 flag; /* WMI_FILTER_NRP_CAPTURE enum */ |
| 3247 | /* BSSID index - index of the BSSID register */ |
| 3248 | A_UINT32 bssid_idx; |
| 3249 | } wmi_vdev_filter_nrp_config_cmd_fixed_param; |
| 3250 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3251 | /*Command to set/unset chip in quiet mode*/ |
| 3252 | typedef struct { |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 3253 | /* |
| 3254 | * TLV tag and len; tag equals |
| 3255 | * WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param |
| 3256 | */ |
| 3257 | A_UINT32 tlv_header; |
| 3258 | /* |
| 3259 | * pdev_id for identifying the MAC, See macros |
| 3260 | * starting with WMI_PDEV_ID_ for values. |
| 3261 | */ |
| 3262 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3263 | A_UINT32 period; /*period in TUs */ |
| 3264 | A_UINT32 duration; /*duration in TUs */ |
| 3265 | A_UINT32 next_start; /*offset in TUs */ |
| 3266 | A_UINT32 enabled; /*enable/disable */ |
| 3267 | } wmi_pdev_set_quiet_cmd_fixed_param; |
| 3268 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3269 | typedef struct { |
| 3270 | /* TLV tag and len; tag equals |
| 3271 | * WMITLV_TAG_STRUC_wmi_vdev_set_quiet_cmd_fixed_param |
| 3272 | */ |
| 3273 | A_UINT32 tlv_header; |
| 3274 | A_UINT32 vdev_id; /* Virtual interface ID */ |
| 3275 | A_UINT32 period; /* period in TUs */ |
| 3276 | A_UINT32 duration; /* duration in TUs */ |
| 3277 | A_UINT32 next_start; /* offset in TUs */ |
| 3278 | A_UINT32 enabled; /* enable/disable */ |
| 3279 | } wmi_vdev_set_quiet_cmd_fixed_param; |
| 3280 | |
Krishna Kumaar Natarajan | ea0a796 | 2016-04-16 14:09:09 +0530 | [diff] [blame] | 3281 | typedef struct { |
| 3282 | /* |
| 3283 | * TLV tag and len; tag equals |
| 3284 | * WMITLV_TAG_STRUC_wmi_vdev_set_custom_aggr_size_cmd_fixed_param |
| 3285 | */ |
| 3286 | A_UINT32 tlv_header; |
| 3287 | /* |
| 3288 | * vdev id indicating to which the vdev custom aggregation size |
| 3289 | * will be applied. |
| 3290 | */ |
| 3291 | A_UINT32 vdev_id; |
| 3292 | /* |
| 3293 | * Size for tx aggregation (max MPDUs per A-MPDU) for the vdev |
| 3294 | * mentioned in vdev id |
| 3295 | */ |
| 3296 | A_UINT32 tx_aggr_size; |
| 3297 | /* |
| 3298 | * Size for rx aggregation (block ack window size limit) for |
| 3299 | * the vdev mentioned in vdev id |
| 3300 | */ |
| 3301 | A_UINT32 rx_aggr_size; |
| 3302 | } wmi_vdev_set_custom_aggr_size_cmd_fixed_param; |
| 3303 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3304 | /* |
| 3305 | * Command to enable/disable Green AP Power Save. |
| 3306 | * This helps conserve power during AP operation. When the AP has no |
| 3307 | * stations associated with it, the host can enable Green AP Power Save |
| 3308 | * to request the firmware to shut down all but one transmit and receive |
| 3309 | * chains. |
| 3310 | */ |
| 3311 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3312 | /** TLV tag and len; tag equals |
| 3313 | * WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param |
| 3314 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3315 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3316 | /** pdev_id for identifying the MAC |
| 3317 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3318 | */ |
| 3319 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3320 | A_UINT32 enable; /*1:enable, 0:disable */ |
| 3321 | } wmi_pdev_green_ap_ps_enable_cmd_fixed_param; |
| 3322 | |
| 3323 | #define MAX_HT_IE_LEN 32 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3324 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3325 | typedef struct { |
| 3326 | A_UINT32 tlv_header; |
| 3327 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */ |
| 3328 | A_UINT32 reserved0; |
| 3329 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3330 | A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */ |
| 3331 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 3332 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 3333 | /** The TLV for the HT IE follows: |
| 3334 | * A_UINT32 ie_data[]; |
| 3335 | */ |
| 3336 | } wmi_pdev_set_ht_ie_cmd_fixed_param; |
| 3337 | |
| 3338 | #define MAX_VHT_IE_LEN 32 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3339 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3340 | typedef struct { |
| 3341 | A_UINT32 tlv_header; |
| 3342 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */ |
| 3343 | A_UINT32 reserved0; |
| 3344 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3345 | A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */ |
| 3346 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 3347 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 3348 | /** The TLV for the VHT IE follows: |
| 3349 | * A_UINT32 ie_data[]; |
| 3350 | */ |
| 3351 | } wmi_pdev_set_vht_ie_cmd_fixed_param; |
| 3352 | |
| 3353 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3354 | /** TLV tag and len; tag equals |
| 3355 | * WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param |
| 3356 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3357 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3358 | /** pdev_id for identifying the MAC |
| 3359 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3360 | */ |
| 3361 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3362 | wmi_mac_addr base_macaddr; |
| 3363 | } wmi_pdev_set_base_macaddr_cmd_fixed_param; |
| 3364 | |
| 3365 | /* |
| 3366 | * For now, the spectral configuration is global rather than |
| 3367 | * per-vdev. The vdev is a placeholder and will be ignored |
| 3368 | * by the firmware. |
| 3369 | */ |
| 3370 | typedef struct { |
| 3371 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */ |
| 3372 | A_UINT32 vdev_id; |
| 3373 | A_UINT32 spectral_scan_count; |
| 3374 | A_UINT32 spectral_scan_period; |
| 3375 | A_UINT32 spectral_scan_priority; |
| 3376 | A_UINT32 spectral_scan_fft_size; |
| 3377 | A_UINT32 spectral_scan_gc_ena; |
| 3378 | A_UINT32 spectral_scan_restart_ena; |
| 3379 | A_UINT32 spectral_scan_noise_floor_ref; |
| 3380 | A_UINT32 spectral_scan_init_delay; |
| 3381 | A_UINT32 spectral_scan_nb_tone_thr; |
| 3382 | A_UINT32 spectral_scan_str_bin_thr; |
| 3383 | A_UINT32 spectral_scan_wb_rpt_mode; |
| 3384 | A_UINT32 spectral_scan_rssi_rpt_mode; |
| 3385 | A_UINT32 spectral_scan_rssi_thr; |
| 3386 | A_UINT32 spectral_scan_pwr_format; |
| 3387 | A_UINT32 spectral_scan_rpt_mode; |
| 3388 | A_UINT32 spectral_scan_bin_scale; |
| 3389 | A_UINT32 spectral_scan_dBm_adj; |
| 3390 | A_UINT32 spectral_scan_chn_mask; |
| 3391 | } wmi_vdev_spectral_configure_cmd_fixed_param; |
| 3392 | |
| 3393 | /* |
| 3394 | * Enabling, disabling and triggering the spectral scan |
| 3395 | * is a per-vdev operation. That is, it will set channel |
| 3396 | * flags per vdev rather than globally; so concurrent scan/run |
| 3397 | * and multiple STA (eg p2p, tdls, multi-band STA) is possible. |
| 3398 | */ |
| 3399 | typedef struct { |
| 3400 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */ |
| 3401 | A_UINT32 vdev_id; |
| 3402 | /* 0 - ignore; 1 - trigger, 2 - clear trigger */ |
| 3403 | A_UINT32 trigger_cmd; |
| 3404 | /* 0 - ignore; 1 - enable, 2 - disable */ |
| 3405 | A_UINT32 enable_cmd; |
| 3406 | } wmi_vdev_spectral_enable_cmd_fixed_param; |
| 3407 | |
| 3408 | typedef enum { |
| 3409 | WMI_CSA_IE_PRESENT = 0x00000001, |
| 3410 | WMI_XCSA_IE_PRESENT = 0x00000002, |
| 3411 | WMI_WBW_IE_PRESENT = 0x00000004, |
| 3412 | WMI_CSWARP_IE_PRESENT = 0x00000008, |
| 3413 | } WMI_CSA_EVENT_IES_PRESENT_FLAG; |
| 3414 | |
| 3415 | /* wmi CSA receive event from beacon frame */ |
| 3416 | typedef struct { |
| 3417 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */ |
| 3418 | A_UINT32 i_fc_dur; |
| 3419 | /* Bit 0-15: FC */ |
| 3420 | /* Bit 16-31: DUR */ |
| 3421 | wmi_mac_addr i_addr1; |
| 3422 | wmi_mac_addr i_addr2; |
| 3423 | /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be |
| 3424 | * changed in the future without breaking WMI compatibility */ |
| 3425 | A_UINT32 csa_ie[2]; |
| 3426 | A_UINT32 xcsa_ie[2]; |
| 3427 | A_UINT32 wb_ie[2]; |
| 3428 | A_UINT32 cswarp_ie; |
| 3429 | A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */ |
| 3430 | } wmi_csa_event_fixed_param; |
| 3431 | |
| 3432 | typedef enum { |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3433 | WAL_PEER_MCAST2UCAST_DISABLED = 0, |
| 3434 | /* Drop the frames if match is not found */ |
| 3435 | WAL_PEER_MCAST2UCAST_DROP_EMPTY = 1, |
| 3436 | /* Send as mcast if match is not found */ |
| 3437 | WAL_PEER_MCAST2UCAST_MCAST_EMPTY = 2, |
| 3438 | } WMI_PEER_MCAST2UCAST_MODE; |
| 3439 | |
| 3440 | typedef enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3441 | /** TX chain mask */ |
| 3442 | WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
| 3443 | /** RX chain mask */ |
| 3444 | WMI_PDEV_PARAM_RX_CHAIN_MASK, |
| 3445 | /** TX power limit for 2G Radio */ |
| 3446 | WMI_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 3447 | /** TX power limit for 5G Radio */ |
| 3448 | WMI_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 3449 | /** TX power scale */ |
| 3450 | WMI_PDEV_PARAM_TXPOWER_SCALE, |
| 3451 | /** Beacon generation mode . 0: host, 1: target */ |
| 3452 | WMI_PDEV_PARAM_BEACON_GEN_MODE, |
| 3453 | /** Beacon generation mode . 0: staggered 1: bursted */ |
| 3454 | WMI_PDEV_PARAM_BEACON_TX_MODE, |
| 3455 | /** Resource manager off chan mode . |
| 3456 | * 0: turn off off chan mode. 1: turn on offchan mode |
| 3457 | */ |
| 3458 | WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 3459 | /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */ |
| 3460 | WMI_PDEV_PARAM_PROTECTION_MODE, |
| 3461 | /** Dynamic bandwidth 0: disable 1: enable */ |
| 3462 | WMI_PDEV_PARAM_DYNAMIC_BW, |
| 3463 | /** Non aggregrate/ 11g sw retry threshold.0-disable */ |
| 3464 | WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 3465 | /** aggregrate sw retry threshold. 0-disable*/ |
| 3466 | WMI_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 3467 | /** Station kickout threshold (non of consecutive failures).0-disable */ |
| 3468 | WMI_PDEV_PARAM_STA_KICKOUT_TH, |
| 3469 | /** Aggerate size scaling configuration per AC */ |
| 3470 | WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 3471 | /** LTR enable */ |
| 3472 | WMI_PDEV_PARAM_LTR_ENABLE, |
| 3473 | /** LTR latency for BE, in us */ |
| 3474 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 3475 | /** LTR latency for BK, in us */ |
| 3476 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 3477 | /** LTR latency for VI, in us */ |
| 3478 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 3479 | /** LTR latency for VO, in us */ |
| 3480 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 3481 | /** LTR AC latency timeout, in ms */ |
| 3482 | WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 3483 | /** LTR platform latency override, in us */ |
| 3484 | WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 3485 | /** LTR-M override, in us */ |
| 3486 | WMI_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 3487 | /** Tx activity timeout for LTR, in us */ |
| 3488 | WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 3489 | /** L1SS state machine enable */ |
| 3490 | WMI_PDEV_PARAM_L1SS_ENABLE, |
| 3491 | /** Deep sleep state machine enable */ |
| 3492 | WMI_PDEV_PARAM_DSLEEP_ENABLE, |
| 3493 | /** RX buffering flush enable */ |
| 3494 | WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| 3495 | /** RX buffering matermark */ |
| 3496 | WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| 3497 | /** RX buffering timeout enable */ |
| 3498 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| 3499 | /** RX buffering timeout value */ |
| 3500 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| 3501 | /** pdev level stats update period in ms */ |
| 3502 | WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 3503 | /** vdev level stats update period in ms */ |
| 3504 | WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 3505 | /** peer level stats update period in ms */ |
| 3506 | WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 3507 | /** beacon filter status update period */ |
| 3508 | WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 3509 | /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */ |
| 3510 | WMI_PDEV_PARAM_PMF_QOS, |
| 3511 | /** Access category on which ARP frames are sent */ |
| 3512 | WMI_PDEV_PARAM_ARP_AC_OVERRIDE, |
| 3513 | /** DCS configuration */ |
| 3514 | WMI_PDEV_PARAM_DCS, |
| 3515 | /** Enable/Disable ANI on target */ |
| 3516 | WMI_PDEV_PARAM_ANI_ENABLE, |
| 3517 | /** configure the ANI polling period */ |
| 3518 | WMI_PDEV_PARAM_ANI_POLL_PERIOD, |
| 3519 | /** configure the ANI listening period */ |
| 3520 | WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 3521 | /** configure OFDM immunity level */ |
| 3522 | WMI_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 3523 | /** configure CCK immunity level */ |
| 3524 | WMI_PDEV_PARAM_ANI_CCK_LEVEL, |
| 3525 | /** Enable/Disable CDD for 1x1 STAs in rate control module */ |
| 3526 | WMI_PDEV_PARAM_DYNTXCHAIN, |
| 3527 | /** Enable/Disable proxy STA */ |
| 3528 | WMI_PDEV_PARAM_PROXY_STA, |
| 3529 | /** Enable/Disable low power state when all VDEVs are inactive/idle. */ |
| 3530 | WMI_PDEV_PARAM_IDLE_PS_CONFIG, |
| 3531 | /** Enable/Disable power gating sleep */ |
| 3532 | WMI_PDEV_PARAM_POWER_GATING_SLEEP, |
| 3533 | /** Enable/Disable Rfkill */ |
| 3534 | WMI_PDEV_PARAM_RFKILL_ENABLE, |
| 3535 | /** Set Bursting DUR */ |
| 3536 | WMI_PDEV_PARAM_BURST_DUR, |
| 3537 | /** Set Bursting ENABLE */ |
| 3538 | WMI_PDEV_PARAM_BURST_ENABLE, |
| 3539 | /** HW rfkill config */ |
| 3540 | WMI_PDEV_PARAM_HW_RFKILL_CONFIG, |
| 3541 | /** Enable radio low power features */ |
| 3542 | WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, |
| 3543 | /** L1SS entry and residency time track */ |
| 3544 | WMI_PDEV_PARAM_L1SS_TRACK, |
| 3545 | /** set hyst at runtime, requirement from SS */ |
| 3546 | WMI_PDEV_PARAM_HYST_EN, |
| 3547 | /** Enable/ Disable POWER COLLAPSE */ |
| 3548 | WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, |
| 3549 | /** configure LED system state */ |
| 3550 | WMI_PDEV_PARAM_LED_SYS_STATE, |
| 3551 | /** Enable/Disable LED */ |
| 3552 | WMI_PDEV_PARAM_LED_ENABLE, |
| 3553 | /** set DIRECT AUDIO time latency */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3554 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3555 | /** set DIRECT AUDIO Feature ENABLE */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3556 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3557 | /** pdev level whal mib stats update enable */ |
| 3558 | WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, |
| 3559 | /** ht/vht info based on vdev */ |
| 3560 | WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, |
| 3561 | /** Set CTS channel BW for dynamic BW adjustment feature */ |
| 3562 | WMI_PDEV_PARAM_CTS_CBW, |
| 3563 | /** Set GPIO pin info used by WNTS */ |
| 3564 | WMI_PDEV_PARAM_WNTS_CONFIG, |
| 3565 | /** Enable/Disable hardware adaptive early rx feature */ |
| 3566 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, |
| 3567 | /** The minimum early rx duration, to ensure early rx duration is non-zero */ |
| 3568 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, |
| 3569 | /** Increasing/decreasing step used by hardware */ |
| 3570 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, |
| 3571 | /** The fixed early rx duration when adaptive early rx is disabled */ |
| 3572 | WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, |
| 3573 | /** Enable/Disable bmiss based adaptive beacon timeout feature */ |
| 3574 | WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, |
| 3575 | /* |
| 3576 | * The minimum beacon timeout duration, to ensure beacon timeout |
| 3577 | * duration is non-zero |
| 3578 | */ |
| 3579 | WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, |
| 3580 | /** Increasing/decreasing step used by hardware */ |
| 3581 | WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, |
| 3582 | /* |
| 3583 | * The fixed beacon timeout duration when bmiss based adaptive beacon |
| 3584 | * timeout is disabled |
| 3585 | */ |
| 3586 | WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, |
| 3587 | /* |
| 3588 | * Enable/Disable Congestion Estimator based adaptive beacon |
| 3589 | * timeout feature */ |
| 3590 | WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, |
| 3591 | /* |
| 3592 | * combo value of ce_id, ce_threshold, ce_time, refer |
| 3593 | * to WMI_CE_BTO_CE_ID_MASK |
| 3594 | */ |
| 3595 | WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, |
| 3596 | /** 2G TX chain mask */ |
| 3597 | WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, |
| 3598 | /** 2G RX chain mask */ |
| 3599 | WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, |
| 3600 | /** 5G TX chain mask */ |
| 3601 | WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, |
| 3602 | /** 5G RX chain mask */ |
| 3603 | WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, |
| 3604 | /* Set tx chain mask for CCK rates */ |
| 3605 | WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, |
| 3606 | /* Set tx chain mask for 1SS stream */ |
| 3607 | WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, |
Nirav Shah | e1e4a81 | 2015-11-05 11:15:54 +0530 | [diff] [blame] | 3608 | /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/ |
| 3609 | WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 3610 | /* TX power backoff in dB: tx power -= param value |
| 3611 | * Host passes values(DB) to Halphy, Halphy reduces the power table by |
| 3612 | * the values. Safety check will happen in Halphy |
| 3613 | */ |
| 3614 | WMI_PDEV_PARAM_TXPOWER_DECR_DB, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 3615 | /** enable and disable aggregate burst along with duration */ |
| 3616 | WMI_PDEV_PARAM_AGGR_BURST, |
| 3617 | /** Set the global RX decap mode */ |
| 3618 | WMI_PDEV_PARAM_RX_DECAP_MODE, |
| 3619 | /** Enable/Disable Fast channel reset */ |
| 3620 | WMI_PDEV_PARAM_FAST_CHANNEL_RESET, |
| 3621 | /** Default antenna for Smart antenna */ |
| 3622 | WMI_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, |
| 3623 | /** Set the user-specified antenna gain */ |
| 3624 | WMI_PDEV_PARAM_ANTENNA_GAIN, |
| 3625 | /** Set the user-specified RX filter */ |
| 3626 | WMI_PDEV_PARAM_RX_FILTER, |
| 3627 | /* |
| 3628 | * configure the user-specified MCAST tid for managed mcast feature |
| 3629 | * 0-15 is the valid range. 0xff will clear the tid setting |
| 3630 | */ |
| 3631 | WMI_PDEV_SET_MCAST_TO_UCAST_TID, |
| 3632 | /** Enable/Disable Proxy sta mode */ |
| 3633 | WMI_PDEV_PARAM_PROXY_STA_MODE, |
| 3634 | /* |
| 3635 | * configure the mcast2ucast mode for the pdev->peer_mcast. |
| 3636 | * See WMI_PEER_MCAST2UCAST_MODE for possible values |
| 3637 | */ |
| 3638 | WMI_PDEV_PARAM_SET_MCAST2UCAST_MODE, |
| 3639 | /** Sets the Mcast buffers for cloning, to support Mcast enhancement */ |
| 3640 | WMI_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, |
| 3641 | /** Remove the Mcast buffers added by host */ |
| 3642 | WMI_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, |
| 3643 | /** En/disable station power save state indication */ |
| 3644 | WMI_PDEV_PEER_STA_PS_STATECHG_ENABLE, |
| 3645 | /** Access category on which ARP frames are sent */ |
| 3646 | WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, |
| 3647 | /** allow or disallow interbss frame forwarding */ |
| 3648 | WMI_PDEV_PARAM_BLOCK_INTERBSS, |
| 3649 | /** Enable/Disable reset */ |
| 3650 | WMI_PDEV_PARAM_SET_DISABLE_RESET_CMDID, |
| 3651 | /** Enable/Disable/Set MSDU_TTL in milliseconds. */ |
| 3652 | WMI_PDEV_PARAM_SET_MSDU_TTL_CMDID, |
| 3653 | /** Set global PPDU duration limit (usec). */ |
| 3654 | WMI_PDEV_PARAM_SET_PPDU_DURATION_CMDID, |
| 3655 | /** set txbf sounding period of vap in milliseconds */ |
| 3656 | WMI_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, |
| 3657 | /** Set promiscuous mode */ |
| 3658 | WMI_PDEV_PARAM_SET_PROMISC_MODE_CMDID, |
| 3659 | /** Set burst mode */ |
| 3660 | WMI_PDEV_PARAM_SET_BURST_MODE_CMDID, |
| 3661 | /** enable enhanced stats */ |
| 3662 | WMI_PDEV_PARAM_EN_STATS, |
| 3663 | /** Set mu-grouping policy */ |
| 3664 | WMI_PDEV_PARAM_MU_GROUP_POLICY, |
| 3665 | /** Channel Hopping Enable */ |
| 3666 | WMI_PDEV_PARAM_NOISE_DETECTION, |
| 3667 | /** Set Channel Hopping NF threshold in dBm */ |
| 3668 | WMI_PDEV_PARAM_NOISE_THRESHOLD, |
| 3669 | /** Set PAPRD policy */ |
| 3670 | WMI_PDEV_PARAM_DPD_ENABLE, |
| 3671 | /** Enable/disable mcast/bcast echo, used by ProxySTA */ |
| 3672 | WMI_PDEV_PARAM_SET_MCAST_BCAST_ECHO, |
| 3673 | /** ATF enable/disable strict schedule */ |
| 3674 | WMI_PDEV_PARAM_ATF_STRICT_SCH, |
| 3675 | /** ATF set access category duration, B0-B29 duration, B30-B31: AC */ |
| 3676 | WMI_PDEV_PARAM_ATF_SCHED_DURATION, |
| 3677 | /** Default antenna polarization */ |
| 3678 | WMI_PDEV_PARAM_ANT_PLZN, |
| 3679 | /** Set mgmt retry limit */ |
| 3680 | WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, |
| 3681 | /** Set CCA sensitivity level in dBm */ |
| 3682 | WMI_PDEV_PARAM_SENSITIVITY_LEVEL, |
| 3683 | /** Set 2G positive and negative Tx power in 0.5dBm units */ |
| 3684 | WMI_PDEV_PARAM_SIGNED_TXPOWER_2G, |
| 3685 | /** Set 5G positive and negative Tx power in 0.5dBm units */ |
| 3686 | WMI_PDEV_PARAM_SIGNED_TXPOWER_5G, |
| 3687 | /** Enable/disble AMSDU for tids */ |
| 3688 | WMI_PDEV_PARAM_ENABLE_PER_TID_AMSDU, |
| 3689 | /** Enable/disable AMPDU for tids */ |
| 3690 | WMI_PDEV_PARAM_ENABLE_PER_TID_AMPDU, |
| 3691 | /** Set CCA threshold in dBm */ |
| 3692 | WMI_PDEV_PARAM_CCA_THRESHOLD, |
| 3693 | /** RTS Fixed rate setting */ |
| 3694 | WMI_PDEV_PARAM_RTS_FIXED_RATE, |
| 3695 | /** Pdev reset */ |
| 3696 | WMI_PDEV_PARAM_PDEV_RESET, |
| 3697 | /** wapi mbssid offset **/ |
| 3698 | WMI_PDEV_PARAM_WAPI_MBSSID_OFFSET, |
| 3699 | /** ARP DEBUG source address*/ |
| 3700 | WMI_PDEV_PARAM_ARP_DBG_SRCADDR, |
| 3701 | /** ARP DEBUG destination address*/ |
| 3702 | WMI_PDEV_PARAM_ARP_DBG_DSTADDR, |
| 3703 | /** ATF enable/disable obss noise scheduling */ |
| 3704 | WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCH, |
| 3705 | /** ATF obss noise scaling factor */ |
| 3706 | WMI_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR, |
| 3707 | /** |
| 3708 | * TX power reduction scaling exponent - final tx power is the |
| 3709 | * nominal tx power (A_MIN(reg_pow,ctl,etc..)) divided by |
| 3710 | * 2^(scale exponent). For example: |
| 3711 | * If this scale exponent is 0, the power is unchanged (divided by 2^0) |
| 3712 | * If this factor is 1, the power is scaled down by 2^1, i.e. 3 dB |
| 3713 | * If this factor is 2, the power is scaled down by 2^2, i.e. 6 dB |
| 3714 | * If this factor is 3, the power is scaled down by 2^3, i.e. 9 dB |
| 3715 | */ |
| 3716 | WMI_PDEV_PARAM_CUST_TXPOWER_SCALE, |
| 3717 | /** ATF enabe/disabe dynamically */ |
| 3718 | WMI_PDEV_PARAM_ATF_DYNAMIC_ENABLE, |
| 3719 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3720 | } WMI_PDEV_PARAM; |
| 3721 | |
| 3722 | typedef enum { |
| 3723 | /** Set the loglevel */ |
| 3724 | WMI_DBGLOG_LOG_LEVEL = 0x1, |
| 3725 | /** Enable VAP level debug */ |
| 3726 | WMI_DBGLOG_VAP_ENABLE, |
| 3727 | /** Disable VAP level debug */ |
| 3728 | WMI_DBGLOG_VAP_DISABLE, |
| 3729 | /** Enable MODULE level debug */ |
| 3730 | WMI_DBGLOG_MODULE_ENABLE, |
| 3731 | /** Disable MODULE level debug */ |
| 3732 | WMI_DBGLOG_MODULE_DISABLE, |
| 3733 | /** Enable MODULE level debug */ |
| 3734 | WMI_DBGLOG_MOD_LOG_LEVEL, |
| 3735 | /** set type of the debug output */ |
| 3736 | WMI_DBGLOG_TYPE, |
| 3737 | /** Enable Disable debug */ |
| 3738 | WMI_DBGLOG_REPORT_ENABLE |
| 3739 | } WMI_DBG_PARAM; |
| 3740 | |
| 3741 | /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */ |
| 3742 | typedef enum { |
| 3743 | WMI_CTS_CBW_INVALID = 0, |
| 3744 | WMI_CTS_CBW_20, |
| 3745 | WMI_CTS_CBW_40, |
| 3746 | WMI_CTS_CBW_80, |
| 3747 | WMI_CTS_CBW_80_80, |
| 3748 | WMI_CTS_CBW_160, |
| 3749 | } WMI_CTS_CBW; |
| 3750 | |
| 3751 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3752 | /** TLV tag and len; tag equals |
| 3753 | * WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param |
| 3754 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3755 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3756 | /** pdev_id for identifying the MAC |
| 3757 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3758 | */ |
| 3759 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3760 | /** parameter id */ |
| 3761 | A_UINT32 param_id; |
| 3762 | /** parametr value */ |
| 3763 | A_UINT32 param_value; |
| 3764 | } wmi_pdev_set_param_cmd_fixed_param; |
| 3765 | |
| 3766 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3767 | /** TLV tag and len; tag equals |
| 3768 | * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param |
| 3769 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3770 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3771 | /** pdev_id for identifying the MAC |
| 3772 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3773 | */ |
| 3774 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3775 | /** parameter */ |
| 3776 | A_UINT32 param; |
| 3777 | } wmi_pdev_get_tpc_config_cmd_fixed_param; |
| 3778 | |
| 3779 | #define WMI_FAST_DIVERSITY_BIT_OFFSET 0 |
| 3780 | #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1 |
| 3781 | |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 3782 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT 2 |
| 3783 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK \ |
| 3784 | (0xf << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) |
| 3785 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_GET_BITS(word32) \ |
| 3786 | (((word32) & WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK) >> \ |
| 3787 | WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) |
| 3788 | #define WMI_SLOW_DIVERSITY_CH0_WEIGHT_SET_BITS(word32, value) \ |
| 3789 | do { \ |
| 3790 | (word32) &= ~WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \ |
| 3791 | (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH0_WEIGHT_SHIFT) & \ |
| 3792 | WMI_SLOW_DIVERSITY_CH0_WEIGHT_MASK; \ |
| 3793 | } while (0) |
| 3794 | |
| 3795 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT 6 |
| 3796 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK \ |
| 3797 | (0xf << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) |
| 3798 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_GET_BITS(word32) \ |
| 3799 | (((word32) & WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK) >> \ |
| 3800 | WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) |
| 3801 | #define WMI_SLOW_DIVERSITY_CH1_WEIGHT_SET_BITS(word32, value) \ |
| 3802 | do { \ |
| 3803 | (word32) &= ~WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \ |
| 3804 | (word32) |= ((value) << WMI_SLOW_DIVERSITY_CH1_WEIGHT_SHIFT) & \ |
| 3805 | WMI_SLOW_DIVERSITY_CH1_WEIGHT_MASK; \ |
| 3806 | } while (0) |
| 3807 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3808 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3809 | /** TLV tag and len; tag equals |
| 3810 | * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param |
| 3811 | */ |
| 3812 | A_UINT32 tlv_header; |
| 3813 | union { |
| 3814 | /* OBSOLETE - will be removed once all refs are gone */ |
| 3815 | A_UINT32 mac_id; |
| 3816 | /** pdev_id for identifying the MAC |
| 3817 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3818 | */ |
| 3819 | A_UINT32 pdev_id; |
| 3820 | }; |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 3821 | /* |
| 3822 | * The following "value" field is divided into bit fields as follows: |
| 3823 | * bits | purpose |
| 3824 | * -----+--------------------------------------- |
| 3825 | * 0 | enable/disable FAST diversity |
| 3826 | * 1 | enable/disable SLOW diversity |
| 3827 | * 5:2 | chain0 slow-diversity weighting factor |
| 3828 | * 9:6 | chain1 slow-diversity weighting factor |
| 3829 | * 31:10| currenty unused (set to 0x0) |
| 3830 | * Refer to the above WMI_[FAST/SLOW]_DIVERSITY constants. |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3831 | */ |
| 3832 | A_UINT32 value; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3833 | } wmi_pdev_set_antenna_diversity_cmd_fixed_param; |
| 3834 | |
| 3835 | #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3 |
| 3836 | |
| 3837 | typedef struct { |
| 3838 | /* |
| 3839 | * TLV tag and len; tag equals |
| 3840 | * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param |
| 3841 | */ |
| 3842 | A_UINT32 tlv_header; |
| 3843 | /* vdev_id, where RSSI monitoring will take place */ |
| 3844 | A_UINT32 vdev_id; |
| 3845 | /* |
| 3846 | * host will configure request_id and firmware echo |
| 3847 | * this id in RSSI_BREACH_EVENT |
| 3848 | */ |
| 3849 | A_UINT32 request_id; |
| 3850 | /* |
| 3851 | * bit [0-2] = low_rssi_breach_enabled[0-2] |
| 3852 | * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] |
| 3853 | */ |
| 3854 | A_UINT32 enabled_bitmap; |
| 3855 | /* unit dBm. host driver to make sure [0] > [1] > [2] */ |
| 3856 | A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3857 | /* unit dBm. host driver to make sure [0] < [1] < [2] */ |
| 3858 | A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3859 | /* |
| 3860 | * unit dBm. once low rssi[] breached, same event |
| 3861 | * bitmap will be generated only after signal gets better |
| 3862 | * than this level. This value is adopted for all low_rssi_breach_threshold[3] |
| 3863 | */ |
| 3864 | A_UINT32 lo_rssi_reenable_hysteresis; |
| 3865 | /* |
| 3866 | * unit dBm. once hi rssi[] breached, same event bitmap |
| 3867 | * will be generated only after signal gets worse than this |
| 3868 | * level. This value is adopted for all hi_rssi_breach_threshold[3] |
| 3869 | */ |
| 3870 | A_UINT32 hi_rssi_reenable_histeresis; |
| 3871 | /* |
| 3872 | * After last event is generated, we wait |
| 3873 | * until this interval to generate next event |
| 3874 | */ |
| 3875 | A_UINT32 min_report_interval; |
| 3876 | /* this is to suppress number of event to be generated */ |
| 3877 | A_UINT32 max_num_report; |
| 3878 | } wmi_rssi_breach_monitor_config_fixed_param; |
| 3879 | |
| 3880 | typedef struct { |
| 3881 | /** parameter */ |
| 3882 | A_UINT32 param; |
| 3883 | } wmi_pdev_dump_cmd; |
| 3884 | |
| 3885 | typedef enum { |
| 3886 | PAUSE_TYPE_CHOP = 0x1, |
| 3887 | /** for MCC (switch channel), only vdev_map is valid */ |
| 3888 | PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */ |
| 3889 | PAUSE_TYPE_UAPSD = 0x3, |
| 3890 | /** for uapsd, only peer_id and tid_map are valid. */ |
| 3891 | PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, |
| 3892 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 3893 | PAUSE_TYPE_P2P_GO_PS = 0x5, |
| 3894 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 3895 | PAUSE_TYPE_STA_ADD_BA = 0x6, |
| 3896 | /** only peer_id and tid_map are valid, actually only one tid is set at one time */ |
| 3897 | PAUSE_TYPE_AP_PS = 0x7, |
| 3898 | /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */ |
| 3899 | PAUSE_TYPE_IBSS_PS = 0x8, |
| 3900 | /** 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] | 3901 | PAUSE_TYPE_CHOP_TDLS_OFFCHAN = 0x9, |
| 3902 | /* |
| 3903 | * for TDLS offchannel MCC (switch channel), only vdev_map is valid, |
| 3904 | * TDLS connection tracker needs to be notified |
| 3905 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3906 | PAUSE_TYPE_HOST = 0x15, |
| 3907 | /** host is requesting vdev pause */ |
| 3908 | } wmi_tx_pause_type; |
| 3909 | |
| 3910 | typedef enum { |
| 3911 | ACTION_PAUSE = 0x0, |
| 3912 | ACTION_UNPAUSE = 0x1, |
| 3913 | } wmi_tx_pause_action; |
| 3914 | |
| 3915 | typedef struct { |
| 3916 | A_UINT32 tlv_header; |
| 3917 | A_UINT32 pause_type; |
| 3918 | A_UINT32 action; |
| 3919 | A_UINT32 vdev_map; |
| 3920 | A_UINT32 peer_id; |
| 3921 | A_UINT32 tid_map; |
| 3922 | } wmi_tx_pause_event_fixed_param; |
| 3923 | |
| 3924 | typedef enum { |
| 3925 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0, |
| 3926 | WMI_MGMT_TX_COMP_TYPE_DISCARD, |
| 3927 | WMI_MGMT_TX_COMP_TYPE_INSPECT, |
| 3928 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK, |
| 3929 | WMI_MGMT_TX_COMP_TYPE_MAX, |
| 3930 | } WMI_MGMT_TX_COMP_STATUS_TYPE; |
| 3931 | |
| 3932 | typedef struct { |
| 3933 | A_UINT32 tlv_header; |
| 3934 | A_UINT32 desc_id; /* from tx_send_cmd */ |
| 3935 | A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */ |
| 3936 | } wmi_mgmt_tx_compl_event_fixed_param; |
| 3937 | |
Pradeep Reddy POTTETI | 67c778a | 2016-06-20 14:00:38 +0530 | [diff] [blame] | 3938 | typedef struct { |
| 3939 | A_UINT32 tlv_header; |
| 3940 | A_UINT32 num_reports; |
| 3941 | /* tlv for completion |
| 3942 | * A_UINT32 desc_ids[num_reports]; <- from tx_send_cmd |
| 3943 | * A_UINT32 status[num_reports]; <- WMI_MGMT_TX_COMP_STATUS_TYPE |
| 3944 | */ |
| 3945 | } wmi_mgmt_tx_compl_bundle_event_fixed_param; |
| 3946 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3947 | #define WMI_TPC_RATE_MAX 160 |
| 3948 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */ |
| 3949 | #define WMI_TPC_TX_NUM_CHAIN 4 |
| 3950 | |
| 3951 | typedef enum { |
| 3952 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, |
| 3953 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, |
| 3954 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, |
| 3955 | } WMI_TPC_CONFIG_EVENT_FLAG; |
| 3956 | |
| 3957 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3958 | /* TLV tag and len; tag equals |
| 3959 | * WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param |
| 3960 | */ |
| 3961 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3962 | A_UINT32 regDomain; |
| 3963 | A_UINT32 chanFreq; |
| 3964 | A_UINT32 phyMode; |
| 3965 | A_UINT32 twiceAntennaReduction; |
| 3966 | A_UINT32 twiceMaxRDPower; |
| 3967 | A_INT32 twiceAntennaGain; |
| 3968 | A_UINT32 powerLimit; |
| 3969 | A_UINT32 rateMax; |
| 3970 | A_UINT32 numTxChain; |
| 3971 | A_UINT32 ctl; |
| 3972 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3973 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without |
| 3974 | * breaking the WMI compatibility |
| 3975 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3976 | A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN]; |
| 3977 | A_INT8 |
| 3978 | maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN] |
| 3979 | [WMI_TPC_TX_NUM_CHAIN]; |
| 3980 | A_INT8 |
| 3981 | maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN] |
| 3982 | [WMI_TPC_TX_NUM_CHAIN]; |
| 3983 | A_INT8 |
| 3984 | maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN] |
| 3985 | [WMI_TPC_TX_NUM_CHAIN]; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 3986 | /** pdev_id for identifying the MAC |
| 3987 | * See macros starting with WMI_PDEV_ID_ for values. |
| 3988 | */ |
| 3989 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3990 | /* This TLV is followed by a byte array: |
| 3991 | * A_UINT8 ratesArray[]; |
| 3992 | */ |
| 3993 | } wmi_pdev_tpc_config_event_fixed_param; |
| 3994 | |
| 3995 | typedef struct { |
| 3996 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */ |
| 3997 | A_UINT32 periodCnt; |
| 3998 | A_UINT32 L1Cnt; |
| 3999 | A_UINT32 L11Cnt; |
| 4000 | A_UINT32 L12Cnt; |
| 4001 | A_UINT32 L1Entry; |
| 4002 | A_UINT32 L11Entry; |
| 4003 | A_UINT32 L12Entry; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4004 | /** pdev_id for identifying the MAC |
| 4005 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4006 | */ |
| 4007 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4008 | } wmi_pdev_l1ss_track_event_fixed_param; |
| 4009 | |
| 4010 | typedef struct { |
| 4011 | A_UINT32 len; |
| 4012 | A_UINT32 msgref; |
| 4013 | A_UINT32 segmentInfo; |
| 4014 | } wmi_pdev_seg_hdr_info; |
| 4015 | |
| 4016 | /* |
| 4017 | * Transmit power scale factor. |
| 4018 | * |
| 4019 | */ |
| 4020 | typedef enum { |
| 4021 | WMI_TP_SCALE_MAX = 0, /* no scaling (default) */ |
| 4022 | WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ |
| 4023 | WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ |
| 4024 | WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ |
| 4025 | WMI_TP_SCALE_MIN = 4, /* min, but still on */ |
| 4026 | WMI_TP_SCALE_SIZE = 5, /* max num of enum */ |
| 4027 | } WMI_TP_SCALE; |
| 4028 | |
| 4029 | #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32) |
| 4030 | |
| 4031 | typedef struct { |
| 4032 | /** message buffer, NULL terminated */ |
| 4033 | char bufp[WMI_MAX_DEBUG_MESG]; |
| 4034 | } wmi_debug_mesg_event; |
| 4035 | |
| 4036 | enum { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4037 | /** P2P device */ |
| 4038 | VDEV_SUBTYPE_P2PDEV = 0, |
| 4039 | /** P2P client */ |
| 4040 | VDEV_SUBTYPE_P2PCLI, |
| 4041 | /** P2P GO */ |
| 4042 | VDEV_SUBTYPE_P2PGO, |
| 4043 | /** BT3.0 HS */ |
| 4044 | VDEV_SUBTYPE_BT, |
| 4045 | }; |
| 4046 | |
| 4047 | typedef struct { |
| 4048 | /** idnore power , only use flags , mode and freq */ |
| 4049 | wmi_channel chan; |
| 4050 | } wmi_pdev_set_channel_cmd; |
| 4051 | |
| 4052 | typedef enum { |
| 4053 | WMI_PKTLOG_EVENT_RX = 0x1, |
| 4054 | WMI_PKTLOG_EVENT_TX = 0x2, |
| 4055 | WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */ |
| 4056 | WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */ |
| 4057 | /* 0x10 used by deprecated DBG_PRINT */ |
| 4058 | WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */ |
| 4059 | } WMI_PKTLOG_EVENT; |
| 4060 | |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 4061 | typedef enum { |
| 4062 | /* (default) FW will decide under what conditions to enable pktlog */ |
| 4063 | WMI_PKTLOG_ENABLE_AUTO = 0, |
| 4064 | WMI_PKTLOG_ENABLE_FORCE = 1, /* pktlog unconditionally enabled */ |
| 4065 | } WMI_PKTLOG_ENABLE; |
| 4066 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4067 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4068 | /** TLV tag and len; tag equals |
| 4069 | * WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param |
| 4070 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4071 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4072 | /** pdev_id for identifying the MAC |
| 4073 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4074 | */ |
| 4075 | A_UINT32 pdev_id; |
Krishna Kumaar Natarajan | 489bf8d | 2016-03-25 14:30:11 -0700 | [diff] [blame] | 4076 | A_UINT32 evlist; /* WMI_PKTLOG_EVENT */ |
| 4077 | A_UINT32 enable; /* WMI_PKTLOG_ENABLE */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4078 | } wmi_pdev_pktlog_enable_cmd_fixed_param; |
| 4079 | |
| 4080 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4081 | /** TLV tag and len; tag equals |
| 4082 | * WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param |
| 4083 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4084 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4085 | /** pdev_id for identifying the MAC |
| 4086 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4087 | */ |
| 4088 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4089 | } wmi_pdev_pktlog_disable_cmd_fixed_param; |
| 4090 | |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4091 | typedef struct { |
| 4092 | /* |
| 4093 | * TLV tag and len; tag equals |
| 4094 | * WMITLV_TAG_STRUC_wmi_mib_stats_enable_cmd_fixed_param |
| 4095 | */ |
| 4096 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4097 | /** pdev_id for identifying the MAC |
| 4098 | * See macros starting with WMI_PDEV_ID_ for values. |
| 4099 | */ |
| 4100 | A_UINT32 pdev_id; |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4101 | /* |
| 4102 | * enable for mib stats collection. |
| 4103 | * Stats are delivered to host in wmi_mib_stats structure. |
| 4104 | * If enable_Mib=1, stats collection is enabled. |
| 4105 | * If enable_Mib=0, stats collection does not happen |
| 4106 | */ |
| 4107 | A_UINT32 enable_Mib; |
| 4108 | } wmi_mib_stats_enable_cmd_fixed_param; |
| 4109 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4110 | /** Customize the DSCP (bit) to TID (0-7) mapping for QOS. |
| 4111 | * NOTE: This constant cannot be changed without breaking |
| 4112 | * WMI Compatibility. */ |
| 4113 | |
| 4114 | #define WMI_DSCP_MAP_MAX (64) |
| 4115 | /* |
| 4116 | * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target |
| 4117 | * @details |
| 4118 | * Create an API for sending the custom DSCP-to-TID map to the target |
| 4119 | * If this is a request from the user space or from above the UMAC |
| 4120 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 4121 | * Provide a place holder for this API in the ieee80211com (ic). |
| 4122 | * |
| 4123 | * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping |
| 4124 | * in the target should be directed to the function pointer in the ic. |
| 4125 | * |
| 4126 | * Implementation details of the API to send the map to the target are as described- |
| 4127 | * |
| 4128 | * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map. |
| 4129 | * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate |
| 4130 | * 64 TID values for 2^6 (64) DSCP ids. |
| 4131 | * Example: |
| 4132 | * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = { |
| 4133 | * 0, 0, 0, 0, 0, 0, 0, 0, |
| 4134 | * 1, 1, 1, 1, 1, 1, 1, 1, |
| 4135 | * 2, 2, 2, 2, 2, 2, 2, 2, |
| 4136 | * 3, 3, 3, 3, 3, 3, 3, 3, |
| 4137 | * 4, 4, 4, 4, 4, 4, 4, 4, |
| 4138 | * 5, 5, 5, 5, 5, 5, 5, 5, |
| 4139 | * 6, 6, 6, 6, 6, 6, 6, 6, |
| 4140 | * 7, 7, 7, 7, 7, 7, 7, 7, |
| 4141 | * }; |
| 4142 | * |
| 4143 | * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map. |
| 4144 | * |
| 4145 | * 3. Copy the DSCP-to-TID map into the WMI buffer. |
| 4146 | * |
| 4147 | * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the |
| 4148 | * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API |
| 4149 | * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and |
| 4150 | * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id. |
| 4151 | * |
| 4152 | */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4153 | |
| 4154 | /* DEPRECATED - use VDEV level command instead |
| 4155 | * (wmi_vdev_set_dscp_tid_map_cmd_fixed_param) |
| 4156 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4157 | typedef struct { |
| 4158 | A_UINT32 tlv_header; |
| 4159 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */ |
| 4160 | A_UINT32 reserved0; |
| 4161 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 4162 | /* map indicating DSCP to TID conversion */ |
| 4163 | A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
| 4164 | } wmi_pdev_set_dscp_tid_map_cmd_fixed_param; |
| 4165 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 4166 | typedef struct { |
| 4167 | A_UINT32 tlv_header; |
| 4168 | /* |
| 4169 | * TLV tag and len; tag equals |
| 4170 | * WMITLV_TAG_STRUC_wmi_vdev_set_dscp_tid_map_cmd_fixed_param |
| 4171 | */ |
| 4172 | A_UINT32 vdev_id; |
| 4173 | /** map indicating DSCP to TID conversion */ |
| 4174 | A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
Rajeev Kumar | e18f528 | 2016-04-15 14:08:29 -0700 | [diff] [blame] | 4175 | A_UINT32 enable_override; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 4176 | } wmi_vdev_set_dscp_tid_map_cmd_fixed_param; |
| 4177 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4178 | /** Fixed rate (rate-code) for broadcast/ multicast data frames */ |
| 4179 | /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames |
| 4180 | * @details |
| 4181 | * Create an API for setting the custom rate for the MCAST and BCAST frames |
| 4182 | * in the target. If this is a request from the user space or from above the UMAC |
| 4183 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 4184 | * Provide a place holder for this API in the ieee80211com (ic). |
| 4185 | * |
| 4186 | * Implementation details of the API to set custom rates for MCAST and BCAST in |
| 4187 | * the target are as described- |
| 4188 | * |
| 4189 | * 1. The function will have 3 arguments- |
| 4190 | * vap structure, |
| 4191 | * MCAST/ BCAST identifier code, |
| 4192 | * 8 bit rate code |
| 4193 | * |
| 4194 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 4195 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 4196 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 4197 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 4198 | * OFDM : 0: OFDM 48 Mbps |
| 4199 | * 1: OFDM 24 Mbps |
| 4200 | * 2: OFDM 12 Mbps |
| 4201 | * 3: OFDM 6 Mbps |
| 4202 | * 4: OFDM 54 Mbps |
| 4203 | * 5: OFDM 36 Mbps |
| 4204 | * 6: OFDM 18 Mbps |
| 4205 | * 7: OFDM 9 Mbps |
| 4206 | * CCK (pream == 1) |
| 4207 | * 0: CCK 11 Mbps Long |
| 4208 | * 1: CCK 5.5 Mbps Long |
| 4209 | * 2: CCK 2 Mbps Long |
| 4210 | * 3: CCK 1 Mbps Long |
| 4211 | * 4: CCK 11 Mbps Short |
| 4212 | * 5: CCK 5.5 Mbps Short |
| 4213 | * 6: CCK 2 Mbps Short |
| 4214 | * HT/VHT (pream == 2/3) |
| 4215 | * 0..7: MCS0..MCS7 (HT) |
| 4216 | * 0..9: MCS0..MCS9 (VHT) |
| 4217 | * |
| 4218 | * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value |
| 4219 | * to the target. |
| 4220 | * Arguments to the API are- |
| 4221 | * wmi handle, |
| 4222 | * VAP interface id (av_if_id) defined in ol_ath_vap_net80211, |
| 4223 | * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 4224 | * rate value. |
| 4225 | */ |
| 4226 | typedef enum { |
| 4227 | WMI_SET_MCAST_RATE, |
| 4228 | WMI_SET_BCAST_RATE |
| 4229 | } MCAST_BCAST_RATE_ID; |
| 4230 | |
| 4231 | typedef struct { |
| 4232 | MCAST_BCAST_RATE_ID rate_id; |
| 4233 | A_UINT32 rate; |
| 4234 | } mcast_bcast_rate; |
| 4235 | |
| 4236 | typedef struct { |
| 4237 | A_UINT32 tlv_header; |
| 4238 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */ |
| 4239 | A_UINT32 cwmin; |
| 4240 | A_UINT32 cwmax; |
| 4241 | A_UINT32 aifs; |
| 4242 | A_UINT32 txoplimit; |
| 4243 | A_UINT32 acm; |
| 4244 | A_UINT32 no_ack; |
| 4245 | } wmi_wmm_params; |
| 4246 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 4247 | /* DEPRECATED - use VDEV level command instead |
| 4248 | * (wmi_vdev_set_wmm_params_cmd_fixed_param) |
| 4249 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4250 | typedef struct { |
| 4251 | A_UINT32 tlv_header; |
| 4252 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */ |
| 4253 | A_UINT32 reserved0; |
| 4254 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 4255 | A_UINT32 dg_type; |
| 4256 | |
| 4257 | /* The TLVs for the 4 AC follows: |
| 4258 | * wmi_wmm_params wmm_params_ac_be; |
| 4259 | * wmi_wmm_params wmm_params_ac_bk; |
| 4260 | * wmi_wmm_params wmm_params_ac_vi; |
| 4261 | * wmi_wmm_params wmm_params_ac_vo; |
| 4262 | */ |
| 4263 | } wmi_pdev_set_wmm_params_cmd_fixed_param; |
| 4264 | |
| 4265 | typedef enum { |
| 4266 | WMI_REQUEST_PEER_STAT = 0x01, |
| 4267 | WMI_REQUEST_AP_STAT = 0x02, |
| 4268 | WMI_REQUEST_PDEV_STAT = 0x04, |
| 4269 | WMI_REQUEST_VDEV_STAT = 0x08, |
| 4270 | WMI_REQUEST_BCNFLT_STAT = 0x10, |
| 4271 | WMI_REQUEST_VDEV_RATE_STAT = 0x20, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 4272 | WMI_REQUEST_INST_STAT = 0x40, |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4273 | WMI_REQUEST_MIB_STAT = 0x80, |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 4274 | WMI_REQUEST_RSSI_PER_CHAIN_STAT = 0x100, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4275 | } wmi_stats_id; |
| 4276 | |
| 4277 | typedef struct { |
| 4278 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */ |
| 4279 | wmi_stats_id stats_id; |
| 4280 | /** unique id identifying the VDEV, generated by the caller */ |
| 4281 | A_UINT32 vdev_id; |
| 4282 | /** peer MAC address */ |
| 4283 | wmi_mac_addr peer_macaddr; |
| 4284 | } wmi_request_stats_cmd_fixed_param; |
| 4285 | |
| 4286 | /* stats type bitmap */ |
| 4287 | #define WMI_LINK_STATS_RADIO 0x00000001 |
| 4288 | #define WMI_LINK_STATS_IFACE 0x00000002 |
| 4289 | #define WMI_LINK_STATS_ALL_PEER 0x00000004 |
| 4290 | #define WMI_LINK_STATS_PER_PEER 0x00000008 |
| 4291 | |
| 4292 | /* wifi clear statistics bitmap */ |
| 4293 | #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */ |
| 4294 | #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */ |
| 4295 | #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */ |
| 4296 | #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */ |
| 4297 | #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */ |
| 4298 | #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */ |
| 4299 | #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */ |
| 4300 | #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */ |
| 4301 | #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */ |
| 4302 | #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */ |
| 4303 | |
| 4304 | /** Default value for stats if the stats collection has not started */ |
| 4305 | #define WMI_STATS_VALUE_INVALID 0xffffffff |
| 4306 | |
| 4307 | #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16) |
| 4308 | #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value) |
| 4309 | #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1) |
| 4310 | #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value) |
| 4311 | #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 4312 | #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 4313 | |
| 4314 | typedef struct { |
| 4315 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */ |
| 4316 | A_UINT32 num_of_diag_events_logs; |
| 4317 | /* The TLVs will follow. |
| 4318 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 4319 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 4320 | * Bit 17 Indicate if the DIAG type is Enabled/Disabled. |
| 4321 | */ |
| 4322 | } wmi_diag_event_log_config_fixed_param; |
| 4323 | |
| 4324 | #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 4325 | #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 4326 | #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1) |
| 4327 | #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value) |
| 4328 | |
| 4329 | typedef struct { |
| 4330 | A_UINT32 tlv_header; |
| 4331 | A_UINT32 num_of_diag_events_logs; |
| 4332 | /* The TLVs will follow. |
| 4333 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 4334 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 4335 | * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0 |
| 4336 | * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework |
| 4337 | */ |
| 4338 | } wmi_diag_event_log_supported_event_fixed_params; |
| 4339 | |
| 4340 | typedef struct { |
| 4341 | /** |
| 4342 | * TLV tag and len; tag equals |
| 4343 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param |
| 4344 | */ |
| 4345 | A_UINT32 tlv_header; |
| 4346 | /** placeholder for future */ |
| 4347 | A_UINT32 reserved0; |
| 4348 | } wmi_debug_mesg_flush_fixed_param; |
| 4349 | |
| 4350 | typedef struct { |
| 4351 | /** |
| 4352 | * TLV tag and len; tag equals |
| 4353 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param |
| 4354 | */ |
| 4355 | A_UINT32 tlv_header; |
| 4356 | /** placeholder for future */ |
| 4357 | A_UINT32 reserved0; |
| 4358 | } wmi_debug_mesg_flush_complete_fixed_param; |
| 4359 | |
| 4360 | |
| 4361 | typedef struct { |
| 4362 | /* |
| 4363 | * TLV tag and len; tag equals |
| 4364 | * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param |
| 4365 | * vdev_id, where RSSI breach event occurred |
| 4366 | */ |
| 4367 | A_UINT32 tlv_header; |
| 4368 | A_UINT32 vdev_id; |
| 4369 | /* request id */ |
| 4370 | A_UINT32 request_id; |
| 4371 | /* |
| 4372 | * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is |
| 4373 | * corresponding to hi_rssi[0-2] |
| 4374 | */ |
| 4375 | A_UINT32 event_bitmap; |
| 4376 | /* rssi at the time of RSSI breach. Unit dBm */ |
| 4377 | A_UINT32 rssi; |
| 4378 | /* bssid of the monitored AP's */ |
| 4379 | wmi_mac_addr bssid; |
| 4380 | } wmi_rssi_breach_event_fixed_param; |
| 4381 | |
| 4382 | |
| 4383 | typedef struct { |
| 4384 | /** TLV tag and len; tag equals |
| 4385 | * WMITLV_TAG_STRUC_wmi_fw_mem_dump */ |
| 4386 | A_UINT32 tlv_header; |
| 4387 | /** unique id identifying the segment */ |
| 4388 | A_UINT32 seg_id; |
| 4389 | /** Start address of the segment to be read */ |
| 4390 | A_UINT32 seg_start_addr_lo; |
| 4391 | A_UINT32 seg_start_addr_hi; |
| 4392 | /** Length of the segment to be read */ |
| 4393 | A_UINT32 seg_length; |
| 4394 | /** Host bufeer address to which the segment will be read and dumped */ |
| 4395 | A_UINT32 dest_addr_lo; |
| 4396 | A_UINT32 dest_addr_hi; |
| 4397 | } wmi_fw_mem_dump; |
| 4398 | |
| 4399 | /* Command to get firmware memory dump*/ |
| 4400 | typedef struct { |
| 4401 | /** TLV tag and len; tag equals |
| 4402 | * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */ |
| 4403 | A_UINT32 tlv_header; |
| 4404 | /** unique id identifying the request */ |
| 4405 | A_UINT32 request_id; |
| 4406 | /** number of memory dump segments */ |
| 4407 | A_UINT32 num_fw_mem_dump_segs; |
| 4408 | /** |
| 4409 | * This TLV is followed by another TLV |
| 4410 | * wmi_fw_mem_dump fw_mem_dump[]; |
| 4411 | */ |
| 4412 | } wmi_get_fw_mem_dump_fixed_param; |
| 4413 | |
| 4414 | /** Event to indicate the completion of fw mem dump */ |
| 4415 | typedef struct { |
| 4416 | /* TLV tag and len; tag equals |
| 4417 | * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */ |
| 4418 | A_UINT32 tlv_header; |
| 4419 | /** unique id identifying the request, given |
| 4420 | * in the request stats command */ |
| 4421 | A_UINT32 request_id; |
| 4422 | /*In case of Firmware memory dump */ |
| 4423 | A_UINT32 fw_mem_dump_complete; |
| 4424 | } wmi_update_fw_mem_dump_fixed_param; |
| 4425 | |
| 4426 | typedef enum { |
| 4427 | WMI_ROAMING_IDLE = 0, |
| 4428 | WMI_ROAMING_ACTIVE = 1, |
| 4429 | } wmi_roam_state; |
| 4430 | |
| 4431 | /* access categories */ |
| 4432 | typedef enum { |
| 4433 | WMI_AC_VO = 0, |
| 4434 | WMI_AC_VI = 1, |
| 4435 | WMI_AC_BE = 2, |
| 4436 | WMI_AC_BK = 3, |
| 4437 | WMI_AC_MAX = 4, |
| 4438 | } wmi_traffic_ac; |
| 4439 | |
| 4440 | typedef enum { |
| 4441 | WMI_STA_STATS = 0, |
| 4442 | WMI_SOFTAP_STATS = 1, |
| 4443 | WMI_IBSS_STATS = 2, |
| 4444 | WMI_P2P_CLIENT_STATS = 3, |
| 4445 | WMI_P2P_GO_STATS = 4, |
| 4446 | WMI_NAN_STATS = 5, |
| 4447 | WMI_MESH_STATS = 6, |
| 4448 | } wmi_link_iface_type; |
| 4449 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4450 | /*Clear stats*/ |
| 4451 | typedef struct { |
| 4452 | A_UINT32 tlv_header; |
| 4453 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */ |
| 4454 | /** unique id identifying the VDEV, generated by the caller */ |
| 4455 | A_UINT32 vdev_id; |
| 4456 | /** stop_stats_collection_req = 1 will imply stop the statistics collection */ |
| 4457 | A_UINT32 stop_stats_collection_req; |
| 4458 | /** identifies what stats to be cleared */ |
| 4459 | A_UINT32 stats_clear_req_mask; |
| 4460 | /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */ |
| 4461 | wmi_mac_addr peer_macaddr; |
| 4462 | } wmi_clear_link_stats_cmd_fixed_param; |
| 4463 | |
| 4464 | /* Link Stats configuration params. Trigger the link layer statistics collection*/ |
| 4465 | typedef struct { |
| 4466 | A_UINT32 tlv_header; |
| 4467 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */ |
| 4468 | /** threshold to classify the pkts as short or long */ |
| 4469 | A_UINT32 mpdu_size_threshold; |
| 4470 | /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/ |
| 4471 | A_UINT32 aggressive_statistics_gathering; |
| 4472 | } wmi_start_link_stats_cmd_fixed_param; |
| 4473 | |
| 4474 | typedef struct { |
| 4475 | A_UINT32 tlv_header; |
| 4476 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */ |
| 4477 | /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */ |
| 4478 | A_UINT32 stats_type; |
| 4479 | /** unique id identifying the VDEV, generated by the caller */ |
| 4480 | A_UINT32 vdev_id; |
| 4481 | /** unique id identifying the request, generated by the caller */ |
| 4482 | A_UINT32 request_id; |
| 4483 | /** peer MAC address */ |
| 4484 | wmi_mac_addr peer_macaddr; |
| 4485 | } wmi_request_link_stats_cmd_fixed_param; |
| 4486 | |
| 4487 | /* channel statistics */ |
| 4488 | typedef struct { |
| 4489 | A_UINT32 tlv_header; |
| 4490 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */ |
| 4491 | /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/ |
| 4492 | A_UINT32 channel_width; |
| 4493 | /** Primary 20 MHz channel */ |
| 4494 | A_UINT32 center_freq; |
| 4495 | /** center frequency (MHz) first segment */ |
| 4496 | A_UINT32 center_freq0; |
| 4497 | /** center frequency (MHz) second segment */ |
| 4498 | A_UINT32 center_freq1; |
| 4499 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 4500 | A_UINT32 radio_awake_time; |
| 4501 | /** msecs the CCA register is busy (32 bits number accruing over time) */ |
| 4502 | A_UINT32 cca_busy_time; |
| 4503 | } wmi_channel_stats; |
| 4504 | |
Krishna Kumaar Natarajan | ee6cfa7 | 2016-03-25 14:05:03 -0700 | [diff] [blame] | 4505 | /* |
| 4506 | * Each step represents 0.5 dB. The starting value is 0 dBm. |
| 4507 | * Thus the TPC levels cover 0 dBm to 31.5 dBm inclusive in 0.5 dB steps. |
| 4508 | */ |
| 4509 | #define MAX_TPC_LEVELS 64 |
| 4510 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4511 | /* radio statistics */ |
| 4512 | typedef struct { |
| 4513 | A_UINT32 tlv_header; |
| 4514 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */ |
| 4515 | /** Wifi radio (if multiple radio supported) */ |
| 4516 | A_UINT32 radio_id; |
| 4517 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 4518 | A_UINT32 on_time; |
| 4519 | /** msecs the radio is transmitting (32 bits number accruing over time) */ |
| 4520 | A_UINT32 tx_time; |
| 4521 | /** msecs the radio is in active receive (32 bits number accruing over time) */ |
| 4522 | A_UINT32 rx_time; |
| 4523 | /** msecs the radio is awake due to all scan (32 bits number accruing over time) */ |
| 4524 | A_UINT32 on_time_scan; |
| 4525 | /** msecs the radio is awake due to NAN (32 bits number accruing over time) */ |
| 4526 | A_UINT32 on_time_nbd; |
| 4527 | /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */ |
| 4528 | A_UINT32 on_time_gscan; |
| 4529 | /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */ |
| 4530 | A_UINT32 on_time_roam_scan; |
| 4531 | /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */ |
| 4532 | A_UINT32 on_time_pno_scan; |
| 4533 | /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */ |
| 4534 | A_UINT32 on_time_hs20; |
| 4535 | /** number of channels */ |
| 4536 | A_UINT32 num_channels; |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4537 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4538 | * tx time per TPC level - DEPRECATED |
| 4539 | * This field is deprecated. |
| 4540 | * It is superseded by the WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID |
| 4541 | * message. |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4542 | */ |
Krishna Kumaar Natarajan | ee6cfa7 | 2016-03-25 14:05:03 -0700 | [diff] [blame] | 4543 | A_UINT32 tx_time_per_tpc[MAX_TPC_LEVELS]; |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4544 | } wmi_radio_link_stats; |
| 4545 | |
| 4546 | /** tx time per power level statistics */ |
| 4547 | typedef struct { |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4548 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4549 | * TLV tag and len; tag equals |
| 4550 | * WMITLV_TAG_STRUC_wmi_tx_power_level_stats_evt_fixed_param |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4551 | */ |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4552 | A_UINT32 tlv_header; |
| 4553 | /* total number of tx power levels */ |
| 4554 | A_UINT32 total_num_tx_power_levels; |
| 4555 | /* number of tx power levels that are carried in this event */ |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4556 | A_UINT32 num_tx_power_levels; |
| 4557 | /* |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4558 | * offset of current stats |
| 4559 | * If ((num_tx_power_levels + power_level_offset)) == |
| 4560 | * total_num_tx_power_levels) |
| 4561 | * this message completes the report of tx time per power levels. |
| 4562 | * Otherwise, additional WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID |
| 4563 | * messages will be sent by the target to deliver the remainder of the |
| 4564 | * tx time per power level stats. |
Anurag Chouhan | 0e13ab0 | 2016-04-18 17:17:49 +0530 | [diff] [blame] | 4565 | */ |
Anurag Chouhan | 90c1a18 | 2016-04-18 17:20:38 +0530 | [diff] [blame] | 4566 | A_UINT32 power_level_offset; |
| 4567 | /* |
| 4568 | * This TLV will be followed by a TLV containing a variable-length |
| 4569 | * array of A_UINT32 with tx time per power level data |
| 4570 | * A_UINT32 tx_time_per_power_level[num_tx_power_levels] |
| 4571 | * The tx time is in units of milliseconds. |
| 4572 | * The power levels are board-specific values; a board-specific |
| 4573 | * translation has to be applied to determine what actual power |
| 4574 | * corresponds to each power level. |
| 4575 | * Just as the host has a BDF file available, the host should also have |
| 4576 | * a data file available that provides the power level to power |
| 4577 | * translations. |
| 4578 | */ |
| 4579 | } wmi_tx_power_level_stats_evt_fixed_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4580 | |
| 4581 | /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */ |
| 4582 | typedef struct { |
| 4583 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 4584 | /** unique id identifying the request, given in the request stats command */ |
| 4585 | A_UINT32 request_id; |
| 4586 | /** Number of radios*/ |
| 4587 | A_UINT32 num_radio; |
| 4588 | /** more_data will be set depending on the number of radios */ |
| 4589 | A_UINT32 more_radio_events; |
| 4590 | /* |
| 4591 | * This TLV is followed by another TLV of array of bytes |
| 4592 | * size of(struct wmi_radio_link_stats); |
| 4593 | * |
| 4594 | * This TLV is followed by another TLV of array of bytes |
| 4595 | * num_channels * size of(struct wmi_channel_stats) |
| 4596 | */ |
| 4597 | |
| 4598 | } wmi_radio_link_stats_event_fixed_param; |
| 4599 | |
| 4600 | /* per rate statistics */ |
| 4601 | typedef struct { |
| 4602 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */ |
| 4603 | /** rate information |
| 4604 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 4605 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 4606 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 4607 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 4608 | * OFDM : 0: OFDM 48 Mbps |
| 4609 | * 1: OFDM 24 Mbps |
| 4610 | * 2: OFDM 12 Mbps |
| 4611 | * 3: OFDM 6 Mbps |
| 4612 | * 4: OFDM 54 Mbps |
| 4613 | * 5: OFDM 36 Mbps |
| 4614 | * 6: OFDM 18 Mbps |
| 4615 | * 7: OFDM 9 Mbps |
| 4616 | * CCK (pream == 1) |
| 4617 | * 0: CCK 11 Mbps Long |
| 4618 | * 1: CCK 5.5 Mbps Long |
| 4619 | * 2: CCK 2 Mbps Long |
| 4620 | * 3: CCK 1 Mbps Long |
| 4621 | * 4: CCK 11 Mbps Short |
| 4622 | * 5: CCK 5.5 Mbps Short |
| 4623 | * 6: CCK 2 Mbps Short |
| 4624 | * HT/VHT (pream == 2/3) |
| 4625 | * 0..7: MCS0..MCS7 (HT) |
| 4626 | * 0..9: MCS0..MCS9 (VHT) |
| 4627 | */ |
| 4628 | A_UINT32 rate; |
| 4629 | /** units of 100 Kbps */ |
| 4630 | A_UINT32 bitrate; |
| 4631 | /** number of successfully transmitted data pkts (ACK rcvd) */ |
| 4632 | A_UINT32 tx_mpdu; |
| 4633 | /** number of received data pkts */ |
| 4634 | A_UINT32 rx_mpdu; |
| 4635 | /** number of data packet losses (no ACK) */ |
| 4636 | A_UINT32 mpdu_lost; |
| 4637 | /** total number of data pkt retries */ |
| 4638 | A_UINT32 retries; |
| 4639 | /** number of short data pkt retries */ |
| 4640 | A_UINT32 retries_short; |
| 4641 | /** number of long data pkt retries */ |
| 4642 | A_UINT32 retries_long; |
| 4643 | } wmi_rate_stats; |
| 4644 | |
| 4645 | typedef struct { |
| 4646 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */ |
| 4647 | /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/ |
| 4648 | A_UINT32 peer_type; |
| 4649 | /** mac address */ |
| 4650 | wmi_mac_addr peer_mac_address; |
| 4651 | /** peer wmi_CAPABILITY_XXX */ |
| 4652 | A_UINT32 capabilities; |
| 4653 | /** number of rates */ |
| 4654 | A_UINT32 num_rates; |
| 4655 | } wmi_peer_link_stats; |
| 4656 | |
| 4657 | /** PEER statistics (once started) reset and start afresh after each connection */ |
| 4658 | typedef struct { |
| 4659 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */ |
| 4660 | /** unique id identifying the request, given in the request stats command */ |
| 4661 | A_UINT32 request_id; |
| 4662 | /** number of peers accomidated in this particular event */ |
| 4663 | A_UINT32 num_peers; |
| 4664 | /** Indicates the fragment number */ |
| 4665 | A_UINT32 peer_event_number; |
| 4666 | /** Indicates if there are more peers which will be sent as seperate peer_stats event */ |
| 4667 | A_UINT32 more_data; |
| 4668 | |
| 4669 | /** |
| 4670 | * This TLV is followed by another TLV |
| 4671 | * num_peers * size of(struct wmi_peer_stats) |
| 4672 | * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers. |
| 4673 | */ |
| 4674 | } wmi_peer_stats_event_fixed_param; |
| 4675 | |
| 4676 | /* per access category statistics */ |
| 4677 | typedef struct { |
| 4678 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */ |
| 4679 | /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/ |
| 4680 | A_UINT32 ac_type; |
| 4681 | /** number of successfully transmitted unicast data pkts (ACK rcvd) */ |
| 4682 | A_UINT32 tx_mpdu; |
| 4683 | /** number of received unicast mpdus */ |
| 4684 | A_UINT32 rx_mpdu; |
| 4685 | /** number of succesfully transmitted multicast data packets */ |
| 4686 | /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */ |
| 4687 | A_UINT32 tx_mcast; |
| 4688 | /** number of received multicast data packets */ |
| 4689 | A_UINT32 rx_mcast; |
| 4690 | /** number of received unicast a-mpdus */ |
| 4691 | A_UINT32 rx_ampdu; |
| 4692 | /** number of transmitted unicast a-mpdus */ |
| 4693 | A_UINT32 tx_ampdu; |
| 4694 | /** number of data pkt losses (no ACK) */ |
| 4695 | A_UINT32 mpdu_lost; |
| 4696 | /** total number of data pkt retries */ |
| 4697 | A_UINT32 retries; |
| 4698 | /** number of short data pkt retries */ |
| 4699 | A_UINT32 retries_short; |
| 4700 | /** number of long data pkt retries */ |
| 4701 | A_UINT32 retries_long; |
| 4702 | /** data pkt min contention time (usecs) */ |
| 4703 | A_UINT32 contention_time_min; |
| 4704 | /** data pkt max contention time (usecs) */ |
| 4705 | A_UINT32 contention_time_max; |
| 4706 | /** data pkt avg contention time (usecs) */ |
| 4707 | A_UINT32 contention_time_avg; |
| 4708 | /** num of data pkts used for contention statistics */ |
| 4709 | A_UINT32 contention_num_samples; |
| 4710 | } wmi_wmm_ac_stats; |
| 4711 | |
| 4712 | /* interface statistics */ |
| 4713 | typedef struct { |
| 4714 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */ |
| 4715 | /** access point beacon received count from connected AP */ |
| 4716 | A_UINT32 beacon_rx; |
| 4717 | /** access point mgmt frames received count from connected AP (including Beacon) */ |
| 4718 | A_UINT32 mgmt_rx; |
| 4719 | /** action frames received count */ |
| 4720 | A_UINT32 mgmt_action_rx; |
| 4721 | /** action frames transmit count */ |
| 4722 | A_UINT32 mgmt_action_tx; |
| 4723 | /** access Point Beacon and Management frames RSSI (averaged) */ |
| 4724 | A_UINT32 rssi_mgmt; |
| 4725 | /** access Point Data Frames RSSI (averaged) from connected AP */ |
| 4726 | A_UINT32 rssi_data; |
| 4727 | /** access Point ACK RSSI (averaged) from connected AP */ |
| 4728 | A_UINT32 rssi_ack; |
| 4729 | /** number of peers */ |
| 4730 | A_UINT32 num_peers; |
| 4731 | /** Indicates how many peer_stats events will be sent depending on the num_peers. */ |
| 4732 | A_UINT32 num_peer_events; |
| 4733 | /** number of ac */ |
| 4734 | A_UINT32 num_ac; |
| 4735 | /** Roaming Stat */ |
| 4736 | A_UINT32 roam_state; |
| 4737 | /** |
| 4738 | * Average Beacon spread offset is the averaged time delay between TBTT |
| 4739 | * and beacon TSF */ |
| 4740 | /** Upper 32 bits of averaged 64 bit beacon spread offset */ |
| 4741 | A_UINT32 avg_bcn_spread_offset_high; |
| 4742 | /** Lower 32 bits of averaged 64 bit beacon spread offset */ |
| 4743 | A_UINT32 avg_bcn_spread_offset_low; |
| 4744 | /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */ |
| 4745 | A_UINT32 is_leaky_ap; |
| 4746 | /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */ |
| 4747 | A_UINT32 avg_rx_frms_leaked; |
| 4748 | /** Rx leak watch window currently in force to minimize data loss |
| 4749 | * because of leaky AP. Rx leak window is the |
| 4750 | * time driver waits before shutting down the radio or switching the |
| 4751 | * channel and after receiving an ACK for |
| 4752 | * a data frame with PM bit set) */ |
| 4753 | A_UINT32 rx_leak_window; |
| 4754 | } wmi_iface_link_stats; |
| 4755 | |
| 4756 | /** Interface statistics (once started) reset and start afresh after each connection */ |
| 4757 | typedef struct { |
| 4758 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */ |
| 4759 | /** unique id identifying the request, given in the request stats command */ |
| 4760 | A_UINT32 request_id; |
| 4761 | /** unique id identifying the VDEV, generated by the caller */ |
| 4762 | A_UINT32 vdev_id; |
| 4763 | /* |
| 4764 | * This TLV is followed by another TLV |
| 4765 | * wmi_iface_link_stats iface_link_stats; |
| 4766 | * num_ac * size of(struct wmi_wmm_ac_stats) |
| 4767 | */ |
| 4768 | } wmi_iface_link_stats_event_fixed_param; |
| 4769 | |
| 4770 | /** Suspend option */ |
| 4771 | enum { |
| 4772 | WMI_PDEV_SUSPEND, /* suspend */ |
| 4773 | WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */ |
| 4774 | }; |
| 4775 | |
| 4776 | typedef struct { |
| 4777 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */ |
| 4778 | /* suspend option sent to target */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 4779 | /* |
| 4780 | * pdev_id for identifying the MAC, See macros |
| 4781 | * starting with WMI_PDEV_ID_ for values. |
| 4782 | */ |
| 4783 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4784 | A_UINT32 suspend_opt; |
| 4785 | } wmi_pdev_suspend_cmd_fixed_param; |
| 4786 | |
| 4787 | typedef struct { |
| 4788 | 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] | 4789 | /* |
| 4790 | * pdev_id for identifying the MAC, See macros |
| 4791 | * starting with WMI_PDEV_ID_ for values. |
| 4792 | */ |
| 4793 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4794 | } wmi_pdev_resume_cmd_fixed_param; |
| 4795 | |
| 4796 | typedef struct { |
| 4797 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */ |
| 4798 | A_UINT32 num_vdev_stats; /* number of vdevs */ |
| 4799 | } wmi_vdev_rate_stats_event_fixed_param; |
| 4800 | |
| 4801 | typedef struct { |
| 4802 | A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */ |
| 4803 | A_UINT32 vdevid; /* Id of the wlan vdev */ |
| 4804 | A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */ |
| 4805 | A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */ |
| 4806 | A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */ |
| 4807 | A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */ |
| 4808 | } wmi_vdev_rate_ht_info; |
| 4809 | |
| 4810 | typedef struct { |
| 4811 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 4812 | wmi_stats_id stats_id; |
| 4813 | /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */ |
| 4814 | A_UINT32 num_pdev_stats; |
| 4815 | /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */ |
| 4816 | A_UINT32 num_vdev_stats; |
| 4817 | /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */ |
| 4818 | A_UINT32 num_peer_stats; |
| 4819 | A_UINT32 num_bcnflt_stats; |
| 4820 | /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */ |
| 4821 | A_UINT32 num_chan_stats; |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4822 | /** number of MIB stats event structures (wmi_mib_stats) */ |
| 4823 | A_UINT32 num_mib_stats; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4824 | /* This TLV is followed by another TLV of array of bytes |
| 4825 | * A_UINT8 data[]; |
| 4826 | * This data array contains |
| 4827 | * num_pdev_stats * size of(struct wmi_pdev_stats) |
| 4828 | * num_vdev_stats * size of(struct wmi_vdev_stats) |
| 4829 | * num_peer_stats * size of(struct wmi_peer_stats) |
| 4830 | * num_bcnflt_stats * size_of() |
| 4831 | * num_chan_stats * size of(struct wmi_chan_stats) |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4832 | * num_mib_stats * size of(struct wmi_mib_stats) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4833 | * |
| 4834 | */ |
| 4835 | } wmi_stats_event_fixed_param; |
| 4836 | |
| 4837 | /** |
| 4838 | * PDEV statistics |
| 4839 | * @todo |
| 4840 | * add all PDEV stats here |
| 4841 | */ |
| 4842 | typedef struct { |
| 4843 | /** Channel noise floor */ |
| 4844 | A_INT32 chan_nf; |
| 4845 | /** TX frame count */ |
| 4846 | A_UINT32 tx_frame_count; |
| 4847 | /** RX frame count */ |
| 4848 | A_UINT32 rx_frame_count; |
| 4849 | /** rx clear count */ |
| 4850 | A_UINT32 rx_clear_count; |
| 4851 | /** cycle count */ |
| 4852 | A_UINT32 cycle_count; |
| 4853 | /** Phy error count */ |
| 4854 | A_UINT32 phy_err_count; |
| 4855 | /** Channel Tx Power */ |
| 4856 | A_UINT32 chan_tx_pwr; |
| 4857 | /** WAL dbg stats */ |
| 4858 | struct wlan_dbg_stats pdev_stats; |
| 4859 | |
| 4860 | } wmi_pdev_stats; |
| 4861 | |
| 4862 | /** |
| 4863 | * VDEV statistics |
| 4864 | * @todo |
| 4865 | * add all VDEV stats here |
| 4866 | */ |
| 4867 | |
| 4868 | typedef struct { |
| 4869 | A_INT32 bcn_snr; |
| 4870 | A_INT32 dat_snr; |
| 4871 | } wmi_snr_info; |
| 4872 | |
| 4873 | typedef struct { |
| 4874 | /** unique id identifying the VDEV, generated by the caller */ |
| 4875 | A_UINT32 vdev_id; |
| 4876 | wmi_snr_info vdev_snr; |
| 4877 | 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) */ |
| 4878 | A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */ |
| 4879 | 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] | 4880 | 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] | 4881 | A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */ |
| 4882 | A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */ |
| 4883 | A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */ |
| 4884 | A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */ |
| 4885 | A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */ |
| 4886 | A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */ |
| 4887 | A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */ |
| 4888 | A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */ |
| 4889 | } wmi_vdev_stats; |
| 4890 | |
| 4891 | /** |
| 4892 | * peer statistics. |
| 4893 | * |
| 4894 | * @todo |
| 4895 | * add more stats |
| 4896 | * |
| 4897 | */ |
| 4898 | typedef struct { |
| 4899 | /** peer MAC address */ |
| 4900 | wmi_mac_addr peer_macaddr; |
| 4901 | /** rssi */ |
| 4902 | A_UINT32 peer_rssi; |
| 4903 | /** last tx data rate used for peer */ |
| 4904 | A_UINT32 peer_tx_rate; |
| 4905 | /** last rx data rate used for peer */ |
| 4906 | A_UINT32 peer_rx_rate; |
| 4907 | } wmi_peer_stats; |
| 4908 | |
| 4909 | typedef struct { |
| 4910 | /** Primary channel freq of the channel for which stats are sent */ |
| 4911 | A_UINT32 chan_mhz; |
| 4912 | /** Time spent on the channel */ |
| 4913 | A_UINT32 sampling_period_us; |
| 4914 | /** Aggregate duration over a sampling period for which channel activity was observed */ |
| 4915 | A_UINT32 rx_clear_count; |
| 4916 | /** Accumalation of the TX PPDU duration over a sampling period */ |
| 4917 | A_UINT32 tx_duration_us; |
| 4918 | /** Accumalation of the RX PPDU duration over a sampling period */ |
| 4919 | A_UINT32 rx_duration_us; |
| 4920 | } wmi_chan_stats; |
| 4921 | |
| 4922 | typedef struct { |
Govind Singh | 45ef44a | 2016-02-01 17:45:22 +0530 | [diff] [blame] | 4923 | A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */ |
| 4924 | A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */ |
| 4925 | A_UINT32 tx_msdu_fail_cnt; /*dot11FailedCount*/ |
| 4926 | A_UINT32 rx_mpdu_frag_cnt; /*dot11ReceivedFragmentCount*/ |
| 4927 | A_UINT32 rx_msdu_grp_frm_cnt; /*dot11GroupReceivedFrameCount*/ |
| 4928 | A_UINT32 rx_mpdu_fcs_err; /*dot11FCSErrorCount*/ |
| 4929 | A_UINT32 tx_msdu_frm_cnt; /*dot11TransmittedFrameCount*/ |
| 4930 | A_UINT32 tx_msdu_retry_cnt; /*dot11RetryCount*/ |
| 4931 | A_UINT32 rx_frm_dup_cnt; /*dot11FrameDuplicateCount */ |
| 4932 | A_UINT32 tx_rts_success_cnt; /*dot11RTSSuccessCount*/ |
| 4933 | A_UINT32 tx_rts_fail_cnt; /*dot11RTSFailureCount*/ |
| 4934 | /*dot11QosTransmittedFragmentCount */ |
| 4935 | A_UINT32 tx_Qos_mpdu_grp_frag_cnt; |
| 4936 | A_UINT32 tx_Qos_msdu_fail_UP; /*dot11QosFailedCount */ |
| 4937 | A_UINT32 tx_Qos_msdu_retry_UP; /*dot11QosRetryCount */ |
| 4938 | A_UINT32 rx_Qos_frm_dup_cnt_UP; /*dot11QosFrameDuplicateCount*/ |
| 4939 | A_UINT32 tx_Qos_rts_success_cnt_UP; /*dot11QosRTSSuccessCount*/ |
| 4940 | A_UINT32 tx_Qos_rts_fail_cnt_UP; /*dot11QosRTSFailureCount*/ |
| 4941 | A_UINT32 rx_Qos_mpdu_frag_cnt_UP; /*dot11QosReceivedFragmentCount*/ |
| 4942 | A_UINT32 tx_Qos_msdu_frm_cnt_UP; /*dot11QosTransmittedFrameCount*/ |
| 4943 | A_UINT32 rx_Qos_msdu_discard_cnt_UP; /*dot11QosDiscardedFrameCount*/ |
| 4944 | A_UINT32 rx_Qos_mpdu_cnt; /*dot11QosMPDUsReceivedCount*/ |
| 4945 | A_UINT32 rx_Qos_mpdu_retryBit_cnt; /*dot11QosRetriesReceivedCount*/ |
| 4946 | /*dot11RSNAStatsRobustMgmtCCMPReplays */ |
| 4947 | A_UINT32 rsna_Mgmt_discard_CCMP_replay_err_cnt; |
| 4948 | A_UINT32 rsna_TKIP_icv_err_cnt; /*dot11RSNAStatsTKIPICVErrors*/ |
| 4949 | A_UINT32 rsna_TKIP_replay_err_cnt; /*dot11RSNAStatsTKIPReplays*/ |
| 4950 | /*dot11RSNAStatsCCMPDecryptErrors */ |
| 4951 | A_UINT32 rsna_CCMP_decrypt_err_cnt; |
| 4952 | A_UINT32 rsna_CCMP_replay_err_cnt; /*dot11RSNAStatsCCMPReplays*/ |
| 4953 | A_UINT32 tx_ampdu_cnt; /*dot11TransmittedAMPDUCount*/ |
| 4954 | /*dot11TransmittedMPDUsInAMPDUCount*/ |
| 4955 | A_UINT32 tx_mpdu_cnt_in_ampdu; |
| 4956 | /*dot11TransmittedOctetsInAMPDUCount*/ |
| 4957 | union { |
| 4958 | A_UINT64 counter; /* for use by target only */ |
| 4959 | struct { |
| 4960 | A_UINT32 low; |
| 4961 | A_UINT32 high; |
| 4962 | } upload; /* for use by host */ |
| 4963 | } tx_octets_in_ampdu; |
| 4964 | A_UINT32 rx_ampdu_cnt; /*dot11AMPDUReceivedCount*/ |
| 4965 | A_UINT32 rx_mpdu_cnt_in_ampdu; /*dot11MPDUInReceivedAMPDUCount*/ |
| 4966 | union { |
| 4967 | A_UINT64 counter; /* for use by target only */ |
| 4968 | struct { |
| 4969 | A_UINT32 rx_octets_in_ampdu_low; |
| 4970 | A_UINT32 rx_octets_in_ampdu_high; |
| 4971 | } upload; /* for use by host */ |
| 4972 | } rx_octets_in_ampdu; /*dot11ReceivedOctetsInAMPDUCount*/ |
| 4973 | A_UINT32 reserved_1; |
| 4974 | A_UINT32 reserved_2; |
| 4975 | A_UINT32 reserved_3; |
| 4976 | A_UINT32 reserved_4; |
| 4977 | } wmi_mib_stats; |
| 4978 | |
| 4979 | typedef struct { |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 4980 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */ |
| 4981 | A_UINT32 tlv_header; |
| 4982 | A_UINT32 vdev_id; |
Himanshu Agarwal | 2906132 | 2016-05-27 14:09:27 +0530 | [diff] [blame] | 4983 | A_INT32 rssi_avg_beacon[WMI_MAX_CHAINS]; |
| 4984 | A_INT32 rssi_avg_data[WMI_MAX_CHAINS]; |
Himanshu Agarwal | 8631954 | 2016-05-24 09:00:39 +0530 | [diff] [blame] | 4985 | wmi_mac_addr peer_macaddr; |
| 4986 | } wmi_rssi_stats; |
| 4987 | |
| 4988 | typedef struct { |
| 4989 | /* |
| 4990 | * TLV tag and len; tag equals |
| 4991 | * WMITLV_TAG_STRUC_wmi_per_chain_rssi_stats |
| 4992 | */ |
| 4993 | A_UINT32 tlv_header; |
| 4994 | A_UINT32 num_per_chain_rssi_stats; |
| 4995 | /* |
| 4996 | * This TLV is followed by another TLV of array of structs: |
| 4997 | * wmi_rssi_stats rssi_stats[num_per_chain_rssi_stats]; |
| 4998 | */ |
| 4999 | } wmi_per_chain_rssi_stats; |
| 5000 | |
| 5001 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5002 | A_UINT32 tlv_header; |
| 5003 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */ |
| 5004 | /** unique id identifying the VDEV, generated by the caller */ |
| 5005 | A_UINT32 vdev_id; |
| 5006 | /** VDEV type (AP,STA,IBSS,MONITOR) */ |
| 5007 | A_UINT32 vdev_type; |
| 5008 | /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/ |
| 5009 | A_UINT32 vdev_subtype; |
| 5010 | /** VDEV MAC address */ |
| 5011 | wmi_mac_addr vdev_macaddr; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 5012 | /** Number of configured txrx streams */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5013 | A_UINT32 num_cfg_txrx_streams; |
| 5014 | /* |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 5015 | * pdev_id for identifying the MAC, |
| 5016 | * See macros starting with WMI_PDEV_ID_ for values. |
| 5017 | */ |
| 5018 | A_UINT32 pdev_id; |
| 5019 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5020 | * This TLV is followed by another TLV of array of structures |
| 5021 | * wmi_vdev_txrx_streams cfg_txrx_streams[]; |
| 5022 | */ |
| 5023 | } wmi_vdev_create_cmd_fixed_param; |
| 5024 | |
| 5025 | typedef struct { |
| 5026 | /* |
| 5027 | * TLV tag and len; tag equals |
| 5028 | * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams |
| 5029 | */ |
| 5030 | A_UINT32 tlv_header; |
| 5031 | /* band - Should take values from wmi_channel_band_mask */ |
| 5032 | A_UINT32 band; |
| 5033 | /* max supported tx streams per given band for this vdev */ |
| 5034 | A_UINT32 supported_tx_streams; |
| 5035 | /* max supported rx streams per given band for this vdev */ |
| 5036 | A_UINT32 supported_rx_streams; |
| 5037 | } wmi_vdev_txrx_streams; |
| 5038 | |
| 5039 | /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */ |
| 5040 | typedef struct { |
| 5041 | A_UINT32 tlv_header; |
| 5042 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */ |
| 5043 | A_UINT32 type_count; |
| 5044 | /** 255: continuous schedule, 0: reserved */ |
| 5045 | A_UINT32 duration; |
| 5046 | /** Absent period duration in micro seconds */ |
| 5047 | A_UINT32 interval; |
| 5048 | /** Absent period interval in micro seconds */ |
| 5049 | A_UINT32 start_time; |
| 5050 | /** 32 bit tsf time when in starts */ |
| 5051 | } wmi_p2p_noa_descriptor; |
| 5052 | |
| 5053 | /** values for vdev_type */ |
| 5054 | #define WMI_VDEV_TYPE_AP 0x1 |
| 5055 | #define WMI_VDEV_TYPE_STA 0x2 |
| 5056 | #define WMI_VDEV_TYPE_IBSS 0x3 |
| 5057 | #define WMI_VDEV_TYPE_MONITOR 0x4 |
| 5058 | |
| 5059 | /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed |
| 5060 | * by FW to execute the NAN specific WMI commands and also implement NAN specific |
| 5061 | * operations like Network discovery, service provisioning and service |
| 5062 | * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create |
| 5063 | * WMI command to create this VDEV once during initialization and host is not |
| 5064 | * expected to use any VDEV specific WMI commands on this VDEV. |
| 5065 | **/ |
| 5066 | #define WMI_VDEV_TYPE_NAN 0x5 |
| 5067 | |
| 5068 | #define WMI_VDEV_TYPE_OCB 0x6 |
| 5069 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 5070 | /* NAN Data Interface */ |
| 5071 | #define WMI_VDEV_TYPE_NDI 0x7 |
| 5072 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5073 | /** values for vdev_subtype */ |
| 5074 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1 |
| 5075 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2 |
| 5076 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 5077 | #define WMI_UNIFIED_VDEV_SUBTYPE_PROXY_STA 0x4 |
| 5078 | #define WMI_UNIFIED_VDEV_SUBTYPE_MESH 0x5 |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 5079 | /* |
| 5080 | * new subtype for 11S mesh is required as 11S functionality differs |
| 5081 | * in many ways from proprietary mesh |
| 5082 | * 11S uses 6-addr frame format and supports peering between mesh |
| 5083 | * stations and dynamic best path selection between mesh stations. |
| 5084 | * While in proprietary mesh, neighboring mesh station MAC is manually |
| 5085 | * added to AST table for traffic flow between mesh stations |
| 5086 | */ |
| 5087 | #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5088 | |
| 5089 | /** values for vdev_start_request flags */ |
| 5090 | /** Indicates that AP VDEV uses hidden ssid. only valid for |
| 5091 | * AP/GO */ |
| 5092 | #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0) |
| 5093 | /** Indicates if robust management frame/management frame |
| 5094 | * protection is enabled. For GO/AP vdevs, it indicates that |
| 5095 | * it may support station/client associations with RMF enabled. |
| 5096 | * For STA/client vdevs, it indicates that sta will |
| 5097 | * associate with AP with RMF enabled. */ |
| 5098 | #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1) |
| 5099 | |
| 5100 | /* |
| 5101 | * Host is sending bcn_tx_rate to override the beacon tx rates. |
| 5102 | */ |
| 5103 | #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2) |
| 5104 | |
| 5105 | typedef struct { |
| 5106 | A_UINT32 tlv_header; |
| 5107 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */ |
| 5108 | /** unique id identifying the VDEV, generated by the caller */ |
| 5109 | A_UINT32 vdev_id; |
| 5110 | /** requestor id identifying the caller module */ |
| 5111 | A_UINT32 requestor_id; |
| 5112 | /** beacon interval from received beacon */ |
| 5113 | A_UINT32 beacon_interval; |
| 5114 | /** DTIM Period from the received beacon */ |
| 5115 | A_UINT32 dtim_period; |
| 5116 | /** Flags */ |
| 5117 | A_UINT32 flags; |
| 5118 | /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */ |
| 5119 | wmi_ssid ssid; |
| 5120 | /** beacon/probe reponse xmit rate. Applicable for SoftAP. */ |
| 5121 | /** This field will be invalid and ignored unless the */ |
| 5122 | /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */ |
| 5123 | /** When valid, this field contains the fixed tx rate for the beacon */ |
| 5124 | /** and probe response frames send by the GO or SoftAP */ |
| 5125 | A_UINT32 bcn_tx_rate; |
| 5126 | /** beacon/probe reponse xmit power. Applicable for SoftAP. */ |
| 5127 | A_UINT32 bcn_txPower; |
| 5128 | /** number of p2p NOA descriptor(s) from scan entry */ |
| 5129 | A_UINT32 num_noa_descriptors; |
| 5130 | /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID. |
| 5131 | During CAC, Our HW shouldn't ack ditected frames */ |
| 5132 | A_UINT32 disable_hw_ack; |
| 5133 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 5134 | /** The DBS policy manager indicates the preferred number of transmit streams. */ |
| 5135 | A_UINT32 preferred_tx_streams; |
| 5136 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 5137 | /** the DBS policy manager indicates the preferred number of receive streams. */ |
| 5138 | A_UINT32 preferred_rx_streams; |
| 5139 | /* The TLVs follows this structure: |
| 5140 | * wmi_channel chan; //WMI channel |
| 5141 | * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry |
| 5142 | */ |
| 5143 | } wmi_vdev_start_request_cmd_fixed_param; |
| 5144 | |
| 5145 | typedef struct { |
| 5146 | A_UINT32 tlv_header; |
| 5147 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */ |
| 5148 | /** unique id identifying the VDEV, generated by the caller */ |
| 5149 | A_UINT32 vdev_id; |
| 5150 | } wmi_vdev_delete_cmd_fixed_param; |
| 5151 | |
| 5152 | typedef struct { |
| 5153 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */ |
| 5154 | /** unique id identifying the VDEV, generated by the caller */ |
| 5155 | A_UINT32 vdev_id; |
| 5156 | /** aid (assoc id) received in association response for STA VDEV */ |
| 5157 | A_UINT32 vdev_assoc_id; |
| 5158 | /** bssid of the BSS the VDEV is joining */ |
| 5159 | wmi_mac_addr vdev_bssid; |
| 5160 | } wmi_vdev_up_cmd_fixed_param; |
| 5161 | |
| 5162 | typedef struct { |
| 5163 | A_UINT32 tlv_header; |
| 5164 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */ |
| 5165 | /** unique id identifying the VDEV, generated by the caller */ |
| 5166 | A_UINT32 vdev_id; |
| 5167 | } wmi_vdev_stop_cmd_fixed_param; |
| 5168 | |
| 5169 | typedef struct { |
| 5170 | A_UINT32 tlv_header; |
| 5171 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */ |
| 5172 | /** unique id identifying the VDEV, generated by the caller */ |
| 5173 | A_UINT32 vdev_id; |
| 5174 | } wmi_vdev_down_cmd_fixed_param; |
| 5175 | |
| 5176 | typedef struct { |
| 5177 | /** unique id identifying the VDEV, generated by the caller */ |
| 5178 | A_UINT32 vdev_id; |
| 5179 | } wmi_vdev_standby_response_cmd; |
| 5180 | |
| 5181 | typedef struct { |
| 5182 | /** unique id identifying the VDEV, generated by the caller */ |
| 5183 | A_UINT32 vdev_id; |
| 5184 | } wmi_vdev_resume_response_cmd; |
| 5185 | |
| 5186 | typedef struct { |
| 5187 | A_UINT32 tlv_header; |
| 5188 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */ |
| 5189 | /** unique id identifying the VDEV, generated by the caller */ |
| 5190 | A_UINT32 vdev_id; |
| 5191 | /** parameter id */ |
| 5192 | A_UINT32 param_id; |
| 5193 | /** parameter value */ |
| 5194 | A_UINT32 param_value; |
| 5195 | } wmi_vdev_set_param_cmd_fixed_param; |
| 5196 | |
| 5197 | typedef struct { |
| 5198 | A_UINT32 key_seq_counter_l; |
| 5199 | A_UINT32 key_seq_counter_h; |
| 5200 | } wmi_key_seq_counter; |
| 5201 | |
| 5202 | #define WMI_CIPHER_NONE 0x0 /* clear key */ |
| 5203 | #define WMI_CIPHER_WEP 0x1 |
| 5204 | #define WMI_CIPHER_TKIP 0x2 |
| 5205 | #define WMI_CIPHER_AES_OCB 0x3 |
| 5206 | #define WMI_CIPHER_AES_CCM 0x4 |
| 5207 | #define WMI_CIPHER_WAPI 0x5 |
| 5208 | #define WMI_CIPHER_CKIP 0x6 |
| 5209 | #define WMI_CIPHER_AES_CMAC 0x7 |
| 5210 | #define WMI_CIPHER_ANY 0x8 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5211 | #define WMI_CIPHER_AES_GCM 0x9 |
| 5212 | #define WMI_CIPHER_AES_GMAC 0xa |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5213 | |
| 5214 | typedef struct { |
| 5215 | A_UINT32 tlv_header; |
| 5216 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */ |
| 5217 | /** unique id identifying the VDEV, generated by the caller */ |
| 5218 | A_UINT32 vdev_id; |
| 5219 | /** MAC address used for installing */ |
| 5220 | wmi_mac_addr peer_macaddr; |
| 5221 | /** key index */ |
| 5222 | A_UINT32 key_ix; |
| 5223 | /** key flags */ |
| 5224 | A_UINT32 key_flags; |
| 5225 | /** key cipher, defined above */ |
| 5226 | A_UINT32 key_cipher; |
| 5227 | /** key rsc counter */ |
| 5228 | wmi_key_seq_counter key_rsc_counter; |
| 5229 | /** global key rsc counter */ |
| 5230 | wmi_key_seq_counter key_global_rsc_counter; |
| 5231 | /** global key tsc counter */ |
| 5232 | wmi_key_seq_counter key_tsc_counter; |
| 5233 | /** WAPI key rsc counter */ |
| 5234 | A_UINT8 wpi_key_rsc_counter[16]; |
| 5235 | /** WAPI key tsc counter */ |
| 5236 | A_UINT8 wpi_key_tsc_counter[16]; |
| 5237 | /** key length */ |
| 5238 | A_UINT32 key_len; |
| 5239 | /** key tx mic length */ |
| 5240 | A_UINT32 key_txmic_len; |
| 5241 | /** key rx mic length */ |
| 5242 | A_UINT32 key_rxmic_len; |
| 5243 | /* |
| 5244 | * Following this struct are this TLV. |
| 5245 | * // actual key data |
| 5246 | * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic |
| 5247 | */ |
| 5248 | } wmi_vdev_install_key_cmd_fixed_param; |
| 5249 | |
| 5250 | /** Preamble types to be used with VDEV fixed rate configuration */ |
| 5251 | typedef enum { |
| 5252 | WMI_RATE_PREAMBLE_OFDM, |
| 5253 | WMI_RATE_PREAMBLE_CCK, |
| 5254 | WMI_RATE_PREAMBLE_HT, |
| 5255 | WMI_RATE_PREAMBLE_VHT, |
| 5256 | } WMI_RATE_PREAMBLE; |
| 5257 | |
| 5258 | /** Value to disable fixed rate setting */ |
| 5259 | #define WMI_FIXED_RATE_NONE (0xff) |
| 5260 | |
| 5261 | /** the definition of different VDEV parameters */ |
| 5262 | typedef enum { |
| 5263 | /** RTS Threshold */ |
| 5264 | WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 5265 | /** Fragmentation threshold */ |
| 5266 | WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 5267 | /** beacon interval in TUs */ |
| 5268 | WMI_VDEV_PARAM_BEACON_INTERVAL, |
| 5269 | /** Listen interval in TUs */ |
| 5270 | WMI_VDEV_PARAM_LISTEN_INTERVAL, |
| 5271 | /** muticast rate in Mbps */ |
| 5272 | WMI_VDEV_PARAM_MULTICAST_RATE, |
| 5273 | /** management frame rate in Mbps */ |
| 5274 | WMI_VDEV_PARAM_MGMT_TX_RATE, |
| 5275 | /** slot time (long vs short) */ |
| 5276 | WMI_VDEV_PARAM_SLOT_TIME, |
| 5277 | /** preamble (long vs short) */ |
| 5278 | WMI_VDEV_PARAM_PREAMBLE, |
| 5279 | /** SWBA time (time before tbtt in msec) */ |
| 5280 | WMI_VDEV_PARAM_SWBA_TIME, |
| 5281 | /** time period for updating VDEV stats */ |
| 5282 | WMI_VDEV_STATS_UPDATE_PERIOD, |
| 5283 | /** age out time in msec for frames queued for station in power save*/ |
| 5284 | WMI_VDEV_PWRSAVE_AGEOUT_TIME, |
| 5285 | /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */ |
| 5286 | WMI_VDEV_HOST_SWBA_INTERVAL, |
| 5287 | /** DTIM period (specified in units of num beacon intervals) */ |
| 5288 | WMI_VDEV_PARAM_DTIM_PERIOD, |
| 5289 | /** scheduler air time limit for this VDEV. used by off chan scheduler */ |
| 5290 | WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 5291 | /** enable/dsiable WDS for this VDEV */ |
| 5292 | WMI_VDEV_PARAM_WDS, |
| 5293 | /** ATIM Window */ |
| 5294 | WMI_VDEV_PARAM_ATIM_WINDOW, |
| 5295 | /** BMISS max */ |
| 5296 | WMI_VDEV_PARAM_BMISS_COUNT_MAX, |
| 5297 | /** BMISS first time */ |
| 5298 | WMI_VDEV_PARAM_BMISS_FIRST_BCNT, |
| 5299 | /** BMISS final time */ |
| 5300 | WMI_VDEV_PARAM_BMISS_FINAL_BCNT, |
| 5301 | /** WMM enables/disabled */ |
| 5302 | WMI_VDEV_PARAM_FEATURE_WMM, |
| 5303 | /** Channel width */ |
| 5304 | WMI_VDEV_PARAM_CHWIDTH, |
| 5305 | /** Channel Offset */ |
| 5306 | WMI_VDEV_PARAM_CHEXTOFFSET, |
| 5307 | /** Disable HT Protection */ |
| 5308 | WMI_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 5309 | /** Quick STA Kickout */ |
| 5310 | WMI_VDEV_PARAM_STA_QUICKKICKOUT, |
| 5311 | /** Rate to be used with Management frames */ |
| 5312 | WMI_VDEV_PARAM_MGMT_RATE, |
| 5313 | /** Protection Mode */ |
| 5314 | WMI_VDEV_PARAM_PROTECTION_MODE, |
| 5315 | /** Fixed rate setting */ |
| 5316 | WMI_VDEV_PARAM_FIXED_RATE, |
| 5317 | /** Short GI Enable/Disable */ |
| 5318 | WMI_VDEV_PARAM_SGI, |
| 5319 | /** Enable LDPC */ |
| 5320 | WMI_VDEV_PARAM_LDPC, |
| 5321 | /** Enable Tx STBC */ |
| 5322 | WMI_VDEV_PARAM_TX_STBC, |
| 5323 | /** Enable Rx STBC */ |
| 5324 | WMI_VDEV_PARAM_RX_STBC, |
| 5325 | /** Intra BSS forwarding */ |
| 5326 | WMI_VDEV_PARAM_INTRA_BSS_FWD, |
| 5327 | /** Setting Default xmit key for Vdev */ |
| 5328 | WMI_VDEV_PARAM_DEF_KEYID, |
| 5329 | /** NSS width */ |
| 5330 | WMI_VDEV_PARAM_NSS, |
| 5331 | /** Set the custom rate for the broadcast data frames */ |
| 5332 | WMI_VDEV_PARAM_BCAST_DATA_RATE, |
| 5333 | /** Set the custom rate (rate-code) for multicast data frames */ |
| 5334 | WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 5335 | /** Tx multicast packet indicate Enable/Disable */ |
| 5336 | WMI_VDEV_PARAM_MCAST_INDICATE, |
| 5337 | /** Tx DHCP packet indicate Enable/Disable */ |
| 5338 | WMI_VDEV_PARAM_DHCP_INDICATE, |
| 5339 | /** Enable host inspection of Tx unicast packet to unknown destination */ |
| 5340 | WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 5341 | |
| 5342 | /* The minimum amount of time AP begins to consider STA inactive */ |
| 5343 | WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 5344 | |
| 5345 | /* An associated STA is considered inactive when there is no recent TX/RX |
| 5346 | * activity and no downlink frames are buffered for it. Once a STA exceeds |
| 5347 | * the maximum idle inactive time, the AP will send an 802.11 data-null as |
| 5348 | * a keep alive to verify the STA is still associated. If the STA does ACK |
| 5349 | * the data-null, or if the data-null is buffered and the STA does not |
| 5350 | * retrieve it, the STA will be considered unresponsive (see |
| 5351 | * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */ |
| 5352 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 5353 | |
| 5354 | /* An associated STA is considered unresponsive if there is no recent |
| 5355 | * TX/RX activity and downlink frames are buffered for it. Once a STA |
| 5356 | * exceeds the maximum unresponsive time, the AP will send a |
| 5357 | * WMI_STA_KICKOUT event to the host so the STA can be deleted. */ |
| 5358 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 5359 | |
| 5360 | /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */ |
| 5361 | WMI_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 5362 | /** Enable/Disable RTS-CTS */ |
| 5363 | WMI_VDEV_PARAM_ENABLE_RTSCTS, |
| 5364 | /* Enable TXBFee/er */ |
| 5365 | WMI_VDEV_PARAM_TXBF, |
| 5366 | |
| 5367 | /**Set packet power save */ |
| 5368 | WMI_VDEV_PARAM_PACKET_POWERSAVE, |
| 5369 | |
| 5370 | /**Drops un-encrypted packets if any received in an encryted connection |
| 5371 | * otherwise forwards to host |
| 5372 | */ |
| 5373 | WMI_VDEV_PARAM_DROP_UNENCRY, |
| 5374 | |
| 5375 | /* |
| 5376 | * Set TX encap type. |
| 5377 | * |
| 5378 | * enum wmi_pkt_type is to be used as the parameter |
| 5379 | * specifying the encap type. |
| 5380 | */ |
| 5381 | WMI_VDEV_PARAM_TX_ENCAP_TYPE, |
| 5382 | |
| 5383 | /* |
| 5384 | * Try to detect stations that woke-up and exited power save but did not |
| 5385 | * successfully transmit data-null with PM=0 to AP. When this happens, |
| 5386 | * STA and AP power save state are out-of-sync. Use buffered but |
| 5387 | * undelivered MSDU to the STA as a hint that the STA is really awake |
| 5388 | * and expecting normal ASAP delivery, rather than retrieving BU with |
| 5389 | * PS-Poll, U-APSD trigger, etc. |
| 5390 | * |
| 5391 | * 0 disables out-of-sync detection. Maximum time is 255 seconds. |
| 5392 | */ |
| 5393 | WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| 5394 | |
| 5395 | /* Enable/Disable early rx dynamic adjust feature. |
| 5396 | * Early-rx dynamic adjust is a advance power save feature. |
| 5397 | * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various |
| 5398 | * timing discrepancies in the system. |
| 5399 | * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum. |
| 5400 | * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed |
| 5401 | * properly to minimum the power consume.*/ |
| 5402 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, |
| 5403 | |
| 5404 | /* set target bmiss number per sample cycle if bmiss adjust was chosen. |
| 5405 | * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate |
| 5406 | * which can be set by user through WMI command. |
| 5407 | */ |
| 5408 | WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, |
| 5409 | |
| 5410 | /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */ |
| 5411 | WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, |
| 5412 | |
| 5413 | /* set slop_step */ |
| 5414 | WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, |
| 5415 | |
| 5416 | /* set init slop */ |
| 5417 | WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, |
| 5418 | |
| 5419 | /* pause adjust enable/disable */ |
| 5420 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, |
| 5421 | |
| 5422 | /* Set channel pwr limit value of the vdev the minimal value of all |
| 5423 | * vdevs operating on this channel will be set as channel tx power |
| 5424 | * limit, which is used to configure ratearray |
| 5425 | */ |
| 5426 | WMI_VDEV_PARAM_TX_PWRLIMIT, |
| 5427 | |
| 5428 | /* set the count of snr value for calculation in snr monitor */ |
| 5429 | WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, |
| 5430 | |
| 5431 | /** Roaming offload */ |
| 5432 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, |
| 5433 | |
| 5434 | /** Enable Leader request RX functionality for RMC */ |
| 5435 | WMI_VDEV_PARAM_ENABLE_RMC, |
| 5436 | |
| 5437 | /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event |
| 5438 | * by himself. If the beacon lost time exceed this threshold, the peer is |
| 5439 | * thought to be gone. */ |
| 5440 | WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, |
| 5441 | |
| 5442 | /** max rate in kpbs, transmit rate can't go beyond it */ |
| 5443 | WMI_VDEV_PARAM_MAX_RATE, |
| 5444 | |
| 5445 | /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */ |
| 5446 | WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, |
| 5447 | /* set Tx failure count threshold for the vdev */ |
| 5448 | WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, |
| 5449 | |
| 5450 | /* set ebt resync timeout value, in the unit of TU */ |
| 5451 | WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, |
| 5452 | |
| 5453 | /* Enable Aggregation State Trigger Event */ |
| 5454 | WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, |
| 5455 | |
| 5456 | /* This parameter indicates whether IBSS station can enter into power save |
| 5457 | * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay |
| 5458 | * awake all the time and should never set PM=1 in its transmitted frames. |
| 5459 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH |
| 5460 | * is non-zero. */ |
| 5461 | WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, |
| 5462 | |
| 5463 | /* This parameter indicates if this station can enter into power collapse |
| 5464 | * for the remaining beacon interval after the ATIM window. |
| 5465 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED |
| 5466 | * is set to true. */ |
| 5467 | WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, |
| 5468 | |
| 5469 | /* This parameter indicates whether IBSS station exit power save mode and |
| 5470 | * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window) |
| 5471 | * whenever there is a TX/RX activity. */ |
| 5472 | WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, |
| 5473 | |
| 5474 | /* If Awake on TX/RX activity is enabled, this parameter indicates |
| 5475 | * the data inactivity time in number of beacon intervals after which |
| 5476 | * IBSS station reenters power save by sending Null frame with PM=1. */ |
| 5477 | WMI_VDEV_PARAM_INACTIVITY_CNT, |
| 5478 | |
| 5479 | /* Inactivity time in msec after which TX Service Period (SP) is |
| 5480 | * terminated by sending a Qos Null frame with EOSP. |
| 5481 | * If value is 0, TX SP is terminated with the last buffered packet itself |
| 5482 | * instead of waiting for the inactivity timeout. */ |
| 5483 | WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, |
| 5484 | |
| 5485 | /** DTIM policy */ |
| 5486 | WMI_VDEV_PARAM_DTIM_POLICY, |
| 5487 | |
| 5488 | /* When IBSS network is initialized, PS-supporting device |
| 5489 | * does not enter protocol sleep state during first |
| 5490 | * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */ |
| 5491 | WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, |
| 5492 | |
| 5493 | /* Enable/Disable 1 RX chain usage during the ATIM window */ |
| 5494 | WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, |
| 5495 | /** |
| 5496 | * RX Leak window is the time driver waits before shutting down |
| 5497 | * the radio or switching the channel and after receiving an ACK |
| 5498 | * for a data frame with PM bit set) |
| 5499 | */ |
| 5500 | WMI_VDEV_PARAM_RX_LEAK_WINDOW, |
| 5501 | |
| 5502 | /** |
| 5503 | * Averaging factor(16 bit value) is used in the calculations to |
| 5504 | * perform averaging of different link level statistics like average |
| 5505 | * beacon spread or average number of frames leaked |
| 5506 | */ |
| 5507 | WMI_VDEV_PARAM_STATS_AVG_FACTOR, |
| 5508 | /* |
| 5509 | * disconnect threshold, once the consecutive error for specific peer |
| 5510 | * exceed this threhold, FW will send kickout event to host |
| 5511 | */ |
| 5512 | WMI_VDEV_PARAM_DISCONNECT_TH, |
| 5513 | /* |
| 5514 | * The rate_code of RTS_CTS changed by host. Now FW can support |
| 5515 | * more non-HT rates rather than 1Mbps or 6Mbps */ |
| 5516 | WMI_VDEV_PARAM_RTSCTS_RATE, |
| 5517 | |
| 5518 | /** This parameter indicates whether using a long duration RTS-CTS |
| 5519 | * protection when a SAP goes off channel in MCC mode */ |
| 5520 | WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, |
| 5521 | |
| 5522 | /* |
| 5523 | * This parameter indicates whether using a broadcast probe response |
| 5524 | * to increase the detectability of SAP in MCC mode |
| 5525 | */ |
| 5526 | WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 5527 | |
| 5528 | /* This parameter indicates the power backoff in percentage |
| 5529 | * currently supports 100%, 50%, 25%, 12.5%, and minimum |
| 5530 | * Host passes 0, 1, 2, 3, 4 to Firmware |
| 5531 | * 0 --> 100% --> no changes, 1 --> 50% --> -3dB, |
| 5532 | * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB |
| 5533 | */ |
| 5534 | WMI_VDEV_PARAM_TXPOWER_SCALE, |
| 5535 | |
| 5536 | /* TX power backoff in dB: tx power -= param value |
| 5537 | * Host passes values(DB) to Halphy, Halphy reduces the power table |
| 5538 | * by the values. Safety check will happen in Halphy. |
| 5539 | */ |
| 5540 | WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 5541 | /** Multicast to Unicast conversion setting */ |
| 5542 | WMI_VDEV_PARAM_MCAST2UCAST_SET, |
| 5543 | |
| 5544 | /** Total number of HW retries */ |
| 5545 | WMI_VDEV_PARAM_RC_NUM_RETRIES, |
| 5546 | |
| 5547 | /** Max tx percentage for cabq */ |
| 5548 | WMI_VDEV_PARAM_CABQ_MAXDUR, |
| 5549 | |
| 5550 | /** MFPTEST settings */ |
| 5551 | WMI_VDEV_PARAM_MFPTEST_SET, |
| 5552 | |
| 5553 | /** RTS Fixed rate setting */ |
| 5554 | WMI_VDEV_PARAM_RTS_FIXED_RATE, |
| 5555 | |
| 5556 | /** VHT SGI MASK */ |
| 5557 | WMI_VDEV_PARAM_VHT_SGIMASK, |
| 5558 | |
| 5559 | /** VHT80 Auto Rate MASK */ |
| 5560 | WMI_VDEV_PARAM_VHT80_RATEMASK, |
| 5561 | |
| 5562 | /** set Proxy STA features for this vap */ |
| 5563 | WMI_VDEV_PARAM_PROXY_STA, |
| 5564 | |
| 5565 | /** set virtual cell mode - enable/disable */ |
| 5566 | WMI_VDEV_PARAM_VIRTUAL_CELL_MODE, |
| 5567 | |
| 5568 | /** Set receive packet type */ |
| 5569 | WMI_VDEV_PARAM_RX_DECAP_TYPE, |
| 5570 | |
| 5571 | /** Set ratemask with specific Bandwidth and NSS */ |
| 5572 | WMI_VDEV_PARAM_BW_NSS_RATEMASK, |
| 5573 | |
| 5574 | /** Set SENSOR Support */ |
| 5575 | WMI_VDEV_PARAM_SENSOR_AP, |
| 5576 | |
| 5577 | /** Set beacon rate */ |
| 5578 | WMI_VDEV_PARAM_BEACON_RATE, |
| 5579 | |
| 5580 | /** Enable CTS to self for DTIM beacon */ |
| 5581 | WMI_VDEV_PARAM_DTIM_ENABLE_CTS, |
| 5582 | |
| 5583 | /** Disable station kickout at Vap level */ |
| 5584 | WMI_VDEV_PARAM_STA_KICKOUT, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 5585 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5586 | /* VDEV capabilities */ |
| 5587 | WMI_VDEV_PARAM_CAPABILITIES, /* see capabilities defs below */ |
Sandeep Puligilla | 62f7ca0 | 2016-03-24 15:48:33 -0700 | [diff] [blame] | 5588 | /* |
| 5589 | * Increment TSF in micro seconds to avoid beacon collision on mesh VAP |
| 5590 | * The host must ensure that either no other vdevs share the TSF with |
| 5591 | * this vdev, or else that it is acceptable to apply this TSF adjustment |
| 5592 | * to all vdevs sharing the TSF |
| 5593 | */ |
| 5594 | WMI_VDEV_PARAM_TSF_INCREMENT, |
Himanshu Agarwal | b953a26 | 2016-06-03 10:48:23 +0530 | [diff] [blame] | 5595 | WMI_VDEV_PARAM_PLACE_HOLDER_1, |
Himanshu Agarwal | a143815 | 2016-05-13 21:40:19 +0530 | [diff] [blame] | 5596 | |
| 5597 | /* |
| 5598 | * Vdev level rx filter of from-ds / to-ds / no-ds / ta / ra frames. |
| 5599 | * Used mainly for mesh-vap. |
| 5600 | * The parameter value delivered with the RX_FILTER vdev param contains |
| 5601 | * a bit-or mask of wmi_vdev_param_filter enum values. |
| 5602 | */ |
| 5603 | WMI_VDEV_PARAM_RX_FILTER, |
Himanshu Agarwal | e93c55e | 2016-05-20 12:18:15 +0530 | [diff] [blame] | 5604 | /* vdev-specific mgmt tx power in dBm units (signed integer value) */ |
| 5605 | WMI_VDEV_PARAM_MGMT_TX_POWER, |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 5606 | |
| 5607 | /* |
Himanshu Agarwal | 5e9ed45 | 2016-06-08 15:09:16 +0530 | [diff] [blame] | 5608 | * Vdev level non aggregration/11g sw retry threshold. |
| 5609 | * 0-disable, min:0, max:31, default:15 |
| 5610 | */ |
| 5611 | WMI_VDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 5612 | /* |
| 5613 | * Vdev level aggregration sw retry threshold. |
| 5614 | * 0-disable, min:0, max:31, default:15 |
| 5615 | */ |
| 5616 | WMI_VDEV_PARAM_AGG_SW_RETRY_TH, |
| 5617 | |
| 5618 | /* |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 5619 | * === ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === |
| 5620 | * The below vdev param types are used for prototyping, and are |
| 5621 | * prone to change. |
| 5622 | */ |
| 5623 | WMI_VDEV_PARAM_PROTOTYPE = 0x8000, |
| 5624 | /* 11AX SPECIFIC defines */ |
| 5625 | WMI_VDEV_PARAM_BSS_COLOR, |
| 5626 | /* In case of AP this will enable / disable MU-MIMO mode */ |
| 5627 | WMI_VDEV_PARAM_SET_UL_MU_MIMO, |
| 5628 | /* |
| 5629 | * set fragmentation level of the vdev's peers. |
| 5630 | * Values can be WMI_HE_FRAG_SUPPORT_LEVEL0..WMI_HE_FRAG_SUPPORT_LEVEL3 |
| 5631 | */ |
| 5632 | WMI_VDEV_PARAM_SET_FRAG_LEVEL, |
| 5633 | /* |
| 5634 | * control different features of HEControl: |
| 5635 | * Bit 0:- 1/0-> Enable/Disable transmssion of UL scheduling. |
| 5636 | * Bit 1:- 1/0-> Enable / disable honoring of ROMI from a peer. |
| 5637 | * Applicable in AP mode only. |
| 5638 | */ |
| 5639 | WMI_VDEV_PARAM_SET_HECONTROL, |
| 5640 | /* |
| 5641 | * enable / disable trigger access for a AP vdev's peers. |
| 5642 | * For a STA mode vdev this will enable/disable triggered access |
| 5643 | * and enable/disable Multi User mode of operation. |
| 5644 | */ |
| 5645 | WMI_VDEV_PARAM_SET_HEMU_MODE, |
| 5646 | /* |
| 5647 | * For Tx OFDMA this will set values of CP length or guard interval |
| 5648 | * to be |
| 5649 | * 0: Auto |
| 5650 | * 1: 0.8 us |
| 5651 | * 2: 1.6 us |
| 5652 | * 3: 3.2 us |
| 5653 | * Similar to Guard Interval |
| 5654 | */ |
| 5655 | WMI_VDEV_PARAM_TX_OFDMA_CPLEN, |
| 5656 | /*=== END VDEV_PARAM_PROTOTYPE SECTION ===*/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5657 | } WMI_VDEV_PARAM; |
| 5658 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5659 | /* vdev capabilities bit mask */ |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 5660 | #define WMI_VDEV_BEACON_SUPPORT 0x1 |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5661 | #define WMI_VDEV_WDS_LRN_ENABLED 0x2 |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 5662 | #define WMI_VDEV_VOW_ENABLED 0x4 |
| 5663 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5664 | #define WMI_VDEV_IS_BEACON_SUPPORTED(param) ((param) & WMI_VDEV_BEACON_SUPPORT) |
| 5665 | #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] | 5666 | #define WMI_VDEV_IS_VOW_ENABLED(param) ((param) & WMI_VDEV_VOW_ENABLED) |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5667 | |
| 5668 | /* TXBF capabilities masks */ |
| 5669 | #define WMI_TXBF_CONF_SU_TX_BFEE_S 0 |
| 5670 | #define WMI_TXBF_CONF_SU_TX_BFEE_M 0x1 |
| 5671 | #define WMI_TXBF_CONF_SU_TX_BFEE (WMI_TXBF_CONF_SU_TX_BFEE_M << \ |
| 5672 | WMI_TXBF_CONF_SU_TX_BFEE_S) |
| 5673 | #define WMI_TXBF_CONF_SU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFEE) |
| 5674 | #define WMI_TXBF_CONF_SU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z,\ |
| 5675 | WMI_TXBF_CONF_SU_TX_BFEE) |
| 5676 | |
| 5677 | #define WMI_TXBF_CONF_MU_TX_BFEE_S 1 |
| 5678 | #define WMI_TXBF_CONF_MU_TX_BFEE_M 0x1 |
| 5679 | #define WMI_TXBF_CONF_MU_TX_BFEE (WMI_TXBF_CONF_MU_TX_BFEE_M << \ |
| 5680 | WMI_TXBF_CONF_MU_TX_BFEE_S) |
| 5681 | #define WMI_TXBF_CONF_MU_TX_BFEE_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFEE) |
| 5682 | #define WMI_TXBF_CONF_MU_TX_BFEE_SET(x, z) WMI_F_RMW(x, z, \ |
| 5683 | WMI_TXBF_CONF_MU_TX_BFEE) |
| 5684 | |
| 5685 | #define WMI_TXBF_CONF_SU_TX_BFER_S 2 |
| 5686 | #define WMI_TXBF_CONF_SU_TX_BFER_M 0x1 |
| 5687 | #define WMI_TXBF_CONF_SU_TX_BFER (WMI_TXBF_CONF_SU_TX_BFER_M << \ |
| 5688 | WMI_TXBF_CONF_SU_TX_BFER_S) |
| 5689 | #define WMI_TXBF_CONF_SU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_SU_TX_BFER) |
| 5690 | #define WMI_TXBF_CONF_SU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \ |
| 5691 | WMI_TXBF_CONF_SU_TX_BFER) |
| 5692 | |
| 5693 | #define WMI_TXBF_CONF_MU_TX_BFER_S 3 |
| 5694 | #define WMI_TXBF_CONF_MU_TX_BFER_M 0x1 |
| 5695 | #define WMI_TXBF_CONF_MU_TX_BFER (WMI_TXBF_CONF_MU_TX_BFER_M << \ |
| 5696 | WMI_TXBF_CONF_MU_TX_BFER_S) |
| 5697 | #define WMI_TXBF_CONF_MU_TX_BFER_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_MU_TX_BFER) |
| 5698 | #define WMI_TXBF_CONF_MU_TX_BFER_SET(x, z) WMI_F_RMW(x, z, \ |
| 5699 | WMI_TXBF_CONF_MU_TX_BFER) |
| 5700 | |
| 5701 | #define WMI_TXBF_CONF_STS_CAP_S 4 |
| 5702 | #define WMI_TXBF_CONF_STS_CAP_M 0x7 |
| 5703 | #define WMI_TXBF_CONF_STS_CAP (WMI_TXBF_CONF_STS_CAP_M << \ |
| 5704 | WMI_TXBF_CONF_STS_CAP_S) |
| 5705 | #define WMI_TXBF_CONF_STS_CAP_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_STS_CAP); |
| 5706 | #define WMI_TXBF_CONF_STS_CAP_SET(x, z) WMI_F_RMW(x, z, \ |
| 5707 | WMI_TXBF_CONF_STS_CAP) |
| 5708 | |
| 5709 | #define WMI_TXBF_CONF_IMPLICIT_BF_S 7 |
| 5710 | #define WMI_TXBF_CONF_IMPLICIT_BF_M 0x1 |
| 5711 | #define WMI_TXBF_CONF_IMPLICIT_BF (WMI_TXBF_CONF_IMPLICIT_BF_M << \ |
| 5712 | WMI_TXBF_CONF_IMPLICIT_BF_S) |
| 5713 | #define WMI_TXBF_CONF_IMPLICIT_BF_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_IMPLICIT_BF) |
| 5714 | #define WMI_TXBF_CONF_IMPLICIT_BF_SET(x, z) WMI_F_RMW(x, z, \ |
| 5715 | WMI_TXBF_CONF_IMPLICIT_BF) |
| 5716 | |
| 5717 | #define WMI_TXBF_CONF_BF_SND_DIM_S 8 |
| 5718 | #define WMI_TXBF_CONF_BF_SND_DIM_M 0x7 |
| 5719 | #define WMI_TXBF_CONF_BF_SND_DIM (WMI_TXBF_CONF_BF_SND_DIM_M << \ |
| 5720 | WMI_TXBF_CONF_BF_SND_DIM_S) |
| 5721 | #define WMI_TXBF_CONF_BF_SND_DIM_GET(x) WMI_F_MS(x, WMI_TXBF_CONF_BF_SND_DIM) |
| 5722 | #define WMI_TXBF_CONF_BF_SND_DIM_SET(x, z) WMI_F_RMW(x, z, \ |
| 5723 | WMI_TXBF_CONF_BF_SND_DIM) |
| 5724 | |
| 5725 | /* TXBF capabilities */ |
| 5726 | typedef struct { |
| 5727 | A_UINT32 txbf_cap; |
| 5728 | } wmi_vdev_txbf_cap; |
| 5729 | |
Himanshu Agarwal | a143815 | 2016-05-13 21:40:19 +0530 | [diff] [blame] | 5730 | /* vdev rx filters (for mesh) */ |
| 5731 | typedef enum { |
| 5732 | /* Don't drop any frames - Default */ |
| 5733 | WMI_VDEV_RX_ALLOW_ALL_FRAMES = 0x0, |
| 5734 | /* Drop FromDS frames */ |
| 5735 | WMI_VDEV_RX_FILTER_OUT_FROMDS = 0x1, |
| 5736 | /* Drop ToDS frames */ |
| 5737 | WMI_VDEV_RX_FILTER_OUT_TODS = 0x2, |
| 5738 | /* Drop NODS frames */ |
| 5739 | WMI_VDEV_RX_FILTER_OUT_NODS = 0x4, |
| 5740 | /* Drop RA frames */ |
| 5741 | WMI_VDEV_RX_FILTER_OUT_RA = 0x8, |
| 5742 | /* Drop TA frames */ |
| 5743 | WMI_VDEV_RX_FILTER_OUT_TA = 0x10, |
| 5744 | } wmi_vdev_param_filter; |
| 5745 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5746 | /* Length of ATIM Window in TU */ |
| 5747 | #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW |
| 5748 | |
| 5749 | enum wmi_pkt_type { |
| 5750 | WMI_PKT_TYPE_RAW = 0, |
| 5751 | WMI_PKT_TYPE_NATIVE_WIFI = 1, |
| 5752 | WMI_PKT_TYPE_ETHERNET = 2, |
| 5753 | }; |
| 5754 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5755 | /******************************************************************* |
| 5756 | * wmi_vdev_txbf_en is DEPRECATED in favor of wmi_vdev_txbf_cap |
| 5757 | * Do not use it! |
| 5758 | *******************************************************************/ |
| 5759 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5760 | typedef struct { |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5761 | A_UINT8 sutxbfee:1, mutxbfee:1, sutxbfer:1, mutxbfer:1, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5762 | #if defined(AR900B) |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5763 | txb_sts_cap:3, implicit_bf:1; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5764 | #else |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 5765 | reserved:4; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5766 | #endif |
| 5767 | } wmi_vdev_txbf_en; |
| 5768 | |
| 5769 | /** Upto 8 bits are available for Roaming module to be sent along with |
| 5770 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/ |
| 5771 | /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */ |
| 5772 | #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1 |
| 5773 | /* Enable Roaming module in FW to do scan based on Final BMISS */ |
| 5774 | #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2 |
| 5775 | |
| 5776 | /** slot time long */ |
| 5777 | #define WMI_VDEV_SLOT_TIME_LONG 0x1 |
| 5778 | /** slot time short */ |
| 5779 | #define WMI_VDEV_SLOT_TIME_SHORT 0x2 |
| 5780 | /** preablbe long */ |
| 5781 | #define WMI_VDEV_PREAMBLE_LONG 0x1 |
| 5782 | /** preablbe short */ |
| 5783 | #define WMI_VDEV_PREAMBLE_SHORT 0x2 |
| 5784 | |
| 5785 | /** the definition of different START/RESTART Event response */ |
| 5786 | typedef enum { |
| 5787 | /* Event respose of START CMD */ |
| 5788 | WMI_VDEV_START_RESP_EVENT = 0, |
| 5789 | /* Event respose of RESTART CMD */ |
| 5790 | WMI_VDEV_RESTART_RESP_EVENT, |
| 5791 | } WMI_START_EVENT_PARAM; |
| 5792 | |
| 5793 | typedef struct { |
| 5794 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */ |
| 5795 | /** unique id identifying the VDEV, generated by the caller */ |
| 5796 | A_UINT32 vdev_id; |
| 5797 | /** requestor id that requested the VDEV start request */ |
| 5798 | A_UINT32 requestor_id; |
| 5799 | /* Respose of Event type START/RESTART */ |
| 5800 | WMI_START_EVENT_PARAM resp_type; |
| 5801 | /** status of the response */ |
| 5802 | A_UINT32 status; |
| 5803 | /** Vdev chain mask */ |
| 5804 | A_UINT32 chain_mask; |
| 5805 | /** Vdev mimo power save mode */ |
| 5806 | A_UINT32 smps_mode; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 5807 | union { |
| 5808 | /* OBSOLETE - will be removed once all refs are gone */ |
| 5809 | A_UINT32 mac_id; |
| 5810 | /** pdev_id for identifying the MAC |
| 5811 | * See macros starting with WMI_PDEV_ID_ for values. |
| 5812 | */ |
| 5813 | A_UINT32 pdev_id; |
| 5814 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5815 | /** Configured Transmit Streams **/ |
| 5816 | A_UINT32 cfgd_tx_streams; |
| 5817 | /** Configured Receive Streams **/ |
| 5818 | A_UINT32 cfgd_rx_streams; |
| 5819 | } wmi_vdev_start_response_event_fixed_param; |
| 5820 | |
| 5821 | typedef struct { |
| 5822 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */ |
| 5823 | /** unique id identifying the VDEV, generated by the caller */ |
| 5824 | A_UINT32 vdev_id; |
| 5825 | } wmi_vdev_stopped_event_fixed_param; |
| 5826 | |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 5827 | typedef struct { |
| 5828 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_resp_event_fixed_param */ |
| 5829 | /** unique id identifying the VDEV, generated by the caller */ |
| 5830 | A_UINT32 vdev_id; |
| 5831 | } wmi_vdev_delete_resp_event_fixed_param; |
| 5832 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 5833 | /** common structure used for simple events (stopped, resume_req, standby response) */ |
| 5834 | typedef struct { |
| 5835 | A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */ |
| 5836 | /** unique id identifying the VDEV, generated by the caller */ |
| 5837 | A_UINT32 vdev_id; |
| 5838 | } wmi_vdev_simple_event_fixed_param; |
| 5839 | |
| 5840 | /** VDEV start response status codes */ |
| 5841 | #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */ |
| 5842 | #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */ |
| 5843 | #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */ |
| 5844 | |
| 5845 | /** Beacon processing related command and event structures */ |
| 5846 | typedef struct { |
| 5847 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */ |
| 5848 | /** unique id identifying the VDEV, generated by the caller */ |
| 5849 | A_UINT32 vdev_id; |
| 5850 | /** xmit rate */ |
| 5851 | A_UINT32 tx_rate; |
| 5852 | /** xmit power */ |
| 5853 | A_UINT32 txPower; |
| 5854 | /** beacon buffer length in bytes */ |
| 5855 | A_UINT32 buf_len; |
| 5856 | /* This TLV is followed by array of bytes: |
| 5857 | * // beacon frame buffer |
| 5858 | * A_UINT8 bufp[]; |
| 5859 | */ |
| 5860 | } wmi_bcn_tx_hdr; |
| 5861 | |
| 5862 | /* Beacon filter */ |
| 5863 | #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */ |
| 5864 | #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */ |
| 5865 | #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */ |
| 5866 | #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */ |
| 5867 | #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */ |
| 5868 | |
| 5869 | typedef struct { |
| 5870 | /** Filter ID */ |
| 5871 | A_UINT32 bcn_filter_id; |
| 5872 | /** Filter type - wmi_bcn_filter */ |
| 5873 | A_UINT32 bcn_filter; |
| 5874 | /** Buffer len */ |
| 5875 | A_UINT32 bcn_filter_len; |
| 5876 | /** Filter info (threshold, BSSID, RSSI) */ |
| 5877 | A_UINT8 *bcn_filter_buf; |
| 5878 | } wmi_bcn_filter_rx_cmd; |
| 5879 | |
| 5880 | /** Capabilities and IEs to be passed to firmware */ |
| 5881 | typedef struct { |
| 5882 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */ |
| 5883 | /** Capabilities */ |
| 5884 | A_UINT32 caps; |
| 5885 | /** ERP info */ |
| 5886 | A_UINT32 erp; |
| 5887 | /** Advanced capabilities */ |
| 5888 | /** HT capabilities */ |
| 5889 | /** HT Info */ |
| 5890 | /** ibss_dfs */ |
| 5891 | /** wpa Info */ |
| 5892 | /** rsn Info */ |
| 5893 | /** rrm info */ |
| 5894 | /** ath_ext */ |
| 5895 | /** app IE */ |
| 5896 | } wmi_bcn_prb_info; |
| 5897 | |
| 5898 | typedef struct { |
| 5899 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */ |
| 5900 | /** unique id identifying the VDEV, generated by the caller */ |
| 5901 | A_UINT32 vdev_id; |
| 5902 | /** TIM IE offset from the beginning of the template. */ |
| 5903 | A_UINT32 tim_ie_offset; |
| 5904 | /** beacon buffer length. data is in TLV data[] */ |
| 5905 | A_UINT32 buf_len; |
| 5906 | /* |
| 5907 | * The TLVs follows: |
| 5908 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 5909 | * A_UINT8 data[]; //Variable length data |
| 5910 | */ |
| 5911 | } wmi_bcn_tmpl_cmd_fixed_param; |
| 5912 | |
| 5913 | typedef struct { |
| 5914 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */ |
| 5915 | /** unique id identifying the VDEV, generated by the caller */ |
| 5916 | A_UINT32 vdev_id; |
| 5917 | /** beacon buffer length. data is in TLV data[] */ |
| 5918 | A_UINT32 buf_len; |
| 5919 | /* |
| 5920 | * The TLVs follows: |
| 5921 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 5922 | * A_UINT8 data[]; //Variable length data |
| 5923 | */ |
| 5924 | } wmi_prb_tmpl_cmd_fixed_param; |
| 5925 | |
| 5926 | typedef struct { |
| 5927 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */ |
| 5928 | A_UINT32 tlv_header; |
| 5929 | /** unique id identifying the VDEV */ |
| 5930 | A_UINT32 vdev_id; |
| 5931 | /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 5932 | A_UINT32 tx_status; |
| 5933 | } wmi_offload_bcn_tx_status_event_fixed_param; |
| 5934 | |
| 5935 | enum wmi_sta_ps_mode { |
| 5936 | /** enable power save for the given STA VDEV */ |
| 5937 | WMI_STA_PS_MODE_DISABLED = 0, |
| 5938 | /** disable power save for a given STA VDEV */ |
| 5939 | WMI_STA_PS_MODE_ENABLED = 1, |
| 5940 | }; |
| 5941 | |
| 5942 | typedef struct { |
| 5943 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */ |
| 5944 | /** unique id identifying the VDEV, generated by the caller */ |
| 5945 | A_UINT32 vdev_id; |
| 5946 | |
| 5947 | /** Power save mode |
| 5948 | * |
| 5949 | * (see enum wmi_sta_ps_mode) |
| 5950 | */ |
| 5951 | A_UINT32 sta_ps_mode; |
| 5952 | } wmi_sta_powersave_mode_cmd_fixed_param; |
| 5953 | |
| 5954 | enum wmi_csa_offload_en { |
| 5955 | WMI_CSA_OFFLOAD_DISABLE = 0, |
| 5956 | WMI_CSA_OFFLOAD_ENABLE = 1, |
| 5957 | }; |
| 5958 | |
| 5959 | typedef struct { |
| 5960 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */ |
| 5961 | A_UINT32 vdev_id; |
| 5962 | A_UINT32 csa_offload_enable; |
| 5963 | } wmi_csa_offload_enable_cmd_fixed_param; |
| 5964 | |
| 5965 | typedef struct { |
| 5966 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */ |
| 5967 | A_UINT32 vdev_id; |
| 5968 | /* |
| 5969 | * The TLVs follows: |
| 5970 | * wmi_channel chan; |
| 5971 | */ |
| 5972 | } wmi_csa_offload_chanswitch_cmd_fixed_param; |
| 5973 | /** |
| 5974 | * This parameter controls the policy for retrieving frames from AP while the |
| 5975 | * STA is in sleep state. |
| 5976 | * |
| 5977 | * Only takes affect if the sta_ps_mode is enabled |
| 5978 | */ |
| 5979 | enum wmi_sta_ps_param_rx_wake_policy { |
| 5980 | /* Wake up when ever there is an RX activity on the VDEV. In this mode |
| 5981 | * the Power save SM(state machine) will come out of sleep by either |
| 5982 | * sending null frame (or) a data frame (with PS==0) in response to TIM |
| 5983 | * bit set in the received beacon frame from AP. |
| 5984 | */ |
| 5985 | WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0, |
| 5986 | |
| 5987 | /* Here the power save state machine will not wakeup in response to TIM |
| 5988 | * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD |
| 5989 | * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all |
| 5990 | * access categories are delivery-enabled, the station will send a UAPSD |
| 5991 | * trigger frame, otherwise it will send a PS-Poll. |
| 5992 | */ |
| 5993 | WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, |
| 5994 | }; |
| 5995 | |
| 5996 | /** Number of tx frames/beacon that cause the power save SM to wake up. |
| 5997 | * |
| 5998 | * Value 1 causes the SM to wake up for every TX. Value 0 has a special |
| 5999 | * meaning, It will cause the SM to never wake up. This is useful if you want |
| 6000 | * to keep the system to sleep all the time for some kind of test mode . host |
| 6001 | * can change this parameter any time. It will affect at the next tx frame. |
| 6002 | */ |
| 6003 | enum wmi_sta_ps_param_tx_wake_threshold { |
| 6004 | WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, |
| 6005 | WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, |
| 6006 | |
| 6007 | /* Values greater than one indicate that many TX attempts per beacon |
| 6008 | * interval before the STA will wake up |
| 6009 | */ |
| 6010 | }; |
| 6011 | |
| 6012 | /** |
| 6013 | * The maximum number of PS-Poll frames the FW will send in response to |
| 6014 | * traffic advertised in TIM before waking up (by sending a null frame with PS |
| 6015 | * = 0). Value 0 has a special meaning: there is no maximum count and the FW |
| 6016 | * will send as many PS-Poll as are necessary to retrieve buffered BU. This |
| 6017 | * parameter is used when the RX wake policy is |
| 6018 | * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake |
| 6019 | * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE. |
| 6020 | */ |
| 6021 | enum wmi_sta_ps_param_pspoll_count { |
| 6022 | WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0, |
| 6023 | /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW |
| 6024 | * will send before waking up. |
| 6025 | */ |
| 6026 | }; |
| 6027 | |
| 6028 | /* |
| 6029 | * This will include the delivery and trigger enabled state for every AC. |
| 6030 | * This is the negotiated state with AP. The host MLME needs to set this based |
| 6031 | * on AP capability and the state Set in the association request by the |
| 6032 | * station MLME.Lower 8 bits of the value specify the UAPSD configuration. |
| 6033 | */ |
| 6034 | #define WMI_UAPSD_AC_TYPE_DELI 0 |
| 6035 | #define WMI_UAPSD_AC_TYPE_TRIG 1 |
| 6036 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 6037 | #define WMI_UAPSD_AC_BIT_MASK(ac, type) \ |
| 6038 | do { \ |
| 6039 | (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : \ |
| 6040 | (1<<((ac<<1)+1)) \ |
| 6041 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6042 | |
| 6043 | enum wmi_sta_ps_param_uapsd { |
| 6044 | WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 6045 | WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 6046 | WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 6047 | WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 6048 | WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 6049 | WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 6050 | WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 6051 | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 6052 | }; |
| 6053 | |
| 6054 | enum wmi_sta_powersave_param { |
| 6055 | /** |
| 6056 | * Controls how frames are retrievd from AP while STA is sleeping |
| 6057 | * |
| 6058 | * (see enum wmi_sta_ps_param_rx_wake_policy) |
| 6059 | */ |
| 6060 | WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0, |
| 6061 | |
| 6062 | /** |
| 6063 | * The STA will go active after this many TX |
| 6064 | * |
| 6065 | * (see enum wmi_sta_ps_param_tx_wake_threshold) |
| 6066 | */ |
| 6067 | WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, |
| 6068 | |
| 6069 | /** |
| 6070 | * Number of PS-Poll to send before STA wakes up |
| 6071 | * |
| 6072 | * (see enum wmi_sta_ps_param_pspoll_count) |
| 6073 | * |
| 6074 | */ |
| 6075 | WMI_STA_PS_PARAM_PSPOLL_COUNT = 2, |
| 6076 | |
| 6077 | /** |
| 6078 | * TX/RX inactivity time in msec before going to sleep. |
| 6079 | * |
| 6080 | * The power save SM will monitor tx/rx activity on the VDEV, if no |
| 6081 | * activity for the specified msec of the parameter the Power save SM will |
| 6082 | * go to sleep. |
| 6083 | */ |
| 6084 | WMI_STA_PS_PARAM_INACTIVITY_TIME = 3, |
| 6085 | |
| 6086 | /** |
| 6087 | * Set uapsd configuration. |
| 6088 | * |
| 6089 | * (see enum wmi_sta_ps_param_uapsd) |
| 6090 | */ |
| 6091 | WMI_STA_PS_PARAM_UAPSD = 4, |
| 6092 | /** |
| 6093 | * Number of PS-Poll to send before STA wakes up in QPower Mode |
| 6094 | */ |
| 6095 | WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5, |
| 6096 | |
| 6097 | /** |
| 6098 | * Enable QPower |
| 6099 | */ |
| 6100 | WMI_STA_PS_ENABLE_QPOWER = 6, |
| 6101 | |
| 6102 | /** |
| 6103 | * Number of TX frames before the entering the Active state |
| 6104 | */ |
| 6105 | WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7, |
| 6106 | |
| 6107 | /** |
| 6108 | * QPower SPEC PSPOLL interval |
| 6109 | */ |
| 6110 | WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8, |
| 6111 | |
| 6112 | /** |
| 6113 | * Max SPEC PSPOLL to be sent when the PSPOLL response has |
| 6114 | * no-data bit set |
| 6115 | */ |
| 6116 | WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9, |
| 6117 | }; |
| 6118 | |
| 6119 | typedef struct { |
| 6120 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */ |
| 6121 | /** unique id identifying the VDEV, generated by the caller */ |
| 6122 | A_UINT32 vdev_id; |
| 6123 | /** station power save parameter (see enum wmi_sta_powersave_param) */ |
| 6124 | A_UINT32 param; |
| 6125 | A_UINT32 value; |
| 6126 | } wmi_sta_powersave_param_cmd_fixed_param; |
| 6127 | |
| 6128 | /** No MIMO power save */ |
| 6129 | #define WMI_STA_MIMO_PS_MODE_DISABLE |
| 6130 | /** mimo powersave mode static*/ |
| 6131 | #define WMI_STA_MIMO_PS_MODE_STATIC |
| 6132 | /** mimo powersave mode dynamic */ |
| 6133 | #define WMI_STA_MIMO_PS_MODE_DYNAMI |
| 6134 | |
| 6135 | typedef struct { |
| 6136 | /** unique id identifying the VDEV, generated by the caller */ |
| 6137 | A_UINT32 vdev_id; |
| 6138 | /** mimo powersave mode as defined above */ |
| 6139 | A_UINT32 mimo_pwrsave_mode; |
| 6140 | } wmi_sta_mimo_ps_mode_cmd; |
| 6141 | |
| 6142 | /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ |
| 6143 | enum wmi_ap_ps_param_uapsd { |
| 6144 | WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 6145 | WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 6146 | WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 6147 | WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 6148 | WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 6149 | WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 6150 | WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 6151 | WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 6152 | }; |
| 6153 | |
| 6154 | /** U-APSD maximum service period of peer station */ |
| 6155 | enum wmi_ap_ps_peer_param_max_sp { |
| 6156 | WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, |
| 6157 | WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1, |
| 6158 | WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2, |
| 6159 | WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3, |
| 6160 | |
| 6161 | /* keep last! */ |
| 6162 | MAX_WMI_AP_PS_PEER_PARAM_MAX_SP, |
| 6163 | }; |
| 6164 | |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6165 | /** param values for WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE */ |
| 6166 | enum wmi_ap_ps_param_sifs_resp_frmtype { |
| 6167 | WMI_SIFS_RESP_PSPOLL = (1 << 0), |
| 6168 | WMI_SIFS_RESP_UAPSD = (1 << 1), |
| 6169 | WMI_SIFS_RESP_QBST_EXP = (1 << 2), |
| 6170 | WMI_SIFS_RESP_QBST_DATA = (1 << 3), |
| 6171 | WMI_SIFS_RESP_QBST_BAR = (1 << 4), |
| 6172 | }; |
| 6173 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6174 | /** |
| 6175 | * AP power save parameter |
| 6176 | * Set a power save specific parameter for a peer station |
| 6177 | */ |
| 6178 | enum wmi_ap_ps_peer_param { |
| 6179 | /** Set uapsd configuration for a given peer. |
| 6180 | * |
| 6181 | * This will include the delivery and trigger enabled state for every AC. |
| 6182 | * The host MLME needs to set this based on AP capability and stations |
| 6183 | * request Set in the association request received from the station. |
| 6184 | * |
| 6185 | * Lower 8 bits of the value specify the UAPSD configuration. |
| 6186 | * |
| 6187 | * (see enum wmi_ap_ps_param_uapsd) |
| 6188 | * The default value is 0. |
| 6189 | */ |
| 6190 | WMI_AP_PS_PEER_PARAM_UAPSD = 0, |
| 6191 | |
| 6192 | /** |
| 6193 | * Set the service period for a UAPSD capable station |
| 6194 | * |
| 6195 | * The service period from wme ie in the (re)assoc request frame. |
| 6196 | * |
| 6197 | * (see enum wmi_ap_ps_peer_param_max_sp) |
| 6198 | */ |
| 6199 | WMI_AP_PS_PEER_PARAM_MAX_SP = 1, |
| 6200 | |
| 6201 | /** Time in seconds for aging out buffered frames for STA in power save */ |
| 6202 | WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6203 | /** |
| 6204 | * Specify frame types that are considered SIFS RESP trigger frame |
| 6205 | * (see enum wmi_ap_ps_param_sifs_resp_frmtype) |
| 6206 | */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 6207 | WMI_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3, |
| 6208 | |
| 6209 | /* |
| 6210 | * Specifies the trigger state of TID. |
| 6211 | * Valid only for UAPSD frame type |
| 6212 | */ |
| 6213 | WMI_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4, |
| 6214 | |
| 6215 | /** Specifies the WNM sleep state of a STA */ |
| 6216 | WMI_AP_PS_PEER_PARAM_WNM_SLEEP = 5, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6217 | }; |
| 6218 | |
| 6219 | typedef struct { |
| 6220 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */ |
| 6221 | /** unique id identifying the VDEV, generated by the caller */ |
| 6222 | A_UINT32 vdev_id; |
| 6223 | /** peer MAC address */ |
| 6224 | wmi_mac_addr peer_macaddr; |
| 6225 | /** AP powersave param (see enum wmi_ap_ps_peer_param) */ |
| 6226 | A_UINT32 param; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 6227 | /** AP powersave param value (see defines) */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6228 | A_UINT32 value; |
| 6229 | } wmi_ap_ps_peer_cmd_fixed_param; |
| 6230 | |
| 6231 | /** Configure peer station 11v U-APSD coexistance |
| 6232 | * |
| 6233 | * Two parameters from uaspd coexistence ie info (as specified in 11v) are |
| 6234 | * sent down to FW along with this command. |
| 6235 | * |
| 6236 | * The semantics of these fields are described in the following text extracted |
| 6237 | * from 802.11v. |
| 6238 | * |
| 6239 | * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the |
| 6240 | * U-APSD Coexistence element, the AP should not transmit frames to the |
| 6241 | * non-AP STA outside of the U-APSD Coexistence Service Period, which |
| 6242 | * begins when the AP receives the U-APSD trigger frame and ends after |
| 6243 | * the transmission period specified by the result of the following |
| 6244 | * calculation: |
| 6245 | * |
| 6246 | * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval)) |
| 6247 | * |
| 6248 | * Where T is the time the U-APSD trigger frame was received at the AP |
| 6249 | * Interval is the UAPSD Coexistence element Duration/Interval field |
| 6250 | * value (see 7.3.2.91) or upon the successful transmission of a frame |
| 6251 | * with EOSP bit set to 1, whichever is earlier. |
| 6252 | * |
| 6253 | * |
| 6254 | * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD |
| 6255 | * Coexistence element, the AP should not transmit frames to the non-AP |
| 6256 | * STA outside of the U-APSD Coexistence Service Period, which begins |
| 6257 | * when the AP receives a U-APSD trigger frame and ends after the |
| 6258 | * transmission period specified by the result of the following |
| 6259 | * calculation: End of transmission period = T + Duration |
| 6260 | */ |
| 6261 | typedef struct { |
| 6262 | /** unique id identifying the VDEV, generated by the caller */ |
| 6263 | A_UINT32 vdev_id; |
| 6264 | /** peer MAC address */ |
| 6265 | wmi_mac_addr peer_macaddr; |
| 6266 | /** Enable U-APSD coexistence support for this peer |
| 6267 | * |
| 6268 | * 0 -> disabled (default) |
| 6269 | * 1 -> enabled |
| 6270 | */ |
| 6271 | A_UINT32 enabled; |
| 6272 | /** Duration/Interval as defined by 11v U-ASPD coexistance */ |
| 6273 | A_UINT32 duration_interval; |
| 6274 | /** Upper 32 bits of 64-bit TSF offset */ |
| 6275 | A_UINT32 tsf_offset_high; |
| 6276 | /** Lower 32 bits of 64-bit TSF offset */ |
| 6277 | A_UINT32 tsf_offset_low; |
| 6278 | } wmi_ap_powersave_peer_uapsd_coex_cmd; |
| 6279 | |
| 6280 | typedef enum { |
| 6281 | WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001, |
| 6282 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002, |
| 6283 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004, |
| 6284 | |
| 6285 | WMI_AP_PS_EGAP_FLAG_MAX = 0x8000 |
| 6286 | } wmi_ap_ps_egap_flag_type; |
| 6287 | |
| 6288 | /** |
| 6289 | * configure ehanced green ap parameters |
| 6290 | */ |
| 6291 | typedef struct { |
| 6292 | /* |
| 6293 | * TLV tag and len; tag equals |
| 6294 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 6295 | */ |
| 6296 | A_UINT32 tlv_header; |
| 6297 | /** Enable enhanced green ap |
| 6298 | * 0 -> disabled |
| 6299 | * 1 -> enabled |
| 6300 | */ |
| 6301 | A_UINT32 enable; |
| 6302 | /** The param indicates a duration that all STAs connected |
| 6303 | * to S-AP have no traffic. |
| 6304 | */ |
| 6305 | A_UINT32 inactivity_time; /* in unit of milliseconds */ |
| 6306 | /** The param indicates a duration that all STAs connected |
| 6307 | * to S-AP have no traffic, after all STAs have entered powersave. |
| 6308 | */ |
| 6309 | A_UINT32 wait_time; /* in unit of milliseconds */ |
| 6310 | /** The param is used to turn on/off some functions within E-GAP. |
| 6311 | */ |
| 6312 | A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */ |
| 6313 | } wmi_ap_ps_egap_param_cmd_fixed_param; |
| 6314 | |
| 6315 | typedef enum { |
| 6316 | WMI_AP_PS_EGAP_STATUS_IDLE = 1, |
| 6317 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2, |
| 6318 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3, |
| 6319 | |
| 6320 | WMI_AP_PS_EGAP_STATUS_MAX = 15 |
| 6321 | } wmi_ap_ps_egap_status_type; |
| 6322 | |
| 6323 | /** |
| 6324 | * send ehanced green ap status to host |
| 6325 | */ |
| 6326 | typedef struct { |
Manikandan Mohan | 0c7ae40 | 2015-12-03 17:56:41 -0800 | [diff] [blame] | 6327 | /* TLV tag and len; tag equals |
| 6328 | * WMITLV_TAG_STRUC_wmi_ap_ps_egap_info_chainmask_list |
| 6329 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6330 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 6331 | union { |
| 6332 | /* OBSOLETE - will be removed once all refs are gone */ |
| 6333 | A_UINT32 mac_id; |
| 6334 | /** pdev_id for identifying the MAC |
| 6335 | * See macros starting with WMI_PDEV_ID_ for values. |
| 6336 | */ |
| 6337 | A_UINT32 pdev_id; |
| 6338 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6339 | /** The param indicates the current tx chainmask with the mac id. */ |
| 6340 | A_UINT32 tx_chainmask; |
| 6341 | /** The param indicates the current rx chainmask with the mac id. */ |
| 6342 | A_UINT32 rx_chainmask; |
| 6343 | } wmi_ap_ps_egap_info_chainmask_list; |
| 6344 | |
| 6345 | typedef struct { |
| 6346 | /* |
| 6347 | * TLV tag and len; tag equals |
| 6348 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 6349 | */ |
| 6350 | A_UINT32 tlv_header; |
| 6351 | /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */ |
| 6352 | A_UINT32 status; |
| 6353 | /* This TLV is followed by |
| 6354 | * wmi_ap_ps_egap_info_chainmask_list chainmask_list[]; |
| 6355 | */ |
| 6356 | } wmi_ap_ps_egap_info_event_fixed_param; |
| 6357 | |
| 6358 | |
| 6359 | /* 128 clients = 4 words */ |
| 6360 | /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */ |
| 6361 | #define WMI_TIM_BITMAP_ARRAY_SIZE 4 |
| 6362 | |
| 6363 | typedef struct { |
| 6364 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */ |
| 6365 | /** TIM bitmap len (in bytes)*/ |
| 6366 | A_UINT32 tim_len; |
| 6367 | /** TIM Partial Virtual Bitmap */ |
| 6368 | A_UINT32 tim_mcast; |
| 6369 | A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE]; |
| 6370 | A_UINT32 tim_changed; |
| 6371 | A_UINT32 tim_num_ps_pending; |
| 6372 | } wmi_tim_info; |
| 6373 | |
| 6374 | typedef struct { |
| 6375 | /** Flag to enable quiet period IE support */ |
| 6376 | A_UINT32 is_enabled; |
| 6377 | /** Quiet start */ |
| 6378 | A_UINT32 tbttcount; |
| 6379 | /** Beacon intervals between quiets*/ |
| 6380 | A_UINT32 period; |
| 6381 | /** TUs of each quiet*/ |
| 6382 | A_UINT32 duration; |
| 6383 | /** TUs of from TBTT of quiet start*/ |
| 6384 | A_UINT32 offset; |
| 6385 | } wmi_quiet_info; |
| 6386 | |
| 6387 | /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */ |
| 6388 | #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */ |
| 6389 | |
| 6390 | typedef struct { |
| 6391 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */ |
| 6392 | /** Bit 0: Flag to indicate an update in NOA schedule |
| 6393 | * Bits 7-1: Reserved |
| 6394 | * Bits 15-8: Index (identifies the instance of NOA sub element) |
| 6395 | * Bit 16: Opp PS state of the AP |
| 6396 | * Bits 23-17: Ctwindow in TUs |
| 6397 | * Bits 31-24: Number of NOA descriptors |
| 6398 | */ |
| 6399 | A_UINT32 noa_attributes; |
| 6400 | wmi_p2p_noa_descriptor |
| 6401 | noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS]; |
| 6402 | } wmi_p2p_noa_info; |
| 6403 | |
| 6404 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1 |
| 6405 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0 |
| 6406 | |
| 6407 | #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \ |
| 6408 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED) |
| 6409 | |
| 6410 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \ |
| 6411 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 6412 | WMI_UNIFIED_NOA_ATTR_MODIFIED); |
| 6413 | |
| 6414 | #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00 |
| 6415 | #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8 |
| 6416 | |
| 6417 | #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \ |
| 6418 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX) |
| 6419 | |
| 6420 | #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \ |
| 6421 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 6422 | WMI_UNIFIED_NOA_ATTR_INDEX); |
| 6423 | |
| 6424 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000 |
| 6425 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16 |
| 6426 | |
| 6427 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \ |
| 6428 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS) |
| 6429 | |
| 6430 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \ |
| 6431 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 6432 | WMI_UNIFIED_NOA_ATTR_OPP_PS); |
| 6433 | |
| 6434 | #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000 |
| 6435 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17 |
| 6436 | |
| 6437 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \ |
| 6438 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN) |
| 6439 | |
| 6440 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \ |
| 6441 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \ |
| 6442 | WMI_UNIFIED_NOA_ATTR_CTWIN); |
| 6443 | |
| 6444 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000 |
| 6445 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24 |
| 6446 | |
| 6447 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \ |
| 6448 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC) |
| 6449 | |
| 6450 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \ |
| 6451 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 6452 | WMI_UNIFIED_NOA_ATTR_NUM_DESC); |
| 6453 | |
| 6454 | typedef struct { |
| 6455 | /** TIM info */ |
| 6456 | wmi_tim_info tim_info; |
| 6457 | /** P2P NOA info */ |
| 6458 | wmi_p2p_noa_info p2p_noa_info; |
| 6459 | /* TBD: More info elements to be added later */ |
| 6460 | } wmi_bcn_info; |
| 6461 | |
| 6462 | typedef struct { |
| 6463 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */ |
| 6464 | /** bitmap identifying the VDEVs, generated by the caller */ |
| 6465 | A_UINT32 vdev_map; |
| 6466 | /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap : |
| 6467 | * wmi_tim_info tim_info[]; |
| 6468 | * wmi_p2p_noa_info p2p_noa_info[]; |
| 6469 | * |
| 6470 | */ |
| 6471 | } wmi_host_swba_event_fixed_param; |
| 6472 | |
| 6473 | #define WMI_MAX_AP_VDEV 16 |
| 6474 | |
| 6475 | typedef struct { |
| 6476 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */ |
| 6477 | /** bimtap of VDEVs that has tbtt offset updated */ |
| 6478 | A_UINT32 vdev_map; |
| 6479 | /* The TLVs for tbttoffset_list will follow this TLV. |
| 6480 | * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap |
| 6481 | * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV]; |
| 6482 | */ |
| 6483 | } wmi_tbtt_offset_event_fixed_param; |
| 6484 | |
| 6485 | /* Peer Specific commands and events */ |
| 6486 | |
| 6487 | typedef struct { |
| 6488 | A_UINT32 percentage; /* in unit of 12.5% */ |
| 6489 | A_UINT32 min_delta; /* in unit of Mbps */ |
| 6490 | } rate_delta_t; |
| 6491 | |
| 6492 | #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01 |
| 6493 | #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02 |
| 6494 | #define MAX_NUM_OF_RATE_THRESH 4 |
| 6495 | |
| 6496 | typedef struct { |
| 6497 | /* |
| 6498 | * PEER_RATE_REPORT_COND_FLAG_DELTA, |
| 6499 | * PEER_RATE_REPORT_COND_FLAG_THRESHOLD |
| 6500 | * Any of these two conditions or both of |
| 6501 | * them can be set. |
| 6502 | */ |
| 6503 | A_UINT32 val_cond_flags; |
| 6504 | rate_delta_t rate_delta; |
| 6505 | /* |
| 6506 | * In unit of Mbps. There are at most 4 thresholds |
| 6507 | * If the threshold count is less than 4, set zero to |
| 6508 | * the one following the last threshold |
| 6509 | */ |
| 6510 | A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; |
| 6511 | } report_cond_per_phy_t; |
| 6512 | |
| 6513 | |
| 6514 | enum peer_rate_report_cond_phy_type { |
| 6515 | PEER_RATE_REPORT_COND_11B = 0, |
| 6516 | PEER_RATE_REPORT_COND_11A_G, |
| 6517 | PEER_RATE_REPORT_COND_11N, |
| 6518 | PEER_RATE_REPORT_COND_11AC, |
| 6519 | PEER_RATE_REPORT_COND_MAX_NUM |
| 6520 | }; |
| 6521 | |
| 6522 | typedef struct { |
| 6523 | /* |
| 6524 | * TLV tag and len; tag equals |
| 6525 | * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param |
| 6526 | */ |
| 6527 | A_UINT32 tlv_header; |
| 6528 | /* 1= enable, 0=disable */ |
| 6529 | A_UINT32 enable_rate_report; |
| 6530 | A_UINT32 report_backoff_time; /* in unit of msecond */ |
| 6531 | A_UINT32 report_timer_period; /* in unit of msecond */ |
| 6532 | /* |
| 6533 | *In the following field, the array index means the phy type, |
| 6534 | * please see enum peer_rate_report_cond_phy_type for detail |
| 6535 | */ |
| 6536 | report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM]; |
| 6537 | } wmi_peer_set_rate_report_condition_fixed_param; |
| 6538 | |
| 6539 | /* Peer Type: |
| 6540 | * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based |
| 6541 | * on address and vdev opmode. This is largely here to allow host to indicate that |
| 6542 | * peer is explicitly a TDLS peer |
| 6543 | */ |
| 6544 | enum wmi_peer_type { |
| 6545 | WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */ |
| 6546 | WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */ |
| 6547 | WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */ |
| 6548 | WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 6549 | WMI_PEER_TYPE_NAN_DATA = 4, /* Peer is NAN DATA */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6550 | WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 6551 | * is assigned up to 127 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6552 | /* Reserved from 128 - 255 for |
| 6553 | * target internal use.*/ |
| 6554 | WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */ |
| 6555 | }; |
| 6556 | |
| 6557 | typedef struct { |
| 6558 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */ |
| 6559 | /** unique id identifying the VDEV, generated by the caller */ |
| 6560 | A_UINT32 vdev_id; |
| 6561 | /** peer MAC address */ |
| 6562 | wmi_mac_addr peer_macaddr; |
| 6563 | /** peer type: see enum values above */ |
| 6564 | A_UINT32 peer_type; |
| 6565 | } wmi_peer_create_cmd_fixed_param; |
| 6566 | |
| 6567 | typedef struct { |
| 6568 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */ |
| 6569 | /** unique id identifying the VDEV, generated by the caller */ |
| 6570 | A_UINT32 vdev_id; |
| 6571 | /** peer MAC address */ |
| 6572 | wmi_mac_addr peer_macaddr; |
| 6573 | } wmi_peer_delete_cmd_fixed_param; |
| 6574 | |
| 6575 | typedef struct { |
| 6576 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */ |
| 6577 | /** unique id identifying the VDEV, generated by the caller */ |
| 6578 | A_UINT32 vdev_id; |
| 6579 | /** peer MAC address */ |
| 6580 | wmi_mac_addr peer_macaddr; |
| 6581 | /** tid bitmap identifying the tids to flush */ |
| 6582 | A_UINT32 peer_tid_bitmap; |
| 6583 | } wmi_peer_flush_tids_cmd_fixed_param; |
| 6584 | |
| 6585 | typedef struct { |
| 6586 | /** rate mode . 0: disable fixed rate (auto rate) |
| 6587 | * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps |
| 6588 | * 2: ht20 11n rate specified as mcs index |
| 6589 | * 3: ht40 11n rate specified as mcs index |
| 6590 | */ |
| 6591 | A_UINT32 rate_mode; |
| 6592 | /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB) |
| 6593 | * and series 3 is stored at byte 3 (MSB) */ |
| 6594 | A_UINT32 rate_series; |
| 6595 | /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB) |
| 6596 | * and retry count for rate 3 is stored at byte 3 (MSB) */ |
| 6597 | A_UINT32 rate_retries; |
| 6598 | } wmi_fixed_rate; |
| 6599 | |
| 6600 | typedef struct { |
| 6601 | /** unique id identifying the VDEV, generated by the caller */ |
| 6602 | A_UINT32 vdev_id; |
| 6603 | /** peer MAC address */ |
| 6604 | wmi_mac_addr peer_macaddr; |
| 6605 | /** fixed rate */ |
| 6606 | wmi_fixed_rate peer_fixed_rate; |
| 6607 | } wmi_peer_fixed_rate_cmd; |
| 6608 | |
| 6609 | #define WMI_MGMT_TID 17 |
| 6610 | |
| 6611 | typedef struct { |
| 6612 | A_UINT32 tlv_header; |
| 6613 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */ |
| 6614 | /** unique id identifying the VDEV, generated by the caller */ |
| 6615 | A_UINT32 vdev_id; |
| 6616 | /** peer MAC address */ |
| 6617 | wmi_mac_addr peer_macaddr; |
| 6618 | } wmi_addba_clear_resp_cmd_fixed_param; |
| 6619 | |
| 6620 | typedef struct { |
| 6621 | A_UINT32 tlv_header; |
| 6622 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */ |
| 6623 | /** unique id identifying the VDEV, generated by the caller */ |
| 6624 | A_UINT32 vdev_id; |
| 6625 | /** peer MAC address */ |
| 6626 | wmi_mac_addr peer_macaddr; |
| 6627 | /** Tid number */ |
| 6628 | A_UINT32 tid; |
| 6629 | /** Buffer/Window size*/ |
| 6630 | A_UINT32 buffersize; |
| 6631 | } wmi_addba_send_cmd_fixed_param; |
| 6632 | |
| 6633 | typedef struct { |
| 6634 | A_UINT32 tlv_header; |
| 6635 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */ |
| 6636 | /** unique id identifying the VDEV, generated by the caller */ |
| 6637 | A_UINT32 vdev_id; |
| 6638 | /** peer MAC address */ |
| 6639 | wmi_mac_addr peer_macaddr; |
| 6640 | /** Tid number */ |
| 6641 | A_UINT32 tid; |
| 6642 | /** Is Initiator */ |
| 6643 | A_UINT32 initiator; |
| 6644 | /** Reason code */ |
| 6645 | A_UINT32 reasoncode; |
| 6646 | } wmi_delba_send_cmd_fixed_param; |
| 6647 | |
| 6648 | typedef struct { |
| 6649 | A_UINT32 tlv_header; |
| 6650 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */ |
| 6651 | /** unique id identifying the vdev, generated by the caller */ |
| 6652 | A_UINT32 vdev_id; |
| 6653 | /** peer mac address */ |
| 6654 | wmi_mac_addr peer_macaddr; |
| 6655 | /** Tid number */ |
| 6656 | A_UINT32 tid; |
| 6657 | /** status code */ |
| 6658 | A_UINT32 statuscode; |
| 6659 | } wmi_addba_setresponse_cmd_fixed_param; |
| 6660 | |
| 6661 | typedef struct { |
| 6662 | A_UINT32 tlv_header; |
| 6663 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */ |
| 6664 | /** unique id identifying the vdev, generated by the caller */ |
| 6665 | A_UINT32 vdev_id; |
| 6666 | /** peer mac address */ |
| 6667 | wmi_mac_addr peer_macaddr; |
| 6668 | /** Tid number */ |
| 6669 | A_UINT32 tid; |
| 6670 | } wmi_send_singleamsdu_cmd_fixed_param; |
| 6671 | |
| 6672 | /* Type of Station DTIM Power Save method */ |
| 6673 | enum { |
| 6674 | /* For NORMAL DTIM, the parameter is the number of beacon intervals and |
| 6675 | * also the same value as the listen interval. For this method, the |
| 6676 | * station will wake up based on the listen interval. If this |
| 6677 | * listen interval is not equal to DTIM, then the station may |
| 6678 | * miss certain DTIM beacons. If this value is 1, then the |
| 6679 | * station will wake up for every beacon. |
| 6680 | */ |
| 6681 | WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01, |
| 6682 | /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip. |
| 6683 | * When this value is 1, then the station will wake at every DTIM beacon. |
| 6684 | * If this value is >1, then the station will skip certain DTIM beacons. |
| 6685 | * This value is the multiple of DTIM intervals that the station will |
| 6686 | * wake up to receive the DTIM beacons. |
| 6687 | */ |
| 6688 | WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02, |
| 6689 | }; |
| 6690 | |
| 6691 | /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */ |
| 6692 | typedef struct { |
| 6693 | A_UINT32 tlv_header; |
| 6694 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */ |
| 6695 | /** unique id identifying the VDEV, generated by the caller */ |
| 6696 | A_UINT32 vdev_id; |
| 6697 | /* Station DTIM Power Save method as defined above */ |
| 6698 | A_UINT32 dtim_pwrsave_method; |
| 6699 | /* DTIM PS value. Contents depends on the method */ |
| 6700 | A_UINT32 value; |
| 6701 | /* Modulated DTIM value */ |
| 6702 | A_UINT32 MaxLIModulatedDTIM; |
| 6703 | } wmi_sta_dtim_ps_method_cmd_fixed_param; |
| 6704 | |
| 6705 | /* |
| 6706 | * For Station UAPSD Auto Trigger feature, the Firmware monitors the |
| 6707 | * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs. |
| 6708 | * If there is no uplink/download for the specified service interval (field service_interval), |
| 6709 | * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value |
| 6710 | * specified in the UP (field user_priority). |
| 6711 | * Firmware also monitors the responses for these QOS-NULL triggers. |
| 6712 | * If the peer does not have any delivery frames, it will respond with |
| 6713 | * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all |
| 6714 | * firmware implementation. For this basic implementation, the suspend_interval and delay_interval |
| 6715 | * are unused and should be set to 0. |
| 6716 | * When service_interval is 0, then the firmware will not send any trigger frames. This is for |
| 6717 | * certain host-based implementations that don't want this firmware offload. |
| 6718 | * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals |
| 6719 | * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms |
| 6720 | * and rest of the AC default to 300 ms. |
| 6721 | * |
| 6722 | * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature |
| 6723 | * of variable auto trigger is supported. The suspend_interval and delay_interval is used in |
| 6724 | * the more advanced monitoring method. |
| 6725 | * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the |
| 6726 | * suspend interval (field suspend_interval), firmware will change its auto trigger interval |
| 6727 | * to delay interval (field delay_interval). This way, when there is no traffic, the station |
| 6728 | * will save more power by waking up less and sending less trigger frames. |
| 6729 | * The (service_interval < suspend_interval) and (service_interval < delay_interval). |
| 6730 | * If this variable auto trigger is not required, then the suspend_interval and delay_interval |
| 6731 | * should be 0. |
| 6732 | */ |
| 6733 | typedef struct { |
| 6734 | A_UINT32 tlv_header; |
| 6735 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */ |
| 6736 | /** WMM Access category from 0 to 3 */ |
| 6737 | A_UINT32 wmm_ac; |
| 6738 | /** User priority to use in trigger frames. It is the TID |
| 6739 | * value. This field needs to be specified and may not be |
| 6740 | * equivalent to AC since some implementation may use the TSPEC |
| 6741 | * to enable UAPSD and negotiate a particular user priority. */ |
| 6742 | A_UINT32 user_priority; |
| 6743 | /** service interval in ms */ |
| 6744 | A_UINT32 service_interval; |
| 6745 | /** Suspend interval in ms */ |
| 6746 | A_UINT32 suspend_interval; |
| 6747 | /** delay interval in ms */ |
| 6748 | A_UINT32 delay_interval; |
| 6749 | } wmi_sta_uapsd_auto_trig_param; |
| 6750 | |
| 6751 | typedef struct { |
| 6752 | A_UINT32 tlv_header; |
| 6753 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */ |
| 6754 | /** unique id identifying the VDEV, generated by the caller */ |
| 6755 | A_UINT32 vdev_id; |
| 6756 | /** peer mac address */ |
| 6757 | wmi_mac_addr peer_macaddr; |
| 6758 | /** Number of AC to specify */ |
| 6759 | A_UINT32 num_ac; |
| 6760 | /* |
| 6761 | * Following this struc is the TLV: |
| 6762 | * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac) |
| 6763 | */ |
| 6764 | |
| 6765 | } wmi_sta_uapsd_auto_trig_cmd_fixed_param; |
| 6766 | |
| 6767 | /** mimo powersave state */ |
| 6768 | #define WMI_PEER_MIMO_PS_STATE 0x1 |
| 6769 | /** enable/disable AMPDU . initial value (enabled) */ |
| 6770 | #define WMI_PEER_AMPDU 0x2 |
| 6771 | /** authorize/unauthorize peer. initial value is unauthorized (0) */ |
| 6772 | #define WMI_PEER_AUTHORIZE 0x3 |
| 6773 | /** peer channel bandwidth */ |
| 6774 | #define WMI_PEER_CHWIDTH 0x4 |
| 6775 | /** peer NSS */ |
| 6776 | #define WMI_PEER_NSS 0x5 |
| 6777 | /** USE 4 ADDR */ |
| 6778 | #define WMI_PEER_USE_4ADDR 0x6 |
| 6779 | /* set group membership status */ |
| 6780 | #define WMI_PEER_MEMBERSHIP 0x7 |
| 6781 | #define WMI_PEER_USERPOS 0x8 |
| 6782 | /* |
| 6783 | * A critical high-level protocol is being used with this peer. Target |
| 6784 | * should take appropriate measures (if possible) to ensure more |
| 6785 | * reliable link with minimal latency. This *may* include modifying the |
| 6786 | * station power save policy, enabling more RX chains, increased |
| 6787 | * priority of channel scheduling, etc. |
| 6788 | * |
| 6789 | * NOTE: This parameter should only be considered a hint as specific |
| 6790 | * behavior will depend on many factors including current network load |
| 6791 | * and vdev/peer configuration. |
| 6792 | * |
| 6793 | * For STA VDEV this peer corresponds to the AP's BSS peer. |
| 6794 | * For AP VDEV this peer corresponds to the remote peer STA. |
| 6795 | */ |
| 6796 | #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9 |
| 6797 | /* set Tx failure count threshold for the peer - Currently unused */ |
| 6798 | #define WMI_PEER_TX_FAIL_CNT_THR 0xA |
| 6799 | /* Enable H/W retry and Enable H/W Send CTS2S before Data */ |
| 6800 | #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB |
| 6801 | |
| 6802 | /* Set peer advertised IBSS atim window length */ |
| 6803 | #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC |
| 6804 | |
| 6805 | /** peer phy mode */ |
| 6806 | #define WMI_PEER_PHYMODE 0xD |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 6807 | /** Use FIXED Pwr */ |
| 6808 | #define WMI_PEER_USE_FIXED_PWR 0xE |
| 6809 | /** Set peer fixed rate */ |
| 6810 | #define WMI_PEER_PARAM_FIXED_RATE 0xF |
| 6811 | /** Whitelist peer TIDs */ |
| 6812 | #define WMI_PEER_SET_MU_WHITELIST 0x10 |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 6813 | /** Set peer max tx rate (MCS) in adaptive rate ctrl */ |
| 6814 | #define WMI_PEER_SET_MAX_TX_RATE 0x11 |
| 6815 | /** Set peer minimal tx rate (MCS) in adaptive rate ctrl */ |
| 6816 | #define WMI_PEER_SET_MIN_TX_RATE 0x12 |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 6817 | /** |
| 6818 | * default ring routing for peer data packets, |
| 6819 | * param_value = bit 0 for hash based routing enabled or not |
| 6820 | * (value 1 is enabled, value 0 is disabled) |
| 6821 | * bits 1:5 are for ring 32 (i.e. ring id value |
| 6822 | * selected from 0 to 31 values) |
| 6823 | */ |
| 6824 | #define WMI_PEER_SET_DEFAULT_ROUTING 0x13 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6825 | |
| 6826 | /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */ |
| 6827 | #define WMI_PEER_MIMO_PS_NONE 0x0 |
| 6828 | #define WMI_PEER_MIMO_PS_STATIC 0x1 |
| 6829 | #define WMI_PEER_MIMO_PS_DYNAMIC 0x2 |
| 6830 | |
| 6831 | typedef struct { |
| 6832 | A_UINT32 tlv_header; |
| 6833 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */ |
| 6834 | /** unique id identifying the VDEV, generated by the caller */ |
| 6835 | A_UINT32 vdev_id; |
| 6836 | /** peer MAC address */ |
| 6837 | wmi_mac_addr peer_macaddr; |
| 6838 | /** parameter id */ |
| 6839 | A_UINT32 param_id; |
| 6840 | /** parametr value */ |
| 6841 | A_UINT32 param_value; |
| 6842 | } wmi_peer_set_param_cmd_fixed_param; |
| 6843 | |
Govind Singh | 67b83b8 | 2016-02-01 19:26:59 +0530 | [diff] [blame] | 6844 | typedef union { |
| 6845 | /* |
| 6846 | * The A_UINT16 "mode" and "tx_rate" fields can only be directly used |
| 6847 | * by the target or a little-endian host. |
| 6848 | * A big-endian host needs to use the WMI_PEER_MAX_MIN_TX_xxx_GET/SET |
| 6849 | * macros on the A_UINT32 "value" field. |
| 6850 | */ |
| 6851 | struct { |
| 6852 | /* 0:CCK, 1:OFDM, 2:HT, 3:VHT (see WMI_RATE_PREAMBLE) */ |
| 6853 | A_UINT16 mode; |
| 6854 | A_UINT16 tx_rate; /* see per-mode specs below */ |
| 6855 | }; |
| 6856 | A_UINT32 value; /* for use by big-endian host */ |
| 6857 | } wmi_peer_max_min_tx_rate; |
| 6858 | |
| 6859 | /* |
| 6860 | * Any access to the mode/tx_rate in an big endian system should use |
| 6861 | * the below Macros on the wmi_peer_max_min_tx_rate.value field. |
| 6862 | */ |
| 6863 | #define WMI_PEER_MAX_MIN_TX_MODE_GET(value32) WMI_GET_BITS(value32, 0, 16) |
| 6864 | #define WMI_PEER_MAX_MIN_TX_MODE_SET(value32, tx_mode) WMI_SET_BITS(value32, 0, 16, tx_mode) |
| 6865 | |
| 6866 | #define WMI_PEER_MAX_MIN_TX_RATE_GET(value32) WMI_GET_BITS(value32, 16, 16) |
| 6867 | #define WMI_PEER_MAX_MIN_TX_RATE_SET(value32, tx_mode) WMI_SET_BITS(value32, 16, 16, tx_mode) |
| 6868 | |
| 6869 | /* |
| 6870 | * CCK max/min tx Rate description |
| 6871 | * tx_rate = 0: 1Mbps, |
| 6872 | * tx_rate = 1: 2Mbps |
| 6873 | * tx_rate = 2: 5.5Mbps |
| 6874 | * tx_rate = 3: 11Mbps |
| 6875 | * tx_rate = else : invalid. |
| 6876 | */ |
| 6877 | #define WMI_MAX_CCK_TX_RATE 0x03 |
| 6878 | |
| 6879 | /* |
| 6880 | * OFDM max/min tx Rate description |
| 6881 | * tx_rate = 0: 6Mbps, |
| 6882 | * tx_rate = 1: 9Mbps |
| 6883 | * tx_rate = 2: 12Mbps |
| 6884 | * tx_rate = 3: 18Mbps |
| 6885 | * tx_rate = 4: 24Mbps |
| 6886 | * tx_rate = 5: 32Mbps |
| 6887 | * tx_rate = 6: 48Mbps |
| 6888 | * tx_rate = 7: 54Mbps |
| 6889 | * tx_rate = else : invalid. |
| 6890 | */ |
| 6891 | #define WMI_MAX_OFDM_TX_RATE 0x07 |
| 6892 | |
| 6893 | /* |
| 6894 | * HT max/min tx rate description |
| 6895 | * tx_rate = 0~7 : MCS Rate 0~7 |
| 6896 | * tx_rate=else : invalid. |
| 6897 | */ |
| 6898 | #define WMI_MAX_HT_TX_MCS 0x07 |
| 6899 | |
| 6900 | /* |
| 6901 | * VHT max/min tx rate description |
| 6902 | * tx_rate = 0~9 : MCS Rate 0~9 |
| 6903 | * tx_rate=else : invalid. |
| 6904 | */ |
| 6905 | #define WMI_MAX_VHT_TX_MCS 0x09 |
| 6906 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6907 | #define MAX_SUPPORTED_RATES 128 |
| 6908 | |
| 6909 | typedef struct { |
| 6910 | /** total number of rates */ |
| 6911 | A_UINT32 num_rates; |
| 6912 | /** |
| 6913 | * rates (each 8bit value) packed into a 32 bit word. |
| 6914 | * the rates are filled from least significant byte to most |
| 6915 | * significant byte. |
| 6916 | */ |
| 6917 | A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1]; |
| 6918 | } wmi_rate_set; |
| 6919 | |
| 6920 | /* NOTE: It would bea good idea to represent the Tx MCS |
| 6921 | * info in one word and Rx in another word. This is split |
| 6922 | * into multiple words for convenience |
| 6923 | */ |
| 6924 | typedef struct { |
| 6925 | A_UINT32 tlv_header; |
| 6926 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */ |
| 6927 | A_UINT32 rx_max_rate; /* Max Rx data rate */ |
| 6928 | A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */ |
| 6929 | A_UINT32 tx_max_rate; /* Max Tx data rate */ |
| 6930 | A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 6931 | 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] | 6932 | } wmi_vht_rate_set; |
| 6933 | |
| 6934 | /* |
| 6935 | * IMPORTANT: Make sure the bit definitions here are consistent |
| 6936 | * with the ni_flags definitions in wlan_peer.h |
| 6937 | */ |
| 6938 | #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */ |
| 6939 | #define WMI_PEER_QOS 0x00000002 /* QoS enabled */ |
| 6940 | #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */ |
| 6941 | #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */ |
| 6942 | #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */ |
| 6943 | #define WMI_PEER_HT 0x00001000 /* HT enabled */ |
| 6944 | #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */ |
| 6945 | #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */ |
| 6946 | #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */ |
| 6947 | #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */ |
| 6948 | #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */ |
| 6949 | #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */ |
| 6950 | #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */ |
| 6951 | #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */ |
| 6952 | #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */ |
| 6953 | /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */ |
| 6954 | #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */ |
| 6955 | #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */ |
| 6956 | #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */ |
| 6957 | |
| 6958 | /** |
| 6959 | * Peer rate capabilities. |
| 6960 | * |
| 6961 | * This is of interest to the ratecontrol |
| 6962 | * module which resides in the firmware. The bit definitions are |
| 6963 | * consistent with that defined in if_athrate.c. |
| 6964 | * |
| 6965 | * @todo |
| 6966 | * Move this to a common header file later so there is no need to |
| 6967 | * duplicate the definitions or maintain consistency. |
| 6968 | */ |
| 6969 | #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */ |
| 6970 | #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */ |
| 6971 | #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */ |
| 6972 | #define WMI_RC_HT_FLAG 0x08 /* HT */ |
| 6973 | #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ |
| 6974 | #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */ |
| 6975 | #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */ |
| 6976 | #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ |
| 6977 | #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ |
| 6978 | #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ |
| 6979 | #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */ |
| 6980 | #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ |
| 6981 | |
| 6982 | typedef struct { |
| 6983 | A_UINT32 tlv_header; |
| 6984 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */ |
| 6985 | /** peer MAC address */ |
| 6986 | wmi_mac_addr peer_macaddr; |
| 6987 | /** VDEV id */ |
| 6988 | A_UINT32 vdev_id; |
| 6989 | /** assoc = 1 reassoc = 0 */ |
| 6990 | A_UINT32 peer_new_assoc; |
| 6991 | /** peer associd (16 bits) */ |
| 6992 | A_UINT32 peer_associd; |
| 6993 | /** peer station flags: see definition above */ |
| 6994 | A_UINT32 peer_flags; |
| 6995 | /** negotiated capabilities (lower 16 bits)*/ |
| 6996 | A_UINT32 peer_caps; |
| 6997 | /** Listen interval */ |
| 6998 | A_UINT32 peer_listen_intval; |
| 6999 | /** HT capabilties of the peer */ |
| 7000 | A_UINT32 peer_ht_caps; |
| 7001 | /** maximum rx A-MPDU length */ |
| 7002 | A_UINT32 peer_max_mpdu; |
| 7003 | /** mpdu density of the peer in usec(0 to 16) */ |
| 7004 | A_UINT32 peer_mpdu_density; |
| 7005 | /** peer rate capabilties see flags above */ |
| 7006 | A_UINT32 peer_rate_caps; |
| 7007 | /** num spatial streams */ |
| 7008 | A_UINT32 peer_nss; |
| 7009 | /** VHT capabilties of the peer */ |
| 7010 | A_UINT32 peer_vht_caps; |
| 7011 | /** phy mode */ |
| 7012 | A_UINT32 peer_phymode; |
| 7013 | /** HT Operation Element of the peer. Five bytes packed in 2 |
| 7014 | * INT32 array and filled from lsb to msb. |
| 7015 | * Note that the size of array peer_ht_info[] cannotbe changed |
| 7016 | * without breaking WMI Compatibility. */ |
| 7017 | A_UINT32 peer_ht_info[2]; |
| 7018 | /** total number of negotiated legacy rate set. Also the sizeof |
| 7019 | * peer_legacy_rates[] */ |
| 7020 | A_UINT32 num_peer_legacy_rates; |
| 7021 | /** total number of negotiated ht rate set. Also the sizeof |
| 7022 | * peer_ht_rates[] */ |
| 7023 | A_UINT32 num_peer_ht_rates; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 7024 | /* |
| 7025 | * Bitmap providing customized mapping of bandwidths to max Rx NSS |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7026 | * for this peer. |
| 7027 | * This is required since 802.11 standard currently facilitates peer to |
| 7028 | * be able to advertise only a single max Rx NSS value across all |
| 7029 | * bandwidths. |
| 7030 | * Some QCA chipsets might need to be able to advertise a different max |
| 7031 | * Rx NSS value for 160 MHz, than that for 80 MHz and lower. |
| 7032 | * |
| 7033 | * bit[2:0] : Represents value of Rx NSS for VHT 160 MHz |
| 7034 | * bit[30:3]: Reserved |
| 7035 | * bit[31] : MSB(0/1): 1 in case of valid data else all bits will be |
| 7036 | * set to 0 by host |
| 7037 | */ |
| 7038 | A_UINT32 peer_bw_rxnss_override; |
Govind Singh | d24f5e4 | 2016-02-22 15:16:46 +0530 | [diff] [blame] | 7039 | /* 802.11ax capabilities */ |
| 7040 | wmi_ppe_threshold peer_ppet; |
| 7041 | /* protocol-defined HE / 11ax capability flags */ |
| 7042 | A_UINT32 peer_he_cap_info; |
| 7043 | A_UINT32 peer_he_ops; /* HE operation contains BSS color */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7044 | /* Following this struc are the TLV's: |
| 7045 | * A_UINT8 peer_legacy_rates[]; |
| 7046 | * A_UINT8 peer_ht_rates[]; |
| 7047 | * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer |
| 7048 | */ |
| 7049 | } wmi_peer_assoc_complete_cmd_fixed_param; |
| 7050 | |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7051 | /* WDS Entry Flags */ |
| 7052 | #define WMI_WDS_FLAG_STATIC 0x1 /* Disable aging & learning */ |
| 7053 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7054 | typedef struct { |
| 7055 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */ |
| 7056 | /** peer MAC address */ |
| 7057 | wmi_mac_addr peer_macaddr; |
| 7058 | /** wds MAC addr */ |
| 7059 | wmi_mac_addr wds_macaddr; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7060 | /* Flags associated with WDS entry - see WMI_WDS_FLAG defs */ |
| 7061 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7062 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7063 | } wmi_peer_add_wds_entry_cmd_fixed_param; |
| 7064 | |
| 7065 | typedef struct { |
| 7066 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */ |
| 7067 | /** wds MAC addr */ |
| 7068 | wmi_mac_addr wds_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7069 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7070 | } wmi_peer_remove_wds_entry_cmd_fixed_param; |
| 7071 | |
| 7072 | typedef struct { |
| 7073 | /** peer MAC address */ |
| 7074 | wmi_mac_addr peer_macaddr; |
| 7075 | } wmi_peer_q_empty_callback_event; |
| 7076 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 7077 | /* |
| 7078 | * Command to update an already existing WDS entry. Different address setting |
| 7079 | * combinations are possible. |
| 7080 | * |
| 7081 | * Valid wds and peer -> Associated WDS entry peer ptr & flags will be updated. |
| 7082 | * Valid wds and null peer -> Associated WDS entry flags will be updated. |
| 7083 | * Null wds and Valid peer-> Flags will be updated for all WDS entries |
| 7084 | * behind the peer. |
| 7085 | * Null wds and peer -> Flags will be updated for all WDS entries. |
| 7086 | */ |
| 7087 | typedef struct { |
| 7088 | /* |
| 7089 | * TLV tag and len; tag equals |
| 7090 | * WMITLV_TAG_STRUC_wmi_peer_update_wds_entry_cmd_fixed_param |
| 7091 | */ |
| 7092 | A_UINT32 tlv_header; |
| 7093 | /** peer MAC address */ |
| 7094 | wmi_mac_addr peer_macaddr; |
| 7095 | /** wds MAC addr */ |
| 7096 | wmi_mac_addr wds_macaddr; |
| 7097 | /* Flags associated with WDS entry */ |
| 7098 | A_UINT32 flags; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7099 | A_UINT32 vdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 7100 | } wmi_peer_update_wds_entry_cmd_fixed_param; |
| 7101 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7102 | /** |
| 7103 | * Channel info WMI event |
| 7104 | */ |
| 7105 | typedef struct { |
| 7106 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */ |
| 7107 | /** Error code */ |
| 7108 | A_UINT32 err_code; |
| 7109 | /** Channel freq */ |
| 7110 | A_UINT32 freq; |
| 7111 | /** Read flags */ |
| 7112 | A_UINT32 cmd_flags; |
| 7113 | /** Noise Floor value */ |
| 7114 | A_UINT32 noise_floor; |
| 7115 | /** rx clear count */ |
| 7116 | A_UINT32 rx_clear_count; |
| 7117 | /** cycle count */ |
| 7118 | A_UINT32 cycle_count; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7119 | /** channel tx power per range in 0.5dBm steps */ |
| 7120 | A_UINT32 chan_tx_pwr_range; |
| 7121 | /** channel tx power per throughput */ |
| 7122 | A_UINT32 chan_tx_pwr_tp; |
| 7123 | /** rx frame count (cumulative) */ |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 7124 | A_UINT32 rx_frame_count; |
| 7125 | /** BSS rx cycle count */ |
| 7126 | A_UINT32 my_bss_rx_cycle_count; |
| 7127 | /** b-mode data rx time (units are microseconds) */ |
| 7128 | A_UINT32 rx_11b_mode_data_duration; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7129 | } wmi_chan_info_event_fixed_param; |
| 7130 | |
| 7131 | /** |
| 7132 | * Non wlan interference event |
| 7133 | */ |
| 7134 | typedef struct { |
| 7135 | A_UINT32 tlv_header; |
| 7136 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */ |
| 7137 | A_UINT32 channel; /* either number or freq in mhz */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7138 | } wlan_dcs_cw_int; |
| 7139 | #define ath_dcs_cw_int /* DEPRECATED */ wlan_dcs_cw_int /* alias */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7140 | |
| 7141 | /** |
| 7142 | * wlan_dcs_im_tgt_stats |
| 7143 | * |
| 7144 | */ |
| 7145 | typedef struct _wlan_dcs_im_tgt_stats { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7146 | /** TLV tag and len; tag equals |
| 7147 | * WMITLV_TAG_STRUC_wlan_dcs_im_tgt_stats_t |
| 7148 | */ |
| 7149 | A_UINT32 tlv_header; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7150 | /** current running TSF from the TSF-1 */ |
| 7151 | A_UINT32 reg_tsf32; |
| 7152 | |
| 7153 | /** Known last frame rssi, in case of multiple stations, if |
| 7154 | * and at different ranges, this would not gaurantee that |
| 7155 | * this is the least rssi. |
| 7156 | */ |
| 7157 | A_UINT32 last_ack_rssi; |
| 7158 | |
| 7159 | /** Sum of all the failed durations in the last one second interval. |
| 7160 | */ |
| 7161 | A_UINT32 tx_waste_time; |
| 7162 | /** count how many times the hal_rxerr_phy is marked, in this |
| 7163 | * time period |
| 7164 | */ |
| 7165 | A_UINT32 rx_time; |
| 7166 | A_UINT32 phyerr_cnt; |
| 7167 | |
| 7168 | /** |
| 7169 | * WLAN IM stats from target to host |
| 7170 | * |
| 7171 | * Below statistics are sent from target to host periodically. |
| 7172 | * These are collected at target as long as target is running |
| 7173 | * and target chip is not in sleep. |
| 7174 | * |
| 7175 | */ |
| 7176 | |
| 7177 | /** listen time from ANI */ |
| 7178 | A_INT32 listen_time; |
| 7179 | |
| 7180 | /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */ |
| 7181 | A_UINT32 reg_tx_frame_cnt; |
| 7182 | |
| 7183 | /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */ |
| 7184 | A_UINT32 reg_rx_frame_cnt; |
| 7185 | |
| 7186 | /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */ |
| 7187 | A_UINT32 reg_rxclr_cnt; |
| 7188 | |
| 7189 | /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */ |
| 7190 | A_UINT32 reg_cycle_cnt; /* delta cycle count */ |
| 7191 | |
| 7192 | /** extenstion channel rx clear count */ |
| 7193 | A_UINT32 reg_rxclr_ext_cnt; |
| 7194 | |
| 7195 | /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */ |
| 7196 | A_UINT32 reg_ofdm_phyerr_cnt; |
| 7197 | |
| 7198 | /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */ |
| 7199 | 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] | 7200 | /** Channel noise floor (units are dBm) */ |
| 7201 | A_INT32 chan_nf; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7202 | |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 7203 | /** BSS rx cycle count */ |
| 7204 | A_UINT32 my_bss_rx_cycle_count; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7205 | } wlan_dcs_im_tgt_stats_t; |
| 7206 | |
| 7207 | /** |
| 7208 | * wmi_dcs_interference_event_t |
| 7209 | * |
| 7210 | * Right now this is event and stats together. Partly this is |
| 7211 | * because cw interference is handled in target now. This |
| 7212 | * can be done at host itself, if we can carry the NF alone |
| 7213 | * as a stats event. In future this would be done and this |
| 7214 | * event would carry only stats. |
| 7215 | */ |
| 7216 | typedef struct { |
| 7217 | A_UINT32 tlv_header; |
| 7218 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */ |
| 7219 | /** |
| 7220 | * Type of the event present, either the cw interference event, or the wlan_im stats |
| 7221 | */ |
| 7222 | A_UINT32 interference_type; /* type of interference, wlan or cw */ |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 7223 | /** pdev_id for identifying the MAC |
| 7224 | * See macros starting with WMI_PDEV_ID_ for values. |
| 7225 | */ |
| 7226 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7227 | /* |
| 7228 | * Following this struct are these TLVs. Note that they are both array of structures |
| 7229 | * but can have at most one element. Which TLV is empty or has one element depends |
| 7230 | * 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] | 7231 | * elements (not arrays). union { wlan_dcs_cw_int cw_int; |
| 7232 | * wlan_dcs_im_tgt_stats_t wlan_stat; } |
| 7233 | * int_event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7234 | * |
| 7235 | * //cw_interference event |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 7236 | * wlan_dcs_cw_int cw_int[]; this element |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7237 | * // wlan im interfernce stats |
| 7238 | * wlan_dcs_im_tgt_stats_t wlan_stat[]; |
| 7239 | */ |
| 7240 | } wmi_dcs_interference_event_fixed_param; |
| 7241 | |
| 7242 | enum wmi_peer_mcast_group_action { |
| 7243 | wmi_peer_mcast_group_action_add = 0, |
| 7244 | wmi_peer_mcast_group_action_del = 1 |
| 7245 | }; |
| 7246 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1 |
| 7247 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0 |
| 7248 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2 |
| 7249 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1 |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7250 | /* flag to exclude an ip while filtering.set to exclude */ |
| 7251 | #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_M 0x4 |
| 7252 | #define WMI_PEER_MCAST_GROUP_FLAG_SRC_FILTER_EXCLUDE_S 2 |
| 7253 | /* flag to say ipv4/ipv6. Will be set for ipv6 */ |
| 7254 | #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_M 0x8 |
| 7255 | #define WMI_PEER_MCAST_GROUP_FLAG_IPV6_S 3 |
| 7256 | /* delete all mcast table entries. */ |
| 7257 | #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_M 0x10 |
| 7258 | #define WMI_PEER_MCAST_GROUP_FLAG_DELETEALL_S 4 |
| 7259 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7260 | /* multicast group membership commands */ |
| 7261 | /* TODO: Converting this will be tricky since it uses an union. |
| 7262 | Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */ |
| 7263 | typedef struct { |
| 7264 | A_UINT32 tlv_header; |
| 7265 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */ |
| 7266 | A_UINT32 flags; |
| 7267 | wmi_mac_addr ucast_mac_addr; |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7268 | /* |
| 7269 | * for ipv4, bytes (12-15) should contain ip address and |
| 7270 | * other lower bytes 0. ipv6 should have all bytes valid |
| 7271 | */ |
| 7272 | A_UINT8 mcast_ip_addr[16]; /* in network byte order */ |
| 7273 | /* |
| 7274 | * for ipv6, all 16 bytes has to be valid; |
| 7275 | * for ipv4 last 4 bytes(12-15) has to be valid, rest all 0s |
| 7276 | */ |
| 7277 | A_UINT8 mcast_ip_mask[16]; /* zero out lower bytes if ipv4 */ |
| 7278 | /* number of address filters - irrespective of ipv4/ipv6 addresses */ |
| 7279 | A_UINT32 num_filter_addr; |
| 7280 | /* |
| 7281 | * this array should contain the src IPs that are to be filtered |
| 7282 | * during find. The array should be packed. If there are 2 ipv4 |
| 7283 | * addresses, there should be 8 bytes and rest all 0s |
| 7284 | */ |
| 7285 | A_UINT8 filter_addr[64]; /* 16 ipv4 addresses or 4 ipv6 addresses */ |
| 7286 | A_UINT8 vdev_id; /* vdev of this mcast group */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7287 | } wmi_peer_mcast_group_cmd_fixed_param; |
| 7288 | |
| 7289 | /** Offload Scan and Roaming related commands */ |
| 7290 | /** The FW performs 2 different kinds of offload scans independent |
| 7291 | * of host. One is Roam scan which is primarily performed on a |
| 7292 | * station VDEV after association to look for a better AP that |
| 7293 | * the station VDEV can roam to. The second scan is connect scan |
| 7294 | * which is mainly performed when the station is not associated |
| 7295 | * and to look for a matching AP profile from a list of |
| 7296 | * configured profiles. */ |
| 7297 | |
| 7298 | /** |
| 7299 | * WMI_ROAM_SCAN_MODE: Set Roam Scan mode |
| 7300 | * the roam scan mode is one of the periodic, rssi change, both, none. |
| 7301 | * None : Disable Roam scan. No Roam scan at all. |
| 7302 | * Periodic : Scan periodically with a configurable period. |
| 7303 | * Rssi change : Scan when ever rssi to current AP changes by the threshold value |
| 7304 | * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command. |
| 7305 | * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount) |
| 7306 | * |
| 7307 | */ |
| 7308 | typedef struct { |
| 7309 | A_UINT32 tlv_header; |
| 7310 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */ |
| 7311 | A_UINT32 roam_scan_mode; |
| 7312 | A_UINT32 vdev_id; |
| 7313 | } wmi_roam_scan_mode_fixed_param; |
| 7314 | |
| 7315 | #define WMI_ROAM_SCAN_MODE_NONE 0x0 |
| 7316 | #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1 |
| 7317 | #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2 |
| 7318 | #define WMI_ROAM_SCAN_MODE_BOTH 0x3 |
| 7319 | /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */ |
| 7320 | #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4 |
| 7321 | |
| 7322 | typedef struct { |
| 7323 | A_UINT32 tlv_header; |
| 7324 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */ |
| 7325 | A_UINT32 vdev_id; |
| 7326 | A_UINT32 command_arg; |
| 7327 | } wmi_roam_scan_cmd_fixed_param; |
| 7328 | |
| 7329 | #define WMI_ROAM_SCAN_STOP_CMD 0x1 |
| 7330 | |
| 7331 | /** |
| 7332 | * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold |
| 7333 | * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans. |
| 7334 | * Applicable when WMI_ROAM_SCAN_MODE is not set to none. |
| 7335 | */ |
| 7336 | typedef struct { |
| 7337 | A_UINT32 tlv_header; |
| 7338 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */ |
| 7339 | /** unique id identifying the VDEV, generated by the caller */ |
| 7340 | A_UINT32 vdev_id; |
| 7341 | /** roam scan rssi threshold */ |
| 7342 | A_UINT32 roam_scan_rssi_thresh; |
| 7343 | /** When using Hw generated beacon RSSI interrupts */ |
| 7344 | A_UINT32 roam_rssi_thresh_diff; |
| 7345 | /** 5G scan max count */ |
| 7346 | A_UINT32 hirssi_scan_max_count; |
| 7347 | /** 5G scan rssi change threshold value */ |
| 7348 | A_UINT32 hirssi_scan_delta; |
| 7349 | /** 5G scan upper bound */ |
| 7350 | A_UINT32 hirssi_upper_bound; |
| 7351 | /* The TLVs will follow. |
| 7352 | * wmi_roam_scan_extended_threshold_param extended_param; |
| 7353 | * wmi_roam_earlystop_rssi_thres_param earlystop_param; |
Govind Singh | ce8fd91 | 2016-01-21 10:24:19 +0530 | [diff] [blame] | 7354 | * wmi_roam_dense_thres_param dense_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7355 | */ |
| 7356 | } wmi_roam_scan_rssi_threshold_fixed_param; |
| 7357 | |
| 7358 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0 |
| 7359 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1 |
| 7360 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2 |
| 7361 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3 |
| 7362 | |
| 7363 | typedef struct { |
| 7364 | /** TLV tag and len; tag equals |
| 7365 | *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */ |
| 7366 | A_UINT32 tlv_header; |
| 7367 | A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */ |
| 7368 | A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */ |
| 7369 | A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 7370 | A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */ |
| 7371 | A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 7372 | A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */ |
| 7373 | A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */ |
| 7374 | A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */ |
| 7375 | /** |
| 7376 | * RSSI below which roam is kicked in by background scan |
| 7377 | * although rssi is still good |
| 7378 | */ |
| 7379 | A_UINT32 good_rssi_threshold; |
| 7380 | } wmi_roam_scan_extended_threshold_param; |
| 7381 | |
| 7382 | |
| 7383 | /** |
| 7384 | * WMI_ROAM_SCAN_PERIOD: period for roam scan. |
| 7385 | * Applicable when the scan mode is Periodic or both. |
| 7386 | */ |
| 7387 | typedef struct { |
| 7388 | A_UINT32 tlv_header; |
| 7389 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */ |
| 7390 | /** unique id identifying the VDEV, generated by the caller */ |
| 7391 | A_UINT32 vdev_id; |
| 7392 | /** roam scan period value */ |
| 7393 | A_UINT32 roam_scan_period; |
| 7394 | /** Aging for Roam scans */ |
| 7395 | A_UINT32 roam_scan_age; |
| 7396 | } wmi_roam_scan_period_fixed_param; |
| 7397 | |
| 7398 | /** |
| 7399 | * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan. |
| 7400 | * Rssi change threshold used when mode is Rssi change (or) Both. |
| 7401 | * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter. |
| 7402 | * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD |
| 7403 | */ |
| 7404 | typedef struct { |
| 7405 | A_UINT32 tlv_header; |
| 7406 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */ |
| 7407 | /** unique id identifying the VDEV, generated by the caller */ |
| 7408 | A_UINT32 vdev_id; |
| 7409 | /** roam scan rssi change threshold value */ |
| 7410 | A_UINT32 roam_scan_rssi_change_thresh; |
| 7411 | /** When using Hw generated beacon RSSI interrupts */ |
| 7412 | A_UINT32 bcn_rssi_weight; |
| 7413 | /** Minimum delay between two 5G scans */ |
| 7414 | A_UINT32 hirssi_delay_btw_scans; |
| 7415 | } wmi_roam_scan_rssi_change_threshold_fixed_param; |
| 7416 | |
| 7417 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1 |
| 7418 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2 |
| 7419 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3 |
| 7420 | /** |
| 7421 | * TLV for roaming channel list |
| 7422 | */ |
| 7423 | typedef struct { |
| 7424 | A_UINT32 tlv_header; |
| 7425 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */ |
| 7426 | /** unique id identifying the VDEV, generated by the caller */ |
| 7427 | A_UINT32 vdev_id; |
| 7428 | /** WMI_CHAN_LIST_TAG */ |
| 7429 | A_UINT32 chan_list_type; |
| 7430 | /** # if channels to scan */ |
| 7431 | A_UINT32 num_chan; |
| 7432 | /** |
| 7433 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 7434 | * structure. The TLV's are: |
| 7435 | * A_UINT32 channel_list[]; |
| 7436 | **/ |
| 7437 | } wmi_roam_chan_list_fixed_param; |
| 7438 | |
| 7439 | /** Authentication modes */ |
| 7440 | enum { |
| 7441 | WMI_AUTH_NONE, /* no upper level auth */ |
| 7442 | WMI_AUTH_OPEN, /* open */ |
| 7443 | WMI_AUTH_SHARED, /* shared-key */ |
| 7444 | WMI_AUTH_8021X, /* 802.1x */ |
| 7445 | WMI_AUTH_AUTO, /* Auto */ |
| 7446 | WMI_AUTH_WPA, /* WPA */ |
| 7447 | WMI_AUTH_RSNA, /* WPA2/RSNA */ |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 7448 | WMI_AUTH_CCKM, /* CCKM */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7449 | WMI_AUTH_WAPI, /* WAPI */ |
| 7450 | WMI_AUTH_AUTO_PSK, |
| 7451 | WMI_AUTH_WPA_PSK, |
| 7452 | WMI_AUTH_RSNA_PSK, |
| 7453 | WMI_AUTH_WAPI_PSK, |
| 7454 | WMI_AUTH_FT_RSNA, /* 11r FT */ |
| 7455 | WMI_AUTH_FT_RSNA_PSK, |
| 7456 | WMI_AUTH_RSNA_PSK_SHA256, |
| 7457 | WMI_AUTH_RSNA_8021X_SHA256, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 7458 | WMI_AUTH_CCKM_WPA, |
| 7459 | WMI_AUTH_CCKM_RSNA, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7460 | }; |
| 7461 | |
| 7462 | typedef struct { |
| 7463 | /** authentication mode (defined above) */ |
| 7464 | A_UINT32 rsn_authmode; |
| 7465 | /** unicast cipher set */ |
| 7466 | A_UINT32 rsn_ucastcipherset; |
| 7467 | /** mcast/group cipher set */ |
| 7468 | A_UINT32 rsn_mcastcipherset; |
| 7469 | /** mcast/group management frames cipher set */ |
| 7470 | A_UINT32 rsn_mcastmgmtcipherset; |
| 7471 | } wmi_rsn_params; |
| 7472 | |
| 7473 | /** looking for a wps enabled AP */ |
| 7474 | #define WMI_AP_PROFILE_FLAG_WPS 0x1 |
| 7475 | /** looking for a secure AP */ |
| 7476 | #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2 |
| 7477 | /** looking for a PMF enabled AP */ |
| 7478 | #define WMI_AP_PROFILE_FLAG_PMF 0x4 |
| 7479 | |
| 7480 | /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 7481 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear. |
| 7482 | * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 7483 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be set . |
| 7484 | */ |
| 7485 | |
| 7486 | typedef struct { |
| 7487 | A_UINT32 tlv_header; |
| 7488 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */ |
| 7489 | /** flags as defined above */ |
| 7490 | A_UINT32 flags; |
| 7491 | /** |
| 7492 | * rssi thresold value: the value of the the candidate AP should |
| 7493 | * higher by this threshold than the rssi of the currrently associated AP. |
| 7494 | */ |
| 7495 | A_UINT32 rssi_threshold; |
| 7496 | /** |
| 7497 | * ssid vlaue to be matched. |
| 7498 | */ |
| 7499 | wmi_ssid ssid; |
| 7500 | |
| 7501 | /** |
| 7502 | * security params to be matched. |
| 7503 | */ |
| 7504 | /** authentication mode (defined above) */ |
| 7505 | A_UINT32 rsn_authmode; |
| 7506 | /** unicast cipher set */ |
| 7507 | A_UINT32 rsn_ucastcipherset; |
| 7508 | /** mcast/group cipher set */ |
| 7509 | A_UINT32 rsn_mcastcipherset; |
| 7510 | /** mcast/group management frames cipher set */ |
| 7511 | A_UINT32 rsn_mcastmgmtcipherset; |
| 7512 | } wmi_ap_profile; |
| 7513 | |
| 7514 | /** Support early stop roaming scanning when finding a strong candidate AP |
| 7515 | * A 'strong' candidate is |
| 7516 | * 1) Is eligible candidate |
| 7517 | * (all conditions are met in existing candidate selection). |
| 7518 | * 2) Its rssi is better than earlystop threshold. |
| 7519 | * Earlystop threshold will be relaxed as each channel is scanned. |
| 7520 | */ |
| 7521 | typedef struct { |
| 7522 | A_UINT32 tlv_header; |
| 7523 | /* Minimum RSSI threshold value for early stop, unit is dB above NF. */ |
| 7524 | A_UINT32 roam_earlystop_thres_min; |
| 7525 | /* Maminum RSSI threshold value for early stop, unit is dB above NF. */ |
| 7526 | A_UINT32 roam_earlystop_thres_max; |
| 7527 | } wmi_roam_earlystop_rssi_thres_param; |
| 7528 | |
Govind Singh | ce8fd91 | 2016-01-21 10:24:19 +0530 | [diff] [blame] | 7529 | typedef struct { |
| 7530 | /* TLV tag and len; |
| 7531 | * tag equals WMITLV_TAG_STRUC_wmi_roam_dense_thres_param |
| 7532 | */ |
| 7533 | A_UINT32 tlv_header; |
| 7534 | /* rssi threshold offset under trffic and dense env */ |
| 7535 | A_UINT32 roam_dense_rssi_thres_offset; |
| 7536 | /* minimum number of APs to determine dense env */ |
| 7537 | A_UINT32 roam_dense_min_aps; |
| 7538 | /* initial dense status detected by host |
| 7539 | * at the time of initial connection */ |
| 7540 | A_UINT32 roam_dense_status; |
| 7541 | /* traffic threshold to enable aggressive roaming in dense env; |
| 7542 | * units are percent of medium occupancy, 0 - 100 |
| 7543 | */ |
| 7544 | A_UINT32 roam_dense_traffic_thres; |
| 7545 | } wmi_roam_dense_thres_param; |
| 7546 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7547 | /** Beacon filter wmi command info */ |
| 7548 | |
| 7549 | #define BCN_FLT_MAX_SUPPORTED_IES 256 |
| 7550 | #define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32 |
| 7551 | |
| 7552 | typedef struct bss_bcn_stats { |
| 7553 | A_UINT32 vdev_id; |
| 7554 | A_UINT32 bss_bcnsdropped; |
| 7555 | A_UINT32 bss_bcnsdelivered; |
| 7556 | } wmi_bss_bcn_stats_t; |
| 7557 | |
| 7558 | typedef struct bcn_filter_stats { |
| 7559 | A_UINT32 bcns_dropped; |
| 7560 | A_UINT32 bcns_delivered; |
| 7561 | A_UINT32 activefilters; |
| 7562 | wmi_bss_bcn_stats_t bss_stats; |
| 7563 | } wmi_bcnfilter_stats_t; |
| 7564 | |
| 7565 | typedef struct wmi_add_bcn_filter_cmd { |
| 7566 | A_UINT32 tlv_header; |
| 7567 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */ |
| 7568 | A_UINT32 vdev_id; |
| 7569 | /* |
| 7570 | * Following this structure is the TLV: |
| 7571 | * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST]; |
| 7572 | */ |
| 7573 | } wmi_add_bcn_filter_cmd_fixed_param; |
| 7574 | |
| 7575 | typedef struct wmi_rmv_bcn_filter_cmd { |
| 7576 | A_UINT32 tlv_header; |
| 7577 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */ |
| 7578 | A_UINT32 vdev_id; |
| 7579 | } wmi_rmv_bcn_filter_cmd_fixed_param; |
| 7580 | |
| 7581 | #define WMI_BCN_SEND_DTIM_ZERO 1 |
| 7582 | #define WMI_BCN_SEND_DTIM_BITCTL_SET 2 |
| 7583 | typedef struct wmi_bcn_send_from_host { |
| 7584 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */ |
| 7585 | A_UINT32 vdev_id; |
| 7586 | A_UINT32 data_len; |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 7587 | union { |
| 7588 | A_UINT32 frag_ptr; /* Physical address of the frame */ |
| 7589 | A_UINT32 frag_ptr_lo; /* LSB of physical address of the frame */ |
| 7590 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7591 | A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */ |
| 7592 | A_UINT32 dtim_flag; /* to control CABQ traffic */ |
Govind Singh | 32cced3 | 2016-02-01 13:33:09 +0530 | [diff] [blame] | 7593 | A_UINT32 bcn_antenna; /* Antenna for beacon transmission */ |
Krishna Kumaar Natarajan | 7dde8c7 | 2016-03-25 15:11:49 -0700 | [diff] [blame] | 7594 | A_UINT32 frag_ptr_hi; /* MSBs of physical address of the frame */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7595 | } wmi_bcn_send_from_host_cmd_fixed_param; |
| 7596 | |
| 7597 | /* cmd to support bcn snd for all vaps at once */ |
| 7598 | typedef struct wmi_pdev_send_bcn { |
| 7599 | A_UINT32 num_vdevs; |
| 7600 | wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1]; |
| 7601 | } wmi_pdev_send_bcn_cmd_t; |
| 7602 | |
| 7603 | /* |
| 7604 | * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming. |
| 7605 | */ |
| 7606 | typedef struct { |
| 7607 | A_UINT32 tlv_header; |
| 7608 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */ |
| 7609 | /** id of AP criteria */ |
| 7610 | A_UINT32 id; |
| 7611 | |
| 7612 | /** unique id identifying the VDEV, generated by the caller */ |
| 7613 | A_UINT32 vdev_id; |
| 7614 | |
| 7615 | /* |
| 7616 | * Following this structure is the TLV: |
| 7617 | * wmi_ap_profile ap_profile; //AP profile info |
| 7618 | */ |
| 7619 | } wmi_roam_ap_profile_fixed_param; |
| 7620 | |
| 7621 | /** |
| 7622 | * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile. |
| 7623 | */ |
| 7624 | typedef struct { |
| 7625 | /** id of AP criteria */ |
| 7626 | A_UINT32 id; |
| 7627 | |
| 7628 | /** unique id identifying the VDEV, generated by the caller */ |
| 7629 | A_UINT32 vdev_id; |
| 7630 | |
| 7631 | /** AP profile info */ |
| 7632 | wmi_ap_profile ap_profile; |
| 7633 | |
| 7634 | } wmi_ofl_scan_add_ap_profile; |
| 7635 | |
| 7636 | /** |
| 7637 | * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile. |
| 7638 | */ |
| 7639 | typedef struct { |
| 7640 | /** id of AP criteria */ |
| 7641 | A_UINT32 id; |
| 7642 | /** unique id identifying the VDEV, generated by the caller */ |
| 7643 | A_UINT32 vdev_id; |
| 7644 | } wmi_ofl_scan_remove_ap_profile; |
| 7645 | |
| 7646 | /** |
| 7647 | * WMI_OFL_SCAN_PERIOD: period in msec for offload scan. |
| 7648 | * 0 will disable ofload scan and a very low value will perform a continous |
| 7649 | * scan. |
| 7650 | */ |
| 7651 | typedef struct { |
| 7652 | /** offload scan period value, used for scans used when not connected */ |
| 7653 | A_UINT32 ofl_scan_period; |
| 7654 | } wmi_ofl_scan_period; |
| 7655 | |
| 7656 | /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */ |
| 7657 | #define ROAM_OFFLOAD_PMK_BYTES (32) |
| 7658 | #define ROAM_OFFLOAD_PSK_MSK_BYTES (32) |
| 7659 | #define ROAM_OFFLOAD_KRK_BYTES (16) |
| 7660 | #define ROAM_OFFLOAD_BTK_BYTES (32) |
| 7661 | #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48) |
| 7662 | #define ROAM_OFFLOAD_NUM_MCS_SET (16) |
| 7663 | |
| 7664 | /* This TLV will be filled only in case roam offload |
| 7665 | * for wpa2-psk/okc/ese/11r is enabled */ |
| 7666 | typedef struct { |
| 7667 | A_UINT32 tlv_header; |
| 7668 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */ |
| 7669 | A_UINT32 rssi_cat_gap; /* gap for every category bucket */ |
| 7670 | A_UINT32 prefer_5g; /* prefer select 5G candidate */ |
| 7671 | A_UINT32 select_5g_margin; |
| 7672 | A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */ |
| 7673 | A_UINT32 capability; |
| 7674 | A_UINT32 ht_caps_info; |
| 7675 | A_UINT32 ampdu_param; |
| 7676 | A_UINT32 ht_ext_cap; |
| 7677 | A_UINT32 ht_txbf; |
| 7678 | A_UINT32 asel_cap; |
| 7679 | A_UINT32 qos_enabled; |
| 7680 | A_UINT32 qos_caps; |
| 7681 | A_UINT32 wmm_caps; |
| 7682 | 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] | 7683 | * we don't declare it as |
| 7684 | * tlv array */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7685 | } wmi_roam_offload_tlv_param; |
| 7686 | |
| 7687 | /* flags for 11i offload */ |
| 7688 | #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */ |
| 7689 | /* from bit 1 to bit 31 are reserved */ |
| 7690 | |
| 7691 | #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \ |
| 7692 | (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7693 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7694 | |
| 7695 | #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \ |
| 7696 | (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7697 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7698 | |
| 7699 | #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \ |
| 7700 | ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED)) |
| 7701 | |
| 7702 | /* This TLV will be filled only in case of wpa-psk/wpa2-psk */ |
| 7703 | typedef struct { |
| 7704 | A_UINT32 tlv_header; |
| 7705 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */ |
| 7706 | A_UINT32 flags; |
| 7707 | /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */ |
| 7708 | A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7709 | A_UINT32 pmk_len; |
| 7710 | /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/ |
| 7711 | } wmi_roam_11i_offload_tlv_param; |
| 7712 | |
| 7713 | /* This TLV will be filled only in case of 11R*/ |
| 7714 | typedef struct { |
| 7715 | A_UINT32 tlv_header; |
| 7716 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */ |
| 7717 | A_UINT32 mdie_present; |
| 7718 | A_UINT32 mdid; |
| 7719 | A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2]; |
| 7720 | A_UINT32 r0kh_id_len; |
| 7721 | 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 */ |
| 7722 | A_UINT32 psk_msk_len; |
| 7723 | /**length of psk_msk*/ |
| 7724 | } wmi_roam_11r_offload_tlv_param; |
| 7725 | |
| 7726 | /* This TLV will be filled only in case of ESE */ |
| 7727 | typedef struct { |
| 7728 | A_UINT32 tlv_header; |
| 7729 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */ |
| 7730 | A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7731 | A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 7732 | } wmi_roam_ese_offload_tlv_param; |
| 7733 | |
| 7734 | /** WMI_ROAM_EVENT: roam event triggering the host roam logic. |
| 7735 | * generated when ever a better AP is found in the recent roam scan (or) |
| 7736 | * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received |
| 7737 | * from the current AP. |
| 7738 | */ |
| 7739 | typedef struct { |
| 7740 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */ |
| 7741 | /** unique id identifying the VDEV, generated by the caller */ |
| 7742 | A_UINT32 vdev_id; |
| 7743 | /** reason for roam event */ |
| 7744 | A_UINT32 reason; |
| 7745 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/ |
| 7746 | A_UINT32 rssi; |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7747 | /** roam notification */ |
| 7748 | A_UINT32 notif; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7749 | |
| 7750 | } wmi_roam_event_fixed_param; |
| 7751 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7752 | /* roam_reason: bits 0-3 */ |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7753 | |
| 7754 | /** invalid reason. Do not interpret reason field */ |
| 7755 | #define WMI_ROAM_REASON_INVALID 0x0 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7756 | #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */ |
| 7757 | #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */ |
| 7758 | #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */ |
| 7759 | #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */ |
| 7760 | #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7761 | SSID and Security profile in |
| 7762 | WMI_ROAM_AP_PROFILE, found during scan |
| 7763 | triggered upon FINAL_BMISS **/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7764 | #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] | 7765 | |
| 7766 | /* |
| 7767 | * WMI_ROAM_REASON_INVOKE_ROAM_FAIL: |
| 7768 | * Result code of WMI_ROAM_INVOKE_CMDID. |
| 7769 | * Any roaming failure before reassociation will be indicated to host |
| 7770 | * with this reason. |
| 7771 | * Any roaming failure after reassociation will be indicated to host with |
| 7772 | * WMI_ROAM_REASON_HO_FAILED no matter WMI_ROAM_INVOKE_CMDID is called or not. |
| 7773 | */ |
| 7774 | #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6 |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7775 | /* reserved up through 0xF */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7776 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7777 | /* subnet status: bits 4-5 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7778 | typedef enum { |
| 7779 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0, |
| 7780 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED, |
| 7781 | WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED, |
| 7782 | } wmi_roam_subnet_change_status; |
| 7783 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 7784 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30 |
| 7785 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4 |
| 7786 | |
| 7787 | #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \ |
| 7788 | do { \ |
| 7789 | (roam_reason) |= \ |
| 7790 | (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \ |
| 7791 | WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \ |
| 7792 | } while (0) |
| 7793 | |
| 7794 | #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \ |
| 7795 | (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \ |
| 7796 | WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) |
| 7797 | |
Krishna Kumaar Natarajan | 79a2a08 | 2016-03-25 15:07:07 -0700 | [diff] [blame] | 7798 | /* roaming notification */ |
| 7799 | /** invalid notification. Do not interpret notif field */ |
| 7800 | #define WMI_ROAM_NOTIF_INVALID 0x0 |
| 7801 | /** indicate that roaming is started. sent only in non WOW state */ |
| 7802 | #define WMI_ROAM_NOTIF_ROAM_START 0x1 |
| 7803 | /** indicate that roaming is aborted. sent only in non WOW state */ |
| 7804 | #define WMI_ROAM_NOTIF_ROAM_ABORT 0x2 |
| 7805 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7806 | /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc) |
| 7807 | * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations |
| 7808 | */ |
| 7809 | typedef struct { |
| 7810 | A_UINT32 tlv_header; |
| 7811 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */ |
| 7812 | A_UINT32 vdev_id; |
| 7813 | /**unique id identifying the VDEV, generated by the caller*/ |
| 7814 | A_UINT32 num_ric_request; |
| 7815 | /**number of ric request ie send to firmware.(max value is 2 now)*/ |
| 7816 | A_UINT32 is_add_ric; |
| 7817 | /**support add ric or delete ric*/ |
| 7818 | } wmi_ric_request_fixed_param; |
| 7819 | |
| 7820 | /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec |
| 7821 | * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming |
| 7822 | */ |
| 7823 | typedef struct { |
| 7824 | A_UINT32 tlv_header; |
| 7825 | A_UINT32 ts_info; /** bits value of TS Info field.*/ |
| 7826 | A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/ |
| 7827 | A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/ |
| 7828 | A_UINT32 min_service_interval; /**The Minimum Service Interval field*/ |
| 7829 | A_UINT32 max_service_interval; /**The Maximum Service Interval field*/ |
| 7830 | A_UINT32 inactivity_interval; /**The Inactivity Interval field*/ |
| 7831 | A_UINT32 suspension_interval; /**The Suspension Interval field*/ |
| 7832 | A_UINT32 svc_start_time; /**The Service Start Time field*/ |
| 7833 | A_UINT32 min_data_rate; /**The Minimum Data Rate field*/ |
| 7834 | A_UINT32 mean_data_rate; /**The Mean Data Rate field*/ |
| 7835 | A_UINT32 peak_data_rate; /**The Peak Data Rate field*/ |
| 7836 | A_UINT32 max_burst_size; /**The Burst Size field*/ |
| 7837 | A_UINT32 delay_bound; /**The Delay Bound field*/ |
| 7838 | A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/ |
| 7839 | A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/ |
| 7840 | A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/ |
| 7841 | } wmi_ric_tspec; |
| 7842 | |
| 7843 | /* flags for roam_invoke_cmd */ |
| 7844 | /* add this channel into roam cache channel list after this command is finished */ |
| 7845 | #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0 |
Govind Singh | d0c80a3 | 2016-02-01 17:57:48 +0530 | [diff] [blame] | 7846 | /* indicate to host of failure if WMI_ROAM_INVOKE_CMDID. */ |
| 7847 | #define WMI_ROAM_INVOKE_FLAG_REPORT_FAILURE 1 |
| 7848 | /* from bit 2 to bit 31 are reserved */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7849 | |
| 7850 | #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 7851 | (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7852 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7853 | |
| 7854 | #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 7855 | (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7856 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7857 | |
| 7858 | #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 7859 | ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE)) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 7860 | |
| 7861 | |
| 7862 | #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */ |
| 7863 | #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */ |
| 7864 | #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */ |
| 7865 | |
| 7866 | #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */ |
| 7867 | #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */ |
| 7868 | |
| 7869 | /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully |
| 7870 | * |
| 7871 | * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed. |
| 7872 | * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed |
| 7873 | * |
| 7874 | * This command can be used to add specific channel into roam cached channel list by following |
| 7875 | * <roam_scan_ch_mode> = 0 |
| 7876 | * <roam_ap_sel_mode> = 0 |
| 7877 | * <roam_delay> = 0 |
| 7878 | * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE |
| 7879 | * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given) |
| 7880 | * <channel_no> = channel list to be added |
| 7881 | */ |
| 7882 | typedef struct { |
| 7883 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */ |
| 7884 | A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */ |
| 7885 | A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */ |
| 7886 | A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */ |
| 7887 | A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */ |
| 7888 | A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */ |
| 7889 | A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */ |
| 7890 | A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */ |
| 7891 | /** |
| 7892 | * TLV (tag length value ) parameters follows roam_invoke_req |
| 7893 | * The TLV's are: |
| 7894 | * A_UINT32 channel_list[]; |
| 7895 | * wmi_mac_addr bssid_list[]; |
| 7896 | */ |
| 7897 | } wmi_roam_invoke_cmd_fixed_param; |
| 7898 | |
| 7899 | /* Definition for op_bitmap */ |
| 7900 | enum { |
| 7901 | ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1, |
| 7902 | ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2, |
| 7903 | ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4, |
| 7904 | }; |
| 7905 | |
| 7906 | typedef struct { |
| 7907 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */ |
| 7908 | A_UINT32 tlv_header; |
| 7909 | /** Unique id identifying the VDEV on which roaming filter is adopted */ |
| 7910 | A_UINT32 vdev_id; |
| 7911 | A_UINT32 flags; /** flags for filter */ |
| 7912 | /** 32 bit bitmap to be set on. |
| 7913 | * bit0 = first param, |
| 7914 | * bit 1 = second param...etc. Can be or'ed |
| 7915 | */ |
| 7916 | A_UINT32 op_bitmap; |
| 7917 | /* number of blacklist in the TLV variable bssid_black_list */ |
| 7918 | A_UINT32 num_bssid_black_list; |
| 7919 | /* number of whitelist in the TLV variable ssid_white_list */ |
| 7920 | A_UINT32 num_ssid_white_list; |
| 7921 | /* only for lfr 3.0. number of preferred list & factor in the TLV */ |
| 7922 | A_UINT32 num_bssid_preferred_list; |
| 7923 | /** |
| 7924 | * TLV (tag length value ) parameters follows roam_filter_list_cmd |
| 7925 | * The TLV's are: |
| 7926 | * wmi_mac_addr bssid_black_list[]; |
| 7927 | * wmi_ssid ssid_white_list[]; |
| 7928 | * wmi_mac_addr bssid_preferred_list[]; |
| 7929 | * A_UINT32 bssid_preferred_factor[]; |
| 7930 | */ |
| 7931 | } wmi_roam_filter_fixed_param; |
| 7932 | |
| 7933 | typedef struct { |
| 7934 | A_UINT8 address[4]; /* IPV4 address in Network Byte Order */ |
| 7935 | } WMI_IPV4_ADDR; |
| 7936 | |
| 7937 | typedef struct _WMI_IPV6_ADDR { |
| 7938 | A_UINT8 address[16]; /* IPV6 in Network Byte Order */ |
| 7939 | } WMI_IPV6_ADDR; |
| 7940 | |
| 7941 | /* flags for subnet change detection */ |
| 7942 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0 |
| 7943 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1 |
| 7944 | /* bit 2 to bit 31 are reserved */ |
| 7945 | |
| 7946 | /* set IPv4 enabled/disabled flag and get the flag */ |
| 7947 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \ |
| 7948 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 7949 | } while (0) |
| 7950 | |
| 7951 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \ |
| 7952 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 7953 | } while (0) |
| 7954 | |
| 7955 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \ |
| 7956 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED)) |
| 7957 | |
| 7958 | /* set IPv6 enabled flag, disabled and get the flag */ |
| 7959 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \ |
| 7960 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 7961 | } while (0) |
| 7962 | |
| 7963 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \ |
| 7964 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 7965 | } while (0) |
| 7966 | |
| 7967 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \ |
| 7968 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED)) |
| 7969 | |
| 7970 | /** |
| 7971 | * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses |
| 7972 | * to FW. FW uses these parameters for subnet change detection. |
| 7973 | */ |
| 7974 | typedef struct { |
| 7975 | /* |
| 7976 | * TLV tag and len; tag equals |
| 7977 | * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param |
| 7978 | */ |
| 7979 | A_UINT32 tlv_header; |
| 7980 | /** unique id identifying the VDEV, generated by the caller */ |
| 7981 | A_UINT32 vdev_id; |
| 7982 | /** IPv4/IPv6 enabled/disabled */ |
| 7983 | /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/ |
| 7984 | DISABLED */ |
| 7985 | A_UINT32 flag; |
| 7986 | /** Gateway MAC address */ |
| 7987 | wmi_mac_addr inet_gw_mac_addr; |
| 7988 | /** IP addresses */ |
| 7989 | WMI_IPV4_ADDR inet_gw_ip_v4_addr; |
| 7990 | WMI_IPV6_ADDR inet_gw_ip_v6_addr; |
| 7991 | /** Number of software retries for ARP/Neighbor solicitation request */ |
| 7992 | A_UINT32 max_retries; |
| 7993 | /** timeout in milliseconds for each ARP request*/ |
| 7994 | A_UINT32 timeout; |
| 7995 | /** number of skipped aps **/ |
| 7996 | A_UINT32 num_skip_subnet_change_detection_bssid_list; |
| 7997 | /** |
| 7998 | * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd |
| 7999 | * structure. The TLV's are: |
| 8000 | * wmi_mac_addr skip_subnet_change_detection_bssid_list []; |
| 8001 | **/ |
| 8002 | } wmi_roam_subnet_change_config_fixed_param; |
| 8003 | |
| 8004 | /** WMI_PROFILE_MATCH_EVENT: offload scan |
| 8005 | * generated when ever atleast one of the matching profiles is found |
| 8006 | * in recent NLO scan. no data is carried with the event. |
| 8007 | */ |
| 8008 | |
| 8009 | /** P2P specific commands */ |
| 8010 | |
| 8011 | /** |
| 8012 | * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by |
| 8013 | * FW to generate P2P IE tobe carried in probe response frames. |
| 8014 | * FW will respond to probe requests while in listen state. |
| 8015 | */ |
| 8016 | typedef struct { |
| 8017 | /* number of secondary device types,supported */ |
| 8018 | A_UINT32 num_secondary_dev_types; |
| 8019 | /** |
| 8020 | * followed by 8 bytes of primary device id and |
| 8021 | * num_secondary_dev_types * 8 bytes of secondary device |
| 8022 | * id. |
| 8023 | */ |
| 8024 | } wmi_p2p_dev_set_device_info; |
| 8025 | |
| 8026 | /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability |
| 8027 | * state. if enabled, an active STA/AP will respond to P2P probe requests on |
| 8028 | * the operating channel of the VDEV. |
| 8029 | */ |
| 8030 | |
| 8031 | typedef struct { |
| 8032 | /* 1:enable disoverability, 0:disable discoverability */ |
| 8033 | A_UINT32 enable_discoverability; |
| 8034 | } wmi_p2p_set_discoverability; |
| 8035 | |
| 8036 | /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to |
| 8037 | * beacons generated by FW. used in FW beacon mode. |
| 8038 | * the FW will add this IE to beacon in addition to the beacon |
| 8039 | * template set by WMI_BCN_TMPL_CMDID command. |
| 8040 | */ |
| 8041 | typedef struct { |
| 8042 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */ |
| 8043 | /** unique id identifying the VDEV, generated by the caller */ |
| 8044 | A_UINT32 vdev_id; |
| 8045 | /* ie length */ |
| 8046 | A_UINT32 ie_buf_len; |
| 8047 | /* Following this structure is the TLV byte stream of ie data of length ie_buf_len: |
| 8048 | * A_UINT8 ie_data[]; // length in byte given by field num_data. |
| 8049 | */ |
| 8050 | |
| 8051 | } wmi_p2p_go_set_beacon_ie_fixed_param; |
| 8052 | |
| 8053 | /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to |
| 8054 | * probe response generated by FW. used in FW beacon mode. |
| 8055 | * the FW will add this IE to probe response in addition to the probe response |
| 8056 | * template set by WMI_PRB_TMPL_CMDID command. |
| 8057 | */ |
| 8058 | typedef struct { |
| 8059 | /** unique id identifying the VDEV, generated by the caller */ |
| 8060 | A_UINT32 vdev_id; |
| 8061 | /* ie length */ |
| 8062 | A_UINT32 ie_buf_len; |
| 8063 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 8064 | } wmi_p2p_go_set_probe_resp_ie; |
| 8065 | |
| 8066 | /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will |
| 8067 | * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes |
| 8068 | * and action frames received by the P2P Client. |
| 8069 | */ |
| 8070 | typedef struct { |
| 8071 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */ |
| 8072 | /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */ |
| 8073 | A_UINT32 p2p_ie_oui_type; |
| 8074 | /** OS specific NoA Attribute ID */ |
| 8075 | A_UINT32 p2p_noa_attribute; |
| 8076 | } wmi_p2p_set_vendor_ie_data_cmd_fixed_param; |
| 8077 | |
| 8078 | /*----P2P disc offload definition ----*/ |
| 8079 | |
| 8080 | typedef struct { |
| 8081 | A_UINT32 pattern_type; |
| 8082 | /** |
| 8083 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 8084 | * TLV can contain bssid list, ssid list and |
| 8085 | * ie. the TLV tags are defined above; |
| 8086 | */ |
| 8087 | } wmi_p2p_disc_offload_pattern_cmd; |
| 8088 | |
| 8089 | typedef struct { |
| 8090 | /* unique id identifying the VDEV, generated by the caller */ |
| 8091 | A_UINT32 vdev_id; |
| 8092 | /* mgmt type of the ie */ |
| 8093 | A_UINT32 mgmt_type; |
| 8094 | /* ie length */ |
| 8095 | A_UINT32 ie_buf_len; |
| 8096 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 8097 | } wmi_p2p_disc_offload_appie_cmd; |
| 8098 | |
| 8099 | typedef struct { |
| 8100 | /* enable/disable p2p find offload */ |
| 8101 | A_UINT32 enable; |
| 8102 | /* unique id identifying the VDEV, generated by the caller */ |
| 8103 | A_UINT32 vdev_id; |
| 8104 | /* p2p find type */ |
| 8105 | A_UINT32 disc_type; |
| 8106 | /* p2p find perodic */ |
| 8107 | A_UINT32 perodic; |
| 8108 | /* p2p find listen channel */ |
| 8109 | A_UINT32 listen_channel; |
| 8110 | /* p2p find full channel number */ |
| 8111 | A_UINT32 num_scan_chans; |
| 8112 | /** |
| 8113 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 8114 | * TLV contain channel list |
| 8115 | */ |
| 8116 | } wmi_p2p_disc_offload_config_cmd; |
| 8117 | |
| 8118 | /*----P2P OppPS definition ----*/ |
| 8119 | typedef struct { |
| 8120 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */ |
| 8121 | A_UINT32 tlv_header; |
| 8122 | /* unique id identifying the VDEV, generated by the caller */ |
| 8123 | A_UINT32 vdev_id; |
| 8124 | /* OppPS attributes */ |
| 8125 | /** Bit 0: Indicate enable/disable of OppPS |
| 8126 | * Bits 7-1: Ctwindow in TUs |
| 8127 | * Bits 31-8: Reserved |
| 8128 | */ |
| 8129 | A_UINT32 oppps_attr; |
| 8130 | } wmi_p2p_set_oppps_cmd_fixed_param; |
| 8131 | |
| 8132 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1 |
| 8133 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0 |
| 8134 | |
| 8135 | #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \ |
| 8136 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED) |
| 8137 | |
| 8138 | #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \ |
| 8139 | WMI_F_RMW((hdr)->oppps_attr, 0x1, \ |
| 8140 | WMI_UNIFIED_OPPPS_ATTR_ENALBED); |
| 8141 | |
| 8142 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe |
| 8143 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1 |
| 8144 | |
| 8145 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \ |
| 8146 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN) |
| 8147 | |
| 8148 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \ |
| 8149 | WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \ |
| 8150 | WMI_UNIFIED_OPPPS_ATTR_CTWIN); |
| 8151 | |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 8152 | typedef enum p2p_lo_start_ctrl_flags_e { |
| 8153 | /* flush prob. req when host is awake */ |
| 8154 | P2P_LO_START_CTRL_FLAG_FLUSH_LISTEN_RESULT = 1 << 0, |
| 8155 | } p2p_lo_start_ctrl_flags; |
| 8156 | |
| 8157 | typedef struct { |
| 8158 | A_UINT32 tlv_header; |
| 8159 | A_UINT32 vdev_id; |
| 8160 | A_UINT32 ctl_flags; /* refer to enum_p2p_lo_start_ctrl_flags_e */ |
| 8161 | A_UINT32 channel; /* MHz */ |
| 8162 | A_UINT32 period; /* ms */ |
| 8163 | A_UINT32 interval; /* ms, interval should be larger than period */ |
| 8164 | A_UINT32 count; /* 0 means forever */ |
| 8165 | /* |
| 8166 | * device_types_len specifies the number of bytes in the |
| 8167 | * device_types_data[] byte-array TLV that follows this TLV. |
| 8168 | * The data in device_types_data[] is in 8-byte elements, so |
| 8169 | * device_types_len will be a multiple of 8. |
| 8170 | */ |
| 8171 | A_UINT32 device_types_len; |
| 8172 | /* |
| 8173 | * prob_resp_len specifies the number of bytes in the |
| 8174 | * prob_resp_data[] byte-array TLV that follows this TLV. |
| 8175 | */ |
| 8176 | A_UINT32 prob_resp_len; |
| 8177 | /* |
| 8178 | * Two other TLVs follow this TLV: |
| 8179 | * A_UINT8 device_types_data[device_types_len]; |
| 8180 | * A_UINT8 prob_resp_data[prob_resp_len]; |
| 8181 | * The information in device_types_data[] and prob_resp_data[] |
| 8182 | * needs to be provided to the target in over-the-air byte order. |
| 8183 | * On a big-endian host, if device_types_data and prob_resp_data |
| 8184 | * are initially in the correct over-the-air byte order, |
| 8185 | * the automatic byteswap for endianness-correction during WMI |
| 8186 | * message download will mess up the byte order. |
| 8187 | * Thus, a big-endian host needs to explicitly byte-swap the bytes |
| 8188 | * within each quad-byte segment of device_types_data[] and |
| 8189 | * prob_resp_data[], so that the automatic byte-swap applied during |
| 8190 | * WMI download from a big-endian host to the little-endian target |
| 8191 | * will restore device_types_data and prob_resp_data into the |
| 8192 | * correct byte ordering. |
| 8193 | */ |
| 8194 | } wmi_p2p_lo_start_cmd_fixed_param; |
| 8195 | |
| 8196 | typedef struct { |
| 8197 | A_UINT32 tlv_header; |
| 8198 | A_UINT32 vdev_id; |
| 8199 | } wmi_p2p_lo_stop_cmd_fixed_param; |
| 8200 | |
| 8201 | typedef enum p2p_lo_stopped_reason_e { |
| 8202 | /* finished as scheduled */ |
| 8203 | P2P_LO_STOPPED_REASON_COMPLETE = 0, |
| 8204 | /* host stops it */ |
| 8205 | P2P_LO_STOPPED_REASON_RECV_STOP_CMD, |
| 8206 | /* invalid listen offload par */ |
| 8207 | P2P_LO_STOPPED_REASON_INVALID_LO_PAR, |
| 8208 | /* vdev cannot support it right now */ |
| 8209 | P2P_LO_STOPPED_REASON_FW_NOT_SUPPORT, |
| 8210 | } p2p_lo_stopped_reason; |
| 8211 | |
| 8212 | typedef struct { |
| 8213 | A_UINT32 tlv_header; |
| 8214 | A_UINT32 vdev_id; |
| 8215 | A_UINT32 reason; /* refer to p2p_lo_stopped_reason_e */ |
| 8216 | } wmi_p2p_lo_stopped_event_fixed_param; |
| 8217 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8218 | typedef struct { |
| 8219 | A_UINT32 time32; /* upper 32 bits of time stamp */ |
| 8220 | A_UINT32 time0; /* lower 32 bits of time stamp */ |
| 8221 | } A_TIME64; |
| 8222 | |
| 8223 | typedef enum wmi_peer_sta_kickout_reason { |
| 8224 | WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */ |
| 8225 | WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1, |
| 8226 | WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2, |
| 8227 | WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3, |
| 8228 | WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */ |
| 8229 | WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5, |
| 8230 | } PEER_KICKOUT_REASON; |
| 8231 | |
| 8232 | typedef struct { |
| 8233 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */ |
| 8234 | /** peer mac address */ |
| 8235 | wmi_mac_addr peer_macaddr; |
| 8236 | /** Reason code, defined as above */ |
| 8237 | A_UINT32 reason; |
| 8238 | /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */ |
| 8239 | A_UINT32 rssi; |
| 8240 | } wmi_peer_sta_kickout_event_fixed_param; |
| 8241 | |
| 8242 | #define WMI_WLAN_PROFILE_MAX_HIST 3 |
| 8243 | #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32 |
| 8244 | |
| 8245 | typedef struct _wmi_wlan_profile_t { |
| 8246 | A_UINT32 tlv_header; |
| 8247 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */ |
| 8248 | A_UINT32 id; |
| 8249 | A_UINT32 cnt; |
| 8250 | A_UINT32 tot; |
| 8251 | A_UINT32 min; |
| 8252 | A_UINT32 max; |
| 8253 | A_UINT32 hist_intvl; |
| 8254 | A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST]; |
| 8255 | } wmi_wlan_profile_t; |
| 8256 | |
| 8257 | typedef struct _wmi_wlan_profile_ctx_t { |
| 8258 | A_UINT32 tlv_header; |
| 8259 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */ |
| 8260 | A_UINT32 tot; /* time in us */ |
| 8261 | A_UINT32 tx_msdu_cnt; |
| 8262 | A_UINT32 tx_mpdu_cnt; |
| 8263 | A_UINT32 tx_ppdu_cnt; |
| 8264 | A_UINT32 rx_msdu_cnt; |
| 8265 | A_UINT32 rx_mpdu_cnt; |
| 8266 | A_UINT32 bin_count; |
| 8267 | } wmi_wlan_profile_ctx_t; |
| 8268 | |
| 8269 | typedef struct { |
| 8270 | A_UINT32 tlv_header; |
| 8271 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */ |
| 8272 | A_UINT32 enable; |
| 8273 | } wmi_wlan_profile_trigger_cmd_fixed_param; |
| 8274 | |
| 8275 | typedef struct { |
| 8276 | A_UINT32 tlv_header; |
| 8277 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */ |
| 8278 | A_UINT32 value; |
| 8279 | } wmi_wlan_profile_get_prof_data_cmd_fixed_param; |
| 8280 | |
| 8281 | typedef struct { |
| 8282 | A_UINT32 tlv_header; |
| 8283 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */ |
| 8284 | A_UINT32 profile_id; |
| 8285 | A_UINT32 value; |
| 8286 | } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param; |
| 8287 | |
| 8288 | typedef struct { |
| 8289 | A_UINT32 tlv_header; |
| 8290 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */ |
| 8291 | A_UINT32 profile_id; |
| 8292 | A_UINT32 enable; |
| 8293 | } wmi_wlan_profile_enable_profile_id_cmd_fixed_param; |
| 8294 | |
| 8295 | /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20. |
| 8296 | 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS |
| 8297 | when comparing wifi header.*/ |
| 8298 | /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */ |
| 8299 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146 |
| 8300 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */ |
| 8301 | #define WOW_DEFAULT_BITMASK_SIZE 146 |
| 8302 | #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37 |
| 8303 | #define WOW_MAX_BITMAP_FILTERS 32 |
| 8304 | #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16 |
| 8305 | #define WOW_EXTEND_PATTERN_MATCH_CNT 16 |
| 8306 | #define WOW_SHORT_PATTERN_MATCH_CNT 8 |
| 8307 | #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] | 8308 | 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] | 8309 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6 |
| 8310 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2 |
| 8311 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6 |
| 8312 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2 |
| 8313 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120 |
| 8314 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30 |
| 8315 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32 |
| 8316 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8 |
| 8317 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32 |
| 8318 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8 |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 8319 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128 |
| 8320 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8321 | |
| 8322 | typedef enum pattern_type_e { |
| 8323 | WOW_PATTERN_MIN = 0, |
| 8324 | WOW_BITMAP_PATTERN = WOW_PATTERN_MIN, |
| 8325 | WOW_IPV4_SYNC_PATTERN, |
| 8326 | WOW_IPV6_SYNC_PATTERN, |
| 8327 | WOW_WILD_CARD_PATTERN, |
| 8328 | WOW_TIMER_PATTERN, |
| 8329 | WOW_MAGIC_PATTERN, |
| 8330 | WOW_IPV6_RA_PATTERN, |
| 8331 | WOW_IOAC_PKT_PATTERN, |
| 8332 | WOW_IOAC_TMR_PATTERN, |
| 8333 | WOW_IOAC_SOCK_PATTERN, |
| 8334 | WOW_PATTERN_MAX |
| 8335 | } WOW_PATTERN_TYPE; |
| 8336 | |
| 8337 | typedef enum event_type_e { |
| 8338 | WOW_BMISS_EVENT = 0, |
| 8339 | WOW_BETTER_AP_EVENT, |
| 8340 | WOW_DEAUTH_RECVD_EVENT, |
| 8341 | WOW_MAGIC_PKT_RECVD_EVENT, |
| 8342 | WOW_GTK_ERR_EVENT, |
| 8343 | WOW_FOURWAY_HSHAKE_EVENT, |
| 8344 | WOW_EAPOL_RECVD_EVENT, |
| 8345 | WOW_NLO_DETECTED_EVENT, |
| 8346 | WOW_DISASSOC_RECVD_EVENT, |
| 8347 | WOW_PATTERN_MATCH_EVENT, |
| 8348 | WOW_CSA_IE_EVENT, |
| 8349 | WOW_PROBE_REQ_WPS_IE_EVENT, |
| 8350 | WOW_AUTH_REQ_EVENT, |
| 8351 | WOW_ASSOC_REQ_EVENT, |
| 8352 | WOW_HTT_EVENT, |
| 8353 | WOW_RA_MATCH_EVENT, |
| 8354 | WOW_HOST_AUTO_SHUTDOWN_EVENT, |
| 8355 | WOW_IOAC_MAGIC_EVENT, |
| 8356 | WOW_IOAC_SHORT_EVENT, |
| 8357 | WOW_IOAC_EXTEND_EVENT, |
| 8358 | WOW_IOAC_TIMER_EVENT, |
| 8359 | WOW_DFS_PHYERR_RADAR_EVENT, |
| 8360 | WOW_BEACON_EVENT, |
| 8361 | WOW_CLIENT_KICKOUT_EVENT, |
| 8362 | WOW_NAN_EVENT, |
| 8363 | WOW_EXTSCAN_EVENT, |
| 8364 | WOW_IOAC_REV_KA_FAIL_EVENT, |
| 8365 | WOW_IOAC_SOCK_EVENT, |
| 8366 | WOW_NLO_SCAN_COMPLETE_EVENT, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 8367 | WOW_NAN_DATA_EVENT, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 8368 | WOW_NAN_RTT_EVENT, /* DEPRECATED, UNUSED */ |
| 8369 | /* reuse deprecated event value */ |
| 8370 | WOW_OEM_RESPONSE_EVENT = WOW_NAN_RTT_EVENT, |
Krishna Kumaar Natarajan | 3bd7364 | 2016-03-25 13:59:54 -0700 | [diff] [blame] | 8371 | WOW_TDLS_CONN_TRACKER_EVENT, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 8372 | WOW_CRITICAL_LOG_EVENT, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8373 | } WOW_WAKE_EVENT_TYPE; |
| 8374 | |
| 8375 | typedef enum wake_reason_e { |
| 8376 | WOW_REASON_UNSPECIFIED = -1, |
| 8377 | WOW_REASON_NLOD = 0, |
| 8378 | WOW_REASON_AP_ASSOC_LOST, |
| 8379 | WOW_REASON_LOW_RSSI, |
| 8380 | WOW_REASON_DEAUTH_RECVD, |
| 8381 | WOW_REASON_DISASSOC_RECVD, |
| 8382 | WOW_REASON_GTK_HS_ERR, |
| 8383 | WOW_REASON_EAP_REQ, |
| 8384 | WOW_REASON_FOURWAY_HS_RECV, |
| 8385 | WOW_REASON_TIMER_INTR_RECV, |
| 8386 | WOW_REASON_PATTERN_MATCH_FOUND, |
| 8387 | WOW_REASON_RECV_MAGIC_PATTERN, |
| 8388 | WOW_REASON_P2P_DISC, |
| 8389 | WOW_REASON_WLAN_HB, |
| 8390 | WOW_REASON_CSA_EVENT, |
| 8391 | WOW_REASON_PROBE_REQ_WPS_IE_RECV, |
| 8392 | WOW_REASON_AUTH_REQ_RECV, |
| 8393 | WOW_REASON_ASSOC_REQ_RECV, |
| 8394 | WOW_REASON_HTT_EVENT, |
| 8395 | WOW_REASON_RA_MATCH, |
| 8396 | WOW_REASON_HOST_AUTO_SHUTDOWN, |
| 8397 | WOW_REASON_IOAC_MAGIC_EVENT, |
| 8398 | WOW_REASON_IOAC_SHORT_EVENT, |
| 8399 | WOW_REASON_IOAC_EXTEND_EVENT, |
| 8400 | WOW_REASON_IOAC_TIMER_EVENT, |
| 8401 | WOW_REASON_ROAM_HO, |
| 8402 | WOW_REASON_DFS_PHYERR_RADADR_EVENT, |
| 8403 | WOW_REASON_BEACON_RECV, |
| 8404 | WOW_REASON_CLIENT_KICKOUT_EVENT, |
| 8405 | WOW_REASON_NAN_EVENT, |
| 8406 | WOW_REASON_EXTSCAN, |
| 8407 | WOW_REASON_RSSI_BREACH_EVENT, |
| 8408 | WOW_REASON_IOAC_REV_KA_FAIL_EVENT, |
| 8409 | WOW_REASON_IOAC_SOCK_EVENT, |
| 8410 | WOW_REASON_NLO_SCAN_COMPLETE, |
| 8411 | WOW_REASON_PACKET_FILTER_MATCH, |
| 8412 | WOW_REASON_ASSOC_RES_RECV, |
| 8413 | WOW_REASON_REASSOC_REQ_RECV, |
| 8414 | WOW_REASON_REASSOC_RES_RECV, |
| 8415 | WOW_REASON_ACTION_FRAME_RECV, |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 8416 | WOW_REASON_BPF_ALLOW, |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 8417 | WOW_REASON_NAN_DATA, |
Himanshu Agarwal | 82972fd | 2016-05-20 12:23:43 +0530 | [diff] [blame] | 8418 | WOW_REASON_NAN_RTT, /* DEPRECATED, UNUSED */ |
| 8419 | /* reuse deprecated reason value */ |
| 8420 | WOW_REASON_OEM_RESPONSE_EVENT = WOW_REASON_NAN_RTT, |
Krishna Kumaar Natarajan | 3bd7364 | 2016-03-25 13:59:54 -0700 | [diff] [blame] | 8421 | WOW_REASON_TDLS_CONN_TRACKER_EVENT, |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 8422 | WOW_REASON_CRITICAL_LOG, |
Himanshu Agarwal | f7bb67b | 2016-05-30 21:04:30 +0530 | [diff] [blame] | 8423 | WOW_REASON_P2P_LISTEN_OFFLOAD, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8424 | WOW_REASON_DEBUG_TEST = 0xFF, |
| 8425 | } WOW_WAKE_REASON_TYPE; |
| 8426 | |
| 8427 | typedef enum { |
| 8428 | WOW_IFACE_PAUSE_ENABLED, |
| 8429 | WOW_IFACE_PAUSE_DISABLED |
| 8430 | } WOW_IFACE_STATUS; |
| 8431 | |
| 8432 | enum { |
| 8433 | /* some win10 platfrom will not assert pcie_reset for wow.*/ |
| 8434 | WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, |
Govind Singh | b5158e2 | 2016-02-04 15:38:30 +0530 | [diff] [blame] | 8435 | /* |
| 8436 | * WMI_WOW_FLAG_SEND_PM_PME |
| 8437 | * Some platforms have issues if the PM_PME message is sent after WoW, |
| 8438 | * so don't send PM_PME after WoW unless the host uses this flag |
| 8439 | * to request it. |
| 8440 | */ |
| 8441 | WMI_WOW_FLAG_SEND_PM_PME = 0x00000002, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8442 | }; |
| 8443 | |
| 8444 | |
| 8445 | typedef struct { |
| 8446 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */ |
| 8447 | A_UINT32 enable; |
| 8448 | A_UINT32 pause_iface_config; |
| 8449 | A_UINT32 flags; /* WMI_WOW_FLAG enums */ |
| 8450 | } wmi_wow_enable_cmd_fixed_param; |
| 8451 | |
| 8452 | typedef struct { |
| 8453 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */ |
| 8454 | /** Reserved for future use */ |
| 8455 | A_UINT32 reserved0; |
| 8456 | } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param; |
| 8457 | |
| 8458 | #define WOW_ICMPV6_NA_FILTER_DISABLE 0 |
| 8459 | #define WOW_ICMPV6_NA_FILTER_ENABLE 1 |
| 8460 | |
| 8461 | typedef struct { |
| 8462 | /* TLV tag and len; |
| 8463 | * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param |
| 8464 | */ |
| 8465 | A_UINT32 tlv_header; |
| 8466 | A_UINT32 vdev_id; |
| 8467 | A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */ |
| 8468 | } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param; |
| 8469 | |
| 8470 | typedef struct bitmap_pattern_s { |
| 8471 | A_UINT32 tlv_header; |
| 8472 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */ |
| 8473 | A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD]; |
| 8474 | A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD]; |
| 8475 | A_UINT32 pattern_offset; |
| 8476 | A_UINT32 pattern_len; |
| 8477 | A_UINT32 bitmask_len; |
| 8478 | A_UINT32 pattern_id; /* must be less than max_bitmap_filters */ |
| 8479 | } WOW_BITMAP_PATTERN_T; |
| 8480 | |
| 8481 | typedef struct ipv4_sync_s { |
| 8482 | A_UINT32 tlv_header; |
| 8483 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */ |
| 8484 | A_UINT32 ipv4_src_addr; |
| 8485 | A_UINT32 ipv4_dst_addr; |
| 8486 | A_UINT32 tcp_src_prt; |
| 8487 | A_UINT32 tcp_dst_prt; |
| 8488 | } WOW_IPV4_SYNC_PATTERN_T; |
| 8489 | |
| 8490 | typedef struct ipv6_sync_s { |
| 8491 | A_UINT32 tlv_header; |
| 8492 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */ |
| 8493 | A_UINT32 ipv6_src_addr[4]; |
| 8494 | A_UINT32 ipv6_dst_addr[4]; |
| 8495 | A_UINT32 tcp_src_prt; |
| 8496 | A_UINT32 tcp_dst_prt; |
| 8497 | } WOW_IPV6_SYNC_PATTERN_T; |
| 8498 | |
| 8499 | typedef struct WOW_MAGIC_PATTERN_CMD { |
| 8500 | A_UINT32 tlv_header; |
| 8501 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */ |
| 8502 | wmi_mac_addr macaddr; |
| 8503 | } WOW_MAGIC_PATTERN_CMD; |
| 8504 | |
| 8505 | typedef enum wow_ioac_pattern_type { |
| 8506 | WOW_IOAC_MAGIC_PATTERN = 1, |
| 8507 | WOW_IOAC_SHORT_PATTERN, |
| 8508 | WOW_IOAC_EXTEND_PATTERN, |
| 8509 | } WOW_IOAC_PATTERN_TYPE; |
| 8510 | |
| 8511 | typedef struct ioac_sock_pattern_s { |
| 8512 | /** |
| 8513 | * TLV tag and len; |
| 8514 | * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T |
| 8515 | */ |
| 8516 | A_UINT32 tlv_header; |
| 8517 | A_UINT32 id; |
| 8518 | A_UINT32 local_ipv4; |
| 8519 | A_UINT32 remote_ipv4; |
| 8520 | A_UINT32 local_port; |
| 8521 | A_UINT32 remote_port; |
| 8522 | A_UINT32 pattern_len; /* units = bytes */ |
| 8523 | A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD]; |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 8524 | WMI_IPV6_ADDR local_ipv6; |
| 8525 | WMI_IPV6_ADDR remote_ipv6; |
| 8526 | A_UINT32 ack_nak_len; |
| 8527 | A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
| 8528 | A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8529 | } WOW_IOAC_SOCK_PATTERN_T; |
| 8530 | |
| 8531 | typedef struct ioac_pkt_pattern_s { |
| 8532 | A_UINT32 tlv_header; |
| 8533 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */ |
| 8534 | A_UINT32 pattern_type; |
| 8535 | A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD]; |
| 8536 | A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD]; |
| 8537 | A_UINT32 pattern_len; |
| 8538 | A_UINT32 random_len; |
| 8539 | } WOW_IOAC_PKT_PATTERN_T; |
| 8540 | |
| 8541 | typedef struct ioac_tmr_pattern_s { |
| 8542 | A_UINT32 tlv_header; |
| 8543 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */ |
| 8544 | A_UINT32 wake_in_s; |
| 8545 | A_UINT32 vdev_id; |
| 8546 | } WOW_IOAC_TMR_PATTERN_T; |
| 8547 | |
| 8548 | typedef struct { |
| 8549 | A_UINT32 tlv_header; |
| 8550 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */ |
| 8551 | A_UINT32 nID; |
| 8552 | } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param; |
| 8553 | |
| 8554 | typedef struct { |
| 8555 | A_UINT32 tlv_header; |
| 8556 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */ |
| 8557 | A_UINT32 nID; |
| 8558 | } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param; |
| 8559 | |
| 8560 | typedef struct ioac_keepalive_s { |
| 8561 | A_UINT32 tlv_header; |
| 8562 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */ |
| 8563 | A_UINT32 |
| 8564 | keepalive_pkt_buf |
| 8565 | [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD]; |
| 8566 | A_UINT32 keepalive_pkt_len; |
| 8567 | A_UINT32 period_in_ms; |
| 8568 | A_UINT32 vdev_id; |
| 8569 | A_UINT32 max_loss_cnt; |
| 8570 | A_UINT32 local_ipv4; |
| 8571 | A_UINT32 remote_ipv4; |
| 8572 | A_UINT32 local_port; |
| 8573 | A_UINT32 remote_port; |
| 8574 | A_UINT32 recv_period_in_ms; |
| 8575 | A_UINT32 rev_ka_size; |
| 8576 | 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] | 8577 | WMI_IPV6_ADDR local_ipv6; |
| 8578 | WMI_IPV6_ADDR remote_ipv6; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8579 | } WMI_WOW_IOAC_KEEPALIVE_T; |
| 8580 | |
| 8581 | typedef struct { |
| 8582 | A_UINT32 tlv_header; |
| 8583 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */ |
| 8584 | A_UINT32 vdev_id; |
| 8585 | A_UINT32 pattern_type; |
| 8586 | /* |
| 8587 | * Following this struct are these TLVs. Note that they are all array of structures |
| 8588 | * but can have at most one element. Which TLV is empty or has one element depends |
| 8589 | * on the field pattern_type. This is to emulate an union. |
| 8590 | * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[]; |
| 8591 | * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[]; |
| 8592 | */ |
| 8593 | } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param; |
| 8594 | |
| 8595 | typedef struct { |
| 8596 | A_UINT32 tlv_header; |
| 8597 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */ |
| 8598 | A_UINT32 vdev_id; |
| 8599 | A_UINT32 pattern_type; |
| 8600 | A_UINT32 pattern_id; |
| 8601 | } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param; |
| 8602 | |
| 8603 | typedef struct { |
| 8604 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */ |
| 8605 | A_UINT32 vdev_id; |
| 8606 | A_UINT32 pattern_id; |
| 8607 | A_UINT32 pattern_type; |
| 8608 | /* |
| 8609 | * Following this struct are these TLVs. Note that they are all array of structures |
| 8610 | * but can have at most one element. Which TLV is empty or has one element depends |
| 8611 | * on the field pattern_type. This is to emulate an union. |
| 8612 | * WOW_BITMAP_PATTERN_T pattern_info_bitmap[]; |
| 8613 | * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[]; |
| 8614 | * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[]; |
| 8615 | * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[]; |
| 8616 | * A_UINT32 pattern_info_timeout[]; |
| 8617 | * A_UINT32 ra_ratelimit_interval; |
| 8618 | */ |
| 8619 | } WMI_WOW_ADD_PATTERN_CMD_fixed_param; |
| 8620 | |
| 8621 | typedef struct { |
| 8622 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */ |
| 8623 | A_UINT32 vdev_id; |
| 8624 | A_UINT32 pattern_id; |
| 8625 | A_UINT32 pattern_type; |
| 8626 | } WMI_WOW_DEL_PATTERN_CMD_fixed_param; |
| 8627 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 8628 | #define WMI_WOW_MAX_EVENT_BM_LEN 4 |
| 8629 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8630 | typedef struct { |
| 8631 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */ |
| 8632 | A_UINT32 vdev_id; |
| 8633 | A_UINT32 is_add; |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 8634 | union { |
| 8635 | A_UINT32 event_bitmap; |
| 8636 | A_UINT32 event_bitmaps[WMI_WOW_MAX_EVENT_BM_LEN]; |
| 8637 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8638 | } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param; |
| 8639 | |
| 8640 | /* |
| 8641 | * This structure is used to set the pattern to check UDP packet in WOW mode. |
| 8642 | * If match, construct a tx frame in a local buffer to send through the peer |
| 8643 | * AP to the entity in the IP network that sent the UDP packet to this STA. |
| 8644 | */ |
| 8645 | typedef struct { |
| 8646 | /* |
| 8647 | * TLV tag and len; |
| 8648 | * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param |
| 8649 | */ |
| 8650 | A_UINT32 tlv_header; |
| 8651 | A_UINT32 vdev_id; |
| 8652 | A_UINT32 enable; /* 1: enable, 0: disable */ |
| 8653 | /* |
| 8654 | * dest_port - |
| 8655 | * bits 7:0 contain the LSB of the UDP dest port, |
| 8656 | * bits 15:8 contain the MSB of the UDP dest port |
| 8657 | */ |
| 8658 | A_UINT32 dest_port; |
| 8659 | A_UINT32 pattern_len; /* length in byte of pattern[] */ |
| 8660 | A_UINT32 response_len; /* length in byte of response[] */ |
| 8661 | /* |
| 8662 | * Following this struct are the TLV's: |
| 8663 | * payload of UDP packet to be checked, network byte order |
| 8664 | * A_UINT8 pattern[]; |
| 8665 | * payload of UDP packet to be response, network byte order |
| 8666 | * A_UINT8 response[]; |
| 8667 | */ |
| 8668 | } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param; |
| 8669 | |
| 8670 | /* |
| 8671 | * This structure is used to set the pattern for WOW host wakeup pin pulse |
| 8672 | * pattern confirguration. |
| 8673 | */ |
| 8674 | typedef struct { |
| 8675 | /* |
| 8676 | * TLV tag and len; tag equals |
| 8677 | * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param |
| 8678 | */ |
| 8679 | A_UINT32 tlv_header; |
| 8680 | |
| 8681 | /* 1: enable, 0: disable */ |
| 8682 | A_UINT32 enable; |
| 8683 | |
| 8684 | /* pin for host wakeup */ |
| 8685 | A_UINT32 pin; |
| 8686 | |
| 8687 | /* interval for keeping low voltage, unit: ms */ |
| 8688 | A_UINT32 interval_low; |
| 8689 | |
| 8690 | /* interval for keeping high voltage, unit: ms */ |
| 8691 | A_UINT32 interval_high; |
| 8692 | |
| 8693 | /* repeat times for pulse (0xffffffff means forever) */ |
| 8694 | A_UINT32 repeat_cnt; |
| 8695 | } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param; |
| 8696 | |
Anurag Chouhan | 86eab9b | 2016-04-21 16:22:47 +0530 | [diff] [blame] | 8697 | #define MAX_SUPPORTED_ACTION_CATEGORY 256 |
| 8698 | #define MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST (MAX_SUPPORTED_ACTION_CATEGORY/32) |
| 8699 | |
| 8700 | typedef enum { |
| 8701 | WOW_ACTION_WAKEUP_OPERATION_RESET = 0, |
| 8702 | WOW_ACTION_WAKEUP_OPERATION_SET, |
| 8703 | WOW_ACTION_WAKEUP_OPERATION_ADD_SET, |
| 8704 | WOW_ACTION_WAKEUP_OPERATION_DELETE_SET, |
| 8705 | } WOW_ACTION_WAKEUP_OPERATION; |
| 8706 | |
| 8707 | typedef struct { |
| 8708 | /* |
| 8709 | * TLV tag and len; tag equals |
| 8710 | * WMITLV_TAG_STRUC_WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param |
| 8711 | */ |
| 8712 | A_UINT32 tlv_header; |
| 8713 | A_UINT32 vdev_id; |
| 8714 | /* |
| 8715 | * 0 reset to fw default, 1 set the bits, 2 add the setting bits, |
| 8716 | * 3 delete the setting bits |
| 8717 | */ |
| 8718 | A_UINT32 operation; |
| 8719 | A_UINT32 action_category_map[MAX_SUPPORTED_ACTION_CATEGORY_ELE_LIST]; |
| 8720 | } WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param; |
| 8721 | |
| 8722 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8723 | typedef struct wow_event_info_s { |
| 8724 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */ |
| 8725 | A_UINT32 vdev_id; |
| 8726 | A_UINT32 flag; /*This is current reserved. */ |
| 8727 | A_INT32 wake_reason; |
| 8728 | A_UINT32 data_len; |
| 8729 | } WOW_EVENT_INFO_fixed_param; |
| 8730 | |
| 8731 | typedef struct wow_initial_wakeup_event_s { |
| 8732 | /* |
| 8733 | * TLV tag and len; tag equals |
| 8734 | * WOW_INITIAL_WAKEUP_EVENT_fixed_param |
| 8735 | */ |
| 8736 | A_UINT32 tlv_header; |
| 8737 | A_UINT32 vdev_id; |
| 8738 | } WOW_INITIAL_WAKEUP_EVENT_fixed_param; |
| 8739 | |
| 8740 | typedef enum { |
| 8741 | WOW_EVENT_INFO_TYPE_PACKET = 0x0001, |
| 8742 | WOW_EVENT_INFO_TYPE_BITMAP, |
| 8743 | WOW_EVENT_INFO_TYPE_GTKIGTK, |
| 8744 | } WOW_EVENT_INFO_TYPE; |
| 8745 | |
| 8746 | typedef struct wow_event_info_section_s { |
| 8747 | A_UINT32 data_type; |
| 8748 | A_UINT32 data_len; |
| 8749 | } WOW_EVENT_INFO_SECTION; |
| 8750 | |
| 8751 | typedef struct wow_event_info_section_packet_s { |
| 8752 | A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE]; |
| 8753 | } WOW_EVENT_INFO_SECTION_PACKET; |
| 8754 | |
| 8755 | typedef struct wow_event_info_section_bitmap_s { |
| 8756 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */ |
| 8757 | A_UINT32 flag; /*This is current reserved. */ |
| 8758 | A_UINT32 value; /*This could be the pattern id for bitmap pattern. */ |
| 8759 | A_UINT32 org_len; /*The length of the orginal packet. */ |
| 8760 | } WOW_EVENT_INFO_SECTION_BITMAP; |
| 8761 | |
| 8762 | /** |
| 8763 | * This command is sent from WLAN host driver to firmware to |
| 8764 | * enable or disable D0-WOW. D0-WOW means APSS suspend with |
| 8765 | * PCIe link and DDR being active. |
| 8766 | * |
| 8767 | * |
| 8768 | * Entering D0-WOW Mode (based on kernel suspend request): |
| 8769 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1) |
| 8770 | * target: Take action (e.g. dbglog suspend) |
| 8771 | * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message) |
| 8772 | * |
| 8773 | * Exiting D0-WOW mode (based on kernel resume OR target->host message received) |
| 8774 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0) |
| 8775 | * target: Take action (e.g. dbglog resume) |
| 8776 | * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID |
| 8777 | * |
| 8778 | * This command is applicable only on the PCIE LL systems |
| 8779 | * Host can enter either D0-WOW or WOW mode, but NOT both at same time |
| 8780 | * Decision to enter D0-WOW or WOW is based on active interfaces |
| 8781 | * |
| 8782 | */ |
| 8783 | typedef struct { |
| 8784 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */ |
| 8785 | A_UINT32 enable; /* 1 = enable, 0 = disable */ |
| 8786 | } wmi_d0_wow_enable_disable_cmd_fixed_param; |
| 8787 | |
| 8788 | typedef enum extend_wow_type_e { |
| 8789 | EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */ |
| 8790 | EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */ |
| 8791 | 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] | 8792 | EXTWOW_TYPE_APP_PULSETEST, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8793 | EXTWOW_DISABLED = 255, |
| 8794 | } EXTWOW_TYPE; |
| 8795 | |
| 8796 | typedef struct { |
| 8797 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */ |
| 8798 | A_UINT32 vdev_id; |
| 8799 | A_UINT32 type; |
| 8800 | A_UINT32 wakeup_pin_num; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 8801 | A_UINT32 swol_pulsetest_type; |
| 8802 | A_UINT32 swol_pulsetest_application; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8803 | } wmi_extwow_enable_cmd_fixed_param; |
| 8804 | |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 8805 | #define SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX 8 |
| 8806 | #define SWOL_INDOOR_KEY_LEN 16 |
| 8807 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8808 | typedef struct { |
| 8809 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */ |
| 8810 | A_UINT32 vdev_id; |
| 8811 | wmi_mac_addr wakee_mac; |
| 8812 | A_UINT8 ident[8]; |
| 8813 | A_UINT8 passwd[16]; |
| 8814 | A_UINT32 ident_len; |
| 8815 | A_UINT32 passwd_len; |
Manikandan Mohan | 7a32f7e | 2015-12-23 12:35:12 -0800 | [diff] [blame] | 8816 | |
| 8817 | /* indoor check parameters */ |
| 8818 | /* key for mac addresses specified in swol_indoor_key_mac |
| 8819 | * Big-endian hosts need to byte-swap the bytes within each 4-byte |
| 8820 | * segment of this array, so the bytes will return to their original |
| 8821 | * order when the entire WMI message contents are byte-swapped to |
| 8822 | * convert from big-endian to little-endian format. |
| 8823 | */ |
| 8824 | A_UINT8 swol_indoor_key[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX][SWOL_INDOOR_KEY_LEN]; |
| 8825 | /* key length for specified mac address index |
| 8826 | * Big-endian hosts need to byte-swap the bytes within each 4-byte |
| 8827 | * segment of this array, so the bytes will return to their original |
| 8828 | * order when the entire WMI message contents are byte-swapped to |
| 8829 | * convert from big-endian to little-endian format. |
| 8830 | */ |
| 8831 | A_UINT8 swol_indoor_key_len[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 8832 | /* mac address array allowed to wakeup host*/ |
| 8833 | wmi_mac_addr swol_indoor_key_mac[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 8834 | /* app mask for the mac addresses specified in swol_indoor_key_mac */ |
| 8835 | A_UINT32 swol_indoor_app_mask[SWOL_INDOOR_MAC_ADDRESS_INDEX_MAX]; |
| 8836 | A_UINT32 swol_indoor_waker_check; /* whether to do indoor waker check */ |
| 8837 | A_UINT32 swol_indoor_pw_check; /* whether to check password */ |
| 8838 | A_UINT32 swol_indoor_pattern; /* wakeup pattern */ |
| 8839 | A_UINT32 swol_indoor_exception; /* wakeup when exception happens */ |
| 8840 | A_UINT32 swol_indoor_exception_app; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8841 | } wmi_extwow_set_app_type1_params_cmd_fixed_param; |
| 8842 | |
| 8843 | typedef struct { |
| 8844 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */ |
| 8845 | A_UINT32 vdev_id; |
| 8846 | |
| 8847 | A_UINT8 rc4_key[16]; |
| 8848 | A_UINT32 rc4_key_len; |
| 8849 | |
| 8850 | /** ip header parameter */ |
| 8851 | A_UINT32 ip_id; /* NC id */ |
| 8852 | A_UINT32 ip_device_ip; /* NC IP address */ |
| 8853 | A_UINT32 ip_server_ip; /* Push server IP address */ |
| 8854 | |
| 8855 | /** tcp header parameter */ |
| 8856 | A_UINT16 tcp_src_port; /* NC TCP port */ |
| 8857 | A_UINT16 tcp_dst_port; /* Push server TCP port */ |
| 8858 | A_UINT32 tcp_seq; |
| 8859 | A_UINT32 tcp_ack_seq; |
| 8860 | |
| 8861 | A_UINT32 keepalive_init; /* Initial ping interval */ |
| 8862 | A_UINT32 keepalive_min; /* Minimum ping interval */ |
| 8863 | A_UINT32 keepalive_max; /* Maximum ping interval */ |
| 8864 | A_UINT32 keepalive_inc; /* Increment of ping interval */ |
| 8865 | |
| 8866 | wmi_mac_addr gateway_mac; |
| 8867 | A_UINT32 tcp_tx_timeout_val; |
| 8868 | A_UINT32 tcp_rx_timeout_val; |
| 8869 | |
| 8870 | /** add extra parameter for backward-compatible */ |
| 8871 | /* |
| 8872 | * For all byte arrays, natural order is used. E.g. |
| 8873 | * rc4_write_sandbox[0] holds the 1st RC4 S-box byte, |
| 8874 | * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc. |
| 8875 | */ |
| 8876 | |
| 8877 | /* used to encrypt transmit packet such as keep-alive */ |
| 8878 | A_UINT8 rc4_write_sandbox[256]; |
| 8879 | A_UINT32 rc4_write_x; |
| 8880 | A_UINT32 rc4_write_y; |
| 8881 | |
| 8882 | /* used to decrypt received packet such as wow data */ |
| 8883 | A_UINT8 rc4_read_sandbox[256]; |
| 8884 | A_UINT32 rc4_read_x; |
| 8885 | A_UINT32 rc4_read_y; |
| 8886 | |
| 8887 | /* used to caculate HMAC hash for transmit packet such as keep-alive */ |
| 8888 | A_UINT8 ssl_write_seq[8]; |
| 8889 | A_UINT8 ssl_sha1_write_key[64]; |
| 8890 | A_UINT32 ssl_sha1_write_key_len; |
| 8891 | |
| 8892 | /* used to calculate HAMC hash for receive packet such as wow data */ |
| 8893 | A_UINT8 ssl_read_seq[8]; |
| 8894 | A_UINT8 ssl_sha1_read_key[64]; |
| 8895 | A_UINT32 ssl_sha1_read_key_len; |
| 8896 | |
| 8897 | /* optional element for specifying TCP options data to include in |
| 8898 | * transmit packets such as keep-alive |
| 8899 | */ |
| 8900 | A_UINT32 tcp_options_len; |
| 8901 | A_UINT8 tcp_options[40]; |
| 8902 | |
| 8903 | A_UINT32 async_id; /* keep-alive request id */ |
| 8904 | } wmi_extwow_set_app_type2_params_cmd_fixed_param; |
| 8905 | |
| 8906 | #define WMI_RXERR_CRC 0x01 /* CRC error on frame */ |
| 8907 | #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ |
| 8908 | #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */ |
| 8909 | #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ |
| 8910 | |
| 8911 | typedef enum { |
| 8912 | PKT_PWR_SAVE_PAID_MATCH = 0x0001, |
| 8913 | PKT_PWR_SAVE_GID_MATCH = 0x0002, |
| 8914 | PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004, |
| 8915 | PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008, |
| 8916 | PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010, |
| 8917 | PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020, |
| 8918 | PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040, |
| 8919 | PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080, |
| 8920 | PKT_PWR_SAVE_RSSI_CHECK = 0x0100, |
| 8921 | PKT_PWR_SAVE_5G_EBT = 0x0200, |
| 8922 | PKT_PWR_SAVE_2G_EBT = 0x0400, |
| 8923 | WMI_PKT_PWR_SAVE_MAX = 0x0800, |
| 8924 | } WMI_PKT_PWR_SAVE_TYPE; |
| 8925 | |
| 8926 | typedef struct { |
| 8927 | A_UINT32 tlv_header; |
| 8928 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */ |
| 8929 | A_UINT32 num_data; |
| 8930 | /** length in byte of data[]. */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 8931 | /** pdev_id for identifying the MAC |
| 8932 | * See macros starting with WMI_PDEV_ID_ for values. |
| 8933 | */ |
| 8934 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8935 | /* This structure is used to send Factory Test Mode [FTM] command |
| 8936 | * from host to firmware for integrated chips which are binary blobs. |
| 8937 | * Following this structure is the TLV: |
| 8938 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 8939 | */ |
| 8940 | } wmi_ftm_intg_cmd_fixed_param; |
| 8941 | |
| 8942 | typedef struct { |
| 8943 | A_UINT32 tlv_header; |
| 8944 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */ |
| 8945 | A_UINT32 num_data; |
| 8946 | /** length in byte of data[]. */ |
| 8947 | /* This structure is used to receive Factory Test Mode [FTM] event |
| 8948 | * from firmware to host for integrated chips which are binary blobs. |
| 8949 | * Following this structure is the TLV: |
| 8950 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 8951 | */ |
| 8952 | } wmi_ftm_intg_event_fixed_param; |
| 8953 | |
| 8954 | #define WMI_MAX_NS_OFFLOADS 2 |
| 8955 | #define WMI_MAX_ARP_OFFLOADS 2 |
| 8956 | |
| 8957 | #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 8958 | #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 8959 | #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */ |
| 8960 | |
| 8961 | typedef struct { |
| 8962 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */ |
| 8963 | A_UINT32 flags; /* flags */ |
| 8964 | A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */ |
| 8965 | A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */ |
| 8966 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 8967 | } WMI_ARP_OFFLOAD_TUPLE; |
| 8968 | |
| 8969 | #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 8970 | #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 8971 | #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] | 8972 | /* whether the configured IPv6 address is anycast */ |
| 8973 | #define WMI_NSOFF_FLAGS_IS_IPV6_ANYCAST (1 << 3) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 8974 | |
| 8975 | #define WMI_NSOFF_MAX_TARGET_IPS 2 |
| 8976 | |
| 8977 | typedef struct { |
| 8978 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */ |
| 8979 | A_UINT32 flags; /* flags */ |
| 8980 | /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */ |
| 8981 | WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */ |
| 8982 | WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */ |
| 8983 | WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */ |
| 8984 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 8985 | } WMI_NS_OFFLOAD_TUPLE; |
| 8986 | |
| 8987 | typedef struct { |
| 8988 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */ |
| 8989 | A_UINT32 flags; |
| 8990 | A_UINT32 vdev_id; |
| 8991 | A_UINT32 num_ns_ext_tuples; |
| 8992 | /* Following this structure are the TLVs: |
| 8993 | * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS]; |
| 8994 | * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS]; |
| 8995 | * size of ns_ext_tuples is based on num_ns_ext_tuples |
| 8996 | * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; |
| 8997 | */ |
| 8998 | } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param; |
| 8999 | |
| 9000 | typedef struct { |
| 9001 | A_UINT32 tlv_header; |
| 9002 | A_UINT32 vdev_id; |
| 9003 | A_UINT32 pattern_id; |
| 9004 | A_UINT32 timeout; |
| 9005 | A_UINT32 length; |
| 9006 | /* Following this would be the pattern |
| 9007 | A_UINT8 pattern[] of length specifed by length |
| 9008 | field in the structure. */ |
| 9009 | } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 9010 | |
| 9011 | typedef struct { |
| 9012 | A_UINT32 tlv_header; |
| 9013 | A_UINT32 vdev_id; |
| 9014 | A_UINT32 pattern_id; |
| 9015 | } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 9016 | |
| 9017 | typedef struct { |
| 9018 | A_UINT32 tlv_header; |
| 9019 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */ |
| 9020 | /** unique id identifying the VDEV, generated by the caller */ |
| 9021 | A_UINT32 vdev_id; |
| 9022 | /** peer MAC address */ |
| 9023 | wmi_mac_addr peer_macaddr; |
| 9024 | /** Tid number */ |
| 9025 | A_UINT32 tid; |
| 9026 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 9027 | A_UINT32 initiator; |
| 9028 | /** size of the negotiated window */ |
| 9029 | A_UINT32 window_size; |
| 9030 | /** starting sequence number (only valid for initiator) */ |
| 9031 | A_UINT32 ssn; |
| 9032 | /** timeout field represents the time to wait for Block Ack in |
| 9033 | * initiator case and the time to wait for BAR in responder |
| 9034 | * case. 0 represents no timeout. */ |
| 9035 | A_UINT32 timeout; |
| 9036 | /* BA policy: immediate ACK (0) or delayed ACK (1) */ |
| 9037 | A_UINT32 policy; |
| 9038 | } wmi_peer_tid_addba_cmd_fixed_param; |
| 9039 | |
| 9040 | typedef struct { |
| 9041 | A_UINT32 tlv_header; |
| 9042 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */ |
| 9043 | /** unique id identifying the VDEV, generated by the caller */ |
| 9044 | A_UINT32 vdev_id; |
| 9045 | /** peer MAC address */ |
| 9046 | wmi_mac_addr peer_macaddr; |
| 9047 | /** Tid number */ |
| 9048 | A_UINT32 tid; |
| 9049 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 9050 | A_UINT32 initiator; |
| 9051 | } wmi_peer_tid_delba_cmd_fixed_param; |
| 9052 | |
| 9053 | typedef struct { |
| 9054 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */ |
| 9055 | /** unique id identifying the VDEV, generated by the caller */ |
| 9056 | A_UINT32 vdev_id; |
| 9057 | /** peer MAC address */ |
| 9058 | wmi_mac_addr peer_macaddr; |
| 9059 | /** Tid number */ |
| 9060 | A_UINT32 tid; |
| 9061 | /** Event status */ |
| 9062 | A_UINT32 status; |
| 9063 | } wmi_tx_addba_complete_event_fixed_param; |
| 9064 | |
| 9065 | typedef struct { |
| 9066 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */ |
| 9067 | /** unique id identifying the VDEV, generated by the caller */ |
| 9068 | A_UINT32 vdev_id; |
| 9069 | /** peer MAC address */ |
| 9070 | wmi_mac_addr peer_macaddr; |
| 9071 | /** Tid number */ |
| 9072 | A_UINT32 tid; |
| 9073 | /** Event status */ |
| 9074 | A_UINT32 status; |
| 9075 | } wmi_tx_delba_complete_event_fixed_param; |
| 9076 | /* |
| 9077 | * Structure to request sequence numbers for a given |
| 9078 | * peer station on different TIDs. The TIDs are |
| 9079 | * indicated in the tidBitMap, tid 0 would |
| 9080 | * be represented by LSB bit 0. tid 1 would be |
| 9081 | * represented by LSB bit 1 etc. |
| 9082 | * The target will retrieve the current sequence |
| 9083 | * numbers for the peer on all the TIDs requested |
| 9084 | * and send back a response in a WMI event. |
| 9085 | */ |
| 9086 | typedef struct { |
| 9087 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9088 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9089 | wmi_mac_addr peer_macaddr; |
| 9090 | A_UINT32 tidBitmap; |
| 9091 | } wmi_ba_req_ssn; |
| 9092 | |
| 9093 | typedef struct { |
| 9094 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9095 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9096 | /** unique id identifying the VDEV, generated by the caller */ |
| 9097 | A_UINT32 vdev_id; |
| 9098 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 9099 | A_UINT32 num_ba_req_ssn; |
| 9100 | /* Following this struc are the TLV's: |
| 9101 | * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 9102 | */ |
| 9103 | } wmi_ba_req_ssn_cmd_fixed_param; |
| 9104 | |
| 9105 | /* |
| 9106 | * Max transmit categories |
| 9107 | * |
| 9108 | * Note: In future if we need to increase WMI_MAX_TC definition |
| 9109 | * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID. |
| 9110 | */ |
| 9111 | #define WMI_MAX_TC 8 |
| 9112 | |
| 9113 | /* |
| 9114 | * Structure to send response sequence numbers |
| 9115 | * for a give peer and tidmap. |
| 9116 | */ |
| 9117 | typedef struct { |
| 9118 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9119 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9120 | wmi_mac_addr peer_macaddr; |
| 9121 | /* A bool to indicate if ssn is present */ |
| 9122 | A_UINT32 ssn_present_for_tid[WMI_MAX_TC]; |
| 9123 | /* The ssn from target, valid only if |
| 9124 | * ssn_present_for_tid[tidn] equals 1 |
| 9125 | */ |
| 9126 | A_UINT32 ssn_for_tid[WMI_MAX_TC]; |
| 9127 | } wmi_ba_event_ssn; |
| 9128 | |
| 9129 | typedef struct { |
| 9130 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9131 | WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9132 | /** unique id identifying the VDEV, generated by the caller */ |
| 9133 | A_UINT32 vdev_id; |
| 9134 | /** Event status, success or failure of the overall operation */ |
| 9135 | A_UINT32 status; |
| 9136 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 9137 | A_UINT32 num_ba_event_ssn; |
| 9138 | /* Following this struc are the TLV's: |
| 9139 | * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 9140 | */ |
| 9141 | } wmi_ba_rsp_ssn_event_fixed_param; |
| 9142 | |
| 9143 | enum wmi_aggr_state_req_type { |
| 9144 | WMI_DISABLE_AGGREGATION, |
| 9145 | WMI_ENABLE_AGGREGATION |
| 9146 | }; |
| 9147 | |
| 9148 | /* |
| 9149 | * This event is generated by the COEX module |
| 9150 | * when esco call is begins the coex module in fw genrated this event to host to |
| 9151 | * disable the RX aggregation and after completion of the esco call fw will indicate to |
| 9152 | * enable back the Rx aggregation . |
| 9153 | */ |
| 9154 | |
| 9155 | typedef struct { |
| 9156 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */ |
| 9157 | /** unique id identifying the VDEV, generated by the caller */ |
| 9158 | A_UINT32 vdev_id; |
| 9159 | /** req_type contains values from enum |
| 9160 | * wmi_aggr_state_req_type; 0 (disable) 1(enable) */ |
| 9161 | A_UINT32 req_type; |
| 9162 | } wmi_aggr_state_trig_event_fixed_param; |
| 9163 | |
| 9164 | typedef struct { |
| 9165 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */ |
| 9166 | /** unique id identifying the VDEV, generated by the caller */ |
| 9167 | A_UINT32 vdev_id; |
| 9168 | /** MAC address used for installing */ |
| 9169 | wmi_mac_addr peer_macaddr; |
| 9170 | /** key index */ |
| 9171 | A_UINT32 key_ix; |
| 9172 | /** key flags */ |
| 9173 | A_UINT32 key_flags; |
| 9174 | /** Event status */ |
| 9175 | A_UINT32 status; |
| 9176 | } wmi_vdev_install_key_complete_event_fixed_param; |
| 9177 | |
| 9178 | typedef enum _WMI_NLO_AUTH_ALGORITHM { |
| 9179 | WMI_NLO_AUTH_ALGO_80211_OPEN = 1, |
| 9180 | WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2, |
| 9181 | WMI_NLO_AUTH_ALGO_WPA = 3, |
| 9182 | WMI_NLO_AUTH_ALGO_WPA_PSK = 4, |
| 9183 | WMI_NLO_AUTH_ALGO_WPA_NONE = 5, |
| 9184 | WMI_NLO_AUTH_ALGO_RSNA = 6, |
| 9185 | WMI_NLO_AUTH_ALGO_RSNA_PSK = 7, |
| 9186 | } WMI_NLO_AUTH_ALGORITHM; |
| 9187 | |
| 9188 | typedef enum _WMI_NLO_CIPHER_ALGORITHM { |
| 9189 | WMI_NLO_CIPHER_ALGO_NONE = 0x00, |
| 9190 | WMI_NLO_CIPHER_ALGO_WEP40 = 0x01, |
| 9191 | WMI_NLO_CIPHER_ALGO_TKIP = 0x02, |
| 9192 | WMI_NLO_CIPHER_ALGO_CCMP = 0x04, |
| 9193 | WMI_NLO_CIPHER_ALGO_WEP104 = 0x05, |
| 9194 | WMI_NLO_CIPHER_ALGO_BIP = 0x06, |
| 9195 | WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100, |
| 9196 | WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100, |
| 9197 | WMI_NLO_CIPHER_ALGO_WEP = 0x101, |
| 9198 | } WMI_NLO_CIPHER_ALGORITHM; |
| 9199 | |
| 9200 | /* SSID broadcast type passed in NLO params */ |
| 9201 | typedef enum _WMI_NLO_SSID_BcastNwType { |
| 9202 | WMI_NLO_BCAST_UNKNOWN = 0, |
| 9203 | WMI_NLO_BCAST_NORMAL = 1, |
| 9204 | WMI_NLO_BCAST_HIDDEN = 2, |
| 9205 | } WMI_NLO_SSID_BcastNwType; |
| 9206 | |
| 9207 | #define WMI_NLO_MAX_SSIDS 16 |
| 9208 | #define WMI_NLO_MAX_CHAN 48 |
| 9209 | |
| 9210 | #define WMI_NLO_CONFIG_STOP (0x1 << 0) |
| 9211 | #define WMI_NLO_CONFIG_START (0x1 << 1) |
| 9212 | #define WMI_NLO_CONFIG_RESET (0x1 << 2) |
| 9213 | #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4) |
| 9214 | #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5) |
| 9215 | #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6) |
| 9216 | /* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only |
| 9217 | * one of them can be enabled at a given time */ |
| 9218 | #define WMI_NLO_CONFIG_ENLO (0x1 << 7) |
| 9219 | #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8) |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9220 | #define WMI_NLO_CONFIG_ENLO_RESET (0x1 << 9) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9221 | |
| 9222 | /* Whether directed scan needs to be performed (for hidden SSIDs) */ |
| 9223 | #define WMI_ENLO_FLAG_DIRECTED_SCAN 1 |
| 9224 | /* Whether PNO event shall be triggered if the network is found on A band */ |
| 9225 | #define WMI_ENLO_FLAG_A_BAND 2 |
| 9226 | /* Whether PNO event shall be triggered if the network is found on G band */ |
| 9227 | #define WMI_ENLO_FLAG_G_BAND 4 |
| 9228 | /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */ |
| 9229 | #define WMI_ENLO_FLAG_STRICT_MATCH 8 |
| 9230 | /* Code for matching the beacon AUTH IE - additional codes TBD open */ |
| 9231 | #define WMI_ENLO_AUTH_CODE_OPEN 1 |
| 9232 | /* WPA_PSK or WPA2PSK */ |
| 9233 | #define WMI_ENLO_AUTH_CODE_PSK 2 |
| 9234 | /* any EAPOL */ |
| 9235 | #define WMI_ENLO_AUTH_CODE_EAPOL 4 |
| 9236 | |
| 9237 | /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */ |
| 9238 | typedef struct wmi_nlo_ssid_param { |
| 9239 | A_UINT32 valid; |
| 9240 | wmi_ssid ssid; |
| 9241 | } wmi_nlo_ssid_param; |
| 9242 | |
| 9243 | /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */ |
| 9244 | typedef struct wmi_nlo_enc_param { |
| 9245 | A_UINT32 valid; |
| 9246 | A_UINT32 enc_type; |
| 9247 | } wmi_nlo_enc_param; |
| 9248 | |
| 9249 | /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */ |
| 9250 | typedef struct wmi_nlo_auth_param { |
| 9251 | A_UINT32 valid; |
| 9252 | A_UINT32 auth_type; |
| 9253 | } wmi_nlo_auth_param; |
| 9254 | |
| 9255 | /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */ |
| 9256 | typedef struct wmi_nlo_bcast_nw_param { |
| 9257 | A_UINT32 valid; |
| 9258 | /** |
| 9259 | * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value |
| 9260 | * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used |
| 9261 | * as a bit flag contains WMI_ENLO_FLAG_XXX |
| 9262 | */ |
| 9263 | A_UINT32 bcast_nw_type; |
| 9264 | } wmi_nlo_bcast_nw_param; |
| 9265 | |
| 9266 | /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */ |
| 9267 | typedef struct wmi_nlo_rssi_param { |
| 9268 | A_UINT32 valid; |
| 9269 | A_INT32 rssi; |
| 9270 | } wmi_nlo_rssi_param; |
| 9271 | |
| 9272 | typedef struct nlo_configured_parameters { |
| 9273 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */ |
| 9274 | wmi_nlo_ssid_param ssid; |
| 9275 | wmi_nlo_enc_param enc_type; |
| 9276 | wmi_nlo_auth_param auth_type; |
| 9277 | wmi_nlo_rssi_param rssi_cond; |
| 9278 | wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */ |
| 9279 | } nlo_configured_parameters; |
| 9280 | |
| 9281 | /* Support channel prediction for PNO scan after scanning top_k_num channels |
| 9282 | * if stationary_threshold is met. |
| 9283 | */ |
| 9284 | typedef struct nlo_channel_prediction_cfg { |
| 9285 | A_UINT32 tlv_header; |
| 9286 | /* Enable or disable this feature. */ |
| 9287 | A_UINT32 enable; |
| 9288 | /* Top K channels will be scanned before deciding whether to further |
| 9289 | * scan or stop. Minimum value is 3 and maximum is 5. */ |
| 9290 | A_UINT32 top_k_num; |
| 9291 | /* Preconfigured stationary threshold. Lesser value means more |
| 9292 | * conservative. Bigger value means more aggressive. |
| 9293 | * Maximum is 100 and mininum is 0. */ |
| 9294 | A_UINT32 stationary_threshold; |
| 9295 | /* Periodic full channel scan in milliseconds unit. |
| 9296 | * After full_scan_period_ms since last full scan, channel prediction |
| 9297 | * scan is suppressed and will do full scan. |
| 9298 | * This is to help detecting sudden AP power-on or -off. |
| 9299 | * Value 0 means no full scan at all (not recommended). |
| 9300 | */ |
| 9301 | A_UINT32 full_scan_period_ms; |
| 9302 | } nlo_channel_prediction_cfg; |
| 9303 | |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9304 | typedef struct enlo_candidate_score_params_t { |
| 9305 | /* |
| 9306 | * TLV tag and len; |
| 9307 | * tag equals WMITLV_TAG_STRUC_wmi_enlo_candidate_score_param |
| 9308 | */ |
| 9309 | A_UINT32 tlv_header; |
| 9310 | /* minimum 5GHz RSSI for a BSSID to be considered (units = dBm) */ |
| 9311 | A_INT32 min5GHz_rssi; |
| 9312 | /* minimum 2.4GHz RSSI for a BSSID to be considered (units = dBm) */ |
| 9313 | A_INT32 min24GHz_rssi; |
| 9314 | /* the maximum score that a network can have before bonuses */ |
| 9315 | A_UINT32 initial_score_max; |
| 9316 | /* current_connection_bonus: |
| 9317 | * only report when there is a network's score this much higher |
| 9318 | * than the current connection |
| 9319 | */ |
| 9320 | A_UINT32 current_connection_bonus; |
| 9321 | /* score bonus for all networks with the same network flag */ |
| 9322 | A_UINT32 same_network_bonus; |
| 9323 | /* score bonus for networks that are not open */ |
| 9324 | A_UINT32 secure_bonus; |
| 9325 | /* 5GHz RSSI score bonus (applied to all 5GHz networks) */ |
| 9326 | A_UINT32 band5GHz_bonus; |
| 9327 | } enlo_candidate_score_params; |
| 9328 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9329 | typedef struct wmi_nlo_config { |
| 9330 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */ |
| 9331 | A_UINT32 flags; |
| 9332 | A_UINT32 vdev_id; |
| 9333 | A_UINT32 fast_scan_max_cycles; |
| 9334 | A_UINT32 active_dwell_time; |
| 9335 | A_UINT32 passive_dwell_time; /* PDT in msecs */ |
| 9336 | A_UINT32 probe_bundle_size; |
| 9337 | A_UINT32 rest_time; /* ART = IRT */ |
| 9338 | A_UINT32 max_rest_time; /* Max value that can be reached after SBM */ |
| 9339 | A_UINT32 scan_backoff_multiplier; /* SBM */ |
| 9340 | A_UINT32 fast_scan_period; /* SCBM */ |
| 9341 | A_UINT32 slow_scan_period; /* specific to windows */ |
| 9342 | A_UINT32 no_of_ssids; |
| 9343 | A_UINT32 num_of_channels; |
| 9344 | A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */ |
| 9345 | /* The TLVs will follow. |
| 9346 | * nlo_configured_parameters nlo_list[]; |
| 9347 | * A_UINT32 channel_list[]; |
| 9348 | * nlo_channel_prediction_cfg ch_prediction_cfg; |
Govind Singh | 42f7154 | 2016-03-14 16:32:33 +0530 | [diff] [blame] | 9349 | * enlo_candidate_score_params candidate_score_params; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9350 | */ |
| 9351 | |
| 9352 | } wmi_nlo_config_cmd_fixed_param; |
| 9353 | |
| 9354 | typedef struct wmi_nlo_event { |
| 9355 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */ |
| 9356 | A_UINT32 vdev_id; |
| 9357 | } wmi_nlo_event; |
| 9358 | |
| 9359 | /* WMI_PASSPOINT_CONFIG_SET |
| 9360 | * Sets a list for passpoint networks for PNO purposes; |
| 9361 | * it should be matched against any passpoint networks found |
| 9362 | * during regular PNO scan. |
| 9363 | */ |
| 9364 | #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0) |
| 9365 | /* WMI_PASSPOINT_CONFIG_RESET |
| 9366 | * Reset passpoint network list - |
| 9367 | * no Passpoint networks should be matched after this. |
| 9368 | */ |
| 9369 | #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1) |
| 9370 | #define PASSPOINT_REALM_LEN 256 |
| 9371 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5 |
| 9372 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 |
| 9373 | #define PASSPOINT_PLMN_ID_LEN 3 |
| 9374 | #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \ |
| 9375 | (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2) |
| 9376 | |
| 9377 | /* |
| 9378 | * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the |
| 9379 | * A_UINT8 realm[PASSPOINT_REALM_LEN] |
| 9380 | * array will end on a 4-byte boundary. |
| 9381 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 9382 | */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 9383 | 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] | 9384 | |
| 9385 | /* |
| 9386 | * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and |
| 9387 | * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the |
| 9388 | * roaming_consortium_ids array below will end on a 4-byte boundary. |
| 9389 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 9390 | */ |
| 9391 | A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size, |
| 9392 | ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0); |
| 9393 | |
| 9394 | /* wildcard ID to allow an action (reset) to apply to all networks */ |
| 9395 | #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF |
| 9396 | typedef struct wmi_passpoint_config { |
| 9397 | /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */ |
| 9398 | A_UINT32 tlv_header; |
| 9399 | /* (network) id |
| 9400 | * identifier of the matched network, report this in event |
| 9401 | * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD) |
| 9402 | * that indicates the action should be applied to all networks. |
| 9403 | * Currently, the only action that is applied to all networks is "reset". |
| 9404 | * If a non-wildcard ID is specified, that particular network is configured. |
| 9405 | * If a wildcard ID is specified, all networks are reset. |
| 9406 | */ |
| 9407 | A_UINT32 id; |
| 9408 | A_UINT32 req_id; |
| 9409 | /*null terminated UTF8 encoded realm, 0 if unspecified*/ |
| 9410 | A_UINT8 realm[PASSPOINT_REALM_LEN]; |
| 9411 | /*roaming consortium ids to match, 0s if unspecified*/ |
| 9412 | A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; |
| 9413 | /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/ |
| 9414 | /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */ |
| 9415 | A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; |
| 9416 | } wmi_passpoint_config_cmd_fixed_param; |
| 9417 | |
| 9418 | typedef struct { |
| 9419 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 9420 | wmi_passpoint_event_hdr */ |
| 9421 | A_UINT32 id; /* identifier of the matched network */ |
| 9422 | A_UINT32 vdev_id; |
| 9423 | A_UINT32 timestamp; /* time since boot (in microsecond) when the |
| 9424 | result was retrieved*/ |
| 9425 | wmi_ssid ssid; |
| 9426 | wmi_mac_addr bssid; /* bssid of the network */ |
| 9427 | A_UINT32 channel_mhz; /* channel frequency in MHz */ |
| 9428 | A_UINT32 rssi; /* rssi value */ |
| 9429 | A_UINT32 rtt; /* timestamp in nanoseconds*/ |
| 9430 | A_UINT32 rtt_sd; /* standard deviation in rtt */ |
| 9431 | A_UINT32 beacon_period; /* beacon advertised in the beacon */ |
| 9432 | A_UINT32 capability; /* capabilities advertised in the beacon */ |
| 9433 | A_UINT32 ie_length; /* size of the ie_data blob */ |
| 9434 | A_UINT32 anqp_length; /* length of ANQP blob */ |
| 9435 | /** |
| 9436 | * Following this structure is the byte stream of ie data of length ie_buf_len: |
| 9437 | * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon |
| 9438 | * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE |
| 9439 | * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes |
| 9440 | * stream of each ie should be same as BEACON/Action-frm by 802.11 spec |
| 9441 | */ |
| 9442 | } wmi_passpoint_event_hdr; |
| 9443 | |
| 9444 | #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000 |
| 9445 | /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */ |
| 9446 | #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000 |
| 9447 | /** Disable GTK offload */ |
| 9448 | #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000 |
| 9449 | /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */ |
| 9450 | #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000 |
| 9451 | enum wmi_chatter_mode { |
| 9452 | /* Chatter enter/exit happens |
| 9453 | * automatically based on preset |
| 9454 | * params |
| 9455 | */ |
| 9456 | WMI_CHATTER_MODE_AUTO, |
| 9457 | /* Chatter enter is triggered |
| 9458 | * manually by the user |
| 9459 | */ |
| 9460 | WMI_CHATTER_MODE_MANUAL_ENTER, |
| 9461 | /* Chatter exit is triggered |
| 9462 | * manually by the user |
| 9463 | */ |
| 9464 | WMI_CHATTER_MODE_MANUAL_EXIT, |
| 9465 | /* Placeholder max value, always last */ |
| 9466 | WMI_CHATTER_MODE_MAX |
| 9467 | }; |
| 9468 | |
| 9469 | enum wmi_chatter_query_type { |
| 9470 | /*query coalescing filter match counter */ |
| 9471 | WMI_CHATTER_QUERY_FILTER_MATCH_CNT, |
| 9472 | WMI_CHATTER_QUERY_MAX |
| 9473 | }; |
| 9474 | |
| 9475 | typedef struct { |
| 9476 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */ |
| 9477 | A_UINT32 chatter_mode; |
| 9478 | } wmi_chatter_set_mode_cmd_fixed_param; |
| 9479 | |
| 9480 | /** maximum number of filter supported*/ |
| 9481 | #define CHATTER_MAX_COALESCING_RULES 11 |
| 9482 | /** maximum number of field tests per filter*/ |
| 9483 | #define CHATTER_MAX_FIELD_TEST 5 |
| 9484 | /** maximum field length in number of DWORDS*/ |
| 9485 | #define CHATTER_MAX_TEST_FIELD_LEN32 2 |
| 9486 | |
| 9487 | /** field test kinds*/ |
| 9488 | #define CHATTER_COALESCING_TEST_EQUAL 1 |
| 9489 | #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2 |
| 9490 | #define CHATTER_COALESCING_TEST_NOT_EQUAL 3 |
| 9491 | |
| 9492 | /** packet type*/ |
| 9493 | #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0) |
| 9494 | #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1) |
| 9495 | #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2) |
| 9496 | |
| 9497 | /** coalescing field test*/ |
| 9498 | typedef struct _chatter_pkt_coalescing_hdr_test { |
| 9499 | /** offset from start of mac header, for windows native wifi host driver |
| 9500 | * should assume standard 802.11 frame format without QoS info and address4 |
| 9501 | * FW would account for any non-stand fields for final offset value. |
| 9502 | */ |
| 9503 | A_UINT32 offset; |
| 9504 | A_UINT32 length; /* length of test field */ |
| 9505 | A_UINT32 test; /*equal, not equal or masked equal */ |
| 9506 | A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */ |
| 9507 | A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */ |
| 9508 | } chatter_pkt_coalescing_hdr_test; |
| 9509 | |
| 9510 | /** packet coalescing filter*/ |
| 9511 | typedef struct _chatter_pkt_coalescing_filter { |
| 9512 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */ |
| 9513 | A_UINT32 filter_id; /*unique id assigned by OS */ |
| 9514 | A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */ |
| 9515 | A_UINT32 pkt_type; /*unicast/multicast/broadcast */ |
| 9516 | A_UINT32 num_of_test_field; /*number of field test in table */ |
| 9517 | chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */ |
| 9518 | } chatter_pkt_coalescing_filter; |
| 9519 | |
| 9520 | /** packet coalescing filter add command*/ |
| 9521 | typedef struct { |
| 9522 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */ |
| 9523 | A_UINT32 num_of_filters; |
| 9524 | /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter |
| 9525 | chatter_pkt_coalescing_filter rx_filter[1]; */ |
| 9526 | } wmi_chatter_coalescing_add_filter_cmd_fixed_param; |
| 9527 | /** packet coalescing filter delete command*/ |
| 9528 | typedef struct { |
| 9529 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */ |
| 9530 | A_UINT32 filter_id; /*filter id which will be deleted */ |
| 9531 | } wmi_chatter_coalescing_delete_filter_cmd_fixed_param; |
| 9532 | /** packet coalescing query command*/ |
| 9533 | typedef struct { |
| 9534 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */ |
| 9535 | A_UINT32 type; /*type of query */ |
| 9536 | } wmi_chatter_coalescing_query_cmd_fixed_param; |
| 9537 | /** chatter query reply event*/ |
| 9538 | typedef struct { |
| 9539 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */ |
| 9540 | A_UINT32 type; /*query type */ |
| 9541 | A_UINT32 filter_match_cnt; /*coalescing filter match counter */ |
| 9542 | } wmi_chatter_query_reply_event_fixed_param; |
| 9543 | |
| 9544 | /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES |
| 9545 | * cannot be changed without breaking WMI compatibility. */ |
| 9546 | #define GTK_OFFLOAD_KEK_BYTES 16 |
| 9547 | #define GTK_OFFLOAD_KCK_BYTES 16 |
| 9548 | /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */ |
| 9549 | #define GTK_REPLAY_COUNTER_BYTES 8 |
| 9550 | #define WMI_MAX_KEY_LEN 32 |
| 9551 | #define IGTK_PN_SIZE 6 |
| 9552 | |
| 9553 | typedef struct { |
| 9554 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */ |
| 9555 | A_UINT32 vdev_id; |
| 9556 | /** unique id identifying the VDEV */ |
| 9557 | A_UINT32 flags; /* status flags */ |
| 9558 | A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */ |
| 9559 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */ |
| 9560 | A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */ |
| 9561 | A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */ |
| 9562 | A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */ |
| 9563 | A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */ |
| 9564 | } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param; |
| 9565 | |
| 9566 | typedef struct { |
| 9567 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */ |
| 9568 | A_UINT32 vdev_id; /** unique id identifying the VDEV */ |
| 9569 | A_UINT32 flags; /* control flags, GTK offload command use high byte */ |
| 9570 | /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */ |
| 9571 | A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */ |
| 9572 | A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */ |
| 9573 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */ |
| 9574 | } WMI_GTK_OFFLOAD_CMD_fixed_param; |
| 9575 | |
| 9576 | typedef struct { |
| 9577 | /* TLV tag and len; tag equals |
| 9578 | * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param |
| 9579 | */ |
| 9580 | A_UINT32 tlv_header; |
| 9581 | A_UINT32 vdev_id; |
| 9582 | A_UINT32 sa_query_retry_interval; /* in msec */ |
| 9583 | A_UINT32 sa_query_max_retry_count; |
| 9584 | } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param; |
| 9585 | |
| 9586 | typedef enum { |
| 9587 | WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */ |
| 9588 | WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */ |
| 9589 | WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */ |
| 9590 | /* gratuitous ARP req*/ |
| 9591 | WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, |
| 9592 | } WMI_STA_KEEPALIVE_METHOD; |
| 9593 | |
| 9594 | typedef struct { |
| 9595 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */ |
| 9596 | WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */ |
| 9597 | WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */ |
| 9598 | wmi_mac_addr dest_mac_addr; /* destination MAC address */ |
| 9599 | } WMI_STA_KEEPALVE_ARP_RESPONSE; |
| 9600 | |
| 9601 | typedef struct { |
| 9602 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */ |
| 9603 | A_UINT32 vdev_id; |
| 9604 | A_UINT32 enable; /* 1 - Enable, 0 - disable */ |
| 9605 | A_UINT32 method; /* keep alive method */ |
| 9606 | A_UINT32 interval; /* time interval in seconds */ |
| 9607 | /* |
| 9608 | * NOTE: following this structure is the TLV for ARP Resonse: |
| 9609 | * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response |
| 9610 | */ |
| 9611 | } WMI_STA_KEEPALIVE_CMD_fixed_param; |
| 9612 | |
| 9613 | typedef struct { |
| 9614 | A_UINT32 tlv_header; |
| 9615 | A_UINT32 vdev_id; |
| 9616 | A_UINT32 action; |
| 9617 | } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param; |
| 9618 | typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD; |
| 9619 | |
| 9620 | typedef struct { |
| 9621 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */ |
| 9622 | A_UINT32 vdev_id; |
| 9623 | A_UINT32 keepaliveInterval; /* seconds */ |
| 9624 | A_UINT32 keepaliveMethod; |
| 9625 | } wmi_vdev_set_keepalive_cmd_fixed_param; |
| 9626 | |
| 9627 | typedef struct { |
| 9628 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */ |
| 9629 | A_UINT32 vdev_id; |
| 9630 | } wmi_vdev_get_keepalive_cmd_fixed_param; |
| 9631 | |
| 9632 | typedef struct { |
| 9633 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */ |
| 9634 | A_UINT32 vdev_id; |
| 9635 | A_UINT32 keepaliveInterval; /* seconds */ |
| 9636 | A_UINT32 keepaliveMethod; /* seconds */ |
| 9637 | } wmi_vdev_get_keepalive_event_fixed_param; |
| 9638 | |
| 9639 | #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0 |
| 9640 | #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1 |
| 9641 | |
| 9642 | typedef struct { |
| 9643 | A_UINT32 tlv_header; |
| 9644 | A_UINT32 vdev_id; |
| 9645 | A_UINT32 action; |
| 9646 | } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param; |
| 9647 | |
| 9648 | typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param |
| 9649 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD; |
| 9650 | |
| 9651 | typedef struct { |
| 9652 | A_UINT32 tlv_header; |
| 9653 | A_UINT32 vdev_id; |
| 9654 | A_UINT32 mcc_tbttmode; |
| 9655 | wmi_mac_addr mcc_bssid; |
| 9656 | } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param; |
| 9657 | |
| 9658 | typedef struct { |
| 9659 | A_UINT32 tlv_header; |
| 9660 | A_UINT32 vdev_id; /* home vdev id */ |
| 9661 | A_UINT32 meas_token; /* from measure request frame */ |
| 9662 | A_UINT32 dialog_token; |
| 9663 | A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */ |
| 9664 | A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */ |
| 9665 | A_UINT32 burst_cycle; /* times cycle through within one burst */ |
| 9666 | A_UINT32 tx_power; /* for path frame */ |
| 9667 | A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */ |
| 9668 | wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */ |
| 9669 | A_UINT32 num_chans; |
| 9670 | } wmi_vdev_plmreq_start_cmd_fixed_param; |
| 9671 | |
| 9672 | typedef struct { |
| 9673 | A_UINT32 tlv_header; |
| 9674 | A_UINT32 vdev_id; |
| 9675 | A_UINT32 meas_token; /* same value from req */ |
| 9676 | } wmi_vdev_plmreq_stop_cmd_fixed_param; |
| 9677 | |
| 9678 | typedef struct { |
| 9679 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */ |
| 9680 | A_UINT32 tlv_header; |
| 9681 | /* unique id identifying the VDEV, generated by the caller */ |
| 9682 | A_UINT32 vdev_id; |
| 9683 | /* enable/disable NoA */ |
| 9684 | A_UINT32 enable; |
| 9685 | /** number of NoA desc. In the TLV noa_descriptor[] */ |
| 9686 | A_UINT32 num_noa; |
| 9687 | /** |
| 9688 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 9689 | * TLV contain NoA desc with num of num_noa |
| 9690 | */ |
| 9691 | } wmi_p2p_set_noa_cmd_fixed_param; |
| 9692 | |
| 9693 | typedef struct { |
| 9694 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */ |
| 9695 | A_UINT32 tlv_header; |
| 9696 | /* unique id identifying the VDEV, generated by the caller */ |
| 9697 | A_UINT32 vdev_id; |
| 9698 | /* Identify the wlan module */ |
| 9699 | A_UINT32 module_id; |
| 9700 | /* Num of test arguments passed */ |
| 9701 | A_UINT32 num_args; |
| 9702 | /** |
| 9703 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 9704 | * structure. The TLV's are: |
| 9705 | * A_UINT32 args[]; |
| 9706 | **/ |
| 9707 | } wmi_unit_test_cmd_fixed_param; |
| 9708 | |
| 9709 | /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic |
| 9710 | * after it received WMI_ROAM_SYNCH_EVENTID. |
| 9711 | */ |
| 9712 | typedef struct { |
| 9713 | A_UINT32 tlv_header; |
| 9714 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */ |
| 9715 | /** unique id identifying the VDEV, generated by the caller */ |
| 9716 | A_UINT32 vdev_id; |
| 9717 | } wmi_roam_synch_complete_fixed_param; |
| 9718 | |
| 9719 | typedef enum { |
| 9720 | RECOVERY_SIM_ASSERT = 0x01, |
| 9721 | RECOVERY_SIM_NO_DETECT = 0x02, |
| 9722 | RECOVERY_SIM_CTR_EP_FULL = 0x03, |
| 9723 | RECOVERY_SIM_EMPTY_POINT = 0x04, |
| 9724 | RECOVERY_SIM_STACK_OV = 0x05, |
| 9725 | RECOVERY_SIM_INFINITE_LOOP = 0x06, |
| 9726 | RECOVERY_SIM_PCIE_LINKDOWN = 0x07, |
| 9727 | RECOVERY_SIM_SELF_RECOVERY = 0x08, |
| 9728 | } RECOVERY_SIM_TYPE; |
| 9729 | |
| 9730 | /* WMI_FORCE_FW_HANG_CMDID */ |
| 9731 | typedef struct { |
| 9732 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */ |
| 9733 | A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */ |
| 9734 | A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */ |
| 9735 | } WMI_FORCE_FW_HANG_CMD_fixed_param; |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 9736 | |
| 9737 | typedef enum { |
| 9738 | WMI_MCAST_FILTER_SET = 1, |
| 9739 | WMI_MCAST_FILTER_DELETE |
| 9740 | } WMI_SET_SINGLE_MCAST_FILTER_OP; |
| 9741 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9742 | typedef struct { |
| 9743 | A_UINT32 tlv_header; |
| 9744 | A_UINT32 vdev_id; |
| 9745 | A_UINT32 index; |
| 9746 | A_UINT32 action; |
| 9747 | wmi_mac_addr mcastbdcastaddr; |
| 9748 | } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param; |
| 9749 | |
Krishna Kumaar Natarajan | 2f7a44d | 2016-07-08 11:24:06 -0700 | [diff] [blame] | 9750 | typedef enum { |
| 9751 | WMI_MULTIPLE_MCAST_FILTER_CLEAR = 1, /* clear all previous mc list */ |
| 9752 | /* clear all previous mc list, and set new list */ |
| 9753 | WMI_MULTIPLE_MCAST_FILTER_SET, |
| 9754 | WMI_MULTIPLE_MCAST_FILTER_DELETE, /* delete one/multiple mc list */ |
| 9755 | WMI_MULTIPLE_MCAST_FILTER_ADD /* add one/multiple mc list */ |
| 9756 | } WMI_MULTIPLE_MCAST_FILTER_OP; |
| 9757 | |
| 9758 | typedef struct { |
| 9759 | A_UINT32 tlv_header; |
| 9760 | A_UINT32 vdev_id; |
| 9761 | A_UINT32 operation; /* refer WMI_MULTIPLE_MCAST_FILTER_OP */ |
| 9762 | /* number of elements in the subsequent mcast addr list */ |
| 9763 | A_UINT32 num_mcastaddrs; |
| 9764 | /** |
| 9765 | * TLV (tag length value) parameters follow the |
| 9766 | * structure. The TLV's are: |
| 9767 | * wmi_mac_addr mcastaddr_list[num_mcastaddrs]; |
| 9768 | */ |
| 9769 | } WMI_SET_MULTIPLE_MCAST_FILTER_CMD_fixed_param; |
| 9770 | |
| 9771 | |
Himanshu Agarwal | b0497b5 | 2016-05-13 21:03:37 +0530 | [diff] [blame] | 9772 | /* WMI_DBGLOG_TIME_STAMP_SYNC_CMDID */ |
| 9773 | typedef enum { |
| 9774 | WMI_TIME_STAMP_SYNC_MODE_MS, /* millisecond units */ |
| 9775 | WMI_TIME_STAMP_SYNC_MODE_US, /* microsecond units */ |
| 9776 | } WMI_TIME_STAMP_SYNC_MODE; |
| 9777 | |
| 9778 | typedef struct { |
| 9779 | /* |
| 9780 | * TLV tag and len; tag equals |
| 9781 | * WMITLV_TAG_STRUC_wmi_dbglog_time_stamp_sync_cmd_fixed_param |
| 9782 | */ |
| 9783 | A_UINT32 tlv_header; |
| 9784 | /* 0: millisec, 1: microsec (see WMI_TIME_STAMP_SYNC_MODE) */ |
| 9785 | A_UINT32 mode; |
| 9786 | A_UINT32 time_stamp_low; /* lower 32 bits of remote time stamp */ |
| 9787 | A_UINT32 time_stamp_high; /* higher 32 bits of remote time stamp */ |
| 9788 | } WMI_DBGLOG_TIME_STAMP_SYNC_CMD_fixed_param; |
| 9789 | |
| 9790 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9791 | /* GPIO Command and Event data structures */ |
| 9792 | |
| 9793 | /* WMI_GPIO_CONFIG_CMDID */ |
| 9794 | enum { |
| 9795 | WMI_GPIO_PULL_NONE, |
| 9796 | WMI_GPIO_PULL_UP, |
| 9797 | WMI_GPIO_PULL_DOWN, |
| 9798 | }; |
| 9799 | |
| 9800 | enum { |
| 9801 | WMI_GPIO_INTTYPE_DISABLE, |
| 9802 | WMI_GPIO_INTTYPE_RISING_EDGE, |
| 9803 | WMI_GPIO_INTTYPE_FALLING_EDGE, |
| 9804 | WMI_GPIO_INTTYPE_BOTH_EDGE, |
| 9805 | WMI_GPIO_INTTYPE_LEVEL_LOW, |
| 9806 | WMI_GPIO_INTTYPE_LEVEL_HIGH |
| 9807 | }; |
| 9808 | |
| 9809 | typedef struct { |
| 9810 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */ |
| 9811 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 9812 | A_UINT32 input; /* 0 - Output/ 1 - Input */ |
| 9813 | A_UINT32 pull_type; /* Pull type defined above */ |
| 9814 | A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */ |
| 9815 | } wmi_gpio_config_cmd_fixed_param; |
| 9816 | |
| 9817 | /* WMI_GPIO_OUTPUT_CMDID */ |
| 9818 | typedef struct { |
| 9819 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */ |
| 9820 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 9821 | A_UINT32 set; /* Set the GPIO pin */ |
| 9822 | } wmi_gpio_output_cmd_fixed_param; |
| 9823 | |
| 9824 | /* WMI_GPIO_INPUT_EVENTID */ |
| 9825 | typedef struct { |
| 9826 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */ |
| 9827 | A_UINT32 gpio_num; /* GPIO number which changed state */ |
| 9828 | } wmi_gpio_input_event_fixed_param; |
| 9829 | |
| 9830 | /* WMI_P2P_DISC_EVENTID */ |
| 9831 | enum { |
| 9832 | P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */ |
| 9833 | P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */ |
| 9834 | }; |
| 9835 | |
| 9836 | enum { |
| 9837 | P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */ |
| 9838 | P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */ |
| 9839 | P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */ |
| 9840 | }; |
| 9841 | |
| 9842 | enum { |
| 9843 | P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */ |
| 9844 | P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */ |
| 9845 | }; |
| 9846 | |
| 9847 | typedef struct { |
| 9848 | A_UINT32 vdev_id; |
| 9849 | A_UINT32 reason; /* P2P DISC wake up reason */ |
| 9850 | } wmi_p2p_disc_event; |
| 9851 | |
| 9852 | typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param |
| 9853 | WOW_EVENT_INFO_SECTION_GTKIGTK; |
| 9854 | |
| 9855 | typedef enum { |
| 9856 | WMI_FAKE_TXBFER_SEND_NDPA, |
| 9857 | WMI_FAKE_TXBFER_SEND_MU, |
| 9858 | WMI_FAKE_TXBFER_NDPA_FBTYPE, |
| 9859 | WMI_FAKE_TXBFER_NDPA_NCIDX, |
| 9860 | WMI_FAKE_TXBFER_NDPA_POLL, |
| 9861 | WMI_FAKE_TXBFER_NDPA_BW, |
| 9862 | WMI_FAKE_TXBFER_NDPA_PREAMBLE, |
| 9863 | WMI_FAKE_TXBFER_NDPA_RATE, |
| 9864 | WMI_FAKE_TXBFER_NDP_BW, |
| 9865 | WMI_FAKE_TXBFER_NDP_NSS, |
| 9866 | WMI_TXBFEE_ENABLE_UPLOAD_H, |
| 9867 | WMI_TXBFEE_ENABLE_CAPTURE_H, |
| 9868 | WMI_TXBFEE_SET_CBF_TBL, |
| 9869 | WMI_TXBFEE_CBF_TBL_LSIG, |
| 9870 | WMI_TXBFEE_CBF_TBL_SIGA1, |
| 9871 | WMI_TXBFEE_CBF_TBL_SIGA2, |
| 9872 | WMI_TXBFEE_CBF_TBL_SIGB, |
| 9873 | WMI_TXBFEE_CBF_TBL_PAD, |
| 9874 | WMI_TXBFEE_CBF_TBL_DUR, |
| 9875 | WMI_TXBFEE_SU_NCIDX, |
| 9876 | WMI_TXBFEE_CBIDX, |
| 9877 | WMI_TXBFEE_NGIDX, |
| 9878 | } WMI_TXBF_PARAM_ID; |
| 9879 | |
| 9880 | typedef struct { |
| 9881 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */ |
| 9882 | /** parameter id */ |
| 9883 | A_UINT32 param_id; |
| 9884 | /** parameter value */ |
| 9885 | A_UINT32 param_value; |
| 9886 | } wmi_txbf_cmd_fixed_param; |
| 9887 | |
| 9888 | typedef struct { |
| 9889 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */ |
| 9890 | A_UINT32 h_length; |
| 9891 | A_UINT32 cv_length; |
| 9892 | /* This TLV is followed by array of bytes: |
| 9893 | * // h_cv info buffer |
| 9894 | * A_UINT8 bufp[]; |
| 9895 | */ |
| 9896 | } wmi_upload_h_hdr; |
| 9897 | |
| 9898 | typedef struct { |
| 9899 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */ |
| 9900 | A_UINT32 svd_num; |
| 9901 | A_UINT32 tone_num; |
| 9902 | A_UINT32 reserved; |
| 9903 | } wmi_capture_h_event_hdr; |
| 9904 | |
| 9905 | typedef struct { |
| 9906 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */ |
| 9907 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 9908 | A_UINT32 end_freq; /* end frequency */ |
| 9909 | } wmi_avoid_freq_range_desc; |
| 9910 | |
| 9911 | typedef struct { |
| 9912 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */ |
| 9913 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 9914 | A_UINT32 num_freq_ranges; |
| 9915 | |
| 9916 | /* The TLVs will follow. |
| 9917 | * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc |
| 9918 | * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated |
| 9919 | */ |
| 9920 | } wmi_avoid_freq_ranges_event_fixed_param; |
| 9921 | |
| 9922 | typedef struct { |
| 9923 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */ |
| 9924 | /** Reserved for future use */ |
| 9925 | A_UINT32 reserved0; |
| 9926 | A_UINT32 vdev_id; |
| 9927 | } wmi_gtk_rekey_fail_event_fixed_param; |
| 9928 | |
| 9929 | enum wmm_ac_downgrade_policy { |
| 9930 | WMM_AC_DOWNGRADE_DEPRIO, |
| 9931 | WMM_AC_DOWNGRADE_DROP, |
| 9932 | WMM_AC_DOWNGRADE_INVALID, |
| 9933 | }; |
| 9934 | |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 9935 | /* WMM EDCA Params type */ |
| 9936 | #define WMM_PARAM_TYPE_LEGACY 0 |
| 9937 | /* Relaxed EDCA parameters for 11ax to be used in case of triggered access */ |
| 9938 | #define WMM_PARAM_TYPE_11AX_EDCA 1 |
| 9939 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9940 | typedef struct { |
| 9941 | A_UINT32 tlv_header; |
| 9942 | A_UINT32 cwmin; |
| 9943 | A_UINT32 cwmax; |
| 9944 | A_UINT32 aifs; |
| 9945 | A_UINT32 txoplimit; |
| 9946 | A_UINT32 acm; |
| 9947 | A_UINT32 no_ack; |
| 9948 | } wmi_wmm_vparams; |
| 9949 | |
| 9950 | typedef struct { |
| 9951 | A_UINT32 tlv_header; |
| 9952 | A_UINT32 vdev_id; |
| 9953 | 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] | 9954 | A_UINT32 wmm_param_type; /* see WMM_PARAM_TYPE_xxx defs */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9955 | } wmi_vdev_set_wmm_params_cmd_fixed_param; |
| 9956 | |
| 9957 | typedef struct { |
| 9958 | A_UINT32 tlv_header; |
| 9959 | A_UINT32 vdev_id; |
| 9960 | A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */ |
| 9961 | A_UINT32 userGtxMask; /* host request for GTX mask */ |
| 9962 | A_UINT32 gtxPERThreshold; /* default: 10% */ |
| 9963 | A_UINT32 gtxPERMargin; /* default: 2% */ |
| 9964 | A_UINT32 gtxTPCstep; /* default: 1 */ |
| 9965 | A_UINT32 gtxTPCMin; /* default: 5 */ |
| 9966 | A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */ |
| 9967 | } wmi_vdev_set_gtx_params_cmd_fixed_param; |
| 9968 | |
| 9969 | typedef struct { |
| 9970 | A_UINT32 tlv_header; |
| 9971 | A_UINT32 vdev_id; |
| 9972 | A_UINT32 ac; |
| 9973 | A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */ |
| 9974 | A_UINT32 downgrade_type; |
| 9975 | } wmi_vdev_wmm_addts_cmd_fixed_param; |
| 9976 | |
| 9977 | typedef struct { |
| 9978 | A_UINT32 tlv_header; |
| 9979 | A_UINT32 vdev_id; |
| 9980 | A_UINT32 ac; |
| 9981 | } wmi_vdev_wmm_delts_cmd_fixed_param; |
| 9982 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 9983 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9984 | typedef struct { |
| 9985 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */ |
| 9986 | /** Reserved for future use */ |
| 9987 | A_UINT32 reserved0; |
| 9988 | } wmi_pdev_dfs_enable_cmd_fixed_param; |
| 9989 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 9990 | /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9991 | typedef struct { |
| 9992 | 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] | 9993 | /** pdev_id for identifying the MAC |
| 9994 | * See macros starting with WMI_PDEV_ID_ for values. |
| 9995 | */ |
| 9996 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 9997 | } wmi_pdev_dfs_disable_cmd_fixed_param; |
| 9998 | |
| 9999 | typedef struct { |
| 10000 | /** TLV tag and len; tag equals |
| 10001 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param |
| 10002 | */ |
| 10003 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10004 | /** pdev_id for identifying the MAC |
| 10005 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10006 | */ |
| 10007 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10008 | } wmi_dfs_phyerr_filter_ena_cmd_fixed_param; |
| 10009 | |
| 10010 | typedef struct { |
| 10011 | /** TLV tag and len; tag equals |
| 10012 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param |
| 10013 | */ |
| 10014 | A_UINT32 tlv_header; |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 10015 | /** pdev_id for identifying the MAC |
| 10016 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10017 | */ |
| 10018 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10019 | } wmi_dfs_phyerr_filter_dis_cmd_fixed_param; |
| 10020 | |
| 10021 | /** TDLS COMMANDS */ |
| 10022 | |
| 10023 | /* WMI_TDLS_SET_STATE_CMDID */ |
| 10024 | /* TDLS State */ |
| 10025 | enum wmi_tdls_state { |
| 10026 | /** TDLS disable */ |
| 10027 | WMI_TDLS_DISABLE, |
| 10028 | /** TDLS enabled - no firmware connection tracking/notifications */ |
| 10029 | WMI_TDLS_ENABLE_PASSIVE, |
| 10030 | /** TDLS enabled - with firmware connection tracking/notifications */ |
| 10031 | WMI_TDLS_ENABLE_ACTIVE, |
| 10032 | /* TDLS enabled - firmware waits for peer mac for connection tracking */ |
| 10033 | WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10034 | /** TDLS enabled - TDLS connection tracking is done in host */ |
| 10035 | WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10036 | }; |
| 10037 | |
| 10038 | /* TDLS Options */ |
| 10039 | #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */ |
| 10040 | #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */ |
| 10041 | #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */ |
| 10042 | |
| 10043 | typedef struct { |
| 10044 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */ |
| 10045 | A_UINT32 tlv_header; |
| 10046 | /** unique id identifying the VDEV */ |
| 10047 | A_UINT32 vdev_id; |
| 10048 | /** Enable/Disable TDLS (wmi_tdls_state) */ |
| 10049 | A_UINT32 state; |
| 10050 | /* Duration (in ms) over which to calculate tx/rx threshold |
| 10051 | * to trigger TDLS Discovery |
| 10052 | */ |
| 10053 | A_UINT32 notification_interval_ms; |
| 10054 | /** number of packets OVER which notify/suggest TDLS Discovery: |
| 10055 | * if current tx pps counter / notification interval >= threshold |
| 10056 | * then a notification will be sent to host to advise TDLS Discovery */ |
| 10057 | A_UINT32 tx_discovery_threshold; |
| 10058 | /** number of packets UNDER which notify/suggest TDLS Teardown: |
| 10059 | * if current tx pps counter / notification interval < threshold |
| 10060 | * then a notification will be sent to host to advise TDLS Tear down */ |
| 10061 | A_UINT32 tx_teardown_threshold; |
| 10062 | /** Absolute RSSI value under which notify/suggest TDLS Teardown */ |
| 10063 | A_INT32 rssi_teardown_threshold; |
| 10064 | /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */ |
| 10065 | A_INT32 rssi_delta; |
| 10066 | /** TDLS Option Control |
| 10067 | * Off-Channel, Buffer STA, (later)Sleep STA support */ |
| 10068 | A_UINT32 tdls_options; |
| 10069 | /* Buffering time in number of beacon intervals */ |
| 10070 | A_UINT32 tdls_peer_traffic_ind_window; |
| 10071 | /* Wait time for PTR frame */ |
| 10072 | A_UINT32 tdls_peer_traffic_response_timeout_ms; |
| 10073 | /* Self PUAPSD mask */ |
| 10074 | A_UINT32 tdls_puapsd_mask; |
| 10075 | /* Inactivity timeout */ |
| 10076 | A_UINT32 tdls_puapsd_inactivity_time_ms; |
| 10077 | /* Max of rx frame during SP */ |
| 10078 | A_UINT32 tdls_puapsd_rx_frame_threshold; |
| 10079 | /* Duration (in ms) over which to check whether TDLS link |
| 10080 | * needs to be torn down |
| 10081 | */ |
| 10082 | A_UINT32 teardown_notification_ms; |
| 10083 | /* STA kickout threshold for TDLS peer */ |
| 10084 | A_UINT32 tdls_peer_kickout_threshold; |
| 10085 | } wmi_tdls_set_state_cmd_fixed_param; |
| 10086 | |
| 10087 | /* WMI_TDLS_PEER_UPDATE_CMDID */ |
| 10088 | |
| 10089 | enum wmi_tdls_peer_state { |
| 10090 | /** tx peer TDLS link setup now starting, traffic to DA should be |
| 10091 | * paused (except TDLS frames) until state is moved to CONNECTED (or |
| 10092 | * TEARDOWN on setup failure) */ |
| 10093 | WMI_TDLS_PEER_STATE_PEERING, |
| 10094 | /** tx peer TDLS link established, running (all traffic to DA unpaused) */ |
| 10095 | WMI_TDLS_PEER_STATE_CONNECTED, |
| 10096 | /** tx peer TDLS link tear down started (link paused, any frames |
| 10097 | * queued for DA will be requeued back through the AP)*/ |
| 10098 | WMI_TDLS_PEER_STATE_TEARDOWN, |
| 10099 | /* Add peer mac into connection table */ |
| 10100 | WMI_TDLS_PEER_ADD_MAC_ADDR, |
| 10101 | /* Remove peer mac from connection table */ |
| 10102 | WMI_TDLS_PEER_REMOVE_MAC_ADDR, |
| 10103 | }; |
| 10104 | |
| 10105 | /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */ |
| 10106 | #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 10107 | typedef struct { |
| 10108 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */ |
| 10109 | A_UINT32 tlv_header; |
| 10110 | /* Peer's QoS Info - for U-APSD */ |
| 10111 | /* AC FLAGS - accessed through macros below */ |
| 10112 | /* Ack, SP, More Data Ack - accessed through macros below */ |
| 10113 | A_UINT32 peer_qos; |
| 10114 | /*TDLS Peer's U-APSD Buffer STA Support */ |
| 10115 | A_UINT32 buff_sta_support; |
| 10116 | /*TDLS off channel related params */ |
| 10117 | A_UINT32 off_chan_support; |
| 10118 | A_UINT32 peer_curr_operclass; |
| 10119 | A_UINT32 self_curr_operclass; |
| 10120 | /* Number of channels available for off channel operation */ |
| 10121 | A_UINT32 peer_chan_len; |
| 10122 | A_UINT32 peer_operclass_len; |
| 10123 | A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 10124 | /* Is peer initiator or responder of TDLS setup request */ |
| 10125 | A_UINT32 is_peer_responder; |
| 10126 | /* Preferred off channel number as configured by user */ |
| 10127 | A_UINT32 pref_offchan_num; |
| 10128 | /* Preferred off channel bandwidth as configured by user */ |
| 10129 | A_UINT32 pref_offchan_bw; |
| 10130 | |
| 10131 | /** Followed by the variable length TLV peer_chan_list: |
| 10132 | * wmi_channel peer_chan_list[]. |
| 10133 | * Array size would be peer_chan_len. |
| 10134 | * This array is intersected channels which is supported by both peer |
| 10135 | * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0. |
| 10136 | * FW shall compute BW for an offchan based on peer's ht/vht cap |
| 10137 | * received in peer_assoc cmd during change STA operation |
| 10138 | */ |
| 10139 | } wmi_tdls_peer_capabilities; |
| 10140 | |
| 10141 | #define WMI_TDLS_QOS_VO_FLAG 0 |
| 10142 | #define WMI_TDLS_QOS_VI_FLAG 1 |
| 10143 | #define WMI_TDLS_QOS_BK_FLAG 2 |
| 10144 | #define WMI_TDLS_QOS_BE_FLAG 3 |
| 10145 | #define WMI_TDLS_QOS_ACK_FLAG 4 |
| 10146 | #define WMI_TDLS_QOS_SP_FLAG 5 |
| 10147 | #define WMI_TDLS_QOS_MOREDATA_FLAG 7 |
| 10148 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10149 | #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10150 | (ppeer_caps)->peer_qos |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10151 | } while (0) |
| 10152 | #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10153 | (((ppeer_caps)->peer_qos & (1 << flag)) >> flag) |
| 10154 | |
| 10155 | #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 10156 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 10157 | #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 10158 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 10159 | #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 10160 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 10161 | #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 10162 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 10163 | #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 10164 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 10165 | #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 10166 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 10167 | #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 10168 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 10169 | #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 10170 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 10171 | #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 10172 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 10173 | #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 10174 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 10175 | /* SP has 2 bits */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10176 | #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10177 | (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10178 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10179 | #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \ |
| 10180 | (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 10181 | |
| 10182 | #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 10183 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10184 | #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 10185 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10186 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10187 | #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, flag) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10188 | (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10189 | } while (0) |
| 10190 | #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, flag) \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10191 | (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag) |
| 10192 | |
| 10193 | #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 10194 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 10195 | #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 10196 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 10197 | #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 10198 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 10199 | #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 10200 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 10201 | #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \ |
| 10202 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 10203 | #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \ |
| 10204 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 10205 | #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 10206 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 10207 | #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 10208 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 10209 | #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 10210 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 10211 | #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 10212 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 10213 | /* SP has 2 bits */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10214 | #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd, val) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10215 | (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 10216 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10217 | #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \ |
| 10218 | (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 10219 | |
| 10220 | #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 10221 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10222 | #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 10223 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 10224 | |
| 10225 | typedef struct { |
| 10226 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */ |
| 10227 | A_UINT32 tlv_header; |
| 10228 | /** unique id identifying the VDEV */ |
| 10229 | A_UINT32 vdev_id; |
| 10230 | /** peer MAC address */ |
| 10231 | wmi_mac_addr peer_macaddr; |
| 10232 | /** new TDLS state for peer (wmi_tdls_peer_state) */ |
| 10233 | A_UINT32 peer_state; |
| 10234 | /* The TLV for wmi_tdls_peer_capabilities will follow. |
| 10235 | * wmi_tdls_peer_capabilities peer_caps; |
| 10236 | */ |
| 10237 | /** Followed by the variable length TLV chan_info: |
| 10238 | * wmi_channel chan_info[] */ |
| 10239 | } wmi_tdls_peer_update_cmd_fixed_param; |
| 10240 | |
| 10241 | /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */ |
| 10242 | |
| 10243 | /* bitmap 20, 40, 80 or 160 MHz wide channel */ |
| 10244 | #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */ |
| 10245 | #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */ |
| 10246 | #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */ |
| 10247 | #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */ |
| 10248 | |
| 10249 | enum wmi_tdls_offchan_mode { |
| 10250 | WMI_TDLS_ENABLE_OFFCHANNEL, |
| 10251 | WMI_TDLS_DISABLE_OFFCHANNEL |
| 10252 | }; |
| 10253 | |
| 10254 | typedef struct { |
| 10255 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */ |
| 10256 | A_UINT32 tlv_header; |
| 10257 | /** unique id identifying the VDEV */ |
| 10258 | A_UINT32 vdev_id; |
| 10259 | /** Enable/Disable TDLS offchannel */ |
| 10260 | A_UINT32 offchan_mode; |
| 10261 | /** peer MAC address */ |
| 10262 | wmi_mac_addr peer_macaddr; |
| 10263 | /* Is peer initiator or responder of TDLS setup request */ |
| 10264 | A_UINT32 is_peer_responder; |
| 10265 | /* off channel number */ |
| 10266 | A_UINT32 offchan_num; |
| 10267 | /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */ |
| 10268 | A_UINT32 offchan_bw_bitmap; |
| 10269 | /* operating class for offchan */ |
| 10270 | A_UINT32 offchan_oper_class; |
| 10271 | } wmi_tdls_set_offchan_mode_cmd_fixed_param; |
| 10272 | |
| 10273 | /** TDLS EVENTS */ |
| 10274 | enum wmi_tdls_peer_notification { |
| 10275 | /** tdls discovery recommended for peer (based |
| 10276 | * on tx bytes per second > tx_discover threshold) */ |
| 10277 | WMI_TDLS_SHOULD_DISCOVER, |
| 10278 | /** tdls link tear down recommended for peer |
| 10279 | * due to tx bytes per second below tx_teardown_threshold |
| 10280 | * NB: this notification sent once */ |
| 10281 | WMI_TDLS_SHOULD_TEARDOWN, |
| 10282 | /** tx peer TDLS link tear down complete */ |
| 10283 | WMI_TDLS_PEER_DISCONNECTED, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10284 | /** TDLS/BT role change notification for connection tracker */ |
| 10285 | WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10286 | }; |
| 10287 | |
| 10288 | enum wmi_tdls_peer_reason { |
| 10289 | /** tdls teardown recommended due to low transmits */ |
| 10290 | WMI_TDLS_TEARDOWN_REASON_TX, |
| 10291 | /** tdls link tear down recommended due to poor RSSI */ |
| 10292 | WMI_TDLS_TEARDOWN_REASON_RSSI, |
| 10293 | /** tdls link tear down recommended due to offchannel scan */ |
| 10294 | WMI_TDLS_TEARDOWN_REASON_SCAN, |
| 10295 | /** tdls peer disconnected due to peer deletion */ |
| 10296 | WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE, |
| 10297 | /** tdls peer disconnected due to PTR timeout */ |
| 10298 | WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT, |
| 10299 | /** tdls peer disconnected due wrong PTR format */ |
| 10300 | WMI_TDLS_TEARDOWN_REASON_BAD_PTR, |
| 10301 | /** tdls peer not responding */ |
| 10302 | WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE, |
Sreelakshmi Konamki | 8fd1bfd | 2016-03-08 11:06:50 +0530 | [diff] [blame] | 10303 | /* |
| 10304 | * tdls entered buffer STA role, TDLS connection tracker |
| 10305 | * needs to handle this |
| 10306 | */ |
| 10307 | WMI_TDLS_ENTER_BUF_STA, |
| 10308 | /* |
| 10309 | * tdls exited buffer STA role, TDLS connection tracker |
| 10310 | * needs to handle this |
| 10311 | */ |
| 10312 | WMI_TDLS_EXIT_BUF_STA, |
| 10313 | /* BT entered busy mode, TDLS connection tracker needs to handle this */ |
| 10314 | WMI_TDLS_ENTER_BT_BUSY_MODE, |
| 10315 | /** BT exited busy mode, TDLS connection tracker needs to handle this */ |
| 10316 | WMI_TDLS_EXIT_BT_BUSY_MODE, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10317 | }; |
| 10318 | |
| 10319 | /* WMI_TDLS_PEER_EVENTID */ |
| 10320 | typedef struct { |
| 10321 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */ |
| 10322 | A_UINT32 tlv_header; |
| 10323 | /** peer MAC address */ |
| 10324 | wmi_mac_addr peer_macaddr; |
| 10325 | /** TDLS peer status (wmi_tdls_peer_notification)*/ |
| 10326 | A_UINT32 peer_status; |
| 10327 | /** TDLS peer reason (wmi_tdls_peer_reason) */ |
| 10328 | A_UINT32 peer_reason; |
| 10329 | /** unique id identifying the VDEV */ |
| 10330 | A_UINT32 vdev_id; |
| 10331 | } wmi_tdls_peer_event_fixed_param; |
| 10332 | |
| 10333 | /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please |
| 10334 | don't use this for any new implementations */ |
| 10335 | typedef struct { |
| 10336 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */ |
| 10337 | /** unique id identifying the VDEV, generated by the caller */ |
| 10338 | A_UINT32 vdev_id; |
| 10339 | /* New beacon interval to be used for the specified VDEV suggested by firmware */ |
| 10340 | A_UINT32 new_bcn_intvl; |
| 10341 | } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param; |
| 10342 | |
| 10343 | /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */ |
| 10344 | typedef struct { |
| 10345 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */ |
| 10346 | A_UINT32 tlv_header; |
| 10347 | /** 1: enable fw based adaptive ocs, |
| 10348 | * 0: disable fw based adaptive ocs |
| 10349 | */ |
| 10350 | A_UINT32 enable; |
| 10351 | /** 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] | 10352 | union { |
| 10353 | /* OBSOLETE - will be removed once all refs are gone */ |
| 10354 | A_UINT32 mac_id; |
| 10355 | /** pdev_id for identifying the MAC |
| 10356 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10357 | */ |
| 10358 | A_UINT32 pdev_id; |
| 10359 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10360 | } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param; |
| 10361 | |
| 10362 | /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */ |
| 10363 | typedef struct { |
| 10364 | /* Frequency of the channel for which the quota is set */ |
| 10365 | A_UINT32 chan_mhz; |
| 10366 | /* Requested channel time quota expressed as percentage */ |
| 10367 | A_UINT32 channel_time_quota; |
| 10368 | } wmi_resmgr_chan_time_quota; |
| 10369 | |
| 10370 | typedef struct { |
| 10371 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */ |
| 10372 | A_UINT32 tlv_header; |
| 10373 | /** number of channel time quota command structures |
| 10374 | * (wmi_resmgr_chan_time_quota) 1 or 2 |
| 10375 | */ |
| 10376 | A_UINT32 num_chans; |
| 10377 | /* This TLV is followed by another TLV of array of bytes |
| 10378 | * A_UINT8 data[]; |
| 10379 | * This data array contains |
| 10380 | * num_chans * size of(struct wmi_resmgr_chan_time_quota) |
| 10381 | */ |
| 10382 | } wmi_resmgr_set_chan_time_quota_cmd_fixed_param; |
| 10383 | |
| 10384 | /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */ |
| 10385 | typedef struct { |
| 10386 | /* Frequency of the channel for which the latency is set */ |
| 10387 | A_UINT32 chan_mhz; |
| 10388 | /* Requested channel latency in milliseconds */ |
| 10389 | A_UINT32 latency; |
| 10390 | } wmi_resmgr_chan_latency; |
| 10391 | |
| 10392 | typedef struct { |
| 10393 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */ |
| 10394 | A_UINT32 tlv_header; |
| 10395 | /** number of channel latency command structures |
| 10396 | * (wmi_resmgr_chan_latency) 1 or 2 |
| 10397 | */ |
| 10398 | A_UINT32 num_chans; |
| 10399 | /* This TLV is followed by another TLV of array of bytes |
| 10400 | * A_UINT8 data[]; |
| 10401 | * This data array contains |
| 10402 | * num_chans * size of(struct wmi_resmgr_chan_latency) |
| 10403 | */ |
| 10404 | } wmi_resmgr_set_chan_latency_cmd_fixed_param; |
| 10405 | |
| 10406 | /* WMI_STA_SMPS_FORCE_MODE_CMDID */ |
| 10407 | |
| 10408 | /** STA SMPS Forced Mode */ |
| 10409 | typedef enum { |
| 10410 | WMI_SMPS_FORCED_MODE_NONE = 0, |
| 10411 | WMI_SMPS_FORCED_MODE_DISABLED, |
| 10412 | WMI_SMPS_FORCED_MODE_STATIC, |
| 10413 | WMI_SMPS_FORCED_MODE_DYNAMIC |
| 10414 | } wmi_sta_smps_forced_mode; |
| 10415 | |
| 10416 | typedef struct { |
| 10417 | /** TLV tag and len; tag equals |
| 10418 | * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */ |
| 10419 | A_UINT32 tlv_header; |
| 10420 | /** Unique id identifying the VDEV */ |
| 10421 | A_UINT32 vdev_id; |
| 10422 | /** The mode of SMPS that is to be forced in the FW. */ |
| 10423 | A_UINT32 forced_mode; |
| 10424 | } wmi_sta_smps_force_mode_cmd_fixed_param; |
| 10425 | |
| 10426 | /** wlan HB commands */ |
| 10427 | #define WMI_WLAN_HB_ITEM_UDP 0x1 |
| 10428 | #define WMI_WLAN_HB_ITEM_TCP 0x2 |
| 10429 | #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */ |
| 10430 | |
| 10431 | typedef struct { |
| 10432 | /** TLV tag and len; tag equals |
| 10433 | * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */ |
| 10434 | A_UINT32 tlv_header; |
| 10435 | A_UINT32 vdev_id; |
| 10436 | A_UINT32 enable; |
| 10437 | A_UINT32 item; |
| 10438 | A_UINT32 session; |
| 10439 | } wmi_hb_set_enable_cmd_fixed_param; |
| 10440 | |
| 10441 | typedef struct { |
| 10442 | /** TLV tag and len; tag equals |
| 10443 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */ |
| 10444 | A_UINT32 tlv_header; |
| 10445 | A_UINT32 vdev_id; |
| 10446 | A_UINT32 srv_ip; |
| 10447 | A_UINT32 dev_ip; |
| 10448 | A_UINT32 seq; |
| 10449 | A_UINT32 src_port; |
| 10450 | A_UINT32 dst_port; |
| 10451 | A_UINT32 interval; |
| 10452 | A_UINT32 timeout; |
| 10453 | A_UINT32 session; |
| 10454 | wmi_mac_addr gateway_mac; |
| 10455 | } wmi_hb_set_tcp_params_cmd_fixed_param; |
| 10456 | |
| 10457 | typedef struct { |
| 10458 | /** TLV tag and len; tag equals |
| 10459 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */ |
| 10460 | A_UINT32 tlv_header; |
| 10461 | A_UINT32 vdev_id; |
| 10462 | A_UINT32 length; |
| 10463 | A_UINT32 offset; |
| 10464 | A_UINT32 session; |
| 10465 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 10466 | } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param; |
| 10467 | |
| 10468 | typedef struct { |
| 10469 | /** TLV tag and len; tag equals |
| 10470 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */ |
| 10471 | A_UINT32 tlv_header; |
| 10472 | A_UINT32 vdev_id; |
| 10473 | A_UINT32 srv_ip; |
| 10474 | A_UINT32 dev_ip; |
| 10475 | A_UINT32 src_port; |
| 10476 | A_UINT32 dst_port; |
| 10477 | A_UINT32 interval; |
| 10478 | A_UINT32 timeout; |
| 10479 | A_UINT32 session; |
| 10480 | wmi_mac_addr gateway_mac; |
| 10481 | } wmi_hb_set_udp_params_cmd_fixed_param; |
| 10482 | |
| 10483 | typedef struct { |
| 10484 | /** TLV tag and len; tag equals |
| 10485 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */ |
| 10486 | A_UINT32 tlv_header; |
| 10487 | A_UINT32 vdev_id; |
| 10488 | A_UINT32 length; |
| 10489 | A_UINT32 offset; |
| 10490 | A_UINT32 session; |
| 10491 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 10492 | } wmi_hb_set_udp_pkt_filter_cmd_fixed_param; |
| 10493 | |
| 10494 | /** wlan HB events */ |
| 10495 | typedef enum { |
| 10496 | WMI_WLAN_HB_REASON_UNKNOWN = 0, |
| 10497 | WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1, |
| 10498 | WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2, |
| 10499 | } WMI_HB_WAKEUP_REASON; |
| 10500 | |
| 10501 | typedef struct { |
| 10502 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */ |
| 10503 | A_UINT32 vdev_id; /* unique id identifying the VDEV */ |
| 10504 | A_UINT32 session; /* Session ID from driver */ |
| 10505 | A_UINT32 reason; /* wakeup reason */ |
| 10506 | } wmi_hb_ind_event_fixed_param; |
| 10507 | |
| 10508 | /** WMI_STA_SMPS_PARAM_CMDID */ |
| 10509 | typedef enum { |
| 10510 | /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */ |
| 10511 | WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0, |
| 10512 | /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or |
| 10513 | * to enter D-SMPS mode from Stalled-D-SMPS mode */ |
| 10514 | WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1, |
| 10515 | /** RSSI threshold to disable SMPS modes */ |
| 10516 | WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2, |
| 10517 | /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */ |
| 10518 | WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3, |
| 10519 | /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */ |
| 10520 | WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4, |
| 10521 | /** Enable/Disable DTIM 1chRx feature */ |
| 10522 | WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5 |
| 10523 | } wmi_sta_smps_param; |
| 10524 | |
| 10525 | typedef struct { |
| 10526 | /** TLV tag and len; tag equals |
| 10527 | * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */ |
| 10528 | A_UINT32 tlv_header; |
| 10529 | /** Unique id identifying the VDEV */ |
| 10530 | A_UINT32 vdev_id; |
| 10531 | /** SMPS parameter (see wmi_sta_smps_param) */ |
| 10532 | A_UINT32 param; |
| 10533 | /** Value of SMPS parameter */ |
| 10534 | A_UINT32 value; |
| 10535 | } wmi_sta_smps_param_cmd_fixed_param; |
| 10536 | |
| 10537 | typedef struct { |
| 10538 | /** TLV tag and len; tag equals |
| 10539 | * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */ |
| 10540 | A_UINT32 tlv_header; |
| 10541 | /* TX stats */ |
| 10542 | A_UINT32 txBytesPushed; |
| 10543 | A_UINT32 txPacketsPushed; |
| 10544 | /* RX stats */ |
| 10545 | A_UINT32 rxBytesRcvd; |
| 10546 | A_UINT32 rxPacketsRcvd; |
| 10547 | A_UINT32 rxTimeTotal; |
| 10548 | /** peer MAC address */ |
| 10549 | wmi_mac_addr peer_macaddr; |
| 10550 | } wmi_mcc_sched_sta_traffic_stats; |
| 10551 | |
| 10552 | typedef struct { |
| 10553 | /** TLV tag and len; tag equals |
| 10554 | * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */ |
| 10555 | A_UINT32 tlv_header; |
| 10556 | /** Duration over which the host stats were collected */ |
| 10557 | A_UINT32 duration; |
| 10558 | /** Number of stations filled in following stats array */ |
| 10559 | A_UINT32 num_sta; |
| 10560 | /* Following this struct are the TLVs: |
| 10561 | * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list; |
| 10562 | */ |
| 10563 | } wmi_mcc_sched_traffic_stats_cmd_fixed_param; |
| 10564 | |
| 10565 | typedef struct { |
| 10566 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */ |
| 10567 | /* unique id identifying the VDEV, generated by the caller */ |
| 10568 | A_UINT32 vdev_id; |
| 10569 | /*Batch scan enable command parameters */ |
| 10570 | A_UINT32 scanInterval; |
| 10571 | A_UINT32 numScan2Batch; |
| 10572 | A_UINT32 bestNetworks; |
| 10573 | A_UINT32 rfBand; |
| 10574 | A_UINT32 rtt; |
| 10575 | } wmi_batch_scan_enable_cmd_fixed_param; |
| 10576 | |
| 10577 | typedef struct { |
| 10578 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */ |
| 10579 | A_UINT32 supportedMscan; |
| 10580 | } wmi_batch_scan_enabled_event_fixed_param; |
| 10581 | |
| 10582 | typedef struct { |
| 10583 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */ |
| 10584 | /* unique id identifying the VDEV, generated by the caller */ |
| 10585 | A_UINT32 vdev_id; |
| 10586 | A_UINT32 param; |
| 10587 | } wmi_batch_scan_disable_cmd_fixed_param; |
| 10588 | |
| 10589 | typedef struct { |
| 10590 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */ |
| 10591 | /** unique id identifying the VDEV, generated by the caller */ |
| 10592 | A_UINT32 vdev_id; |
| 10593 | A_UINT32 param; |
| 10594 | } wmi_batch_scan_trigger_result_cmd_fixed_param; |
| 10595 | |
| 10596 | typedef struct { |
| 10597 | A_UINT32 tlv_header; |
| 10598 | wmi_mac_addr bssid; /* BSSID */ |
| 10599 | wmi_ssid ssid; /* SSID */ |
| 10600 | A_UINT32 ch; /* Channel */ |
| 10601 | A_UINT32 rssi; /* RSSI or Level */ |
| 10602 | /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */ |
| 10603 | A_UINT32 timestamp; |
| 10604 | } wmi_batch_scan_result_network_info; |
| 10605 | |
| 10606 | typedef struct { |
| 10607 | A_UINT32 tlv_header; |
| 10608 | A_UINT32 scanId; /* Scan List ID. */ |
| 10609 | /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */ |
| 10610 | A_UINT32 numNetworksInScanList; |
| 10611 | A_UINT32 netWorkStartIndex; /* indicate the start index of network info */ |
| 10612 | } wmi_batch_scan_result_scan_list; |
| 10613 | |
| 10614 | #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.*/ |
| 10615 | #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/ |
| 10616 | #define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/ |
| 10617 | #define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/ |
| 10618 | #define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/ |
| 10619 | #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/ |
| 10620 | #define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/ |
| 10621 | #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.*/ |
| 10622 | #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/ |
| 10623 | #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.*/ |
| 10624 | /* |
| 10625 | * TEMPORARY alias of incorrect old name the correct name. |
| 10626 | * This alias will be removed once all references to the old name have been fixed. |
| 10627 | */ |
| 10628 | #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT |
| 10629 | #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/ |
| 10630 | #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/ |
| 10631 | #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/ |
| 10632 | #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/ |
| 10633 | #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/ |
| 10634 | #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/ |
| 10635 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/ |
| 10636 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/ |
| 10637 | #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/ |
| 10638 | #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/ |
| 10639 | #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.*/ |
| 10640 | #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*/ |
| 10641 | #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] | 10642 | /* |
| 10643 | * extscan will use this field to indicate to |
| 10644 | * LOWI LP whether to report result to context hub or not |
| 10645 | */ |
| 10646 | #define LPI_IE_BITMAP_REPORT_CONTEXT_HUB 0x00800000 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10647 | #define LPI_IE_BITMAP_ALL 0xFFFFFFFF |
| 10648 | |
| 10649 | typedef struct { |
| 10650 | A_UINT32 tlv_header; |
| 10651 | /**A_BOOL indicates LPI mgmt snooping enable/disable*/ |
| 10652 | A_UINT32 enable; |
| 10653 | /**LPI snooping mode*/ |
| 10654 | A_UINT32 snooping_mode; |
| 10655 | /** LPI interested IEs in snooping context */ |
| 10656 | A_UINT32 ie_bitmap; |
| 10657 | } wmi_lpi_mgmt_snooping_config_cmd_fixed_param; |
| 10658 | |
| 10659 | typedef struct { |
| 10660 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 10661 | /** Scan ID */ |
| 10662 | A_UINT32 scan_id; |
| 10663 | /** Scan requestor ID */ |
| 10664 | A_UINT32 scan_req_id; |
| 10665 | /** VDEV id(interface) that is requesting scan */ |
| 10666 | A_UINT32 vdev_id; |
| 10667 | /** LPI interested IEs in scan context */ |
| 10668 | A_UINT32 ie_bitmap; |
| 10669 | /** Scan Priority, input to scan scheduler */ |
| 10670 | A_UINT32 scan_priority; |
| 10671 | /** dwell time in msec on active channels */ |
| 10672 | A_UINT32 dwell_time_active; |
| 10673 | /** dwell time in msec on passive channels */ |
| 10674 | A_UINT32 dwell_time_passive; |
| 10675 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 10676 | A_UINT32 min_rest_time; |
| 10677 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 10678 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 10679 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 10680 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 10681 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 10682 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 10683 | */ |
| 10684 | A_UINT32 max_rest_time; |
| 10685 | /** time before sending next set of probe requests. |
| 10686 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 10687 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 10688 | */ |
| 10689 | A_UINT32 repeat_probe_time; |
| 10690 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 10691 | A_UINT32 probe_spacing_time; |
| 10692 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 10693 | A_UINT32 idle_time; |
| 10694 | /** maximum time in msec allowed for scan */ |
| 10695 | A_UINT32 max_scan_time; |
| 10696 | /** delay in msec before sending first probe request after switching to a channel */ |
| 10697 | A_UINT32 probe_delay; |
| 10698 | /** Scan control flags */ |
| 10699 | A_UINT32 scan_ctrl_flags; |
| 10700 | /** Burst duration time in msec*/ |
| 10701 | A_UINT32 burst_duration; |
| 10702 | |
| 10703 | /** # if channels to scan. In the TLV channel_list[] */ |
| 10704 | A_UINT32 num_chan; |
| 10705 | /** number of bssids. In the TLV bssid_list[] */ |
| 10706 | A_UINT32 num_bssid; |
| 10707 | /** number of ssid. In the TLV ssid_list[] */ |
| 10708 | A_UINT32 num_ssids; |
| 10709 | /** number of bytes in ie data. In the TLV ie_data[] */ |
| 10710 | A_UINT32 ie_len; |
| 10711 | |
| 10712 | /** |
| 10713 | * TLV (tag length value ) parameters follow the scan_cmd |
| 10714 | * structure. The TLV's are: |
| 10715 | * A_UINT32 channel_list[]; |
| 10716 | * wmi_ssid ssid_list[]; |
| 10717 | * wmi_mac_addr bssid_list[]; |
| 10718 | * A_UINT8 ie_data[]; |
| 10719 | */ |
| 10720 | } wmi_lpi_start_scan_cmd_fixed_param; |
| 10721 | |
| 10722 | typedef struct { |
| 10723 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 10724 | /** Scan requestor ID */ |
| 10725 | A_UINT32 scan_req_id; |
| 10726 | /** Scan ID */ |
| 10727 | A_UINT32 scan_id; |
| 10728 | /** |
| 10729 | * Req Type |
| 10730 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 10731 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 10732 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 10733 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 10734 | */ |
| 10735 | A_UINT32 req_type; |
| 10736 | /** |
| 10737 | * vDev ID |
| 10738 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 10739 | */ |
| 10740 | A_UINT32 vdev_id; |
| 10741 | } wmi_lpi_stop_scan_cmd_fixed_param; |
| 10742 | |
| 10743 | typedef enum { |
| 10744 | WMI_LPI_DEVICE_TYPE_AP = 1, |
| 10745 | WMI_LPI_DEVICE_TYPE_P2P = 2, |
| 10746 | WMI_LPI_DEVICE_TYPE_NAN = 3, |
| 10747 | } wmi_lpi_device_type; |
| 10748 | |
| 10749 | typedef struct { |
| 10750 | A_UINT32 tlv_header; |
| 10751 | /** Scan requestor ID */ |
| 10752 | A_UINT32 scan_req_id; |
| 10753 | A_UINT32 ie_bitmap; |
| 10754 | A_UINT32 data_len; |
| 10755 | } wmi_lpi_result_event_fixed_param; |
| 10756 | |
| 10757 | typedef enum { |
| 10758 | /** User scan Request completed */ |
| 10759 | WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0, |
| 10760 | /** User Request was never serviced */ |
| 10761 | WMI_LPI_STATUS_DROPPED_REQ = 1, |
| 10762 | /** Illegal channel Req */ |
| 10763 | WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2, |
| 10764 | /** Illegal Operation Req */ |
| 10765 | WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3, |
| 10766 | /** Request Aborted */ |
| 10767 | WMI_LPI_STATUS_REQ_ABORTED = 4, |
| 10768 | /** Request Timed Out */ |
| 10769 | WMI_LPI_STATUS_REQ_TIME_OUT = 5, |
| 10770 | /** Medium Busy, already there |
| 10771 | * is a scan is going on */ |
| 10772 | WMI_LPI_STATUS_MEDIUM_BUSY = 6, |
| 10773 | /* Extscan is the scan client whose scan complete event is triggered */ |
| 10774 | WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7, |
| 10775 | } wmi_lpi_staus; |
| 10776 | |
| 10777 | typedef struct { |
| 10778 | A_UINT32 tlv_header; |
| 10779 | wmi_lpi_staus status; |
| 10780 | /** Scan requestor ID */ |
| 10781 | A_UINT32 scan_req_id; |
| 10782 | } wmi_lpi_status_event_fixed_param; |
| 10783 | |
| 10784 | typedef struct { |
| 10785 | A_UINT32 tlv_header; |
| 10786 | wmi_mac_addr bssid; |
| 10787 | wmi_ssid ssid; |
| 10788 | A_UINT32 freq; |
| 10789 | A_UINT32 rssi; |
| 10790 | A_UINT32 vdev_id; |
| 10791 | } wmi_lpi_handoff_event_fixed_param; |
| 10792 | |
| 10793 | typedef struct { |
| 10794 | A_UINT32 tlv_header; |
| 10795 | A_UINT32 timestamp; /*timestamp of batch scan event */ |
| 10796 | A_UINT32 numScanLists; /*number of scan in this event */ |
| 10797 | A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */ |
| 10798 | } wmi_batch_scan_result_event_fixed_param; |
| 10799 | |
| 10800 | typedef struct { |
| 10801 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */ |
| 10802 | A_UINT32 vdev_id; |
| 10803 | /* This TLV is followed by p2p_noa_info for vdev : |
| 10804 | * wmi_p2p_noa_info p2p_noa_info; |
| 10805 | */ |
| 10806 | } wmi_p2p_noa_event_fixed_param; |
| 10807 | |
| 10808 | #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6 |
| 10809 | #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1 |
| 10810 | |
| 10811 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 10812 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f |
| 10813 | |
| 10814 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7 |
| 10815 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf |
| 10816 | |
| 10817 | typedef struct { |
| 10818 | /** TLV tag and len; tag equals |
| 10819 | * */ |
| 10820 | A_UINT32 tlv_header; |
| 10821 | /** gpip pin number */ |
| 10822 | A_UINT32 gpio_pin_num; |
| 10823 | /** gpio interupt type */ |
| 10824 | A_UINT32 int_type; |
| 10825 | /** RF radio status */ |
| 10826 | A_UINT32 radio_state; |
| 10827 | } wmi_rfkill_mode_param; |
| 10828 | |
| 10829 | typedef enum { |
| 10830 | WMI_SET_LED_SYS_POWEROFF, |
| 10831 | WMI_SET_LED_SYS_S3_SUSPEND, |
| 10832 | WMI_SET_LED_SYS_S4_S5, |
| 10833 | WMI_SET_LED_SYS_DRIVER_DISABLE, |
| 10834 | WMI_SET_LED_SYS_WAKEUP, |
| 10835 | WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */ |
| 10836 | WMI_SET_LED_SYS_POWERON, |
| 10837 | } wmi_led_sys_state_param; |
| 10838 | |
| 10839 | typedef enum { |
| 10840 | WMI_CONFIG_LED_TO_VDD = 0, |
| 10841 | WMI_CONFIG_LED_TO_GND = 1, |
| 10842 | } wmi_config_led_connect_type; |
| 10843 | |
| 10844 | typedef enum { |
| 10845 | WMI_CONFIG_LED_NOT_WITH_BT = 0, |
| 10846 | WMI_CONFIG_LED_WITH_BT = 1, |
| 10847 | } wmi_config_led_with_bt_flag; |
| 10848 | |
| 10849 | typedef enum { |
| 10850 | WMI_CONFIG_LED_DISABLE = 0, |
| 10851 | WMI_CONFIG_LED_ENABLE = 1, |
| 10852 | } wmi_config_led_enable_flag; |
| 10853 | |
Sreelakshmi Konamki | f9bde84 | 2016-03-03 19:03:02 +0530 | [diff] [blame] | 10854 | typedef enum { |
| 10855 | WMI_CONFIG_LED_HIGH_UNSPECIFIED = 0, |
| 10856 | WMI_CONFIG_LED_HIGH_OFF = 1, |
| 10857 | WMI_CONFIG_LED_HIGH_ON = 2, |
| 10858 | } wmi_config_led_on_flag; |
| 10859 | |
| 10860 | typedef enum { |
| 10861 | WMI_CONFIG_LED_UNSPECIFIED = 0, |
| 10862 | WMI_CONFIG_LED_ON = 1, |
| 10863 | WMI_CONFIG_LED_OFF = 2, |
| 10864 | WMI_CONFIG_LED_DIM = 3, |
| 10865 | WMI_CONFIG_LED_BLINK = 4, |
| 10866 | WMI_CONFIG_LED_TXRX = 5, |
| 10867 | } wmi_config_led_operation_type; |
| 10868 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10869 | typedef struct { |
| 10870 | /** TLV tag and len; tag equals |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10871 | * WMITLV_TAG_STRUC_wmi_pdev_set_led_config_cmd_fixed_param */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10872 | A_UINT32 tlv_header; |
| 10873 | /* Set GPIO pin */ |
| 10874 | A_UINT32 led_gpio_pin; |
| 10875 | /* Set connect type defined in wmi_config_led_connect_type */ |
| 10876 | A_UINT32 connect_type; |
| 10877 | /* Set flag defined in wmi_config_led_with_bt_flag */ |
| 10878 | A_UINT32 with_bt; |
| 10879 | /* Set LED enablement defined in wmi_config_led_enable_flag */ |
| 10880 | A_UINT32 led_enable; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10881 | /** pdev_id for identifying the MAC |
| 10882 | * See macros starting with WMI_PDEV_ID_ for values. |
| 10883 | */ |
| 10884 | A_UINT32 pdev_id; |
Sreelakshmi Konamki | f9bde84 | 2016-03-03 19:03:02 +0530 | [diff] [blame] | 10885 | /* see wmi_config_led_operation_type enum */ |
| 10886 | A_UINT32 led_operation_type; |
| 10887 | /* see wmi_config_led_on_flag enum */ |
| 10888 | A_UINT32 led_on_flag; /* configure high/low on/off sense */ |
| 10889 | A_UINT32 led_on_interval; /* for blink function; unit: ms */ |
| 10890 | A_UINT32 led_off_interval; /* for blink function; unit: ms */ |
| 10891 | A_UINT32 led_repeat_cnt; /* for blink function: how many blinks */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10892 | } wmi_pdev_set_led_config_cmd_fixed_param; |
| 10893 | |
| 10894 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 10895 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff |
| 10896 | |
| 10897 | /** WMI_PEER_INFO_REQ_CMDID |
| 10898 | * Request FW to provide peer info */ |
| 10899 | typedef struct { |
| 10900 | /** TLV tag and len; tag equals |
| 10901 | * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */ |
| 10902 | A_UINT32 tlv_header; |
| 10903 | /** In order to get the peer info for a single peer, host shall |
| 10904 | * issue the peer_mac_address of that peer. For getting the |
| 10905 | * info all peers, the host shall issue 0xFFFFFFFF as the mac |
| 10906 | * address. The firmware will return the peer info for all the |
| 10907 | * peers on the specified vdev_id */ |
| 10908 | wmi_mac_addr peer_mac_address; |
| 10909 | /** vdev id */ |
| 10910 | A_UINT32 vdev_id; |
| 10911 | } wmi_peer_info_req_cmd_fixed_param; |
| 10912 | |
| 10913 | typedef struct { |
| 10914 | /** TLV tag and len; tag equals |
| 10915 | * WMITLV_TAG_STRUC_wmi_peer_info */ |
| 10916 | A_UINT32 tlv_header; |
| 10917 | /** mac addr of the peer */ |
| 10918 | wmi_mac_addr peer_mac_address; |
| 10919 | /** data_rate of the peer */ |
| 10920 | A_UINT32 data_rate; |
| 10921 | /** rssi of the peer */ |
| 10922 | A_UINT32 rssi; |
| 10923 | /** tx fail count */ |
| 10924 | A_UINT32 tx_fail_cnt; |
| 10925 | } wmi_peer_info; |
| 10926 | |
| 10927 | /** FW response with the peer info */ |
| 10928 | typedef struct { |
| 10929 | /** TLV tag and len; tag equals |
| 10930 | * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */ |
| 10931 | A_UINT32 tlv_header; |
| 10932 | /** number of peers in peer_info */ |
| 10933 | A_UINT32 num_peers; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 10934 | /* Set to 1 only if vdev_id field is valid */ |
| 10935 | A_UINT32 valid_vdev_id; |
| 10936 | /* VDEV to which the peer belongs to */ |
| 10937 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 10938 | /* This TLV is followed by another TLV of array of structs |
| 10939 | * wmi_peer_info peer_info[]; |
| 10940 | */ |
| 10941 | } wmi_peer_info_event_fixed_param; |
| 10942 | |
| 10943 | /** FW response when tx failure count has reached threshold |
| 10944 | * for a peer */ |
| 10945 | typedef struct { |
| 10946 | /** TLV tag and len; tag equals |
| 10947 | * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */ |
| 10948 | A_UINT32 tlv_header; |
| 10949 | /** vdev id*/ |
| 10950 | A_UINT32 vdev_id; |
| 10951 | /** mac address */ |
| 10952 | wmi_mac_addr peer_mac_address; |
| 10953 | /** tx failure count- will eventually be removed and not used * */ |
| 10954 | A_UINT32 tx_fail_cnt; |
| 10955 | /** seq number of the nth tx_fail_event */ |
| 10956 | A_UINT32 seq_no; |
| 10957 | } wmi_peer_tx_fail_cnt_thr_event_fixed_param; |
| 10958 | |
| 10959 | enum wmi_rmc_mode { |
| 10960 | /** Disable RMC */ |
| 10961 | WMI_RMC_MODE_DISABLED = 0, |
| 10962 | /** Enable RMC */ |
| 10963 | WMI_RMC_MODE_ENABLED = 1, |
| 10964 | }; |
| 10965 | |
| 10966 | /** Enable RMC transmitter functionality. Upon |
| 10967 | * receiving this, the FW shall mutlicast frames with |
| 10968 | * reliablity. This is a vendor |
| 10969 | * proprietary feature. */ |
| 10970 | typedef struct { |
| 10971 | /** TLV tag and len; tag equals |
| 10972 | * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */ |
| 10973 | A_UINT32 tlv_header; |
| 10974 | /** vdev id*/ |
| 10975 | A_UINT32 vdev_id; |
| 10976 | /** enable_rmc contains values from enum wmi_rmc_mode; |
| 10977 | * Default value: 0 (disabled) */ |
| 10978 | A_UINT32 enable_rmc; |
| 10979 | } wmi_rmc_set_mode_cmd_fixed_param; |
| 10980 | |
| 10981 | /** Configure transmission periodicity of action frames in a |
| 10982 | * RMC network for the multicast transmitter */ |
| 10983 | typedef struct { |
| 10984 | /** TLV tag and len; tag equals |
| 10985 | * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */ |
| 10986 | A_UINT32 tlv_header; |
| 10987 | /** vdev id */ |
| 10988 | A_UINT32 vdev_id; |
| 10989 | /** time period in milliseconds. Default: 300 ms. |
| 10990 | An action frame indicating the current leader is transmitted by the |
| 10991 | RMC transmitter once every 'periodity_msec' */ |
| 10992 | A_UINT32 periodicity_msec; |
| 10993 | } wmi_rmc_set_action_period_cmd_fixed_param; |
| 10994 | |
| 10995 | /** Optimise Leader selection process in RMC functionality. For |
| 10996 | * Enhancement/Debug purposes only */ |
| 10997 | typedef struct { |
| 10998 | /** TLV tag and len; tag equals |
| 10999 | * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */ |
| 11000 | A_UINT32 tlv_header; |
| 11001 | /** vdev id */ |
| 11002 | A_UINT32 vdev_id; |
| 11003 | /** flags :: |
| 11004 | * 0x0001 - Enable beacon averaging |
| 11005 | * 0x0002 - Force leader selection |
| 11006 | * 0x0004 - Enable Timer based leader switch |
| 11007 | * 0x0008 - Use qos/NULL based for multicast reliability */ |
| 11008 | A_UINT32 flags; |
| 11009 | /** control leader change timeperiod (in seconds) */ |
| 11010 | A_UINT32 peridocity_leader_switch; |
| 11011 | /** control activity timeout value for data rx (in seconds) */ |
| 11012 | A_UINT32 data_activity_timeout; |
| 11013 | /** mac address of leader */ |
| 11014 | wmi_mac_addr forced_leader_mac_addr; |
| 11015 | } wmi_rmc_config_cmd_fixed_param; |
| 11016 | |
| 11017 | /** MHF is generally implemented in |
| 11018 | * the kernel. To decrease system power consumption, the |
| 11019 | * driver can enable offloading this to the chipset. In |
| 11020 | * order for the offload, the firmware needs the routing table. |
| 11021 | * The host shall plumb the routing table into FW. The firmware |
| 11022 | * shall perform an IP address lookup and forward the packet to |
| 11023 | * the next hop using next hop's mac address. This is a vendor |
| 11024 | * proprietary feature. */ |
| 11025 | enum wmi_mhf_ofl_mode { |
| 11026 | /** Disable MHF offload */ |
| 11027 | WMI_MHF_OFL_MODE_DISABLED = 0, |
| 11028 | /** Enable MHF offload */ |
| 11029 | WMI_MHF_OFL_MODE_ENABLED = 1, |
| 11030 | }; |
| 11031 | |
| 11032 | typedef struct { |
| 11033 | /** TLV tag and len; tag equals |
| 11034 | * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */ |
| 11035 | A_UINT32 tlv_header; |
| 11036 | /** vdev id*/ |
| 11037 | A_UINT32 vdev_id; |
| 11038 | /** enable_mhf_ofl contains values from enum |
| 11039 | * wmi_mhf_ofl_mode; Default value: 0 (disabled) */ |
| 11040 | A_UINT32 enable_mhf_ofl; |
| 11041 | } wmi_mhf_offload_set_mode_cmd_fixed_param; |
| 11042 | |
| 11043 | enum wmi_mhf_ofl_table_action { |
| 11044 | /** Create forwarding offload table in FW */ |
| 11045 | WMI_MHF_OFL_TBL_CREATE = 0, |
| 11046 | /** Append to existing MHF offload table */ |
| 11047 | WMI_MHF_OFL_TBL_APPEND = 1, |
| 11048 | /** Flush entire MHF offload table in FW */ |
| 11049 | WMI_MHF_OFL_TBL_FLUSH = 2, |
| 11050 | }; |
| 11051 | |
| 11052 | typedef struct { |
| 11053 | /** TLV tag and len; tag equals |
| 11054 | * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */ |
| 11055 | A_UINT32 tlv_header; |
| 11056 | /** vdev id*/ |
| 11057 | A_UINT32 vdev_id; |
| 11058 | /** action corresponds to values from enum |
| 11059 | * wmi_mhf_ofl_table_action */ |
| 11060 | A_UINT32 action; |
| 11061 | /** number of entries in the table */ |
| 11062 | A_UINT32 num_entries; |
| 11063 | /** Followed by the variable length TLV |
| 11064 | * wmi_mhf_offload_routing_table_entry entries[] */ |
| 11065 | } wmi_mhf_offload_plumb_routing_table_cmd; |
| 11066 | |
| 11067 | typedef struct { |
| 11068 | /** TLV tag and len; tag equals |
| 11069 | * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */ |
| 11070 | A_UINT32 tlv_header; |
| 11071 | /** Destination node's IP address */ |
| 11072 | WMI_IPV4_ADDR dest_ipv4_addr; |
| 11073 | /** Next hop node's MAC address */ |
| 11074 | wmi_mac_addr next_hop_mac_addr; |
| 11075 | } wmi_mhf_offload_routing_table_entry; |
| 11076 | |
| 11077 | typedef struct { |
| 11078 | /** tlv tag and len, tag equals |
| 11079 | * WMITLV_TAG_STRUC_wmi_dfs_radar_event */ |
| 11080 | A_UINT32 tlv_header; |
| 11081 | |
| 11082 | /** full 64 tsf timestamp get from MAC tsf timer indicates |
| 11083 | * the time that the radar event uploading to host, split |
| 11084 | * it to high 32 bit and lower 32 bit in fulltsf_high and |
| 11085 | * full_tsf_low |
| 11086 | */ |
| 11087 | A_UINT32 upload_fullts_low; |
| 11088 | A_UINT32 upload_fullts_high; |
| 11089 | |
| 11090 | /** timestamp indicates the time when DFS pulse is detected |
| 11091 | * equal to ppdu_end_ts - radar_pusle_summary_ts_offset |
| 11092 | */ |
| 11093 | A_UINT32 pulse_detect_ts; |
| 11094 | |
| 11095 | /** the duaration of the pulse in us */ |
| 11096 | A_UINT32 pulse_duration; |
| 11097 | |
| 11098 | /** the center frequency of the radar pulse detected, KHz */ |
| 11099 | A_UINT32 pulse_center_freq; |
| 11100 | |
| 11101 | /** bandwidth of current DFS channel, MHz */ |
| 11102 | A_UINT32 ch_bandwidth; |
| 11103 | |
| 11104 | /** center channel frequency1 of current DFS channel, MHz */ |
| 11105 | A_UINT16 ch_center_freq1; |
| 11106 | |
| 11107 | /** center channel frequency2 of current DFS channel, MHz, |
| 11108 | * reserved for 160 BW mode |
| 11109 | */ |
| 11110 | A_UINT16 ch_center_freq2; |
| 11111 | |
| 11112 | /** flag to indicate if this pulse is chirp */ |
| 11113 | A_UINT8 pulse_is_chirp; |
| 11114 | |
| 11115 | /** RSSI recorded in the ppdu */ |
| 11116 | A_UINT8 rssi; |
| 11117 | |
| 11118 | /** extened RSSI info */ |
| 11119 | A_UINT8 rssi_ext; |
| 11120 | |
| 11121 | /** For 4-byte aligment padding */ |
| 11122 | A_UINT8 reserved; |
| 11123 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11124 | union { |
| 11125 | /* OBSOLETE - will be removed once all refs are gone */ |
| 11126 | A_UINT8 pmac_id; |
| 11127 | /** pdev_id for identifying the MAC |
| 11128 | * See macros starting with WMI_PDEV_ID_ for values. |
| 11129 | */ |
| 11130 | A_UINT8 pdev_id; |
| 11131 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11132 | |
| 11133 | /** index of peak magnitude bin (signed) */ |
| 11134 | A_INT32 peak_sidx; |
| 11135 | |
| 11136 | } wmi_dfs_radar_event_fixed_param; |
| 11137 | |
| 11138 | typedef struct { |
| 11139 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */ |
| 11140 | |
| 11141 | /*Thermal thresholds */ |
| 11142 | A_UINT32 lower_thresh_degreeC; /* in degree C */ |
| 11143 | A_UINT32 upper_thresh_degreeC; /* in degree C */ |
| 11144 | |
| 11145 | /*Enable/Disable Thermal Monitoring for Mitigation */ |
| 11146 | A_UINT32 enable; |
| 11147 | } wmi_thermal_mgmt_cmd_fixed_param; |
| 11148 | |
| 11149 | typedef struct { |
| 11150 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */ |
| 11151 | |
| 11152 | A_UINT32 temperature_degreeC; /* temperature in degree C */ |
| 11153 | } wmi_thermal_mgmt_event_fixed_param; |
| 11154 | |
| 11155 | /** |
| 11156 | * This command is sent from WLAN host driver to firmware to |
| 11157 | * request firmware to configure auto shutdown timer in fw |
| 11158 | * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum> |
| 11159 | */ |
| 11160 | typedef struct { |
| 11161 | A_UINT32 tlv_header; |
| 11162 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */ |
| 11163 | A_UINT32 timer_value; |
| 11164 | /** timer value; 0=disable */ |
| 11165 | } wmi_host_auto_shutdown_cfg_cmd_fixed_param; |
| 11166 | |
| 11167 | enum wmi_host_auto_shutdown_reason { |
| 11168 | WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0, |
| 11169 | WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1, |
| 11170 | WMI_HOST_AUTO_SHUTDOWN_REASON_MAX, |
| 11171 | }; |
| 11172 | |
| 11173 | /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */ |
| 11174 | typedef struct { |
| 11175 | A_UINT32 tlv_header; |
| 11176 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */ |
| 11177 | A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */ |
| 11178 | } wmi_host_auto_shutdown_event_fixed_param; |
| 11179 | |
| 11180 | /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command. |
| 11181 | * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet. |
| 11182 | * This command is only used by some customer for verification test. It is not for end-user. |
| 11183 | * |
| 11184 | * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions. |
| 11185 | * |
| 11186 | * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet, |
| 11187 | * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple |
| 11188 | * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the |
| 11189 | * <channel, ack_offset> pair is unique. |
| 11190 | * |
| 11191 | * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word |
| 11192 | * called basic_config_info by bitmap |
| 11193 | * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination. |
| 11194 | * |
| 11195 | * '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 |
| 11196 | * is ignored. |
| 11197 | * disable will remove preious conditions from FW. |
| 11198 | * conditions from the later command will over write conditions stored from a previous command. |
| 11199 | * |
| 11200 | */ |
| 11201 | |
| 11202 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */ |
| 11203 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */ |
| 11204 | #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */ |
| 11205 | #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */ |
| 11206 | |
| 11207 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */ |
| 11208 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */ |
| 11209 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */ |
| 11210 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */ |
| 11211 | |
| 11212 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */ |
| 11213 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */ |
| 11214 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */ |
| 11215 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */ |
| 11216 | |
| 11217 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */ |
| 11218 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */ |
| 11219 | |
| 11220 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */ |
| 11221 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */ |
| 11222 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */ |
| 11223 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */ |
| 11224 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */ |
| 11225 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */ |
| 11226 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */ |
| 11227 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */ |
| 11228 | |
| 11229 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */ |
| 11230 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */ |
| 11231 | |
| 11232 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */ |
| 11233 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */ |
| 11234 | |
| 11235 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */ |
| 11236 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */ |
| 11237 | |
| 11238 | /** Bit map definition for basic_config_info starts */ |
| 11239 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0 |
| 11240 | #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] | 11241 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET) |
| 11242 | #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] | 11243 | |
| 11244 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5 |
| 11245 | #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] | 11246 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET) |
| 11247 | #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] | 11248 | |
| 11249 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10 |
| 11250 | #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] | 11251 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK) |
| 11252 | #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] | 11253 | |
| 11254 | #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12 |
| 11255 | #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] | 11256 | #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BT) |
| 11257 | #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] | 11258 | |
| 11259 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14 |
| 11260 | #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] | 11261 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STBC) |
| 11262 | #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] | 11263 | |
| 11264 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16 |
| 11265 | #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] | 11266 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_BAND) |
| 11267 | #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] | 11268 | |
| 11269 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17 |
| 11270 | #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] | 11271 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_STREAM) |
| 11272 | #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] | 11273 | |
| 11274 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18 |
| 11275 | #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] | 11276 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE) |
| 11277 | #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] | 11278 | |
| 11279 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21 |
| 11280 | /* |
| 11281 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST) |
| 11282 | * is temporarily maintained as an alias for the correct name |
| 11283 | * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 11284 | */ |
| 11285 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL |
| 11286 | #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] | 11287 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 11288 | #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] | 11289 | |
| 11290 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22 |
| 11291 | /* |
| 11292 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST) |
| 11293 | * is temporarily maintained as an alias for the correct name |
| 11294 | * (WMI_TPC_CHAINMASK_CONFIG_RATE) |
| 11295 | */ |
| 11296 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE |
| 11297 | #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S) |
| 11298 | #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] | 11299 | #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] | 11300 | |
| 11301 | /** Bit map definition for basic_config_info ends */ |
| 11302 | |
| 11303 | typedef struct { |
| 11304 | A_UINT32 tlv_header; |
| 11305 | /** Basic condition defined as bit map above, bitmap is chosen to save memory. |
| 11306 | * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed |
| 11307 | * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed |
| 11308 | * 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 |
| 11309 | * 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 |
| 11310 | * 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 |
| 11311 | * Bit16 : band condition b'0: 2G, b'1: 5G |
| 11312 | * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams |
| 11313 | * 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 |
| 11314 | * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored |
| 11315 | * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored. |
| 11316 | * Bit23 ~ Bit31: reserved |
| 11317 | */ |
| 11318 | A_UINT32 basic_config_info; |
| 11319 | |
| 11320 | /** channel mapping bit rule: The lower bit corresponds with smaller channel. |
| 11321 | * it depends on Bit14 of basic_config_info |
| 11322 | * Total 24 channels for 5G |
| 11323 | * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 |
| 11324 | * Total 14 channels for 2G |
| 11325 | * 1 ~ 14 |
| 11326 | */ |
| 11327 | A_UINT32 channel; |
| 11328 | |
| 11329 | /** rate mapping bit rule: The lower bit corresponds with lower rate. |
| 11330 | * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition" |
| 11331 | * Legacy rates , 11b, 11g, 11A |
| 11332 | * 11n one stream ( ht20, ht40 ) 8+8 |
| 11333 | * 11n two streams ( ht20, ht40 ) 8+8 |
| 11334 | * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10 |
| 11335 | * 11ac two streams (vht20, vht40, vht80 ) 10+10+10 |
| 11336 | */ |
| 11337 | A_UINT32 rate0; |
| 11338 | /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true. |
| 11339 | * 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 |
| 11340 | */ |
| 11341 | |
| 11342 | /** 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 |
| 11343 | */ |
| 11344 | A_UINT32 rate1; |
| 11345 | } wmi_tpc_chainmask_config; |
| 11346 | |
| 11347 | #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/ |
| 11348 | #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/ |
| 11349 | |
| 11350 | typedef struct { |
| 11351 | A_UINT32 tlv_header; |
| 11352 | A_UINT32 enable; |
| 11353 | /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */ |
| 11354 | A_UINT32 num_tpc_chainmask_configs; |
| 11355 | /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */ |
| 11356 | } wmi_tpc_chainmask_config_cmd_fixed_param; |
| 11357 | |
| 11358 | typedef struct { |
| 11359 | A_UINT32 tlv_header; |
| 11360 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */ |
| 11361 | A_UINT32 data_len; |
| 11362 | /** length in byte of data[]. */ |
| 11363 | /* This structure is used to send REQ binary blobs |
| 11364 | * from application/service to firmware where Host drv is pass through . |
| 11365 | * Following this structure is the TLV: |
| 11366 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 11367 | */ |
| 11368 | } wmi_nan_cmd_param; |
| 11369 | |
| 11370 | typedef struct { |
| 11371 | A_UINT32 tlv_header; |
| 11372 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */ |
| 11373 | A_UINT32 data_len; |
| 11374 | /** length in byte of data[]. */ |
| 11375 | /* This structure is used to send REQ binary blobs |
| 11376 | * from firmware to application/service where Host drv is pass through . |
| 11377 | * Following this structure is the TLV: |
| 11378 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 11379 | */ |
| 11380 | } wmi_nan_event_hdr; |
| 11381 | |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11382 | /** |
| 11383 | * Event to indicate NAN discovery interface created |
| 11384 | */ |
| 11385 | typedef struct { |
| 11386 | /* |
| 11387 | * TLV tag and len; tag equals |
| 11388 | * WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param |
| 11389 | */ |
| 11390 | A_UINT32 tlv_header; |
| 11391 | /** Unique id identifying the VDEV */ |
| 11392 | A_UINT32 vdev_id; |
| 11393 | /** NAN interface MAC address */ |
| 11394 | wmi_mac_addr nan_interface_macaddr; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11395 | } wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE; |
| 11396 | |
| 11397 | #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] | 11398 | |
| 11399 | /** |
| 11400 | * Event to indicate NAN discovery interface deleted |
| 11401 | */ |
| 11402 | typedef struct { |
| 11403 | /* |
| 11404 | * TLV tag and len; tag equals |
| 11405 | * WMITLV_TAG_STRUC_wmi_nan_disc_iface_deleted_event_fixed_param |
| 11406 | */ |
| 11407 | A_UINT32 tlv_header; |
| 11408 | /** Unique id identifying the VDEV */ |
| 11409 | A_UINT32 vdev_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11410 | } wmi_nan_disc_iface_deleted_event_fixed_param_PROTOTYPE; |
| 11411 | |
| 11412 | #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] | 11413 | |
| 11414 | /** |
| 11415 | * Event to indicate NAN device started new cluster |
| 11416 | */ |
| 11417 | typedef struct { |
| 11418 | /* |
| 11419 | * TLV tag and len; tag equals |
| 11420 | * WMITLV_TAG_STRUC_wmi_nan_started_cluster_event_fixed_param |
| 11421 | */ |
| 11422 | A_UINT32 tlv_header; |
| 11423 | /** Unique id identifying the VDEV */ |
| 11424 | A_UINT32 vdev_id; |
| 11425 | /** NAN Cluster ID */ |
| 11426 | A_UINT32 nan_cluster_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11427 | } wmi_nan_started_cluster_event_fixed_param_PROTOTYPE; |
| 11428 | |
| 11429 | #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] | 11430 | |
| 11431 | /** |
| 11432 | * Event to indicate NAN device joined to cluster |
| 11433 | */ |
| 11434 | typedef struct { |
| 11435 | /* |
| 11436 | * TLV tag and len; tag equals |
| 11437 | * WMITLV_TAG_STRUC_wmi_nan_joined_cluster_event_fixed_param |
| 11438 | */ |
| 11439 | A_UINT32 tlv_header; |
| 11440 | /** Unique id identifying the VDEV */ |
| 11441 | A_UINT32 vdev_id; |
| 11442 | /** NAN Cluster ID */ |
| 11443 | A_UINT32 nan_cluster_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11444 | } wmi_nan_joined_cluster_event_fixed_param_PROTOTYPE; |
| 11445 | |
| 11446 | #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] | 11447 | |
| 11448 | /** NAN DATA CMD's */ |
| 11449 | |
| 11450 | /** |
| 11451 | * NAN Data get capabilities req |
| 11452 | */ |
| 11453 | typedef struct { |
| 11454 | /* |
| 11455 | * TLV tag and len; tag equals |
| 11456 | * WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param |
| 11457 | */ |
| 11458 | A_UINT32 tlv_header; |
| 11459 | /** unique id generated in upper layer for the transaction */ |
| 11460 | A_UINT32 transaction_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11461 | } wmi_ndi_get_cap_req_fixed_param_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11462 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11463 | #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] | 11464 | |
| 11465 | /** |
| 11466 | * NDP Response code |
| 11467 | */ |
| 11468 | typedef enum { |
| 11469 | NDP_RSP_CODE_REQUEST_ACCEPT = 0x00, |
| 11470 | NDP_RSP_CODE_REQUEST_REJECT = 0x01, |
| 11471 | NDP_RSP_CODE_REQUEST_DEFER = 0x02, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11472 | } wmi_ndp_rsp_code_PROTOTYPE; |
| 11473 | |
| 11474 | #define wmi_ndp_rsp_code wmi_ndp_rsp_code_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11475 | |
| 11476 | /** |
| 11477 | * NDP Initiator requesting a data session |
| 11478 | */ |
| 11479 | typedef struct { |
| 11480 | /* |
| 11481 | * TLV tag and len; tag equals |
| 11482 | * WMITLV_TAG_STRUC_wmi_ndp_initiator_req_fixed_param |
| 11483 | */ |
| 11484 | A_UINT32 tlv_header; |
| 11485 | /** Unique id identifying the VDEV */ |
| 11486 | A_UINT32 vdev_id; |
| 11487 | /** unique id generated in upper layer for the transaction */ |
| 11488 | A_UINT32 transaction_id; |
| 11489 | /** Unique Instance Id identifying the Responder's service */ |
| 11490 | A_UINT32 service_instance_id; |
| 11491 | /** Discovery MAC addr of the publisher/peer */ |
| 11492 | wmi_mac_addr peer_discovery_mac_addr; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11493 | /* Actual number of bytes in TLV ndp_cfg */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11494 | A_UINT32 ndp_cfg_len; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11495 | /* Actual number of bytes in TLV ndp_app_info */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11496 | A_UINT32 ndp_app_info_len; |
| 11497 | /** |
| 11498 | * TLV (tag length value ) parameters follow the ndp_initiator_req |
| 11499 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11500 | * wmi_channel channel; |
| 11501 | * A_UINT8 ndp_cfg[]; |
| 11502 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11503 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11504 | } wmi_ndp_initiator_req_fixed_param_PROTOTYPE; |
| 11505 | |
| 11506 | #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] | 11507 | |
| 11508 | /** |
| 11509 | * Initiate a data response on the responder side |
| 11510 | * for data request indication from the peer |
| 11511 | */ |
| 11512 | typedef struct { |
| 11513 | /* |
| 11514 | * TLV tag and len; tag equals |
| 11515 | * WMITLV_TAG_STRUC_wmi_ndp_responder_req_fixed_param |
| 11516 | */ |
| 11517 | A_UINT32 tlv_header; |
| 11518 | /** Unique id identifying the VDEV */ |
| 11519 | A_UINT32 vdev_id; |
| 11520 | /** unique id generated in upper layer for the transaction */ |
| 11521 | A_UINT32 transaction_id; |
| 11522 | /** |
| 11523 | * Unique token Id generated on the initiator/responder |
| 11524 | * side used for a NDP session between two NAN devices |
| 11525 | */ |
| 11526 | A_UINT32 ndp_instance_id; |
| 11527 | /** Response Code defined in wmi_ndp_rsp_code */ |
| 11528 | A_UINT32 rsp_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11529 | /** Number of bytes in TLV ndp_cfg */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11530 | A_UINT32 ndp_cfg_len; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11531 | /** Number of bytes in TLV ndp_app_info */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11532 | A_UINT32 ndp_app_info_len; |
| 11533 | /** |
| 11534 | * TLV (tag length value ) parameters follow the ndp_responder_req |
| 11535 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11536 | * A_UINT8 ndp_cfg[]; |
| 11537 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11538 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11539 | } wmi_ndp_responder_req_fixed_param_PROTOTYPE; |
| 11540 | |
| 11541 | #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] | 11542 | |
| 11543 | /** |
| 11544 | * NDP end type |
| 11545 | */ |
| 11546 | typedef enum { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11547 | WMI_NDP_END_TYPE_UNSPECIFIED = 0x00, |
| 11548 | WMI_NDP_END_TYPE_PEER_UNAVAILABLE = 0x01, |
| 11549 | WMI_NDP_END_TYPE_OTA_FRAME = 0x02, |
| 11550 | } wmi_ndp_end_type_PROTOTYPE; |
| 11551 | |
| 11552 | #define wmi_ndp_end_type wmi_ndp_end_type_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11553 | |
| 11554 | /** |
| 11555 | * NDP end reason code |
| 11556 | */ |
| 11557 | typedef enum { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11558 | WMI_NDP_END_REASON_UNSPECIFIED = 0x00, |
| 11559 | WMI_NDP_END_REASON_INACTIVITY = 0x01, |
| 11560 | WMI_NDP_END_REASON_PEER_DATA_END = 0x02, |
| 11561 | } wmi_ndp_end_reason_code_PROTOTYPE; |
| 11562 | |
| 11563 | #define wmi_ndp_end_reason_code wmi_ndp_end_reason_code_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11564 | |
| 11565 | /** |
| 11566 | * NDP end request |
| 11567 | */ |
| 11568 | typedef struct { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11569 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ndp_end_req */ |
| 11570 | A_UINT32 tlv_header; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11571 | /** NDP instance id */ |
| 11572 | A_UINT32 ndp_instance_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11573 | } wmi_ndp_end_req_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11574 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11575 | #define wmi_ndp_end_req wmi_ndp_end_req_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11576 | |
| 11577 | /** |
| 11578 | * NDP End request |
| 11579 | */ |
| 11580 | typedef struct { |
| 11581 | /* |
| 11582 | * TLV tag and len; tag equals |
| 11583 | * WMITLV_TAG_STRUC_wmi_ndp_end_req_fixed_param |
| 11584 | */ |
| 11585 | A_UINT32 tlv_header; |
| 11586 | /** unique id generated in upper layer for the transaction */ |
| 11587 | A_UINT32 transaction_id; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11588 | /** |
| 11589 | * TLV (tag length value ) parameters follow the ndp_end_req |
| 11590 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11591 | * wmi_ndp_end_req ndp_end_req_list[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11592 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11593 | } wmi_ndp_end_req_fixed_param_PROTOTYPE; |
| 11594 | |
| 11595 | #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] | 11596 | |
| 11597 | /* NAN DATA RSP EVENTS */ |
| 11598 | |
| 11599 | /** |
| 11600 | * Event to indicate NAN Data Interface capabilities cmd |
| 11601 | */ |
| 11602 | typedef struct { |
| 11603 | /* |
| 11604 | * TLV tag and len; tag equals |
| 11605 | * WMITLV_TAG_STRUC_wmi_ndi_cap_rsp_event_fixed_param |
| 11606 | */ |
| 11607 | A_UINT32 tlv_header; |
| 11608 | /** Copy of transaction_id received in wmi_ndi_get_cap_req */ |
| 11609 | A_UINT32 transaction_id; |
| 11610 | /** Max ndi interface support */ |
| 11611 | A_UINT32 max_ndi_interfaces; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11612 | /** Max ndp sessions can support */ |
| 11613 | A_UINT32 max_ndp_sessions; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11614 | /** Max number of peer's per ndi */ |
| 11615 | A_UINT32 max_peers_per_ndi; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11616 | } wmi_ndi_cap_rsp_event_fixed_param_PROTOTYPE; |
| 11617 | |
| 11618 | #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] | 11619 | |
| 11620 | /** |
| 11621 | * NDP command response code |
| 11622 | */ |
| 11623 | typedef enum { |
| 11624 | NDP_CMD_RSP_STATUS_SUCCESS = 0x00, |
| 11625 | NDP_CMD_RSP_STATUS_ERROR = 0x01, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11626 | } wmi_ndp_cmd_rsp_status_PROTOTYPE; |
| 11627 | |
| 11628 | #define wmi_ndp_cmd_rsp_status wmi_ndp_cmd_rsp_status_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11629 | |
| 11630 | /** |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11631 | * Event response for wmi_ndp_initiator_req |
| 11632 | */ |
| 11633 | typedef struct { |
| 11634 | /* |
| 11635 | * TLV tag and len; tag equals |
| 11636 | * WMITLV_TAG_STRUC_wmi_ndp_initiator_rsp_event_fixed_param |
| 11637 | */ |
| 11638 | A_UINT32 tlv_header; |
| 11639 | /** Unique id identifying the VDEV */ |
| 11640 | A_UINT32 vdev_id; |
| 11641 | /** Copy of transaction_id received in wmi_ndp_initiator_req */ |
| 11642 | A_UINT32 transaction_id; |
| 11643 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 11644 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11645 | A_UINT32 reason_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11646 | /* |
| 11647 | * Unique token Id generated on the initiator/responder |
| 11648 | * side used for a NDP session between two NAN devices |
| 11649 | */ |
| 11650 | A_UINT32 ndp_instance_id; |
| 11651 | } wmi_ndp_initiator_rsp_event_fixed_param_PROTOTYPE; |
| 11652 | |
| 11653 | #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] | 11654 | |
| 11655 | /** |
| 11656 | * Event response for wmi_ndp_responder_req cmd |
| 11657 | */ |
| 11658 | typedef struct { |
| 11659 | /* |
| 11660 | * TLV tag and len; tag equals |
| 11661 | * WMITLV_TAG_STRUC_wmi_ndp_responder_rsp_event_fixed_param |
| 11662 | */ |
| 11663 | A_UINT32 tlv_header; |
| 11664 | /** Unique id identifying the VDEV */ |
| 11665 | A_UINT32 vdev_id; |
| 11666 | /** Copy of transaction_id received in wmi_ndp_responder_req */ |
| 11667 | A_UINT32 transaction_id; |
| 11668 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 11669 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11670 | A_UINT32 reason_code; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11671 | /* |
| 11672 | * Unique token Id generated on the initiator/responder |
| 11673 | * side used for a NDP session between two NAN devices |
| 11674 | */ |
| 11675 | A_UINT32 ndp_instance_id; |
| 11676 | /* NDI mac address of the peer */ |
| 11677 | wmi_mac_addr peer_ndi_mac_addr; |
| 11678 | } wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE; |
| 11679 | |
| 11680 | #define wmi_ndp_responder_rsp_event_fixed_param wmi_ndp_responder_rsp_event_fixed_param_PROTOTYPE |
| 11681 | /** |
| 11682 | * Active ndp instance id |
| 11683 | */ |
| 11684 | typedef struct { |
| 11685 | /* |
| 11686 | * TLV tag and len; tag equals |
| 11687 | * WMITLV_TAG_STRUC_wmi_active_ndp_instance_id |
| 11688 | */ |
| 11689 | A_UINT32 tlv_header; |
| 11690 | /* NDP instance id */ |
| 11691 | A_UINT32 ndp_instance_id; |
| 11692 | } wmi_active_ndp_instance_id_PROTOTYPE; |
| 11693 | |
| 11694 | #define wmi_active_ndp_instance_id wmi_active_ndp_instance_id_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11695 | |
| 11696 | /** |
| 11697 | * NDP end response per ndi |
| 11698 | */ |
| 11699 | typedef struct { |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11700 | /* |
| 11701 | * TLV tag and len; tag equals |
| 11702 | * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_per_ndi |
| 11703 | */ |
| 11704 | A_UINT32 tlv_header; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11705 | /** Unique id identifying the VDEV */ |
| 11706 | A_UINT32 vdev_id; |
| 11707 | /** Peer MAC addr */ |
| 11708 | wmi_mac_addr peer_mac_addr; |
| 11709 | /** Number of active ndps on this ndi */ |
| 11710 | A_UINT32 num_active_ndps_on_ndi; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11711 | } wmi_ndp_end_rsp_per_ndi_PROTOTYPE; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11712 | |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11713 | #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] | 11714 | |
| 11715 | /** |
| 11716 | * Event response for wmi_ndp_end_req cmd |
| 11717 | */ |
| 11718 | typedef struct { |
| 11719 | /* |
| 11720 | * TLV tag and len; tag equals |
| 11721 | * WMITLV_TAG_STRUC_wmi_ndp_end_rsp_event_fixed_param |
| 11722 | */ |
| 11723 | A_UINT32 tlv_header; |
| 11724 | /** Copy of transaction_id received in wmi_ndp_end_req */ |
| 11725 | A_UINT32 transaction_id; |
| 11726 | /** Response status defined in wmi_ndp_cmd_rsp_status*/ |
| 11727 | A_UINT32 rsp_status; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11728 | A_UINT32 reason_code; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11729 | /** |
| 11730 | * TLV (tag length value ) parameters follow the ndp_end_rsp |
| 11731 | * structure. The TLV's are: |
| 11732 | * wmi_ndp_end_rsp_per_ndi ndp_end_rsp_per_ndis[]; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11733 | * wmi_active_ndp_instance_id active_ndp_instances_id[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11734 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11735 | } wmi_ndp_end_rsp_event_fixed_param_PROTOTYPE; |
| 11736 | |
| 11737 | #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] | 11738 | |
| 11739 | /** NAN DATA EVENTS */ |
| 11740 | |
| 11741 | /** |
| 11742 | * NDP self role |
| 11743 | */ |
| 11744 | typedef enum { |
| 11745 | WMI_NDP_INITIATOR_ROLE, |
| 11746 | WMI_NDP_RESPONDER_ROLE, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11747 | } wmi_ndp_self_role_PROTOTYPE; |
| 11748 | |
| 11749 | #define wmi_ndp_self_role wmi_ndp_self_role_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11750 | |
| 11751 | /** |
| 11752 | * NDP accept policy |
| 11753 | */ |
| 11754 | typedef enum { |
| 11755 | WMI_NDP_ACCEPT_POLICY_NONE, |
| 11756 | WMI_NDP_ACCEPT_POLICY_ALL, |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11757 | } wmi_ndp_accept_policy_PROTOTYPE; |
| 11758 | |
| 11759 | #define wmi_ndp_accept_policy wmi_ndp_accept_policy_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11760 | |
| 11761 | /** |
| 11762 | * Event indication received on the responder side when a NDP Initiator request/ |
| 11763 | * NDP session is initiated on the Initiator side |
| 11764 | * (self role will be NDP_RESPONDER_ROLE) |
| 11765 | * |
| 11766 | * Event indication received on the initiator side when a |
| 11767 | * NDP responder request on the Initiator side |
| 11768 | * (self role will be NDP_INITIATOR_ROLE) |
| 11769 | */ |
| 11770 | typedef struct { |
| 11771 | /* |
| 11772 | * TLV tag and len; tag equals |
| 11773 | * WMITLV_TAG_STRUC_wmi_ndp_indication_event_fixed_param |
| 11774 | */ |
| 11775 | A_UINT32 tlv_header; |
| 11776 | /** Unique id identifying the VDEV */ |
| 11777 | A_UINT32 vdev_id; |
| 11778 | /** Self NDP Role defined in wmi_ndp_self_role */ |
| 11779 | A_UINT32 self_ndp_role; |
| 11780 | /** Accept policy defined in wmi_ndp_accept_policy */ |
| 11781 | A_UINT32 accept_policy; |
| 11782 | /** Unique Instance Id corresponding to a service/session. */ |
| 11783 | A_UINT32 service_instance_id; |
| 11784 | /** Discovery MAC addr of the peer/initiator */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11785 | wmi_mac_addr peer_discovery_mac_addr; |
| 11786 | /* NDI mac address of the peer */ |
| 11787 | wmi_mac_addr peer_ndi_mac_addr; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11788 | /** |
| 11789 | * Unique token Id generated on the initiator/responder |
| 11790 | * side used for a NDP session between two NAN devices |
| 11791 | */ |
| 11792 | A_UINT32 ndp_instance_id; |
| 11793 | /** Number of bytes in TLV wmi_ndp_cfg */ |
| 11794 | A_UINT32 ndp_cfg_len; |
| 11795 | /** Number of bytes in TLV wmi_ndp_app_info */ |
| 11796 | A_UINT32 ndp_app_info_len; |
| 11797 | /** |
| 11798 | * TLV (tag length value ) parameters follow the ndp_indication |
| 11799 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11800 | * A_UINT8 ndp_cfg[]; |
| 11801 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11802 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11803 | } wmi_ndp_indication_event_fixed_param_PROTOTYPE; |
| 11804 | |
| 11805 | #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] | 11806 | |
| 11807 | /** |
| 11808 | * Event indication of data confirm is received on both |
| 11809 | * initiator and responder side confirming a NDP session |
| 11810 | */ |
| 11811 | typedef struct { |
| 11812 | /* |
| 11813 | * TLV tag and len; tag equals |
| 11814 | * WMITLV_TAG_STRUC_wmi_ndp_confirm_event_fixed_param |
| 11815 | */ |
| 11816 | A_UINT32 tlv_header; |
| 11817 | /** Unique id identifying the VDEV */ |
| 11818 | A_UINT32 vdev_id; |
| 11819 | /** |
| 11820 | * Unique token Id generated on the initiator/responder |
| 11821 | * side used for a NDP session between two NAN devices |
| 11822 | */ |
| 11823 | A_UINT32 ndp_instance_id; |
| 11824 | /* |
| 11825 | * NDI mac address of the peer |
| 11826 | * (required to derive target ipv6 address) |
| 11827 | */ |
| 11828 | wmi_mac_addr peer_ndi_mac_addr; |
| 11829 | /** Response Code defined in wmi_ndp_rsp_code */ |
| 11830 | A_UINT32 rsp_code; |
| 11831 | /** Number of bytes in TLV wmi_ndp_cfg */ |
| 11832 | A_UINT32 ndp_cfg_len; |
| 11833 | /** Number of bytes in TLV wmi_ndp_app_info */ |
| 11834 | A_UINT32 ndp_app_info_len; |
Anurag Chouhan | b36db51 | 2016-04-27 16:13:35 +0530 | [diff] [blame] | 11835 | /** Reason Code */ |
| 11836 | A_UINT32 reason_code; |
| 11837 | /** Number of active ndps on this peer */ |
| 11838 | A_UINT32 num_active_ndps_on_peer; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11839 | /** |
| 11840 | * TLV (tag length value ) parameters follow the ndp_confirm |
| 11841 | * structure. The TLV's are: |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11842 | * A_UINT8 ndp_cfg[]; |
| 11843 | * A_UINT8 ndp_app_info[]; |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11844 | */ |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11845 | } wmi_ndp_confirm_event_fixed_param_PROTOTYPE; |
| 11846 | |
| 11847 | #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] | 11848 | |
| 11849 | /** |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11850 | * Event indication received on the initiator/responder side terminating a NDP session |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11851 | */ |
| 11852 | typedef struct { |
| 11853 | /* |
| 11854 | * TLV tag and len; tag equals |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11855 | * WMITLV_TAG_STRUC_wmi_ndp_end_indication |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11856 | */ |
| 11857 | A_UINT32 tlv_header; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11858 | /** type defined in wmi_ndp_end_type */ |
| 11859 | A_UINT32 type; |
| 11860 | /* Unique id identifying the VDEV */ |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11861 | A_UINT32 vdev_id; |
Anurag Chouhan | 08f66c6 | 2016-04-18 17:14:51 +0530 | [diff] [blame] | 11862 | /** reason_code defined in wmi_ndp_end_reason_code */ |
| 11863 | A_UINT32 reason_code; |
| 11864 | /** NDP instance id */ |
| 11865 | A_UINT32 ndp_instance_id; |
| 11866 | /* NDI MAC addr of the peer */ |
| 11867 | wmi_mac_addr peer_ndi_mac_addr; |
| 11868 | /* Number of active ndps on this peer */ |
| 11869 | A_UINT32 num_active_ndps_on_peer; |
| 11870 | } wmi_ndp_end_indication_PROTOTYPE; |
| 11871 | |
| 11872 | #define wmi_ndp_end_indication wmi_ndp_end_indication_PROTOTYPE |
Govind Singh | 941bd5e | 2016-02-04 17:15:25 +0530 | [diff] [blame] | 11873 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11874 | typedef struct { |
| 11875 | A_UINT32 tlv_header; |
| 11876 | A_UINT32 num_data; |
| 11877 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 11878 | } wmi_diag_data_container_event_fixed_param; |
| 11879 | |
| 11880 | enum { |
| 11881 | WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0, |
| 11882 | WMI_PDEV_PARAM_TXPOWER_REASON_SAR, |
| 11883 | WMI_PDEV_PARAM_TXPOWER_REASON_MAX |
| 11884 | }; |
| 11885 | |
| 11886 | #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF |
| 11887 | #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0 |
| 11888 | |
| 11889 | #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00 |
| 11890 | #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8 |
| 11891 | |
| 11892 | #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \ |
| 11893 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT)) |
| 11894 | |
| 11895 | #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \ |
| 11896 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT)) |
| 11897 | |
| 11898 | #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \ |
| 11899 | (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT) |
| 11900 | |
| 11901 | #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \ |
| 11902 | (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT) |
| 11903 | |
| 11904 | /** |
| 11905 | * This command is sent from WLAN host driver to firmware to |
| 11906 | * notify the current modem power state. Host would receive a |
| 11907 | * message from modem when modem is powered on. Host driver |
| 11908 | * would then send this command to firmware. Firmware would then |
| 11909 | * power on WCI-2 (UART) interface for LTE/MWS Coex. |
| 11910 | * |
| 11911 | * This command is only applicable for APQ platform which has |
| 11912 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 11913 | * this command can be dropped by firmware. |
| 11914 | * |
| 11915 | * This is a requirement from modem team that WCN can't toggle |
| 11916 | * UART before modem is powered on. |
| 11917 | */ |
| 11918 | typedef struct { |
| 11919 | /** TLV tag and len; tag equals |
| 11920 | * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */ |
| 11921 | A_UINT32 tlv_header; |
| 11922 | |
| 11923 | /** Modem power state parameter */ |
| 11924 | A_UINT32 modem_power_state; |
| 11925 | } wmi_modem_power_state_cmd_param; |
| 11926 | |
| 11927 | enum { |
| 11928 | WMI_MODEM_STATE_OFF = 0, |
| 11929 | WMI_MODEM_STATE_ON |
| 11930 | }; |
| 11931 | |
| 11932 | #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */ |
| 11933 | #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */ |
| 11934 | |
| 11935 | /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic |
| 11936 | generated whenever firmware roamed to new AP silently and |
| 11937 | (a) If the host is awake, FW sends the event to the host immediately . |
| 11938 | (b) If host is in sleep then either |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 11939 | (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] | 11940 | 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] | 11941 | (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] | 11942 | */ |
| 11943 | |
| 11944 | typedef struct { |
| 11945 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */ |
| 11946 | A_UINT32 tlv_header; |
| 11947 | |
| 11948 | A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */ |
| 11949 | A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */ |
| 11950 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; |
| 11951 | } wmi_key_material; |
| 11952 | |
| 11953 | typedef struct { |
| 11954 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */ |
| 11955 | /** Unique id identifying the VDEV on which roaming is done by firmware */ |
| 11956 | A_UINT32 vdev_id; |
| 11957 | /** auth_status: connected or authorized */ |
| 11958 | A_UINT32 auth_status; |
| 11959 | /* |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 11960 | * roam_reason: |
| 11961 | * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX |
| 11962 | * 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] | 11963 | */ |
| 11964 | A_UINT32 roam_reason; |
| 11965 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */ |
| 11966 | A_UINT32 rssi; |
| 11967 | /** MAC address of roamed AP */ |
| 11968 | wmi_mac_addr bssid; /* BSSID */ |
| 11969 | /** whether the frame is beacon or probe rsp */ |
| 11970 | A_UINT32 is_beacon; |
| 11971 | /** the length of beacon/probe rsp */ |
| 11972 | A_UINT32 bcn_probe_rsp_len; |
| 11973 | /** the length of reassoc rsp */ |
| 11974 | A_UINT32 reassoc_rsp_len; |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 11975 | /** the length of reassoc req */ |
| 11976 | A_UINT32 reassoc_req_len; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11977 | /** |
| 11978 | * TLV (tag length value ) parameters follows roam_synch_event |
| 11979 | * The TLV's are: |
| 11980 | * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len |
| 11981 | * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len |
| 11982 | * wmi_channel chan; |
| 11983 | * wmi_key_material key; |
| 11984 | * A_UINT32 status; subnet changed status not being used |
| 11985 | * currently. will pass the information using roam_status. |
Manikandan Mohan | 3072808 | 2015-12-09 12:35:24 -0800 | [diff] [blame] | 11986 | * A_UINT8 reassoc_req_frame[]; length identified by reassoc_req_len |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 11987 | **/ |
| 11988 | } wmi_roam_synch_event_fixed_param; |
| 11989 | |
| 11990 | #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF |
| 11991 | |
| 11992 | typedef struct { |
| 11993 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */ |
| 11994 | A_UINT32 tlv_header; |
| 11995 | /** MAC address of the peer for which the estimated link speed is required. */ |
| 11996 | wmi_mac_addr peer_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 11997 | /* Set to 1 only if vdev_id field is valid */ |
| 11998 | A_UINT32 valid_vdev_id; |
| 11999 | /* VDEV to which the peer belongs to */ |
| 12000 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12001 | } wmi_peer_get_estimated_linkspeed_cmd_fixed_param; |
| 12002 | |
| 12003 | typedef struct { |
| 12004 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */ |
| 12005 | A_UINT32 tlv_header; |
| 12006 | /** MAC address of the peer for which the estimated link speed is required. |
| 12007 | */ |
| 12008 | wmi_mac_addr peer_macaddr; |
| 12009 | /* Estimated link speed in kbps. |
| 12010 | * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID. |
| 12011 | */ |
| 12012 | A_UINT32 est_linkspeed_kbps; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 12013 | /* Set to 1 only if vdev_id field is valid */ |
| 12014 | A_UINT32 valid_vdev_id; |
| 12015 | /* VDEV to which the peer belongs to */ |
| 12016 | A_UINT32 vdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12017 | } wmi_peer_estimated_linkspeed_event_fixed_param; |
| 12018 | |
| 12019 | typedef struct { |
| 12020 | A_UINT32 tlv_header; /* TLV tag and len; tag equals */ |
| 12021 | /* vdev ID */ |
| 12022 | A_UINT32 vdev_id; |
| 12023 | A_UINT32 data_len; |
| 12024 | /** length in byte of data[]. */ |
| 12025 | /* This structure is used to send REQ binary blobs |
| 12026 | * from application/service to firmware where Host drv is pass through . |
| 12027 | * Following this structure is the TLV: |
| 12028 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 12029 | */ |
| 12030 | } wmi_req_stats_ext_cmd_fixed_param; |
| 12031 | |
| 12032 | typedef struct { |
| 12033 | A_UINT32 tlv_header; |
| 12034 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */ |
| 12035 | A_UINT32 vdev_id; |
| 12036 | /** vdev ID */ |
| 12037 | A_UINT32 data_len; |
| 12038 | /** length in byte of data[]. */ |
| 12039 | /* This structure is used to send REQ binary blobs |
| 12040 | * from firmware to application/service where Host drv is pass through . |
| 12041 | * Following this structure is the TLV: |
| 12042 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 12043 | */ |
| 12044 | } wmi_stats_ext_event_fixed_param; |
| 12045 | |
| 12046 | typedef struct { |
Manikandan Mohan | 429a078 | 2015-12-23 14:35:54 -0800 | [diff] [blame] | 12047 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param */ |
| 12048 | /** unique id identifying the VDEV, generated by the caller */ |
| 12049 | A_UINT32 vdev_id; |
| 12050 | /** peer MAC address */ |
| 12051 | wmi_mac_addr peer_macaddr; |
| 12052 | } wmi_peer_delete_resp_event_fixed_param; |
| 12053 | |
| 12054 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12055 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */ |
| 12056 | A_UINT32 tlv_header; |
| 12057 | A_UINT32 vdev_id; /* vdev ID */ |
| 12058 | /* MAC address of the peer for which the estimated link speed is required. */ |
| 12059 | wmi_mac_addr peer_macaddr; |
| 12060 | A_UINT32 state; /* peer state */ |
| 12061 | } wmi_peer_state_event_fixed_param; |
| 12062 | |
| 12063 | typedef struct { |
| 12064 | /* |
| 12065 | * TLV tag and len; tag equals |
| 12066 | * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param |
| 12067 | */ |
| 12068 | A_UINT32 tlv_header; |
| 12069 | /* unique id identifying the VDEV, generated by the caller */ |
| 12070 | A_UINT32 vdev_id; |
| 12071 | /* peer MAC address */ |
| 12072 | wmi_mac_addr peer_macaddr; |
| 12073 | } wmi_peer_assoc_conf_event_fixed_param; |
| 12074 | |
| 12075 | enum { |
| 12076 | WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, |
| 12077 | /** scan_type: passive */ |
| 12078 | WMI_2G4_HT40_OBSS_SCAN_ACTIVE, |
| 12079 | /** scan_type: active */ |
| 12080 | }; |
| 12081 | |
| 12082 | typedef struct { |
| 12083 | /** |
| 12084 | * TLV tag and len; |
| 12085 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param |
| 12086 | */ |
| 12087 | A_UINT32 tlv_header; |
| 12088 | A_UINT32 vdev_id; |
| 12089 | /** |
| 12090 | * active or passive. if active all the channels are actively scanned. |
| 12091 | * if passive then all the channels are passively scanned |
| 12092 | */ |
| 12093 | A_UINT32 scan_type; |
| 12094 | /** |
| 12095 | * FW can perform multiple scans with in a OBSS scan interval. |
| 12096 | * For each scan, |
| 12097 | * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel , |
| 12098 | * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel . |
| 12099 | * The unit for these 2 parameters is TUs. |
| 12100 | */ |
| 12101 | A_UINT32 obss_scan_passive_dwell; |
| 12102 | A_UINT32 obss_scan_active_dwell; |
| 12103 | /** |
| 12104 | * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the |
| 12105 | * both min and total per channel dwell time requirement |
| 12106 | */ |
| 12107 | A_UINT32 bss_channel_width_trigger_scan_interval; |
| 12108 | /** |
| 12109 | * FW can perform multiple scans with in a OBSS scan interval. |
| 12110 | * For each scan, |
| 12111 | * the total per channel dwell time across all scans with in OBSS scan interval should be |
| 12112 | * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel |
| 12113 | * for active scans and , |
| 12114 | * The unit for these 2 parameters is TUs. |
| 12115 | */ |
| 12116 | A_UINT32 obss_scan_passive_total_per_channel; |
| 12117 | A_UINT32 obss_scan_active_total_per_channel; |
| 12118 | A_UINT32 bss_width_channel_transition_delay_factor; |
| 12119 | /** parameter to check exemption from scan */ |
| 12120 | A_UINT32 obss_scan_activity_threshold; |
| 12121 | /** parameter to check exemption from scan */ |
| 12122 | /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */ |
| 12123 | A_UINT32 forty_mhz_intolerant; |
| 12124 | /** STA 40M bandwidth intolerant capability */ |
| 12125 | A_UINT32 current_operating_class; |
| 12126 | /** STA current operating class */ |
| 12127 | /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */ |
| 12128 | A_UINT32 channel_len; |
| 12129 | /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */ |
| 12130 | A_UINT32 ie_len; |
| 12131 | } wmi_obss_scan_enable_cmd_fixed_param; |
| 12132 | |
| 12133 | typedef struct { |
| 12134 | /** |
| 12135 | * TLV tag and len; |
| 12136 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param |
| 12137 | */ |
| 12138 | A_UINT32 tlv_header; |
| 12139 | A_UINT32 vdev_id; |
| 12140 | } wmi_obss_scan_disable_cmd_fixed_param; |
| 12141 | |
| 12142 | typedef struct { |
| 12143 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */ |
| 12144 | A_UINT32 tlv_header; |
| 12145 | /** unique id identifying the VDEV */ |
| 12146 | A_UINT32 vdev_id; |
| 12147 | /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 12148 | A_UINT32 tx_status; |
| 12149 | } wmi_offload_prb_rsp_tx_status_event_fixed_param; |
| 12150 | |
| 12151 | typedef enum { |
| 12152 | WMI_FRAME_TX_OK, /* frame tx ok */ |
| 12153 | WMI_FRAME_TX_XRETRY, /* excessivley retried */ |
| 12154 | WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */ |
| 12155 | WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */ |
| 12156 | } WMI_FRAME_TX_STATUS; |
| 12157 | |
| 12158 | /** |
| 12159 | * This command is sent from WLAN host driver to firmware to |
| 12160 | * request firmware to send the latest channel avoidance range |
| 12161 | * to host. |
| 12162 | * |
| 12163 | * This command is only applicable for APQ platform which has |
| 12164 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 12165 | * this command can be dropped by firmware. |
| 12166 | * |
| 12167 | * Host would send this command to firmware to request a channel |
| 12168 | * avoidance information update. |
| 12169 | */ |
| 12170 | typedef struct { |
| 12171 | /** TLV tag and len; tag equals |
| 12172 | * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */ |
| 12173 | A_UINT32 tlv_header; |
| 12174 | } wmi_chan_avoid_update_cmd_param; |
| 12175 | |
| 12176 | /* ExtScan operation mode */ |
| 12177 | typedef enum { |
| 12178 | WMI_EXTSCAN_MODE_NONE = 0x0000, |
| 12179 | WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */ |
| 12180 | WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */ |
| 12181 | WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */ |
| 12182 | } wmi_extscan_operation_mode; |
| 12183 | |
| 12184 | /* Channel Mask */ |
| 12185 | typedef enum { |
| 12186 | WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000, |
| 12187 | WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */ |
| 12188 | WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */ |
| 12189 | WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */ |
| 12190 | } wmi_channel_band_mask; |
| 12191 | |
| 12192 | typedef enum { |
| 12193 | WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001, |
| 12194 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002, |
| 12195 | WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004, |
| 12196 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008, |
| 12197 | WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010, |
| 12198 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020, |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 12199 | WMI_EXTSCAN_THRESHOLD_NUM_SCANS = 0x0040, |
| 12200 | WMI_EXTSCAN_THRESHOLD_PERCENT = 0x0080, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12201 | |
| 12202 | WMI_EXTSCAN_EVENT_MAX = 0x8000 |
| 12203 | } wmi_extscan_event_type; |
| 12204 | |
| 12205 | #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \ |
| 12206 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT) |
| 12207 | |
| 12208 | #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \ |
| 12209 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \ |
| 12210 | WMI_EXTSCAN_BUCKET_FAILED_EVENT | \ |
| 12211 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT) |
| 12212 | |
| 12213 | typedef enum { |
| 12214 | WMI_EXTSCAN_NO_FORWARDING = 0x0000, |
| 12215 | WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001 |
| 12216 | } wmi_extscan_forwarding_flags; |
| 12217 | |
| 12218 | typedef enum { |
| 12219 | /* Use Motion Sensor Detection */ |
| 12220 | WMI_EXTSCAN_USE_MSD = 0x0001, |
| 12221 | /* Extscan LPASS extended batching feature is supported and enabled */ |
| 12222 | WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, |
| 12223 | } wmi_extscan_configuration_flags; |
| 12224 | typedef enum { |
| 12225 | /* |
| 12226 | * Cache the results of bucket whose |
| 12227 | * configuration flags has this bit set |
| 12228 | */ |
| 12229 | WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 12230 | /* Report ext scan results to context hub or not.*/ |
| 12231 | WMI_EXTSCAN_REPORT_EVENT_CONTEXT_HUB = 0x0002, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12232 | } wmi_extscan_bucket_configuration_flags; |
| 12233 | |
| 12234 | typedef enum { |
| 12235 | WMI_EXTSCAN_STATUS_OK = 0, |
| 12236 | WMI_EXTSCAN_STATUS_ERROR = 0x80000000, |
| 12237 | WMI_EXTSCAN_STATUS_INVALID_PARAMETERS, |
| 12238 | WMI_EXTSCAN_STATUS_INTERNAL_ERROR |
| 12239 | } wmi_extscan_start_stop_status; |
| 12240 | |
| 12241 | typedef struct { |
| 12242 | /** Request ID - to identify command. Cannot be 0 */ |
| 12243 | A_UINT32 request_id; |
| 12244 | /** Requestor ID - client requesting ExtScan */ |
| 12245 | A_UINT32 requestor_id; |
| 12246 | /** VDEV id(interface) that is requesting scan */ |
| 12247 | A_UINT32 vdev_id; |
| 12248 | } wmi_extscan_command_id; |
| 12249 | |
| 12250 | typedef struct { |
| 12251 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12252 | /** channel number */ |
| 12253 | A_UINT32 channel; |
| 12254 | |
| 12255 | /** dwell time in msec - use defaults if 0 */ |
| 12256 | A_UINT32 min_dwell_time; |
| 12257 | A_UINT32 max_dwell_time; |
| 12258 | /** passive/active channel and other flags */ |
| 12259 | A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */ |
| 12260 | } wmi_extscan_bucket_channel; |
| 12261 | |
| 12262 | /* Scan Bucket specification */ |
| 12263 | typedef struct { |
| 12264 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12265 | /** Bucket ID - 0-based */ |
| 12266 | A_UINT32 bucket_id; |
| 12267 | /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */ |
| 12268 | A_UINT32 notify_extscan_events; |
| 12269 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 12270 | A_UINT32 forwarding_flags; |
| 12271 | /* |
| 12272 | * ExtScan configuration flags - |
| 12273 | * wmi_extscan__bucket_configuration_flags |
| 12274 | */ |
| 12275 | A_UINT32 configuration_flags; |
| 12276 | /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */ |
| 12277 | A_UINT32 base_period_multiplier; |
| 12278 | /** dwell time in msec on active channels - use defaults if 0 */ |
| 12279 | A_UINT32 min_dwell_time_active; |
| 12280 | A_UINT32 max_dwell_time_active; |
| 12281 | /** dwell time in msec on passive channels - use defaults if 0 */ |
| 12282 | A_UINT32 min_dwell_time_passive; |
| 12283 | A_UINT32 max_dwell_time_passive; |
| 12284 | /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */ |
| 12285 | A_UINT32 channel_band; |
| 12286 | /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */ |
| 12287 | A_UINT32 num_channels; |
| 12288 | /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */ |
| 12289 | A_UINT32 min_period; |
| 12290 | /** period above which exponent is not applied anymore */ |
| 12291 | A_UINT32 max_period; |
| 12292 | /** |
| 12293 | * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles |
| 12294 | * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff |
| 12295 | */ |
| 12296 | A_UINT32 exp_backoff; |
| 12297 | /** number of scans performed at a given periodicity after which exponential back off value is |
| 12298 | * applied to current periodicity to obtain a newer one |
| 12299 | */ |
| 12300 | A_UINT32 exp_max_step_count; |
| 12301 | /** Followed by the variable length TLV chan_list: |
| 12302 | * wmi_extscan_bucket_channel chan_list[] */ |
| 12303 | } wmi_extscan_bucket; |
| 12304 | |
| 12305 | typedef struct { |
| 12306 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */ |
| 12307 | /** Request ID - to identify command. Cannot be 0 */ |
| 12308 | A_UINT32 request_id; |
| 12309 | /** Requestor ID - client requesting ExtScan */ |
| 12310 | A_UINT32 requestor_id; |
| 12311 | /** VDEV id(interface) that is requesting scan */ |
| 12312 | A_UINT32 vdev_id; |
| 12313 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12314 | A_UINT32 table_id; |
| 12315 | /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */ |
| 12316 | A_UINT32 base_period; |
| 12317 | /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */ |
| 12318 | A_UINT32 max_iterations; |
| 12319 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 12320 | A_UINT32 forwarding_flags; |
| 12321 | /** ExtScan configuration flags - wmi_extscan_configuration_flags */ |
| 12322 | A_UINT32 configuration_flags; |
| 12323 | /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */ |
| 12324 | A_UINT32 notify_extscan_events; |
| 12325 | /** Scan Priority, input to scan scheduler */ |
| 12326 | A_UINT32 scan_priority; |
| 12327 | /** Maximum number of BSSIDs to cache on each scan cycle */ |
| 12328 | A_UINT32 max_bssids_per_scan_cycle; |
| 12329 | /** Minimum RSSI value to report */ |
| 12330 | A_UINT32 min_rssi; |
| 12331 | /** Maximum table usage in percentage */ |
| 12332 | A_UINT32 max_table_usage; |
| 12333 | /** default dwell time in msec on active channels */ |
| 12334 | A_UINT32 min_dwell_time_active; |
| 12335 | A_UINT32 max_dwell_time_active; |
| 12336 | /** default dwell time in msec on passive channels */ |
| 12337 | A_UINT32 min_dwell_time_passive; |
| 12338 | A_UINT32 max_dwell_time_passive; |
| 12339 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 12340 | A_UINT32 min_rest_time; |
| 12341 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 12342 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 12343 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 12344 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 12345 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 12346 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 12347 | */ |
| 12348 | A_UINT32 max_rest_time; |
| 12349 | /** time before sending next set of probe requests. |
| 12350 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 12351 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 12352 | */ |
| 12353 | /** Max number of probes to be sent */ |
| 12354 | A_UINT32 n_probes; |
| 12355 | /** time in msec between 2 sets of probe requests. */ |
| 12356 | A_UINT32 repeat_probe_time; |
| 12357 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 12358 | A_UINT32 probe_spacing_time; |
| 12359 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 12360 | A_UINT32 idle_time; |
| 12361 | /** maximum time in msec allowed for scan */ |
| 12362 | A_UINT32 max_scan_time; |
| 12363 | /** delay in msec before sending first probe request after switching to a channel */ |
| 12364 | A_UINT32 probe_delay; |
| 12365 | /** Scan control flags */ |
| 12366 | A_UINT32 scan_ctrl_flags; |
| 12367 | /** Burst duration time in msec*/ |
| 12368 | A_UINT32 burst_duration; |
| 12369 | |
| 12370 | /** number of bssids in the TLV bssid_list[] */ |
| 12371 | A_UINT32 num_bssid; |
| 12372 | /** number of ssid in the TLV ssid_list[] */ |
| 12373 | A_UINT32 num_ssids; |
| 12374 | /** number of bytes in TLV ie_data[] */ |
| 12375 | A_UINT32 ie_len; |
| 12376 | /** number of buckets in the TLV bucket_list[] */ |
| 12377 | A_UINT32 num_buckets; |
| 12378 | /** in number of scans, send notifications to host after these many scans */ |
| 12379 | A_UINT32 report_threshold_num_scans; |
| 12380 | |
| 12381 | /** number of channels in channel_list[] determined by the |
| 12382 | sum of wmi_extscan_bucket.num_channels in array */ |
| 12383 | |
| 12384 | /** |
| 12385 | * TLV (tag length value ) parameters follow the extscan_cmd |
| 12386 | * structure. The TLV's are: |
| 12387 | * wmi_ssid ssid_list[]; |
| 12388 | * wmi_mac_addr bssid_list[]; |
| 12389 | * A_UINT8 ie_data[]; |
| 12390 | * wmi_extscan_bucket bucket_list[]; |
| 12391 | * wmi_extscan_bucket_channel channel_list[]; |
| 12392 | */ |
| 12393 | } wmi_extscan_start_cmd_fixed_param; |
| 12394 | |
| 12395 | typedef struct { |
| 12396 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */ |
| 12397 | /** Request ID - to match running command. 0 matches any request */ |
| 12398 | A_UINT32 request_id; |
| 12399 | /** Requestor ID - client requesting stop */ |
| 12400 | A_UINT32 requestor_id; |
| 12401 | /** VDEV id(interface) that is requesting scan */ |
| 12402 | A_UINT32 vdev_id; |
| 12403 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12404 | A_UINT32 table_id; |
| 12405 | } wmi_extscan_stop_cmd_fixed_param; |
| 12406 | |
| 12407 | enum wmi_extscan_get_cached_results_flags { |
| 12408 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000, |
| 12409 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001 |
| 12410 | }; |
| 12411 | |
| 12412 | typedef struct { |
| 12413 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */ |
| 12414 | /** request ID - used to correlate command with events */ |
| 12415 | A_UINT32 request_id; |
| 12416 | /** Requestor ID - client that requested results */ |
| 12417 | A_UINT32 requestor_id; |
| 12418 | /** VDEV id(interface) that is requesting scan */ |
| 12419 | A_UINT32 vdev_id; |
| 12420 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12421 | A_UINT32 table_id; |
| 12422 | /** maximum number of results to be returned */ |
| 12423 | A_UINT32 max_results; |
| 12424 | /** flush BSSID list - wmi_extscan_get_cached_results_flags */ |
| 12425 | A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */ |
| 12426 | } wmi_extscan_get_cached_results_cmd_fixed_param; |
| 12427 | |
| 12428 | typedef struct { |
| 12429 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */ |
| 12430 | /** request ID - used to correlate command with events */ |
| 12431 | A_UINT32 request_id; |
| 12432 | /** Requestor ID - client that requested results */ |
| 12433 | A_UINT32 requestor_id; |
| 12434 | /** VDEV id(interface) that is requesting scan */ |
| 12435 | A_UINT32 vdev_id; |
| 12436 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12437 | A_UINT32 table_id; |
| 12438 | } wmi_extscan_get_wlan_change_results_cmd_fixed_param; |
| 12439 | |
| 12440 | typedef struct { |
| 12441 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12442 | /**bssid */ |
| 12443 | wmi_mac_addr bssid; |
| 12444 | /**channel number */ |
| 12445 | A_UINT32 channel; |
| 12446 | /**upper RSSI limit */ |
| 12447 | A_UINT32 upper_rssi_limit; |
| 12448 | /**lower RSSI limit */ |
| 12449 | A_UINT32 lower_rssi_limit; |
| 12450 | } wmi_extscan_wlan_change_bssid_param; |
| 12451 | |
| 12452 | typedef struct { |
| 12453 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */ |
| 12454 | /** Request ID - to identify command. Cannot be 0 */ |
| 12455 | A_UINT32 request_id; |
| 12456 | /** Requestor ID - client requesting wlan change monitoring */ |
| 12457 | A_UINT32 requestor_id; |
| 12458 | /** VDEV id(interface) that is requesting scan */ |
| 12459 | A_UINT32 vdev_id; |
| 12460 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12461 | A_UINT32 table_id; |
| 12462 | /** operation mode: start/stop */ |
| 12463 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12464 | /** number of rssi samples to store */ |
| 12465 | A_UINT32 max_rssi_samples; |
| 12466 | /** number of samples to use to calculate RSSI average */ |
| 12467 | A_UINT32 rssi_averaging_samples; |
| 12468 | /** number of scans to confirm loss of contact with RSSI */ |
| 12469 | A_UINT32 lost_ap_scan_count; |
| 12470 | /** number of out-of-range BSSIDs necessary to send event */ |
| 12471 | A_UINT32 max_out_of_range_count; |
| 12472 | /** total number of bssid signal descriptors (in all pages) */ |
| 12473 | A_UINT32 total_entries; |
| 12474 | /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/ |
| 12475 | A_UINT32 first_entry_index; |
| 12476 | /** number of bssid signal descriptors in this page */ |
| 12477 | A_UINT32 num_entries_in_page; |
| 12478 | /* Following this structure is the TLV: |
| 12479 | * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries. |
| 12480 | */ |
| 12481 | } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param; |
| 12482 | |
| 12483 | typedef struct { |
| 12484 | /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12485 | A_UINT32 tlv_header; |
| 12486 | /**ssid */ |
| 12487 | wmi_ssid ssid; |
| 12488 | /**band */ |
| 12489 | A_UINT32 band; |
| 12490 | /**RSSI threshold for reporting */ |
| 12491 | A_UINT32 min_rssi; |
| 12492 | A_UINT32 max_rssi; |
| 12493 | } wmi_extscan_hotlist_ssid_entry; |
| 12494 | |
| 12495 | typedef struct { |
| 12496 | /** |
| 12497 | * TLV tag and len; tag equals |
| 12498 | * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param |
| 12499 | */ |
| 12500 | A_UINT32 tlv_header; |
| 12501 | /** Request ID - to identify command. Cannot be 0 */ |
| 12502 | A_UINT32 request_id; |
| 12503 | /** Requestor ID - client requesting hotlist ssid monitoring */ |
| 12504 | A_UINT32 requestor_id; |
| 12505 | /** VDEV id(interface) that is requesting scan */ |
| 12506 | A_UINT32 vdev_id; |
| 12507 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12508 | A_UINT32 table_id; |
| 12509 | /** operation mode: start/stop */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12510 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12511 | /**total number of ssids (in all pages) */ |
| 12512 | A_UINT32 total_entries; |
| 12513 | /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/ |
| 12514 | A_UINT32 first_entry_index; |
| 12515 | /**number of ssids in this page */ |
| 12516 | A_UINT32 num_entries_in_page; |
| 12517 | /** number of consecutive scans to confirm loss of an ssid **/ |
| 12518 | A_UINT32 lost_ap_scan_count; |
| 12519 | /* Following this structure is the TLV: |
| 12520 | * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; |
| 12521 | * number of element given by field num_page_entries. |
| 12522 | */ |
| 12523 | } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param; |
| 12524 | |
| 12525 | typedef struct { |
| 12526 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12527 | /**bssid */ |
| 12528 | wmi_mac_addr bssid; |
| 12529 | /**RSSI min threshold for reporting */ |
| 12530 | A_UINT32 min_rssi; |
| 12531 | /**Deprecated entry channel number */ |
| 12532 | A_UINT32 channel; |
| 12533 | /** RSSI max threshold for reporting */ |
| 12534 | A_UINT32 max_rssi; |
| 12535 | } wmi_extscan_hotlist_entry; |
| 12536 | |
| 12537 | typedef struct { |
| 12538 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */ |
| 12539 | /** Request ID - to identify command. Cannot be 0 */ |
| 12540 | A_UINT32 request_id; |
| 12541 | /** Requestor ID - client requesting hotlist monitoring */ |
| 12542 | A_UINT32 requestor_id; |
| 12543 | /** VDEV id(interface) that is requesting scan */ |
| 12544 | A_UINT32 vdev_id; |
| 12545 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12546 | A_UINT32 table_id; |
| 12547 | /** operation mode: start/stop */ |
| 12548 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12549 | /**total number of bssids (in all pages) */ |
| 12550 | A_UINT32 total_entries; |
| 12551 | /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/ |
| 12552 | A_UINT32 first_entry_index; |
| 12553 | /**number of bssids in this page */ |
| 12554 | A_UINT32 num_entries_in_page; |
| 12555 | /** number of consecutive scans to confirm loss of contact with AP */ |
| 12556 | A_UINT32 lost_ap_scan_count; |
| 12557 | /* Following this structure is the TLV: |
| 12558 | * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries. |
| 12559 | */ |
| 12560 | } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param; |
| 12561 | |
| 12562 | typedef struct { |
| 12563 | /* TLV tag and len; tag equals |
| 12564 | *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 12565 | A_UINT32 tlv_header; |
| 12566 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */ |
| 12567 | A_UINT32 config_request_id; |
| 12568 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID |
| 12569 | that configured the table */ |
| 12570 | A_UINT32 config_requestor_id; |
| 12571 | /** |
| 12572 | * VDEV id(interface) of the |
| 12573 | * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table |
| 12574 | */ |
| 12575 | A_UINT32 config_vdev_id; |
| 12576 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12577 | A_UINT32 table_id; |
| 12578 | /**total number of ssids (in all pages) */ |
| 12579 | A_UINT32 total_entries; |
| 12580 | /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 12581 | A_UINT32 first_entry_index; |
| 12582 | /**number of ssids in this page */ |
| 12583 | A_UINT32 num_entries_in_page; |
| 12584 | /* Following this structure is the TLV: |
| 12585 | * wmi_extscan_wlan_descriptor hotlist_match[]; |
| 12586 | * number of descriptors given by field num_entries_in_page |
| 12587 | */ |
| 12588 | } wmi_extscan_hotlist_ssid_match_event_fixed_param; |
| 12589 | |
| 12590 | typedef struct { |
| 12591 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12592 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12593 | A_UINT32 table_id; |
| 12594 | /** size in bytes of scan cache entry */ |
| 12595 | A_UINT32 scan_cache_entry_size; |
| 12596 | /** maximum number of scan cache entries */ |
| 12597 | A_UINT32 max_scan_cache_entries; |
| 12598 | /** maximum number of buckets per extscan request */ |
| 12599 | A_UINT32 max_buckets; |
| 12600 | /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */ |
| 12601 | A_UINT32 max_bssid_per_scan; |
| 12602 | /** table usage level at which indication must be sent to host */ |
| 12603 | A_UINT32 max_table_usage_threshold; |
| 12604 | } wmi_extscan_cache_capabilities; |
| 12605 | |
| 12606 | typedef struct { |
| 12607 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12608 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12609 | A_UINT32 table_id; |
| 12610 | /** size in bytes of wlan change entry */ |
| 12611 | A_UINT32 wlan_change_entry_size; |
| 12612 | /** maximum number of entries in wlan change table */ |
| 12613 | A_UINT32 max_wlan_change_entries; |
| 12614 | /** number of RSSI samples used for averaging RSSI */ |
| 12615 | A_UINT32 max_rssi_averaging_samples; |
| 12616 | /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */ |
| 12617 | A_UINT32 max_rssi_history_entries; |
| 12618 | } wmi_extscan_wlan_change_monitor_capabilities; |
| 12619 | |
| 12620 | typedef struct { |
| 12621 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12622 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12623 | A_UINT32 table_id; |
| 12624 | /** size in bytes of hotlist entry */ |
| 12625 | A_UINT32 wlan_hotlist_entry_size; |
| 12626 | /** maximum number of entries in wlan change table */ |
| 12627 | A_UINT32 max_hotlist_entries; |
| 12628 | } wmi_extscan_hotlist_monitor_capabilities; |
| 12629 | |
| 12630 | typedef struct { |
| 12631 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */ |
| 12632 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 12633 | A_UINT32 request_id; |
| 12634 | /** Requestor ID - client requesting stop */ |
| 12635 | A_UINT32 requestor_id; |
| 12636 | /** number of extscan caches */ |
| 12637 | A_UINT32 num_extscan_cache_tables; |
| 12638 | /** number of wlan change lists */ |
| 12639 | A_UINT32 num_wlan_change_monitor_tables; |
| 12640 | /** number of hotlists */ |
| 12641 | A_UINT32 num_hotlist_monitor_tables; |
| 12642 | /** if one sided rtt data collection is supported */ |
| 12643 | A_UINT32 rtt_one_sided_supported; |
| 12644 | /** if 11v data collection is supported */ |
| 12645 | A_UINT32 rtt_11v_supported; |
| 12646 | /** if 11mc data collection is supported */ |
| 12647 | A_UINT32 rtt_ftm_supported; |
| 12648 | /** number of extscan cache capabilities (one per table) */ |
| 12649 | A_UINT32 num_extscan_cache_capabilities; |
| 12650 | /** number of wlan change capabilities (one per table) */ |
| 12651 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 12652 | /** number of extscan hotlist capabilities (one per table) */ |
| 12653 | A_UINT32 num_extscan_hotlist_capabilities; |
| 12654 | /* Following this structure is the TLV: |
| 12655 | * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches |
| 12656 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables |
| 12657 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables |
| 12658 | */ |
| 12659 | } wmi_extscan_set_capabilities_cmd_fixed_param; |
| 12660 | |
| 12661 | typedef struct { |
| 12662 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */ |
| 12663 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 12664 | A_UINT32 request_id; |
| 12665 | /** Requestor ID - client requesting capabilities */ |
| 12666 | A_UINT32 requestor_id; |
| 12667 | } wmi_extscan_get_capabilities_cmd_fixed_param; |
| 12668 | |
| 12669 | typedef struct { |
| 12670 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */ |
| 12671 | /** Request ID of the operation that was started/stopped */ |
| 12672 | A_UINT32 request_id; |
| 12673 | /** Requestor ID of the operation that was started/stopped */ |
| 12674 | A_UINT32 requestor_id; |
| 12675 | /** VDEV id(interface) of the operation that was started/stopped */ |
| 12676 | A_UINT32 vdev_id; |
| 12677 | /** extscan WMI command */ |
| 12678 | A_UINT32 command; |
| 12679 | /** operation mode: start/stop */ |
| 12680 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 12681 | /**success/failure */ |
| 12682 | A_UINT32 status; /* enum wmi_extscan_start_stop_status */ |
| 12683 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12684 | A_UINT32 table_id; |
| 12685 | } wmi_extscan_start_stop_event_fixed_param; |
| 12686 | |
| 12687 | typedef struct { |
| 12688 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */ |
| 12689 | /** Request ID of the extscan operation that is currently running */ |
| 12690 | A_UINT32 request_id; |
| 12691 | /** Requestor ID of the extscan operation that is currently running */ |
| 12692 | A_UINT32 requestor_id; |
| 12693 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 12694 | A_UINT32 vdev_id; |
| 12695 | /** scan event (wmi_scan_event_type) */ |
| 12696 | A_UINT32 event; /* wmi_extscan_event_type */ |
| 12697 | /** table ID - to allow support for multiple simultaneous requests */ |
| 12698 | A_UINT32 table_id; |
| 12699 | /**number of buckets */ |
| 12700 | A_UINT32 num_buckets; |
| 12701 | /* Following this structure is the TLV: |
| 12702 | * A_UINT32 bucket_id[]; // number of elements given by field num_buckets. |
| 12703 | */ |
| 12704 | } wmi_extscan_operation_event_fixed_param; |
| 12705 | |
| 12706 | /* Types of extscan tables */ |
| 12707 | typedef enum { |
| 12708 | EXTSCAN_TABLE_NONE = 0, |
| 12709 | EXTSCAN_TABLE_BSSID = 1, |
| 12710 | EXTSCAN_TABLE_RSSI = 2, |
| 12711 | } wmi_extscan_table_type; |
| 12712 | |
| 12713 | typedef struct { |
| 12714 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */ |
| 12715 | /** Request ID of the extscan operation that is currently running */ |
| 12716 | A_UINT32 request_id; |
| 12717 | /** Requestor ID of the extscan operation that is currently running */ |
| 12718 | A_UINT32 requestor_id; |
| 12719 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 12720 | A_UINT32 vdev_id; |
| 12721 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12722 | A_UINT32 table_id; |
| 12723 | /**see wmi_extscan_table_type for table reporting usage */ |
| 12724 | A_UINT32 table_type; |
| 12725 | /**number of entries in use */ |
| 12726 | A_UINT32 entries_in_use; |
| 12727 | /**maximum number of entries in table */ |
| 12728 | A_UINT32 maximum_entries; |
| 12729 | } wmi_extscan_table_usage_event_fixed_param; |
| 12730 | |
| 12731 | typedef enum { |
| 12732 | /** |
| 12733 | * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec) |
| 12734 | * this can be used to discard scan results |
| 12735 | */ |
| 12736 | WMI_SCAN_STATUS_INTERRUPTED = 1 |
| 12737 | } wmi_scan_status_flags; |
| 12738 | |
| 12739 | |
| 12740 | typedef struct { |
| 12741 | 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] | 12742 | /** RSSI */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12743 | A_UINT32 rssi; |
Anurag Chouhan | cc474b7 | 2016-04-18 17:36:23 +0530 | [diff] [blame] | 12744 | /** time stamp in milliseconds */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12745 | A_UINT32 tstamp; |
| 12746 | /** Extscan cycle during which this entry was scanned */ |
| 12747 | A_UINT32 scan_cycle_id; |
| 12748 | /** |
| 12749 | * flag to indicate if the given result was obtained as part of |
| 12750 | * interrupted (aborted/large time gap preempted) scan |
| 12751 | */ |
| 12752 | A_UINT32 flags; |
Anurag Chouhan | cc474b7 | 2016-04-18 17:36:23 +0530 | [diff] [blame] | 12753 | /** Bitmask of buckets (i.e. sets of channels) scanned */ |
| 12754 | A_UINT32 buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12755 | } wmi_extscan_rssi_info; |
| 12756 | |
| 12757 | typedef struct { |
| 12758 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12759 | /**bssid */ |
| 12760 | wmi_mac_addr bssid; |
| 12761 | /**ssid */ |
| 12762 | wmi_ssid ssid; |
| 12763 | /**channel number */ |
| 12764 | A_UINT32 channel; |
| 12765 | /* capabilities */ |
| 12766 | A_UINT32 capabilities; |
| 12767 | /* beacon interval in TUs */ |
| 12768 | A_UINT32 beacon_interval; |
| 12769 | /**time stamp in milliseconds - time last seen */ |
| 12770 | A_UINT32 tstamp; |
| 12771 | /**flags - _tExtScanEntryFlags */ |
| 12772 | A_UINT32 flags; |
| 12773 | /**RTT in ns */ |
| 12774 | A_UINT32 rtt; |
| 12775 | /**rtt standard deviation */ |
| 12776 | A_UINT32 rtt_sd; |
| 12777 | /* rssi information */ |
| 12778 | A_UINT32 number_rssi_samples; |
| 12779 | /** IE length */ |
| 12780 | A_UINT32 ie_length; /* length of IE data */ |
| 12781 | } wmi_extscan_wlan_descriptor; |
| 12782 | |
| 12783 | typedef struct { |
| 12784 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */ |
| 12785 | /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 12786 | A_UINT32 request_id; |
| 12787 | /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 12788 | A_UINT32 requestor_id; |
| 12789 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 12790 | A_UINT32 vdev_id; |
| 12791 | /** Request ID of the extscan operation that is currently running */ |
| 12792 | A_UINT32 extscan_request_id; |
| 12793 | /** Requestor ID of the extscan operation that is currently running */ |
| 12794 | A_UINT32 extscan_requestor_id; |
| 12795 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 12796 | A_UINT32 extscan_vdev_id; |
| 12797 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12798 | A_UINT32 table_id; |
| 12799 | /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */ |
| 12800 | A_UINT32 current_tstamp; |
| 12801 | /**total number of bssids (in all pages) */ |
| 12802 | A_UINT32 total_entries; |
| 12803 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 12804 | A_UINT32 first_entry_index; |
| 12805 | /**number of bssids in this page */ |
| 12806 | A_UINT32 num_entries_in_page; |
Govind Singh | fad2f21 | 2016-01-21 10:55:51 +0530 | [diff] [blame] | 12807 | /* number of buckets scanned */ |
| 12808 | A_UINT32 buckets_scanned; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12809 | /* Followed by the variable length TLVs |
| 12810 | * wmi_extscan_wlan_descriptor bssid_list[] |
| 12811 | * wmi_extscan_rssi_info rssi_list[] |
| 12812 | * A_UINT8 ie_list[] |
| 12813 | */ |
| 12814 | } wmi_extscan_cached_results_event_fixed_param; |
| 12815 | |
| 12816 | typedef enum { |
| 12817 | EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00, |
| 12818 | EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01, |
| 12819 | EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02, |
| 12820 | } wmi_extscan_wlan_change_flags; |
| 12821 | |
| 12822 | typedef struct { |
| 12823 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 12824 | /**bssid */ |
| 12825 | wmi_mac_addr bssid; |
| 12826 | /**time stamp in milliseconds */ |
| 12827 | A_UINT32 tstamp; |
| 12828 | /**upper RSSI limit */ |
| 12829 | A_UINT32 upper_rssi_limit; |
| 12830 | /**lower RSSI limit */ |
| 12831 | A_UINT32 lower_rssi_limit; |
| 12832 | /** channel */ |
| 12833 | A_UINT32 channel; /* in MHz */ |
| 12834 | /**current RSSI average */ |
| 12835 | A_UINT32 rssi_average; |
| 12836 | /**flags - wmi_extscan_wlan_change_flags */ |
| 12837 | A_UINT32 flags; |
| 12838 | /**legnth of RSSI history to follow (number of values) */ |
| 12839 | A_UINT32 num_rssi_samples; |
| 12840 | } wmi_extscan_wlan_change_result_bssid; |
| 12841 | |
| 12842 | typedef struct { |
| 12843 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */ |
| 12844 | /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 12845 | A_UINT32 request_id; |
| 12846 | /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 12847 | A_UINT32 requestor_id; |
| 12848 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 12849 | A_UINT32 vdev_id; |
| 12850 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 12851 | A_UINT32 config_request_id; |
| 12852 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 12853 | A_UINT32 config_requestor_id; |
| 12854 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 12855 | A_UINT32 config_vdev_id; |
| 12856 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12857 | A_UINT32 table_id; |
| 12858 | /**number of entries with RSSI out of range or BSSID not detected */ |
| 12859 | A_UINT32 change_count; |
| 12860 | /**total number of bssid signal descriptors (in all pages) */ |
| 12861 | A_UINT32 total_entries; |
| 12862 | /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 12863 | A_UINT32 first_entry_index; |
| 12864 | /**number of bssids signal descriptors in this page */ |
| 12865 | A_UINT32 num_entries_in_page; |
| 12866 | /* Following this structure is the TLV: |
| 12867 | * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page. |
| 12868 | * Following this structure is the list of RSSI values (each is an A_UINT8): |
| 12869 | * A_UINT8 rssi_list[]; // last N RSSI values. |
| 12870 | */ |
| 12871 | } wmi_extscan_wlan_change_results_event_fixed_param; |
| 12872 | |
| 12873 | enum _tExtScanEntryFlags { |
| 12874 | WMI_HOTLIST_FLAG_NONE = 0x00, |
| 12875 | WMI_HOTLIST_FLAG_PRESENCE = 0x01, |
| 12876 | WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80, |
| 12877 | }; |
| 12878 | |
| 12879 | typedef struct { |
| 12880 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 12881 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 12882 | A_UINT32 config_request_id; |
| 12883 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 12884 | A_UINT32 config_requestor_id; |
| 12885 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 12886 | A_UINT32 config_vdev_id; |
| 12887 | /** table ID - to allow support for multiple simultaneous tables */ |
| 12888 | A_UINT32 table_id; |
| 12889 | /**total number of bssids (in all pages) */ |
| 12890 | A_UINT32 total_entries; |
| 12891 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 12892 | A_UINT32 first_entry_index; |
| 12893 | /**number of bssids in this page */ |
| 12894 | A_UINT32 num_entries_in_page; |
| 12895 | /* Following this structure is the TLV: |
| 12896 | * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page. |
| 12897 | */ |
| 12898 | } wmi_extscan_hotlist_match_event_fixed_param; |
| 12899 | |
| 12900 | typedef struct { |
| 12901 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */ |
| 12902 | /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 12903 | A_UINT32 request_id; |
| 12904 | /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 12905 | A_UINT32 requestor_id; |
| 12906 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 12907 | A_UINT32 vdev_id; |
| 12908 | /** number of extscan caches */ |
| 12909 | A_UINT32 num_extscan_cache_tables; |
| 12910 | /** number of wlan change lists */ |
| 12911 | A_UINT32 num_wlan_change_monitor_tables; |
| 12912 | /** number of hotlists */ |
| 12913 | A_UINT32 num_hotlist_monitor_tables; |
| 12914 | /** if one sided rtt data collection is supported */ |
| 12915 | A_UINT32 rtt_one_sided_supported; |
| 12916 | /** if 11v data collection is supported */ |
| 12917 | A_UINT32 rtt_11v_supported; |
| 12918 | /** if 11mc data collection is supported */ |
| 12919 | A_UINT32 rtt_ftm_supported; |
| 12920 | /** number of extscan cache capabilities (one per table) */ |
| 12921 | A_UINT32 num_extscan_cache_capabilities; |
| 12922 | /** number of wlan change capabilities (one per table) */ |
| 12923 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 12924 | /** number of extscan hotlist capabilities (one per table) */ |
| 12925 | A_UINT32 num_extscan_hotlist_capabilities; |
| 12926 | /* max number of roaming ssid whitelist firmware can support */ |
| 12927 | A_UINT32 num_roam_ssid_whitelist; |
| 12928 | /* max number of blacklist bssid firmware can support */ |
| 12929 | A_UINT32 num_roam_bssid_blacklist; |
| 12930 | /* max number of preferred list firmware can support */ |
| 12931 | A_UINT32 num_roam_bssid_preferred_list; |
| 12932 | /* max number of hotlist ssids firmware can support */ |
| 12933 | A_UINT32 num_extscan_hotlist_ssid; |
| 12934 | /* max number of epno networks firmware can support */ |
| 12935 | A_UINT32 num_epno_networks; |
| 12936 | |
| 12937 | /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically |
| 12938 | * supports multiple lists of each type. |
| 12939 | * |
| 12940 | * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists) |
| 12941 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables |
| 12942 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables |
| 12943 | */ |
| 12944 | } wmi_extscan_capabilities_event_fixed_param; |
| 12945 | |
| 12946 | /* WMI_D0_WOW_DISABLE_ACK_EVENTID */ |
| 12947 | typedef struct { |
| 12948 | A_UINT32 tlv_header; |
| 12949 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */ |
| 12950 | A_UINT32 reserved0; /* for future need */ |
| 12951 | } wmi_d0_wow_disable_ack_event_fixed_param; |
| 12952 | |
| 12953 | /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */ |
| 12954 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 12955 | /** TLV tag and len; tag equals |
| 12956 | * WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param |
| 12957 | */ |
| 12958 | A_UINT32 tlv_header; |
| 12959 | /** pdev_id for identifying the MAC |
| 12960 | * See macros starting with WMI_PDEV_ID_ for values. |
| 12961 | */ |
| 12962 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12963 | } wmi_pdev_resume_event_fixed_param; |
| 12964 | |
| 12965 | /** value representing all modules */ |
| 12966 | #define WMI_DEBUG_LOG_MODULE_ALL 0xffff |
| 12967 | |
| 12968 | /* param definitions */ |
| 12969 | |
| 12970 | /** |
| 12971 | * Log level for a given module. Value contains both module id and log level. |
| 12972 | * here is the bitmap definition for value. |
| 12973 | * module Id : 16 |
| 12974 | * Flags : reserved |
| 12975 | * Level : 8 |
| 12976 | * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global). |
| 12977 | * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting. |
| 12978 | */ |
| 12979 | #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1 |
| 12980 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12981 | #define WMI_DBGLOG_SET_LOG_LEVEL(val, lvl) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12982 | (val) |= (lvl & 0xff); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12983 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12984 | |
| 12985 | #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff) |
| 12986 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12987 | #define WMI_DBGLOG_SET_MODULE_ID(val, mid) do { \ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12988 | (val) |= ((mid & 0xffff) << 16); \ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12989 | } while (0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12990 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 12991 | #define WMI_DBGLOG_GET_MODULE_ID(val) (((val) >> 16) & 0xffff) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12992 | |
| 12993 | /** |
| 12994 | * Enable the debug log for a given vdev. Value is vdev id |
| 12995 | */ |
| 12996 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2 |
| 12997 | |
| 12998 | /** |
| 12999 | * Disable the debug log for a given vdev. Value is vdev id |
| 13000 | * All the log level for a given VDEV is disabled except the ERROR log messages |
| 13001 | */ |
| 13002 | |
| 13003 | #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3 |
| 13004 | |
| 13005 | /** |
| 13006 | * set vdev enable bitmap. value is the vden enable bitmap |
| 13007 | */ |
| 13008 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4 |
| 13009 | |
| 13010 | /** |
| 13011 | * set a given log level to all the modules specified in the module bitmap. |
| 13012 | * and set the log levle for all other modules to DBGLOG_ERR. |
| 13013 | * value: log levelt to be set. |
| 13014 | * module_id_bitmap : identifies the modules for which the log level should be set and |
| 13015 | * modules for which the log level should be reset to DBGLOG_ERR. |
| 13016 | */ |
| 13017 | #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5 |
| 13018 | |
| 13019 | #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3) |
| 13020 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13021 | #define WMI_MODULE_ENABLE(pmid_bitmap, mod_id) \ |
| 13022 | ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \ |
| 13023 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13024 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13025 | #define WMI_MODULE_DISABLE(pmid_bitmap, mod_id) \ |
| 13026 | ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \ |
| 13027 | (~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY)))) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13028 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 13029 | #define WMI_MODULE_IS_ENABLED(pmid_bitmap, mod_id) \ |
| 13030 | (((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] & \ |
| 13031 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY))) != 0) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13032 | |
| 13033 | #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */ |
| 13034 | typedef struct { |
| 13035 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */ |
| 13036 | A_UINT32 dbg_log_param; |
| 13037 | /** param types are defined above */ |
| 13038 | A_UINT32 value; |
| 13039 | /* The below array will follow this tlv ->fixed length module_id_bitmap[] |
| 13040 | A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS]; |
| 13041 | */ |
| 13042 | } wmi_debug_log_config_cmd_fixed_param; |
| 13043 | |
| 13044 | typedef struct { |
| 13045 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */ |
| 13046 | A_UINT32 param; /* Reserved for future use */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 13047 | /** pdev_id for identifying the MAC |
| 13048 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13049 | */ |
| 13050 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13051 | } wmi_pdev_get_temperature_cmd_fixed_param; |
| 13052 | |
| 13053 | typedef struct { |
| 13054 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */ |
| 13055 | A_INT32 value; /* temprature value in Celcius degree */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 13056 | /** pdev_id for identifying the MAC |
| 13057 | * See macros starting with WMI_PDEV_ID_ for values. |
| 13058 | */ |
| 13059 | A_UINT32 pdev_id; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 13060 | } wmi_pdev_temperature_event_fixed_param; |
| 13061 | |
| 13062 | typedef struct { |
| 13063 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */ |
| 13064 | A_UINT32 vdev_id; |
| 13065 | A_UINT32 enable; |
| 13066 | A_UINT32 srv_ipv4; /* server IP */ |
| 13067 | A_UINT32 start_lsb; /* starting address assigned to client */ |
| 13068 | A_UINT32 num_client; /* number of clients we support */ |
| 13069 | } wmi_set_dhcp_server_offload_cmd_fixed_param; |
| 13070 | |
| 13071 | typedef enum { |
| 13072 | AP_RX_DATA_OFFLOAD = 0x00, |
| 13073 | STA_RX_DATA_OFFLOAD = 0x01, |
| 13074 | } wmi_ipa_offload_types; |
| 13075 | |
| 13076 | /** |
| 13077 | * This command is sent from WLAN host driver to firmware for |
| 13078 | * enabling/disabling IPA data-path offload features. |
| 13079 | * |
| 13080 | * |
| 13081 | * Enabling data path offload to IPA(based on host INI configuration), example: |
| 13082 | * when STA interface comes up, |
| 13083 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 13084 | * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 13085 | * |
| 13086 | * Disabling data path offload to IPA, example: |
| 13087 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 13088 | * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 13089 | * |
| 13090 | * |
| 13091 | * This command is applicable only on the PCIE LL systems |
| 13092 | * |
| 13093 | */ |
| 13094 | typedef struct { |
| 13095 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */ |
| 13096 | A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */ |
| 13097 | A_UINT32 vdev_id; |
| 13098 | A_UINT32 enable; /* 1 == enable, 0 == disable */ |
| 13099 | } wmi_ipa_offload_enable_disable_cmd_fixed_param; |
| 13100 | |
| 13101 | typedef enum { |
| 13102 | WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0, |
| 13103 | WMI_LED_FLASHING_PATTERN_CONNECTED = 1, |
| 13104 | WMI_LED_FLASHING_PATTERN_RESERVED = 2, |
| 13105 | } wmi_set_led_flashing_type; |
| 13106 | |
| 13107 | /** |
| 13108 | 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. |
| 13109 | Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will |
| 13110 | remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts |
| 13111 | 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 |
| 13112 | pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to |
| 13113 | High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of |
| 13114 | Zero is reached, it is skipped and moves on to the next interval. |
| 13115 | */ |
| 13116 | typedef struct { |
| 13117 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */ |
| 13118 | A_UINT32 pattern_id; /* pattern identifier */ |
| 13119 | A_UINT32 led_x0; /* led flashing parameter0 */ |
| 13120 | A_UINT32 led_x1; /* led flashing parameter1 */ |
| 13121 | A_UINT32 gpio_num; /* GPIO number */ |
| 13122 | } wmi_set_led_flashing_cmd_fixed_param; |
| 13123 | |
| 13124 | /** |
| 13125 | * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses |
| 13126 | * within small networks that do not include a local name server. |
| 13127 | * It utilizes essentially the same programming interfaces, packet formats and operating semantics |
| 13128 | * as the unicast DNS, and the advantage is zero configuration service while no need for central or |
| 13129 | * global server. |
| 13130 | * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services |
| 13131 | * by type in a specified domain using standard DNS queries. |
| 13132 | * Here, we provide the ability to advertise the available services by responding to mDNS queries. |
| 13133 | */ |
| 13134 | typedef struct { |
| 13135 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */ |
| 13136 | A_UINT32 vdev_id; |
| 13137 | A_UINT32 enable; |
| 13138 | } wmi_mdns_offload_cmd_fixed_param; |
| 13139 | |
| 13140 | #define WMI_MAX_MDNS_FQDN_LEN 64 |
| 13141 | #define WMI_MAX_MDNS_RESP_LEN 512 |
| 13142 | #define WMI_MDNS_FQDN_TYPE_GENERAL 0 |
| 13143 | #define WMI_MDNS_FQDN_TYPE_UNIQUE 1 |
| 13144 | |
| 13145 | typedef struct { |
| 13146 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */ |
| 13147 | A_UINT32 vdev_id; |
| 13148 | /** type of fqdn, general or unique */ |
| 13149 | A_UINT32 type; |
| 13150 | /** length of fqdn */ |
| 13151 | A_UINT32 fqdn_len; |
| 13152 | /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len |
| 13153 | * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries |
| 13154 | */ |
| 13155 | } wmi_mdns_set_fqdn_cmd_fixed_param; |
| 13156 | |
| 13157 | typedef struct { |
| 13158 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */ |
| 13159 | A_UINT32 vdev_id; |
| 13160 | /** Answer Resource Record count */ |
| 13161 | A_UINT32 AR_count; |
| 13162 | /** length of response */ |
| 13163 | A_UINT32 resp_len; |
| 13164 | /* Following this structure is the TLV byte stream of resp data of length resp_len |
| 13165 | * A_UINT8 resp_data[]; // responses consisits of Resource Records |
| 13166 | */ |
| 13167 | } wmi_mdns_set_resp_cmd_fixed_param; |
| 13168 | |
| 13169 | typedef struct { |
| 13170 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */ |
| 13171 | A_UINT32 vdev_id; |
| 13172 | } wmi_mdns_get_stats_cmd_fixed_param; |
| 13173 | |
| 13174 | typedef struct { |
| 13175 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */ |
| 13176 | A_UINT32 vdev_id; |
| 13177 | /** curTimestamp in milliseconds */ |
| 13178 | A_UINT32 curTimestamp; |
| 13179 | /** last received Query in milliseconds */ |
| 13180 | A_UINT32 lastQueryTimestamp; |
| 13181 | /** last sent Response in milliseconds */ |
| 13182 | A_UINT32 lastResponseTimestamp; |
| 13183 | /** stats of received queries */ |
| 13184 | A_UINT32 totalQueries; |
| 13185 | /** stats of macth queries */ |
| 13186 | A_UINT32 totalMatches; |
| 13187 | /** stats of responses */ |
| 13188 | A_UINT32 totalResponses; |
| 13189 | /** indicate the current status of mDNS offload */ |
| 13190 | A_UINT32 status; |
| 13191 | } wmi_mdns_stats_event_fixed_param; |
| 13192 | |
| 13193 | /** |
| 13194 | * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process |
| 13195 | * down to the firmware. When this feature is enabled, firmware can process the association/disassociation |
| 13196 | * request and create/remove connection even host is suspended. |
| 13197 | * 3 major components are offloaded: |
| 13198 | * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response. |
| 13199 | * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4. |
| 13200 | * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK. |
| 13201 | * Current implementation only supports WPA2 CCMP. |
| 13202 | */ |
| 13203 | |
| 13204 | typedef struct { |
| 13205 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */ |
| 13206 | /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */ |
| 13207 | A_UINT32 vdev_id; |
| 13208 | /** enable/disable sap auth offload */ |
| 13209 | A_UINT32 enable; |
| 13210 | /** sap ssid */ |
| 13211 | wmi_ssid ap_ssid; |
| 13212 | /** authentication mode (defined above) */ |
| 13213 | A_UINT32 rsn_authmode; |
| 13214 | /** unicast cipher set */ |
| 13215 | A_UINT32 rsn_ucastcipherset; |
| 13216 | /** mcast/group cipher set */ |
| 13217 | A_UINT32 rsn_mcastcipherset; |
| 13218 | /** mcast/group management frames cipher set */ |
| 13219 | A_UINT32 rsn_mcastmgmtcipherset; |
| 13220 | /** sap channel */ |
| 13221 | A_UINT32 channel; |
| 13222 | /** length of psk */ |
| 13223 | A_UINT32 psk_len; |
| 13224 | /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len |
| 13225 | * A_UINT8 psk[]; |
| 13226 | */ |
| 13227 | } wmi_sap_ofl_enable_cmd_fixed_param; |
| 13228 | |
| 13229 | typedef struct { |
| 13230 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */ |
| 13231 | /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */ |
| 13232 | A_UINT32 vdev_id; |
| 13233 | /** aid (association id) of this station */ |
| 13234 | A_UINT32 assoc_id; |
| 13235 | /** peer station's mac addr */ |
| 13236 | wmi_mac_addr peer_macaddr; |
| 13237 | /** length of association request frame */ |
| 13238 | A_UINT32 data_len; |
| 13239 | /* Following this structure is the TLV byte stream of a whole association request frame of length data_len |
| 13240 | * A_UINT8 bufp[]; |
| 13241 | */ |
| 13242 | } wmi_sap_ofl_add_sta_event_fixed_param; |
| 13243 | |
| 13244 | typedef enum { |
| 13245 | SAP_OFL_DEL_STA_FLAG_NONE = 0x00, |
| 13246 | SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01, |
| 13247 | } wmi_sap_ofl_del_sta_flags; |
| 13248 | |
| 13249 | typedef struct { |
| 13250 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */ |
| 13251 | /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */ |
| 13252 | A_UINT32 vdev_id; |
| 13253 | /** aid (association id) of this station */ |
| 13254 | A_UINT32 assoc_id; |
| 13255 | /** peer station's mac addr */ |
| 13256 | wmi_mac_addr peer_macaddr; |
| 13257 | /** disassociation reason */ |
| 13258 | A_UINT32 reason; |
| 13259 | /** flags - wmi_sap_ofl_del_sta_flags */ |
| 13260 | A_UINT32 flags; |
| 13261 | } wmi_sap_ofl_del_sta_event_fixed_param; |
| 13262 | |
| 13263 | typedef struct { |
| 13264 | /* |
| 13265 | * TLV tag and len; tag equals |
| 13266 | * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param |
| 13267 | */ |
| 13268 | A_UINT32 tlv_header; |
| 13269 | A_UINT32 vdev_id; |
| 13270 | /* Number of client failure connection attempt */ |
| 13271 | A_UINT32 num_retry; |
| 13272 | /*Time in milliseconds to record the client's failure connection attempts*/ |
| 13273 | A_UINT32 retry_allow_time_ms; |
| 13274 | /* |
| 13275 | * Time in milliseconds to drop the connection request if |
| 13276 | * client is blacklisted |
| 13277 | */ |
| 13278 | A_UINT32 blackout_time_ms; |
| 13279 | } wmi_sap_set_blacklist_param_cmd_fixed_param; |
| 13280 | |
| 13281 | typedef struct { |
| 13282 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */ |
| 13283 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 13284 | /** This structure is used to send REQ binary blobs |
| 13285 | * from application/service to firmware where Host drv is pass through . |
| 13286 | * Following this structure is the TLV: |
| 13287 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 13288 | */ |
| 13289 | } wmi_apfind_cmd_param; |
| 13290 | |
| 13291 | typedef enum apfind_event_type_e { |
| 13292 | APFIND_MATCH_EVENT = 0, |
| 13293 | APFIND_WAKEUP_EVENT, |
| 13294 | } APFIND_EVENT_TYPE; |
| 13295 | |
| 13296 | typedef struct { |
| 13297 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */ |
| 13298 | A_UINT32 event_type; /** APFIND_EVENT_TYPE */ |
| 13299 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 13300 | /** This structure is used to send event binary blobs |
| 13301 | * from firmware to application/service and Host drv. |
| 13302 | * Following this structure is the TLV: |
| 13303 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 13304 | */ |
| 13305 | } wmi_apfind_event_hdr; |
| 13306 | |
| 13307 | /** |
| 13308 | * OCB DCC types and structures. |
| 13309 | */ |
| 13310 | |
| 13311 | /** |
| 13312 | * DCC types as described in ETSI TS 102 687 |
| 13313 | * Type Format stepSize referenceValue numBits |
| 13314 | * ------------------------------------------------------------------------- |
| 13315 | * ndlType_acPrio INTEGER (0...7) 1 number 3 |
| 13316 | * ndlType_controlLoop INTEGER (0...7) 1 0 3 |
| 13317 | * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13 |
| 13318 | * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10 |
| 13319 | * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13 |
| 13320 | * ndlType_datarate INTEGER (0..7) Table 8 3 |
| 13321 | * ndlType_distance INTEGER (0..4095) 1 m 0 12 |
| 13322 | * ndlType_numberElements INTEGER (0..63) number 6 |
| 13323 | * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11 |
| 13324 | * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10 |
| 13325 | * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5 |
| 13326 | * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7 |
| 13327 | * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7 |
| 13328 | * ndlType_timing INTEGER (0..4095) 10 ms 0 12 |
| 13329 | * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7 |
| 13330 | * ndlType_ratio INTEGER (0..100) 1 % 0 % 7 |
| 13331 | * ndlType_exponent INTEGER (0..100) 0.1 0 7 |
| 13332 | * ndlType_queueStatus Enumeration Table A.2 1 |
| 13333 | * ndlType_dccMechanism Bitset Table A.2 6 |
| 13334 | * |
| 13335 | * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE) |
| 13336 | * cannot be changed without breaking WMI compatibility. |
| 13337 | * |
| 13338 | * NOTE: For each of the types, one additional bit is allocated. This |
| 13339 | * leftmost bit is used to indicate that the value is invalid. |
| 13340 | */ |
| 13341 | #define SIZE_NDLTYPE_ACPRIO (1 + 3) |
| 13342 | #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3) |
| 13343 | #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13) |
| 13344 | #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10) |
| 13345 | #define SIZE_NDLTYPE_CHANNELUSE (1 + 13) |
| 13346 | #define SIZE_NDLTYPE_DATARATE (1 + 3) |
| 13347 | #define SIZE_NDLTYPE_DISTANCE (1 + 12) |
| 13348 | #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6) |
| 13349 | #define SIZE_NDLTYPE_PACKETDURATION (1 + 11) |
| 13350 | #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10) |
| 13351 | #define SIZE_NDLTYPE_PATHLOSS (1 + 5) |
| 13352 | #define SIZE_NDLTYPE_RXPOWER (1 + 7) |
| 13353 | #define SIZE_NDLTYPE_SNR (1 + 7) |
| 13354 | #define SIZE_NDLTYPE_TIMING (1 + 12) |
| 13355 | #define SIZE_NDLTYPE_TXPOWER (1 + 7) |
| 13356 | #define SIZE_NDLTYPE_RATIO (1 + 7) |
| 13357 | #define SIZE_NDLTYPE_EXPONENT (1 + 7) |
| 13358 | #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1) |
| 13359 | #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6) |
| 13360 | #define SIZE_BYTE (8) |
| 13361 | |
| 13362 | #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1) |
| 13363 | #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1) |
| 13364 | #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1) |
| 13365 | #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1) |
| 13366 | #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1) |
| 13367 | #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1) |
| 13368 | #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1) |
| 13369 | #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1) |
| 13370 | #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1) |
| 13371 | #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1) |
| 13372 | #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1) |
| 13373 | #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1) |
| 13374 | #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1) |
| 13375 | #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1) |
| 13376 | #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1) |
| 13377 | #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1) |
| 13378 | #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1) |
| 13379 | #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1) |
| 13380 | #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1) |
| 13381 | |
| 13382 | /** |
| 13383 | * The MCS_COUNT macro cannot be modified without breaking |
| 13384 | * WMI compatibility. |
| 13385 | */ |
| 13386 | #define MCS_COUNT (8) |
| 13387 | |
| 13388 | /** |
| 13389 | * Flags for ndlType_dccMechanism. |
| 13390 | */ |
| 13391 | typedef enum { |
| 13392 | DCC_MECHANISM_TPC = 1, |
| 13393 | DCC_MECHANISM_TRC = 2, |
| 13394 | DCC_MECHANISM_TDC = 4, |
| 13395 | DCC_MECHANISM_DSC = 8, |
| 13396 | DCC_MECHANISM_TAC = 16, |
| 13397 | DCC_MECHANISM_RESERVED = 32, |
| 13398 | DCC_MECHANISM_ALL = 0x3f, |
| 13399 | } wmi_dcc_ndl_type_dcc_mechanism; |
| 13400 | |
| 13401 | /** Values for ndlType_queueStatus. */ |
| 13402 | typedef enum { |
| 13403 | DCC_QUEUE_CLOSED = 0, |
| 13404 | DCC_QUEUE_OPEN = 1, |
| 13405 | } wmi_dcc_ndl_type_queue_status; |
| 13406 | |
| 13407 | /** |
| 13408 | * For ndlType_acPrio, use the values in wmi_traffic_ac. |
| 13409 | * Values for ndlType_datarate. |
| 13410 | */ |
| 13411 | typedef enum { |
| 13412 | DCC_DATARATE_3_MBPS = 0, |
| 13413 | DCC_DATARATE_4_5_MBPS = 1, |
| 13414 | DCC_DATARATE_6_MBPS = 2, |
| 13415 | DCC_DATARATE_9_MBPS = 3, |
| 13416 | DCC_DATARATE_12_MBPS = 4, |
| 13417 | DCC_DATARATE_18_MBPS = 5, |
| 13418 | DCC_DATARATE_24_MBPS = 6, |
| 13419 | DCC_DATARATE_27_MBPS = 7, |
| 13420 | } wmi_dcc_ndl_type_datarate; |
| 13421 | |
| 13422 | /** Data structure for active state configuration. */ |
| 13423 | typedef struct { |
| 13424 | /** TLV tag and len; tag equals |
| 13425 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config |
| 13426 | */ |
| 13427 | A_UINT32 tlv_header; |
| 13428 | /** |
| 13429 | * NDL_asStateId, ndlType_numberElements, 1+6 bits. |
| 13430 | * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits. |
| 13431 | */ |
| 13432 | A_UINT32 state_info; |
| 13433 | /** |
| 13434 | * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits. |
| 13435 | * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits. |
| 13436 | * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits. |
| 13437 | * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits. |
| 13438 | */ |
| 13439 | A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)]; |
| 13440 | /** |
| 13441 | * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 13442 | * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 13443 | * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 13444 | * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 13445 | */ |
| 13446 | A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 13447 | /** |
| 13448 | * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 13449 | * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 13450 | * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 13451 | * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits. |
| 13452 | */ |
| 13453 | A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 13454 | /** |
| 13455 | * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 13456 | * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 13457 | * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 13458 | * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 13459 | */ |
| 13460 | A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 13461 | /** |
| 13462 | * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits. |
| 13463 | * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits. |
| 13464 | * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits. |
| 13465 | * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits. |
| 13466 | */ |
| 13467 | A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)]; |
| 13468 | } wmi_dcc_ndl_active_state_config; |
| 13469 | |
| 13470 | #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7) |
| 13471 | #define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val) |
| 13472 | #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11) |
| 13473 | #define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val) |
| 13474 | #define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM) |
| 13475 | #define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val) |
| 13476 | #define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 13477 | #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) |
| 13478 | #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 13479 | #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) |
| 13480 | #define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 13481 | #define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 13482 | #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER) |
| 13483 | #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) |
| 13484 | |
| 13485 | /** Data structure for EDCA/QOS parameters. */ |
| 13486 | typedef struct { |
| 13487 | /** TLV tag and len; tag equals |
| 13488 | * WMITLV_TAG_STRUC_wmi_qos_parameter */ |
| 13489 | A_UINT32 tlv_header; |
| 13490 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 13491 | A_UINT32 aifsn; |
| 13492 | /** Contention Window minimum. Range: 1 - 10 */ |
| 13493 | A_UINT32 cwmin; |
| 13494 | /** Contention Window maximum. Range: 1 - 10 */ |
| 13495 | A_UINT32 cwmax; |
| 13496 | } wmi_qos_parameter; |
| 13497 | |
| 13498 | /** Data structure for information specific to a channel. */ |
| 13499 | typedef struct { |
| 13500 | /** TLV tag and len; tag equals |
| 13501 | * WMITLV_TAG_STRUC_wmi_ocb_channel */ |
| 13502 | A_UINT32 tlv_header; |
| 13503 | A_UINT32 bandwidth; /* MHz units */ |
| 13504 | wmi_mac_addr mac_address; |
| 13505 | } wmi_ocb_channel; |
| 13506 | |
| 13507 | /** Data structure for an element of the schedule array. */ |
| 13508 | typedef struct { |
| 13509 | /** TLV tag and len; tag equals |
| 13510 | * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */ |
| 13511 | A_UINT32 tlv_header; |
| 13512 | A_UINT32 channel_freq; /* MHz units */ |
| 13513 | A_UINT32 total_duration; /* ms units */ |
| 13514 | A_UINT32 guard_interval; /* ms units */ |
| 13515 | } wmi_ocb_schedule_element; |
| 13516 | |
| 13517 | /** Data structure for OCB configuration. */ |
| 13518 | typedef struct { |
| 13519 | /** TLV tag and len; tag equals |
| 13520 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */ |
| 13521 | A_UINT32 tlv_header; |
| 13522 | /** VDEV id(interface) that is being configured */ |
| 13523 | A_UINT32 vdev_id; |
| 13524 | A_UINT32 channel_count; |
| 13525 | A_UINT32 schedule_size; |
| 13526 | A_UINT32 flags; |
| 13527 | |
| 13528 | /** This is followed by a TLV array of wmi_channel. |
| 13529 | * This is followed by a TLV array of wmi_ocb_channel. |
| 13530 | * This is followed by a TLV array of wmi_qos_parameter. |
| 13531 | * This is followed by a TLV array of wmi_dcc_ndl_chan. |
| 13532 | * This is followed by a TLV array of wmi_dcc_ndl_active_state_config. |
| 13533 | * This is followed by a TLV array of wmi_ocb_schedule_element. |
| 13534 | */ |
| 13535 | } wmi_ocb_set_config_cmd_fixed_param; |
| 13536 | |
| 13537 | |
| 13538 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0 |
| 13539 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1 |
| 13540 | |
| 13541 | #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \ |
| 13542 | (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET) |
| 13543 | |
| 13544 | |
| 13545 | /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */ |
| 13546 | typedef struct { |
| 13547 | /** TLV tag and len; tag equals |
| 13548 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param |
| 13549 | */ |
| 13550 | A_UINT32 tlv_header; |
| 13551 | /* VDEV id(interface)*/ |
| 13552 | A_UINT32 vdev_id; |
| 13553 | A_UINT32 status; |
| 13554 | } wmi_ocb_set_config_resp_event_fixed_param; |
| 13555 | |
| 13556 | /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking |
| 13557 | * WMI compatibility. |
| 13558 | */ |
| 13559 | /* The size of the utc time in bytes. */ |
| 13560 | #define SIZE_UTC_TIME (10) |
| 13561 | /* The size of the utc time error in bytes. */ |
| 13562 | #define SIZE_UTC_TIME_ERROR (5) |
| 13563 | |
| 13564 | /** Data structure to set the UTC time. */ |
| 13565 | typedef struct { |
| 13566 | /** TLV tag and len; tag equals |
| 13567 | * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */ |
| 13568 | A_UINT32 tlv_header; |
| 13569 | /*VDEV Identifier*/ |
| 13570 | A_UINT32 vdev_id; |
| 13571 | /** 10 bytes of the utc time. */ |
| 13572 | A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)]; |
| 13573 | /** 5 bytes of the time error. */ |
| 13574 | A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)]; |
| 13575 | } wmi_ocb_set_utc_time_cmd_fixed_param; |
| 13576 | |
| 13577 | #define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE) |
| 13578 | #define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val) |
| 13579 | #define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE) |
| 13580 | #define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val) |
| 13581 | |
| 13582 | /** Data structure start the timing advertisement. The template for the |
| 13583 | * timing advertisement frame follows this structure in the WMI command. |
| 13584 | */ |
| 13585 | typedef struct { |
| 13586 | /** TLV tag and len; tag equals |
| 13587 | * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */ |
| 13588 | A_UINT32 tlv_header; |
| 13589 | /*VDEV Identifier*/ |
| 13590 | A_UINT32 vdev_id; |
| 13591 | /** Number of times the TA is sent every 5 seconds. */ |
| 13592 | A_UINT32 repeat_rate; |
| 13593 | /** The frequency on which to transmit. */ |
| 13594 | A_UINT32 channel_freq; /* MHz units */ |
| 13595 | /** The offset into the template of the timestamp. */ |
| 13596 | A_UINT32 timestamp_offset; |
| 13597 | /** The offset into the template of the time value. */ |
| 13598 | A_UINT32 time_value_offset; |
| 13599 | /** The length of the timing advertisement template. The |
| 13600 | * template is in the TLV data. */ |
| 13601 | A_UINT32 timing_advert_template_length; |
| 13602 | /** This is followed by a binary array containing the TA template. */ |
| 13603 | } wmi_ocb_start_timing_advert_cmd_fixed_param; |
| 13604 | |
| 13605 | /** Data structure to stop the timing advertisement. */ |
| 13606 | typedef struct { |
| 13607 | /** TLV tag and len; tag equals |
| 13608 | * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */ |
| 13609 | A_UINT32 tlv_header; |
| 13610 | /*VDEV Identifier*/ |
| 13611 | A_UINT32 vdev_id; |
| 13612 | A_UINT32 channel_freq; /* MHz units */ |
| 13613 | } wmi_ocb_stop_timing_advert_cmd_fixed_param; |
| 13614 | |
| 13615 | /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 13616 | typedef struct { |
| 13617 | /** TLV tag and len; tag equals |
| 13618 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */ |
| 13619 | A_UINT32 tlv_header; |
| 13620 | /*VDEV Identifier*/ |
| 13621 | A_UINT32 vdev_id; |
| 13622 | A_UINT32 reserved; |
| 13623 | } wmi_ocb_get_tsf_timer_cmd_fixed_param; |
| 13624 | |
| 13625 | /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 13626 | typedef struct { |
| 13627 | /** TLV tag and len; tag equals |
| 13628 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */ |
| 13629 | A_UINT32 tlv_header; |
| 13630 | /*VDEV Identifier*/ |
| 13631 | A_UINT32 vdev_id; |
| 13632 | A_UINT32 tsf_timer_high; |
| 13633 | A_UINT32 tsf_timer_low; |
| 13634 | } wmi_ocb_get_tsf_timer_resp_event_fixed_param; |
| 13635 | |
| 13636 | /** Data structure for DCC stats configuration per channel. */ |
| 13637 | typedef struct { |
| 13638 | /** TLV tag and len; tag equals |
| 13639 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */ |
| 13640 | A_UINT32 tlv_header; |
| 13641 | |
| 13642 | /*VDEV Identifier*/ |
| 13643 | A_UINT32 vdev_id; |
| 13644 | |
| 13645 | /** The channel for which this applies, 16 bits. |
| 13646 | * The dcc_stats_bitmap, 8 bits. */ |
| 13647 | A_UINT32 chan_info; |
| 13648 | |
| 13649 | /** Demodulation model parameters. |
| 13650 | * |
| 13651 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 13652 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 13653 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 13654 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 13655 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 13656 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 13657 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 13658 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 13659 | */ |
| 13660 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 13661 | |
| 13662 | /** Communication ranges. |
| 13663 | * |
| 13664 | * tx_power, ndlType_txPower, 1+7 bits. |
| 13665 | * datarate, ndlType_datarate, 1+3 bits. |
| 13666 | */ |
| 13667 | A_UINT32 tx_power_datarate; |
| 13668 | /** |
| 13669 | * NDL_carrierSenseRange, ndlType_distance, 1+12 bits. |
| 13670 | * NDL_estCommRange, ndlType_distance, 1+12 bits. |
| 13671 | */ |
| 13672 | A_UINT32 carrier_sense_est_comm_range; |
| 13673 | |
| 13674 | /** Channel load measures. */ |
| 13675 | /** |
| 13676 | * dccSensitivity, ndlType_rxPower, 1+7 bits. |
| 13677 | * carrierSense, ndlType_rxPower, 1+7 bits. |
| 13678 | * NDL_channelLoad, ndlType_channelLoad, 1+10 bits. |
| 13679 | */ |
| 13680 | A_UINT32 dcc_stats; |
| 13681 | /** |
| 13682 | * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits. |
| 13683 | * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits. |
| 13684 | */ |
| 13685 | A_UINT32 packet_stats; |
| 13686 | /** |
| 13687 | * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits. |
| 13688 | */ |
| 13689 | A_UINT32 channel_busy_time; |
| 13690 | /** |
| 13691 | *Transmit packet statistics. |
| 13692 | * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 13693 | * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 13694 | * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 13695 | * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 13696 | */ |
| 13697 | A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 13698 | /** |
| 13699 | * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 13700 | * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 13701 | * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 13702 | * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 13703 | */ |
| 13704 | A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 13705 | /** |
| 13706 | * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 13707 | * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 13708 | * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 13709 | * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 13710 | */ |
| 13711 | A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 13712 | /** |
| 13713 | * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 13714 | * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 13715 | * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 13716 | * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 13717 | */ |
| 13718 | A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 13719 | } wmi_dcc_ndl_stats_per_channel; |
| 13720 | |
| 13721 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 13722 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 13723 | #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 13724 | #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 13725 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8) |
| 13726 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val) |
| 13727 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 13728 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 13729 | #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8) |
| 13730 | #define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val) |
| 13731 | #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4) |
| 13732 | #define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val) |
| 13733 | #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13) |
| 13734 | #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val) |
| 13735 | #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13) |
| 13736 | #define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val) |
| 13737 | #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8) |
| 13738 | #define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val) |
| 13739 | #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8) |
| 13740 | #define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val) |
| 13741 | #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11) |
| 13742 | #define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val) |
| 13743 | #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14) |
| 13744 | #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val) |
| 13745 | #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12) |
| 13746 | #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val) |
| 13747 | #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11) |
| 13748 | #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val) |
| 13749 | |
| 13750 | #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) |
| 13751 | #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) |
| 13752 | #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) |
| 13753 | #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) |
| 13754 | #define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 13755 | #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) |
| 13756 | #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) |
| 13757 | #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) |
| 13758 | |
| 13759 | /** Bitmap for DCC stats. */ |
| 13760 | typedef enum { |
| 13761 | DCC_STATS_DEMODULATION_MODEL = 1, |
| 13762 | DCC_STATS_COMMUNICATION_RANGES = 2, |
| 13763 | DCC_STATS_CHANNEL_LOAD_MEASURES = 4, |
| 13764 | DCC_STATS_TRANSMIT_PACKET_STATS = 8, |
| 13765 | DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16, |
| 13766 | DCC_STATS_ALL = 0xff, |
| 13767 | } wmi_dcc_stats_bitmap; |
| 13768 | |
| 13769 | /** Data structure for getting the DCC stats. */ |
| 13770 | typedef struct { |
| 13771 | /** |
| 13772 | * TLV tag and len; tag equals |
| 13773 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param |
| 13774 | */ |
| 13775 | A_UINT32 tlv_header; |
| 13776 | /* VDEV identifier */ |
| 13777 | A_UINT32 vdev_id; |
| 13778 | /**The number of channels for which stats are being requested. */ |
| 13779 | A_UINT32 num_channels; |
| 13780 | /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */ |
| 13781 | } wmi_dcc_get_stats_cmd_fixed_param; |
| 13782 | |
| 13783 | typedef struct { |
| 13784 | /** |
| 13785 | * TLV tag and len; tag equals |
| 13786 | * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request. |
| 13787 | */ |
| 13788 | A_UINT32 tlv_header; |
| 13789 | /** The channel for which this applies. */ |
| 13790 | A_UINT32 chan_freq; /* MHz units */ |
| 13791 | /** The DCC stats being requested. */ |
| 13792 | A_UINT32 dcc_stats_bitmap; |
| 13793 | } wmi_dcc_channel_stats_request; |
| 13794 | |
| 13795 | /** Data structure for the response with the DCC stats. */ |
| 13796 | typedef struct { |
| 13797 | /** |
| 13798 | * TLV tag and len; tag equals |
| 13799 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param |
| 13800 | */ |
| 13801 | A_UINT32 tlv_header; |
| 13802 | /* VDEV identifier */ |
| 13803 | A_UINT32 vdev_id; |
| 13804 | /** Number of channels in the response. */ |
| 13805 | A_UINT32 num_channels; |
| 13806 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 13807 | } wmi_dcc_get_stats_resp_event_fixed_param; |
| 13808 | |
| 13809 | /** Data structure for clearing the DCC stats. */ |
| 13810 | typedef struct { |
| 13811 | /** |
| 13812 | * TLV tag and len; tag equals |
| 13813 | * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param |
| 13814 | */ |
| 13815 | A_UINT32 tlv_header; |
| 13816 | /* VDEV identifier */ |
| 13817 | A_UINT32 vdev_id; |
| 13818 | A_UINT32 dcc_stats_bitmap; |
| 13819 | } wmi_dcc_clear_stats_cmd_fixed_param; |
| 13820 | |
| 13821 | /** Data structure for the pushed DCC stats */ |
| 13822 | typedef struct { |
| 13823 | /** |
| 13824 | * TLV tag and len; tag equals |
| 13825 | * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param |
| 13826 | */ |
| 13827 | A_UINT32 tlv_header; |
| 13828 | /* VDEV identifier */ |
| 13829 | A_UINT32 vdev_id; |
| 13830 | /** The number of channels in the response. */ |
| 13831 | A_UINT32 num_channels; |
| 13832 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 13833 | } wmi_dcc_stats_event_fixed_param; |
| 13834 | |
| 13835 | /** Data structure for updating NDL per channel. */ |
| 13836 | typedef struct { |
| 13837 | /** |
| 13838 | * TLV tag and len; tag equals |
| 13839 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan |
| 13840 | */ |
| 13841 | A_UINT32 tlv_header; |
| 13842 | /** |
| 13843 | * Channel frequency, 16 bits |
| 13844 | * NDL_numActiveState, ndlType_numberElements, 1+6 bits |
| 13845 | */ |
| 13846 | A_UINT32 chan_info; |
| 13847 | /** |
| 13848 | * NDL_minDccSampling, 10 bits. |
| 13849 | * Maximum time interval between subsequent checks of the DCC rules. |
| 13850 | */ |
| 13851 | A_UINT32 ndl_min_dcc_sampling; |
| 13852 | /** |
| 13853 | * dcc_enable, 1 bit. |
| 13854 | * dcc_stats_enable, 1 bit. |
| 13855 | * dcc_stats_interval, 16 bits. |
| 13856 | */ |
| 13857 | A_UINT32 dcc_flags; |
| 13858 | /** General DCC configuration. |
| 13859 | * NDL_timeUp, ndlType_timing, 1+12 bits. |
| 13860 | * NDL_timeDown, ndlType_timing, 1+12 bits. |
| 13861 | */ |
| 13862 | A_UINT32 general_config; |
| 13863 | /** Transmit power thresholds. |
| 13864 | * NDL_minTxPower, ndlType_txPower, 1+7 bits. |
| 13865 | * NDL_maxTxPower, ndlType_txPower, 1+7 bits. |
| 13866 | */ |
| 13867 | /* see "ETSI TS 102 687" table above for units */ |
| 13868 | A_UINT32 min_max_tx_power; |
| 13869 | /** |
| 13870 | * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 13871 | * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 13872 | * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 13873 | * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 13874 | */ |
| 13875 | /* see "ETSI TS 102 687" table above for units */ |
| 13876 | A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 13877 | /** Packet timing thresholds. |
| 13878 | * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 13879 | * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 13880 | * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 13881 | * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 13882 | */ |
| 13883 | A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 13884 | /** |
| 13885 | * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 13886 | * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 13887 | */ |
| 13888 | A_UINT32 min_max_packet_interval; |
| 13889 | /** |
| 13890 | * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 13891 | * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 13892 | * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 13893 | * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits |
| 13894 | */ |
| 13895 | A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 13896 | /** Packet datarate thresholds. |
| 13897 | * NDL_minDatarate, ndlType_datarate, 1+3 bits. |
| 13898 | * NDL_maxDatarate, ndlType_datarate, 1+3 bits. |
| 13899 | */ |
| 13900 | A_UINT32 min_max_datarate; |
| 13901 | /** |
| 13902 | * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 13903 | * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 13904 | * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 13905 | * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 13906 | */ |
| 13907 | A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 13908 | /** Receive signal thresholds. |
| 13909 | * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits. |
| 13910 | * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits. |
| 13911 | * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits. |
| 13912 | */ |
| 13913 | A_UINT32 min_max_def_carrier_sense; |
| 13914 | |
| 13915 | /** Receive model parameter. |
| 13916 | * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits. |
| 13917 | * NDL_maxCsRange, ndlType_distance, 1+12 bits. |
| 13918 | * NDL_refPathLoss, ndlType_pathloss, 1+5 bits. |
| 13919 | */ |
| 13920 | A_UINT32 receive_model_parameter; |
| 13921 | |
| 13922 | /** |
| 13923 | * NDL_minSNR, ndlType_snr, 1+7 bits. |
| 13924 | */ |
| 13925 | A_UINT32 receive_model_parameter_2; |
| 13926 | |
| 13927 | /** Demodulation model parameters. |
| 13928 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 13929 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 13930 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 13931 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 13932 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 13933 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 13934 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 13935 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 13936 | */ |
| 13937 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 13938 | /** Transmit model parameters. |
| 13939 | * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 13940 | * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 13941 | * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 13942 | * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 13943 | */ |
| 13944 | A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 13945 | /** |
| 13946 | * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 13947 | * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 13948 | * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 13949 | * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 13950 | */ |
| 13951 | A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 13952 | /** |
| 13953 | * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 13954 | * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 13955 | * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 13956 | * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 13957 | */ |
| 13958 | A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 13959 | /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */ |
| 13960 | A_UINT32 tm_max_channel_use; |
| 13961 | /** |
| 13962 | * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 13963 | * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 13964 | * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 13965 | * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 13966 | */ |
| 13967 | A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 13968 | /** Channel load thresholds. |
| 13969 | * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 13970 | * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 13971 | */ |
| 13972 | A_UINT32 min_max_channel_load; |
| 13973 | /** Transmit queue parameters. |
| 13974 | * NDL_numQueue, ndlType_acPrio, 1+3 bits. |
| 13975 | * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit. |
| 13976 | * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit. |
| 13977 | * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit. |
| 13978 | * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit. |
| 13979 | */ |
| 13980 | A_UINT32 transmit_queue_parameters; |
| 13981 | /** |
| 13982 | * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits. |
| 13983 | * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits. |
| 13984 | * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits. |
| 13985 | * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits. |
| 13986 | */ |
| 13987 | A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)]; |
| 13988 | } wmi_dcc_ndl_chan; |
| 13989 | |
| 13990 | #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 13991 | #define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 13992 | #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7) |
| 13993 | #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val) |
| 13994 | |
| 13995 | #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10) |
| 13996 | #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val) |
| 13997 | |
| 13998 | #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16) |
| 13999 | #define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val) |
| 14000 | |
| 14001 | |
| 14002 | #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1) |
| 14003 | #define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val) |
| 14004 | #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1) |
| 14005 | #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val) |
| 14006 | #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16) |
| 14007 | #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val) |
| 14008 | |
| 14009 | #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13) |
| 14010 | #define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val) |
| 14011 | #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13) |
| 14012 | #define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val) |
| 14013 | |
| 14014 | #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8) |
| 14015 | #define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val) |
| 14016 | #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8) |
| 14017 | #define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val) |
| 14018 | |
| 14019 | #define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 14020 | #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) |
| 14021 | |
| 14022 | #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION) |
| 14023 | #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) |
| 14024 | #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11) |
| 14025 | #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val) |
| 14026 | #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11) |
| 14027 | #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val) |
| 14028 | #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 14029 | #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) |
| 14030 | |
| 14031 | #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4) |
| 14032 | #define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val) |
| 14033 | #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4) |
| 14034 | #define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val) |
| 14035 | #define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 14036 | #define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 14037 | |
| 14038 | #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8) |
| 14039 | #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val) |
| 14040 | #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8) |
| 14041 | #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val) |
| 14042 | #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8) |
| 14043 | #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val) |
| 14044 | |
| 14045 | #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8) |
| 14046 | #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val) |
| 14047 | #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13) |
| 14048 | #define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val) |
| 14049 | #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6) |
| 14050 | #define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val) |
| 14051 | |
| 14052 | #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8) |
| 14053 | #define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val) |
| 14054 | |
| 14055 | #define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 14056 | #define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 14057 | |
| 14058 | #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) |
| 14059 | #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) |
| 14060 | #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) |
| 14061 | #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) |
| 14062 | #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) |
| 14063 | #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) |
| 14064 | #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14) |
| 14065 | #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val) |
| 14066 | #define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 14067 | #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) |
| 14068 | |
| 14069 | #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11) |
| 14070 | #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val) |
| 14071 | #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11) |
| 14072 | #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val) |
| 14073 | |
| 14074 | #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4) |
| 14075 | #define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val) |
| 14076 | #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2) |
| 14077 | #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val) |
| 14078 | #define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS) |
| 14079 | #define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val) |
| 14080 | |
| 14081 | /** Data structure for updating the NDL. */ |
| 14082 | typedef struct { |
| 14083 | /** TLV tag and len; tag equals |
| 14084 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */ |
| 14085 | A_UINT32 tlv_header; |
| 14086 | /* VDEV identifier */ |
| 14087 | A_UINT32 vdev_id; |
| 14088 | /** The number of channels in the request. */ |
| 14089 | A_UINT32 num_channel; |
| 14090 | /** This is followed by a TLV array of wmi_dcc_ndl_chan. */ |
| 14091 | /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */ |
| 14092 | } wmi_dcc_update_ndl_cmd_fixed_param; |
| 14093 | |
| 14094 | typedef struct { |
| 14095 | /** |
| 14096 | * TLV tag and len; tag equals |
| 14097 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param |
| 14098 | */ |
| 14099 | A_UINT32 tlv_header; |
| 14100 | /* VDEV identifier */ |
| 14101 | A_UINT32 vdev_id; |
| 14102 | A_UINT32 status; |
| 14103 | } wmi_dcc_update_ndl_resp_event_fixed_param; |
| 14104 | |
| 14105 | /* Actions for TSF timestamp */ |
| 14106 | typedef enum { |
| 14107 | TSF_TSTAMP_CAPTURE_REQ = 1, |
| 14108 | TSF_TSTAMP_CAPTURE_RESET = 2, |
| 14109 | TSF_TSTAMP_READ_VALUE = 3, |
Govind Singh | d2970e3 | 2016-01-21 10:30:02 +0530 | [diff] [blame] | 14110 | TSF_TSTAMP_QTIMER_CAPTURE_REQ = 4, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14111 | } wmi_tsf_tstamp_action; |
| 14112 | |
| 14113 | typedef struct { |
| 14114 | /** TLV tag and len; tag equals |
| 14115 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */ |
| 14116 | A_UINT32 tlv_header; |
| 14117 | /** unique id identifying the VDEV, generated by the caller */ |
| 14118 | A_UINT32 vdev_id; |
| 14119 | /* action type, refer to wmi_tsf_tstamp_action */ |
| 14120 | A_UINT32 tsf_action; |
| 14121 | } wmi_vdev_tsf_tstamp_action_cmd_fixed_param; |
| 14122 | |
| 14123 | typedef struct { |
| 14124 | /* TLV tag and len; tag equals |
| 14125 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */ |
| 14126 | A_UINT32 tlv_header; |
| 14127 | /* VDEV identifier */ |
| 14128 | A_UINT32 vdev_id; |
| 14129 | /* low 32bit of tsf */ |
| 14130 | A_UINT32 tsf_low; |
| 14131 | /* high 32 bit of tsf */ |
| 14132 | A_UINT32 tsf_high; |
Krishna Kumaar Natarajan | 40b3c11 | 2016-03-25 14:36:18 -0700 | [diff] [blame] | 14133 | /* low 32 bits of qtimer */ |
| 14134 | A_UINT32 qtimer_low; |
| 14135 | /* high 32 bits of qtimer */ |
| 14136 | A_UINT32 qtimer_high; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14137 | } wmi_vdev_tsf_report_event_fixed_param; |
| 14138 | |
| 14139 | typedef struct { |
| 14140 | /** TLV tag and len; tag equals |
| 14141 | * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */ |
| 14142 | A_UINT32 tlv_header; |
| 14143 | /* unique id identifying the VDEV, generated by the caller */ |
| 14144 | A_UINT32 vdev_id; |
| 14145 | /* unique id to identify the ie_data as defined by ieee 802.11 spec */ |
| 14146 | A_UINT32 ie_id; |
| 14147 | /* ie_len corresponds to num of bytes in ie_data[] */ |
| 14148 | A_UINT32 ie_len; |
| 14149 | /* |
| 14150 | * Following this structure is the TLV byte stream of ie data of length |
| 14151 | * buf_len: |
| 14152 | * A_UINT8 ie_data[]; |
| 14153 | */ |
| 14154 | } wmi_vdev_set_ie_cmd_fixed_param; |
| 14155 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14156 | /* DEPRECATED - use wmi_pdev_set_pcl_cmd_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14157 | typedef struct { |
| 14158 | /* |
| 14159 | * TLV tag and len; tag equals |
| 14160 | * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param |
| 14161 | * Set Preferred Channel List |
| 14162 | */ |
| 14163 | A_UINT32 tlv_header; |
| 14164 | |
| 14165 | /* # of channels to scan */ |
| 14166 | A_UINT32 num_chan; |
| 14167 | /* |
| 14168 | * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd |
| 14169 | * structure. The TLV's are: |
| 14170 | * A_UINT32 channel_list[]; |
| 14171 | */ |
| 14172 | } wmi_soc_set_pcl_cmd_fixed_param; |
| 14173 | |
| 14174 | typedef struct { |
| 14175 | /* TLV tag and len; tag equals |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14176 | * WMITLV_TAG_STRUC_wmi_pdev_set_pcl_cmd_fixed_param |
| 14177 | */ |
| 14178 | A_UINT32 tlv_header; |
| 14179 | /** Set Preferred Channel List **/ |
| 14180 | |
| 14181 | /** pdev_id for identifying the MAC |
| 14182 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14183 | */ |
| 14184 | A_UINT32 pdev_id; |
| 14185 | |
| 14186 | /** # of channels to scan */ |
| 14187 | A_UINT32 num_chan; |
| 14188 | /** |
| 14189 | * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd |
| 14190 | * structure. The TLV's are: |
| 14191 | * A_UINT32 channel_weight[]; |
| 14192 | * channel order & size will be as per the list provided |
| 14193 | * in WMI_SCAN_CHAN_LIST_CMDID |
| 14194 | **/ |
| 14195 | } wmi_pdev_set_pcl_cmd_fixed_param; |
| 14196 | |
| 14197 | /* DEPRECATED - use wmi_pdev_set_hw_mode_cmd_fixed_param instead */ |
| 14198 | typedef struct { |
| 14199 | /* TLV tag and len; tag equals |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14200 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param |
| 14201 | * Set Hardware Mode */ |
| 14202 | A_UINT32 tlv_header; |
| 14203 | |
| 14204 | /* Hardware Mode Index */ |
| 14205 | A_UINT32 hw_mode_index; |
| 14206 | } wmi_soc_set_hw_mode_cmd_fixed_param; |
| 14207 | |
| 14208 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14209 | /* TLV tag and len; tag equals |
| 14210 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_cmd_fixed_param |
| 14211 | */ |
| 14212 | A_UINT32 tlv_header; |
| 14213 | /** Set Hardware Mode **/ |
| 14214 | |
| 14215 | /** pdev_id for identifying the MAC |
| 14216 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14217 | */ |
| 14218 | A_UINT32 pdev_id; |
| 14219 | |
| 14220 | /* Hardware Mode Index */ |
| 14221 | A_UINT32 hw_mode_index; |
| 14222 | } wmi_pdev_set_hw_mode_cmd_fixed_param; |
| 14223 | |
| 14224 | /* DEPRECATED - use wmi_pdev_set_mac_config_cmd_fixed_param instead */ |
| 14225 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14226 | /* |
| 14227 | * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param |
| 14228 | * Set Dual MAC Firmware Configuration |
| 14229 | */ |
| 14230 | A_UINT32 tlv_header; |
| 14231 | |
| 14232 | /* Concurrent scan configuration bits */ |
| 14233 | A_UINT32 concurrent_scan_config_bits; |
| 14234 | /* Firmware mode configuration bits */ |
| 14235 | A_UINT32 fw_mode_config_bits; |
| 14236 | } wmi_soc_set_dual_mac_config_cmd_fixed_param; |
| 14237 | |
| 14238 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14239 | /* TLV tag and len; tag equals |
| 14240 | * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_cmd_fixed_param |
| 14241 | */ |
| 14242 | A_UINT32 tlv_header; |
| 14243 | /** Set Dual MAC Firmware Configuration **/ |
| 14244 | |
| 14245 | /** pdev_id for identifying the MAC |
| 14246 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14247 | */ |
| 14248 | A_UINT32 pdev_id; |
| 14249 | |
| 14250 | /* Concurrent scan configuration bits */ |
| 14251 | A_UINT32 concurrent_scan_config_bits; |
| 14252 | /* Firmware mode configuration bits */ |
| 14253 | A_UINT32 fw_mode_config_bits; |
| 14254 | } wmi_pdev_set_mac_config_cmd_fixed_param; |
| 14255 | |
| 14256 | typedef struct { /* DEPRECATED */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14257 | A_UINT32 num_tx_chains; |
| 14258 | A_UINT32 num_rx_chains; |
| 14259 | A_UINT32 reserved[2]; |
| 14260 | } soc_num_tx_rx_chains; |
| 14261 | |
| 14262 | typedef struct { |
| 14263 | A_UINT32 num_tx_chains_2g; |
| 14264 | A_UINT32 num_rx_chains_2g; |
| 14265 | A_UINT32 num_tx_chains_5g; |
| 14266 | A_UINT32 num_rx_chains_5g; |
| 14267 | } band_num_tx_rx_chains; |
| 14268 | |
| 14269 | typedef union { |
| 14270 | soc_num_tx_rx_chains soc_txrx_chain_setting; |
| 14271 | band_num_tx_rx_chains band_txrx_chain_setting; |
| 14272 | } antenna_num_tx_rx_chains; |
| 14273 | |
| 14274 | typedef enum { |
| 14275 | ANTENNA_MODE_DISABLED = 0x0, |
| 14276 | ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01, |
| 14277 | /* reserved */ |
| 14278 | } antenna_mode_reason; |
| 14279 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14280 | /* DEPRECATED - use wmi_pdev_set_antenna_mode_cmd_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14281 | typedef struct { |
| 14282 | /* |
| 14283 | * TLV tag and len; |
| 14284 | * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param |
| 14285 | */ |
| 14286 | A_UINT32 tlv_header; |
| 14287 | |
| 14288 | /* the reason for setting antenna mode, refer antenna_mode_reason */ |
| 14289 | A_UINT32 reason; |
| 14290 | |
| 14291 | /* |
| 14292 | * The above reason parameter will select whether the following union |
| 14293 | * is soc_num_tx_rx_chains or band_num_tx_rx_chains. |
| 14294 | */ |
| 14295 | antenna_num_tx_rx_chains num_txrx_chains_setting; |
| 14296 | } wmi_soc_set_antenna_mode_cmd_fixed_param; |
| 14297 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14298 | typedef struct { |
| 14299 | /* TLV tag and len; tag equals |
| 14300 | * WMITLV_TAG_STRUC_wmi_pdev_set_antenna_mode_cmd_fixed_param |
| 14301 | */ |
| 14302 | A_UINT32 tlv_header; |
| 14303 | |
| 14304 | /** pdev_id for identifying the MAC |
| 14305 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14306 | */ |
| 14307 | A_UINT32 pdev_id; |
| 14308 | |
| 14309 | /* Bits 0-15 is the number of RX chains and |
| 14310 | * 16-31 is the number of TX chains |
| 14311 | */ |
| 14312 | A_UINT32 num_txrx_chains; |
| 14313 | } wmi_pdev_set_antenna_mode_cmd_fixed_param; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14314 | |
| 14315 | /** Data structure for information specific to a VDEV to MAC mapping. */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14316 | /* DEPRECATED - use wmi_pdev_set_hw_mode_response_vdev_mac_entry instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14317 | typedef struct { |
| 14318 | /* |
| 14319 | * TLV tag and len; tag equals |
| 14320 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */ |
| 14321 | A_UINT32 tlv_header; |
| 14322 | A_UINT32 vdev_id; /* VDEV ID */ |
| 14323 | A_UINT32 mac_id; /* MAC ID */ |
| 14324 | } wmi_soc_set_hw_mode_response_vdev_mac_entry; |
| 14325 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14326 | /** Data structure for information specific to a VDEV to MAC mapping. */ |
| 14327 | typedef struct { |
| 14328 | /** TLV tag and len; tag equals |
| 14329 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_vdev_mac_entry */ |
| 14330 | A_UINT32 tlv_header; |
| 14331 | |
| 14332 | /** pdev_id for identifying the MAC |
| 14333 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14334 | */ |
| 14335 | A_UINT32 pdev_id; |
| 14336 | |
| 14337 | A_UINT32 vdev_id; |
| 14338 | } wmi_pdev_set_hw_mode_response_vdev_mac_entry; |
| 14339 | |
| 14340 | /* DEPRECATED - use wmi_pdev_set_hw_mode_response_event_fixed_param instead */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14341 | typedef struct { |
| 14342 | /* TLV tag and len; tag equals |
| 14343 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param |
| 14344 | * Set Hardware Mode Response Event **/ |
| 14345 | A_UINT32 tlv_header; |
| 14346 | |
| 14347 | /* Status of set_hw_mode command |
| 14348 | * Values for Status: |
| 14349 | * 0 - OK; command successful |
| 14350 | * 1 - EINVAL; Requested invalid hw_mode |
| 14351 | * 2 - ECANCELED; HW mode change canceled |
| 14352 | * 3 - ENOTSUP; HW mode not supported |
| 14353 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14354 | * 5 - EPENDING; HW mode change is pending |
| 14355 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14356 | */ |
| 14357 | A_UINT32 status; |
| 14358 | /* Configured Hardware Mode */ |
| 14359 | A_UINT32 cfgd_hw_mode_index; |
| 14360 | /* Number of Vdev to Mac entries */ |
| 14361 | A_UINT32 num_vdev_mac_entries; |
| 14362 | /* |
| 14363 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 14364 | * structure. The TLV's are: |
| 14365 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14366 | */ |
| 14367 | } wmi_soc_set_hw_mode_response_event_fixed_param; |
| 14368 | |
| 14369 | typedef struct { |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14370 | /* TLV tag and len; tag equals |
| 14371 | * WMITLV_TAG_STRUC_wmi_pdev_set_hw_mode_response_event_fixed_param |
| 14372 | */ |
| 14373 | A_UINT32 tlv_header; |
| 14374 | /** Set Hardware Mode Response Event **/ |
| 14375 | |
| 14376 | /** pdev_id for identifying the MAC |
| 14377 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14378 | */ |
| 14379 | A_UINT32 pdev_id; |
| 14380 | |
| 14381 | /* Status of set_hw_mode command */ |
| 14382 | /* |
| 14383 | * Values for Status: |
| 14384 | * 0 - OK; command successful |
| 14385 | * 1 - EINVAL; Requested invalid hw_mode |
| 14386 | * 2 - ECANCELED; HW mode change canceled |
| 14387 | * 3 - ENOTSUP; HW mode not supported |
| 14388 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14389 | * 5 - EPENDING; HW mode change is pending |
| 14390 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14391 | */ |
| 14392 | A_UINT32 status; |
| 14393 | /* Configured Hardware Mode */ |
| 14394 | A_UINT32 cfgd_hw_mode_index; |
| 14395 | /* Number of Vdev to Mac entries */ |
| 14396 | A_UINT32 num_vdev_mac_entries; |
| 14397 | /** |
| 14398 | * TLV (tag length value ) parameters follow the |
| 14399 | * soc_set_hw_mode_response_event structure. The TLV's are: |
| 14400 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14401 | */ |
| 14402 | } wmi_pdev_set_hw_mode_response_event_fixed_param; |
| 14403 | |
| 14404 | /* DEPRECATED - use wmi_pdev_hw_mode_transition_event_fixed_param instead */ |
| 14405 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14406 | /* |
| 14407 | * TLV tag and len; tag equals |
| 14408 | * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param |
| 14409 | * Hardware Mode Transition Event |
| 14410 | */ |
| 14411 | A_UINT32 tlv_header; |
| 14412 | /* Original or old Hardware mode */ |
| 14413 | A_UINT32 old_hw_mode_index; |
| 14414 | /* New Hardware Mode */ |
| 14415 | A_UINT32 new_hw_mode_index; |
| 14416 | /* Number of Vdev to Mac entries */ |
| 14417 | A_UINT32 num_vdev_mac_entries; |
| 14418 | |
| 14419 | /** |
| 14420 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 14421 | * structure. The TLV's are: |
| 14422 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14423 | */ |
| 14424 | } wmi_soc_hw_mode_transition_event_fixed_param; |
| 14425 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14426 | typedef struct { |
| 14427 | /* TLV tag and len; tag equals |
| 14428 | * WMITLV_TAG_STRUC_wmi_pdev_hw_mode_transition_event_fixed_param |
| 14429 | */ |
| 14430 | A_UINT32 tlv_header; |
| 14431 | /** Hardware Mode Transition Event **/ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14432 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14433 | /** pdev_id for identifying the MAC |
| 14434 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14435 | */ |
| 14436 | A_UINT32 pdev_id; |
| 14437 | |
| 14438 | /* Original or old Hardware mode */ |
| 14439 | A_UINT32 old_hw_mode_index; |
| 14440 | /* New Hardware Mode */ |
| 14441 | A_UINT32 new_hw_mode_index; |
| 14442 | /* Number of Vdev to Mac entries */ |
| 14443 | A_UINT32 num_vdev_mac_entries; |
| 14444 | |
| 14445 | /** |
| 14446 | * TLV (tag length value ) parameters follow the |
| 14447 | * soc_set_hw_mode_response_event structure. The TLV's are: |
| 14448 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 14449 | */ |
| 14450 | } wmi_pdev_hw_mode_transition_event_fixed_param; |
| 14451 | |
Pradeep Reddy POTTETI | dead2bd | 2016-06-09 17:11:12 +0530 | [diff] [blame] | 14452 | /** |
| 14453 | * This command is sent from WLAN host driver to firmware for |
| 14454 | * plugging in reorder queue desc to lithium hw. |
| 14455 | * |
| 14456 | * Example: plug-in queue desc for TID 5 |
| 14457 | * host->target: WMI_PEER_REORDER_QUEUE_SETUP_CMDID, |
| 14458 | * (vdev_id = PEER vdev id, |
| 14459 | * peer_macaddr = PEER mac addr, |
| 14460 | * tid = 5, |
| 14461 | * queue_ptr_lo = queue desc addr lower 32 bits, |
| 14462 | * queue_ptr_hi = queue desc addr higher 32 bits, |
| 14463 | * queue_no = 16-bit number assigned by host for queue, |
| 14464 | * stored in bits 15:0 of queue_no field) |
| 14465 | */ |
| 14466 | typedef struct { |
| 14467 | /* TLV tag and len; tag equals |
| 14468 | * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_setup_cmd_fixed_param |
| 14469 | */ |
| 14470 | A_UINT32 tlv_header; |
| 14471 | A_UINT32 vdev_id; |
| 14472 | /* peer mac address */ |
| 14473 | wmi_mac_addr peer_macaddr; |
| 14474 | /* 0 to 15 = QoS TIDs, 16 = non-qos TID */ |
| 14475 | A_UINT32 tid; |
| 14476 | /* lower 32 bits of queue desc adddress */ |
| 14477 | A_UINT32 queue_ptr_lo; |
| 14478 | /* upper 32 bits of queue desc adddress */ |
| 14479 | A_UINT32 queue_ptr_hi; |
| 14480 | /* 16-bit number assigned by host for queue, |
| 14481 | * stored in bits 15:0 of queue_no field |
| 14482 | */ |
| 14483 | A_UINT32 queue_no; |
| 14484 | } wmi_peer_reorder_queue_setup_cmd_fixed_param; |
| 14485 | |
| 14486 | /** |
| 14487 | * This command is sent from WLAN host driver to firmware for |
| 14488 | * removing one or more reorder queue desc to lithium hw. |
| 14489 | * |
| 14490 | * Example: remove queue desc for all TIDs |
| 14491 | * host->target: WMI_PEER_REORDER_REMOVE_CMDID, |
| 14492 | * (vdev_id = PEER vdev id, |
| 14493 | * peer_macaddr = PEER mac addr, |
| 14494 | * tid = 0x1FFFF, |
| 14495 | */ |
| 14496 | typedef struct { |
| 14497 | /* TLV tag and len; |
| 14498 | * tag equals |
| 14499 | * WMITLV_TAG_STRUC_wmi_peer_reorder_queue_remove_cmd_fixed_param |
| 14500 | */ |
| 14501 | A_UINT32 tlv_header; |
| 14502 | A_UINT32 vdev_id; |
| 14503 | /* peer mac address */ |
| 14504 | wmi_mac_addr peer_macaddr; |
| 14505 | /* bits 0 to 15 = QoS TIDs, bit 16 = non-qos TID */ |
| 14506 | A_UINT32 tid_mask; |
| 14507 | } wmi_peer_reorder_queue_remove_cmd_fixed_param; |
| 14508 | |
| 14509 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14510 | /* DEPRECATED - use wmi_pdev_set_mac_config_response_event_fixed_param |
| 14511 | * instead |
| 14512 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14513 | typedef struct { |
| 14514 | /* |
| 14515 | * TLV tag and len; tag equals |
| 14516 | * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param |
| 14517 | * Set Dual MAC Config Response Event |
| 14518 | */ |
| 14519 | A_UINT32 tlv_header; |
| 14520 | |
| 14521 | /* Status for set_dual_mac_config command */ |
| 14522 | /* |
| 14523 | * Values for Status: |
| 14524 | * 0 - OK; command successful |
| 14525 | * 1 - EINVAL; Requested invalid hw_mode |
| 14526 | * 3 - ENOTSUP; HW mode not supported |
| 14527 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14528 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14529 | */ |
| 14530 | A_UINT32 status; |
| 14531 | } wmi_soc_set_dual_mac_config_response_event_fixed_param; |
| 14532 | |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 14533 | typedef struct { |
| 14534 | /* TLV tag and len; tag equals |
| 14535 | * WMITLV_TAG_STRUC_wmi_pdev_set_mac_config_response_event_fixed_param |
| 14536 | */ |
| 14537 | A_UINT32 tlv_header; |
| 14538 | /** Set Dual MAC Config Response Event **/ |
| 14539 | |
| 14540 | /** pdev_id for identifying the MAC |
| 14541 | * See macros starting with WMI_PDEV_ID_ for values. |
| 14542 | */ |
| 14543 | A_UINT32 pdev_id; |
| 14544 | |
| 14545 | /* Status for set_dual_mac_config command */ |
| 14546 | /* |
| 14547 | * Values for Status: |
| 14548 | * 0 - OK; command successful |
| 14549 | * 1 - EINVAL; Requested invalid hw_mode |
| 14550 | * 3 - ENOTSUP; HW mode not supported |
| 14551 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 14552 | * 6 - ECOEX; HW mode change conflict with Coex |
| 14553 | */ |
| 14554 | A_UINT32 status; |
| 14555 | } wmi_pdev_set_mac_config_response_event_fixed_param; |
| 14556 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14557 | typedef enum { |
| 14558 | MAWC_MOTION_STATE_UNKNOWN, |
| 14559 | MAWC_MOTION_STATE_STATIONARY, |
| 14560 | MAWC_MOTION_STATE_WALK, |
| 14561 | MAWC_MOTION_STATE_TRANSIT, |
| 14562 | } MAWC_MOTION_STATE; |
| 14563 | |
| 14564 | typedef enum { |
| 14565 | MAWC_SENSOR_STATUS_OK, |
| 14566 | MAWC_SENSOR_STATUS_FAILED_TO_ENABLE, |
| 14567 | MAWC_SENSOR_STATUS_SHUTDOWN, |
| 14568 | } MAWC_SENSOR_STATUS; |
| 14569 | |
| 14570 | typedef struct { |
| 14571 | /* TLV tag and len; tag equals |
| 14572 | * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */ |
| 14573 | A_UINT32 tlv_header; |
| 14574 | /** new motion state, MAWC_MOTION_STATE */ |
| 14575 | A_UINT32 motion_state; |
| 14576 | /** status code of sensor, MAWC_SENSOR_STATUS */ |
| 14577 | A_UINT32 sensor_status; |
| 14578 | } wmi_mawc_sensor_report_ind_cmd_fixed_param; |
| 14579 | |
Govind Singh | 8618029 | 2016-02-01 14:03:37 +0530 | [diff] [blame] | 14580 | /* MBO flag field definition */ |
| 14581 | /* |
| 14582 | * Bit 0: 0 - Allow to connect to both MBO and non-MBO AP |
| 14583 | * 1 - Allow to connect to MBO AP only |
| 14584 | * Bit 1-31 : reserved. |
| 14585 | */ |
| 14586 | #define WMI_ROAM_MBO_FLAG_MBO_ONLY_MODE (1<<0) |
| 14587 | |
| 14588 | typedef struct { |
| 14589 | /* |
| 14590 | * TLV tag and len; tag equals |
| 14591 | * WMITLV_TAG_STRUC_wmi_roam_set_mbo_fixed_param |
| 14592 | */ |
| 14593 | A_UINT32 tlv_header; |
| 14594 | /** vdev id */ |
| 14595 | A_UINT32 vdev_id; |
| 14596 | /** enable or disable MBO */ |
| 14597 | A_UINT32 enable; |
| 14598 | /** MBO flags, refer to definition of MBO flags*/ |
| 14599 | A_UINT32 flags; |
| 14600 | } wmi_roam_set_mbo_fixed_param; |
| 14601 | |
| 14602 | typedef struct { |
| 14603 | /* |
| 14604 | * TLV tag and len; tag equals |
| 14605 | * WMITLV_TAG_ARRAY_STRUC |
| 14606 | */ |
| 14607 | A_UINT32 tlv_header; |
| 14608 | /** Current operating class number */ |
| 14609 | A_UINT32 cur_op_class; |
| 14610 | /* |
| 14611 | * Country string of current reg domain, |
| 14612 | * the expected value should be same as country str defined |
| 14613 | * in country IE. |
| 14614 | * 3 octets (COUNTRY_STR) + 1 octet (always 0) |
| 14615 | * The ordering of this array must be maintained, |
| 14616 | * even when a big-endian host's WMI messages undergo |
| 14617 | * automatic byte reordering for conversion to the |
| 14618 | * little-endian ordering required by the target. |
| 14619 | * On big-endian hosts, this array may need to be byte-swapped |
| 14620 | * by the host, so the subsequent automatic byte-swap |
| 14621 | * will result in the correct final byte order. |
| 14622 | * global operating class: set country_str[0]=0 |
| 14623 | */ |
| 14624 | A_UINT8 country_str[4]; |
| 14625 | /** Supported operating class number in current regdomain */ |
| 14626 | A_UINT32 supp_op_class_num; |
| 14627 | /* The TLVs will follow. */ |
| 14628 | /* A_UINT32 supp_op_class_list[] */ |
| 14629 | } wmi_supported_operating_class_param; |
| 14630 | |
| 14631 | typedef struct { |
| 14632 | /* |
| 14633 | * TLV tag and len; tag equals |
| 14634 | * WMITLV_TAG_ARRAY_STRUC |
| 14635 | */ |
| 14636 | A_UINT32 tlv_header; |
| 14637 | /** non preferred channel attribute length */ |
| 14638 | A_UINT32 non_prefer_ch_attr_len; |
| 14639 | /* The TLVs will follow. */ |
| 14640 | /** A_UINT8 non_prefer_ch_attr[];*/ |
| 14641 | } wmi_mbo_non_preferred_channel_report_param; |
| 14642 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14643 | typedef struct { |
| 14644 | /* TLV tag and len; tag equals |
| 14645 | * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */ |
| 14646 | A_UINT32 tlv_header; |
| 14647 | /* enable(1) or disable(0) */ |
| 14648 | A_UINT32 enable; |
| 14649 | } wmi_mawc_enable_sensor_event_fixed_param; |
| 14650 | |
| 14651 | typedef struct { |
| 14652 | /* TLV tag and len; tag equals |
| 14653 | * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */ |
| 14654 | A_UINT32 tlv_header; |
| 14655 | /* Unique id identifying the VDEV */ |
| 14656 | A_UINT32 vdev_id; |
| 14657 | /* enable(1) or disable(0) MAWC */ |
| 14658 | A_UINT32 enable; |
| 14659 | /* ratio of skipping suppressing scan, skip one out of x */ |
| 14660 | A_UINT32 suppress_ratio; |
| 14661 | } wmi_extscan_configure_mawc_cmd_fixed_param; |
| 14662 | |
| 14663 | typedef struct { |
| 14664 | /* TLV tag and len; tag equals |
| 14665 | * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */ |
| 14666 | A_UINT32 tlv_header; |
| 14667 | /* Unique id identifying the VDEV */ |
| 14668 | A_UINT32 vdev_id; |
| 14669 | /* enable(1) or disable(0) MAWC */ |
| 14670 | A_UINT32 enable; |
| 14671 | /* ratio of exponential backoff, next = current + current*ratio/100 */ |
| 14672 | A_UINT32 exp_backoff_ratio; |
| 14673 | /* initial scan interval(msec) */ |
| 14674 | A_UINT32 init_scan_interval; |
| 14675 | /* max scan interval(msec) */ |
| 14676 | A_UINT32 max_scan_interval; |
| 14677 | } wmi_nlo_configure_mawc_cmd_fixed_param; |
| 14678 | |
| 14679 | typedef struct { |
| 14680 | /* TLV tag and len; tag equals |
| 14681 | * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */ |
| 14682 | A_UINT32 tlv_header; |
| 14683 | /* Unique id identifying the VDEV */ |
| 14684 | A_UINT32 vdev_id; |
| 14685 | /* enable(1) or disable(0) MAWC */ |
| 14686 | A_UINT32 enable; |
| 14687 | /* data traffic load (kBps) to register CMC */ |
| 14688 | A_UINT32 traffic_load_threshold; |
| 14689 | /* RSSI threshold (dBm) to scan for Best AP */ |
| 14690 | A_UINT32 best_ap_rssi_threshold; |
| 14691 | /* high RSSI threshold adjustment in Stationary to suppress scan */ |
| 14692 | A_UINT32 rssi_stationary_high_adjust; |
| 14693 | /* low RSSI threshold adjustment in Stationary to suppress scan */ |
| 14694 | A_UINT32 rssi_stationary_low_adjust; |
| 14695 | } wmi_roam_configure_mawc_cmd_fixed_param; |
| 14696 | |
| 14697 | #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2 |
Himanshu Agarwal | 2690e46 | 2016-06-03 14:26:01 +0530 | [diff] [blame] | 14698 | #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 5 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14699 | |
| 14700 | typedef enum { |
| 14701 | PACKET_FILTER_TYPE_INVALID = 0, |
| 14702 | PACKET_FILTER_TYPE_FILTER_PKT, |
| 14703 | PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */ |
| 14704 | PACKET_FILTER_TYPE_MAX_ENUM_SIZE |
| 14705 | } WMI_PACKET_FILTER_FILTER_TYPE; |
| 14706 | |
| 14707 | typedef enum { |
| 14708 | PACKET_FILTER_PROTO_TYPE_INVALID = 0, |
| 14709 | |
| 14710 | /* L2 header */ |
| 14711 | PACKET_FILTER_PROTO_TYPE_MAC, |
| 14712 | PACKET_FILTER_PROTO_TYPE_SNAP, |
| 14713 | |
| 14714 | /* L3 header (EtherType) */ |
| 14715 | PACKET_FILTER_PROTO_TYPE_IPV4, |
| 14716 | PACKET_FILTER_PROTO_TYPE_IPV6, |
| 14717 | |
| 14718 | /* L4 header (IP protocol) */ |
| 14719 | PACKET_FILTER_PROTO_TYPE_UDP, |
| 14720 | PACKET_FILTER_PROTO_TYPE_TCP, |
| 14721 | PACKET_FILTER_PROTO_TYPE_ICMPV6, |
| 14722 | |
| 14723 | PACKET_FILTER_PROTO_TYPE_MAX |
| 14724 | } WMI_PACKET_FILTER_PROTO_TYPE; |
| 14725 | |
| 14726 | typedef enum { |
| 14727 | PACKET_FILTER_CMP_TYPE_INVALID = 0, |
| 14728 | PACKET_FILTER_CMP_TYPE_EQUAL, |
| 14729 | PACKET_FILTER_CMP_TYPE_MASK_EQUAL, |
| 14730 | PACKET_FILTER_CMP_TYPE_NOT_EQUAL, |
| 14731 | PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL, |
| 14732 | PACKET_FILTER_CMP_TYPE_ADDRTYPE, |
| 14733 | PACKET_FILTER_CMP_TYPE_MAX |
| 14734 | } WMI_PACKET_FILTER_CMP_TYPE; |
| 14735 | |
| 14736 | typedef enum { |
| 14737 | PACKET_FILTER_SET_INACTIVE = 0, |
| 14738 | PACKET_FILTER_SET_ACTIVE |
| 14739 | } WMI_PACKET_FILTER_ACTION; |
| 14740 | |
| 14741 | typedef enum { |
| 14742 | PACKET_FILTER_SET_DISABLE = 0, |
| 14743 | PACKET_FILTER_SET_ENABLE |
| 14744 | } WMI_PACKET_FILTER_RUNTIME_ENABLE; |
| 14745 | |
| 14746 | typedef struct { |
| 14747 | A_UINT32 proto_type; |
| 14748 | A_UINT32 cmp_type; |
| 14749 | A_UINT32 data_length; /* Length of the data to compare (units = bytes) */ |
| 14750 | /* |
| 14751 | * from start of the respective frame header ( |
| 14752 | * units = bytes) |
| 14753 | */ |
| 14754 | A_UINT32 data_offset; |
| 14755 | /* Data to compare, little-endian order */ |
| 14756 | A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 14757 | /* Mask to be applied on rcvd packet data before compare, little-endian order */ |
| 14758 | A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 14759 | } WMI_PACKET_FILTER_PARAMS_TYPE; |
| 14760 | |
| 14761 | typedef struct { |
| 14762 | A_UINT32 tlv_header; |
| 14763 | A_UINT32 vdev_id; |
| 14764 | A_UINT32 filter_id; |
| 14765 | A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */ |
| 14766 | A_UINT32 filter_type; |
| 14767 | A_UINT32 num_params; /* how many entries in paramsData are valid */ |
| 14768 | A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */ |
| 14769 | 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] | 14770 | /* |
| 14771 | * deprecated0: |
| 14772 | * This field simply provides filler space to retain the |
| 14773 | * original message format while reducing |
| 14774 | * WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER from 10 to 5. |
| 14775 | */ |
| 14776 | WMI_PACKET_FILTER_PARAMS_TYPE deprecated0[5]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 14777 | } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param; |
| 14778 | |
| 14779 | /* enable / disable all filters within the specified vdev */ |
| 14780 | typedef struct { |
| 14781 | A_UINT32 tlv_header; |
| 14782 | A_UINT32 vdev_id; |
| 14783 | A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */ |
| 14784 | } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param; |
| 14785 | |
| 14786 | |
| 14787 | #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0 |
| 14788 | #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9 |
| 14789 | |
| 14790 | #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \ |
| 14791 | WMI_SET_BITS(tcp_flag_u32, \ |
| 14792 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 14793 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \ |
| 14794 | tcp_flag_values) |
| 14795 | #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \ |
| 14796 | WMI_GET_BITS(tcp_flag_u32, \ |
| 14797 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 14798 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS) |
| 14799 | |
| 14800 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9 |
| 14801 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9 |
| 14802 | |
| 14803 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \ |
| 14804 | WMI_SET_BITS(tcp_flag_u32, \ |
| 14805 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 14806 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \ |
| 14807 | tcp_flags_mask) |
| 14808 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \ |
| 14809 | WMI_GET_BITS(tcp_flag_u32, \ |
| 14810 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 14811 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS) |
| 14812 | |
| 14813 | typedef struct { |
| 14814 | A_UINT32 tlv_header; |
| 14815 | /** |
| 14816 | * @brief lro_enable - indicates whether lro is enabled |
| 14817 | * [0] LRO Enable |
| 14818 | */ |
| 14819 | A_UINT32 lro_enable; |
| 14820 | /** |
| 14821 | * @brief tcp_flag_u32 - mask of which TCP flags to check and |
| 14822 | * values to check for |
| 14823 | * [8:0] TCP flag values - If the TCP flags from the packet do not match |
| 14824 | * the values in this field after masking with TCP flags mask |
| 14825 | * below,LRO eligible will not be set |
| 14826 | * [17:9] TCP flags mask - Mask field for comparing the TCP values |
| 14827 | * provided above with the TCP flags field in the received packet |
| 14828 | * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK |
| 14829 | * macros to isolate the mask field and values field that are packed |
| 14830 | * into this u32 "word". |
| 14831 | */ |
| 14832 | A_UINT32 tcp_flag_u32; |
| 14833 | /** |
| 14834 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 14835 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 14836 | * bytes 0 to 3 |
| 14837 | * |
| 14838 | * In this and all the below toeplitz_hash fields, the bytes are |
| 14839 | * specified in little-endian order. For example: |
| 14840 | * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0 |
| 14841 | * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1 |
| 14842 | * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2 |
| 14843 | * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3 |
| 14844 | */ |
| 14845 | A_UINT32 toeplitz_hash_ipv4_0_3; |
| 14846 | |
| 14847 | /** |
| 14848 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 14849 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 14850 | * bytes 4 to 7 |
| 14851 | */ |
| 14852 | A_UINT32 toeplitz_hash_ipv4_4_7; |
| 14853 | |
| 14854 | /** |
| 14855 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 14856 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 14857 | * bytes 8 to 11 |
| 14858 | */ |
| 14859 | A_UINT32 toeplitz_hash_ipv4_8_11; |
| 14860 | |
| 14861 | /** |
| 14862 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 14863 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 14864 | * bytes 12 to 15 |
| 14865 | */ |
| 14866 | A_UINT32 toeplitz_hash_ipv4_12_15; |
| 14867 | |
| 14868 | /** |
| 14869 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 14870 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 14871 | * byte 16 |
| 14872 | */ |
| 14873 | A_UINT32 toeplitz_hash_ipv4_16; |
| 14874 | |
| 14875 | /** |
| 14876 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14877 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14878 | * bytes 0 to 3 |
| 14879 | */ |
| 14880 | A_UINT32 toeplitz_hash_ipv6_0_3; |
| 14881 | |
| 14882 | /** |
| 14883 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14884 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14885 | * bytes 4 to 7 |
| 14886 | */ |
| 14887 | A_UINT32 toeplitz_hash_ipv6_4_7; |
| 14888 | |
| 14889 | /** |
| 14890 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14891 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14892 | * bytes 8 to 11 |
| 14893 | */ |
| 14894 | A_UINT32 toeplitz_hash_ipv6_8_11; |
| 14895 | |
| 14896 | /** |
| 14897 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14898 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14899 | * bytes 12 to 15 |
| 14900 | */ |
| 14901 | A_UINT32 toeplitz_hash_ipv6_12_15; |
| 14902 | |
| 14903 | /** |
| 14904 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14905 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14906 | * bytes 16 to 19 |
| 14907 | */ |
| 14908 | A_UINT32 toeplitz_hash_ipv6_16_19; |
| 14909 | |
| 14910 | /** |
| 14911 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14912 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14913 | * bytes 20 to 22 |
| 14914 | */ |
| 14915 | A_UINT32 toeplitz_hash_ipv6_20_23; |
| 14916 | |
| 14917 | /** |
| 14918 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14919 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14920 | * bytes 24 to 27 |
| 14921 | */ |
| 14922 | A_UINT32 toeplitz_hash_ipv6_24_27; |
| 14923 | |
| 14924 | /** |
| 14925 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14926 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14927 | * bytes 28 to 31 |
| 14928 | */ |
| 14929 | A_UINT32 toeplitz_hash_ipv6_28_31; |
| 14930 | |
| 14931 | /** |
| 14932 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14933 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14934 | * bytes 32 to 35 |
| 14935 | */ |
| 14936 | A_UINT32 toeplitz_hash_ipv6_32_35; |
| 14937 | |
| 14938 | /** |
| 14939 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14940 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14941 | * bytes 36 to 39 |
| 14942 | */ |
| 14943 | A_UINT32 toeplitz_hash_ipv6_36_39; |
| 14944 | |
| 14945 | /** |
| 14946 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 14947 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 14948 | * byte 40 |
| 14949 | */ |
| 14950 | A_UINT32 toeplitz_hash_ipv6_40; |
| 14951 | } wmi_lro_info_cmd_fixed_param; |
| 14952 | |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 14953 | typedef struct { |
| 14954 | /* |
| 14955 | * TLV tag and len; tag equals |
| 14956 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param |
| 14957 | */ |
| 14958 | A_UINT32 tlv_header; |
| 14959 | /* flash offset to write, starting from 0 */ |
| 14960 | A_UINT32 offset; |
| 14961 | /* vaild data length in buffer, unit: byte */ |
| 14962 | A_UINT32 length; |
| 14963 | } wmi_transfer_data_to_flash_cmd_fixed_param; |
| 14964 | |
| 14965 | typedef struct { |
| 14966 | /* |
| 14967 | * TLV tag and len; tag equals |
| 14968 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param |
| 14969 | */ |
| 14970 | A_UINT32 tlv_header; |
| 14971 | /* Return status. 0 for success, non-zero otherwise */ |
| 14972 | A_UINT32 status; |
| 14973 | } wmi_transfer_data_to_flash_complete_event_fixed_param; |
| 14974 | |
Pradeep Reddy POTTETI | 4189bf9 | 2016-06-20 14:51:55 +0530 | [diff] [blame^] | 14975 | typedef struct { |
| 14976 | /* |
| 14977 | * TLV tag and len; tag equals |
| 14978 | * WMITLV_TAG_STRUC_wmi_read_data_from_flash_cmd_fixed_param |
| 14979 | */ |
| 14980 | A_UINT32 tlv_header; |
| 14981 | A_UINT32 offset; /* flash offset to read, starting from 0 */ |
| 14982 | A_UINT32 length; /* data length to read, unit: byte */ |
| 14983 | } wmi_read_data_from_flash_cmd_fixed_param; |
| 14984 | |
| 14985 | typedef struct { |
| 14986 | /* |
| 14987 | * TLV tag and len; tag equals |
| 14988 | * WMITLV_TAG_STRUC_wmi_read_data_from_flash_event_fixed_param |
| 14989 | */ |
| 14990 | A_UINT32 tlv_header; |
| 14991 | A_UINT32 status; /* Return status. 0 for success, non-zero otherwise */ |
| 14992 | A_UINT32 offset; /* flash offset reading from, starting from 0 */ |
| 14993 | A_UINT32 length; /* length of data being reported, unit: byte */ |
| 14994 | } wmi_read_data_from_flash_event_fixed_param; |
| 14995 | |
Sreelakshmi Konamki | 58f4d62 | 2016-04-14 18:03:21 +0530 | [diff] [blame] | 14996 | typedef enum { |
| 14997 | ENHANCED_MCAST_FILTER_DISABLED, |
| 14998 | ENHANCED_MCAST_FILTER_ENABLED |
| 14999 | } ENHANCED_MCAST_FILTER_CONFIG; |
| 15000 | |
| 15001 | /* |
| 15002 | * Command to enable/disable filtering of multicast IP with unicast mac |
| 15003 | */ |
| 15004 | typedef struct { |
| 15005 | /* |
| 15006 | * TLV tag and len; tag equals |
| 15007 | * WMITLV_TAG_STRUC_wmi_config_enhanced_mcast_filter_fixed_param |
| 15008 | */ |
| 15009 | A_UINT32 tlv_header; |
| 15010 | /* Unique id identifying the VDEV */ |
| 15011 | A_UINT32 vdev_id; |
| 15012 | /* 1 = enable 0 = disable (see ENHANCED_MCAST_FILTER_CONFIG) */ |
| 15013 | A_UINT32 enable; |
| 15014 | } wmi_config_enhanced_mcast_filter_cmd_fixed_param; |
| 15015 | |
Anurag Chouhan | 05d05fe | 2016-04-18 17:09:24 +0530 | [diff] [blame] | 15016 | typedef struct { |
| 15017 | /* |
| 15018 | * TLV tag and len; tag equals |
| 15019 | * WMITLV_TAG_STRUC_wmi_vdev_wisa_cmd_fixed_param |
| 15020 | */ |
| 15021 | A_UINT32 tlv_header; |
| 15022 | /* unique id identifying the VDEV, generated by the caller */ |
| 15023 | A_UINT32 vdev_id; |
| 15024 | /* WISA enable / disable mode */ |
| 15025 | A_UINT32 wisa_mode; |
| 15026 | } wmi_vdev_wisa_cmd_fixed_param; |
| 15027 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 15028 | /* |
Manikandan Mohan | 55c94d6 | 2015-12-04 13:47:58 -0800 | [diff] [blame] | 15029 | * This structure is used to report SMPS force mode set complete to host. |
| 15030 | */ |
| 15031 | typedef struct { |
| 15032 | /* TLV tag and len; tag equals |
| 15033 | * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_complete_event_fixed_param |
| 15034 | */ |
| 15035 | A_UINT32 tlv_header; |
| 15036 | /* Unique id identifying the VDEV */ |
| 15037 | A_UINT32 vdev_id; |
| 15038 | /* Return status. 0 for success, non-zero otherwise */ |
| 15039 | A_UINT32 status; |
| 15040 | } wmi_sta_smps_force_mode_complete_event_fixed_param; |
| 15041 | |
| 15042 | /* |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 15043 | * This structure is used to report SCPC calibrated data to host. |
| 15044 | */ |
| 15045 | typedef struct { |
| 15046 | /* TLV tag and len; tag equals |
| 15047 | * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param |
| 15048 | */ |
| 15049 | A_UINT32 tlv_header; |
| 15050 | /* number of BDF patches. Each patch contains offset, length and data */ |
| 15051 | A_UINT32 num_patch; |
| 15052 | /* This TLV is followed by another TLV of array of bytes |
| 15053 | * A_UINT8 data[]; |
| 15054 | * This data array contains, for example |
| 15055 | * patch1 offset(byte3~0), patch1 data length(byte7~4), |
| 15056 | * patch1 data(byte11~8) |
| 15057 | * patch2 offset(byte15~12), patch2 data length(byte19~16), |
| 15058 | * patch2 data(byte47~20) |
| 15059 | */ |
| 15060 | } wmi_scpc_event_fixed_param; |
| 15061 | |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 15062 | /* bpf interface structure */ |
| 15063 | typedef struct wmi_bpf_get_capability_cmd_s { |
| 15064 | A_UINT32 tlv_header; |
| 15065 | A_UINT32 reserved; /* reserved for future use - must be filled with 0x0 */ |
| 15066 | } wmi_bpf_get_capability_cmd_fixed_param; |
| 15067 | |
| 15068 | typedef struct wmi_bpf_capability_info_evt_s { |
| 15069 | A_UINT32 tlv_header; |
| 15070 | A_UINT32 bpf_version; /* fw's implement version */ |
| 15071 | A_UINT32 max_bpf_filters; /* max filters that fw supports */ |
| 15072 | A_UINT32 max_bytes_for_bpf_inst; /* the maximum bytes that can be used as bpf instructions */ |
| 15073 | } wmi_bpf_capability_info_evt_fixed_param; |
| 15074 | |
| 15075 | /* bit 0 of flags: report counters */ |
| 15076 | #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_S 0 |
| 15077 | #define WMI_BPF_GET_VDEV_STATS_FLAG_CTR_M 0x1 |
| 15078 | typedef struct wmi_bpf_get_vdev_stats_cmd_s { |
| 15079 | A_UINT32 tlv_header; |
| 15080 | A_UINT32 flags; |
| 15081 | A_UINT32 vdev_id; |
| 15082 | } wmi_bpf_get_vdev_stats_cmd_fixed_param; |
| 15083 | |
| 15084 | typedef struct wmi_bpf_vdev_stats_info_evt_s { |
| 15085 | A_UINT32 tlv_header; |
| 15086 | A_UINT32 vdev_id; |
| 15087 | A_UINT32 num_filters; |
| 15088 | A_UINT32 num_checked_pkts; |
| 15089 | A_UINT32 num_dropped_pkts; |
| 15090 | } wmi_bpf_vdev_stats_info_evt_fixed_param; |
| 15091 | |
| 15092 | typedef struct wmi_bpf_set_vdev_instructions_cmd_s { |
| 15093 | A_UINT32 tlv_header; |
| 15094 | A_UINT32 vdev_id; |
| 15095 | A_UINT32 filter_id; |
| 15096 | A_UINT32 bpf_version; /* host bpf version */ |
| 15097 | A_UINT32 total_length; |
| 15098 | A_UINT32 current_offset; |
| 15099 | A_UINT32 current_length; |
Manikandan Mohan | 05ac7ee | 2015-12-23 14:18:36 -0800 | [diff] [blame] | 15100 | /* |
| 15101 | * The TLV follows: |
| 15102 | * A_UINT8 buf_inst[]; //Variable length buffer for the instuctions |
| 15103 | */ |
Manikandan Mohan | 130eb57 | 2015-12-23 13:53:34 -0800 | [diff] [blame] | 15104 | } wmi_bpf_set_vdev_instructions_cmd_fixed_param; |
| 15105 | |
| 15106 | #define BPF_FILTER_ID_ALL 0xFFFFFFFF |
| 15107 | typedef struct wmi_bpf_del_vdev_instructions_cmd_s { |
| 15108 | A_UINT32 tlv_header; |
| 15109 | A_UINT32 vdev_id; |
| 15110 | A_UINT32 filter_id; /* BPF_FILTER_ID_ALL means delete all */ |
| 15111 | } wmi_bpf_del_vdev_instructions_cmd_fixed_param; |
| 15112 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15113 | #define AES_BLOCK_LEN 16 /* in bytes */ |
| 15114 | #define FIPS_KEY_LENGTH_128 16 /* in bytes */ |
| 15115 | #define FIPS_KEY_LENGTH_256 32 /* in bytes */ |
| 15116 | #define FIPS_ENCRYPT_CMD 0 |
| 15117 | #define FIPS_DECRYPT_CMD 1 |
| 15118 | #define FIPS_ENGINE_AES_CTR 0 |
| 15119 | #define FIPS_ENGINE_AES_MIC 1 |
| 15120 | #define FIPS_ERROR_OPER_TIMEOUT 1 |
| 15121 | |
| 15122 | /* WMI_PDEV_FIPS_CMDID */ |
| 15123 | typedef struct { |
| 15124 | /* |
| 15125 | * TLV tag and len; tag equals |
| 15126 | * WMITLV_TAG_STRUC_wmi_pdev_fips_cmd_fixed_param |
| 15127 | */ |
| 15128 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15129 | union { |
| 15130 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15131 | A_UINT32 mac_id; |
| 15132 | /** pdev_id for identifying the MAC |
| 15133 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15134 | */ |
| 15135 | A_UINT32 pdev_id; |
| 15136 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15137 | A_UINT32 fips_cmd; /* FIPS_ENCRYPT or FIPS_DECRYPT */ |
| 15138 | /* FIPS_ENGINE_AES_CTR or FIPS_ENGINE_AES_MIC */ |
| 15139 | A_UINT32 mode; |
| 15140 | /* FIPS_KEY_LENGTH_128 or FIPS_KEY_LENGTH_256 (units = bytes) */ |
| 15141 | A_UINT32 key_len; |
| 15142 | A_UINT8 key[WMI_MAX_KEY_LEN]; /* Key */ |
| 15143 | A_UINT32 data_len; /* data length */ |
| 15144 | /* |
| 15145 | * Following this structure is the TLV: |
| 15146 | * A_UINT32 data[1]; - In Data (keep this in the end) |
| 15147 | */ |
| 15148 | } wmi_pdev_fips_cmd_fixed_param; |
| 15149 | |
| 15150 | typedef struct { |
| 15151 | /* |
| 15152 | * TLV tag and len; tag equals |
| 15153 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_enable_cmd_fixed_param |
| 15154 | */ |
| 15155 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15156 | union { |
| 15157 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15158 | A_UINT32 mac_id; |
| 15159 | /** pdev_id for identifying the MAC |
| 15160 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15161 | */ |
| 15162 | A_UINT32 pdev_id; |
| 15163 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15164 | A_UINT32 enable; /* 1:enable, 0:disable */ |
| 15165 | /* 1:GPIO parallel mode, 0:GPIO serial mode */ |
| 15166 | A_UINT32 mode; |
| 15167 | A_UINT32 rx_antenna; /* rx antenna */ |
| 15168 | A_UINT32 tx_default_antenna; /* tx default antenna */ |
| 15169 | /* |
| 15170 | * Following this structure is the TLV: |
| 15171 | * wmi_pdev_smart_ant_gpio_handle |
| 15172 | */ |
| 15173 | } wmi_pdev_smart_ant_enable_cmd_fixed_param; |
| 15174 | |
| 15175 | /** GPIO pins/function values to control antennas */ |
| 15176 | typedef struct { |
| 15177 | /* |
| 15178 | * TLV tag and len; tag equals |
| 15179 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_gpio_handle |
| 15180 | */ |
| 15181 | A_UINT32 tlv_header; |
| 15182 | /* For serial: index 0-strobe index 1-data, For Parallel: per stream */ |
| 15183 | A_UINT32 gpio_pin; |
| 15184 | A_UINT32 gpio_func; /* GPIO function values for Smart Antenna */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15185 | /** pdev_id for identifying the MAC |
| 15186 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15187 | */ |
| 15188 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15189 | } wmi_pdev_smart_ant_gpio_handle; |
| 15190 | |
| 15191 | typedef struct { |
| 15192 | /* |
| 15193 | * TLV tag and len; tag equals |
| 15194 | * WMITLV_TAG_STRUC_wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param |
| 15195 | */ |
| 15196 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15197 | union { |
| 15198 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15199 | A_UINT32 mac_id; |
| 15200 | /** pdev_id for identifying the MAC |
| 15201 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15202 | */ |
| 15203 | A_UINT32 pdev_id; |
| 15204 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15205 | A_UINT32 rx_antenna; |
| 15206 | } wmi_pdev_smart_ant_set_rx_antenna_cmd_fixed_param; |
| 15207 | |
| 15208 | typedef struct { |
| 15209 | /* |
| 15210 | * TLV tag and len; tag equals |
| 15211 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param |
| 15212 | */ |
| 15213 | A_UINT32 tlv_header; |
| 15214 | /** unique id identifying the vdev, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15215 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15216 | /** peer MAC address */ |
| 15217 | wmi_mac_addr peer_macaddr; |
| 15218 | /* |
| 15219 | * Following this structure is the TLV: |
| 15220 | * wmi_peer_smart_ant_set_tx_antenna_series |
| 15221 | */ |
| 15222 | } wmi_peer_smart_ant_set_tx_antenna_cmd_fixed_param; |
| 15223 | |
| 15224 | typedef struct { |
| 15225 | /* |
| 15226 | * TLV tag and len; tag equals |
| 15227 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_tx_antenna_series |
| 15228 | */ |
| 15229 | A_UINT32 tlv_header; |
| 15230 | /* antenna array */ |
| 15231 | A_UINT32 antenna_series; |
| 15232 | } wmi_peer_smart_ant_set_tx_antenna_series; |
| 15233 | |
| 15234 | typedef struct { |
| 15235 | /* |
| 15236 | * TLV tag and len; tag equals |
| 15237 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param |
| 15238 | */ |
| 15239 | A_UINT32 tlv_header; |
| 15240 | /* rate array */ |
| 15241 | A_UINT32 train_rate_series; |
| 15242 | /* antenna array */ |
| 15243 | A_UINT32 train_antenna_series; |
| 15244 | /* Rate flags */ |
| 15245 | /* TODO: For future use? */ |
| 15246 | A_UINT32 rc_flags; |
| 15247 | } wmi_peer_smart_ant_set_train_antenna_param; |
| 15248 | |
| 15249 | typedef struct { |
| 15250 | /* |
| 15251 | * TLV tag and len; tag equals |
| 15252 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param |
| 15253 | */ |
| 15254 | A_UINT32 tlv_header; |
| 15255 | /** unique id identifying the VDEV, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15256 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15257 | /** peer MAC address */ |
| 15258 | wmi_mac_addr peer_macaddr; |
| 15259 | /* num packets; 0-stop training */ |
| 15260 | A_UINT32 num_pkts; |
| 15261 | /* |
| 15262 | * Following this structure is the TLV: |
| 15263 | * wmi_peer_smart_ant_set_train_antenna_param |
| 15264 | */ |
| 15265 | } wmi_peer_smart_ant_set_train_antenna_cmd_fixed_param; |
| 15266 | |
| 15267 | typedef struct { |
| 15268 | /* |
| 15269 | * TLV tag and len; tag equals |
| 15270 | * WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param |
| 15271 | */ |
| 15272 | A_UINT32 tlv_header; |
| 15273 | /** unique id identifying the vdev, generated by the caller */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15274 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15275 | /** peer MAC address */ |
| 15276 | wmi_mac_addr peer_macaddr; |
| 15277 | /* command id*/ |
| 15278 | A_UINT32 cmd_id; |
| 15279 | /* number of arguments passed */ |
| 15280 | A_UINT32 args_count; |
| 15281 | /* |
| 15282 | * Following this structure is the TLV: |
| 15283 | * A_UINT32 args[]; // argument list |
| 15284 | */ |
| 15285 | } wmi_peer_smart_ant_set_node_config_ops_cmd_fixed_param; |
| 15286 | |
| 15287 | typedef struct { |
| 15288 | /* |
| 15289 | * TLV tag and len; tag equals |
| 15290 | * WMITLV_TAG_STRUC_wmi_pdev_set_ant_ctrl_chain |
| 15291 | */ |
| 15292 | A_UINT32 tlv_header; |
| 15293 | A_UINT32 antCtrlChain; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15294 | /** pdev_id for identifying the MAC |
| 15295 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15296 | */ |
| 15297 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15298 | } wmi_pdev_set_ant_ctrl_chain; |
| 15299 | |
| 15300 | typedef struct { |
| 15301 | /* |
| 15302 | * TLV tag and len; tag equals |
| 15303 | * WMITLV_TAG_STRUC_wmi_pdev_set_ant_switch_tbl_cmd_fixed_param |
| 15304 | */ |
| 15305 | A_UINT32 tlv_header; |
| 15306 | A_UINT32 mac_id; /* MAC ID */ |
| 15307 | A_UINT32 antCtrlCommon1; |
| 15308 | A_UINT32 antCtrlCommon2; |
| 15309 | /* |
| 15310 | * Following this structure is the TLV: |
| 15311 | * wmi_pdev_set_ant_ctrl_chain |
| 15312 | */ |
| 15313 | } wmi_pdev_set_ant_switch_tbl_cmd_fixed_param; |
| 15314 | |
| 15315 | typedef struct { |
| 15316 | /* TLV tag and len; tag equals |
| 15317 | * WMITLV_TAG_STRUC_wmi_pdev_set_ctl_table_cmd_fixed_param |
| 15318 | */ |
| 15319 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15320 | union { |
| 15321 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15322 | A_UINT32 mac_id; |
| 15323 | /** pdev_id for identifying the MAC |
| 15324 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15325 | */ |
| 15326 | A_UINT32 pdev_id; |
| 15327 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15328 | /** len of CTL info */ |
| 15329 | A_UINT32 ctl_len; |
| 15330 | /* ctl array (len adjusted to number of words) |
| 15331 | * Following this structure is the TLV: |
| 15332 | * A_UINT32 ctl_info[1]; |
| 15333 | */ |
| 15334 | } wmi_pdev_set_ctl_table_cmd_fixed_param; |
| 15335 | |
| 15336 | typedef struct { |
| 15337 | /* |
| 15338 | * TLV tag and len; tag equals |
| 15339 | * WMITLV_TAG_STRUC_wmi_pdev_set_mimogain_table_cmd_fixed_param |
| 15340 | */ |
| 15341 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15342 | union { |
| 15343 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15344 | A_UINT32 mac_id; |
| 15345 | /** pdev_id for identifying the MAC |
| 15346 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15347 | */ |
| 15348 | A_UINT32 pdev_id; |
| 15349 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15350 | A_UINT32 mimogain_info; /* see WMI_MIMOGAIN macros */ |
| 15351 | /* |
| 15352 | * Bit 7:0 len of array gain table |
| 15353 | * Bit 8 bypass multi chain gain or not |
| 15354 | */ |
| 15355 | /* |
| 15356 | * array gain table(s) (len adjusted to number of words). |
| 15357 | * Following this structure is the TLV: |
| 15358 | * A_UINT32 arraygain_tbl[1]; |
| 15359 | */ |
| 15360 | } wmi_pdev_set_mimogain_table_cmd_fixed_param; |
| 15361 | |
| 15362 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_S 0 |
| 15363 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN (0xff << WMI_MIMOGAIN_ARRAY_GAIN_LEN_S) |
| 15364 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_ARRAY_GAIN_LEN) |
| 15365 | #define WMI_MIMOGAIN_ARRAY_GAIN_LEN_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_ARRAY_GAIN_LEN) |
| 15366 | |
| 15367 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S 8 |
| 15368 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS (0x1 << WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_S) |
| 15369 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_GET(x) WMI_F_MS(x, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS) |
| 15370 | #define WMI_MIMOGAIN_MULTI_CHAIN_BYPASS_SET(x, z) WMI_F_RMW(x, z, WMI_MIMOGAIN_MULTI_CHAIN_BYPASS) |
| 15371 | |
| 15372 | |
| 15373 | typedef struct { |
| 15374 | /* |
| 15375 | * TLV tag and len; tag equals |
| 15376 | * WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param |
| 15377 | */ |
| 15378 | A_UINT32 tlv_header; |
| 15379 | /** parameter id */ |
| 15380 | A_UINT32 param_id; |
| 15381 | /** parameter value */ |
| 15382 | A_UINT32 param_value; |
| 15383 | } wmi_fwtest_set_param_cmd_fixed_param; |
| 15384 | |
| 15385 | /* Expressed in 1 part in 1000 (permille) */ |
| 15386 | #define WMI_ATF_DENOMINATION 1000 |
| 15387 | |
| 15388 | typedef struct { |
| 15389 | /* |
| 15390 | * TLV tag and len; tag equals |
| 15391 | * WMITLV_TAG_STRUC_wmi_atf_peer_info |
| 15392 | */ |
| 15393 | A_UINT32 tlv_header; |
| 15394 | wmi_mac_addr peer_macaddr; |
| 15395 | A_UINT32 atf_units; /* Based on 1 part in 1000 (per mille) */ |
| 15396 | A_UINT32 atf_groupid; /* Group Id of the peers for ATF SSID grouping */ |
| 15397 | /* Peer congestion threshold for future use */ |
| 15398 | A_UINT32 atf_units_reserved; |
| 15399 | } wmi_atf_peer_info; |
| 15400 | |
| 15401 | typedef struct { |
| 15402 | /* |
| 15403 | * TLV tag and len; tag equals |
| 15404 | * WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param |
| 15405 | */ |
| 15406 | A_UINT32 tlv_header; |
| 15407 | A_UINT32 num_peers; |
| 15408 | /* |
| 15409 | * Following this structure is the TLV: |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 15410 | * struct wmi_atf_peer_info peer_info[num_peers]; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15411 | */ |
| 15412 | } wmi_peer_atf_request_fixed_param; |
| 15413 | |
Himanshu Agarwal | 134b736 | 2016-05-13 20:30:12 +0530 | [diff] [blame] | 15414 | /* Structure for Bandwidth Fairness peer information */ |
| 15415 | typedef struct { |
| 15416 | /* |
| 15417 | * TLV tag and len; tag equals |
| 15418 | * WMITLV_TAG_STRUC_wmi_bwf_peer_info |
| 15419 | */ |
| 15420 | A_UINT32 tlv_header; |
| 15421 | wmi_mac_addr peer_macaddr; |
| 15422 | /* BWF guaranteed_bandwidth for the peers in mbps */ |
| 15423 | A_UINT32 bwf_guaranteed_bandwidth; |
| 15424 | /* |
| 15425 | * BWF Maximum airtime percentage that can be allocated |
| 15426 | * to the peer to meet the guaranteed_bandwidth |
| 15427 | */ |
| 15428 | A_UINT32 bwf_max_airtime; |
| 15429 | /* BWF priority of the peer to allocate the tokens dynamically */ |
| 15430 | A_UINT32 bwf_peer_priority; |
| 15431 | } wmi_bwf_peer_info; |
| 15432 | |
| 15433 | /* Structure for Bandwidth Fairness peer request */ |
| 15434 | typedef struct { |
| 15435 | /* |
| 15436 | * TLV tag and len; tag equals |
| 15437 | * WMITLV_TAG_STRUC_wmi_peer_bwf_request_fixed_param |
| 15438 | */ |
| 15439 | A_UINT32 tlv_header; |
| 15440 | A_UINT32 num_peers; |
| 15441 | /* |
| 15442 | * Following this structure is the TLV: |
| 15443 | * struct wmi_bwf_peer_info peer_info[num_peers]; |
| 15444 | */ |
| 15445 | } wmi_peer_bwf_request_fixed_param; |
| 15446 | |
| 15447 | |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15448 | /* Equal distribution of ATF air time within an VDEV. */ |
| 15449 | typedef struct { |
| 15450 | /* |
| 15451 | * TLV tag and len; tag equals |
| 15452 | * WMITLV_TAG_STRUC_wmi_vdev_atf_request_fixed_param |
| 15453 | */ |
| 15454 | A_UINT32 tlv_header; |
| 15455 | A_UINT32 vdev_id; |
| 15456 | A_UINT32 peer_atf_units; /* Per peer ATF units (per mille). */ |
| 15457 | } wmi_vdev_atf_request_fixed_param; |
| 15458 | |
| 15459 | typedef struct { |
| 15460 | /* |
| 15461 | * TLV tag and len; tag equals |
| 15462 | * WMITLV_TAG_STRUC_wmi_pdev_get_ani_cck_config_cmd_fixed_param |
| 15463 | */ |
| 15464 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15465 | /** pdev_id for identifying the MAC |
| 15466 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15467 | */ |
| 15468 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15469 | /** parameter */ |
| 15470 | A_UINT32 param; |
| 15471 | } wmi_pdev_get_ani_cck_config_cmd_fixed_param; |
| 15472 | |
| 15473 | typedef struct { |
| 15474 | /* |
| 15475 | * TLV tag and len; tag equals |
| 15476 | * WMITLV_TAG_STRUC_wmi_pdev_get_ani_ofdm_config_cmd_fixed_param |
| 15477 | */ |
| 15478 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15479 | /** pdev_id for identifying the MAC |
| 15480 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15481 | */ |
| 15482 | A_UINT32 pdev_id; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15483 | /** parameter */ |
| 15484 | A_UINT32 param; |
| 15485 | } wmi_pdev_get_ani_ofdm_config_cmd_fixed_param; |
| 15486 | |
| 15487 | typedef struct { |
| 15488 | /* |
| 15489 | * TLV tag and len; tag equals |
| 15490 | * WMITLV_TAG_STRUC_WMI_QBOOST_CFG_CMD_fixed_param |
| 15491 | */ |
| 15492 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15493 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15494 | A_UINT32 qb_enable; |
| 15495 | wmi_mac_addr peer_macaddr; |
| 15496 | } WMI_QBOOST_CFG_CMD_fixed_param; |
| 15497 | |
| 15498 | #define WMI_INST_STATS_INVALID_RSSI 0 |
| 15499 | |
| 15500 | typedef struct { |
| 15501 | /* |
| 15502 | * TLV tag and len; tag equals |
| 15503 | * WMITLV_TAG_STRUC_wmi_inst_rssi_stats_resp_fixed_param |
| 15504 | */ |
| 15505 | A_UINT32 tlv_header; |
| 15506 | A_UINT32 iRSSI; /* dBm above the noise floor */ |
| 15507 | /* peer MAC address */ |
| 15508 | wmi_mac_addr peer_macaddr; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15509 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15510 | } wmi_inst_rssi_stats_resp_fixed_param; |
| 15511 | |
| 15512 | typedef struct { |
| 15513 | /* |
| 15514 | * TLV tag and len; tag equals |
| 15515 | * WMITLV_TAG_STRUC_wmi_peer_cck_ofdm_rate_info |
| 15516 | */ |
| 15517 | A_UINT32 tlv_header; |
| 15518 | A_UINT32 ratecode_legacy; /* Rate code for CCK OFDM */ |
| 15519 | } wmi_peer_cck_ofdm_rate_info; |
| 15520 | |
| 15521 | typedef struct { |
| 15522 | /* |
| 15523 | * TLV tag and len; tag equals |
| 15524 | * WMITLV_TAG_STRUC_wmi_peer_mcs_rate_info |
| 15525 | */ |
| 15526 | A_UINT32 tlv_header; |
| 15527 | A_UINT32 ratecode_20; /* Rate code for 20MHz BW */ |
| 15528 | A_UINT32 ratecode_40; /* Rate code for 40MHz BW */ |
| 15529 | A_UINT32 ratecode_80; /* Rate code for 80MHz BW */ |
| 15530 | } wmi_peer_mcs_rate_info; |
| 15531 | |
| 15532 | typedef struct { |
| 15533 | /* |
| 15534 | * TLV tag and len; tag equals |
| 15535 | * WMITLV_TAG_STRUC_wmi_peer_ratecode_list_event_fixed_param |
| 15536 | */ |
| 15537 | A_UINT32 tlv_header; |
| 15538 | wmi_mac_addr peer_macaddr; |
| 15539 | A_UINT32 ratecount; /* Max Rate count for each mode */ |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15540 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15541 | /* |
| 15542 | * Following this structure are the TLV |
| 15543 | * struct wmi_peer_cck_ofdm_rate_info; |
| 15544 | * struct wmi_peer_mcs_rate_info; |
| 15545 | */ |
| 15546 | } wmi_peer_ratecode_list_event_fixed_param; |
| 15547 | |
| 15548 | typedef struct wmi_wds_addr_event { |
| 15549 | /* |
| 15550 | * TLV tag and len; tag equals |
| 15551 | * WMITLV_TAG_STRUC_wmi_wds_addr_event_fixed_param |
| 15552 | */ |
| 15553 | A_UINT32 tlv_header; |
| 15554 | A_UINT32 event_type[4]; |
| 15555 | wmi_mac_addr peer_mac; |
| 15556 | wmi_mac_addr dest_mac; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15557 | A_UINT32 vdev_id; /* ID of the vdev this peer belongs to */ |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15558 | } wmi_wds_addr_event_fixed_param; |
| 15559 | |
| 15560 | typedef struct { |
| 15561 | /* |
| 15562 | * TLV tag and len; tag equals |
| 15563 | * WMITLV_TAG_STRUC_wmi_peer_sta_ps_statechange_event_fixed_param |
| 15564 | */ |
| 15565 | A_UINT32 tlv_header; |
| 15566 | wmi_mac_addr peer_macaddr; |
| 15567 | A_UINT32 peer_ps_state; |
| 15568 | } wmi_peer_sta_ps_statechange_event_fixed_param; |
| 15569 | |
| 15570 | /* WMI_PDEV_FIPS_EVENTID */ |
| 15571 | typedef struct { |
| 15572 | /* |
| 15573 | * TLV tag and len; tag equals |
| 15574 | * WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param |
| 15575 | */ |
| 15576 | A_UINT32 tlv_header; |
Govind Singh | 869c987 | 2016-02-22 18:36:34 +0530 | [diff] [blame] | 15577 | union { |
| 15578 | /* OBSOLETE - will be removed once all refs are gone */ |
| 15579 | A_UINT32 mac_id; |
| 15580 | /** pdev_id for identifying the MAC |
| 15581 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15582 | */ |
| 15583 | A_UINT32 pdev_id; |
| 15584 | }; |
Govind Singh | c7d5194 | 2016-02-01 12:09:31 +0530 | [diff] [blame] | 15585 | /* Error status: 0 (no err), 1, or OPER_TIMEOUT */ |
| 15586 | A_UINT32 error_status; |
| 15587 | A_UINT32 data_len; /* Data length */ |
| 15588 | /* |
| 15589 | * Following this structure is the TLV: |
| 15590 | * A_UINT32 data[1]; // Out Data (keep this in the end) |
| 15591 | */ |
| 15592 | } wmi_pdev_fips_event_fixed_param; |
| 15593 | |
| 15594 | typedef struct { |
| 15595 | /* |
| 15596 | * TLV tag and len; tag equals |
| 15597 | * WMITLV_TAG_STRUC_wmi_pdev_channel_hopping_event_fixed_param |
| 15598 | */ |
| 15599 | A_UINT32 tlv_header; |
| 15600 | A_UINT32 mac_id; /* MAC ID */ |
| 15601 | /* Noise threshold iterations with high values */ |
| 15602 | A_UINT32 noise_floor_report_iter; |
| 15603 | /* Total noise threshold iterations */ |
| 15604 | A_UINT32 noise_floor_total_iter; |
| 15605 | } wmi_pdev_channel_hopping_event_fixed_param; |
| 15606 | |
| 15607 | enum { |
| 15608 | WMI_PDEV_RESERVE_AST_ENTRY_OK, |
| 15609 | WMI_PDEV_RESERVE_AST_ENTRY_HASH_COLLISION, |
| 15610 | WMI_PDEV_RESERVE_AST_ENTRY_CROSSING_AXI_BOUNDARY, |
| 15611 | }; |
| 15612 | |
| 15613 | typedef struct { |
| 15614 | /* |
| 15615 | * TLV tag and len; tag equals |
| 15616 | * WMITLV_TAG_STRUC_wmi_pdev_get_tpc_cmd_fixed_param |
| 15617 | */ |
| 15618 | A_UINT32 tlv_header; |
| 15619 | A_UINT32 mac_id; /* MAC ID */ |
| 15620 | A_UINT32 rate_flags; |
| 15621 | /** |
| 15622 | * FLAG_ONE_CHAIN 0x001 - one chain mask |
| 15623 | * FLAG_TWO_CHAIN 0x005 - two chain mask |
| 15624 | * FLAG_THREE_CHAIN 0x007 - three chain mask |
| 15625 | * FLAG_FOUR_CHAIN 0x00F - four chain mask |
| 15626 | * FLAG_STBC 0x010 - STBC is set |
| 15627 | * FLAG_40MHZ 0x020 |
| 15628 | * FLAG_80MHZ 0x040 |
| 15629 | * FLAG_160MHZ 0x080 |
| 15630 | * FLAG_TXBF 0x0100 - Tx Bf enabled |
| 15631 | * FLAG_RTSENA 0x0200 - RTS enabled |
| 15632 | * FLAG_CTSENA 0x0400 - CTS enabled |
| 15633 | * FLAG_LDPC 0x0800 - LDPC set |
| 15634 | * FLAG_SERIES1 0x1000 - |
| 15635 | * FLAG_SGI 0x2000 - Short gaurd interval |
| 15636 | * FLAG_MU2 0x4000 - MU2 data |
| 15637 | * FLAG_MU3 0x8000 - MU3 data |
| 15638 | * */ |
| 15639 | A_UINT32 nss; |
| 15640 | /** |
| 15641 | * NSS 0x0 - 0x3 |
| 15642 | * */ |
| 15643 | A_UINT32 preamble; |
| 15644 | /** |
| 15645 | * PREAM_OFDM - 0x0 |
| 15646 | * PREAM_CCK - 0x1 |
| 15647 | * PREAM_HT - 0x2 |
| 15648 | * PREAM_VHT - 0x3 |
| 15649 | * */ |
| 15650 | A_UINT32 hw_rate; |
| 15651 | /** |
| 15652 | * *** HW_OFDM_RATE *** |
| 15653 | * OFDM_48_MBPS - 0x0 |
| 15654 | * OFDM_24_MBPS - 0x1 |
| 15655 | * OFDM_12_MBPS - 0x2 |
| 15656 | * OFDM_6_MBPS - 0x3 |
| 15657 | * OFDM_54_MBPS - 0x4 |
| 15658 | * OFDM_36_MBPS - 0x5 |
| 15659 | * OFDM_18_MBPS - 0x6 |
| 15660 | * OFDM_9_MBPS - 0x7 |
| 15661 | * |
| 15662 | * *** HW_CCK_RATE *** |
| 15663 | * CCK_11_LONG_MBPS - 0x0 |
| 15664 | * CCK_5_5_LONG_MBPS - 0x1 |
| 15665 | * CCK_2_LONG_MBPS - 0x2 |
| 15666 | * CCK_1_LONG_MBPS - 0x3 |
| 15667 | * CCK_11_SHORT_MBPS - 0x4 |
| 15668 | * CCK_5_5_SHORT_MBPS - 0x5 |
| 15669 | * CCK_2_SHORT_MBPS - 0x6 |
| 15670 | * |
| 15671 | * *** HW_HT / VHT_RATE *** |
| 15672 | * MCS 0x0 - 0x9 |
| 15673 | * */ |
| 15674 | } wmi_pdev_get_tpc_cmd_fixed_param; |
| 15675 | |
| 15676 | typedef struct { |
| 15677 | /* |
| 15678 | * TLV tag and len; tag equals |
| 15679 | * WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param |
| 15680 | */ |
| 15681 | A_UINT32 tlv_header; |
| 15682 | A_UINT32 reserved0; /* for future need */ |
| 15683 | /* |
| 15684 | * Following this structure is the TLV: |
| 15685 | * A_UINT32 tpc[1]; |
| 15686 | */ |
| 15687 | } wmi_pdev_tpc_event_fixed_param; |
| 15688 | |
| 15689 | typedef struct { |
| 15690 | /* |
| 15691 | * TLV tag and len; tag equals |
| 15692 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_event_fixed_param |
| 15693 | */ |
| 15694 | A_UINT32 tlv_header; |
| 15695 | A_UINT32 mac_id; /* MAC ID */ |
| 15696 | A_UINT32 nfdBr_len; |
| 15697 | A_UINT32 nfdBm_len; |
| 15698 | A_UINT32 freqNum_len; |
| 15699 | /* |
| 15700 | * Following this structure is the TLV: |
| 15701 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr; |
| 15702 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm; |
| 15703 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum; |
| 15704 | */ |
| 15705 | } wmi_pdev_nfcal_power_all_channels_event_fixed_param; |
| 15706 | |
| 15707 | typedef struct { |
| 15708 | /* |
| 15709 | * TLV tag and len; tag equals |
| 15710 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBr |
| 15711 | */ |
| 15712 | A_UINT32 tlv_header; |
| 15713 | A_UINT32 nfdBr; |
| 15714 | } wmi_pdev_nfcal_power_all_channels_nfdBr; |
| 15715 | |
| 15716 | typedef struct { |
| 15717 | /* |
| 15718 | * TLV tag and len; tag equals |
| 15719 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_nfdBm |
| 15720 | */ |
| 15721 | A_UINT32 tlv_header; |
| 15722 | A_UINT32 nfdBm; |
| 15723 | } wmi_pdev_nfcal_power_all_channels_nfdBm; |
| 15724 | |
| 15725 | typedef struct { |
| 15726 | /* |
| 15727 | * TLV tag and len; tag equals |
| 15728 | * WMITLV_TAG_STRUC_wmi_pdev_nfcal_power_all_channels_freqNum |
| 15729 | */ |
| 15730 | A_UINT32 tlv_header; |
| 15731 | A_UINT32 freqNum; |
| 15732 | } wmi_pdev_nfcal_power_all_channels_freqNum; |
| 15733 | |
| 15734 | typedef struct { |
| 15735 | /* |
| 15736 | * TLV tag and len; tag equals |
| 15737 | * WMITLV_TAG_STRUC_wmi_ani_cck_event_fixed_param |
| 15738 | */ |
| 15739 | A_UINT32 tlv_header; |
| 15740 | A_UINT32 cck_level; |
| 15741 | } wmi_ani_cck_event_fixed_param; |
| 15742 | |
| 15743 | typedef struct { |
| 15744 | /* |
| 15745 | * TLV tag and len; tag equals |
| 15746 | * WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param |
| 15747 | */ |
| 15748 | A_UINT32 tlv_header; |
| 15749 | A_UINT32 ofdm_level; |
| 15750 | } wmi_ani_ofdm_event_fixed_param; |
| 15751 | |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 15752 | typedef enum wmi_coex_config_type { |
| 15753 | /* config interval (arg1 BT, arg2 WLAN) for P2P + PAGE */ |
| 15754 | WMI_COEX_CONFIG_PAGE_P2P_TDM = 1, |
| 15755 | /* config interval (arg1 BT, arg2 WLAN) for STA + PAGE */ |
| 15756 | WMI_COEX_CONFIG_PAGE_STA_TDM = 2, |
| 15757 | /* config interval (arg1 BT, arg2 WLAN) for SAP + PAGE */ |
| 15758 | WMI_COEX_CONFIG_PAGE_SAP_TDM = 3, |
Himanshu Agarwal | 800d58d | 2016-05-13 21:22:19 +0530 | [diff] [blame] | 15759 | /* config during WLAN connection */ |
| 15760 | WMI_COEX_CONFIG_DURING_WLAN_CONN = 4, |
| 15761 | /* config to enable/disable BTC */ |
| 15762 | WMI_COEX_CONFIG_BTC_ENABLE = 5, |
Sreelakshmi Konamki | 02a4d7c | 2016-04-14 17:46:54 +0530 | [diff] [blame] | 15763 | } WMI_COEX_CONFIG_TYPE; |
| 15764 | |
| 15765 | typedef struct { |
| 15766 | A_UINT32 tlv_header; |
| 15767 | A_UINT32 vdev_id; |
| 15768 | /* wmi_coex_config_type enum */ |
| 15769 | A_UINT32 config_type; |
| 15770 | A_UINT32 config_arg1; |
| 15771 | A_UINT32 config_arg2; |
| 15772 | } WMI_COEX_CONFIG_CMD_fixed_param; |
| 15773 | |
Sandeep Puligilla | ff55fec | 2016-03-09 12:54:23 -0800 | [diff] [blame] | 15774 | /** |
| 15775 | * This command is sent from WLAN host driver to firmware to |
| 15776 | * request firmware to enable/disable channel avoidance report |
| 15777 | * to host. |
| 15778 | */ |
| 15779 | enum { |
| 15780 | WMI_MWSCOEX_CHAN_AVD_RPT_DISALLOW = 0, |
| 15781 | WMI_MWSCOEX_CHAN_AVD_RPT_ALLOW = 1 |
| 15782 | }; |
| 15783 | |
| 15784 | typedef struct { |
| 15785 | /* |
| 15786 | * TLV tag and len; tag equals |
| 15787 | * WMITLV_TAG_STRUC_WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param |
| 15788 | */ |
| 15789 | A_UINT32 tlv_header; |
| 15790 | /* Allow/disallow flag - see WMI_MWSCOEX_CHAN_AVD_RPT enum */ |
| 15791 | A_UINT32 rpt_allow; |
| 15792 | } WMI_CHAN_AVOID_RPT_ALLOW_CMD_fixed_param; |
| 15793 | |
Sandeep Puligilla | 1dbd750 | 2016-04-16 13:34:09 +0530 | [diff] [blame] | 15794 | /* |
| 15795 | * Periodic channel stats WMI command structure |
| 15796 | * WMI_SET_PERIODIC_CHANNEL_STATS_CONFIG_CMDID |
| 15797 | */ |
| 15798 | typedef struct { |
| 15799 | /* |
| 15800 | * TLV tag and len; tag equals |
| 15801 | * WMITLV_TAG_STRUC_wmi_set_periodic_channel_stats_config_fixed_param |
| 15802 | */ |
| 15803 | A_UINT32 tlv_header; |
| 15804 | /** 1 = enable, 0 = disable */ |
| 15805 | A_UINT32 enable; |
| 15806 | /** periodic stats duration (units are milliseconds) */ |
| 15807 | A_UINT32 stats_period; |
| 15808 | } wmi_set_periodic_channel_stats_config_fixed_param; |
| 15809 | |
Krishna Kumaar Natarajan | 4bed4ec | 2016-04-16 16:46:18 +0530 | [diff] [blame] | 15810 | typedef struct { |
| 15811 | /* |
| 15812 | * TLV tag and len; tag equals |
| 15813 | * WMITLV_TAG_STRUC_wmi_pdev_wal_power_debug_cmd_fixed_param |
| 15814 | */ |
| 15815 | A_UINT32 tlv_header; |
| 15816 | /* |
| 15817 | * pdev_id for identifying the MAC |
| 15818 | * See macros starting with WMI_PDEV_ID_ for values. |
| 15819 | */ |
| 15820 | A_UINT32 pdev_id; |
| 15821 | /* Identify the wlan module */ |
| 15822 | A_UINT32 module_id; |
| 15823 | /* Num of elements in the following args[] array */ |
| 15824 | A_UINT32 num_args; |
| 15825 | /** |
| 15826 | * Following this structure are the TLVs: |
| 15827 | * A_UINT32 args[]; |
| 15828 | **/ |
| 15829 | } wmi_pdev_wal_power_debug_cmd_fixed_param; |
| 15830 | |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 15831 | typedef enum { |
| 15832 | WLAN_2G_CAPABILITY = 0x1, |
| 15833 | WLAN_5G_CAPABILITY = 0x2, |
| 15834 | } WLAN_BAND_CAPABILITY; |
| 15835 | |
| 15836 | #define WMI_SUPPORT_11B_GET(flags) WMI_GET_BITS(flags, 0, 1) |
| 15837 | #define WMI_SUPPORT_11B_SET(flags, value) WMI_SET_BITS(flags, 0, 1, value) |
| 15838 | |
| 15839 | #define WMI_SUPPORT_11G_GET(flags) WMI_GET_BITS(flags, 1, 1) |
| 15840 | #define WMI_SUPPORT_11G_SET(flags, value) WMI_SET_BITS(flags, 1, 1, value) |
| 15841 | |
| 15842 | #define WMI_SUPPORT_11A_GET(flags) WMI_GET_BITS(flags, 2, 1) |
| 15843 | #define WMI_SUPPORT_11A_SET(flags, value) WMI_SET_BITS(flags, 2, 1, value) |
| 15844 | |
| 15845 | #define WMI_SUPPORT_11N_GET(flags) WMI_GET_BITS(flags, 3, 1) |
| 15846 | #define WMI_SUPPORT_11N_SET(flags, value) WMI_SET_BITS(flags, 3, 1, value) |
| 15847 | |
| 15848 | #define WMI_SUPPORT_11AC_GET(flags) WMI_GET_BITS(flags, 4, 1) |
| 15849 | #define WMI_SUPPORT_11AC_SET(flags, value) WMI_SET_BITS(flags, 4, 1, value) |
| 15850 | |
| 15851 | #define WMI_SUPPORT_11AX_GET(flags) WMI_GET_BITS(flags, 5, 1) |
| 15852 | #define WMI_SUPPORT_11AX_SET(flags, value) WMI_SET_BITS(flags, 5, 1, value) |
| 15853 | |
| 15854 | typedef struct { |
| 15855 | /* |
| 15856 | * TLV tag and len; tag equals |
| 15857 | * WMITLV_TAG_STRUC_WMI_MAC_PHY_CAPABILITIES |
| 15858 | */ |
| 15859 | A_UINT32 tlv_header; |
| 15860 | /* |
| 15861 | * hw_mode_id - identify a particular set of HW characteristics, as |
| 15862 | * specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES element |
| 15863 | * must be mapped to its parent WMI_HW_MODE_CAPABILITIES element using |
| 15864 | * hw_mode_id. No particular ordering of WMI_MAC_PHY_CAPABILITIES |
| 15865 | * elements should be assumed, though in practice the elements may |
| 15866 | * always be ordered by hw_mode_id |
| 15867 | */ |
| 15868 | A_UINT32 hw_mode_id; |
| 15869 | /* |
| 15870 | * pdev_id starts with 1. pdev_id 1 => phy_id 0, |
| 15871 | * pdev_id 2 => phy_id 1 |
| 15872 | */ |
| 15873 | A_UINT32 pdev_id; |
| 15874 | /* phy id. Starts with 0 */ |
| 15875 | A_UINT32 phy_id; |
| 15876 | /* supported modulations */ |
| 15877 | union { |
Himanshu Agarwal | e93c55e | 2016-05-20 12:18:15 +0530 | [diff] [blame] | 15878 | struct { |
| 15879 | A_UINT32 supports_11b:1, |
| 15880 | supports_11g:1, |
| 15881 | supports_11a:1, |
| 15882 | supports_11n:1, |
| 15883 | supports_11ac:1, |
| 15884 | supports_11ax:1; |
| 15885 | }; |
Anurag Chouhan | 798fa4a | 2016-04-18 16:57:27 +0530 | [diff] [blame] | 15886 | A_UINT32 supported_flags; |
| 15887 | }; |
| 15888 | /* supported bands, enum WLAN_BAND_CAPABILITY */ |
| 15889 | A_UINT32 supported_bands; |
| 15890 | /* |
| 15891 | * ampdu density 0 for no restriction, 1 for 1/4 us, 2 for 1/2 us, |
| 15892 | * 3 for 1 us,4 for 2 us, 5 for 4 us, 6 for 8 us,7 for 16 us |
| 15893 | */ |
| 15894 | A_UINT32 ampdu_density; |
| 15895 | /* max bw supported 2G, enum wmi_channel_width */ |
| 15896 | A_UINT32 max_bw_supported_2G; |
| 15897 | /* WMI HT Capability, WMI_HT_CAP defines */ |
| 15898 | A_UINT32 ht_cap_info_2G; |
| 15899 | /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */ |
| 15900 | A_UINT32 vht_cap_info_2G; |
| 15901 | /* |
| 15902 | * VHT Supported MCS Set field Rx/Tx same |
| 15903 | * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as |
| 15904 | * follows |
| 15905 | * - 0 indicates support for VHT-MCS 0-7 for n spatial streams |
| 15906 | * - 1 indicates support for VHT-MCS 0-8 for n spatial streams |
| 15907 | * - 2 indicates support for VHT-MCS 0-9 for n spatial streams |
| 15908 | * - 3 indicates that n spatial streams is not supported |
| 15909 | */ |
| 15910 | A_UINT32 vht_supp_mcs_2G; |
| 15911 | /* HE capability info field of 802.11ax, WMI_HE_CAP defines */ |
| 15912 | A_UINT32 he_cap_info_2G; |
| 15913 | /* HE Supported MCS Set field Rx/Tx same */ |
| 15914 | A_UINT32 he_supp_mcs_2G; |
| 15915 | /* Valid Transmit chain mask */ |
| 15916 | A_UINT32 tx_chain_mask_2G; |
| 15917 | /* Valid Receive chain mask */ |
| 15918 | A_UINT32 rx_chain_mask_2G; |
| 15919 | /* max bw supported 5G, enum wmi_channel_width */ |
| 15920 | A_UINT32 max_bw_supported_5G; |
| 15921 | /* WMI HT Capability, WMI_HT_CAP defines */ |
| 15922 | A_UINT32 ht_cap_info_5G; |
| 15923 | /* VHT capability info field of 802.11ac, WMI_VHT_CAP defines */ |
| 15924 | A_UINT32 vht_cap_info_5G; |
| 15925 | /* |
| 15926 | * VHT Supported MCS Set field Rx/Tx same |
| 15927 | * The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as |
| 15928 | * follows |
| 15929 | * - 0 indicates support for VHT-MCS 0-7 for n spatial streams |
| 15930 | * - 1 indicates support for VHT-MCS 0-8 for n spatial streams |
| 15931 | * - 2 indicates support for VHT-MCS 0-9 for n spatial streams |
| 15932 | * - 3 indicates that n spatial streams is not supported |
| 15933 | */ |
| 15934 | A_UINT32 vht_supp_mcs_5G; |
| 15935 | /* HE capability info field of 802.11ax, WMI_HE_CAP defines */ |
| 15936 | A_UINT32 he_cap_info_5G; |
| 15937 | /* HE Supported MCS Set field Rx/Tx same */ |
| 15938 | A_UINT32 he_supp_mcs_5G; |
| 15939 | /* Valid Transmit chain mask */ |
| 15940 | A_UINT32 tx_chain_mask_5G; |
| 15941 | /* Valid Receive chain mask */ |
| 15942 | A_UINT32 rx_chain_mask_5G; |
| 15943 | } WMI_MAC_PHY_CAPABILITIES; |
| 15944 | |
| 15945 | typedef struct { |
| 15946 | /* |
| 15947 | * TLV tag and len; tag equal |
| 15948 | * WMITLV_TAG_STRUC_WMI_HW_MODE_CAPABILITIES |
| 15949 | */ |
| 15950 | A_UINT32 tlv_header; |
| 15951 | /* |
| 15952 | * hw_mode_id - identify a particular set of HW characteristics, |
| 15953 | * as specified by the subsequent fields |
| 15954 | */ |
| 15955 | A_UINT32 hw_mode_id; |
| 15956 | /* BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on */ |
| 15957 | A_UINT32 phy_id_map; |
| 15958 | /* |
| 15959 | * number of bits set in phy_id_map represents number of |
| 15960 | * WMI_MAC_PHY_CAPABILITIES TLV's |
| 15961 | * one for each active PHY for current HW mode |
| 15962 | * identified by hw_mode_id. For example for |
| 15963 | * DBS/SBS mode there will be 2 |
| 15964 | * WMI_MAC_PHY_CAPABILITIES TLVs and for |
| 15965 | * single MAC modes it |
| 15966 | * will be 1 WMI_MAC_PHY_CAPABILITIES |
| 15967 | * TLVs |
| 15968 | */ |
| 15969 | } WMI_HW_MODE_CAPABILITIES; |
| 15970 | |
| 15971 | typedef struct { |
| 15972 | /* |
| 15973 | * TLV tag and len; tag equals |
| 15974 | * WMITLV_TAG_STRUC_WMI_SOC_MAC_PHY_HW_MODE_CAPS |
| 15975 | */ |
| 15976 | A_UINT32 tlv_header; |
| 15977 | /* num HW modes */ |
| 15978 | A_UINT32 num_hw_modes; |
| 15979 | /* num_hw_modes WMI_HW_MODE_CAPABILITIES TLV's */ |
| 15980 | } WMI_SOC_MAC_PHY_HW_MODE_CAPS; |
| 15981 | |
| 15982 | /*Below are Reg caps per PHY. Please note PHY ID starts with 0.*/ |
| 15983 | typedef struct { |
| 15984 | /* |
| 15985 | * TLV tag and len; tag equals |
| 15986 | * WMITLV_TAG_STRUC_WMI_HAL_REG_CAPABILITIES_EXT |
| 15987 | */ |
| 15988 | A_UINT32 tlv_header; |
| 15989 | /* phy id */ |
| 15990 | A_UINT32 phy_id; |
| 15991 | /* regdomain value specified in EEPROM */ |
| 15992 | A_UINT32 eeprom_reg_domain; |
| 15993 | /* regdomain */ |
| 15994 | A_UINT32 eeprom_reg_domain_ext; |
| 15995 | /* |
| 15996 | * CAP1 capabilities bit map, see REGDMN_CAP1_ |
| 15997 | * defines |
| 15998 | */ |
| 15999 | A_UINT32 regcap1; |
| 16000 | /* |
| 16001 | * REGDMN EEPROM CAP, see |
| 16002 | * REGDMN_EEPROM_EEREGCAP_ defines |
| 16003 | */ |
| 16004 | A_UINT32 regcap2; |
| 16005 | /* REGDMN MODE, see REGDMN_MODE_ enum */ |
| 16006 | A_UINT32 wireless_modes; |
| 16007 | A_UINT32 low_2ghz_chan; |
| 16008 | A_UINT32 high_2ghz_chan; |
| 16009 | A_UINT32 low_5ghz_chan; |
| 16010 | A_UINT32 high_5ghz_chan; |
| 16011 | } WMI_HAL_REG_CAPABILITIES_EXT; |
| 16012 | |
| 16013 | typedef struct { |
| 16014 | /* |
| 16015 | * TLV tag and len; tag equals |
| 16016 | * WMITLV_TAG_STRUC_WMI_SOC_HAL_REG_CAPABILITIES |
| 16017 | */ |
| 16018 | A_UINT32 tlv_header; |
| 16019 | /* num_phy WMI_HAL_REG_CAPABILITIES_EXT TLV's */ |
| 16020 | A_UINT32 num_phy; |
| 16021 | } WMI_SOC_HAL_REG_CAPABILITIES; |
| 16022 | |
Anurag Chouhan | b3fa7a1 | 2016-04-18 17:26:49 +0530 | [diff] [blame] | 16023 | typedef struct { |
| 16024 | /* |
| 16025 | * TLV tag and len; tag equals |
| 16026 | * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_parameters_tlv |
| 16027 | */ |
| 16028 | A_UINT32 tlv_header; |
| 16029 | /* |
| 16030 | * global default adaptive dwell mode, |
| 16031 | * used when WMI_SCAN_DWELL_MODE_DEFAULT |
| 16032 | */ |
| 16033 | A_UINT32 default_adaptive_dwell_mode; |
| 16034 | /* |
| 16035 | * the weight to calculate the average low pass filter for |
| 16036 | * channel congestion. 0-100 |
| 16037 | */ |
| 16038 | A_UINT32 adapative_lpf_weight; |
| 16039 | /* interval to monitor passive scan in msec */ |
| 16040 | A_UINT32 passive_monitor_interval_ms; |
| 16041 | /* % of wifi activity to switch from passive to active 0-100 */ |
| 16042 | A_UINT32 wifi_activity_threshold_pct; |
| 16043 | } wmi_scan_adaptive_dwell_parameters_tlv; |
| 16044 | |
| 16045 | typedef struct { |
| 16046 | /* |
| 16047 | * TLV tag and len; tag equals |
| 16048 | * WMITLV_TAG_STRUC_wmi_scan_adaptive_dwell_config_fixed_param |
| 16049 | */ |
| 16050 | A_UINT32 tlv_header; |
| 16051 | /* globally enable/disable adaptive dwell */ |
| 16052 | A_UINT32 enable; |
| 16053 | /* |
| 16054 | * followed by TLV (tag length value) parameters array |
| 16055 | * The TLV's are: |
| 16056 | * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements) |
| 16057 | */ |
| 16058 | } wmi_scan_adaptive_dwell_config_fixed_param; |
| 16059 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16060 | /* ADD NEW DEFS HERE */ |
| 16061 | |
| 16062 | /***************************************************************************** |
| 16063 | * The following structures are deprecated. DO NOT USE THEM! |
| 16064 | */ |
| 16065 | |
| 16066 | /** Max number of channels in the schedule. */ |
| 16067 | #define OCB_CHANNEL_MAX (5) |
| 16068 | |
| 16069 | /* NOTE: Make sure these data structures are identical to those 9235 |
| 16070 | * defined in sirApi.h */ |
| 16071 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16072 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16073 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 16074 | A_UINT32 aifsn; |
| 16075 | /** Contention Window minimum. Range: 1 - 10 */ |
| 16076 | A_UINT32 cwmin; |
| 16077 | /** Contention Window maximum. Range: 1 - 10 */ |
| 16078 | A_UINT32 cwmax; |
| 16079 | } wmi_qos_params_t; |
| 16080 | |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16081 | typedef struct { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16082 | /** Channel frequency in MHz */ |
| 16083 | A_UINT32 chan_freq; |
| 16084 | /** Channel duration in ms */ |
| 16085 | A_UINT32 duration; |
| 16086 | /** Start guard interval in ms */ |
| 16087 | A_UINT32 start_guard_interval; |
| 16088 | /** End guard interval in ms */ |
| 16089 | A_UINT32 end_guard_interval; |
| 16090 | /** Transmit power in dBm, range 0 - 23 */ |
| 16091 | A_UINT32 tx_power; |
| 16092 | /** Transmit datarate in Mbps */ |
| 16093 | A_UINT32 tx_rate; |
| 16094 | /** QoS parameters for each AC */ |
| 16095 | wmi_qos_params_t qos_params[WLAN_MAX_AC]; |
| 16096 | /** 1 to enable RX stats for this channel, 0 otherwise */ |
| 16097 | A_UINT32 rx_stats; |
| 16098 | } wmi_ocb_channel_t; |
| 16099 | |
| 16100 | typedef struct { |
| 16101 | /** TLV tag and len; tag equals |
| 16102 | * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */ |
| 16103 | A_UINT32 tlv_header; |
| 16104 | /* VDEV identifier */ |
| 16105 | A_UINT32 vdev_id; |
| 16106 | /** Number of valid channels in the channels array */ |
| 16107 | A_UINT32 num_channels; |
| 16108 | /** The array of channels */ |
| 16109 | wmi_ocb_channel_t channels[OCB_CHANNEL_MAX]; |
| 16110 | /** 1 to allow off-channel tx, 0 otherwise */ |
Anurag Chouhan | 2ed1fce | 2016-02-22 15:07:01 +0530 | [diff] [blame] | 16111 | A_UINT32 off_channel_tx; /* Not supported */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 16112 | } wmi_ocb_set_sched_cmd_fixed_param; |
| 16113 | |
| 16114 | typedef struct { |
| 16115 | /** Return status. 0 for success, non-zero otherwise */ |
| 16116 | A_UINT32 status; |
| 16117 | } wmi_ocb_set_sched_event_fixed_param; |
| 16118 | |
| 16119 | /** |
| 16120 | * END DEPRECATED |
| 16121 | */ |
| 16122 | #ifdef __cplusplus |
| 16123 | } |
| 16124 | #endif |
| 16125 | #endif /*_WMI_UNIFIED_H_*/ |
| 16126 | /**@}*/ |