Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | /** |
| 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 */ |
| 80 | |
| 81 | /* The WLAN_MAX_AC macro cannot be changed without breaking |
| 82 | * WMI compatibility. |
| 83 | * The maximum value of access category |
| 84 | */ |
| 85 | #define WLAN_MAX_AC 4 |
| 86 | |
| 87 | /* |
| 88 | * These don't necessarily belong here; but as the MS/SM macros require |
| 89 | * ar6000_internal.h to be included, it may not be defined as yet. |
| 90 | */ |
| 91 | #define WMI_F_MS(_v, _f) \ |
| 92 | ( ((_v) & (_f)) >> (_f ## _S) ) |
| 93 | |
| 94 | /* |
| 95 | * This breaks the "good macro practice" of only referencing each |
| 96 | * macro field once (to avoid things like field++ from causing issues.) |
| 97 | */ |
| 98 | #define WMI_F_RMW(_var, _v, _f) \ |
| 99 | do { \ |
| 100 | (_var) &= ~(_f); \ |
| 101 | (_var) |= ( ((_v) << (_f ## _S)) & (_f)); \ |
| 102 | } while (0) |
| 103 | |
| 104 | #define WMI_GET_BITS(_val, _index, _num_bits) \ |
| 105 | (((_val) >> (_index)) & ((1 << (_num_bits)) - 1)) |
| 106 | |
| 107 | #define WMI_SET_BITS(_var, _index, _num_bits, _val) do { \ |
| 108 | (_var) &= ~(((1 << (_num_bits)) - 1) << (_index)); \ |
| 109 | (_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \ |
| 110 | } while (0) |
| 111 | |
| 112 | /** |
| 113 | * A packed array is an array where each entry in the array is less than |
| 114 | * or equal to 16 bits, and the entries are stuffed into an A_UINT32 array. |
| 115 | * For example, if each entry in the array is 11 bits, then you can stuff |
| 116 | * an array of 4 11-bit values into an array of 2 A_UINT32 values. |
| 117 | * The first 2 11-bit values will be stored in the first A_UINT32, |
| 118 | * and the last 2 11-bit values will be stored in the second A_UINT32. |
| 119 | */ |
| 120 | #define WMI_PACKED_ARR_SIZE(num_entries, bits_per_entry) \ |
| 121 | (((num_entries) / (32 / (bits_per_entry))) + \ |
| 122 | (((num_entries) % (32 / (bits_per_entry))) ? 1 : 0)) |
| 123 | |
| 124 | static INLINE A_UINT32 wmi_packed_arr_get_bits(A_UINT32 * arr, |
| 125 | A_UINT32 entry_index, A_UINT32 bits_per_entry) |
| 126 | { |
| 127 | A_UINT32 entries_per_uint = (32 / bits_per_entry); |
| 128 | A_UINT32 uint_index = (entry_index / entries_per_uint); |
| 129 | A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint); |
| 130 | A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints); |
| 131 | A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry); |
| 132 | return ((arr[uint_index] >> start_bit_in_uint) & |
| 133 | ((1 << bits_per_entry) - 1)); |
| 134 | } |
| 135 | |
| 136 | static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index, |
| 137 | A_UINT32 bits_per_entry, A_UINT32 val) |
| 138 | { |
| 139 | A_UINT32 entries_per_uint = (32 / bits_per_entry); |
| 140 | A_UINT32 uint_index = (entry_index / entries_per_uint); |
| 141 | A_UINT32 num_entries_in_prev_uints = (uint_index * entries_per_uint); |
| 142 | A_UINT32 index_in_uint = (entry_index - num_entries_in_prev_uints); |
| 143 | A_UINT32 start_bit_in_uint = (index_in_uint * bits_per_entry); |
| 144 | |
| 145 | arr[uint_index] &= ~(((1 << bits_per_entry) - 1) << start_bit_in_uint); |
| 146 | arr[uint_index] |= |
| 147 | ((val & ((1 << bits_per_entry) - 1)) << start_bit_in_uint); |
| 148 | } |
| 149 | |
| 150 | /** 2 word representation of MAC addr */ |
| 151 | typedef struct { |
| 152 | /** upper 4 bytes of MAC address */ |
| 153 | A_UINT32 mac_addr31to0; |
| 154 | /** lower 2 bytes of MAC address */ |
| 155 | A_UINT32 mac_addr47to32; |
| 156 | } wmi_mac_addr; |
| 157 | |
| 158 | /** macro to convert MAC address from WMI word format to char array */ |
| 159 | #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \ |
| 160 | (c_macaddr)[0] = ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \ |
| 161 | (c_macaddr)[1] = ( ((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \ |
| 162 | (c_macaddr)[2] = ( ((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \ |
| 163 | (c_macaddr)[3] = ( ((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff; \ |
| 164 | (c_macaddr)[4] = ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \ |
| 165 | (c_macaddr)[5] = ( ((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \ |
| 166 | } while(0) |
| 167 | |
| 168 | /** macro to convert MAC address from char array to WMI word format */ |
| 169 | #define WMI_CHAR_ARRAY_TO_MAC_ADDR(c_macaddr,pwmi_mac_addr) do { \ |
| 170 | (pwmi_mac_addr)->mac_addr31to0 = \ |
| 171 | ( (c_macaddr)[0] | ((c_macaddr)[1] << 8) \ |
| 172 | | ((c_macaddr)[2] << 16) | ((c_macaddr)[3] << 24) ); \ |
| 173 | (pwmi_mac_addr)->mac_addr47to32 = \ |
| 174 | ( (c_macaddr)[4] | ((c_macaddr)[5] << 8)); \ |
| 175 | } while(0) |
| 176 | |
| 177 | /* |
| 178 | * wmi command groups. |
| 179 | */ |
| 180 | typedef enum { |
| 181 | /* 0 to 2 are reserved */ |
| 182 | WMI_GRP_START = 0x3, |
| 183 | WMI_GRP_SCAN = WMI_GRP_START, |
| 184 | WMI_GRP_PDEV, |
| 185 | WMI_GRP_VDEV, |
| 186 | WMI_GRP_PEER, |
| 187 | WMI_GRP_MGMT, |
| 188 | WMI_GRP_BA_NEG, |
| 189 | WMI_GRP_STA_PS, |
| 190 | WMI_GRP_DFS, |
| 191 | WMI_GRP_ROAM, |
| 192 | WMI_GRP_OFL_SCAN, |
| 193 | WMI_GRP_P2P, |
| 194 | WMI_GRP_AP_PS, |
| 195 | WMI_GRP_RATE_CTRL, |
| 196 | WMI_GRP_PROFILE, |
| 197 | WMI_GRP_SUSPEND, |
| 198 | WMI_GRP_BCN_FILTER, |
| 199 | WMI_GRP_WOW, |
| 200 | WMI_GRP_RTT, |
| 201 | WMI_GRP_SPECTRAL, |
| 202 | WMI_GRP_STATS, |
| 203 | WMI_GRP_ARP_NS_OFL, |
| 204 | WMI_GRP_NLO_OFL, |
| 205 | WMI_GRP_GTK_OFL, |
| 206 | WMI_GRP_CSA_OFL, |
| 207 | WMI_GRP_CHATTER, |
| 208 | WMI_GRP_TID_ADDBA, |
| 209 | WMI_GRP_MISC, |
| 210 | WMI_GRP_GPIO, |
| 211 | WMI_GRP_FWTEST, |
| 212 | WMI_GRP_TDLS, |
| 213 | WMI_GRP_RESMGR, |
| 214 | WMI_GRP_STA_SMPS, |
| 215 | WMI_GRP_WLAN_HB, |
| 216 | WMI_GRP_RMC, |
| 217 | WMI_GRP_MHF_OFL, |
| 218 | WMI_GRP_LOCATION_SCAN, |
| 219 | WMI_GRP_OEM, |
| 220 | WMI_GRP_NAN, |
| 221 | WMI_GRP_COEX, |
| 222 | WMI_GRP_OBSS_OFL, |
| 223 | WMI_GRP_LPI, |
| 224 | WMI_GRP_EXTSCAN, |
| 225 | WMI_GRP_DHCP_OFL, |
| 226 | WMI_GRP_IPA, |
| 227 | WMI_GRP_MDNS_OFL, |
| 228 | WMI_GRP_SAP_OFL, |
| 229 | WMI_GRP_OCB, |
| 230 | WMI_GRP_SOC, |
| 231 | WMI_GRP_PKT_FILTER, |
| 232 | WMI_GRP_MAWC, |
| 233 | WMI_GRP_PMF_OFFLOAD, |
| 234 | } WMI_GRP_ID; |
| 235 | |
| 236 | #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 237 | #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) |
| 238 | |
| 239 | /** |
| 240 | * Command IDs and commange events |
| 241 | */ |
| 242 | typedef enum { |
| 243 | /** initialize the wlan sub system */ |
| 244 | WMI_INIT_CMDID = 0x1, |
| 245 | |
| 246 | /* Scan specific commands */ |
| 247 | |
| 248 | /** start scan request to FW */ |
| 249 | WMI_START_SCAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SCAN), |
| 250 | /** stop scan request to FW */ |
| 251 | WMI_STOP_SCAN_CMDID, |
| 252 | /** full list of channels as defined by the regulatory that will be used by scanner */ |
| 253 | WMI_SCAN_CHAN_LIST_CMDID, |
| 254 | /** overwrite default priority table in scan scheduler */ |
| 255 | WMI_SCAN_SCH_PRIO_TBL_CMDID, |
| 256 | /** This command to adjust the priority and min.max_rest_time |
| 257 | * of an on ongoing scan request. |
| 258 | */ |
| 259 | WMI_SCAN_UPDATE_REQUEST_CMDID, |
| 260 | |
| 261 | /** set OUI to be used in probe request if enabled */ |
| 262 | WMI_SCAN_PROB_REQ_OUI_CMDID, |
| 263 | |
| 264 | /* PDEV(physical device) specific commands */ |
| 265 | /** set regulatorty ctl id used by FW to determine the exact ctl power limits */ |
| 266 | WMI_PDEV_SET_REGDOMAIN_CMDID = |
| 267 | WMI_CMD_GRP_START_ID(WMI_GRP_PDEV), |
| 268 | /** set channel. mainly used for supporting monitor mode */ |
| 269 | WMI_PDEV_SET_CHANNEL_CMDID, |
| 270 | /** set pdev specific parameters */ |
| 271 | WMI_PDEV_SET_PARAM_CMDID, |
| 272 | /** enable packet log */ |
| 273 | WMI_PDEV_PKTLOG_ENABLE_CMDID, |
| 274 | /** disable packet log*/ |
| 275 | WMI_PDEV_PKTLOG_DISABLE_CMDID, |
| 276 | /** set wmm parameters */ |
| 277 | WMI_PDEV_SET_WMM_PARAMS_CMDID, |
| 278 | /** set HT cap ie that needs to be carried probe requests HT/VHT channels */ |
| 279 | WMI_PDEV_SET_HT_CAP_IE_CMDID, |
| 280 | /** set VHT cap ie that needs to be carried on probe requests on VHT channels */ |
| 281 | WMI_PDEV_SET_VHT_CAP_IE_CMDID, |
| 282 | |
| 283 | /** Command to send the DSCP-to-TID map to the target */ |
| 284 | WMI_PDEV_SET_DSCP_TID_MAP_CMDID, |
| 285 | /** set quiet ie parameters. primarily used in AP mode */ |
| 286 | WMI_PDEV_SET_QUIET_MODE_CMDID, |
| 287 | /** Enable/Disable Green AP Power Save */ |
| 288 | WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| 289 | /** get TPC config for the current operating channel */ |
| 290 | WMI_PDEV_GET_TPC_CONFIG_CMDID, |
| 291 | |
| 292 | /** set the base MAC address for the physical device before a VDEV is created. |
| 293 | * For firmware that doesn't support this feature and this command, the pdev |
| 294 | * MAC address will not be changed. */ |
| 295 | WMI_PDEV_SET_BASE_MACADDR_CMDID, |
| 296 | |
| 297 | /* eeprom content dump , the same to bdboard data */ |
| 298 | WMI_PDEV_DUMP_CMDID, |
| 299 | /* set LED configuration */ |
| 300 | WMI_PDEV_SET_LED_CONFIG_CMDID, |
| 301 | /* Get Current temprature of chip in Celcius degree */ |
| 302 | WMI_PDEV_GET_TEMPERATURE_CMDID, |
| 303 | /* Set LED flashing behavior */ |
| 304 | WMI_PDEV_SET_LED_FLASHING_CMDID, |
| 305 | |
| 306 | /* VDEV(virtual device) specific commands */ |
| 307 | /** vdev create */ |
| 308 | WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_VDEV), |
| 309 | /** vdev delete */ |
| 310 | WMI_VDEV_DELETE_CMDID, |
| 311 | /** vdev start request */ |
| 312 | WMI_VDEV_START_REQUEST_CMDID, |
| 313 | /** vdev restart request (RX only, NO TX, used for CAC period)*/ |
| 314 | WMI_VDEV_RESTART_REQUEST_CMDID, |
| 315 | /** vdev up request */ |
| 316 | WMI_VDEV_UP_CMDID, |
| 317 | /** vdev stop request */ |
| 318 | WMI_VDEV_STOP_CMDID, |
| 319 | /** vdev down request */ |
| 320 | WMI_VDEV_DOWN_CMDID, |
| 321 | /* set a vdev param */ |
| 322 | WMI_VDEV_SET_PARAM_CMDID, |
| 323 | /* set a key (used for setting per peer unicast and per vdev multicast) */ |
| 324 | WMI_VDEV_INSTALL_KEY_CMDID, |
| 325 | |
| 326 | /* wnm sleep mode command */ |
| 327 | WMI_VDEV_WNM_SLEEPMODE_CMDID, |
| 328 | WMI_VDEV_WMM_ADDTS_CMDID, |
| 329 | WMI_VDEV_WMM_DELTS_CMDID, |
| 330 | WMI_VDEV_SET_WMM_PARAMS_CMDID, |
| 331 | WMI_VDEV_SET_GTX_PARAMS_CMDID, |
| 332 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID, |
| 333 | |
| 334 | WMI_VDEV_PLMREQ_START_CMDID, |
| 335 | WMI_VDEV_PLMREQ_STOP_CMDID, |
| 336 | /* TSF timestamp action for specified vdev */ |
| 337 | WMI_VDEV_TSF_TSTAMP_ACTION_CMDID, |
| 338 | /* |
| 339 | * set the capabilties IE, e.g. for extended caps in probe |
| 340 | * requests, assoc req etc for frames FW locally generates |
| 341 | */ |
| 342 | WMI_VDEV_SET_IE_CMDID, |
| 343 | |
| 344 | /* peer specific commands */ |
| 345 | |
| 346 | /** create a peer */ |
| 347 | WMI_PEER_CREATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PEER), |
| 348 | /** delete a peer */ |
| 349 | WMI_PEER_DELETE_CMDID, |
| 350 | /** flush specific tid queues of a peer */ |
| 351 | WMI_PEER_FLUSH_TIDS_CMDID, |
| 352 | /** set a parameter of a peer */ |
| 353 | WMI_PEER_SET_PARAM_CMDID, |
| 354 | /** set peer to associated state. will cary all parameters determined during assocication time */ |
| 355 | WMI_PEER_ASSOC_CMDID, |
| 356 | /**add a wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 357 | WMI_PEER_ADD_WDS_ENTRY_CMDID, |
| 358 | /**remove wds (4 address ) entry. used only for testing WDS feature on AP products */ |
| 359 | WMI_PEER_REMOVE_WDS_ENTRY_CMDID, |
| 360 | /** set up mcast group infor for multicast to unicast conversion */ |
| 361 | WMI_PEER_MCAST_GROUP_CMDID, |
| 362 | /** request peer info from FW. FW shall respond with PEER_INFO_EVENTID */ |
| 363 | WMI_PEER_INFO_REQ_CMDID, |
| 364 | |
| 365 | /** request the estimated link speed for the peer. FW shall respond with |
| 366 | * WMI_PEER_ESTIMATED_LINKSPEED_EVENTID. |
| 367 | */ |
| 368 | WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID, |
| 369 | /* |
| 370 | * Set the conditions to report peer justified rate to driver |
| 371 | * The justified rate means the the user-rate is justified by PER. |
| 372 | */ |
| 373 | WMI_PEER_SET_RATE_REPORT_CONDITION_CMDID, |
| 374 | /* beacon/management specific commands */ |
| 375 | |
| 376 | /** transmit beacon by reference . used for transmitting beacon on low latency interface like pcie */ |
| 377 | WMI_BCN_TX_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MGMT), |
| 378 | /** transmit beacon by value */ |
| 379 | WMI_PDEV_SEND_BCN_CMDID, |
| 380 | /** set the beacon template. used in beacon offload mode to setup the |
| 381 | * the common beacon template with the FW to be used by FW to generate beacons */ |
| 382 | WMI_BCN_TMPL_CMDID, |
| 383 | /** set beacon filter with FW */ |
| 384 | WMI_BCN_FILTER_RX_CMDID, |
| 385 | /* enable/disable filtering of probe requests in the firmware */ |
| 386 | WMI_PRB_REQ_FILTER_RX_CMDID, |
| 387 | /** transmit management frame by value. will be deprecated */ |
| 388 | WMI_MGMT_TX_CMDID, |
| 389 | /** set the probe response template. used in beacon offload mode to setup the |
| 390 | * the common probe response template with the FW to be used by FW to generate |
| 391 | * probe responses */ |
| 392 | WMI_PRB_TMPL_CMDID, |
| 393 | /** Transmit Mgmt frame by reference */ |
| 394 | WMI_MGMT_TX_SEND_CMDID, |
| 395 | |
| 396 | /** commands to directly control ba negotiation directly from host. only used in test mode */ |
| 397 | |
| 398 | /** turn off FW Auto addba mode and let host control addba */ |
| 399 | WMI_ADDBA_CLEAR_RESP_CMDID = |
| 400 | WMI_CMD_GRP_START_ID(WMI_GRP_BA_NEG), |
| 401 | /** send add ba request */ |
| 402 | WMI_ADDBA_SEND_CMDID, |
| 403 | WMI_ADDBA_STATUS_CMDID, |
| 404 | /** send del ba */ |
| 405 | WMI_DELBA_SEND_CMDID, |
| 406 | /** set add ba response will be used by FW to generate addba response*/ |
| 407 | WMI_ADDBA_SET_RESP_CMDID, |
| 408 | /** send single VHT MPDU with AMSDU */ |
| 409 | WMI_SEND_SINGLEAMSDU_CMDID, |
| 410 | |
| 411 | /** Station power save specific config */ |
| 412 | /** enable/disable station powersave */ |
| 413 | WMI_STA_POWERSAVE_MODE_CMDID = |
| 414 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_PS), |
| 415 | /** set station power save specific parameter */ |
| 416 | WMI_STA_POWERSAVE_PARAM_CMDID, |
| 417 | /** set station mimo powersave mode */ |
| 418 | WMI_STA_MIMO_PS_MODE_CMDID, |
| 419 | |
| 420 | /** DFS-specific commands */ |
| 421 | /** enable DFS (radar detection)*/ |
| 422 | WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_DFS), |
| 423 | /** disable DFS (radar detection)*/ |
| 424 | WMI_PDEV_DFS_DISABLE_CMDID, |
| 425 | /** enable DFS phyerr/parse filter offload */ |
| 426 | WMI_DFS_PHYERR_FILTER_ENA_CMDID, |
| 427 | /** enable DFS phyerr/parse filter offload */ |
| 428 | WMI_DFS_PHYERR_FILTER_DIS_CMDID, |
| 429 | |
| 430 | /* Roaming specific commands */ |
| 431 | /** set roam scan mode */ |
| 432 | WMI_ROAM_SCAN_MODE = WMI_CMD_GRP_START_ID(WMI_GRP_ROAM), |
| 433 | /** set roam scan rssi threshold below which roam scan is enabled */ |
| 434 | WMI_ROAM_SCAN_RSSI_THRESHOLD, |
| 435 | /** set roam scan period for periodic roam scan mode */ |
| 436 | WMI_ROAM_SCAN_PERIOD, |
| 437 | /** set roam scan trigger rssi change threshold */ |
| 438 | WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| 439 | /** set roam AP profile */ |
| 440 | WMI_ROAM_AP_PROFILE, |
| 441 | /** set channel list for roam scans */ |
| 442 | WMI_ROAM_CHAN_LIST, |
| 443 | /** Stop scan command */ |
| 444 | WMI_ROAM_SCAN_CMD, |
| 445 | /** roaming sme offload sync complete */ |
| 446 | WMI_ROAM_SYNCH_COMPLETE, |
| 447 | /** set ric request element for 11r roaming */ |
| 448 | WMI_ROAM_SET_RIC_REQUEST_CMDID, |
| 449 | /** Invoke roaming forcefully */ |
| 450 | WMI_ROAM_INVOKE_CMDID, |
| 451 | /** roaming filter cmd to allow further filtering of roaming candidate */ |
| 452 | WMI_ROAM_FILTER_CMDID, |
| 453 | /** set gateway ip, mac and retries for subnet change detection */ |
| 454 | WMI_ROAM_SUBNET_CHANGE_CONFIG_CMDID, |
| 455 | /** configure thresholds for MAWC */ |
| 456 | WMI_ROAM_CONFIGURE_MAWC_CMDID, |
| 457 | |
| 458 | /** offload scan specific commands */ |
| 459 | /** set offload scan AP profile */ |
| 460 | WMI_OFL_SCAN_ADD_AP_PROFILE = |
| 461 | WMI_CMD_GRP_START_ID(WMI_GRP_OFL_SCAN), |
| 462 | /** remove offload scan AP profile */ |
| 463 | WMI_OFL_SCAN_REMOVE_AP_PROFILE, |
| 464 | /** set offload scan period */ |
| 465 | WMI_OFL_SCAN_PERIOD, |
| 466 | |
| 467 | /* P2P specific commands */ |
| 468 | /**set P2P device info. FW will used by FW to create P2P IE to be carried in probe response |
| 469 | * generated during p2p listen and for p2p discoverability */ |
| 470 | WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP_START_ID(WMI_GRP_P2P), |
| 471 | /** enable/disable p2p discoverability on STA/AP VDEVs */ |
| 472 | WMI_P2P_DEV_SET_DISCOVERABILITY, |
| 473 | /** set p2p ie to be carried in beacons generated by FW for GO */ |
| 474 | WMI_P2P_GO_SET_BEACON_IE, |
| 475 | /** set p2p ie to be carried in probe response frames generated by FW for GO */ |
| 476 | WMI_P2P_GO_SET_PROBE_RESP_IE, |
| 477 | /** set the vendor specific p2p ie data. FW will use this to parse the P2P NoA |
| 478 | * attribute in the beacons/probe responses received. |
| 479 | */ |
| 480 | WMI_P2P_SET_VENDOR_IE_DATA_CMDID, |
| 481 | /** set the configure of p2p find offload */ |
| 482 | WMI_P2P_DISC_OFFLOAD_CONFIG_CMDID, |
| 483 | /** set the vendor specific p2p ie data for p2p find offload using */ |
| 484 | WMI_P2P_DISC_OFFLOAD_APPIE_CMDID, |
| 485 | /** set the BSSID/device name pattern of p2p find offload */ |
| 486 | WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID, |
| 487 | /** set OppPS related parameters **/ |
| 488 | WMI_P2P_SET_OPPPS_PARAM_CMDID, |
| 489 | |
| 490 | /** AP power save specific config */ |
| 491 | /** set AP power save specific param */ |
| 492 | WMI_AP_PS_PEER_PARAM_CMDID = |
| 493 | WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS), |
| 494 | /** set AP UAPSD coex pecific param */ |
| 495 | WMI_AP_PS_PEER_UAPSD_COEX_CMDID, |
| 496 | |
| 497 | /** set Enhanced Green AP param */ |
| 498 | WMI_AP_PS_EGAP_PARAM_CMDID, |
| 499 | |
| 500 | /** Rate-control specific commands */ |
| 501 | WMI_PEER_RATE_RETRY_SCHED_CMDID = |
| 502 | WMI_CMD_GRP_START_ID(WMI_GRP_RATE_CTRL), |
| 503 | |
| 504 | /** WLAN Profiling commands. */ |
| 505 | WMI_WLAN_PROFILE_TRIGGER_CMDID = |
| 506 | WMI_CMD_GRP_START_ID(WMI_GRP_PROFILE), |
| 507 | WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| 508 | WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| 509 | WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| 510 | WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| 511 | |
| 512 | /** Suspend resume command Ids */ |
| 513 | WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SUSPEND), |
| 514 | WMI_PDEV_RESUME_CMDID, |
| 515 | |
| 516 | /* Beacon filter commands */ |
| 517 | /** add a beacon filter */ |
| 518 | WMI_ADD_BCN_FILTER_CMDID = |
| 519 | WMI_CMD_GRP_START_ID(WMI_GRP_BCN_FILTER), |
| 520 | /** remove a beacon filter */ |
| 521 | WMI_RMV_BCN_FILTER_CMDID, |
| 522 | |
| 523 | /* WOW Specific WMI commands */ |
| 524 | /** add pattern for awake */ |
| 525 | WMI_WOW_ADD_WAKE_PATTERN_CMDID = |
| 526 | WMI_CMD_GRP_START_ID(WMI_GRP_WOW), |
| 527 | /** deleta a wake pattern */ |
| 528 | WMI_WOW_DEL_WAKE_PATTERN_CMDID, |
| 529 | /** enable/deisable wake event */ |
| 530 | WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| 531 | /** enable WOW */ |
| 532 | WMI_WOW_ENABLE_CMDID, |
| 533 | /** host woke up from sleep event to FW. Generated in response to WOW Hardware event */ |
| 534 | WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| 535 | /* IOAC add keep alive cmd. */ |
| 536 | WMI_WOW_IOAC_ADD_KEEPALIVE_CMDID, |
| 537 | /* IOAC del keep alive cmd. */ |
| 538 | WMI_WOW_IOAC_DEL_KEEPALIVE_CMDID, |
| 539 | /* IOAC add pattern for awake */ |
| 540 | WMI_WOW_IOAC_ADD_WAKE_PATTERN_CMDID, |
| 541 | /* IOAC deleta a wake pattern */ |
| 542 | WMI_WOW_IOAC_DEL_WAKE_PATTERN_CMDID, |
| 543 | /* D0-WOW enable or disable cmd */ |
| 544 | WMI_D0_WOW_ENABLE_DISABLE_CMDID, |
| 545 | /* enable extend WoW */ |
| 546 | WMI_EXTWOW_ENABLE_CMDID, |
| 547 | /* Extend WoW command to configure app type1 parameter */ |
| 548 | WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID, |
| 549 | /* Extend WoW command to configure app type2 parameter */ |
| 550 | WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID, |
| 551 | /* enable ICMPv6 Network advertisement filtering */ |
| 552 | WMI_WOW_ENABLE_ICMPV6_NA_FLT_CMDID, |
| 553 | /* |
| 554 | * Set a pattern to match UDP packet in WOW mode. |
| 555 | * If match, construct a tx frame in a local buffer |
| 556 | * to send through the peer AP to the entity in the |
| 557 | * IP network that sent the UDP packet to this STA. |
| 558 | */ |
| 559 | WMI_WOW_UDP_SVC_OFLD_CMDID, |
| 560 | |
| 561 | /* configure WOW host wakeup PIN pattern */ |
| 562 | WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID, |
| 563 | |
| 564 | /* RTT measurement related cmd */ |
| 565 | /** request to make an RTT measurement */ |
| 566 | WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RTT), |
| 567 | /** request to report a tsf measurement */ |
| 568 | WMI_RTT_TSF_CMDID, |
| 569 | |
| 570 | /** spectral scan command */ |
| 571 | /** configure spectral scan */ |
| 572 | WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = |
| 573 | WMI_CMD_GRP_START_ID(WMI_GRP_SPECTRAL), |
| 574 | /** enable/disable spectral scan and trigger */ |
| 575 | WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| 576 | |
| 577 | /* F/W stats */ |
| 578 | /** one time request for stats */ |
| 579 | WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STATS), |
| 580 | /** Push MCC Adaptive Scheduler Stats to Firmware */ |
| 581 | WMI_MCC_SCHED_TRAFFIC_STATS_CMDID, |
| 582 | /** one time request for txrx stats */ |
| 583 | WMI_REQUEST_STATS_EXT_CMDID, |
| 584 | |
| 585 | /* Link Layer stats */ |
| 586 | /** Request for link layer stats */ |
| 587 | WMI_REQUEST_LINK_STATS_CMDID, |
| 588 | /** Request for setting params to link layer stats */ |
| 589 | WMI_START_LINK_STATS_CMDID, |
| 590 | /** Request to clear stats*/ |
| 591 | WMI_CLEAR_LINK_STATS_CMDID, |
| 592 | |
| 593 | /** Request for getting the Firmware Memory Dump */ |
| 594 | WMI_GET_FW_MEM_DUMP_CMDID, |
| 595 | |
| 596 | /** Request to flush of the buffered debug messages */ |
| 597 | WMI_DEBUG_MESG_FLUSH_CMDID, |
| 598 | |
| 599 | /** Cmd to configure the verbose level */ |
| 600 | WMI_DIAG_EVENT_LOG_CONFIG_CMDID, |
| 601 | |
| 602 | /** ARP OFFLOAD REQUEST*/ |
| 603 | WMI_SET_ARP_NS_OFFLOAD_CMDID = |
| 604 | WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), |
| 605 | |
| 606 | /** Proactive ARP Response Add Pattern Command*/ |
| 607 | WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 608 | |
| 609 | /** Proactive ARP Response Del Pattern Command*/ |
| 610 | WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID, |
| 611 | |
| 612 | /** NS offload config*/ |
| 613 | WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = |
| 614 | WMI_CMD_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 615 | |
| 616 | /** APFIND Config */ |
| 617 | WMI_APFIND_CMDID, |
| 618 | |
| 619 | /** Passpoint list config */ |
| 620 | WMI_PASSPOINT_LIST_CONFIG_CMDID, |
| 621 | |
| 622 | /** configure supprssing parameters for MAWC */ |
| 623 | WMI_NLO_CONFIGURE_MAWC_CMDID, |
| 624 | |
| 625 | /* GTK offload Specific WMI commands */ |
| 626 | WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 627 | |
| 628 | /* CSA offload Specific WMI commands */ |
| 629 | /** csa offload enable */ |
| 630 | WMI_CSA_OFFLOAD_ENABLE_CMDID = |
| 631 | WMI_CMD_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 632 | /** chan switch command */ |
| 633 | WMI_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| 634 | |
| 635 | /* Chatter commands */ |
| 636 | /* Change chatter mode of operation */ |
| 637 | WMI_CHATTER_SET_MODE_CMDID = |
| 638 | WMI_CMD_GRP_START_ID(WMI_GRP_CHATTER), |
| 639 | /** chatter add coalescing filter command */ |
| 640 | WMI_CHATTER_ADD_COALESCING_FILTER_CMDID, |
| 641 | /** chatter delete coalescing filter command */ |
| 642 | WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID, |
| 643 | /** chatter coalecing query command */ |
| 644 | WMI_CHATTER_COALESCING_QUERY_CMDID, |
| 645 | |
| 646 | /**addba specific commands */ |
| 647 | /** start the aggregation on this TID */ |
| 648 | WMI_PEER_TID_ADDBA_CMDID = |
| 649 | WMI_CMD_GRP_START_ID(WMI_GRP_TID_ADDBA), |
| 650 | /** stop the aggregation on this TID */ |
| 651 | WMI_PEER_TID_DELBA_CMDID, |
| 652 | |
| 653 | /** set station mimo powersave method */ |
| 654 | WMI_STA_DTIM_PS_METHOD_CMDID, |
| 655 | /** Configure the Station UAPSD AC Auto Trigger Parameters */ |
| 656 | WMI_STA_UAPSD_AUTO_TRIG_CMDID, |
| 657 | /** Configure the Keep Alive Parameters */ |
| 658 | WMI_STA_KEEPALIVE_CMDID, |
| 659 | |
| 660 | /* Request ssn from target for a sta/tid pair */ |
| 661 | WMI_BA_REQ_SSN_CMDID, |
| 662 | /* misc command group */ |
| 663 | /** echo command mainly used for testing */ |
| 664 | WMI_ECHO_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MISC), |
| 665 | |
| 666 | /* !!IMPORTANT!! |
| 667 | * If you need to add a new WMI command to the WMI_GRP_MISC sub-group, |
| 668 | * please make sure you add it BEHIND WMI_PDEV_UTF_CMDID, |
| 669 | * as we MUST have a fixed value here to maintain compatibility between |
| 670 | * UTF and the ART2 driver |
| 671 | */ |
| 672 | /** UTF WMI commands */ |
| 673 | WMI_PDEV_UTF_CMDID, |
| 674 | |
| 675 | /** set debug log config */ |
| 676 | WMI_DBGLOG_CFG_CMDID, |
| 677 | /* QVIT specific command id */ |
| 678 | WMI_PDEV_QVIT_CMDID, |
| 679 | /* Factory Testing Mode request command |
| 680 | * used for integrated chipsets */ |
| 681 | WMI_PDEV_FTM_INTG_CMDID, |
| 682 | /* set and get keepalive parameters command */ |
| 683 | WMI_VDEV_SET_KEEPALIVE_CMDID, |
| 684 | WMI_VDEV_GET_KEEPALIVE_CMDID, |
| 685 | /* For fw recovery test command */ |
| 686 | WMI_FORCE_FW_HANG_CMDID, |
| 687 | /* Set Mcast/Bdcast filter */ |
| 688 | WMI_SET_MCASTBCAST_FILTER_CMDID, |
| 689 | /** set thermal management params **/ |
| 690 | WMI_THERMAL_MGMT_CMDID, |
| 691 | /** set host auto shutdown params **/ |
| 692 | WMI_HOST_AUTO_SHUTDOWN_CFG_CMDID, |
| 693 | /** set tpc chainmask config command */ |
| 694 | WMI_TPC_CHAINMASK_CONFIG_CMDID, |
| 695 | /** set Antenna diversity command */ |
| 696 | WMI_SET_ANTENNA_DIVERSITY_CMDID, |
| 697 | /** Set OCB Sched Request, deprecated */ |
| 698 | WMI_OCB_SET_SCHED_CMDID, |
| 699 | /* Set rssi monitoring config command */ |
| 700 | WMI_RSSI_BREACH_MONITOR_CONFIG_CMDID, |
| 701 | /* Enable/disable Large Receive Offload processing; |
| 702 | * provide cfg params */ |
| 703 | WMI_LRO_CONFIG_CMDID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 704 | /*transfer data from host to firmware to write flash */ |
| 705 | WMI_TRANSFER_DATA_TO_FLASH_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 706 | /* GPIO Configuration */ |
| 707 | WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_GPIO), |
| 708 | WMI_GPIO_OUTPUT_CMDID, |
| 709 | |
| 710 | /* Txbf configuration command */ |
| 711 | WMI_TXBF_CMDID, |
| 712 | |
| 713 | /* FWTEST Commands */ |
| 714 | WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID = |
| 715 | WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST), |
| 716 | /** set NoA descs **/ |
| 717 | WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID, |
| 718 | /* UNIT Tests */ |
| 719 | WMI_UNIT_TEST_CMDID, |
| 720 | |
| 721 | /** TDLS Configuration */ |
| 722 | /** enable/disable TDLS */ |
| 723 | WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS), |
| 724 | /** set tdls peer state */ |
| 725 | WMI_TDLS_PEER_UPDATE_CMDID, |
| 726 | /** TDLS Offchannel control */ |
| 727 | WMI_TDLS_SET_OFFCHAN_MODE_CMDID, |
| 728 | |
| 729 | /** Resmgr Configuration */ |
| 730 | /** Adaptive OCS is enabled by default in the FW. This command is used to |
| 731 | * disable FW based adaptive OCS. |
| 732 | */ |
| 733 | WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID = |
| 734 | WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR), |
| 735 | /** set the requested channel time quota for the home channels */ |
| 736 | WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID, |
| 737 | /** set the requested latency for the home channels */ |
| 738 | WMI_RESMGR_SET_CHAN_LATENCY_CMDID, |
| 739 | |
| 740 | /** STA SMPS Configuration */ |
| 741 | /** force SMPS mode */ |
| 742 | WMI_STA_SMPS_FORCE_MODE_CMDID = |
| 743 | WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS), |
| 744 | /** set SMPS parameters */ |
| 745 | WMI_STA_SMPS_PARAM_CMDID, |
| 746 | |
| 747 | /* Wlan HB commands */ |
| 748 | /* enalbe/disable wlan HB */ |
| 749 | WMI_HB_SET_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_WLAN_HB), |
| 750 | /* set tcp parameters for wlan HB */ |
| 751 | WMI_HB_SET_TCP_PARAMS_CMDID, |
| 752 | /* set tcp pkt filter for wlan HB */ |
| 753 | WMI_HB_SET_TCP_PKT_FILTER_CMDID, |
| 754 | /* set udp parameters for wlan HB */ |
| 755 | WMI_HB_SET_UDP_PARAMS_CMDID, |
| 756 | /* set udp pkt filter for wlan HB */ |
| 757 | WMI_HB_SET_UDP_PKT_FILTER_CMDID, |
| 758 | |
| 759 | /** Wlan RMC commands*/ |
| 760 | /** enable/disable RMC */ |
| 761 | WMI_RMC_SET_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RMC), |
| 762 | /** configure action frame period */ |
| 763 | WMI_RMC_SET_ACTION_PERIOD_CMDID, |
| 764 | /** For debug/future enhancement purposes only, |
| 765 | * configures/finetunes RMC algorithms */ |
| 766 | WMI_RMC_CONFIG_CMDID, |
| 767 | |
| 768 | /** WLAN MHF offload commands */ |
| 769 | /** enable/disable MHF offload */ |
| 770 | WMI_MHF_OFFLOAD_SET_MODE_CMDID = |
| 771 | WMI_CMD_GRP_START_ID(WMI_GRP_MHF_OFL), |
| 772 | /** Plumb routing table for MHF offload */ |
| 773 | WMI_MHF_OFFLOAD_PLUMB_ROUTING_TBL_CMDID, |
| 774 | |
| 775 | /*location scan commands */ |
| 776 | /*start batch scan */ |
| 777 | WMI_BATCH_SCAN_ENABLE_CMDID = |
| 778 | WMI_CMD_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 779 | /*stop batch scan */ |
| 780 | WMI_BATCH_SCAN_DISABLE_CMDID, |
| 781 | /*get batch scan result */ |
| 782 | WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID, |
| 783 | /* OEM related cmd */ |
Krishna Kumaar Natarajan | 1dfa353 | 2015-11-19 16:16:20 -0800 | [diff] [blame] | 784 | WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM), /* DEPRECATED */ |
| 785 | WMI_OEM_REQUEST_CMDID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 786 | |
| 787 | /** Nan Request */ |
| 788 | WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN), |
| 789 | |
| 790 | /** Modem power state command */ |
| 791 | WMI_MODEM_POWER_STATE_CMDID = |
| 792 | WMI_CMD_GRP_START_ID(WMI_GRP_COEX), |
| 793 | WMI_CHAN_AVOID_UPDATE_CMDID, |
| 794 | |
| 795 | /** |
| 796 | * OBSS scan offload enable/disable commands |
| 797 | * OBSS scan enable CMD will send to FW after VDEV UP, if these conditions are true: |
| 798 | * 1. WMI_SERVICE_OBSS_SCAN is reported by FW in service ready, |
| 799 | * 2. STA connect to a 2.4Ghz ht20/ht40 AP, |
| 800 | * 3. AP enable 20/40 coexistence (OBSS_IE-74 can be found in beacon or association response) |
| 801 | * If OBSS parameters from beacon changed, also use enable CMD to update parameters. |
| 802 | * OBSS scan disable CMD will send to FW if have enabled when tearing down connection. |
| 803 | */ |
| 804 | WMI_OBSS_SCAN_ENABLE_CMDID = |
| 805 | WMI_CMD_GRP_START_ID(WMI_GRP_OBSS_OFL), |
| 806 | WMI_OBSS_SCAN_DISABLE_CMDID, |
| 807 | |
| 808 | /**LPI commands*/ |
| 809 | /**LPI mgmt snooping config command*/ |
| 810 | WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID = |
| 811 | WMI_CMD_GRP_START_ID(WMI_GRP_LPI), |
| 812 | /**LPI scan start command*/ |
| 813 | WMI_LPI_START_SCAN_CMDID, |
| 814 | /**LPI scan stop command*/ |
| 815 | WMI_LPI_STOP_SCAN_CMDID, |
| 816 | |
| 817 | /** ExtScan commands */ |
| 818 | WMI_EXTSCAN_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 819 | WMI_EXTSCAN_STOP_CMDID, |
| 820 | WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID, |
| 821 | WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID, |
| 822 | WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID, |
| 823 | WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID, |
| 824 | WMI_EXTSCAN_SET_CAPABILITIES_CMDID, |
| 825 | WMI_EXTSCAN_GET_CAPABILITIES_CMDID, |
| 826 | WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID, |
| 827 | WMI_EXTSCAN_CONFIGURE_MAWC_CMDID, |
| 828 | |
| 829 | /** DHCP server offload commands */ |
| 830 | WMI_SET_DHCP_SERVER_OFFLOAD_CMDID = |
| 831 | WMI_CMD_GRP_START_ID(WMI_GRP_DHCP_OFL), |
| 832 | |
| 833 | /** IPA Offload features related commands */ |
| 834 | WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMDID = |
| 835 | WMI_CMD_GRP_START_ID(WMI_GRP_IPA), |
| 836 | |
| 837 | /** mDNS responder offload commands */ |
| 838 | WMI_MDNS_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 839 | WMI_MDNS_SET_FQDN_CMDID, |
| 840 | WMI_MDNS_SET_RESPONSE_CMDID, |
| 841 | WMI_MDNS_GET_STATS_CMDID, |
| 842 | |
| 843 | /* enable/disable AP Authentication offload */ |
| 844 | WMI_SAP_OFL_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 845 | WMI_SAP_SET_BLACKLIST_PARAM_CMDID, |
| 846 | |
| 847 | /** Out-of-context-of-BSS (OCB) commands */ |
| 848 | WMI_OCB_SET_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OCB), |
| 849 | WMI_OCB_SET_UTC_TIME_CMDID, |
| 850 | WMI_OCB_START_TIMING_ADVERT_CMDID, |
| 851 | WMI_OCB_STOP_TIMING_ADVERT_CMDID, |
| 852 | WMI_OCB_GET_TSF_TIMER_CMDID, |
| 853 | WMI_DCC_GET_STATS_CMDID, |
| 854 | WMI_DCC_CLEAR_STATS_CMDID, |
| 855 | WMI_DCC_UPDATE_NDL_CMDID, |
| 856 | /* System-On-Chip commands */ |
| 857 | WMI_SOC_SET_PCL_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_SOC), |
| 858 | WMI_SOC_SET_HW_MODE_CMDID, |
| 859 | WMI_SOC_SET_DUAL_MAC_CONFIG_CMDID, |
| 860 | WMI_SOC_SET_ANTENNA_MODE_CMDID, |
| 861 | |
| 862 | /* packet filter commands */ |
| 863 | WMI_PACKET_FILTER_CONFIG_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_PKT_FILTER), |
| 864 | WMI_PACKET_FILTER_ENABLE_CMDID, |
| 865 | /** Motion Aided WiFi Connectivity (MAWC) commands */ |
| 866 | WMI_MAWC_SENSOR_REPORT_IND_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MAWC), |
| 867 | |
| 868 | /** WMI commands related to PMF 11w Offload */ |
| 869 | WMI_PMF_OFFLOAD_SET_SA_QUERY_CMDID = |
| 870 | WMI_CMD_GRP_START_ID(WMI_GRP_PMF_OFFLOAD), |
| 871 | |
| 872 | } WMI_CMD_ID; |
| 873 | |
| 874 | typedef enum { |
| 875 | /** WMI service is ready; after this event WMI messages can be sent/received */ |
| 876 | WMI_SERVICE_READY_EVENTID = 0x1, |
| 877 | /** WMI is ready; after this event the wlan subsystem is initialized and can process commands. */ |
| 878 | WMI_READY_EVENTID, |
| 879 | |
| 880 | /** Scan specific events */ |
| 881 | WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), |
| 882 | |
| 883 | /* PDEV specific events */ |
| 884 | /** TPC config for the current operating channel */ |
| 885 | WMI_PDEV_TPC_CONFIG_EVENTID = |
| 886 | WMI_EVT_GRP_START_ID(WMI_GRP_PDEV), |
| 887 | /** Channel stats event */ |
| 888 | WMI_CHAN_INFO_EVENTID, |
| 889 | |
| 890 | /** PHY Error specific WMI event */ |
| 891 | WMI_PHYERR_EVENTID, |
| 892 | |
| 893 | /** eeprom dump event */ |
| 894 | WMI_PDEV_DUMP_EVENTID, |
| 895 | |
| 896 | /** traffic pause event */ |
| 897 | WMI_TX_PAUSE_EVENTID, |
| 898 | |
| 899 | /** DFS radar event */ |
| 900 | WMI_DFS_RADAR_EVENTID, |
| 901 | |
| 902 | /** track L1SS entry and residency event */ |
| 903 | WMI_PDEV_L1SS_TRACK_EVENTID, |
| 904 | |
| 905 | /** Report current temprature of the chip in Celcius degree */ |
| 906 | WMI_PDEV_TEMPERATURE_EVENTID, |
| 907 | |
| 908 | /* Extension of WMI_SERVICE_READY msg with |
| 909 | * extra target capability info |
| 910 | */ |
| 911 | WMI_SERVICE_READY_EXT_EVENTID, |
| 912 | |
| 913 | /* VDEV specific events */ |
| 914 | /** VDEV started event in response to VDEV_START request */ |
| 915 | WMI_VDEV_START_RESP_EVENTID = |
| 916 | WMI_EVT_GRP_START_ID(WMI_GRP_VDEV), |
| 917 | /** vdev stopped event , generated in response to VDEV_STOP request */ |
| 918 | WMI_VDEV_STOPPED_EVENTID, |
| 919 | /* Indicate the set key (used for setting per |
| 920 | * peer unicast and per vdev multicast) |
| 921 | * operation has completed */ |
| 922 | WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID, |
| 923 | /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please |
| 924 | don't use this for any new implementations */ |
| 925 | /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario. |
| 926 | This request is valid only for vdevs operating in soft AP or P2P GO mode */ |
| 927 | WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID, |
| 928 | |
| 929 | /* Return the TSF timestamp of specified vdev */ |
| 930 | WMI_VDEV_TSF_REPORT_EVENTID, |
| 931 | /* peer specific events */ |
| 932 | /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ |
| 933 | WMI_PEER_STA_KICKOUT_EVENTID = |
| 934 | WMI_EVT_GRP_START_ID(WMI_GRP_PEER), |
| 935 | |
| 936 | /** Peer Info Event with data_rate, rssi, tx_fail_cnt etc */ |
| 937 | WMI_PEER_INFO_EVENTID, |
| 938 | |
| 939 | /** Event indicating that TX fail count reaching threshold */ |
| 940 | WMI_PEER_TX_FAIL_CNT_THR_EVENTID, |
| 941 | /** Return the estimate link speed for the Peer specified in the |
| 942 | * WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID command. |
| 943 | */ |
| 944 | WMI_PEER_ESTIMATED_LINKSPEED_EVENTID, |
| 945 | /* Return the peer state |
| 946 | * WMI_PEER_SET_PARAM_CMDID, WMI_PEER_AUTHORIZE |
| 947 | */ |
| 948 | WMI_PEER_STATE_EVENTID, |
| 949 | |
| 950 | /* Peer Assoc Conf event to confirm fw had received PEER_ASSOC_CMD. |
| 951 | * After that, host will send Mx message. |
| 952 | * Otherwise, host will pause any Mx(STA:M2/M4) message |
| 953 | */ |
| 954 | WMI_PEER_ASSOC_CONF_EVENTID, |
| 955 | |
| 956 | /* beacon/mgmt specific events */ |
| 957 | /** RX management frame. the entire frame is carried along with the event. */ |
| 958 | WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT), |
| 959 | /** software beacon alert event to Host requesting host to Queue a beacon for transmission |
| 960 | use only in host beacon mode */ |
| 961 | WMI_HOST_SWBA_EVENTID, |
| 962 | /** beacon tbtt offset event indicating the tsf offset of the tbtt from the theritical value. |
| 963 | tbtt offset is normally 0 and will be non zero if there are multiple VDEVs operating in |
| 964 | staggered beacon transmission mode */ |
| 965 | WMI_TBTTOFFSET_UPDATE_EVENTID, |
| 966 | |
| 967 | /** event after the first beacon is transmitted following |
| 968 | a change in the template.*/ |
| 969 | WMI_OFFLOAD_BCN_TX_STATUS_EVENTID, |
| 970 | /** event after the first probe response is transmitted following |
| 971 | a change in the template.*/ |
| 972 | WMI_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID, |
| 973 | /** Event for Mgmt TX completion event */ |
| 974 | WMI_MGMT_TX_COMPLETION_EVENTID, |
| 975 | |
| 976 | /*ADDBA Related WMI Events */ |
| 977 | /** Indication the completion of the prior |
| 978 | WMI_PEER_TID_DELBA_CMDID(initiator) */ |
| 979 | WMI_TX_DELBA_COMPLETE_EVENTID = |
| 980 | WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG), |
| 981 | /** Indication the completion of the prior |
| 982 | *WMI_PEER_TID_ADDBA_CMDID(initiator) */ |
| 983 | WMI_TX_ADDBA_COMPLETE_EVENTID, |
| 984 | |
| 985 | /* Seq num returned from hw for a sta/tid pair */ |
| 986 | WMI_BA_RSP_SSN_EVENTID, |
| 987 | |
| 988 | /* Aggregation state requested by BTC */ |
| 989 | WMI_AGGR_STATE_TRIG_EVENTID, |
| 990 | |
| 991 | /** Roam event to trigger roaming on host */ |
| 992 | WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM), |
| 993 | |
| 994 | /** matching AP found from list of profiles */ |
| 995 | WMI_PROFILE_MATCH, |
| 996 | /** roam synch event */ |
| 997 | WMI_ROAM_SYNCH_EVENTID, |
| 998 | |
| 999 | /** P2P disc found */ |
| 1000 | WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), |
| 1001 | |
| 1002 | /*send noa info to host when noa is changed for beacon tx offload enable */ |
| 1003 | WMI_P2P_NOA_EVENTID, |
| 1004 | |
| 1005 | /** Send EGAP Info to host */ |
| 1006 | WMI_AP_PS_EGAP_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_AP_PS), |
| 1007 | |
| 1008 | /* send pdev resume event to host after pdev resume. */ |
| 1009 | WMI_PDEV_RESUME_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SUSPEND), |
| 1010 | |
| 1011 | /** WOW wake up host event.generated in response to WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID. |
| 1012 | will cary wake reason */ |
| 1013 | WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW), |
| 1014 | WMI_D0_WOW_DISABLE_ACK_EVENTID, |
| 1015 | WMI_WOW_INITIAL_WAKEUP_EVENTID, |
| 1016 | |
| 1017 | /*RTT related event ID */ |
| 1018 | /** RTT measurement report */ |
| 1019 | WMI_RTT_MEASUREMENT_REPORT_EVENTID = |
| 1020 | WMI_EVT_GRP_START_ID(WMI_GRP_RTT), |
| 1021 | /** TSF measurement report */ |
| 1022 | WMI_TSF_MEASUREMENT_REPORT_EVENTID, |
| 1023 | /** RTT error report */ |
| 1024 | WMI_RTT_ERROR_REPORT_EVENTID, |
| 1025 | /*STATS specific events */ |
| 1026 | /** txrx stats event requested by host */ |
| 1027 | WMI_STATS_EXT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_STATS), |
| 1028 | /** FW iface link stats Event */ |
| 1029 | WMI_IFACE_LINK_STATS_EVENTID, |
| 1030 | /** FW iface peer link stats Event */ |
| 1031 | WMI_PEER_LINK_STATS_EVENTID, |
| 1032 | /** FW Update radio stats Event */ |
| 1033 | WMI_RADIO_LINK_STATS_EVENTID, |
| 1034 | /** Firmware memory dump Complete event*/ |
| 1035 | WMI_UPDATE_FW_MEM_DUMP_EVENTID, |
| 1036 | |
| 1037 | /** Event indicating the DIAG logs/events supported by FW */ |
| 1038 | WMI_DIAG_EVENT_LOG_SUPPORTED_EVENTID, |
| 1039 | |
| 1040 | /** NLO specific events */ |
| 1041 | /** NLO match event after the first match */ |
| 1042 | WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), |
| 1043 | |
| 1044 | /** NLO scan complete event */ |
| 1045 | WMI_NLO_SCAN_COMPLETE_EVENTID, |
| 1046 | |
| 1047 | /** APFIND specific events */ |
| 1048 | WMI_APFIND_EVENTID, |
| 1049 | |
| 1050 | /** passpoint network match event */ |
| 1051 | WMI_PASSPOINT_MATCH_EVENTID, |
| 1052 | |
| 1053 | /** GTK offload stautus event requested by host */ |
| 1054 | WMI_GTK_OFFLOAD_STATUS_EVENTID = |
| 1055 | WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL), |
| 1056 | |
| 1057 | /** GTK offload failed to rekey event */ |
| 1058 | WMI_GTK_REKEY_FAIL_EVENTID, |
| 1059 | /* CSA IE received event */ |
| 1060 | WMI_CSA_HANDLING_EVENTID = |
| 1061 | WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL), |
| 1062 | |
| 1063 | /*chatter query reply event */ |
| 1064 | WMI_CHATTER_PC_QUERY_EVENTID = |
| 1065 | WMI_EVT_GRP_START_ID(WMI_GRP_CHATTER), |
| 1066 | |
| 1067 | /** echo event in response to echo command */ |
| 1068 | WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC), |
| 1069 | |
| 1070 | /* !!IMPORTANT!! |
| 1071 | * If you need to add a new WMI event ID to the WMI_GRP_MISC sub-group, |
| 1072 | * please make sure you add it BEHIND WMI_PDEV_UTF_EVENTID, |
| 1073 | * as we MUST have a fixed value here to maintain compatibility between |
| 1074 | * UTF and the ART2 driver |
| 1075 | */ |
| 1076 | /** UTF specific WMI event */ |
| 1077 | WMI_PDEV_UTF_EVENTID, |
| 1078 | |
| 1079 | /** event carries buffered debug messages */ |
| 1080 | WMI_DEBUG_MESG_EVENTID, |
| 1081 | /** FW stats(periodic or on shot) */ |
| 1082 | WMI_UPDATE_STATS_EVENTID, |
| 1083 | /** debug print message used for tracing FW code while debugging */ |
| 1084 | WMI_DEBUG_PRINT_EVENTID, |
| 1085 | /** DCS wlan or non-wlan interference event |
| 1086 | */ |
| 1087 | WMI_DCS_INTERFERENCE_EVENTID, |
| 1088 | /** VI spoecific event */ |
| 1089 | WMI_PDEV_QVIT_EVENTID, |
| 1090 | /** FW code profile data in response to profile request */ |
| 1091 | WMI_WLAN_PROFILE_DATA_EVENTID, |
| 1092 | /* Factory Testing Mode request event |
| 1093 | * used for integrated chipsets */ |
| 1094 | WMI_PDEV_FTM_INTG_EVENTID, |
| 1095 | /* avoid list of frequencies . |
| 1096 | */ |
| 1097 | WMI_WLAN_FREQ_AVOID_EVENTID, |
| 1098 | /* Indicate the keepalive parameters */ |
| 1099 | WMI_VDEV_GET_KEEPALIVE_EVENTID, |
| 1100 | /* Thermal Management event */ |
| 1101 | WMI_THERMAL_MGMT_EVENTID, |
| 1102 | |
| 1103 | /* Container for QXDM/DIAG events */ |
| 1104 | WMI_DIAG_DATA_CONTAINER_EVENTID, |
| 1105 | |
| 1106 | /* host auto shutdown event */ |
| 1107 | WMI_HOST_AUTO_SHUTDOWN_EVENTID, |
| 1108 | |
| 1109 | /*update mib counters together with WMI_UPDATE_STATS_EVENTID */ |
| 1110 | WMI_UPDATE_WHAL_MIB_STATS_EVENTID, |
| 1111 | |
| 1112 | /*update ht/vht info based on vdev (rx and tx NSS and preamble) */ |
| 1113 | WMI_UPDATE_VDEV_RATE_STATS_EVENTID, |
| 1114 | |
| 1115 | WMI_DIAG_EVENTID, |
| 1116 | |
| 1117 | /** Set OCB Sched Response, deprecated */ |
| 1118 | WMI_OCB_SET_SCHED_EVENTID, |
| 1119 | |
| 1120 | /* event to indicate the flush of the buffered debug messages is complete*/ |
| 1121 | WMI_DEBUG_MESG_FLUSH_COMPLETE_EVENTID, |
| 1122 | /* event to report mix/max RSSI breach events */ |
| 1123 | WMI_RSSI_BREACH_EVENTID, |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 1124 | /* event to report completion of data storage into flash memory */ |
| 1125 | WMI_TRANSFER_DATA_TO_FLASH_COMPLETE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1126 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 1127 | /** event to report SCPC calibrated data to host */ |
| 1128 | WMI_PDEV_UTF_SCPC_EVENTID, |
| 1129 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1130 | /* GPIO Event */ |
| 1131 | WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), |
| 1132 | /** upload H_CV info WMI event |
| 1133 | * to indicate uploaded H_CV info to host |
| 1134 | */ |
| 1135 | WMI_UPLOADH_EVENTID, |
| 1136 | |
| 1137 | /** capture H info WMI event |
| 1138 | * to indicate captured H info to host |
| 1139 | */ |
| 1140 | WMI_CAPTUREH_EVENTID, |
| 1141 | /* hw RFkill */ |
| 1142 | WMI_RFKILL_STATE_CHANGE_EVENTID, |
| 1143 | |
| 1144 | /* TDLS Event */ |
| 1145 | WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS), |
| 1146 | |
| 1147 | /*location scan event */ |
| 1148 | /*report the firmware's capability of batch scan */ |
| 1149 | WMI_BATCH_SCAN_ENABLED_EVENTID = |
| 1150 | WMI_EVT_GRP_START_ID(WMI_GRP_LOCATION_SCAN), |
| 1151 | /*batch scan result */ |
| 1152 | WMI_BATCH_SCAN_RESULT_EVENTID, |
| 1153 | /* OEM Event */ |
Krishna Kumaar Natarajan | 1dfa353 | 2015-11-19 16:16:20 -0800 | [diff] [blame] | 1154 | WMI_OEM_CAPABILITY_EVENTID = /* DEPRECATED */ |
| 1155 | WMI_EVT_GRP_START_ID(WMI_GRP_OEM), |
| 1156 | WMI_OEM_MEASUREMENT_REPORT_EVENTID, /* DEPRECATED */ |
| 1157 | WMI_OEM_ERROR_REPORT_EVENTID, /* DEPRECATED */ |
| 1158 | WMI_OEM_RESPONSE_EVENTID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1159 | |
| 1160 | /* NAN Event */ |
| 1161 | WMI_NAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NAN), |
| 1162 | |
| 1163 | /* LPI Event */ |
| 1164 | WMI_LPI_RESULT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_LPI), |
| 1165 | WMI_LPI_STATUS_EVENTID, |
| 1166 | WMI_LPI_HANDOFF_EVENTID, |
| 1167 | |
| 1168 | /* ExtScan events */ |
| 1169 | WMI_EXTSCAN_START_STOP_EVENTID = |
| 1170 | WMI_EVT_GRP_START_ID(WMI_GRP_EXTSCAN), |
| 1171 | WMI_EXTSCAN_OPERATION_EVENTID, |
| 1172 | WMI_EXTSCAN_TABLE_USAGE_EVENTID, |
| 1173 | WMI_EXTSCAN_CACHED_RESULTS_EVENTID, |
| 1174 | WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID, |
| 1175 | WMI_EXTSCAN_HOTLIST_MATCH_EVENTID, |
| 1176 | WMI_EXTSCAN_CAPABILITIES_EVENTID, |
| 1177 | WMI_EXTSCAN_HOTLIST_SSID_MATCH_EVENTID, |
| 1178 | |
| 1179 | /* mDNS offload events */ |
| 1180 | WMI_MDNS_STATS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MDNS_OFL), |
| 1181 | |
| 1182 | /* SAP Authentication offload events */ |
| 1183 | WMI_SAP_OFL_ADD_STA_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SAP_OFL), |
| 1184 | WMI_SAP_OFL_DEL_STA_EVENTID, |
| 1185 | |
| 1186 | /** Out-of-context-of-bss (OCB) events */ |
| 1187 | WMI_OCB_SET_CONFIG_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_OCB), |
| 1188 | WMI_OCB_GET_TSF_TIMER_RESP_EVENTID, |
| 1189 | WMI_DCC_GET_STATS_RESP_EVENTID, |
| 1190 | WMI_DCC_UPDATE_NDL_RESP_EVENTID, |
| 1191 | WMI_DCC_STATS_EVENTID, |
| 1192 | /* System-On-Chip events */ |
| 1193 | WMI_SOC_SET_HW_MODE_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SOC), |
| 1194 | WMI_SOC_HW_MODE_TRANSITION_EVENTID, |
| 1195 | WMI_SOC_SET_DUAL_MAC_CONFIG_RESP_EVENTID, |
| 1196 | /** Motion Aided WiFi Connectivity (MAWC) events */ |
| 1197 | WMI_MAWC_ENABLE_SENSOR_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MAWC), |
| 1198 | |
| 1199 | } WMI_EVT_ID; |
| 1200 | |
| 1201 | /* defines for OEM message sub-types */ |
| 1202 | #define WMI_OEM_CAPABILITY_REQ 0x01 |
| 1203 | #define WMI_OEM_CAPABILITY_RSP 0x02 |
| 1204 | #define WMI_OEM_MEASUREMENT_REQ 0x03 |
| 1205 | #define WMI_OEM_MEASUREMENT_RSP 0x04 |
| 1206 | #define WMI_OEM_ERROR_REPORT_RSP 0x05 |
| 1207 | #define WMI_OEM_NAN_MEAS_REQ 0x06 |
| 1208 | #define WMI_OEM_NAN_MEAS_RSP 0x07 |
| 1209 | #define WMI_OEM_NAN_PEER_INFO 0x08 |
| 1210 | #define WMI_OEM_CONFIGURE_LCR 0x09 |
| 1211 | #define WMI_OEM_CONFIGURE_LCI 0x0A |
| 1212 | |
| 1213 | /* below message subtype is internal to CLD. Target should |
| 1214 | * never use internal response type |
| 1215 | */ |
| 1216 | #define WMI_OEM_INTERNAL_RSP 0xdeadbeef |
| 1217 | |
| 1218 | #define WMI_CHAN_LIST_TAG 0x1 |
| 1219 | #define WMI_SSID_LIST_TAG 0x2 |
| 1220 | #define WMI_BSSID_LIST_TAG 0x3 |
| 1221 | #define WMI_IE_TAG 0x4 |
| 1222 | |
| 1223 | typedef struct { |
| 1224 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel */ |
| 1225 | /** primary 20 MHz channel frequency in mhz */ |
| 1226 | A_UINT32 mhz; |
| 1227 | /** Center frequency 1 in MHz*/ |
| 1228 | A_UINT32 band_center_freq1; |
| 1229 | /** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/ |
| 1230 | A_UINT32 band_center_freq2; |
| 1231 | /** channel info described below */ |
| 1232 | A_UINT32 info; |
| 1233 | /** contains min power, max power, reg power and reg class id. */ |
| 1234 | A_UINT32 reg_info_1; |
| 1235 | /** contains antennamax */ |
| 1236 | A_UINT32 reg_info_2; |
| 1237 | } wmi_channel; |
| 1238 | |
| 1239 | typedef enum { |
| 1240 | WMI_CHANNEL_CHANGE_CAUSE_NONE = 0, |
| 1241 | WMI_CHANNEL_CHANGE_CAUSE_CSA, |
| 1242 | } wmi_channel_change_cause; |
| 1243 | |
| 1244 | /** channel info consists of 6 bits of channel mode */ |
| 1245 | |
| 1246 | #define WMI_SET_CHANNEL_MODE(pwmi_channel,val) do { \ |
| 1247 | (pwmi_channel)->info &= 0xffffffc0; \ |
| 1248 | (pwmi_channel)->info |= (val); \ |
| 1249 | } while(0) |
| 1250 | |
| 1251 | #define WMI_GET_CHANNEL_MODE(pwmi_channel) ((pwmi_channel)->info & 0x0000003f ) |
| 1252 | |
| 1253 | #define WMI_CHAN_FLAG_HT40_PLUS 6 |
| 1254 | #define WMI_CHAN_FLAG_PASSIVE 7 |
| 1255 | #define WMI_CHAN_ADHOC_ALLOWED 8 |
| 1256 | #define WMI_CHAN_AP_DISABLED 9 |
| 1257 | #define WMI_CHAN_FLAG_DFS 10 |
| 1258 | #define WMI_CHAN_FLAG_ALLOW_HT 11 /* HT is allowed on this channel */ |
| 1259 | #define WMI_CHAN_FLAG_ALLOW_VHT 12 /* VHT is allowed on this channel */ |
| 1260 | #define WMI_CHANNEL_CHANGE_CAUSE_CSA 13 /*Indicate reason for channel switch */ |
| 1261 | #define WMI_CHAN_FLAG_HALF_RATE 14 /* Indicates half rate channel */ |
| 1262 | #define WMI_CHAN_FLAG_QUARTER_RATE 15 /* Indicates quarter rate channel */ |
| 1263 | |
| 1264 | #define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \ |
| 1265 | (pwmi_channel)->info |= (1 << flag); \ |
| 1266 | } while(0) |
| 1267 | |
| 1268 | #define WMI_GET_CHANNEL_FLAG(pwmi_channel,flag) \ |
| 1269 | (((pwmi_channel)->info & (1 << flag)) >> flag) |
| 1270 | |
| 1271 | #define WMI_SET_CHANNEL_MIN_POWER(pwmi_channel,val) do { \ |
| 1272 | (pwmi_channel)->reg_info_1 &= 0xffffff00; \ |
| 1273 | (pwmi_channel)->reg_info_1 |= (val&0xff); \ |
| 1274 | } while(0) |
| 1275 | #define WMI_GET_CHANNEL_MIN_POWER(pwmi_channel) ((pwmi_channel)->reg_info_1 & 0xff ) |
| 1276 | |
| 1277 | #define WMI_SET_CHANNEL_MAX_POWER(pwmi_channel,val) do { \ |
| 1278 | (pwmi_channel)->reg_info_1 &= 0xffff00ff; \ |
| 1279 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 8); \ |
| 1280 | } while(0) |
| 1281 | #define WMI_GET_CHANNEL_MAX_POWER(pwmi_channel) ( (((pwmi_channel)->reg_info_1) >> 8) & 0xff ) |
| 1282 | |
| 1283 | #define WMI_SET_CHANNEL_REG_POWER(pwmi_channel,val) do { \ |
| 1284 | (pwmi_channel)->reg_info_1 &= 0xff00ffff; \ |
| 1285 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 16); \ |
| 1286 | } while(0) |
| 1287 | #define WMI_GET_CHANNEL_REG_POWER(pwmi_channel) ( (((pwmi_channel)->reg_info_1) >> 16) & 0xff ) |
| 1288 | #define WMI_SET_CHANNEL_REG_CLASSID(pwmi_channel,val) do { \ |
| 1289 | (pwmi_channel)->reg_info_1 &= 0x00ffffff; \ |
| 1290 | (pwmi_channel)->reg_info_1 |= ((val&0xff) << 24); \ |
| 1291 | } while(0) |
| 1292 | #define WMI_GET_CHANNEL_REG_CLASSID(pwmi_channel) ( (((pwmi_channel)->reg_info_1) >> 24) & 0xff ) |
| 1293 | |
| 1294 | #define WMI_SET_CHANNEL_ANTENNA_MAX(pwmi_channel,val) do { \ |
| 1295 | (pwmi_channel)->reg_info_2 &= 0xffffff00; \ |
| 1296 | (pwmi_channel)->reg_info_2 |= (val&0xff); \ |
| 1297 | } while(0) |
| 1298 | #define WMI_GET_CHANNEL_ANTENNA_MAX(pwmi_channel) ((pwmi_channel)->reg_info_2 & 0xff ) |
| 1299 | |
| 1300 | /* max tx power is in 1 dBm units */ |
| 1301 | #define WMI_SET_CHANNEL_MAX_TX_POWER(pwmi_channel,val) do { \ |
| 1302 | (pwmi_channel)->reg_info_2 &= 0xffff00ff; \ |
| 1303 | (pwmi_channel)->reg_info_2 |= ((val&0xff)<<8); \ |
| 1304 | } while(0) |
| 1305 | #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ( (((pwmi_channel)->reg_info_2)>>8) & 0xff ) |
| 1306 | |
| 1307 | |
| 1308 | /** HT Capabilities*/ |
| 1309 | #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ |
| 1310 | #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */ |
| 1311 | #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */ |
| 1312 | #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */ |
| 1313 | #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3 |
| 1314 | #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */ |
| 1315 | #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4 |
| 1316 | #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */ |
| 1317 | #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */ |
| 1318 | #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
| 1319 | #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
| 1320 | #define WMI_HT_CAP_HT40_SGI 0x0800 |
| 1321 | |
| 1322 | /* These macros should be used when we wish to advertise STBC support for |
| 1323 | * only 1SS or 2SS or 3SS. */ |
| 1324 | #define WMI_HT_CAP_RX_STBC_1SS 0x0010 /* B4-B5 RX STBC */ |
| 1325 | #define WMI_HT_CAP_RX_STBC_2SS 0x0020 /* B4-B5 RX STBC */ |
| 1326 | #define WMI_HT_CAP_RX_STBC_3SS 0x0030 /* B4-B5 RX STBC */ |
| 1327 | |
| 1328 | #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ |
| 1329 | WMI_HT_CAP_HT20_SGI | \ |
| 1330 | WMI_HT_CAP_HT40_SGI | \ |
| 1331 | WMI_HT_CAP_TX_STBC | \ |
| 1332 | WMI_HT_CAP_RX_STBC | \ |
| 1333 | WMI_HT_CAP_LDPC) |
| 1334 | |
| 1335 | /* WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information |
| 1336 | field. The fields not defined here are not supported, or reserved. |
| 1337 | Do not change these masks and if you have to add new one follow the |
| 1338 | bitmask as specified by 802.11ac draft. |
| 1339 | */ |
| 1340 | |
| 1341 | #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001 |
| 1342 | #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002 |
| 1343 | #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003 |
| 1344 | #define WMI_VHT_CAP_CH_WIDTH_160MHZ 0x00000004 |
| 1345 | #define WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ 0x00000008 |
| 1346 | #define WMI_VHT_CAP_RX_LDPC 0x00000010 |
| 1347 | #define WMI_VHT_CAP_SGI_80MHZ 0x00000020 |
| 1348 | #define WMI_VHT_CAP_SGI_160MHZ 0x00000040 |
| 1349 | #define WMI_VHT_CAP_TX_STBC 0x00000080 |
| 1350 | #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300 |
| 1351 | #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8 |
| 1352 | #define WMI_VHT_CAP_SU_BFORMER 0x00000800 |
| 1353 | #define WMI_VHT_CAP_SU_BFORMEE 0x00001000 |
| 1354 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK 0x0000E000 |
| 1355 | #define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT 13 |
| 1356 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK 0x00070000 |
| 1357 | #define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT 16 |
| 1358 | #define WMI_VHT_CAP_MU_BFORMER 0x00080000 |
| 1359 | #define WMI_VHT_CAP_MU_BFORMEE 0x00100000 |
| 1360 | #define WMI_VHT_CAP_TXOP_PS 0x00200000 |
| 1361 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000 |
| 1362 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23 |
| 1363 | #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000 |
| 1364 | #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000 |
| 1365 | |
| 1366 | /* TEMPORARY: |
| 1367 | * Preserve the incorrect old name as an alias for the correct new name |
| 1368 | * until all references to the old name have been removed from all hosts |
| 1369 | * and targets. |
| 1370 | */ |
| 1371 | #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT |
| 1372 | |
| 1373 | /* These macros should be used when we wish to advertise STBC support for |
| 1374 | * only 1SS or 2SS or 3SS. */ |
| 1375 | #define WMI_VHT_CAP_RX_STBC_1SS 0x00000100 |
| 1376 | #define WMI_VHT_CAP_RX_STBC_2SS 0x00000200 |
| 1377 | #define WMI_VHT_CAP_RX_STBC_3SS 0x00000300 |
| 1378 | |
| 1379 | /* TEMPORARY: |
| 1380 | * Preserve the incorrect old name as an alias for the correct new name |
| 1381 | * until all references to the old name have been removed from all hosts |
| 1382 | * and targets. |
| 1383 | */ |
| 1384 | #define WMI_vHT_CAP_RX_STBC_3SS WMI_VHT_CAP_RX_STBC_3SS |
| 1385 | |
| 1386 | #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \ |
| 1387 | WMI_VHT_CAP_SGI_80MHZ | \ |
| 1388 | WMI_VHT_CAP_TX_STBC | \ |
| 1389 | WMI_VHT_CAP_RX_STBC_MASK | \ |
| 1390 | WMI_VHT_CAP_RX_LDPC | \ |
| 1391 | WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \ |
| 1392 | WMI_VHT_CAP_RX_FIXED_ANT | \ |
| 1393 | WMI_VHT_CAP_TX_FIXED_ANT) |
| 1394 | |
| 1395 | /* Interested readers refer to Rx/Tx MCS Map definition as defined in |
| 1396 | 802.11ac |
| 1397 | */ |
| 1398 | #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1)) |
| 1399 | #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 |
| 1400 | #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 |
| 1401 | |
| 1402 | /* WMI_SYS_CAPS_* refer to the capabilities that system support |
| 1403 | */ |
| 1404 | #define WMI_SYS_CAP_ENABLE 0x00000001 |
| 1405 | #define WMI_SYS_CAP_TXPOWER 0x00000002 |
| 1406 | |
| 1407 | /* |
| 1408 | * WMI Dual Band Simultaneous (DBS) hardware mode list bit-mask definitions. |
| 1409 | * Bits 5:0 are reserved |
| 1410 | */ |
| 1411 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS (28) |
| 1412 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS (24) |
| 1413 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS (20) |
| 1414 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS (16) |
| 1415 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS (12) |
| 1416 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS (8) |
| 1417 | #define WMI_DBS_HW_MODE_DBS_MODE_BITPOS (7) |
| 1418 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS (6) |
| 1419 | |
| 1420 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1421 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1422 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1423 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK (0xf << WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1424 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1425 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK (0xf << WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1426 | #define WMI_DBS_HW_MODE_DBS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1427 | #define WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK (0x1 << WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1428 | |
| 1429 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_SET(hw_mode, value) \ |
| 1430 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS, 4, value) |
| 1431 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_SET(hw_mode, value) \ |
| 1432 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS, 4, value) |
| 1433 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_SET(hw_mode, value) \ |
| 1434 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS, 4, value) |
| 1435 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_SET(hw_mode, value) \ |
| 1436 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS, 4, value) |
| 1437 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_SET(hw_mode, value) \ |
| 1438 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS, 4, value) |
| 1439 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_SET(hw_mode, value) \ |
| 1440 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS, 4, value) |
| 1441 | #define WMI_DBS_HW_MODE_DBS_MODE_SET(hw_mode, value) \ |
| 1442 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_DBS_MODE_BITPOS, 1, value) |
| 1443 | #define WMI_DBS_HW_MODE_AGILE_DFS_SET(hw_mode, value) \ |
| 1444 | WMI_SET_BITS(hw_mode, WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS, 1, value) |
| 1445 | |
| 1446 | #define WMI_DBS_HW_MODE_MAC0_TX_STREAMS_GET(hw_mode) \ |
| 1447 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_TX_STREAMS_BITPOS) |
| 1448 | #define WMI_DBS_HW_MODE_MAC0_RX_STREAMS_GET(hw_mode) \ |
| 1449 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC0_RX_STREAMS_BITPOS) |
| 1450 | #define WMI_DBS_HW_MODE_MAC1_TX_STREAMS_GET(hw_mode) \ |
| 1451 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_TX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_TX_STREAMS_BITPOS) |
| 1452 | #define WMI_DBS_HW_MODE_MAC1_RX_STREAMS_GET(hw_mode) \ |
| 1453 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_RX_STREAMS_MASK) >> WMI_DBS_HW_MODE_MAC1_RX_STREAMS_BITPOS) |
| 1454 | #define WMI_DBS_HW_MODE_MAC0_BANDWIDTH_GET(hw_mode) \ |
| 1455 | ((hw_mode & WMI_DBS_HW_MODE_MAC0_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC0_BANDWIDTH_BITPOS) |
| 1456 | #define WMI_DBS_HW_MODE_MAC1_BANDWIDTH_GET(hw_mode) \ |
| 1457 | ((hw_mode & WMI_DBS_HW_MODE_MAC1_BANDWIDTH_MASK) >> WMI_DBS_HW_MODE_MAC1_BANDWIDTH_BITPOS) |
| 1458 | #define WMI_DBS_HW_MODE_DBS_MODE_GET(hw_mode) \ |
| 1459 | ((hw_mode & WMI_DBS_HW_MODE_DBS_MODE_MASK) >> WMI_DBS_HW_MODE_DBS_MODE_BITPOS) |
| 1460 | #define WMI_DBS_HW_MODE_AGILE_DFS_GET(hw_mode) \ |
| 1461 | ((hw_mode & WMI_DBS_HW_MODE_AGILE_DFS_MODE_MASK) >> WMI_DBS_HW_MODE_AGILE_DFS_MODE_BITPOS) |
| 1462 | |
| 1463 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS (31) |
| 1464 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS (30) |
| 1465 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS (29) |
| 1466 | |
| 1467 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1468 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1469 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK (0x1 << WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1470 | |
| 1471 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_SET(scan_cfg, value) \ |
| 1472 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS, 1, value) |
| 1473 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_SET(scan_cfg, value) \ |
| 1474 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS, 1, value) |
| 1475 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_SET(scan_cfg, value) \ |
| 1476 | WMI_SET_BITS(scan_cfg, WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS, 1, value) |
| 1477 | |
| 1478 | #define WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_GET(scan_cfg) \ |
| 1479 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_DBS_SCAN_BITPOS) |
| 1480 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_GET(scan_cfg) \ |
| 1481 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_SCAN_BITPOS) |
| 1482 | #define WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_GET(scan_cfg) \ |
| 1483 | ((scan_cfg & WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_MASK) >> WMI_DBS_CONC_SCAN_CFG_AGILE_DFS_SCAN_BITPOS) |
| 1484 | |
| 1485 | #define WMI_DBS_FW_MODE_CFG_DBS_BITPOS (31) |
| 1486 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS (30) |
| 1487 | |
| 1488 | #define WMI_DBS_FW_MODE_CFG_DBS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1489 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK (0x1 << WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1490 | |
| 1491 | #define WMI_DBS_FW_MODE_CFG_DBS_SET(fw_mode, value) \ |
| 1492 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_DBS_BITPOS, 1, value) |
| 1493 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_SET(fw_mode, value) \ |
| 1494 | WMI_SET_BITS(fw_mode, WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS, 1, value) |
| 1495 | |
| 1496 | #define WMI_DBS_FW_MODE_CFG_DBS_GET(fw_mode) \ |
| 1497 | ((fw_mode & WMI_DBS_FW_MODE_CFG_DBS_MASK) >> WMI_DBS_FW_MODE_CFG_DBS_BITPOS) |
| 1498 | #define WMI_DBS_FW_MODE_CFG_AGILE_DFS_GET(fw_mode) \ |
| 1499 | ((fw_mode & WMI_DBS_FW_MODE_CFG_AGILE_DFS_MASK) >> WMI_DBS_FW_MODE_CFG_AGILE_DFS_BITPOS) |
| 1500 | |
| 1501 | /** NOTE: This structure cannot be extended in the future without breaking WMI compatibility */ |
| 1502 | typedef struct _wmi_abi_version { |
| 1503 | A_UINT32 abi_version_0; |
| 1504 | /** WMI Major and Minor versions */ |
| 1505 | A_UINT32 abi_version_1; |
| 1506 | /** WMI change revision */ |
| 1507 | A_UINT32 abi_version_ns_0; |
| 1508 | /** ABI version namespace first four dwords */ |
| 1509 | A_UINT32 abi_version_ns_1; |
| 1510 | /** ABI version namespace second four dwords */ |
| 1511 | A_UINT32 abi_version_ns_2; |
| 1512 | /** ABI version namespace third four dwords */ |
| 1513 | A_UINT32 abi_version_ns_3; |
| 1514 | /** ABI version namespace fourth four dwords */ |
| 1515 | } wmi_abi_version; |
| 1516 | |
| 1517 | /* |
| 1518 | * maximum number of memroy requests allowed from FW. |
| 1519 | */ |
| 1520 | #define WMI_MAX_MEM_REQS 16 |
| 1521 | |
| 1522 | /* !!NOTE!!: |
| 1523 | * This HW_BD_INFO_SIZE cannot be changed without breaking compatibility. |
| 1524 | * Please don't change it. |
| 1525 | */ |
| 1526 | #define HW_BD_INFO_SIZE 5 |
| 1527 | |
| 1528 | /** |
| 1529 | * The following struct holds optional payload for |
| 1530 | * wmi_service_ready_event_fixed_param,e.g., 11ac pass some of the |
| 1531 | * device capability to the host. |
| 1532 | */ |
| 1533 | typedef struct { |
| 1534 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SERVICE_READY_EVENT */ |
| 1535 | A_UINT32 fw_build_vers; /* firmware build number */ |
| 1536 | wmi_abi_version fw_abi_vers; |
| 1537 | A_UINT32 phy_capability; /* WMI_PHY_CAPABILITY */ |
| 1538 | A_UINT32 max_frag_entry; /* Maximum number of frag table entries that SW will populate less 1 */ |
| 1539 | A_UINT32 num_rf_chains; |
| 1540 | /* The following field is only valid for service type WMI_SERVICE_11AC */ |
| 1541 | A_UINT32 ht_cap_info; /* WMI HT Capability */ |
| 1542 | A_UINT32 vht_cap_info; /* VHT capability info field of 802.11ac */ |
| 1543 | A_UINT32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */ |
| 1544 | A_UINT32 hw_min_tx_power; |
| 1545 | A_UINT32 hw_max_tx_power; |
| 1546 | A_UINT32 sys_cap_info; |
| 1547 | A_UINT32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ |
| 1548 | /** Max beacon and Probe Response IE offload size (includes |
| 1549 | * optional P2P IEs) */ |
| 1550 | A_UINT32 max_bcn_ie_size; |
| 1551 | /* |
| 1552 | * request to host to allocate a chuck of memory and pss it down to FW via WM_INIT. |
| 1553 | * FW uses this as FW extesnsion memory for saving its data structures. Only valid |
| 1554 | * for low latency interfaces like PCIE where FW can access this memory directly (or) |
| 1555 | * by DMA. |
| 1556 | */ |
| 1557 | A_UINT32 num_mem_reqs; |
| 1558 | /* Max No. scan channels target can support |
| 1559 | * If FW is too old and doesn't indicate this number, host side value will default to |
| 1560 | * 0, and host will take the original compatible value (62) for future scan channel |
| 1561 | * setup. |
| 1562 | */ |
| 1563 | A_UINT32 max_num_scan_channels; |
| 1564 | |
| 1565 | /* Hardware board specific ID. Values defined in enum WMI_HWBOARD_ID. |
| 1566 | * Default 0 means tha hw_bd_info[] is invalid(legacy board). |
| 1567 | */ |
| 1568 | A_UINT32 hw_bd_id; |
| 1569 | A_UINT32 hw_bd_info[HW_BD_INFO_SIZE]; /* Board specific information. Invalid if hw_hd_id is zero. */ |
| 1570 | |
| 1571 | /* |
| 1572 | * Number of MACs supported, i.e. a DBS-capable device will return 2 |
| 1573 | */ |
| 1574 | A_UINT32 max_supported_macs; |
| 1575 | |
| 1576 | /* |
| 1577 | * FW sub-feature capabilities to be used in concurrence with |
| 1578 | * wmi_service_bitmap |
| 1579 | * values from enum WMI_FW_SUB_FEAT_CAPS |
| 1580 | */ |
| 1581 | A_UINT32 wmi_fw_sub_feat_caps; |
| 1582 | /* |
| 1583 | * Number of Dual Band Simultaneous (DBS) hardware modes |
| 1584 | */ |
| 1585 | A_UINT32 num_dbs_hw_modes; |
| 1586 | /* |
| 1587 | * txrx_chainmask |
| 1588 | * [7:0] - 2G band tx chain mask |
| 1589 | * [15:8] - 2G band rx chain mask |
| 1590 | * [23:16] - 5G band tx chain mask |
| 1591 | * [31:24] - 5G band rx chain mask |
| 1592 | * |
| 1593 | */ |
| 1594 | A_UINT32 txrx_chainmask; |
| 1595 | |
| 1596 | /* |
| 1597 | * default Dual Band Simultaneous (DBS) hardware mode |
| 1598 | */ |
| 1599 | A_UINT32 default_dbs_hw_mode_index; |
| 1600 | |
| 1601 | /* |
| 1602 | * Number of msdu descriptors target would use |
| 1603 | */ |
| 1604 | A_UINT32 num_msdu_desc; |
| 1605 | |
| 1606 | /* The TLVs for hal_reg_capabilities, wmi_service_bitmap and mem_reqs[] will follow this TLV. |
| 1607 | * HAL_REG_CAPABILITIES hal_reg_capabilities; |
| 1608 | * A_UINT32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE]; |
| 1609 | * wlan_host_mem_req mem_reqs[]; |
| 1610 | * wlan_dbs_hw_mode_list[]; |
| 1611 | */ |
| 1612 | } wmi_service_ready_event_fixed_param; |
| 1613 | |
| 1614 | typedef struct { |
| 1615 | /* TLV tag and len; tag equals |
| 1616 | *WMITLV_TAG_STRUC_WMI_SERVICE_EXT_READY_EVENT |
| 1617 | */ |
| 1618 | A_UINT32 tlv_header; |
| 1619 | /* which WMI_DBS_CONC_SCAN_CFG setting the FW is initialized with */ |
| 1620 | A_UINT32 default_conc_scan_config_bits; |
| 1621 | /* which WMI_DBS_FW_MODE_CFG setting the FW is initialized with */ |
| 1622 | A_UINT32 default_fw_config_bits; |
| 1623 | } wmi_service_ready_ext_event_fixed_param; |
| 1624 | |
| 1625 | typedef enum { |
| 1626 | WMI_HWBD_NONE = 0, /* No hw board information is given */ |
| 1627 | WMI_HWBD_QCA6174 = 1, /* Rome(AR6320) */ |
| 1628 | WMI_HWBD_QCA2582 = 2, /* Killer 1525 */ |
| 1629 | } WMI_HWBD_ID; |
| 1630 | |
| 1631 | typedef enum { |
| 1632 | WMI_FW_STA_RTT_INITR = 0x00000001, |
| 1633 | WMI_FW_STA_RTT_RESPR = 0x00000002, |
| 1634 | WMI_FW_P2P_CLI_RTT_INITR = 0x00000004, |
| 1635 | WMI_FW_P2P_CLI_RTT_RESPR = 0x00000008, |
| 1636 | WMI_FW_P2P_GO_RTT_INITR = 0x00000010, |
| 1637 | WMI_FW_P2P_GO_RTT_RESPR = 0x00000020, |
| 1638 | WMI_FW_AP_RTT_INITR = 0x00000040, |
| 1639 | WMI_FW_AP_RTT_RESPR = 0x00000080, |
| 1640 | WMI_FW_NAN_RTT_INITR = 0x00000100, |
| 1641 | WMI_FW_NAN_RTT_RESPR = 0x00000200, |
| 1642 | /* |
| 1643 | * New fw sub feature capabilites before |
| 1644 | * WMI_FW_MAX_SUB_FEAT_CAP |
| 1645 | */ |
| 1646 | WMI_FW_MAX_SUB_FEAT_CAP = 0x80000000, |
| 1647 | } WMI_FW_SUB_FEAT_CAPS; |
| 1648 | |
| 1649 | #define ATH_BD_DATA_REV_MASK 0x000000FF |
| 1650 | #define ATH_BD_DATA_REV_SHIFT 0 |
| 1651 | |
| 1652 | #define ATH_BD_DATA_PROJ_ID_MASK 0x0000FF00 |
| 1653 | #define ATH_BD_DATA_PROJ_ID_SHIFT 8 |
| 1654 | |
| 1655 | #define ATH_BD_DATA_CUST_ID_MASK 0x00FF0000 |
| 1656 | #define ATH_BD_DATA_CUST_ID_SHIFT 16 |
| 1657 | |
| 1658 | #define ATH_BD_DATA_REF_DESIGN_ID_MASK 0xFF000000 |
| 1659 | #define ATH_BD_DATA_REF_DESIGN_ID_SHIFT 24 |
| 1660 | |
| 1661 | #define SET_BD_DATA_REV(bd_data_ver, value) \ |
| 1662 | ((bd_data_ver) &= ~ATH_BD_DATA_REV_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REV_SHIFT)) |
| 1663 | |
| 1664 | #define GET_BD_DATA_REV(bd_data_ver) \ |
| 1665 | (((bd_data_ver) & ATH_BD_DATA_REV_MASK) >> ATH_BD_DATA_REV_SHIFT) |
| 1666 | |
| 1667 | #define SET_BD_DATA_PROJ_ID(bd_data_ver, value) \ |
| 1668 | ((bd_data_ver) &= ~ATH_BD_DATA_PROJ_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_PROJ_ID_SHIFT)) |
| 1669 | |
| 1670 | #define GET_BD_DATA_PROJ_ID(bd_data_ver) \ |
| 1671 | (((bd_data_ver) & ATH_BD_DATA_PROJ_ID_MASK) >> ATH_BD_DATA_PROJ_ID_SHIFT) |
| 1672 | |
| 1673 | #define SET_BD_DATA_CUST_ID(bd_data_ver, value) \ |
| 1674 | ((bd_data_ver) &= ~ATH_BD_DATA_CUST_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_CUST_ID_SHIFT)) |
| 1675 | |
| 1676 | #define GET_BD_DATA_CUST_ID(bd_data_ver) \ |
| 1677 | (((bd_data_ver) & ATH_BD_DATA_CUST_ID_MASK) >> ATH_BD_DATA_CUST_ID_SHIFT) |
| 1678 | |
| 1679 | #define SET_BD_DATA_REF_DESIGN_ID(bd_data_ver, value) \ |
| 1680 | ((bd_data_ver) &= ~ATH_BD_DATA_REF_DESIGN_ID_MASK, (bd_data_ver) |= ((value) << ATH_BD_DATA_REF_DESIGN_ID_SHIFT)) |
| 1681 | |
| 1682 | #define GET_BD_DATA_REF_DESIGN_ID(bd_data_ver) \ |
| 1683 | (((bd_data_ver) & ATH_BD_DATA_REF_DESIGN_ID_MASK) >> ATH_BD_DATA_REF_DESIGN_ID_SHIFT) |
| 1684 | |
| 1685 | #ifdef ROME_LTE_COEX_FREQ_AVOID |
| 1686 | typedef struct { |
| 1687 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 1688 | A_UINT32 end_freq; /* end frequency */ |
| 1689 | } avoid_freq_range_desc; |
| 1690 | |
| 1691 | typedef struct { |
| 1692 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 1693 | A_UINT32 num_freq_ranges; |
| 1694 | /* multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc */ |
| 1695 | avoid_freq_range_desc avd_freq_range[0]; |
| 1696 | } wmi_wlan_avoid_freq_ranges_event; |
| 1697 | #endif |
| 1698 | |
| 1699 | /** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */ |
| 1700 | #define WLAN_INIT_STATUS_SUCCESS 0x0 |
| 1701 | #define WLAN_INIT_STATUS_GEN_FAILED 0x1 |
| 1702 | #define WLAN_GET_INIT_STATUS_REASON(status) ((status) & 0xffff) |
| 1703 | #define WLAN_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff) |
| 1704 | |
| 1705 | typedef A_UINT32 WLAN_INIT_STATUS; |
| 1706 | |
| 1707 | typedef struct { |
| 1708 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ready_event_fixed_param */ |
| 1709 | wmi_abi_version fw_abi_vers; |
| 1710 | wmi_mac_addr mac_addr; |
| 1711 | A_UINT32 status; |
| 1712 | } wmi_ready_event_fixed_param; |
| 1713 | |
| 1714 | typedef struct { |
| 1715 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resource_config */ |
| 1716 | /** |
| 1717 | * @brief num_vdev - number of virtual devices (VAPs) to support |
| 1718 | */ |
| 1719 | A_UINT32 num_vdevs; |
| 1720 | /** |
| 1721 | * @brief num_peers - number of peer nodes to support |
| 1722 | */ |
| 1723 | A_UINT32 num_peers; |
| 1724 | /* |
| 1725 | * @brief In offload mode target supports features like WOW, chatter and other |
| 1726 | * protocol offloads. In order to support them some functionalities like |
| 1727 | * reorder buffering, PN checking need to be done in target. This determines |
| 1728 | * maximum number of peers suported by target in offload mode |
| 1729 | */ |
| 1730 | A_UINT32 num_offload_peers; |
| 1731 | /* @brief Number of reorder buffers available for doing target based reorder |
| 1732 | * Rx reorder buffering |
| 1733 | */ |
| 1734 | A_UINT32 num_offload_reorder_buffs; |
| 1735 | /** |
| 1736 | * @brief num_peer_keys - number of keys per peer |
| 1737 | */ |
| 1738 | A_UINT32 num_peer_keys; |
| 1739 | /** |
| 1740 | * @brief num_peer_tids - number of TIDs to provide storage for per peer. |
| 1741 | */ |
| 1742 | A_UINT32 num_tids; |
| 1743 | /** |
| 1744 | * @brief ast_skid_limit - max skid for resolving hash collisions |
| 1745 | * @details |
| 1746 | * The address search table is sparse, so that if two MAC addresses |
| 1747 | * result in the same hash value, the second of these conflicting |
| 1748 | * entries can slide to the next index in the address search table, |
| 1749 | * and use it, if it is unoccupied. This ast_skid_limit parameter |
| 1750 | * specifies the upper bound on how many subsequent indices to search |
| 1751 | * over to find an unoccupied space. |
| 1752 | */ |
| 1753 | A_UINT32 ast_skid_limit; |
| 1754 | /** |
| 1755 | * @brief tx_chain_mask - the nominal chain mask for transmit |
| 1756 | * @details |
| 1757 | * The chain mask may be modified dynamically, e.g. to operate AP tx with |
| 1758 | * a reduced number of chains if no clients are associated. |
| 1759 | * This configuration parameter specifies the nominal chain-mask that |
| 1760 | * should be used when not operating with a reduced set of tx chains. |
| 1761 | */ |
| 1762 | A_UINT32 tx_chain_mask; |
| 1763 | /** |
| 1764 | * @brief rx_chain_mask - the nominal chain mask for receive |
| 1765 | * @details |
| 1766 | * The chain mask may be modified dynamically, e.g. for a client to use |
| 1767 | * a reduced number of chains for receive if the traffic to the client |
| 1768 | * is low enough that it doesn't require downlink MIMO or antenna |
| 1769 | * diversity. |
| 1770 | * This configuration parameter specifies the nominal chain-mask that |
| 1771 | * should be used when not operating with a reduced set of rx chains. |
| 1772 | */ |
| 1773 | A_UINT32 rx_chain_mask; |
| 1774 | /** |
| 1775 | * @brief rx_timeout_pri - what rx reorder timeout (ms) to use for the AC |
| 1776 | * @details |
| 1777 | * Each WMM access class (voice, video, best-effort, background) will |
| 1778 | * have its own timeout value to dictate how long to wait for missing |
| 1779 | * rx MPDUs to arrive before flushing subsequent MPDUs that have already |
| 1780 | * been received. |
| 1781 | * This parameter specifies the timeout in milliseconds for each class . |
| 1782 | * NOTE: the number of class (defined as 4) cannot be |
| 1783 | * changed in the future without breaking WMI compatibility. |
| 1784 | */ |
| 1785 | A_UINT32 rx_timeout_pri[4]; |
| 1786 | /** |
| 1787 | * @brief rx_decap mode - what mode the rx should decap packets to |
| 1788 | * @details |
| 1789 | * MAC can decap to RAW (no decap), native wifi or Ethernet types |
| 1790 | * THis setting also determines the default TX behavior, however TX |
| 1791 | * behavior can be modified on a per VAP basis during VAP init |
| 1792 | */ |
| 1793 | A_UINT32 rx_decap_mode; |
| 1794 | /** |
| 1795 | * @brief scan_max_pending_req - what is the maximum scan requests than can be queued |
| 1796 | */ |
| 1797 | A_UINT32 scan_max_pending_req; |
| 1798 | |
| 1799 | /** |
| 1800 | * @brief maximum VDEV that could use BMISS offload |
| 1801 | */ |
| 1802 | A_UINT32 bmiss_offload_max_vdev; |
| 1803 | |
| 1804 | /** |
| 1805 | * @brief maximum VDEV that could use offload roaming |
| 1806 | */ |
| 1807 | A_UINT32 roam_offload_max_vdev; |
| 1808 | |
| 1809 | /** |
| 1810 | * @brief maximum AP profiles that would push to offload roaming |
| 1811 | */ |
| 1812 | A_UINT32 roam_offload_max_ap_profiles; |
| 1813 | |
| 1814 | /** |
| 1815 | * @brief num_mcast_groups - how many groups to use for mcast->ucast conversion |
| 1816 | * @details |
| 1817 | * The target's WAL maintains a table to hold information regarding which |
| 1818 | * peers belong to a given multicast group, so that if multicast->unicast |
| 1819 | * conversion is enabled, the target can convert multicast tx frames to a |
| 1820 | * series of unicast tx frames, to each peer within the multicast group. |
| 1821 | * This num_mcast_groups configuration parameter tells the target how |
| 1822 | * many multicast groups to provide storage for within its multicast |
| 1823 | * group membership table. |
| 1824 | */ |
| 1825 | A_UINT32 num_mcast_groups; |
| 1826 | |
| 1827 | /** |
| 1828 | * @brief num_mcast_table_elems - size to alloc for the mcast membership table |
| 1829 | * @details |
| 1830 | * This num_mcast_table_elems configuration parameter tells the target |
| 1831 | * how many peer elements it needs to provide storage for in its |
| 1832 | * multicast group membership table. |
| 1833 | * These multicast group membership table elements are shared by the |
| 1834 | * multicast groups stored within the table. |
| 1835 | */ |
| 1836 | A_UINT32 num_mcast_table_elems; |
| 1837 | |
| 1838 | /** |
| 1839 | * @brief mcast2ucast_mode - whether/how to do multicast->unicast conversion |
| 1840 | * @details |
| 1841 | * This configuration parameter specifies whether the target should |
| 1842 | * perform multicast --> unicast conversion on transmit, and if so, |
| 1843 | * what to do if it finds no entries in its multicast group membership |
| 1844 | * table for the multicast IP address in the tx frame. |
| 1845 | * Configuration value: |
| 1846 | * 0 -> Do not perform multicast to unicast conversion. |
| 1847 | * 1 -> Convert multicast frames to unicast, if the IP multicast address |
| 1848 | * from the tx frame is found in the multicast group membership |
| 1849 | * table. If the IP multicast address is not found, drop the frame. |
| 1850 | * 2 -> Convert multicast frames to unicast, if the IP multicast address |
| 1851 | * from the tx frame is found in the multicast group membership |
| 1852 | * table. If the IP multicast address is not found, transmit the |
| 1853 | * frame as multicast. |
| 1854 | */ |
| 1855 | A_UINT32 mcast2ucast_mode; |
| 1856 | |
| 1857 | /** |
| 1858 | * @brief tx_dbg_log_size - how much memory to allocate for a tx PPDU dbg log |
| 1859 | * @details |
| 1860 | * This parameter controls how much memory the target will allocate to |
| 1861 | * store a log of tx PPDU meta-information (how large the PPDU was, |
| 1862 | * when it was sent, whether it was successful, etc.) |
| 1863 | */ |
| 1864 | A_UINT32 tx_dbg_log_size; |
| 1865 | |
| 1866 | /** |
| 1867 | * @brief num_wds_entries - how many AST entries to be allocated for WDS |
| 1868 | */ |
| 1869 | A_UINT32 num_wds_entries; |
| 1870 | |
| 1871 | /** |
| 1872 | * @brief dma_burst_size - MAC DMA burst size, e.g., on Peregrine on PCI |
| 1873 | * this limit can be 0 -default, 1 256B |
| 1874 | */ |
| 1875 | A_UINT32 dma_burst_size; |
| 1876 | |
| 1877 | /** |
| 1878 | * @brief mac_aggr_delim - Fixed delimiters to be inserted after every MPDU |
| 1879 | * to account for interface latency to avoid underrun. |
| 1880 | */ |
| 1881 | A_UINT32 mac_aggr_delim; |
| 1882 | /** |
| 1883 | * @brief rx_skip_defrag_timeout_dup_detection_check |
| 1884 | * @details |
| 1885 | * determine whether target is responsible for detecting duplicate |
| 1886 | * non-aggregate MPDU and timing out stale fragments. |
| 1887 | * |
| 1888 | * A-MPDU reordering is always performed on the target. |
| 1889 | * |
| 1890 | * 0: target responsible for frag timeout and dup checking |
| 1891 | * 1: host responsible for frag timeout and dup checking |
| 1892 | */ |
| 1893 | A_UINT32 rx_skip_defrag_timeout_dup_detection_check; |
| 1894 | |
| 1895 | /** |
| 1896 | * @brief vow_config - Configuration for VoW : No of Video Nodes to be supported |
| 1897 | * and Max no of descriptors for each Video link (node). |
| 1898 | */ |
| 1899 | A_UINT32 vow_config; |
| 1900 | |
| 1901 | /** |
| 1902 | * @brief maximum VDEV that could use GTK offload |
| 1903 | */ |
| 1904 | A_UINT32 gtk_offload_max_vdev; |
| 1905 | |
| 1906 | /** |
| 1907 | * @brief num_msdu_desc - Number of msdu descriptors target should use |
| 1908 | */ |
| 1909 | A_UINT32 num_msdu_desc; /* Number of msdu desc */ |
| 1910 | /** |
| 1911 | * @brief max_frag_entry - Max. number of Tx fragments per MSDU |
| 1912 | * @details |
| 1913 | * This parameter controls the max number of Tx fragments per MSDU. |
| 1914 | * This is sent by the target as part of the WMI_SERVICE_READY event |
| 1915 | * and is overriden by the OS shim as required. |
| 1916 | */ |
| 1917 | A_UINT32 max_frag_entries; |
| 1918 | |
| 1919 | /** |
| 1920 | * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS |
| 1921 | * @brief num_msdu_desc - Number of vdev that can support beacon offload |
| 1922 | */ |
| 1923 | |
| 1924 | A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */ |
| 1925 | |
| 1926 | /** |
| 1927 | * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev |
| 1928 | * @details |
| 1929 | * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of |
| 1930 | * peers in a connection tracking table for possible TDLS link creation |
| 1931 | * or deletion. This controls the number of tracked peers per vdev. |
| 1932 | */ |
| 1933 | A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */ |
| 1934 | A_UINT32 beacon_tx_offload_max_vdev; |
| 1935 | A_UINT32 num_multicast_filter_entries; |
| 1936 | A_UINT32 num_wow_filters; /*host can configure the number of wow filters */ |
| 1937 | |
| 1938 | /** |
| 1939 | * @brief num_keep_alive_pattern - Num of keep alive patterns configured |
| 1940 | * from host. |
| 1941 | */ |
| 1942 | A_UINT32 num_keep_alive_pattern; |
| 1943 | /** |
| 1944 | * @brief keep_alive_pattern_size - keep alive pattern size. |
| 1945 | */ |
| 1946 | A_UINT32 keep_alive_pattern_size; |
| 1947 | |
| 1948 | /** |
| 1949 | * @brief max_tdls_concurrent_sleep_sta - Number of tdls sleep sta supported |
| 1950 | * @details |
| 1951 | * Each TDLS STA can become a sleep STA independently. This parameter |
| 1952 | * mentions how many such sleep STAs can be supported concurrently. |
| 1953 | */ |
| 1954 | A_UINT32 max_tdls_concurrent_sleep_sta; |
| 1955 | |
| 1956 | /** |
| 1957 | * @brief max_tdls_concurrent_buffer_sta - Number of tdls buffer sta supported |
| 1958 | * @details |
| 1959 | * Each TDLS STA can become a buffer STA independently. This parameter |
| 1960 | * mentions how many such buffer STAs can be supported concurrently. |
| 1961 | */ |
| 1962 | A_UINT32 max_tdls_concurrent_buffer_sta; |
| 1963 | |
| 1964 | /** |
| 1965 | * @brief wmi_send_separate - host configures fw to send the wmi separately |
| 1966 | */ |
| 1967 | A_UINT32 wmi_send_separate; |
| 1968 | |
| 1969 | /** |
| 1970 | * @brief num_ocb_vdevs - Number of vdevs used for OCB support |
| 1971 | */ |
| 1972 | A_UINT32 num_ocb_vdevs; |
| 1973 | |
| 1974 | /** |
| 1975 | * @brief num_ocb_channels - The supported number of simultaneous OCB channels |
| 1976 | */ |
| 1977 | A_UINT32 num_ocb_channels; |
| 1978 | |
| 1979 | /** |
| 1980 | * @brief num_ocb_schedules - The supported number of OCB schedule segments |
| 1981 | */ |
| 1982 | A_UINT32 num_ocb_schedules; |
| 1983 | } wmi_resource_config; |
| 1984 | |
| 1985 | typedef struct { |
| 1986 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ |
| 1987 | |
| 1988 | /** The following indicate the WMI versions to be supported by |
| 1989 | * the host driver. Note that the host driver decide to |
| 1990 | * "downgrade" its WMI version support and this may not be the |
| 1991 | * native version of the host driver. */ |
| 1992 | wmi_abi_version host_abi_vers; |
| 1993 | |
| 1994 | A_UINT32 num_host_mem_chunks; |
| 1995 | /** size of array host_mem_chunks[] */ |
| 1996 | /* The TLVs for resource_config and host_mem_chunks[] will follow. |
| 1997 | * wmi_resource_config resource_config; |
| 1998 | * wlan_host_memory_chunk host_mem_chunks[]; |
| 1999 | */ |
| 2000 | |
| 2001 | } wmi_init_cmd_fixed_param; |
| 2002 | |
| 2003 | /** |
| 2004 | * TLV for channel list |
| 2005 | */ |
| 2006 | typedef struct { |
| 2007 | /** WMI_CHAN_LIST_TAG */ |
| 2008 | A_UINT32 tag; |
| 2009 | /** # of channels to scan */ |
| 2010 | A_UINT32 num_chan; |
| 2011 | /** channels in Mhz */ |
| 2012 | A_UINT32 channel_list[1]; |
| 2013 | } wmi_chan_list; |
| 2014 | |
| 2015 | /** |
| 2016 | * TLV for bssid list |
| 2017 | */ |
| 2018 | typedef struct { |
| 2019 | /** WMI_BSSID_LIST_TAG */ |
| 2020 | A_UINT32 tag; |
| 2021 | /** number of bssids */ |
| 2022 | A_UINT32 num_bssid; |
| 2023 | /** bssid list */ |
| 2024 | wmi_mac_addr bssid_list[1]; |
| 2025 | } wmi_bssid_list; |
| 2026 | |
| 2027 | /** |
| 2028 | * TLV for ie data. |
| 2029 | */ |
| 2030 | typedef struct { |
| 2031 | /** WMI_IE_TAG */ |
| 2032 | A_UINT32 tag; |
| 2033 | /** number of bytes in ie data */ |
| 2034 | A_UINT32 ie_len; |
| 2035 | /** ie data array (ie_len adjusted to number of words (ie_len + 4)/4 ) */ |
| 2036 | A_UINT32 ie_data[1]; |
| 2037 | } wmi_ie_data; |
| 2038 | |
| 2039 | typedef struct { |
| 2040 | /** Len of the SSID */ |
| 2041 | A_UINT32 ssid_len; |
| 2042 | /** SSID */ |
| 2043 | A_UINT32 ssid[8]; |
| 2044 | } wmi_ssid; |
| 2045 | |
| 2046 | typedef struct { |
| 2047 | /** WMI_SSID_LIST_TAG */ |
| 2048 | A_UINT32 tag; |
| 2049 | A_UINT32 num_ssids; |
| 2050 | wmi_ssid ssids[1]; |
| 2051 | } wmi_ssid_list; |
| 2052 | |
| 2053 | /* prefix used by scan requestor ids on the host */ |
| 2054 | #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000 |
| 2055 | /* prefix used by scan request ids generated on the host */ |
| 2056 | /* host cycles through the lower 12 bits to generate ids */ |
| 2057 | #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000 |
| 2058 | |
| 2059 | #define WLAN_SCAN_PARAMS_MAX_SSID 16 |
| 2060 | #define WLAN_SCAN_PARAMS_MAX_BSSID 4 |
| 2061 | #define WLAN_SCAN_PARAMS_MAX_IE_LEN 512 |
| 2062 | |
| 2063 | typedef struct { |
| 2064 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 2065 | /** Scan ID */ |
| 2066 | A_UINT32 scan_id; |
| 2067 | /** Scan requestor ID */ |
| 2068 | A_UINT32 scan_req_id; |
| 2069 | /** VDEV id(interface) that is requesting scan */ |
| 2070 | A_UINT32 vdev_id; |
| 2071 | /** Scan Priority, input to scan scheduler */ |
| 2072 | A_UINT32 scan_priority; |
| 2073 | /** Scan events subscription */ |
| 2074 | A_UINT32 notify_scan_events; |
| 2075 | /** dwell time in msec on active channels */ |
| 2076 | A_UINT32 dwell_time_active; |
| 2077 | /** dwell time in msec on passive channels */ |
| 2078 | A_UINT32 dwell_time_passive; |
| 2079 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 2080 | A_UINT32 min_rest_time; |
| 2081 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 2082 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 2083 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 2084 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 2085 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 2086 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 2087 | */ |
| 2088 | A_UINT32 max_rest_time; |
| 2089 | /** time before sending next set of probe requests. |
| 2090 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 2091 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 2092 | */ |
| 2093 | A_UINT32 repeat_probe_time; |
| 2094 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 2095 | A_UINT32 probe_spacing_time; |
| 2096 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 2097 | A_UINT32 idle_time; |
| 2098 | /** maximum time in msec allowed for scan */ |
| 2099 | A_UINT32 max_scan_time; |
| 2100 | /** delay in msec before sending first probe request after switching to a channel */ |
| 2101 | A_UINT32 probe_delay; |
| 2102 | /** Scan control flags */ |
| 2103 | A_UINT32 scan_ctrl_flags; |
| 2104 | /** Burst duration time in msec*/ |
| 2105 | A_UINT32 burst_duration; |
| 2106 | |
| 2107 | /** # if channels to scan. In the TLV channel_list[] */ |
| 2108 | A_UINT32 num_chan; |
| 2109 | /** number of bssids. In the TLV bssid_list[] */ |
| 2110 | A_UINT32 num_bssid; |
| 2111 | /** number of ssid. In the TLV ssid_list[] */ |
| 2112 | A_UINT32 num_ssids; |
| 2113 | /** number of bytes in ie data. In the TLV ie_data[]. Max len is defined by WLAN_SCAN_PARAMS_MAX_IE_LEN */ |
| 2114 | A_UINT32 ie_len; |
| 2115 | /** Max number of probes to be sent */ |
| 2116 | A_UINT32 n_probes; |
| 2117 | |
| 2118 | /** |
| 2119 | * TLV (tag length value ) parameters follow the scan_cmd |
| 2120 | * structure. The TLV's are: |
| 2121 | * A_UINT32 channel_list[]; |
| 2122 | * wmi_ssid ssid_list[]; |
| 2123 | * wmi_mac_addr bssid_list[]; |
| 2124 | * A_UINT8 ie_data[]; |
| 2125 | */ |
| 2126 | } wmi_start_scan_cmd_fixed_param; |
| 2127 | |
| 2128 | /** |
| 2129 | * scan control flags. |
| 2130 | */ |
| 2131 | |
| 2132 | /** passively scan all channels including active channels */ |
| 2133 | #define WMI_SCAN_FLAG_PASSIVE 0x1 |
| 2134 | /** add wild card ssid probe request even though ssid_list is specified. */ |
| 2135 | #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2 |
| 2136 | /** add cck rates to rates/xrate ie for the generated probe request */ |
| 2137 | #define WMI_SCAN_ADD_CCK_RATES 0x4 |
| 2138 | /** add ofdm rates to rates/xrate ie for the generated probe request */ |
| 2139 | #define WMI_SCAN_ADD_OFDM_RATES 0x8 |
| 2140 | /** To enable indication of Chan load and Noise floor to host */ |
| 2141 | #define WMI_SCAN_CHAN_STAT_EVENT 0x10 |
| 2142 | /** Filter Probe request frames */ |
| 2143 | #define WMI_SCAN_FILTER_PROBE_REQ 0x20 |
| 2144 | /**When set, not to scan DFS channels*/ |
| 2145 | #define WMI_SCAN_BYPASS_DFS_CHN 0x40 |
| 2146 | /**When set, certain errors are ignored and scan continues. |
| 2147 | * Different FW scan engine may use its own logic to decide what errors to ignore*/ |
| 2148 | #define WMI_SCAN_CONTINUE_ON_ERROR 0x80 |
| 2149 | /** Enable promiscous mode for ese */ |
| 2150 | #define WMI_SCAN_FILTER_PROMISCOUS 0x100 |
| 2151 | /** allow to send probe req on DFS channel */ |
| 2152 | #define WMI_SCAN_FLAG_FORCE_ACTIVE_ON_DFS 0x200 |
| 2153 | /** add TPC content in probe req frame */ |
| 2154 | #define WMI_SCAN_ADD_TPC_IE_IN_PROBE_REQ 0x400 |
| 2155 | /** add DS content in probe req frame */ |
| 2156 | #define WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ 0x800 |
| 2157 | /** use random mac address for TA for probe request frame and add |
| 2158 | * oui specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the probe req frame. |
| 2159 | * if oui is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored*/ |
| 2160 | #define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ 0x1000 |
| 2161 | |
| 2162 | /** WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */ |
| 2163 | #define WMI_SCAN_CLASS_MASK 0xFF000000 |
| 2164 | |
| 2165 | /* |
| 2166 | * Masks identifying types/ID of scans |
| 2167 | * Scan_Stop macros should be the same value as below defined in UMAC |
| 2168 | * #define IEEE80211_SPECIFIC_SCAN 0x00000000 |
| 2169 | * #define IEEE80211_VAP_SCAN 0x01000000 |
| 2170 | * #define IEEE80211_ALL_SCANS 0x04000000 |
| 2171 | */ |
| 2172 | #define WMI_SCAN_STOP_ONE 0x00000000 |
| 2173 | #define WMI_SCN_STOP_VAP_ALL 0x01000000 |
| 2174 | #define WMI_SCAN_STOP_ALL 0x04000000 |
| 2175 | |
| 2176 | typedef struct { |
| 2177 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 2178 | /** requestor requesting cancel */ |
| 2179 | A_UINT32 requestor; |
| 2180 | /** Scan ID */ |
| 2181 | A_UINT32 scan_id; |
| 2182 | /** |
| 2183 | * Req Type |
| 2184 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 2185 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 2186 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 2187 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 2188 | */ |
| 2189 | A_UINT32 req_type; |
| 2190 | /** |
| 2191 | * vDev ID |
| 2192 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 2193 | */ |
| 2194 | A_UINT32 vdev_id; |
| 2195 | } wmi_stop_scan_cmd_fixed_param; |
| 2196 | |
| 2197 | #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */ |
| 2198 | #define APPEND_TO_EXISTING_CHAN_LIST 1 |
| 2199 | |
| 2200 | typedef struct { |
| 2201 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */ |
| 2202 | A_UINT32 num_scan_chans; |
| 2203 | /** no of elements in chan_info[] */ |
| 2204 | A_UINT32 flags; /* Flags used to control the behavior of channel list update on target side */ |
| 2205 | /** Followed by the variable length TLV chan_info: |
| 2206 | * wmi_channel chan_info[] */ |
| 2207 | } wmi_scan_chan_list_cmd_fixed_param; |
| 2208 | |
| 2209 | /* |
| 2210 | * Priority numbers must be sequential, starting with 0. |
| 2211 | */ |
| 2212 | /* NOTE: WLAN SCAN_PRIORITY_COUNT can't be changed without breaking the compatibility */ |
| 2213 | typedef enum { |
| 2214 | WMI_SCAN_PRIORITY_VERY_LOW = 0, |
| 2215 | WMI_SCAN_PRIORITY_LOW, |
| 2216 | WMI_SCAN_PRIORITY_MEDIUM, |
| 2217 | WMI_SCAN_PRIORITY_HIGH, |
| 2218 | WMI_SCAN_PRIORITY_VERY_HIGH, |
| 2219 | |
| 2220 | WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */ |
| 2221 | } wmi_scan_priority; |
| 2222 | |
| 2223 | /* Five Levels for Requested Priority */ |
| 2224 | /* VERY_LOW LOW MEDIUM HIGH VERY_HIGH */ |
| 2225 | typedef A_UINT32 WLAN_PRIORITY_MAPPING[WMI_SCAN_PRIORITY_COUNT]; |
| 2226 | |
| 2227 | /** |
| 2228 | * 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 |
| 2229 | * ex. if we need overwrite P2P Client prority entry, we will overwrite the whole table for WLAN_M_STA |
| 2230 | * we will generate the new WLAN_M_STA table with modified P2P Client Entry but keep STA entry intact |
| 2231 | */ |
| 2232 | typedef struct { |
| 2233 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param */ |
| 2234 | /** |
| 2235 | * used as an index to find the proper table for a specific vdev type in default_scan_priority_mapping_table |
| 2236 | * 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 |
| 2237 | */ |
| 2238 | A_UINT32 vdev_type; |
| 2239 | /** |
| 2240 | * number of rows in mapping_table for a specific vdev |
| 2241 | * for WLAN_M_STA type, there are 3 entries in the table (refer to default_scan_priority_mapping_table definition) |
| 2242 | */ |
| 2243 | A_UINT32 number_rows; |
| 2244 | /** mapping_table for a specific vdev follows this TLV |
| 2245 | * WLAN_PRIORITY_MAPPING mapping_table[]; */ |
| 2246 | } wmi_scan_sch_priority_table_cmd_fixed_param; |
| 2247 | |
| 2248 | /** update flags */ |
| 2249 | #define WMI_SCAN_UPDATE_SCAN_PRIORITY 0x1 |
| 2250 | #define WMI_SCAN_UPDATE_SCAN_MIN_REST_TIME 0x2 |
| 2251 | #define WMI_SCAN_UPDATE_SCAN_MAX_REST_TIME 0x4 |
| 2252 | |
| 2253 | typedef struct { |
| 2254 | A_UINT32 tlv_header; |
| 2255 | /** requestor requesting update scan request */ |
| 2256 | A_UINT32 requestor; |
| 2257 | /** Scan ID of the scan request that need to be update */ |
| 2258 | A_UINT32 scan_id; |
| 2259 | /** update flags, indicating which of the following fields are valid and need to be updated*/ |
| 2260 | A_UINT32 scan_update_flags; |
| 2261 | /** scan priority. Only valid if WMI_SCAN_UPDATE_SCAN_PRIORITY flag is set in scan_update_flag */ |
| 2262 | A_UINT32 scan_priority; |
| 2263 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MIN_REST_TIME flag is set in scan_update_flag */ |
| 2264 | A_UINT32 min_rest_time; |
| 2265 | /** min rest time. Only valid if WMI_SCAN_UPDATE_MAX_REST_TIME flag is set in scan_update_flag */ |
| 2266 | A_UINT32 max_rest_time; |
| 2267 | } wmi_scan_update_request_cmd_fixed_param; |
| 2268 | |
| 2269 | typedef struct { |
| 2270 | A_UINT32 tlv_header; |
| 2271 | /** oui to be used in probe request frame when random mac addresss is |
| 2272 | * requested part of scan parameters. this is applied to both FW internal scans and |
| 2273 | * host initated scans. host can request for random mac address with |
| 2274 | * WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ flag. */ |
| 2275 | A_UINT32 prob_req_oui; |
| 2276 | } wmi_scan_prob_req_oui_cmd_fixed_param; |
| 2277 | |
| 2278 | enum wmi_scan_event_type { |
| 2279 | WMI_SCAN_EVENT_STARTED = 0x1, |
| 2280 | WMI_SCAN_EVENT_COMPLETED = 0x2, |
| 2281 | WMI_SCAN_EVENT_BSS_CHANNEL = 0x4, |
| 2282 | WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8, |
| 2283 | WMI_SCAN_EVENT_DEQUEUED = 0x10, /* scan request got dequeued */ |
| 2284 | WMI_SCAN_EVENT_PREEMPTED = 0x20, /* preempted by other high priority scan */ |
| 2285 | WMI_SCAN_EVENT_START_FAILED = 0x40, /* scan start failed */ |
| 2286 | WMI_SCAN_EVENT_RESTARTED = 0x80, /*scan restarted */ |
| 2287 | WMI_SCAN_EVENT_MAX = 0x8000 |
| 2288 | }; |
| 2289 | |
| 2290 | enum wmi_scan_completion_reason { |
| 2291 | /** scan related events */ |
| 2292 | WMI_SCAN_REASON_NONE = 0xFF, |
| 2293 | WMI_SCAN_REASON_COMPLETED = 0, |
| 2294 | WMI_SCAN_REASON_CANCELLED = 1, |
| 2295 | WMI_SCAN_REASON_PREEMPTED = 2, |
| 2296 | WMI_SCAN_REASON_TIMEDOUT = 3, |
| 2297 | WMI_SCAN_REASON_INTERNAL_FAILURE = 4, /* This reason indication failures when performaing scan */ |
| 2298 | WMI_SCAN_REASON_MAX, |
| 2299 | }; |
| 2300 | |
| 2301 | typedef struct { |
| 2302 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_event_fixed_param */ |
| 2303 | /** scan event (wmi_scan_event_type) */ |
| 2304 | A_UINT32 event; |
| 2305 | /** status of the scan completion event */ |
| 2306 | A_UINT32 reason; |
| 2307 | /** channel freq , only valid for FOREIGN channel event*/ |
| 2308 | A_UINT32 channel_freq; |
| 2309 | /**id of the requestor whose scan is in progress */ |
| 2310 | A_UINT32 requestor; |
| 2311 | /**id of the scan that is in progress */ |
| 2312 | A_UINT32 scan_id; |
| 2313 | /**id of VDEV that requested the scan */ |
| 2314 | A_UINT32 vdev_id; |
| 2315 | } wmi_scan_event_fixed_param; |
| 2316 | |
| 2317 | /* WMI Diag event */ |
| 2318 | typedef struct { |
| 2319 | A_UINT32 tlv_header; /* TLV tag and len; tag is WMITLV_TAG_STRUC_wmi_diag_event_fixed_param */ |
| 2320 | A_UINT32 time_stamp; /* Reference timestamp. diag frame contains diff value */ |
| 2321 | A_UINT32 count; /* Number of diag frames added to current event */ |
| 2322 | A_UINT32 dropped; |
| 2323 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 2324 | } wmi_diag_event_fixed_param; |
| 2325 | |
| 2326 | /* |
| 2327 | * If FW has multiple active channels due to MCC(multi channel concurrency), |
| 2328 | * then these stats are combined stats for all the active channels. |
| 2329 | */ |
| 2330 | typedef struct { |
| 2331 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_whal_mib_stats_event_fixed_param */ |
| 2332 | /** ack count, it is an incremental number, not accumulated number */ |
| 2333 | A_UINT32 ackRcvBad; |
| 2334 | /** bad rts count, it is an incremental number, not accumulated number */ |
| 2335 | A_UINT32 rtsBad; |
| 2336 | /** good rts, it is an incremental number, not accumulated number */ |
| 2337 | A_UINT32 rtsGood; |
| 2338 | /** fcs count, it is an incremental number, not accumulated number */ |
| 2339 | A_UINT32 fcsBad; |
| 2340 | /** beacon count, it is an incremental number, not accumulated number */ |
| 2341 | A_UINT32 noBeacons; |
| 2342 | } wmi_update_whal_mib_stats_event_fixed_param; |
| 2343 | |
| 2344 | /* |
| 2345 | * This defines how much headroom is kept in the |
| 2346 | * receive frame between the descriptor and the |
| 2347 | * payload, in order for the WMI PHY error and |
| 2348 | * management handler to insert header contents. |
| 2349 | * |
| 2350 | * This is in bytes. |
| 2351 | */ |
| 2352 | #define WMI_MGMT_RX_HDR_HEADROOM sizeof(wmi_comb_phyerr_rx_hdr) + WMI_TLV_HDR_SIZE + sizeof(wmi_single_phyerr_rx_hdr) |
| 2353 | |
| 2354 | /** This event will be used for sending scan results |
| 2355 | * as well as rx mgmt frames to the host. The rx buffer |
| 2356 | * will be sent as part of this WMI event. It would be a |
| 2357 | * good idea to pass all the fields in the RX status |
| 2358 | * descriptor up to the host. |
| 2359 | */ |
| 2360 | /* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */ |
| 2361 | #define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */ |
| 2362 | |
| 2363 | /** flag indicating that the the mgmt frame (probe req/beacon) is received in the context of extscan performed by FW */ |
| 2364 | #define WMI_MGMT_RX_HDR_EXTSCAN 0x01 |
| 2365 | |
| 2366 | /** |
| 2367 | * flag indicating that the the mgmt frame (probe req/beacon) is received in |
| 2368 | * the context of matched network by FW ENLO |
| 2369 | */ |
| 2370 | #define WMI_MGMT_RX_HDR_ENLO 0x02 |
| 2371 | |
| 2372 | typedef struct { |
| 2373 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */ |
| 2374 | /** channel on which this frame is received. */ |
| 2375 | A_UINT32 channel; |
| 2376 | /** snr information used to cal rssi */ |
| 2377 | A_UINT32 snr; |
| 2378 | /** Rate kbps */ |
| 2379 | A_UINT32 rate; |
| 2380 | /** rx phy mode WLAN_PHY_MODE */ |
| 2381 | A_UINT32 phy_mode; |
| 2382 | /** length of the frame */ |
| 2383 | A_UINT32 buf_len; |
| 2384 | /** rx status */ |
| 2385 | A_UINT32 status; |
| 2386 | /** RSSI of PRI 20MHz for each chain. */ |
| 2387 | A_UINT32 rssi_ctl[ATH_MAX_ANTENNA]; |
| 2388 | /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */ |
| 2389 | A_UINT32 flags; |
| 2390 | /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */ |
| 2391 | A_INT32 rssi; |
| 2392 | |
| 2393 | /** delta between local TSF(TSF timestamp when frame was RXd) |
| 2394 | * and remote TSF(TSF timestamp in the IE for mgmt frame |
| 2395 | * beacon,proberesp for e.g). If remote TSF is not available, |
| 2396 | * delta set to 0. |
| 2397 | * Although tsf_delta is stored as A_UINT32, it can be negative, |
| 2398 | * and thus would need to be sign-extended if added to a value |
| 2399 | * larger than 32 bits. |
| 2400 | */ |
| 2401 | A_UINT32 tsf_delta; |
| 2402 | /* This TLV is followed by array of bytes: |
| 2403 | * // management frame buffer |
| 2404 | * A_UINT8 bufp[]; |
| 2405 | */ |
| 2406 | } wmi_mgmt_rx_hdr; |
| 2407 | |
| 2408 | /* WMI PHY Error RX */ |
| 2409 | |
| 2410 | typedef struct { |
| 2411 | /** TSF timestamp */ |
| 2412 | A_UINT32 tsf_timestamp; |
| 2413 | |
| 2414 | /** |
| 2415 | * Current freq1, freq2 |
| 2416 | * |
| 2417 | * [7:0]: freq1[lo] |
| 2418 | * [15:8] : freq1[hi] |
| 2419 | * [23:16]: freq2[lo] |
| 2420 | * [31:24]: freq2[hi] |
| 2421 | */ |
| 2422 | A_UINT32 freq_info_1; |
| 2423 | |
| 2424 | /** |
| 2425 | * Combined RSSI over all chains and channel width for this PHY error |
| 2426 | * |
| 2427 | * [7:0]: RSSI combined |
| 2428 | * [15:8]: Channel width (MHz) |
| 2429 | * [23:16]: PHY error code |
| 2430 | * [24:16]: reserved (future use) |
| 2431 | */ |
| 2432 | A_UINT32 freq_info_2; |
| 2433 | |
| 2434 | /** |
| 2435 | * RSSI on chain 0 through 3 |
| 2436 | * |
| 2437 | * This is formatted the same as the PPDU_START RX descriptor |
| 2438 | * field: |
| 2439 | * |
| 2440 | * [7:0]: pri20 |
| 2441 | * [15:8]: sec20 |
| 2442 | * [23:16]: sec40 |
| 2443 | * [31:24]: sec80 |
| 2444 | */ |
| 2445 | A_UINT32 rssi_chain0; |
| 2446 | A_UINT32 rssi_chain1; |
| 2447 | A_UINT32 rssi_chain2; |
| 2448 | A_UINT32 rssi_chain3; |
| 2449 | |
| 2450 | /** |
| 2451 | * Last calibrated NF value for chain 0 through 3 |
| 2452 | * |
| 2453 | * nf_list_1: |
| 2454 | * |
| 2455 | * + [15:0] - chain 0 |
| 2456 | * + [31:16] - chain 1 |
| 2457 | * |
| 2458 | * nf_list_2: |
| 2459 | * |
| 2460 | * + [15:0] - chain 2 |
| 2461 | * + [31:16] - chain 3 |
| 2462 | */ |
| 2463 | A_UINT32 nf_list_1; |
| 2464 | A_UINT32 nf_list_2; |
| 2465 | |
| 2466 | /** Length of the frame */ |
| 2467 | A_UINT32 buf_len; |
| 2468 | } wmi_single_phyerr_rx_hdr; |
| 2469 | |
| 2470 | #define WMI_UNIFIED_FREQINFO_1_LO 0x000000ff |
| 2471 | #define WMI_UNIFIED_FREQINFO_1_LO_S 0 |
| 2472 | #define WMI_UNIFIED_FREQINFO_1_HI 0x0000ff00 |
| 2473 | #define WMI_UNIFIED_FREQINFO_1_HI_S 8 |
| 2474 | #define WMI_UNIFIED_FREQINFO_2_LO 0x00ff0000 |
| 2475 | #define WMI_UNIFIED_FREQINFO_2_LO_S 16 |
| 2476 | #define WMI_UNIFIED_FREQINFO_2_HI 0xff000000 |
| 2477 | #define WMI_UNIFIED_FREQINFO_2_HI_S 24 |
| 2478 | |
| 2479 | /* |
| 2480 | * Please keep in mind that these _SET macros break macro side effect |
| 2481 | * assumptions; don't be clever with them. |
| 2482 | */ |
| 2483 | #define WMI_UNIFIED_FREQ_INFO_GET(hdr, f) \ |
| 2484 | ( WMI_F_MS( (hdr)->freq_info_1, \ |
| 2485 | WMI_UNIFIED_FREQINFO_ ## f ## _LO ) \ |
| 2486 | | (WMI_F_MS( (hdr)->freq_info_1, \ |
| 2487 | WMI_UNIFIED_FREQINFO_ ## f ## _HI ) << 8) ) |
| 2488 | |
| 2489 | #define WMI_UNIFIED_FREQ_INFO_SET(hdr, f, v) \ |
| 2490 | do { \ |
| 2491 | WMI_F_RMW((hdr)->freq_info_1, (v) & 0xff, \ |
| 2492 | WMI_UNIFIED_FREQINFO_ ## f ## _LO); \ |
| 2493 | WMI_F_RMW((hdr)->freq_info_1, ((v) >> 8) & 0xff, \ |
| 2494 | WMI_UNIFIED_FREQINFO_ ## f ## _HI); \ |
| 2495 | } while (0) |
| 2496 | |
| 2497 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB 0x000000ff |
| 2498 | #define WMI_UNIFIED_FREQINFO_2_RSSI_COMB_S 0 |
| 2499 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH 0x0000ff00 |
| 2500 | #define WMI_UNIFIED_FREQINFO_2_CHWIDTH_S 8 |
| 2501 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE 0x00ff0000 |
| 2502 | #define WMI_UNIFIED_FREQINFO_2_PHYERRCODE_S 16 |
| 2503 | |
| 2504 | #define WMI_UNIFIED_RSSI_COMB_GET(hdr) \ |
| 2505 | ( (int8_t) (WMI_F_MS((hdr)->freq_info_2, \ |
| 2506 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB))) |
| 2507 | |
| 2508 | #define WMI_UNIFIED_RSSI_COMB_SET(hdr, v) \ |
| 2509 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 2510 | WMI_UNIFIED_FREQINFO_2_RSSI_COMB); |
| 2511 | |
| 2512 | #define WMI_UNIFIED_CHWIDTH_GET(hdr) \ |
| 2513 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_CHWIDTH) |
| 2514 | |
| 2515 | #define WMI_UNIFIED_CHWIDTH_SET(hdr, v) \ |
| 2516 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 2517 | WMI_UNIFIED_FREQINFO_2_CHWIDTH); |
| 2518 | |
| 2519 | #define WMI_UNIFIED_PHYERRCODE_GET(hdr) \ |
| 2520 | WMI_F_MS((hdr)->freq_info_2, WMI_UNIFIED_FREQINFO_2_PHYERRCODE) |
| 2521 | |
| 2522 | #define WMI_UNIFIED_PHYERRCODE_SET(hdr, v) \ |
| 2523 | WMI_F_RMW((hdr)->freq_info_2, (v) & 0xff, \ |
| 2524 | WMI_UNIFIED_FREQINFO_2_PHYERRCODE); |
| 2525 | |
| 2526 | #define WMI_UNIFIED_CHAIN_0 0x0000ffff |
| 2527 | #define WMI_UNIFIED_CHAIN_0_S 0 |
| 2528 | #define WMI_UNIFIED_CHAIN_1 0xffff0000 |
| 2529 | #define WMI_UNIFIED_CHAIN_1_S 16 |
| 2530 | #define WMI_UNIFIED_CHAIN_2 0x0000ffff |
| 2531 | #define WMI_UNIFIED_CHAIN_2_S 0 |
| 2532 | #define WMI_UNIFIED_CHAIN_3 0xffff0000 |
| 2533 | #define WMI_UNIFIED_CHAIN_3_S 16 |
| 2534 | |
| 2535 | #define WMI_UNIFIED_CHAIN_0_FIELD nf_list_1 |
| 2536 | #define WMI_UNIFIED_CHAIN_1_FIELD nf_list_1 |
| 2537 | #define WMI_UNIFIED_CHAIN_2_FIELD nf_list_2 |
| 2538 | #define WMI_UNIFIED_CHAIN_3_FIELD nf_list_2 |
| 2539 | |
| 2540 | #define WMI_UNIFIED_NF_CHAIN_GET(hdr, c) \ |
| 2541 | ((int16_t) (WMI_F_MS((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, \ |
| 2542 | WMI_UNIFIED_CHAIN_ ## c))) |
| 2543 | |
| 2544 | #define WMI_UNIFIED_NF_CHAIN_SET(hdr, c, nf) \ |
| 2545 | WMI_F_RMW((hdr)->WMI_UNIFIED_CHAIN_ ## c ## _FIELD, (nf) & 0xffff, \ |
| 2546 | WMI_UNIFIED_CHAIN_ ## c); |
| 2547 | |
| 2548 | /* |
| 2549 | * For now, this matches what the underlying hardware is doing. |
| 2550 | * Update ar6000ProcRxDesc() to use these macros when populating |
| 2551 | * the rx descriptor and then we can just copy the field over |
| 2552 | * to the WMI PHY notification without worrying about breaking |
| 2553 | * things. |
| 2554 | */ |
| 2555 | #define WMI_UNIFIED_RSSI_CHAN_PRI20 0x000000ff |
| 2556 | #define WMI_UNIFIED_RSSI_CHAN_PRI20_S 0 |
| 2557 | #define WMI_UNIFIED_RSSI_CHAN_SEC20 0x0000ff00 |
| 2558 | #define WMI_UNIFIED_RSSI_CHAN_SEC20_S 8 |
| 2559 | #define WMI_UNIFIED_RSSI_CHAN_SEC40 0x00ff0000 |
| 2560 | #define WMI_UNIFIED_RSSI_CHAN_SEC40_S 16 |
| 2561 | #define WMI_UNIFIED_RSSI_CHAN_SEC80 0xff000000 |
| 2562 | #define WMI_UNIFIED_RSSI_CHAN_SEC80_S 24 |
| 2563 | |
| 2564 | #define WMI_UNIFIED_RSSI_CHAN_SET(hdr, c, ch, rssi) \ |
| 2565 | WMI_F_RMW((hdr)->rssi_chain ## c, (rssi) & 0xff, \ |
| 2566 | WMI_UNIFIED_RSSI_CHAN_ ## ch); |
| 2567 | |
| 2568 | #define WMI_UNIFIED_RSSI_CHAN_GET(hdr, c, ch) \ |
| 2569 | ((int8_t) (WMI_F_MS((hdr)->rssi_chain ## c, \ |
| 2570 | WMI_UNIFIED_RSSI_CHAN_ ## ch))) |
| 2571 | |
| 2572 | typedef struct { |
| 2573 | /** Phy error event header */ |
| 2574 | wmi_single_phyerr_rx_hdr hdr; |
| 2575 | /** frame buffer */ |
| 2576 | A_UINT8 bufp[1]; |
| 2577 | } wmi_single_phyerr_rx_event; |
| 2578 | |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame^] | 2579 | /* PHY ERROR MASK 0 */ |
| 2580 | /* bits 1:0 defined but not published */ |
| 2581 | #define WMI_PHY_ERROR_MASK0_RADAR (1<<2 ) |
| 2582 | /* bits 23:3 defined but not published */ |
| 2583 | #define WMI_PHY_ERROR_MASK0_FALSE_RADAR_EXT (1<<24) |
| 2584 | /* bits 25:24 defined but not published */ |
| 2585 | #define WMI_PHY_ERROR_MASK0_SPECTRAL_SCAN (1<<26) |
| 2586 | /* bits 31:27 defined but not published */ |
| 2587 | |
| 2588 | /* PHY ERROR MASK 1 |
| 2589 | * bits 13:0 defined but not published |
| 2590 | * bits 31:14 reserved |
| 2591 | */ |
| 2592 | |
| 2593 | /* PHY ERROR MASK 2 |
| 2594 | * bits 31:0 reserved |
| 2595 | */ |
| 2596 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2597 | typedef struct { |
| 2598 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_comb_phyerr_rx_hdr */ |
| 2599 | /** Phy error phy error count */ |
| 2600 | A_UINT32 num_phyerr_events; |
| 2601 | A_UINT32 tsf_l32; |
| 2602 | A_UINT32 tsf_u32; |
| 2603 | A_UINT32 buf_len; |
| 2604 | A_UINT32 pmac_id; |
Krishna Kumaar Natarajan | c768199 | 2015-11-19 16:45:59 -0800 | [diff] [blame^] | 2605 | A_UINT32 rsPhyErrMask0; /* see WMI_PHY_ERROR_MASK0 */ |
| 2606 | A_UINT32 rsPhyErrMask1; /* see WMI_PHY_ERROR_MASK1 */ |
| 2607 | A_UINT32 rsPhyErrMask2; /* see WMI_PHY_ERROR_MASK2 */ |
| 2608 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2609 | /* This TLV is followed by array of bytes: |
| 2610 | * // frame buffer - contains multiple payloads in the order: |
| 2611 | * // header - payload, header - payload... |
| 2612 | * (The header is of type: wmi_single_phyerr_rx_hdr) |
| 2613 | * A_UINT8 bufp[]; |
| 2614 | */ |
| 2615 | } wmi_comb_phyerr_rx_hdr; |
| 2616 | |
| 2617 | /* WMI MGMT TX */ |
| 2618 | typedef struct { |
| 2619 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_hdr */ |
| 2620 | /** unique id identifying the VDEV, generated by the caller */ |
| 2621 | A_UINT32 vdev_id; |
| 2622 | /** peer MAC address */ |
| 2623 | wmi_mac_addr peer_macaddr; |
| 2624 | /** xmit rate */ |
| 2625 | A_UINT32 tx_rate; |
| 2626 | /** xmit power */ |
| 2627 | A_UINT32 tx_power; |
| 2628 | /** Buffer length in bytes */ |
| 2629 | A_UINT32 buf_len; |
| 2630 | /* This TLV is followed by array of bytes: |
| 2631 | * // management frame buffer |
| 2632 | * A_UINT8 bufp[]; |
| 2633 | */ |
| 2634 | } wmi_mgmt_tx_hdr; |
| 2635 | |
| 2636 | typedef struct { |
| 2637 | /* |
| 2638 | * TLV tag and len; |
| 2639 | * tag equals WMITLV_TAG_STRUC_wmi_mgmt_tx_send_cmd_fixed_param |
| 2640 | */ |
| 2641 | A_UINT32 tlv_header; |
| 2642 | A_UINT32 vdev_id; |
| 2643 | /* echoed in tx_compl_event */ |
| 2644 | A_UINT32 desc_id; |
| 2645 | /* MHz units */ |
| 2646 | A_UINT32 chanfreq; |
| 2647 | A_UINT32 paddr_lo; |
| 2648 | A_UINT32 paddr_hi; |
| 2649 | A_UINT32 frame_len; |
| 2650 | /* Buffer length in bytes */ |
| 2651 | A_UINT32 buf_len; |
| 2652 | /* |
| 2653 | * This TLV is followed by array of bytes: |
| 2654 | * First 64 bytes of management frame |
| 2655 | * A_UINT8 bufp[]; |
| 2656 | */ |
| 2657 | } wmi_mgmt_tx_send_cmd_fixed_param; |
| 2658 | |
| 2659 | typedef struct { |
| 2660 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_event_fixed_param */ |
| 2661 | A_UINT32 value; |
| 2662 | } wmi_echo_event_fixed_param; |
| 2663 | |
| 2664 | typedef struct { |
| 2665 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_echo_cmd_fixed_param */ |
| 2666 | A_UINT32 value; |
| 2667 | } wmi_echo_cmd_fixed_param; |
| 2668 | |
| 2669 | typedef struct { |
| 2670 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */ |
| 2671 | |
| 2672 | A_UINT32 reserved0; |
| 2673 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2674 | /** reg domain code */ |
| 2675 | A_UINT32 reg_domain; |
| 2676 | A_UINT32 reg_domain_2G; |
| 2677 | A_UINT32 reg_domain_5G; |
| 2678 | A_UINT32 conformance_test_limit_2G; |
| 2679 | A_UINT32 conformance_test_limit_5G; |
| 2680 | } wmi_pdev_set_regdomain_cmd_fixed_param; |
| 2681 | |
| 2682 | typedef struct { |
| 2683 | /** true for scan start and flase for scan end */ |
| 2684 | A_UINT32 scan_start; |
| 2685 | } wmi_pdev_scan_cmd; |
| 2686 | |
| 2687 | /*Command to set/unset chip in quiet mode*/ |
| 2688 | typedef struct { |
| 2689 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_quiet_cmd_fixed_param */ |
| 2690 | A_UINT32 reserved0; |
| 2691 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2692 | A_UINT32 period; /*period in TUs */ |
| 2693 | A_UINT32 duration; /*duration in TUs */ |
| 2694 | A_UINT32 next_start; /*offset in TUs */ |
| 2695 | A_UINT32 enabled; /*enable/disable */ |
| 2696 | } wmi_pdev_set_quiet_cmd_fixed_param; |
| 2697 | |
| 2698 | /* |
| 2699 | * Command to enable/disable Green AP Power Save. |
| 2700 | * This helps conserve power during AP operation. When the AP has no |
| 2701 | * stations associated with it, the host can enable Green AP Power Save |
| 2702 | * to request the firmware to shut down all but one transmit and receive |
| 2703 | * chains. |
| 2704 | */ |
| 2705 | typedef struct { |
| 2706 | A_UINT32 tlv_header; |
| 2707 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_green_ap_ps_enable_cmd_fixed_param */ |
| 2708 | A_UINT32 reserved0; |
| 2709 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2710 | A_UINT32 enable; /*1:enable, 0:disable */ |
| 2711 | } wmi_pdev_green_ap_ps_enable_cmd_fixed_param; |
| 2712 | |
| 2713 | #define MAX_HT_IE_LEN 32 |
| 2714 | typedef struct { |
| 2715 | A_UINT32 tlv_header; |
| 2716 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_ht_ie_cmd_fixed_param */ |
| 2717 | A_UINT32 reserved0; |
| 2718 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2719 | A_UINT32 ie_len; /*length of the ht ie in the TLV ie_data[] */ |
| 2720 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 2721 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 2722 | /** The TLV for the HT IE follows: |
| 2723 | * A_UINT32 ie_data[]; |
| 2724 | */ |
| 2725 | } wmi_pdev_set_ht_ie_cmd_fixed_param; |
| 2726 | |
| 2727 | #define MAX_VHT_IE_LEN 32 |
| 2728 | typedef struct { |
| 2729 | A_UINT32 tlv_header; |
| 2730 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_vht_ie_cmd_fixed_param */ |
| 2731 | A_UINT32 reserved0; |
| 2732 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2733 | A_UINT32 ie_len; /*length of the vht ie in the TLV ie_data[] */ |
| 2734 | A_UINT32 tx_streams; /* Tx streams supported for this HT IE */ |
| 2735 | A_UINT32 rx_streams; /* Rx streams supported for this HT IE */ |
| 2736 | /** The TLV for the VHT IE follows: |
| 2737 | * A_UINT32 ie_data[]; |
| 2738 | */ |
| 2739 | } wmi_pdev_set_vht_ie_cmd_fixed_param; |
| 2740 | |
| 2741 | typedef struct { |
| 2742 | A_UINT32 tlv_header; |
| 2743 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_base_macaddr_cmd_fixed_param */ |
| 2744 | A_UINT32 reserved0; |
| 2745 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 2746 | wmi_mac_addr base_macaddr; |
| 2747 | } wmi_pdev_set_base_macaddr_cmd_fixed_param; |
| 2748 | |
| 2749 | /* |
| 2750 | * For now, the spectral configuration is global rather than |
| 2751 | * per-vdev. The vdev is a placeholder and will be ignored |
| 2752 | * by the firmware. |
| 2753 | */ |
| 2754 | typedef struct { |
| 2755 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_configure_cmd_fixed_param */ |
| 2756 | A_UINT32 vdev_id; |
| 2757 | A_UINT32 spectral_scan_count; |
| 2758 | A_UINT32 spectral_scan_period; |
| 2759 | A_UINT32 spectral_scan_priority; |
| 2760 | A_UINT32 spectral_scan_fft_size; |
| 2761 | A_UINT32 spectral_scan_gc_ena; |
| 2762 | A_UINT32 spectral_scan_restart_ena; |
| 2763 | A_UINT32 spectral_scan_noise_floor_ref; |
| 2764 | A_UINT32 spectral_scan_init_delay; |
| 2765 | A_UINT32 spectral_scan_nb_tone_thr; |
| 2766 | A_UINT32 spectral_scan_str_bin_thr; |
| 2767 | A_UINT32 spectral_scan_wb_rpt_mode; |
| 2768 | A_UINT32 spectral_scan_rssi_rpt_mode; |
| 2769 | A_UINT32 spectral_scan_rssi_thr; |
| 2770 | A_UINT32 spectral_scan_pwr_format; |
| 2771 | A_UINT32 spectral_scan_rpt_mode; |
| 2772 | A_UINT32 spectral_scan_bin_scale; |
| 2773 | A_UINT32 spectral_scan_dBm_adj; |
| 2774 | A_UINT32 spectral_scan_chn_mask; |
| 2775 | } wmi_vdev_spectral_configure_cmd_fixed_param; |
| 2776 | |
| 2777 | /* |
| 2778 | * Enabling, disabling and triggering the spectral scan |
| 2779 | * is a per-vdev operation. That is, it will set channel |
| 2780 | * flags per vdev rather than globally; so concurrent scan/run |
| 2781 | * and multiple STA (eg p2p, tdls, multi-band STA) is possible. |
| 2782 | */ |
| 2783 | typedef struct { |
| 2784 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_spectral_enable_cmd_fixed_param */ |
| 2785 | A_UINT32 vdev_id; |
| 2786 | /* 0 - ignore; 1 - trigger, 2 - clear trigger */ |
| 2787 | A_UINT32 trigger_cmd; |
| 2788 | /* 0 - ignore; 1 - enable, 2 - disable */ |
| 2789 | A_UINT32 enable_cmd; |
| 2790 | } wmi_vdev_spectral_enable_cmd_fixed_param; |
| 2791 | |
| 2792 | typedef enum { |
| 2793 | WMI_CSA_IE_PRESENT = 0x00000001, |
| 2794 | WMI_XCSA_IE_PRESENT = 0x00000002, |
| 2795 | WMI_WBW_IE_PRESENT = 0x00000004, |
| 2796 | WMI_CSWARP_IE_PRESENT = 0x00000008, |
| 2797 | } WMI_CSA_EVENT_IES_PRESENT_FLAG; |
| 2798 | |
| 2799 | /* wmi CSA receive event from beacon frame */ |
| 2800 | typedef struct { |
| 2801 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_event_fixed_param */ |
| 2802 | A_UINT32 i_fc_dur; |
| 2803 | /* Bit 0-15: FC */ |
| 2804 | /* Bit 16-31: DUR */ |
| 2805 | wmi_mac_addr i_addr1; |
| 2806 | wmi_mac_addr i_addr2; |
| 2807 | /* NOTE: size of array of csa_ie[], xcsa_ie[], and wb_ie[] cannot be |
| 2808 | * changed in the future without breaking WMI compatibility */ |
| 2809 | A_UINT32 csa_ie[2]; |
| 2810 | A_UINT32 xcsa_ie[2]; |
| 2811 | A_UINT32 wb_ie[2]; |
| 2812 | A_UINT32 cswarp_ie; |
| 2813 | A_UINT32 ies_present_flag; /* WMI_CSA_EVENT_IES_PRESENT_FLAG */ |
| 2814 | } wmi_csa_event_fixed_param; |
| 2815 | |
| 2816 | typedef enum { |
| 2817 | /** TX chain mask */ |
| 2818 | WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1, |
| 2819 | /** RX chain mask */ |
| 2820 | WMI_PDEV_PARAM_RX_CHAIN_MASK, |
| 2821 | /** TX power limit for 2G Radio */ |
| 2822 | WMI_PDEV_PARAM_TXPOWER_LIMIT2G, |
| 2823 | /** TX power limit for 5G Radio */ |
| 2824 | WMI_PDEV_PARAM_TXPOWER_LIMIT5G, |
| 2825 | /** TX power scale */ |
| 2826 | WMI_PDEV_PARAM_TXPOWER_SCALE, |
| 2827 | /** Beacon generation mode . 0: host, 1: target */ |
| 2828 | WMI_PDEV_PARAM_BEACON_GEN_MODE, |
| 2829 | /** Beacon generation mode . 0: staggered 1: bursted */ |
| 2830 | WMI_PDEV_PARAM_BEACON_TX_MODE, |
| 2831 | /** Resource manager off chan mode . |
| 2832 | * 0: turn off off chan mode. 1: turn on offchan mode |
| 2833 | */ |
| 2834 | WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| 2835 | /** Protection mode 0: no protection 1:use CTS-to-self 2: use RTS/CTS */ |
| 2836 | WMI_PDEV_PARAM_PROTECTION_MODE, |
| 2837 | /** Dynamic bandwidth 0: disable 1: enable */ |
| 2838 | WMI_PDEV_PARAM_DYNAMIC_BW, |
| 2839 | /** Non aggregrate/ 11g sw retry threshold.0-disable */ |
| 2840 | WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| 2841 | /** aggregrate sw retry threshold. 0-disable*/ |
| 2842 | WMI_PDEV_PARAM_AGG_SW_RETRY_TH, |
| 2843 | /** Station kickout threshold (non of consecutive failures).0-disable */ |
| 2844 | WMI_PDEV_PARAM_STA_KICKOUT_TH, |
| 2845 | /** Aggerate size scaling configuration per AC */ |
| 2846 | WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| 2847 | /** LTR enable */ |
| 2848 | WMI_PDEV_PARAM_LTR_ENABLE, |
| 2849 | /** LTR latency for BE, in us */ |
| 2850 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| 2851 | /** LTR latency for BK, in us */ |
| 2852 | WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| 2853 | /** LTR latency for VI, in us */ |
| 2854 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| 2855 | /** LTR latency for VO, in us */ |
| 2856 | WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| 2857 | /** LTR AC latency timeout, in ms */ |
| 2858 | WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| 2859 | /** LTR platform latency override, in us */ |
| 2860 | WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| 2861 | /** LTR-M override, in us */ |
| 2862 | WMI_PDEV_PARAM_LTR_RX_OVERRIDE, |
| 2863 | /** Tx activity timeout for LTR, in us */ |
| 2864 | WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| 2865 | /** L1SS state machine enable */ |
| 2866 | WMI_PDEV_PARAM_L1SS_ENABLE, |
| 2867 | /** Deep sleep state machine enable */ |
| 2868 | WMI_PDEV_PARAM_DSLEEP_ENABLE, |
| 2869 | /** RX buffering flush enable */ |
| 2870 | WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| 2871 | /** RX buffering matermark */ |
| 2872 | WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| 2873 | /** RX buffering timeout enable */ |
| 2874 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| 2875 | /** RX buffering timeout value */ |
| 2876 | WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| 2877 | /** pdev level stats update period in ms */ |
| 2878 | WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| 2879 | /** vdev level stats update period in ms */ |
| 2880 | WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| 2881 | /** peer level stats update period in ms */ |
| 2882 | WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| 2883 | /** beacon filter status update period */ |
| 2884 | WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| 2885 | /** QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */ |
| 2886 | WMI_PDEV_PARAM_PMF_QOS, |
| 2887 | /** Access category on which ARP frames are sent */ |
| 2888 | WMI_PDEV_PARAM_ARP_AC_OVERRIDE, |
| 2889 | /** DCS configuration */ |
| 2890 | WMI_PDEV_PARAM_DCS, |
| 2891 | /** Enable/Disable ANI on target */ |
| 2892 | WMI_PDEV_PARAM_ANI_ENABLE, |
| 2893 | /** configure the ANI polling period */ |
| 2894 | WMI_PDEV_PARAM_ANI_POLL_PERIOD, |
| 2895 | /** configure the ANI listening period */ |
| 2896 | WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| 2897 | /** configure OFDM immunity level */ |
| 2898 | WMI_PDEV_PARAM_ANI_OFDM_LEVEL, |
| 2899 | /** configure CCK immunity level */ |
| 2900 | WMI_PDEV_PARAM_ANI_CCK_LEVEL, |
| 2901 | /** Enable/Disable CDD for 1x1 STAs in rate control module */ |
| 2902 | WMI_PDEV_PARAM_DYNTXCHAIN, |
| 2903 | /** Enable/Disable proxy STA */ |
| 2904 | WMI_PDEV_PARAM_PROXY_STA, |
| 2905 | /** Enable/Disable low power state when all VDEVs are inactive/idle. */ |
| 2906 | WMI_PDEV_PARAM_IDLE_PS_CONFIG, |
| 2907 | /** Enable/Disable power gating sleep */ |
| 2908 | WMI_PDEV_PARAM_POWER_GATING_SLEEP, |
| 2909 | /** Enable/Disable Rfkill */ |
| 2910 | WMI_PDEV_PARAM_RFKILL_ENABLE, |
| 2911 | /** Set Bursting DUR */ |
| 2912 | WMI_PDEV_PARAM_BURST_DUR, |
| 2913 | /** Set Bursting ENABLE */ |
| 2914 | WMI_PDEV_PARAM_BURST_ENABLE, |
| 2915 | /** HW rfkill config */ |
| 2916 | WMI_PDEV_PARAM_HW_RFKILL_CONFIG, |
| 2917 | /** Enable radio low power features */ |
| 2918 | WMI_PDEV_PARAM_LOW_POWER_RF_ENABLE, |
| 2919 | /** L1SS entry and residency time track */ |
| 2920 | WMI_PDEV_PARAM_L1SS_TRACK, |
| 2921 | /** set hyst at runtime, requirement from SS */ |
| 2922 | WMI_PDEV_PARAM_HYST_EN, |
| 2923 | /** Enable/ Disable POWER COLLAPSE */ |
| 2924 | WMI_PDEV_PARAM_POWER_COLLAPSE_ENABLE, |
| 2925 | /** configure LED system state */ |
| 2926 | WMI_PDEV_PARAM_LED_SYS_STATE, |
| 2927 | /** Enable/Disable LED */ |
| 2928 | WMI_PDEV_PARAM_LED_ENABLE, |
| 2929 | /** set DIRECT AUDIO time latency */ |
| 2930 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_LATENCY, |
| 2931 | /** set DIRECT AUDIO Feature ENABLE */ |
| 2932 | WMI_PDEV_PARAM_AUDIO_OVER_WLAN_ENABLE, |
| 2933 | /** pdev level whal mib stats update enable */ |
| 2934 | WMI_PDEV_PARAM_WHAL_MIB_STATS_UPDATE_ENABLE, |
| 2935 | /** ht/vht info based on vdev */ |
| 2936 | WMI_PDEV_PARAM_VDEV_RATE_STATS_UPDATE_PERIOD, |
| 2937 | /** Set CTS channel BW for dynamic BW adjustment feature */ |
| 2938 | WMI_PDEV_PARAM_CTS_CBW, |
| 2939 | /** Set GPIO pin info used by WNTS */ |
| 2940 | WMI_PDEV_PARAM_WNTS_CONFIG, |
| 2941 | /** Enable/Disable hardware adaptive early rx feature */ |
| 2942 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_ENABLE, |
| 2943 | /** The minimum early rx duration, to ensure early rx duration is non-zero */ |
| 2944 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_MIN_SLEEP_SLOP, |
| 2945 | /** Increasing/decreasing step used by hardware */ |
| 2946 | WMI_PDEV_PARAM_ADAPTIVE_EARLY_RX_INC_DEC_STEP, |
| 2947 | /** The fixed early rx duration when adaptive early rx is disabled */ |
| 2948 | WMI_PDEV_PARAM_EARLY_RX_FIX_SLEEP_SLOP, |
| 2949 | /** Enable/Disable bmiss based adaptive beacon timeout feature */ |
| 2950 | WMI_PDEV_PARAM_BMISS_BASED_ADAPTIVE_BTO_ENABLE, |
| 2951 | /* |
| 2952 | * The minimum beacon timeout duration, to ensure beacon timeout |
| 2953 | * duration is non-zero |
| 2954 | */ |
| 2955 | WMI_PDEV_PARAM_BMISS_BTO_MIN_BCN_TIMEOUT, |
| 2956 | /** Increasing/decreasing step used by hardware */ |
| 2957 | WMI_PDEV_PARAM_BMISS_BTO_INC_DEC_STEP, |
| 2958 | /* |
| 2959 | * The fixed beacon timeout duration when bmiss based adaptive beacon |
| 2960 | * timeout is disabled |
| 2961 | */ |
| 2962 | WMI_PDEV_PARAM_BTO_FIX_BCN_TIMEOUT, |
| 2963 | /* |
| 2964 | * Enable/Disable Congestion Estimator based adaptive beacon |
| 2965 | * timeout feature */ |
| 2966 | WMI_PDEV_PARAM_CE_BASED_ADAPTIVE_BTO_ENABLE, |
| 2967 | /* |
| 2968 | * combo value of ce_id, ce_threshold, ce_time, refer |
| 2969 | * to WMI_CE_BTO_CE_ID_MASK |
| 2970 | */ |
| 2971 | WMI_PDEV_PARAM_CE_BTO_COMBO_CE_VALUE, |
| 2972 | /** 2G TX chain mask */ |
| 2973 | WMI_PDEV_PARAM_TX_CHAIN_MASK_2G, |
| 2974 | /** 2G RX chain mask */ |
| 2975 | WMI_PDEV_PARAM_RX_CHAIN_MASK_2G, |
| 2976 | /** 5G TX chain mask */ |
| 2977 | WMI_PDEV_PARAM_TX_CHAIN_MASK_5G, |
| 2978 | /** 5G RX chain mask */ |
| 2979 | WMI_PDEV_PARAM_RX_CHAIN_MASK_5G, |
| 2980 | /* Set tx chain mask for CCK rates */ |
| 2981 | WMI_PDEV_PARAM_TX_CHAIN_MASK_CCK, |
| 2982 | /* Set tx chain mask for 1SS stream */ |
| 2983 | WMI_PDEV_PARAM_TX_CHAIN_MASK_1SS, |
Nirav Shah | e1e4a81 | 2015-11-05 11:15:54 +0530 | [diff] [blame] | 2984 | /* Enable/Disable CTS2Self for P2P GO when Non-P2P Client is connected*/ |
| 2985 | WMI_PDEV_PARAM_CTS2SELF_FOR_P2P_GO_CONFIG, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 2986 | /* TX power backoff in dB: tx power -= param value |
| 2987 | * Host passes values(DB) to Halphy, Halphy reduces the power table by |
| 2988 | * the values. Safety check will happen in Halphy |
| 2989 | */ |
| 2990 | WMI_PDEV_PARAM_TXPOWER_DECR_DB, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 2991 | } WMI_PDEV_PARAM; |
| 2992 | |
| 2993 | typedef enum { |
| 2994 | /** Set the loglevel */ |
| 2995 | WMI_DBGLOG_LOG_LEVEL = 0x1, |
| 2996 | /** Enable VAP level debug */ |
| 2997 | WMI_DBGLOG_VAP_ENABLE, |
| 2998 | /** Disable VAP level debug */ |
| 2999 | WMI_DBGLOG_VAP_DISABLE, |
| 3000 | /** Enable MODULE level debug */ |
| 3001 | WMI_DBGLOG_MODULE_ENABLE, |
| 3002 | /** Disable MODULE level debug */ |
| 3003 | WMI_DBGLOG_MODULE_DISABLE, |
| 3004 | /** Enable MODULE level debug */ |
| 3005 | WMI_DBGLOG_MOD_LOG_LEVEL, |
| 3006 | /** set type of the debug output */ |
| 3007 | WMI_DBGLOG_TYPE, |
| 3008 | /** Enable Disable debug */ |
| 3009 | WMI_DBGLOG_REPORT_ENABLE |
| 3010 | } WMI_DBG_PARAM; |
| 3011 | |
| 3012 | /* param_value for param_id WMI_PDEV_PARAM_CTS_CBW */ |
| 3013 | typedef enum { |
| 3014 | WMI_CTS_CBW_INVALID = 0, |
| 3015 | WMI_CTS_CBW_20, |
| 3016 | WMI_CTS_CBW_40, |
| 3017 | WMI_CTS_CBW_80, |
| 3018 | WMI_CTS_CBW_80_80, |
| 3019 | WMI_CTS_CBW_160, |
| 3020 | } WMI_CTS_CBW; |
| 3021 | |
| 3022 | typedef struct { |
| 3023 | A_UINT32 tlv_header; |
| 3024 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_param_cmd_fixed_param */ |
| 3025 | A_UINT32 reserved0; |
| 3026 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3027 | /** parameter id */ |
| 3028 | A_UINT32 param_id; |
| 3029 | /** parametr value */ |
| 3030 | A_UINT32 param_value; |
| 3031 | } wmi_pdev_set_param_cmd_fixed_param; |
| 3032 | |
| 3033 | typedef struct { |
| 3034 | A_UINT32 tlv_header; |
| 3035 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_tpc_config_cmd_fixed_param */ |
| 3036 | A_UINT32 reserved0; |
| 3037 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3038 | /** parameter */ |
| 3039 | A_UINT32 param; |
| 3040 | } wmi_pdev_get_tpc_config_cmd_fixed_param; |
| 3041 | |
| 3042 | #define WMI_FAST_DIVERSITY_BIT_OFFSET 0 |
| 3043 | #define WMI_SLOW_DIVERSITY_BIT_OFFSET 1 |
| 3044 | |
| 3045 | typedef struct { |
| 3046 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_antenna_diversity_cmd_fixed_param */ |
| 3047 | A_UINT32 mac_id; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3048 | /** parameter */ |
| 3049 | A_UINT32 value; /** bit0 is for enable/disable FAST diversity, and bit1 is for enable/disable SLOW diversity, 0->disable, 1->enable */ |
| 3050 | } wmi_pdev_set_antenna_diversity_cmd_fixed_param; |
| 3051 | |
| 3052 | #define WMI_MAX_RSSI_THRESHOLD_SUPPORTED 3 |
| 3053 | |
| 3054 | typedef struct { |
| 3055 | /* |
| 3056 | * TLV tag and len; tag equals |
| 3057 | * WMITLV_TAG_STRUC_wmi_rssi_breach_monitor_config_cmd_fixed_param |
| 3058 | */ |
| 3059 | A_UINT32 tlv_header; |
| 3060 | /* vdev_id, where RSSI monitoring will take place */ |
| 3061 | A_UINT32 vdev_id; |
| 3062 | /* |
| 3063 | * host will configure request_id and firmware echo |
| 3064 | * this id in RSSI_BREACH_EVENT |
| 3065 | */ |
| 3066 | A_UINT32 request_id; |
| 3067 | /* |
| 3068 | * bit [0-2] = low_rssi_breach_enabled[0-2] |
| 3069 | * enabled, bit [3-5] = hi_rssi_breach_enabled[0-2] |
| 3070 | */ |
| 3071 | A_UINT32 enabled_bitmap; |
| 3072 | /* unit dBm. host driver to make sure [0] > [1] > [2] */ |
| 3073 | A_UINT32 low_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3074 | /* unit dBm. host driver to make sure [0] < [1] < [2] */ |
| 3075 | A_UINT32 hi_rssi_breach_threshold[WMI_MAX_RSSI_THRESHOLD_SUPPORTED]; |
| 3076 | /* |
| 3077 | * unit dBm. once low rssi[] breached, same event |
| 3078 | * bitmap will be generated only after signal gets better |
| 3079 | * than this level. This value is adopted for all low_rssi_breach_threshold[3] |
| 3080 | */ |
| 3081 | A_UINT32 lo_rssi_reenable_hysteresis; |
| 3082 | /* |
| 3083 | * unit dBm. once hi rssi[] breached, same event bitmap |
| 3084 | * will be generated only after signal gets worse than this |
| 3085 | * level. This value is adopted for all hi_rssi_breach_threshold[3] |
| 3086 | */ |
| 3087 | A_UINT32 hi_rssi_reenable_histeresis; |
| 3088 | /* |
| 3089 | * After last event is generated, we wait |
| 3090 | * until this interval to generate next event |
| 3091 | */ |
| 3092 | A_UINT32 min_report_interval; |
| 3093 | /* this is to suppress number of event to be generated */ |
| 3094 | A_UINT32 max_num_report; |
| 3095 | } wmi_rssi_breach_monitor_config_fixed_param; |
| 3096 | |
| 3097 | typedef struct { |
| 3098 | /** parameter */ |
| 3099 | A_UINT32 param; |
| 3100 | } wmi_pdev_dump_cmd; |
| 3101 | |
| 3102 | typedef enum { |
| 3103 | PAUSE_TYPE_CHOP = 0x1, |
| 3104 | /** for MCC (switch channel), only vdev_map is valid */ |
| 3105 | PAUSE_TYPE_PS = 0x2, /** for peer station sleep in sap mode, only peer_id is valid */ |
| 3106 | PAUSE_TYPE_UAPSD = 0x3, |
| 3107 | /** for uapsd, only peer_id and tid_map are valid. */ |
| 3108 | PAUSE_TYPE_P2P_CLIENT_NOA = 0x4, |
| 3109 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 3110 | PAUSE_TYPE_P2P_GO_PS = 0x5, |
| 3111 | /** only vdev_map is valid, actually only one vdev id is set at one time */ |
| 3112 | PAUSE_TYPE_STA_ADD_BA = 0x6, |
| 3113 | /** only peer_id and tid_map are valid, actually only one tid is set at one time */ |
| 3114 | PAUSE_TYPE_AP_PS = 0x7, |
| 3115 | /** for pausing AP vdev when all the connected clients are in PS. only vdev_map is valid */ |
| 3116 | PAUSE_TYPE_IBSS_PS = 0x8, |
| 3117 | /** for pausing IBSS vdev when all the peers are in PS. only vdev_map is valid */ |
| 3118 | PAUSE_TYPE_HOST = 0x15, |
| 3119 | /** host is requesting vdev pause */ |
| 3120 | } wmi_tx_pause_type; |
| 3121 | |
| 3122 | typedef enum { |
| 3123 | ACTION_PAUSE = 0x0, |
| 3124 | ACTION_UNPAUSE = 0x1, |
| 3125 | } wmi_tx_pause_action; |
| 3126 | |
| 3127 | typedef struct { |
| 3128 | A_UINT32 tlv_header; |
| 3129 | A_UINT32 pause_type; |
| 3130 | A_UINT32 action; |
| 3131 | A_UINT32 vdev_map; |
| 3132 | A_UINT32 peer_id; |
| 3133 | A_UINT32 tid_map; |
| 3134 | } wmi_tx_pause_event_fixed_param; |
| 3135 | |
| 3136 | typedef enum { |
| 3137 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK = 0, |
| 3138 | WMI_MGMT_TX_COMP_TYPE_DISCARD, |
| 3139 | WMI_MGMT_TX_COMP_TYPE_INSPECT, |
| 3140 | WMI_MGMT_TX_COMP_TYPE_COMPLETE_NO_ACK, |
| 3141 | WMI_MGMT_TX_COMP_TYPE_MAX, |
| 3142 | } WMI_MGMT_TX_COMP_STATUS_TYPE; |
| 3143 | |
| 3144 | typedef struct { |
| 3145 | A_UINT32 tlv_header; |
| 3146 | A_UINT32 desc_id; /* from tx_send_cmd */ |
| 3147 | A_UINT32 status; /* WMI_MGMT_TX_COMP_STATUS_TYPE */ |
| 3148 | } wmi_mgmt_tx_compl_event_fixed_param; |
| 3149 | |
| 3150 | #define WMI_TPC_RATE_MAX 160 |
| 3151 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */ |
| 3152 | #define WMI_TPC_TX_NUM_CHAIN 4 |
| 3153 | |
| 3154 | typedef enum { |
| 3155 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, |
| 3156 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, |
| 3157 | WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, |
| 3158 | } WMI_TPC_CONFIG_EVENT_FLAG; |
| 3159 | |
| 3160 | typedef struct { |
| 3161 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_config_event_fixed_param */ |
| 3162 | A_UINT32 regDomain; |
| 3163 | A_UINT32 chanFreq; |
| 3164 | A_UINT32 phyMode; |
| 3165 | A_UINT32 twiceAntennaReduction; |
| 3166 | A_UINT32 twiceMaxRDPower; |
| 3167 | A_INT32 twiceAntennaGain; |
| 3168 | A_UINT32 powerLimit; |
| 3169 | A_UINT32 rateMax; |
| 3170 | A_UINT32 numTxChain; |
| 3171 | A_UINT32 ctl; |
| 3172 | A_UINT32 flags; |
| 3173 | /* WMI_TPC_TX_NUM_CHAIN macro can't be changed without breaking the WMI compatibility */ |
| 3174 | A_INT8 maxRegAllowedPower[WMI_TPC_TX_NUM_CHAIN]; |
| 3175 | A_INT8 |
| 3176 | maxRegAllowedPowerAGCDD[WMI_TPC_TX_NUM_CHAIN] |
| 3177 | [WMI_TPC_TX_NUM_CHAIN]; |
| 3178 | A_INT8 |
| 3179 | maxRegAllowedPowerAGSTBC[WMI_TPC_TX_NUM_CHAIN] |
| 3180 | [WMI_TPC_TX_NUM_CHAIN]; |
| 3181 | A_INT8 |
| 3182 | maxRegAllowedPowerAGTXBF[WMI_TPC_TX_NUM_CHAIN] |
| 3183 | [WMI_TPC_TX_NUM_CHAIN]; |
| 3184 | /* This TLV is followed by a byte array: |
| 3185 | * A_UINT8 ratesArray[]; |
| 3186 | */ |
| 3187 | } wmi_pdev_tpc_config_event_fixed_param; |
| 3188 | |
| 3189 | typedef struct { |
| 3190 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_l1ss_track_event_fixed_param */ |
| 3191 | A_UINT32 periodCnt; |
| 3192 | A_UINT32 L1Cnt; |
| 3193 | A_UINT32 L11Cnt; |
| 3194 | A_UINT32 L12Cnt; |
| 3195 | A_UINT32 L1Entry; |
| 3196 | A_UINT32 L11Entry; |
| 3197 | A_UINT32 L12Entry; |
| 3198 | } wmi_pdev_l1ss_track_event_fixed_param; |
| 3199 | |
| 3200 | typedef struct { |
| 3201 | A_UINT32 len; |
| 3202 | A_UINT32 msgref; |
| 3203 | A_UINT32 segmentInfo; |
| 3204 | } wmi_pdev_seg_hdr_info; |
| 3205 | |
| 3206 | /* |
| 3207 | * Transmit power scale factor. |
| 3208 | * |
| 3209 | */ |
| 3210 | typedef enum { |
| 3211 | WMI_TP_SCALE_MAX = 0, /* no scaling (default) */ |
| 3212 | WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */ |
| 3213 | WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */ |
| 3214 | WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */ |
| 3215 | WMI_TP_SCALE_MIN = 4, /* min, but still on */ |
| 3216 | WMI_TP_SCALE_SIZE = 5, /* max num of enum */ |
| 3217 | } WMI_TP_SCALE; |
| 3218 | |
| 3219 | #define WMI_MAX_DEBUG_MESG (sizeof(A_UINT32) * 32) |
| 3220 | |
| 3221 | typedef struct { |
| 3222 | /** message buffer, NULL terminated */ |
| 3223 | char bufp[WMI_MAX_DEBUG_MESG]; |
| 3224 | } wmi_debug_mesg_event; |
| 3225 | |
| 3226 | enum { |
| 3227 | /** IBSS station */ |
| 3228 | VDEV_TYPE_IBSS = 0, |
| 3229 | /** infra STA */ |
| 3230 | VDEV_TYPE_STA = 1, |
| 3231 | /** infra AP */ |
| 3232 | VDEV_TYPE_AP = 2, |
| 3233 | /** Monitor */ |
| 3234 | VDEV_TYPE_MONITOR = 3, |
| 3235 | /** OCB */ |
| 3236 | VDEV_TYPE_OCB = 6, |
| 3237 | }; |
| 3238 | |
| 3239 | enum { |
| 3240 | /** P2P device */ |
| 3241 | VDEV_SUBTYPE_P2PDEV = 0, |
| 3242 | /** P2P client */ |
| 3243 | VDEV_SUBTYPE_P2PCLI, |
| 3244 | /** P2P GO */ |
| 3245 | VDEV_SUBTYPE_P2PGO, |
| 3246 | /** BT3.0 HS */ |
| 3247 | VDEV_SUBTYPE_BT, |
| 3248 | }; |
| 3249 | |
| 3250 | typedef struct { |
| 3251 | /** idnore power , only use flags , mode and freq */ |
| 3252 | wmi_channel chan; |
| 3253 | } wmi_pdev_set_channel_cmd; |
| 3254 | |
| 3255 | typedef enum { |
| 3256 | WMI_PKTLOG_EVENT_RX = 0x1, |
| 3257 | WMI_PKTLOG_EVENT_TX = 0x2, |
| 3258 | WMI_PKTLOG_EVENT_RCF = 0x4, /* Rate Control Find */ |
| 3259 | WMI_PKTLOG_EVENT_RCU = 0x8, /* Rate Control Update */ |
| 3260 | /* 0x10 used by deprecated DBG_PRINT */ |
| 3261 | WMI_PKTLOG_EVENT_SMART_ANTENNA = 0x20, /* To support Smart Antenna */ |
| 3262 | } WMI_PKTLOG_EVENT; |
| 3263 | |
| 3264 | typedef struct { |
| 3265 | A_UINT32 tlv_header; |
| 3266 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_enable_cmd_fixed_param */ |
| 3267 | A_UINT32 reserved0; |
| 3268 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3269 | WMI_PKTLOG_EVENT evlist; |
| 3270 | } wmi_pdev_pktlog_enable_cmd_fixed_param; |
| 3271 | |
| 3272 | typedef struct { |
| 3273 | A_UINT32 tlv_header; |
| 3274 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_pktlog_disable_cmd_fixed_param */ |
| 3275 | A_UINT32 reserved0; |
| 3276 | } wmi_pdev_pktlog_disable_cmd_fixed_param; |
| 3277 | |
| 3278 | /** Customize the DSCP (bit) to TID (0-7) mapping for QOS. |
| 3279 | * NOTE: This constant cannot be changed without breaking |
| 3280 | * WMI Compatibility. */ |
| 3281 | |
| 3282 | #define WMI_DSCP_MAP_MAX (64) |
| 3283 | /* |
| 3284 | * @brief dscp_tid_map_cmdid - command to send the dscp to tid map to the target |
| 3285 | * @details |
| 3286 | * Create an API for sending the custom DSCP-to-TID map to the target |
| 3287 | * If this is a request from the user space or from above the UMAC |
| 3288 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 3289 | * Provide a place holder for this API in the ieee80211com (ic). |
| 3290 | * |
| 3291 | * This API will be a function pointer in the ieee80211com (ic). Any user space calls for manually setting the DSCP-to-TID mapping |
| 3292 | * in the target should be directed to the function pointer in the ic. |
| 3293 | * |
| 3294 | * Implementation details of the API to send the map to the target are as described- |
| 3295 | * |
| 3296 | * 1. The function will have 2 arguments- struct ieee80211com, DSCP-to-TID map. |
| 3297 | * DSCP-to-TID map is a one dimensional uint32_t array of length 64 to accomodate |
| 3298 | * 64 TID values for 2^6 (64) DSCP ids. |
| 3299 | * Example: |
| 3300 | * A_UINT32 dscp_tid_map[WMI_DSCP_MAP_MAX] = { |
| 3301 | * 0, 0, 0, 0, 0, 0, 0, 0, |
| 3302 | * 1, 1, 1, 1, 1, 1, 1, 1, |
| 3303 | * 2, 2, 2, 2, 2, 2, 2, 2, |
| 3304 | * 3, 3, 3, 3, 3, 3, 3, 3, |
| 3305 | * 4, 4, 4, 4, 4, 4, 4, 4, |
| 3306 | * 5, 5, 5, 5, 5, 5, 5, 5, |
| 3307 | * 6, 6, 6, 6, 6, 6, 6, 6, |
| 3308 | * 7, 7, 7, 7, 7, 7, 7, 7, |
| 3309 | * }; |
| 3310 | * |
| 3311 | * 2. Request for the WMI buffer of size equal to the size of the DSCP-to-TID map. |
| 3312 | * |
| 3313 | * 3. Copy the DSCP-to-TID map into the WMI buffer. |
| 3314 | * |
| 3315 | * 4. Invoke the wmi_unified_cmd_send to send the cmd buffer to the target with the |
| 3316 | * WMI_PDEV_SET_DSCP_TID_MAP_CMDID. Arguments to the wmi send cmd API |
| 3317 | * (wmi_unified_send_cmd) are wmi handle, cmd buffer, length of the cmd buffer and |
| 3318 | * the WMI_PDEV_SET_DSCP_TID_MAP_CMDID id. |
| 3319 | * |
| 3320 | */ |
| 3321 | typedef struct { |
| 3322 | A_UINT32 tlv_header; |
| 3323 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_dscp_tid_map_cmd_fixed_param */ |
| 3324 | A_UINT32 reserved0; |
| 3325 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3326 | /* map indicating DSCP to TID conversion */ |
| 3327 | A_UINT32 dscp_to_tid_map[WMI_DSCP_MAP_MAX]; |
| 3328 | } wmi_pdev_set_dscp_tid_map_cmd_fixed_param; |
| 3329 | |
| 3330 | /** Fixed rate (rate-code) for broadcast/ multicast data frames */ |
| 3331 | /* @brief bcast_mcast_data_rate - set the rates for the bcast/ mcast frames |
| 3332 | * @details |
| 3333 | * Create an API for setting the custom rate for the MCAST and BCAST frames |
| 3334 | * in the target. If this is a request from the user space or from above the UMAC |
| 3335 | * then the best place to implement this is in the umac_if_offload of the OL path. |
| 3336 | * Provide a place holder for this API in the ieee80211com (ic). |
| 3337 | * |
| 3338 | * Implementation details of the API to set custom rates for MCAST and BCAST in |
| 3339 | * the target are as described- |
| 3340 | * |
| 3341 | * 1. The function will have 3 arguments- |
| 3342 | * vap structure, |
| 3343 | * MCAST/ BCAST identifier code, |
| 3344 | * 8 bit rate code |
| 3345 | * |
| 3346 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 3347 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 3348 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 3349 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 3350 | * OFDM : 0: OFDM 48 Mbps |
| 3351 | * 1: OFDM 24 Mbps |
| 3352 | * 2: OFDM 12 Mbps |
| 3353 | * 3: OFDM 6 Mbps |
| 3354 | * 4: OFDM 54 Mbps |
| 3355 | * 5: OFDM 36 Mbps |
| 3356 | * 6: OFDM 18 Mbps |
| 3357 | * 7: OFDM 9 Mbps |
| 3358 | * CCK (pream == 1) |
| 3359 | * 0: CCK 11 Mbps Long |
| 3360 | * 1: CCK 5.5 Mbps Long |
| 3361 | * 2: CCK 2 Mbps Long |
| 3362 | * 3: CCK 1 Mbps Long |
| 3363 | * 4: CCK 11 Mbps Short |
| 3364 | * 5: CCK 5.5 Mbps Short |
| 3365 | * 6: CCK 2 Mbps Short |
| 3366 | * HT/VHT (pream == 2/3) |
| 3367 | * 0..7: MCS0..MCS7 (HT) |
| 3368 | * 0..9: MCS0..MCS9 (VHT) |
| 3369 | * |
| 3370 | * 2. Invoke the wmi_unified_vdev_set_param_send to send the rate value |
| 3371 | * to the target. |
| 3372 | * Arguments to the API are- |
| 3373 | * wmi handle, |
| 3374 | * VAP interface id (av_if_id) defined in ol_ath_vap_net80211, |
| 3375 | * WMI_VDEV_PARAM_BCAST_DATA_RATE/ WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 3376 | * rate value. |
| 3377 | */ |
| 3378 | typedef enum { |
| 3379 | WMI_SET_MCAST_RATE, |
| 3380 | WMI_SET_BCAST_RATE |
| 3381 | } MCAST_BCAST_RATE_ID; |
| 3382 | |
| 3383 | typedef struct { |
| 3384 | MCAST_BCAST_RATE_ID rate_id; |
| 3385 | A_UINT32 rate; |
| 3386 | } mcast_bcast_rate; |
| 3387 | |
| 3388 | typedef struct { |
| 3389 | A_UINT32 tlv_header; |
| 3390 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_params */ |
| 3391 | A_UINT32 cwmin; |
| 3392 | A_UINT32 cwmax; |
| 3393 | A_UINT32 aifs; |
| 3394 | A_UINT32 txoplimit; |
| 3395 | A_UINT32 acm; |
| 3396 | A_UINT32 no_ack; |
| 3397 | } wmi_wmm_params; |
| 3398 | |
| 3399 | typedef struct { |
| 3400 | A_UINT32 tlv_header; |
| 3401 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */ |
| 3402 | A_UINT32 reserved0; |
| 3403 | /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3404 | A_UINT32 dg_type; |
| 3405 | |
| 3406 | /* The TLVs for the 4 AC follows: |
| 3407 | * wmi_wmm_params wmm_params_ac_be; |
| 3408 | * wmi_wmm_params wmm_params_ac_bk; |
| 3409 | * wmi_wmm_params wmm_params_ac_vi; |
| 3410 | * wmi_wmm_params wmm_params_ac_vo; |
| 3411 | */ |
| 3412 | } wmi_pdev_set_wmm_params_cmd_fixed_param; |
| 3413 | |
| 3414 | typedef enum { |
| 3415 | WMI_REQUEST_PEER_STAT = 0x01, |
| 3416 | WMI_REQUEST_AP_STAT = 0x02, |
| 3417 | WMI_REQUEST_PDEV_STAT = 0x04, |
| 3418 | WMI_REQUEST_VDEV_STAT = 0x08, |
| 3419 | WMI_REQUEST_BCNFLT_STAT = 0x10, |
| 3420 | WMI_REQUEST_VDEV_RATE_STAT = 0x20, |
| 3421 | } wmi_stats_id; |
| 3422 | |
| 3423 | typedef struct { |
| 3424 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_stats_cmd_fixed_param */ |
| 3425 | wmi_stats_id stats_id; |
| 3426 | /** unique id identifying the VDEV, generated by the caller */ |
| 3427 | A_UINT32 vdev_id; |
| 3428 | /** peer MAC address */ |
| 3429 | wmi_mac_addr peer_macaddr; |
| 3430 | } wmi_request_stats_cmd_fixed_param; |
| 3431 | |
| 3432 | /* stats type bitmap */ |
| 3433 | #define WMI_LINK_STATS_RADIO 0x00000001 |
| 3434 | #define WMI_LINK_STATS_IFACE 0x00000002 |
| 3435 | #define WMI_LINK_STATS_ALL_PEER 0x00000004 |
| 3436 | #define WMI_LINK_STATS_PER_PEER 0x00000008 |
| 3437 | |
| 3438 | /* wifi clear statistics bitmap */ |
| 3439 | #define WIFI_STATS_RADIO 0x00000001 /** all radio statistics */ |
| 3440 | #define WIFI_STATS_RADIO_CCA 0x00000002 /** cca_busy_time (within radio statistics) */ |
| 3441 | #define WIFI_STATS_RADIO_CHANNELS 0x00000004 /** all channel statistics (within radio statistics) */ |
| 3442 | #define WIFI_STATS_RADIO_SCAN 0x00000008 /** all scan statistics (within radio statistics) */ |
| 3443 | #define WIFI_STATS_IFACE 0x00000010 /** all interface statistics */ |
| 3444 | #define WIFI_STATS_IFACE_TXRATE 0x00000020 /** all tx rate statistics (within interface statistics) */ |
| 3445 | #define WIFI_STATS_IFACE_AC 0x00000040 /** all ac statistics (within interface statistics) */ |
| 3446 | #define WIFI_STATS_IFACE_CONTENTION 0x00000080 /** all contention (min, max, avg) statistics (within ac statisctics) */ |
| 3447 | #define WMI_STATS_IFACE_ALL_PEER 0x00000100 /** All peer stats on this interface */ |
| 3448 | #define WMI_STATS_IFACE_PER_PEER 0x00000200 /** Clear particular peer stats depending on the peer_mac */ |
| 3449 | |
| 3450 | /** Default value for stats if the stats collection has not started */ |
| 3451 | #define WMI_STATS_VALUE_INVALID 0xffffffff |
| 3452 | |
| 3453 | #define WMI_DIAG_ID_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 0, 16) |
| 3454 | #define WMI_DIAG_ID_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 0, 16, value) |
| 3455 | #define WMI_DIAG_TYPE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 16, 1) |
| 3456 | #define WMI_DIAG_TYPE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 16, 1, value) |
| 3457 | #define WMI_DIAG_ID_ENABLED_DISABLED_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 3458 | #define WMI_DIAG_ID_ENABLED_DISABLED_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 3459 | |
| 3460 | typedef struct { |
| 3461 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_diag_event_log_config_fixed_param */ |
| 3462 | A_UINT32 num_of_diag_events_logs; |
| 3463 | /* The TLVs will follow. |
| 3464 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 3465 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 3466 | * Bit 17 Indicate if the DIAG type is Enabled/Disabled. |
| 3467 | */ |
| 3468 | } wmi_diag_event_log_config_fixed_param; |
| 3469 | |
| 3470 | #define WMI_DIAG_FREQUENCY_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 17, 1) |
| 3471 | #define WMI_DIAG_FREQUENCY_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 17, 1, value) |
| 3472 | #define WMI_DIAG_EXT_FEATURE_GET(diag_events_logs) WMI_GET_BITS(diag_events_logs, 18, 1) |
| 3473 | #define WMI_DIAG_EXT_FEATURE_SET(diag_events_logs, value) WMI_SET_BITS(diag_events_logs, 18, 1, value) |
| 3474 | |
| 3475 | typedef struct { |
| 3476 | A_UINT32 tlv_header; |
| 3477 | A_UINT32 num_of_diag_events_logs; |
| 3478 | /* The TLVs will follow. |
| 3479 | * A_UINT32 diag_events_logs_list[]; 0-15 Bits Diag EVENT/LOG ID, |
| 3480 | * Bit 16 - DIAG type EVENT/LOG, 0 - Event, 1 - LOG |
| 3481 | * Bit 17 - Frequncy of the DIAG EVENT/LOG High Frequency -1, Low Frequency - 0 |
| 3482 | * Bit 18 - Set if the EVENTS/LOGs are used for EXT DEBUG Framework |
| 3483 | */ |
| 3484 | } wmi_diag_event_log_supported_event_fixed_params; |
| 3485 | |
| 3486 | typedef struct { |
| 3487 | /** |
| 3488 | * TLV tag and len; tag equals |
| 3489 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_fixed_param |
| 3490 | */ |
| 3491 | A_UINT32 tlv_header; |
| 3492 | /** placeholder for future */ |
| 3493 | A_UINT32 reserved0; |
| 3494 | } wmi_debug_mesg_flush_fixed_param; |
| 3495 | |
| 3496 | typedef struct { |
| 3497 | /** |
| 3498 | * TLV tag and len; tag equals |
| 3499 | * WMITLV_TAG_STRUC_wmi_debug_mesg_flush_complete_fixed_param |
| 3500 | */ |
| 3501 | A_UINT32 tlv_header; |
| 3502 | /** placeholder for future */ |
| 3503 | A_UINT32 reserved0; |
| 3504 | } wmi_debug_mesg_flush_complete_fixed_param; |
| 3505 | |
| 3506 | |
| 3507 | typedef struct { |
| 3508 | /* |
| 3509 | * TLV tag and len; tag equals |
| 3510 | * WMITLV_TAG_STRUC_wmi_rssi_breach_fixed_param |
| 3511 | * vdev_id, where RSSI breach event occurred |
| 3512 | */ |
| 3513 | A_UINT32 tlv_header; |
| 3514 | A_UINT32 vdev_id; |
| 3515 | /* request id */ |
| 3516 | A_UINT32 request_id; |
| 3517 | /* |
| 3518 | * bitmap[0-2] is corresponding to low_rssi[0-2]. bitmap[3-5] is |
| 3519 | * corresponding to hi_rssi[0-2] |
| 3520 | */ |
| 3521 | A_UINT32 event_bitmap; |
| 3522 | /* rssi at the time of RSSI breach. Unit dBm */ |
| 3523 | A_UINT32 rssi; |
| 3524 | /* bssid of the monitored AP's */ |
| 3525 | wmi_mac_addr bssid; |
| 3526 | } wmi_rssi_breach_event_fixed_param; |
| 3527 | |
| 3528 | |
| 3529 | typedef struct { |
| 3530 | /** TLV tag and len; tag equals |
| 3531 | * WMITLV_TAG_STRUC_wmi_fw_mem_dump */ |
| 3532 | A_UINT32 tlv_header; |
| 3533 | /** unique id identifying the segment */ |
| 3534 | A_UINT32 seg_id; |
| 3535 | /** Start address of the segment to be read */ |
| 3536 | A_UINT32 seg_start_addr_lo; |
| 3537 | A_UINT32 seg_start_addr_hi; |
| 3538 | /** Length of the segment to be read */ |
| 3539 | A_UINT32 seg_length; |
| 3540 | /** Host bufeer address to which the segment will be read and dumped */ |
| 3541 | A_UINT32 dest_addr_lo; |
| 3542 | A_UINT32 dest_addr_hi; |
| 3543 | } wmi_fw_mem_dump; |
| 3544 | |
| 3545 | /* Command to get firmware memory dump*/ |
| 3546 | typedef struct { |
| 3547 | /** TLV tag and len; tag equals |
| 3548 | * WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */ |
| 3549 | A_UINT32 tlv_header; |
| 3550 | /** unique id identifying the request */ |
| 3551 | A_UINT32 request_id; |
| 3552 | /** number of memory dump segments */ |
| 3553 | A_UINT32 num_fw_mem_dump_segs; |
| 3554 | /** |
| 3555 | * This TLV is followed by another TLV |
| 3556 | * wmi_fw_mem_dump fw_mem_dump[]; |
| 3557 | */ |
| 3558 | } wmi_get_fw_mem_dump_fixed_param; |
| 3559 | |
| 3560 | /** Event to indicate the completion of fw mem dump */ |
| 3561 | typedef struct { |
| 3562 | /* TLV tag and len; tag equals |
| 3563 | * WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */ |
| 3564 | A_UINT32 tlv_header; |
| 3565 | /** unique id identifying the request, given |
| 3566 | * in the request stats command */ |
| 3567 | A_UINT32 request_id; |
| 3568 | /*In case of Firmware memory dump */ |
| 3569 | A_UINT32 fw_mem_dump_complete; |
| 3570 | } wmi_update_fw_mem_dump_fixed_param; |
| 3571 | |
| 3572 | typedef enum { |
| 3573 | WMI_ROAMING_IDLE = 0, |
| 3574 | WMI_ROAMING_ACTIVE = 1, |
| 3575 | } wmi_roam_state; |
| 3576 | |
| 3577 | /* access categories */ |
| 3578 | typedef enum { |
| 3579 | WMI_AC_VO = 0, |
| 3580 | WMI_AC_VI = 1, |
| 3581 | WMI_AC_BE = 2, |
| 3582 | WMI_AC_BK = 3, |
| 3583 | WMI_AC_MAX = 4, |
| 3584 | } wmi_traffic_ac; |
| 3585 | |
| 3586 | typedef enum { |
| 3587 | WMI_STA_STATS = 0, |
| 3588 | WMI_SOFTAP_STATS = 1, |
| 3589 | WMI_IBSS_STATS = 2, |
| 3590 | WMI_P2P_CLIENT_STATS = 3, |
| 3591 | WMI_P2P_GO_STATS = 4, |
| 3592 | WMI_NAN_STATS = 5, |
| 3593 | WMI_MESH_STATS = 6, |
| 3594 | } wmi_link_iface_type; |
| 3595 | |
| 3596 | /* channel operating width */ |
| 3597 | typedef enum { |
| 3598 | WMI_CHAN_WIDTH_20 = 0, |
| 3599 | WMI_CHAN_WIDTH_40 = 1, |
| 3600 | WMI_CHAN_WIDTH_80 = 2, |
| 3601 | WMI_CHAN_WIDTH_160 = 3, |
| 3602 | WMI_CHAN_WIDTH_80P80 = 4, |
| 3603 | WMI_CHAN_WIDTH_5 = 5, |
| 3604 | WMI_CHAN_WIDTH_10 = 6, |
| 3605 | } wmi_channel_width; |
| 3606 | |
| 3607 | /*Clear stats*/ |
| 3608 | typedef struct { |
| 3609 | A_UINT32 tlv_header; |
| 3610 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */ |
| 3611 | /** unique id identifying the VDEV, generated by the caller */ |
| 3612 | A_UINT32 vdev_id; |
| 3613 | /** stop_stats_collection_req = 1 will imply stop the statistics collection */ |
| 3614 | A_UINT32 stop_stats_collection_req; |
| 3615 | /** identifies what stats to be cleared */ |
| 3616 | A_UINT32 stats_clear_req_mask; |
| 3617 | /** identifies which peer stats to be cleared. Valid only while clearing PER_REER */ |
| 3618 | wmi_mac_addr peer_macaddr; |
| 3619 | } wmi_clear_link_stats_cmd_fixed_param; |
| 3620 | |
| 3621 | /* Link Stats configuration params. Trigger the link layer statistics collection*/ |
| 3622 | typedef struct { |
| 3623 | A_UINT32 tlv_header; |
| 3624 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param */ |
| 3625 | /** threshold to classify the pkts as short or long */ |
| 3626 | A_UINT32 mpdu_size_threshold; |
| 3627 | /** set for field debug mode. Driver should collect all statistics regardless of performance impact.*/ |
| 3628 | A_UINT32 aggressive_statistics_gathering; |
| 3629 | } wmi_start_link_stats_cmd_fixed_param; |
| 3630 | |
| 3631 | typedef struct { |
| 3632 | A_UINT32 tlv_header; |
| 3633 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_link_stats_cmd_fixed_param */ |
| 3634 | /** Type of stats required. This is a bitmask WMI_LINK_STATS_RADIO, WMI_LINK_STATS_IFACE */ |
| 3635 | A_UINT32 stats_type; |
| 3636 | /** unique id identifying the VDEV, generated by the caller */ |
| 3637 | A_UINT32 vdev_id; |
| 3638 | /** unique id identifying the request, generated by the caller */ |
| 3639 | A_UINT32 request_id; |
| 3640 | /** peer MAC address */ |
| 3641 | wmi_mac_addr peer_macaddr; |
| 3642 | } wmi_request_link_stats_cmd_fixed_param; |
| 3643 | |
| 3644 | /* channel statistics */ |
| 3645 | typedef struct { |
| 3646 | A_UINT32 tlv_header; |
| 3647 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */ |
| 3648 | /** Channel width (20, 40, 80, 80+80, 160) enum wmi_channel_width*/ |
| 3649 | A_UINT32 channel_width; |
| 3650 | /** Primary 20 MHz channel */ |
| 3651 | A_UINT32 center_freq; |
| 3652 | /** center frequency (MHz) first segment */ |
| 3653 | A_UINT32 center_freq0; |
| 3654 | /** center frequency (MHz) second segment */ |
| 3655 | A_UINT32 center_freq1; |
| 3656 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 3657 | A_UINT32 radio_awake_time; |
| 3658 | /** msecs the CCA register is busy (32 bits number accruing over time) */ |
| 3659 | A_UINT32 cca_busy_time; |
| 3660 | } wmi_channel_stats; |
| 3661 | |
| 3662 | /* radio statistics */ |
| 3663 | typedef struct { |
| 3664 | A_UINT32 tlv_header; |
| 3665 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_radio_link_stats */ |
| 3666 | /** Wifi radio (if multiple radio supported) */ |
| 3667 | A_UINT32 radio_id; |
| 3668 | /** msecs the radio is awake (32 bits number accruing over time) */ |
| 3669 | A_UINT32 on_time; |
| 3670 | /** msecs the radio is transmitting (32 bits number accruing over time) */ |
| 3671 | A_UINT32 tx_time; |
| 3672 | /** msecs the radio is in active receive (32 bits number accruing over time) */ |
| 3673 | A_UINT32 rx_time; |
| 3674 | /** msecs the radio is awake due to all scan (32 bits number accruing over time) */ |
| 3675 | A_UINT32 on_time_scan; |
| 3676 | /** msecs the radio is awake due to NAN (32 bits number accruing over time) */ |
| 3677 | A_UINT32 on_time_nbd; |
| 3678 | /** msecs the radio is awake due to G?scan (32 bits number accruing over time) */ |
| 3679 | A_UINT32 on_time_gscan; |
| 3680 | /** msecs the radio is awake due to roam?scan (32 bits number accruing over time) */ |
| 3681 | A_UINT32 on_time_roam_scan; |
| 3682 | /** msecs the radio is awake due to PNO scan (32 bits number accruing over time) */ |
| 3683 | A_UINT32 on_time_pno_scan; |
| 3684 | /** msecs the radio is awake due to HS2.0 scans and GAS exchange (32 bits number accruing over time) */ |
| 3685 | A_UINT32 on_time_hs20; |
| 3686 | /** number of channels */ |
| 3687 | A_UINT32 num_channels; |
| 3688 | } wmi_radio_link_stats; |
| 3689 | |
| 3690 | /** Radio statistics (once started) do not stop or get reset unless wifi_clear_link_stats is invoked */ |
| 3691 | typedef struct { |
| 3692 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 3693 | /** unique id identifying the request, given in the request stats command */ |
| 3694 | A_UINT32 request_id; |
| 3695 | /** Number of radios*/ |
| 3696 | A_UINT32 num_radio; |
| 3697 | /** more_data will be set depending on the number of radios */ |
| 3698 | A_UINT32 more_radio_events; |
| 3699 | /* |
| 3700 | * This TLV is followed by another TLV of array of bytes |
| 3701 | * size of(struct wmi_radio_link_stats); |
| 3702 | * |
| 3703 | * This TLV is followed by another TLV of array of bytes |
| 3704 | * num_channels * size of(struct wmi_channel_stats) |
| 3705 | */ |
| 3706 | |
| 3707 | } wmi_radio_link_stats_event_fixed_param; |
| 3708 | |
| 3709 | /* per rate statistics */ |
| 3710 | typedef struct { |
| 3711 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rate_stats */ |
| 3712 | /** rate information |
| 3713 | * The rate-code is a 1-byte field in which:for given rate, nss and preamble |
| 3714 | * b'7-b-6 indicate the preamble (0 OFDM, 1 CCK, 2, HT, 3 VHT) |
| 3715 | * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3) |
| 3716 | * b'3-b'0 indicate the rate, which is indicated as follows: |
| 3717 | * OFDM : 0: OFDM 48 Mbps |
| 3718 | * 1: OFDM 24 Mbps |
| 3719 | * 2: OFDM 12 Mbps |
| 3720 | * 3: OFDM 6 Mbps |
| 3721 | * 4: OFDM 54 Mbps |
| 3722 | * 5: OFDM 36 Mbps |
| 3723 | * 6: OFDM 18 Mbps |
| 3724 | * 7: OFDM 9 Mbps |
| 3725 | * CCK (pream == 1) |
| 3726 | * 0: CCK 11 Mbps Long |
| 3727 | * 1: CCK 5.5 Mbps Long |
| 3728 | * 2: CCK 2 Mbps Long |
| 3729 | * 3: CCK 1 Mbps Long |
| 3730 | * 4: CCK 11 Mbps Short |
| 3731 | * 5: CCK 5.5 Mbps Short |
| 3732 | * 6: CCK 2 Mbps Short |
| 3733 | * HT/VHT (pream == 2/3) |
| 3734 | * 0..7: MCS0..MCS7 (HT) |
| 3735 | * 0..9: MCS0..MCS9 (VHT) |
| 3736 | */ |
| 3737 | A_UINT32 rate; |
| 3738 | /** units of 100 Kbps */ |
| 3739 | A_UINT32 bitrate; |
| 3740 | /** number of successfully transmitted data pkts (ACK rcvd) */ |
| 3741 | A_UINT32 tx_mpdu; |
| 3742 | /** number of received data pkts */ |
| 3743 | A_UINT32 rx_mpdu; |
| 3744 | /** number of data packet losses (no ACK) */ |
| 3745 | A_UINT32 mpdu_lost; |
| 3746 | /** total number of data pkt retries */ |
| 3747 | A_UINT32 retries; |
| 3748 | /** number of short data pkt retries */ |
| 3749 | A_UINT32 retries_short; |
| 3750 | /** number of long data pkt retries */ |
| 3751 | A_UINT32 retries_long; |
| 3752 | } wmi_rate_stats; |
| 3753 | |
| 3754 | typedef struct { |
| 3755 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_link_stats */ |
| 3756 | /** peer type (AP, TDLS, GO etc.) enum wmi_peer_type*/ |
| 3757 | A_UINT32 peer_type; |
| 3758 | /** mac address */ |
| 3759 | wmi_mac_addr peer_mac_address; |
| 3760 | /** peer wmi_CAPABILITY_XXX */ |
| 3761 | A_UINT32 capabilities; |
| 3762 | /** number of rates */ |
| 3763 | A_UINT32 num_rates; |
| 3764 | } wmi_peer_link_stats; |
| 3765 | |
| 3766 | /** PEER statistics (once started) reset and start afresh after each connection */ |
| 3767 | typedef struct { |
| 3768 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_stats_event_fixed_param */ |
| 3769 | /** unique id identifying the request, given in the request stats command */ |
| 3770 | A_UINT32 request_id; |
| 3771 | /** number of peers accomidated in this particular event */ |
| 3772 | A_UINT32 num_peers; |
| 3773 | /** Indicates the fragment number */ |
| 3774 | A_UINT32 peer_event_number; |
| 3775 | /** Indicates if there are more peers which will be sent as seperate peer_stats event */ |
| 3776 | A_UINT32 more_data; |
| 3777 | |
| 3778 | /** |
| 3779 | * This TLV is followed by another TLV |
| 3780 | * num_peers * size of(struct wmi_peer_stats) |
| 3781 | * num_rates * size of(struct wmi_rate_stats). num_rates is the sum of the rates of all the peers. |
| 3782 | */ |
| 3783 | } wmi_peer_stats_event_fixed_param; |
| 3784 | |
| 3785 | /* per access category statistics */ |
| 3786 | typedef struct { |
| 3787 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wmm_ac_stats */ |
| 3788 | /** access category (VI, VO, BE, BK) enum wmi_traffic_ac*/ |
| 3789 | A_UINT32 ac_type; |
| 3790 | /** number of successfully transmitted unicast data pkts (ACK rcvd) */ |
| 3791 | A_UINT32 tx_mpdu; |
| 3792 | /** number of received unicast mpdus */ |
| 3793 | A_UINT32 rx_mpdu; |
| 3794 | /** number of succesfully transmitted multicast data packets */ |
| 3795 | /** STA case: implies ACK received from AP for the unicast packet in which mcast pkt was sent */ |
| 3796 | A_UINT32 tx_mcast; |
| 3797 | /** number of received multicast data packets */ |
| 3798 | A_UINT32 rx_mcast; |
| 3799 | /** number of received unicast a-mpdus */ |
| 3800 | A_UINT32 rx_ampdu; |
| 3801 | /** number of transmitted unicast a-mpdus */ |
| 3802 | A_UINT32 tx_ampdu; |
| 3803 | /** number of data pkt losses (no ACK) */ |
| 3804 | A_UINT32 mpdu_lost; |
| 3805 | /** total number of data pkt retries */ |
| 3806 | A_UINT32 retries; |
| 3807 | /** number of short data pkt retries */ |
| 3808 | A_UINT32 retries_short; |
| 3809 | /** number of long data pkt retries */ |
| 3810 | A_UINT32 retries_long; |
| 3811 | /** data pkt min contention time (usecs) */ |
| 3812 | A_UINT32 contention_time_min; |
| 3813 | /** data pkt max contention time (usecs) */ |
| 3814 | A_UINT32 contention_time_max; |
| 3815 | /** data pkt avg contention time (usecs) */ |
| 3816 | A_UINT32 contention_time_avg; |
| 3817 | /** num of data pkts used for contention statistics */ |
| 3818 | A_UINT32 contention_num_samples; |
| 3819 | } wmi_wmm_ac_stats; |
| 3820 | |
| 3821 | /* interface statistics */ |
| 3822 | typedef struct { |
| 3823 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats */ |
| 3824 | /** access point beacon received count from connected AP */ |
| 3825 | A_UINT32 beacon_rx; |
| 3826 | /** access point mgmt frames received count from connected AP (including Beacon) */ |
| 3827 | A_UINT32 mgmt_rx; |
| 3828 | /** action frames received count */ |
| 3829 | A_UINT32 mgmt_action_rx; |
| 3830 | /** action frames transmit count */ |
| 3831 | A_UINT32 mgmt_action_tx; |
| 3832 | /** access Point Beacon and Management frames RSSI (averaged) */ |
| 3833 | A_UINT32 rssi_mgmt; |
| 3834 | /** access Point Data Frames RSSI (averaged) from connected AP */ |
| 3835 | A_UINT32 rssi_data; |
| 3836 | /** access Point ACK RSSI (averaged) from connected AP */ |
| 3837 | A_UINT32 rssi_ack; |
| 3838 | /** number of peers */ |
| 3839 | A_UINT32 num_peers; |
| 3840 | /** Indicates how many peer_stats events will be sent depending on the num_peers. */ |
| 3841 | A_UINT32 num_peer_events; |
| 3842 | /** number of ac */ |
| 3843 | A_UINT32 num_ac; |
| 3844 | /** Roaming Stat */ |
| 3845 | A_UINT32 roam_state; |
| 3846 | /** |
| 3847 | * Average Beacon spread offset is the averaged time delay between TBTT |
| 3848 | * and beacon TSF */ |
| 3849 | /** Upper 32 bits of averaged 64 bit beacon spread offset */ |
| 3850 | A_UINT32 avg_bcn_spread_offset_high; |
| 3851 | /** Lower 32 bits of averaged 64 bit beacon spread offset */ |
| 3852 | A_UINT32 avg_bcn_spread_offset_low; |
| 3853 | /** Takes value of 1 if AP leaks packets after sending an ACK for PM=1 otherwise 0 */ |
| 3854 | A_UINT32 is_leaky_ap; |
| 3855 | /** Average number of frames received from AP after receiving the ACK for a frame with PM=1 */ |
| 3856 | A_UINT32 avg_rx_frms_leaked; |
| 3857 | /** Rx leak watch window currently in force to minimize data loss |
| 3858 | * because of leaky AP. Rx leak window is the |
| 3859 | * time driver waits before shutting down the radio or switching the |
| 3860 | * channel and after receiving an ACK for |
| 3861 | * a data frame with PM bit set) */ |
| 3862 | A_UINT32 rx_leak_window; |
| 3863 | } wmi_iface_link_stats; |
| 3864 | |
| 3865 | /** Interface statistics (once started) reset and start afresh after each connection */ |
| 3866 | typedef struct { |
| 3867 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param */ |
| 3868 | /** unique id identifying the request, given in the request stats command */ |
| 3869 | A_UINT32 request_id; |
| 3870 | /** unique id identifying the VDEV, generated by the caller */ |
| 3871 | A_UINT32 vdev_id; |
| 3872 | /* |
| 3873 | * This TLV is followed by another TLV |
| 3874 | * wmi_iface_link_stats iface_link_stats; |
| 3875 | * num_ac * size of(struct wmi_wmm_ac_stats) |
| 3876 | */ |
| 3877 | } wmi_iface_link_stats_event_fixed_param; |
| 3878 | |
| 3879 | /** Suspend option */ |
| 3880 | enum { |
| 3881 | WMI_PDEV_SUSPEND, /* suspend */ |
| 3882 | WMI_PDEV_SUSPEND_AND_DISABLE_INTR, /* suspend and disable all interrupts */ |
| 3883 | }; |
| 3884 | |
| 3885 | typedef struct { |
| 3886 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_suspend_cmd_fixed_param */ |
| 3887 | /* suspend option sent to target */ |
| 3888 | A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */ |
| 3889 | A_UINT32 suspend_opt; |
| 3890 | } wmi_pdev_suspend_cmd_fixed_param; |
| 3891 | |
| 3892 | typedef struct { |
| 3893 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param */ |
| 3894 | /** Reserved for future use */ |
| 3895 | A_UINT32 reserved0; |
| 3896 | } wmi_pdev_resume_cmd_fixed_param; |
| 3897 | |
| 3898 | typedef struct { |
| 3899 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, */ |
| 3900 | A_UINT32 num_vdev_stats; /* number of vdevs */ |
| 3901 | } wmi_vdev_rate_stats_event_fixed_param; |
| 3902 | |
| 3903 | typedef struct { |
| 3904 | A_UINT32 tlv_header; /* TLV tag and len, tag equals WMITLV_TAG_STRUC_wmi_vdev_rate_ht_info */ |
| 3905 | A_UINT32 vdevid; /* Id of the wlan vdev */ |
| 3906 | A_UINT32 tx_nss; /* Bit 28 of tx_rate_kbps has this info - based on last data packet transmitted */ |
| 3907 | A_UINT32 rx_nss; /* Bit 24 of rx_rate_kbps - same as above */ |
| 3908 | A_UINT32 tx_preamble; /* Bits 30-29 from tx_rate_kbps */ |
| 3909 | A_UINT32 rx_preamble; /* Bits 26-25 from rx_rate_kbps */ |
| 3910 | } wmi_vdev_rate_ht_info; |
| 3911 | |
| 3912 | typedef struct { |
| 3913 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats_event_fixed_param */ |
| 3914 | wmi_stats_id stats_id; |
| 3915 | /** number of pdev stats event structures (wmi_pdev_stats) 0 or 1 */ |
| 3916 | A_UINT32 num_pdev_stats; |
| 3917 | /** number of vdev stats event structures (wmi_vdev_stats) 0 or max vdevs */ |
| 3918 | A_UINT32 num_vdev_stats; |
| 3919 | /** number of peer stats event structures (wmi_peer_stats) 0 or max peers */ |
| 3920 | A_UINT32 num_peer_stats; |
| 3921 | A_UINT32 num_bcnflt_stats; |
| 3922 | /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */ |
| 3923 | A_UINT32 num_chan_stats; |
| 3924 | /* This TLV is followed by another TLV of array of bytes |
| 3925 | * A_UINT8 data[]; |
| 3926 | * This data array contains |
| 3927 | * num_pdev_stats * size of(struct wmi_pdev_stats) |
| 3928 | * num_vdev_stats * size of(struct wmi_vdev_stats) |
| 3929 | * num_peer_stats * size of(struct wmi_peer_stats) |
| 3930 | * num_bcnflt_stats * size_of() |
| 3931 | * num_chan_stats * size of(struct wmi_chan_stats) |
| 3932 | * |
| 3933 | */ |
| 3934 | } wmi_stats_event_fixed_param; |
| 3935 | |
| 3936 | /** |
| 3937 | * PDEV statistics |
| 3938 | * @todo |
| 3939 | * add all PDEV stats here |
| 3940 | */ |
| 3941 | typedef struct { |
| 3942 | /** Channel noise floor */ |
| 3943 | A_INT32 chan_nf; |
| 3944 | /** TX frame count */ |
| 3945 | A_UINT32 tx_frame_count; |
| 3946 | /** RX frame count */ |
| 3947 | A_UINT32 rx_frame_count; |
| 3948 | /** rx clear count */ |
| 3949 | A_UINT32 rx_clear_count; |
| 3950 | /** cycle count */ |
| 3951 | A_UINT32 cycle_count; |
| 3952 | /** Phy error count */ |
| 3953 | A_UINT32 phy_err_count; |
| 3954 | /** Channel Tx Power */ |
| 3955 | A_UINT32 chan_tx_pwr; |
| 3956 | /** WAL dbg stats */ |
| 3957 | struct wlan_dbg_stats pdev_stats; |
| 3958 | |
| 3959 | } wmi_pdev_stats; |
| 3960 | |
| 3961 | /** |
| 3962 | * VDEV statistics |
| 3963 | * @todo |
| 3964 | * add all VDEV stats here |
| 3965 | */ |
| 3966 | |
| 3967 | typedef struct { |
| 3968 | A_INT32 bcn_snr; |
| 3969 | A_INT32 dat_snr; |
| 3970 | } wmi_snr_info; |
| 3971 | |
| 3972 | typedef struct { |
| 3973 | /** unique id identifying the VDEV, generated by the caller */ |
| 3974 | A_UINT32 vdev_id; |
| 3975 | wmi_snr_info vdev_snr; |
| 3976 | 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) */ |
| 3977 | A_UINT32 rx_frm_cnt; /* Total number of packets that were successfully received (after appropriate filter rules including multi-cast, broadcast) */ |
| 3978 | A_UINT32 multiple_retry_cnt[WLAN_MAX_AC]; /*The number of MSDU packets and MMPDU frames per AC |
| 3979 | that the 802.11 station successfully transmitted after more than one retransmission attempt */ |
| 3980 | A_UINT32 fail_cnt[WLAN_MAX_AC]; /*Total number packets(per AC) failed to transmit */ |
| 3981 | A_UINT32 rts_fail_cnt; /*Total number of RTS/CTS sequence failures for transmission of a packet */ |
| 3982 | A_UINT32 rts_succ_cnt; /*Total number of RTS/CTS sequence success for transmission of a packet */ |
| 3983 | A_UINT32 rx_err_cnt; /*The receive error count. HAL will provide the RxP FCS error global */ |
| 3984 | A_UINT32 rx_discard_cnt; /* The sum of the receive error count and dropped-receive-buffer error count. (FCS error) */ |
| 3985 | A_UINT32 ack_fail_cnt; /*Total number packets failed transmit because of no ACK from the remote entity */ |
| 3986 | A_UINT32 tx_rate_history[MAX_TX_RATE_VALUES]; /*History of last ten transmit rate, in units of 500 kbit/sec */ |
| 3987 | A_UINT32 bcn_rssi_history[MAX_RSSI_VALUES]; /*History of last ten Beacon rssi of the connected Bss */ |
| 3988 | } wmi_vdev_stats; |
| 3989 | |
| 3990 | /** |
| 3991 | * peer statistics. |
| 3992 | * |
| 3993 | * @todo |
| 3994 | * add more stats |
| 3995 | * |
| 3996 | */ |
| 3997 | typedef struct { |
| 3998 | /** peer MAC address */ |
| 3999 | wmi_mac_addr peer_macaddr; |
| 4000 | /** rssi */ |
| 4001 | A_UINT32 peer_rssi; |
| 4002 | /** last tx data rate used for peer */ |
| 4003 | A_UINT32 peer_tx_rate; |
| 4004 | /** last rx data rate used for peer */ |
| 4005 | A_UINT32 peer_rx_rate; |
| 4006 | } wmi_peer_stats; |
| 4007 | |
| 4008 | typedef struct { |
| 4009 | /** Primary channel freq of the channel for which stats are sent */ |
| 4010 | A_UINT32 chan_mhz; |
| 4011 | /** Time spent on the channel */ |
| 4012 | A_UINT32 sampling_period_us; |
| 4013 | /** Aggregate duration over a sampling period for which channel activity was observed */ |
| 4014 | A_UINT32 rx_clear_count; |
| 4015 | /** Accumalation of the TX PPDU duration over a sampling period */ |
| 4016 | A_UINT32 tx_duration_us; |
| 4017 | /** Accumalation of the RX PPDU duration over a sampling period */ |
| 4018 | A_UINT32 rx_duration_us; |
| 4019 | } wmi_chan_stats; |
| 4020 | |
| 4021 | typedef struct { |
| 4022 | A_UINT32 tlv_header; |
| 4023 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */ |
| 4024 | /** unique id identifying the VDEV, generated by the caller */ |
| 4025 | A_UINT32 vdev_id; |
| 4026 | /** VDEV type (AP,STA,IBSS,MONITOR) */ |
| 4027 | A_UINT32 vdev_type; |
| 4028 | /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/ |
| 4029 | A_UINT32 vdev_subtype; |
| 4030 | /** VDEV MAC address */ |
| 4031 | wmi_mac_addr vdev_macaddr; |
| 4032 | /* Number of configured txrx streams */ |
| 4033 | A_UINT32 num_cfg_txrx_streams; |
| 4034 | /* |
| 4035 | * This TLV is followed by another TLV of array of structures |
| 4036 | * wmi_vdev_txrx_streams cfg_txrx_streams[]; |
| 4037 | */ |
| 4038 | } wmi_vdev_create_cmd_fixed_param; |
| 4039 | |
| 4040 | typedef struct { |
| 4041 | /* |
| 4042 | * TLV tag and len; tag equals |
| 4043 | * WMITLV_TAG_STRUC_wmi_vdev_txrx_streams |
| 4044 | */ |
| 4045 | A_UINT32 tlv_header; |
| 4046 | /* band - Should take values from wmi_channel_band_mask */ |
| 4047 | A_UINT32 band; |
| 4048 | /* max supported tx streams per given band for this vdev */ |
| 4049 | A_UINT32 supported_tx_streams; |
| 4050 | /* max supported rx streams per given band for this vdev */ |
| 4051 | A_UINT32 supported_rx_streams; |
| 4052 | } wmi_vdev_txrx_streams; |
| 4053 | |
| 4054 | /* wmi_p2p_noa_descriptor structure can't be modified without breaking the compatibility for WMI_HOST_SWBA_EVENTID */ |
| 4055 | typedef struct { |
| 4056 | A_UINT32 tlv_header; |
| 4057 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor */ |
| 4058 | A_UINT32 type_count; |
| 4059 | /** 255: continuous schedule, 0: reserved */ |
| 4060 | A_UINT32 duration; |
| 4061 | /** Absent period duration in micro seconds */ |
| 4062 | A_UINT32 interval; |
| 4063 | /** Absent period interval in micro seconds */ |
| 4064 | A_UINT32 start_time; |
| 4065 | /** 32 bit tsf time when in starts */ |
| 4066 | } wmi_p2p_noa_descriptor; |
| 4067 | |
| 4068 | /** values for vdev_type */ |
| 4069 | #define WMI_VDEV_TYPE_AP 0x1 |
| 4070 | #define WMI_VDEV_TYPE_STA 0x2 |
| 4071 | #define WMI_VDEV_TYPE_IBSS 0x3 |
| 4072 | #define WMI_VDEV_TYPE_MONITOR 0x4 |
| 4073 | |
| 4074 | /** VDEV type is for social wifi interface.This VDEV is Currently mainly needed |
| 4075 | * by FW to execute the NAN specific WMI commands and also implement NAN specific |
| 4076 | * operations like Network discovery, service provisioning and service |
| 4077 | * subscription ..etc. If FW needs NAN VDEV then Host should issue VDEV create |
| 4078 | * WMI command to create this VDEV once during initialization and host is not |
| 4079 | * expected to use any VDEV specific WMI commands on this VDEV. |
| 4080 | **/ |
| 4081 | #define WMI_VDEV_TYPE_NAN 0x5 |
| 4082 | |
| 4083 | #define WMI_VDEV_TYPE_OCB 0x6 |
| 4084 | |
| 4085 | /** values for vdev_subtype */ |
| 4086 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE 0x1 |
| 4087 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_CLIENT 0x2 |
| 4088 | #define WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO 0x3 |
| 4089 | |
| 4090 | /** values for vdev_start_request flags */ |
| 4091 | /** Indicates that AP VDEV uses hidden ssid. only valid for |
| 4092 | * AP/GO */ |
| 4093 | #define WMI_UNIFIED_VDEV_START_HIDDEN_SSID (1<<0) |
| 4094 | /** Indicates if robust management frame/management frame |
| 4095 | * protection is enabled. For GO/AP vdevs, it indicates that |
| 4096 | * it may support station/client associations with RMF enabled. |
| 4097 | * For STA/client vdevs, it indicates that sta will |
| 4098 | * associate with AP with RMF enabled. */ |
| 4099 | #define WMI_UNIFIED_VDEV_START_PMF_ENABLED (1<<1) |
| 4100 | |
| 4101 | /* |
| 4102 | * Host is sending bcn_tx_rate to override the beacon tx rates. |
| 4103 | */ |
| 4104 | #define WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT (1<<2) |
| 4105 | |
| 4106 | typedef struct { |
| 4107 | A_UINT32 tlv_header; |
| 4108 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_request_cmd_fixed_param */ |
| 4109 | /** unique id identifying the VDEV, generated by the caller */ |
| 4110 | A_UINT32 vdev_id; |
| 4111 | /** requestor id identifying the caller module */ |
| 4112 | A_UINT32 requestor_id; |
| 4113 | /** beacon interval from received beacon */ |
| 4114 | A_UINT32 beacon_interval; |
| 4115 | /** DTIM Period from the received beacon */ |
| 4116 | A_UINT32 dtim_period; |
| 4117 | /** Flags */ |
| 4118 | A_UINT32 flags; |
| 4119 | /** ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */ |
| 4120 | wmi_ssid ssid; |
| 4121 | /** beacon/probe reponse xmit rate. Applicable for SoftAP. */ |
| 4122 | /** This field will be invalid and ignored unless the */ |
| 4123 | /** flags field has the WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT bit. */ |
| 4124 | /** When valid, this field contains the fixed tx rate for the beacon */ |
| 4125 | /** and probe response frames send by the GO or SoftAP */ |
| 4126 | A_UINT32 bcn_tx_rate; |
| 4127 | /** beacon/probe reponse xmit power. Applicable for SoftAP. */ |
| 4128 | A_UINT32 bcn_txPower; |
| 4129 | /** number of p2p NOA descriptor(s) from scan entry */ |
| 4130 | A_UINT32 num_noa_descriptors; |
| 4131 | /** Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID. |
| 4132 | During CAC, Our HW shouldn't ack ditected frames */ |
| 4133 | A_UINT32 disable_hw_ack; |
| 4134 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 4135 | /** The DBS policy manager indicates the preferred number of transmit streams. */ |
| 4136 | A_UINT32 preferred_tx_streams; |
| 4137 | /** This field will be invalid unless the Dual Band Simultaneous (DBS) feature is enabled. */ |
| 4138 | /** the DBS policy manager indicates the preferred number of receive streams. */ |
| 4139 | A_UINT32 preferred_rx_streams; |
| 4140 | /* The TLVs follows this structure: |
| 4141 | * wmi_channel chan; //WMI channel |
| 4142 | * wmi_p2p_noa_descriptor noa_descriptors[]; //actual p2p NOA descriptor from scan entry |
| 4143 | */ |
| 4144 | } wmi_vdev_start_request_cmd_fixed_param; |
| 4145 | |
| 4146 | typedef struct { |
| 4147 | A_UINT32 tlv_header; |
| 4148 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_cmd_fixed_param */ |
| 4149 | /** unique id identifying the VDEV, generated by the caller */ |
| 4150 | A_UINT32 vdev_id; |
| 4151 | } wmi_vdev_delete_cmd_fixed_param; |
| 4152 | |
| 4153 | typedef struct { |
| 4154 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_up_cmdid_fixed_param */ |
| 4155 | /** unique id identifying the VDEV, generated by the caller */ |
| 4156 | A_UINT32 vdev_id; |
| 4157 | /** aid (assoc id) received in association response for STA VDEV */ |
| 4158 | A_UINT32 vdev_assoc_id; |
| 4159 | /** bssid of the BSS the VDEV is joining */ |
| 4160 | wmi_mac_addr vdev_bssid; |
| 4161 | } wmi_vdev_up_cmd_fixed_param; |
| 4162 | |
| 4163 | typedef struct { |
| 4164 | A_UINT32 tlv_header; |
| 4165 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stop_cmd_fixed_param */ |
| 4166 | /** unique id identifying the VDEV, generated by the caller */ |
| 4167 | A_UINT32 vdev_id; |
| 4168 | } wmi_vdev_stop_cmd_fixed_param; |
| 4169 | |
| 4170 | typedef struct { |
| 4171 | A_UINT32 tlv_header; |
| 4172 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_down_cmd_fixed_param */ |
| 4173 | /** unique id identifying the VDEV, generated by the caller */ |
| 4174 | A_UINT32 vdev_id; |
| 4175 | } wmi_vdev_down_cmd_fixed_param; |
| 4176 | |
| 4177 | typedef struct { |
| 4178 | /** unique id identifying the VDEV, generated by the caller */ |
| 4179 | A_UINT32 vdev_id; |
| 4180 | } wmi_vdev_standby_response_cmd; |
| 4181 | |
| 4182 | typedef struct { |
| 4183 | /** unique id identifying the VDEV, generated by the caller */ |
| 4184 | A_UINT32 vdev_id; |
| 4185 | } wmi_vdev_resume_response_cmd; |
| 4186 | |
| 4187 | typedef struct { |
| 4188 | A_UINT32 tlv_header; |
| 4189 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_param_cmd_fixed_param */ |
| 4190 | /** unique id identifying the VDEV, generated by the caller */ |
| 4191 | A_UINT32 vdev_id; |
| 4192 | /** parameter id */ |
| 4193 | A_UINT32 param_id; |
| 4194 | /** parameter value */ |
| 4195 | A_UINT32 param_value; |
| 4196 | } wmi_vdev_set_param_cmd_fixed_param; |
| 4197 | |
| 4198 | typedef struct { |
| 4199 | A_UINT32 key_seq_counter_l; |
| 4200 | A_UINT32 key_seq_counter_h; |
| 4201 | } wmi_key_seq_counter; |
| 4202 | |
| 4203 | #define WMI_CIPHER_NONE 0x0 /* clear key */ |
| 4204 | #define WMI_CIPHER_WEP 0x1 |
| 4205 | #define WMI_CIPHER_TKIP 0x2 |
| 4206 | #define WMI_CIPHER_AES_OCB 0x3 |
| 4207 | #define WMI_CIPHER_AES_CCM 0x4 |
| 4208 | #define WMI_CIPHER_WAPI 0x5 |
| 4209 | #define WMI_CIPHER_CKIP 0x6 |
| 4210 | #define WMI_CIPHER_AES_CMAC 0x7 |
| 4211 | #define WMI_CIPHER_ANY 0x8 |
| 4212 | |
| 4213 | typedef struct { |
| 4214 | A_UINT32 tlv_header; |
| 4215 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_cmd_fixed_param */ |
| 4216 | /** unique id identifying the VDEV, generated by the caller */ |
| 4217 | A_UINT32 vdev_id; |
| 4218 | /** MAC address used for installing */ |
| 4219 | wmi_mac_addr peer_macaddr; |
| 4220 | /** key index */ |
| 4221 | A_UINT32 key_ix; |
| 4222 | /** key flags */ |
| 4223 | A_UINT32 key_flags; |
| 4224 | /** key cipher, defined above */ |
| 4225 | A_UINT32 key_cipher; |
| 4226 | /** key rsc counter */ |
| 4227 | wmi_key_seq_counter key_rsc_counter; |
| 4228 | /** global key rsc counter */ |
| 4229 | wmi_key_seq_counter key_global_rsc_counter; |
| 4230 | /** global key tsc counter */ |
| 4231 | wmi_key_seq_counter key_tsc_counter; |
| 4232 | /** WAPI key rsc counter */ |
| 4233 | A_UINT8 wpi_key_rsc_counter[16]; |
| 4234 | /** WAPI key tsc counter */ |
| 4235 | A_UINT8 wpi_key_tsc_counter[16]; |
| 4236 | /** key length */ |
| 4237 | A_UINT32 key_len; |
| 4238 | /** key tx mic length */ |
| 4239 | A_UINT32 key_txmic_len; |
| 4240 | /** key rx mic length */ |
| 4241 | A_UINT32 key_rxmic_len; |
| 4242 | /* |
| 4243 | * Following this struct are this TLV. |
| 4244 | * // actual key data |
| 4245 | * A_UINT8 key_data[]; // contains key followed by tx mic followed by rx mic |
| 4246 | */ |
| 4247 | } wmi_vdev_install_key_cmd_fixed_param; |
| 4248 | |
| 4249 | /** Preamble types to be used with VDEV fixed rate configuration */ |
| 4250 | typedef enum { |
| 4251 | WMI_RATE_PREAMBLE_OFDM, |
| 4252 | WMI_RATE_PREAMBLE_CCK, |
| 4253 | WMI_RATE_PREAMBLE_HT, |
| 4254 | WMI_RATE_PREAMBLE_VHT, |
| 4255 | } WMI_RATE_PREAMBLE; |
| 4256 | |
| 4257 | /** Value to disable fixed rate setting */ |
| 4258 | #define WMI_FIXED_RATE_NONE (0xff) |
| 4259 | |
| 4260 | /** the definition of different VDEV parameters */ |
| 4261 | typedef enum { |
| 4262 | /** RTS Threshold */ |
| 4263 | WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1, |
| 4264 | /** Fragmentation threshold */ |
| 4265 | WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| 4266 | /** beacon interval in TUs */ |
| 4267 | WMI_VDEV_PARAM_BEACON_INTERVAL, |
| 4268 | /** Listen interval in TUs */ |
| 4269 | WMI_VDEV_PARAM_LISTEN_INTERVAL, |
| 4270 | /** muticast rate in Mbps */ |
| 4271 | WMI_VDEV_PARAM_MULTICAST_RATE, |
| 4272 | /** management frame rate in Mbps */ |
| 4273 | WMI_VDEV_PARAM_MGMT_TX_RATE, |
| 4274 | /** slot time (long vs short) */ |
| 4275 | WMI_VDEV_PARAM_SLOT_TIME, |
| 4276 | /** preamble (long vs short) */ |
| 4277 | WMI_VDEV_PARAM_PREAMBLE, |
| 4278 | /** SWBA time (time before tbtt in msec) */ |
| 4279 | WMI_VDEV_PARAM_SWBA_TIME, |
| 4280 | /** time period for updating VDEV stats */ |
| 4281 | WMI_VDEV_STATS_UPDATE_PERIOD, |
| 4282 | /** age out time in msec for frames queued for station in power save*/ |
| 4283 | WMI_VDEV_PWRSAVE_AGEOUT_TIME, |
| 4284 | /** Host SWBA interval (time in msec before tbtt for SWBA event generation) */ |
| 4285 | WMI_VDEV_HOST_SWBA_INTERVAL, |
| 4286 | /** DTIM period (specified in units of num beacon intervals) */ |
| 4287 | WMI_VDEV_PARAM_DTIM_PERIOD, |
| 4288 | /** scheduler air time limit for this VDEV. used by off chan scheduler */ |
| 4289 | WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| 4290 | /** enable/dsiable WDS for this VDEV */ |
| 4291 | WMI_VDEV_PARAM_WDS, |
| 4292 | /** ATIM Window */ |
| 4293 | WMI_VDEV_PARAM_ATIM_WINDOW, |
| 4294 | /** BMISS max */ |
| 4295 | WMI_VDEV_PARAM_BMISS_COUNT_MAX, |
| 4296 | /** BMISS first time */ |
| 4297 | WMI_VDEV_PARAM_BMISS_FIRST_BCNT, |
| 4298 | /** BMISS final time */ |
| 4299 | WMI_VDEV_PARAM_BMISS_FINAL_BCNT, |
| 4300 | /** WMM enables/disabled */ |
| 4301 | WMI_VDEV_PARAM_FEATURE_WMM, |
| 4302 | /** Channel width */ |
| 4303 | WMI_VDEV_PARAM_CHWIDTH, |
| 4304 | /** Channel Offset */ |
| 4305 | WMI_VDEV_PARAM_CHEXTOFFSET, |
| 4306 | /** Disable HT Protection */ |
| 4307 | WMI_VDEV_PARAM_DISABLE_HTPROTECTION, |
| 4308 | /** Quick STA Kickout */ |
| 4309 | WMI_VDEV_PARAM_STA_QUICKKICKOUT, |
| 4310 | /** Rate to be used with Management frames */ |
| 4311 | WMI_VDEV_PARAM_MGMT_RATE, |
| 4312 | /** Protection Mode */ |
| 4313 | WMI_VDEV_PARAM_PROTECTION_MODE, |
| 4314 | /** Fixed rate setting */ |
| 4315 | WMI_VDEV_PARAM_FIXED_RATE, |
| 4316 | /** Short GI Enable/Disable */ |
| 4317 | WMI_VDEV_PARAM_SGI, |
| 4318 | /** Enable LDPC */ |
| 4319 | WMI_VDEV_PARAM_LDPC, |
| 4320 | /** Enable Tx STBC */ |
| 4321 | WMI_VDEV_PARAM_TX_STBC, |
| 4322 | /** Enable Rx STBC */ |
| 4323 | WMI_VDEV_PARAM_RX_STBC, |
| 4324 | /** Intra BSS forwarding */ |
| 4325 | WMI_VDEV_PARAM_INTRA_BSS_FWD, |
| 4326 | /** Setting Default xmit key for Vdev */ |
| 4327 | WMI_VDEV_PARAM_DEF_KEYID, |
| 4328 | /** NSS width */ |
| 4329 | WMI_VDEV_PARAM_NSS, |
| 4330 | /** Set the custom rate for the broadcast data frames */ |
| 4331 | WMI_VDEV_PARAM_BCAST_DATA_RATE, |
| 4332 | /** Set the custom rate (rate-code) for multicast data frames */ |
| 4333 | WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| 4334 | /** Tx multicast packet indicate Enable/Disable */ |
| 4335 | WMI_VDEV_PARAM_MCAST_INDICATE, |
| 4336 | /** Tx DHCP packet indicate Enable/Disable */ |
| 4337 | WMI_VDEV_PARAM_DHCP_INDICATE, |
| 4338 | /** Enable host inspection of Tx unicast packet to unknown destination */ |
| 4339 | WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| 4340 | |
| 4341 | /* The minimum amount of time AP begins to consider STA inactive */ |
| 4342 | WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| 4343 | |
| 4344 | /* An associated STA is considered inactive when there is no recent TX/RX |
| 4345 | * activity and no downlink frames are buffered for it. Once a STA exceeds |
| 4346 | * the maximum idle inactive time, the AP will send an 802.11 data-null as |
| 4347 | * a keep alive to verify the STA is still associated. If the STA does ACK |
| 4348 | * the data-null, or if the data-null is buffered and the STA does not |
| 4349 | * retrieve it, the STA will be considered unresponsive (see |
| 4350 | * WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS). */ |
| 4351 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| 4352 | |
| 4353 | /* An associated STA is considered unresponsive if there is no recent |
| 4354 | * TX/RX activity and downlink frames are buffered for it. Once a STA |
| 4355 | * exceeds the maximum unresponsive time, the AP will send a |
| 4356 | * WMI_STA_KICKOUT event to the host so the STA can be deleted. */ |
| 4357 | WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| 4358 | |
| 4359 | /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */ |
| 4360 | WMI_VDEV_PARAM_AP_ENABLE_NAWDS, |
| 4361 | /** Enable/Disable RTS-CTS */ |
| 4362 | WMI_VDEV_PARAM_ENABLE_RTSCTS, |
| 4363 | /* Enable TXBFee/er */ |
| 4364 | WMI_VDEV_PARAM_TXBF, |
| 4365 | |
| 4366 | /**Set packet power save */ |
| 4367 | WMI_VDEV_PARAM_PACKET_POWERSAVE, |
| 4368 | |
| 4369 | /**Drops un-encrypted packets if any received in an encryted connection |
| 4370 | * otherwise forwards to host |
| 4371 | */ |
| 4372 | WMI_VDEV_PARAM_DROP_UNENCRY, |
| 4373 | |
| 4374 | /* |
| 4375 | * Set TX encap type. |
| 4376 | * |
| 4377 | * enum wmi_pkt_type is to be used as the parameter |
| 4378 | * specifying the encap type. |
| 4379 | */ |
| 4380 | WMI_VDEV_PARAM_TX_ENCAP_TYPE, |
| 4381 | |
| 4382 | /* |
| 4383 | * Try to detect stations that woke-up and exited power save but did not |
| 4384 | * successfully transmit data-null with PM=0 to AP. When this happens, |
| 4385 | * STA and AP power save state are out-of-sync. Use buffered but |
| 4386 | * undelivered MSDU to the STA as a hint that the STA is really awake |
| 4387 | * and expecting normal ASAP delivery, rather than retrieving BU with |
| 4388 | * PS-Poll, U-APSD trigger, etc. |
| 4389 | * |
| 4390 | * 0 disables out-of-sync detection. Maximum time is 255 seconds. |
| 4391 | */ |
| 4392 | WMI_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| 4393 | |
| 4394 | /* Enable/Disable early rx dynamic adjust feature. |
| 4395 | * Early-rx dynamic adjust is a advance power save feature. |
| 4396 | * Early-rx is a wakeup duration before exact TBTT,which is deemed necessary to provide a cushion for various |
| 4397 | * timing discrepancies in the system. |
| 4398 | * In current code branch, the duration is set to a very conservative fix value to make sure the drift impact is minimum. |
| 4399 | * The fix early-tx will result in the unnessary power consume, so a dynamic early-rx adjust algorithm can be designed |
| 4400 | * properly to minimum the power consume.*/ |
| 4401 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, |
| 4402 | |
| 4403 | /* set target bmiss number per sample cycle if bmiss adjust was chosen. |
| 4404 | * In this adjust policy,early-rx is adjusted by comparing the current bmiss rate to target bmiss rate |
| 4405 | * which can be set by user through WMI command. |
| 4406 | */ |
| 4407 | WMI_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, |
| 4408 | |
| 4409 | /* set sample cycle(in the unit of beacon interval) if bmiss adjust was chosen */ |
| 4410 | WMI_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, |
| 4411 | |
| 4412 | /* set slop_step */ |
| 4413 | WMI_VDEV_PARAM_EARLY_RX_SLOP_STEP, |
| 4414 | |
| 4415 | /* set init slop */ |
| 4416 | WMI_VDEV_PARAM_EARLY_RX_INIT_SLOP, |
| 4417 | |
| 4418 | /* pause adjust enable/disable */ |
| 4419 | WMI_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, |
| 4420 | |
| 4421 | /* Set channel pwr limit value of the vdev the minimal value of all |
| 4422 | * vdevs operating on this channel will be set as channel tx power |
| 4423 | * limit, which is used to configure ratearray |
| 4424 | */ |
| 4425 | WMI_VDEV_PARAM_TX_PWRLIMIT, |
| 4426 | |
| 4427 | /* set the count of snr value for calculation in snr monitor */ |
| 4428 | WMI_VDEV_PARAM_SNR_NUM_FOR_CAL, |
| 4429 | |
| 4430 | /** Roaming offload */ |
| 4431 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, |
| 4432 | |
| 4433 | /** Enable Leader request RX functionality for RMC */ |
| 4434 | WMI_VDEV_PARAM_ENABLE_RMC, |
| 4435 | |
| 4436 | /* IBSS does not have deauth/disassoc, vdev has to detect peer gone event |
| 4437 | * by himself. If the beacon lost time exceed this threshold, the peer is |
| 4438 | * thought to be gone. */ |
| 4439 | WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS, |
| 4440 | |
| 4441 | /** max rate in kpbs, transmit rate can't go beyond it */ |
| 4442 | WMI_VDEV_PARAM_MAX_RATE, |
| 4443 | |
| 4444 | /* enable/disable drift sample. 0: disable; 1: clk_drift; 2: ap_drift; 3 both clk and ap drift */ |
| 4445 | WMI_VDEV_PARAM_EARLY_RX_DRIFT_SAMPLE, |
| 4446 | /* set Tx failure count threshold for the vdev */ |
| 4447 | WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR, |
| 4448 | |
| 4449 | /* set ebt resync timeout value, in the unit of TU */ |
| 4450 | WMI_VDEV_PARAM_EBT_RESYNC_TIMEOUT, |
| 4451 | |
| 4452 | /* Enable Aggregation State Trigger Event */ |
| 4453 | WMI_VDEV_PARAM_AGGR_TRIG_EVENT_ENABLE, |
| 4454 | |
| 4455 | /* This parameter indicates whether IBSS station can enter into power save |
| 4456 | * mode by sending Null frame (with PM=1). When not allowed, IBSS station has to stay |
| 4457 | * awake all the time and should never set PM=1 in its transmitted frames. |
| 4458 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH |
| 4459 | * is non-zero. */ |
| 4460 | WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED, |
| 4461 | |
| 4462 | /* This parameter indicates if this station can enter into power collapse |
| 4463 | * for the remaining beacon interval after the ATIM window. |
| 4464 | * This parameter is meaningful/valid only when WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED |
| 4465 | * is set to true. */ |
| 4466 | WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED, |
| 4467 | |
| 4468 | /* This parameter indicates whether IBSS station exit power save mode and |
| 4469 | * enter power active state (by sending Null frame with PM=0 in the immediate ATIM Window) |
| 4470 | * whenever there is a TX/RX activity. */ |
| 4471 | WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED, |
| 4472 | |
| 4473 | /* If Awake on TX/RX activity is enabled, this parameter indicates |
| 4474 | * the data inactivity time in number of beacon intervals after which |
| 4475 | * IBSS station reenters power save by sending Null frame with PM=1. */ |
| 4476 | WMI_VDEV_PARAM_INACTIVITY_CNT, |
| 4477 | |
| 4478 | /* Inactivity time in msec after which TX Service Period (SP) is |
| 4479 | * terminated by sending a Qos Null frame with EOSP. |
| 4480 | * If value is 0, TX SP is terminated with the last buffered packet itself |
| 4481 | * instead of waiting for the inactivity timeout. */ |
| 4482 | WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS, |
| 4483 | |
| 4484 | /** DTIM policy */ |
| 4485 | WMI_VDEV_PARAM_DTIM_POLICY, |
| 4486 | |
| 4487 | /* When IBSS network is initialized, PS-supporting device |
| 4488 | * does not enter protocol sleep state during first |
| 4489 | * WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */ |
| 4490 | WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS, |
| 4491 | |
| 4492 | /* Enable/Disable 1 RX chain usage during the ATIM window */ |
| 4493 | WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE, |
| 4494 | /** |
| 4495 | * RX Leak window is the time driver waits before shutting down |
| 4496 | * the radio or switching the channel and after receiving an ACK |
| 4497 | * for a data frame with PM bit set) |
| 4498 | */ |
| 4499 | WMI_VDEV_PARAM_RX_LEAK_WINDOW, |
| 4500 | |
| 4501 | /** |
| 4502 | * Averaging factor(16 bit value) is used in the calculations to |
| 4503 | * perform averaging of different link level statistics like average |
| 4504 | * beacon spread or average number of frames leaked |
| 4505 | */ |
| 4506 | WMI_VDEV_PARAM_STATS_AVG_FACTOR, |
| 4507 | /* |
| 4508 | * disconnect threshold, once the consecutive error for specific peer |
| 4509 | * exceed this threhold, FW will send kickout event to host |
| 4510 | */ |
| 4511 | WMI_VDEV_PARAM_DISCONNECT_TH, |
| 4512 | /* |
| 4513 | * The rate_code of RTS_CTS changed by host. Now FW can support |
| 4514 | * more non-HT rates rather than 1Mbps or 6Mbps */ |
| 4515 | WMI_VDEV_PARAM_RTSCTS_RATE, |
| 4516 | |
| 4517 | /** This parameter indicates whether using a long duration RTS-CTS |
| 4518 | * protection when a SAP goes off channel in MCC mode */ |
| 4519 | WMI_VDEV_PARAM_MCC_RTSCTS_PROTECTION_ENABLE, |
| 4520 | |
| 4521 | /* |
| 4522 | * This parameter indicates whether using a broadcast probe response |
| 4523 | * to increase the detectability of SAP in MCC mode |
| 4524 | */ |
| 4525 | WMI_VDEV_PARAM_MCC_BROADCAST_PROBE_ENABLE, |
Nirav Shah | 47062ff | 2015-11-05 11:21:08 +0530 | [diff] [blame] | 4526 | |
| 4527 | /* This parameter indicates the power backoff in percentage |
| 4528 | * currently supports 100%, 50%, 25%, 12.5%, and minimum |
| 4529 | * Host passes 0, 1, 2, 3, 4 to Firmware |
| 4530 | * 0 --> 100% --> no changes, 1 --> 50% --> -3dB, |
| 4531 | * 2 --> 25% --> -6dB, 3 --> 12.5% --> -9dB, 4 --> minimum --> -32dB |
| 4532 | */ |
| 4533 | WMI_VDEV_PARAM_TXPOWER_SCALE, |
| 4534 | |
| 4535 | /* TX power backoff in dB: tx power -= param value |
| 4536 | * Host passes values(DB) to Halphy, Halphy reduces the power table |
| 4537 | * by the values. Safety check will happen in Halphy. |
| 4538 | */ |
| 4539 | WMI_VDEV_PARAM_TXPOWER_SCALE_DECR_DB, |
| 4540 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4541 | } WMI_VDEV_PARAM; |
| 4542 | |
| 4543 | /* Length of ATIM Window in TU */ |
| 4544 | #define WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH WMI_VDEV_PARAM_ATIM_WINDOW |
| 4545 | |
| 4546 | enum wmi_pkt_type { |
| 4547 | WMI_PKT_TYPE_RAW = 0, |
| 4548 | WMI_PKT_TYPE_NATIVE_WIFI = 1, |
| 4549 | WMI_PKT_TYPE_ETHERNET = 2, |
| 4550 | }; |
| 4551 | |
| 4552 | typedef struct { |
| 4553 | A_UINT8 sutxbfee : 1, mutxbfee : 1, sutxbfer : 1, mutxbfer : 1, |
| 4554 | #if defined(AR900B) |
| 4555 | txb_sts_cap : 3, implicit_bf : 1; |
| 4556 | #else |
| 4557 | reserved : 4; |
| 4558 | #endif |
| 4559 | } wmi_vdev_txbf_en; |
| 4560 | |
| 4561 | /** Upto 8 bits are available for Roaming module to be sent along with |
| 4562 | WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/ |
| 4563 | /* Enable Roaming FW offload LFR1.5/LFR2.0 implementation */ |
| 4564 | #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1 |
| 4565 | /* Enable Roaming module in FW to do scan based on Final BMISS */ |
| 4566 | #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2 |
| 4567 | |
| 4568 | /** slot time long */ |
| 4569 | #define WMI_VDEV_SLOT_TIME_LONG 0x1 |
| 4570 | /** slot time short */ |
| 4571 | #define WMI_VDEV_SLOT_TIME_SHORT 0x2 |
| 4572 | /** preablbe long */ |
| 4573 | #define WMI_VDEV_PREAMBLE_LONG 0x1 |
| 4574 | /** preablbe short */ |
| 4575 | #define WMI_VDEV_PREAMBLE_SHORT 0x2 |
| 4576 | |
| 4577 | /** the definition of different START/RESTART Event response */ |
| 4578 | typedef enum { |
| 4579 | /* Event respose of START CMD */ |
| 4580 | WMI_VDEV_START_RESP_EVENT = 0, |
| 4581 | /* Event respose of RESTART CMD */ |
| 4582 | WMI_VDEV_RESTART_RESP_EVENT, |
| 4583 | } WMI_START_EVENT_PARAM; |
| 4584 | |
| 4585 | typedef struct { |
| 4586 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_start_response_event_fixed_param */ |
| 4587 | /** unique id identifying the VDEV, generated by the caller */ |
| 4588 | A_UINT32 vdev_id; |
| 4589 | /** requestor id that requested the VDEV start request */ |
| 4590 | A_UINT32 requestor_id; |
| 4591 | /* Respose of Event type START/RESTART */ |
| 4592 | WMI_START_EVENT_PARAM resp_type; |
| 4593 | /** status of the response */ |
| 4594 | A_UINT32 status; |
| 4595 | /** Vdev chain mask */ |
| 4596 | A_UINT32 chain_mask; |
| 4597 | /** Vdev mimo power save mode */ |
| 4598 | A_UINT32 smps_mode; |
| 4599 | /** mac_id field contains the MAC identifier that the VDEV is bound to. The valid range is 0 to (num_macs-1). */ |
| 4600 | A_UINT32 mac_id; |
| 4601 | /** Configured Transmit Streams **/ |
| 4602 | A_UINT32 cfgd_tx_streams; |
| 4603 | /** Configured Receive Streams **/ |
| 4604 | A_UINT32 cfgd_rx_streams; |
| 4605 | } wmi_vdev_start_response_event_fixed_param; |
| 4606 | |
| 4607 | typedef struct { |
| 4608 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_stopped_event_fixed_param */ |
| 4609 | /** unique id identifying the VDEV, generated by the caller */ |
| 4610 | A_UINT32 vdev_id; |
| 4611 | } wmi_vdev_stopped_event_fixed_param; |
| 4612 | |
| 4613 | /** common structure used for simple events (stopped, resume_req, standby response) */ |
| 4614 | typedef struct { |
| 4615 | A_UINT32 tlv_header; /* TLV tag and len; tag would be equivalent to actual event */ |
| 4616 | /** unique id identifying the VDEV, generated by the caller */ |
| 4617 | A_UINT32 vdev_id; |
| 4618 | } wmi_vdev_simple_event_fixed_param; |
| 4619 | |
| 4620 | /** VDEV start response status codes */ |
| 4621 | #define WMI_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0 /** VDEV succesfully started */ |
| 4622 | #define WMI_VDEV_START_RESPONSE_INVALID_VDEVID 0x1 /** requested VDEV not found */ |
| 4623 | #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */ |
| 4624 | |
| 4625 | /** Beacon processing related command and event structures */ |
| 4626 | typedef struct { |
| 4627 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tx_hdr */ |
| 4628 | /** unique id identifying the VDEV, generated by the caller */ |
| 4629 | A_UINT32 vdev_id; |
| 4630 | /** xmit rate */ |
| 4631 | A_UINT32 tx_rate; |
| 4632 | /** xmit power */ |
| 4633 | A_UINT32 txPower; |
| 4634 | /** beacon buffer length in bytes */ |
| 4635 | A_UINT32 buf_len; |
| 4636 | /* This TLV is followed by array of bytes: |
| 4637 | * // beacon frame buffer |
| 4638 | * A_UINT8 bufp[]; |
| 4639 | */ |
| 4640 | } wmi_bcn_tx_hdr; |
| 4641 | |
| 4642 | /* Beacon filter */ |
| 4643 | #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */ |
| 4644 | #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */ |
| 4645 | #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */ |
| 4646 | #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */ |
| 4647 | #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */ |
| 4648 | |
| 4649 | typedef struct { |
| 4650 | /** Filter ID */ |
| 4651 | A_UINT32 bcn_filter_id; |
| 4652 | /** Filter type - wmi_bcn_filter */ |
| 4653 | A_UINT32 bcn_filter; |
| 4654 | /** Buffer len */ |
| 4655 | A_UINT32 bcn_filter_len; |
| 4656 | /** Filter info (threshold, BSSID, RSSI) */ |
| 4657 | A_UINT8 *bcn_filter_buf; |
| 4658 | } wmi_bcn_filter_rx_cmd; |
| 4659 | |
| 4660 | /** Capabilities and IEs to be passed to firmware */ |
| 4661 | typedef struct { |
| 4662 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_prb_info */ |
| 4663 | /** Capabilities */ |
| 4664 | A_UINT32 caps; |
| 4665 | /** ERP info */ |
| 4666 | A_UINT32 erp; |
| 4667 | /** Advanced capabilities */ |
| 4668 | /** HT capabilities */ |
| 4669 | /** HT Info */ |
| 4670 | /** ibss_dfs */ |
| 4671 | /** wpa Info */ |
| 4672 | /** rsn Info */ |
| 4673 | /** rrm info */ |
| 4674 | /** ath_ext */ |
| 4675 | /** app IE */ |
| 4676 | } wmi_bcn_prb_info; |
| 4677 | |
| 4678 | typedef struct { |
| 4679 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_tmpl_cmd_fixed_param */ |
| 4680 | /** unique id identifying the VDEV, generated by the caller */ |
| 4681 | A_UINT32 vdev_id; |
| 4682 | /** TIM IE offset from the beginning of the template. */ |
| 4683 | A_UINT32 tim_ie_offset; |
| 4684 | /** beacon buffer length. data is in TLV data[] */ |
| 4685 | A_UINT32 buf_len; |
| 4686 | /* |
| 4687 | * The TLVs follows: |
| 4688 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 4689 | * A_UINT8 data[]; //Variable length data |
| 4690 | */ |
| 4691 | } wmi_bcn_tmpl_cmd_fixed_param; |
| 4692 | |
| 4693 | typedef struct { |
| 4694 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_prb_tmpl_cmd_fixed_param */ |
| 4695 | /** unique id identifying the VDEV, generated by the caller */ |
| 4696 | A_UINT32 vdev_id; |
| 4697 | /** beacon buffer length. data is in TLV data[] */ |
| 4698 | A_UINT32 buf_len; |
| 4699 | /* |
| 4700 | * The TLVs follows: |
| 4701 | * wmi_bcn_prb_info bcn_prb_info; //beacon probe capabilities and IEs |
| 4702 | * A_UINT8 data[]; //Variable length data |
| 4703 | */ |
| 4704 | } wmi_prb_tmpl_cmd_fixed_param; |
| 4705 | |
| 4706 | typedef struct { |
| 4707 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_bcn_tx_status_event_fixed_param */ |
| 4708 | A_UINT32 tlv_header; |
| 4709 | /** unique id identifying the VDEV */ |
| 4710 | A_UINT32 vdev_id; |
| 4711 | /** bcn tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 4712 | A_UINT32 tx_status; |
| 4713 | } wmi_offload_bcn_tx_status_event_fixed_param; |
| 4714 | |
| 4715 | enum wmi_sta_ps_mode { |
| 4716 | /** enable power save for the given STA VDEV */ |
| 4717 | WMI_STA_PS_MODE_DISABLED = 0, |
| 4718 | /** disable power save for a given STA VDEV */ |
| 4719 | WMI_STA_PS_MODE_ENABLED = 1, |
| 4720 | }; |
| 4721 | |
| 4722 | typedef struct { |
| 4723 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_mode_cmd_fixed_param */ |
| 4724 | /** unique id identifying the VDEV, generated by the caller */ |
| 4725 | A_UINT32 vdev_id; |
| 4726 | |
| 4727 | /** Power save mode |
| 4728 | * |
| 4729 | * (see enum wmi_sta_ps_mode) |
| 4730 | */ |
| 4731 | A_UINT32 sta_ps_mode; |
| 4732 | } wmi_sta_powersave_mode_cmd_fixed_param; |
| 4733 | |
| 4734 | enum wmi_csa_offload_en { |
| 4735 | WMI_CSA_OFFLOAD_DISABLE = 0, |
| 4736 | WMI_CSA_OFFLOAD_ENABLE = 1, |
| 4737 | }; |
| 4738 | |
| 4739 | typedef struct { |
| 4740 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_enable_cmd_fixed_param */ |
| 4741 | A_UINT32 vdev_id; |
| 4742 | A_UINT32 csa_offload_enable; |
| 4743 | } wmi_csa_offload_enable_cmd_fixed_param; |
| 4744 | |
| 4745 | typedef struct { |
| 4746 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csa_offload_chanswitch_cmd_fixed_param */ |
| 4747 | A_UINT32 vdev_id; |
| 4748 | /* |
| 4749 | * The TLVs follows: |
| 4750 | * wmi_channel chan; |
| 4751 | */ |
| 4752 | } wmi_csa_offload_chanswitch_cmd_fixed_param; |
| 4753 | /** |
| 4754 | * This parameter controls the policy for retrieving frames from AP while the |
| 4755 | * STA is in sleep state. |
| 4756 | * |
| 4757 | * Only takes affect if the sta_ps_mode is enabled |
| 4758 | */ |
| 4759 | enum wmi_sta_ps_param_rx_wake_policy { |
| 4760 | /* Wake up when ever there is an RX activity on the VDEV. In this mode |
| 4761 | * the Power save SM(state machine) will come out of sleep by either |
| 4762 | * sending null frame (or) a data frame (with PS==0) in response to TIM |
| 4763 | * bit set in the received beacon frame from AP. |
| 4764 | */ |
| 4765 | WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0, |
| 4766 | |
| 4767 | /* Here the power save state machine will not wakeup in response to TIM |
| 4768 | * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD |
| 4769 | * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all |
| 4770 | * access categories are delivery-enabled, the station will send a UAPSD |
| 4771 | * trigger frame, otherwise it will send a PS-Poll. |
| 4772 | */ |
| 4773 | WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1, |
| 4774 | }; |
| 4775 | |
| 4776 | /** Number of tx frames/beacon that cause the power save SM to wake up. |
| 4777 | * |
| 4778 | * Value 1 causes the SM to wake up for every TX. Value 0 has a special |
| 4779 | * meaning, It will cause the SM to never wake up. This is useful if you want |
| 4780 | * to keep the system to sleep all the time for some kind of test mode . host |
| 4781 | * can change this parameter any time. It will affect at the next tx frame. |
| 4782 | */ |
| 4783 | enum wmi_sta_ps_param_tx_wake_threshold { |
| 4784 | WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0, |
| 4785 | WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1, |
| 4786 | |
| 4787 | /* Values greater than one indicate that many TX attempts per beacon |
| 4788 | * interval before the STA will wake up |
| 4789 | */ |
| 4790 | }; |
| 4791 | |
| 4792 | /** |
| 4793 | * The maximum number of PS-Poll frames the FW will send in response to |
| 4794 | * traffic advertised in TIM before waking up (by sending a null frame with PS |
| 4795 | * = 0). Value 0 has a special meaning: there is no maximum count and the FW |
| 4796 | * will send as many PS-Poll as are necessary to retrieve buffered BU. This |
| 4797 | * parameter is used when the RX wake policy is |
| 4798 | * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake |
| 4799 | * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE. |
| 4800 | */ |
| 4801 | enum wmi_sta_ps_param_pspoll_count { |
| 4802 | WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0, |
| 4803 | /* Values greater than 0 indicate the maximum numer of PS-Poll frames FW |
| 4804 | * will send before waking up. |
| 4805 | */ |
| 4806 | }; |
| 4807 | |
| 4808 | /* |
| 4809 | * This will include the delivery and trigger enabled state for every AC. |
| 4810 | * This is the negotiated state with AP. The host MLME needs to set this based |
| 4811 | * on AP capability and the state Set in the association request by the |
| 4812 | * station MLME.Lower 8 bits of the value specify the UAPSD configuration. |
| 4813 | */ |
| 4814 | #define WMI_UAPSD_AC_TYPE_DELI 0 |
| 4815 | #define WMI_UAPSD_AC_TYPE_TRIG 1 |
| 4816 | |
| 4817 | #define WMI_UAPSD_AC_BIT_MASK(ac,type) (type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)) |
| 4818 | |
| 4819 | enum wmi_sta_ps_param_uapsd { |
| 4820 | WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 4821 | WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 4822 | WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 4823 | WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 4824 | WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 4825 | WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 4826 | WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 4827 | WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 4828 | }; |
| 4829 | |
| 4830 | enum wmi_sta_powersave_param { |
| 4831 | /** |
| 4832 | * Controls how frames are retrievd from AP while STA is sleeping |
| 4833 | * |
| 4834 | * (see enum wmi_sta_ps_param_rx_wake_policy) |
| 4835 | */ |
| 4836 | WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0, |
| 4837 | |
| 4838 | /** |
| 4839 | * The STA will go active after this many TX |
| 4840 | * |
| 4841 | * (see enum wmi_sta_ps_param_tx_wake_threshold) |
| 4842 | */ |
| 4843 | WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1, |
| 4844 | |
| 4845 | /** |
| 4846 | * Number of PS-Poll to send before STA wakes up |
| 4847 | * |
| 4848 | * (see enum wmi_sta_ps_param_pspoll_count) |
| 4849 | * |
| 4850 | */ |
| 4851 | WMI_STA_PS_PARAM_PSPOLL_COUNT = 2, |
| 4852 | |
| 4853 | /** |
| 4854 | * TX/RX inactivity time in msec before going to sleep. |
| 4855 | * |
| 4856 | * The power save SM will monitor tx/rx activity on the VDEV, if no |
| 4857 | * activity for the specified msec of the parameter the Power save SM will |
| 4858 | * go to sleep. |
| 4859 | */ |
| 4860 | WMI_STA_PS_PARAM_INACTIVITY_TIME = 3, |
| 4861 | |
| 4862 | /** |
| 4863 | * Set uapsd configuration. |
| 4864 | * |
| 4865 | * (see enum wmi_sta_ps_param_uapsd) |
| 4866 | */ |
| 4867 | WMI_STA_PS_PARAM_UAPSD = 4, |
| 4868 | /** |
| 4869 | * Number of PS-Poll to send before STA wakes up in QPower Mode |
| 4870 | */ |
| 4871 | WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5, |
| 4872 | |
| 4873 | /** |
| 4874 | * Enable QPower |
| 4875 | */ |
| 4876 | WMI_STA_PS_ENABLE_QPOWER = 6, |
| 4877 | |
| 4878 | /** |
| 4879 | * Number of TX frames before the entering the Active state |
| 4880 | */ |
| 4881 | WMI_STA_PS_PARAM_QPOWER_MAX_TX_BEFORE_WAKE = 7, |
| 4882 | |
| 4883 | /** |
| 4884 | * QPower SPEC PSPOLL interval |
| 4885 | */ |
| 4886 | WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL = 8, |
| 4887 | |
| 4888 | /** |
| 4889 | * Max SPEC PSPOLL to be sent when the PSPOLL response has |
| 4890 | * no-data bit set |
| 4891 | */ |
| 4892 | WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL = 9, |
| 4893 | }; |
| 4894 | |
| 4895 | typedef struct { |
| 4896 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_powersave_param_cmd_fixed_param */ |
| 4897 | /** unique id identifying the VDEV, generated by the caller */ |
| 4898 | A_UINT32 vdev_id; |
| 4899 | /** station power save parameter (see enum wmi_sta_powersave_param) */ |
| 4900 | A_UINT32 param; |
| 4901 | A_UINT32 value; |
| 4902 | } wmi_sta_powersave_param_cmd_fixed_param; |
| 4903 | |
| 4904 | /** No MIMO power save */ |
| 4905 | #define WMI_STA_MIMO_PS_MODE_DISABLE |
| 4906 | /** mimo powersave mode static*/ |
| 4907 | #define WMI_STA_MIMO_PS_MODE_STATIC |
| 4908 | /** mimo powersave mode dynamic */ |
| 4909 | #define WMI_STA_MIMO_PS_MODE_DYNAMI |
| 4910 | |
| 4911 | typedef struct { |
| 4912 | /** unique id identifying the VDEV, generated by the caller */ |
| 4913 | A_UINT32 vdev_id; |
| 4914 | /** mimo powersave mode as defined above */ |
| 4915 | A_UINT32 mimo_pwrsave_mode; |
| 4916 | } wmi_sta_mimo_ps_mode_cmd; |
| 4917 | |
| 4918 | /** U-APSD configuration of peer station from (re)assoc request and TSPECs */ |
| 4919 | enum wmi_ap_ps_param_uapsd { |
| 4920 | WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0), |
| 4921 | WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1), |
| 4922 | WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2), |
| 4923 | WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3), |
| 4924 | WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4), |
| 4925 | WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5), |
| 4926 | WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6), |
| 4927 | WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7), |
| 4928 | }; |
| 4929 | |
| 4930 | /** U-APSD maximum service period of peer station */ |
| 4931 | enum wmi_ap_ps_peer_param_max_sp { |
| 4932 | WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0, |
| 4933 | WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1, |
| 4934 | WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2, |
| 4935 | WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3, |
| 4936 | |
| 4937 | /* keep last! */ |
| 4938 | MAX_WMI_AP_PS_PEER_PARAM_MAX_SP, |
| 4939 | }; |
| 4940 | |
| 4941 | /** |
| 4942 | * AP power save parameter |
| 4943 | * Set a power save specific parameter for a peer station |
| 4944 | */ |
| 4945 | enum wmi_ap_ps_peer_param { |
| 4946 | /** Set uapsd configuration for a given peer. |
| 4947 | * |
| 4948 | * This will include the delivery and trigger enabled state for every AC. |
| 4949 | * The host MLME needs to set this based on AP capability and stations |
| 4950 | * request Set in the association request received from the station. |
| 4951 | * |
| 4952 | * Lower 8 bits of the value specify the UAPSD configuration. |
| 4953 | * |
| 4954 | * (see enum wmi_ap_ps_param_uapsd) |
| 4955 | * The default value is 0. |
| 4956 | */ |
| 4957 | WMI_AP_PS_PEER_PARAM_UAPSD = 0, |
| 4958 | |
| 4959 | /** |
| 4960 | * Set the service period for a UAPSD capable station |
| 4961 | * |
| 4962 | * The service period from wme ie in the (re)assoc request frame. |
| 4963 | * |
| 4964 | * (see enum wmi_ap_ps_peer_param_max_sp) |
| 4965 | */ |
| 4966 | WMI_AP_PS_PEER_PARAM_MAX_SP = 1, |
| 4967 | |
| 4968 | /** Time in seconds for aging out buffered frames for STA in power save */ |
| 4969 | WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2, |
| 4970 | }; |
| 4971 | |
| 4972 | typedef struct { |
| 4973 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_ps_peer_cmd_fixed_param */ |
| 4974 | /** unique id identifying the VDEV, generated by the caller */ |
| 4975 | A_UINT32 vdev_id; |
| 4976 | /** peer MAC address */ |
| 4977 | wmi_mac_addr peer_macaddr; |
| 4978 | /** AP powersave param (see enum wmi_ap_ps_peer_param) */ |
| 4979 | A_UINT32 param; |
| 4980 | /** AP powersave param value */ |
| 4981 | A_UINT32 value; |
| 4982 | } wmi_ap_ps_peer_cmd_fixed_param; |
| 4983 | |
| 4984 | /** Configure peer station 11v U-APSD coexistance |
| 4985 | * |
| 4986 | * Two parameters from uaspd coexistence ie info (as specified in 11v) are |
| 4987 | * sent down to FW along with this command. |
| 4988 | * |
| 4989 | * The semantics of these fields are described in the following text extracted |
| 4990 | * from 802.11v. |
| 4991 | * |
| 4992 | * --- If the non-AP STA specified a non-zero TSF 0 Offset value in the |
| 4993 | * U-APSD Coexistence element, the AP should not transmit frames to the |
| 4994 | * non-AP STA outside of the U-APSD Coexistence Service Period, which |
| 4995 | * begins when the AP receives the U-APSD trigger frame and ends after |
| 4996 | * the transmission period specified by the result of the following |
| 4997 | * calculation: |
| 4998 | * |
| 4999 | * End of transmission period = T + (Interval . ((T . TSF 0 Offset) mod Interval)) |
| 5000 | * |
| 5001 | * Where T is the time the U-APSD trigger frame was received at the AP |
| 5002 | * Interval is the UAPSD Coexistence element Duration/Interval field |
| 5003 | * value (see 7.3.2.91) or upon the successful transmission of a frame |
| 5004 | * with EOSP bit set to 1, whichever is earlier. |
| 5005 | * |
| 5006 | * |
| 5007 | * --- If the non-AP STA specified a zero TSF 0 Offset value in the U-APSD |
| 5008 | * Coexistence element, the AP should not transmit frames to the non-AP |
| 5009 | * STA outside of the U-APSD Coexistence Service Period, which begins |
| 5010 | * when the AP receives a U-APSD trigger frame and ends after the |
| 5011 | * transmission period specified by the result of the following |
| 5012 | * calculation: End of transmission period = T + Duration |
| 5013 | */ |
| 5014 | typedef struct { |
| 5015 | /** unique id identifying the VDEV, generated by the caller */ |
| 5016 | A_UINT32 vdev_id; |
| 5017 | /** peer MAC address */ |
| 5018 | wmi_mac_addr peer_macaddr; |
| 5019 | /** Enable U-APSD coexistence support for this peer |
| 5020 | * |
| 5021 | * 0 -> disabled (default) |
| 5022 | * 1 -> enabled |
| 5023 | */ |
| 5024 | A_UINT32 enabled; |
| 5025 | /** Duration/Interval as defined by 11v U-ASPD coexistance */ |
| 5026 | A_UINT32 duration_interval; |
| 5027 | /** Upper 32 bits of 64-bit TSF offset */ |
| 5028 | A_UINT32 tsf_offset_high; |
| 5029 | /** Lower 32 bits of 64-bit TSF offset */ |
| 5030 | A_UINT32 tsf_offset_low; |
| 5031 | } wmi_ap_powersave_peer_uapsd_coex_cmd; |
| 5032 | |
| 5033 | typedef enum { |
| 5034 | WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION = 0x0001, |
| 5035 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE = 0x0002, |
| 5036 | WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY = 0x0004, |
| 5037 | |
| 5038 | WMI_AP_PS_EGAP_FLAG_MAX = 0x8000 |
| 5039 | } wmi_ap_ps_egap_flag_type; |
| 5040 | |
| 5041 | /** |
| 5042 | * configure ehanced green ap parameters |
| 5043 | */ |
| 5044 | typedef struct { |
| 5045 | /* |
| 5046 | * TLV tag and len; tag equals |
| 5047 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 5048 | */ |
| 5049 | A_UINT32 tlv_header; |
| 5050 | /** Enable enhanced green ap |
| 5051 | * 0 -> disabled |
| 5052 | * 1 -> enabled |
| 5053 | */ |
| 5054 | A_UINT32 enable; |
| 5055 | /** The param indicates a duration that all STAs connected |
| 5056 | * to S-AP have no traffic. |
| 5057 | */ |
| 5058 | A_UINT32 inactivity_time; /* in unit of milliseconds */ |
| 5059 | /** The param indicates a duration that all STAs connected |
| 5060 | * to S-AP have no traffic, after all STAs have entered powersave. |
| 5061 | */ |
| 5062 | A_UINT32 wait_time; /* in unit of milliseconds */ |
| 5063 | /** The param is used to turn on/off some functions within E-GAP. |
| 5064 | */ |
| 5065 | A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */ |
| 5066 | } wmi_ap_ps_egap_param_cmd_fixed_param; |
| 5067 | |
| 5068 | typedef enum { |
| 5069 | WMI_AP_PS_EGAP_STATUS_IDLE = 1, |
| 5070 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_OFF = 2, |
| 5071 | WMI_AP_PS_EGAP_STATUS_PWRSAVE_ON = 3, |
| 5072 | |
| 5073 | WMI_AP_PS_EGAP_STATUS_MAX = 15 |
| 5074 | } wmi_ap_ps_egap_status_type; |
| 5075 | |
| 5076 | /** |
| 5077 | * send ehanced green ap status to host |
| 5078 | */ |
| 5079 | typedef struct { |
| 5080 | A_UINT32 tlv_header; |
| 5081 | /** The param indicates a mac under dual-mac */ |
| 5082 | A_UINT32 mac_id; |
| 5083 | /** The param indicates the current tx chainmask with the mac id. */ |
| 5084 | A_UINT32 tx_chainmask; |
| 5085 | /** The param indicates the current rx chainmask with the mac id. */ |
| 5086 | A_UINT32 rx_chainmask; |
| 5087 | } wmi_ap_ps_egap_info_chainmask_list; |
| 5088 | |
| 5089 | typedef struct { |
| 5090 | /* |
| 5091 | * TLV tag and len; tag equals |
| 5092 | * wmi_ap_powersave_egap_param_cmd_fixed_param |
| 5093 | */ |
| 5094 | A_UINT32 tlv_header; |
| 5095 | /** Enhanced green ap status (WMI_AP_PS_EGAP_STATUS). */ |
| 5096 | A_UINT32 status; |
| 5097 | /* This TLV is followed by |
| 5098 | * wmi_ap_ps_egap_info_chainmask_list chainmask_list[]; |
| 5099 | */ |
| 5100 | } wmi_ap_ps_egap_info_event_fixed_param; |
| 5101 | |
| 5102 | |
| 5103 | /* 128 clients = 4 words */ |
| 5104 | /* WMI_TIM_BITMAP_ARRAY_SIZE can't be modified without breaking the compatibility */ |
| 5105 | #define WMI_TIM_BITMAP_ARRAY_SIZE 4 |
| 5106 | |
| 5107 | typedef struct { |
| 5108 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tim_info */ |
| 5109 | /** TIM bitmap len (in bytes)*/ |
| 5110 | A_UINT32 tim_len; |
| 5111 | /** TIM Partial Virtual Bitmap */ |
| 5112 | A_UINT32 tim_mcast; |
| 5113 | A_UINT32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE]; |
| 5114 | A_UINT32 tim_changed; |
| 5115 | A_UINT32 tim_num_ps_pending; |
| 5116 | } wmi_tim_info; |
| 5117 | |
| 5118 | typedef struct { |
| 5119 | /** Flag to enable quiet period IE support */ |
| 5120 | A_UINT32 is_enabled; |
| 5121 | /** Quiet start */ |
| 5122 | A_UINT32 tbttcount; |
| 5123 | /** Beacon intervals between quiets*/ |
| 5124 | A_UINT32 period; |
| 5125 | /** TUs of each quiet*/ |
| 5126 | A_UINT32 duration; |
| 5127 | /** TUs of from TBTT of quiet start*/ |
| 5128 | A_UINT32 offset; |
| 5129 | } wmi_quiet_info; |
| 5130 | |
| 5131 | /* WMI_P2P_MAX_NOA_DESCRIPTORS can't be modified without breaking the compatibility */ |
| 5132 | #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 /* Maximum number of NOA Descriptors supported */ |
| 5133 | |
| 5134 | typedef struct { |
| 5135 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_info */ |
| 5136 | /** Bit 0: Flag to indicate an update in NOA schedule |
| 5137 | * Bits 7-1: Reserved |
| 5138 | * Bits 15-8: Index (identifies the instance of NOA sub element) |
| 5139 | * Bit 16: Opp PS state of the AP |
| 5140 | * Bits 23-17: Ctwindow in TUs |
| 5141 | * Bits 31-24: Number of NOA descriptors |
| 5142 | */ |
| 5143 | A_UINT32 noa_attributes; |
| 5144 | wmi_p2p_noa_descriptor |
| 5145 | noa_descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS]; |
| 5146 | } wmi_p2p_noa_info; |
| 5147 | |
| 5148 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED 0x1 |
| 5149 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_S 0 |
| 5150 | |
| 5151 | #define WMI_UNIFIED_NOA_ATTR_IS_MODIFIED(hdr) \ |
| 5152 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_MODIFIED) |
| 5153 | |
| 5154 | #define WMI_UNIFIED_NOA_ATTR_MODIFIED_SET(hdr) \ |
| 5155 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 5156 | WMI_UNIFIED_NOA_ATTR_MODIFIED); |
| 5157 | |
| 5158 | #define WMI_UNIFIED_NOA_ATTR_INDEX 0xff00 |
| 5159 | #define WMI_UNIFIED_NOA_ATTR_INDEX_S 8 |
| 5160 | |
| 5161 | #define WMI_UNIFIED_NOA_ATTR_INDEX_GET(hdr) \ |
| 5162 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_INDEX) |
| 5163 | |
| 5164 | #define WMI_UNIFIED_NOA_ATTR_INDEX_SET(hdr, v) \ |
| 5165 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 5166 | WMI_UNIFIED_NOA_ATTR_INDEX); |
| 5167 | |
| 5168 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS 0x10000 |
| 5169 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_S 16 |
| 5170 | |
| 5171 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(hdr) \ |
| 5172 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_OPP_PS) |
| 5173 | |
| 5174 | #define WMI_UNIFIED_NOA_ATTR_OPP_PS_SET(hdr) \ |
| 5175 | WMI_F_RMW((hdr)->noa_attributes, 0x1, \ |
| 5176 | WMI_UNIFIED_NOA_ATTR_OPP_PS); |
| 5177 | |
| 5178 | #define WMI_UNIFIED_NOA_ATTR_CTWIN 0xfe0000 |
| 5179 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_S 17 |
| 5180 | |
| 5181 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_GET(hdr) \ |
| 5182 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_CTWIN) |
| 5183 | |
| 5184 | #define WMI_UNIFIED_NOA_ATTR_CTWIN_SET(hdr, v) \ |
| 5185 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0x7f, \ |
| 5186 | WMI_UNIFIED_NOA_ATTR_CTWIN); |
| 5187 | |
| 5188 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC 0xff000000 |
| 5189 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_S 24 |
| 5190 | |
| 5191 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(hdr) \ |
| 5192 | WMI_F_MS((hdr)->noa_attributes, WMI_UNIFIED_NOA_ATTR_NUM_DESC) |
| 5193 | |
| 5194 | #define WMI_UNIFIED_NOA_ATTR_NUM_DESC_SET(hdr, v) \ |
| 5195 | WMI_F_RMW((hdr)->noa_attributes, (v) & 0xff, \ |
| 5196 | WMI_UNIFIED_NOA_ATTR_NUM_DESC); |
| 5197 | |
| 5198 | typedef struct { |
| 5199 | /** TIM info */ |
| 5200 | wmi_tim_info tim_info; |
| 5201 | /** P2P NOA info */ |
| 5202 | wmi_p2p_noa_info p2p_noa_info; |
| 5203 | /* TBD: More info elements to be added later */ |
| 5204 | } wmi_bcn_info; |
| 5205 | |
| 5206 | typedef struct { |
| 5207 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_swba_event_fixed_param */ |
| 5208 | /** bitmap identifying the VDEVs, generated by the caller */ |
| 5209 | A_UINT32 vdev_map; |
| 5210 | /* This TLV is followed by tim_info and p2p_noa_info for each vdev in vdevmap : |
| 5211 | * wmi_tim_info tim_info[]; |
| 5212 | * wmi_p2p_noa_info p2p_noa_info[]; |
| 5213 | * |
| 5214 | */ |
| 5215 | } wmi_host_swba_event_fixed_param; |
| 5216 | |
| 5217 | #define WMI_MAX_AP_VDEV 16 |
| 5218 | |
| 5219 | typedef struct { |
| 5220 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tbtt_offset_event_fixed_param */ |
| 5221 | /** bimtap of VDEVs that has tbtt offset updated */ |
| 5222 | A_UINT32 vdev_map; |
| 5223 | /* The TLVs for tbttoffset_list will follow this TLV. |
| 5224 | * tbtt offset list in the order of the LSB to MSB in the vdev_map bitmap |
| 5225 | * A_UINT32 tbttoffset_list[WMI_MAX_AP_VDEV]; |
| 5226 | */ |
| 5227 | } wmi_tbtt_offset_event_fixed_param; |
| 5228 | |
| 5229 | /* Peer Specific commands and events */ |
| 5230 | |
| 5231 | typedef struct { |
| 5232 | A_UINT32 percentage; /* in unit of 12.5% */ |
| 5233 | A_UINT32 min_delta; /* in unit of Mbps */ |
| 5234 | } rate_delta_t; |
| 5235 | |
| 5236 | #define PEER_RATE_REPORT_COND_FLAG_DELTA 0x01 |
| 5237 | #define PEER_RATE_REPORT_COND_FLAG_THRESHOLD 0x02 |
| 5238 | #define MAX_NUM_OF_RATE_THRESH 4 |
| 5239 | |
| 5240 | typedef struct { |
| 5241 | /* |
| 5242 | * PEER_RATE_REPORT_COND_FLAG_DELTA, |
| 5243 | * PEER_RATE_REPORT_COND_FLAG_THRESHOLD |
| 5244 | * Any of these two conditions or both of |
| 5245 | * them can be set. |
| 5246 | */ |
| 5247 | A_UINT32 val_cond_flags; |
| 5248 | rate_delta_t rate_delta; |
| 5249 | /* |
| 5250 | * In unit of Mbps. There are at most 4 thresholds |
| 5251 | * If the threshold count is less than 4, set zero to |
| 5252 | * the one following the last threshold |
| 5253 | */ |
| 5254 | A_UINT32 rate_threshold[MAX_NUM_OF_RATE_THRESH]; |
| 5255 | } report_cond_per_phy_t; |
| 5256 | |
| 5257 | |
| 5258 | enum peer_rate_report_cond_phy_type { |
| 5259 | PEER_RATE_REPORT_COND_11B = 0, |
| 5260 | PEER_RATE_REPORT_COND_11A_G, |
| 5261 | PEER_RATE_REPORT_COND_11N, |
| 5262 | PEER_RATE_REPORT_COND_11AC, |
| 5263 | PEER_RATE_REPORT_COND_MAX_NUM |
| 5264 | }; |
| 5265 | |
| 5266 | typedef struct { |
| 5267 | /* |
| 5268 | * TLV tag and len; tag equals |
| 5269 | * WMITLV_TAG_STRUC_wmi_peer_rate_report_condtion_fixed_param |
| 5270 | */ |
| 5271 | A_UINT32 tlv_header; |
| 5272 | /* 1= enable, 0=disable */ |
| 5273 | A_UINT32 enable_rate_report; |
| 5274 | A_UINT32 report_backoff_time; /* in unit of msecond */ |
| 5275 | A_UINT32 report_timer_period; /* in unit of msecond */ |
| 5276 | /* |
| 5277 | *In the following field, the array index means the phy type, |
| 5278 | * please see enum peer_rate_report_cond_phy_type for detail |
| 5279 | */ |
| 5280 | report_cond_per_phy_t cond_per_phy[PEER_RATE_REPORT_COND_MAX_NUM]; |
| 5281 | } wmi_peer_set_rate_report_condition_fixed_param; |
| 5282 | |
| 5283 | /* Peer Type: |
| 5284 | * NB: This can be left DEFAULT for the normal case, and f/w will determine BSS type based |
| 5285 | * on address and vdev opmode. This is largely here to allow host to indicate that |
| 5286 | * peer is explicitly a TDLS peer |
| 5287 | */ |
| 5288 | enum wmi_peer_type { |
| 5289 | WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */ |
| 5290 | WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */ |
| 5291 | WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */ |
| 5292 | WMI_PEER_TYPE_OCB = 3, /* Peer is a OCB Peer */ |
| 5293 | WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type |
| 5294 | * is assigned up to 127 */ |
| 5295 | /* Reserved from 128 - 255 for |
| 5296 | * target internal use.*/ |
| 5297 | WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created during offload roam */ |
| 5298 | }; |
| 5299 | |
| 5300 | typedef struct { |
| 5301 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_create_cmd_fixed_param */ |
| 5302 | /** unique id identifying the VDEV, generated by the caller */ |
| 5303 | A_UINT32 vdev_id; |
| 5304 | /** peer MAC address */ |
| 5305 | wmi_mac_addr peer_macaddr; |
| 5306 | /** peer type: see enum values above */ |
| 5307 | A_UINT32 peer_type; |
| 5308 | } wmi_peer_create_cmd_fixed_param; |
| 5309 | |
| 5310 | typedef struct { |
| 5311 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_delete_cmd_fixed_param */ |
| 5312 | /** unique id identifying the VDEV, generated by the caller */ |
| 5313 | A_UINT32 vdev_id; |
| 5314 | /** peer MAC address */ |
| 5315 | wmi_mac_addr peer_macaddr; |
| 5316 | } wmi_peer_delete_cmd_fixed_param; |
| 5317 | |
| 5318 | typedef struct { |
| 5319 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_flush_tids_cmd_fixed_param */ |
| 5320 | /** unique id identifying the VDEV, generated by the caller */ |
| 5321 | A_UINT32 vdev_id; |
| 5322 | /** peer MAC address */ |
| 5323 | wmi_mac_addr peer_macaddr; |
| 5324 | /** tid bitmap identifying the tids to flush */ |
| 5325 | A_UINT32 peer_tid_bitmap; |
| 5326 | } wmi_peer_flush_tids_cmd_fixed_param; |
| 5327 | |
| 5328 | typedef struct { |
| 5329 | /** rate mode . 0: disable fixed rate (auto rate) |
| 5330 | * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps |
| 5331 | * 2: ht20 11n rate specified as mcs index |
| 5332 | * 3: ht40 11n rate specified as mcs index |
| 5333 | */ |
| 5334 | A_UINT32 rate_mode; |
| 5335 | /** 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB) |
| 5336 | * and series 3 is stored at byte 3 (MSB) */ |
| 5337 | A_UINT32 rate_series; |
| 5338 | /** 4 retry counts for 4 rate series. retry count for rate 0 is stored in byte 0 (LSB) |
| 5339 | * and retry count for rate 3 is stored at byte 3 (MSB) */ |
| 5340 | A_UINT32 rate_retries; |
| 5341 | } wmi_fixed_rate; |
| 5342 | |
| 5343 | typedef struct { |
| 5344 | /** unique id identifying the VDEV, generated by the caller */ |
| 5345 | A_UINT32 vdev_id; |
| 5346 | /** peer MAC address */ |
| 5347 | wmi_mac_addr peer_macaddr; |
| 5348 | /** fixed rate */ |
| 5349 | wmi_fixed_rate peer_fixed_rate; |
| 5350 | } wmi_peer_fixed_rate_cmd; |
| 5351 | |
| 5352 | #define WMI_MGMT_TID 17 |
| 5353 | |
| 5354 | typedef struct { |
| 5355 | A_UINT32 tlv_header; |
| 5356 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_clear_resp_cmd_fixed_param */ |
| 5357 | /** unique id identifying the VDEV, generated by the caller */ |
| 5358 | A_UINT32 vdev_id; |
| 5359 | /** peer MAC address */ |
| 5360 | wmi_mac_addr peer_macaddr; |
| 5361 | } wmi_addba_clear_resp_cmd_fixed_param; |
| 5362 | |
| 5363 | typedef struct { |
| 5364 | A_UINT32 tlv_header; |
| 5365 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_send_cmd_fixed_param */ |
| 5366 | /** unique id identifying the VDEV, generated by the caller */ |
| 5367 | A_UINT32 vdev_id; |
| 5368 | /** peer MAC address */ |
| 5369 | wmi_mac_addr peer_macaddr; |
| 5370 | /** Tid number */ |
| 5371 | A_UINT32 tid; |
| 5372 | /** Buffer/Window size*/ |
| 5373 | A_UINT32 buffersize; |
| 5374 | } wmi_addba_send_cmd_fixed_param; |
| 5375 | |
| 5376 | typedef struct { |
| 5377 | A_UINT32 tlv_header; |
| 5378 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delba_send_cmd_fixed_param */ |
| 5379 | /** unique id identifying the VDEV, generated by the caller */ |
| 5380 | A_UINT32 vdev_id; |
| 5381 | /** peer MAC address */ |
| 5382 | wmi_mac_addr peer_macaddr; |
| 5383 | /** Tid number */ |
| 5384 | A_UINT32 tid; |
| 5385 | /** Is Initiator */ |
| 5386 | A_UINT32 initiator; |
| 5387 | /** Reason code */ |
| 5388 | A_UINT32 reasoncode; |
| 5389 | } wmi_delba_send_cmd_fixed_param; |
| 5390 | |
| 5391 | typedef struct { |
| 5392 | A_UINT32 tlv_header; |
| 5393 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_addba_setresponse_cmd_fixed_param */ |
| 5394 | /** unique id identifying the vdev, generated by the caller */ |
| 5395 | A_UINT32 vdev_id; |
| 5396 | /** peer mac address */ |
| 5397 | wmi_mac_addr peer_macaddr; |
| 5398 | /** Tid number */ |
| 5399 | A_UINT32 tid; |
| 5400 | /** status code */ |
| 5401 | A_UINT32 statuscode; |
| 5402 | } wmi_addba_setresponse_cmd_fixed_param; |
| 5403 | |
| 5404 | typedef struct { |
| 5405 | A_UINT32 tlv_header; |
| 5406 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_send_singleamsdu_cmd_fixed_param */ |
| 5407 | /** unique id identifying the vdev, generated by the caller */ |
| 5408 | A_UINT32 vdev_id; |
| 5409 | /** peer mac address */ |
| 5410 | wmi_mac_addr peer_macaddr; |
| 5411 | /** Tid number */ |
| 5412 | A_UINT32 tid; |
| 5413 | } wmi_send_singleamsdu_cmd_fixed_param; |
| 5414 | |
| 5415 | /* Type of Station DTIM Power Save method */ |
| 5416 | enum { |
| 5417 | /* For NORMAL DTIM, the parameter is the number of beacon intervals and |
| 5418 | * also the same value as the listen interval. For this method, the |
| 5419 | * station will wake up based on the listen interval. If this |
| 5420 | * listen interval is not equal to DTIM, then the station may |
| 5421 | * miss certain DTIM beacons. If this value is 1, then the |
| 5422 | * station will wake up for every beacon. |
| 5423 | */ |
| 5424 | WMI_STA_DTIM_PS_NORMAL_DTIM = 0x01, |
| 5425 | /* For MODULATED_DTIM, parameter is a multiple of DTIM beacons to skip. |
| 5426 | * When this value is 1, then the station will wake at every DTIM beacon. |
| 5427 | * If this value is >1, then the station will skip certain DTIM beacons. |
| 5428 | * This value is the multiple of DTIM intervals that the station will |
| 5429 | * wake up to receive the DTIM beacons. |
| 5430 | */ |
| 5431 | WMI_STA_DTIM_PS_MODULATED_DTIM = 0x02, |
| 5432 | }; |
| 5433 | |
| 5434 | /* Parameter structure for the WMI_STA_DTIM_PS_METHOD_CMDID */ |
| 5435 | typedef struct { |
| 5436 | A_UINT32 tlv_header; |
| 5437 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_dtim_ps_method_cmd_fixed_param */ |
| 5438 | /** unique id identifying the VDEV, generated by the caller */ |
| 5439 | A_UINT32 vdev_id; |
| 5440 | /* Station DTIM Power Save method as defined above */ |
| 5441 | A_UINT32 dtim_pwrsave_method; |
| 5442 | /* DTIM PS value. Contents depends on the method */ |
| 5443 | A_UINT32 value; |
| 5444 | /* Modulated DTIM value */ |
| 5445 | A_UINT32 MaxLIModulatedDTIM; |
| 5446 | } wmi_sta_dtim_ps_method_cmd_fixed_param; |
| 5447 | |
| 5448 | /* |
| 5449 | * For Station UAPSD Auto Trigger feature, the Firmware monitors the |
| 5450 | * uAPSD uplink and downlink traffic for each uAPSD enabled WMM ACs. |
| 5451 | * If there is no uplink/download for the specified service interval (field service_interval), |
| 5452 | * firmware will auto generate a QOS-NULL trigger for that WMM-AP with the TID value |
| 5453 | * specified in the UP (field user_priority). |
| 5454 | * Firmware also monitors the responses for these QOS-NULL triggers. |
| 5455 | * If the peer does not have any delivery frames, it will respond with |
| 5456 | * QOS-NULL (EOSP=1). This feature of only using service interval is assumed to be mandatory for all |
| 5457 | * firmware implementation. For this basic implementation, the suspend_interval and delay_interval |
| 5458 | * are unused and should be set to 0. |
| 5459 | * When service_interval is 0, then the firmware will not send any trigger frames. This is for |
| 5460 | * certain host-based implementations that don't want this firmware offload. |
| 5461 | * Note that the per-AC intervals are required for some usage scenarios. This is why the intervals |
| 5462 | * are given in the array of ac_param[]. For example, Voice service interval may defaults to 20 ms |
| 5463 | * and rest of the AC default to 300 ms. |
| 5464 | * |
| 5465 | * The service bit, WMI_STA_UAPSD_VAR_AUTO_TRIG, will indicate that the more advanced feature |
| 5466 | * of variable auto trigger is supported. The suspend_interval and delay_interval is used in |
| 5467 | * the more advanced monitoring method. |
| 5468 | * If the PEER does not have any delivery enabled data frames (non QOS-NULL) for the |
| 5469 | * suspend interval (field suspend_interval), firmware will change its auto trigger interval |
| 5470 | * to delay interval (field delay_interval). This way, when there is no traffic, the station |
| 5471 | * will save more power by waking up less and sending less trigger frames. |
| 5472 | * The (service_interval < suspend_interval) and (service_interval < delay_interval). |
| 5473 | * If this variable auto trigger is not required, then the suspend_interval and delay_interval |
| 5474 | * should be 0. |
| 5475 | */ |
| 5476 | typedef struct { |
| 5477 | A_UINT32 tlv_header; |
| 5478 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_param */ |
| 5479 | /** WMM Access category from 0 to 3 */ |
| 5480 | A_UINT32 wmm_ac; |
| 5481 | /** User priority to use in trigger frames. It is the TID |
| 5482 | * value. This field needs to be specified and may not be |
| 5483 | * equivalent to AC since some implementation may use the TSPEC |
| 5484 | * to enable UAPSD and negotiate a particular user priority. */ |
| 5485 | A_UINT32 user_priority; |
| 5486 | /** service interval in ms */ |
| 5487 | A_UINT32 service_interval; |
| 5488 | /** Suspend interval in ms */ |
| 5489 | A_UINT32 suspend_interval; |
| 5490 | /** delay interval in ms */ |
| 5491 | A_UINT32 delay_interval; |
| 5492 | } wmi_sta_uapsd_auto_trig_param; |
| 5493 | |
| 5494 | typedef struct { |
| 5495 | A_UINT32 tlv_header; |
| 5496 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sta_uapsd_auto_trig_cmd_fixed_param */ |
| 5497 | /** unique id identifying the VDEV, generated by the caller */ |
| 5498 | A_UINT32 vdev_id; |
| 5499 | /** peer mac address */ |
| 5500 | wmi_mac_addr peer_macaddr; |
| 5501 | /** Number of AC to specify */ |
| 5502 | A_UINT32 num_ac; |
| 5503 | /* |
| 5504 | * Following this struc is the TLV: |
| 5505 | * wmi_sta_uapsd_auto_trig_param ac_param[]; //Variable number of AC parameters (defined by field num_ac) |
| 5506 | */ |
| 5507 | |
| 5508 | } wmi_sta_uapsd_auto_trig_cmd_fixed_param; |
| 5509 | |
| 5510 | /** mimo powersave state */ |
| 5511 | #define WMI_PEER_MIMO_PS_STATE 0x1 |
| 5512 | /** enable/disable AMPDU . initial value (enabled) */ |
| 5513 | #define WMI_PEER_AMPDU 0x2 |
| 5514 | /** authorize/unauthorize peer. initial value is unauthorized (0) */ |
| 5515 | #define WMI_PEER_AUTHORIZE 0x3 |
| 5516 | /** peer channel bandwidth */ |
| 5517 | #define WMI_PEER_CHWIDTH 0x4 |
| 5518 | /** peer NSS */ |
| 5519 | #define WMI_PEER_NSS 0x5 |
| 5520 | /** USE 4 ADDR */ |
| 5521 | #define WMI_PEER_USE_4ADDR 0x6 |
| 5522 | /* set group membership status */ |
| 5523 | #define WMI_PEER_MEMBERSHIP 0x7 |
| 5524 | #define WMI_PEER_USERPOS 0x8 |
| 5525 | /* |
| 5526 | * A critical high-level protocol is being used with this peer. Target |
| 5527 | * should take appropriate measures (if possible) to ensure more |
| 5528 | * reliable link with minimal latency. This *may* include modifying the |
| 5529 | * station power save policy, enabling more RX chains, increased |
| 5530 | * priority of channel scheduling, etc. |
| 5531 | * |
| 5532 | * NOTE: This parameter should only be considered a hint as specific |
| 5533 | * behavior will depend on many factors including current network load |
| 5534 | * and vdev/peer configuration. |
| 5535 | * |
| 5536 | * For STA VDEV this peer corresponds to the AP's BSS peer. |
| 5537 | * For AP VDEV this peer corresponds to the remote peer STA. |
| 5538 | */ |
| 5539 | #define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9 |
| 5540 | /* set Tx failure count threshold for the peer - Currently unused */ |
| 5541 | #define WMI_PEER_TX_FAIL_CNT_THR 0xA |
| 5542 | /* Enable H/W retry and Enable H/W Send CTS2S before Data */ |
| 5543 | #define WMI_PEER_SET_HW_RETRY_CTS2S 0xB |
| 5544 | |
| 5545 | /* Set peer advertised IBSS atim window length */ |
| 5546 | #define WMI_PEER_IBSS_ATIM_WINDOW_LENGTH 0xC |
| 5547 | |
| 5548 | /** peer phy mode */ |
| 5549 | #define WMI_PEER_PHYMODE 0xD |
| 5550 | |
| 5551 | /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */ |
| 5552 | #define WMI_PEER_MIMO_PS_NONE 0x0 |
| 5553 | #define WMI_PEER_MIMO_PS_STATIC 0x1 |
| 5554 | #define WMI_PEER_MIMO_PS_DYNAMIC 0x2 |
| 5555 | |
| 5556 | typedef struct { |
| 5557 | A_UINT32 tlv_header; |
| 5558 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */ |
| 5559 | /** unique id identifying the VDEV, generated by the caller */ |
| 5560 | A_UINT32 vdev_id; |
| 5561 | /** peer MAC address */ |
| 5562 | wmi_mac_addr peer_macaddr; |
| 5563 | /** parameter id */ |
| 5564 | A_UINT32 param_id; |
| 5565 | /** parametr value */ |
| 5566 | A_UINT32 param_value; |
| 5567 | } wmi_peer_set_param_cmd_fixed_param; |
| 5568 | |
| 5569 | #define MAX_SUPPORTED_RATES 128 |
| 5570 | |
| 5571 | typedef struct { |
| 5572 | /** total number of rates */ |
| 5573 | A_UINT32 num_rates; |
| 5574 | /** |
| 5575 | * rates (each 8bit value) packed into a 32 bit word. |
| 5576 | * the rates are filled from least significant byte to most |
| 5577 | * significant byte. |
| 5578 | */ |
| 5579 | A_UINT32 rates[(MAX_SUPPORTED_RATES / 4) + 1]; |
| 5580 | } wmi_rate_set; |
| 5581 | |
| 5582 | /* NOTE: It would bea good idea to represent the Tx MCS |
| 5583 | * info in one word and Rx in another word. This is split |
| 5584 | * into multiple words for convenience |
| 5585 | */ |
| 5586 | typedef struct { |
| 5587 | A_UINT32 tlv_header; |
| 5588 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vht_rate_set */ |
| 5589 | A_UINT32 rx_max_rate; /* Max Rx data rate */ |
| 5590 | A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */ |
| 5591 | A_UINT32 tx_max_rate; /* Max Tx data rate */ |
| 5592 | A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */ |
| 5593 | } wmi_vht_rate_set; |
| 5594 | |
| 5595 | /* |
| 5596 | * IMPORTANT: Make sure the bit definitions here are consistent |
| 5597 | * with the ni_flags definitions in wlan_peer.h |
| 5598 | */ |
| 5599 | #define WMI_PEER_AUTH 0x00000001 /* Authorized for data */ |
| 5600 | #define WMI_PEER_QOS 0x00000002 /* QoS enabled */ |
| 5601 | #define WMI_PEER_NEED_PTK_4_WAY 0x00000004 /* Needs PTK 4 way handshake for authorization */ |
| 5602 | #define WMI_PEER_NEED_GTK_2_WAY 0x00000010 /* Needs GTK 2 way handshake after 4-way handshake */ |
| 5603 | #define WMI_PEER_APSD 0x00000800 /* U-APSD power save enabled */ |
| 5604 | #define WMI_PEER_HT 0x00001000 /* HT enabled */ |
| 5605 | #define WMI_PEER_40MHZ 0x00002000 /* 40MHz enabld */ |
| 5606 | #define WMI_PEER_STBC 0x00008000 /* STBC Enabled */ |
| 5607 | #define WMI_PEER_LDPC 0x00010000 /* LDPC ENabled */ |
| 5608 | #define WMI_PEER_DYN_MIMOPS 0x00020000 /* Dynamic MIMO PS Enabled */ |
| 5609 | #define WMI_PEER_STATIC_MIMOPS 0x00040000 /* Static MIMO PS enabled */ |
| 5610 | #define WMI_PEER_SPATIAL_MUX 0x00200000 /* SM Enabled */ |
| 5611 | #define WMI_PEER_VHT 0x02000000 /* VHT Enabled */ |
| 5612 | #define WMI_PEER_80MHZ 0x04000000 /* 80MHz enabld */ |
| 5613 | #define WMI_PEER_PMF 0x08000000 /* Robust Management Frame Protection enabled */ |
| 5614 | /** CAUTION TODO: Place holder for WLAN_PEER_F_PS_PRESEND_REQUIRED = 0x10000000. Need to be clean up */ |
| 5615 | #define WMI_PEER_IS_P2P_CAPABLE 0x20000000 /* P2P capable peer */ |
| 5616 | #define WMI_PEER_160MHZ 0x40000000 /* 160 MHz enabled */ |
| 5617 | #define WMI_PEER_SAFEMODE_EN 0x80000000 /* Fips Mode Enabled */ |
| 5618 | |
| 5619 | /** |
| 5620 | * Peer rate capabilities. |
| 5621 | * |
| 5622 | * This is of interest to the ratecontrol |
| 5623 | * module which resides in the firmware. The bit definitions are |
| 5624 | * consistent with that defined in if_athrate.c. |
| 5625 | * |
| 5626 | * @todo |
| 5627 | * Move this to a common header file later so there is no need to |
| 5628 | * duplicate the definitions or maintain consistency. |
| 5629 | */ |
| 5630 | #define WMI_RC_DS_FLAG 0x01 /* Dual stream flag */ |
| 5631 | #define WMI_RC_CW40_FLAG 0x02 /* CW 40 */ |
| 5632 | #define WMI_RC_SGI_FLAG 0x04 /* Short Guard Interval */ |
| 5633 | #define WMI_RC_HT_FLAG 0x08 /* HT */ |
| 5634 | #define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */ |
| 5635 | #define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */ |
| 5636 | #define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */ |
| 5637 | #define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */ |
| 5638 | #define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */ |
| 5639 | #define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */ |
| 5640 | #define WMI_RC_TS_FLAG 0x200 /* Three stream flag */ |
| 5641 | #define WMI_RC_UAPSD_FLAG 0x400 /* UAPSD Rate Control */ |
| 5642 | |
| 5643 | typedef struct { |
| 5644 | A_UINT32 tlv_header; |
| 5645 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_assoc_complete_cmd_fixed_param */ |
| 5646 | /** peer MAC address */ |
| 5647 | wmi_mac_addr peer_macaddr; |
| 5648 | /** VDEV id */ |
| 5649 | A_UINT32 vdev_id; |
| 5650 | /** assoc = 1 reassoc = 0 */ |
| 5651 | A_UINT32 peer_new_assoc; |
| 5652 | /** peer associd (16 bits) */ |
| 5653 | A_UINT32 peer_associd; |
| 5654 | /** peer station flags: see definition above */ |
| 5655 | A_UINT32 peer_flags; |
| 5656 | /** negotiated capabilities (lower 16 bits)*/ |
| 5657 | A_UINT32 peer_caps; |
| 5658 | /** Listen interval */ |
| 5659 | A_UINT32 peer_listen_intval; |
| 5660 | /** HT capabilties of the peer */ |
| 5661 | A_UINT32 peer_ht_caps; |
| 5662 | /** maximum rx A-MPDU length */ |
| 5663 | A_UINT32 peer_max_mpdu; |
| 5664 | /** mpdu density of the peer in usec(0 to 16) */ |
| 5665 | A_UINT32 peer_mpdu_density; |
| 5666 | /** peer rate capabilties see flags above */ |
| 5667 | A_UINT32 peer_rate_caps; |
| 5668 | /** num spatial streams */ |
| 5669 | A_UINT32 peer_nss; |
| 5670 | /** VHT capabilties of the peer */ |
| 5671 | A_UINT32 peer_vht_caps; |
| 5672 | /** phy mode */ |
| 5673 | A_UINT32 peer_phymode; |
| 5674 | /** HT Operation Element of the peer. Five bytes packed in 2 |
| 5675 | * INT32 array and filled from lsb to msb. |
| 5676 | * Note that the size of array peer_ht_info[] cannotbe changed |
| 5677 | * without breaking WMI Compatibility. */ |
| 5678 | A_UINT32 peer_ht_info[2]; |
| 5679 | /** total number of negotiated legacy rate set. Also the sizeof |
| 5680 | * peer_legacy_rates[] */ |
| 5681 | A_UINT32 num_peer_legacy_rates; |
| 5682 | /** total number of negotiated ht rate set. Also the sizeof |
| 5683 | * peer_ht_rates[] */ |
| 5684 | A_UINT32 num_peer_ht_rates; |
| 5685 | /* Following this struc are the TLV's: |
| 5686 | * A_UINT8 peer_legacy_rates[]; |
| 5687 | * A_UINT8 peer_ht_rates[]; |
| 5688 | * wmi_vht_rate_set peer_vht_rates; //VHT capabilties of the peer |
| 5689 | */ |
| 5690 | } wmi_peer_assoc_complete_cmd_fixed_param; |
| 5691 | |
| 5692 | typedef struct { |
| 5693 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_add_wds_entry_cmd_fixed_param */ |
| 5694 | /** peer MAC address */ |
| 5695 | wmi_mac_addr peer_macaddr; |
| 5696 | /** wds MAC addr */ |
| 5697 | wmi_mac_addr wds_macaddr; |
| 5698 | } wmi_peer_add_wds_entry_cmd_fixed_param; |
| 5699 | |
| 5700 | typedef struct { |
| 5701 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_remove_wds_entry_cmd_fixed_param */ |
| 5702 | /** wds MAC addr */ |
| 5703 | wmi_mac_addr wds_macaddr; |
| 5704 | } wmi_peer_remove_wds_entry_cmd_fixed_param; |
| 5705 | |
| 5706 | typedef struct { |
| 5707 | /** peer MAC address */ |
| 5708 | wmi_mac_addr peer_macaddr; |
| 5709 | } wmi_peer_q_empty_callback_event; |
| 5710 | |
| 5711 | /** |
| 5712 | * Channel info WMI event |
| 5713 | */ |
| 5714 | typedef struct { |
| 5715 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param */ |
| 5716 | /** Error code */ |
| 5717 | A_UINT32 err_code; |
| 5718 | /** Channel freq */ |
| 5719 | A_UINT32 freq; |
| 5720 | /** Read flags */ |
| 5721 | A_UINT32 cmd_flags; |
| 5722 | /** Noise Floor value */ |
| 5723 | A_UINT32 noise_floor; |
| 5724 | /** rx clear count */ |
| 5725 | A_UINT32 rx_clear_count; |
| 5726 | /** cycle count */ |
| 5727 | A_UINT32 cycle_count; |
| 5728 | } wmi_chan_info_event_fixed_param; |
| 5729 | |
| 5730 | /** |
| 5731 | * Non wlan interference event |
| 5732 | */ |
| 5733 | typedef struct { |
| 5734 | A_UINT32 tlv_header; |
| 5735 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_ath_dcs_cw_int */ |
| 5736 | A_UINT32 channel; /* either number or freq in mhz */ |
| 5737 | } ath_dcs_cw_int; |
| 5738 | |
| 5739 | /** |
| 5740 | * wlan_dcs_im_tgt_stats |
| 5741 | * |
| 5742 | */ |
| 5743 | typedef struct _wlan_dcs_im_tgt_stats { |
| 5744 | /** current running TSF from the TSF-1 */ |
| 5745 | A_UINT32 reg_tsf32; |
| 5746 | |
| 5747 | /** Known last frame rssi, in case of multiple stations, if |
| 5748 | * and at different ranges, this would not gaurantee that |
| 5749 | * this is the least rssi. |
| 5750 | */ |
| 5751 | A_UINT32 last_ack_rssi; |
| 5752 | |
| 5753 | /** Sum of all the failed durations in the last one second interval. |
| 5754 | */ |
| 5755 | A_UINT32 tx_waste_time; |
| 5756 | /** count how many times the hal_rxerr_phy is marked, in this |
| 5757 | * time period |
| 5758 | */ |
| 5759 | A_UINT32 rx_time; |
| 5760 | A_UINT32 phyerr_cnt; |
| 5761 | |
| 5762 | /** |
| 5763 | * WLAN IM stats from target to host |
| 5764 | * |
| 5765 | * Below statistics are sent from target to host periodically. |
| 5766 | * These are collected at target as long as target is running |
| 5767 | * and target chip is not in sleep. |
| 5768 | * |
| 5769 | */ |
| 5770 | |
| 5771 | /** listen time from ANI */ |
| 5772 | A_INT32 listen_time; |
| 5773 | |
| 5774 | /** tx frame count, MAC_PCU_TX_FRAME_CNT_ADDRESS */ |
| 5775 | A_UINT32 reg_tx_frame_cnt; |
| 5776 | |
| 5777 | /** rx frame count, MAC_PCU_RX_FRAME_CNT_ADDRESS */ |
| 5778 | A_UINT32 reg_rx_frame_cnt; |
| 5779 | |
| 5780 | /** rx clear count, MAC_PCU_RX_CLEAR_CNT_ADDRESS */ |
| 5781 | A_UINT32 reg_rxclr_cnt; |
| 5782 | |
| 5783 | /** total cycle counts MAC_PCU_CYCLE_CNT_ADDRESS */ |
| 5784 | A_UINT32 reg_cycle_cnt; /* delta cycle count */ |
| 5785 | |
| 5786 | /** extenstion channel rx clear count */ |
| 5787 | A_UINT32 reg_rxclr_ext_cnt; |
| 5788 | |
| 5789 | /** OFDM phy error counts, MAC_PCU_PHY_ERR_CNT_1_ADDRESS */ |
| 5790 | A_UINT32 reg_ofdm_phyerr_cnt; |
| 5791 | |
| 5792 | /** CCK phy error count, MAC_PCU_PHY_ERR_CNT_2_ADDRESS */ |
| 5793 | A_UINT32 reg_cck_phyerr_cnt; /* CCK err count since last reset, read from register */ |
| 5794 | |
| 5795 | } wlan_dcs_im_tgt_stats_t; |
| 5796 | |
| 5797 | /** |
| 5798 | * wmi_dcs_interference_event_t |
| 5799 | * |
| 5800 | * Right now this is event and stats together. Partly this is |
| 5801 | * because cw interference is handled in target now. This |
| 5802 | * can be done at host itself, if we can carry the NF alone |
| 5803 | * as a stats event. In future this would be done and this |
| 5804 | * event would carry only stats. |
| 5805 | */ |
| 5806 | typedef struct { |
| 5807 | A_UINT32 tlv_header; |
| 5808 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_dcs_interference_event_fixed_param */ |
| 5809 | /** |
| 5810 | * Type of the event present, either the cw interference event, or the wlan_im stats |
| 5811 | */ |
| 5812 | A_UINT32 interference_type; /* type of interference, wlan or cw */ |
| 5813 | /* |
| 5814 | * Following this struct are these TLVs. Note that they are both array of structures |
| 5815 | * but can have at most one element. Which TLV is empty or has one element depends |
| 5816 | * on the field interference_type. This is to emulate an union with cw_int and wlan_stat |
| 5817 | * elements (not arrays). union { ath_dcs_cw_int cw_int; wlan_dcs_im_tgt_stats_t wlan_stat; } int_event; |
| 5818 | * |
| 5819 | * //cw_interference event |
| 5820 | * ath_dcs_cw_int cw_int[]; this element |
| 5821 | * // wlan im interfernce stats |
| 5822 | * wlan_dcs_im_tgt_stats_t wlan_stat[]; |
| 5823 | */ |
| 5824 | } wmi_dcs_interference_event_fixed_param; |
| 5825 | |
| 5826 | enum wmi_peer_mcast_group_action { |
| 5827 | wmi_peer_mcast_group_action_add = 0, |
| 5828 | wmi_peer_mcast_group_action_del = 1 |
| 5829 | }; |
| 5830 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_M 0x1 |
| 5831 | #define WMI_PEER_MCAST_GROUP_FLAG_ACTION_S 0 |
| 5832 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_M 0x2 |
| 5833 | #define WMI_PEER_MCAST_GROUP_FLAG_WILDCARD_S 1 |
| 5834 | /* multicast group membership commands */ |
| 5835 | /* TODO: Converting this will be tricky since it uses an union. |
| 5836 | Also, the mac_addr is not aligned. We will convert to the wmi_mac_addr */ |
| 5837 | typedef struct { |
| 5838 | A_UINT32 tlv_header; |
| 5839 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_mcast_group_cmd_fixed_param */ |
| 5840 | A_UINT32 flags; |
| 5841 | wmi_mac_addr ucast_mac_addr; |
| 5842 | A_UINT8 mcast_ip_addr[16]; /* in network byte order */ |
| 5843 | } wmi_peer_mcast_group_cmd_fixed_param; |
| 5844 | |
| 5845 | /** Offload Scan and Roaming related commands */ |
| 5846 | /** The FW performs 2 different kinds of offload scans independent |
| 5847 | * of host. One is Roam scan which is primarily performed on a |
| 5848 | * station VDEV after association to look for a better AP that |
| 5849 | * the station VDEV can roam to. The second scan is connect scan |
| 5850 | * which is mainly performed when the station is not associated |
| 5851 | * and to look for a matching AP profile from a list of |
| 5852 | * configured profiles. */ |
| 5853 | |
| 5854 | /** |
| 5855 | * WMI_ROAM_SCAN_MODE: Set Roam Scan mode |
| 5856 | * the roam scan mode is one of the periodic, rssi change, both, none. |
| 5857 | * None : Disable Roam scan. No Roam scan at all. |
| 5858 | * Periodic : Scan periodically with a configurable period. |
| 5859 | * Rssi change : Scan when ever rssi to current AP changes by the threshold value |
| 5860 | * set by WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD command. |
| 5861 | * Both : Both of the above (scan when either period expires or rss to current AP changes by X amount) |
| 5862 | * |
| 5863 | */ |
| 5864 | typedef struct { |
| 5865 | A_UINT32 tlv_header; |
| 5866 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */ |
| 5867 | A_UINT32 roam_scan_mode; |
| 5868 | A_UINT32 vdev_id; |
| 5869 | } wmi_roam_scan_mode_fixed_param; |
| 5870 | |
| 5871 | #define WMI_ROAM_SCAN_MODE_NONE 0x0 |
| 5872 | #define WMI_ROAM_SCAN_MODE_PERIODIC 0x1 |
| 5873 | #define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2 |
| 5874 | #define WMI_ROAM_SCAN_MODE_BOTH 0x3 |
| 5875 | /* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */ |
| 5876 | #define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4 |
| 5877 | |
| 5878 | typedef struct { |
| 5879 | A_UINT32 tlv_header; |
| 5880 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */ |
| 5881 | A_UINT32 vdev_id; |
| 5882 | A_UINT32 command_arg; |
| 5883 | } wmi_roam_scan_cmd_fixed_param; |
| 5884 | |
| 5885 | #define WMI_ROAM_SCAN_STOP_CMD 0x1 |
| 5886 | |
| 5887 | /** |
| 5888 | * WMI_ROAM_SCAN_RSSI_THRESHOLD : set scan rssi thresold |
| 5889 | * scan rssi threshold is the rssi threshold below which the FW will start running Roam scans. |
| 5890 | * Applicable when WMI_ROAM_SCAN_MODE is not set to none. |
| 5891 | */ |
| 5892 | typedef struct { |
| 5893 | A_UINT32 tlv_header; |
| 5894 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param */ |
| 5895 | /** unique id identifying the VDEV, generated by the caller */ |
| 5896 | A_UINT32 vdev_id; |
| 5897 | /** roam scan rssi threshold */ |
| 5898 | A_UINT32 roam_scan_rssi_thresh; |
| 5899 | /** When using Hw generated beacon RSSI interrupts */ |
| 5900 | A_UINT32 roam_rssi_thresh_diff; |
| 5901 | /** 5G scan max count */ |
| 5902 | A_UINT32 hirssi_scan_max_count; |
| 5903 | /** 5G scan rssi change threshold value */ |
| 5904 | A_UINT32 hirssi_scan_delta; |
| 5905 | /** 5G scan upper bound */ |
| 5906 | A_UINT32 hirssi_upper_bound; |
| 5907 | /* The TLVs will follow. |
| 5908 | * wmi_roam_scan_extended_threshold_param extended_param; |
| 5909 | * wmi_roam_earlystop_rssi_thres_param earlystop_param; |
| 5910 | */ |
| 5911 | } wmi_roam_scan_rssi_threshold_fixed_param; |
| 5912 | |
| 5913 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_FIXED 0x0 |
| 5914 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LINEAR 0x1 |
| 5915 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_LOG 0x2 |
| 5916 | #define WMI_ROAM_5G_BOOST_PENALIZE_ALGO_EXP 0x3 |
| 5917 | |
| 5918 | typedef struct { |
| 5919 | /** TLV tag and len; tag equals |
| 5920 | *WMITLV_TAG_STRUC_wmi_roam_scan_extended_threshold_param */ |
| 5921 | A_UINT32 tlv_header; |
| 5922 | A_UINT32 boost_threshold_5g; /** RSSI threshold above which 5GHz RSSI is favored */ |
| 5923 | A_UINT32 penalty_threshold_5g; /** RSSI threshold below which 5GHz RSSI is penalized */ |
| 5924 | A_UINT32 boost_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 5925 | A_UINT32 boost_factor_5g; /** factor by which 5GHz RSSI is boosted */ |
| 5926 | A_UINT32 penalty_algorithm_5g; /** 0 == fixed, 1 == linear, 2 == logarithm ..etc */ |
| 5927 | A_UINT32 penalty_factor_5g; /** factor by which 5GHz RSSI is penalized */ |
| 5928 | A_UINT32 max_boost_5g; /** maximum boost that can be applied to a 5GHz RSSI */ |
| 5929 | A_UINT32 max_penalty_5g; /** maximum penality that can be applied to a 5GHz RSSI */ |
| 5930 | /** |
| 5931 | * RSSI below which roam is kicked in by background scan |
| 5932 | * although rssi is still good |
| 5933 | */ |
| 5934 | A_UINT32 good_rssi_threshold; |
| 5935 | } wmi_roam_scan_extended_threshold_param; |
| 5936 | |
| 5937 | |
| 5938 | /** |
| 5939 | * WMI_ROAM_SCAN_PERIOD: period for roam scan. |
| 5940 | * Applicable when the scan mode is Periodic or both. |
| 5941 | */ |
| 5942 | typedef struct { |
| 5943 | A_UINT32 tlv_header; |
| 5944 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param */ |
| 5945 | /** unique id identifying the VDEV, generated by the caller */ |
| 5946 | A_UINT32 vdev_id; |
| 5947 | /** roam scan period value */ |
| 5948 | A_UINT32 roam_scan_period; |
| 5949 | /** Aging for Roam scans */ |
| 5950 | A_UINT32 roam_scan_age; |
| 5951 | } wmi_roam_scan_period_fixed_param; |
| 5952 | |
| 5953 | /** |
| 5954 | * WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD : rssi delta to trigger the roam scan. |
| 5955 | * Rssi change threshold used when mode is Rssi change (or) Both. |
| 5956 | * The FW will run the roam scan when ever the rssi changes (up or down) by the value set by this parameter. |
| 5957 | * Note scan is triggered based on the rssi threshold condition set by WMI_ROAM_SCAN_RSSI_THRESHOLD |
| 5958 | */ |
| 5959 | typedef struct { |
| 5960 | A_UINT32 tlv_header; |
| 5961 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param */ |
| 5962 | /** unique id identifying the VDEV, generated by the caller */ |
| 5963 | A_UINT32 vdev_id; |
| 5964 | /** roam scan rssi change threshold value */ |
| 5965 | A_UINT32 roam_scan_rssi_change_thresh; |
| 5966 | /** When using Hw generated beacon RSSI interrupts */ |
| 5967 | A_UINT32 bcn_rssi_weight; |
| 5968 | /** Minimum delay between two 5G scans */ |
| 5969 | A_UINT32 hirssi_delay_btw_scans; |
| 5970 | } wmi_roam_scan_rssi_change_threshold_fixed_param; |
| 5971 | |
| 5972 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1 |
| 5973 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2 |
| 5974 | #define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3 |
| 5975 | /** |
| 5976 | * TLV for roaming channel list |
| 5977 | */ |
| 5978 | typedef struct { |
| 5979 | A_UINT32 tlv_header; |
| 5980 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */ |
| 5981 | /** unique id identifying the VDEV, generated by the caller */ |
| 5982 | A_UINT32 vdev_id; |
| 5983 | /** WMI_CHAN_LIST_TAG */ |
| 5984 | A_UINT32 chan_list_type; |
| 5985 | /** # if channels to scan */ |
| 5986 | A_UINT32 num_chan; |
| 5987 | /** |
| 5988 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 5989 | * structure. The TLV's are: |
| 5990 | * A_UINT32 channel_list[]; |
| 5991 | **/ |
| 5992 | } wmi_roam_chan_list_fixed_param; |
| 5993 | |
| 5994 | /** Authentication modes */ |
| 5995 | enum { |
| 5996 | WMI_AUTH_NONE, /* no upper level auth */ |
| 5997 | WMI_AUTH_OPEN, /* open */ |
| 5998 | WMI_AUTH_SHARED, /* shared-key */ |
| 5999 | WMI_AUTH_8021X, /* 802.1x */ |
| 6000 | WMI_AUTH_AUTO, /* Auto */ |
| 6001 | WMI_AUTH_WPA, /* WPA */ |
| 6002 | WMI_AUTH_RSNA, /* WPA2/RSNA */ |
| 6003 | WMI_AUTH_CCKM, /* CCK */ |
| 6004 | WMI_AUTH_WAPI, /* WAPI */ |
| 6005 | WMI_AUTH_AUTO_PSK, |
| 6006 | WMI_AUTH_WPA_PSK, |
| 6007 | WMI_AUTH_RSNA_PSK, |
| 6008 | WMI_AUTH_WAPI_PSK, |
| 6009 | WMI_AUTH_FT_RSNA, /* 11r FT */ |
| 6010 | WMI_AUTH_FT_RSNA_PSK, |
| 6011 | WMI_AUTH_RSNA_PSK_SHA256, |
| 6012 | WMI_AUTH_RSNA_8021X_SHA256, |
| 6013 | }; |
| 6014 | |
| 6015 | typedef struct { |
| 6016 | /** authentication mode (defined above) */ |
| 6017 | A_UINT32 rsn_authmode; |
| 6018 | /** unicast cipher set */ |
| 6019 | A_UINT32 rsn_ucastcipherset; |
| 6020 | /** mcast/group cipher set */ |
| 6021 | A_UINT32 rsn_mcastcipherset; |
| 6022 | /** mcast/group management frames cipher set */ |
| 6023 | A_UINT32 rsn_mcastmgmtcipherset; |
| 6024 | } wmi_rsn_params; |
| 6025 | |
| 6026 | /** looking for a wps enabled AP */ |
| 6027 | #define WMI_AP_PROFILE_FLAG_WPS 0x1 |
| 6028 | /** looking for a secure AP */ |
| 6029 | #define WMI_AP_PROFILE_FLAG_CRYPTO 0x2 |
| 6030 | /** looking for a PMF enabled AP */ |
| 6031 | #define WMI_AP_PROFILE_FLAG_PMF 0x4 |
| 6032 | |
| 6033 | /** To match an open AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 6034 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be clear. |
| 6035 | * To match a WEP enabled AP, the rs_authmode should be set to WMI_AUTH_NONE |
| 6036 | * and WMI_AP_PROFILE_FLAG_CRYPTO should be set . |
| 6037 | */ |
| 6038 | |
| 6039 | typedef struct { |
| 6040 | A_UINT32 tlv_header; |
| 6041 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ap_profile */ |
| 6042 | /** flags as defined above */ |
| 6043 | A_UINT32 flags; |
| 6044 | /** |
| 6045 | * rssi thresold value: the value of the the candidate AP should |
| 6046 | * higher by this threshold than the rssi of the currrently associated AP. |
| 6047 | */ |
| 6048 | A_UINT32 rssi_threshold; |
| 6049 | /** |
| 6050 | * ssid vlaue to be matched. |
| 6051 | */ |
| 6052 | wmi_ssid ssid; |
| 6053 | |
| 6054 | /** |
| 6055 | * security params to be matched. |
| 6056 | */ |
| 6057 | /** authentication mode (defined above) */ |
| 6058 | A_UINT32 rsn_authmode; |
| 6059 | /** unicast cipher set */ |
| 6060 | A_UINT32 rsn_ucastcipherset; |
| 6061 | /** mcast/group cipher set */ |
| 6062 | A_UINT32 rsn_mcastcipherset; |
| 6063 | /** mcast/group management frames cipher set */ |
| 6064 | A_UINT32 rsn_mcastmgmtcipherset; |
| 6065 | } wmi_ap_profile; |
| 6066 | |
| 6067 | /** Support early stop roaming scanning when finding a strong candidate AP |
| 6068 | * A 'strong' candidate is |
| 6069 | * 1) Is eligible candidate |
| 6070 | * (all conditions are met in existing candidate selection). |
| 6071 | * 2) Its rssi is better than earlystop threshold. |
| 6072 | * Earlystop threshold will be relaxed as each channel is scanned. |
| 6073 | */ |
| 6074 | typedef struct { |
| 6075 | A_UINT32 tlv_header; |
| 6076 | /* Minimum RSSI threshold value for early stop, unit is dB above NF. */ |
| 6077 | A_UINT32 roam_earlystop_thres_min; |
| 6078 | /* Maminum RSSI threshold value for early stop, unit is dB above NF. */ |
| 6079 | A_UINT32 roam_earlystop_thres_max; |
| 6080 | } wmi_roam_earlystop_rssi_thres_param; |
| 6081 | |
| 6082 | /** Beacon filter wmi command info */ |
| 6083 | |
| 6084 | #define BCN_FLT_MAX_SUPPORTED_IES 256 |
| 6085 | #define BCN_FLT_MAX_ELEMS_IE_LIST BCN_FLT_MAX_SUPPORTED_IES/32 |
| 6086 | |
| 6087 | typedef struct bss_bcn_stats { |
| 6088 | A_UINT32 vdev_id; |
| 6089 | A_UINT32 bss_bcnsdropped; |
| 6090 | A_UINT32 bss_bcnsdelivered; |
| 6091 | } wmi_bss_bcn_stats_t; |
| 6092 | |
| 6093 | typedef struct bcn_filter_stats { |
| 6094 | A_UINT32 bcns_dropped; |
| 6095 | A_UINT32 bcns_delivered; |
| 6096 | A_UINT32 activefilters; |
| 6097 | wmi_bss_bcn_stats_t bss_stats; |
| 6098 | } wmi_bcnfilter_stats_t; |
| 6099 | |
| 6100 | typedef struct wmi_add_bcn_filter_cmd { |
| 6101 | A_UINT32 tlv_header; |
| 6102 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_add_bcn_filter_cmd_fixed_param */ |
| 6103 | A_UINT32 vdev_id; |
| 6104 | /* |
| 6105 | * Following this structure is the TLV: |
| 6106 | * A_UINT32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST]; |
| 6107 | */ |
| 6108 | } wmi_add_bcn_filter_cmd_fixed_param; |
| 6109 | |
| 6110 | typedef struct wmi_rmv_bcn_filter_cmd { |
| 6111 | A_UINT32 tlv_header; |
| 6112 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rmv_bcn_filter_cmd_fixed_param */ |
| 6113 | A_UINT32 vdev_id; |
| 6114 | } wmi_rmv_bcn_filter_cmd_fixed_param; |
| 6115 | |
| 6116 | #define WMI_BCN_SEND_DTIM_ZERO 1 |
| 6117 | #define WMI_BCN_SEND_DTIM_BITCTL_SET 2 |
| 6118 | typedef struct wmi_bcn_send_from_host { |
| 6119 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_bcn_send_from_host_cmd_fixed_param */ |
| 6120 | A_UINT32 vdev_id; |
| 6121 | A_UINT32 data_len; |
| 6122 | A_UINT32 frag_ptr; /* Physical address of the frame */ |
| 6123 | A_UINT32 frame_ctrl; /* farme ctrl to setup PPDU desc */ |
| 6124 | A_UINT32 dtim_flag; /* to control CABQ traffic */ |
| 6125 | } wmi_bcn_send_from_host_cmd_fixed_param; |
| 6126 | |
| 6127 | /* cmd to support bcn snd for all vaps at once */ |
| 6128 | typedef struct wmi_pdev_send_bcn { |
| 6129 | A_UINT32 num_vdevs; |
| 6130 | wmi_bcn_send_from_host_cmd_fixed_param bcn_cmd[1]; |
| 6131 | } wmi_pdev_send_bcn_cmd_t; |
| 6132 | |
| 6133 | /* |
| 6134 | * WMI_ROAM_AP_PROFILE: AP profile of connected AP for roaming. |
| 6135 | */ |
| 6136 | typedef struct { |
| 6137 | A_UINT32 tlv_header; |
| 6138 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param */ |
| 6139 | /** id of AP criteria */ |
| 6140 | A_UINT32 id; |
| 6141 | |
| 6142 | /** unique id identifying the VDEV, generated by the caller */ |
| 6143 | A_UINT32 vdev_id; |
| 6144 | |
| 6145 | /* |
| 6146 | * Following this structure is the TLV: |
| 6147 | * wmi_ap_profile ap_profile; //AP profile info |
| 6148 | */ |
| 6149 | } wmi_roam_ap_profile_fixed_param; |
| 6150 | |
| 6151 | /** |
| 6152 | * WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile. |
| 6153 | */ |
| 6154 | typedef struct { |
| 6155 | /** id of AP criteria */ |
| 6156 | A_UINT32 id; |
| 6157 | |
| 6158 | /** unique id identifying the VDEV, generated by the caller */ |
| 6159 | A_UINT32 vdev_id; |
| 6160 | |
| 6161 | /** AP profile info */ |
| 6162 | wmi_ap_profile ap_profile; |
| 6163 | |
| 6164 | } wmi_ofl_scan_add_ap_profile; |
| 6165 | |
| 6166 | /** |
| 6167 | * WMI_OFL_SCAN_REMOVE_AP_CRITERIA: remove an ap profile. |
| 6168 | */ |
| 6169 | typedef struct { |
| 6170 | /** id of AP criteria */ |
| 6171 | A_UINT32 id; |
| 6172 | /** unique id identifying the VDEV, generated by the caller */ |
| 6173 | A_UINT32 vdev_id; |
| 6174 | } wmi_ofl_scan_remove_ap_profile; |
| 6175 | |
| 6176 | /** |
| 6177 | * WMI_OFL_SCAN_PERIOD: period in msec for offload scan. |
| 6178 | * 0 will disable ofload scan and a very low value will perform a continous |
| 6179 | * scan. |
| 6180 | */ |
| 6181 | typedef struct { |
| 6182 | /** offload scan period value, used for scans used when not connected */ |
| 6183 | A_UINT32 ofl_scan_period; |
| 6184 | } wmi_ofl_scan_period; |
| 6185 | |
| 6186 | /* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */ |
| 6187 | #define ROAM_OFFLOAD_PMK_BYTES (32) |
| 6188 | #define ROAM_OFFLOAD_PSK_MSK_BYTES (32) |
| 6189 | #define ROAM_OFFLOAD_KRK_BYTES (16) |
| 6190 | #define ROAM_OFFLOAD_BTK_BYTES (32) |
| 6191 | #define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48) |
| 6192 | #define ROAM_OFFLOAD_NUM_MCS_SET (16) |
| 6193 | |
| 6194 | /* This TLV will be filled only in case roam offload |
| 6195 | * for wpa2-psk/okc/ese/11r is enabled */ |
| 6196 | typedef struct { |
| 6197 | A_UINT32 tlv_header; |
| 6198 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */ |
| 6199 | A_UINT32 rssi_cat_gap; /* gap for every category bucket */ |
| 6200 | A_UINT32 prefer_5g; /* prefer select 5G candidate */ |
| 6201 | A_UINT32 select_5g_margin; |
| 6202 | A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */ |
| 6203 | A_UINT32 capability; |
| 6204 | A_UINT32 ht_caps_info; |
| 6205 | A_UINT32 ampdu_param; |
| 6206 | A_UINT32 ht_ext_cap; |
| 6207 | A_UINT32 ht_txbf; |
| 6208 | A_UINT32 asel_cap; |
| 6209 | A_UINT32 qos_enabled; |
| 6210 | A_UINT32 qos_caps; |
| 6211 | A_UINT32 wmm_caps; |
| 6212 | A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET >> 2]; /* since this 4 byte aligned, |
| 6213 | * we don't declare it as |
| 6214 | * tlv array */ |
| 6215 | } wmi_roam_offload_tlv_param; |
| 6216 | |
| 6217 | /* flags for 11i offload */ |
| 6218 | #define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */ |
| 6219 | /* from bit 1 to bit 31 are reserved */ |
| 6220 | |
| 6221 | #define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \ |
| 6222 | (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
| 6223 | } while(0) |
| 6224 | |
| 6225 | #define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \ |
| 6226 | (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \ |
| 6227 | } while(0) |
| 6228 | |
| 6229 | #define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \ |
| 6230 | ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED)) |
| 6231 | |
| 6232 | /* This TLV will be filled only in case of wpa-psk/wpa2-psk */ |
| 6233 | typedef struct { |
| 6234 | A_UINT32 tlv_header; |
| 6235 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */ |
| 6236 | A_UINT32 flags; |
| 6237 | /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */ |
| 6238 | A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES >> 2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 6239 | A_UINT32 pmk_len; |
| 6240 | /**the length of pmk. in normal case it should be 32, but for LEAP, is should be 16*/ |
| 6241 | } wmi_roam_11i_offload_tlv_param; |
| 6242 | |
| 6243 | /* This TLV will be filled only in case of 11R*/ |
| 6244 | typedef struct { |
| 6245 | A_UINT32 tlv_header; |
| 6246 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */ |
| 6247 | A_UINT32 mdie_present; |
| 6248 | A_UINT32 mdid; |
| 6249 | A_UINT32 r0kh_id[ROAM_OFFLOAD_R0KH_ID_MAX_LEN >> 2]; |
| 6250 | A_UINT32 r0kh_id_len; |
| 6251 | 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 */ |
| 6252 | A_UINT32 psk_msk_len; |
| 6253 | /**length of psk_msk*/ |
| 6254 | } wmi_roam_11r_offload_tlv_param; |
| 6255 | |
| 6256 | /* This TLV will be filled only in case of ESE */ |
| 6257 | typedef struct { |
| 6258 | A_UINT32 tlv_header; |
| 6259 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */ |
| 6260 | A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES >> 2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 6261 | A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES >> 2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */ |
| 6262 | } wmi_roam_ese_offload_tlv_param; |
| 6263 | |
| 6264 | /** WMI_ROAM_EVENT: roam event triggering the host roam logic. |
| 6265 | * generated when ever a better AP is found in the recent roam scan (or) |
| 6266 | * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received |
| 6267 | * from the current AP. |
| 6268 | */ |
| 6269 | typedef struct { |
| 6270 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_event_fixed_param */ |
| 6271 | /** unique id identifying the VDEV, generated by the caller */ |
| 6272 | A_UINT32 vdev_id; |
| 6273 | /** reason for roam event */ |
| 6274 | A_UINT32 reason; |
| 6275 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI*/ |
| 6276 | A_UINT32 rssi; |
| 6277 | |
| 6278 | } wmi_roam_event_fixed_param; |
| 6279 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 6280 | /* roam_reason: bits 0-3 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6281 | #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */ |
| 6282 | #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */ |
| 6283 | #define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */ |
| 6284 | #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */ |
| 6285 | #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches |
| 6286 | SSID and Security profile in |
| 6287 | WMI_ROAM_AP_PROFILE, found during scan |
| 6288 | triggered upon FINAL_BMISS **/ |
| 6289 | #define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */ |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 6290 | /* reserved up through 0xF */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6291 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 6292 | /* subnet status: bits 4-5 */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6293 | typedef enum { |
| 6294 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNKNOWN = 0, |
| 6295 | WMI_ROAM_SUBNET_CHANGE_STATUS_UNCHANGED, |
| 6296 | WMI_ROAM_SUBNET_CHANGE_STATUS_CHANGED, |
| 6297 | } wmi_roam_subnet_change_status; |
| 6298 | |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 6299 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_MASK 0x30 |
| 6300 | #define WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT 4 |
| 6301 | |
| 6302 | #define WMI_SET_ROAM_SUBNET_CHANGE_STATUS(roam_reason, status) \ |
| 6303 | do { \ |
| 6304 | (roam_reason) |= \ |
| 6305 | (((status) << WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) & \ |
| 6306 | WMI_ROAM_SUBNET_CHANGE_STATUS_MASK); \ |
| 6307 | } while (0) |
| 6308 | |
| 6309 | #define WMI_GET_ROAM_SUBNET_CHANGE_STATUS(roam_reason) \ |
| 6310 | (((roam_reason) & WMI_ROAM_SUBNET_CHANGE_STATUS_MASK) >> \ |
| 6311 | WMI_ROAM_SUBNET_CHANGE_STATUS_SHIFT) |
| 6312 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6313 | /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc) |
| 6314 | * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations |
| 6315 | */ |
| 6316 | typedef struct { |
| 6317 | A_UINT32 tlv_header; |
| 6318 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ric_request_fixed_param */ |
| 6319 | A_UINT32 vdev_id; |
| 6320 | /**unique id identifying the VDEV, generated by the caller*/ |
| 6321 | A_UINT32 num_ric_request; |
| 6322 | /**number of ric request ie send to firmware.(max value is 2 now)*/ |
| 6323 | A_UINT32 is_add_ric; |
| 6324 | /**support add ric or delete ric*/ |
| 6325 | } wmi_ric_request_fixed_param; |
| 6326 | |
| 6327 | /**tspec element: refer to 8.4.2.32 of 802.11 2012 spec |
| 6328 | * these elements are used to construct tspec field in RIC request, which allow station to require specific TS when 11r roaming |
| 6329 | */ |
| 6330 | typedef struct { |
| 6331 | A_UINT32 tlv_header; |
| 6332 | A_UINT32 ts_info; /** bits value of TS Info field.*/ |
| 6333 | A_UINT32 nominal_msdu_size; /**Nominal MSDU Size field*/ |
| 6334 | A_UINT32 maximum_msdu_size; /**The Maximum MSDU Size field*/ |
| 6335 | A_UINT32 min_service_interval; /**The Minimum Service Interval field*/ |
| 6336 | A_UINT32 max_service_interval; /**The Maximum Service Interval field*/ |
| 6337 | A_UINT32 inactivity_interval; /**The Inactivity Interval field*/ |
| 6338 | A_UINT32 suspension_interval; /**The Suspension Interval field*/ |
| 6339 | A_UINT32 svc_start_time; /**The Service Start Time field*/ |
| 6340 | A_UINT32 min_data_rate; /**The Minimum Data Rate field*/ |
| 6341 | A_UINT32 mean_data_rate; /**The Mean Data Rate field*/ |
| 6342 | A_UINT32 peak_data_rate; /**The Peak Data Rate field*/ |
| 6343 | A_UINT32 max_burst_size; /**The Burst Size field*/ |
| 6344 | A_UINT32 delay_bound; /**The Delay Bound field*/ |
| 6345 | A_UINT32 min_phy_rate; /**The Minimum PHY Rate field*/ |
| 6346 | A_UINT32 surplus_bw_allowance; /**The Surplus Bandwidth Allowance field*/ |
| 6347 | A_UINT32 medium_time; /**The Medium Time field,in units of 32 us/s.*/ |
| 6348 | } wmi_ric_tspec; |
| 6349 | |
| 6350 | /* flags for roam_invoke_cmd */ |
| 6351 | /* add this channel into roam cache channel list after this command is finished */ |
| 6352 | #define WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE 0 |
| 6353 | /* from bit 1 to bit 31 are reserved */ |
| 6354 | |
| 6355 | #define WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 6356 | (flag) |= (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
| 6357 | } while(0) |
| 6358 | |
| 6359 | #define WMI_CLEAR_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) do { \ |
| 6360 | (flag) &= ~(1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE); \ |
| 6361 | } while(0) |
| 6362 | |
| 6363 | #define WMI_GET_ROAM_INVOKE_ADD_CH_TO_CACHE(flag) \ |
| 6364 | ((flag) & (1 << WMI_SET_ROAM_INVOKE_ADD_CH_TO_CACHE)) |
| 6365 | |
| 6366 | |
| 6367 | #define WMI_ROAM_INVOKE_SCAN_MODE_FIXED_CH 0 /* scan given channel only */ |
| 6368 | #define WMI_ROAM_INVOKE_SCAN_MODE_CACHE_LIST 1 /* scan cached channel list */ |
| 6369 | #define WMI_ROAM_INVOKE_SCAN_MODE_FULL_CH 2 /* scan full channel */ |
| 6370 | |
| 6371 | #define WMI_ROAM_INVOKE_AP_SEL_FIXED_BSSID 0 /* roam to given BSSID only */ |
| 6372 | #define WMI_ROAM_INVOKE_AP_SEL_ANY_BSSID 1 /* roam to any BSSID */ |
| 6373 | |
| 6374 | /** WMI_ROAM_INVOKE_CMD: command to invoke roaming forcefully |
| 6375 | * |
| 6376 | * if <roam_scan_ch_mode> is zero and <channel_no> is not given, roaming is not executed. |
| 6377 | * if <roam_ap_sel_mode> is zero and <BSSID) is not given, roaming is not executed |
| 6378 | * |
| 6379 | * This command can be used to add specific channel into roam cached channel list by following |
| 6380 | * <roam_scan_ch_mode> = 0 |
| 6381 | * <roam_ap_sel_mode> = 0 |
| 6382 | * <roam_delay> = 0 |
| 6383 | * <flag> |= WMI_ROAM_INVOKE_FLAG_ADD_CH_TO_CACHE |
| 6384 | * <BSSID> = do not fill (there will be no actual roaming because of ap_sel_mode is zero, but no BSSID is given) |
| 6385 | * <channel_no> = channel list to be added |
| 6386 | */ |
| 6387 | typedef struct { |
| 6388 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_invoke_fixed_param */ |
| 6389 | A_UINT32 vdev_id; /** Unique id identifying the VDEV on which roaming is invoked */ |
| 6390 | A_UINT32 flags; /** flags. see WMI_ROAM_INVOKE_FLAG_ above */ |
| 6391 | A_UINT32 roam_scan_mode; /** see WMI_ROAM_INVOKE_SCAN_ above */ |
| 6392 | A_UINT32 roam_ap_sel_mode; /** see WMI_ROAM_INVOKE_AP_SEL_ above */ |
| 6393 | A_UINT32 roam_delay; /** 0 = immediate roam, 1-2^32 = roam after this delay (msec) */ |
| 6394 | A_UINT32 num_chan; /** # if channels to scan. In the TLV channel_list[] */ |
| 6395 | A_UINT32 num_bssid; /** number of bssids. In the TLV bssid_list[] */ |
| 6396 | /** |
| 6397 | * TLV (tag length value ) parameters follows roam_invoke_req |
| 6398 | * The TLV's are: |
| 6399 | * A_UINT32 channel_list[]; |
| 6400 | * wmi_mac_addr bssid_list[]; |
| 6401 | */ |
| 6402 | } wmi_roam_invoke_cmd_fixed_param; |
| 6403 | |
| 6404 | /* Definition for op_bitmap */ |
| 6405 | enum { |
| 6406 | ROAM_FILTER_OP_BITMAP_BLACK_LIST = 0x1, |
| 6407 | ROAM_FILTER_OP_BITMAP_WHITE_LIST = 0x2, |
| 6408 | ROAM_FILTER_OP_BITMAP_PREFER_BSSID = 0x4, |
| 6409 | }; |
| 6410 | |
| 6411 | typedef struct { |
| 6412 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_filter_list_fixed_param */ |
| 6413 | A_UINT32 tlv_header; |
| 6414 | /** Unique id identifying the VDEV on which roaming filter is adopted */ |
| 6415 | A_UINT32 vdev_id; |
| 6416 | A_UINT32 flags; /** flags for filter */ |
| 6417 | /** 32 bit bitmap to be set on. |
| 6418 | * bit0 = first param, |
| 6419 | * bit 1 = second param...etc. Can be or'ed |
| 6420 | */ |
| 6421 | A_UINT32 op_bitmap; |
| 6422 | /* number of blacklist in the TLV variable bssid_black_list */ |
| 6423 | A_UINT32 num_bssid_black_list; |
| 6424 | /* number of whitelist in the TLV variable ssid_white_list */ |
| 6425 | A_UINT32 num_ssid_white_list; |
| 6426 | /* only for lfr 3.0. number of preferred list & factor in the TLV */ |
| 6427 | A_UINT32 num_bssid_preferred_list; |
| 6428 | /** |
| 6429 | * TLV (tag length value ) parameters follows roam_filter_list_cmd |
| 6430 | * The TLV's are: |
| 6431 | * wmi_mac_addr bssid_black_list[]; |
| 6432 | * wmi_ssid ssid_white_list[]; |
| 6433 | * wmi_mac_addr bssid_preferred_list[]; |
| 6434 | * A_UINT32 bssid_preferred_factor[]; |
| 6435 | */ |
| 6436 | } wmi_roam_filter_fixed_param; |
| 6437 | |
| 6438 | typedef struct { |
| 6439 | A_UINT8 address[4]; /* IPV4 address in Network Byte Order */ |
| 6440 | } WMI_IPV4_ADDR; |
| 6441 | |
| 6442 | typedef struct _WMI_IPV6_ADDR { |
| 6443 | A_UINT8 address[16]; /* IPV6 in Network Byte Order */ |
| 6444 | } WMI_IPV6_ADDR; |
| 6445 | |
| 6446 | /* flags for subnet change detection */ |
| 6447 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED 0 |
| 6448 | #define WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED 1 |
| 6449 | /* bit 2 to bit 31 are reserved */ |
| 6450 | |
| 6451 | /* set IPv4 enabled/disabled flag and get the flag */ |
| 6452 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) do { \ |
| 6453 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 6454 | } while (0) |
| 6455 | |
| 6456 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP4_DISABLED(flag) do { \ |
| 6457 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED); \ |
| 6458 | } while (0) |
| 6459 | |
| 6460 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED(flag) \ |
| 6461 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP4_ENABLED)) |
| 6462 | |
| 6463 | /* set IPv6 enabled flag, disabled and get the flag */ |
| 6464 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) do { \ |
| 6465 | (flag) |= (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 6466 | } while (0) |
| 6467 | |
| 6468 | #define WMI_SET_ROAM_SUBNET_CHANGE_FLAG_IP6_DISABLED(flag) do { \ |
| 6469 | (flag) &= ~(1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED); \ |
| 6470 | } while (0) |
| 6471 | |
| 6472 | #define WMI_GET_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED(flag) \ |
| 6473 | ((flag) & (1 << WMI_ROAM_SUBNET_CHANGE_FLAG_IP6_ENABLED)) |
| 6474 | |
| 6475 | /** |
| 6476 | * WMI_ROAM_SUBNET_CHANGE_CONFIG : Pass the gateway IP and MAC addresses |
| 6477 | * to FW. FW uses these parameters for subnet change detection. |
| 6478 | */ |
| 6479 | typedef struct { |
| 6480 | /* |
| 6481 | * TLV tag and len; tag equals |
| 6482 | * WMITLV_TAG_STRUC_wmi_roam_subnet_change_config_fixed_param |
| 6483 | */ |
| 6484 | A_UINT32 tlv_header; |
| 6485 | /** unique id identifying the VDEV, generated by the caller */ |
| 6486 | A_UINT32 vdev_id; |
| 6487 | /** IPv4/IPv6 enabled/disabled */ |
| 6488 | /** This flag sets the WMI_SET_ROAM_SUBNET_CHANGE_FLAG_xxx_ENABLED/ |
| 6489 | DISABLED */ |
| 6490 | A_UINT32 flag; |
| 6491 | /** Gateway MAC address */ |
| 6492 | wmi_mac_addr inet_gw_mac_addr; |
| 6493 | /** IP addresses */ |
| 6494 | WMI_IPV4_ADDR inet_gw_ip_v4_addr; |
| 6495 | WMI_IPV6_ADDR inet_gw_ip_v6_addr; |
| 6496 | /** Number of software retries for ARP/Neighbor solicitation request */ |
| 6497 | A_UINT32 max_retries; |
| 6498 | /** timeout in milliseconds for each ARP request*/ |
| 6499 | A_UINT32 timeout; |
| 6500 | /** number of skipped aps **/ |
| 6501 | A_UINT32 num_skip_subnet_change_detection_bssid_list; |
| 6502 | /** |
| 6503 | * TLV (tag length value ) parameters follows roam_subnet_change_config_cmd |
| 6504 | * structure. The TLV's are: |
| 6505 | * wmi_mac_addr skip_subnet_change_detection_bssid_list []; |
| 6506 | **/ |
| 6507 | } wmi_roam_subnet_change_config_fixed_param; |
| 6508 | |
| 6509 | /** WMI_PROFILE_MATCH_EVENT: offload scan |
| 6510 | * generated when ever atleast one of the matching profiles is found |
| 6511 | * in recent NLO scan. no data is carried with the event. |
| 6512 | */ |
| 6513 | |
| 6514 | /** P2P specific commands */ |
| 6515 | |
| 6516 | /** |
| 6517 | * WMI_P2P_DEV_SET_DEVICE_INFO : p2p device info, which will be used by |
| 6518 | * FW to generate P2P IE tobe carried in probe response frames. |
| 6519 | * FW will respond to probe requests while in listen state. |
| 6520 | */ |
| 6521 | typedef struct { |
| 6522 | /* number of secondary device types,supported */ |
| 6523 | A_UINT32 num_secondary_dev_types; |
| 6524 | /** |
| 6525 | * followed by 8 bytes of primary device id and |
| 6526 | * num_secondary_dev_types * 8 bytes of secondary device |
| 6527 | * id. |
| 6528 | */ |
| 6529 | } wmi_p2p_dev_set_device_info; |
| 6530 | |
| 6531 | /** WMI_P2P_DEV_SET_DISCOVERABILITY: enable/disable discoverability |
| 6532 | * state. if enabled, an active STA/AP will respond to P2P probe requests on |
| 6533 | * the operating channel of the VDEV. |
| 6534 | */ |
| 6535 | |
| 6536 | typedef struct { |
| 6537 | /* 1:enable disoverability, 0:disable discoverability */ |
| 6538 | A_UINT32 enable_discoverability; |
| 6539 | } wmi_p2p_set_discoverability; |
| 6540 | |
| 6541 | /** WMI_P2P_GO_SET_BEACON_IE: P2P IE to be added to |
| 6542 | * beacons generated by FW. used in FW beacon mode. |
| 6543 | * the FW will add this IE to beacon in addition to the beacon |
| 6544 | * template set by WMI_BCN_TMPL_CMDID command. |
| 6545 | */ |
| 6546 | typedef struct { |
| 6547 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_go_set_beacon_ie_fixed_param */ |
| 6548 | /** unique id identifying the VDEV, generated by the caller */ |
| 6549 | A_UINT32 vdev_id; |
| 6550 | /* ie length */ |
| 6551 | A_UINT32 ie_buf_len; |
| 6552 | /* Following this structure is the TLV byte stream of ie data of length ie_buf_len: |
| 6553 | * A_UINT8 ie_data[]; // length in byte given by field num_data. |
| 6554 | */ |
| 6555 | |
| 6556 | } wmi_p2p_go_set_beacon_ie_fixed_param; |
| 6557 | |
| 6558 | /** WMI_P2P_GO_PROBE_RESP_IE: P2P IE to be added to |
| 6559 | * probe response generated by FW. used in FW beacon mode. |
| 6560 | * the FW will add this IE to probe response in addition to the probe response |
| 6561 | * template set by WMI_PRB_TMPL_CMDID command. |
| 6562 | */ |
| 6563 | typedef struct { |
| 6564 | /** unique id identifying the VDEV, generated by the caller */ |
| 6565 | A_UINT32 vdev_id; |
| 6566 | /* ie length */ |
| 6567 | A_UINT32 ie_buf_len; |
| 6568 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 6569 | } wmi_p2p_go_set_probe_resp_ie; |
| 6570 | |
| 6571 | /** WMI_P2P_SET_VENDOR_IE_DATA_CMDID: Vendor specific P2P IE data, which will |
| 6572 | * be used by the FW to parse the P2P NoA attribute in beacons, probe resposes |
| 6573 | * and action frames received by the P2P Client. |
| 6574 | */ |
| 6575 | typedef struct { |
| 6576 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param */ |
| 6577 | /** OS specific P2P IE OUI (3 bytes) + OUI type (1 byte) */ |
| 6578 | A_UINT32 p2p_ie_oui_type; |
| 6579 | /** OS specific NoA Attribute ID */ |
| 6580 | A_UINT32 p2p_noa_attribute; |
| 6581 | } wmi_p2p_set_vendor_ie_data_cmd_fixed_param; |
| 6582 | |
| 6583 | /*----P2P disc offload definition ----*/ |
| 6584 | |
| 6585 | typedef struct { |
| 6586 | A_UINT32 pattern_type; |
| 6587 | /** |
| 6588 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 6589 | * TLV can contain bssid list, ssid list and |
| 6590 | * ie. the TLV tags are defined above; |
| 6591 | */ |
| 6592 | } wmi_p2p_disc_offload_pattern_cmd; |
| 6593 | |
| 6594 | typedef struct { |
| 6595 | /* unique id identifying the VDEV, generated by the caller */ |
| 6596 | A_UINT32 vdev_id; |
| 6597 | /* mgmt type of the ie */ |
| 6598 | A_UINT32 mgmt_type; |
| 6599 | /* ie length */ |
| 6600 | A_UINT32 ie_buf_len; |
| 6601 | /*followed by byte stream of ie data of length ie_buf_len */ |
| 6602 | } wmi_p2p_disc_offload_appie_cmd; |
| 6603 | |
| 6604 | typedef struct { |
| 6605 | /* enable/disable p2p find offload */ |
| 6606 | A_UINT32 enable; |
| 6607 | /* unique id identifying the VDEV, generated by the caller */ |
| 6608 | A_UINT32 vdev_id; |
| 6609 | /* p2p find type */ |
| 6610 | A_UINT32 disc_type; |
| 6611 | /* p2p find perodic */ |
| 6612 | A_UINT32 perodic; |
| 6613 | /* p2p find listen channel */ |
| 6614 | A_UINT32 listen_channel; |
| 6615 | /* p2p find full channel number */ |
| 6616 | A_UINT32 num_scan_chans; |
| 6617 | /** |
| 6618 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 6619 | * TLV contain channel list |
| 6620 | */ |
| 6621 | } wmi_p2p_disc_offload_config_cmd; |
| 6622 | |
| 6623 | /*----P2P OppPS definition ----*/ |
| 6624 | typedef struct { |
| 6625 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */ |
| 6626 | A_UINT32 tlv_header; |
| 6627 | /* unique id identifying the VDEV, generated by the caller */ |
| 6628 | A_UINT32 vdev_id; |
| 6629 | /* OppPS attributes */ |
| 6630 | /** Bit 0: Indicate enable/disable of OppPS |
| 6631 | * Bits 7-1: Ctwindow in TUs |
| 6632 | * Bits 31-8: Reserved |
| 6633 | */ |
| 6634 | A_UINT32 oppps_attr; |
| 6635 | } wmi_p2p_set_oppps_cmd_fixed_param; |
| 6636 | |
| 6637 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1 |
| 6638 | #define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0 |
| 6639 | |
| 6640 | #define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \ |
| 6641 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED) |
| 6642 | |
| 6643 | #define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \ |
| 6644 | WMI_F_RMW((hdr)->oppps_attr, 0x1, \ |
| 6645 | WMI_UNIFIED_OPPPS_ATTR_ENALBED); |
| 6646 | |
| 6647 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe |
| 6648 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1 |
| 6649 | |
| 6650 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \ |
| 6651 | WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN) |
| 6652 | |
| 6653 | #define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \ |
| 6654 | WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \ |
| 6655 | WMI_UNIFIED_OPPPS_ATTR_CTWIN); |
| 6656 | |
| 6657 | typedef struct { |
| 6658 | A_UINT32 time32; /* upper 32 bits of time stamp */ |
| 6659 | A_UINT32 time0; /* lower 32 bits of time stamp */ |
| 6660 | } A_TIME64; |
| 6661 | |
| 6662 | typedef enum wmi_peer_sta_kickout_reason { |
| 6663 | WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED = 0, /* default value to preserve legacy behavior */ |
| 6664 | WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1, |
| 6665 | WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2, |
| 6666 | WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3, |
| 6667 | WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */ |
| 6668 | WMI_PEER_STA_KICKOUT_REASON_SA_QUERY_TIMEOUT = 5, |
| 6669 | } PEER_KICKOUT_REASON; |
| 6670 | |
| 6671 | typedef struct { |
| 6672 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_sta_kickout_event_fixed_param */ |
| 6673 | /** peer mac address */ |
| 6674 | wmi_mac_addr peer_macaddr; |
| 6675 | /** Reason code, defined as above */ |
| 6676 | A_UINT32 reason; |
| 6677 | /** RSSI of the last bcn (averaged) in dB. 0 means Noise Floor value */ |
| 6678 | A_UINT32 rssi; |
| 6679 | } wmi_peer_sta_kickout_event_fixed_param; |
| 6680 | |
| 6681 | #define WMI_WLAN_PROFILE_MAX_HIST 3 |
| 6682 | #define WMI_WLAN_PROFILE_MAX_BIN_CNT 32 |
| 6683 | |
| 6684 | typedef struct _wmi_wlan_profile_t { |
| 6685 | A_UINT32 tlv_header; |
| 6686 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_t */ |
| 6687 | A_UINT32 id; |
| 6688 | A_UINT32 cnt; |
| 6689 | A_UINT32 tot; |
| 6690 | A_UINT32 min; |
| 6691 | A_UINT32 max; |
| 6692 | A_UINT32 hist_intvl; |
| 6693 | A_UINT32 hist[WMI_WLAN_PROFILE_MAX_HIST]; |
| 6694 | } wmi_wlan_profile_t; |
| 6695 | |
| 6696 | typedef struct _wmi_wlan_profile_ctx_t { |
| 6697 | A_UINT32 tlv_header; |
| 6698 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_ctx_t */ |
| 6699 | A_UINT32 tot; /* time in us */ |
| 6700 | A_UINT32 tx_msdu_cnt; |
| 6701 | A_UINT32 tx_mpdu_cnt; |
| 6702 | A_UINT32 tx_ppdu_cnt; |
| 6703 | A_UINT32 rx_msdu_cnt; |
| 6704 | A_UINT32 rx_mpdu_cnt; |
| 6705 | A_UINT32 bin_count; |
| 6706 | } wmi_wlan_profile_ctx_t; |
| 6707 | |
| 6708 | typedef struct { |
| 6709 | A_UINT32 tlv_header; |
| 6710 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_trigger_cmd_fixed_param */ |
| 6711 | A_UINT32 enable; |
| 6712 | } wmi_wlan_profile_trigger_cmd_fixed_param; |
| 6713 | |
| 6714 | typedef struct { |
| 6715 | A_UINT32 tlv_header; |
| 6716 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_get_prof_data_cmd_fixed_param */ |
| 6717 | A_UINT32 value; |
| 6718 | } wmi_wlan_profile_get_prof_data_cmd_fixed_param; |
| 6719 | |
| 6720 | typedef struct { |
| 6721 | A_UINT32 tlv_header; |
| 6722 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_set_hist_intvl_cmd_fixed_param */ |
| 6723 | A_UINT32 profile_id; |
| 6724 | A_UINT32 value; |
| 6725 | } wmi_wlan_profile_set_hist_intvl_cmd_fixed_param; |
| 6726 | |
| 6727 | typedef struct { |
| 6728 | A_UINT32 tlv_header; |
| 6729 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlan_profile_enable_profile_id_cmd_fixed_param */ |
| 6730 | A_UINT32 profile_id; |
| 6731 | A_UINT32 enable; |
| 6732 | } wmi_wlan_profile_enable_profile_id_cmd_fixed_param; |
| 6733 | |
| 6734 | /*Wifi header is upto 26, LLC is 8, with 14 byte duplicate in 802.3 header, that's 26+8-14=20. |
| 6735 | 146-128=18. So this means it is converted to non-QoS header. Riva FW take care of the QOS/non-QOS |
| 6736 | when comparing wifi header.*/ |
| 6737 | /* NOTE: WOW_DEFAULT_BITMAP_PATTERN_SIZE(_DWORD) and WOW_DEFAULT_BITMASK_SIZE(_DWORD) can't be changed without breaking the compatibility */ |
| 6738 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE 146 |
| 6739 | #define WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD 37 /* Convert WOW_DEFAULT_EVT_BUF_SIZE into Int32 size */ |
| 6740 | #define WOW_DEFAULT_BITMASK_SIZE 146 |
| 6741 | #define WOW_DEFAULT_BITMASK_SIZE_DWORD 37 |
| 6742 | #define WOW_MAX_BITMAP_FILTERS 32 |
| 6743 | #define WOW_DEFAULT_MAGIG_PATTERN_MATCH_CNT 16 |
| 6744 | #define WOW_EXTEND_PATTERN_MATCH_CNT 16 |
| 6745 | #define WOW_SHORT_PATTERN_MATCH_CNT 8 |
| 6746 | #define WOW_DEFAULT_EVT_BUF_SIZE 148 /* Maximum 148 bytes of the data is copied starting from header incase if the match is found. |
| 6747 | The 148 comes from (128 - 14 ) payload size + 8bytes LLC + 26bytes MAC header */ |
| 6748 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE 6 |
| 6749 | #define WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD 2 |
| 6750 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE 6 |
| 6751 | #define WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD 2 |
| 6752 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE 120 |
| 6753 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD 30 |
| 6754 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE 32 |
| 6755 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD 8 |
| 6756 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE 32 |
| 6757 | #define WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_REV_SIZE_DWORD 8 |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 6758 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE 128 |
| 6759 | #define WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD 32 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6760 | |
| 6761 | typedef enum pattern_type_e { |
| 6762 | WOW_PATTERN_MIN = 0, |
| 6763 | WOW_BITMAP_PATTERN = WOW_PATTERN_MIN, |
| 6764 | WOW_IPV4_SYNC_PATTERN, |
| 6765 | WOW_IPV6_SYNC_PATTERN, |
| 6766 | WOW_WILD_CARD_PATTERN, |
| 6767 | WOW_TIMER_PATTERN, |
| 6768 | WOW_MAGIC_PATTERN, |
| 6769 | WOW_IPV6_RA_PATTERN, |
| 6770 | WOW_IOAC_PKT_PATTERN, |
| 6771 | WOW_IOAC_TMR_PATTERN, |
| 6772 | WOW_IOAC_SOCK_PATTERN, |
| 6773 | WOW_PATTERN_MAX |
| 6774 | } WOW_PATTERN_TYPE; |
| 6775 | |
| 6776 | typedef enum event_type_e { |
| 6777 | WOW_BMISS_EVENT = 0, |
| 6778 | WOW_BETTER_AP_EVENT, |
| 6779 | WOW_DEAUTH_RECVD_EVENT, |
| 6780 | WOW_MAGIC_PKT_RECVD_EVENT, |
| 6781 | WOW_GTK_ERR_EVENT, |
| 6782 | WOW_FOURWAY_HSHAKE_EVENT, |
| 6783 | WOW_EAPOL_RECVD_EVENT, |
| 6784 | WOW_NLO_DETECTED_EVENT, |
| 6785 | WOW_DISASSOC_RECVD_EVENT, |
| 6786 | WOW_PATTERN_MATCH_EVENT, |
| 6787 | WOW_CSA_IE_EVENT, |
| 6788 | WOW_PROBE_REQ_WPS_IE_EVENT, |
| 6789 | WOW_AUTH_REQ_EVENT, |
| 6790 | WOW_ASSOC_REQ_EVENT, |
| 6791 | WOW_HTT_EVENT, |
| 6792 | WOW_RA_MATCH_EVENT, |
| 6793 | WOW_HOST_AUTO_SHUTDOWN_EVENT, |
| 6794 | WOW_IOAC_MAGIC_EVENT, |
| 6795 | WOW_IOAC_SHORT_EVENT, |
| 6796 | WOW_IOAC_EXTEND_EVENT, |
| 6797 | WOW_IOAC_TIMER_EVENT, |
| 6798 | WOW_DFS_PHYERR_RADAR_EVENT, |
| 6799 | WOW_BEACON_EVENT, |
| 6800 | WOW_CLIENT_KICKOUT_EVENT, |
| 6801 | WOW_NAN_EVENT, |
| 6802 | WOW_EXTSCAN_EVENT, |
| 6803 | WOW_IOAC_REV_KA_FAIL_EVENT, |
| 6804 | WOW_IOAC_SOCK_EVENT, |
| 6805 | WOW_NLO_SCAN_COMPLETE_EVENT, |
| 6806 | } WOW_WAKE_EVENT_TYPE; |
| 6807 | |
| 6808 | typedef enum wake_reason_e { |
| 6809 | WOW_REASON_UNSPECIFIED = -1, |
| 6810 | WOW_REASON_NLOD = 0, |
| 6811 | WOW_REASON_AP_ASSOC_LOST, |
| 6812 | WOW_REASON_LOW_RSSI, |
| 6813 | WOW_REASON_DEAUTH_RECVD, |
| 6814 | WOW_REASON_DISASSOC_RECVD, |
| 6815 | WOW_REASON_GTK_HS_ERR, |
| 6816 | WOW_REASON_EAP_REQ, |
| 6817 | WOW_REASON_FOURWAY_HS_RECV, |
| 6818 | WOW_REASON_TIMER_INTR_RECV, |
| 6819 | WOW_REASON_PATTERN_MATCH_FOUND, |
| 6820 | WOW_REASON_RECV_MAGIC_PATTERN, |
| 6821 | WOW_REASON_P2P_DISC, |
| 6822 | WOW_REASON_WLAN_HB, |
| 6823 | WOW_REASON_CSA_EVENT, |
| 6824 | WOW_REASON_PROBE_REQ_WPS_IE_RECV, |
| 6825 | WOW_REASON_AUTH_REQ_RECV, |
| 6826 | WOW_REASON_ASSOC_REQ_RECV, |
| 6827 | WOW_REASON_HTT_EVENT, |
| 6828 | WOW_REASON_RA_MATCH, |
| 6829 | WOW_REASON_HOST_AUTO_SHUTDOWN, |
| 6830 | WOW_REASON_IOAC_MAGIC_EVENT, |
| 6831 | WOW_REASON_IOAC_SHORT_EVENT, |
| 6832 | WOW_REASON_IOAC_EXTEND_EVENT, |
| 6833 | WOW_REASON_IOAC_TIMER_EVENT, |
| 6834 | WOW_REASON_ROAM_HO, |
| 6835 | WOW_REASON_DFS_PHYERR_RADADR_EVENT, |
| 6836 | WOW_REASON_BEACON_RECV, |
| 6837 | WOW_REASON_CLIENT_KICKOUT_EVENT, |
| 6838 | WOW_REASON_NAN_EVENT, |
| 6839 | WOW_REASON_EXTSCAN, |
| 6840 | WOW_REASON_RSSI_BREACH_EVENT, |
| 6841 | WOW_REASON_IOAC_REV_KA_FAIL_EVENT, |
| 6842 | WOW_REASON_IOAC_SOCK_EVENT, |
| 6843 | WOW_REASON_NLO_SCAN_COMPLETE, |
| 6844 | WOW_REASON_PACKET_FILTER_MATCH, |
| 6845 | WOW_REASON_ASSOC_RES_RECV, |
| 6846 | WOW_REASON_REASSOC_REQ_RECV, |
| 6847 | WOW_REASON_REASSOC_RES_RECV, |
| 6848 | WOW_REASON_ACTION_FRAME_RECV, |
| 6849 | WOW_REASON_DEBUG_TEST = 0xFF, |
| 6850 | } WOW_WAKE_REASON_TYPE; |
| 6851 | |
| 6852 | typedef enum { |
| 6853 | WOW_IFACE_PAUSE_ENABLED, |
| 6854 | WOW_IFACE_PAUSE_DISABLED |
| 6855 | } WOW_IFACE_STATUS; |
| 6856 | |
| 6857 | enum { |
| 6858 | /* some win10 platfrom will not assert pcie_reset for wow.*/ |
| 6859 | WMI_WOW_FLAG_IGNORE_PCIE_RESET = 0x00000001, |
| 6860 | }; |
| 6861 | |
| 6862 | |
| 6863 | typedef struct { |
| 6864 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_enable_cmd_fixed_param */ |
| 6865 | A_UINT32 enable; |
| 6866 | A_UINT32 pause_iface_config; |
| 6867 | A_UINT32 flags; /* WMI_WOW_FLAG enums */ |
| 6868 | } wmi_wow_enable_cmd_fixed_param; |
| 6869 | |
| 6870 | typedef struct { |
| 6871 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wow_hostwakeup_from_sleep_cmd_fixed_param */ |
| 6872 | /** Reserved for future use */ |
| 6873 | A_UINT32 reserved0; |
| 6874 | } wmi_wow_hostwakeup_from_sleep_cmd_fixed_param; |
| 6875 | |
| 6876 | #define WOW_ICMPV6_NA_FILTER_DISABLE 0 |
| 6877 | #define WOW_ICMPV6_NA_FILTER_ENABLE 1 |
| 6878 | |
| 6879 | typedef struct { |
| 6880 | /* TLV tag and len; |
| 6881 | * tag equals WMITLV_TAG_STRUC_wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param |
| 6882 | */ |
| 6883 | A_UINT32 tlv_header; |
| 6884 | A_UINT32 vdev_id; |
| 6885 | A_UINT32 enable; /* WOW_ICMPV6_NA_FILTER_ENABLE/DISABLE */ |
| 6886 | } wmi_wow_enable_icmpv6_na_flt_cmd_fixed_param; |
| 6887 | |
| 6888 | typedef struct bitmap_pattern_s { |
| 6889 | A_UINT32 tlv_header; |
| 6890 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_BITMAP_PATTERN_T */ |
| 6891 | A_UINT32 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE_DWORD]; |
| 6892 | A_UINT32 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE_DWORD]; |
| 6893 | A_UINT32 pattern_offset; |
| 6894 | A_UINT32 pattern_len; |
| 6895 | A_UINT32 bitmask_len; |
| 6896 | A_UINT32 pattern_id; /* must be less than max_bitmap_filters */ |
| 6897 | } WOW_BITMAP_PATTERN_T; |
| 6898 | |
| 6899 | typedef struct ipv4_sync_s { |
| 6900 | A_UINT32 tlv_header; |
| 6901 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV4_SYNC_PATTERN_T */ |
| 6902 | A_UINT32 ipv4_src_addr; |
| 6903 | A_UINT32 ipv4_dst_addr; |
| 6904 | A_UINT32 tcp_src_prt; |
| 6905 | A_UINT32 tcp_dst_prt; |
| 6906 | } WOW_IPV4_SYNC_PATTERN_T; |
| 6907 | |
| 6908 | typedef struct ipv6_sync_s { |
| 6909 | A_UINT32 tlv_header; |
| 6910 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IPV6_SYNC_PATTERN_T */ |
| 6911 | A_UINT32 ipv6_src_addr[4]; |
| 6912 | A_UINT32 ipv6_dst_addr[4]; |
| 6913 | A_UINT32 tcp_src_prt; |
| 6914 | A_UINT32 tcp_dst_prt; |
| 6915 | } WOW_IPV6_SYNC_PATTERN_T; |
| 6916 | |
| 6917 | typedef struct WOW_MAGIC_PATTERN_CMD { |
| 6918 | A_UINT32 tlv_header; |
| 6919 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_MAGIC_PATTERN_CMD */ |
| 6920 | wmi_mac_addr macaddr; |
| 6921 | } WOW_MAGIC_PATTERN_CMD; |
| 6922 | |
| 6923 | typedef enum wow_ioac_pattern_type { |
| 6924 | WOW_IOAC_MAGIC_PATTERN = 1, |
| 6925 | WOW_IOAC_SHORT_PATTERN, |
| 6926 | WOW_IOAC_EXTEND_PATTERN, |
| 6927 | } WOW_IOAC_PATTERN_TYPE; |
| 6928 | |
| 6929 | typedef struct ioac_sock_pattern_s { |
| 6930 | /** |
| 6931 | * TLV tag and len; |
| 6932 | * tag equals WMITLV_TAG_STRUC_WOW_IOAC_SOCK_PATTERN_T |
| 6933 | */ |
| 6934 | A_UINT32 tlv_header; |
| 6935 | A_UINT32 id; |
| 6936 | A_UINT32 local_ipv4; |
| 6937 | A_UINT32 remote_ipv4; |
| 6938 | A_UINT32 local_port; |
| 6939 | A_UINT32 remote_port; |
| 6940 | A_UINT32 pattern_len; /* units = bytes */ |
| 6941 | A_UINT32 pattern[WOW_DEFAULT_IOAC_SOCKET_PATTERN_SIZE_DWORD]; |
Krishna Kumaar Natarajan | 04c4e91 | 2015-11-19 16:04:32 -0800 | [diff] [blame] | 6942 | WMI_IPV6_ADDR local_ipv6; |
| 6943 | WMI_IPV6_ADDR remote_ipv6; |
| 6944 | A_UINT32 ack_nak_len; |
| 6945 | A_UINT32 ackpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
| 6946 | A_UINT32 nakpkt[WOW_DEFAULT_IOAC_SOCKET_PATTERN_ACKNAK_SIZE_DWORD]; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6947 | } WOW_IOAC_SOCK_PATTERN_T; |
| 6948 | |
| 6949 | typedef struct ioac_pkt_pattern_s { |
| 6950 | A_UINT32 tlv_header; |
| 6951 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_PKT_PATTERN_T */ |
| 6952 | A_UINT32 pattern_type; |
| 6953 | A_UINT32 pattern[WOW_DEFAULT_IOAC_PATTERN_SIZE_DWORD]; |
| 6954 | A_UINT32 random[WOW_DEFAULT_IOAC_RANDOM_SIZE_DWORD]; |
| 6955 | A_UINT32 pattern_len; |
| 6956 | A_UINT32 random_len; |
| 6957 | } WOW_IOAC_PKT_PATTERN_T; |
| 6958 | |
| 6959 | typedef struct ioac_tmr_pattern_s { |
| 6960 | A_UINT32 tlv_header; |
| 6961 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_IOAC_TMR_PATTERN_T */ |
| 6962 | A_UINT32 wake_in_s; |
| 6963 | A_UINT32 vdev_id; |
| 6964 | } WOW_IOAC_TMR_PATTERN_T; |
| 6965 | |
| 6966 | typedef struct { |
| 6967 | A_UINT32 tlv_header; |
| 6968 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param */ |
| 6969 | A_UINT32 nID; |
| 6970 | } WMI_WOW_IOAC_ADD_KEEPALIVE_CMD_fixed_param; |
| 6971 | |
| 6972 | typedef struct { |
| 6973 | A_UINT32 tlv_header; |
| 6974 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param */ |
| 6975 | A_UINT32 nID; |
| 6976 | } WMI_WOW_IOAC_DEL_KEEPALIVE_CMD_fixed_param; |
| 6977 | |
| 6978 | typedef struct ioac_keepalive_s { |
| 6979 | A_UINT32 tlv_header; |
| 6980 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_KEEPALIVE_T */ |
| 6981 | A_UINT32 |
| 6982 | keepalive_pkt_buf |
| 6983 | [WOW_DEFAULT_IOAC_KEEP_ALIVE_PKT_SIZE_DWORD]; |
| 6984 | A_UINT32 keepalive_pkt_len; |
| 6985 | A_UINT32 period_in_ms; |
| 6986 | A_UINT32 vdev_id; |
| 6987 | A_UINT32 max_loss_cnt; |
| 6988 | A_UINT32 local_ipv4; |
| 6989 | A_UINT32 remote_ipv4; |
| 6990 | A_UINT32 local_port; |
| 6991 | A_UINT32 remote_port; |
| 6992 | A_UINT32 recv_period_in_ms; |
| 6993 | A_UINT32 rev_ka_size; |
| 6994 | 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] | 6995 | WMI_IPV6_ADDR local_ipv6; |
| 6996 | WMI_IPV6_ADDR remote_ipv6; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 6997 | } WMI_WOW_IOAC_KEEPALIVE_T; |
| 6998 | |
| 6999 | typedef struct { |
| 7000 | A_UINT32 tlv_header; |
| 7001 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param */ |
| 7002 | A_UINT32 vdev_id; |
| 7003 | A_UINT32 pattern_type; |
| 7004 | /* |
| 7005 | * Following this struct are these TLVs. Note that they are all array of structures |
| 7006 | * but can have at most one element. Which TLV is empty or has one element depends |
| 7007 | * on the field pattern_type. This is to emulate an union. |
| 7008 | * WOW_IOAC_PKT_PATTERN_T pattern_info_pkt[]; |
| 7009 | * WOW_IOAC_TMR_PATTERN_T pattern_info_tmr[]; |
| 7010 | */ |
| 7011 | } WMI_WOW_IOAC_ADD_PATTERN_CMD_fixed_param; |
| 7012 | |
| 7013 | typedef struct { |
| 7014 | A_UINT32 tlv_header; |
| 7015 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param */ |
| 7016 | A_UINT32 vdev_id; |
| 7017 | A_UINT32 pattern_type; |
| 7018 | A_UINT32 pattern_id; |
| 7019 | } WMI_WOW_IOAC_DEL_PATTERN_CMD_fixed_param; |
| 7020 | |
| 7021 | typedef struct { |
| 7022 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_PATTERN_CMD_fixed_param */ |
| 7023 | A_UINT32 vdev_id; |
| 7024 | A_UINT32 pattern_id; |
| 7025 | A_UINT32 pattern_type; |
| 7026 | /* |
| 7027 | * Following this struct are these TLVs. Note that they are all array of structures |
| 7028 | * but can have at most one element. Which TLV is empty or has one element depends |
| 7029 | * on the field pattern_type. This is to emulate an union. |
| 7030 | * WOW_BITMAP_PATTERN_T pattern_info_bitmap[]; |
| 7031 | * WOW_IPV4_SYNC_PATTERN_T pattern_info_ipv4[]; |
| 7032 | * WOW_IPV6_SYNC_PATTERN_T pattern_info_ipv6[]; |
| 7033 | * WOW_MAGIC_PATTERN_CMD pattern_info_magic_pattern[]; |
| 7034 | * A_UINT32 pattern_info_timeout[]; |
| 7035 | * A_UINT32 ra_ratelimit_interval; |
| 7036 | */ |
| 7037 | } WMI_WOW_ADD_PATTERN_CMD_fixed_param; |
| 7038 | |
| 7039 | typedef struct { |
| 7040 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_DEL_PATTERN_CMD_fixed_param */ |
| 7041 | A_UINT32 vdev_id; |
| 7042 | A_UINT32 pattern_id; |
| 7043 | A_UINT32 pattern_type; |
| 7044 | } WMI_WOW_DEL_PATTERN_CMD_fixed_param; |
| 7045 | |
| 7046 | typedef struct { |
| 7047 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_WOW_ADD_DEL_EVT_CMD_fixed_param */ |
| 7048 | A_UINT32 vdev_id; |
| 7049 | A_UINT32 is_add; |
| 7050 | A_UINT32 event_bitmap; |
| 7051 | } WMI_WOW_ADD_DEL_EVT_CMD_fixed_param; |
| 7052 | |
| 7053 | /* |
| 7054 | * This structure is used to set the pattern to check UDP packet in WOW mode. |
| 7055 | * If match, construct a tx frame in a local buffer to send through the peer |
| 7056 | * AP to the entity in the IP network that sent the UDP packet to this STA. |
| 7057 | */ |
| 7058 | typedef struct { |
| 7059 | /* |
| 7060 | * TLV tag and len; |
| 7061 | * tag equals WMITLV_TAG_STRUC_WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param |
| 7062 | */ |
| 7063 | A_UINT32 tlv_header; |
| 7064 | A_UINT32 vdev_id; |
| 7065 | A_UINT32 enable; /* 1: enable, 0: disable */ |
| 7066 | /* |
| 7067 | * dest_port - |
| 7068 | * bits 7:0 contain the LSB of the UDP dest port, |
| 7069 | * bits 15:8 contain the MSB of the UDP dest port |
| 7070 | */ |
| 7071 | A_UINT32 dest_port; |
| 7072 | A_UINT32 pattern_len; /* length in byte of pattern[] */ |
| 7073 | A_UINT32 response_len; /* length in byte of response[] */ |
| 7074 | /* |
| 7075 | * Following this struct are the TLV's: |
| 7076 | * payload of UDP packet to be checked, network byte order |
| 7077 | * A_UINT8 pattern[]; |
| 7078 | * payload of UDP packet to be response, network byte order |
| 7079 | * A_UINT8 response[]; |
| 7080 | */ |
| 7081 | } WMI_WOW_UDP_SVC_OFLD_CMD_fixed_param; |
| 7082 | |
| 7083 | /* |
| 7084 | * This structure is used to set the pattern for WOW host wakeup pin pulse |
| 7085 | * pattern confirguration. |
| 7086 | */ |
| 7087 | typedef struct { |
| 7088 | /* |
| 7089 | * TLV tag and len; tag equals |
| 7090 | * WMITLV_TAG_STRUC_WMI_WOW_HOSTWAKEUP_PIN_PATTERN_CONFIG_CMD_fixed_param |
| 7091 | */ |
| 7092 | A_UINT32 tlv_header; |
| 7093 | |
| 7094 | /* 1: enable, 0: disable */ |
| 7095 | A_UINT32 enable; |
| 7096 | |
| 7097 | /* pin for host wakeup */ |
| 7098 | A_UINT32 pin; |
| 7099 | |
| 7100 | /* interval for keeping low voltage, unit: ms */ |
| 7101 | A_UINT32 interval_low; |
| 7102 | |
| 7103 | /* interval for keeping high voltage, unit: ms */ |
| 7104 | A_UINT32 interval_high; |
| 7105 | |
| 7106 | /* repeat times for pulse (0xffffffff means forever) */ |
| 7107 | A_UINT32 repeat_cnt; |
| 7108 | } WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param; |
| 7109 | |
| 7110 | typedef struct wow_event_info_s { |
| 7111 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_fixed_param */ |
| 7112 | A_UINT32 vdev_id; |
| 7113 | A_UINT32 flag; /*This is current reserved. */ |
| 7114 | A_INT32 wake_reason; |
| 7115 | A_UINT32 data_len; |
| 7116 | } WOW_EVENT_INFO_fixed_param; |
| 7117 | |
| 7118 | typedef struct wow_initial_wakeup_event_s { |
| 7119 | /* |
| 7120 | * TLV tag and len; tag equals |
| 7121 | * WOW_INITIAL_WAKEUP_EVENT_fixed_param |
| 7122 | */ |
| 7123 | A_UINT32 tlv_header; |
| 7124 | A_UINT32 vdev_id; |
| 7125 | } WOW_INITIAL_WAKEUP_EVENT_fixed_param; |
| 7126 | |
| 7127 | typedef enum { |
| 7128 | WOW_EVENT_INFO_TYPE_PACKET = 0x0001, |
| 7129 | WOW_EVENT_INFO_TYPE_BITMAP, |
| 7130 | WOW_EVENT_INFO_TYPE_GTKIGTK, |
| 7131 | } WOW_EVENT_INFO_TYPE; |
| 7132 | |
| 7133 | typedef struct wow_event_info_section_s { |
| 7134 | A_UINT32 data_type; |
| 7135 | A_UINT32 data_len; |
| 7136 | } WOW_EVENT_INFO_SECTION; |
| 7137 | |
| 7138 | typedef struct wow_event_info_section_packet_s { |
| 7139 | A_UINT8 packet[WOW_DEFAULT_EVT_BUF_SIZE]; |
| 7140 | } WOW_EVENT_INFO_SECTION_PACKET; |
| 7141 | |
| 7142 | typedef struct wow_event_info_section_bitmap_s { |
| 7143 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WOW_EVENT_INFO_SECTION_BITMAP */ |
| 7144 | A_UINT32 flag; /*This is current reserved. */ |
| 7145 | A_UINT32 value; /*This could be the pattern id for bitmap pattern. */ |
| 7146 | A_UINT32 org_len; /*The length of the orginal packet. */ |
| 7147 | } WOW_EVENT_INFO_SECTION_BITMAP; |
| 7148 | |
| 7149 | /** |
| 7150 | * This command is sent from WLAN host driver to firmware to |
| 7151 | * enable or disable D0-WOW. D0-WOW means APSS suspend with |
| 7152 | * PCIe link and DDR being active. |
| 7153 | * |
| 7154 | * |
| 7155 | * Entering D0-WOW Mode (based on kernel suspend request): |
| 7156 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 1) |
| 7157 | * target: Take action (e.g. dbglog suspend) |
| 7158 | * target->host: HTC_ACK (HTC_MSG_SEND_SUSPEND_COMPLETE message) |
| 7159 | * |
| 7160 | * Exiting D0-WOW mode (based on kernel resume OR target->host message received) |
| 7161 | * host->target: WMI_DO_WOW_ENABLE_DISABLE_CMDID (enable = 0) |
| 7162 | * target: Take action (e.g. dbglog resume) |
| 7163 | * target->host: WMI_D0_WOW_DISABLE_ACK_EVENTID |
| 7164 | * |
| 7165 | * This command is applicable only on the PCIE LL systems |
| 7166 | * Host can enter either D0-WOW or WOW mode, but NOT both at same time |
| 7167 | * Decision to enter D0-WOW or WOW is based on active interfaces |
| 7168 | * |
| 7169 | */ |
| 7170 | typedef struct { |
| 7171 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param */ |
| 7172 | A_UINT32 enable; /* 1 = enable, 0 = disable */ |
| 7173 | } wmi_d0_wow_enable_disable_cmd_fixed_param; |
| 7174 | |
| 7175 | typedef enum extend_wow_type_e { |
| 7176 | EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */ |
| 7177 | EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */ |
| 7178 | EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */ |
| 7179 | EXTWOW_DISABLED = 255, |
| 7180 | } EXTWOW_TYPE; |
| 7181 | |
| 7182 | typedef struct { |
| 7183 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */ |
| 7184 | A_UINT32 vdev_id; |
| 7185 | A_UINT32 type; |
| 7186 | A_UINT32 wakeup_pin_num; |
| 7187 | } wmi_extwow_enable_cmd_fixed_param; |
| 7188 | |
| 7189 | typedef struct { |
| 7190 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */ |
| 7191 | A_UINT32 vdev_id; |
| 7192 | wmi_mac_addr wakee_mac; |
| 7193 | A_UINT8 ident[8]; |
| 7194 | A_UINT8 passwd[16]; |
| 7195 | A_UINT32 ident_len; |
| 7196 | A_UINT32 passwd_len; |
| 7197 | } wmi_extwow_set_app_type1_params_cmd_fixed_param; |
| 7198 | |
| 7199 | typedef struct { |
| 7200 | A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */ |
| 7201 | A_UINT32 vdev_id; |
| 7202 | |
| 7203 | A_UINT8 rc4_key[16]; |
| 7204 | A_UINT32 rc4_key_len; |
| 7205 | |
| 7206 | /** ip header parameter */ |
| 7207 | A_UINT32 ip_id; /* NC id */ |
| 7208 | A_UINT32 ip_device_ip; /* NC IP address */ |
| 7209 | A_UINT32 ip_server_ip; /* Push server IP address */ |
| 7210 | |
| 7211 | /** tcp header parameter */ |
| 7212 | A_UINT16 tcp_src_port; /* NC TCP port */ |
| 7213 | A_UINT16 tcp_dst_port; /* Push server TCP port */ |
| 7214 | A_UINT32 tcp_seq; |
| 7215 | A_UINT32 tcp_ack_seq; |
| 7216 | |
| 7217 | A_UINT32 keepalive_init; /* Initial ping interval */ |
| 7218 | A_UINT32 keepalive_min; /* Minimum ping interval */ |
| 7219 | A_UINT32 keepalive_max; /* Maximum ping interval */ |
| 7220 | A_UINT32 keepalive_inc; /* Increment of ping interval */ |
| 7221 | |
| 7222 | wmi_mac_addr gateway_mac; |
| 7223 | A_UINT32 tcp_tx_timeout_val; |
| 7224 | A_UINT32 tcp_rx_timeout_val; |
| 7225 | |
| 7226 | /** add extra parameter for backward-compatible */ |
| 7227 | /* |
| 7228 | * For all byte arrays, natural order is used. E.g. |
| 7229 | * rc4_write_sandbox[0] holds the 1st RC4 S-box byte, |
| 7230 | * rc4_write_sandbox[1] holds the 2nd RC4 S-box byte, etc. |
| 7231 | */ |
| 7232 | |
| 7233 | /* used to encrypt transmit packet such as keep-alive */ |
| 7234 | A_UINT8 rc4_write_sandbox[256]; |
| 7235 | A_UINT32 rc4_write_x; |
| 7236 | A_UINT32 rc4_write_y; |
| 7237 | |
| 7238 | /* used to decrypt received packet such as wow data */ |
| 7239 | A_UINT8 rc4_read_sandbox[256]; |
| 7240 | A_UINT32 rc4_read_x; |
| 7241 | A_UINT32 rc4_read_y; |
| 7242 | |
| 7243 | /* used to caculate HMAC hash for transmit packet such as keep-alive */ |
| 7244 | A_UINT8 ssl_write_seq[8]; |
| 7245 | A_UINT8 ssl_sha1_write_key[64]; |
| 7246 | A_UINT32 ssl_sha1_write_key_len; |
| 7247 | |
| 7248 | /* used to calculate HAMC hash for receive packet such as wow data */ |
| 7249 | A_UINT8 ssl_read_seq[8]; |
| 7250 | A_UINT8 ssl_sha1_read_key[64]; |
| 7251 | A_UINT32 ssl_sha1_read_key_len; |
| 7252 | |
| 7253 | /* optional element for specifying TCP options data to include in |
| 7254 | * transmit packets such as keep-alive |
| 7255 | */ |
| 7256 | A_UINT32 tcp_options_len; |
| 7257 | A_UINT8 tcp_options[40]; |
| 7258 | |
| 7259 | A_UINT32 async_id; /* keep-alive request id */ |
| 7260 | } wmi_extwow_set_app_type2_params_cmd_fixed_param; |
| 7261 | |
| 7262 | #define WMI_RXERR_CRC 0x01 /* CRC error on frame */ |
| 7263 | #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ |
| 7264 | #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */ |
| 7265 | #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ |
| 7266 | |
| 7267 | typedef enum { |
| 7268 | PKT_PWR_SAVE_PAID_MATCH = 0x0001, |
| 7269 | PKT_PWR_SAVE_GID_MATCH = 0x0002, |
| 7270 | PKT_PWR_SAVE_EARLY_TIM_CLEAR = 0x0004, |
| 7271 | PKT_PWR_SAVE_EARLY_DTIM_CLEAR = 0x0008, |
| 7272 | PKT_PWR_SAVE_EOF_PAD_DELIM = 0x0010, |
| 7273 | PKT_PWR_SAVE_MACADDR_MISMATCH = 0x0020, |
| 7274 | PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040, |
| 7275 | PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080, |
| 7276 | PKT_PWR_SAVE_RSSI_CHECK = 0x0100, |
| 7277 | PKT_PWR_SAVE_5G_EBT = 0x0200, |
| 7278 | PKT_PWR_SAVE_2G_EBT = 0x0400, |
| 7279 | WMI_PKT_PWR_SAVE_MAX = 0x0800, |
| 7280 | } WMI_PKT_PWR_SAVE_TYPE; |
| 7281 | |
| 7282 | typedef struct { |
| 7283 | A_UINT32 tlv_header; |
| 7284 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_cmd_fixed_param */ |
| 7285 | A_UINT32 num_data; |
| 7286 | /** length in byte of data[]. */ |
| 7287 | /* This structure is used to send Factory Test Mode [FTM] command |
| 7288 | * from host to firmware for integrated chips which are binary blobs. |
| 7289 | * Following this structure is the TLV: |
| 7290 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 7291 | */ |
| 7292 | } wmi_ftm_intg_cmd_fixed_param; |
| 7293 | |
| 7294 | typedef struct { |
| 7295 | A_UINT32 tlv_header; |
| 7296 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ftm_intg_event_fixed_param */ |
| 7297 | A_UINT32 num_data; |
| 7298 | /** length in byte of data[]. */ |
| 7299 | /* This structure is used to receive Factory Test Mode [FTM] event |
| 7300 | * from firmware to host for integrated chips which are binary blobs. |
| 7301 | * Following this structure is the TLV: |
| 7302 | * A_UINT8 data[]; // length in byte given by field num_data. |
| 7303 | */ |
| 7304 | } wmi_ftm_intg_event_fixed_param; |
| 7305 | |
| 7306 | #define WMI_MAX_NS_OFFLOADS 2 |
| 7307 | #define WMI_MAX_ARP_OFFLOADS 2 |
| 7308 | |
| 7309 | #define WMI_ARPOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 7310 | #define WMI_ARPOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 7311 | #define WMI_ARPOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */ |
| 7312 | |
| 7313 | typedef struct { |
| 7314 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE */ |
| 7315 | A_UINT32 flags; /* flags */ |
| 7316 | A_UINT8 target_ipaddr[4]; /* IPV4 addresses of the local node */ |
| 7317 | A_UINT8 remote_ipaddr[4]; /* source address of the remote node requesting the ARP (qualifier) */ |
| 7318 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 7319 | } WMI_ARP_OFFLOAD_TUPLE; |
| 7320 | |
| 7321 | #define WMI_NSOFF_FLAGS_VALID (1 << 0) /* the tuple entry is valid */ |
| 7322 | #define WMI_NSOFF_FLAGS_MAC_VALID (1 << 1) /* the target mac address is valid */ |
| 7323 | #define WMI_NSOFF_FLAGS_REMOTE_IP_VALID (1 << 2) /* remote IP field is valid */ |
| 7324 | |
| 7325 | #define WMI_NSOFF_MAX_TARGET_IPS 2 |
| 7326 | |
| 7327 | typedef struct { |
| 7328 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE */ |
| 7329 | A_UINT32 flags; /* flags */ |
| 7330 | /* NOTE: This size of array target_ipaddr[] cannot be changed without breaking WMI compatibility. */ |
| 7331 | WMI_IPV6_ADDR target_ipaddr[WMI_NSOFF_MAX_TARGET_IPS]; /* IPV6 target addresses of the local node */ |
| 7332 | WMI_IPV6_ADDR solicitation_ipaddr; /* multi-cast source IP addresses for receiving solicitations */ |
| 7333 | WMI_IPV6_ADDR remote_ipaddr; /* address of remote node requesting the solicitation (qualifier) */ |
| 7334 | wmi_mac_addr target_mac; /* mac address for this tuple, if not valid, the local MAC is used */ |
| 7335 | } WMI_NS_OFFLOAD_TUPLE; |
| 7336 | |
| 7337 | typedef struct { |
| 7338 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param */ |
| 7339 | A_UINT32 flags; |
| 7340 | A_UINT32 vdev_id; |
| 7341 | A_UINT32 num_ns_ext_tuples; |
| 7342 | /* Following this structure are the TLVs: |
| 7343 | * WMI_NS_OFFLOAD_TUPLE ns_tuples[WMI_MAX_NS_OFFLOADS]; |
| 7344 | * WMI_ARP_OFFLOAD_TUPLE arp_tuples[WMI_MAX_ARP_OFFLOADS]; |
| 7345 | * size of ns_ext_tuples is based on num_ns_ext_tuples |
| 7346 | * WMI_NS_OFFLOAD_TUPLE ns_ext_tuples[]; |
| 7347 | */ |
| 7348 | } WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param; |
| 7349 | |
| 7350 | typedef struct { |
| 7351 | A_UINT32 tlv_header; |
| 7352 | A_UINT32 vdev_id; |
| 7353 | A_UINT32 pattern_id; |
| 7354 | A_UINT32 timeout; |
| 7355 | A_UINT32 length; |
| 7356 | /* Following this would be the pattern |
| 7357 | A_UINT8 pattern[] of length specifed by length |
| 7358 | field in the structure. */ |
| 7359 | } WMI_ADD_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 7360 | |
| 7361 | typedef struct { |
| 7362 | A_UINT32 tlv_header; |
| 7363 | A_UINT32 vdev_id; |
| 7364 | A_UINT32 pattern_id; |
| 7365 | } WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMD_fixed_param; |
| 7366 | |
| 7367 | typedef struct { |
| 7368 | A_UINT32 tlv_header; |
| 7369 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_addba_cmd_fixed_param */ |
| 7370 | /** unique id identifying the VDEV, generated by the caller */ |
| 7371 | A_UINT32 vdev_id; |
| 7372 | /** peer MAC address */ |
| 7373 | wmi_mac_addr peer_macaddr; |
| 7374 | /** Tid number */ |
| 7375 | A_UINT32 tid; |
| 7376 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 7377 | A_UINT32 initiator; |
| 7378 | /** size of the negotiated window */ |
| 7379 | A_UINT32 window_size; |
| 7380 | /** starting sequence number (only valid for initiator) */ |
| 7381 | A_UINT32 ssn; |
| 7382 | /** timeout field represents the time to wait for Block Ack in |
| 7383 | * initiator case and the time to wait for BAR in responder |
| 7384 | * case. 0 represents no timeout. */ |
| 7385 | A_UINT32 timeout; |
| 7386 | /* BA policy: immediate ACK (0) or delayed ACK (1) */ |
| 7387 | A_UINT32 policy; |
| 7388 | } wmi_peer_tid_addba_cmd_fixed_param; |
| 7389 | |
| 7390 | typedef struct { |
| 7391 | A_UINT32 tlv_header; |
| 7392 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd */ |
| 7393 | /** unique id identifying the VDEV, generated by the caller */ |
| 7394 | A_UINT32 vdev_id; |
| 7395 | /** peer MAC address */ |
| 7396 | wmi_mac_addr peer_macaddr; |
| 7397 | /** Tid number */ |
| 7398 | A_UINT32 tid; |
| 7399 | /** Initiator (1) or Responder (0) for this aggregation */ |
| 7400 | A_UINT32 initiator; |
| 7401 | } wmi_peer_tid_delba_cmd_fixed_param; |
| 7402 | |
| 7403 | typedef struct { |
| 7404 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param */ |
| 7405 | /** unique id identifying the VDEV, generated by the caller */ |
| 7406 | A_UINT32 vdev_id; |
| 7407 | /** peer MAC address */ |
| 7408 | wmi_mac_addr peer_macaddr; |
| 7409 | /** Tid number */ |
| 7410 | A_UINT32 tid; |
| 7411 | /** Event status */ |
| 7412 | A_UINT32 status; |
| 7413 | } wmi_tx_addba_complete_event_fixed_param; |
| 7414 | |
| 7415 | typedef struct { |
| 7416 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_delba_complete_event_fixed_param */ |
| 7417 | /** unique id identifying the VDEV, generated by the caller */ |
| 7418 | A_UINT32 vdev_id; |
| 7419 | /** peer MAC address */ |
| 7420 | wmi_mac_addr peer_macaddr; |
| 7421 | /** Tid number */ |
| 7422 | A_UINT32 tid; |
| 7423 | /** Event status */ |
| 7424 | A_UINT32 status; |
| 7425 | } wmi_tx_delba_complete_event_fixed_param; |
| 7426 | /* |
| 7427 | * Structure to request sequence numbers for a given |
| 7428 | * peer station on different TIDs. The TIDs are |
| 7429 | * indicated in the tidBitMap, tid 0 would |
| 7430 | * be represented by LSB bit 0. tid 1 would be |
| 7431 | * represented by LSB bit 1 etc. |
| 7432 | * The target will retrieve the current sequence |
| 7433 | * numbers for the peer on all the TIDs requested |
| 7434 | * and send back a response in a WMI event. |
| 7435 | */ |
| 7436 | typedef struct { |
| 7437 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 7438 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */ |
| 7439 | wmi_mac_addr peer_macaddr; |
| 7440 | A_UINT32 tidBitmap; |
| 7441 | } wmi_ba_req_ssn; |
| 7442 | |
| 7443 | typedef struct { |
| 7444 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 7445 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */ |
| 7446 | /** unique id identifying the VDEV, generated by the caller */ |
| 7447 | A_UINT32 vdev_id; |
| 7448 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 7449 | A_UINT32 num_ba_req_ssn; |
| 7450 | /* Following this struc are the TLV's: |
| 7451 | * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 7452 | */ |
| 7453 | } wmi_ba_req_ssn_cmd_fixed_param; |
| 7454 | |
| 7455 | /* |
| 7456 | * Max transmit categories |
| 7457 | * |
| 7458 | * Note: In future if we need to increase WMI_MAX_TC definition |
| 7459 | * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID. |
| 7460 | */ |
| 7461 | #define WMI_MAX_TC 8 |
| 7462 | |
| 7463 | /* |
| 7464 | * Structure to send response sequence numbers |
| 7465 | * for a give peer and tidmap. |
| 7466 | */ |
| 7467 | typedef struct { |
| 7468 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 7469 | WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */ |
| 7470 | wmi_mac_addr peer_macaddr; |
| 7471 | /* A bool to indicate if ssn is present */ |
| 7472 | A_UINT32 ssn_present_for_tid[WMI_MAX_TC]; |
| 7473 | /* The ssn from target, valid only if |
| 7474 | * ssn_present_for_tid[tidn] equals 1 |
| 7475 | */ |
| 7476 | A_UINT32 ssn_for_tid[WMI_MAX_TC]; |
| 7477 | } wmi_ba_event_ssn; |
| 7478 | |
| 7479 | typedef struct { |
| 7480 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 7481 | WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */ |
| 7482 | /** unique id identifying the VDEV, generated by the caller */ |
| 7483 | A_UINT32 vdev_id; |
| 7484 | /** Event status, success or failure of the overall operation */ |
| 7485 | A_UINT32 status; |
| 7486 | /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */ |
| 7487 | A_UINT32 num_ba_event_ssn; |
| 7488 | /* Following this struc are the TLV's: |
| 7489 | * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested |
| 7490 | */ |
| 7491 | } wmi_ba_rsp_ssn_event_fixed_param; |
| 7492 | |
| 7493 | enum wmi_aggr_state_req_type { |
| 7494 | WMI_DISABLE_AGGREGATION, |
| 7495 | WMI_ENABLE_AGGREGATION |
| 7496 | }; |
| 7497 | |
| 7498 | /* |
| 7499 | * This event is generated by the COEX module |
| 7500 | * when esco call is begins the coex module in fw genrated this event to host to |
| 7501 | * disable the RX aggregation and after completion of the esco call fw will indicate to |
| 7502 | * enable back the Rx aggregation . |
| 7503 | */ |
| 7504 | |
| 7505 | typedef struct { |
| 7506 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_aggr_state_trig_event_fixed_param */ |
| 7507 | /** unique id identifying the VDEV, generated by the caller */ |
| 7508 | A_UINT32 vdev_id; |
| 7509 | /** req_type contains values from enum |
| 7510 | * wmi_aggr_state_req_type; 0 (disable) 1(enable) */ |
| 7511 | A_UINT32 req_type; |
| 7512 | } wmi_aggr_state_trig_event_fixed_param; |
| 7513 | |
| 7514 | typedef struct { |
| 7515 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */ |
| 7516 | /** unique id identifying the VDEV, generated by the caller */ |
| 7517 | A_UINT32 vdev_id; |
| 7518 | /** MAC address used for installing */ |
| 7519 | wmi_mac_addr peer_macaddr; |
| 7520 | /** key index */ |
| 7521 | A_UINT32 key_ix; |
| 7522 | /** key flags */ |
| 7523 | A_UINT32 key_flags; |
| 7524 | /** Event status */ |
| 7525 | A_UINT32 status; |
| 7526 | } wmi_vdev_install_key_complete_event_fixed_param; |
| 7527 | |
| 7528 | typedef enum _WMI_NLO_AUTH_ALGORITHM { |
| 7529 | WMI_NLO_AUTH_ALGO_80211_OPEN = 1, |
| 7530 | WMI_NLO_AUTH_ALGO_80211_SHARED_KEY = 2, |
| 7531 | WMI_NLO_AUTH_ALGO_WPA = 3, |
| 7532 | WMI_NLO_AUTH_ALGO_WPA_PSK = 4, |
| 7533 | WMI_NLO_AUTH_ALGO_WPA_NONE = 5, |
| 7534 | WMI_NLO_AUTH_ALGO_RSNA = 6, |
| 7535 | WMI_NLO_AUTH_ALGO_RSNA_PSK = 7, |
| 7536 | } WMI_NLO_AUTH_ALGORITHM; |
| 7537 | |
| 7538 | typedef enum _WMI_NLO_CIPHER_ALGORITHM { |
| 7539 | WMI_NLO_CIPHER_ALGO_NONE = 0x00, |
| 7540 | WMI_NLO_CIPHER_ALGO_WEP40 = 0x01, |
| 7541 | WMI_NLO_CIPHER_ALGO_TKIP = 0x02, |
| 7542 | WMI_NLO_CIPHER_ALGO_CCMP = 0x04, |
| 7543 | WMI_NLO_CIPHER_ALGO_WEP104 = 0x05, |
| 7544 | WMI_NLO_CIPHER_ALGO_BIP = 0x06, |
| 7545 | WMI_NLO_CIPHER_ALGO_WPA_USE_GROUP = 0x100, |
| 7546 | WMI_NLO_CIPHER_ALGO_RSN_USE_GROUP = 0x100, |
| 7547 | WMI_NLO_CIPHER_ALGO_WEP = 0x101, |
| 7548 | } WMI_NLO_CIPHER_ALGORITHM; |
| 7549 | |
| 7550 | /* SSID broadcast type passed in NLO params */ |
| 7551 | typedef enum _WMI_NLO_SSID_BcastNwType { |
| 7552 | WMI_NLO_BCAST_UNKNOWN = 0, |
| 7553 | WMI_NLO_BCAST_NORMAL = 1, |
| 7554 | WMI_NLO_BCAST_HIDDEN = 2, |
| 7555 | } WMI_NLO_SSID_BcastNwType; |
| 7556 | |
| 7557 | #define WMI_NLO_MAX_SSIDS 16 |
| 7558 | #define WMI_NLO_MAX_CHAN 48 |
| 7559 | |
| 7560 | #define WMI_NLO_CONFIG_STOP (0x1 << 0) |
| 7561 | #define WMI_NLO_CONFIG_START (0x1 << 1) |
| 7562 | #define WMI_NLO_CONFIG_RESET (0x1 << 2) |
| 7563 | #define WMI_NLO_CONFIG_SLOW_SCAN (0x1 << 4) |
| 7564 | #define WMI_NLO_CONFIG_FAST_SCAN (0x1 << 5) |
| 7565 | #define WMI_NLO_CONFIG_SSID_HIDE_EN (0x1 << 6) |
| 7566 | /* This bit is used to indicate if EPNO or supplicant PNO is enabled. Only |
| 7567 | * one of them can be enabled at a given time */ |
| 7568 | #define WMI_NLO_CONFIG_ENLO (0x1 << 7) |
| 7569 | #define WMI_NLO_CONFIG_SCAN_PASSIVE (0x1 << 8) |
| 7570 | |
| 7571 | /* Whether directed scan needs to be performed (for hidden SSIDs) */ |
| 7572 | #define WMI_ENLO_FLAG_DIRECTED_SCAN 1 |
| 7573 | /* Whether PNO event shall be triggered if the network is found on A band */ |
| 7574 | #define WMI_ENLO_FLAG_A_BAND 2 |
| 7575 | /* Whether PNO event shall be triggered if the network is found on G band */ |
| 7576 | #define WMI_ENLO_FLAG_G_BAND 4 |
| 7577 | /* Whether strict matching is required (i.e. firmware shall not match on the entire SSID) */ |
| 7578 | #define WMI_ENLO_FLAG_STRICT_MATCH 8 |
| 7579 | /* Code for matching the beacon AUTH IE - additional codes TBD open */ |
| 7580 | #define WMI_ENLO_AUTH_CODE_OPEN 1 |
| 7581 | /* WPA_PSK or WPA2PSK */ |
| 7582 | #define WMI_ENLO_AUTH_CODE_PSK 2 |
| 7583 | /* any EAPOL */ |
| 7584 | #define WMI_ENLO_AUTH_CODE_EAPOL 4 |
| 7585 | |
| 7586 | /* NOTE: wmi_nlo_ssid_param structure can't be changed without breaking the compatibility */ |
| 7587 | typedef struct wmi_nlo_ssid_param { |
| 7588 | A_UINT32 valid; |
| 7589 | wmi_ssid ssid; |
| 7590 | } wmi_nlo_ssid_param; |
| 7591 | |
| 7592 | /* NOTE: wmi_nlo_enc_param structure can't be changed without breaking the compatibility */ |
| 7593 | typedef struct wmi_nlo_enc_param { |
| 7594 | A_UINT32 valid; |
| 7595 | A_UINT32 enc_type; |
| 7596 | } wmi_nlo_enc_param; |
| 7597 | |
| 7598 | /* NOTE: wmi_nlo_auth_param structure can't be changed without breaking the compatibility */ |
| 7599 | typedef struct wmi_nlo_auth_param { |
| 7600 | A_UINT32 valid; |
| 7601 | A_UINT32 auth_type; |
| 7602 | } wmi_nlo_auth_param; |
| 7603 | |
| 7604 | /* NOTE: wmi_nlo_bcast_nw_param structure can't be changed without breaking the compatibility */ |
| 7605 | typedef struct wmi_nlo_bcast_nw_param { |
| 7606 | A_UINT32 valid; |
| 7607 | /** |
| 7608 | * If WMI_NLO_CONFIG_EPNO is not set. Supplicant PNO is enabled. The value |
| 7609 | * should be true/false.Otherwise EPNO is enabled. bcast_nw_type would be used |
| 7610 | * as a bit flag contains WMI_ENLO_FLAG_XXX |
| 7611 | */ |
| 7612 | A_UINT32 bcast_nw_type; |
| 7613 | } wmi_nlo_bcast_nw_param; |
| 7614 | |
| 7615 | /* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */ |
| 7616 | typedef struct wmi_nlo_rssi_param { |
| 7617 | A_UINT32 valid; |
| 7618 | A_INT32 rssi; |
| 7619 | } wmi_nlo_rssi_param; |
| 7620 | |
| 7621 | typedef struct nlo_configured_parameters { |
| 7622 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */ |
| 7623 | wmi_nlo_ssid_param ssid; |
| 7624 | wmi_nlo_enc_param enc_type; |
| 7625 | wmi_nlo_auth_param auth_type; |
| 7626 | wmi_nlo_rssi_param rssi_cond; |
| 7627 | wmi_nlo_bcast_nw_param bcast_nw_type; /* indicates if the SSID is hidden or not */ |
| 7628 | } nlo_configured_parameters; |
| 7629 | |
| 7630 | /* Support channel prediction for PNO scan after scanning top_k_num channels |
| 7631 | * if stationary_threshold is met. |
| 7632 | */ |
| 7633 | typedef struct nlo_channel_prediction_cfg { |
| 7634 | A_UINT32 tlv_header; |
| 7635 | /* Enable or disable this feature. */ |
| 7636 | A_UINT32 enable; |
| 7637 | /* Top K channels will be scanned before deciding whether to further |
| 7638 | * scan or stop. Minimum value is 3 and maximum is 5. */ |
| 7639 | A_UINT32 top_k_num; |
| 7640 | /* Preconfigured stationary threshold. Lesser value means more |
| 7641 | * conservative. Bigger value means more aggressive. |
| 7642 | * Maximum is 100 and mininum is 0. */ |
| 7643 | A_UINT32 stationary_threshold; |
| 7644 | /* Periodic full channel scan in milliseconds unit. |
| 7645 | * After full_scan_period_ms since last full scan, channel prediction |
| 7646 | * scan is suppressed and will do full scan. |
| 7647 | * This is to help detecting sudden AP power-on or -off. |
| 7648 | * Value 0 means no full scan at all (not recommended). |
| 7649 | */ |
| 7650 | A_UINT32 full_scan_period_ms; |
| 7651 | } nlo_channel_prediction_cfg; |
| 7652 | |
| 7653 | typedef struct wmi_nlo_config { |
| 7654 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param */ |
| 7655 | A_UINT32 flags; |
| 7656 | A_UINT32 vdev_id; |
| 7657 | A_UINT32 fast_scan_max_cycles; |
| 7658 | A_UINT32 active_dwell_time; |
| 7659 | A_UINT32 passive_dwell_time; /* PDT in msecs */ |
| 7660 | A_UINT32 probe_bundle_size; |
| 7661 | A_UINT32 rest_time; /* ART = IRT */ |
| 7662 | A_UINT32 max_rest_time; /* Max value that can be reached after SBM */ |
| 7663 | A_UINT32 scan_backoff_multiplier; /* SBM */ |
| 7664 | A_UINT32 fast_scan_period; /* SCBM */ |
| 7665 | A_UINT32 slow_scan_period; /* specific to windows */ |
| 7666 | A_UINT32 no_of_ssids; |
| 7667 | A_UINT32 num_of_channels; |
| 7668 | A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */ |
| 7669 | /* The TLVs will follow. |
| 7670 | * nlo_configured_parameters nlo_list[]; |
| 7671 | * A_UINT32 channel_list[]; |
| 7672 | * nlo_channel_prediction_cfg ch_prediction_cfg; |
| 7673 | */ |
| 7674 | |
| 7675 | } wmi_nlo_config_cmd_fixed_param; |
| 7676 | |
| 7677 | typedef struct wmi_nlo_event { |
| 7678 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nlo_event */ |
| 7679 | A_UINT32 vdev_id; |
| 7680 | } wmi_nlo_event; |
| 7681 | |
| 7682 | /* WMI_PASSPOINT_CONFIG_SET |
| 7683 | * Sets a list for passpoint networks for PNO purposes; |
| 7684 | * it should be matched against any passpoint networks found |
| 7685 | * during regular PNO scan. |
| 7686 | */ |
| 7687 | #define WMI_PASSPOINT_CONFIG_SET (0x1 << 0) |
| 7688 | /* WMI_PASSPOINT_CONFIG_RESET |
| 7689 | * Reset passpoint network list - |
| 7690 | * no Passpoint networks should be matched after this. |
| 7691 | */ |
| 7692 | #define WMI_PASSPOINT_CONFIG_RESET (0x1 << 1) |
| 7693 | #define PASSPOINT_REALM_LEN 256 |
| 7694 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_LEN 5 |
| 7695 | #define PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16 |
| 7696 | #define PASSPOINT_PLMN_ID_LEN 3 |
| 7697 | #define PASSPOINT_PLMN_ID_ALLOC_LEN /* round up to A_UINT32 boundary */ \ |
| 7698 | (((PASSPOINT_PLMN_ID_LEN + 3) >> 2) << 2) |
| 7699 | |
| 7700 | /* |
| 7701 | * Confirm PASSPOINT_REALM_LEN is a multiple of 4, so the |
| 7702 | * A_UINT8 realm[PASSPOINT_REALM_LEN] |
| 7703 | * array will end on a 4-byte boundary. |
| 7704 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 7705 | */ |
| 7706 | A_COMPILE_TIME_ASSERT(check_passpoint_realm_size,(PASSPOINT_REALM_LEN % sizeof(A_UINT32)) == 0); |
| 7707 | |
| 7708 | /* |
| 7709 | * Confirm the product of PASSPOINT_ROAMING_CONSORTIUM_ID_NUM and |
| 7710 | * PASSPOINT_ROAMING_CONSORTIUM_ID_LEN is a multiple of 4, so the |
| 7711 | * roaming_consortium_ids array below will end on a 4-byte boundary. |
| 7712 | * (This 4-byte alignment simplifies endianness-correction byte swapping.) |
| 7713 | */ |
| 7714 | A_COMPILE_TIME_ASSERT(check_passpoint_roaming_consortium_ids_size, |
| 7715 | ((PASSPOINT_ROAMING_CONSORTIUM_ID_NUM*PASSPOINT_ROAMING_CONSORTIUM_ID_LEN) % sizeof(A_UINT32)) == 0); |
| 7716 | |
| 7717 | /* wildcard ID to allow an action (reset) to apply to all networks */ |
| 7718 | #define WMI_PASSPOINT_NETWORK_ID_WILDCARD 0xFFFFFFFF |
| 7719 | typedef struct wmi_passpoint_config { |
| 7720 | /* TLV tag and len; tag equals wmi_passpoint_config_cmd_fixed_param */ |
| 7721 | A_UINT32 tlv_header; |
| 7722 | /* (network) id |
| 7723 | * identifier of the matched network, report this in event |
| 7724 | * This id can be a wildcard (WMI_PASSPOINT_NETWORK_ID_WILDCARD) |
| 7725 | * that indicates the action should be applied to all networks. |
| 7726 | * Currently, the only action that is applied to all networks is "reset". |
| 7727 | * If a non-wildcard ID is specified, that particular network is configured. |
| 7728 | * If a wildcard ID is specified, all networks are reset. |
| 7729 | */ |
| 7730 | A_UINT32 id; |
| 7731 | A_UINT32 req_id; |
| 7732 | /*null terminated UTF8 encoded realm, 0 if unspecified*/ |
| 7733 | A_UINT8 realm[PASSPOINT_REALM_LEN]; |
| 7734 | /*roaming consortium ids to match, 0s if unspecified*/ |
| 7735 | A_UINT8 roaming_consortium_ids[PASSPOINT_ROAMING_CONSORTIUM_ID_NUM][PASSPOINT_ROAMING_CONSORTIUM_ID_LEN]; |
| 7736 | /*This would be bytes-stream as same as defition of realm id in 802.11 standard*/ |
| 7737 | /*PLMN id mcc/mnc combination as per rules, 0s if unspecified */ |
| 7738 | A_UINT8 plmn[PASSPOINT_PLMN_ID_ALLOC_LEN]; |
| 7739 | } wmi_passpoint_config_cmd_fixed_param; |
| 7740 | |
| 7741 | typedef struct { |
| 7742 | A_UINT32 tlv_header; /* TLV tag and len; tag equals |
| 7743 | wmi_passpoint_event_hdr */ |
| 7744 | A_UINT32 id; /* identifier of the matched network */ |
| 7745 | A_UINT32 vdev_id; |
| 7746 | A_UINT32 timestamp; /* time since boot (in microsecond) when the |
| 7747 | result was retrieved*/ |
| 7748 | wmi_ssid ssid; |
| 7749 | wmi_mac_addr bssid; /* bssid of the network */ |
| 7750 | A_UINT32 channel_mhz; /* channel frequency in MHz */ |
| 7751 | A_UINT32 rssi; /* rssi value */ |
| 7752 | A_UINT32 rtt; /* timestamp in nanoseconds*/ |
| 7753 | A_UINT32 rtt_sd; /* standard deviation in rtt */ |
| 7754 | A_UINT32 beacon_period; /* beacon advertised in the beacon */ |
| 7755 | A_UINT32 capability; /* capabilities advertised in the beacon */ |
| 7756 | A_UINT32 ie_length; /* size of the ie_data blob */ |
| 7757 | A_UINT32 anqp_length; /* length of ANQP blob */ |
| 7758 | /** |
| 7759 | * Following this structure is the byte stream of ie data of length ie_buf_len: |
| 7760 | * A_UINT8 ie_data[]; // length in byte given by field ie_length, blob of ie data in beacon |
| 7761 | * A_UINT8 anqp_ie[]; // length in byte given by field anqp_len, blob of anqp data of IE |
| 7762 | * Implicitly, combing ie_data and anqp_ie into a single bufp, and the bytes |
| 7763 | * stream of each ie should be same as BEACON/Action-frm by 802.11 spec |
| 7764 | */ |
| 7765 | } wmi_passpoint_event_hdr; |
| 7766 | |
| 7767 | #define GTK_OFFLOAD_OPCODE_MASK 0xFF000000 |
| 7768 | /** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */ |
| 7769 | #define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000 |
| 7770 | /** Disable GTK offload */ |
| 7771 | #define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000 |
| 7772 | /** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */ |
| 7773 | #define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000 |
| 7774 | enum wmi_chatter_mode { |
| 7775 | /* Chatter enter/exit happens |
| 7776 | * automatically based on preset |
| 7777 | * params |
| 7778 | */ |
| 7779 | WMI_CHATTER_MODE_AUTO, |
| 7780 | /* Chatter enter is triggered |
| 7781 | * manually by the user |
| 7782 | */ |
| 7783 | WMI_CHATTER_MODE_MANUAL_ENTER, |
| 7784 | /* Chatter exit is triggered |
| 7785 | * manually by the user |
| 7786 | */ |
| 7787 | WMI_CHATTER_MODE_MANUAL_EXIT, |
| 7788 | /* Placeholder max value, always last */ |
| 7789 | WMI_CHATTER_MODE_MAX |
| 7790 | }; |
| 7791 | |
| 7792 | enum wmi_chatter_query_type { |
| 7793 | /*query coalescing filter match counter */ |
| 7794 | WMI_CHATTER_QUERY_FILTER_MATCH_CNT, |
| 7795 | WMI_CHATTER_QUERY_MAX |
| 7796 | }; |
| 7797 | |
| 7798 | typedef struct { |
| 7799 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_set_mode_cmd_fixed_param */ |
| 7800 | A_UINT32 chatter_mode; |
| 7801 | } wmi_chatter_set_mode_cmd_fixed_param; |
| 7802 | |
| 7803 | /** maximum number of filter supported*/ |
| 7804 | #define CHATTER_MAX_COALESCING_RULES 11 |
| 7805 | /** maximum number of field tests per filter*/ |
| 7806 | #define CHATTER_MAX_FIELD_TEST 5 |
| 7807 | /** maximum field length in number of DWORDS*/ |
| 7808 | #define CHATTER_MAX_TEST_FIELD_LEN32 2 |
| 7809 | |
| 7810 | /** field test kinds*/ |
| 7811 | #define CHATTER_COALESCING_TEST_EQUAL 1 |
| 7812 | #define CHATTER_COALESCING_TEST_MASKED_EQUAL 2 |
| 7813 | #define CHATTER_COALESCING_TEST_NOT_EQUAL 3 |
| 7814 | |
| 7815 | /** packet type*/ |
| 7816 | #define CHATTER_COALESCING_PKT_TYPE_UNICAST (1 << 0) |
| 7817 | #define CHATTER_COALESCING_PKT_TYPE_MULTICAST (1 << 1) |
| 7818 | #define CHATTER_COALESCING_PKT_TYPE_BROADCAST (1 << 2) |
| 7819 | |
| 7820 | /** coalescing field test*/ |
| 7821 | typedef struct _chatter_pkt_coalescing_hdr_test { |
| 7822 | /** offset from start of mac header, for windows native wifi host driver |
| 7823 | * should assume standard 802.11 frame format without QoS info and address4 |
| 7824 | * FW would account for any non-stand fields for final offset value. |
| 7825 | */ |
| 7826 | A_UINT32 offset; |
| 7827 | A_UINT32 length; /* length of test field */ |
| 7828 | A_UINT32 test; /*equal, not equal or masked equal */ |
| 7829 | A_UINT32 mask[CHATTER_MAX_TEST_FIELD_LEN32]; /*mask byte stream */ |
| 7830 | A_UINT32 value[CHATTER_MAX_TEST_FIELD_LEN32]; /*value byte stream */ |
| 7831 | } chatter_pkt_coalescing_hdr_test; |
| 7832 | |
| 7833 | /** packet coalescing filter*/ |
| 7834 | typedef struct _chatter_pkt_coalescing_filter { |
| 7835 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter */ |
| 7836 | A_UINT32 filter_id; /*unique id assigned by OS */ |
| 7837 | A_UINT32 max_coalescing_delay; /*max miliseconds 1st pkt can be hold */ |
| 7838 | A_UINT32 pkt_type; /*unicast/multicast/broadcast */ |
| 7839 | A_UINT32 num_of_test_field; /*number of field test in table */ |
| 7840 | chatter_pkt_coalescing_hdr_test test_fields[CHATTER_MAX_FIELD_TEST]; /*field test tbl */ |
| 7841 | } chatter_pkt_coalescing_filter; |
| 7842 | |
| 7843 | /** packet coalescing filter add command*/ |
| 7844 | typedef struct { |
| 7845 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param */ |
| 7846 | A_UINT32 num_of_filters; |
| 7847 | /* Following this tlv, there comes an array of structure of type chatter_pkt_coalescing_filter |
| 7848 | chatter_pkt_coalescing_filter rx_filter[1]; */ |
| 7849 | } wmi_chatter_coalescing_add_filter_cmd_fixed_param; |
| 7850 | /** packet coalescing filter delete command*/ |
| 7851 | typedef struct { |
| 7852 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param */ |
| 7853 | A_UINT32 filter_id; /*filter id which will be deleted */ |
| 7854 | } wmi_chatter_coalescing_delete_filter_cmd_fixed_param; |
| 7855 | /** packet coalescing query command*/ |
| 7856 | typedef struct { |
| 7857 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_coalescing_query_cmd_fixed_param */ |
| 7858 | A_UINT32 type; /*type of query */ |
| 7859 | } wmi_chatter_coalescing_query_cmd_fixed_param; |
| 7860 | /** chatter query reply event*/ |
| 7861 | typedef struct { |
| 7862 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param */ |
| 7863 | A_UINT32 type; /*query type */ |
| 7864 | A_UINT32 filter_match_cnt; /*coalescing filter match counter */ |
| 7865 | } wmi_chatter_query_reply_event_fixed_param; |
| 7866 | |
| 7867 | /* NOTE: This constants GTK_OFFLOAD_KEK_BYTES, GTK_OFFLOAD_KCK_BYTES, and GTK_REPLAY_COUNTER_BYTES |
| 7868 | * cannot be changed without breaking WMI compatibility. */ |
| 7869 | #define GTK_OFFLOAD_KEK_BYTES 16 |
| 7870 | #define GTK_OFFLOAD_KCK_BYTES 16 |
| 7871 | /* NOTE: GTK_REPLAY_COUNTER_BYTES, WMI_MAX_KEY_LEN, IGTK_PN_SIZE cannot be changed in the future without breaking WMI compatibility */ |
| 7872 | #define GTK_REPLAY_COUNTER_BYTES 8 |
| 7873 | #define WMI_MAX_KEY_LEN 32 |
| 7874 | #define IGTK_PN_SIZE 6 |
| 7875 | |
| 7876 | typedef struct { |
| 7877 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param */ |
| 7878 | A_UINT32 vdev_id; |
| 7879 | /** unique id identifying the VDEV */ |
| 7880 | A_UINT32 flags; /* status flags */ |
| 7881 | A_UINT32 refresh_cnt; /* number of successful GTK refresh exchanges since last SET operation */ |
| 7882 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* current replay counter */ |
| 7883 | A_UINT8 igtk_keyIndex; /* Use if IGTK_OFFLOAD is defined */ |
| 7884 | A_UINT8 igtk_keyLength; /* Use if IGTK_OFFLOAD is defined */ |
| 7885 | A_UINT8 igtk_keyRSC[IGTK_PN_SIZE]; /* key replay sequence counter *//* Use if IGTK_OFFLOAD is defined */ |
| 7886 | A_UINT8 igtk_key[WMI_MAX_KEY_LEN]; /* Use if IGTK_OFFLOAD is defined */ |
| 7887 | } WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param; |
| 7888 | |
| 7889 | typedef struct { |
| 7890 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param */ |
| 7891 | A_UINT32 vdev_id; /** unique id identifying the VDEV */ |
| 7892 | A_UINT32 flags; /* control flags, GTK offload command use high byte */ |
| 7893 | /* The size of following 3 arrays cannot be changed without breaking WMI compatibility. */ |
| 7894 | A_UINT8 KEK[GTK_OFFLOAD_KEK_BYTES]; /* key encryption key */ |
| 7895 | A_UINT8 KCK[GTK_OFFLOAD_KCK_BYTES]; /* key confirmation key */ |
| 7896 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; /* replay counter for re-key */ |
| 7897 | } WMI_GTK_OFFLOAD_CMD_fixed_param; |
| 7898 | |
| 7899 | typedef struct { |
| 7900 | /* TLV tag and len; tag equals |
| 7901 | * WMITLV_TAG_STRUC_WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param |
| 7902 | */ |
| 7903 | A_UINT32 tlv_header; |
| 7904 | A_UINT32 vdev_id; |
| 7905 | A_UINT32 sa_query_retry_interval; /* in msec */ |
| 7906 | A_UINT32 sa_query_max_retry_count; |
| 7907 | } WMI_PMF_OFFLOAD_SET_SA_QUERY_CMD_fixed_param; |
| 7908 | |
| 7909 | typedef enum { |
| 7910 | WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1, /* 802.11 NULL frame */ |
| 7911 | WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE = 2, /* ARP response */ |
| 7912 | WMI_STA_KEEPALIVE_METHOD_ETHERNET_LOOPBACK = 3, /*ETHERNET LOOPBACK */ |
| 7913 | /* gratuitous ARP req*/ |
| 7914 | WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST = 4, |
| 7915 | } WMI_STA_KEEPALIVE_METHOD; |
| 7916 | |
| 7917 | typedef struct { |
| 7918 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE */ |
| 7919 | WMI_IPV4_ADDR sender_prot_addr; /* Sender protocol address */ |
| 7920 | WMI_IPV4_ADDR target_prot_addr; /* Target protocol address */ |
| 7921 | wmi_mac_addr dest_mac_addr; /* destination MAC address */ |
| 7922 | } WMI_STA_KEEPALVE_ARP_RESPONSE; |
| 7923 | |
| 7924 | typedef struct { |
| 7925 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param */ |
| 7926 | A_UINT32 vdev_id; |
| 7927 | A_UINT32 enable; /* 1 - Enable, 0 - disable */ |
| 7928 | A_UINT32 method; /* keep alive method */ |
| 7929 | A_UINT32 interval; /* time interval in seconds */ |
| 7930 | /* |
| 7931 | * NOTE: following this structure is the TLV for ARP Resonse: |
| 7932 | * WMI_STA_KEEPALVE_ARP_RESPONSE arp_resp; // ARP response |
| 7933 | */ |
| 7934 | } WMI_STA_KEEPALIVE_CMD_fixed_param; |
| 7935 | |
| 7936 | typedef struct { |
| 7937 | A_UINT32 tlv_header; |
| 7938 | A_UINT32 vdev_id; |
| 7939 | A_UINT32 action; |
| 7940 | } WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param; |
| 7941 | typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD; |
| 7942 | |
| 7943 | typedef struct { |
| 7944 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */ |
| 7945 | A_UINT32 vdev_id; |
| 7946 | A_UINT32 keepaliveInterval; /* seconds */ |
| 7947 | A_UINT32 keepaliveMethod; |
| 7948 | } wmi_vdev_set_keepalive_cmd_fixed_param; |
| 7949 | |
| 7950 | typedef struct { |
| 7951 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param */ |
| 7952 | A_UINT32 vdev_id; |
| 7953 | } wmi_vdev_get_keepalive_cmd_fixed_param; |
| 7954 | |
| 7955 | typedef struct { |
| 7956 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_event_fixed_param */ |
| 7957 | A_UINT32 vdev_id; |
| 7958 | A_UINT32 keepaliveInterval; /* seconds */ |
| 7959 | A_UINT32 keepaliveMethod; /* seconds */ |
| 7960 | } wmi_vdev_get_keepalive_event_fixed_param; |
| 7961 | |
| 7962 | #define IPSEC_NATKEEPALIVE_FILTER_DISABLE 0 |
| 7963 | #define IPSEC_NATKEEPALIVE_FILTER_ENABLE 1 |
| 7964 | |
| 7965 | typedef struct { |
| 7966 | A_UINT32 tlv_header; |
| 7967 | A_UINT32 vdev_id; |
| 7968 | A_UINT32 action; |
| 7969 | } WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param; |
| 7970 | |
| 7971 | typedef WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param |
| 7972 | WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD; |
| 7973 | |
| 7974 | typedef struct { |
| 7975 | A_UINT32 tlv_header; |
| 7976 | A_UINT32 vdev_id; |
| 7977 | A_UINT32 mcc_tbttmode; |
| 7978 | wmi_mac_addr mcc_bssid; |
| 7979 | } wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param; |
| 7980 | |
| 7981 | typedef struct { |
| 7982 | A_UINT32 tlv_header; |
| 7983 | A_UINT32 vdev_id; /* home vdev id */ |
| 7984 | A_UINT32 meas_token; /* from measure request frame */ |
| 7985 | A_UINT32 dialog_token; |
| 7986 | A_UINT32 number_bursts; /* zero keep sending until cancel, bigger than 0 means times e.g. 1,2 */ |
| 7987 | A_UINT32 burst_interval; /* unit in mill seconds, interval between consecutive burst */ |
| 7988 | A_UINT32 burst_cycle; /* times cycle through within one burst */ |
| 7989 | A_UINT32 tx_power; /* for path frame */ |
| 7990 | A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */ |
| 7991 | wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */ |
| 7992 | A_UINT32 num_chans; |
| 7993 | } wmi_vdev_plmreq_start_cmd_fixed_param; |
| 7994 | |
| 7995 | typedef struct { |
| 7996 | A_UINT32 tlv_header; |
| 7997 | A_UINT32 vdev_id; |
| 7998 | A_UINT32 meas_token; /* same value from req */ |
| 7999 | } wmi_vdev_plmreq_stop_cmd_fixed_param; |
| 8000 | |
| 8001 | typedef struct { |
| 8002 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */ |
| 8003 | A_UINT32 tlv_header; |
| 8004 | /* unique id identifying the VDEV, generated by the caller */ |
| 8005 | A_UINT32 vdev_id; |
| 8006 | /* enable/disable NoA */ |
| 8007 | A_UINT32 enable; |
| 8008 | /** number of NoA desc. In the TLV noa_descriptor[] */ |
| 8009 | A_UINT32 num_noa; |
| 8010 | /** |
| 8011 | * TLV (tag length value ) paramerters follow the pattern structure. |
| 8012 | * TLV contain NoA desc with num of num_noa |
| 8013 | */ |
| 8014 | } wmi_p2p_set_noa_cmd_fixed_param; |
| 8015 | |
| 8016 | typedef struct { |
| 8017 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */ |
| 8018 | A_UINT32 tlv_header; |
| 8019 | /* unique id identifying the VDEV, generated by the caller */ |
| 8020 | A_UINT32 vdev_id; |
| 8021 | /* Identify the wlan module */ |
| 8022 | A_UINT32 module_id; |
| 8023 | /* Num of test arguments passed */ |
| 8024 | A_UINT32 num_args; |
| 8025 | /** |
| 8026 | * TLV (tag length value ) parameters follow the wmi_roam_chan_list |
| 8027 | * structure. The TLV's are: |
| 8028 | * A_UINT32 args[]; |
| 8029 | **/ |
| 8030 | } wmi_unit_test_cmd_fixed_param; |
| 8031 | |
| 8032 | /** Roaming offload SYNCH_COMPLETE from host when host finished sync logic |
| 8033 | * after it received WMI_ROAM_SYNCH_EVENTID. |
| 8034 | */ |
| 8035 | typedef struct { |
| 8036 | A_UINT32 tlv_header; |
| 8037 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */ |
| 8038 | /** unique id identifying the VDEV, generated by the caller */ |
| 8039 | A_UINT32 vdev_id; |
| 8040 | } wmi_roam_synch_complete_fixed_param; |
| 8041 | |
| 8042 | typedef enum { |
| 8043 | RECOVERY_SIM_ASSERT = 0x01, |
| 8044 | RECOVERY_SIM_NO_DETECT = 0x02, |
| 8045 | RECOVERY_SIM_CTR_EP_FULL = 0x03, |
| 8046 | RECOVERY_SIM_EMPTY_POINT = 0x04, |
| 8047 | RECOVERY_SIM_STACK_OV = 0x05, |
| 8048 | RECOVERY_SIM_INFINITE_LOOP = 0x06, |
| 8049 | RECOVERY_SIM_PCIE_LINKDOWN = 0x07, |
| 8050 | RECOVERY_SIM_SELF_RECOVERY = 0x08, |
| 8051 | } RECOVERY_SIM_TYPE; |
| 8052 | |
| 8053 | /* WMI_FORCE_FW_HANG_CMDID */ |
| 8054 | typedef struct { |
| 8055 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param */ |
| 8056 | A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:... */ |
| 8057 | A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms) */ |
| 8058 | } WMI_FORCE_FW_HANG_CMD_fixed_param; |
| 8059 | #define WMI_MCAST_FILTER_SET 1 |
| 8060 | #define WMI_MCAST_FILTER_DELETE 2 |
| 8061 | typedef struct { |
| 8062 | A_UINT32 tlv_header; |
| 8063 | A_UINT32 vdev_id; |
| 8064 | A_UINT32 index; |
| 8065 | A_UINT32 action; |
| 8066 | wmi_mac_addr mcastbdcastaddr; |
| 8067 | } WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param; |
| 8068 | |
| 8069 | /* GPIO Command and Event data structures */ |
| 8070 | |
| 8071 | /* WMI_GPIO_CONFIG_CMDID */ |
| 8072 | enum { |
| 8073 | WMI_GPIO_PULL_NONE, |
| 8074 | WMI_GPIO_PULL_UP, |
| 8075 | WMI_GPIO_PULL_DOWN, |
| 8076 | }; |
| 8077 | |
| 8078 | enum { |
| 8079 | WMI_GPIO_INTTYPE_DISABLE, |
| 8080 | WMI_GPIO_INTTYPE_RISING_EDGE, |
| 8081 | WMI_GPIO_INTTYPE_FALLING_EDGE, |
| 8082 | WMI_GPIO_INTTYPE_BOTH_EDGE, |
| 8083 | WMI_GPIO_INTTYPE_LEVEL_LOW, |
| 8084 | WMI_GPIO_INTTYPE_LEVEL_HIGH |
| 8085 | }; |
| 8086 | |
| 8087 | typedef struct { |
| 8088 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_config_cmd_fixed_param */ |
| 8089 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 8090 | A_UINT32 input; /* 0 - Output/ 1 - Input */ |
| 8091 | A_UINT32 pull_type; /* Pull type defined above */ |
| 8092 | A_UINT32 intr_mode; /* Interrupt mode defined above (Input) */ |
| 8093 | } wmi_gpio_config_cmd_fixed_param; |
| 8094 | |
| 8095 | /* WMI_GPIO_OUTPUT_CMDID */ |
| 8096 | typedef struct { |
| 8097 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_output_cmd_fixed_param */ |
| 8098 | A_UINT32 gpio_num; /* GPIO number to be setup */ |
| 8099 | A_UINT32 set; /* Set the GPIO pin */ |
| 8100 | } wmi_gpio_output_cmd_fixed_param; |
| 8101 | |
| 8102 | /* WMI_GPIO_INPUT_EVENTID */ |
| 8103 | typedef struct { |
| 8104 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param */ |
| 8105 | A_UINT32 gpio_num; /* GPIO number which changed state */ |
| 8106 | } wmi_gpio_input_event_fixed_param; |
| 8107 | |
| 8108 | /* WMI_P2P_DISC_EVENTID */ |
| 8109 | enum { |
| 8110 | P2P_DISC_SEARCH_PROB_REQ_HIT = 0, /* prob req hit the p2p find pattern */ |
| 8111 | P2P_DISC_SEARCH_PROB_RESP_HIT, /* prob resp hit the p2p find pattern */ |
| 8112 | }; |
| 8113 | |
| 8114 | enum { |
| 8115 | P2P_DISC_MODE_SEARCH = 0, /* do search when p2p find offload */ |
| 8116 | P2P_DISC_MODE_LISTEN, /* do listen when p2p find offload */ |
| 8117 | P2P_DISC_MODE_AUTO, /* do listen and search when p2p find offload */ |
| 8118 | }; |
| 8119 | |
| 8120 | enum { |
| 8121 | P2P_DISC_PATTERN_TYPE_BSSID = 0, /* BSSID pattern */ |
| 8122 | P2P_DISC_PATTERN_TYPE_DEV_NAME, /* device name pattern */ |
| 8123 | }; |
| 8124 | |
| 8125 | typedef struct { |
| 8126 | A_UINT32 vdev_id; |
| 8127 | A_UINT32 reason; /* P2P DISC wake up reason */ |
| 8128 | } wmi_p2p_disc_event; |
| 8129 | |
| 8130 | typedef WMI_GTK_OFFLOAD_STATUS_EVENT_fixed_param |
| 8131 | WOW_EVENT_INFO_SECTION_GTKIGTK; |
| 8132 | |
| 8133 | typedef enum { |
| 8134 | WMI_FAKE_TXBFER_SEND_NDPA, |
| 8135 | WMI_FAKE_TXBFER_SEND_MU, |
| 8136 | WMI_FAKE_TXBFER_NDPA_FBTYPE, |
| 8137 | WMI_FAKE_TXBFER_NDPA_NCIDX, |
| 8138 | WMI_FAKE_TXBFER_NDPA_POLL, |
| 8139 | WMI_FAKE_TXBFER_NDPA_BW, |
| 8140 | WMI_FAKE_TXBFER_NDPA_PREAMBLE, |
| 8141 | WMI_FAKE_TXBFER_NDPA_RATE, |
| 8142 | WMI_FAKE_TXBFER_NDP_BW, |
| 8143 | WMI_FAKE_TXBFER_NDP_NSS, |
| 8144 | WMI_TXBFEE_ENABLE_UPLOAD_H, |
| 8145 | WMI_TXBFEE_ENABLE_CAPTURE_H, |
| 8146 | WMI_TXBFEE_SET_CBF_TBL, |
| 8147 | WMI_TXBFEE_CBF_TBL_LSIG, |
| 8148 | WMI_TXBFEE_CBF_TBL_SIGA1, |
| 8149 | WMI_TXBFEE_CBF_TBL_SIGA2, |
| 8150 | WMI_TXBFEE_CBF_TBL_SIGB, |
| 8151 | WMI_TXBFEE_CBF_TBL_PAD, |
| 8152 | WMI_TXBFEE_CBF_TBL_DUR, |
| 8153 | WMI_TXBFEE_SU_NCIDX, |
| 8154 | WMI_TXBFEE_CBIDX, |
| 8155 | WMI_TXBFEE_NGIDX, |
| 8156 | } WMI_TXBF_PARAM_ID; |
| 8157 | |
| 8158 | typedef struct { |
| 8159 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_txbf_cmd_fixed_param */ |
| 8160 | /** parameter id */ |
| 8161 | A_UINT32 param_id; |
| 8162 | /** parameter value */ |
| 8163 | A_UINT32 param_value; |
| 8164 | } wmi_txbf_cmd_fixed_param; |
| 8165 | |
| 8166 | typedef struct { |
| 8167 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_upload_h_hdr */ |
| 8168 | A_UINT32 h_length; |
| 8169 | A_UINT32 cv_length; |
| 8170 | /* This TLV is followed by array of bytes: |
| 8171 | * // h_cv info buffer |
| 8172 | * A_UINT8 bufp[]; |
| 8173 | */ |
| 8174 | } wmi_upload_h_hdr; |
| 8175 | |
| 8176 | typedef struct { |
| 8177 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_capture_h_event_hdr */ |
| 8178 | A_UINT32 svd_num; |
| 8179 | A_UINT32 tone_num; |
| 8180 | A_UINT32 reserved; |
| 8181 | } wmi_capture_h_event_hdr; |
| 8182 | |
| 8183 | typedef struct { |
| 8184 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_range_desc */ |
| 8185 | A_UINT32 start_freq; /* start frequency, not channel center freq */ |
| 8186 | A_UINT32 end_freq; /* end frequency */ |
| 8187 | } wmi_avoid_freq_range_desc; |
| 8188 | |
| 8189 | typedef struct { |
| 8190 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_avoid_freq_ranges_event_fixed_param */ |
| 8191 | /* bad channel range count, multi range is allowed, 0 means all channel clear */ |
| 8192 | A_UINT32 num_freq_ranges; |
| 8193 | |
| 8194 | /* The TLVs will follow. |
| 8195 | * multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc |
| 8196 | * wmi_avoid_freq_range_desc avd_freq_range[]; // message buffer, NULL terminated |
| 8197 | */ |
| 8198 | } wmi_avoid_freq_ranges_event_fixed_param; |
| 8199 | |
| 8200 | typedef struct { |
| 8201 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_gtk_rekey_fail_event_fixed_param */ |
| 8202 | /** Reserved for future use */ |
| 8203 | A_UINT32 reserved0; |
| 8204 | A_UINT32 vdev_id; |
| 8205 | } wmi_gtk_rekey_fail_event_fixed_param; |
| 8206 | |
| 8207 | enum wmm_ac_downgrade_policy { |
| 8208 | WMM_AC_DOWNGRADE_DEPRIO, |
| 8209 | WMM_AC_DOWNGRADE_DROP, |
| 8210 | WMM_AC_DOWNGRADE_INVALID, |
| 8211 | }; |
| 8212 | |
| 8213 | typedef struct { |
| 8214 | A_UINT32 tlv_header; |
| 8215 | A_UINT32 cwmin; |
| 8216 | A_UINT32 cwmax; |
| 8217 | A_UINT32 aifs; |
| 8218 | A_UINT32 txoplimit; |
| 8219 | A_UINT32 acm; |
| 8220 | A_UINT32 no_ack; |
| 8221 | } wmi_wmm_vparams; |
| 8222 | |
| 8223 | typedef struct { |
| 8224 | A_UINT32 tlv_header; |
| 8225 | A_UINT32 vdev_id; |
| 8226 | wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */ |
| 8227 | } wmi_vdev_set_wmm_params_cmd_fixed_param; |
| 8228 | |
| 8229 | typedef struct { |
| 8230 | A_UINT32 tlv_header; |
| 8231 | A_UINT32 vdev_id; |
| 8232 | A_UINT32 gtxRTMask[2]; /* for HT and VHT rate masks */ |
| 8233 | A_UINT32 userGtxMask; /* host request for GTX mask */ |
| 8234 | A_UINT32 gtxPERThreshold; /* default: 10% */ |
| 8235 | A_UINT32 gtxPERMargin; /* default: 2% */ |
| 8236 | A_UINT32 gtxTPCstep; /* default: 1 */ |
| 8237 | A_UINT32 gtxTPCMin; /* default: 5 */ |
| 8238 | A_UINT32 gtxBWMask; /* 20/40/80/160 Mhz */ |
| 8239 | } wmi_vdev_set_gtx_params_cmd_fixed_param; |
| 8240 | |
| 8241 | typedef struct { |
| 8242 | A_UINT32 tlv_header; |
| 8243 | A_UINT32 vdev_id; |
| 8244 | A_UINT32 ac; |
| 8245 | A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */ |
| 8246 | A_UINT32 downgrade_type; |
| 8247 | } wmi_vdev_wmm_addts_cmd_fixed_param; |
| 8248 | |
| 8249 | typedef struct { |
| 8250 | A_UINT32 tlv_header; |
| 8251 | A_UINT32 vdev_id; |
| 8252 | A_UINT32 ac; |
| 8253 | } wmi_vdev_wmm_delts_cmd_fixed_param; |
| 8254 | |
| 8255 | typedef struct { |
| 8256 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */ |
| 8257 | /** Reserved for future use */ |
| 8258 | A_UINT32 reserved0; |
| 8259 | } wmi_pdev_dfs_enable_cmd_fixed_param; |
| 8260 | |
| 8261 | typedef struct { |
| 8262 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_disable_cmd_fixed_param */ |
| 8263 | /** Reserved for future use */ |
| 8264 | A_UINT32 reserved0; |
| 8265 | } wmi_pdev_dfs_disable_cmd_fixed_param; |
| 8266 | |
| 8267 | typedef struct { |
| 8268 | /** TLV tag and len; tag equals |
| 8269 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_ena_cmd_fixed_param |
| 8270 | */ |
| 8271 | A_UINT32 tlv_header; |
| 8272 | |
| 8273 | /** Reserved for future use */ |
| 8274 | A_UINT32 reserved0; |
| 8275 | } wmi_dfs_phyerr_filter_ena_cmd_fixed_param; |
| 8276 | |
| 8277 | typedef struct { |
| 8278 | /** TLV tag and len; tag equals |
| 8279 | * WMITLV_TAG_STRUC_wmi_dfs_phyerr_filter_dis_cmd_fixed_param |
| 8280 | */ |
| 8281 | A_UINT32 tlv_header; |
| 8282 | /** Reserved for future use */ |
| 8283 | A_UINT32 reserved0; |
| 8284 | } wmi_dfs_phyerr_filter_dis_cmd_fixed_param; |
| 8285 | |
| 8286 | /** TDLS COMMANDS */ |
| 8287 | |
| 8288 | /* WMI_TDLS_SET_STATE_CMDID */ |
| 8289 | /* TDLS State */ |
| 8290 | enum wmi_tdls_state { |
| 8291 | /** TDLS disable */ |
| 8292 | WMI_TDLS_DISABLE, |
| 8293 | /** TDLS enabled - no firmware connection tracking/notifications */ |
| 8294 | WMI_TDLS_ENABLE_PASSIVE, |
| 8295 | /** TDLS enabled - with firmware connection tracking/notifications */ |
| 8296 | WMI_TDLS_ENABLE_ACTIVE, |
| 8297 | /* TDLS enabled - firmware waits for peer mac for connection tracking */ |
| 8298 | WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL, |
| 8299 | }; |
| 8300 | |
| 8301 | /* TDLS Options */ |
| 8302 | #define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */ |
| 8303 | #define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */ |
| 8304 | #define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */ |
| 8305 | |
| 8306 | typedef struct { |
| 8307 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */ |
| 8308 | A_UINT32 tlv_header; |
| 8309 | /** unique id identifying the VDEV */ |
| 8310 | A_UINT32 vdev_id; |
| 8311 | /** Enable/Disable TDLS (wmi_tdls_state) */ |
| 8312 | A_UINT32 state; |
| 8313 | /* Duration (in ms) over which to calculate tx/rx threshold |
| 8314 | * to trigger TDLS Discovery |
| 8315 | */ |
| 8316 | A_UINT32 notification_interval_ms; |
| 8317 | /** number of packets OVER which notify/suggest TDLS Discovery: |
| 8318 | * if current tx pps counter / notification interval >= threshold |
| 8319 | * then a notification will be sent to host to advise TDLS Discovery */ |
| 8320 | A_UINT32 tx_discovery_threshold; |
| 8321 | /** number of packets UNDER which notify/suggest TDLS Teardown: |
| 8322 | * if current tx pps counter / notification interval < threshold |
| 8323 | * then a notification will be sent to host to advise TDLS Tear down */ |
| 8324 | A_UINT32 tx_teardown_threshold; |
| 8325 | /** Absolute RSSI value under which notify/suggest TDLS Teardown */ |
| 8326 | A_INT32 rssi_teardown_threshold; |
| 8327 | /** Peer RSSI < (AP RSSI + delta) will trigger a teardown */ |
| 8328 | A_INT32 rssi_delta; |
| 8329 | /** TDLS Option Control |
| 8330 | * Off-Channel, Buffer STA, (later)Sleep STA support */ |
| 8331 | A_UINT32 tdls_options; |
| 8332 | /* Buffering time in number of beacon intervals */ |
| 8333 | A_UINT32 tdls_peer_traffic_ind_window; |
| 8334 | /* Wait time for PTR frame */ |
| 8335 | A_UINT32 tdls_peer_traffic_response_timeout_ms; |
| 8336 | /* Self PUAPSD mask */ |
| 8337 | A_UINT32 tdls_puapsd_mask; |
| 8338 | /* Inactivity timeout */ |
| 8339 | A_UINT32 tdls_puapsd_inactivity_time_ms; |
| 8340 | /* Max of rx frame during SP */ |
| 8341 | A_UINT32 tdls_puapsd_rx_frame_threshold; |
| 8342 | /* Duration (in ms) over which to check whether TDLS link |
| 8343 | * needs to be torn down |
| 8344 | */ |
| 8345 | A_UINT32 teardown_notification_ms; |
| 8346 | /* STA kickout threshold for TDLS peer */ |
| 8347 | A_UINT32 tdls_peer_kickout_threshold; |
| 8348 | } wmi_tdls_set_state_cmd_fixed_param; |
| 8349 | |
| 8350 | /* WMI_TDLS_PEER_UPDATE_CMDID */ |
| 8351 | |
| 8352 | enum wmi_tdls_peer_state { |
| 8353 | /** tx peer TDLS link setup now starting, traffic to DA should be |
| 8354 | * paused (except TDLS frames) until state is moved to CONNECTED (or |
| 8355 | * TEARDOWN on setup failure) */ |
| 8356 | WMI_TDLS_PEER_STATE_PEERING, |
| 8357 | /** tx peer TDLS link established, running (all traffic to DA unpaused) */ |
| 8358 | WMI_TDLS_PEER_STATE_CONNECTED, |
| 8359 | /** tx peer TDLS link tear down started (link paused, any frames |
| 8360 | * queued for DA will be requeued back through the AP)*/ |
| 8361 | WMI_TDLS_PEER_STATE_TEARDOWN, |
| 8362 | /* Add peer mac into connection table */ |
| 8363 | WMI_TDLS_PEER_ADD_MAC_ADDR, |
| 8364 | /* Remove peer mac from connection table */ |
| 8365 | WMI_TDLS_PEER_REMOVE_MAC_ADDR, |
| 8366 | }; |
| 8367 | |
| 8368 | /* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */ |
| 8369 | #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 |
| 8370 | typedef struct { |
| 8371 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */ |
| 8372 | A_UINT32 tlv_header; |
| 8373 | /* Peer's QoS Info - for U-APSD */ |
| 8374 | /* AC FLAGS - accessed through macros below */ |
| 8375 | /* Ack, SP, More Data Ack - accessed through macros below */ |
| 8376 | A_UINT32 peer_qos; |
| 8377 | /*TDLS Peer's U-APSD Buffer STA Support */ |
| 8378 | A_UINT32 buff_sta_support; |
| 8379 | /*TDLS off channel related params */ |
| 8380 | A_UINT32 off_chan_support; |
| 8381 | A_UINT32 peer_curr_operclass; |
| 8382 | A_UINT32 self_curr_operclass; |
| 8383 | /* Number of channels available for off channel operation */ |
| 8384 | A_UINT32 peer_chan_len; |
| 8385 | A_UINT32 peer_operclass_len; |
| 8386 | A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; |
| 8387 | /* Is peer initiator or responder of TDLS setup request */ |
| 8388 | A_UINT32 is_peer_responder; |
| 8389 | /* Preferred off channel number as configured by user */ |
| 8390 | A_UINT32 pref_offchan_num; |
| 8391 | /* Preferred off channel bandwidth as configured by user */ |
| 8392 | A_UINT32 pref_offchan_bw; |
| 8393 | |
| 8394 | /** Followed by the variable length TLV peer_chan_list: |
| 8395 | * wmi_channel peer_chan_list[]. |
| 8396 | * Array size would be peer_chan_len. |
| 8397 | * This array is intersected channels which is supported by both peer |
| 8398 | * and DUT. freq1 in chan_info shall be same as mhz, freq2 shall be 0. |
| 8399 | * FW shall compute BW for an offchan based on peer's ht/vht cap |
| 8400 | * received in peer_assoc cmd during change STA operation |
| 8401 | */ |
| 8402 | } wmi_tdls_peer_capabilities; |
| 8403 | |
| 8404 | #define WMI_TDLS_QOS_VO_FLAG 0 |
| 8405 | #define WMI_TDLS_QOS_VI_FLAG 1 |
| 8406 | #define WMI_TDLS_QOS_BK_FLAG 2 |
| 8407 | #define WMI_TDLS_QOS_BE_FLAG 3 |
| 8408 | #define WMI_TDLS_QOS_ACK_FLAG 4 |
| 8409 | #define WMI_TDLS_QOS_SP_FLAG 5 |
| 8410 | #define WMI_TDLS_QOS_MOREDATA_FLAG 7 |
| 8411 | |
| 8412 | #define WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps,flag) do { \ |
| 8413 | (ppeer_caps)->peer_qos |= (1 << flag); \ |
| 8414 | } while(0) |
| 8415 | #define WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps,flag) \ |
| 8416 | (((ppeer_caps)->peer_qos & (1 << flag)) >> flag) |
| 8417 | |
| 8418 | #define WMI_SET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 8419 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 8420 | #define WMI_GET_TDLS_PEER_VO_UAPSD(ppeer_caps) \ |
| 8421 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG) |
| 8422 | #define WMI_SET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 8423 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 8424 | #define WMI_GET_TDLS_PEER_VI_UAPSD(ppeer_caps) \ |
| 8425 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG) |
| 8426 | #define WMI_SET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 8427 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 8428 | #define WMI_GET_TDLS_PEER_BK_UAPSD(ppeer_caps) \ |
| 8429 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG) |
| 8430 | #define WMI_SET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 8431 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 8432 | #define WMI_GET_TDLS_PEER_BE_UAPSD(ppeer_caps) \ |
| 8433 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG) |
| 8434 | #define WMI_SET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 8435 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 8436 | #define WMI_GET_TDLS_PEER_ACK_UAPSD(ppeer_caps) \ |
| 8437 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG) |
| 8438 | /* SP has 2 bits */ |
| 8439 | #define WMI_SET_TDLS_PEER_SP_UAPSD(ppeer_caps,val) do { \ |
| 8440 | (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
| 8441 | } while(0) |
| 8442 | #define WMI_GET_TDLS_PEER_SP_UAPSD(ppeer_caps) \ |
| 8443 | (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 8444 | |
| 8445 | #define WMI_SET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 8446 | WMI_TDLS_PEER_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 8447 | #define WMI_GET_TDLS_PEER_MORE_DATA_ACK_UAPSD(ppeer_caps) \ |
| 8448 | WMI_TDLS_PEER_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 8449 | |
| 8450 | #define WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd,flag) do { \ |
| 8451 | (pset_cmd)->tdls_puapsd_mask |= (1 << flag); \ |
| 8452 | } while(0) |
| 8453 | #define WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd,flag) \ |
| 8454 | (((pset_cmd)->tdls_puapsd_mask & (1 << flag)) >> flag) |
| 8455 | |
| 8456 | #define WMI_SET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 8457 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 8458 | #define WMI_GET_TDLS_SELF_VO_UAPSD(pset_cmd) \ |
| 8459 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VO_FLAG) |
| 8460 | #define WMI_SET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 8461 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 8462 | #define WMI_GET_TDLS_SELF_VI_UAPSD(pset_cmd) \ |
| 8463 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_VI_FLAG) |
| 8464 | #define WMI_SET_TDLS_SELF_BK_UAPSD(pset_cmd) \ |
| 8465 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 8466 | #define WMI_GET_TDLS_SELF__BK_UAPSD(pset_cmd) \ |
| 8467 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BK_FLAG) |
| 8468 | #define WMI_SET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 8469 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 8470 | #define WMI_GET_TDLS_SELF_BE_UAPSD(pset_cmd) \ |
| 8471 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_BE_FLAG) |
| 8472 | #define WMI_SET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 8473 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 8474 | #define WMI_GET_TDLS_SELF_ACK_UAPSD(pset_cmd) \ |
| 8475 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_ACK_FLAG) |
| 8476 | /* SP has 2 bits */ |
| 8477 | #define WMI_SET_TDLS_SELF_SP_UAPSD(pset_cmd,val) do { \ |
| 8478 | (pset_cmd)->tdls_puapsd_mask |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \ |
| 8479 | } while(0) |
| 8480 | #define WMI_GET_TDLS_SELF_SP_UAPSD(pset_cmd) \ |
| 8481 | (((pset_cmd)->tdls_puapsd_mask & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG) |
| 8482 | |
| 8483 | #define WMI_SET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 8484 | WMI_TDLS_SELF_SET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 8485 | #define WMI_GET_TDLS_SELF_MORE_DATA_ACK_UAPSD(pset_cmd) \ |
| 8486 | WMI_TDLS_SELF_GET_QOS_FLAG(pset_cmd, WMI_TDLS_QOS_MOREDATA_FLAG) |
| 8487 | |
| 8488 | typedef struct { |
| 8489 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */ |
| 8490 | A_UINT32 tlv_header; |
| 8491 | /** unique id identifying the VDEV */ |
| 8492 | A_UINT32 vdev_id; |
| 8493 | /** peer MAC address */ |
| 8494 | wmi_mac_addr peer_macaddr; |
| 8495 | /** new TDLS state for peer (wmi_tdls_peer_state) */ |
| 8496 | A_UINT32 peer_state; |
| 8497 | /* The TLV for wmi_tdls_peer_capabilities will follow. |
| 8498 | * wmi_tdls_peer_capabilities peer_caps; |
| 8499 | */ |
| 8500 | /** Followed by the variable length TLV chan_info: |
| 8501 | * wmi_channel chan_info[] */ |
| 8502 | } wmi_tdls_peer_update_cmd_fixed_param; |
| 8503 | |
| 8504 | /* WMI_TDLS_SET_OFFCHAN_MODE_CMDID */ |
| 8505 | |
| 8506 | /* bitmap 20, 40, 80 or 160 MHz wide channel */ |
| 8507 | #define WMI_TDLS_OFFCHAN_20MHZ 0x1 /* 20 MHz wide channel */ |
| 8508 | #define WMI_TDLS_OFFCHAN_40MHZ 0x2 /* 40 MHz wide channel */ |
| 8509 | #define WMI_TDLS_OFFCHAN_80MHZ 0x4 /* 80 MHz wide channel */ |
| 8510 | #define WMI_TDLS_OFFCHAN_160MHZ 0x8 /* 160 MHz wide channel */ |
| 8511 | |
| 8512 | enum wmi_tdls_offchan_mode { |
| 8513 | WMI_TDLS_ENABLE_OFFCHANNEL, |
| 8514 | WMI_TDLS_DISABLE_OFFCHANNEL |
| 8515 | }; |
| 8516 | |
| 8517 | typedef struct { |
| 8518 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_offchan_mode_cmd_fixed_param */ |
| 8519 | A_UINT32 tlv_header; |
| 8520 | /** unique id identifying the VDEV */ |
| 8521 | A_UINT32 vdev_id; |
| 8522 | /** Enable/Disable TDLS offchannel */ |
| 8523 | A_UINT32 offchan_mode; |
| 8524 | /** peer MAC address */ |
| 8525 | wmi_mac_addr peer_macaddr; |
| 8526 | /* Is peer initiator or responder of TDLS setup request */ |
| 8527 | A_UINT32 is_peer_responder; |
| 8528 | /* off channel number */ |
| 8529 | A_UINT32 offchan_num; |
| 8530 | /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */ |
| 8531 | A_UINT32 offchan_bw_bitmap; |
| 8532 | /* operating class for offchan */ |
| 8533 | A_UINT32 offchan_oper_class; |
| 8534 | } wmi_tdls_set_offchan_mode_cmd_fixed_param; |
| 8535 | |
| 8536 | /** TDLS EVENTS */ |
| 8537 | enum wmi_tdls_peer_notification { |
| 8538 | /** tdls discovery recommended for peer (based |
| 8539 | * on tx bytes per second > tx_discover threshold) */ |
| 8540 | WMI_TDLS_SHOULD_DISCOVER, |
| 8541 | /** tdls link tear down recommended for peer |
| 8542 | * due to tx bytes per second below tx_teardown_threshold |
| 8543 | * NB: this notification sent once */ |
| 8544 | WMI_TDLS_SHOULD_TEARDOWN, |
| 8545 | /** tx peer TDLS link tear down complete */ |
| 8546 | WMI_TDLS_PEER_DISCONNECTED, |
| 8547 | }; |
| 8548 | |
| 8549 | enum wmi_tdls_peer_reason { |
| 8550 | /** tdls teardown recommended due to low transmits */ |
| 8551 | WMI_TDLS_TEARDOWN_REASON_TX, |
| 8552 | /** tdls link tear down recommended due to poor RSSI */ |
| 8553 | WMI_TDLS_TEARDOWN_REASON_RSSI, |
| 8554 | /** tdls link tear down recommended due to offchannel scan */ |
| 8555 | WMI_TDLS_TEARDOWN_REASON_SCAN, |
| 8556 | /** tdls peer disconnected due to peer deletion */ |
| 8557 | WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE, |
| 8558 | /** tdls peer disconnected due to PTR timeout */ |
| 8559 | WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT, |
| 8560 | /** tdls peer disconnected due wrong PTR format */ |
| 8561 | WMI_TDLS_TEARDOWN_REASON_BAD_PTR, |
| 8562 | /** tdls peer not responding */ |
| 8563 | WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE, |
| 8564 | }; |
| 8565 | |
| 8566 | /* WMI_TDLS_PEER_EVENTID */ |
| 8567 | typedef struct { |
| 8568 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */ |
| 8569 | A_UINT32 tlv_header; |
| 8570 | /** peer MAC address */ |
| 8571 | wmi_mac_addr peer_macaddr; |
| 8572 | /** TDLS peer status (wmi_tdls_peer_notification)*/ |
| 8573 | A_UINT32 peer_status; |
| 8574 | /** TDLS peer reason (wmi_tdls_peer_reason) */ |
| 8575 | A_UINT32 peer_reason; |
| 8576 | /** unique id identifying the VDEV */ |
| 8577 | A_UINT32 vdev_id; |
| 8578 | } wmi_tdls_peer_event_fixed_param; |
| 8579 | |
| 8580 | /* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please |
| 8581 | don't use this for any new implementations */ |
| 8582 | typedef struct { |
| 8583 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */ |
| 8584 | /** unique id identifying the VDEV, generated by the caller */ |
| 8585 | A_UINT32 vdev_id; |
| 8586 | /* New beacon interval to be used for the specified VDEV suggested by firmware */ |
| 8587 | A_UINT32 new_bcn_intvl; |
| 8588 | } wmi_vdev_mcc_bcn_intvl_change_event_fixed_param; |
| 8589 | |
| 8590 | /* WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID */ |
| 8591 | typedef struct { |
| 8592 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param */ |
| 8593 | A_UINT32 tlv_header; |
| 8594 | /** 1: enable fw based adaptive ocs, |
| 8595 | * 0: disable fw based adaptive ocs |
| 8596 | */ |
| 8597 | A_UINT32 enable; |
| 8598 | /** This field contains the MAC identifier in order to lookup the appropriate OCS instance. */ |
| 8599 | /** The valid range is 0 to (num_macs-1). */ |
| 8600 | A_UINT32 mac_id; |
| 8601 | } wmi_resmgr_adaptive_ocs_enable_disable_cmd_fixed_param; |
| 8602 | |
| 8603 | /* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */ |
| 8604 | typedef struct { |
| 8605 | /* Frequency of the channel for which the quota is set */ |
| 8606 | A_UINT32 chan_mhz; |
| 8607 | /* Requested channel time quota expressed as percentage */ |
| 8608 | A_UINT32 channel_time_quota; |
| 8609 | } wmi_resmgr_chan_time_quota; |
| 8610 | |
| 8611 | typedef struct { |
| 8612 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */ |
| 8613 | A_UINT32 tlv_header; |
| 8614 | /** number of channel time quota command structures |
| 8615 | * (wmi_resmgr_chan_time_quota) 1 or 2 |
| 8616 | */ |
| 8617 | A_UINT32 num_chans; |
| 8618 | /* This TLV is followed by another TLV of array of bytes |
| 8619 | * A_UINT8 data[]; |
| 8620 | * This data array contains |
| 8621 | * num_chans * size of(struct wmi_resmgr_chan_time_quota) |
| 8622 | */ |
| 8623 | } wmi_resmgr_set_chan_time_quota_cmd_fixed_param; |
| 8624 | |
| 8625 | /* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */ |
| 8626 | typedef struct { |
| 8627 | /* Frequency of the channel for which the latency is set */ |
| 8628 | A_UINT32 chan_mhz; |
| 8629 | /* Requested channel latency in milliseconds */ |
| 8630 | A_UINT32 latency; |
| 8631 | } wmi_resmgr_chan_latency; |
| 8632 | |
| 8633 | typedef struct { |
| 8634 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */ |
| 8635 | A_UINT32 tlv_header; |
| 8636 | /** number of channel latency command structures |
| 8637 | * (wmi_resmgr_chan_latency) 1 or 2 |
| 8638 | */ |
| 8639 | A_UINT32 num_chans; |
| 8640 | /* This TLV is followed by another TLV of array of bytes |
| 8641 | * A_UINT8 data[]; |
| 8642 | * This data array contains |
| 8643 | * num_chans * size of(struct wmi_resmgr_chan_latency) |
| 8644 | */ |
| 8645 | } wmi_resmgr_set_chan_latency_cmd_fixed_param; |
| 8646 | |
| 8647 | /* WMI_STA_SMPS_FORCE_MODE_CMDID */ |
| 8648 | |
| 8649 | /** STA SMPS Forced Mode */ |
| 8650 | typedef enum { |
| 8651 | WMI_SMPS_FORCED_MODE_NONE = 0, |
| 8652 | WMI_SMPS_FORCED_MODE_DISABLED, |
| 8653 | WMI_SMPS_FORCED_MODE_STATIC, |
| 8654 | WMI_SMPS_FORCED_MODE_DYNAMIC |
| 8655 | } wmi_sta_smps_forced_mode; |
| 8656 | |
| 8657 | typedef struct { |
| 8658 | /** TLV tag and len; tag equals |
| 8659 | * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */ |
| 8660 | A_UINT32 tlv_header; |
| 8661 | /** Unique id identifying the VDEV */ |
| 8662 | A_UINT32 vdev_id; |
| 8663 | /** The mode of SMPS that is to be forced in the FW. */ |
| 8664 | A_UINT32 forced_mode; |
| 8665 | } wmi_sta_smps_force_mode_cmd_fixed_param; |
| 8666 | |
| 8667 | /** wlan HB commands */ |
| 8668 | #define WMI_WLAN_HB_ITEM_UDP 0x1 |
| 8669 | #define WMI_WLAN_HB_ITEM_TCP 0x2 |
| 8670 | #define WMI_WLAN_HB_MAX_FILTER_SIZE 32 /* should be equal to WLAN_HB_MAX_FILTER_SIZE, must be a multiple of 4 bytes */ |
| 8671 | |
| 8672 | typedef struct { |
| 8673 | /** TLV tag and len; tag equals |
| 8674 | * WMITLV_TAG_STRUC_wmi_hb_set_enable_cmd_fixed_param */ |
| 8675 | A_UINT32 tlv_header; |
| 8676 | A_UINT32 vdev_id; |
| 8677 | A_UINT32 enable; |
| 8678 | A_UINT32 item; |
| 8679 | A_UINT32 session; |
| 8680 | } wmi_hb_set_enable_cmd_fixed_param; |
| 8681 | |
| 8682 | typedef struct { |
| 8683 | /** TLV tag and len; tag equals |
| 8684 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_params_cmd_fixed_param */ |
| 8685 | A_UINT32 tlv_header; |
| 8686 | A_UINT32 vdev_id; |
| 8687 | A_UINT32 srv_ip; |
| 8688 | A_UINT32 dev_ip; |
| 8689 | A_UINT32 seq; |
| 8690 | A_UINT32 src_port; |
| 8691 | A_UINT32 dst_port; |
| 8692 | A_UINT32 interval; |
| 8693 | A_UINT32 timeout; |
| 8694 | A_UINT32 session; |
| 8695 | wmi_mac_addr gateway_mac; |
| 8696 | } wmi_hb_set_tcp_params_cmd_fixed_param; |
| 8697 | |
| 8698 | typedef struct { |
| 8699 | /** TLV tag and len; tag equals |
| 8700 | * WMITLV_TAG_STRUC_wmi_hb_set_tcp_pkt_filter_cmd_fixed_param */ |
| 8701 | A_UINT32 tlv_header; |
| 8702 | A_UINT32 vdev_id; |
| 8703 | A_UINT32 length; |
| 8704 | A_UINT32 offset; |
| 8705 | A_UINT32 session; |
| 8706 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 8707 | } wmi_hb_set_tcp_pkt_filter_cmd_fixed_param; |
| 8708 | |
| 8709 | typedef struct { |
| 8710 | /** TLV tag and len; tag equals |
| 8711 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_params_cmd_fixed_param */ |
| 8712 | A_UINT32 tlv_header; |
| 8713 | A_UINT32 vdev_id; |
| 8714 | A_UINT32 srv_ip; |
| 8715 | A_UINT32 dev_ip; |
| 8716 | A_UINT32 src_port; |
| 8717 | A_UINT32 dst_port; |
| 8718 | A_UINT32 interval; |
| 8719 | A_UINT32 timeout; |
| 8720 | A_UINT32 session; |
| 8721 | wmi_mac_addr gateway_mac; |
| 8722 | } wmi_hb_set_udp_params_cmd_fixed_param; |
| 8723 | |
| 8724 | typedef struct { |
| 8725 | /** TLV tag and len; tag equals |
| 8726 | * WMITLV_TAG_STRUC_wmi_hb_set_udp_pkt_filter_cmd_fixed_param */ |
| 8727 | A_UINT32 tlv_header; |
| 8728 | A_UINT32 vdev_id; |
| 8729 | A_UINT32 length; |
| 8730 | A_UINT32 offset; |
| 8731 | A_UINT32 session; |
| 8732 | A_UINT8 filter[WMI_WLAN_HB_MAX_FILTER_SIZE]; |
| 8733 | } wmi_hb_set_udp_pkt_filter_cmd_fixed_param; |
| 8734 | |
| 8735 | /** wlan HB events */ |
| 8736 | typedef enum { |
| 8737 | WMI_WLAN_HB_REASON_UNKNOWN = 0, |
| 8738 | WMI_WLAN_HB_REASON_TCP_TIMEOUT = 1, |
| 8739 | WMI_WLAN_HB_REASON_UDP_TIMEOUT = 2, |
| 8740 | } WMI_HB_WAKEUP_REASON; |
| 8741 | |
| 8742 | typedef struct { |
| 8743 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_hb_ind_event_fixed_param */ |
| 8744 | A_UINT32 vdev_id; /* unique id identifying the VDEV */ |
| 8745 | A_UINT32 session; /* Session ID from driver */ |
| 8746 | A_UINT32 reason; /* wakeup reason */ |
| 8747 | } wmi_hb_ind_event_fixed_param; |
| 8748 | |
| 8749 | /** WMI_STA_SMPS_PARAM_CMDID */ |
| 8750 | typedef enum { |
| 8751 | /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */ |
| 8752 | WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0, |
| 8753 | /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or |
| 8754 | * to enter D-SMPS mode from Stalled-D-SMPS mode */ |
| 8755 | WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1, |
| 8756 | /** RSSI threshold to disable SMPS modes */ |
| 8757 | WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2, |
| 8758 | /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */ |
| 8759 | WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3, |
| 8760 | /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */ |
| 8761 | WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4, |
| 8762 | /** Enable/Disable DTIM 1chRx feature */ |
| 8763 | WMI_STA_SMPS_PARAM_DTIM_1CHRX_ENABLE = 5 |
| 8764 | } wmi_sta_smps_param; |
| 8765 | |
| 8766 | typedef struct { |
| 8767 | /** TLV tag and len; tag equals |
| 8768 | * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */ |
| 8769 | A_UINT32 tlv_header; |
| 8770 | /** Unique id identifying the VDEV */ |
| 8771 | A_UINT32 vdev_id; |
| 8772 | /** SMPS parameter (see wmi_sta_smps_param) */ |
| 8773 | A_UINT32 param; |
| 8774 | /** Value of SMPS parameter */ |
| 8775 | A_UINT32 value; |
| 8776 | } wmi_sta_smps_param_cmd_fixed_param; |
| 8777 | |
| 8778 | typedef struct { |
| 8779 | /** TLV tag and len; tag equals |
| 8780 | * WMITLV_TAG_STRUC_wmi_mcc_sched_sta_traffic_stats */ |
| 8781 | A_UINT32 tlv_header; |
| 8782 | /* TX stats */ |
| 8783 | A_UINT32 txBytesPushed; |
| 8784 | A_UINT32 txPacketsPushed; |
| 8785 | /* RX stats */ |
| 8786 | A_UINT32 rxBytesRcvd; |
| 8787 | A_UINT32 rxPacketsRcvd; |
| 8788 | A_UINT32 rxTimeTotal; |
| 8789 | /** peer MAC address */ |
| 8790 | wmi_mac_addr peer_macaddr; |
| 8791 | } wmi_mcc_sched_sta_traffic_stats; |
| 8792 | |
| 8793 | typedef struct { |
| 8794 | /** TLV tag and len; tag equals |
| 8795 | * WMITLV_TAG_STRUC_wmi_mcc_sched_traffic_stats_cmd_fixed_param */ |
| 8796 | A_UINT32 tlv_header; |
| 8797 | /** Duration over which the host stats were collected */ |
| 8798 | A_UINT32 duration; |
| 8799 | /** Number of stations filled in following stats array */ |
| 8800 | A_UINT32 num_sta; |
| 8801 | /* Following this struct are the TLVs: |
| 8802 | * wmi_mcc_sched_sta_traffic_stats mcc_sched_sta_traffic_stats_list; |
| 8803 | */ |
| 8804 | } wmi_mcc_sched_traffic_stats_cmd_fixed_param; |
| 8805 | |
| 8806 | typedef struct { |
| 8807 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enable_cmd_fixed_param */ |
| 8808 | /* unique id identifying the VDEV, generated by the caller */ |
| 8809 | A_UINT32 vdev_id; |
| 8810 | /*Batch scan enable command parameters */ |
| 8811 | A_UINT32 scanInterval; |
| 8812 | A_UINT32 numScan2Batch; |
| 8813 | A_UINT32 bestNetworks; |
| 8814 | A_UINT32 rfBand; |
| 8815 | A_UINT32 rtt; |
| 8816 | } wmi_batch_scan_enable_cmd_fixed_param; |
| 8817 | |
| 8818 | typedef struct { |
| 8819 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_enabled_event_fixed_param */ |
| 8820 | A_UINT32 supportedMscan; |
| 8821 | } wmi_batch_scan_enabled_event_fixed_param; |
| 8822 | |
| 8823 | typedef struct { |
| 8824 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_disable_cmd_fixed_param */ |
| 8825 | /* unique id identifying the VDEV, generated by the caller */ |
| 8826 | A_UINT32 vdev_id; |
| 8827 | A_UINT32 param; |
| 8828 | } wmi_batch_scan_disable_cmd_fixed_param; |
| 8829 | |
| 8830 | typedef struct { |
| 8831 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_batch_scan_trigger_result_cmd_fixed_param */ |
| 8832 | /** unique id identifying the VDEV, generated by the caller */ |
| 8833 | A_UINT32 vdev_id; |
| 8834 | A_UINT32 param; |
| 8835 | } wmi_batch_scan_trigger_result_cmd_fixed_param; |
| 8836 | |
| 8837 | typedef struct { |
| 8838 | A_UINT32 tlv_header; |
| 8839 | wmi_mac_addr bssid; /* BSSID */ |
| 8840 | wmi_ssid ssid; /* SSID */ |
| 8841 | A_UINT32 ch; /* Channel */ |
| 8842 | A_UINT32 rssi; /* RSSI or Level */ |
| 8843 | /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */ |
| 8844 | A_UINT32 timestamp; |
| 8845 | } wmi_batch_scan_result_network_info; |
| 8846 | |
| 8847 | typedef struct { |
| 8848 | A_UINT32 tlv_header; |
| 8849 | A_UINT32 scanId; /* Scan List ID. */ |
| 8850 | /* No of AP in a Scan Result. Should be same as bestNetwork in SET_REQ msg */ |
| 8851 | A_UINT32 numNetworksInScanList; |
| 8852 | A_UINT32 netWorkStartIndex; /* indicate the start index of network info */ |
| 8853 | } wmi_batch_scan_result_scan_list; |
| 8854 | |
| 8855 | #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.*/ |
| 8856 | #define LPI_IE_BITMAP_IS_PROBE 0x00000002 /*send true or false based on scan response frame being a Probe Rsp or not*/ |
| 8857 | #define LPI_IE_BITMAP_SSID 0x00000004 /*send ssid from received scan response frame*/ |
| 8858 | #define LPI_IE_BITMAP_RSSI 0x00000008 /* end RSSI value reported by HW for the received scan response after adjusting with noise floor*/ |
| 8859 | #define LPI_IE_BITMAP_CHAN 0x00000010 /*send channel number from the received scan response*/ |
| 8860 | #define LPI_IE_BITMAP_AP_TX_PWR 0x00000020 /* sen Tx power from TPC IE of scan rsp*/ |
| 8861 | #define LPI_IE_BITMAP_TX_RATE 0x00000040 /*send rate of the received frame as reported by HW.*/ |
| 8862 | #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.*/ |
| 8863 | #define LPI_IE_BITMAP_TSF_TIMER_VALUE 0x00000100 /*send timestamp reported in the received scan rsp frame.*/ |
| 8864 | #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.*/ |
| 8865 | /* |
| 8866 | * TEMPORARY alias of incorrect old name the correct name. |
| 8867 | * This alias will be removed once all references to the old name have been fixed. |
| 8868 | */ |
| 8869 | #define LPI_IE_BITMAP_AGE_OF_MESAUREMENT LPI_IE_BITMAP_AGE_OF_MEASUREMENT |
| 8870 | #define LPI_IE_BITMAP_CONN_STATUS 0x00000400 /* If an infra STA is active and connected to an AP, true value is sent else false.*/ |
| 8871 | #define LPI_IE_BITMAP_MSAP_IE 0x00000800 /* info on the vendor specific proprietary IE MSAP*/ |
| 8872 | #define LPI_IE_BITMAP_SEC_STATUS 0x00001000 /* we indicate true or false based on if the AP has WPA or RSN security enabled*/ |
| 8873 | #define LPI_IE_BITMAP_DEVICE_TYPE 0x00002000 /* info about the beacons coming from an AP or P2P or NAN device.*/ |
| 8874 | #define LPI_IE_BITMAP_CHAN_IS_PASSIVE 0x00004000 /* info on whether the scan rsp was received from a passive channel*/ |
| 8875 | #define LPI_IE_BITMAP_DWELL_TIME 0x00008000 /* send the scan dwell time of the channel on which the current scan rsp frame was received.*/ |
| 8876 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ1 0x00010000 /* the center frequencies in case AP is supporting wider channels than 20 MHz*/ |
| 8877 | #define LPI_IE_BITMAP_BAND_CENTER_FREQ2 0x00020000 /* same as above*/ |
| 8878 | #define LPI_IE_BITMAP_PHY_MODE 0x00040000 /* PHY mode indicates a, b, ,g, ac and other combinations*/ |
| 8879 | #define LPI_IE_BITMAP_SCAN_MODULE_ID 0x00080000 /* scan module id indicates the scan client who originated the scan*/ |
| 8880 | #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.*/ |
| 8881 | #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*/ |
| 8882 | #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*/ |
| 8883 | #define LPI_IE_BITMAP_ALL 0xFFFFFFFF |
| 8884 | |
| 8885 | typedef struct { |
| 8886 | A_UINT32 tlv_header; |
| 8887 | /**A_BOOL indicates LPI mgmt snooping enable/disable*/ |
| 8888 | A_UINT32 enable; |
| 8889 | /**LPI snooping mode*/ |
| 8890 | A_UINT32 snooping_mode; |
| 8891 | /** LPI interested IEs in snooping context */ |
| 8892 | A_UINT32 ie_bitmap; |
| 8893 | } wmi_lpi_mgmt_snooping_config_cmd_fixed_param; |
| 8894 | |
| 8895 | typedef struct { |
| 8896 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param */ |
| 8897 | /** Scan ID */ |
| 8898 | A_UINT32 scan_id; |
| 8899 | /** Scan requestor ID */ |
| 8900 | A_UINT32 scan_req_id; |
| 8901 | /** VDEV id(interface) that is requesting scan */ |
| 8902 | A_UINT32 vdev_id; |
| 8903 | /** LPI interested IEs in scan context */ |
| 8904 | A_UINT32 ie_bitmap; |
| 8905 | /** Scan Priority, input to scan scheduler */ |
| 8906 | A_UINT32 scan_priority; |
| 8907 | /** dwell time in msec on active channels */ |
| 8908 | A_UINT32 dwell_time_active; |
| 8909 | /** dwell time in msec on passive channels */ |
| 8910 | A_UINT32 dwell_time_passive; |
| 8911 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 8912 | A_UINT32 min_rest_time; |
| 8913 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 8914 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 8915 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 8916 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 8917 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 8918 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 8919 | */ |
| 8920 | A_UINT32 max_rest_time; |
| 8921 | /** time before sending next set of probe requests. |
| 8922 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 8923 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 8924 | */ |
| 8925 | A_UINT32 repeat_probe_time; |
| 8926 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 8927 | A_UINT32 probe_spacing_time; |
| 8928 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 8929 | A_UINT32 idle_time; |
| 8930 | /** maximum time in msec allowed for scan */ |
| 8931 | A_UINT32 max_scan_time; |
| 8932 | /** delay in msec before sending first probe request after switching to a channel */ |
| 8933 | A_UINT32 probe_delay; |
| 8934 | /** Scan control flags */ |
| 8935 | A_UINT32 scan_ctrl_flags; |
| 8936 | /** Burst duration time in msec*/ |
| 8937 | A_UINT32 burst_duration; |
| 8938 | |
| 8939 | /** # if channels to scan. In the TLV channel_list[] */ |
| 8940 | A_UINT32 num_chan; |
| 8941 | /** number of bssids. In the TLV bssid_list[] */ |
| 8942 | A_UINT32 num_bssid; |
| 8943 | /** number of ssid. In the TLV ssid_list[] */ |
| 8944 | A_UINT32 num_ssids; |
| 8945 | /** number of bytes in ie data. In the TLV ie_data[] */ |
| 8946 | A_UINT32 ie_len; |
| 8947 | |
| 8948 | /** |
| 8949 | * TLV (tag length value ) parameters follow the scan_cmd |
| 8950 | * structure. The TLV's are: |
| 8951 | * A_UINT32 channel_list[]; |
| 8952 | * wmi_ssid ssid_list[]; |
| 8953 | * wmi_mac_addr bssid_list[]; |
| 8954 | * A_UINT8 ie_data[]; |
| 8955 | */ |
| 8956 | } wmi_lpi_start_scan_cmd_fixed_param; |
| 8957 | |
| 8958 | typedef struct { |
| 8959 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */ |
| 8960 | /** Scan requestor ID */ |
| 8961 | A_UINT32 scan_req_id; |
| 8962 | /** Scan ID */ |
| 8963 | A_UINT32 scan_id; |
| 8964 | /** |
| 8965 | * Req Type |
| 8966 | * req_type should be WMI_SCAN_STOP_ONE, WMI_SCN_STOP_VAP_ALL or WMI_SCAN_STOP_ALL |
| 8967 | * WMI_SCAN_STOP_ONE indicates to stop a specific scan with scan_id |
| 8968 | * WMI_SCN_STOP_VAP_ALL indicates to stop all scan requests on a specific vDev with vdev_id |
| 8969 | * WMI_SCAN_STOP_ALL indicates to stop all scan requests in both Scheduler's queue and Scan Engine |
| 8970 | */ |
| 8971 | A_UINT32 req_type; |
| 8972 | /** |
| 8973 | * vDev ID |
| 8974 | * used when req_type equals to WMI_SCN_STOP_VAP_ALL, it indexed the vDev on which to stop the scan |
| 8975 | */ |
| 8976 | A_UINT32 vdev_id; |
| 8977 | } wmi_lpi_stop_scan_cmd_fixed_param; |
| 8978 | |
| 8979 | typedef enum { |
| 8980 | WMI_LPI_DEVICE_TYPE_AP = 1, |
| 8981 | WMI_LPI_DEVICE_TYPE_P2P = 2, |
| 8982 | WMI_LPI_DEVICE_TYPE_NAN = 3, |
| 8983 | } wmi_lpi_device_type; |
| 8984 | |
| 8985 | typedef struct { |
| 8986 | A_UINT32 tlv_header; |
| 8987 | /** Scan requestor ID */ |
| 8988 | A_UINT32 scan_req_id; |
| 8989 | A_UINT32 ie_bitmap; |
| 8990 | A_UINT32 data_len; |
| 8991 | } wmi_lpi_result_event_fixed_param; |
| 8992 | |
| 8993 | typedef enum { |
| 8994 | /** User scan Request completed */ |
| 8995 | WMI_LPI_STATUS_SCAN_REQ_COMPLED = 0, |
| 8996 | /** User Request was never serviced */ |
| 8997 | WMI_LPI_STATUS_DROPPED_REQ = 1, |
| 8998 | /** Illegal channel Req */ |
| 8999 | WMI_LPI_STATUS_ILLEGAL_CHAN_REQ = 2, |
| 9000 | /** Illegal Operation Req */ |
| 9001 | WMI_LPI_STATUS_ILLEGAL_OPER_REQ = 3, |
| 9002 | /** Request Aborted */ |
| 9003 | WMI_LPI_STATUS_REQ_ABORTED = 4, |
| 9004 | /** Request Timed Out */ |
| 9005 | WMI_LPI_STATUS_REQ_TIME_OUT = 5, |
| 9006 | /** Medium Busy, already there |
| 9007 | * is a scan is going on */ |
| 9008 | WMI_LPI_STATUS_MEDIUM_BUSY = 6, |
| 9009 | /* Extscan is the scan client whose scan complete event is triggered */ |
| 9010 | WMI_LPI_STATUS_EXTSCAN_CYCLE_AND_SCAN_REQ_COMPLETED = 7, |
| 9011 | } wmi_lpi_staus; |
| 9012 | |
| 9013 | typedef struct { |
| 9014 | A_UINT32 tlv_header; |
| 9015 | wmi_lpi_staus status; |
| 9016 | /** Scan requestor ID */ |
| 9017 | A_UINT32 scan_req_id; |
| 9018 | } wmi_lpi_status_event_fixed_param; |
| 9019 | |
| 9020 | typedef struct { |
| 9021 | A_UINT32 tlv_header; |
| 9022 | wmi_mac_addr bssid; |
| 9023 | wmi_ssid ssid; |
| 9024 | A_UINT32 freq; |
| 9025 | A_UINT32 rssi; |
| 9026 | A_UINT32 vdev_id; |
| 9027 | } wmi_lpi_handoff_event_fixed_param; |
| 9028 | |
| 9029 | typedef struct { |
| 9030 | A_UINT32 tlv_header; |
| 9031 | A_UINT32 timestamp; /*timestamp of batch scan event */ |
| 9032 | A_UINT32 numScanLists; /*number of scan in this event */ |
| 9033 | A_UINT32 isLastResult; /*is this event a last event of the whole batch scan */ |
| 9034 | } wmi_batch_scan_result_event_fixed_param; |
| 9035 | |
| 9036 | typedef struct { |
| 9037 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_noa_event_fixed_param */ |
| 9038 | A_UINT32 vdev_id; |
| 9039 | /* This TLV is followed by p2p_noa_info for vdev : |
| 9040 | * wmi_p2p_noa_info p2p_noa_info; |
| 9041 | */ |
| 9042 | } wmi_p2p_noa_event_fixed_param; |
| 9043 | |
| 9044 | #define WMI_RFKILL_CFG_RADIO_LEVEL_OFFSET 6 |
| 9045 | #define WMI_RFKILL_CFG_RADIO_LEVEL_MASK 0x1 |
| 9046 | |
| 9047 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 9048 | #define WMI_RFKILL_CFG_GPIO_PIN_NUM_MASK 0x3f |
| 9049 | |
| 9050 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_OFFSET 7 |
| 9051 | #define WMI_RFKILL_CFG_PIN_AS_GPIO_MASK 0xf |
| 9052 | |
| 9053 | typedef struct { |
| 9054 | /** TLV tag and len; tag equals |
| 9055 | * */ |
| 9056 | A_UINT32 tlv_header; |
| 9057 | /** gpip pin number */ |
| 9058 | A_UINT32 gpio_pin_num; |
| 9059 | /** gpio interupt type */ |
| 9060 | A_UINT32 int_type; |
| 9061 | /** RF radio status */ |
| 9062 | A_UINT32 radio_state; |
| 9063 | } wmi_rfkill_mode_param; |
| 9064 | |
| 9065 | typedef enum { |
| 9066 | WMI_SET_LED_SYS_POWEROFF, |
| 9067 | WMI_SET_LED_SYS_S3_SUSPEND, |
| 9068 | WMI_SET_LED_SYS_S4_S5, |
| 9069 | WMI_SET_LED_SYS_DRIVER_DISABLE, |
| 9070 | WMI_SET_LED_SYS_WAKEUP, |
| 9071 | WMI_SET_LED_SYS_ALWAYS_ON, /* just for test! */ |
| 9072 | WMI_SET_LED_SYS_POWERON, |
| 9073 | } wmi_led_sys_state_param; |
| 9074 | |
| 9075 | typedef enum { |
| 9076 | WMI_CONFIG_LED_TO_VDD = 0, |
| 9077 | WMI_CONFIG_LED_TO_GND = 1, |
| 9078 | } wmi_config_led_connect_type; |
| 9079 | |
| 9080 | typedef enum { |
| 9081 | WMI_CONFIG_LED_NOT_WITH_BT = 0, |
| 9082 | WMI_CONFIG_LED_WITH_BT = 1, |
| 9083 | } wmi_config_led_with_bt_flag; |
| 9084 | |
| 9085 | typedef enum { |
| 9086 | WMI_CONFIG_LED_DISABLE = 0, |
| 9087 | WMI_CONFIG_LED_ENABLE = 1, |
| 9088 | } wmi_config_led_enable_flag; |
| 9089 | |
| 9090 | typedef struct { |
| 9091 | /** TLV tag and len; tag equals |
| 9092 | * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */ |
| 9093 | A_UINT32 tlv_header; |
| 9094 | /* Set GPIO pin */ |
| 9095 | A_UINT32 led_gpio_pin; |
| 9096 | /* Set connect type defined in wmi_config_led_connect_type */ |
| 9097 | A_UINT32 connect_type; |
| 9098 | /* Set flag defined in wmi_config_led_with_bt_flag */ |
| 9099 | A_UINT32 with_bt; |
| 9100 | /* Set LED enablement defined in wmi_config_led_enable_flag */ |
| 9101 | A_UINT32 led_enable; |
| 9102 | } wmi_pdev_set_led_config_cmd_fixed_param; |
| 9103 | |
| 9104 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_OFFSET 0 |
| 9105 | #define WMI_WNTS_CFG_GPIO_PIN_NUM_MASK 0xff |
| 9106 | |
| 9107 | /** WMI_PEER_INFO_REQ_CMDID |
| 9108 | * Request FW to provide peer info */ |
| 9109 | typedef struct { |
| 9110 | /** TLV tag and len; tag equals |
| 9111 | * WMITLV_TAG_STRUC_wmi_peer_info_req_cmd_fixed_param */ |
| 9112 | A_UINT32 tlv_header; |
| 9113 | /** In order to get the peer info for a single peer, host shall |
| 9114 | * issue the peer_mac_address of that peer. For getting the |
| 9115 | * info all peers, the host shall issue 0xFFFFFFFF as the mac |
| 9116 | * address. The firmware will return the peer info for all the |
| 9117 | * peers on the specified vdev_id */ |
| 9118 | wmi_mac_addr peer_mac_address; |
| 9119 | /** vdev id */ |
| 9120 | A_UINT32 vdev_id; |
| 9121 | } wmi_peer_info_req_cmd_fixed_param; |
| 9122 | |
| 9123 | typedef struct { |
| 9124 | /** TLV tag and len; tag equals |
| 9125 | * WMITLV_TAG_STRUC_wmi_peer_info */ |
| 9126 | A_UINT32 tlv_header; |
| 9127 | /** mac addr of the peer */ |
| 9128 | wmi_mac_addr peer_mac_address; |
| 9129 | /** data_rate of the peer */ |
| 9130 | A_UINT32 data_rate; |
| 9131 | /** rssi of the peer */ |
| 9132 | A_UINT32 rssi; |
| 9133 | /** tx fail count */ |
| 9134 | A_UINT32 tx_fail_cnt; |
| 9135 | } wmi_peer_info; |
| 9136 | |
| 9137 | /** FW response with the peer info */ |
| 9138 | typedef struct { |
| 9139 | /** TLV tag and len; tag equals |
| 9140 | * WMITLV_TAG_STRUC_wmi_peer_info_event_fixed_param */ |
| 9141 | A_UINT32 tlv_header; |
| 9142 | /** number of peers in peer_info */ |
| 9143 | A_UINT32 num_peers; |
| 9144 | /* This TLV is followed by another TLV of array of structs |
| 9145 | * wmi_peer_info peer_info[]; |
| 9146 | */ |
| 9147 | } wmi_peer_info_event_fixed_param; |
| 9148 | |
| 9149 | /** FW response when tx failure count has reached threshold |
| 9150 | * for a peer */ |
| 9151 | typedef struct { |
| 9152 | /** TLV tag and len; tag equals |
| 9153 | * WMITLV_TAG_STRUC_wmi_peer_tx_fail_cnt_thr_event_fixed_param */ |
| 9154 | A_UINT32 tlv_header; |
| 9155 | /** vdev id*/ |
| 9156 | A_UINT32 vdev_id; |
| 9157 | /** mac address */ |
| 9158 | wmi_mac_addr peer_mac_address; |
| 9159 | /** tx failure count- will eventually be removed and not used * */ |
| 9160 | A_UINT32 tx_fail_cnt; |
| 9161 | /** seq number of the nth tx_fail_event */ |
| 9162 | A_UINT32 seq_no; |
| 9163 | } wmi_peer_tx_fail_cnt_thr_event_fixed_param; |
| 9164 | |
| 9165 | enum wmi_rmc_mode { |
| 9166 | /** Disable RMC */ |
| 9167 | WMI_RMC_MODE_DISABLED = 0, |
| 9168 | /** Enable RMC */ |
| 9169 | WMI_RMC_MODE_ENABLED = 1, |
| 9170 | }; |
| 9171 | |
| 9172 | /** Enable RMC transmitter functionality. Upon |
| 9173 | * receiving this, the FW shall mutlicast frames with |
| 9174 | * reliablity. This is a vendor |
| 9175 | * proprietary feature. */ |
| 9176 | typedef struct { |
| 9177 | /** TLV tag and len; tag equals |
| 9178 | * WMITLV_TAG_STRUC_wmi_rmc_set_mode_cmd_fixed_param */ |
| 9179 | A_UINT32 tlv_header; |
| 9180 | /** vdev id*/ |
| 9181 | A_UINT32 vdev_id; |
| 9182 | /** enable_rmc contains values from enum wmi_rmc_mode; |
| 9183 | * Default value: 0 (disabled) */ |
| 9184 | A_UINT32 enable_rmc; |
| 9185 | } wmi_rmc_set_mode_cmd_fixed_param; |
| 9186 | |
| 9187 | /** Configure transmission periodicity of action frames in a |
| 9188 | * RMC network for the multicast transmitter */ |
| 9189 | typedef struct { |
| 9190 | /** TLV tag and len; tag equals |
| 9191 | * WMITLV_TAG_STRUC_wmi_rmc_set_action_period_cmd_fixed_param */ |
| 9192 | A_UINT32 tlv_header; |
| 9193 | /** vdev id */ |
| 9194 | A_UINT32 vdev_id; |
| 9195 | /** time period in milliseconds. Default: 300 ms. |
| 9196 | An action frame indicating the current leader is transmitted by the |
| 9197 | RMC transmitter once every 'periodity_msec' */ |
| 9198 | A_UINT32 periodicity_msec; |
| 9199 | } wmi_rmc_set_action_period_cmd_fixed_param; |
| 9200 | |
| 9201 | /** Optimise Leader selection process in RMC functionality. For |
| 9202 | * Enhancement/Debug purposes only */ |
| 9203 | typedef struct { |
| 9204 | /** TLV tag and len; tag equals |
| 9205 | * WMITLV_TAG_STRUC_wmi_rmc_config_cmd_fixed_param */ |
| 9206 | A_UINT32 tlv_header; |
| 9207 | /** vdev id */ |
| 9208 | A_UINT32 vdev_id; |
| 9209 | /** flags :: |
| 9210 | * 0x0001 - Enable beacon averaging |
| 9211 | * 0x0002 - Force leader selection |
| 9212 | * 0x0004 - Enable Timer based leader switch |
| 9213 | * 0x0008 - Use qos/NULL based for multicast reliability */ |
| 9214 | A_UINT32 flags; |
| 9215 | /** control leader change timeperiod (in seconds) */ |
| 9216 | A_UINT32 peridocity_leader_switch; |
| 9217 | /** control activity timeout value for data rx (in seconds) */ |
| 9218 | A_UINT32 data_activity_timeout; |
| 9219 | /** mac address of leader */ |
| 9220 | wmi_mac_addr forced_leader_mac_addr; |
| 9221 | } wmi_rmc_config_cmd_fixed_param; |
| 9222 | |
| 9223 | /** MHF is generally implemented in |
| 9224 | * the kernel. To decrease system power consumption, the |
| 9225 | * driver can enable offloading this to the chipset. In |
| 9226 | * order for the offload, the firmware needs the routing table. |
| 9227 | * The host shall plumb the routing table into FW. The firmware |
| 9228 | * shall perform an IP address lookup and forward the packet to |
| 9229 | * the next hop using next hop's mac address. This is a vendor |
| 9230 | * proprietary feature. */ |
| 9231 | enum wmi_mhf_ofl_mode { |
| 9232 | /** Disable MHF offload */ |
| 9233 | WMI_MHF_OFL_MODE_DISABLED = 0, |
| 9234 | /** Enable MHF offload */ |
| 9235 | WMI_MHF_OFL_MODE_ENABLED = 1, |
| 9236 | }; |
| 9237 | |
| 9238 | typedef struct { |
| 9239 | /** TLV tag and len; tag equals |
| 9240 | * WMITLV_TAG_STRUC_wmi_mhf_offload_set_mode_cmd_fixed_param */ |
| 9241 | A_UINT32 tlv_header; |
| 9242 | /** vdev id*/ |
| 9243 | A_UINT32 vdev_id; |
| 9244 | /** enable_mhf_ofl contains values from enum |
| 9245 | * wmi_mhf_ofl_mode; Default value: 0 (disabled) */ |
| 9246 | A_UINT32 enable_mhf_ofl; |
| 9247 | } wmi_mhf_offload_set_mode_cmd_fixed_param; |
| 9248 | |
| 9249 | enum wmi_mhf_ofl_table_action { |
| 9250 | /** Create forwarding offload table in FW */ |
| 9251 | WMI_MHF_OFL_TBL_CREATE = 0, |
| 9252 | /** Append to existing MHF offload table */ |
| 9253 | WMI_MHF_OFL_TBL_APPEND = 1, |
| 9254 | /** Flush entire MHF offload table in FW */ |
| 9255 | WMI_MHF_OFL_TBL_FLUSH = 2, |
| 9256 | }; |
| 9257 | |
| 9258 | typedef struct { |
| 9259 | /** TLV tag and len; tag equals |
| 9260 | * WMITLV_TAG_STRUC_wmi_mhf_offload_plumb_routing_table_cmd_fixed_param */ |
| 9261 | A_UINT32 tlv_header; |
| 9262 | /** vdev id*/ |
| 9263 | A_UINT32 vdev_id; |
| 9264 | /** action corresponds to values from enum |
| 9265 | * wmi_mhf_ofl_table_action */ |
| 9266 | A_UINT32 action; |
| 9267 | /** number of entries in the table */ |
| 9268 | A_UINT32 num_entries; |
| 9269 | /** Followed by the variable length TLV |
| 9270 | * wmi_mhf_offload_routing_table_entry entries[] */ |
| 9271 | } wmi_mhf_offload_plumb_routing_table_cmd; |
| 9272 | |
| 9273 | typedef struct { |
| 9274 | /** TLV tag and len; tag equals |
| 9275 | * WMITLV_TAG_STRUC_wmi_mhf_offload_routing_table_entry */ |
| 9276 | A_UINT32 tlv_header; |
| 9277 | /** Destination node's IP address */ |
| 9278 | WMI_IPV4_ADDR dest_ipv4_addr; |
| 9279 | /** Next hop node's MAC address */ |
| 9280 | wmi_mac_addr next_hop_mac_addr; |
| 9281 | } wmi_mhf_offload_routing_table_entry; |
| 9282 | |
| 9283 | typedef struct { |
| 9284 | /** tlv tag and len, tag equals |
| 9285 | * WMITLV_TAG_STRUC_wmi_dfs_radar_event */ |
| 9286 | A_UINT32 tlv_header; |
| 9287 | |
| 9288 | /** full 64 tsf timestamp get from MAC tsf timer indicates |
| 9289 | * the time that the radar event uploading to host, split |
| 9290 | * it to high 32 bit and lower 32 bit in fulltsf_high and |
| 9291 | * full_tsf_low |
| 9292 | */ |
| 9293 | A_UINT32 upload_fullts_low; |
| 9294 | A_UINT32 upload_fullts_high; |
| 9295 | |
| 9296 | /** timestamp indicates the time when DFS pulse is detected |
| 9297 | * equal to ppdu_end_ts - radar_pusle_summary_ts_offset |
| 9298 | */ |
| 9299 | A_UINT32 pulse_detect_ts; |
| 9300 | |
| 9301 | /** the duaration of the pulse in us */ |
| 9302 | A_UINT32 pulse_duration; |
| 9303 | |
| 9304 | /** the center frequency of the radar pulse detected, KHz */ |
| 9305 | A_UINT32 pulse_center_freq; |
| 9306 | |
| 9307 | /** bandwidth of current DFS channel, MHz */ |
| 9308 | A_UINT32 ch_bandwidth; |
| 9309 | |
| 9310 | /** center channel frequency1 of current DFS channel, MHz */ |
| 9311 | A_UINT16 ch_center_freq1; |
| 9312 | |
| 9313 | /** center channel frequency2 of current DFS channel, MHz, |
| 9314 | * reserved for 160 BW mode |
| 9315 | */ |
| 9316 | A_UINT16 ch_center_freq2; |
| 9317 | |
| 9318 | /** flag to indicate if this pulse is chirp */ |
| 9319 | A_UINT8 pulse_is_chirp; |
| 9320 | |
| 9321 | /** RSSI recorded in the ppdu */ |
| 9322 | A_UINT8 rssi; |
| 9323 | |
| 9324 | /** extened RSSI info */ |
| 9325 | A_UINT8 rssi_ext; |
| 9326 | |
| 9327 | /** For 4-byte aligment padding */ |
| 9328 | A_UINT8 reserved; |
| 9329 | |
| 9330 | /** pmac_id for the radar event */ |
| 9331 | A_UINT8 pmac_id; |
| 9332 | |
| 9333 | /** index of peak magnitude bin (signed) */ |
| 9334 | A_INT32 peak_sidx; |
| 9335 | |
| 9336 | } wmi_dfs_radar_event_fixed_param; |
| 9337 | |
| 9338 | typedef struct { |
| 9339 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_cmd_fixed_param */ |
| 9340 | |
| 9341 | /*Thermal thresholds */ |
| 9342 | A_UINT32 lower_thresh_degreeC; /* in degree C */ |
| 9343 | A_UINT32 upper_thresh_degreeC; /* in degree C */ |
| 9344 | |
| 9345 | /*Enable/Disable Thermal Monitoring for Mitigation */ |
| 9346 | A_UINT32 enable; |
| 9347 | } wmi_thermal_mgmt_cmd_fixed_param; |
| 9348 | |
| 9349 | typedef struct { |
| 9350 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_thermal_mgmt_event_fixed_param */ |
| 9351 | |
| 9352 | A_UINT32 temperature_degreeC; /* temperature in degree C */ |
| 9353 | } wmi_thermal_mgmt_event_fixed_param; |
| 9354 | |
| 9355 | /** |
| 9356 | * This command is sent from WLAN host driver to firmware to |
| 9357 | * request firmware to configure auto shutdown timer in fw |
| 9358 | * 0 - Disable <1-19600>-Enabled and timer value is seconds (86400 seconds = 1 day maximum> |
| 9359 | */ |
| 9360 | typedef struct { |
| 9361 | A_UINT32 tlv_header; |
| 9362 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_cfg_cmd_param */ |
| 9363 | A_UINT32 timer_value; |
| 9364 | /** timer value; 0=disable */ |
| 9365 | } wmi_host_auto_shutdown_cfg_cmd_fixed_param; |
| 9366 | |
| 9367 | enum wmi_host_auto_shutdown_reason { |
| 9368 | WMI_HOST_AUTO_SHUTDOWN_REASON_UNKNOWN = 0, |
| 9369 | WMI_HOST_AUTO_SHUTDOWN_REASON_TIMER_EXPIRY = 1, |
| 9370 | WMI_HOST_AUTO_SHUTDOWN_REASON_MAX, |
| 9371 | }; |
| 9372 | |
| 9373 | /* WMI_HOST_AUTO_SHUTDOWN_EVENTID */ |
| 9374 | typedef struct { |
| 9375 | A_UINT32 tlv_header; |
| 9376 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_host_auto_shutdown_event_fixed_param */ |
| 9377 | A_UINT32 shutdown_reason; /* value: wmi_host_auto_shutdown_reason */ |
| 9378 | } wmi_host_auto_shutdown_event_fixed_param; |
| 9379 | |
| 9380 | /** New WMI command to support TPC CHAINMASK ADJUSTMENT ACCORDING TO a set of conditions specified in the command. |
| 9381 | * fw will save c tpc offset/chainmask along with conditions and adjust tpc/chainmask when condition meet. |
| 9382 | * This command is only used by some customer for verification test. It is not for end-user. |
| 9383 | * |
| 9384 | * array of wmi_tpc_chainmask_config structures are passed with the command to specify multiple conditions. |
| 9385 | * |
| 9386 | * The set of conditions include bt status, stbc status, band, phy_mode, 1stream/2streams, channel, rate. when all these conditions meet, |
| 9387 | * the output(tpc_offset,chainmask) will be applied on per packet basis. ack_offset is applied based on channel condtion only. When multiple |
| 9388 | * conditions has the same channel ,then the first ack_offset will be applied. It is better for host driver to make sure the |
| 9389 | * <channel, ack_offset> pair is unique. |
| 9390 | * |
| 9391 | * the conditions (bt status, stbc status, band, phy_mode, 1steam/2streams, tpc_offset, ack_offset, chainmask) are combinedi into a single word |
| 9392 | * called basic_config_info by bitmap |
| 9393 | * to save memory. And channel & rate info will be tracked by 'channel' field and 'rate0', 'rate1' field because of its large combination. |
| 9394 | * |
| 9395 | * '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 |
| 9396 | * is ignored. |
| 9397 | * disable will remove preious conditions from FW. |
| 9398 | * conditions from the later command will over write conditions stored from a previous command. |
| 9399 | * |
| 9400 | */ |
| 9401 | |
| 9402 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON_OFF 0 /** dont' care the bt status */ |
| 9403 | #define WMI_TPC_CHAINMASK_CONFIG_BT_ON 1 /** apply only when bt on */ |
| 9404 | #define WMI_TPC_CHAINMASK_CONFIG_BT_OFF 2 /** apply only when bt off */ |
| 9405 | #define WMI_TPC_CHAINMASK_CONFIG_BT_RESV1 3 /** reserved */ |
| 9406 | |
| 9407 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_DONT_CARE 0 /** don't care the chainmask */ |
| 9408 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0 1 /** force to use Chain0 to send */ |
| 9409 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN1 2 /** force to use Chain1 to send */ |
| 9410 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_CHAIN0_CHAIN1 3 /** force to use Chain0 & Chain1 to send */ |
| 9411 | |
| 9412 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON_OFF 0 /** don't care about stbc */ |
| 9413 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_ON 1 /** apply only when stbc on */ |
| 9414 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_OFF 2 /** apply only when stbc off */ |
| 9415 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_RESV1 3 /** reserved */ |
| 9416 | |
| 9417 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_2G 0 /** 2G */ |
| 9418 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_5G 1 /** 5G */ |
| 9419 | |
| 9420 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11B_2G 0 /** 11b 2G */ |
| 9421 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11G_2G 1 /** 11g 2G */ |
| 9422 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_2G 2 /** 11n 2G */ |
| 9423 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_2G 3 /** 11n + 11ac 2G */ |
| 9424 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11A_5G 4 /** 11a 5G */ |
| 9425 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_5G 5 /** 11n 5G */ |
| 9426 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11AC_5G 6 /** 11ac 5G */ |
| 9427 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_11N_11AC_5G 7 /** 11n + 11ac 5G */ |
| 9428 | |
| 9429 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_1 0 /** 1 stream */ |
| 9430 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_2 1 /** 2 streams */ |
| 9431 | |
| 9432 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_OFF 0 /** channel field is ignored */ |
| 9433 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_ON 1 /** channel field needs to be checked */ |
| 9434 | |
| 9435 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_OFF 0 /** rate field is ignored */ |
| 9436 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_ON 1 /** rate field needs to be checked */ |
| 9437 | |
| 9438 | /** Bit map definition for basic_config_info starts */ |
| 9439 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S 0 |
| 9440 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_S) |
| 9441 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET) |
| 9442 | #define WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET_SET(x,z) WMI_F_RMW(x,(z) & 0x1f,WMI_TPC_CHAINMASK_CONFIG_TPC_OFFSET) |
| 9443 | |
| 9444 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S 5 |
| 9445 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET (0x1f << WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_S) |
| 9446 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET) |
| 9447 | #define WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET_SET(x,z) WMI_F_RMW(x, (z) & 0x1f, WMI_TPC_CHAINMASK_CONFIG_ACK_OFFSET) |
| 9448 | |
| 9449 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S 10 |
| 9450 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK (0x3 << WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_S) |
| 9451 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHAINMASK) |
| 9452 | #define WMI_TPC_CHAINMASK_CONFIG_CHAINMASK_SET(x,z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_CHAINMASK) |
| 9453 | |
| 9454 | #define WMI_TPC_CHAINMASK_CONFIG_BT_S 12 |
| 9455 | #define WMI_TPC_CHAINMASK_CONFIG_BT (0x3 << WMI_TPC_CHAINMASK_CONFIG_BT_S) |
| 9456 | #define WMI_TPC_CHAINMASK_CONFIG_BT_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BT) |
| 9457 | #define WMI_TPC_CHAINMASK_CONFIG_BT_SET(x,z) WMI_F_RMW(x, (z)&0x3, WMI_TPC_CHAINMASK_CONFIG_BT) |
| 9458 | |
| 9459 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_S 14 |
| 9460 | #define WMI_TPC_CHAINMASK_CONFIG_STBC (0x3 << WMI_TPC_CHAINMASK_CONFIG_STBC_S) |
| 9461 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STBC) |
| 9462 | #define WMI_TPC_CHAINMASK_CONFIG_STBC_SET(x,z) WMI_F_RMW(x, (z)& 0x3, WMI_TPC_CHAINMASK_CONFIG_STBC) |
| 9463 | |
| 9464 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_S 16 |
| 9465 | #define WMI_TPC_CHAINMASK_CONFIG_BAND (0x1 << WMI_TPC_CHAINMASK_CONFIG_BAND_S) |
| 9466 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_BAND) |
| 9467 | #define WMI_TPC_CHAINMASK_CONFIG_BAND_SET(x,z) WMI_F_RMW(x, (z) &0x1, WMI_TPC_CHAINMASK_CONFIG_BAND) |
| 9468 | |
| 9469 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_S 17 |
| 9470 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM (0x1 << WMI_TPC_CHAINMASK_CONFIG_STREAM_S) |
| 9471 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_STREAM) |
| 9472 | #define WMI_TPC_CHAINMASK_CONFIG_STREAM_SET(x,z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_STREAM) |
| 9473 | |
| 9474 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S 18 |
| 9475 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE (0x7 << WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_S) |
| 9476 | #define WMI_TPC_CHAINMASK_CONFIG_PHY_MODE_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_PHY_MODE) |
| 9477 | #define WMI_TPC_CHAINAMSK_CONFIG_PHY_MODE_SET(x,z) WMI_F_RMW(x, (z)&0x7, WMI_TPC_CHAINMASK_CONFIG_PHY_MODE) |
| 9478 | |
| 9479 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S 21 |
| 9480 | /* |
| 9481 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST) |
| 9482 | * is temporarily maintained as an alias for the correct name |
| 9483 | * (WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 9484 | */ |
| 9485 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_EXIST WMI_TPC_CHAINMASK_CONFIG_CHANNEL |
| 9486 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL (0x1 << WMI_TPC_CHAINMASK_CONFIG_CHANNEL_S) |
| 9487 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_GET(x) WMI_F_MS(x,WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 9488 | #define WMI_TPC_CHAINMASK_CONFIG_CHANNEL_SET(x,z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_CHANNEL) |
| 9489 | |
| 9490 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_S 22 |
| 9491 | /* |
| 9492 | * The deprecated old name (WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST) |
| 9493 | * is temporarily maintained as an alias for the correct name |
| 9494 | * (WMI_TPC_CHAINMASK_CONFIG_RATE) |
| 9495 | */ |
| 9496 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_EXIST WMI_TPC_CHAINMASK_CONFIG_RATE |
| 9497 | #define WMI_TPC_CHAINMASK_CONFIG_RATE (0x1 << WMI_TPC_CHAINMASK_CONFIG_RATE_S) |
| 9498 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_GET(x) WMI_F_MS(x, WMI_TPC_CHAINMASK_CONFIG_RATE) |
| 9499 | #define WMI_TPC_CHAINMASK_CONFIG_RATE_SET(x,z) WMI_F_RMW(x, (z)&0x1, WMI_TPC_CHAINMASK_CONFIG_RATE) |
| 9500 | |
| 9501 | /** Bit map definition for basic_config_info ends */ |
| 9502 | |
| 9503 | typedef struct { |
| 9504 | A_UINT32 tlv_header; |
| 9505 | /** Basic condition defined as bit map above, bitmap is chosen to save memory. |
| 9506 | * Bit0 ~ Bit4: tpc offset which will be adjusted if condtion matches, the unit is 0.5dB. bit4 indicates signed |
| 9507 | * Bit5 ~ Bit9: ack offset which will be adjusted if condtion matches, the unit is 0.5dB. bit9 indicates signed |
| 9508 | * 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 |
| 9509 | * 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 |
| 9510 | * 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 |
| 9511 | * Bit16 : band condition b'0: 2G, b'1: 5G |
| 9512 | * Bit17 : stream condition: b'0: 1 stream, b'1: 2 streams |
| 9513 | * 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 |
| 9514 | * Bit21 : channel bit, if this bit is 0, then the following channel field is ignored |
| 9515 | * Bit22 : rate bit, if this bit is 0, then the following rate0&rate1 is ignored. |
| 9516 | * Bit23 ~ Bit31: reserved |
| 9517 | */ |
| 9518 | A_UINT32 basic_config_info; |
| 9519 | |
| 9520 | /** channel mapping bit rule: The lower bit corresponds with smaller channel. |
| 9521 | * it depends on Bit14 of basic_config_info |
| 9522 | * Total 24 channels for 5G |
| 9523 | * 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140 149 153 157 161 165 |
| 9524 | * Total 14 channels for 2G |
| 9525 | * 1 ~ 14 |
| 9526 | */ |
| 9527 | A_UINT32 channel; |
| 9528 | |
| 9529 | /** rate mapping bit rule: The lower bit corresponds with lower rate. |
| 9530 | * it depends on Bit16 ~ Bit18 of basic_config_info, "phy mode condition" |
| 9531 | * Legacy rates , 11b, 11g, 11A |
| 9532 | * 11n one stream ( ht20, ht40 ) 8+8 |
| 9533 | * 11n two streams ( ht20, ht40 ) 8+8 |
| 9534 | * 11ac one stream ( vht20, vht40, vht80 ) 10+10+10 |
| 9535 | * 11ac two streams (vht20, vht40, vht80 ) 10+10+10 |
| 9536 | */ |
| 9537 | A_UINT32 rate0; |
| 9538 | /** For example, for 11b, when rate0 equals 0x3, it means if actual_rate in [ "1Mbps", "2Mbps"] connection, the rate condition is true. |
| 9539 | * 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 |
| 9540 | */ |
| 9541 | |
| 9542 | /** 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 |
| 9543 | */ |
| 9544 | A_UINT32 rate1; |
| 9545 | } wmi_tpc_chainmask_config; |
| 9546 | |
| 9547 | #define WMI_TPC_CHAINMASK_CONFIG_DISABLE 0 /** control the off for the tpc & chainmask*/ |
| 9548 | #define WMI_TPC_CHAINMASK_CONFIG_ENABLE 1 /** control the on for the tpc & chainmask*/ |
| 9549 | |
| 9550 | typedef struct { |
| 9551 | A_UINT32 tlv_header; |
| 9552 | A_UINT32 enable; |
| 9553 | /** enable to set tpc & chainmask when condtions meet, 0: disabled, 1: enabled. */ |
| 9554 | A_UINT32 num_tpc_chainmask_configs; |
| 9555 | /** following this structure is num_tpc_chainmask_configs number of wmi_tpc_chainmask_config */ |
| 9556 | } wmi_tpc_chainmask_config_cmd_fixed_param; |
| 9557 | |
| 9558 | typedef struct { |
| 9559 | A_UINT32 tlv_header; |
| 9560 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */ |
| 9561 | A_UINT32 data_len; |
| 9562 | /** length in byte of data[]. */ |
| 9563 | /* This structure is used to send REQ binary blobs |
| 9564 | * from application/service to firmware where Host drv is pass through . |
| 9565 | * Following this structure is the TLV: |
| 9566 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 9567 | */ |
| 9568 | } wmi_nan_cmd_param; |
| 9569 | |
| 9570 | typedef struct { |
| 9571 | A_UINT32 tlv_header; |
| 9572 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_hdr */ |
| 9573 | A_UINT32 data_len; |
| 9574 | /** length in byte of data[]. */ |
| 9575 | /* This structure is used to send REQ binary blobs |
| 9576 | * from firmware to application/service where Host drv is pass through . |
| 9577 | * Following this structure is the TLV: |
| 9578 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 9579 | */ |
| 9580 | } wmi_nan_event_hdr; |
| 9581 | |
| 9582 | typedef struct { |
| 9583 | A_UINT32 tlv_header; |
| 9584 | A_UINT32 num_data; |
| 9585 | /* followed by WMITLV_TAG_ARRAY_BYTE */ |
| 9586 | } wmi_diag_data_container_event_fixed_param; |
| 9587 | |
| 9588 | enum { |
| 9589 | WMI_PDEV_PARAM_TXPOWER_REASON_NONE = 0, |
| 9590 | WMI_PDEV_PARAM_TXPOWER_REASON_SAR, |
| 9591 | WMI_PDEV_PARAM_TXPOWER_REASON_MAX |
| 9592 | }; |
| 9593 | |
| 9594 | #define PDEV_PARAM_TXPOWER_VALUE_MASK 0x000000FF |
| 9595 | #define PDEV_PARAM_TXPOWER_VALUE_SHIFT 0 |
| 9596 | |
| 9597 | #define PDEV_PARAM_TXPOWER_REASON_MASK 0x0000FF00 |
| 9598 | #define PDEV_PARAM_TXPOWER_REASON_SHIFT 8 |
| 9599 | |
| 9600 | #define SET_PDEV_PARAM_TXPOWER_VALUE(txpower_param, value) \ |
| 9601 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_VALUE_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_VALUE_SHIFT)) |
| 9602 | |
| 9603 | #define SET_PDEV_PARAM_TXPOWER_REASON(txpower_param, value) \ |
| 9604 | ((txpower_param) &= ~PDEV_PARAM_TXPOWER_REASON_MASK, (txpower_param) |= ((value) << PDEV_PARAM_TXPOWER_REASON_SHIFT)) |
| 9605 | |
| 9606 | #define GET_PDEV_PARAM_TXPOWER_VALUE(txpower_param) \ |
| 9607 | (((txpower_param) & PDEV_PARAM_TXPOWER_VALUE_MASK) >> PDEV_PARAM_TXPOWER_VALUE_SHIFT) |
| 9608 | |
| 9609 | #define GET_PDEV_PARAM_TXPOWER_REASON(txpower_param) \ |
| 9610 | (((txpower_param) & PDEV_PARAM_TXPOWER_REASON_MASK) >> PDEV_PARAM_TXPOWER_REASON_SHIFT) |
| 9611 | |
| 9612 | /** |
| 9613 | * This command is sent from WLAN host driver to firmware to |
| 9614 | * notify the current modem power state. Host would receive a |
| 9615 | * message from modem when modem is powered on. Host driver |
| 9616 | * would then send this command to firmware. Firmware would then |
| 9617 | * power on WCI-2 (UART) interface for LTE/MWS Coex. |
| 9618 | * |
| 9619 | * This command is only applicable for APQ platform which has |
| 9620 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 9621 | * this command can be dropped by firmware. |
| 9622 | * |
| 9623 | * This is a requirement from modem team that WCN can't toggle |
| 9624 | * UART before modem is powered on. |
| 9625 | */ |
| 9626 | typedef struct { |
| 9627 | /** TLV tag and len; tag equals |
| 9628 | * WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param */ |
| 9629 | A_UINT32 tlv_header; |
| 9630 | |
| 9631 | /** Modem power state parameter */ |
| 9632 | A_UINT32 modem_power_state; |
| 9633 | } wmi_modem_power_state_cmd_param; |
| 9634 | |
| 9635 | enum { |
| 9636 | WMI_MODEM_STATE_OFF = 0, |
| 9637 | WMI_MODEM_STATE_ON |
| 9638 | }; |
| 9639 | |
| 9640 | #define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */ |
| 9641 | #define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */ |
| 9642 | |
| 9643 | /** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic |
| 9644 | generated whenever firmware roamed to new AP silently and |
| 9645 | (a) If the host is awake, FW sends the event to the host immediately . |
| 9646 | (b) If host is in sleep then either |
| 9647 | (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID |
| 9648 | command to FW (part of host wake up sequence from low power mode) before sending the event host. |
| 9649 | (2) data/mgmt frame is received from roamed AP, which needs to return to host |
| 9650 | */ |
| 9651 | |
| 9652 | typedef struct { |
| 9653 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material */ |
| 9654 | A_UINT32 tlv_header; |
| 9655 | |
| 9656 | A_UINT8 kck[GTK_OFFLOAD_KCK_BYTES]; /* EAPOL-Key Key Confirmation Key (KCK) */ |
| 9657 | A_UINT8 kek[GTK_OFFLOAD_KEK_BYTES]; /* EAPOL-Key Key Encryption Key (KEK) */ |
| 9658 | A_UINT8 replay_counter[GTK_REPLAY_COUNTER_BYTES]; |
| 9659 | } wmi_key_material; |
| 9660 | |
| 9661 | typedef struct { |
| 9662 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */ |
| 9663 | /** Unique id identifying the VDEV on which roaming is done by firmware */ |
| 9664 | A_UINT32 vdev_id; |
| 9665 | /** auth_status: connected or authorized */ |
| 9666 | A_UINT32 auth_status; |
| 9667 | /* |
Nirav Shah | 439e626 | 2015-11-05 10:53:18 +0530 | [diff] [blame] | 9668 | * roam_reason: |
| 9669 | * bits 0-3 for roam reason see WMI_ROAM_REASON_XXX |
| 9670 | * 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] | 9671 | */ |
| 9672 | A_UINT32 roam_reason; |
| 9673 | /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */ |
| 9674 | A_UINT32 rssi; |
| 9675 | /** MAC address of roamed AP */ |
| 9676 | wmi_mac_addr bssid; /* BSSID */ |
| 9677 | /** whether the frame is beacon or probe rsp */ |
| 9678 | A_UINT32 is_beacon; |
| 9679 | /** the length of beacon/probe rsp */ |
| 9680 | A_UINT32 bcn_probe_rsp_len; |
| 9681 | /** the length of reassoc rsp */ |
| 9682 | A_UINT32 reassoc_rsp_len; |
| 9683 | /** |
| 9684 | * TLV (tag length value ) parameters follows roam_synch_event |
| 9685 | * The TLV's are: |
| 9686 | * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len |
| 9687 | * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len |
| 9688 | * wmi_channel chan; |
| 9689 | * wmi_key_material key; |
| 9690 | * A_UINT32 status; subnet changed status not being used |
| 9691 | * currently. will pass the information using roam_status. |
| 9692 | **/ |
| 9693 | } wmi_roam_synch_event_fixed_param; |
| 9694 | |
| 9695 | #define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF |
| 9696 | |
| 9697 | typedef struct { |
| 9698 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_get_estimated_linkspeed_cmd_fixed_param */ |
| 9699 | A_UINT32 tlv_header; |
| 9700 | /** MAC address of the peer for which the estimated link speed is required. */ |
| 9701 | wmi_mac_addr peer_macaddr; |
| 9702 | } wmi_peer_get_estimated_linkspeed_cmd_fixed_param; |
| 9703 | |
| 9704 | typedef struct { |
| 9705 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_estimated_linkspeed_event_fixed_param */ |
| 9706 | A_UINT32 tlv_header; |
| 9707 | /** MAC address of the peer for which the estimated link speed is required. |
| 9708 | */ |
| 9709 | wmi_mac_addr peer_macaddr; |
| 9710 | /* Estimated link speed in kbps. |
| 9711 | * When est_linkspeed_kbps is not valid, the value is set to WMI_PEER_ESTIMATED_LINKSPEED_INVALID. |
| 9712 | */ |
| 9713 | A_UINT32 est_linkspeed_kbps; |
| 9714 | } wmi_peer_estimated_linkspeed_event_fixed_param; |
| 9715 | |
| 9716 | typedef struct { |
| 9717 | A_UINT32 tlv_header; /* TLV tag and len; tag equals */ |
| 9718 | /* vdev ID */ |
| 9719 | A_UINT32 vdev_id; |
| 9720 | A_UINT32 data_len; |
| 9721 | /** length in byte of data[]. */ |
| 9722 | /* This structure is used to send REQ binary blobs |
| 9723 | * from application/service to firmware where Host drv is pass through . |
| 9724 | * Following this structure is the TLV: |
| 9725 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 9726 | */ |
| 9727 | } wmi_req_stats_ext_cmd_fixed_param; |
| 9728 | |
| 9729 | typedef struct { |
| 9730 | A_UINT32 tlv_header; |
| 9731 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stats1_event_fix_param */ |
| 9732 | A_UINT32 vdev_id; |
| 9733 | /** vdev ID */ |
| 9734 | A_UINT32 data_len; |
| 9735 | /** length in byte of data[]. */ |
| 9736 | /* This structure is used to send REQ binary blobs |
| 9737 | * from firmware to application/service where Host drv is pass through . |
| 9738 | * Following this structure is the TLV: |
| 9739 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 9740 | */ |
| 9741 | } wmi_stats_ext_event_fixed_param; |
| 9742 | |
| 9743 | typedef struct { |
| 9744 | /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */ |
| 9745 | A_UINT32 tlv_header; |
| 9746 | A_UINT32 vdev_id; /* vdev ID */ |
| 9747 | /* MAC address of the peer for which the estimated link speed is required. */ |
| 9748 | wmi_mac_addr peer_macaddr; |
| 9749 | A_UINT32 state; /* peer state */ |
| 9750 | } wmi_peer_state_event_fixed_param; |
| 9751 | |
| 9752 | typedef struct { |
| 9753 | /* |
| 9754 | * TLV tag and len; tag equals |
| 9755 | * WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param |
| 9756 | */ |
| 9757 | A_UINT32 tlv_header; |
| 9758 | /* unique id identifying the VDEV, generated by the caller */ |
| 9759 | A_UINT32 vdev_id; |
| 9760 | /* peer MAC address */ |
| 9761 | wmi_mac_addr peer_macaddr; |
| 9762 | } wmi_peer_assoc_conf_event_fixed_param; |
| 9763 | |
| 9764 | enum { |
| 9765 | WMI_2G4_HT40_OBSS_SCAN_PASSIVE = 0, |
| 9766 | /** scan_type: passive */ |
| 9767 | WMI_2G4_HT40_OBSS_SCAN_ACTIVE, |
| 9768 | /** scan_type: active */ |
| 9769 | }; |
| 9770 | |
| 9771 | typedef struct { |
| 9772 | /** |
| 9773 | * TLV tag and len; |
| 9774 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_enalbe_cmd_fixed_param |
| 9775 | */ |
| 9776 | A_UINT32 tlv_header; |
| 9777 | A_UINT32 vdev_id; |
| 9778 | /** |
| 9779 | * active or passive. if active all the channels are actively scanned. |
| 9780 | * if passive then all the channels are passively scanned |
| 9781 | */ |
| 9782 | A_UINT32 scan_type; |
| 9783 | /** |
| 9784 | * FW can perform multiple scans with in a OBSS scan interval. |
| 9785 | * For each scan, |
| 9786 | * if the scan is passive then obss_scan_passive_dwell is minimum dwell to be used for each channel , |
| 9787 | * if the scan is active then obss_scan_active_dwell is minimum dwell to be used for each channel . |
| 9788 | * The unit for these 2 parameters is TUs. |
| 9789 | */ |
| 9790 | A_UINT32 obss_scan_passive_dwell; |
| 9791 | A_UINT32 obss_scan_active_dwell; |
| 9792 | /** |
| 9793 | * OBSS scan interval . FW needs to perform one or more OBSS scans within this interval and fulfill the |
| 9794 | * both min and total per channel dwell time requirement |
| 9795 | */ |
| 9796 | A_UINT32 bss_channel_width_trigger_scan_interval; |
| 9797 | /** |
| 9798 | * FW can perform multiple scans with in a OBSS scan interval. |
| 9799 | * For each scan, |
| 9800 | * the total per channel dwell time across all scans with in OBSS scan interval should be |
| 9801 | * atleast obss_scan_passive_total_per channel for passive scas and obss_scan_active_total_per channel |
| 9802 | * for active scans and , |
| 9803 | * The unit for these 2 parameters is TUs. |
| 9804 | */ |
| 9805 | A_UINT32 obss_scan_passive_total_per_channel; |
| 9806 | A_UINT32 obss_scan_active_total_per_channel; |
| 9807 | A_UINT32 bss_width_channel_transition_delay_factor; |
| 9808 | /** parameter to check exemption from scan */ |
| 9809 | A_UINT32 obss_scan_activity_threshold; |
| 9810 | /** parameter to check exemption from scan */ |
| 9811 | /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */ |
| 9812 | A_UINT32 forty_mhz_intolerant; |
| 9813 | /** STA 40M bandwidth intolerant capability */ |
| 9814 | A_UINT32 current_operating_class; |
| 9815 | /** STA current operating class */ |
| 9816 | /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */ |
| 9817 | A_UINT32 channel_len; |
| 9818 | /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */ |
| 9819 | A_UINT32 ie_len; |
| 9820 | } wmi_obss_scan_enable_cmd_fixed_param; |
| 9821 | |
| 9822 | typedef struct { |
| 9823 | /** |
| 9824 | * TLV tag and len; |
| 9825 | * tag equals WMITLV_TAG_STRUC_wmi_obss_scan_disalbe_cmd_fixed_param |
| 9826 | */ |
| 9827 | A_UINT32 tlv_header; |
| 9828 | A_UINT32 vdev_id; |
| 9829 | } wmi_obss_scan_disable_cmd_fixed_param; |
| 9830 | |
| 9831 | typedef struct { |
| 9832 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_offload_prb_rsp_tx_status_event_fixed_param */ |
| 9833 | A_UINT32 tlv_header; |
| 9834 | /** unique id identifying the VDEV */ |
| 9835 | A_UINT32 vdev_id; |
| 9836 | /** prb rsp tx status, values defined in enum WMI_FRAME_TX_STATUS */ |
| 9837 | A_UINT32 tx_status; |
| 9838 | } wmi_offload_prb_rsp_tx_status_event_fixed_param; |
| 9839 | |
| 9840 | typedef enum { |
| 9841 | WMI_FRAME_TX_OK, /* frame tx ok */ |
| 9842 | WMI_FRAME_TX_XRETRY, /* excessivley retried */ |
| 9843 | WMI_FRAME_TX_DROP, /* frame dropped by FW due to resources */ |
| 9844 | WMI_FRAME_TX_FILTERED, /* frame filtered by hardware */ |
| 9845 | } WMI_FRAME_TX_STATUS; |
| 9846 | |
| 9847 | /** |
| 9848 | * This command is sent from WLAN host driver to firmware to |
| 9849 | * request firmware to send the latest channel avoidance range |
| 9850 | * to host. |
| 9851 | * |
| 9852 | * This command is only applicable for APQ platform which has |
| 9853 | * modem on the platform. If firmware doesn't support MWS Coex, |
| 9854 | * this command can be dropped by firmware. |
| 9855 | * |
| 9856 | * Host would send this command to firmware to request a channel |
| 9857 | * avoidance information update. |
| 9858 | */ |
| 9859 | typedef struct { |
| 9860 | /** TLV tag and len; tag equals |
| 9861 | * WMITLV_TAG_STRUC_wmi_chan_avoid_update_cmd_param */ |
| 9862 | A_UINT32 tlv_header; |
| 9863 | } wmi_chan_avoid_update_cmd_param; |
| 9864 | |
| 9865 | /* ExtScan operation mode */ |
| 9866 | typedef enum { |
| 9867 | WMI_EXTSCAN_MODE_NONE = 0x0000, |
| 9868 | WMI_EXTSCAN_MODE_START = 0x0001, /* ExtScan/TableMonitoring operation started */ |
| 9869 | WMI_EXTSCAN_MODE_STOP = 0x0002, /* ExtScan/TableMonitoring operation stopped */ |
| 9870 | WMI_EXTSCAN_MODE_IGNORED = 0x0003, /* ExtScan command ignored due to error */ |
| 9871 | } wmi_extscan_operation_mode; |
| 9872 | |
| 9873 | /* Channel Mask */ |
| 9874 | typedef enum { |
| 9875 | WMI_CHANNEL_BAND_UNSPECIFIED = 0x0000, |
| 9876 | WMI_CHANNEL_BAND_24 = 0x0001, /* 2.4 channel */ |
| 9877 | WMI_CHANNEL_BAND_5_NON_DFS = 0x0002, /* 5G Channels (No DFS channels) */ |
| 9878 | WMI_CHANNEL_BAND_DFS = 0x0004, /* DFS channels */ |
| 9879 | } wmi_channel_band_mask; |
| 9880 | |
| 9881 | typedef enum { |
| 9882 | WMI_EXTSCAN_CYCLE_STARTED_EVENT = 0x0001, |
| 9883 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT = 0x0002, |
| 9884 | WMI_EXTSCAN_BUCKET_STARTED_EVENT = 0x0004, |
| 9885 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT = 0x0008, |
| 9886 | WMI_EXTSCAN_BUCKET_FAILED_EVENT = 0x0010, |
| 9887 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT = 0x0020, |
| 9888 | |
| 9889 | WMI_EXTSCAN_EVENT_MAX = 0x8000 |
| 9890 | } wmi_extscan_event_type; |
| 9891 | |
| 9892 | #define WMI_EXTSCAN_CYCLE_EVENTS_MASK (WMI_EXTSCAN_CYCLE_STARTED_EVENT | \ |
| 9893 | WMI_EXTSCAN_CYCLE_COMPLETED_EVENT) |
| 9894 | |
| 9895 | #define WMI_EXTSCAN_BUCKET_EVENTS_MASK (WMI_EXTSCAN_BUCKET_STARTED_EVENT | \ |
| 9896 | WMI_EXTSCAN_BUCKET_COMPLETED_EVENT | \ |
| 9897 | WMI_EXTSCAN_BUCKET_FAILED_EVENT | \ |
| 9898 | WMI_EXTSCAN_BUCKET_OVERRUN_EVENT) |
| 9899 | |
| 9900 | typedef enum { |
| 9901 | WMI_EXTSCAN_NO_FORWARDING = 0x0000, |
| 9902 | WMI_EXTSCAN_FORWARD_FRAME_TO_HOST = 0x0001 |
| 9903 | } wmi_extscan_forwarding_flags; |
| 9904 | |
| 9905 | typedef enum { |
| 9906 | /* Use Motion Sensor Detection */ |
| 9907 | WMI_EXTSCAN_USE_MSD = 0x0001, |
| 9908 | /* Extscan LPASS extended batching feature is supported and enabled */ |
| 9909 | WMI_EXTSCAN_EXTENDED_BATCHING_EN = 0x0002, |
| 9910 | } wmi_extscan_configuration_flags; |
| 9911 | typedef enum { |
| 9912 | /* |
| 9913 | * Cache the results of bucket whose |
| 9914 | * configuration flags has this bit set |
| 9915 | */ |
| 9916 | WMI_EXTSCAN_BUCKET_CACHE_RESULTS = 0x0001, |
| 9917 | } wmi_extscan_bucket_configuration_flags; |
| 9918 | |
| 9919 | typedef enum { |
| 9920 | WMI_EXTSCAN_STATUS_OK = 0, |
| 9921 | WMI_EXTSCAN_STATUS_ERROR = 0x80000000, |
| 9922 | WMI_EXTSCAN_STATUS_INVALID_PARAMETERS, |
| 9923 | WMI_EXTSCAN_STATUS_INTERNAL_ERROR |
| 9924 | } wmi_extscan_start_stop_status; |
| 9925 | |
| 9926 | typedef struct { |
| 9927 | /** Request ID - to identify command. Cannot be 0 */ |
| 9928 | A_UINT32 request_id; |
| 9929 | /** Requestor ID - client requesting ExtScan */ |
| 9930 | A_UINT32 requestor_id; |
| 9931 | /** VDEV id(interface) that is requesting scan */ |
| 9932 | A_UINT32 vdev_id; |
| 9933 | } wmi_extscan_command_id; |
| 9934 | |
| 9935 | typedef struct { |
| 9936 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 9937 | /** channel number */ |
| 9938 | A_UINT32 channel; |
| 9939 | |
| 9940 | /** dwell time in msec - use defaults if 0 */ |
| 9941 | A_UINT32 min_dwell_time; |
| 9942 | A_UINT32 max_dwell_time; |
| 9943 | /** passive/active channel and other flags */ |
| 9944 | A_UINT32 control_flags; /* 0 => active, 1 => passive scan; ignored for DFS */ |
| 9945 | } wmi_extscan_bucket_channel; |
| 9946 | |
| 9947 | /* Scan Bucket specification */ |
| 9948 | typedef struct { |
| 9949 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 9950 | /** Bucket ID - 0-based */ |
| 9951 | A_UINT32 bucket_id; |
| 9952 | /** ExtScan events subscription - events to be reported to client (see wmi_extscan_event_type) */ |
| 9953 | A_UINT32 notify_extscan_events; |
| 9954 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 9955 | A_UINT32 forwarding_flags; |
| 9956 | /* |
| 9957 | * ExtScan configuration flags - |
| 9958 | * wmi_extscan__bucket_configuration_flags |
| 9959 | */ |
| 9960 | A_UINT32 configuration_flags; |
| 9961 | /** DEPRECATED member:multiplier to be applied to the periodic scan's base period */ |
| 9962 | A_UINT32 base_period_multiplier; |
| 9963 | /** dwell time in msec on active channels - use defaults if 0 */ |
| 9964 | A_UINT32 min_dwell_time_active; |
| 9965 | A_UINT32 max_dwell_time_active; |
| 9966 | /** dwell time in msec on passive channels - use defaults if 0 */ |
| 9967 | A_UINT32 min_dwell_time_passive; |
| 9968 | A_UINT32 max_dwell_time_passive; |
| 9969 | /** see wmi_channel_band_mask; when equal to WMI_CHANNEL_UNSPECIFIED, use channel list */ |
| 9970 | A_UINT32 channel_band; |
| 9971 | /** number of channels (if channel_band is WMI_CHANNEL_UNSPECIFIED) */ |
| 9972 | A_UINT32 num_channels; |
| 9973 | /** scan period upon start or restart of the bucket - periodicity of the bucket to begin with */ |
| 9974 | A_UINT32 min_period; |
| 9975 | /** period above which exponent is not applied anymore */ |
| 9976 | A_UINT32 max_period; |
| 9977 | /** |
| 9978 | * back off value to be applied to bucket's periodicity after exp_max_step_count scan cycles |
| 9979 | * new_bucket_period = last_bucket_period + last_exponent_period exp_backoff |
| 9980 | */ |
| 9981 | A_UINT32 exp_backoff; |
| 9982 | /** number of scans performed at a given periodicity after which exponential back off value is |
| 9983 | * applied to current periodicity to obtain a newer one |
| 9984 | */ |
| 9985 | A_UINT32 exp_max_step_count; |
| 9986 | /** Followed by the variable length TLV chan_list: |
| 9987 | * wmi_extscan_bucket_channel chan_list[] */ |
| 9988 | } wmi_extscan_bucket; |
| 9989 | |
| 9990 | typedef struct { |
| 9991 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_cmd_fixed_param */ |
| 9992 | /** Request ID - to identify command. Cannot be 0 */ |
| 9993 | A_UINT32 request_id; |
| 9994 | /** Requestor ID - client requesting ExtScan */ |
| 9995 | A_UINT32 requestor_id; |
| 9996 | /** VDEV id(interface) that is requesting scan */ |
| 9997 | A_UINT32 vdev_id; |
| 9998 | /** table ID - to allow support for multiple simultaneous requests */ |
| 9999 | A_UINT32 table_id; |
| 10000 | /** Base period (milliseconds) used by scan buckets to define periodicity of the scans */ |
| 10001 | A_UINT32 base_period; |
| 10002 | /** Maximum number of iterations to run - one iteration is the scanning of the least frequent bucket */ |
| 10003 | A_UINT32 max_iterations; |
| 10004 | /** Options to forward scan results - see wmi_extscan_forwarding_flags */ |
| 10005 | A_UINT32 forwarding_flags; |
| 10006 | /** ExtScan configuration flags - wmi_extscan_configuration_flags */ |
| 10007 | A_UINT32 configuration_flags; |
| 10008 | /** ExtScan events subscription - bitmask indicating which events should be send to client (see wmi_extscan_event_type) */ |
| 10009 | A_UINT32 notify_extscan_events; |
| 10010 | /** Scan Priority, input to scan scheduler */ |
| 10011 | A_UINT32 scan_priority; |
| 10012 | /** Maximum number of BSSIDs to cache on each scan cycle */ |
| 10013 | A_UINT32 max_bssids_per_scan_cycle; |
| 10014 | /** Minimum RSSI value to report */ |
| 10015 | A_UINT32 min_rssi; |
| 10016 | /** Maximum table usage in percentage */ |
| 10017 | A_UINT32 max_table_usage; |
| 10018 | /** default dwell time in msec on active channels */ |
| 10019 | A_UINT32 min_dwell_time_active; |
| 10020 | A_UINT32 max_dwell_time_active; |
| 10021 | /** default dwell time in msec on passive channels */ |
| 10022 | A_UINT32 min_dwell_time_passive; |
| 10023 | A_UINT32 max_dwell_time_passive; |
| 10024 | /** min time in msec on the BSS channel,only valid if atleast one VDEV is active*/ |
| 10025 | A_UINT32 min_rest_time; |
| 10026 | /** max rest time in msec on the BSS channel,only valid if at least one VDEV is active*/ |
| 10027 | /** the scanner will rest on the bss channel at least min_rest_time. after min_rest_time the scanner |
| 10028 | * will start checking for tx/rx activity on all VDEVs. if there is no activity the scanner will |
| 10029 | * switch to off channel. if there is activity the scanner will let the radio on the bss channel |
| 10030 | * until max_rest_time expires.at max_rest_time scanner will switch to off channel |
| 10031 | * irrespective of activity. activity is determined by the idle_time parameter. |
| 10032 | */ |
| 10033 | A_UINT32 max_rest_time; |
| 10034 | /** time before sending next set of probe requests. |
| 10035 | * The scanner keeps repeating probe requests transmission with period specified by repeat_probe_time. |
| 10036 | * The number of probe requests specified depends on the ssid_list and bssid_list |
| 10037 | */ |
| 10038 | /** Max number of probes to be sent */ |
| 10039 | A_UINT32 n_probes; |
| 10040 | /** time in msec between 2 sets of probe requests. */ |
| 10041 | A_UINT32 repeat_probe_time; |
| 10042 | /** time in msec between 2 consequetive probe requests with in a set. */ |
| 10043 | A_UINT32 probe_spacing_time; |
| 10044 | /** data inactivity time in msec on bss channel that will be used by scanner for measuring the inactivity */ |
| 10045 | A_UINT32 idle_time; |
| 10046 | /** maximum time in msec allowed for scan */ |
| 10047 | A_UINT32 max_scan_time; |
| 10048 | /** delay in msec before sending first probe request after switching to a channel */ |
| 10049 | A_UINT32 probe_delay; |
| 10050 | /** Scan control flags */ |
| 10051 | A_UINT32 scan_ctrl_flags; |
| 10052 | /** Burst duration time in msec*/ |
| 10053 | A_UINT32 burst_duration; |
| 10054 | |
| 10055 | /** number of bssids in the TLV bssid_list[] */ |
| 10056 | A_UINT32 num_bssid; |
| 10057 | /** number of ssid in the TLV ssid_list[] */ |
| 10058 | A_UINT32 num_ssids; |
| 10059 | /** number of bytes in TLV ie_data[] */ |
| 10060 | A_UINT32 ie_len; |
| 10061 | /** number of buckets in the TLV bucket_list[] */ |
| 10062 | A_UINT32 num_buckets; |
| 10063 | /** in number of scans, send notifications to host after these many scans */ |
| 10064 | A_UINT32 report_threshold_num_scans; |
| 10065 | |
| 10066 | /** number of channels in channel_list[] determined by the |
| 10067 | sum of wmi_extscan_bucket.num_channels in array */ |
| 10068 | |
| 10069 | /** |
| 10070 | * TLV (tag length value ) parameters follow the extscan_cmd |
| 10071 | * structure. The TLV's are: |
| 10072 | * wmi_ssid ssid_list[]; |
| 10073 | * wmi_mac_addr bssid_list[]; |
| 10074 | * A_UINT8 ie_data[]; |
| 10075 | * wmi_extscan_bucket bucket_list[]; |
| 10076 | * wmi_extscan_bucket_channel channel_list[]; |
| 10077 | */ |
| 10078 | } wmi_extscan_start_cmd_fixed_param; |
| 10079 | |
| 10080 | typedef struct { |
| 10081 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_stop_cmd_fixed_param */ |
| 10082 | /** Request ID - to match running command. 0 matches any request */ |
| 10083 | A_UINT32 request_id; |
| 10084 | /** Requestor ID - client requesting stop */ |
| 10085 | A_UINT32 requestor_id; |
| 10086 | /** VDEV id(interface) that is requesting scan */ |
| 10087 | A_UINT32 vdev_id; |
| 10088 | /** table ID - to allow support for multiple simultaneous requests */ |
| 10089 | A_UINT32 table_id; |
| 10090 | } wmi_extscan_stop_cmd_fixed_param; |
| 10091 | |
| 10092 | enum wmi_extscan_get_cached_results_flags { |
| 10093 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_NONE = 0x0000, |
| 10094 | WMI_EXTSCAN_GET_CACHED_RESULTS_FLAG_FLUSH_TABLE = 0x0001 |
| 10095 | }; |
| 10096 | |
| 10097 | typedef struct { |
| 10098 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_cached_results_cmd_fixed_param */ |
| 10099 | /** request ID - used to correlate command with events */ |
| 10100 | A_UINT32 request_id; |
| 10101 | /** Requestor ID - client that requested results */ |
| 10102 | A_UINT32 requestor_id; |
| 10103 | /** VDEV id(interface) that is requesting scan */ |
| 10104 | A_UINT32 vdev_id; |
| 10105 | /** table ID - to allow support for multiple simultaneous requests */ |
| 10106 | A_UINT32 table_id; |
| 10107 | /** maximum number of results to be returned */ |
| 10108 | A_UINT32 max_results; |
| 10109 | /** flush BSSID list - wmi_extscan_get_cached_results_flags */ |
| 10110 | A_UINT32 control_flags; /* enum wmi_extscan_get_cached_results_flags */ |
| 10111 | } wmi_extscan_get_cached_results_cmd_fixed_param; |
| 10112 | |
| 10113 | typedef struct { |
| 10114 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_wlan_change_results_cmd_fixed_param */ |
| 10115 | /** request ID - used to correlate command with events */ |
| 10116 | A_UINT32 request_id; |
| 10117 | /** Requestor ID - client that requested results */ |
| 10118 | A_UINT32 requestor_id; |
| 10119 | /** VDEV id(interface) that is requesting scan */ |
| 10120 | A_UINT32 vdev_id; |
| 10121 | /** table ID - to allow support for multiple simultaneous requests */ |
| 10122 | A_UINT32 table_id; |
| 10123 | } wmi_extscan_get_wlan_change_results_cmd_fixed_param; |
| 10124 | |
| 10125 | typedef struct { |
| 10126 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10127 | /**bssid */ |
| 10128 | wmi_mac_addr bssid; |
| 10129 | /**channel number */ |
| 10130 | A_UINT32 channel; |
| 10131 | /**upper RSSI limit */ |
| 10132 | A_UINT32 upper_rssi_limit; |
| 10133 | /**lower RSSI limit */ |
| 10134 | A_UINT32 lower_rssi_limit; |
| 10135 | } wmi_extscan_wlan_change_bssid_param; |
| 10136 | |
| 10137 | typedef struct { |
| 10138 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param */ |
| 10139 | /** Request ID - to identify command. Cannot be 0 */ |
| 10140 | A_UINT32 request_id; |
| 10141 | /** Requestor ID - client requesting wlan change monitoring */ |
| 10142 | A_UINT32 requestor_id; |
| 10143 | /** VDEV id(interface) that is requesting scan */ |
| 10144 | A_UINT32 vdev_id; |
| 10145 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10146 | A_UINT32 table_id; |
| 10147 | /** operation mode: start/stop */ |
| 10148 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 10149 | /** number of rssi samples to store */ |
| 10150 | A_UINT32 max_rssi_samples; |
| 10151 | /** number of samples to use to calculate RSSI average */ |
| 10152 | A_UINT32 rssi_averaging_samples; |
| 10153 | /** number of scans to confirm loss of contact with RSSI */ |
| 10154 | A_UINT32 lost_ap_scan_count; |
| 10155 | /** number of out-of-range BSSIDs necessary to send event */ |
| 10156 | A_UINT32 max_out_of_range_count; |
| 10157 | /** total number of bssid signal descriptors (in all pages) */ |
| 10158 | A_UINT32 total_entries; |
| 10159 | /** index of the first bssid entry found in the TLV wlan_change_descriptor_list*/ |
| 10160 | A_UINT32 first_entry_index; |
| 10161 | /** number of bssid signal descriptors in this page */ |
| 10162 | A_UINT32 num_entries_in_page; |
| 10163 | /* Following this structure is the TLV: |
| 10164 | * wmi_extscan_wlan_change_bssid_param wlan_change_descriptor_list[]; // number of elements given by field num_page_entries. |
| 10165 | */ |
| 10166 | } wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param; |
| 10167 | |
| 10168 | typedef struct { |
| 10169 | /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10170 | A_UINT32 tlv_header; |
| 10171 | /**ssid */ |
| 10172 | wmi_ssid ssid; |
| 10173 | /**band */ |
| 10174 | A_UINT32 band; |
| 10175 | /**RSSI threshold for reporting */ |
| 10176 | A_UINT32 min_rssi; |
| 10177 | A_UINT32 max_rssi; |
| 10178 | } wmi_extscan_hotlist_ssid_entry; |
| 10179 | |
| 10180 | typedef struct { |
| 10181 | /** |
| 10182 | * TLV tag and len; tag equals |
| 10183 | * MITLV_TAG_STRUC_wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param |
| 10184 | */ |
| 10185 | A_UINT32 tlv_header; |
| 10186 | /** Request ID - to identify command. Cannot be 0 */ |
| 10187 | A_UINT32 request_id; |
| 10188 | /** Requestor ID - client requesting hotlist ssid monitoring */ |
| 10189 | A_UINT32 requestor_id; |
| 10190 | /** VDEV id(interface) that is requesting scan */ |
| 10191 | A_UINT32 vdev_id; |
| 10192 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10193 | A_UINT32 table_id; |
| 10194 | /** operation mode: start/stop */ |
| 10195 | A_UINT32 mode; // wmi_extscan_operation_mode |
| 10196 | /**total number of ssids (in all pages) */ |
| 10197 | A_UINT32 total_entries; |
| 10198 | /**index of the first ssid entry found in the TLV extscan_hotlist_ssid_entry*/ |
| 10199 | A_UINT32 first_entry_index; |
| 10200 | /**number of ssids in this page */ |
| 10201 | A_UINT32 num_entries_in_page; |
| 10202 | /** number of consecutive scans to confirm loss of an ssid **/ |
| 10203 | A_UINT32 lost_ap_scan_count; |
| 10204 | /* Following this structure is the TLV: |
| 10205 | * wmi_extscan_hotlist_ssid_entry hotlist_ssid[]; |
| 10206 | * number of element given by field num_page_entries. |
| 10207 | */ |
| 10208 | } wmi_extscan_configure_hotlist_ssid_monitor_cmd_fixed_param; |
| 10209 | |
| 10210 | typedef struct { |
| 10211 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10212 | /**bssid */ |
| 10213 | wmi_mac_addr bssid; |
| 10214 | /**RSSI min threshold for reporting */ |
| 10215 | A_UINT32 min_rssi; |
| 10216 | /**Deprecated entry channel number */ |
| 10217 | A_UINT32 channel; |
| 10218 | /** RSSI max threshold for reporting */ |
| 10219 | A_UINT32 max_rssi; |
| 10220 | } wmi_extscan_hotlist_entry; |
| 10221 | |
| 10222 | typedef struct { |
| 10223 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_configure_hotlist_monitor_cmd_fixed_param */ |
| 10224 | /** Request ID - to identify command. Cannot be 0 */ |
| 10225 | A_UINT32 request_id; |
| 10226 | /** Requestor ID - client requesting hotlist monitoring */ |
| 10227 | A_UINT32 requestor_id; |
| 10228 | /** VDEV id(interface) that is requesting scan */ |
| 10229 | A_UINT32 vdev_id; |
| 10230 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10231 | A_UINT32 table_id; |
| 10232 | /** operation mode: start/stop */ |
| 10233 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 10234 | /**total number of bssids (in all pages) */ |
| 10235 | A_UINT32 total_entries; |
| 10236 | /**index of the first bssid entry found in the TLV wmi_extscan_hotlist_entry*/ |
| 10237 | A_UINT32 first_entry_index; |
| 10238 | /**number of bssids in this page */ |
| 10239 | A_UINT32 num_entries_in_page; |
| 10240 | /** number of consecutive scans to confirm loss of contact with AP */ |
| 10241 | A_UINT32 lost_ap_scan_count; |
| 10242 | /* Following this structure is the TLV: |
| 10243 | * wmi_extscan_hotlist_entry hotlist[]; // number of elements given by field num_page_entries. |
| 10244 | */ |
| 10245 | } wmi_extscan_configure_hotlist_monitor_cmd_fixed_param; |
| 10246 | |
| 10247 | typedef struct { |
| 10248 | /* TLV tag and len; tag equals |
| 10249 | *WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 10250 | A_UINT32 tlv_header; |
| 10251 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table */ |
| 10252 | A_UINT32 config_request_id; |
| 10253 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID |
| 10254 | that configured the table */ |
| 10255 | A_UINT32 config_requestor_id; |
| 10256 | /** |
| 10257 | * VDEV id(interface) of the |
| 10258 | * WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID that configured the table |
| 10259 | */ |
| 10260 | A_UINT32 config_vdev_id; |
| 10261 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10262 | A_UINT32 table_id; |
| 10263 | /**total number of ssids (in all pages) */ |
| 10264 | A_UINT32 total_entries; |
| 10265 | /**index of the first ssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 10266 | A_UINT32 first_entry_index; |
| 10267 | /**number of ssids in this page */ |
| 10268 | A_UINT32 num_entries_in_page; |
| 10269 | /* Following this structure is the TLV: |
| 10270 | * wmi_extscan_wlan_descriptor hotlist_match[]; |
| 10271 | * number of descriptors given by field num_entries_in_page |
| 10272 | */ |
| 10273 | } wmi_extscan_hotlist_ssid_match_event_fixed_param; |
| 10274 | |
| 10275 | typedef struct { |
| 10276 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10277 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10278 | A_UINT32 table_id; |
| 10279 | /** size in bytes of scan cache entry */ |
| 10280 | A_UINT32 scan_cache_entry_size; |
| 10281 | /** maximum number of scan cache entries */ |
| 10282 | A_UINT32 max_scan_cache_entries; |
| 10283 | /** maximum number of buckets per extscan request */ |
| 10284 | A_UINT32 max_buckets; |
| 10285 | /** maximum number of BSSIDs that will be stored in each scan (best n/w as per RSSI) */ |
| 10286 | A_UINT32 max_bssid_per_scan; |
| 10287 | /** table usage level at which indication must be sent to host */ |
| 10288 | A_UINT32 max_table_usage_threshold; |
| 10289 | } wmi_extscan_cache_capabilities; |
| 10290 | |
| 10291 | typedef struct { |
| 10292 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10293 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10294 | A_UINT32 table_id; |
| 10295 | /** size in bytes of wlan change entry */ |
| 10296 | A_UINT32 wlan_change_entry_size; |
| 10297 | /** maximum number of entries in wlan change table */ |
| 10298 | A_UINT32 max_wlan_change_entries; |
| 10299 | /** number of RSSI samples used for averaging RSSI */ |
| 10300 | A_UINT32 max_rssi_averaging_samples; |
| 10301 | /** number of BSSID/RSSI entries (BSSID pointer, RSSI, timestamp) that device can hold */ |
| 10302 | A_UINT32 max_rssi_history_entries; |
| 10303 | } wmi_extscan_wlan_change_monitor_capabilities; |
| 10304 | |
| 10305 | typedef struct { |
| 10306 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10307 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10308 | A_UINT32 table_id; |
| 10309 | /** size in bytes of hotlist entry */ |
| 10310 | A_UINT32 wlan_hotlist_entry_size; |
| 10311 | /** maximum number of entries in wlan change table */ |
| 10312 | A_UINT32 max_hotlist_entries; |
| 10313 | } wmi_extscan_hotlist_monitor_capabilities; |
| 10314 | |
| 10315 | typedef struct { |
| 10316 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_set_capabilities_cmd_fixed_param */ |
| 10317 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 10318 | A_UINT32 request_id; |
| 10319 | /** Requestor ID - client requesting stop */ |
| 10320 | A_UINT32 requestor_id; |
| 10321 | /** number of extscan caches */ |
| 10322 | A_UINT32 num_extscan_cache_tables; |
| 10323 | /** number of wlan change lists */ |
| 10324 | A_UINT32 num_wlan_change_monitor_tables; |
| 10325 | /** number of hotlists */ |
| 10326 | A_UINT32 num_hotlist_monitor_tables; |
| 10327 | /** if one sided rtt data collection is supported */ |
| 10328 | A_UINT32 rtt_one_sided_supported; |
| 10329 | /** if 11v data collection is supported */ |
| 10330 | A_UINT32 rtt_11v_supported; |
| 10331 | /** if 11mc data collection is supported */ |
| 10332 | A_UINT32 rtt_ftm_supported; |
| 10333 | /** number of extscan cache capabilities (one per table) */ |
| 10334 | A_UINT32 num_extscan_cache_capabilities; |
| 10335 | /** number of wlan change capabilities (one per table) */ |
| 10336 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 10337 | /** number of extscan hotlist capabilities (one per table) */ |
| 10338 | A_UINT32 num_extscan_hotlist_capabilities; |
| 10339 | /* Following this structure is the TLV: |
| 10340 | * wmi_extscan_cache_capabilities extscan_cache_capabilities; // number of capabilities given by num_extscan_caches |
| 10341 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities; // number of capabilities given by num_wlan_change_monitor_tables |
| 10342 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities; // number of capabilities given by num_hotlist_monitor_tables |
| 10343 | */ |
| 10344 | } wmi_extscan_set_capabilities_cmd_fixed_param; |
| 10345 | |
| 10346 | typedef struct { |
| 10347 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_get_capabilities_cmd_fixed_param */ |
| 10348 | /** Request ID - matches request ID used to start hot list monitoring */ |
| 10349 | A_UINT32 request_id; |
| 10350 | /** Requestor ID - client requesting capabilities */ |
| 10351 | A_UINT32 requestor_id; |
| 10352 | } wmi_extscan_get_capabilities_cmd_fixed_param; |
| 10353 | |
| 10354 | typedef struct { |
| 10355 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param */ |
| 10356 | /** Request ID of the operation that was started/stopped */ |
| 10357 | A_UINT32 request_id; |
| 10358 | /** Requestor ID of the operation that was started/stopped */ |
| 10359 | A_UINT32 requestor_id; |
| 10360 | /** VDEV id(interface) of the operation that was started/stopped */ |
| 10361 | A_UINT32 vdev_id; |
| 10362 | /** extscan WMI command */ |
| 10363 | A_UINT32 command; |
| 10364 | /** operation mode: start/stop */ |
| 10365 | A_UINT32 mode; /* wmi_extscan_operation_mode */ |
| 10366 | /**success/failure */ |
| 10367 | A_UINT32 status; /* enum wmi_extscan_start_stop_status */ |
| 10368 | /** table ID - to allow support for multiple simultaneous requests */ |
| 10369 | A_UINT32 table_id; |
| 10370 | } wmi_extscan_start_stop_event_fixed_param; |
| 10371 | |
| 10372 | typedef struct { |
| 10373 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param */ |
| 10374 | /** Request ID of the extscan operation that is currently running */ |
| 10375 | A_UINT32 request_id; |
| 10376 | /** Requestor ID of the extscan operation that is currently running */ |
| 10377 | A_UINT32 requestor_id; |
| 10378 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 10379 | A_UINT32 vdev_id; |
| 10380 | /** scan event (wmi_scan_event_type) */ |
| 10381 | A_UINT32 event; /* wmi_extscan_event_type */ |
| 10382 | /** table ID - to allow support for multiple simultaneous requests */ |
| 10383 | A_UINT32 table_id; |
| 10384 | /**number of buckets */ |
| 10385 | A_UINT32 num_buckets; |
| 10386 | /* Following this structure is the TLV: |
| 10387 | * A_UINT32 bucket_id[]; // number of elements given by field num_buckets. |
| 10388 | */ |
| 10389 | } wmi_extscan_operation_event_fixed_param; |
| 10390 | |
| 10391 | /* Types of extscan tables */ |
| 10392 | typedef enum { |
| 10393 | EXTSCAN_TABLE_NONE = 0, |
| 10394 | EXTSCAN_TABLE_BSSID = 1, |
| 10395 | EXTSCAN_TABLE_RSSI = 2, |
| 10396 | } wmi_extscan_table_type; |
| 10397 | |
| 10398 | typedef struct { |
| 10399 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param */ |
| 10400 | /** Request ID of the extscan operation that is currently running */ |
| 10401 | A_UINT32 request_id; |
| 10402 | /** Requestor ID of the extscan operation that is currently running */ |
| 10403 | A_UINT32 requestor_id; |
| 10404 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 10405 | A_UINT32 vdev_id; |
| 10406 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10407 | A_UINT32 table_id; |
| 10408 | /**see wmi_extscan_table_type for table reporting usage */ |
| 10409 | A_UINT32 table_type; |
| 10410 | /**number of entries in use */ |
| 10411 | A_UINT32 entries_in_use; |
| 10412 | /**maximum number of entries in table */ |
| 10413 | A_UINT32 maximum_entries; |
| 10414 | } wmi_extscan_table_usage_event_fixed_param; |
| 10415 | |
| 10416 | typedef enum { |
| 10417 | /** |
| 10418 | * Indicates scan got interrupted i.e. aborted or pre-empted for a long time (> 1sec) |
| 10419 | * this can be used to discard scan results |
| 10420 | */ |
| 10421 | WMI_SCAN_STATUS_INTERRUPTED = 1 |
| 10422 | } wmi_scan_status_flags; |
| 10423 | |
| 10424 | |
| 10425 | typedef struct { |
| 10426 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10427 | /**RSSI */ |
| 10428 | A_UINT32 rssi; |
| 10429 | /**time stamp in milliseconds */ |
| 10430 | A_UINT32 tstamp; |
| 10431 | /** Extscan cycle during which this entry was scanned */ |
| 10432 | A_UINT32 scan_cycle_id; |
| 10433 | /** |
| 10434 | * flag to indicate if the given result was obtained as part of |
| 10435 | * interrupted (aborted/large time gap preempted) scan |
| 10436 | */ |
| 10437 | A_UINT32 flags; |
| 10438 | } wmi_extscan_rssi_info; |
| 10439 | |
| 10440 | typedef struct { |
| 10441 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10442 | /**bssid */ |
| 10443 | wmi_mac_addr bssid; |
| 10444 | /**ssid */ |
| 10445 | wmi_ssid ssid; |
| 10446 | /**channel number */ |
| 10447 | A_UINT32 channel; |
| 10448 | /* capabilities */ |
| 10449 | A_UINT32 capabilities; |
| 10450 | /* beacon interval in TUs */ |
| 10451 | A_UINT32 beacon_interval; |
| 10452 | /**time stamp in milliseconds - time last seen */ |
| 10453 | A_UINT32 tstamp; |
| 10454 | /**flags - _tExtScanEntryFlags */ |
| 10455 | A_UINT32 flags; |
| 10456 | /**RTT in ns */ |
| 10457 | A_UINT32 rtt; |
| 10458 | /**rtt standard deviation */ |
| 10459 | A_UINT32 rtt_sd; |
| 10460 | /* rssi information */ |
| 10461 | A_UINT32 number_rssi_samples; |
| 10462 | /** IE length */ |
| 10463 | A_UINT32 ie_length; /* length of IE data */ |
| 10464 | } wmi_extscan_wlan_descriptor; |
| 10465 | |
| 10466 | typedef struct { |
| 10467 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param */ |
| 10468 | /** Request ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 10469 | A_UINT32 request_id; |
| 10470 | /** Requestor ID of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 10471 | A_UINT32 requestor_id; |
| 10472 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID */ |
| 10473 | A_UINT32 vdev_id; |
| 10474 | /** Request ID of the extscan operation that is currently running */ |
| 10475 | A_UINT32 extscan_request_id; |
| 10476 | /** Requestor ID of the extscan operation that is currently running */ |
| 10477 | A_UINT32 extscan_requestor_id; |
| 10478 | /** VDEV id(interface) of the extscan operation that is currently running */ |
| 10479 | A_UINT32 extscan_vdev_id; |
| 10480 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10481 | A_UINT32 table_id; |
| 10482 | /**current time stamp in seconds. Used to provide a baseline for the relative timestamps returned for each block and entry */ |
| 10483 | A_UINT32 current_tstamp; |
| 10484 | /**total number of bssids (in all pages) */ |
| 10485 | A_UINT32 total_entries; |
| 10486 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 10487 | A_UINT32 first_entry_index; |
| 10488 | /**number of bssids in this page */ |
| 10489 | A_UINT32 num_entries_in_page; |
| 10490 | /* Followed by the variable length TLVs |
| 10491 | * wmi_extscan_wlan_descriptor bssid_list[] |
| 10492 | * wmi_extscan_rssi_info rssi_list[] |
| 10493 | * A_UINT8 ie_list[] |
| 10494 | */ |
| 10495 | } wmi_extscan_cached_results_event_fixed_param; |
| 10496 | |
| 10497 | typedef enum { |
| 10498 | EXTSCAN_WLAN_CHANGE_FLAG_NONE = 0x00, |
| 10499 | EXTSCAN_WLAN_CHANGE_FLAG_OUT_OF_RANGE = 0x01, |
| 10500 | EXTSCAN_WLAN_CHANGE_FLAG_AP_LOST = 0x02, |
| 10501 | } wmi_extscan_wlan_change_flags; |
| 10502 | |
| 10503 | typedef struct { |
| 10504 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ |
| 10505 | /**bssid */ |
| 10506 | wmi_mac_addr bssid; |
| 10507 | /**time stamp in milliseconds */ |
| 10508 | A_UINT32 tstamp; |
| 10509 | /**upper RSSI limit */ |
| 10510 | A_UINT32 upper_rssi_limit; |
| 10511 | /**lower RSSI limit */ |
| 10512 | A_UINT32 lower_rssi_limit; |
| 10513 | /** channel */ |
| 10514 | A_UINT32 channel; /* in MHz */ |
| 10515 | /**current RSSI average */ |
| 10516 | A_UINT32 rssi_average; |
| 10517 | /**flags - wmi_extscan_wlan_change_flags */ |
| 10518 | A_UINT32 flags; |
| 10519 | /**legnth of RSSI history to follow (number of values) */ |
| 10520 | A_UINT32 num_rssi_samples; |
| 10521 | } wmi_extscan_wlan_change_result_bssid; |
| 10522 | |
| 10523 | typedef struct { |
| 10524 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param */ |
| 10525 | /** Request ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 10526 | A_UINT32 request_id; |
| 10527 | /** Requestor ID of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 10528 | A_UINT32 requestor_id; |
| 10529 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID command that requested the results */ |
| 10530 | A_UINT32 vdev_id; |
| 10531 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 10532 | A_UINT32 config_request_id; |
| 10533 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 10534 | A_UINT32 config_requestor_id; |
| 10535 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID command that configured the table */ |
| 10536 | A_UINT32 config_vdev_id; |
| 10537 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10538 | A_UINT32 table_id; |
| 10539 | /**number of entries with RSSI out of range or BSSID not detected */ |
| 10540 | A_UINT32 change_count; |
| 10541 | /**total number of bssid signal descriptors (in all pages) */ |
| 10542 | A_UINT32 total_entries; |
| 10543 | /**index of the first bssid signal descriptor entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 10544 | A_UINT32 first_entry_index; |
| 10545 | /**number of bssids signal descriptors in this page */ |
| 10546 | A_UINT32 num_entries_in_page; |
| 10547 | /* Following this structure is the TLV: |
| 10548 | * wmi_extscan_wlan_change_result_bssid bssid_signal_descriptor_list[]; // number of descriptors given by field num_entries_in_page. |
| 10549 | * Following this structure is the list of RSSI values (each is an A_UINT8): |
| 10550 | * A_UINT8 rssi_list[]; // last N RSSI values. |
| 10551 | */ |
| 10552 | } wmi_extscan_wlan_change_results_event_fixed_param; |
| 10553 | |
| 10554 | enum _tExtScanEntryFlags { |
| 10555 | WMI_HOTLIST_FLAG_NONE = 0x00, |
| 10556 | WMI_HOTLIST_FLAG_PRESENCE = 0x01, |
| 10557 | WMI_HOTLIST_FLAG_DUPLICATE_SSID = 0x80, |
| 10558 | }; |
| 10559 | |
| 10560 | typedef struct { |
| 10561 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param */ |
| 10562 | /** Request ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 10563 | A_UINT32 config_request_id; |
| 10564 | /** Requestor ID of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 10565 | A_UINT32 config_requestor_id; |
| 10566 | /** VDEV id(interface) of the WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID that configured the table */ |
| 10567 | A_UINT32 config_vdev_id; |
| 10568 | /** table ID - to allow support for multiple simultaneous tables */ |
| 10569 | A_UINT32 table_id; |
| 10570 | /**total number of bssids (in all pages) */ |
| 10571 | A_UINT32 total_entries; |
| 10572 | /**index of the first bssid entry found in the TLV wmi_extscan_wlan_descriptor*/ |
| 10573 | A_UINT32 first_entry_index; |
| 10574 | /**number of bssids in this page */ |
| 10575 | A_UINT32 num_entries_in_page; |
| 10576 | /* Following this structure is the TLV: |
| 10577 | * wmi_extscan_wlan_descriptor hotlist_match[]; // number of descriptors given by field num_entries_in_page. |
| 10578 | */ |
| 10579 | } wmi_extscan_hotlist_match_event_fixed_param; |
| 10580 | |
| 10581 | typedef struct { |
| 10582 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param */ |
| 10583 | /** Request ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 10584 | A_UINT32 request_id; |
| 10585 | /** Requestor ID of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 10586 | A_UINT32 requestor_id; |
| 10587 | /** VDEV id(interface) of the WMI_EXTSCAN_GET_CAPABILITIES_CMDID */ |
| 10588 | A_UINT32 vdev_id; |
| 10589 | /** number of extscan caches */ |
| 10590 | A_UINT32 num_extscan_cache_tables; |
| 10591 | /** number of wlan change lists */ |
| 10592 | A_UINT32 num_wlan_change_monitor_tables; |
| 10593 | /** number of hotlists */ |
| 10594 | A_UINT32 num_hotlist_monitor_tables; |
| 10595 | /** if one sided rtt data collection is supported */ |
| 10596 | A_UINT32 rtt_one_sided_supported; |
| 10597 | /** if 11v data collection is supported */ |
| 10598 | A_UINT32 rtt_11v_supported; |
| 10599 | /** if 11mc data collection is supported */ |
| 10600 | A_UINT32 rtt_ftm_supported; |
| 10601 | /** number of extscan cache capabilities (one per table) */ |
| 10602 | A_UINT32 num_extscan_cache_capabilities; |
| 10603 | /** number of wlan change capabilities (one per table) */ |
| 10604 | A_UINT32 num_extscan_wlan_change_capabilities; |
| 10605 | /** number of extscan hotlist capabilities (one per table) */ |
| 10606 | A_UINT32 num_extscan_hotlist_capabilities; |
| 10607 | /* max number of roaming ssid whitelist firmware can support */ |
| 10608 | A_UINT32 num_roam_ssid_whitelist; |
| 10609 | /* max number of blacklist bssid firmware can support */ |
| 10610 | A_UINT32 num_roam_bssid_blacklist; |
| 10611 | /* max number of preferred list firmware can support */ |
| 10612 | A_UINT32 num_roam_bssid_preferred_list; |
| 10613 | /* max number of hotlist ssids firmware can support */ |
| 10614 | A_UINT32 num_extscan_hotlist_ssid; |
| 10615 | /* max number of epno networks firmware can support */ |
| 10616 | A_UINT32 num_epno_networks; |
| 10617 | |
| 10618 | /* Following this structure are the TLVs describing the capabilities of of the various types of lists. The FW theoretically |
| 10619 | * supports multiple lists of each type. |
| 10620 | * |
| 10621 | * wmi_extscan_cache_capabilities extscan_cache_capabilities[] // capabilities of extscan cache (BSSID/RSSI lists) |
| 10622 | * wmi_extscan_wlan_change_monitor_capabilities wlan_change_capabilities[] // capabilities of wlan_change_monitor_tables |
| 10623 | * wmi_extscan_hotlist_monitor_capabilities hotlist_capabilities[] // capabilities of hotlist_monitor_tables |
| 10624 | */ |
| 10625 | } wmi_extscan_capabilities_event_fixed_param; |
| 10626 | |
| 10627 | /* WMI_D0_WOW_DISABLE_ACK_EVENTID */ |
| 10628 | typedef struct { |
| 10629 | A_UINT32 tlv_header; |
| 10630 | /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param */ |
| 10631 | A_UINT32 reserved0; /* for future need */ |
| 10632 | } wmi_d0_wow_disable_ack_event_fixed_param; |
| 10633 | |
| 10634 | /** WMI_PDEV_RESUME_EVENTID : generated in response to WMI_PDEV_RESUME_CMDID */ |
| 10635 | typedef struct { |
| 10636 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_resume_event_fixed_param */ |
| 10637 | A_UINT32 rsvd; /* for future need */ |
| 10638 | } wmi_pdev_resume_event_fixed_param; |
| 10639 | |
| 10640 | /** value representing all modules */ |
| 10641 | #define WMI_DEBUG_LOG_MODULE_ALL 0xffff |
| 10642 | |
| 10643 | /* param definitions */ |
| 10644 | |
| 10645 | /** |
| 10646 | * Log level for a given module. Value contains both module id and log level. |
| 10647 | * here is the bitmap definition for value. |
| 10648 | * module Id : 16 |
| 10649 | * Flags : reserved |
| 10650 | * Level : 8 |
| 10651 | * if odule Id is WMI_DEBUG_LOG_MODULE_ALL then log level is applied to all modules (global). |
| 10652 | * WMI_DEBUG_LOG_MIDULE_ALL will overwrites per module level setting. |
| 10653 | */ |
| 10654 | #define WMI_DEBUG_LOG_PARAM_LOG_LEVEL 0x1 |
| 10655 | |
| 10656 | #define WMI_DBGLOG_SET_LOG_LEVEL(val,lvl) do { \ |
| 10657 | (val) |= (lvl & 0xff); \ |
| 10658 | } while(0) |
| 10659 | |
| 10660 | #define WMI_DBGLOG_GET_LOG_LEVEL(val) ((val) & 0xff) |
| 10661 | |
| 10662 | #define WMI_DBGLOG_SET_MODULE_ID(val,mid) do { \ |
| 10663 | (val) |= ((mid & 0xffff) << 16); \ |
| 10664 | } while(0) |
| 10665 | |
| 10666 | #define WMI_DBGLOG_GET_MODULE_ID(val) (( (val) >> 16) & 0xffff) |
| 10667 | |
| 10668 | /** |
| 10669 | * Enable the debug log for a given vdev. Value is vdev id |
| 10670 | */ |
| 10671 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE 0x2 |
| 10672 | |
| 10673 | /** |
| 10674 | * Disable the debug log for a given vdev. Value is vdev id |
| 10675 | * All the log level for a given VDEV is disabled except the ERROR log messages |
| 10676 | */ |
| 10677 | |
| 10678 | #define WMI_DEBUG_LOG_PARAM_VDEV_DISABLE 0x3 |
| 10679 | |
| 10680 | /** |
| 10681 | * set vdev enable bitmap. value is the vden enable bitmap |
| 10682 | */ |
| 10683 | #define WMI_DEBUG_LOG_PARAM_VDEV_ENABLE_BITMAP 0x4 |
| 10684 | |
| 10685 | /** |
| 10686 | * set a given log level to all the modules specified in the module bitmap. |
| 10687 | * and set the log levle for all other modules to DBGLOG_ERR. |
| 10688 | * value: log levelt to be set. |
| 10689 | * module_id_bitmap : identifies the modules for which the log level should be set and |
| 10690 | * modules for which the log level should be reset to DBGLOG_ERR. |
| 10691 | */ |
| 10692 | #define WMI_DEBUG_LOG_PARAM_MOD_ENABLE_BITMAP 0x5 |
| 10693 | |
| 10694 | #define NUM_MODULES_PER_ENTRY ((sizeof(A_UINT32)) << 3) |
| 10695 | |
| 10696 | #define WMI_MODULE_ENABLE(pmid_bitmap,mod_id) \ |
| 10697 | ( (pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] |= \ |
| 10698 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)) ) |
| 10699 | |
| 10700 | #define WMI_MODULE_DISABLE(pmid_bitmap,mod_id) \ |
| 10701 | ( (pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY] &= \ |
| 10702 | ( ~(1 << ((mod_id)%NUM_MODULES_PER_ENTRY)) ) ) |
| 10703 | |
| 10704 | #define WMI_MODULE_IS_ENABLED(pmid_bitmap,mod_id) \ |
| 10705 | ( ((pmid_bitmap)[(mod_id)/NUM_MODULES_PER_ENTRY ] & \ |
| 10706 | (1 << ((mod_id)%NUM_MODULES_PER_ENTRY)) ) != 0) |
| 10707 | |
| 10708 | #define MAX_MODULE_ID_BITMAP_WORDS 16 /* 16*32=512 module ids. should be more than sufficient */ |
| 10709 | typedef struct { |
| 10710 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_debug_log_config_cmd_fixed_param */ |
| 10711 | A_UINT32 dbg_log_param; |
| 10712 | /** param types are defined above */ |
| 10713 | A_UINT32 value; |
| 10714 | /* The below array will follow this tlv ->fixed length module_id_bitmap[] |
| 10715 | A_UINT32 module_id_bitmap[MAX_MODULE_ID_BITMAP_WORDS]; |
| 10716 | */ |
| 10717 | } wmi_debug_log_config_cmd_fixed_param; |
| 10718 | |
| 10719 | typedef struct { |
| 10720 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_get_temperature_cmd_fixed_param */ |
| 10721 | A_UINT32 param; /* Reserved for future use */ |
| 10722 | } wmi_pdev_get_temperature_cmd_fixed_param; |
| 10723 | |
| 10724 | typedef struct { |
| 10725 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_temperature_event_fixed_param */ |
| 10726 | A_INT32 value; /* temprature value in Celcius degree */ |
| 10727 | } wmi_pdev_temperature_event_fixed_param; |
| 10728 | |
| 10729 | typedef struct { |
| 10730 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_dhcp_server_offload_cmd_fixed_param */ |
| 10731 | A_UINT32 vdev_id; |
| 10732 | A_UINT32 enable; |
| 10733 | A_UINT32 srv_ipv4; /* server IP */ |
| 10734 | A_UINT32 start_lsb; /* starting address assigned to client */ |
| 10735 | A_UINT32 num_client; /* number of clients we support */ |
| 10736 | } wmi_set_dhcp_server_offload_cmd_fixed_param; |
| 10737 | |
| 10738 | typedef enum { |
| 10739 | AP_RX_DATA_OFFLOAD = 0x00, |
| 10740 | STA_RX_DATA_OFFLOAD = 0x01, |
| 10741 | } wmi_ipa_offload_types; |
| 10742 | |
| 10743 | /** |
| 10744 | * This command is sent from WLAN host driver to firmware for |
| 10745 | * enabling/disabling IPA data-path offload features. |
| 10746 | * |
| 10747 | * |
| 10748 | * Enabling data path offload to IPA(based on host INI configuration), example: |
| 10749 | * when STA interface comes up, |
| 10750 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 10751 | * (enable = 1, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 10752 | * |
| 10753 | * Disabling data path offload to IPA, example: |
| 10754 | * host->target: WMI_IPA_OFFLOAD_ENABLE_DISABLE_CMD, |
| 10755 | * (enable = 0, vdev_id = STA vdev id, offload_type = STA_RX_DATA_OFFLOAD) |
| 10756 | * |
| 10757 | * |
| 10758 | * This command is applicable only on the PCIE LL systems |
| 10759 | * |
| 10760 | */ |
| 10761 | typedef struct { |
| 10762 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_ipa_offload_enable_disable_cmd_fixed_param */ |
| 10763 | A_UINT32 offload_type; /* wmi_ipa_offload_types enum values */ |
| 10764 | A_UINT32 vdev_id; |
| 10765 | A_UINT32 enable; /* 1 == enable, 0 == disable */ |
| 10766 | } wmi_ipa_offload_enable_disable_cmd_fixed_param; |
| 10767 | |
| 10768 | typedef enum { |
| 10769 | WMI_LED_FLASHING_PATTERN_NOT_CONNECTED = 0, |
| 10770 | WMI_LED_FLASHING_PATTERN_CONNECTED = 1, |
| 10771 | WMI_LED_FLASHING_PATTERN_RESERVED = 2, |
| 10772 | } wmi_set_led_flashing_type; |
| 10773 | |
| 10774 | /** |
| 10775 | 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. |
| 10776 | Each 32 bit value consists of 4 bytes, where each byte defines the number of 50ms intervals that the GPIO will |
| 10777 | remain at a predetermined state. The 64 bit value provides 8 unique GPIO timing intervals. The pattern starts |
| 10778 | 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 |
| 10779 | pattern returns to the MSB of X_0 and repeats. The GPIO state for each timing interval alternates from Low to |
| 10780 | High and the first interval of the pattern represents the time when the GPIO is Low. When a timing interval of |
| 10781 | Zero is reached, it is skipped and moves on to the next interval. |
| 10782 | */ |
| 10783 | typedef struct { |
| 10784 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_led_flashing_cmd_fixed_param */ |
| 10785 | A_UINT32 pattern_id; /* pattern identifier */ |
| 10786 | A_UINT32 led_x0; /* led flashing parameter0 */ |
| 10787 | A_UINT32 led_x1; /* led flashing parameter1 */ |
| 10788 | A_UINT32 gpio_num; /* GPIO number */ |
| 10789 | } wmi_set_led_flashing_cmd_fixed_param; |
| 10790 | |
| 10791 | /** |
| 10792 | * The purpose of the multicast Domain Name System (mDNS) is to resolve host names to IP addresses |
| 10793 | * within small networks that do not include a local name server. |
| 10794 | * It utilizes essentially the same programming interfaces, packet formats and operating semantics |
| 10795 | * as the unicast DNS, and the advantage is zero configuration service while no need for central or |
| 10796 | * global server. |
| 10797 | * Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover a named list of services |
| 10798 | * by type in a specified domain using standard DNS queries. |
| 10799 | * Here, we provide the ability to advertise the available services by responding to mDNS queries. |
| 10800 | */ |
| 10801 | typedef struct { |
| 10802 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_offload_cmd_fixed_param */ |
| 10803 | A_UINT32 vdev_id; |
| 10804 | A_UINT32 enable; |
| 10805 | } wmi_mdns_offload_cmd_fixed_param; |
| 10806 | |
| 10807 | #define WMI_MAX_MDNS_FQDN_LEN 64 |
| 10808 | #define WMI_MAX_MDNS_RESP_LEN 512 |
| 10809 | #define WMI_MDNS_FQDN_TYPE_GENERAL 0 |
| 10810 | #define WMI_MDNS_FQDN_TYPE_UNIQUE 1 |
| 10811 | |
| 10812 | typedef struct { |
| 10813 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_fqdn_cmd_fixed_param */ |
| 10814 | A_UINT32 vdev_id; |
| 10815 | /** type of fqdn, general or unique */ |
| 10816 | A_UINT32 type; |
| 10817 | /** length of fqdn */ |
| 10818 | A_UINT32 fqdn_len; |
| 10819 | /* Following this structure is the TLV byte stream of fqdn data of length fqdn_len |
| 10820 | * A_UINT8 fqdn_data[]; // fully-qualified domain name to check if match with the received queries |
| 10821 | */ |
| 10822 | } wmi_mdns_set_fqdn_cmd_fixed_param; |
| 10823 | |
| 10824 | typedef struct { |
| 10825 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_set_resp_cmd_fixed_param */ |
| 10826 | A_UINT32 vdev_id; |
| 10827 | /** Answer Resource Record count */ |
| 10828 | A_UINT32 AR_count; |
| 10829 | /** length of response */ |
| 10830 | A_UINT32 resp_len; |
| 10831 | /* Following this structure is the TLV byte stream of resp data of length resp_len |
| 10832 | * A_UINT8 resp_data[]; // responses consisits of Resource Records |
| 10833 | */ |
| 10834 | } wmi_mdns_set_resp_cmd_fixed_param; |
| 10835 | |
| 10836 | typedef struct { |
| 10837 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_get_stats_cmd_fixed_param */ |
| 10838 | A_UINT32 vdev_id; |
| 10839 | } wmi_mdns_get_stats_cmd_fixed_param; |
| 10840 | |
| 10841 | typedef struct { |
| 10842 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mdns_stats_event_fixed_param */ |
| 10843 | A_UINT32 vdev_id; |
| 10844 | /** curTimestamp in milliseconds */ |
| 10845 | A_UINT32 curTimestamp; |
| 10846 | /** last received Query in milliseconds */ |
| 10847 | A_UINT32 lastQueryTimestamp; |
| 10848 | /** last sent Response in milliseconds */ |
| 10849 | A_UINT32 lastResponseTimestamp; |
| 10850 | /** stats of received queries */ |
| 10851 | A_UINT32 totalQueries; |
| 10852 | /** stats of macth queries */ |
| 10853 | A_UINT32 totalMatches; |
| 10854 | /** stats of responses */ |
| 10855 | A_UINT32 totalResponses; |
| 10856 | /** indicate the current status of mDNS offload */ |
| 10857 | A_UINT32 status; |
| 10858 | } wmi_mdns_stats_event_fixed_param; |
| 10859 | |
| 10860 | /** |
| 10861 | * The purpose of the SoftAP authenticator offload is to offload the association and 4-way handshake process |
| 10862 | * down to the firmware. When this feature is enabled, firmware can process the association/disassociation |
| 10863 | * request and create/remove connection even host is suspended. |
| 10864 | * 3 major components are offloaded: |
| 10865 | * 1. ap-mlme. Firmware will process auth/deauth, association/disassociation request and send out response. |
| 10866 | * 2. 4-way handshake. Firmware will send out m1/m3 and receive m2/m4. |
| 10867 | * 3. key installation. Firmware will generate PMK from the psk info which is sent from the host and install PMK/GTK. |
| 10868 | * Current implementation only supports WPA2 CCMP. |
| 10869 | */ |
| 10870 | |
| 10871 | typedef struct { |
| 10872 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_enable_cmd_fixed_param */ |
| 10873 | /** VDEV id(interface) of the WMI_SAP_OFL_ENABLE_CMDID */ |
| 10874 | A_UINT32 vdev_id; |
| 10875 | /** enable/disable sap auth offload */ |
| 10876 | A_UINT32 enable; |
| 10877 | /** sap ssid */ |
| 10878 | wmi_ssid ap_ssid; |
| 10879 | /** authentication mode (defined above) */ |
| 10880 | A_UINT32 rsn_authmode; |
| 10881 | /** unicast cipher set */ |
| 10882 | A_UINT32 rsn_ucastcipherset; |
| 10883 | /** mcast/group cipher set */ |
| 10884 | A_UINT32 rsn_mcastcipherset; |
| 10885 | /** mcast/group management frames cipher set */ |
| 10886 | A_UINT32 rsn_mcastmgmtcipherset; |
| 10887 | /** sap channel */ |
| 10888 | A_UINT32 channel; |
| 10889 | /** length of psk */ |
| 10890 | A_UINT32 psk_len; |
| 10891 | /* Following this structure is the TLV byte stream of wpa passphrase data of length psk_len |
| 10892 | * A_UINT8 psk[]; |
| 10893 | */ |
| 10894 | } wmi_sap_ofl_enable_cmd_fixed_param; |
| 10895 | |
| 10896 | typedef struct { |
| 10897 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_add_sta_event_fixed_param */ |
| 10898 | /** VDEV id(interface) of the WMI_SAP_OFL_ADD_STA_EVENTID */ |
| 10899 | A_UINT32 vdev_id; |
| 10900 | /** aid (association id) of this station */ |
| 10901 | A_UINT32 assoc_id; |
| 10902 | /** peer station's mac addr */ |
| 10903 | wmi_mac_addr peer_macaddr; |
| 10904 | /** length of association request frame */ |
| 10905 | A_UINT32 data_len; |
| 10906 | /* Following this structure is the TLV byte stream of a whole association request frame of length data_len |
| 10907 | * A_UINT8 bufp[]; |
| 10908 | */ |
| 10909 | } wmi_sap_ofl_add_sta_event_fixed_param; |
| 10910 | |
| 10911 | typedef enum { |
| 10912 | SAP_OFL_DEL_STA_FLAG_NONE = 0x00, |
| 10913 | SAP_OFL_DEL_STA_FLAG_RECONNECT = 0x01, |
| 10914 | } wmi_sap_ofl_del_sta_flags; |
| 10915 | |
| 10916 | typedef struct { |
| 10917 | A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sap_ofl_del_sta_event_fixed_param */ |
| 10918 | /** VDEV id(interface) of the WMI_SAP_OFL_DEL_STA_EVENTID */ |
| 10919 | A_UINT32 vdev_id; |
| 10920 | /** aid (association id) of this station */ |
| 10921 | A_UINT32 assoc_id; |
| 10922 | /** peer station's mac addr */ |
| 10923 | wmi_mac_addr peer_macaddr; |
| 10924 | /** disassociation reason */ |
| 10925 | A_UINT32 reason; |
| 10926 | /** flags - wmi_sap_ofl_del_sta_flags */ |
| 10927 | A_UINT32 flags; |
| 10928 | } wmi_sap_ofl_del_sta_event_fixed_param; |
| 10929 | |
| 10930 | typedef struct { |
| 10931 | /* |
| 10932 | * TLV tag and len; tag equals |
| 10933 | * WMITLV_TAG_STRUC_wmi_sap_set_blacklist_param_cmd_fixed_param |
| 10934 | */ |
| 10935 | A_UINT32 tlv_header; |
| 10936 | A_UINT32 vdev_id; |
| 10937 | /* Number of client failure connection attempt */ |
| 10938 | A_UINT32 num_retry; |
| 10939 | /*Time in milliseconds to record the client's failure connection attempts*/ |
| 10940 | A_UINT32 retry_allow_time_ms; |
| 10941 | /* |
| 10942 | * Time in milliseconds to drop the connection request if |
| 10943 | * client is blacklisted |
| 10944 | */ |
| 10945 | A_UINT32 blackout_time_ms; |
| 10946 | } wmi_sap_set_blacklist_param_cmd_fixed_param; |
| 10947 | |
| 10948 | typedef struct { |
| 10949 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_cmd_param */ |
| 10950 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 10951 | /** This structure is used to send REQ binary blobs |
| 10952 | * from application/service to firmware where Host drv is pass through . |
| 10953 | * Following this structure is the TLV: |
| 10954 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 10955 | */ |
| 10956 | } wmi_apfind_cmd_param; |
| 10957 | |
| 10958 | typedef enum apfind_event_type_e { |
| 10959 | APFIND_MATCH_EVENT = 0, |
| 10960 | APFIND_WAKEUP_EVENT, |
| 10961 | } APFIND_EVENT_TYPE; |
| 10962 | |
| 10963 | typedef struct { |
| 10964 | A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_apfind_event_hdr */ |
| 10965 | A_UINT32 event_type; /** APFIND_EVENT_TYPE */ |
| 10966 | A_UINT32 data_len; /** length in byte of data[]. */ |
| 10967 | /** This structure is used to send event binary blobs |
| 10968 | * from firmware to application/service and Host drv. |
| 10969 | * Following this structure is the TLV: |
| 10970 | * A_UINT8 data[]; // length in byte given by field data_len. |
| 10971 | */ |
| 10972 | } wmi_apfind_event_hdr; |
| 10973 | |
| 10974 | /** |
| 10975 | * OCB DCC types and structures. |
| 10976 | */ |
| 10977 | |
| 10978 | /** |
| 10979 | * DCC types as described in ETSI TS 102 687 |
| 10980 | * Type Format stepSize referenceValue numBits |
| 10981 | * ------------------------------------------------------------------------- |
| 10982 | * ndlType_acPrio INTEGER (0...7) 1 number 3 |
| 10983 | * ndlType_controlLoop INTEGER (0...7) 1 0 3 |
| 10984 | * ndlType_arrivalRate INTEGER (0..8191) 0.01 /s 0 13 |
| 10985 | * ndlType_channelLoad INTEGER (0..1000) 0.1 % 0 % 10 |
| 10986 | * ndlType_channelUse INTEGER (0..8000) 0.0125 % 0 % 13 |
| 10987 | * ndlType_datarate INTEGER (0..7) Table 8 3 |
| 10988 | * ndlType_distance INTEGER (0..4095) 1 m 0 12 |
| 10989 | * ndlType_numberElements INTEGER (0..63) number 6 |
| 10990 | * ndlType_packetDuration INTEGER (0..2047) TSYM 0 11 |
| 10991 | * ndlType_packetInterval INTEGER (0..1023) 10 ms 0 10 |
| 10992 | * ndlType_pathloss INTEGER (0..31) 0.1 1.0 5 |
| 10993 | * ndlType_rxPower INTEGER (0..127) -0.5 dB -40 dBm 7 |
| 10994 | * ndlType_snr INTEGER (0..127) 0.5 dB -10 dB 7 |
| 10995 | * ndlType_timing INTEGER (0..4095) 10 ms 0 12 |
| 10996 | * ndlType_txPower INTEGER (0..127) 0.5 dB -20 dBm 7 |
| 10997 | * ndlType_ratio INTEGER (0..100) 1 % 0 % 7 |
| 10998 | * ndlType_exponent INTEGER (0..100) 0.1 0 7 |
| 10999 | * ndlType_queueStatus Enumeration Table A.2 1 |
| 11000 | * ndlType_dccMechanism Bitset Table A.2 6 |
| 11001 | * |
| 11002 | * NOTE: All of following size macros (SIZE_NDLTYPE_ACPRIO through SIZE_BYTE) |
| 11003 | * cannot be changed without breaking WMI compatibility. |
| 11004 | * |
| 11005 | * NOTE: For each of the types, one additional bit is allocated. This |
| 11006 | * leftmost bit is used to indicate that the value is invalid. |
| 11007 | */ |
| 11008 | #define SIZE_NDLTYPE_ACPRIO (1 + 3) |
| 11009 | #define SIZE_NDLTYPE_CONTROLLOOP (1 + 3) |
| 11010 | #define SIZE_NDLTYPE_ARRIVALRATE (1 + 13) |
| 11011 | #define SIZE_NDLTYPE_CHANNELLOAD (1 + 10) |
| 11012 | #define SIZE_NDLTYPE_CHANNELUSE (1 + 13) |
| 11013 | #define SIZE_NDLTYPE_DATARATE (1 + 3) |
| 11014 | #define SIZE_NDLTYPE_DISTANCE (1 + 12) |
| 11015 | #define SIZE_NDLTYPE_NUMBERELEMENTS (1 + 6) |
| 11016 | #define SIZE_NDLTYPE_PACKETDURATION (1 + 11) |
| 11017 | #define SIZE_NDLTYPE_PACKETINTERVAL (1 + 10) |
| 11018 | #define SIZE_NDLTYPE_PATHLOSS (1 + 5) |
| 11019 | #define SIZE_NDLTYPE_RXPOWER (1 + 7) |
| 11020 | #define SIZE_NDLTYPE_SNR (1 + 7) |
| 11021 | #define SIZE_NDLTYPE_TIMING (1 + 12) |
| 11022 | #define SIZE_NDLTYPE_TXPOWER (1 + 7) |
| 11023 | #define SIZE_NDLTYPE_RATIO (1 + 7) |
| 11024 | #define SIZE_NDLTYPE_EXPONENT (1 + 7) |
| 11025 | #define SIZE_NDLTYPE_QUEUESTATUS (1 + 1) |
| 11026 | #define SIZE_NDLTYPE_DCCMECHANISM (1 + 6) |
| 11027 | #define SIZE_BYTE (8) |
| 11028 | |
| 11029 | #define INVALID_ACPRIO ((1 << SIZE_NDLTYPE_ACPRIO) - 1) |
| 11030 | #define INVALID_CONTROLLOOP ((1 << SIZE_NDLTYPE_CONTROLLOOP) - 1) |
| 11031 | #define INVALID_ARRIVALRATE ((1 << SIZE_NDLTYPE_ARRIVALRATE) - 1) |
| 11032 | #define INVALID_CHANNELLOAD ((1 << SIZE_NDLTYPE_CHANNELLOAD) - 1) |
| 11033 | #define INVALID_CHANNELUSE ((1 << SIZE_NDLTYPE_CHANNELUSE) - 1) |
| 11034 | #define INVALID_DATARATE ((1 << SIZE_NDLTYPE_DATARATE) - 1) |
| 11035 | #define INVALID_DISTANCE ((1 << SIZE_NDLTYPE_DISTANCE) - 1) |
| 11036 | #define INVALID_NUMBERELEMENTS ((1 << SIZE_NDLTYPE_NUMBERELEMENTS) - 1) |
| 11037 | #define INVALID_PACKETDURATION ((1 << SIZE_NDLTYPE_PACKETDURATION) - 1) |
| 11038 | #define INVALID_PACKETINTERVAL ((1 << SIZE_NDLTYPE_PACKETINTERVAL) - 1) |
| 11039 | #define INVALID_PATHLOSS ((1 << SIZE_NDLTYPE_PATHLOSS) - 1) |
| 11040 | #define INVALID_RXPOWER ((1 << SIZE_NDLTYPE_RXPOWER) - 1) |
| 11041 | #define INVALID_SNR ((1 << SIZE_NDLTYPE_SNR) - 1) |
| 11042 | #define INVALID_TIMING ((1 << SIZE_NDLTYPE_TIMING) - 1) |
| 11043 | #define INVALID_TXPOWER ((1 << SIZE_NDLTYPE_TXPOWER) - 1) |
| 11044 | #define INVALID_RATIO ((1 << SIZE_NDLTYPE_RATIO) - 1) |
| 11045 | #define INVALID_EXPONENT ((1 << SIZE_NDLTYPE_EXPONENT) - 1) |
| 11046 | #define INVALID_QUEUESTATS ((1 << SIZE_NDLTYPE_QUEUESTATUS) - 1) |
| 11047 | #define INVALID_DCCMECHANISM ((1 << SIZE_NDLTYPE_DCCMECHANISM) - 1) |
| 11048 | |
| 11049 | /** |
| 11050 | * The MCS_COUNT macro cannot be modified without breaking |
| 11051 | * WMI compatibility. |
| 11052 | */ |
| 11053 | #define MCS_COUNT (8) |
| 11054 | |
| 11055 | /** |
| 11056 | * Flags for ndlType_dccMechanism. |
| 11057 | */ |
| 11058 | typedef enum { |
| 11059 | DCC_MECHANISM_TPC = 1, |
| 11060 | DCC_MECHANISM_TRC = 2, |
| 11061 | DCC_MECHANISM_TDC = 4, |
| 11062 | DCC_MECHANISM_DSC = 8, |
| 11063 | DCC_MECHANISM_TAC = 16, |
| 11064 | DCC_MECHANISM_RESERVED = 32, |
| 11065 | DCC_MECHANISM_ALL = 0x3f, |
| 11066 | } wmi_dcc_ndl_type_dcc_mechanism; |
| 11067 | |
| 11068 | /** Values for ndlType_queueStatus. */ |
| 11069 | typedef enum { |
| 11070 | DCC_QUEUE_CLOSED = 0, |
| 11071 | DCC_QUEUE_OPEN = 1, |
| 11072 | } wmi_dcc_ndl_type_queue_status; |
| 11073 | |
| 11074 | /** |
| 11075 | * For ndlType_acPrio, use the values in wmi_traffic_ac. |
| 11076 | * Values for ndlType_datarate. |
| 11077 | */ |
| 11078 | typedef enum { |
| 11079 | DCC_DATARATE_3_MBPS = 0, |
| 11080 | DCC_DATARATE_4_5_MBPS = 1, |
| 11081 | DCC_DATARATE_6_MBPS = 2, |
| 11082 | DCC_DATARATE_9_MBPS = 3, |
| 11083 | DCC_DATARATE_12_MBPS = 4, |
| 11084 | DCC_DATARATE_18_MBPS = 5, |
| 11085 | DCC_DATARATE_24_MBPS = 6, |
| 11086 | DCC_DATARATE_27_MBPS = 7, |
| 11087 | } wmi_dcc_ndl_type_datarate; |
| 11088 | |
| 11089 | /** Data structure for active state configuration. */ |
| 11090 | typedef struct { |
| 11091 | /** TLV tag and len; tag equals |
| 11092 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_active_state_config |
| 11093 | */ |
| 11094 | A_UINT32 tlv_header; |
| 11095 | /** |
| 11096 | * NDL_asStateId, ndlType_numberElements, 1+6 bits. |
| 11097 | * NDL_asChanLoad, ndlType_channelLoad, 1+10 bits. |
| 11098 | */ |
| 11099 | A_UINT32 state_info; |
| 11100 | /** |
| 11101 | * NDL_asDcc(AC_BK), ndlType_dccMechanism, 1+6 bits. |
| 11102 | * NDL_asDcc(AC_BE), ndlType_dccMechanism, 1+6 bits. |
| 11103 | * NDL_asDcc(AC_VI), ndlType_dccMechanism, 1+6 bits. |
| 11104 | * NDL_asDcc(AC_VO), ndlType_dccMechanism, 1+6 bits. |
| 11105 | */ |
| 11106 | A_UINT32 as_dcc[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DCCMECHANISM)]; |
| 11107 | /** |
| 11108 | * NDL_asTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 11109 | * NDL_asTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 11110 | * NDL_asTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 11111 | * NDL_asTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 11112 | */ |
| 11113 | A_UINT32 as_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 11114 | /** |
| 11115 | * NDL_asPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 11116 | * NDL_asPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 11117 | * NDL_asPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 11118 | * NDL_asPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits. |
| 11119 | */ |
| 11120 | A_UINT32 as_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 11121 | /** |
| 11122 | * NDL_asDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 11123 | * NDL_asDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 11124 | * NDL_asDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 11125 | * NDL_asDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 11126 | */ |
| 11127 | A_UINT32 as_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 11128 | /** |
| 11129 | * NDL_asCarrierSense(AC_BK), ndlType_rxPower, 1+7 bits. |
| 11130 | * NDL_asCarrierSense(AC_BE), ndlType_rxPower, 1+7 bits. |
| 11131 | * NDL_asCarrierSense(AC_VI), ndlType_rxPower, 1+7 bits. |
| 11132 | * NDL_asCarrierSense(AC_VO), ndlType_rxPower, 1+7 bits. |
| 11133 | */ |
| 11134 | A_UINT32 as_carrier_sense_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_RXPOWER)]; |
| 11135 | } wmi_dcc_ndl_active_state_config; |
| 11136 | |
| 11137 | #define WMI_NDL_AS_STATE_ID_GET(ptr) WMI_GET_BITS((ptr)->state_info, 0, 7) |
| 11138 | #define WMI_NDL_AS_STATE_ID_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 0, 7, val) |
| 11139 | #define WMI_NDL_AS_CHAN_LOAD_GET(ptr) WMI_GET_BITS((ptr)->state_info, 7, 11) |
| 11140 | #define WMI_NDL_AS_CHAN_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->state_info, 7, 11, val) |
| 11141 | #define WMI_NDL_AS_DCC_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM) |
| 11142 | #define WMI_NDL_AS_DCC_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_dcc, acprio, SIZE_NDLTYPE_DCCMECHANISM, val) |
| 11143 | #define WMI_NDL_AS_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 11144 | #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) |
| 11145 | #define WMI_NDL_AS_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 11146 | #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) |
| 11147 | #define WMI_NDL_AS_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 11148 | #define WMI_NDL_AS_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->as_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 11149 | #define WMI_NDL_AS_CARRIER_SENSE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->as_carrier_sense_ac, acprio, SIZE_NDLTYPE_RXPOWER) |
| 11150 | #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) |
| 11151 | |
| 11152 | /** Data structure for EDCA/QOS parameters. */ |
| 11153 | typedef struct { |
| 11154 | /** TLV tag and len; tag equals |
| 11155 | * WMITLV_TAG_STRUC_wmi_qos_parameter */ |
| 11156 | A_UINT32 tlv_header; |
| 11157 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 11158 | A_UINT32 aifsn; |
| 11159 | /** Contention Window minimum. Range: 1 - 10 */ |
| 11160 | A_UINT32 cwmin; |
| 11161 | /** Contention Window maximum. Range: 1 - 10 */ |
| 11162 | A_UINT32 cwmax; |
| 11163 | } wmi_qos_parameter; |
| 11164 | |
| 11165 | /** Data structure for information specific to a channel. */ |
| 11166 | typedef struct { |
| 11167 | /** TLV tag and len; tag equals |
| 11168 | * WMITLV_TAG_STRUC_wmi_ocb_channel */ |
| 11169 | A_UINT32 tlv_header; |
| 11170 | A_UINT32 bandwidth; /* MHz units */ |
| 11171 | wmi_mac_addr mac_address; |
| 11172 | } wmi_ocb_channel; |
| 11173 | |
| 11174 | /** Data structure for an element of the schedule array. */ |
| 11175 | typedef struct { |
| 11176 | /** TLV tag and len; tag equals |
| 11177 | * WMITLV_TAG_STRUC_wmi_ocb_schedule_element */ |
| 11178 | A_UINT32 tlv_header; |
| 11179 | A_UINT32 channel_freq; /* MHz units */ |
| 11180 | A_UINT32 total_duration; /* ms units */ |
| 11181 | A_UINT32 guard_interval; /* ms units */ |
| 11182 | } wmi_ocb_schedule_element; |
| 11183 | |
| 11184 | /** Data structure for OCB configuration. */ |
| 11185 | typedef struct { |
| 11186 | /** TLV tag and len; tag equals |
| 11187 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_cmd_fixed_param */ |
| 11188 | A_UINT32 tlv_header; |
| 11189 | /** VDEV id(interface) that is being configured */ |
| 11190 | A_UINT32 vdev_id; |
| 11191 | A_UINT32 channel_count; |
| 11192 | A_UINT32 schedule_size; |
| 11193 | A_UINT32 flags; |
| 11194 | |
| 11195 | /** This is followed by a TLV array of wmi_channel. |
| 11196 | * This is followed by a TLV array of wmi_ocb_channel. |
| 11197 | * This is followed by a TLV array of wmi_qos_parameter. |
| 11198 | * This is followed by a TLV array of wmi_dcc_ndl_chan. |
| 11199 | * This is followed by a TLV array of wmi_dcc_ndl_active_state_config. |
| 11200 | * This is followed by a TLV array of wmi_ocb_schedule_element. |
| 11201 | */ |
| 11202 | } wmi_ocb_set_config_cmd_fixed_param; |
| 11203 | |
| 11204 | |
| 11205 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET 0 |
| 11206 | #define EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK 1 |
| 11207 | |
| 11208 | #define WMI_OCB_EXPIRY_TIME_IN_TSF(ptr) \ |
| 11209 | (((ptr)->flags & EXPIRY_TIME_IN_TSF_TIMESTAMP_MASK) >> EXPIRY_TIME_IN_TSF_TIMESTAMP_OFFSET) |
| 11210 | |
| 11211 | |
| 11212 | /** Data structure for the response to the WMI_OCB_SET_CONFIG_CMDID command. */ |
| 11213 | typedef struct { |
| 11214 | /** TLV tag and len; tag equals |
| 11215 | * WMITLV_TAG_STRUC_wmi_ocb_set_config_resp_event_fixed_param |
| 11216 | */ |
| 11217 | A_UINT32 tlv_header; |
| 11218 | /* VDEV id(interface)*/ |
| 11219 | A_UINT32 vdev_id; |
| 11220 | A_UINT32 status; |
| 11221 | } wmi_ocb_set_config_resp_event_fixed_param; |
| 11222 | |
| 11223 | /* SIZE_UTC_TIME and SIZE_UTC_TIME_ERROR cannot be modified without breaking |
| 11224 | * WMI compatibility. |
| 11225 | */ |
| 11226 | /* The size of the utc time in bytes. */ |
| 11227 | #define SIZE_UTC_TIME (10) |
| 11228 | /* The size of the utc time error in bytes. */ |
| 11229 | #define SIZE_UTC_TIME_ERROR (5) |
| 11230 | |
| 11231 | /** Data structure to set the UTC time. */ |
| 11232 | typedef struct { |
| 11233 | /** TLV tag and len; tag equals |
| 11234 | * WMITLV_TAG_STRUC_wmi_ocb_set_utc_time_cmd_fixed_param */ |
| 11235 | A_UINT32 tlv_header; |
| 11236 | /*VDEV Identifier*/ |
| 11237 | A_UINT32 vdev_id; |
| 11238 | /** 10 bytes of the utc time. */ |
| 11239 | A_UINT32 utc_time[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME, SIZE_BYTE)]; |
| 11240 | /** 5 bytes of the time error. */ |
| 11241 | A_UINT32 time_error[WMI_PACKED_ARR_SIZE(SIZE_UTC_TIME_ERROR, SIZE_BYTE)]; |
| 11242 | } wmi_ocb_set_utc_time_cmd_fixed_param; |
| 11243 | |
| 11244 | #define WMI_UTC_TIME_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->utc_time, byte_index, SIZE_BYTE) |
| 11245 | #define WMI_UTC_TIME_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->utc_time, byte_index, SIZE_BYTE, val) |
| 11246 | #define WMI_TIME_ERROR_GET(ptr, byte_index) wmi_packed_arr_get_bits((ptr)->time_error, byte_index, SIZE_BYTE) |
| 11247 | #define WMI_TIME_ERROR_SET(ptr, byte_index, val) wmi_packed_arr_set_bits((ptr)->time_error, byte_index, SIZE_BYTE, val) |
| 11248 | |
| 11249 | /** Data structure start the timing advertisement. The template for the |
| 11250 | * timing advertisement frame follows this structure in the WMI command. |
| 11251 | */ |
| 11252 | typedef struct { |
| 11253 | /** TLV tag and len; tag equals |
| 11254 | * WMITLV_TAG_STRUC_wmi_ocb_start_timing_advert_cmd_fixed_param */ |
| 11255 | A_UINT32 tlv_header; |
| 11256 | /*VDEV Identifier*/ |
| 11257 | A_UINT32 vdev_id; |
| 11258 | /** Number of times the TA is sent every 5 seconds. */ |
| 11259 | A_UINT32 repeat_rate; |
| 11260 | /** The frequency on which to transmit. */ |
| 11261 | A_UINT32 channel_freq; /* MHz units */ |
| 11262 | /** The offset into the template of the timestamp. */ |
| 11263 | A_UINT32 timestamp_offset; |
| 11264 | /** The offset into the template of the time value. */ |
| 11265 | A_UINT32 time_value_offset; |
| 11266 | /** The length of the timing advertisement template. The |
| 11267 | * template is in the TLV data. */ |
| 11268 | A_UINT32 timing_advert_template_length; |
| 11269 | /** This is followed by a binary array containing the TA template. */ |
| 11270 | } wmi_ocb_start_timing_advert_cmd_fixed_param; |
| 11271 | |
| 11272 | /** Data structure to stop the timing advertisement. */ |
| 11273 | typedef struct { |
| 11274 | /** TLV tag and len; tag equals |
| 11275 | * WMITLV_TAG_STRUC_wmi_ocb_stop_timing_advert_cmd_fixed_param */ |
| 11276 | A_UINT32 tlv_header; |
| 11277 | /*VDEV Identifier*/ |
| 11278 | A_UINT32 vdev_id; |
| 11279 | A_UINT32 channel_freq; /* MHz units */ |
| 11280 | } wmi_ocb_stop_timing_advert_cmd_fixed_param; |
| 11281 | |
| 11282 | /** Data structure for the request for WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 11283 | typedef struct { |
| 11284 | /** TLV tag and len; tag equals |
| 11285 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_cmd_fixed_param */ |
| 11286 | A_UINT32 tlv_header; |
| 11287 | /*VDEV Identifier*/ |
| 11288 | A_UINT32 vdev_id; |
| 11289 | A_UINT32 reserved; |
| 11290 | } wmi_ocb_get_tsf_timer_cmd_fixed_param; |
| 11291 | |
| 11292 | /** Data structure for the response to WMI_OCB_GET_TSF_TIMER_CMDID. */ |
| 11293 | typedef struct { |
| 11294 | /** TLV tag and len; tag equals |
| 11295 | * WMITLV_TAG_STRUC_wmi_ocb_get_tsf_timer_resp_event_fixed_param */ |
| 11296 | A_UINT32 tlv_header; |
| 11297 | /*VDEV Identifier*/ |
| 11298 | A_UINT32 vdev_id; |
| 11299 | A_UINT32 tsf_timer_high; |
| 11300 | A_UINT32 tsf_timer_low; |
| 11301 | } wmi_ocb_get_tsf_timer_resp_event_fixed_param; |
| 11302 | |
| 11303 | /** Data structure for DCC stats configuration per channel. */ |
| 11304 | typedef struct { |
| 11305 | /** TLV tag and len; tag equals |
| 11306 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_stats_per_channel */ |
| 11307 | A_UINT32 tlv_header; |
| 11308 | |
| 11309 | /*VDEV Identifier*/ |
| 11310 | A_UINT32 vdev_id; |
| 11311 | |
| 11312 | /** The channel for which this applies, 16 bits. |
| 11313 | * The dcc_stats_bitmap, 8 bits. */ |
| 11314 | A_UINT32 chan_info; |
| 11315 | |
| 11316 | /** Demodulation model parameters. |
| 11317 | * |
| 11318 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 11319 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 11320 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 11321 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 11322 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 11323 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 11324 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 11325 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 11326 | */ |
| 11327 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 11328 | |
| 11329 | /** Communication ranges. |
| 11330 | * |
| 11331 | * tx_power, ndlType_txPower, 1+7 bits. |
| 11332 | * datarate, ndlType_datarate, 1+3 bits. |
| 11333 | */ |
| 11334 | A_UINT32 tx_power_datarate; |
| 11335 | /** |
| 11336 | * NDL_carrierSenseRange, ndlType_distance, 1+12 bits. |
| 11337 | * NDL_estCommRange, ndlType_distance, 1+12 bits. |
| 11338 | */ |
| 11339 | A_UINT32 carrier_sense_est_comm_range; |
| 11340 | |
| 11341 | /** Channel load measures. */ |
| 11342 | /** |
| 11343 | * dccSensitivity, ndlType_rxPower, 1+7 bits. |
| 11344 | * carrierSense, ndlType_rxPower, 1+7 bits. |
| 11345 | * NDL_channelLoad, ndlType_channelLoad, 1+10 bits. |
| 11346 | */ |
| 11347 | A_UINT32 dcc_stats; |
| 11348 | /** |
| 11349 | * NDL_packetArrivalRate, ndlType_arrivalRate, 1+13 bits. |
| 11350 | * NDL_packetAvgDuration, ndlType_packetDuration, 1+11 bits. |
| 11351 | */ |
| 11352 | A_UINT32 packet_stats; |
| 11353 | /** |
| 11354 | * NDL_channelBusyTime, ndlType_channelLoad, 1+10 bits. |
| 11355 | */ |
| 11356 | A_UINT32 channel_busy_time; |
| 11357 | /** |
| 11358 | *Transmit packet statistics. |
| 11359 | * NDL_txPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 11360 | * NDL_txPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 11361 | * NDL_txPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 11362 | * NDL_txPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 11363 | */ |
| 11364 | A_UINT32 tx_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 11365 | /** |
| 11366 | * NDL_txPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 11367 | * NDL_txPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 11368 | * NDL_txPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 11369 | * NDL_txPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 11370 | */ |
| 11371 | A_UINT32 tx_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 11372 | /** |
| 11373 | * NDL_txChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 11374 | * NDL_txChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 11375 | * NDL_txChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 11376 | * NDL_txChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 11377 | */ |
| 11378 | A_UINT32 tx_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 11379 | /** |
| 11380 | * NDL_txSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 11381 | * NDL_txSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 11382 | * NDL_txSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 11383 | * NDL_txSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 11384 | */ |
| 11385 | A_UINT32 tx_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 11386 | } wmi_dcc_ndl_stats_per_channel; |
| 11387 | |
| 11388 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 11389 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 11390 | #define WMI_NDL_STATS_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 11391 | #define WMI_NDL_STATS_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 11392 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 8) |
| 11393 | #define WMI_NDL_STATS_DCC_STATS_BITMAP_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 8, val) |
| 11394 | #define WMI_NDL_STATS_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 11395 | #define WMI_NDL_STATS_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 11396 | #define WMI_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 8) |
| 11397 | #define WMI_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 8, val) |
| 11398 | #define WMI_TX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->tx_power_datarate, 0, 4) |
| 11399 | #define WMI_TX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->tx_power_datarate, 0, 4, val) |
| 11400 | #define WMI_NDL_CARRIER_SENSE_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13) |
| 11401 | #define WMI_NDL_CARRIER_SENSE_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 0, 13, val) |
| 11402 | #define WMI_NDL_EST_COMM_RANGE_GET(ptr) WMI_GET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13) |
| 11403 | #define WMI_NDL_EST_COMM_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->carrier_sense_est_comm_range, 13, 13, val) |
| 11404 | #define WMI_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 0, 8) |
| 11405 | #define WMI_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 0, 8, val) |
| 11406 | #define WMI_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 8, 8) |
| 11407 | #define WMI_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 8, 8, val) |
| 11408 | #define WMI_NDL_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->dcc_stats, 16, 11) |
| 11409 | #define WMI_NDL_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_stats, 16, 11, val) |
| 11410 | #define WMI_NDL_PACKET_ARRIVAL_RATE_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 0, 14) |
| 11411 | #define WMI_NDL_PACKET_ARRIVAL_RATE_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 0, 14, val) |
| 11412 | #define WMI_NDL_PACKET_AVG_DURATION_GET(ptr) WMI_GET_BITS((ptr)->packet_stats, 14, 12) |
| 11413 | #define WMI_NDL_PACKET_AVG_DURATION_SET(ptr, val) WMI_SET_BITS((ptr)->packet_stats, 14, 12, val) |
| 11414 | #define WMI_NDL_CHANNEL_BUSY_TIME_GET(ptr) WMI_GET_BITS((ptr)->channel_busy_time, 0, 11) |
| 11415 | #define WMI_NDL_CHANNEL_BUSY_TIME_SET(ptr, val) WMI_SET_BITS((ptr)->channel_busy_time, 0, 11, val) |
| 11416 | |
| 11417 | #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) |
| 11418 | #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) |
| 11419 | #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) |
| 11420 | #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) |
| 11421 | #define WMI_NDL_TX_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tx_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 11422 | #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) |
| 11423 | #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) |
| 11424 | #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) |
| 11425 | |
| 11426 | /** Bitmap for DCC stats. */ |
| 11427 | typedef enum { |
| 11428 | DCC_STATS_DEMODULATION_MODEL = 1, |
| 11429 | DCC_STATS_COMMUNICATION_RANGES = 2, |
| 11430 | DCC_STATS_CHANNEL_LOAD_MEASURES = 4, |
| 11431 | DCC_STATS_TRANSMIT_PACKET_STATS = 8, |
| 11432 | DCC_STATS_TRANSMIT_MODEL_PARAMETER = 16, |
| 11433 | DCC_STATS_ALL = 0xff, |
| 11434 | } wmi_dcc_stats_bitmap; |
| 11435 | |
| 11436 | /** Data structure for getting the DCC stats. */ |
| 11437 | typedef struct { |
| 11438 | /** |
| 11439 | * TLV tag and len; tag equals |
| 11440 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_cmd_fixed_param |
| 11441 | */ |
| 11442 | A_UINT32 tlv_header; |
| 11443 | /* VDEV identifier */ |
| 11444 | A_UINT32 vdev_id; |
| 11445 | /**The number of channels for which stats are being requested. */ |
| 11446 | A_UINT32 num_channels; |
| 11447 | /** This is followed by a TLV array of wmi_dcc_channel_stats_request. */ |
| 11448 | } wmi_dcc_get_stats_cmd_fixed_param; |
| 11449 | |
| 11450 | typedef struct { |
| 11451 | /** |
| 11452 | * TLV tag and len; tag equals |
| 11453 | * WMITLV_TAG_STRUC_wmi_dcc_channel_stats_request. |
| 11454 | */ |
| 11455 | A_UINT32 tlv_header; |
| 11456 | /** The channel for which this applies. */ |
| 11457 | A_UINT32 chan_freq; /* MHz units */ |
| 11458 | /** The DCC stats being requested. */ |
| 11459 | A_UINT32 dcc_stats_bitmap; |
| 11460 | } wmi_dcc_channel_stats_request; |
| 11461 | |
| 11462 | /** Data structure for the response with the DCC stats. */ |
| 11463 | typedef struct { |
| 11464 | /** |
| 11465 | * TLV tag and len; tag equals |
| 11466 | * WMITLV_TAG_STRUC_wmi_dcc_get_stats_resp_event_fixed_param |
| 11467 | */ |
| 11468 | A_UINT32 tlv_header; |
| 11469 | /* VDEV identifier */ |
| 11470 | A_UINT32 vdev_id; |
| 11471 | /** Number of channels in the response. */ |
| 11472 | A_UINT32 num_channels; |
| 11473 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 11474 | } wmi_dcc_get_stats_resp_event_fixed_param; |
| 11475 | |
| 11476 | /** Data structure for clearing the DCC stats. */ |
| 11477 | typedef struct { |
| 11478 | /** |
| 11479 | * TLV tag and len; tag equals |
| 11480 | * WMITLV_TAG_STRUC_wmi_dcc_clear_stats_cmd_fixed_param |
| 11481 | */ |
| 11482 | A_UINT32 tlv_header; |
| 11483 | /* VDEV identifier */ |
| 11484 | A_UINT32 vdev_id; |
| 11485 | A_UINT32 dcc_stats_bitmap; |
| 11486 | } wmi_dcc_clear_stats_cmd_fixed_param; |
| 11487 | |
| 11488 | /** Data structure for the pushed DCC stats */ |
| 11489 | typedef struct { |
| 11490 | /** |
| 11491 | * TLV tag and len; tag equals |
| 11492 | * WMITLV_TAG_STRUC_wmi_dcc_stats_event_fixed_param |
| 11493 | */ |
| 11494 | A_UINT32 tlv_header; |
| 11495 | /* VDEV identifier */ |
| 11496 | A_UINT32 vdev_id; |
| 11497 | /** The number of channels in the response. */ |
| 11498 | A_UINT32 num_channels; |
| 11499 | /** This is followed by a TLV array of wmi_dcc_ndl_stats_per_channel. */ |
| 11500 | } wmi_dcc_stats_event_fixed_param; |
| 11501 | |
| 11502 | /** Data structure for updating NDL per channel. */ |
| 11503 | typedef struct { |
| 11504 | /** |
| 11505 | * TLV tag and len; tag equals |
| 11506 | * WMITLV_TAG_STRUC_wmi_dcc_ndl_chan |
| 11507 | */ |
| 11508 | A_UINT32 tlv_header; |
| 11509 | /** |
| 11510 | * Channel frequency, 16 bits |
| 11511 | * NDL_numActiveState, ndlType_numberElements, 1+6 bits |
| 11512 | */ |
| 11513 | A_UINT32 chan_info; |
| 11514 | /** |
| 11515 | * NDL_minDccSampling, 10 bits. |
| 11516 | * Maximum time interval between subsequent checks of the DCC rules. |
| 11517 | */ |
| 11518 | A_UINT32 ndl_min_dcc_sampling; |
| 11519 | /** |
| 11520 | * dcc_enable, 1 bit. |
| 11521 | * dcc_stats_enable, 1 bit. |
| 11522 | * dcc_stats_interval, 16 bits. |
| 11523 | */ |
| 11524 | A_UINT32 dcc_flags; |
| 11525 | /** General DCC configuration. |
| 11526 | * NDL_timeUp, ndlType_timing, 1+12 bits. |
| 11527 | * NDL_timeDown, ndlType_timing, 1+12 bits. |
| 11528 | */ |
| 11529 | A_UINT32 general_config; |
| 11530 | /** Transmit power thresholds. |
| 11531 | * NDL_minTxPower, ndlType_txPower, 1+7 bits. |
| 11532 | * NDL_maxTxPower, ndlType_txPower, 1+7 bits. |
| 11533 | */ |
| 11534 | /* see "ETSI TS 102 687" table above for units */ |
| 11535 | A_UINT32 min_max_tx_power; |
| 11536 | /** |
| 11537 | * NDL_defTxPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 11538 | * NDL_defTxPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 11539 | * NDL_defTxPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 11540 | * NDL_defTxPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 11541 | */ |
| 11542 | /* see "ETSI TS 102 687" table above for units */ |
| 11543 | A_UINT32 def_tx_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 11544 | /** Packet timing thresholds. |
| 11545 | * NDL_maxPacketDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 11546 | * NDL_maxPacketDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 11547 | * NDL_maxPacketDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 11548 | * NDL_maxPacketDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 11549 | */ |
| 11550 | A_UINT32 max_packet_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 11551 | /** |
| 11552 | * NDL_minPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 11553 | * NDL_maxPacketInterval, ndlType_packetInterval, 1+10 bits. |
| 11554 | */ |
| 11555 | A_UINT32 min_max_packet_interval; |
| 11556 | /** |
| 11557 | * NDL_defPacketInterval(AC_BK), ndlType_packetInterval, 1+10 bits. |
| 11558 | * NDL_defPacketInterval(AC_BE), ndlType_packetInterval, 1+10 bits. |
| 11559 | * NDL_defPacketInterval(AC_VI), ndlType_packetInterval, 1+10 bits. |
| 11560 | * NDL_defPacketInterval(AC_VO), ndlType_packetInterval, 1+10 bits |
| 11561 | */ |
| 11562 | A_UINT32 def_packet_interval_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETINTERVAL)]; |
| 11563 | /** Packet datarate thresholds. |
| 11564 | * NDL_minDatarate, ndlType_datarate, 1+3 bits. |
| 11565 | * NDL_maxDatarate, ndlType_datarate, 1+3 bits. |
| 11566 | */ |
| 11567 | A_UINT32 min_max_datarate; |
| 11568 | /** |
| 11569 | * NDL_defDatarate(AC_BK), ndlType_datarate, 1+3 bits. |
| 11570 | * NDL_defDatarate(AC_BE), ndlType_datarate, 1+3 bits. |
| 11571 | * NDL_defDatarate(AC_VI), ndlType_datarate, 1+3 bits. |
| 11572 | * NDL_defDatarate(AC_VO), ndlType_datarate, 1+3 bits. |
| 11573 | */ |
| 11574 | A_UINT32 def_datarate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_DATARATE)]; |
| 11575 | /** Receive signal thresholds. |
| 11576 | * NDL_minCarrierSense, ndlType_rxPower, 1+7 bits. |
| 11577 | * NDL_maxCarrierSense, ndlType_rxPower, 1+7 bits. |
| 11578 | * NDL_defCarrierSense, ndlType_rxPower, 1+7 bits. |
| 11579 | */ |
| 11580 | A_UINT32 min_max_def_carrier_sense; |
| 11581 | |
| 11582 | /** Receive model parameter. |
| 11583 | * NDL_defDccSensitivity, ndlType_rxPower, 1+7 bits. |
| 11584 | * NDL_maxCsRange, ndlType_distance, 1+12 bits. |
| 11585 | * NDL_refPathLoss, ndlType_pathloss, 1+5 bits. |
| 11586 | */ |
| 11587 | A_UINT32 receive_model_parameter; |
| 11588 | |
| 11589 | /** |
| 11590 | * NDL_minSNR, ndlType_snr, 1+7 bits. |
| 11591 | */ |
| 11592 | A_UINT32 receive_model_parameter_2; |
| 11593 | |
| 11594 | /** Demodulation model parameters. |
| 11595 | * NDL_snrBackoff(MCS0), ndlType_snr, 1+7 bits. |
| 11596 | * NDL_snrBackoff(MCS1), ndlType_snr, 1+7 bits. |
| 11597 | * NDL_snrBackoff(MCS2), ndlType_snr, 1+7 bits. |
| 11598 | * NDL_snrBackoff(MCS3), ndlType_snr, 1+7 bits. |
| 11599 | * NDL_snrBackoff(MCS4), ndlType_snr, 1+7 bits. |
| 11600 | * NDL_snrBackoff(MCS5), ndlType_snr, 1+7 bits. |
| 11601 | * NDL_snrBackoff(MCS6), ndlType_snr, 1+7 bits. |
| 11602 | * NDL_snrBackoff(MCS7), ndlType_snr, 1+7 bits. |
| 11603 | */ |
| 11604 | A_UINT32 snr_backoff_mcs[WMI_PACKED_ARR_SIZE(MCS_COUNT, SIZE_NDLTYPE_SNR)]; |
| 11605 | /** Transmit model parameters. |
| 11606 | * NDL_tmPacketArrivalRate(AC_BK), ndlType_arrivalRate, 1+13 bits. |
| 11607 | * NDL_tmPacketArrivalRate(AC_BE), ndlType_arrivalRate, 1+13 bits. |
| 11608 | * NDL_tmPacketArrivalRate(AC_VI), ndlType_arrivalRate, 1+13 bits. |
| 11609 | * NDL_tmPacketArrivalRate(AC_VO), ndlType_arrivalRate, 1+13 bits. |
| 11610 | */ |
| 11611 | A_UINT32 tm_packet_arrival_rate_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_ARRIVALRATE)]; |
| 11612 | /** |
| 11613 | * NDL_tmPacketAvgDuration(AC_BK), ndlType_packetDuration, 1+11 bits. |
| 11614 | * NDL_tmPacketAvgDuration(AC_BE), ndlType_packetDuration, 1+11 bits. |
| 11615 | * NDL_tmPacketAvgDuration(AC_VI), ndlType_packetDuration, 1+11 bits. |
| 11616 | * NDL_tmPacketAvgDuration(AC_VO), ndlType_packetDuration, 1+11 bits. |
| 11617 | */ |
| 11618 | A_UINT32 tm_packet_avg_duration_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_PACKETDURATION)]; |
| 11619 | /** |
| 11620 | * NDL_tmSignalAvgPower(AC_BK), ndlType_txPower, 1+7 bits. |
| 11621 | * NDL_tmSignalAvgPower(AC_BE), ndlType_txPower, 1+7 bits. |
| 11622 | * NDL_tmSignalAvgPower(AC_VI), ndlType_txPower, 1+7 bits. |
| 11623 | * NDL_tmSignalAvgPower(AC_VO), ndlType_txPower, 1+7 bits. |
| 11624 | */ |
| 11625 | A_UINT32 tm_signal_avg_power_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_TXPOWER)]; |
| 11626 | /* NDL_tmMaxChannelUse, ndlType_channelUse, 1+13 bits. */ |
| 11627 | A_UINT32 tm_max_channel_use; |
| 11628 | /** |
| 11629 | * NDL_tmChannelUse(AC_BK), ndlType_channelUse, 1+13 bits. |
| 11630 | * NDL_tmChannelUse(AC_BE), ndlType_channelUse, 1+13 bits. |
| 11631 | * NDL_tmChannelUse(AC_VI), ndlType_channelUse, 1+13 bits. |
| 11632 | * NDL_tmChannelUse(AC_VO), ndlType_channelUse, 1+13 bits. |
| 11633 | */ |
| 11634 | A_UINT32 tm_channel_use_ac[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_CHANNELUSE)]; |
| 11635 | /** Channel load thresholds. |
| 11636 | * NDL_minChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 11637 | * NDL_maxChannelLoad, ndlType_channelLoad, 1+10 bits. |
| 11638 | */ |
| 11639 | A_UINT32 min_max_channel_load; |
| 11640 | /** Transmit queue parameters. |
| 11641 | * NDL_numQueue, ndlType_acPrio, 1+3 bits. |
| 11642 | * NDL_refQueueStatus(AC_BK), ndlType_queueStatus, 1+1 bit. |
| 11643 | * NDL_refQueueStatus(AC_BE), ndlType_queueStatus, 1+1 bit. |
| 11644 | * NDL_refQueueStatus(AC_VI), ndlType_queueStatus, 1+1 bit. |
| 11645 | * NDL_refQueueStatus(AC_VO), ndlType_queueStatus, 1+1 bit. |
| 11646 | */ |
| 11647 | A_UINT32 transmit_queue_parameters; |
| 11648 | /** |
| 11649 | * NDL_refQueueLen(AC_BK), ndlType_numberElements, 1+6 bits. |
| 11650 | * NDL_refQueueLen(AC_BE), ndlType_numberElements, 1+6 bits. |
| 11651 | * NDL_refQueueLen(AC_VI), ndlType_numberElements, 1+6 bits. |
| 11652 | * NDL_refQueueLen(AC_VO), ndlType_numberElements, 1+6 bits. |
| 11653 | */ |
| 11654 | A_UINT32 numberElements[WMI_PACKED_ARR_SIZE(WLAN_MAX_AC, SIZE_NDLTYPE_NUMBERELEMENTS)]; |
| 11655 | } wmi_dcc_ndl_chan; |
| 11656 | |
| 11657 | #define WMI_CHAN_FREQ_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 0, 16) |
| 11658 | #define WMI_CHAN_FREQ_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 0, 16, val) |
| 11659 | #define WMI_NDL_NUM_ACTIVE_STATE_GET(ptr) WMI_GET_BITS((ptr)->chan_info, 16, 7) |
| 11660 | #define WMI_NDL_NUM_ACTIVE_STATE_SET(ptr, val) WMI_SET_BITS((ptr)->chan_info, 16, 7, val) |
| 11661 | |
| 11662 | #define WMI_NDL_MIN_DCC_SAMPLING_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10) |
| 11663 | #define WMI_NDL_MIN_DCC_SAMPLING_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 0, 10, val) |
| 11664 | |
| 11665 | #define WMI_NDL_MEASURE_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16) |
| 11666 | #define WMI_NDL_MEASURE_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->ndl_min_dcc_sampling, 10, 16, val) |
| 11667 | |
| 11668 | |
| 11669 | #define WMI_NDL_DCC_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 0, 1) |
| 11670 | #define WMI_NDL_DCC_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 0, 1, val) |
| 11671 | #define WMI_NDL_DCC_STATS_ENABLE_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 1, 1) |
| 11672 | #define WMI_NDL_DCC_STATS_ENABLE_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 1, 1, val) |
| 11673 | #define WMI_NDL_DCC_STATS_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->dcc_flags, 2, 16) |
| 11674 | #define WMI_NDL_DCC_STATS_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->dcc_flags, 2, 16, val) |
| 11675 | |
| 11676 | #define WMI_NDL_TIME_UP_GET(ptr) WMI_GET_BITS((ptr)->general_config, 0, 13) |
| 11677 | #define WMI_NDL_TIME_UP_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 0, 13, val) |
| 11678 | #define WMI_NDL_TIME_DOWN_GET(ptr) WMI_GET_BITS((ptr)->general_config, 13, 13) |
| 11679 | #define WMI_NDL_TIME_DOWN_SET(ptr, val) WMI_SET_BITS((ptr)->general_config, 13, 13, val) |
| 11680 | |
| 11681 | #define WMI_NDL_MIN_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 0, 8) |
| 11682 | #define WMI_NDL_MIN_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 0, 8, val) |
| 11683 | #define WMI_NDL_MAX_TX_POWER_GET(ptr) WMI_GET_BITS((ptr)->min_max_tx_power, 8, 8) |
| 11684 | #define WMI_NDL_MAX_TX_POWER_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_tx_power, 8, 8, val) |
| 11685 | |
| 11686 | #define WMI_NDL_DEF_TX_POWER_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_tx_power_ac, acprio, SIZE_NDLTYPE_TXPOWER) |
| 11687 | #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) |
| 11688 | |
| 11689 | #define WMI_NDL_MAX_PACKET_DURATION_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->max_packet_duration_ac, acprio, SIZE_NDLTYPE_PACKETDURATION) |
| 11690 | #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) |
| 11691 | #define WMI_NDL_MIN_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 0, 11) |
| 11692 | #define WMI_NDL_MIN_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 0, 11, val) |
| 11693 | #define WMI_NDL_MAX_PACKET_INTERVAL_GET(ptr) WMI_GET_BITS((ptr)->min_max_packet_interval, 11, 11) |
| 11694 | #define WMI_NDL_MAX_PACKET_INTERVAL_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_packet_interval, 11, 11, val) |
| 11695 | #define WMI_NDL_DEF_PACKET_INTERVAL_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_packet_interval_ac, acprio, SIZE_NDLTYPE_PACKETINTERVAL) |
| 11696 | #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) |
| 11697 | |
| 11698 | #define WMI_NDL_MIN_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 0, 4) |
| 11699 | #define WMI_NDL_MIN_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 0, 4, val) |
| 11700 | #define WMI_NDL_MAX_DATARATE_GET(ptr) WMI_GET_BITS((ptr)->min_max_datarate, 4, 4) |
| 11701 | #define WMI_NDL_MAX_DATARATE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_datarate, 4, 4, val) |
| 11702 | #define WMI_NDL_DEF_DATARATE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE) |
| 11703 | #define WMI_NDL_DEF_DATARATE_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->def_datarate_ac, acprio, SIZE_NDLTYPE_DATARATE, val) |
| 11704 | |
| 11705 | #define WMI_NDL_MIN_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 0, 8) |
| 11706 | #define WMI_NDL_MIN_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 0, 8, val) |
| 11707 | #define WMI_NDL_MAX_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 8, 8) |
| 11708 | #define WMI_NDL_MAX_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 8, 8, val) |
| 11709 | #define WMI_NDL_DEF_CARRIER_SENSE_GET(ptr) WMI_GET_BITS((ptr)->min_max_def_carrier_sense, 16, 8) |
| 11710 | #define WMI_NDL_DEF_CARRIER_SENSE_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_def_carrier_sense, 16, 8, val) |
| 11711 | |
| 11712 | #define WMI_NDL_DEF_DCC_SENSITIVITY_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 0, 8) |
| 11713 | #define WMI_NDL_DEF_DCC_SENSITIVITY_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 0, 8, val) |
| 11714 | #define WMI_NDL_MAX_CS_RANGE_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 8, 13) |
| 11715 | #define WMI_NDL_MAX_CS_RANGE_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 8, 13, val) |
| 11716 | #define WMI_NDL_REF_PATH_LOSS_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter, 21, 6) |
| 11717 | #define WMI_NDL_REF_PATH_LOSS_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter, 21, 6, val) |
| 11718 | |
| 11719 | #define WMI_NDL_MIN_SNR_GET(ptr) WMI_GET_BITS((ptr)->receive_model_parameter_2, 0, 8) |
| 11720 | #define WMI_NDL_MIN_SNR_SET(ptr, val) WMI_SET_BITS((ptr)->receive_model_parameter_2, 0, 8, val) |
| 11721 | |
| 11722 | #define WMI_NDL_SNR_BACKOFF_GET(ptr, mcs) wmi_packed_arr_get_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR) |
| 11723 | #define WMI_NDL_SNR_BACKOFF_SET(ptr, mcs, val) wmi_packed_arr_set_bits((ptr)->snr_backoff_mcs, mcs, SIZE_NDLTYPE_SNR, val) |
| 11724 | |
| 11725 | #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) |
| 11726 | #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) |
| 11727 | #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) |
| 11728 | #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) |
| 11729 | #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) |
| 11730 | #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) |
| 11731 | #define WMI_NDL_TM_MAX_CHANNEL_USE_GET(ptr) WMI_GET_BITS((ptr)->tm_max_channel_use, 0, 14) |
| 11732 | #define WMI_NDL_TM_MAX_CHANNEL_USE_SET(ptr, val) WMI_SET_BITS((ptr)->tm_max_channel_use, 0, 14, val) |
| 11733 | #define WMI_NDL_TM_CHANNEL_USE_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->tm_channel_use_ac, acprio, SIZE_NDLTYPE_CHANNELUSE) |
| 11734 | #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) |
| 11735 | |
| 11736 | #define WMI_NDL_MIN_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 0, 11) |
| 11737 | #define WMI_NDL_MIN_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 0, 11, val) |
| 11738 | #define WMI_NDL_MAX_CHANNEL_LOAD_GET(ptr) WMI_GET_BITS((ptr)->min_max_channel_load, 11, 11) |
| 11739 | #define WMI_NDL_MAX_CHANNEL_LOAD_SET(ptr, val) WMI_SET_BITS((ptr)->min_max_channel_load, 11, 11, val) |
| 11740 | |
| 11741 | #define WMI_NDL_NUM_QUEUE_GET(ptr) WMI_GET_BITS((ptr)->transmit_queue_parameters, 0, 4) |
| 11742 | #define WMI_NDL_NUM_QUEUE_SET(ptr, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, 0, 4, val) |
| 11743 | #define WMI_NDL_REF_QUEUE_STATUS_GET(ptr, acprio) WMI_GET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2) |
| 11744 | #define WMI_NDL_REF_QUEUE_STATUS_SET(ptr, acprio, val) WMI_SET_BITS((ptr)->transmit_queue_parameters, (4 + (acprio * 2)), 2, val) |
| 11745 | #define WMI_NDL_REF_QUEUE_LEN_GET(ptr, acprio) wmi_packed_arr_get_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS) |
| 11746 | #define WMI_NDL_REF_QUEUE_LEN_SET(ptr, acprio, val) wmi_packed_arr_set_bits((ptr)->numberElements, acprio, SIZE_NDLTYPE_NUMBERELEMENTS, val) |
| 11747 | |
| 11748 | /** Data structure for updating the NDL. */ |
| 11749 | typedef struct { |
| 11750 | /** TLV tag and len; tag equals |
| 11751 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_cmd_fixed_param */ |
| 11752 | A_UINT32 tlv_header; |
| 11753 | /* VDEV identifier */ |
| 11754 | A_UINT32 vdev_id; |
| 11755 | /** The number of channels in the request. */ |
| 11756 | A_UINT32 num_channel; |
| 11757 | /** This is followed by a TLV array of wmi_dcc_ndl_chan. */ |
| 11758 | /** This is followed by a TLV array of wmi_dcc_ndl_active_state_config. */ |
| 11759 | } wmi_dcc_update_ndl_cmd_fixed_param; |
| 11760 | |
| 11761 | typedef struct { |
| 11762 | /** |
| 11763 | * TLV tag and len; tag equals |
| 11764 | * WMITLV_TAG_STRUC_wmi_dcc_update_ndl_resp_event_fixed_param |
| 11765 | */ |
| 11766 | A_UINT32 tlv_header; |
| 11767 | /* VDEV identifier */ |
| 11768 | A_UINT32 vdev_id; |
| 11769 | A_UINT32 status; |
| 11770 | } wmi_dcc_update_ndl_resp_event_fixed_param; |
| 11771 | |
| 11772 | /* Actions for TSF timestamp */ |
| 11773 | typedef enum { |
| 11774 | TSF_TSTAMP_CAPTURE_REQ = 1, |
| 11775 | TSF_TSTAMP_CAPTURE_RESET = 2, |
| 11776 | TSF_TSTAMP_READ_VALUE = 3, |
| 11777 | } wmi_tsf_tstamp_action; |
| 11778 | |
| 11779 | typedef struct { |
| 11780 | /** TLV tag and len; tag equals |
| 11781 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */ |
| 11782 | A_UINT32 tlv_header; |
| 11783 | /** unique id identifying the VDEV, generated by the caller */ |
| 11784 | A_UINT32 vdev_id; |
| 11785 | /* action type, refer to wmi_tsf_tstamp_action */ |
| 11786 | A_UINT32 tsf_action; |
| 11787 | } wmi_vdev_tsf_tstamp_action_cmd_fixed_param; |
| 11788 | |
| 11789 | typedef struct { |
| 11790 | /* TLV tag and len; tag equals |
| 11791 | * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */ |
| 11792 | A_UINT32 tlv_header; |
| 11793 | /* VDEV identifier */ |
| 11794 | A_UINT32 vdev_id; |
| 11795 | /* low 32bit of tsf */ |
| 11796 | A_UINT32 tsf_low; |
| 11797 | /* high 32 bit of tsf */ |
| 11798 | A_UINT32 tsf_high; |
| 11799 | } wmi_vdev_tsf_report_event_fixed_param; |
| 11800 | |
| 11801 | typedef struct { |
| 11802 | /** TLV tag and len; tag equals |
| 11803 | * WMITLV_TAG_STRUC_wmi_vdev_set_ie_cmd_fixed_param */ |
| 11804 | A_UINT32 tlv_header; |
| 11805 | /* unique id identifying the VDEV, generated by the caller */ |
| 11806 | A_UINT32 vdev_id; |
| 11807 | /* unique id to identify the ie_data as defined by ieee 802.11 spec */ |
| 11808 | A_UINT32 ie_id; |
| 11809 | /* ie_len corresponds to num of bytes in ie_data[] */ |
| 11810 | A_UINT32 ie_len; |
| 11811 | /* |
| 11812 | * Following this structure is the TLV byte stream of ie data of length |
| 11813 | * buf_len: |
| 11814 | * A_UINT8 ie_data[]; |
| 11815 | */ |
| 11816 | } wmi_vdev_set_ie_cmd_fixed_param; |
| 11817 | |
| 11818 | typedef struct { |
| 11819 | /* |
| 11820 | * TLV tag and len; tag equals |
| 11821 | * WMITLV_TAG_STRUC_wmi_soc_set_pcl_cmd_fixed_param |
| 11822 | * Set Preferred Channel List |
| 11823 | */ |
| 11824 | A_UINT32 tlv_header; |
| 11825 | |
| 11826 | /* # of channels to scan */ |
| 11827 | A_UINT32 num_chan; |
| 11828 | /* |
| 11829 | * TLV (tag length value ) parameters follow the wmi_soc_set_pcl_cmd |
| 11830 | * structure. The TLV's are: |
| 11831 | * A_UINT32 channel_list[]; |
| 11832 | */ |
| 11833 | } wmi_soc_set_pcl_cmd_fixed_param; |
| 11834 | |
| 11835 | typedef struct { |
| 11836 | /* TLV tag and len; tag equals |
| 11837 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_cmd_fixed_param |
| 11838 | * Set Hardware Mode */ |
| 11839 | A_UINT32 tlv_header; |
| 11840 | |
| 11841 | /* Hardware Mode Index */ |
| 11842 | A_UINT32 hw_mode_index; |
| 11843 | } wmi_soc_set_hw_mode_cmd_fixed_param; |
| 11844 | |
| 11845 | typedef struct { |
| 11846 | /* |
| 11847 | * TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_cmd_fixed_param |
| 11848 | * Set Dual MAC Firmware Configuration |
| 11849 | */ |
| 11850 | A_UINT32 tlv_header; |
| 11851 | |
| 11852 | /* Concurrent scan configuration bits */ |
| 11853 | A_UINT32 concurrent_scan_config_bits; |
| 11854 | /* Firmware mode configuration bits */ |
| 11855 | A_UINT32 fw_mode_config_bits; |
| 11856 | } wmi_soc_set_dual_mac_config_cmd_fixed_param; |
| 11857 | |
| 11858 | typedef struct { |
| 11859 | A_UINT32 num_tx_chains; |
| 11860 | A_UINT32 num_rx_chains; |
| 11861 | A_UINT32 reserved[2]; |
| 11862 | } soc_num_tx_rx_chains; |
| 11863 | |
| 11864 | typedef struct { |
| 11865 | A_UINT32 num_tx_chains_2g; |
| 11866 | A_UINT32 num_rx_chains_2g; |
| 11867 | A_UINT32 num_tx_chains_5g; |
| 11868 | A_UINT32 num_rx_chains_5g; |
| 11869 | } band_num_tx_rx_chains; |
| 11870 | |
| 11871 | typedef union { |
| 11872 | soc_num_tx_rx_chains soc_txrx_chain_setting; |
| 11873 | band_num_tx_rx_chains band_txrx_chain_setting; |
| 11874 | } antenna_num_tx_rx_chains; |
| 11875 | |
| 11876 | typedef enum { |
| 11877 | ANTENNA_MODE_DISABLED = 0x0, |
| 11878 | ANTENNA_MODE_LOW_POWER_LOCATION_SCAN = 0x01, |
| 11879 | /* reserved */ |
| 11880 | } antenna_mode_reason; |
| 11881 | |
| 11882 | typedef struct { |
| 11883 | /* |
| 11884 | * TLV tag and len; |
| 11885 | * tag equals WMITLV_TAG_STRUC_wmi_soc_set_antenna_mode_cmd_fixed_param |
| 11886 | */ |
| 11887 | A_UINT32 tlv_header; |
| 11888 | |
| 11889 | /* the reason for setting antenna mode, refer antenna_mode_reason */ |
| 11890 | A_UINT32 reason; |
| 11891 | |
| 11892 | /* |
| 11893 | * The above reason parameter will select whether the following union |
| 11894 | * is soc_num_tx_rx_chains or band_num_tx_rx_chains. |
| 11895 | */ |
| 11896 | antenna_num_tx_rx_chains num_txrx_chains_setting; |
| 11897 | } wmi_soc_set_antenna_mode_cmd_fixed_param; |
| 11898 | |
| 11899 | |
| 11900 | /** Data structure for information specific to a VDEV to MAC mapping. */ |
| 11901 | typedef struct { |
| 11902 | /* |
| 11903 | * TLV tag and len; tag equals |
| 11904 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_vdev_mac_entry */ |
| 11905 | A_UINT32 tlv_header; |
| 11906 | A_UINT32 vdev_id; /* VDEV ID */ |
| 11907 | A_UINT32 mac_id; /* MAC ID */ |
| 11908 | } wmi_soc_set_hw_mode_response_vdev_mac_entry; |
| 11909 | |
| 11910 | typedef struct { |
| 11911 | /* TLV tag and len; tag equals |
| 11912 | * WMITLV_TAG_STRUC_wmi_soc_set_hw_mode_response_event_fixed_param |
| 11913 | * Set Hardware Mode Response Event **/ |
| 11914 | A_UINT32 tlv_header; |
| 11915 | |
| 11916 | /* Status of set_hw_mode command |
| 11917 | * Values for Status: |
| 11918 | * 0 - OK; command successful |
| 11919 | * 1 - EINVAL; Requested invalid hw_mode |
| 11920 | * 2 - ECANCELED; HW mode change canceled |
| 11921 | * 3 - ENOTSUP; HW mode not supported |
| 11922 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 11923 | * 5 - EPENDING; HW mode change is pending |
| 11924 | * 6 - ECOEX; HW mode change conflict with Coex |
| 11925 | */ |
| 11926 | A_UINT32 status; |
| 11927 | /* Configured Hardware Mode */ |
| 11928 | A_UINT32 cfgd_hw_mode_index; |
| 11929 | /* Number of Vdev to Mac entries */ |
| 11930 | A_UINT32 num_vdev_mac_entries; |
| 11931 | /* |
| 11932 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 11933 | * structure. The TLV's are: |
| 11934 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 11935 | */ |
| 11936 | } wmi_soc_set_hw_mode_response_event_fixed_param; |
| 11937 | |
| 11938 | typedef struct { |
| 11939 | /* |
| 11940 | * TLV tag and len; tag equals |
| 11941 | * WMITLV_TAG_STRUC_wmi_soc_hw_mode_transition_event_fixed_param |
| 11942 | * Hardware Mode Transition Event |
| 11943 | */ |
| 11944 | A_UINT32 tlv_header; |
| 11945 | /* Original or old Hardware mode */ |
| 11946 | A_UINT32 old_hw_mode_index; |
| 11947 | /* New Hardware Mode */ |
| 11948 | A_UINT32 new_hw_mode_index; |
| 11949 | /* Number of Vdev to Mac entries */ |
| 11950 | A_UINT32 num_vdev_mac_entries; |
| 11951 | |
| 11952 | /** |
| 11953 | * TLV (tag length value ) parameters follow the soc_set_hw_mode_response_event |
| 11954 | * structure. The TLV's are: |
| 11955 | * A_UINT32 wmi_soc_set_hw_mode_response_vdev_mac_entry[]; |
| 11956 | */ |
| 11957 | } wmi_soc_hw_mode_transition_event_fixed_param; |
| 11958 | |
| 11959 | |
| 11960 | typedef struct { |
| 11961 | /* |
| 11962 | * TLV tag and len; tag equals |
| 11963 | * WMITLV_TAG_STRUC_wmi_soc_set_dual_mac_config_response_event_fixed_param |
| 11964 | * Set Dual MAC Config Response Event |
| 11965 | */ |
| 11966 | A_UINT32 tlv_header; |
| 11967 | |
| 11968 | /* Status for set_dual_mac_config command */ |
| 11969 | /* |
| 11970 | * Values for Status: |
| 11971 | * 0 - OK; command successful |
| 11972 | * 1 - EINVAL; Requested invalid hw_mode |
| 11973 | * 3 - ENOTSUP; HW mode not supported |
| 11974 | * 4 - EHARDWARE; HW mode change prevented by hardware |
| 11975 | * 6 - ECOEX; HW mode change conflict with Coex |
| 11976 | */ |
| 11977 | A_UINT32 status; |
| 11978 | } wmi_soc_set_dual_mac_config_response_event_fixed_param; |
| 11979 | |
| 11980 | typedef enum { |
| 11981 | MAWC_MOTION_STATE_UNKNOWN, |
| 11982 | MAWC_MOTION_STATE_STATIONARY, |
| 11983 | MAWC_MOTION_STATE_WALK, |
| 11984 | MAWC_MOTION_STATE_TRANSIT, |
| 11985 | } MAWC_MOTION_STATE; |
| 11986 | |
| 11987 | typedef enum { |
| 11988 | MAWC_SENSOR_STATUS_OK, |
| 11989 | MAWC_SENSOR_STATUS_FAILED_TO_ENABLE, |
| 11990 | MAWC_SENSOR_STATUS_SHUTDOWN, |
| 11991 | } MAWC_SENSOR_STATUS; |
| 11992 | |
| 11993 | typedef struct { |
| 11994 | /* TLV tag and len; tag equals |
| 11995 | * WMITLV_TAG_STRUC_wmi_mawc_sensor_report_ind_cmd_fixed_param */ |
| 11996 | A_UINT32 tlv_header; |
| 11997 | /** new motion state, MAWC_MOTION_STATE */ |
| 11998 | A_UINT32 motion_state; |
| 11999 | /** status code of sensor, MAWC_SENSOR_STATUS */ |
| 12000 | A_UINT32 sensor_status; |
| 12001 | } wmi_mawc_sensor_report_ind_cmd_fixed_param; |
| 12002 | |
| 12003 | typedef struct { |
| 12004 | /* TLV tag and len; tag equals |
| 12005 | * WMITLV_TAG_STRUC_wmi_mawc_enable_sensor_event_fixed_param */ |
| 12006 | A_UINT32 tlv_header; |
| 12007 | /* enable(1) or disable(0) */ |
| 12008 | A_UINT32 enable; |
| 12009 | } wmi_mawc_enable_sensor_event_fixed_param; |
| 12010 | |
| 12011 | typedef struct { |
| 12012 | /* TLV tag and len; tag equals |
| 12013 | * WMITLV_TAG_STRUC_wmi_extscan_configure_mawc_cmd_fixed_param */ |
| 12014 | A_UINT32 tlv_header; |
| 12015 | /* Unique id identifying the VDEV */ |
| 12016 | A_UINT32 vdev_id; |
| 12017 | /* enable(1) or disable(0) MAWC */ |
| 12018 | A_UINT32 enable; |
| 12019 | /* ratio of skipping suppressing scan, skip one out of x */ |
| 12020 | A_UINT32 suppress_ratio; |
| 12021 | } wmi_extscan_configure_mawc_cmd_fixed_param; |
| 12022 | |
| 12023 | typedef struct { |
| 12024 | /* TLV tag and len; tag equals |
| 12025 | * WMITLV_TAG_STRUC_wmi_nlo_configure_mawc_cmd_fixed_param */ |
| 12026 | A_UINT32 tlv_header; |
| 12027 | /* Unique id identifying the VDEV */ |
| 12028 | A_UINT32 vdev_id; |
| 12029 | /* enable(1) or disable(0) MAWC */ |
| 12030 | A_UINT32 enable; |
| 12031 | /* ratio of exponential backoff, next = current + current*ratio/100 */ |
| 12032 | A_UINT32 exp_backoff_ratio; |
| 12033 | /* initial scan interval(msec) */ |
| 12034 | A_UINT32 init_scan_interval; |
| 12035 | /* max scan interval(msec) */ |
| 12036 | A_UINT32 max_scan_interval; |
| 12037 | } wmi_nlo_configure_mawc_cmd_fixed_param; |
| 12038 | |
| 12039 | typedef struct { |
| 12040 | /* TLV tag and len; tag equals |
| 12041 | * WMITLV_TAG_STRUC_wmi_roam_configure_mawc_cmd_fixed_param */ |
| 12042 | A_UINT32 tlv_header; |
| 12043 | /* Unique id identifying the VDEV */ |
| 12044 | A_UINT32 vdev_id; |
| 12045 | /* enable(1) or disable(0) MAWC */ |
| 12046 | A_UINT32 enable; |
| 12047 | /* data traffic load (kBps) to register CMC */ |
| 12048 | A_UINT32 traffic_load_threshold; |
| 12049 | /* RSSI threshold (dBm) to scan for Best AP */ |
| 12050 | A_UINT32 best_ap_rssi_threshold; |
| 12051 | /* high RSSI threshold adjustment in Stationary to suppress scan */ |
| 12052 | A_UINT32 rssi_stationary_high_adjust; |
| 12053 | /* low RSSI threshold adjustment in Stationary to suppress scan */ |
| 12054 | A_UINT32 rssi_stationary_low_adjust; |
| 12055 | } wmi_roam_configure_mawc_cmd_fixed_param; |
| 12056 | |
| 12057 | #define WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD 2 |
| 12058 | #define WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER 10 |
| 12059 | |
| 12060 | typedef enum { |
| 12061 | PACKET_FILTER_TYPE_INVALID = 0, |
| 12062 | PACKET_FILTER_TYPE_FILTER_PKT, |
| 12063 | PACKET_FILTER_TYPE_RESERVE_PKT, /* not used */ |
| 12064 | PACKET_FILTER_TYPE_MAX_ENUM_SIZE |
| 12065 | } WMI_PACKET_FILTER_FILTER_TYPE; |
| 12066 | |
| 12067 | typedef enum { |
| 12068 | PACKET_FILTER_PROTO_TYPE_INVALID = 0, |
| 12069 | |
| 12070 | /* L2 header */ |
| 12071 | PACKET_FILTER_PROTO_TYPE_MAC, |
| 12072 | PACKET_FILTER_PROTO_TYPE_SNAP, |
| 12073 | |
| 12074 | /* L3 header (EtherType) */ |
| 12075 | PACKET_FILTER_PROTO_TYPE_IPV4, |
| 12076 | PACKET_FILTER_PROTO_TYPE_IPV6, |
| 12077 | |
| 12078 | /* L4 header (IP protocol) */ |
| 12079 | PACKET_FILTER_PROTO_TYPE_UDP, |
| 12080 | PACKET_FILTER_PROTO_TYPE_TCP, |
| 12081 | PACKET_FILTER_PROTO_TYPE_ICMPV6, |
| 12082 | |
| 12083 | PACKET_FILTER_PROTO_TYPE_MAX |
| 12084 | } WMI_PACKET_FILTER_PROTO_TYPE; |
| 12085 | |
| 12086 | typedef enum { |
| 12087 | PACKET_FILTER_CMP_TYPE_INVALID = 0, |
| 12088 | PACKET_FILTER_CMP_TYPE_EQUAL, |
| 12089 | PACKET_FILTER_CMP_TYPE_MASK_EQUAL, |
| 12090 | PACKET_FILTER_CMP_TYPE_NOT_EQUAL, |
| 12091 | PACKET_FILTER_CMP_TYPE_MASK_NOT_EQUAL, |
| 12092 | PACKET_FILTER_CMP_TYPE_ADDRTYPE, |
| 12093 | PACKET_FILTER_CMP_TYPE_MAX |
| 12094 | } WMI_PACKET_FILTER_CMP_TYPE; |
| 12095 | |
| 12096 | typedef enum { |
| 12097 | PACKET_FILTER_SET_INACTIVE = 0, |
| 12098 | PACKET_FILTER_SET_ACTIVE |
| 12099 | } WMI_PACKET_FILTER_ACTION; |
| 12100 | |
| 12101 | typedef enum { |
| 12102 | PACKET_FILTER_SET_DISABLE = 0, |
| 12103 | PACKET_FILTER_SET_ENABLE |
| 12104 | } WMI_PACKET_FILTER_RUNTIME_ENABLE; |
| 12105 | |
| 12106 | typedef struct { |
| 12107 | A_UINT32 proto_type; |
| 12108 | A_UINT32 cmp_type; |
| 12109 | A_UINT32 data_length; /* Length of the data to compare (units = bytes) */ |
| 12110 | /* |
| 12111 | * from start of the respective frame header ( |
| 12112 | * units = bytes) |
| 12113 | */ |
| 12114 | A_UINT32 data_offset; |
| 12115 | /* Data to compare, little-endian order */ |
| 12116 | A_UINT32 compareData[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 12117 | /* Mask to be applied on rcvd packet data before compare, little-endian order */ |
| 12118 | A_UINT32 dataMask[WMI_PACKET_FILTER_COMPARE_DATA_LEN_DWORD]; |
| 12119 | } WMI_PACKET_FILTER_PARAMS_TYPE; |
| 12120 | |
| 12121 | typedef struct { |
| 12122 | A_UINT32 tlv_header; |
| 12123 | A_UINT32 vdev_id; |
| 12124 | A_UINT32 filter_id; |
| 12125 | A_UINT32 filter_action; /* WMI_PACKET_FILTER_ACTION */ |
| 12126 | A_UINT32 filter_type; |
| 12127 | A_UINT32 num_params; /* how many entries in paramsData are valid */ |
| 12128 | A_UINT32 coalesce_time; /* not currently used - fill with 0x0 */ |
| 12129 | WMI_PACKET_FILTER_PARAMS_TYPE paramsData[WMI_PACKET_FILTER_MAX_CMP_PER_PACKET_FILTER]; |
| 12130 | } WMI_PACKET_FILTER_CONFIG_CMD_fixed_param; |
| 12131 | |
| 12132 | /* enable / disable all filters within the specified vdev */ |
| 12133 | typedef struct { |
| 12134 | A_UINT32 tlv_header; |
| 12135 | A_UINT32 vdev_id; |
| 12136 | A_UINT32 enable; /* WMI_PACKET_FILTER_RUNTIME_ENABLE */ |
| 12137 | } WMI_PACKET_FILTER_ENABLE_CMD_fixed_param; |
| 12138 | |
| 12139 | |
| 12140 | #define WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS 0 |
| 12141 | #define WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS 9 |
| 12142 | |
| 12143 | #define WMI_LRO_INFO_TCP_FLAG_VALS_SET(tcp_flag_u32, tcp_flag_values) \ |
| 12144 | WMI_SET_BITS(tcp_flag_u32, \ |
| 12145 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 12146 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS, \ |
| 12147 | tcp_flag_values) |
| 12148 | #define WMI_LRO_INFO_TCP_FLAG_VALS_GET(tcp_flag_u32) \ |
| 12149 | WMI_GET_BITS(tcp_flag_u32, \ |
| 12150 | WMI_LRO_INFO_TCP_FLAG_VALS_BITPOS, \ |
| 12151 | WMI_LRO_INFO_TCP_FLAG_VALS_NUMBITS) |
| 12152 | |
| 12153 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS 9 |
| 12154 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS 9 |
| 12155 | |
| 12156 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_SET(tcp_flag_u32, tcp_flags_mask) \ |
| 12157 | WMI_SET_BITS(tcp_flag_u32, \ |
| 12158 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 12159 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS, \ |
| 12160 | tcp_flags_mask) |
| 12161 | #define WMI_LRO_INFO_TCP_FLAGS_MASK_GET(tcp_flag_u32) \ |
| 12162 | WMI_GET_BITS(tcp_flag_u32, \ |
| 12163 | WMI_LRO_INFO_TCP_FLAGS_MASK_BITPOS, \ |
| 12164 | WMI_LRO_INFO_TCP_FLAGS_MASK_NUMBITS) |
| 12165 | |
| 12166 | typedef struct { |
| 12167 | A_UINT32 tlv_header; |
| 12168 | /** |
| 12169 | * @brief lro_enable - indicates whether lro is enabled |
| 12170 | * [0] LRO Enable |
| 12171 | */ |
| 12172 | A_UINT32 lro_enable; |
| 12173 | /** |
| 12174 | * @brief tcp_flag_u32 - mask of which TCP flags to check and |
| 12175 | * values to check for |
| 12176 | * [8:0] TCP flag values - If the TCP flags from the packet do not match |
| 12177 | * the values in this field after masking with TCP flags mask |
| 12178 | * below,LRO eligible will not be set |
| 12179 | * [17:9] TCP flags mask - Mask field for comparing the TCP values |
| 12180 | * provided above with the TCP flags field in the received packet |
| 12181 | * Use WMI_LRO_INFO_TCP_FLAG_VALS and WMI_LRO_INFO_TCP_FLAGS_MASK |
| 12182 | * macros to isolate the mask field and values field that are packed |
| 12183 | * into this u32 "word". |
| 12184 | */ |
| 12185 | A_UINT32 tcp_flag_u32; |
| 12186 | /** |
| 12187 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 12188 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 12189 | * bytes 0 to 3 |
| 12190 | * |
| 12191 | * In this and all the below toeplitz_hash fields, the bytes are |
| 12192 | * specified in little-endian order. For example: |
| 12193 | * toeplitz_hash_ipv4_0_3 bits 7:0 holds seed byte 0 |
| 12194 | * toeplitz_hash_ipv4_0_3 bits 15:8 holds seed byte 1 |
| 12195 | * toeplitz_hash_ipv4_0_3 bits 23:16 holds seed byte 2 |
| 12196 | * toeplitz_hash_ipv4_0_3 bits 31:24 holds seed byte 3 |
| 12197 | */ |
| 12198 | A_UINT32 toeplitz_hash_ipv4_0_3; |
| 12199 | |
| 12200 | /** |
| 12201 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 12202 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 12203 | * bytes 4 to 7 |
| 12204 | */ |
| 12205 | A_UINT32 toeplitz_hash_ipv4_4_7; |
| 12206 | |
| 12207 | /** |
| 12208 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 12209 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 12210 | * bytes 8 to 11 |
| 12211 | */ |
| 12212 | A_UINT32 toeplitz_hash_ipv4_8_11; |
| 12213 | |
| 12214 | /** |
| 12215 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 12216 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 12217 | * bytes 12 to 15 |
| 12218 | */ |
| 12219 | A_UINT32 toeplitz_hash_ipv4_12_15; |
| 12220 | |
| 12221 | /** |
| 12222 | * @brief toeplitz_hash_ipv4 - contains seed needed to compute |
| 12223 | * the flow id 5-tuple toeplitz hash for IPv4 packets. Contains |
| 12224 | * byte 16 |
| 12225 | */ |
| 12226 | A_UINT32 toeplitz_hash_ipv4_16; |
| 12227 | |
| 12228 | /** |
| 12229 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12230 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12231 | * bytes 0 to 3 |
| 12232 | */ |
| 12233 | A_UINT32 toeplitz_hash_ipv6_0_3; |
| 12234 | |
| 12235 | /** |
| 12236 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12237 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12238 | * bytes 4 to 7 |
| 12239 | */ |
| 12240 | A_UINT32 toeplitz_hash_ipv6_4_7; |
| 12241 | |
| 12242 | /** |
| 12243 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12244 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12245 | * bytes 8 to 11 |
| 12246 | */ |
| 12247 | A_UINT32 toeplitz_hash_ipv6_8_11; |
| 12248 | |
| 12249 | /** |
| 12250 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12251 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12252 | * bytes 12 to 15 |
| 12253 | */ |
| 12254 | A_UINT32 toeplitz_hash_ipv6_12_15; |
| 12255 | |
| 12256 | /** |
| 12257 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12258 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12259 | * bytes 16 to 19 |
| 12260 | */ |
| 12261 | A_UINT32 toeplitz_hash_ipv6_16_19; |
| 12262 | |
| 12263 | /** |
| 12264 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12265 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12266 | * bytes 20 to 22 |
| 12267 | */ |
| 12268 | A_UINT32 toeplitz_hash_ipv6_20_23; |
| 12269 | |
| 12270 | /** |
| 12271 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12272 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12273 | * bytes 24 to 27 |
| 12274 | */ |
| 12275 | A_UINT32 toeplitz_hash_ipv6_24_27; |
| 12276 | |
| 12277 | /** |
| 12278 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12279 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12280 | * bytes 28 to 31 |
| 12281 | */ |
| 12282 | A_UINT32 toeplitz_hash_ipv6_28_31; |
| 12283 | |
| 12284 | /** |
| 12285 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12286 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12287 | * bytes 32 to 35 |
| 12288 | */ |
| 12289 | A_UINT32 toeplitz_hash_ipv6_32_35; |
| 12290 | |
| 12291 | /** |
| 12292 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12293 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12294 | * bytes 36 to 39 |
| 12295 | */ |
| 12296 | A_UINT32 toeplitz_hash_ipv6_36_39; |
| 12297 | |
| 12298 | /** |
| 12299 | * @brief toeplitz_hash_ipv6 - contains seed needed to compute |
| 12300 | * the flow id 5-tuple toeplitz hash for IPv6 packets. Contains |
| 12301 | * byte 40 |
| 12302 | */ |
| 12303 | A_UINT32 toeplitz_hash_ipv6_40; |
| 12304 | } wmi_lro_info_cmd_fixed_param; |
| 12305 | |
Nirav Shah | bf6450f | 2015-11-05 11:47:20 +0530 | [diff] [blame] | 12306 | /* |
| 12307 | * This structure is used to set the pattern for WOW host wakeup pin pulse |
| 12308 | * pattern confirguration. |
| 12309 | */ |
| 12310 | typedef struct { |
| 12311 | /* |
| 12312 | * TLV tag and len; tag equals |
| 12313 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_cmd_fixed_param |
| 12314 | */ |
| 12315 | A_UINT32 tlv_header; |
| 12316 | /* flash offset to write, starting from 0 */ |
| 12317 | A_UINT32 offset; |
| 12318 | /* vaild data length in buffer, unit: byte */ |
| 12319 | A_UINT32 length; |
| 12320 | } wmi_transfer_data_to_flash_cmd_fixed_param; |
| 12321 | |
| 12322 | typedef struct { |
| 12323 | /* |
| 12324 | * TLV tag and len; tag equals |
| 12325 | * WMITLV_TAG_STRUC_wmi_transfer_data_to_flash_complete_event_fixed_param |
| 12326 | */ |
| 12327 | A_UINT32 tlv_header; |
| 12328 | /* Return status. 0 for success, non-zero otherwise */ |
| 12329 | A_UINT32 status; |
| 12330 | } wmi_transfer_data_to_flash_complete_event_fixed_param; |
| 12331 | |
Krishna Kumaar Natarajan | e2c7046 | 2015-11-19 16:24:50 -0800 | [diff] [blame] | 12332 | /* |
| 12333 | * This structure is used to report SCPC calibrated data to host. |
| 12334 | */ |
| 12335 | typedef struct { |
| 12336 | /* TLV tag and len; tag equals |
| 12337 | * WMITLV_TAG_STRUC_wmi_scpc_event_fixed_param |
| 12338 | */ |
| 12339 | A_UINT32 tlv_header; |
| 12340 | /* number of BDF patches. Each patch contains offset, length and data */ |
| 12341 | A_UINT32 num_patch; |
| 12342 | /* This TLV is followed by another TLV of array of bytes |
| 12343 | * A_UINT8 data[]; |
| 12344 | * This data array contains, for example |
| 12345 | * patch1 offset(byte3~0), patch1 data length(byte7~4), |
| 12346 | * patch1 data(byte11~8) |
| 12347 | * patch2 offset(byte15~12), patch2 data length(byte19~16), |
| 12348 | * patch2 data(byte47~20) |
| 12349 | */ |
| 12350 | } wmi_scpc_event_fixed_param; |
| 12351 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 12352 | /* ADD NEW DEFS HERE */ |
| 12353 | |
| 12354 | /***************************************************************************** |
| 12355 | * The following structures are deprecated. DO NOT USE THEM! |
| 12356 | */ |
| 12357 | |
| 12358 | /** Max number of channels in the schedule. */ |
| 12359 | #define OCB_CHANNEL_MAX (5) |
| 12360 | |
| 12361 | /* NOTE: Make sure these data structures are identical to those 9235 |
| 12362 | * defined in sirApi.h */ |
| 12363 | |
| 12364 | typedef struct |
| 12365 | { |
| 12366 | /** Arbitration Inter-Frame Spacing. Range: 2-15 */ |
| 12367 | A_UINT32 aifsn; |
| 12368 | /** Contention Window minimum. Range: 1 - 10 */ |
| 12369 | A_UINT32 cwmin; |
| 12370 | /** Contention Window maximum. Range: 1 - 10 */ |
| 12371 | A_UINT32 cwmax; |
| 12372 | } wmi_qos_params_t; |
| 12373 | |
| 12374 | typedef struct |
| 12375 | { |
| 12376 | /** Channel frequency in MHz */ |
| 12377 | A_UINT32 chan_freq; |
| 12378 | /** Channel duration in ms */ |
| 12379 | A_UINT32 duration; |
| 12380 | /** Start guard interval in ms */ |
| 12381 | A_UINT32 start_guard_interval; |
| 12382 | /** End guard interval in ms */ |
| 12383 | A_UINT32 end_guard_interval; |
| 12384 | /** Transmit power in dBm, range 0 - 23 */ |
| 12385 | A_UINT32 tx_power; |
| 12386 | /** Transmit datarate in Mbps */ |
| 12387 | A_UINT32 tx_rate; |
| 12388 | /** QoS parameters for each AC */ |
| 12389 | wmi_qos_params_t qos_params[WLAN_MAX_AC]; |
| 12390 | /** 1 to enable RX stats for this channel, 0 otherwise */ |
| 12391 | A_UINT32 rx_stats; |
| 12392 | } wmi_ocb_channel_t; |
| 12393 | |
| 12394 | typedef struct { |
| 12395 | /** TLV tag and len; tag equals |
| 12396 | * WMITLV_TAG_STRUC_wmi_ocb_set_sched_cmd_fixed_param */ |
| 12397 | A_UINT32 tlv_header; |
| 12398 | /* VDEV identifier */ |
| 12399 | A_UINT32 vdev_id; |
| 12400 | /** Number of valid channels in the channels array */ |
| 12401 | A_UINT32 num_channels; |
| 12402 | /** The array of channels */ |
| 12403 | wmi_ocb_channel_t channels[OCB_CHANNEL_MAX]; |
| 12404 | /** 1 to allow off-channel tx, 0 otherwise */ |
| 12405 | A_UINT32 off_channel_tx; // Not supported |
| 12406 | } wmi_ocb_set_sched_cmd_fixed_param; |
| 12407 | |
| 12408 | typedef struct { |
| 12409 | /** Return status. 0 for success, non-zero otherwise */ |
| 12410 | A_UINT32 status; |
| 12411 | } wmi_ocb_set_sched_event_fixed_param; |
| 12412 | |
| 12413 | /** |
| 12414 | * END DEPRECATED |
| 12415 | */ |
| 12416 | #ifdef __cplusplus |
| 12417 | } |
| 12418 | #endif |
| 12419 | #endif /*_WMI_UNIFIED_H_*/ |
| 12420 | /**@}*/ |