1 /** @file mlan_ioctl.h 2 * 3 * @brief This file declares the IOCTL data structures and APIs. 4 * 5 * Copyright (C) 2008-2017, Marvell International Ltd. 6 * 7 * This software file (the "File") is distributed by Marvell International 8 * Ltd. under the terms of the GNU General Public License Version 2, June 1991 9 * (the "License"). You may use, redistribute and/or modify this File in 10 * accordance with the terms and conditions of the License, a copy of which 11 * is available by writing to the Free Software Foundation, Inc., 12 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 13 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 14 * 15 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 17 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 18 * this warranty disclaimer. 19 */ 20 21 /****************************************************** 22 Change log: 23 11/07/2008: initial version 24 ******************************************************/ 25 26 #ifndef _MLAN_IOCTL_H_ 27 #define _MLAN_IOCTL_H_ 28 29 /** Enumeration for IOCTL request ID */ 30 enum _mlan_ioctl_req_id { 31 /* Scan Group */ 32 MLAN_IOCTL_SCAN = 0x00010000, 33 MLAN_OID_SCAN_NORMAL = 0x00010001, 34 MLAN_OID_SCAN_SPECIFIC_SSID = 0x00010002, 35 MLAN_OID_SCAN_USER_CONFIG = 0x00010003, 36 MLAN_OID_SCAN_CONFIG = 0x00010004, 37 MLAN_OID_SCAN_GET_CURRENT_BSS = 0x00010005, 38 MLAN_OID_SCAN_CANCEL = 0x00010006, 39 MLAN_OID_SCAN_TABLE_FLUSH = 0x0001000A, 40 MLAN_OID_SCAN_BGSCAN_CONFIG = 0x0001000B, 41 /* BSS Configuration Group */ 42 MLAN_IOCTL_BSS = 0x00020000, 43 MLAN_OID_BSS_START = 0x00020001, 44 MLAN_OID_BSS_STOP = 0x00020002, 45 MLAN_OID_BSS_MODE = 0x00020003, 46 MLAN_OID_BSS_CHANNEL = 0x00020004, 47 MLAN_OID_BSS_CHANNEL_LIST = 0x00020005, 48 MLAN_OID_BSS_MAC_ADDR = 0x00020006, 49 MLAN_OID_BSS_MULTICAST_LIST = 0x00020007, 50 MLAN_OID_BSS_FIND_BSS = 0x00020008, 51 MLAN_OID_IBSS_BCN_INTERVAL = 0x00020009, 52 MLAN_OID_IBSS_ATIM_WINDOW = 0x0002000A, 53 MLAN_OID_IBSS_CHANNEL = 0x0002000B, 54 #ifdef UAP_SUPPORT 55 MLAN_OID_UAP_BSS_CONFIG = 0x0002000C, 56 MLAN_OID_UAP_DEAUTH_STA = 0x0002000D, 57 MLAN_OID_UAP_BSS_RESET = 0x0002000E, 58 #endif 59 #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) 60 MLAN_OID_BSS_ROLE = 0x0002000F, 61 #endif 62 #ifdef WIFI_DIRECT_SUPPORT 63 MLAN_OID_WIFI_DIRECT_MODE = 0x00020010, 64 #endif 65 #ifdef STA_SUPPORT 66 MLAN_OID_BSS_LISTEN_INTERVAL = 0x00020011, 67 #endif 68 MLAN_OID_BSS_REMOVE = 0x00020014, 69 #ifdef UAP_SUPPORT 70 MLAN_OID_UAP_CFG_WMM_PARAM = 0x00020015, 71 #endif 72 MLAN_OID_BSS_11D_CHECK_CHANNEL = 0x00020016, 73 #ifdef UAP_SUPPORT 74 MLAN_OID_UAP_SCAN_CHANNELS = 0x00020018, 75 MLAN_OID_UAP_CHANNEL = 0x00020019, 76 MLAN_OID_UAP_OPER_CTRL = 0x0002001A, 77 #endif 78 #ifdef STA_SUPPORT 79 MLAN_OID_BSS_CHAN_INFO = 0x0002001B, 80 #endif 81 82 /* Radio Configuration Group */ 83 MLAN_IOCTL_RADIO_CFG = 0x00030000, 84 MLAN_OID_RADIO_CTRL = 0x00030001, 85 MLAN_OID_BAND_CFG = 0x00030002, 86 MLAN_OID_ANT_CFG = 0x00030003, 87 MLAN_OID_REMAIN_CHAN_CFG = 0x00030004, 88 89 /* SNMP MIB Group */ 90 MLAN_IOCTL_SNMP_MIB = 0x00040000, 91 MLAN_OID_SNMP_MIB_RTS_THRESHOLD = 0x00040001, 92 MLAN_OID_SNMP_MIB_FRAG_THRESHOLD = 0x00040002, 93 MLAN_OID_SNMP_MIB_RETRY_COUNT = 0x00040003, 94 MLAN_OID_SNMP_MIB_DOT11D = 0x00040004, 95 #if defined(UAP_SUPPORT) 96 MLAN_OID_SNMP_MIB_DOT11H = 0x00040005, 97 #endif 98 MLAN_OID_SNMP_MIB_DTIM_PERIOD = 0x00040006, 99 MLAN_OID_SNMP_MIB_SIGNALEXT_ENABLE = 0x00040007, 100 MLAN_OID_SNMP_MIB_CTRL_DEAUTH = 0x00040008, 101 102 /* Status Information Group */ 103 MLAN_IOCTL_GET_INFO = 0x00050000, 104 MLAN_OID_GET_STATS = 0x00050001, 105 MLAN_OID_GET_SIGNAL = 0x00050002, 106 MLAN_OID_GET_FW_INFO = 0x00050003, 107 MLAN_OID_GET_VER_EXT = 0x00050004, 108 MLAN_OID_GET_BSS_INFO = 0x00050005, 109 MLAN_OID_GET_DEBUG_INFO = 0x00050006, 110 #ifdef UAP_SUPPORT 111 MLAN_OID_UAP_STA_LIST = 0x00050007, 112 #endif 113 MLAN_OID_GET_SIGNAL_EXT = 0x00050008, 114 MLAN_OID_GET_UAP_STATS_LOG = 0x0005000A, 115 /* Security Configuration Group */ 116 MLAN_IOCTL_SEC_CFG = 0x00060000, 117 MLAN_OID_SEC_CFG_AUTH_MODE = 0x00060001, 118 MLAN_OID_SEC_CFG_ENCRYPT_MODE = 0x00060002, 119 MLAN_OID_SEC_CFG_WPA_ENABLED = 0x00060003, 120 MLAN_OID_SEC_CFG_ENCRYPT_KEY = 0x00060004, 121 MLAN_OID_SEC_CFG_PASSPHRASE = 0x00060005, 122 MLAN_OID_SEC_CFG_EWPA_ENABLED = 0x00060006, 123 MLAN_OID_SEC_CFG_ESUPP_MODE = 0x00060007, 124 MLAN_OID_SEC_CFG_WAPI_ENABLED = 0x00060009, 125 MLAN_OID_SEC_CFG_PORT_CTRL_ENABLED = 0x0006000A, 126 127 /* Rate Group */ 128 MLAN_IOCTL_RATE = 0x00070000, 129 MLAN_OID_RATE_CFG = 0x00070001, 130 MLAN_OID_GET_DATA_RATE = 0x00070002, 131 MLAN_OID_SUPPORTED_RATES = 0x00070003, 132 133 /* Power Configuration Group */ 134 MLAN_IOCTL_POWER_CFG = 0x00080000, 135 MLAN_OID_POWER_CFG = 0x00080001, 136 MLAN_OID_POWER_CFG_EXT = 0x00080002, 137 138 /* Power Management Configuration Group */ 139 MLAN_IOCTL_PM_CFG = 0x00090000, 140 MLAN_OID_PM_CFG_IEEE_PS = 0x00090001, 141 MLAN_OID_PM_CFG_HS_CFG = 0x00090002, 142 MLAN_OID_PM_CFG_INACTIVITY_TO = 0x00090003, 143 MLAN_OID_PM_CFG_DEEP_SLEEP = 0x00090004, 144 MLAN_OID_PM_CFG_SLEEP_PD = 0x00090005, 145 MLAN_OID_PM_CFG_PS_CFG = 0x00090006, 146 MLAN_OID_PM_CFG_FW_WAKEUP_METHOD = 0x00090007, 147 MLAN_OID_PM_CFG_SLEEP_PARAMS = 0x00090008, 148 #ifdef UAP_SUPPORT 149 MLAN_OID_PM_CFG_PS_MODE = 0x00090009, 150 #endif /* UAP_SUPPORT */ 151 MLAN_OID_PM_INFO = 0x0009000A, 152 MLAN_OID_PM_HS_WAKEUP_REASON = 0x0009000B, 153 MLAN_OID_PM_MGMT_FILTER = 0x0009000C, 154 MLAN_OID_PM_CFG_BCN_TIMEOUT = 0x0009000D, 155 156 /* WMM Configuration Group */ 157 MLAN_IOCTL_WMM_CFG = 0x000A0000, 158 MLAN_OID_WMM_CFG_ENABLE = 0x000A0001, 159 MLAN_OID_WMM_CFG_QOS = 0x000A0002, 160 MLAN_OID_WMM_CFG_ADDTS = 0x000A0003, 161 MLAN_OID_WMM_CFG_DELTS = 0x000A0004, 162 MLAN_OID_WMM_CFG_QUEUE_CONFIG = 0x000A0005, 163 MLAN_OID_WMM_CFG_QUEUE_STATS = 0x000A0006, 164 MLAN_OID_WMM_CFG_QUEUE_STATUS = 0x000A0007, 165 MLAN_OID_WMM_CFG_TS_STATUS = 0x000A0008, 166 167 /* WPS Configuration Group */ 168 MLAN_IOCTL_WPS_CFG = 0x000B0000, 169 MLAN_OID_WPS_CFG_SESSION = 0x000B0001, 170 171 /* 802.11n Configuration Group */ 172 MLAN_IOCTL_11N_CFG = 0x000C0000, 173 MLAN_OID_11N_CFG_TX = 0x000C0001, 174 MLAN_OID_11N_HTCAP_CFG = 0x000C0002, 175 MLAN_OID_11N_CFG_ADDBA_REJECT = 0x000C0003, 176 MLAN_OID_11N_CFG_AGGR_PRIO_TBL = 0x000C0004, 177 MLAN_OID_11N_CFG_ADDBA_PARAM = 0x000C0005, 178 MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE = 0x000C0006, 179 MLAN_OID_11N_CFG_AMSDU_AGGR_CTRL = 0x000C0007, 180 MLAN_OID_11N_CFG_SUPPORTED_MCS_SET = 0x000C0008, 181 MLAN_OID_11N_CFG_TX_BF_CAP = 0x000C0009, 182 MLAN_OID_11N_CFG_TX_BF_CFG = 0x000C000A, 183 MLAN_OID_11N_CFG_DELBA = 0x000C000C, 184 MLAN_OID_11N_CFG_REJECT_ADDBA_REQ = 0x000C000D, 185 MLAN_OID_11N_CFG_COEX_RX_WINSIZE = 0x000C000E, 186 MLAN_OID_11N_CFG_TX_AGGR_CTRL = 0x000C000F, 187 MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM = 0x000C0010, 188 189 /* 802.11d Configuration Group */ 190 MLAN_IOCTL_11D_CFG = 0x000D0000, 191 #ifdef STA_SUPPORT 192 MLAN_OID_11D_CFG_ENABLE = 0x000D0001, 193 MLAN_OID_11D_CLR_CHAN_TABLE = 0x000D0002, 194 #endif /* STA_SUPPORT */ 195 MLAN_OID_11D_DOMAIN_INFO = 0x000D0003, 196 197 /* Register Memory Access Group */ 198 MLAN_IOCTL_REG_MEM = 0x000E0000, 199 MLAN_OID_REG_RW = 0x000E0001, 200 MLAN_OID_EEPROM_RD = 0x000E0002, 201 MLAN_OID_MEM_RW = 0x000E0003, 202 203 /* Multi-Radio Configuration Group */ 204 MLAN_IOCTL_MFR_CFG = 0x00100000, 205 206 /* 802.11h Configuration Group */ 207 MLAN_IOCTL_11H_CFG = 0x00110000, 208 MLAN_OID_11H_CHANNEL_CHECK = 0x00110001, 209 MLAN_OID_11H_LOCAL_POWER_CONSTRAINT = 0x00110002, 210 #if defined(DFS_TESTING_SUPPORT) 211 MLAN_OID_11H_DFS_TESTING = 0x00110003, 212 #endif 213 MLAN_OID_11H_CHAN_REPORT_REQUEST = 0x00110004, 214 MLAN_OID_11H_CHAN_SWITCH_COUNT = 0x00110005, 215 #ifdef DFS_TESTING_SUPPORT 216 MLAN_OID_11H_CHAN_NOP_INFO = 0x00110006, 217 #endif 218 219 MLAN_IOCTL_11K_CFG = 0x00130000, 220 MLAN_OID_11K_CFG_ENABLE = 0x00130001, 221 MLAN_OID_11K_GET_NLIST = 0x00130002, 222 223 /* Miscellaneous Configuration Group */ 224 MLAN_IOCTL_MISC_CFG = 0x00200000, 225 MLAN_OID_MISC_GEN_IE = 0x00200001, 226 MLAN_OID_MISC_REGION = 0x00200002, 227 MLAN_OID_MISC_WARM_RESET = 0x00200003, 228 #if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) 229 MLAN_OID_MISC_SDIO_MPA_CTRL = 0x00200006, 230 #endif 231 MLAN_OID_MISC_HOST_CMD = 0x00200007, 232 MLAN_OID_MISC_SYS_CLOCK = 0x00200009, 233 MLAN_OID_MISC_SOFT_RESET = 0x0020000A, 234 MLAN_OID_MISC_WWS = 0x0020000B, 235 MLAN_OID_MISC_ASSOC_RSP = 0x0020000C, 236 MLAN_OID_MISC_INIT_SHUTDOWN = 0x0020000D, 237 MLAN_OID_MISC_COALESCING_STATUS = 0x0020000E, 238 MLAN_OID_MISC_CUSTOM_IE = 0x0020000F, 239 MLAN_OID_MISC_TDLS_CONFIG = 0x00200010, 240 MLAN_OID_MISC_NET_MONITOR = 0x00200011, 241 MLAN_OID_MISC_TX_DATAPAUSE = 0x00200012, 242 MLAN_OID_MISC_IP_ADDR = 0x00200013, 243 MLAN_OID_MISC_MAC_CONTROL = 0x00200014, 244 MLAN_OID_MISC_MEF_CFG = 0x00200015, 245 MLAN_OID_MISC_CFP_CODE = 0x00200016, 246 MLAN_OID_MISC_COUNTRY_CODE = 0x00200017, 247 MLAN_OID_MISC_THERMAL = 0x00200018, 248 MLAN_OID_MISC_RX_MGMT_IND = 0x00200019, 249 MLAN_OID_MISC_SUBSCRIBE_EVENT = 0x0020001A, 250 #ifdef DEBUG_LEVEL1 251 MLAN_OID_MISC_DRVDBG = 0x0020001B, 252 #endif 253 MLAN_OID_MISC_OTP_USER_DATA = 0x0020001D, 254 MLAN_OID_MISC_TXCONTROL = 0x00200020, 255 #ifdef STA_SUPPORT 256 MLAN_OID_MISC_EXT_CAP_CFG = 0x00200021, 257 #endif 258 #if defined(STA_SUPPORT) 259 MLAN_OID_MISC_PMFCFG = 0x00200022, 260 #endif 261 MLAN_OID_MISC_MULTI_CHAN_CFG = 0x00200023, 262 MLAN_OID_MISC_MULTI_CHAN_POLICY = 0x00200024, 263 #ifdef WIFI_DIRECT_SUPPORT 264 MLAN_OID_MISC_WIFI_DIRECT_CONFIG = 0x00200025, 265 #endif 266 MLAN_OID_MISC_TDLS_OPER = 0x00200026, 267 MLAN_OID_MISC_GET_TDLS_IES = 0x00200027, 268 MLAN_OID_MISC_DFS_REAPTER_MODE = 0x0020002B, 269 #ifdef RX_PACKET_COALESCE 270 MLAN_OID_MISC_RX_PACKET_COALESCE = 0x0020002C, 271 #endif 272 MLAN_OID_MISC_TDLS_CS_CHANNEL = 0x0020002D, 273 MLAN_OID_MISC_COALESCE_CFG = 0x0020002E, 274 MLAN_OID_MISC_TDLS_IDLE_TIME = 0x0020002F, 275 MLAN_OID_MISC_GET_SENSOR_TEMP = 0x00200030, 276 MLAN_OID_MISC_GTK_REKEY_OFFLOAD = 0x00200037, 277 MLAN_OID_MISC_OPER_CLASS = 0x00200038, 278 MLAN_OID_MISC_PMIC_CFG = 0x00200039, 279 MLAN_OID_MISC_IND_RST_CFG = 0x00200040, 280 MLAN_OID_MISC_ROAM_OFFLOAD = 0x00200042, 281 MLAN_OID_MISC_ROAM_OFFLOAD_APLIST = 0x00200043, 282 MLAN_OID_MISC_GET_TSF = 0x00200045, 283 MLAN_OID_MISC_GET_CHAN_REGION_CFG = 0x00200046, 284 MLAN_OID_MISC_OPER_CLASS_CHECK = 0x00200049, 285 MLAN_OID_MISC_DRCS_CFG = 0x00200050, 286 287 MLAN_OID_MISC_CWMODE_CTRL = 0x00200051, 288 MLAN_OID_MISC_FW_DUMP_EVENT = 0x00200054, 289 MLAN_OID_MISC_PER_PKT_CFG = 0x00200055, 290 MLAN_OID_MISC_ROBUSTCOEX = 0x00200056, 291 MLAN_OID_MISC_GET_CORRELATED_TIME = 0x00200058, 292 MLAN_OID_MISC_CFP_INFO = 0x00200060, 293 MLAN_OID_MISC_BOOT_SLEEP = 0x00200061, 294 }; 295 296 /** Sub command size */ 297 #define MLAN_SUB_COMMAND_SIZE 4 298 299 /** Enumeration for the action of IOCTL request */ 300 enum _mlan_act_ioctl { 301 MLAN_ACT_SET = 1, 302 MLAN_ACT_GET, 303 MLAN_ACT_CANCEL, 304 MLAN_ACT_CLEAR, 305 MLAN_ACT_RESET 306 }; 307 308 /** Enumeration for generic enable/disable */ 309 enum _mlan_act_generic { 310 MLAN_ACT_DISABLE = 0, 311 MLAN_ACT_ENABLE = 1 312 }; 313 314 /** Enumeration for scan mode */ 315 enum _mlan_scan_mode { 316 MLAN_SCAN_MODE_UNCHANGED = 0, 317 MLAN_SCAN_MODE_BSS, 318 MLAN_SCAN_MODE_IBSS, 319 MLAN_SCAN_MODE_ANY 320 }; 321 322 /** Enumeration for scan type */ 323 enum _mlan_scan_type { 324 MLAN_SCAN_TYPE_UNCHANGED = 0, 325 MLAN_SCAN_TYPE_ACTIVE, 326 MLAN_SCAN_TYPE_PASSIVE 327 }; 328 329 /** Max number of supported rates */ 330 #define MLAN_SUPPORTED_RATES 32 331 332 /** RSSI scan */ 333 #define SCAN_RSSI(RSSI) (0x100 - ((t_u8)(RSSI))) 334 335 /** Max passive scan time for each channel in milliseconds */ 336 #define MRVDRV_MAX_PASSIVE_SCAN_CHAN_TIME 2000 337 338 /** Max active scan time for each channel in milliseconds */ 339 #define MRVDRV_MAX_ACTIVE_SCAN_CHAN_TIME 500 340 341 /** Maximum number of probes to send on each channel */ 342 #define MAX_PROBES 4 343 344 /** Default number of probes to send on each channel */ 345 #define DEFAULT_PROBES 4 346 347 /** 348 * @brief Sub-structure passed in wlan_ioctl_get_scan_table_entry for each BSS 349 * 350 * Fixed field information returned for the scan response in the IOCTL 351 * response. 352 */ 353 typedef struct _wlan_get_scan_table_fixed { 354 /** BSSID of this network */ 355 t_u8 bssid[MLAN_MAC_ADDR_LENGTH]; 356 /** Channel this beacon/probe response was detected */ 357 t_u8 channel; 358 /** RSSI for the received packet */ 359 t_u8 rssi; 360 /** TSF value in microseconds from the firmware at packet reception */ 361 t_u64 network_tsf; 362 } wlan_get_scan_table_fixed; 363 364 /** mlan_802_11_ssid data structure */ 365 typedef struct _mlan_802_11_ssid { 366 /** SSID Length */ 367 t_u32 ssid_len; 368 /** SSID information field */ 369 t_u8 ssid[MLAN_MAX_SSID_LENGTH]; 370 } mlan_802_11_ssid, *pmlan_802_11_ssid; 371 372 /** tx status event structure */ 373 typedef MLAN_PACK_START struct _tx_status_event { 374 /** packet type */ 375 t_u8 packet_type; 376 /** tx_token_id */ 377 t_u8 tx_token_id; 378 /** 0--success, 1--fail, 2--watchdogtimeout */ 379 t_u8 status; 380 /** t1 time stamp */ 381 t_u64 t1_tstamp; 382 /** t4 time stamp */ 383 t_u64 t4_tstamp; 384 /** t1 error */ 385 t_u64 t1_error; 386 /** t4 error */ 387 t_u64 t4_error; 388 /** egress time */ 389 t_u64 egress_time; 390 } MLAN_PACK_END tx_status_event; 391 392 /** 393 * Sructure to retrieve the scan table 394 */ 395 typedef struct { 396 /** 397 * - Zero based scan entry to start retrieval in command request 398 * - Number of scans entries returned in command response 399 */ 400 t_u32 scan_number; 401 /** 402 * Buffer marker for multiple wlan_ioctl_get_scan_table_entry structures. 403 * Each struct is padded to the nearest 32 bit boundary. 404 */ 405 t_u8 scan_table_entry_buf[1]; 406 } wlan_ioctl_get_scan_table_info; 407 408 /** 409 * Structure passed in the wlan_ioctl_get_scan_table_info for each 410 * BSS returned in the WLAN_GET_SCAN_RESP IOCTL 411 */ 412 typedef struct _wlan_ioctl_get_scan_table_entry { 413 /** 414 * Fixed field length included in the response. 415 * 416 * Length value is included so future fixed fields can be added to the 417 * response without breaking backwards compatibility. Use the length 418 * to find the offset for the bssInfoLength field, not a sizeof() calc. 419 */ 420 t_u32 fixed_field_length; 421 422 /** 423 * Length of the BSS Information (probe resp or beacon) that 424 * follows after the fixed_field_length 425 */ 426 t_u32 bss_info_length; 427 428 /** 429 * Always present, fixed length data fields for the BSS 430 */ 431 wlan_get_scan_table_fixed fixed_fields; 432 433 /* 434 * Probe response or beacon scanned for the BSS. 435 * 436 * Field layout: 437 * - TSF 8 octets 438 * - Beacon Interval 2 octets 439 * - Capability Info 2 octets 440 * 441 * - IEEE Infomation Elements; variable number & length per 802.11 spec 442 */ 443 /* t_u8 bss_info_buffer[0]; */ 444 } wlan_ioctl_get_scan_table_entry; 445 446 /** Type definition of mlan_scan_time_params */ 447 typedef struct _mlan_scan_time_params { 448 /** Scan channel time for specific scan in milliseconds */ 449 t_u32 specific_scan_time; 450 /** Scan channel time for active scan in milliseconds */ 451 t_u32 active_scan_time; 452 /** Scan channel time for passive scan in milliseconds */ 453 t_u32 passive_scan_time; 454 } mlan_scan_time_params, *pmlan_scan_time_params; 455 456 /** Type definition of mlan_user_scan */ 457 typedef struct _mlan_user_scan { 458 /** Length of scan_cfg_buf */ 459 t_u32 scan_cfg_len; 460 /** Buffer of scan config */ 461 t_u8 scan_cfg_buf[1]; 462 } mlan_user_scan, *pmlan_user_scan; 463 464 /** Type definition of mlan_scan_req */ 465 typedef struct _mlan_scan_req { 466 /** BSS mode for scanning */ 467 t_u32 scan_mode; 468 /** Scan type */ 469 t_u32 scan_type; 470 /** SSID */ 471 mlan_802_11_ssid scan_ssid; 472 /** Scan time parameters */ 473 mlan_scan_time_params scan_time; 474 /** Scan config parameters in user scan */ 475 mlan_user_scan user_scan; 476 } mlan_scan_req, *pmlan_scan_req; 477 478 /** Type defnition of mlan_scan_resp */ 479 typedef struct _mlan_scan_resp { 480 /** Number of scan result */ 481 t_u32 num_in_scan_table; 482 /** Scan table */ 483 t_u8 *pscan_table; 484 /* Age in seconds */ 485 t_u32 age_in_secs; 486 /** channel statstics */ 487 t_u8 *pchan_stats; 488 /** Number of records in the chan_stats */ 489 t_u32 num_in_chan_stats; 490 } mlan_scan_resp, *pmlan_scan_resp; 491 492 #define EXT_SCAN_TYPE_ENH 2 493 /** Type definition of mlan_scan_cfg */ 494 typedef struct _mlan_scan_cfg { 495 /** Scan type */ 496 t_u32 scan_type; 497 /** BSS mode for scanning */ 498 t_u32 scan_mode; 499 /** Scan probe */ 500 t_u32 scan_probe; 501 /** Scan time parameters */ 502 mlan_scan_time_params scan_time; 503 /** Ext_scan: 0 disable, 1: enable, 2: enhance scan*/ 504 t_u32 ext_scan; 505 } mlan_scan_cfg, *pmlan_scan_cfg; 506 507 /** Type defnition of mlan_ds_scan for MLAN_IOCTL_SCAN */ 508 typedef struct _mlan_ds_scan { 509 /** Sub-command */ 510 t_u32 sub_command; 511 /** Scan request/response */ 512 union { 513 /** Scan request */ 514 mlan_scan_req scan_req; 515 /** Scan response */ 516 mlan_scan_resp scan_resp; 517 /** Scan config parameters in user scan */ 518 mlan_user_scan user_scan; 519 /** Scan config parameters */ 520 mlan_scan_cfg scan_cfg; 521 } param; 522 } mlan_ds_scan, *pmlan_ds_scan; 523 524 /*-----------------------------------------------------------------*/ 525 /** BSS Configuration Group */ 526 /*-----------------------------------------------------------------*/ 527 /** Enumeration for BSS mode */ 528 enum _mlan_bss_mode { 529 MLAN_BSS_MODE_INFRA = 1, 530 MLAN_BSS_MODE_IBSS, 531 MLAN_BSS_MODE_AUTO 532 }; 533 534 /** Maximum key length */ 535 #define MLAN_MAX_KEY_LENGTH 32 536 /** Maximum PMK R0 NAME key length */ 537 #define MLAN_MAX_PMKR0_NAME_LENGTH 16 538 539 /** Maximum atim window in milliseconds */ 540 #define MLAN_MAX_ATIM_WINDOW 50 541 542 /** Minimum beacon interval */ 543 #define MLAN_MIN_BEACON_INTERVAL 20 544 /** Maximum beacon interval */ 545 #define MLAN_MAX_BEACON_INTERVAL 1000 546 /** Default beacon interval */ 547 #define MLAN_BEACON_INTERVAL 100 548 549 /** Receive all packets */ 550 #define MLAN_PROMISC_MODE 1 551 /** Receive multicast packets in multicast list */ 552 #define MLAN_MULTICAST_MODE 2 553 /** Receive all multicast packets */ 554 #define MLAN_ALL_MULTI_MODE 4 555 556 /** Maximum size of multicast list */ 557 #define MLAN_MAX_MULTICAST_LIST_SIZE 32 558 559 /** mlan_multicast_list data structure for MLAN_OID_BSS_MULTICAST_LIST */ 560 typedef struct _mlan_multicast_list { 561 /** Multicast mode */ 562 t_u32 mode; 563 /** Number of multicast addresses in the list */ 564 t_u32 num_multicast_addr; 565 /** Multicast address list */ 566 mlan_802_11_mac_addr mac_list[MLAN_MAX_MULTICAST_LIST_SIZE]; 567 } mlan_multicast_list, *pmlan_multicast_list; 568 569 /** Max channel */ 570 #define MLAN_MAX_CHANNEL 165 571 /** Maximum number of channels in table */ 572 #define MLAN_MAX_CHANNEL_NUM 128 573 574 /** Channel/frequence for MLAN_OID_BSS_CHANNEL */ 575 typedef struct _chan_freq { 576 /** Channel Number */ 577 t_u32 channel; 578 /** Frequency of this Channel */ 579 t_u32 freq; 580 } chan_freq; 581 582 /** mlan_chan_list data structure for MLAN_OID_BSS_CHANNEL_LIST */ 583 typedef struct _mlan_chan_list { 584 /** Number of channel */ 585 t_u32 num_of_chan; 586 /** Channel-Frequency table */ 587 chan_freq cf[MLAN_MAX_CHANNEL_NUM]; 588 } mlan_chan_list; 589 590 /* This channel is disabled.*/ 591 #define CHAN_FLAGS_DISABLED MBIT(0) 592 /* do not initiate radiation, this includes sending probe requests or beaconing */ 593 #define CHAN_FLAGS_NO_IR MBIT(1) 594 /* Radar detection is required on this channel */ 595 #define CHAN_FLAGS_RADAR MBIT(3) 596 /* extension channel above this channel is not permitted */ 597 #define CHAN_FLAGS_NO_HT40PLUS MBIT(4) 598 /* extension channel below this channel is not permitted */ 599 #define CHAN_FLAGS_NO_HT40MINUS MBIT(5) 600 /* OFDM is not allowed on this channel */ 601 #define CHAN_FLAGS_NO_OFDM MBIT(6) 602 /** 80Mhz can not used on this channel */ 603 #define CHAN_FLAGS_NO_80MHZ MBIT(7) 604 /** 180Mhz can not used on this channel */ 605 #define CHAN_FLAGS_NO_160MHZ MBIT(8) 606 /* Only indoor use is permitted on this channel */ 607 #define CHAN_FLAGS_INDOOR_ONLY MBIT(9) 608 /* IR operation is allowed on this channel if it's 609 * connected concurrently to a BSS on the same channel on 610 * the 2 GHz band or to a channel in the same UNII band (on the 5 GHz 611 * band), and IEEE80211_CHAN_RADAR is not set */ 612 #define CHAN_FLAGS_IR_CONCURRENT MBIT(10) 613 /* 20 MHz operation is not allowed on this channel */ 614 #define CHAN_FLAGS_20MHZ MBIT(11) 615 /* 10 MHz operation is not allowed on this channel */ 616 #define CHAN_FLAGS_NO_10MHZ MBIT(12) 617 618 /** mlan_ssid_bssid data structure for 619 * MLAN_OID_BSS_START and MLAN_OID_BSS_FIND_BSS 620 */ 621 typedef struct _mlan_ssid_bssid { 622 /** SSID */ 623 mlan_802_11_ssid ssid; 624 /** BSSID */ 625 mlan_802_11_mac_addr bssid; 626 /** index in BSSID list, start from 1 */ 627 t_u32 idx; 628 /** Receive signal strength in dBm */ 629 t_s32 rssi; 630 /**channel*/ 631 t_u16 channel; 632 /**mobility domain value*/ 633 t_u16 ft_md; 634 /**ft capability*/ 635 t_u8 ft_cap; 636 /**band*/ 637 t_u16 bss_band; 638 t_u32 channel_flags; 639 } mlan_ssid_bssid; 640 641 /** Data structure of WMM ECW */ 642 typedef struct _wmm_ecw_t { 643 #ifdef BIG_ENDIAN_SUPPORT 644 /** Maximum Ecw */ 645 t_u8 ecw_max:4; 646 /** Minimum Ecw */ 647 t_u8 ecw_min:4; 648 #else 649 /** Minimum Ecw */ 650 t_u8 ecw_min:4; 651 /** Maximum Ecw */ 652 t_u8 ecw_max:4; 653 #endif /* BIG_ENDIAN_SUPPORT */ 654 } wmm_ecw_t, *pwmm_ecw_t; 655 656 /** Data structure of WMM Aci/Aifsn */ 657 typedef struct _wmm_aci_aifsn_t { 658 #ifdef BIG_ENDIAN_SUPPORT 659 /** Reserved */ 660 t_u8 reserved:1; 661 /** Aci */ 662 t_u8 aci:2; 663 /** Acm */ 664 t_u8 acm:1; 665 /** Aifsn */ 666 t_u8 aifsn:4; 667 #else 668 /** Aifsn */ 669 t_u8 aifsn:4; 670 /** Acm */ 671 t_u8 acm:1; 672 /** Aci */ 673 t_u8 aci:2; 674 /** Reserved */ 675 t_u8 reserved:1; 676 #endif /* BIG_ENDIAN_SUPPORT */ 677 } wmm_aci_aifsn_t, *pwmm_aci_aifsn_t; 678 679 /** Data structure of WMM AC parameters */ 680 typedef struct _wmm_ac_parameters_t { 681 wmm_aci_aifsn_t aci_aifsn; /**< AciAifSn */ 682 wmm_ecw_t ecw; /**< Ecw */ 683 t_u16 tx_op_limit; /**< Tx op limit */ 684 } wmm_ac_parameters_t, *pwmm_ac_parameters_t; 685 686 /** mlan_deauth_param */ 687 typedef struct _mlan_deauth_param { 688 /** STA mac addr */ 689 t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; 690 /** deauth reason */ 691 t_u16 reason_code; 692 } mlan_deauth_param; 693 694 #ifdef UAP_SUPPORT 695 /** Maximum packet forward control value */ 696 #define MAX_PKT_FWD_CTRL 15 697 /** Maximum BEACON period */ 698 #define MAX_BEACON_PERIOD 4000 699 /** Minimum BEACON period */ 700 #define MIN_BEACON_PERIOD 50 701 /** Maximum DTIM period */ 702 #define MAX_DTIM_PERIOD 100 703 /** Minimum DTIM period */ 704 #define MIN_DTIM_PERIOD 1 705 /** Maximum TX Power Limit */ 706 #define MAX_TX_POWER 20 707 /** Minimum TX Power Limit */ 708 #define MIN_TX_POWER 0 709 /** MAX station count */ 710 #define MAX_STA_COUNT 10 711 /** Maximum RTS threshold */ 712 #define MAX_RTS_THRESHOLD 2347 713 /** Maximum fragmentation threshold */ 714 #define MAX_FRAG_THRESHOLD 2346 715 /** Minimum fragmentation threshold */ 716 #define MIN_FRAG_THRESHOLD 256 717 /** data rate 54 M */ 718 #define DATA_RATE_54M 108 719 /** Maximum value of bcast_ssid_ctl */ 720 #define MAX_BCAST_SSID_CTL 2 721 /** antenna A */ 722 #define ANTENNA_MODE_A 0 723 /** antenna B */ 724 #define ANTENNA_MODE_B 1 725 /** transmit antenna */ 726 #define TX_ANTENNA 1 727 /** receive antenna */ 728 #define RX_ANTENNA 0 729 /** Maximum stage out time */ 730 #define MAX_STAGE_OUT_TIME 864000 731 /** Minimum stage out time */ 732 #define MIN_STAGE_OUT_TIME 300 733 /** Maximum Retry Limit */ 734 #define MAX_RETRY_LIMIT 14 735 736 /** Maximum group key timer in seconds */ 737 #define MAX_GRP_TIMER 86400 738 739 /** Maximum value of 4 byte configuration */ 740 #define MAX_VALID_DWORD 0x7FFFFFFF /* (1 << 31) - 1 */ 741 742 /** default UAP BAND 2.4G */ 743 #define DEFAULT_UAP_BAND 0 744 /** default UAP channel 6 */ 745 #define DEFAULT_UAP_CHANNEL 6 746 747 /** Maximum data rates */ 748 #define MAX_DATA_RATES 14 749 750 /** auto data rate */ 751 #define DATA_RATE_AUTO 0 752 753 /**filter mode: disable */ 754 #define MAC_FILTER_MODE_DISABLE 0 755 /**filter mode: block mac address */ 756 #define MAC_FILTER_MODE_ALLOW_MAC 1 757 /**filter mode: block mac address */ 758 #define MAC_FILTER_MODE_BLOCK_MAC 2 759 /** Maximum mac filter num */ 760 #define MAX_MAC_FILTER_NUM 16 761 762 /* Bitmap for protocol to use */ 763 /** No security */ 764 #define PROTOCOL_NO_SECURITY 0x01 765 /** Static WEP */ 766 #define PROTOCOL_STATIC_WEP 0x02 767 /** WPA */ 768 #define PROTOCOL_WPA 0x08 769 /** WPA2 */ 770 #define PROTOCOL_WPA2 0x20 771 /** WP2 Mixed */ 772 #define PROTOCOL_WPA2_MIXED 0x28 773 /** EAP */ 774 #define PROTOCOL_EAP 0x40 775 /** WAPI */ 776 #define PROTOCOL_WAPI 0x80 777 778 /** Key_mgmt_psk */ 779 #define KEY_MGMT_NONE 0x04 780 /** Key_mgmt_none */ 781 #define KEY_MGMT_PSK 0x02 782 /** Key_mgmt_eap */ 783 #define KEY_MGMT_EAP 0x01 784 /** Key_mgmt_psk_sha256 */ 785 #define KEY_MGMT_PSK_SHA256 0x100 786 787 /** TKIP */ 788 #define CIPHER_TKIP 0x04 789 /** AES CCMP */ 790 #define CIPHER_AES_CCMP 0x08 791 792 /** Valid cipher bitmap */ 793 #define VALID_CIPHER_BITMAP 0x0c 794 795 /** Packet forwarding to be done by FW or host */ 796 #define PKT_FWD_FW_BIT 0x01 797 /** Intra-BSS broadcast packet forwarding allow bit */ 798 #define PKT_FWD_INTRA_BCAST 0x02 799 /** Intra-BSS unicast packet forwarding allow bit */ 800 #define PKT_FWD_INTRA_UCAST 0x04 801 /** Inter-BSS unicast packet forwarding allow bit */ 802 #define PKT_FWD_INTER_UCAST 0x08 803 /** Intra-BSS unicast packet */ 804 #define PKT_INTRA_UCAST 0x01 805 /** Inter-BSS unicast packet */ 806 #define PKT_INTER_UCAST 0x02 807 /** Enable Host PKT forwarding */ 808 #define PKT_FWD_ENABLE_BIT 0x01 809 810 /** Channel List Entry */ 811 typedef struct _channel_list { 812 /** Channel Number */ 813 t_u8 chan_number; 814 /** Band Config */ 815 Band_Config_t bandcfg; 816 } scan_chan_list; 817 818 /** mac_filter data structure */ 819 typedef struct _mac_filter { 820 /** mac filter mode */ 821 t_u16 filter_mode; 822 /** mac adress count */ 823 t_u16 mac_count; 824 /** mac address list */ 825 mlan_802_11_mac_addr mac_list[MAX_MAC_FILTER_NUM]; 826 } mac_filter; 827 828 /** wpa parameter */ 829 typedef struct _wpa_param { 830 /** Pairwise cipher WPA */ 831 t_u8 pairwise_cipher_wpa; 832 /** Pairwise cipher WPA2 */ 833 t_u8 pairwise_cipher_wpa2; 834 /** group cipher */ 835 t_u8 group_cipher; 836 /** RSN replay protection */ 837 t_u8 rsn_protection; 838 /** passphrase length */ 839 t_u32 length; 840 /** passphrase */ 841 t_u8 passphrase[64]; 842 /**group key rekey time in seconds */ 843 t_u32 gk_rekey_time; 844 } wpa_param; 845 846 /** wep key */ 847 typedef struct _wep_key { 848 /** key index 0-3 */ 849 t_u8 key_index; 850 /** is default */ 851 t_u8 is_default; 852 /** length */ 853 t_u16 length; 854 /** key data */ 855 t_u8 key[26]; 856 } wep_key; 857 858 /** wep param */ 859 typedef struct _wep_param { 860 /** key 0 */ 861 wep_key key0; 862 /** key 1 */ 863 wep_key key1; 864 /** key 2 */ 865 wep_key key2; 866 /** key 3 */ 867 wep_key key3; 868 } wep_param; 869 870 /** Data structure of WMM QoS information */ 871 typedef struct _wmm_qos_info_t { 872 #ifdef BIG_ENDIAN_SUPPORT 873 /** QoS UAPSD */ 874 t_u8 qos_uapsd:1; 875 /** Reserved */ 876 t_u8 reserved:3; 877 /** Parameter set count */ 878 t_u8 para_set_count:4; 879 #else 880 /** Parameter set count */ 881 t_u8 para_set_count:4; 882 /** Reserved */ 883 t_u8 reserved:3; 884 /** QoS UAPSD */ 885 t_u8 qos_uapsd:1; 886 #endif /* BIG_ENDIAN_SUPPORT */ 887 } wmm_qos_info_t, *pwmm_qos_info_t; 888 889 /** Data structure of WMM parameter IE */ 890 typedef struct _wmm_parameter_t { 891 /** OuiType: 00:50:f2:02 */ 892 t_u8 ouitype[4]; 893 /** Oui subtype: 01 */ 894 t_u8 ouisubtype; 895 /** version: 01 */ 896 t_u8 version; 897 /** QoS information */ 898 t_u8 qos_info; 899 /** Reserved */ 900 t_u8 reserved; 901 /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ 902 wmm_ac_parameters_t ac_params[MAX_AC_QUEUES]; 903 } wmm_parameter_t, *pwmm_parameter_t; 904 905 /** 5G band */ 906 #define BAND_CONFIG_5G 0x01 907 /** 2.4 G band */ 908 #define BAND_CONFIG_2G 0x00 909 /** MAX BG channel */ 910 #define MAX_BG_CHANNEL 14 911 /** mlan_bss_param 912 * Note: For each entry you must enter an invalid value 913 * in the MOAL function woal_set_sys_config_invalid_data(). 914 * Otherwise for a valid data an unwanted TLV will be 915 * added to that command. 916 */ 917 typedef struct _mlan_uap_bss_param { 918 /** AP mac addr */ 919 mlan_802_11_mac_addr mac_addr; 920 /** SSID */ 921 mlan_802_11_ssid ssid; 922 /** Broadcast ssid control */ 923 t_u8 bcast_ssid_ctl; 924 /** Radio control: on/off */ 925 t_u8 radio_ctl; 926 /** dtim period */ 927 t_u8 dtim_period; 928 /** beacon period */ 929 t_u16 beacon_period; 930 /** rates */ 931 t_u8 rates[MAX_DATA_RATES]; 932 /** Tx data rate */ 933 t_u16 tx_data_rate; 934 /** Tx beacon rate */ 935 t_u16 tx_beacon_rate; 936 /** multicast/broadcast data rate */ 937 t_u16 mcbc_data_rate; 938 /** Tx power level in dBm */ 939 t_u8 tx_power_level; 940 /** Tx antenna */ 941 t_u8 tx_antenna; 942 /** Rx antenna */ 943 t_u8 rx_antenna; 944 /** packet forward control */ 945 t_u8 pkt_forward_ctl; 946 /** max station count */ 947 t_u16 max_sta_count; 948 /** mac filter */ 949 mac_filter filter; 950 /** station ageout timer in unit of 100ms */ 951 t_u32 sta_ageout_timer; 952 /** PS station ageout timer in unit of 100ms */ 953 t_u32 ps_sta_ageout_timer; 954 /** RTS threshold */ 955 t_u16 rts_threshold; 956 /** fragmentation threshold */ 957 t_u16 frag_threshold; 958 /** retry_limit */ 959 t_u16 retry_limit; 960 /** pairwise update timeout in milliseconds */ 961 t_u32 pairwise_update_timeout; 962 /** pairwise handshake retries */ 963 t_u32 pwk_retries; 964 /** groupwise update timeout in milliseconds */ 965 t_u32 groupwise_update_timeout; 966 /** groupwise handshake retries */ 967 t_u32 gwk_retries; 968 /** preamble type */ 969 t_u8 preamble_type; 970 /** band cfg */ 971 Band_Config_t bandcfg; 972 /** channel */ 973 t_u8 channel; 974 /** auth mode */ 975 t_u16 auth_mode; 976 /** encryption protocol */ 977 t_u16 protocol; 978 /** key managment type */ 979 t_u16 key_mgmt; 980 /** wep param */ 981 wep_param wep_cfg; 982 /** wpa param */ 983 wpa_param wpa_cfg; 984 /** Mgmt IE passthru mask */ 985 t_u32 mgmt_ie_passthru_mask; 986 /* 987 * 11n HT Cap HTCap_t ht_cap 988 */ 989 /** HT Capabilities Info field */ 990 t_u16 ht_cap_info; 991 /** A-MPDU Parameters field */ 992 t_u8 ampdu_param; 993 /** Supported MCS Set field */ 994 t_u8 supported_mcs_set[16]; 995 /** HT Extended Capabilities field */ 996 t_u16 ht_ext_cap; 997 /** Transmit Beamforming Capabilities field */ 998 t_u32 tx_bf_cap; 999 /** Antenna Selection Capability field */ 1000 t_u8 asel; 1001 /** Enable 2040 Coex */ 1002 t_u8 enable_2040coex; 1003 /** key management operation */ 1004 t_u16 key_mgmt_operation; 1005 /** BSS status */ 1006 t_u16 bss_status; 1007 #ifdef WIFI_DIRECT_SUPPORT 1008 /* pre shared key */ 1009 t_u8 psk[MLAN_MAX_KEY_LENGTH]; 1010 #endif /* WIFI_DIRECT_SUPPORT */ 1011 /** Number of channels in scan_channel_list */ 1012 t_u32 num_of_chan; 1013 /** scan channel list in ACS mode */ 1014 scan_chan_list chan_list[MLAN_MAX_CHANNEL]; 1015 /** Wmm parameters */ 1016 wmm_parameter_t wmm_para; 1017 1018 } mlan_uap_bss_param; 1019 1020 /** mlan_uap_scan_channels */ 1021 typedef struct _mlan_uap_scan_channels { 1022 /** flag for remove nop channel*/ 1023 t_u8 remove_nop_channel; 1024 /** num of removed channel */ 1025 t_u8 num_remvoed_channel; 1026 /** Number of channels in scan_channel_list */ 1027 t_u32 num_of_chan; 1028 /** scan channel list in ACS mode */ 1029 scan_chan_list chan_list[MLAN_MAX_CHANNEL]; 1030 } mlan_uap_scan_channels; 1031 1032 /** mlan_uap_oper_ctrl */ 1033 typedef struct _mlan_uap_oper_ctrl { 1034 /** control value 1035 * 0: do nothing, 1036 * 2: uap stops and restarts automaticaly 1037 */ 1038 t_u16 ctrl_value; 1039 /** channel opt 1040 * 1: uap restart on default 2.4G/channel 6 1041 * 2: uap restart on the band/channel configured by driver previously 1042 * 3: uap restart on the band/channel specified by band_cfg and channel 1043 */ 1044 t_u16 chan_opt; 1045 /** band cfg 0 1046 * 0: 20Mhz 2: 40 Mhz 3: 80Mhz 1047 */ 1048 t_u8 band_cfg; 1049 /** channel */ 1050 t_u8 channel; 1051 } mlan_uap_oper_ctrl; 1052 1053 #endif 1054 1055 #ifdef WIFI_DIRECT_SUPPORT 1056 /** mode: disable wifi direct */ 1057 #define WIFI_DIRECT_MODE_DISABLE 0 1058 /** mode: listen */ 1059 #define WIFI_DIRECT_MODE_LISTEN 1 1060 /** mode: GO */ 1061 #define WIFI_DIRECT_MODE_GO 2 1062 /** mode: client */ 1063 #define WIFI_DIRECT_MODE_CLIENT 3 1064 /** mode: find */ 1065 #define WIFI_DIRECT_MODE_FIND 4 1066 /** mode: stop find */ 1067 #define WIFI_DIRECT_MODE_STOP_FIND 5 1068 #endif 1069 1070 /** Type definition of mlan_ds_bss for MLAN_IOCTL_BSS */ 1071 typedef struct _mlan_ds_bss { 1072 /** Sub-command */ 1073 t_u32 sub_command; 1074 /** BSS parameter */ 1075 union { 1076 /** SSID-BSSID for MLAN_OID_BSS_START */ 1077 mlan_ssid_bssid ssid_bssid; 1078 /** BSSID for MLAN_OID_BSS_STOP */ 1079 mlan_802_11_mac_addr bssid; 1080 /** BSS mode for MLAN_OID_BSS_MODE */ 1081 t_u32 bss_mode; 1082 /** BSS channel/frequency for MLAN_OID_BSS_CHANNEL */ 1083 chan_freq bss_chan; 1084 /** BSS channel list for MLAN_OID_BSS_CHANNEL_LIST */ 1085 mlan_chan_list chanlist; 1086 /** MAC address for MLAN_OID_BSS_MAC_ADDR */ 1087 mlan_802_11_mac_addr mac_addr; 1088 /** Multicast list for MLAN_OID_BSS_MULTICAST_LIST */ 1089 mlan_multicast_list multicast_list; 1090 /** Beacon interval for MLAN_OID_IBSS_BCN_INTERVAL */ 1091 t_u32 bcn_interval; 1092 /** ATIM window for MLAN_OID_IBSS_ATIM_WINDOW */ 1093 t_u32 atim_window; 1094 /** deauth param for MLAN_OID_BSS_STOP & MLAN_OID_UAP_DEAUTH_STA */ 1095 mlan_deauth_param deauth_param; 1096 #ifdef UAP_SUPPORT 1097 /** host based uap flag for MLAN_OID_BSS_START */ 1098 t_u8 host_based; 1099 /** BSS param for AP mode for MLAN_OID_UAP_BSS_CONFIG */ 1100 mlan_uap_bss_param bss_config; 1101 /** AP Wmm parameters for MLAN_OID_UAP_CFG_WMM_PARAM */ 1102 wmm_parameter_t ap_wmm_para; 1103 /** ap scan channels for MLAN_OID_UAP_SCAN_CHANNELS*/ 1104 mlan_uap_scan_channels ap_scan_channels; 1105 /** ap channel for MLAN_OID_UAP_CHANNEL*/ 1106 chan_band_info ap_channel; 1107 /** ap operation control for MLAN_OID_UAP_OPER_CTRL*/ 1108 mlan_uap_oper_ctrl ap_oper_ctrl; 1109 #endif 1110 #if defined(STA_SUPPORT) && defined(UAP_SUPPORT) 1111 /** BSS role for MLAN_OID_BSS_ROLE */ 1112 t_u8 bss_role; 1113 #endif 1114 #ifdef WIFI_DIRECT_SUPPORT 1115 /** wifi direct mode for MLAN_OID_WIFI_DIRECT_MODE */ 1116 t_u16 wfd_mode; 1117 #endif 1118 #ifdef STA_SUPPORT 1119 /** Listen interval for MLAN_OID_BSS_LISTEN_INTERVAL */ 1120 t_u16 listen_interval; 1121 /** STA channel info for MLAN_OID_BSS_CHAN_INFO */ 1122 chan_band_info sta_channel; 1123 #endif 1124 } param; 1125 } mlan_ds_bss, *pmlan_ds_bss; 1126 1127 /** Type definition of mlan_ds_custom_reg_domain */ 1128 typedef struct _mlan_ds_custom_reg_domain { 1129 t_u8 cfg_len; 1130 t_u8 cfg_buf[0]; 1131 } mlan_ds_custom_reg_domain; 1132 /*-----------------------------------------------------------------*/ 1133 /** Radio Control Group */ 1134 /*-----------------------------------------------------------------*/ 1135 /** Enumeration for band */ 1136 enum _mlan_band_def { 1137 BAND_B = 1, 1138 BAND_G = 2, 1139 BAND_A = 4, 1140 BAND_GN = 8, 1141 BAND_AN = 16, 1142 }; 1143 1144 /** Channel bandwidth */ 1145 #define CHANNEL_BW_20MHZ 0 1146 #define CHANNEL_BW_40MHZ_ABOVE 1 1147 #define CHANNEL_BW_40MHZ_BELOW 3 1148 1149 /** RF antenna selection */ 1150 #define RF_ANTENNA_MASK(n) ((1<<(n))-1) 1151 /** RF antenna auto select */ 1152 #define RF_ANTENNA_AUTO 0xFFFF 1153 1154 /** Type definition of mlan_ds_band_cfg for MLAN_OID_BAND_CFG */ 1155 typedef struct _mlan_ds_band_cfg { 1156 /** Infra band */ 1157 t_u32 config_bands; 1158 /** Ad-hoc start band */ 1159 t_u32 adhoc_start_band; 1160 /** Ad-hoc start channel */ 1161 t_u32 adhoc_channel; 1162 /** Ad-hoc channel bandwidth */ 1163 t_u32 adhoc_chan_bandwidth; 1164 /** fw supported band */ 1165 t_u32 fw_bands; 1166 } mlan_ds_band_cfg; 1167 1168 /** Type definition of mlan_ds_ant_cfg_1x1 for MLAN_OID_ANT_CFG */ 1169 typedef struct _mlan_ds_ant_cfg_1x1 { 1170 /** Antenna mode */ 1171 t_u32 antenna; 1172 /** Evaluate time */ 1173 t_u16 evaluate_time; 1174 /** Current antenna */ 1175 t_u16 current_antenna; 1176 } mlan_ds_ant_cfg_1x1, *pmlan_ds_ant_cfg_1x1; 1177 1178 /** Type definition of mlan_ds_remain_chan for MLAN_OID_REMAIN_CHAN_CFG */ 1179 typedef struct _mlan_ds_remain_chan { 1180 /** remove flag */ 1181 t_u16 remove; 1182 /** status */ 1183 t_u8 status; 1184 /** Band cfg */ 1185 Band_Config_t bandcfg; 1186 /** channel */ 1187 t_u8 channel; 1188 /** remain time: Unit ms*/ 1189 t_u32 remain_period; 1190 } mlan_ds_remain_chan, *pmlan_ds_remain_chan; 1191 1192 /** Type definition of mlan_ds_radio_cfg for MLAN_IOCTL_RADIO_CFG */ 1193 typedef struct _mlan_ds_radio_cfg { 1194 /** Sub-command */ 1195 t_u32 sub_command; 1196 /** Radio control parameter */ 1197 union { 1198 /** Radio on/off for MLAN_OID_RADIO_CTRL */ 1199 t_u32 radio_on_off; 1200 /** Band info for MLAN_OID_BAND_CFG */ 1201 mlan_ds_band_cfg band_cfg; 1202 /** Antenna info for MLAN_OID_ANT_CFG */ 1203 mlan_ds_ant_cfg_1x1 ant_cfg_1x1; 1204 /** remain on channel for MLAN_OID_REMAIN_CHAN_CFG */ 1205 mlan_ds_remain_chan remain_chan; 1206 } param; 1207 } mlan_ds_radio_cfg, *pmlan_ds_radio_cfg; 1208 1209 enum COALESCE_OPERATION { 1210 RECV_FILTER_MATCH_TYPE_EQ = 0x80, 1211 RECV_FILTER_MATCH_TYPE_NE, 1212 }; 1213 1214 enum COALESCE_PACKET_TYPE { 1215 PACKET_TYPE_UNICAST = 1, 1216 PACKET_TYPE_MULTICAST = 2, 1217 PACKET_TYPE_BROADCAST = 3 1218 }; 1219 1220 #define COALESCE_MAX_RULES 8 1221 #define COALESCE_MAX_BYTESEQ 4 /* non-adjustable */ 1222 #define COALESCE_MAX_FILTERS 4 1223 #define MAX_COALESCING_DELAY 100 /* in msecs */ 1224 #define MAX_PATTERN_LEN 20 1225 #define MAX_OFFSET_LEN 100 1226 1227 /** filt field param structure */ 1228 struct filt_field_param { 1229 /** Operation */ 1230 t_u8 operation; 1231 /** Operand len */ 1232 t_u8 operand_len; 1233 /** offset */ 1234 t_u16 offset; 1235 /** Operand byte stream */ 1236 t_u8 operand_byte_stream[COALESCE_MAX_BYTESEQ]; 1237 }; 1238 1239 /** coalesce rule structure */ 1240 struct coalesce_rule { 1241 /** max coalescing delay */ 1242 t_u16 max_coalescing_delay; 1243 /** number of fields */ 1244 t_u8 num_of_fields; 1245 /** packet type */ 1246 t_u8 pkt_type; 1247 struct filt_field_param params[COALESCE_MAX_FILTERS]; 1248 }; 1249 1250 /** coalesce configuration structure */ 1251 typedef struct _mlan_ds_coalesce_cfg { 1252 t_u16 num_of_rules; 1253 struct coalesce_rule rule[COALESCE_MAX_RULES]; 1254 } mlan_ds_coalesce_cfg; 1255 1256 /*-----------------------------------------------------------------*/ 1257 /** SNMP MIB Group */ 1258 /*-----------------------------------------------------------------*/ 1259 /** Type definition of mlan_ds_snmp_mib for MLAN_IOCTL_SNMP_MIB */ 1260 typedef struct _mlan_ds_snmp_mib { 1261 /** Sub-command */ 1262 t_u32 sub_command; 1263 /** SNMP MIB parameter */ 1264 union { 1265 /** RTS threshold for MLAN_OID_SNMP_MIB_RTS_THRESHOLD */ 1266 t_u32 rts_threshold; 1267 /** Fragment threshold for MLAN_OID_SNMP_MIB_FRAG_THRESHOLD */ 1268 t_u32 frag_threshold; 1269 /** Retry count for MLAN_OID_SNMP_MIB_RETRY_COUNT */ 1270 t_u32 retry_count; 1271 /** OID value for MLAN_OID_SNMP_MIB_DOT11D/H */ 1272 t_u32 oid_value; 1273 /** DTIM period for MLAN_OID_SNMP_MIB_DTIM_PERIOD */ 1274 t_u32 dtim_period; 1275 /** Singal_ext Enable for MLAN_OID_SNMP_MIB_SIGNALEXT_ENABLE */ 1276 t_u8 signalext_enable; 1277 /** Control deauth when uap switch channel */ 1278 t_u8 deauthctrl; 1279 } param; 1280 } mlan_ds_snmp_mib, *pmlan_ds_snmp_mib; 1281 1282 /*-----------------------------------------------------------------*/ 1283 /** Status Information Group */ 1284 /*-----------------------------------------------------------------*/ 1285 /** Enumeration for ad-hoc status */ 1286 enum _mlan_adhoc_status { 1287 ADHOC_IDLE, 1288 ADHOC_STARTED, 1289 ADHOC_JOINED, 1290 ADHOC_COALESCED, ADHOC_STARTING 1291 }; 1292 1293 /** Get stats org structure */ 1294 typedef struct _mlan_ds_get_stats_org { 1295 /** Statistics counter */ 1296 /** Multicast transmitted frame count */ 1297 t_u32 mcast_tx_frame; 1298 /** Failure count */ 1299 t_u32 failed; 1300 /** Retry count */ 1301 t_u32 retry; 1302 /** Multi entry count */ 1303 t_u32 multi_retry; 1304 /** Duplicate frame count */ 1305 t_u32 frame_dup; 1306 /** RTS success count */ 1307 t_u32 rts_success; 1308 /** RTS failure count */ 1309 t_u32 rts_failure; 1310 /** Ack failure count */ 1311 t_u32 ack_failure; 1312 /** Rx fragmentation count */ 1313 t_u32 rx_frag; 1314 /** Multicast Tx frame count */ 1315 t_u32 mcast_rx_frame; 1316 /** FCS error count */ 1317 t_u32 fcs_error; 1318 /** Tx frame count */ 1319 t_u32 tx_frame; 1320 /** WEP ICV error count */ 1321 t_u32 wep_icv_error[4]; 1322 /** beacon recv count */ 1323 t_u32 bcn_rcv_cnt; 1324 /** beacon miss count */ 1325 t_u32 bcn_miss_cnt; 1326 /** received amsdu count*/ 1327 t_u32 amsdu_rx_cnt; 1328 /** received msdu count in amsdu*/ 1329 t_u32 msdu_in_rx_amsdu_cnt; 1330 /** tx amsdu count*/ 1331 t_u32 amsdu_tx_cnt; 1332 /** tx msdu count in amsdu*/ 1333 t_u32 msdu_in_tx_amsdu_cnt; 1334 } mlan_ds_get_stats_org; 1335 1336 /** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ 1337 typedef struct _mlan_ds_get_stats { 1338 /** Statistics counter */ 1339 /** Multicast transmitted frame count */ 1340 t_u32 mcast_tx_frame; 1341 /** Failure count */ 1342 t_u32 failed; 1343 /** Retry count */ 1344 t_u32 retry; 1345 /** Multi entry count */ 1346 t_u32 multi_retry; 1347 /** Duplicate frame count */ 1348 t_u32 frame_dup; 1349 /** RTS success count */ 1350 t_u32 rts_success; 1351 /** RTS failure count */ 1352 t_u32 rts_failure; 1353 /** Ack failure count */ 1354 t_u32 ack_failure; 1355 /** Rx fragmentation count */ 1356 t_u32 rx_frag; 1357 /** Multicast Tx frame count */ 1358 t_u32 mcast_rx_frame; 1359 /** FCS error count */ 1360 t_u32 fcs_error; 1361 /** Tx frame count */ 1362 t_u32 tx_frame; 1363 /** WEP ICV error count */ 1364 t_u32 wep_icv_error[4]; 1365 /** beacon recv count */ 1366 t_u32 bcn_rcv_cnt; 1367 /** beacon miss count */ 1368 t_u32 bcn_miss_cnt; 1369 /** received amsdu count*/ 1370 t_u32 amsdu_rx_cnt; 1371 /** received msdu count in amsdu*/ 1372 t_u32 msdu_in_rx_amsdu_cnt; 1373 /** tx amsdu count*/ 1374 t_u32 amsdu_tx_cnt; 1375 /** tx msdu count in amsdu*/ 1376 t_u32 msdu_in_tx_amsdu_cnt; 1377 1378 /** Tx frag count */ 1379 t_u32 tx_frag_cnt; 1380 /** Qos Tx frag count */ 1381 t_u32 qos_tx_frag_cnt[8]; 1382 /** Qos failed count */ 1383 t_u32 qos_failed_cnt[8]; 1384 /** Qos retry count */ 1385 t_u32 qos_retry_cnt[8]; 1386 /** Qos multi retry count */ 1387 t_u32 qos_multi_retry_cnt[8]; 1388 /** Qos frame dup count */ 1389 t_u32 qos_frm_dup_cnt[8]; 1390 /** Qos rts success count */ 1391 t_u32 qos_rts_suc_cnt[8]; 1392 /** Qos rts failure count */ 1393 t_u32 qos_rts_failure_cnt[8]; 1394 /** Qos ack failure count */ 1395 t_u32 qos_ack_failure_cnt[8]; 1396 /** Qos Rx frag count */ 1397 t_u32 qos_rx_frag_cnt[8]; 1398 /** Qos Tx frame count */ 1399 t_u32 qos_tx_frm_cnt[8]; 1400 /** Qos discarded frame count */ 1401 t_u32 qos_discarded_frm_cnt[8]; 1402 /** Qos mpdus Rx count */ 1403 t_u32 qos_mpdus_rx_cnt[8]; 1404 /** Qos retry rx count */ 1405 t_u32 qos_retries_rx_cnt[8]; 1406 /** CMAC ICV errors count */ 1407 t_u32 cmacicv_errors; 1408 /** CMAC replays count */ 1409 t_u32 cmac_replays; 1410 /** mgmt CCMP replays count */ 1411 t_u32 mgmt_ccmp_replays; 1412 /** TKIP ICV errors count */ 1413 t_u32 tkipicv_errors; 1414 /** TKIP replays count */ 1415 t_u32 tkip_replays; 1416 /** CCMP decrypt errors count */ 1417 t_u32 ccmp_decrypt_errors; 1418 /** CCMP replays count */ 1419 t_u32 ccmp_replays; 1420 /** Tx amsdu count */ 1421 t_u32 tx_amsdu_cnt; 1422 /** failed amsdu count */ 1423 t_u32 failed_amsdu_cnt; 1424 /** retry amsdu count */ 1425 t_u32 retry_amsdu_cnt; 1426 /** multi-retry amsdu count */ 1427 t_u32 multi_retry_amsdu_cnt; 1428 /** Tx octets in amsdu count */ 1429 t_u64 tx_octets_in_amsdu_cnt; 1430 /** amsdu ack failure count */ 1431 t_u32 amsdu_ack_failure_cnt; 1432 /** Rx amsdu count */ 1433 t_u32 rx_amsdu_cnt; 1434 /** Rx octets in amsdu count */ 1435 t_u64 rx_octets_in_amsdu_cnt; 1436 /** Tx ampdu count */ 1437 t_u32 tx_ampdu_cnt; 1438 /** tx mpdus in ampdu count */ 1439 t_u32 tx_mpdus_in_ampdu_cnt; 1440 /** tx octets in ampdu count */ 1441 t_u64 tx_octets_in_ampdu_cnt; 1442 /** ampdu Rx count */ 1443 t_u32 ampdu_rx_cnt; 1444 /** mpdu in Rx ampdu count */ 1445 t_u32 mpdu_in_rx_ampdu_cnt; 1446 /** Rx octets ampdu count */ 1447 t_u64 rx_octets_in_ampdu_cnt; 1448 /** ampdu delimiter CRC error count */ 1449 t_u32 ampdu_delimiter_crc_error_cnt; 1450 } mlan_ds_get_stats, *pmlan_ds_get_stats; 1451 1452 /** Type definition of mlan_ds_get_stats for MLAN_OID_GET_STATS */ 1453 typedef struct _mlan_ds_get_correlated_time { 1454 /** System time */ 1455 t_u64 sys_time; 1456 /** FW time */ 1457 t_u64 hw_time; 1458 } mlan_ds_get_correlated_time, *pmlan_ds_get_correlated_time; 1459 1460 /** Type definition of mlan_ds_uap_stats for MLAN_OID_GET_STATS */ 1461 typedef struct _mlan_ds_uap_stats { 1462 /** tkip mic failures */ 1463 t_u32 tkip_mic_failures; 1464 /** ccmp decrypt errors */ 1465 t_u32 ccmp_decrypt_errors; 1466 /** wep undecryptable count */ 1467 t_u32 wep_undecryptable_count; 1468 /** wep icv error count */ 1469 t_u32 wep_icv_error_count; 1470 /** decrypt failure count */ 1471 t_u32 decrypt_failure_count; 1472 /** dot11 multicast tx count */ 1473 t_u32 mcast_tx_count; 1474 /** dot11 failed count */ 1475 t_u32 failed_count; 1476 /** dot11 retry count */ 1477 t_u32 retry_count; 1478 /** dot11 multi retry count */ 1479 t_u32 multi_retry_count; 1480 /** dot11 frame duplicate count */ 1481 t_u32 frame_dup_count; 1482 /** dot11 rts success count */ 1483 t_u32 rts_success_count; 1484 /** dot11 rts failure count */ 1485 t_u32 rts_failure_count; 1486 /** dot11 ack failure count */ 1487 t_u32 ack_failure_count; 1488 /** dot11 rx ragment count */ 1489 t_u32 rx_fragment_count; 1490 /** dot11 mcast rx frame count */ 1491 t_u32 mcast_rx_frame_count; 1492 /** dot11 fcs error count */ 1493 t_u32 fcs_error_count; 1494 /** dot11 tx frame count */ 1495 t_u32 tx_frame_count; 1496 /** dot11 rsna tkip cm invoked */ 1497 t_u32 rsna_tkip_cm_invoked; 1498 /** dot11 rsna 4way handshake failures */ 1499 t_u32 rsna_4way_hshk_failures; 1500 } mlan_ds_uap_stats, *pmlan_ds_uap_stats; 1501 1502 /** Mask of last beacon RSSI */ 1503 #define BCN_RSSI_LAST_MASK 0x00000001 1504 /** Mask of average beacon RSSI */ 1505 #define BCN_RSSI_AVG_MASK 0x00000002 1506 /** Mask of last data RSSI */ 1507 #define DATA_RSSI_LAST_MASK 0x00000004 1508 /** Mask of average data RSSI */ 1509 #define DATA_RSSI_AVG_MASK 0x00000008 1510 /** Mask of last beacon SNR */ 1511 #define BCN_SNR_LAST_MASK 0x00000010 1512 /** Mask of average beacon SNR */ 1513 #define BCN_SNR_AVG_MASK 0x00000020 1514 /** Mask of last data SNR */ 1515 #define DATA_SNR_LAST_MASK 0x00000040 1516 /** Mask of average data SNR */ 1517 #define DATA_SNR_AVG_MASK 0x00000080 1518 /** Mask of last beacon NF */ 1519 #define BCN_NF_LAST_MASK 0x00000100 1520 /** Mask of average beacon NF */ 1521 #define BCN_NF_AVG_MASK 0x00000200 1522 /** Mask of last data NF */ 1523 #define DATA_NF_LAST_MASK 0x00000400 1524 /** Mask of average data NF */ 1525 #define DATA_NF_AVG_MASK 0x00000800 1526 /** Mask of all RSSI_INFO */ 1527 #define ALL_RSSI_INFO_MASK 0x00000fff 1528 #define MAX_PATH_NUM 1 1529 /** path A */ 1530 #define PATH_A 0x01 1531 /** path B */ 1532 #define PATH_B 0x02 1533 /** path AB */ 1534 #define PATH_AB 0x03 1535 /** ALL the path */ 1536 #define PATH_ALL 0 1537 /** Type definition of mlan_ds_get_signal for MLAN_OID_GET_SIGNAL */ 1538 typedef struct _mlan_ds_get_signal { 1539 /** Selector of get operation */ 1540 /* 1541 * Bit0: Last Beacon RSSI, Bit1: Average Beacon RSSI, 1542 * Bit2: Last Data RSSI, Bit3: Average Data RSSI, 1543 * Bit4: Last Beacon SNR, Bit5: Average Beacon SNR, 1544 * Bit6: Last Data SNR, Bit7: Average Data SNR, 1545 * Bit8: Last Beacon NF, Bit9: Average Beacon NF, 1546 * Bit10: Last Data NF, Bit11: Average Data NF 1547 * 1548 * Bit0: PATH A 1549 * Bit1: PATH B 1550 */ 1551 t_u16 selector; 1552 1553 /** RSSI */ 1554 /** RSSI of last beacon */ 1555 t_s16 bcn_rssi_last; 1556 /** RSSI of beacon average */ 1557 t_s16 bcn_rssi_avg; 1558 /** RSSI of last data packet */ 1559 t_s16 data_rssi_last; 1560 /** RSSI of data packet average */ 1561 t_s16 data_rssi_avg; 1562 1563 /** SNR */ 1564 /** SNR of last beacon */ 1565 t_s16 bcn_snr_last; 1566 /** SNR of beacon average */ 1567 t_s16 bcn_snr_avg; 1568 /** SNR of last data packet */ 1569 t_s16 data_snr_last; 1570 /** SNR of data packet average */ 1571 t_s16 data_snr_avg; 1572 1573 /** NF */ 1574 /** NF of last beacon */ 1575 t_s16 bcn_nf_last; 1576 /** NF of beacon average */ 1577 t_s16 bcn_nf_avg; 1578 /** NF of last data packet */ 1579 t_s16 data_nf_last; 1580 /** NF of data packet average */ 1581 t_s16 data_nf_avg; 1582 } mlan_ds_get_signal, *pmlan_ds_get_signal; 1583 1584 /** bit for 2.4 G antenna diversity */ 1585 #define ANT_DIVERSITY_2G MBIT(3) 1586 /** bit for 5 G antenna diversity */ 1587 #define ANT_DIVERSITY_5G MBIT(7) 1588 1589 /** mlan_fw_info data structure for MLAN_OID_GET_FW_INFO */ 1590 typedef struct _mlan_fw_info { 1591 /** Firmware version */ 1592 t_u32 fw_ver; 1593 /** MAC address */ 1594 mlan_802_11_mac_addr mac_addr; 1595 /** 802.11n device capabilities */ 1596 t_u32 hw_dot_11n_dev_cap; 1597 /** Device support for MIMO abstraction of MCSs */ 1598 t_u8 hw_dev_mcs_support; 1599 /** user's MCS setting */ 1600 t_u8 usr_dev_mcs_support; 1601 /** fw supported band */ 1602 t_u8 fw_bands; 1603 /** region code */ 1604 t_u16 region_code; 1605 /** ECSA support */ 1606 t_u8 ecsa_enable; 1607 /** Get log support */ 1608 t_u8 getlog_enable; 1609 /** FW support for embedded supplicant */ 1610 t_u8 fw_supplicant_support; 1611 /** ant info */ 1612 t_u8 antinfo; 1613 /** max AP associated sta count supported by fw */ 1614 t_u8 max_ap_assoc_sta; 1615 /** FW support roaming offload */ 1616 t_u8 fw_roaming_support; 1617 } mlan_fw_info, *pmlan_fw_info; 1618 1619 /** Version string buffer length */ 1620 #define MLAN_MAX_VER_STR_LEN 128 1621 1622 /** mlan_ver_ext data structure for MLAN_OID_GET_VER_EXT */ 1623 typedef struct _mlan_ver_ext { 1624 /** Selected version string */ 1625 t_u32 version_str_sel; 1626 /** Version string */ 1627 char version_str[MLAN_MAX_VER_STR_LEN]; 1628 } mlan_ver_ext, *pmlan_ver_ext; 1629 1630 #ifdef BIG_ENDIAN_SUPPORT 1631 /** Extended Capabilities Data */ 1632 typedef struct MLAN_PACK_START _ExtCap_t { 1633 /** Extended Capabilities value */ 1634 t_u8 rsvdBit79:1; /* bit 79 */ 1635 t_u8 rsvdBit78:1; /* bit 78 */ 1636 t_u8 rsvdBit77:1; /* bit 77 */ 1637 t_u8 rsvdBit76:1; /* bit 76 */ 1638 t_u8 rsvdBit75:1; /* bit 75 */ 1639 t_u8 rsvdBit74:1; /* bit 74 */ 1640 t_u8 rsvdBit73:1; /* bit 73 */ 1641 t_u8 FILS:1; /* bit 72 */ 1642 t_u8 FTMI:1; /* bit 71 */ 1643 t_u8 FTMR:1; /* bit 70 */ 1644 t_u8 CAQ:1; /* bit 69 */ 1645 t_u8 rsvdBit68:1; /* bit 68 */ 1646 t_u8 NCC:1; /* bit 67 */ 1647 t_u8 rsvdBit66:1; /* bit 66 */ 1648 t_u8 chanSchedMgnt:1; /* bit 65 */ 1649 t_u8 MaxAMSDU:2; /* bit 63-bit 64 */ 1650 t_u8 OperModeNtf:1; /* bit 62 */ 1651 t_u8 TDLSWildBandwidth:1; /* bit 61 */ 1652 t_u8 rsvdBit60:1; /* bit 60 */ 1653 t_u8 rsvdBit59:1; /* bit 59 */ 1654 t_u8 rsvdBit58:1; /* bit 58 */ 1655 t_u8 rsvdBit57:1; /* bit 57 */ 1656 t_u8 rsvdBit56:1; /* bit 56 */ 1657 t_u8 rsvdBit55:1; /* bit 55 */ 1658 t_u8 rsvdBit54:1; /* bit 54 */ 1659 t_u8 rsvdBit53:1; /* bit 53 */ 1660 t_u8 rsvdBit52:1; /* bit 52 */ 1661 t_u8 rsvdBit51:1; /* bit 51 */ 1662 t_u8 rsvdBit50:1; /* bit 50 */ 1663 t_u8 rsvdBit49:1; /* bit 49 */ 1664 t_u8 rsvdBit48:1; /* bit 48 */ 1665 t_u8 rsvdBit47:1; /* bit 47 */ 1666 t_u8 rsvdBit46:1; /* bit 46 */ 1667 t_u8 rsvdBit45:1; /* bit 45 */ 1668 t_u8 rsvdBit44:1; /* bit 44 */ 1669 t_u8 rsvdBit43:1; /* bit 43 */ 1670 t_u8 rsvdBit42:1; /* bit 42 */ 1671 t_u8 rsvdBit41:1; /* bit 41 */ 1672 t_u8 rsvdBit40:1; /* bit 40 */ 1673 t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ 1674 t_u8 TDLSProhibited:1; /* bit 38 */ 1675 t_u8 TDLSSupport:1; /* bit 37 */ 1676 t_u8 MSGCF_Capa:1; /* bit 36 */ 1677 t_u8 Reserved35:1; /* bit 35 */ 1678 t_u8 SSPN_Interface:1; /* bit 34 */ 1679 t_u8 EBR:1; /* bit 33 */ 1680 t_u8 Qos_Map:1; /* bit 32 */ 1681 t_u8 Interworking:1; /* bit 31 */ 1682 t_u8 TDLSChannelSwitching:1; /* bit 30 */ 1683 t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ 1684 t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ 1685 t_u8 UTC:1; /* bit 27 */ 1686 t_u8 DMS:1; /* bit 26 */ 1687 t_u8 SSID_List:1; /* bit 25 */ 1688 t_u8 ChannelUsage:1; /* bit 24 */ 1689 t_u8 TimingMeasurement:1; /* bit 23 */ 1690 t_u8 MultipleBSSID:1; /* bit 22 */ 1691 t_u8 AC_StationCount:1; /* bit 21 */ 1692 t_u8 QoSTrafficCap:1; /* bit 20 */ 1693 t_u8 BSS_Transition:1; /* bit 19 */ 1694 t_u8 TIM_Broadcast:1; /* bit 18 */ 1695 t_u8 WNM_Sleep:1; /* bit 17 */ 1696 t_u8 TFS:1; /* bit 16 */ 1697 t_u8 GeospatialLocation:1; /* bit 15 */ 1698 t_u8 CivicLocation:1; /* bit 14 */ 1699 t_u8 CollocatedIntf:1; /* bit 13 */ 1700 t_u8 ProxyARPService:1; /* bit 12 */ 1701 t_u8 FMS:1; /* bit 11 */ 1702 t_u8 LocationTracking:1; /* bit 10 */ 1703 t_u8 MulticastDiagnostics:1; /* bit 9 */ 1704 t_u8 Diagnostics:1; /* bit 8 */ 1705 t_u8 Event:1; /* bit 7 */ 1706 t_u8 SPSMP_Support:1; /* bit 6 */ 1707 t_u8 Reserved5:1; /* bit 5 */ 1708 t_u8 PSMP_Capable:1; /* bit 4 */ 1709 t_u8 RejectUnadmFrame:1; /* bit 3 */ 1710 t_u8 ExtChanSwitching:1; /* bit 2 */ 1711 t_u8 Reserved1:1; /* bit 1 */ 1712 t_u8 BSS_CoexistSupport:1; /* bit 0 */ 1713 } MLAN_PACK_END ExtCap_t, *pExtCap_t; 1714 #else 1715 /** Extended Capabilities Data */ 1716 typedef struct MLAN_PACK_START _ExtCap_t { 1717 /** Extended Capabilities value */ 1718 t_u8 BSS_CoexistSupport:1; /* bit 0 */ 1719 t_u8 Reserved1:1; /* bit 1 */ 1720 t_u8 ExtChanSwitching:1; /* bit 2 */ 1721 t_u8 RejectUnadmFrame:1; /* bit 3 */ 1722 t_u8 PSMP_Capable:1; /* bit 4 */ 1723 t_u8 Reserved5:1; /* bit 5 */ 1724 t_u8 SPSMP_Support:1; /* bit 6 */ 1725 t_u8 Event:1; /* bit 7 */ 1726 t_u8 Diagnostics:1; /* bit 8 */ 1727 t_u8 MulticastDiagnostics:1; /* bit 9 */ 1728 t_u8 LocationTracking:1; /* bit 10 */ 1729 t_u8 FMS:1; /* bit 11 */ 1730 t_u8 ProxyARPService:1; /* bit 12 */ 1731 t_u8 CollocatedIntf:1; /* bit 13 */ 1732 t_u8 CivicLocation:1; /* bit 14 */ 1733 t_u8 GeospatialLocation:1; /* bit 15 */ 1734 t_u8 TFS:1; /* bit 16 */ 1735 t_u8 WNM_Sleep:1; /* bit 17 */ 1736 t_u8 TIM_Broadcast:1; /* bit 18 */ 1737 t_u8 BSS_Transition:1; /* bit 19 */ 1738 t_u8 QoSTrafficCap:1; /* bit 20 */ 1739 t_u8 AC_StationCount:1; /* bit 21 */ 1740 t_u8 MultipleBSSID:1; /* bit 22 */ 1741 t_u8 TimingMeasurement:1; /* bit 23 */ 1742 t_u8 ChannelUsage:1; /* bit 24 */ 1743 t_u8 SSID_List:1; /* bit 25 */ 1744 t_u8 DMS:1; /* bit 26 */ 1745 t_u8 UTC:1; /* bit 27 */ 1746 t_u8 TDLSPeerUAPSDSupport:1; /* bit 28 */ 1747 t_u8 TDLSPeerPSMSupport:1; /* bit 29 */ 1748 t_u8 TDLSChannelSwitching:1; /* bit 30 */ 1749 t_u8 Interworking:1; /* bit 31 */ 1750 t_u8 Qos_Map:1; /* bit 32 */ 1751 t_u8 EBR:1; /* bit 33 */ 1752 t_u8 SSPN_Interface:1; /* bit 34 */ 1753 t_u8 Reserved35:1; /* bit 35 */ 1754 t_u8 MSGCF_Capa:1; /* bit 36 */ 1755 t_u8 TDLSSupport:1; /* bit 37 */ 1756 t_u8 TDLSProhibited:1; /* bit 38 */ 1757 t_u8 TDLSChlSwitchProhib:1; /* bit 39 */ 1758 t_u8 rsvdBit40:1; /* bit 40 */ 1759 t_u8 rsvdBit41:1; /* bit 41 */ 1760 t_u8 rsvdBit42:1; /* bit 42 */ 1761 t_u8 rsvdBit43:1; /* bit 43 */ 1762 t_u8 rsvdBit44:1; /* bit 44 */ 1763 t_u8 rsvdBit45:1; /* bit 45 */ 1764 t_u8 rsvdBit46:1; /* bit 46 */ 1765 t_u8 rsvdBit47:1; /* bit 47 */ 1766 t_u8 rsvdBit48:1; /* bit 48 */ 1767 t_u8 rsvdBit49:1; /* bit 49 */ 1768 t_u8 rsvdBit50:1; /* bit 50 */ 1769 t_u8 rsvdBit51:1; /* bit 51 */ 1770 t_u8 rsvdBit52:1; /* bit 52 */ 1771 t_u8 rsvdBit53:1; /* bit 53 */ 1772 t_u8 rsvdBit54:1; /* bit 54 */ 1773 t_u8 rsvdBit55:1; /* bit 55 */ 1774 t_u8 rsvdBit56:1; /* bit 56 */ 1775 t_u8 rsvdBit57:1; /* bit 57 */ 1776 t_u8 rsvdBit58:1; /* bit 58 */ 1777 t_u8 rsvdBit59:1; /* bit 59 */ 1778 t_u8 rsvdBit60:1; /* bit 60 */ 1779 t_u8 TDLSWildBandwidth:1; /* bit 61 */ 1780 t_u8 OperModeNtf:1; /* bit 62 */ 1781 t_u8 MaxAMSDU:2; /* bit 63-bit 64 */ 1782 t_u8 chanSchedMgnt:1; /* bit 65 */ 1783 t_u8 rsvdBit66:1; /* bit 66 */ 1784 t_u8 NCC:1; /* bit 67 */ 1785 t_u8 rsvdBit68:1; /* bit 68 */ 1786 t_u8 CAQ:1; /* bit 69 */ 1787 t_u8 FTMR:1; /* bit 70 */ 1788 t_u8 FTMI:1; /* bit 71 */ 1789 t_u8 FILS:1; /* bit 72 */ 1790 t_u8 rsvdBit73:1; /* bit 73 */ 1791 t_u8 rsvdBit74:1; /* bit 74 */ 1792 t_u8 rsvdBit75:1; /* bit 75 */ 1793 t_u8 rsvdBit76:1; /* bit 76 */ 1794 t_u8 rsvdBit77:1; /* bit 77 */ 1795 t_u8 rsvdBit78:1; /* bit 78 */ 1796 t_u8 rsvdBit79:1; /* bit 79 */ 1797 } MLAN_PACK_END ExtCap_t, *pExtCap_t; 1798 #endif 1799 1800 /** ExtCap : TDLS prohibited */ 1801 #define IS_EXTCAP_TDLS_PROHIBITED(ext_cap) (ext_cap.TDLSProhibited) 1802 /** ExtCap : TDLS channel switch prohibited */ 1803 #define IS_EXTCAP_TDLS_CHLSWITCHPROHIB(ext_cap) (ext_cap.TDLSChlSwitchProhib) 1804 1805 /** mlan_bss_info data structure for MLAN_OID_GET_BSS_INFO */ 1806 typedef struct _mlan_bss_info { 1807 /** BSS mode */ 1808 t_u32 bss_mode; 1809 /** SSID */ 1810 mlan_802_11_ssid ssid; 1811 /** Table index */ 1812 t_u32 scan_table_idx; 1813 /** Channel */ 1814 t_u32 bss_chan; 1815 /** Band */ 1816 t_u8 bss_band; 1817 /** Region code */ 1818 t_u32 region_code; 1819 /** Connection status */ 1820 t_u32 media_connected; 1821 /** Radio on */ 1822 t_u32 radio_on; 1823 /** Max power level in dBm */ 1824 t_s32 max_power_level; 1825 /** Min power level in dBm */ 1826 t_s32 min_power_level; 1827 /** Adhoc state */ 1828 t_u32 adhoc_state; 1829 /** NF of last beacon */ 1830 t_s32 bcn_nf_last; 1831 /** wep status */ 1832 t_u32 wep_status; 1833 /** scan block status */ 1834 t_u8 scan_block; 1835 /** Host Sleep configured flag */ 1836 t_u32 is_hs_configured; 1837 /** Deep Sleep flag */ 1838 t_u32 is_deep_sleep; 1839 /** BSSID */ 1840 mlan_802_11_mac_addr bssid; 1841 #ifdef STA_SUPPORT 1842 /** Capability Info */ 1843 t_u16 capability_info; 1844 /** Beacon Interval */ 1845 t_u16 beacon_interval; 1846 /** Listen Interval */ 1847 t_u16 listen_interval; 1848 /** Association Id */ 1849 t_u16 assoc_id; 1850 /** AP/Peer supported rates */ 1851 t_u8 peer_supp_rates[MLAN_SUPPORTED_RATES]; 1852 /** extend capability for AP */ 1853 ExtCap_t ext_cap; 1854 #endif /* STA_SUPPORT */ 1855 /** Mobility Domain ID */ 1856 t_u16 mdid; 1857 /** FT Capability policy */ 1858 t_u8 ft_cap; 1859 } mlan_bss_info, *pmlan_bss_info; 1860 1861 /** MAXIMUM number of TID */ 1862 #define MAX_NUM_TID 8 1863 1864 /** Max RX Win size */ 1865 #define MAX_RX_WINSIZE 64 1866 1867 /** rx_reorder_tbl */ 1868 typedef struct { 1869 /** TID */ 1870 t_u16 tid; 1871 /** TA */ 1872 t_u8 ta[MLAN_MAC_ADDR_LENGTH]; 1873 /** Start window */ 1874 t_u32 start_win; 1875 /** Window size */ 1876 t_u32 win_size; 1877 /** amsdu flag */ 1878 t_u8 amsdu; 1879 /** buffer status */ 1880 t_u32 buffer[MAX_RX_WINSIZE]; 1881 } rx_reorder_tbl; 1882 1883 /** tx_ba_stream_tbl */ 1884 typedef struct { 1885 /** TID */ 1886 t_u16 tid; 1887 /** RA */ 1888 t_u8 ra[MLAN_MAC_ADDR_LENGTH]; 1889 /** amsdu flag */ 1890 t_u8 amsdu; 1891 } tx_ba_stream_tbl; 1892 1893 /** Debug command number */ 1894 #define DBG_CMD_NUM 10 1895 1896 #ifdef SDIO_MULTI_PORT_TX_AGGR 1897 /** sdio mp debug number */ 1898 #define SDIO_MP_DBG_NUM 10 1899 #endif 1900 1901 /** Maximum size of IEEE Information Elements */ 1902 #define IEEE_MAX_IE_SIZE 256 1903 1904 /** support up to 8 TDLS peer */ 1905 #define MLAN_MAX_TDLS_PEER_SUPPORTED 8 1906 /** TDLS peer info */ 1907 typedef struct _tdls_peer_info { 1908 /** station mac address */ 1909 t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; 1910 /** SNR */ 1911 t_s8 snr; 1912 /** Noise Floor */ 1913 t_s8 nf; 1914 /** Extended Capabilities IE */ 1915 t_u8 ext_cap[IEEE_MAX_IE_SIZE]; 1916 /** HT Capabilities IE */ 1917 t_u8 ht_cap[IEEE_MAX_IE_SIZE]; 1918 } tdls_peer_info; 1919 1920 /** max ralist num */ 1921 #define MLAN_MAX_RALIST_NUM 8 1922 /** ralist info */ 1923 typedef struct _ralist_info { 1924 /** RA list buffer */ 1925 t_u8 ra[MLAN_MAC_ADDR_LENGTH]; 1926 /** total packets in RA list */ 1927 t_u16 total_pkts; 1928 /** tid num */ 1929 t_u8 tid; 1930 /** tx_pause flag */ 1931 t_u8 tx_pause; 1932 } ralist_info; 1933 1934 /** mlan_debug_info data structure for MLAN_OID_GET_DEBUG_INFO */ 1935 typedef struct _mlan_debug_info { 1936 /* WMM AC_BK count */ 1937 t_u32 wmm_ac_bk; 1938 /* WMM AC_BE count */ 1939 t_u32 wmm_ac_be; 1940 /* WMM AC_VI count */ 1941 t_u32 wmm_ac_vi; 1942 /* WMM AC_VO count */ 1943 t_u32 wmm_ac_vo; 1944 /** Corresponds to max_tx_buf_size member of mlan_adapter*/ 1945 t_u32 max_tx_buf_size; 1946 /** Corresponds to tx_buf_size member of mlan_adapter*/ 1947 t_u32 tx_buf_size; 1948 /** Corresponds to curr_tx_buf_size member of mlan_adapter*/ 1949 t_u32 curr_tx_buf_size; 1950 /** Tx table num */ 1951 t_u32 tx_tbl_num; 1952 /** Tx ba stream table */ 1953 tx_ba_stream_tbl tx_tbl[MLAN_MAX_TX_BASTREAM_SUPPORTED]; 1954 /** Rx table num */ 1955 t_u32 rx_tbl_num; 1956 /** Rx reorder table*/ 1957 rx_reorder_tbl rx_tbl[MLAN_MAX_RX_BASTREAM_SUPPORTED]; 1958 /** TDLS peer number */ 1959 t_u32 tdls_peer_num; 1960 /** TDLS peer list*/ 1961 tdls_peer_info tdls_peer_list[MLAN_MAX_TDLS_PEER_SUPPORTED]; 1962 /** ralist num */ 1963 t_u32 ralist_num; 1964 /** ralist info */ 1965 ralist_info ralist[MLAN_MAX_RALIST_NUM]; 1966 /** Corresponds to ps_mode member of mlan_adapter */ 1967 t_u16 ps_mode; 1968 /** Corresponds to ps_state member of mlan_adapter */ 1969 t_u32 ps_state; 1970 #ifdef STA_SUPPORT 1971 /** Corresponds to is_deep_sleep member of mlan_adapter */ 1972 t_u8 is_deep_sleep; 1973 #endif /** STA_SUPPORT */ 1974 /** Corresponds to pm_wakeup_card_req member of mlan_adapter */ 1975 t_u8 pm_wakeup_card_req; 1976 /** Corresponds to pm_wakeup_fw_try member of mlan_adapter */ 1977 t_u32 pm_wakeup_fw_try; 1978 /** time stamp when host try to wake up firmware */ 1979 t_u32 pm_wakeup_in_secs; 1980 /** Corresponds to is_hs_configured member of mlan_adapter */ 1981 t_u8 is_hs_configured; 1982 /** Corresponds to hs_activated member of mlan_adapter */ 1983 t_u8 hs_activated; 1984 /** Corresponds to pps_uapsd_mode member of mlan_adapter */ 1985 t_u16 pps_uapsd_mode; 1986 /** Corresponds to sleep_period.period member of mlan_adapter */ 1987 t_u16 sleep_pd; 1988 /** Corresponds to wmm_qosinfo member of mlan_private */ 1989 t_u8 qos_cfg; 1990 /** Corresponds to tx_lock_flag member of mlan_adapter */ 1991 t_u8 tx_lock_flag; 1992 /** Corresponds to port_open member of mlan_private */ 1993 t_u8 port_open; 1994 /** bypass pkt count */ 1995 t_u16 bypass_pkt_count; 1996 /** Corresponds to scan_processing member of mlan_adapter */ 1997 t_u32 scan_processing; 1998 /** Corresponds to mlan_processing member of mlan_adapter */ 1999 t_u32 mlan_processing; 2000 /** Corresponds to main_lock_flag member of mlan_adapter */ 2001 t_u32 main_lock_flag; 2002 /** Corresponds to main_process_cnt member of mlan_adapter */ 2003 t_u32 main_process_cnt; 2004 /** Corresponds to delay_task_flag member of mlan_adapter */ 2005 t_u32 delay_task_flag; 2006 /** mlan_rx_processing */ 2007 t_u32 mlan_rx_processing; 2008 /** rx pkts queued */ 2009 t_u32 rx_pkts_queued; 2010 /** Number of host to card command failures */ 2011 t_u32 num_cmd_host_to_card_failure; 2012 /** Number of host to card sleep confirm failures */ 2013 t_u32 num_cmd_sleep_cfm_host_to_card_failure; 2014 /** Number of host to card Tx failures */ 2015 t_u32 num_tx_host_to_card_failure; 2016 /** Number of allocate buffer failure */ 2017 t_u32 num_alloc_buffer_failure; 2018 /** Number of pkt dropped */ 2019 t_u32 num_pkt_dropped; 2020 /** Number of card to host command/event failures */ 2021 t_u32 num_cmdevt_card_to_host_failure; 2022 /** Number of card to host Rx failures */ 2023 t_u32 num_rx_card_to_host_failure; 2024 /** Number of interrupt read failures */ 2025 t_u32 num_int_read_failure; 2026 /** Last interrupt status */ 2027 t_u32 last_int_status; 2028 /** number of interrupt receive */ 2029 t_u32 num_of_irq; 2030 /** flag for sdio rx aggr */ 2031 t_u8 sdio_rx_aggr; 2032 /** FW update port number */ 2033 t_u32 mp_update[SDIO_MP_AGGR_DEF_PKT_LIMIT * 2]; 2034 /** Invalid port update count */ 2035 t_u32 mp_invalid_update; 2036 #ifdef SDIO_MULTI_PORT_TX_AGGR 2037 /** Number of packets tx aggr */ 2038 t_u32 mpa_tx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; 2039 /** no more packets count*/ 2040 t_u32 mpa_sent_last_pkt; 2041 /** no write_ports count */ 2042 t_u32 mpa_sent_no_ports; 2043 /** last recv wr_bitmap */ 2044 t_u32 last_recv_wr_bitmap; 2045 /** last mp_wr_bitmap */ 2046 t_u32 last_mp_wr_bitmap[SDIO_MP_DBG_NUM]; 2047 /** last ports for cmd53 write data */ 2048 t_u32 last_mp_wr_ports[SDIO_MP_DBG_NUM]; 2049 /** last len for cmd53 write data */ 2050 t_u32 last_mp_wr_len[SDIO_MP_DBG_NUM]; 2051 /** last curr_wr_port */ 2052 t_u8 last_curr_wr_port[SDIO_MP_DBG_NUM]; 2053 /** length info for cmd53 write data */ 2054 t_u16 last_mp_wr_info[SDIO_MP_DBG_NUM * SDIO_MP_AGGR_DEF_PKT_LIMIT]; 2055 /** last mp_index */ 2056 t_u8 last_mp_index; 2057 /** buffer for mp debug */ 2058 t_u8 *mpa_buf; 2059 /** length info for mp buf size */ 2060 t_u32 mpa_buf_size; 2061 #endif 2062 #ifdef SDIO_MULTI_PORT_RX_AGGR 2063 /** Number of packets rx aggr */ 2064 t_u32 mpa_rx_count[SDIO_MP_AGGR_DEF_PKT_LIMIT]; 2065 #endif 2066 /** Number of deauthentication events */ 2067 t_u32 num_event_deauth; 2068 /** Number of disassosiation events */ 2069 t_u32 num_event_disassoc; 2070 /** Number of link lost events */ 2071 t_u32 num_event_link_lost; 2072 /** Number of deauthentication commands */ 2073 t_u32 num_cmd_deauth; 2074 /** Number of association comamnd successes */ 2075 t_u32 num_cmd_assoc_success; 2076 /** Number of association command failures */ 2077 t_u32 num_cmd_assoc_failure; 2078 /** Number of Tx timeouts */ 2079 t_u32 num_tx_timeout; 2080 /** Number of command timeouts */ 2081 t_u32 num_cmd_timeout; 2082 /** Number of command timeouts */ 2083 t_u32 dbg_num_cmd_timeout; 2084 /** Timeout command ID */ 2085 t_u16 timeout_cmd_id; 2086 /** Timeout command action */ 2087 t_u16 timeout_cmd_act; 2088 /** List of last command IDs */ 2089 t_u16 last_cmd_id[DBG_CMD_NUM]; 2090 /** List of last command actions */ 2091 t_u16 last_cmd_act[DBG_CMD_NUM]; 2092 /** Last command index */ 2093 t_u16 last_cmd_index; 2094 /** List of last command response IDs */ 2095 t_u16 last_cmd_resp_id[DBG_CMD_NUM]; 2096 /** Last command response index */ 2097 t_u16 last_cmd_resp_index; 2098 /** List of last events */ 2099 t_u16 last_event[DBG_CMD_NUM]; 2100 /** Last event index */ 2101 t_u16 last_event_index; 2102 /** Number of no free command node */ 2103 t_u16 num_no_cmd_node; 2104 /** pending command id */ 2105 t_u16 pending_cmd; 2106 /** time stamp for dnld last cmd */ 2107 t_u32 dnld_cmd_in_secs; 2108 /** Corresponds to data_sent member of mlan_adapter */ 2109 t_u8 data_sent; 2110 /** Corresponds to cmd_sent member of mlan_adapter */ 2111 t_u8 cmd_sent; 2112 /** SDIO multiple port read bitmap */ 2113 t_u32 mp_rd_bitmap; 2114 /** SDIO multiple port write bitmap */ 2115 t_u32 mp_wr_bitmap; 2116 /** Current available port for read */ 2117 t_u8 curr_rd_port; 2118 /** Current available port for write */ 2119 t_u8 curr_wr_port; 2120 /** Corresponds to cmdresp_received member of mlan_adapter */ 2121 t_u8 cmd_resp_received; 2122 /** Corresponds to event_received member of mlan_adapter */ 2123 t_u8 event_received; 2124 /** pendig tx pkts */ 2125 t_u32 tx_pkts_queued; 2126 #ifdef UAP_SUPPORT 2127 /** pending bridge pkts */ 2128 t_u16 num_bridge_pkts; 2129 /** dropped pkts */ 2130 t_u32 num_drop_pkts; 2131 #endif 2132 /** mlan_adapter pointer */ 2133 t_void *mlan_adapter; 2134 /** mlan_adapter_size */ 2135 t_u32 mlan_adapter_size; 2136 /** mlan_priv vector */ 2137 t_void *mlan_priv[MLAN_MAX_BSS_NUM]; 2138 /** mlan_priv_size */ 2139 t_u32 mlan_priv_size[MLAN_MAX_BSS_NUM]; 2140 /** mlan_priv_num */ 2141 t_u8 mlan_priv_num; 2142 } mlan_debug_info, *pmlan_debug_info; 2143 2144 #ifdef UAP_SUPPORT 2145 /** Maximum number of clients supported by AP */ 2146 #define MAX_NUM_CLIENTS MAX_STA_COUNT 2147 2148 /** station info */ 2149 typedef struct _sta_info { 2150 /** STA MAC address */ 2151 t_u8 mac_address[MLAN_MAC_ADDR_LENGTH]; 2152 /** Power mfg status */ 2153 t_u8 power_mfg_status; 2154 /** RSSI */ 2155 t_s8 rssi; 2156 /** station bandmode */ 2157 t_u8 bandmode; 2158 } sta_info; 2159 2160 /** mlan_ds_sta_list structure for MLAN_OID_UAP_STA_LIST */ 2161 typedef struct _mlan_ds_sta_list { 2162 /** station count */ 2163 t_u16 sta_count; 2164 /** station list */ 2165 sta_info info[MAX_NUM_CLIENTS]; 2166 } mlan_ds_sta_list, *pmlan_ds_sta_list; 2167 #endif 2168 2169 /** Type definition of mlan_ds_get_info for MLAN_IOCTL_GET_INFO */ 2170 typedef struct _mlan_ds_get_info { 2171 /** Sub-command */ 2172 t_u32 sub_command; 2173 2174 /** Status information parameter */ 2175 union { 2176 /** Signal information for MLAN_OID_GET_SIGNAL */ 2177 mlan_ds_get_signal signal; 2178 /** Signal path id for MLAN_OID_GET_SIGNAL_EXT */ 2179 t_u16 path_id; 2180 /** Signal information for MLAN_OID_GET_SIGNAL_EXT */ 2181 mlan_ds_get_signal signal_ext[MAX_PATH_NUM]; 2182 /** Statistics information for MLAN_OID_GET_STATS */ 2183 mlan_ds_get_stats stats; 2184 /** Firmware information for MLAN_OID_GET_FW_INFO */ 2185 mlan_fw_info fw_info; 2186 /** Extended version information for MLAN_OID_GET_VER_EXT */ 2187 mlan_ver_ext ver_ext; 2188 /** BSS information for MLAN_OID_GET_BSS_INFO */ 2189 mlan_bss_info bss_info; 2190 /** Debug information for MLAN_OID_GET_DEBUG_INFO */ 2191 t_u8 debug_info[1]; 2192 #ifdef UAP_SUPPORT 2193 /** UAP Statistics information for MLAN_OID_GET_STATS */ 2194 mlan_ds_uap_stats ustats; 2195 /** UAP station list for MLAN_OID_UAP_STA_LIST */ 2196 mlan_ds_sta_list sta_list; 2197 #endif 2198 } param; 2199 } mlan_ds_get_info, *pmlan_ds_get_info; 2200 2201 /*-----------------------------------------------------------------*/ 2202 /** Security Configuration Group */ 2203 /*-----------------------------------------------------------------*/ 2204 /** Enumeration for authentication mode */ 2205 enum _mlan_auth_mode { 2206 MLAN_AUTH_MODE_OPEN = 0x00, 2207 MLAN_AUTH_MODE_SHARED = 0x01, 2208 MLAN_AUTH_MODE_FT = 0x02, 2209 MLAN_AUTH_MODE_NETWORKEAP = 0x80, 2210 MLAN_AUTH_MODE_AUTO = 0xFF, 2211 }; 2212 2213 /**Enumeration for AssocAgent authentication mode, sync from FW.*/ 2214 typedef enum { 2215 AssocAgentAuth_Open, 2216 AssocAgentAuth_Shared, 2217 AssocAgentAuth_FastBss, 2218 AssocAgentAuth_FastBss_Skip, 2219 AssocAgentAuth_Network_EAP, 2220 AssocAgentAuth_Auto, 2221 } AssocAgentAuthType_e; 2222 2223 /** Enumeration for encryption mode */ 2224 enum _mlan_encryption_mode { 2225 MLAN_ENCRYPTION_MODE_NONE = 0, 2226 MLAN_ENCRYPTION_MODE_WEP40 = 1, 2227 MLAN_ENCRYPTION_MODE_TKIP = 2, 2228 MLAN_ENCRYPTION_MODE_CCMP = 3, 2229 MLAN_ENCRYPTION_MODE_WEP104 = 4, 2230 }; 2231 2232 /** Enumeration for PSK */ 2233 enum _mlan_psk_type { 2234 MLAN_PSK_PASSPHRASE = 1, 2235 MLAN_PSK_PMK, 2236 MLAN_PSK_CLEAR, 2237 MLAN_PSK_QUERY, 2238 }; 2239 2240 /** The bit to indicate the key is for unicast */ 2241 #define MLAN_KEY_INDEX_UNICAST 0x40000000 2242 /** The key index to indicate default key */ 2243 #define MLAN_KEY_INDEX_DEFAULT 0x000000ff 2244 /** Maximum key length */ 2245 /* #define MLAN_MAX_KEY_LENGTH 32 */ 2246 /** Minimum passphrase length */ 2247 #define MLAN_MIN_PASSPHRASE_LENGTH 8 2248 /** Maximum passphrase length */ 2249 #define MLAN_MAX_PASSPHRASE_LENGTH 63 2250 /** PMK length */ 2251 #define MLAN_PMK_HEXSTR_LENGTH 64 2252 /* A few details needed for WEP (Wireless Equivalent Privacy) */ 2253 /** 104 bits */ 2254 #define MAX_WEP_KEY_SIZE 13 2255 /** 40 bits RC4 - WEP */ 2256 #define MIN_WEP_KEY_SIZE 5 2257 /** packet number size */ 2258 #define PN_SIZE 16 2259 /** max seq size of wpa/wpa2 key */ 2260 #define SEQ_MAX_SIZE 8 2261 2262 /** key flag for tx_seq */ 2263 #define KEY_FLAG_TX_SEQ_VALID 0x00000001 2264 /** key flag for rx_seq */ 2265 #define KEY_FLAG_RX_SEQ_VALID 0x00000002 2266 /** key flag for group key */ 2267 #define KEY_FLAG_GROUP_KEY 0x00000004 2268 /** key flag for tx */ 2269 #define KEY_FLAG_SET_TX_KEY 0x00000008 2270 /** key flag for mcast IGTK */ 2271 #define KEY_FLAG_AES_MCAST_IGTK 0x00000010 2272 /** key flag for remove key */ 2273 #define KEY_FLAG_REMOVE_KEY 0x80000000 2274 2275 /** Type definition of mlan_ds_encrypt_key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ 2276 typedef struct _mlan_ds_encrypt_key { 2277 /** Key disabled, all other fields will be 2278 * ignore when this flag set to MTRUE 2279 */ 2280 t_u32 key_disable; 2281 /** key removed flag, when this flag is set 2282 * to MTRUE, only key_index will be check 2283 */ 2284 t_u32 key_remove; 2285 /** Key index, used as current tx key index 2286 * when is_current_wep_key is set to MTRUE 2287 */ 2288 t_u32 key_index; 2289 /** Current Tx key flag */ 2290 t_u32 is_current_wep_key; 2291 /** Key length */ 2292 t_u32 key_len; 2293 /** Key */ 2294 t_u8 key_material[MLAN_MAX_KEY_LENGTH]; 2295 /** mac address */ 2296 t_u8 mac_addr[MLAN_MAC_ADDR_LENGTH]; 2297 /** wapi key flag */ 2298 t_u32 is_wapi_key; 2299 /** Initial packet number */ 2300 t_u8 pn[PN_SIZE]; 2301 /** key flags */ 2302 t_u32 key_flags; 2303 } mlan_ds_encrypt_key, *pmlan_ds_encrypt_key; 2304 2305 /** Type definition of mlan_passphrase_t */ 2306 typedef struct _mlan_passphrase_t { 2307 /** Length of passphrase */ 2308 t_u32 passphrase_len; 2309 /** Passphrase */ 2310 t_u8 passphrase[MLAN_MAX_PASSPHRASE_LENGTH]; 2311 } mlan_passphrase_t; 2312 2313 /** Type defnition of mlan_pmk_t */ 2314 typedef struct _mlan_pmk_t { 2315 /** PMK */ 2316 t_u8 pmk[MLAN_MAX_KEY_LENGTH]; 2317 t_u8 pmk_r0[MLAN_MAX_KEY_LENGTH]; 2318 t_u8 pmk_r0_name[MLAN_MAX_PMKR0_NAME_LENGTH]; 2319 } mlan_pmk_t; 2320 2321 /** Embedded supplicant RSN type: No RSN */ 2322 #define RSN_TYPE_NO_RSN MBIT(0) 2323 /** Embedded supplicant RSN type: WPA */ 2324 #define RSN_TYPE_WPA MBIT(3) 2325 /** Embedded supplicant RSN type: WPA-NONE */ 2326 #define RSN_TYPE_WPANONE MBIT(4) 2327 /** Embedded supplicant RSN type: WPA2 */ 2328 #define RSN_TYPE_WPA2 MBIT(5) 2329 /** Embedded supplicant RSN type: RFU */ 2330 #define RSN_TYPE_VALID_BITS (RSN_TYPE_NO_RSN | RSN_TYPE_WPA | RSN_TYPE_WPANONE | RSN_TYPE_WPA2) 2331 2332 /** Embedded supplicant cipher type: TKIP */ 2333 #define EMBED_CIPHER_TKIP MBIT(2) 2334 /** Embedded supplicant cipher type: AES */ 2335 #define EMBED_CIPHER_AES MBIT(3) 2336 /** Embedded supplicant cipher type: RFU */ 2337 #define EMBED_CIPHER_VALID_BITS (EMBED_CIPHER_TKIP | EMBED_CIPHER_AES) 2338 2339 /** Type definition of mlan_ds_passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ 2340 typedef struct _mlan_ds_passphrase { 2341 /** SSID may be used */ 2342 mlan_802_11_ssid ssid; 2343 /** BSSID may be used */ 2344 mlan_802_11_mac_addr bssid; 2345 /** Flag for passphrase or pmk used */ 2346 t_u16 psk_type; 2347 /** Passphrase or PMK */ 2348 union { 2349 /** Passphrase */ 2350 mlan_passphrase_t passphrase; 2351 /** PMK */ 2352 mlan_pmk_t pmk; 2353 } psk; 2354 } mlan_ds_passphrase, *pmlan_ds_passphrase; 2355 2356 /** Type definition of mlan_ds_esupp_mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ 2357 typedef struct _mlan_ds_ewpa_mode { 2358 /** RSN mode */ 2359 t_u32 rsn_mode; 2360 /** Active pairwise cipher */ 2361 t_u32 act_paircipher; 2362 /** Active pairwise cipher */ 2363 t_u32 act_groupcipher; 2364 } mlan_ds_esupp_mode, *pmlan_ds_esupp_mode; 2365 2366 /* Security SSID MAX number support by firmware*/ 2367 #define MAX_SEC_SSID_NUM 6 2368 2369 /** Type definition of mlan_ds_sec_cfg for MLAN_IOCTL_SEC_CFG */ 2370 typedef struct _mlan_ds_sec_cfg { 2371 /** Sub-command */ 2372 t_u32 sub_command; 2373 /** Flag to extend some structures to support multiple values. 2374 ** For example, mlan_ds_passphrase can only contain one value, 2375 ** if need use mlan_ds_passphrase[N], just set this flag and 2376 ** use mlan_ds_passphrase[] instead to avoid modify 2377 ** more already exist code. 2378 */ 2379 t_u8 multi_passphrase; 2380 /** Security configuration parameter */ 2381 union { 2382 /** Authentication mode for MLAN_OID_SEC_CFG_AUTH_MODE */ 2383 t_u32 auth_mode; 2384 /** Encryption mode for MLAN_OID_SEC_CFG_ENCRYPT_MODE */ 2385 t_u32 encrypt_mode; 2386 /** WPA enabled flag for MLAN_OID_SEC_CFG_WPA_ENABLED */ 2387 t_u32 wpa_enabled; 2388 /** WAPI enabled flag for MLAN_OID_SEC_CFG_WAPI_ENABLED */ 2389 t_u32 wapi_enabled; 2390 /** Port Control enabled flag for MLAN_OID_SEC_CFG_PORT_CTRL */ 2391 t_u32 port_ctrl_enabled; 2392 /** Encryption key for MLAN_OID_SEC_CFG_ENCRYPT_KEY */ 2393 mlan_ds_encrypt_key encrypt_key; 2394 /** Passphrase for MLAN_OID_SEC_CFG_PASSPHRASE */ 2395 mlan_ds_passphrase passphrase; 2396 /** Embedded supplicant WPA enabled flag for 2397 * MLAN_OID_SEC_CFG_EWPA_ENABLED 2398 */ 2399 t_u32 ewpa_enabled; 2400 /** Embedded supplicant mode for MLAN_OID_SEC_CFG_ESUPP_MODE */ 2401 mlan_ds_esupp_mode esupp_mode; 2402 mlan_ds_passphrase roam_passphrase[MAX_SEC_SSID_NUM]; 2403 } param; 2404 } mlan_ds_sec_cfg, *pmlan_ds_sec_cfg; 2405 2406 /*-----------------------------------------------------------------*/ 2407 /** Rate Configuration Group */ 2408 /*-----------------------------------------------------------------*/ 2409 /** Enumeration for rate type */ 2410 enum _mlan_rate_type { 2411 MLAN_RATE_INDEX, 2412 MLAN_RATE_VALUE, 2413 MLAN_RATE_BITMAP 2414 }; 2415 2416 /** Enumeration for rate format */ 2417 enum _mlan_rate_format { 2418 MLAN_RATE_FORMAT_LG = 0, 2419 MLAN_RATE_FORMAT_HT, 2420 MLAN_RATE_FORMAT_AUTO = 0xFF, 2421 }; 2422 /** Max bitmap rates size */ 2423 #define MAX_BITMAP_RATES_SIZE 18 2424 2425 /** Type definition of mlan_rate_cfg_t for MLAN_OID_RATE_CFG */ 2426 typedef struct _mlan_rate_cfg_t { 2427 /** Fixed rate: 0, auto rate: 1 */ 2428 t_u32 is_rate_auto; 2429 /** Rate type. 0: index; 1: value; 2: bitmap */ 2430 t_u32 rate_type; 2431 /** Rate/MCS index or rate value if fixed rate */ 2432 t_u32 rate; 2433 /** Rate Bitmap */ 2434 t_u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; 2435 /* LG rate: 0, HT rate: 1, VHT rate: 2 */ 2436 t_u32 rate_format; 2437 } mlan_rate_cfg_t; 2438 2439 /** HT channel bandwidth */ 2440 typedef enum _mlan_ht_bw { 2441 MLAN_HT_BW20, 2442 MLAN_HT_BW40, 2443 } mlan_ht_bw; 2444 2445 /** HT guard interval */ 2446 typedef enum _mlan_ht_gi { 2447 MLAN_HT_LGI, 2448 MLAN_HT_SGI, 2449 } mlan_ht_gi; 2450 2451 /** Band and BSS mode */ 2452 typedef struct _mlan_band_data_rate { 2453 /** Band configuration */ 2454 t_u8 config_bands; 2455 /** BSS mode (Infra or IBSS) */ 2456 t_u8 bss_mode; 2457 } mlan_band_data_rate; 2458 2459 /** Type definition of mlan_data_rate for MLAN_OID_GET_DATA_RATE */ 2460 typedef struct _mlan_data_rate { 2461 /** Tx data rate */ 2462 t_u32 tx_data_rate; 2463 /** Rx data rate */ 2464 t_u32 rx_data_rate; 2465 2466 /** Tx channel bandwidth */ 2467 t_u32 tx_ht_bw; 2468 /** Tx guard interval */ 2469 t_u32 tx_ht_gi; 2470 /** Rx channel bandwidth */ 2471 t_u32 rx_ht_bw; 2472 /** Rx guard interval */ 2473 t_u32 rx_ht_gi; 2474 /** MCS index */ 2475 t_u32 tx_mcs_index; 2476 t_u32 rx_mcs_index; 2477 /* LG rate: 0, HT rate: 1, VHT rate: 2 */ 2478 t_u32 tx_rate_format; 2479 t_u32 rx_rate_format; 2480 } mlan_data_rate; 2481 2482 /** Type definition of mlan_ds_rate for MLAN_IOCTL_RATE */ 2483 typedef struct _mlan_ds_rate { 2484 /** Sub-command */ 2485 t_u32 sub_command; 2486 /** Rate configuration parameter */ 2487 union { 2488 /** Rate configuration for MLAN_OID_RATE_CFG */ 2489 mlan_rate_cfg_t rate_cfg; 2490 /** Data rate for MLAN_OID_GET_DATA_RATE */ 2491 mlan_data_rate data_rate; 2492 /** Supported rates for MLAN_OID_SUPPORTED_RATES */ 2493 t_u8 rates[MLAN_SUPPORTED_RATES]; 2494 /** Band/BSS mode for getting supported rates */ 2495 mlan_band_data_rate rate_band_cfg; 2496 } param; 2497 } mlan_ds_rate, *pmlan_ds_rate; 2498 2499 /*-----------------------------------------------------------------*/ 2500 /** Power Configuration Group */ 2501 /*-----------------------------------------------------------------*/ 2502 2503 /** Type definition of mlan_power_cfg_t for MLAN_OID_POWER_CFG */ 2504 typedef struct _mlan_power_cfg_t { 2505 /** Is power auto */ 2506 t_u32 is_power_auto; 2507 /** Power level in dBm */ 2508 t_s32 power_level; 2509 } mlan_power_cfg_t; 2510 2511 /** max power table size */ 2512 #define MAX_POWER_TABLE_SIZE 128 2513 #define TX_PWR_CFG_AUTO_CTRL_OFF 0xFF 2514 #define MAX_POWER_GROUP 64 2515 /** Type definition of mlan_power group info */ 2516 typedef struct mlan_power_group { 2517 2518 /** rate format (LG: 0, HT: 1, VHT: 2, no auto ctrl: 0xFF) */ 2519 t_u32 rate_format; 2520 /** bandwidth (LG: 20 MHz, HT: 20/40 MHz, VHT: 80/160/80+80 MHz) */ 2521 t_u8 bandwidth; 2522 /** LG: first rate index, HT/VHT: first MCS */ 2523 t_u8 first_rate_ind; 2524 /** LG: last rate index, HT/VHT: last MCS */ 2525 t_u8 last_rate_ind; 2526 /** minmum tx power (dBm) */ 2527 t_s8 power_min; 2528 /** maximum tx power (dBm) */ 2529 t_s8 power_max; 2530 /** tx power step (dB) */ 2531 t_s8 power_step; 2532 } mlan_power_group; 2533 2534 /** Type definition of mlan_power_cfg_ext for MLAN_OID_POWER_CFG_EXT */ 2535 typedef struct _mlan_power_cfg_ext { 2536 /** number of power_groups */ 2537 t_u32 num_pwr_grp; 2538 /** array of power groups */ 2539 mlan_power_group power_group[MAX_POWER_GROUP]; 2540 } mlan_power_cfg_ext; 2541 2542 /** Type definition of mlan_ds_power_cfg for MLAN_IOCTL_POWER_CFG */ 2543 typedef struct _mlan_ds_power_cfg { 2544 /** Sub-command */ 2545 t_u32 sub_command; 2546 /** Power configuration parameter */ 2547 union { 2548 /** Power configuration for MLAN_OID_POWER_CFG */ 2549 mlan_power_cfg_t power_cfg; 2550 /** Extended power configuration for MLAN_OID_POWER_CFG_EXT */ 2551 mlan_power_cfg_ext power_ext; 2552 } param; 2553 } mlan_ds_power_cfg, *pmlan_ds_power_cfg; 2554 2555 /*-----------------------------------------------------------------*/ 2556 /** Power Management Configuration Group */ 2557 /*-----------------------------------------------------------------*/ 2558 /** Host sleep config conditions : Cancel */ 2559 #define HOST_SLEEP_CFG_CANCEL 0xffffffff 2560 2561 /** Host sleep config condition: broadcast data */ 2562 #define HOST_SLEEP_COND_BROADCAST_DATA MBIT(0) 2563 /** Host sleep config condition: unicast data */ 2564 #define HOST_SLEEP_COND_UNICAST_DATA MBIT(1) 2565 /** Host sleep config condition: mac event */ 2566 #define HOST_SLEEP_COND_MAC_EVENT MBIT(2) 2567 /** Host sleep config condition: multicast data */ 2568 #define HOST_SLEEP_COND_MULTICAST_DATA MBIT(3) 2569 /** Host sleep config condition: IPV6 packet */ 2570 #define HOST_SLEEP_COND_IPV6_PACKET MBIT(31) 2571 2572 /** Host sleep config conditions: Default */ 2573 #define HOST_SLEEP_DEF_COND (HOST_SLEEP_COND_BROADCAST_DATA | HOST_SLEEP_COND_UNICAST_DATA | HOST_SLEEP_COND_MAC_EVENT) 2574 2575 /** Host sleep config GPIO : Default */ 2576 #define HOST_SLEEP_DEF_GPIO 0xff 2577 /** Host sleep config gap : Default */ 2578 #define HOST_SLEEP_DEF_GAP 200 2579 /** Host sleep config min wake holdoff */ 2580 #define HOST_SLEEP_DEF_WAKE_HOLDOFF 0; 2581 /** Host sleep config inactivity timeout */ 2582 #define HOST_SLEEP_DEF_INACTIVITY_TIMEOUT 10; 2583 2584 /** Type definition of mlan_ds_hs_cfg for MLAN_OID_PM_CFG_HS_CFG */ 2585 typedef struct _mlan_ds_hs_cfg { 2586 /** MTRUE to invoke the HostCmd, MFALSE otherwise */ 2587 t_u32 is_invoke_hostcmd; 2588 /** Host sleep config condition */ 2589 /** Bit0: broadcast data 2590 * Bit1: unicast data 2591 * Bit2: mac event 2592 * Bit3: multicast data 2593 */ 2594 t_u32 conditions; 2595 /** GPIO pin or 0xff for interface */ 2596 t_u32 gpio; 2597 /** Gap in milliseconds or or 0xff for special 2598 * setting when GPIO is used to wakeup host 2599 */ 2600 t_u32 gap; 2601 /** Host sleep wake interval */ 2602 t_u32 hs_wake_interval; 2603 /** Parameter type for indication gpio*/ 2604 t_u8 param_type_ind; 2605 /** GPIO pin for indication wakeup source */ 2606 t_u32 ind_gpio; 2607 /** Level on ind_gpio pin for indication normal wakeup source */ 2608 t_u32 level; 2609 /** Parameter type for extend hscfg*/ 2610 t_u8 param_type_ext; 2611 /** Events that will be forced ignore*/ 2612 t_u32 event_force_ignore; 2613 /** Events that will use extend gap to inform host*/ 2614 t_u32 event_use_ext_gap; 2615 /** Ext gap*/ 2616 t_u8 ext_gap; 2617 /** GPIO wave level for extend hscfg*/ 2618 t_u8 gpio_wave; 2619 } mlan_ds_hs_cfg, *pmlan_ds_hs_cfg; 2620 2621 #define MAX_MGMT_FRAME_FILTER 2 2622 typedef struct _mlan_mgmt_frame_wakeup { 2623 /** action - bitmap 2624 ** On matching rx'd pkt and filter during NON_HOSTSLEEP mode: 2625 ** Action[1]=0 Discard 2626 ** Action[1]=1 Allow 2627 ** Note that default action on non-match is "Allow". 2628 ** 2629 ** On matching rx'd pkt and filter during HOSTSLEEP mode: 2630 ** Action[1:0]=00 Discard and Not Wake host 2631 ** Action[1:0]=01 Discard and Wake host 2632 ** Action[1:0]=10 Invalid 2633 ** Note that default action on non-match is "Discard and Not Wake host". 2634 **/ 2635 t_u32 action; 2636 /** Frame type(p2p, tdls...) 2637 ** type=0: invalid 2638 ** type=1: p2p 2639 ** type=others: reserved 2640 **/ 2641 t_u32 type; 2642 /** Frame mask according to each type 2643 ** When type=1 for p2p, frame-mask have following define: 2644 ** Bit Frame 2645 ** 0 GO Negotiation Request 2646 ** 1 GO Negotiation Response 2647 ** 2 GO Negotiation Confirmation 2648 ** 3 P2P Invitation Request 2649 ** 4 P2P Invitation Response 2650 ** 5 Device Discoverability Request 2651 ** 6 Device Discoverability Response 2652 ** 7 Provision Discovery Request 2653 ** 8 Provision Discovery Response 2654 ** 9 Notice of Absence 2655 ** 10 P2P Presence Request 2656 ** 11 P2P Presence Response 2657 ** 12 GO Discoverability Request 2658 ** 13-31 Reserved 2659 ** 2660 ** When type=others, frame-mask is reserved. 2661 **/ 2662 t_u32 frame_mask; 2663 } mlan_mgmt_frame_wakeup, *pmlan_mgmt_frame_wakeup; 2664 2665 /** Enable deep sleep mode */ 2666 #define DEEP_SLEEP_ON 1 2667 /** Disable deep sleep mode */ 2668 #define DEEP_SLEEP_OFF 0 2669 2670 /** Default idle time in milliseconds for auto deep sleep */ 2671 #define DEEP_SLEEP_IDLE_TIME 100 2672 2673 typedef struct _mlan_ds_auto_ds { 2674 /** auto ds mode, 0 - disable, 1 - enable */ 2675 t_u16 auto_ds; 2676 /** auto ds idle time in milliseconds */ 2677 t_u16 idletime; 2678 } mlan_ds_auto_ds; 2679 2680 /** Type definition of mlan_ds_inactivity_to 2681 * for MLAN_OID_PM_CFG_INACTIVITY_TO 2682 */ 2683 typedef struct _mlan_ds_inactivity_to { 2684 /** Timeout unit in microsecond, 0 means 1000us (1ms) */ 2685 t_u32 timeout_unit; 2686 /** Inactivity timeout for unicast data */ 2687 t_u32 unicast_timeout; 2688 /** Inactivity timeout for multicast data */ 2689 t_u32 mcast_timeout; 2690 /** Timeout for additional Rx traffic after Null PM1 packet exchange */ 2691 t_u32 ps_entry_timeout; 2692 } mlan_ds_inactivity_to, *pmlan_ds_inactivity_to; 2693 2694 /** Minimum sleep period in milliseconds */ 2695 #define MIN_SLEEP_PERIOD 10 2696 /** Maximum sleep period in milliseconds */ 2697 #define MAX_SLEEP_PERIOD 60 2698 /** Special setting for UPSD certification tests */ 2699 #define SLEEP_PERIOD_RESERVED_FF 0xFF 2700 2701 /** PS null interval disable */ 2702 #define PS_NULL_DISABLE (-1) 2703 2704 /** Local listen interval disable */ 2705 #define MRVDRV_LISTEN_INTERVAL_DISABLE (-1) 2706 /** Minimum listen interval */ 2707 #define MRVDRV_MIN_LISTEN_INTERVAL 0 2708 2709 /** Minimum multiple DTIM */ 2710 #define MRVDRV_MIN_MULTIPLE_DTIM 0 2711 /** Maximum multiple DTIM */ 2712 #define MRVDRV_MAX_MULTIPLE_DTIM 5 2713 /** Ignore multiple DTIM */ 2714 #define MRVDRV_IGNORE_MULTIPLE_DTIM 0xfffe 2715 /** Match listen interval to closest DTIM */ 2716 #define MRVDRV_MATCH_CLOSEST_DTIM 0xfffd 2717 2718 /** Minimum adhoc awake period */ 2719 #define MIN_ADHOC_AWAKE_PD 0 2720 /** Maximum adhoc awake period */ 2721 #define MAX_ADHOC_AWAKE_PD 31 2722 /** Special adhoc awake period */ 2723 #define SPECIAL_ADHOC_AWAKE_PD 255 2724 2725 /** Minimum beacon miss timeout in milliseconds */ 2726 #define MIN_BCN_MISS_TO 0 2727 /** Maximum beacon miss timeout in milliseconds */ 2728 #define MAX_BCN_MISS_TO 50 2729 /** Disable beacon miss timeout */ 2730 #define DISABLE_BCN_MISS_TO 65535 2731 2732 /** Minimum delay to PS in milliseconds */ 2733 #define MIN_DELAY_TO_PS 0 2734 /** Maximum delay to PS in milliseconds */ 2735 #define MAX_DELAY_TO_PS 65535 2736 /** Delay to PS unchanged */ 2737 #define DELAY_TO_PS_UNCHANGED (-1) 2738 /** Default delay to PS in milliseconds */ 2739 #define DELAY_TO_PS_DEFAULT 1000 2740 2741 /** PS mode: Unchanged */ 2742 #define PS_MODE_UNCHANGED 0 2743 /** PS mode: Auto */ 2744 #define PS_MODE_AUTO 1 2745 /** PS mode: Poll */ 2746 #define PS_MODE_POLL 2 2747 /** PS mode: Null */ 2748 #define PS_MODE_NULL 3 2749 2750 /** Type definition of mlan_ds_ps_cfg for MLAN_OID_PM_CFG_PS_CFG */ 2751 typedef struct _mlan_ds_ps_cfg { 2752 /** PS null interval in seconds */ 2753 t_u32 ps_null_interval; 2754 /** Multiple DTIM interval */ 2755 t_u32 multiple_dtim_interval; 2756 /** Listen interval */ 2757 t_u32 listen_interval; 2758 /** Adhoc awake period */ 2759 t_u32 adhoc_awake_period; 2760 /** Beacon miss timeout in milliseconds */ 2761 t_u32 bcn_miss_timeout; 2762 /** Delay to PS in milliseconds */ 2763 t_s32 delay_to_ps; 2764 /** PS mode */ 2765 t_u32 ps_mode; 2766 } mlan_ds_ps_cfg, *pmlan_ds_ps_cfg; 2767 2768 /** Type definition of mlan_ds_sleep_params for MLAN_OID_PM_CFG_SLEEP_PARAMS */ 2769 typedef struct _mlan_ds_sleep_params { 2770 /** Error */ 2771 t_u32 error; 2772 /** Offset in microseconds */ 2773 t_u32 offset; 2774 /** Stable time in microseconds */ 2775 t_u32 stable_time; 2776 /** Calibration control */ 2777 t_u32 cal_control; 2778 /** External sleep clock */ 2779 t_u32 ext_sleep_clk; 2780 /** Reserved */ 2781 t_u32 reserved; 2782 } mlan_ds_sleep_params, *pmlan_ds_sleep_params; 2783 2784 /** sleep_param */ 2785 typedef struct _ps_sleep_param { 2786 /** control bitmap */ 2787 t_u32 ctrl_bitmap; 2788 /** minimum sleep period (micro second) */ 2789 t_u32 min_sleep; 2790 /** maximum sleep period (micro second) */ 2791 t_u32 max_sleep; 2792 } ps_sleep_param; 2793 2794 /** inactivity sleep_param */ 2795 typedef struct _inact_sleep_param { 2796 /** inactivity timeout (micro second) */ 2797 t_u32 inactivity_to; 2798 /** miniumu awake period (micro second) */ 2799 t_u32 min_awake; 2800 /** maximum awake period (micro second) */ 2801 t_u32 max_awake; 2802 } inact_sleep_param; 2803 2804 /** flag for ps mode */ 2805 #define PS_FLAG_PS_MODE 1 2806 /** flag for sleep param */ 2807 #define PS_FLAG_SLEEP_PARAM 2 2808 /** flag for inactivity sleep param */ 2809 #define PS_FLAG_INACT_SLEEP_PARAM 4 2810 2811 /** Enable Robust Coex mode */ 2812 #define ROBUSTCOEX_GPIOCFG_ENABLE 1 2813 /** Disable Robust Coex mode */ 2814 #define ROBUSTCOEX_GPIOCFG_DISABLE 0 2815 2816 /** Disable power mode */ 2817 #define PS_MODE_DISABLE 0 2818 /** Enable periodic dtim ps */ 2819 #define PS_MODE_PERIODIC_DTIM 1 2820 /** Enable inactivity ps */ 2821 #define PS_MODE_INACTIVITY 2 2822 /** FW wake up method interface */ 2823 #define FW_WAKEUP_METHOD_INTERFACE 1 2824 /** FW wake up method gpio */ 2825 #define FW_WAKEUP_METHOD_GPIO 2 2826 /** mlan_ds_ps_mgmt */ 2827 typedef struct _mlan_ds_ps_mgmt { 2828 /** flags for valid field */ 2829 t_u16 flags; 2830 /** power mode */ 2831 t_u16 ps_mode; 2832 /** sleep param */ 2833 ps_sleep_param sleep_param; 2834 /** inactivity sleep param */ 2835 inact_sleep_param inact_param; 2836 } mlan_ds_ps_mgmt; 2837 2838 /** mlan_ds_ps_info */ 2839 typedef struct _mlan_ds_ps_info { 2840 /** suspend allowed flag */ 2841 t_u32 is_suspend_allowed; 2842 } mlan_ds_ps_info; 2843 2844 /** Type definition of mlan_ds_wakeup_reason for MLAN_OID_PM_HS_WAKEUP_REASON */ 2845 typedef struct _mlan_ds_hs_wakeup_reason { 2846 t_u16 hs_wakeup_reason; 2847 } mlan_ds_hs_wakeup_reason; 2848 2849 /** Type definition of mlan_fw_wakeup_params for MLAN_OID_PM_CFG_FW_WAKEUP_METHOD */ 2850 typedef struct _mlan_fw_wakeup_params { 2851 /** FW wakeup method */ 2852 t_u16 method; 2853 /** GPIO pin NO.*/ 2854 t_u8 gpio_pin; 2855 } mlan_fw_wakeup_params, *pmlan_fw_wakeup_params; 2856 2857 /** Type definition of mlan_ds_ps_cfg for MLAN_OID_PM_CFG_PS_CFG */ 2858 typedef struct _mlan_ds_bcn_timeout { 2859 /** Beacon miss timeout period window */ 2860 t_u16 bcn_miss_tmo_window; 2861 /** Beacon miss timeout period */ 2862 t_u16 bcn_miss_tmo_period; 2863 /** Beacon reacquire timeout period window */ 2864 t_u16 bcn_rq_tmo_window; 2865 /** Beacon reacquire timeout period */ 2866 t_u16 bcn_rq_tmo_period; 2867 } mlan_ds_bcn_timeout, *pmlan_ds_bcn_timeout; 2868 2869 /** Type definition of mlan_ds_pm_cfg for MLAN_IOCTL_PM_CFG */ 2870 typedef struct _mlan_ds_pm_cfg { 2871 /** Sub-command */ 2872 t_u32 sub_command; 2873 /** Power management parameter */ 2874 union { 2875 /** Power saving mode for MLAN_OID_PM_CFG_IEEE_PS */ 2876 t_u32 ps_mode; 2877 /** Host Sleep configuration for MLAN_OID_PM_CFG_HS_CFG */ 2878 mlan_ds_hs_cfg hs_cfg; 2879 /** Deep sleep mode for MLAN_OID_PM_CFG_DEEP_SLEEP */ 2880 mlan_ds_auto_ds auto_deep_sleep; 2881 /** Inactivity timeout for MLAN_OID_PM_CFG_INACTIVITY_TO */ 2882 mlan_ds_inactivity_to inactivity_to; 2883 /** Sleep period for MLAN_OID_PM_CFG_SLEEP_PD */ 2884 t_u32 sleep_period; 2885 /** PS configuration parameters for MLAN_OID_PM_CFG_PS_CFG */ 2886 mlan_ds_ps_cfg ps_cfg; 2887 /** FW wakeup method for MLAN_OID_PM_CFG_FW_WAKEUP_METHOD */ 2888 mlan_fw_wakeup_params fw_wakeup_params; 2889 /** PS configuration parameters for MLAN_OID_PM_CFG_SLEEP_PARAMS */ 2890 mlan_ds_sleep_params sleep_params; 2891 /** PS configuration parameters for MLAN_OID_PM_CFG_PS_MODE */ 2892 mlan_ds_ps_mgmt ps_mgmt; 2893 /** power info for MLAN_OID_PM_INFO */ 2894 mlan_ds_ps_info ps_info; 2895 /** hs wakeup reason for MLAN_OID_PM_HS_WAKEUP_REASON */ 2896 mlan_ds_hs_wakeup_reason wakeup_reason; 2897 /** config manamgement frame for hs wakeup */ 2898 mlan_mgmt_frame_wakeup mgmt_filter[MAX_MGMT_FRAME_FILTER]; 2899 /** Beacon timout parameters for MLAN_OID_PM_CFG_BCN_TIMEOUT */ 2900 mlan_ds_bcn_timeout bcn_timeout; 2901 } param; 2902 } mlan_ds_pm_cfg, *pmlan_ds_pm_cfg; 2903 2904 #ifdef RX_PACKET_COALESCE 2905 typedef struct { 2906 mlan_cmd_result_e cmd_result; /**< Firmware execution result */ 2907 2908 t_u32 pkt_threshold; 2909 /** Packet threshold */ 2910 t_u16 delay; 2911 /** Timeout value in milliseconds */ 2912 } wlan_ioctl_rx_pkt_coalesce_config_t; 2913 #endif 2914 2915 /*-----------------------------------------------------------------*/ 2916 /** WMM Configuration Group */ 2917 /*-----------------------------------------------------------------*/ 2918 2919 /** WMM TSpec size */ 2920 #define MLAN_WMM_TSPEC_SIZE 63 2921 /** WMM Add TS extra IE bytes */ 2922 #define MLAN_WMM_ADDTS_EXTRA_IE_BYTES 256 2923 /** WMM statistics for packets hist bins */ 2924 #define MLAN_WMM_STATS_PKTS_HIST_BINS 7 2925 /** Maximum number of AC QOS queues available */ 2926 #define MLAN_WMM_MAX_AC_QUEUES 4 2927 2928 /** 2929 * @brief IOCTL structure to send an ADDTS request and retrieve the response. 2930 * 2931 * IOCTL structure from the application layer relayed to firmware to 2932 * instigate an ADDTS management frame with an appropriate TSPEC IE as well 2933 * as any additional IEs appended in the ADDTS Action frame. 2934 * 2935 * @sa woal_wmm_addts_req_ioctl 2936 */ 2937 typedef struct { 2938 mlan_cmd_result_e cmd_result; /**< Firmware execution result */ 2939 2940 t_u32 timeout_ms; /**< Timeout value in milliseconds */ 2941 t_u8 ieee_status_code; /**< IEEE status code */ 2942 2943 t_u32 ie_data_len; /**< Length of ie block in ie_data */ 2944 t_u8 ie_data[MLAN_WMM_TSPEC_SIZE 2945 /**< TSPEC to send in the ADDTS */ 2946 + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; 2947 /**< Extra IE buf*/ 2948 } wlan_ioctl_wmm_addts_req_t; 2949 2950 /** 2951 * @brief IOCTL structure to send a DELTS request. 2952 * 2953 * IOCTL structure from the application layer relayed to firmware to 2954 * instigate an DELTS management frame with an appropriate TSPEC IE. 2955 * 2956 * @sa woal_wmm_delts_req_ioctl 2957 */ 2958 typedef struct { 2959 mlan_cmd_result_e cmd_result; 2960 /**< Firmware execution result */ 2961 t_u8 ieee_reason_code; /**< IEEE reason code sent, unused for WMM */ 2962 t_u32 ie_data_len; /**< Length of ie block in ie_data */ 2963 t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; 2964 /**< TSPEC to send in the DELTS */ 2965 } wlan_ioctl_wmm_delts_req_t; 2966 2967 /** 2968 * @brief IOCTL structure to configure a specific AC Queue's parameters 2969 * 2970 * IOCTL structure from the application layer relayed to firmware to 2971 * get, set, or default the WMM AC queue parameters. 2972 * 2973 * - msdu_lifetime_expiry is ignored if set to 0 on a set command 2974 * 2975 * @sa woal_wmm_queue_config_ioctl 2976 */ 2977 typedef struct { 2978 mlan_wmm_queue_config_action_e action;/**< Set, Get, or Default */ 2979 mlan_wmm_ac_e access_category; /**< WMM_AC_BK(0) to WMM_AC_VO(3) */ 2980 t_u16 msdu_lifetime_expiry; /**< lifetime expiry in TUs */ 2981 t_u8 supported_rates[10]; /**< Not supported yet */ 2982 } wlan_ioctl_wmm_queue_config_t; 2983 2984 /** 2985 * @brief IOCTL structure to start, stop, and get statistics for a WMM AC 2986 * 2987 * IOCTL structure from the application layer relayed to firmware to 2988 * start or stop statistical collection for a given AC. Also used to 2989 * retrieve and clear the collected stats on a given AC. 2990 * 2991 * @sa woal_wmm_queue_stats_ioctl 2992 */ 2993 typedef struct { 2994 /** Action of Queue Config : Start, Stop, or Get */ 2995 mlan_wmm_queue_stats_action_e action; 2996 /** User Priority */ 2997 t_u8 user_priority; 2998 /** Number of successful packets transmitted */ 2999 t_u16 pkt_count; 3000 /** Packets lost; not included in pkt_count */ 3001 t_u16 pkt_loss; 3002 /** Average Queue delay in microseconds */ 3003 t_u32 avg_queue_delay; 3004 /** Average Transmission delay in microseconds */ 3005 t_u32 avg_tx_delay; 3006 /** Calculated used time in units of 32 microseconds */ 3007 t_u16 used_time; 3008 /** Calculated policed time in units of 32 microseconds */ 3009 t_u16 policed_time; 3010 /** Queue Delay Histogram; number of packets per queue delay range 3011 * 3012 * [0] - 0ms <= delay < 5ms 3013 * [1] - 5ms <= delay < 10ms 3014 * [2] - 10ms <= delay < 20ms 3015 * [3] - 20ms <= delay < 30ms 3016 * [4] - 30ms <= delay < 40ms 3017 * [5] - 40ms <= delay < 50ms 3018 * [6] - 50ms <= delay < msduLifetime (TUs) 3019 */ 3020 t_u16 delay_histogram[MLAN_WMM_STATS_PKTS_HIST_BINS]; 3021 } wlan_ioctl_wmm_queue_stats_t, 3022 /** Type definition of mlan_ds_wmm_queue_stats 3023 * for MLAN_OID_WMM_CFG_QUEUE_STATS 3024 */ 3025 mlan_ds_wmm_queue_stats, *pmlan_ds_wmm_queue_stats; 3026 3027 /** 3028 * @brief IOCTL sub structure for a specific WMM AC Status 3029 */ 3030 typedef struct { 3031 /** WMM Acm */ 3032 t_u8 wmm_acm; 3033 /** Flow required flag */ 3034 t_u8 flow_required; 3035 /** Flow created flag */ 3036 t_u8 flow_created; 3037 /** Disabled flag */ 3038 t_u8 disabled; 3039 } wlan_ioctl_wmm_queue_status_ac_t; 3040 3041 /** 3042 * @brief IOCTL structure to retrieve the WMM AC Queue status 3043 * 3044 * IOCTL structure from the application layer to retrieve: 3045 * - ACM bit setting for the AC 3046 * - Firmware status (flow required, flow created, flow disabled) 3047 * 3048 * @sa woal_wmm_queue_status_ioctl 3049 */ 3050 typedef struct { 3051 /** WMM AC queue status */ 3052 wlan_ioctl_wmm_queue_status_ac_t ac_status[MLAN_WMM_MAX_AC_QUEUES]; 3053 } wlan_ioctl_wmm_queue_status_t, 3054 /** Type definition of mlan_ds_wmm_queue_status 3055 * for MLAN_OID_WMM_CFG_QUEUE_STATUS 3056 */ 3057 mlan_ds_wmm_queue_status, *pmlan_ds_wmm_queue_status; 3058 3059 /** Type definition of mlan_ds_wmm_addts for MLAN_OID_WMM_CFG_ADDTS */ 3060 typedef struct _mlan_ds_wmm_addts { 3061 /** Result of ADDTS request */ 3062 mlan_cmd_result_e result; 3063 /** Timeout value in milliseconds */ 3064 t_u32 timeout; 3065 /** IEEE status code */ 3066 t_u32 status_code; 3067 /** Dialog token */ 3068 t_u8 dialog_tok; 3069 /** TSPEC data length */ 3070 t_u32 ie_data_len; 3071 /** TSPEC to send in the ADDTS + buffering for any extra IEs */ 3072 t_u8 ie_data[MLAN_WMM_TSPEC_SIZE + MLAN_WMM_ADDTS_EXTRA_IE_BYTES]; 3073 } mlan_ds_wmm_addts, *pmlan_ds_wmm_addts; 3074 3075 /** Type definition of mlan_ds_wmm_delts for MLAN_OID_WMM_CFG_DELTS */ 3076 typedef struct _mlan_ds_wmm_delts { 3077 /** Result of DELTS request */ 3078 mlan_cmd_result_e result; 3079 /** IEEE status code */ 3080 t_u32 status_code; 3081 /** TSPEC data length */ 3082 t_u8 ie_data_len; 3083 /** TSPEC to send in the DELTS */ 3084 t_u8 ie_data[MLAN_WMM_TSPEC_SIZE]; 3085 } mlan_ds_wmm_delts, *pmlan_ds_wmm_delts; 3086 3087 /** Type definition of mlan_ds_wmm_queue_config 3088 * for MLAN_OID_WMM_CFG_QUEUE_CONFIG 3089 */ 3090 typedef struct _mlan_ds_wmm_queue_config { 3091 /** Action of Queue Config : Set, Get, or Default */ 3092 mlan_wmm_queue_config_action_e action; 3093 /** WMM Access Category: WMM_AC_BK(0) to WMM_AC_VO(3) */ 3094 mlan_wmm_ac_e access_category; 3095 /** Lifetime expiry in TUs */ 3096 t_u16 msdu_lifetime_expiry; 3097 /** Reserve for future use */ 3098 t_u8 reserved[10]; 3099 } mlan_ds_wmm_queue_config, *pmlan_ds_wmm_queue_config; 3100 3101 /** Type definition of mlan_ds_wmm_cfg for MLAN_IOCTL_WMM_CFG */ 3102 typedef struct _mlan_ds_wmm_cfg { 3103 /** Sub-command */ 3104 t_u32 sub_command; 3105 /** WMM configuration parameter */ 3106 union { 3107 /** WMM enable for MLAN_OID_WMM_CFG_ENABLE */ 3108 t_u32 wmm_enable; 3109 /** QoS configuration for MLAN_OID_WMM_CFG_QOS */ 3110 t_u8 qos_cfg; 3111 /** WMM add TS for MLAN_OID_WMM_CFG_ADDTS */ 3112 mlan_ds_wmm_addts addts; 3113 /** WMM delete TS for MLAN_OID_WMM_CFG_DELTS */ 3114 mlan_ds_wmm_delts delts; 3115 /** WMM queue configuration for MLAN_OID_WMM_CFG_QUEUE_CONFIG */ 3116 mlan_ds_wmm_queue_config q_cfg; 3117 /** AC Parameters Record WMM_AC_BE, WMM_AC_BK, WMM_AC_VI, WMM_AC_VO */ 3118 wmm_ac_parameters_t ac_params[MAX_AC_QUEUES]; 3119 /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATS */ 3120 mlan_ds_wmm_queue_stats q_stats; 3121 /** WMM queue status for MLAN_OID_WMM_CFG_QUEUE_STATUS */ 3122 mlan_ds_wmm_queue_status q_status; 3123 /** WMM TS status for MLAN_OID_WMM_CFG_TS_STATUS */ 3124 mlan_ds_wmm_ts_status ts_status; 3125 } param; 3126 } mlan_ds_wmm_cfg, *pmlan_ds_wmm_cfg; 3127 3128 /*-----------------------------------------------------------------*/ 3129 /** WPS Configuration Group */ 3130 /*-----------------------------------------------------------------*/ 3131 /** Enumeration for WPS session */ 3132 enum _mlan_wps_status { 3133 MLAN_WPS_CFG_SESSION_START = 1, 3134 MLAN_WPS_CFG_SESSION_END = 0 3135 }; 3136 3137 /** Type definition of mlan_ds_wps_cfg for MLAN_IOCTL_WPS_CFG */ 3138 typedef struct _mlan_ds_wps_cfg { 3139 /** Sub-command */ 3140 t_u32 sub_command; 3141 /** WPS configuration parameter */ 3142 union { 3143 /** WPS session for MLAN_OID_WPS_CFG_SESSION */ 3144 t_u32 wps_session; 3145 } param; 3146 } mlan_ds_wps_cfg, *pmlan_ds_wps_cfg; 3147 3148 /*-----------------------------------------------------------------*/ 3149 /** 802.11n Configuration Group */ 3150 /*-----------------------------------------------------------------*/ 3151 /** Maximum MCS */ 3152 #define NUM_MCS_FIELD 16 3153 3154 /* Both 2.4G and 5G band selected */ 3155 #define BAND_SELECT_BOTH 0 3156 /* Band 2.4G selected */ 3157 #define BAND_SELECT_BG 1 3158 /* Band 5G selected */ 3159 #define BAND_SELECT_A 2 3160 3161 /** Type definition of mlan_ds_11n_htcap_cfg for MLAN_OID_11N_HTCAP_CFG */ 3162 typedef struct _mlan_ds_11n_htcap_cfg { 3163 /** HT Capability information */ 3164 t_u32 htcap; 3165 /** Band selection */ 3166 t_u32 misc_cfg; 3167 /** Hardware HT cap information required */ 3168 t_u32 hw_cap_req; 3169 } mlan_ds_11n_htcap_cfg, *pmlan_ds_11n_htcap_cfg; 3170 3171 /** Type definition of mlan_ds_11n_addba_param 3172 * for MLAN_OID_11N_CFG_ADDBA_PARAM 3173 */ 3174 typedef struct _mlan_ds_11n_addba_param { 3175 /** Timeout */ 3176 t_u32 timeout; 3177 /** Buffer size for ADDBA request */ 3178 t_u32 txwinsize; 3179 /** Buffer size for ADDBA response */ 3180 t_u32 rxwinsize; 3181 /** amsdu for ADDBA request */ 3182 t_u8 txamsdu; 3183 /** amsdu for ADDBA response */ 3184 t_u8 rxamsdu; 3185 } mlan_ds_11n_addba_param, *pmlan_ds_11n_addba_param; 3186 3187 /** Type definition of mlan_ds_11n_tx_cfg for MLAN_OID_11N_CFG_TX */ 3188 typedef struct _mlan_ds_11n_tx_cfg { 3189 /** HTTxCap */ 3190 t_u16 httxcap; 3191 /** HTTxInfo */ 3192 t_u16 httxinfo; 3193 /** Band selection */ 3194 t_u32 misc_cfg; 3195 } mlan_ds_11n_tx_cfg, *pmlan_ds_11n_tx_cfg; 3196 3197 /** BF Global Configuration */ 3198 #define BF_GLOBAL_CONFIGURATION 0x00 3199 /** Performs NDP sounding for PEER specified */ 3200 #define TRIGGER_SOUNDING_FOR_PEER 0x01 3201 /** TX BF interval for channel sounding */ 3202 #define SET_GET_BF_PERIODICITY 0x02 3203 /** Tell FW not to perform any sounding for peer */ 3204 #define TX_BF_FOR_PEER_ENBL 0x03 3205 /** TX BF SNR threshold for peer */ 3206 #define SET_SNR_THR_PEER 0x04 3207 /** TX Sounding*/ 3208 #define TX_SOUNDING_CFG 0x05 3209 3210 /* Maximum number of peer MAC and status/SNR tuples */ 3211 #define MAX_PEER_MAC_TUPLES 10 3212 3213 /** Any new subcommand structure should be declare here */ 3214 3215 /** bf global cfg args */ 3216 typedef struct _mlan_bf_global_cfg_args { 3217 /** Global enable/disable bf */ 3218 t_u8 bf_enbl; 3219 /** Global enable/disable sounding */ 3220 t_u8 sounding_enbl; 3221 /** FB Type */ 3222 t_u8 fb_type; 3223 /** SNR Threshold */ 3224 t_u8 snr_threshold; 3225 /** Sounding interval in milliseconds */ 3226 t_u16 sounding_interval; 3227 /** BF mode */ 3228 t_u8 bf_mode; 3229 /** Reserved */ 3230 t_u8 reserved; 3231 } mlan_bf_global_cfg_args; 3232 3233 /** trigger sounding args */ 3234 typedef struct _mlan_trigger_sound_args { 3235 /** Peer MAC address */ 3236 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 3237 /** Status */ 3238 t_u8 status; 3239 } mlan_trigger_sound_args; 3240 3241 /** bf periodicity args */ 3242 typedef struct _mlan_bf_periodicity_args { 3243 /** Peer MAC address */ 3244 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 3245 /** Current Tx BF Interval in milliseconds */ 3246 t_u16 interval; 3247 /** Status */ 3248 t_u8 status; 3249 } mlan_bf_periodicity_args; 3250 3251 /** tx bf peer args */ 3252 typedef struct _mlan_tx_bf_peer_args { 3253 /** Peer MAC address */ 3254 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 3255 /** Reserved */ 3256 t_u16 reserved; 3257 /** Enable/Disable Beamforming */ 3258 t_u8 bf_enbl; 3259 /** Enable/Disable sounding */ 3260 t_u8 sounding_enbl; 3261 /** FB Type */ 3262 t_u8 fb_type; 3263 } mlan_tx_bf_peer_args; 3264 3265 /** SNR threshold args */ 3266 typedef struct _mlan_snr_thr_args { 3267 /** Peer MAC address */ 3268 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 3269 /** SNR for peer */ 3270 t_u8 snr; 3271 } mlan_snr_thr_args; 3272 3273 /** Type definition of mlan_ds_11n_tx_bf_cfg for MLAN_OID_11N_CFG_TX_BF_CFG */ 3274 typedef struct _mlan_ds_11n_tx_bf_cfg { 3275 /** BF Action */ 3276 t_u16 bf_action; 3277 /** Action */ 3278 t_u16 action; 3279 /** Number of peers */ 3280 t_u32 no_of_peers; 3281 union { 3282 mlan_bf_global_cfg_args bf_global_cfg; 3283 mlan_trigger_sound_args bf_sound[MAX_PEER_MAC_TUPLES]; 3284 mlan_bf_periodicity_args bf_periodicity[MAX_PEER_MAC_TUPLES]; 3285 mlan_tx_bf_peer_args tx_bf_peer[MAX_PEER_MAC_TUPLES]; 3286 mlan_snr_thr_args bf_snr[MAX_PEER_MAC_TUPLES]; 3287 } body; 3288 } mlan_ds_11n_tx_bf_cfg, *pmlan_ds_11n_tx_bf_cfg; 3289 3290 /** Type definition of mlan_ds_11n_amsdu_aggr_ctrl for 3291 * MLAN_OID_11N_AMSDU_AGGR_CTRL*/ 3292 typedef struct _mlan_ds_11n_amsdu_aggr_ctrl { 3293 /** Enable/Disable */ 3294 t_u16 enable; 3295 /** Current AMSDU size valid */ 3296 t_u16 curr_buf_size; 3297 } mlan_ds_11n_amsdu_aggr_ctrl, *pmlan_ds_11n_amsdu_aggr_ctrl; 3298 3299 /** Type definition of mlan_ds_11n_aggr_prio_tbl 3300 * for MLAN_OID_11N_CFG_AGGR_PRIO_TBL 3301 */ 3302 typedef struct _mlan_ds_11n_aggr_prio_tbl { 3303 /** ampdu priority table */ 3304 t_u8 ampdu[MAX_NUM_TID]; 3305 /** amsdu priority table */ 3306 t_u8 amsdu[MAX_NUM_TID]; 3307 } mlan_ds_11n_aggr_prio_tbl, *pmlan_ds_11n_aggr_prio_tbl; 3308 3309 /** DelBA All TIDs */ 3310 #define DELBA_ALL_TIDS 0xff 3311 /** DelBA Tx */ 3312 #define DELBA_TX MBIT(0) 3313 /** DelBA Rx */ 3314 #define DELBA_RX MBIT(1) 3315 3316 /** Type definition of mlan_ds_11n_delba for MLAN_OID_11N_CFG_DELBA */ 3317 typedef struct _mlan_ds_11n_delba { 3318 /** TID */ 3319 t_u8 tid; 3320 /** Peer MAC address */ 3321 t_u8 peer_mac_addr[MLAN_MAC_ADDR_LENGTH]; 3322 /** Direction (Tx: bit 0, Rx: bit 1) */ 3323 t_u8 direction; 3324 } mlan_ds_11n_delba, *pmlan_ds_11n_delba; 3325 3326 /** Type definition of mlan_ds_delba for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ 3327 typedef struct _mlan_ds_reject_addba_req { 3328 /** Bit0 : host sleep activated 3329 * Bit1 : auto reconnect enabled 3330 * Others : reserved 3331 */ 3332 t_u32 conditions; 3333 } mlan_ds_reject_addba_req, *pmlan_ds_reject_addba_req; 3334 3335 /** Type definition of mlan_ds_ibss_ampdu_param */ 3336 typedef struct _mlan_ds_ibss_ampdu_param { 3337 /** ampdu priority table */ 3338 t_u8 ampdu[MAX_NUM_TID]; 3339 /** rx amdpdu setting */ 3340 t_u8 addba_reject[MAX_NUM_TID]; 3341 } mlan_ds_ibss_ampdu_param, *pmlan_ds_ibss_ampdu_param; 3342 3343 /** Type definition of mlan_ds_11n_cfg for MLAN_IOCTL_11N_CFG */ 3344 typedef struct _mlan_ds_11n_cfg { 3345 /** Sub-command */ 3346 t_u32 sub_command; 3347 /** 802.11n configuration parameter */ 3348 union { 3349 /** Tx param for 11n for MLAN_OID_11N_CFG_TX */ 3350 mlan_ds_11n_tx_cfg tx_cfg; 3351 /** Aggr priority table for MLAN_OID_11N_CFG_AGGR_PRIO_TBL */ 3352 mlan_ds_11n_aggr_prio_tbl aggr_prio_tbl; 3353 /** Add BA param for MLAN_OID_11N_CFG_ADDBA_PARAM */ 3354 mlan_ds_11n_addba_param addba_param; 3355 /** Add BA Reject paramters for MLAN_OID_11N_CFG_ADDBA_REJECT */ 3356 t_u8 addba_reject[MAX_NUM_TID]; 3357 /** Tx buf size for MLAN_OID_11N_CFG_MAX_TX_BUF_SIZE */ 3358 t_u32 tx_buf_size; 3359 /** HT cap info configuration for MLAN_OID_11N_HTCAP_CFG */ 3360 mlan_ds_11n_htcap_cfg htcap_cfg; 3361 /** Tx param for 11n for MLAN_OID_11N_AMSDU_AGGR_CTRL */ 3362 mlan_ds_11n_amsdu_aggr_ctrl amsdu_aggr_ctrl; 3363 /** Supported MCS Set field */ 3364 t_u8 supported_mcs_set[NUM_MCS_FIELD]; 3365 /** Transmit Beamforming Capabilities field */ 3366 t_u32 tx_bf_cap; 3367 /** Transmit Beamforming configuration */ 3368 mlan_ds_11n_tx_bf_cfg tx_bf; 3369 /** DelBA for MLAN_OID_11N_CFG_DELBA */ 3370 mlan_ds_11n_delba del_ba; 3371 /** Reject Addba Req for MLAN_OID_11N_CFG_REJECT_ADDBA_REQ */ 3372 mlan_ds_reject_addba_req reject_addba_req; 3373 /** Control coex RX window size configuration */ 3374 t_u32 coex_rx_winsize; 3375 /** Control TX AMPDU configuration */ 3376 t_u32 txaggrctrl; 3377 /** aggrprirotity table for MLAN_OID_11N_CFG_IBSS_AMPDU_PARAM */ 3378 mlan_ds_ibss_ampdu_param ibss_ampdu; 3379 } param; 3380 } mlan_ds_11n_cfg, *pmlan_ds_11n_cfg; 3381 3382 /** Country code length */ 3383 #define COUNTRY_CODE_LEN 3 3384 3385 /*-----------------------------------------------------------------*/ 3386 /** 802.11d Configuration Group */ 3387 /*-----------------------------------------------------------------*/ 3388 /** Maximum subbands for 11d */ 3389 #define MRVDRV_MAX_SUBBAND_802_11D 83 3390 3391 #ifdef STA_SUPPORT 3392 /** Data structure for subband set */ 3393 typedef struct _mlan_ds_subband_set_t { 3394 /** First channel */ 3395 t_u8 first_chan; 3396 /** Number of channels */ 3397 t_u8 no_of_chan; 3398 /** Maximum Tx power in dBm */ 3399 t_u8 max_tx_pwr; 3400 } mlan_ds_subband_set_t; 3401 3402 /** Domain regulatory information */ 3403 typedef struct _mlan_ds_11d_domain_info { 3404 /** Country Code */ 3405 t_u8 country_code[COUNTRY_CODE_LEN]; 3406 /** Band that channels in sub_band belong to */ 3407 t_u8 band; 3408 /** No. of subband in below */ 3409 t_u8 no_of_sub_band; 3410 /** Subband data to send/last sent */ 3411 mlan_ds_subband_set_t sub_band[MRVDRV_MAX_SUBBAND_802_11D]; 3412 } mlan_ds_11d_domain_info; 3413 #endif 3414 3415 /** Type definition of mlan_ds_11d_cfg for MLAN_IOCTL_11D_CFG */ 3416 typedef struct _mlan_ds_11d_cfg { 3417 /** Sub-command */ 3418 t_u32 sub_command; 3419 /** 802.11d configuration parameter */ 3420 union { 3421 #ifdef STA_SUPPORT 3422 /** Enable for MLAN_OID_11D_CFG_ENABLE */ 3423 t_u32 enable_11d; 3424 /** Domain info for MLAN_OID_11D_DOMAIN_INFO */ 3425 mlan_ds_11d_domain_info domain_info; 3426 #endif /* STA_SUPPORT */ 3427 #ifdef UAP_SUPPORT 3428 /** tlv data for MLAN_OID_11D_DOMAIN_INFO */ 3429 t_u8 domain_tlv[MAX_IE_SIZE]; 3430 #endif /* UAP_SUPPORT */ 3431 } param; 3432 } mlan_ds_11d_cfg, *pmlan_ds_11d_cfg; 3433 3434 typedef struct _mlan_ds_11k_cfg { 3435 /** Sub-command */ 3436 t_u32 sub_command; 3437 union { 3438 t_u32 enable_11k; 3439 } param; 3440 } mlan_ds_11k_cfg; 3441 3442 /*-----------------------------------------------------------------*/ 3443 /** Register Memory Access Group */ 3444 /*-----------------------------------------------------------------*/ 3445 /** Enumeration for CSU target device type */ 3446 enum _mlan_csu_target_type { 3447 MLAN_CSU_TARGET_CAU = 1, 3448 MLAN_CSU_TARGET_PSU, 3449 }; 3450 3451 /** Enumeration for register type */ 3452 enum _mlan_reg_type { 3453 MLAN_REG_MAC = 1, 3454 MLAN_REG_BBP, 3455 MLAN_REG_RF, 3456 MLAN_REG_CAU = 5, 3457 MLAN_REG_PSU = 6, 3458 }; 3459 3460 /** Type definition of mlan_ds_reg_rw for MLAN_OID_REG_RW */ 3461 typedef struct _mlan_ds_reg_rw { 3462 /** Register type */ 3463 t_u32 type; 3464 /** Offset */ 3465 t_u32 offset; 3466 /** Value */ 3467 t_u32 value; 3468 } mlan_ds_reg_rw; 3469 3470 /** Maximum EEPROM data */ 3471 #define MAX_EEPROM_DATA 256 3472 3473 /** Type definition of mlan_ds_read_eeprom for MLAN_OID_EEPROM_RD */ 3474 typedef struct _mlan_ds_read_eeprom { 3475 /** Multiples of 4 */ 3476 t_u16 offset; 3477 /** Number of bytes */ 3478 t_u16 byte_count; 3479 /** Value */ 3480 t_u8 value[MAX_EEPROM_DATA]; 3481 } mlan_ds_read_eeprom; 3482 3483 /** Type definition of mlan_ds_mem_rw for MLAN_OID_MEM_RW */ 3484 typedef struct _mlan_ds_mem_rw { 3485 /** Address */ 3486 t_u32 addr; 3487 /** Value */ 3488 t_u32 value; 3489 } mlan_ds_mem_rw; 3490 3491 /** Type definition of mlan_ds_reg_mem for MLAN_IOCTL_REG_MEM */ 3492 typedef struct _mlan_ds_reg_mem { 3493 /** Sub-command */ 3494 t_u32 sub_command; 3495 /** Register memory access parameter */ 3496 union { 3497 /** Register access for MLAN_OID_REG_RW */ 3498 mlan_ds_reg_rw reg_rw; 3499 /** EEPROM access for MLAN_OID_EEPROM_RD */ 3500 mlan_ds_read_eeprom rd_eeprom; 3501 /** Memory access for MLAN_OID_MEM_RW */ 3502 mlan_ds_mem_rw mem_rw; 3503 } param; 3504 } mlan_ds_reg_mem, *pmlan_ds_reg_mem; 3505 3506 /*-----------------------------------------------------------------*/ 3507 /** Multi-Radio Configuration Group */ 3508 /*-----------------------------------------------------------------*/ 3509 3510 /*-----------------------------------------------------------------*/ 3511 /** 802.11h Configuration Group */ 3512 /*-----------------------------------------------------------------*/ 3513 #if defined(DFS_TESTING_SUPPORT) 3514 /** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_DFS_TESTING */ 3515 typedef struct _mlan_ds_11h_dfs_testing { 3516 /** User-configured CAC period in milliseconds, 0 to use default */ 3517 t_u32 usr_cac_period_msec; 3518 /** User-configured NOP period in seconds, 0 to use default */ 3519 t_u16 usr_nop_period_sec; 3520 /** User-configured skip channel change, 0 to disable */ 3521 t_u8 usr_no_chan_change; 3522 /** User-configured fixed channel to change to, 0 to use random channel */ 3523 t_u8 usr_fixed_new_chan; 3524 } mlan_ds_11h_dfs_testing, *pmlan_ds_11h_dfs_testing; 3525 3526 /** Type definition of mlan_ds_11h_dfs_testing for MLAN_OID_11H_CHAN_NOP_INFO */ 3527 typedef struct _mlan_ds_11h_chan_nop_info { 3528 /** current channel */ 3529 t_u8 curr_chan; 3530 /** channel_width */ 3531 t_u8 chan_width; 3532 /** flag for chan under nop */ 3533 t_bool chan_under_nop; 3534 /** chan_ban_info for new channel */ 3535 chan_band_info new_chan; 3536 } mlan_ds_11h_chan_nop_info; 3537 #endif 3538 3539 typedef struct _mlan_ds_11h_chan_rep_req { 3540 t_u16 startFreq; 3541 Band_Config_t bandcfg; 3542 t_u8 chanNum; 3543 t_u32 millisec_dwell_time; 3544 /**< Channel dwell time in milliseconds */ 3545 t_u8 host_based; 3546 } mlan_ds_11h_chan_rep_req; 3547 3548 /** Type definition of mlan_ds_11h_cfg for MLAN_IOCTL_11H_CFG */ 3549 typedef struct _mlan_ds_11h_cfg { 3550 /** Sub-command */ 3551 t_u32 sub_command; 3552 union { 3553 /** Local power constraint for MLAN_OID_11H_LOCAL_POWER_CONSTRAINT */ 3554 t_s8 usr_local_power_constraint; 3555 #if defined(DFS_TESTING_SUPPORT) 3556 /** User-configuation for MLAN_OID_11H_DFS_TESTING */ 3557 mlan_ds_11h_dfs_testing dfs_testing; 3558 /** channel NOP information for MLAN_OID_11H_CHAN_NOP_INFO */ 3559 mlan_ds_11h_chan_nop_info ch_nop_info; 3560 #endif 3561 mlan_ds_11h_chan_rep_req chan_rpt_req; 3562 t_s8 cs_count; 3563 } param; 3564 } mlan_ds_11h_cfg, *pmlan_ds_11h_cfg; 3565 3566 /*-----------------------------------------------------------------*/ 3567 /** Miscellaneous Configuration Group */ 3568 /*-----------------------------------------------------------------*/ 3569 3570 /** CMD buffer size */ 3571 #define MLAN_SIZE_OF_CMD_BUFFER 2048 3572 3573 /** LDO Internal */ 3574 #define LDO_INTERNAL 0 3575 /** LDO External */ 3576 #define LDO_EXTERNAL 1 3577 3578 /** Enumeration for IE type */ 3579 enum _mlan_ie_type { 3580 MLAN_IE_TYPE_GEN_IE = 0, 3581 #ifdef STA_SUPPORT 3582 MLAN_IE_TYPE_ARP_FILTER, 3583 #endif /* STA_SUPPORT */ 3584 }; 3585 3586 /** Type definition of mlan_ds_misc_gen_ie for MLAN_OID_MISC_GEN_IE */ 3587 typedef struct _mlan_ds_misc_gen_ie { 3588 /** IE type */ 3589 t_u32 type; 3590 /** IE length */ 3591 t_u32 len; 3592 /** IE buffer */ 3593 t_u8 ie_data[MAX_IE_SIZE]; 3594 } mlan_ds_misc_gen_ie; 3595 3596 #if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) 3597 /** Type definition of mlan_ds_misc_sdio_mpa_ctrl 3598 * for MLAN_OID_MISC_SDIO_MPA_CTRL 3599 */ 3600 typedef struct _mlan_ds_misc_sdio_mpa_ctrl { 3601 /** SDIO MP-A TX enable/disable */ 3602 t_u16 tx_enable; 3603 /** SDIO MP-A RX enable/disable */ 3604 t_u16 rx_enable; 3605 /** SDIO MP-A TX buf size */ 3606 t_u16 tx_buf_size; 3607 /** SDIO MP-A RX buf size */ 3608 t_u16 rx_buf_size; 3609 /** SDIO MP-A TX Max Ports */ 3610 t_u16 tx_max_ports; 3611 /** SDIO MP-A RX Max Ports */ 3612 t_u16 rx_max_ports; 3613 } mlan_ds_misc_sdio_mpa_ctrl; 3614 #endif 3615 3616 /** Type definition of mlan_ds_misc_cmd for MLAN_OID_MISC_HOST_CMD */ 3617 typedef struct _mlan_ds_misc_cmd { 3618 /** Command length */ 3619 t_u32 len; 3620 /** Command buffer */ 3621 t_u8 cmd[MLAN_SIZE_OF_CMD_BUFFER]; 3622 } mlan_ds_misc_cmd; 3623 3624 /** Maximum number of system clocks */ 3625 #define MLAN_MAX_CLK_NUM 16 3626 3627 /** Clock type : Configurable */ 3628 #define MLAN_CLK_CONFIGURABLE 0 3629 /** Clock type : Supported */ 3630 #define MLAN_CLK_SUPPORTED 1 3631 3632 /** Type definition of mlan_ds_misc_sys_clock for MLAN_OID_MISC_SYS_CLOCK */ 3633 typedef struct _mlan_ds_misc_sys_clock { 3634 /** Current system clock */ 3635 t_u16 cur_sys_clk; 3636 /** Clock type */ 3637 t_u16 sys_clk_type; 3638 /** Number of clocks */ 3639 t_u16 sys_clk_num; 3640 /** System clocks */ 3641 t_u16 sys_clk[MLAN_MAX_CLK_NUM]; 3642 } mlan_ds_misc_sys_clock; 3643 3644 /** Maximum response buffer length */ 3645 #define ASSOC_RSP_BUF_SIZE 500 3646 3647 /** Type definition of mlan_ds_misc_assoc_rsp for MLAN_OID_MISC_ASSOC_RSP */ 3648 typedef struct _mlan_ds_misc_assoc_rsp { 3649 /** Associate response buffer */ 3650 t_u8 assoc_resp_buf[ASSOC_RSP_BUF_SIZE]; 3651 /** Response buffer length */ 3652 t_u32 assoc_resp_len; 3653 } mlan_ds_misc_assoc_rsp; 3654 3655 /** Enumeration for function init/shutdown */ 3656 enum _mlan_func_cmd { 3657 MLAN_FUNC_INIT = 1, 3658 MLAN_FUNC_SHUTDOWN, 3659 }; 3660 3661 /** Enumeration for Coalescing status */ 3662 enum _mlan_coal_status { 3663 MLAN_MISC_COALESCING_ENABLE = 1, 3664 MLAN_MISC_COALESCING_DISABLE = 0 3665 }; 3666 3667 /** Net monitor filter: management frame */ 3668 #define MLAN_NETMON_MANAGEMENT_FRAME MBIT(0) 3669 /** Net monitor filter: control frame */ 3670 #define MLAN_NETMON_CONTROL_FRAME MBIT(1) 3671 /** Net monitor filter: data frame */ 3672 #define MLAN_NETMON_DATA_FRAME MBIT(2) 3673 3674 typedef struct _mlan_ds_misc_net_monitor { 3675 /** Enable/disable network monitor */ 3676 t_u32 enable_net_mon; 3677 /** Set net monitor filer flag */ 3678 t_u32 filter_flag; 3679 /** Radio type */ 3680 t_u32 band; 3681 /** Channel */ 3682 t_u32 channel; 3683 /** Secondary channel bandwidth */ 3684 t_u32 chan_bandwidth; 3685 } mlan_ds_misc_net_monitor; 3686 3687 /** Type definition of mlan_ds_misc_tx_datapause 3688 * for MLAN_OID_MISC_TX_DATAPAUSE 3689 */ 3690 typedef struct _mlan_ds_misc_tx_datapause { 3691 /** Tx data pause flag */ 3692 t_u16 tx_pause; 3693 /** Max number of Tx buffers for all PS clients */ 3694 t_u16 tx_buf_cnt; 3695 } mlan_ds_misc_tx_datapause; 3696 3697 /** IP address length */ 3698 #define IPADDR_LEN (16) 3699 /** Max number of ip */ 3700 #define MAX_IPADDR (4) 3701 /** IP address type - NONE*/ 3702 #define IPADDR_TYPE_NONE (0) 3703 /** IP address type - IPv4*/ 3704 #define IPADDR_TYPE_IPV4 (1) 3705 /** IP operation remove */ 3706 #define MLAN_IPADDR_OP_IP_REMOVE (0) 3707 /** IP operation ARP filter */ 3708 #define MLAN_IPADDR_OP_ARP_FILTER MBIT(0) 3709 /** IP operation ARP response */ 3710 #define MLAN_IPADDR_OP_AUTO_ARP_RESP MBIT(1) 3711 3712 /** Type definition of mlan_ds_misc_ipaddr_cfg for MLAN_OID_MISC_IP_ADDR */ 3713 typedef struct _mlan_ds_misc_ipaddr_cfg { 3714 /** Operation code */ 3715 t_u32 op_code; 3716 /** IP address type */ 3717 t_u32 ip_addr_type; 3718 /** Number of IP */ 3719 t_u32 ip_addr_num; 3720 /** IP address */ 3721 t_u8 ip_addr[MAX_IPADDR][IPADDR_LEN]; 3722 } mlan_ds_misc_ipaddr_cfg; 3723 3724 /* MEF configuration disable */ 3725 #define MEF_CFG_DISABLE 0 3726 /* MEF configuration Rx filter enable */ 3727 #define MEF_CFG_RX_FILTER_ENABLE 1 3728 /* MEF configuration auto ARP response */ 3729 #define MEF_CFG_AUTO_ARP_RESP 2 3730 /* MEF configuration host command */ 3731 #define MEF_CFG_HOSTCMD 0xFFFF 3732 3733 /** Type definition of mlan_ds_misc_mef_cfg for MLAN_OID_MISC_MEF_CFG */ 3734 typedef struct _mlan_ds_misc_mef_cfg { 3735 /** Sub-ID for operation */ 3736 t_u32 sub_id; 3737 /** Parameter according to sub-ID */ 3738 union { 3739 /** MEF command buffer for MEF_CFG_HOSTCMD */ 3740 mlan_ds_misc_cmd cmd_buf; 3741 } param; 3742 } mlan_ds_misc_mef_cfg; 3743 3744 /** Type definition of mlan_ds_misc_cfp_code for MLAN_OID_MISC_CFP_CODE */ 3745 typedef struct _mlan_ds_misc_cfp_code { 3746 /** CFP table code for 2.4GHz */ 3747 t_u32 cfp_code_bg; 3748 /** CFP table code for 5GHz */ 3749 t_u32 cfp_code_a; 3750 } mlan_ds_misc_cfp_code; 3751 3752 /** Type definition of mlan_ds_misc_country_code 3753 * for MLAN_OID_MISC_COUNTRY_CODE 3754 */ 3755 typedef struct _mlan_ds_misc_country_code { 3756 /** Country Code */ 3757 t_u8 country_code[COUNTRY_CODE_LEN]; 3758 } mlan_ds_misc_country_code; 3759 3760 /** Type definition of mlan_ds_host_clock */ 3761 typedef struct _mlan_ds_host_clock { 3762 /** host time in secs */ 3763 t_u64 time; 3764 /** fw time */ 3765 t_u64 fw_time; 3766 /** host-bbu clock delta */ 3767 t_u64 host_bbu_clk_delta; 3768 } mlan_ds_host_clock; 3769 3770 /** action for set */ 3771 #define SUBSCRIBE_EVT_ACT_BITWISE_SET 0x0002 3772 /** action for clear */ 3773 #define SUBSCRIBE_EVT_ACT_BITWISE_CLR 0x0003 3774 /** BITMAP for subscribe event rssi low */ 3775 #define SUBSCRIBE_EVT_RSSI_LOW MBIT(0) 3776 /** BITMAP for subscribe event snr low */ 3777 #define SUBSCRIBE_EVT_SNR_LOW MBIT(1) 3778 /** BITMAP for subscribe event max fail */ 3779 #define SUBSCRIBE_EVT_MAX_FAIL MBIT(2) 3780 /** BITMAP for subscribe event beacon missed */ 3781 #define SUBSCRIBE_EVT_BEACON_MISSED MBIT(3) 3782 /** BITMAP for subscribe event rssi high */ 3783 #define SUBSCRIBE_EVT_RSSI_HIGH MBIT(4) 3784 /** BITMAP for subscribe event snr high */ 3785 #define SUBSCRIBE_EVT_SNR_HIGH MBIT(5) 3786 /** BITMAP for subscribe event data rssi low */ 3787 #define SUBSCRIBE_EVT_DATA_RSSI_LOW MBIT(6) 3788 /** BITMAP for subscribe event data snr low */ 3789 #define SUBSCRIBE_EVT_DATA_SNR_LOW MBIT(7) 3790 /** BITMAP for subscribe event data rssi high */ 3791 #define SUBSCRIBE_EVT_DATA_RSSI_HIGH MBIT(8) 3792 /** BITMAP for subscribe event data snr high */ 3793 #define SUBSCRIBE_EVT_DATA_SNR_HIGH MBIT(9) 3794 /** BITMAP for subscribe event link quality */ 3795 #define SUBSCRIBE_EVT_LINK_QUALITY MBIT(10) 3796 /** BITMAP for subscribe event pre_beacon_lost */ 3797 #define SUBSCRIBE_EVT_PRE_BEACON_LOST MBIT(11) 3798 /** default PRE_BEACON_MISS_COUNT */ 3799 #define DEFAULT_PRE_BEACON_MISS 30 3800 3801 /** Type definition of mlan_ds_subscribe_evt for MLAN_OID_MISC_CFP_CODE */ 3802 typedef struct _mlan_ds_subscribe_evt { 3803 /** evt action */ 3804 t_u16 evt_action; 3805 /** bitmap for subscribe event */ 3806 t_u16 evt_bitmap; 3807 /** Absolute value of RSSI threshold value (dBm) */ 3808 t_u8 low_rssi; 3809 /** 0--report once, 1--report everytime happen, 3810 * N -- report only happend > N consecutive times 3811 */ 3812 t_u8 low_rssi_freq; 3813 /** SNR threshold value (dB) */ 3814 t_u8 low_snr; 3815 /** 0--report once, 1--report everytime happen, 3816 * N -- report only happend > N consecutive times 3817 */ 3818 t_u8 low_snr_freq; 3819 /** Failure count threshold */ 3820 t_u8 failure_count; 3821 /** 0--report once, 1--report everytime happen, 3822 * N -- report only happend > N consecutive times 3823 */ 3824 t_u8 failure_count_freq; 3825 /** num of missed beacons */ 3826 t_u8 beacon_miss; 3827 /** 0--report once, 1--report everytime happen, 3828 * N -- report only happend > N consecutive times 3829 */ 3830 t_u8 beacon_miss_freq; 3831 /** Absolute value of RSSI threshold value (dBm) */ 3832 t_u8 high_rssi; 3833 /** 0--report once, 1--report everytime happen, 3834 * N -- report only happend > N consecutive times 3835 */ 3836 t_u8 high_rssi_freq; 3837 /** SNR threshold value (dB) */ 3838 t_u8 high_snr; 3839 /** 0--report once, 1--report everytime happen, 3840 * N -- report only happend > N consecutive times 3841 */ 3842 t_u8 high_snr_freq; 3843 /** Absolute value of data RSSI threshold value (dBm) */ 3844 t_u8 data_low_rssi; 3845 /** 0--report once, 1--report everytime happen, 3846 * N -- report only happend > N consecutive times 3847 */ 3848 t_u8 data_low_rssi_freq; 3849 /** Absolute value of data SNR threshold value (dBm) */ 3850 t_u8 data_low_snr; 3851 /** 0--report once, 1--report everytime happen, 3852 * N -- report only happend > N consecutive times 3853 */ 3854 t_u8 data_low_snr_freq; 3855 /** Absolute value of data RSSI threshold value (dBm) */ 3856 t_u8 data_high_rssi; 3857 /** 0--report once, 1--report everytime happen, 3858 * N -- report only happend > N consecutive times 3859 */ 3860 t_u8 data_high_rssi_freq; 3861 /** Absolute value of data SNR threshold value (dBm) */ 3862 t_u8 data_high_snr; 3863 /** 0--report once, 1--report everytime happen, 3864 * N -- report only happend > N consecutive times 3865 */ 3866 t_u8 data_high_snr_freq; 3867 /* Link SNR threshold (dB) */ 3868 t_u16 link_snr; 3869 /* Link SNR frequency */ 3870 t_u16 link_snr_freq; 3871 /* Second minimum rate value as per the rate table below */ 3872 t_u16 link_rate; 3873 /* Second minimum rate frequency */ 3874 t_u16 link_rate_freq; 3875 /* Tx latency value (us) */ 3876 t_u16 link_tx_latency; 3877 /* Tx latency frequency */ 3878 t_u16 link_tx_lantency_freq; 3879 /* Number of pre missed beacons */ 3880 t_u8 pre_beacon_miss; 3881 } mlan_ds_subscribe_evt; 3882 3883 /** Max OTP user data length */ 3884 #define MAX_OTP_USER_DATA_LEN 252 3885 3886 /** Type definition of mlan_ds_misc_otp_user_data 3887 * for MLAN_OID_MISC_OTP_USER_DATA 3888 */ 3889 typedef struct _mlan_ds_misc_otp_user_data { 3890 /** Reserved */ 3891 t_u16 reserved; 3892 /** OTP user data length */ 3893 t_u16 user_data_length; 3894 /** User data buffer */ 3895 t_u8 user_data[MAX_OTP_USER_DATA_LEN]; 3896 } mlan_ds_misc_otp_user_data; 3897 3898 #ifdef WIFI_DIRECT_SUPPORT 3899 /** flag for NOA */ 3900 #define WIFI_DIRECT_NOA 1 3901 /** flag for OPP_PS */ 3902 #define WIFI_DIRECT_OPP_PS 2 3903 /** Type definition of mlan_ds_wifi_direct_config 3904 * for MLAN_OID_MISC_WIFI_DIRECT_CONFIG 3905 */ 3906 typedef struct _mlan_ds_wifi_direct_config { 3907 /** flags for NOA/OPP_PS */ 3908 t_u8 flags; 3909 /** NoA enable/disable */ 3910 t_u8 noa_enable; 3911 /** index */ 3912 t_u16 index; 3913 /** NoA count */ 3914 t_u8 noa_count; 3915 /** NoA duration */ 3916 t_u32 noa_duration; 3917 /** NoA interval */ 3918 t_u32 noa_interval; 3919 /** opp ps enable/disable */ 3920 t_u8 opp_ps_enable; 3921 /** CT window value */ 3922 t_u8 ct_window; 3923 } mlan_ds_wifi_direct_config; 3924 #endif 3925 3926 #if defined(STA_SUPPORT) 3927 /** mlan_ds_misc_pmfcfg structure */ 3928 typedef struct _mlan_ds_misc_pmfcfg { 3929 /** Management Frame Protection Capable */ 3930 t_u8 mfpc; 3931 /** Management Frame Protection Required */ 3932 t_u8 mfpr; 3933 } mlan_ds_misc_pmfcfg; 3934 #endif 3935 3936 /** mlan_ds_multi_chan_cfg structure */ 3937 typedef MLAN_PACK_START struct _mlan_ds_multi_chan_cfg { 3938 /** Channel Time */ 3939 t_u32 channel_time; 3940 /** Buffer Weight */ 3941 t_u8 buffer_weight; 3942 /** tlv len */ 3943 t_u16 tlv_len; 3944 /** TLV buffer */ 3945 t_u8 tlv_buf[0]; 3946 } MLAN_PACK_END mlan_ds_multi_chan_cfg; 3947 3948 /** mlan_ds_drcs_cfg structure */ 3949 typedef MLAN_PACK_START struct _mlan_ds_drcs_cfg { 3950 /** Channel Index*/ 3951 t_u16 chan_idx; 3952 /** Channel time (in TU) for chan_idx */ 3953 t_u8 chantime; 3954 /** Channel swith time (in TU) for chan_idx */ 3955 t_u8 switchtime; 3956 /** Undoze time (in TU) for chan_idx */ 3957 t_u8 undozetime; 3958 /** Rx traffic control scheme when channel switch*/ 3959 /** only valid for GC/STA interface*/ 3960 t_u8 mode; 3961 } MLAN_PACK_END mlan_ds_drcs_cfg; 3962 3963 #define MAX_SSID_NUM 16 3964 #define MAX_AP_LIST 8 3965 #define RETRY_UNLIMITED_TIME 0xFF 3966 3967 #define FW_ROAM_ENABLE MBIT(0) 3968 #define FW_ROAM_TRIGGER_COND MBIT(1) 3969 #define FW_ROAM_BSSID MBIT(2) 3970 #define FW_ROAM_SSID MBIT(3) 3971 #define FW_ROAM_RETRY_COUNT MBIT(4) 3972 #define FW_ROAM_RSSI_PARA MBIT(5) 3973 #define FW_ROAM_BAND_RSSI MBIT(6) 3974 #define FW_ROAM_BGSCAN_PARAM MBIT(7) 3975 #define FW_ROAM_EES_PARAM MBIT(8) 3976 #define FW_ROAM_BCN_MISS_THRESHOLD MBIT(9) 3977 #define FW_ROAM_PRE_BCN_MISS_THRESHOLD MBIT(10) 3978 #define FW_ROAM_BLACKLIST MBIT(11) 3979 #define FW_ROAM_REPEAT_CNT MBIT(12) 3980 3981 /*Roam offload configuration for auto reconnection when suspend and resume*/ 3982 typedef enum _roam_offload_config_mode { 3983 ROAM_OFFLOAD_ENABLE = 1, 3984 ROAM_OFFLOAD_SUSPEND_CFG, 3985 ROAM_OFFLOAD_RESUME_CFG, 3986 ROAM_OFFLOAD_PARAM_CFG, 3987 } roam_offload_config_mode; 3988 3989 typedef enum _roam_offload_set_mode { 3990 ROAM_OFFLOAD_DISABLE = 0, 3991 ROAM_OFFLOAD_WITH_APLIST, 3992 ROAM_OFFLOAD_WITHOUT_APLIST, 3993 ROAM_OFFLOAD_WITH_BSSID, 3994 ROAM_OFFLOAD_WITH_SSID, 3995 AUTO_RECONNECT, 3996 } roam_offload_set_mode; 3997 3998 typedef enum _roam_offload_trigger_mode { 3999 NO_TRIGGER = 0x00, 4000 RSSI_LOW_TRIGGER = 0x01, 4001 PRE_BEACON_LOST_TRIGGER = 0x02, 4002 LINK_LOST_TRIGGER = 0x04, 4003 DEAUTH_WITH_EXT_AP_TRIGGER = 0x08, 4004 } roam_offload_trigger_mode; 4005 4006 /** mlan_ds_misc_ees_cfg structure */ 4007 typedef MLAN_PACK_START struct _mlan_ds_misc_ees_cfg { 4008 /* EES mode */ 4009 t_u16 ees_mode; 4010 /* EES report condition */ 4011 t_u16 ees_rpt_condition; 4012 /* High scan period(milliseconds) */ 4013 t_u16 high_scan_period; 4014 /* High scan count */ 4015 t_u16 high_scan_count; 4016 /* Middle scan period(milliseconds) */ 4017 t_u16 mid_scan_period; 4018 /* Middle scan count */ 4019 t_u16 mid_scan_count; 4020 /* Low scan period(milliseconds) */ 4021 t_u16 low_scan_period; 4022 /* Low scan count */ 4023 t_u16 low_scan_count; 4024 } MLAN_PACK_END mlan_ds_misc_ees_cfg; 4025 4026 /** mlan_ds_misc_bgscan_cfg structure */ 4027 typedef MLAN_PACK_START struct _mlan_ds_misc_bgscan_cfg { 4028 /* BSS Type 0x1-bss independent, 0x2-bss infrastructure, 0x3-bss any */ 4029 t_u8 bss_type; 4030 /* Number of channels scanned for each scan */ 4031 t_u8 channels_per_scan; 4032 /* Interval between consective scans */ 4033 t_u32 scan_interval; 4034 /* Conditons to trigger report to host */ 4035 t_u32 bg_rpt_condition; 4036 } MLAN_PACK_END mlan_ds_misc_bgscan_cfg; 4037 4038 /** mlan_ds_misc_band_rssi structure */ 4039 typedef MLAN_PACK_START struct _mlan_ds_misc_band_rssi { 4040 /* RSSI hysteresis */ 4041 t_u8 rssi_hysteresis; 4042 /* Preferred channel band for fw roaming 4043 * 0:2.4G band; 1: 5G band; 2:4G band; 0xFF:band not set(invalid) 4044 */ 4045 t_u8 band_preferred; 4046 } MLAN_PACK_END mlan_ds_misc_band_rssi; 4047 4048 /** mlan_ds_misc_ssid_list structure */ 4049 typedef MLAN_PACK_START struct _mlan_ds_misc_ssid_list { 4050 /* SSID number */ 4051 t_u8 ssid_num; 4052 /* SSID for fw roaming/auto_reconnect */ 4053 mlan_802_11_ssid ssids[MAX_SSID_NUM]; 4054 } MLAN_PACK_END mlan_ds_misc_ssid_list; 4055 4056 /** mlan_ds_misc_roam_offload_aplist structure */ 4057 typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_aplist { 4058 /** Number of AP**/ 4059 t_u8 ap_num; 4060 /** AP mac addrs**/ 4061 t_u8 ap_mac[MAX_AP_LIST][MLAN_MAC_ADDR_LENGTH]; 4062 } MLAN_PACK_END mlan_ds_misc_roam_offload_aplist; 4063 4064 /** _mlan_ds_misc_roam_offload_para_rssi structure */ 4065 typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload_para_rssi { 4066 /** Setting flag**/ 4067 t_u8 set_flag; 4068 /** Max value of RSSI threshold**/ 4069 t_u8 max_rssi; 4070 /** Min value of RSSI threshold**/ 4071 t_u8 min_rssi; 4072 /** Adjusting step value of RSSI threshold**/ 4073 t_u8 step_rssi; 4074 } MLAN_PACK_END mlan_ds_misc_roam_offload_para_rssi; 4075 4076 /** mlan_ds_misc_roam_offload structure */ 4077 typedef MLAN_PACK_START struct _mlan_ds_misc_roam_offload { 4078 /** Enable roam offload**/ 4079 t_u8 enable; 4080 /** User set passphrase**/ 4081 t_u8 userset_passphrase; 4082 /* Condition to trigger roaming 4083 * Bit0 : RSSI low trigger 4084 * Bit1 : Pre-beacon lost trigger 4085 * Bit2 : Link Lost trigger 4086 * Bit3 : Deauth by ext-AP trigger 4087 * Bit4 ~ Bit15 : Reserved 4088 * value 0 : no trigger 4089 * value 0xff : invalid 4090 */ 4091 t_u16 trigger_condition; 4092 /** AP list**/ 4093 mlan_ds_misc_roam_offload_aplist aplist; 4094 /*Roam offload configuration mode for auto connection when suspend and resume */ 4095 roam_offload_config_mode config_mode; 4096 /** Retry count**/ 4097 t_u8 retry_count; 4098 /** RSSI para**/ 4099 mlan_ds_misc_roam_offload_para_rssi para_rssi; 4100 /** BSSID of reconnection**/ 4101 mlan_802_11_mac_addr bssid_reconnect; 4102 /* SSID List(White list) */ 4103 mlan_ds_misc_ssid_list ssid_list; 4104 /* Black list(BSSID list) */ 4105 mlan_ds_misc_roam_offload_aplist black_list; 4106 /* BAND and RSSI_HYSTERESIS set flag */ 4107 t_u8 band_rssi_flag; 4108 mlan_ds_misc_band_rssi band_rssi; 4109 4110 /* BGSCAN params set flag */ 4111 t_u8 bgscan_set_flag; 4112 mlan_ds_misc_bgscan_cfg bgscan_cfg; 4113 4114 /* EES mode params set flag */ 4115 t_u8 ees_param_set_flag; 4116 mlan_ds_misc_ees_cfg ees_cfg; 4117 4118 /* Beacon miss threshold */ 4119 t_u8 bcn_miss_threshold; 4120 4121 /* Beacon miss threshold */ 4122 t_u8 pre_bcn_miss_threshold; 4123 4124 /* Scan repeat count */ 4125 t_u16 repeat_count; 4126 } MLAN_PACK_END mlan_ds_misc_roam_offload; 4127 4128 /**Action ID for TDLS disable link*/ 4129 #define WLAN_TDLS_DISABLE_LINK 0x00 4130 /**Action ID for TDLS enable link*/ 4131 #define WLAN_TDLS_ENABLE_LINK 0x01 4132 /**Action ID for TDLS create link*/ 4133 #define WLAN_TDLS_CREATE_LINK 0x02 4134 /**Action ID for TDLS config link*/ 4135 #define WLAN_TDLS_CONFIG_LINK 0x03 4136 /*reason code*/ 4137 #define MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26 4138 /** TDLS operation buffer */ 4139 typedef struct _mlan_ds_misc_tdls_oper { 4140 /** TDLS Action */ 4141 t_u16 tdls_action; 4142 /** TDLS peer address */ 4143 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 4144 /** peer capability */ 4145 t_u16 capability; 4146 /** peer qos info */ 4147 t_u8 qos_info; 4148 /** peer extend capability */ 4149 t_u8 *ext_capab; 4150 /** extend capability len */ 4151 t_u8 ext_capab_len; 4152 /** support rates */ 4153 t_u8 *supported_rates; 4154 /** supported rates len */ 4155 t_u8 supported_rates_len; 4156 /** peer ht_cap */ 4157 t_u8 *ht_capa; 4158 } mlan_ds_misc_tdls_oper; 4159 4160 /** flag for TDLS extcap */ 4161 #define TDLS_IE_FLAGS_EXTCAP 0x0001 4162 /** flag for TDLS HTCAP */ 4163 #define TDLS_IE_FLAGS_HTCAP 0x0002 4164 /** flag for TDLS HTINFO */ 4165 #define TDLS_IE_FLAGS_HTINFO 0x0004 4166 /** flag for TDLS Supported channels and regulatory class IE*/ 4167 #define TDLS_IE_FLAGS_SUPP_CS_IE 0x0040 4168 /** flag for TDLS Qos info */ 4169 #define TDLS_IE_FLAGS_QOS_INFO 0x0080 4170 /** flag for TDLS SETUP */ 4171 #define TDLS_IE_FLAGS_SETUP 0x0100 4172 4173 /** TDLS ie buffer */ 4174 typedef struct _mlan_ds_misc_tdls_ies { 4175 /** TDLS peer address */ 4176 t_u8 peer_mac[MLAN_MAC_ADDR_LENGTH]; 4177 /** flags for request IEs */ 4178 t_u16 flags; 4179 /** Qos info */ 4180 t_u8 QosInfo; 4181 /** Extended Capabilities IE */ 4182 t_u8 ext_cap[IEEE_MAX_IE_SIZE]; 4183 /** HT Capabilities IE */ 4184 t_u8 ht_cap[IEEE_MAX_IE_SIZE]; 4185 /** HT Information IE */ 4186 t_u8 ht_info[IEEE_MAX_IE_SIZE]; 4187 /** supported channels */ 4188 t_u8 supp_chan[IEEE_MAX_IE_SIZE]; 4189 /** supported regulatory class */ 4190 t_u8 regulatory_class[IEEE_MAX_IE_SIZE]; 4191 } mlan_ds_misc_tdls_ies; 4192 4193 #ifdef RX_PACKET_COALESCE 4194 typedef struct _mlan_ds_misc_rx_packet_coalesce { 4195 /** packet threshold */ 4196 t_u32 packet_threshold; 4197 /** timeout value */ 4198 t_u16 delay; 4199 } mlan_ds_misc_rx_packet_coalesce; 4200 #endif 4201 4202 /** mlan_ds_misc_dfs_repeater structure */ 4203 typedef struct _mlan_ds_misc_dfs_repeater { 4204 /** Set or Get */ 4205 t_u16 action; 4206 /** 1 on or 0 off */ 4207 t_u16 mode; 4208 } mlan_ds_misc_dfs_repeater; 4209 4210 #define WOWLAN_MAX_PATTERN_LEN 20 4211 #define WOWLAN_MAX_OFFSET_LEN 50 4212 #define MAX_NUM_FILTERS 10 4213 4214 /** Temperature Sensor structure */ 4215 typedef struct _mlan_ds_sensor_temp { 4216 /** Temperature */ 4217 t_u32 temperature; 4218 } mlan_ds_sensor_temp; 4219 4220 #define MLAN_KCK_LEN 16 4221 #define MLAN_KEK_LEN 16 4222 #define MLAN_REPLAY_CTR_LEN 8 4223 /** mlan_ds_misc_gtk_rekey_data */ 4224 typedef struct _mlan_ds_misc_gtk_rekey_data { 4225 /** key encryption key */ 4226 t_u8 kek[MLAN_KEK_LEN]; 4227 /** key confirmation key */ 4228 t_u8 kck[MLAN_KCK_LEN]; 4229 /** replay counter */ 4230 t_u8 replay_ctr[MLAN_REPLAY_CTR_LEN]; 4231 } mlan_ds_misc_gtk_rekey_data; 4232 typedef struct _mlan_ds_bw_chan_oper { 4233 /* bandwidth 20:20M 40:40M 80:80M */ 4234 t_u8 bandwidth; 4235 /* channel number */ 4236 t_u8 channel; 4237 /* Non-global operating class */ 4238 t_u8 oper_class; 4239 } mlan_ds_bw_chan_oper; 4240 4241 typedef struct _mlan_ds_ind_rst_cfg { 4242 /** Set or Get */ 4243 t_u16 action; 4244 /** oob mode enable/ disable */ 4245 t_u8 ir_mode; 4246 /** gpio pin */ 4247 t_u8 gpio_pin; 4248 } mlan_ds_ind_rst_cfg; 4249 4250 /** mlan_ds_cw_mode_ctrl structure */ 4251 typedef MLAN_PACK_START struct _mlan_ds_cw_mode_ctrl { 4252 /** Mode of Operation 0: Disable 1: Tx Continuous Packet 2: Tx Continuous Wave */ 4253 t_u8 mode; 4254 /*channel */ 4255 t_u8 channel; 4256 /* channel info */ 4257 t_u8 chanInfo; 4258 /** Tx Power level in dBm */ 4259 t_u16 txPower; 4260 /** Packet Length */ 4261 t_u16 pktLength; 4262 /** bit rate Info */ 4263 t_u32 rateInfo; 4264 } MLAN_PACK_END mlan_ds_cw_mode_ctrl; 4265 4266 #define RX_PKT_INFO MBIT(1) 4267 /** Struct for per-packet configuration */ 4268 typedef struct _mlan_per_pkt_cfg { 4269 /** Type ID*/ 4270 t_u16 type; 4271 /** Length of payload*/ 4272 t_u16 len; 4273 /** Tx/Rx per-packet control */ 4274 t_u8 tx_rx_control; 4275 /** Number of ethernet types in ether_type array */ 4276 t_u8 proto_type_num; 4277 /** Array of ether_type for per-packet control */ 4278 t_u16 ether_type[0]; 4279 } mlan_per_pkt_cfg; 4280 4281 /** Type definition of mlan_ds_misc_robustcoex_params for MLAN_IOCTL_MISC_CFG */ 4282 typedef struct _mlan_ds_misc_robustcoex_params { 4283 t_u16 method; 4284 /** enable/disable robustcoex gpio cfg */ 4285 t_u8 enable; 4286 /** Number of GPIO */ 4287 t_u8 gpio_num; 4288 /** Polarity of GPIO */ 4289 t_u8 gpio_polarity; 4290 } mlan_ds_misc_robustcoex_params; 4291 4292 /** Type definition of mlan_ds_misc_cfg for MLAN_IOCTL_MISC_CFG */ 4293 typedef struct _mlan_ds_misc_cfg { 4294 /** Sub-command */ 4295 t_u32 sub_command; 4296 /** Miscellaneous configuration parameter */ 4297 union { 4298 /** Generic IE for MLAN_OID_MISC_GEN_IE */ 4299 mlan_ds_misc_gen_ie gen_ie; 4300 /** Region code for MLAN_OID_MISC_REGION */ 4301 t_u32 region_code; 4302 #if defined(SDIO_MULTI_PORT_TX_AGGR) || defined(SDIO_MULTI_PORT_RX_AGGR) 4303 /** SDIO MP-A Ctrl command for MLAN_OID_MISC_SDIO_MPA_CTRL */ 4304 mlan_ds_misc_sdio_mpa_ctrl mpa_ctrl; 4305 #endif 4306 /** Hostcmd for MLAN_OID_MISC_HOST_CMD */ 4307 mlan_ds_misc_cmd hostcmd; 4308 /** System clock for MLAN_OID_MISC_SYS_CLOCK */ 4309 mlan_ds_misc_sys_clock sys_clock; 4310 /** WWS set/get for MLAN_OID_MISC_WWS */ 4311 t_u32 wws_cfg; 4312 /** Get associate response for MLAN_OID_MISC_ASSOC_RSP */ 4313 mlan_ds_misc_assoc_rsp assoc_resp; 4314 /** Function init/shutdown for MLAN_OID_MISC_INIT_SHUTDOWN */ 4315 t_u32 func_init_shutdown; 4316 /** Coalescing status for MLAN_OID_MISC_COALESCING_STATUS */ 4317 t_u16 coalescing_status; 4318 /** Custom IE for MLAN_OID_MISC_CUSTOM_IE */ 4319 mlan_ds_misc_custom_ie cust_ie; 4320 t_u16 tdls_idle_time; 4321 /** TDLS configuration for MLAN_OID_MISC_TDLS_CONFIG */ 4322 mlan_ds_misc_tdls_config tdls_config; 4323 /** TDLS operation for MLAN_OID_MISC_TDLS_OPER */ 4324 mlan_ds_misc_tdls_oper tdls_oper; 4325 /** TDLS ies for MLAN_OID_MISC_GET_TDLS_IES */ 4326 mlan_ds_misc_tdls_ies tdls_ies; 4327 /**tdls cs off channel*/ 4328 t_u8 tdls_cs_channel; 4329 /** Net monitor for MLAN_OID_MISC_NET_MONITOR */ 4330 mlan_ds_misc_net_monitor net_mon; 4331 /** Tx data pause for MLAN_OID_MISC_TX_DATAPAUSE */ 4332 mlan_ds_misc_tx_datapause tx_datapause; 4333 /** IP address configuration */ 4334 mlan_ds_misc_ipaddr_cfg ipaddr_cfg; 4335 /** MAC control for MLAN_OID_MISC_MAC_CONTROL */ 4336 t_u32 mac_ctrl; 4337 /** MEF configuration for MLAN_OID_MISC_MEF_CFG */ 4338 mlan_ds_misc_mef_cfg mef_cfg; 4339 /** CFP code for MLAN_OID_MISC_CFP_CODE */ 4340 mlan_ds_misc_cfp_code cfp_code; 4341 /** Country code for MLAN_OID_MISC_COUNTRY_CODE */ 4342 mlan_ds_misc_country_code country_code; 4343 /** Thermal reading for MLAN_OID_MISC_THERMAL */ 4344 t_u32 thermal; 4345 /** Mgmt subtype mask for MLAN_OID_MISC_RX_MGMT_IND */ 4346 t_u32 mgmt_subtype_mask; 4347 /** subscribe event for MLAN_OID_MISC_SUBSCRIBE_EVENT */ 4348 mlan_ds_subscribe_evt subscribe_event; 4349 #ifdef DEBUG_LEVEL1 4350 /** Driver debug bit masks */ 4351 t_u32 drvdbg; 4352 #endif 4353 #ifdef STA_SUPPORT 4354 ExtCap_t ext_cap; 4355 #endif 4356 mlan_ds_misc_otp_user_data otp_user_data; 4357 /** Tx control */ 4358 t_u32 tx_control; 4359 #if defined(STA_SUPPORT) 4360 mlan_ds_misc_pmfcfg pmfcfg; 4361 #endif 4362 /** Multi-channel config for MLAN_OID_MISC_MULTI_CHAN_CFG */ 4363 mlan_ds_multi_chan_cfg multi_chan_cfg; 4364 /** Multi-channel policy for MLAN_OID_MISC_MULTI_CHAN_POLICY */ 4365 t_u16 multi_chan_policy; 4366 /** channel drcs time slicing config for MLAN_OID_MISC_DRCS_CFG */ 4367 mlan_ds_drcs_cfg drcs_cfg[2]; 4368 #ifdef WIFI_DIRECT_SUPPORT 4369 mlan_ds_wifi_direct_config p2p_config; 4370 #endif 4371 mlan_ds_coalesce_cfg coalesce_cfg; 4372 mlan_ds_misc_dfs_repeater dfs_repeater; 4373 #ifdef RX_PACKET_COALESCE 4374 mlan_ds_misc_rx_packet_coalesce rx_coalesce; 4375 #endif 4376 /** FW reload flag */ 4377 t_u8 fw_reload; 4378 /** Sensor temperature */ 4379 mlan_ds_sensor_temp sensor_temp; 4380 /** GTK rekey data */ 4381 mlan_ds_misc_gtk_rekey_data gtk_rekey; 4382 /** Bandwidth Channel operation */ 4383 mlan_ds_bw_chan_oper bw_chan_oper; 4384 /** Independent Reset Configuration */ 4385 mlan_ds_ind_rst_cfg ind_rst_cfg; 4386 /** Roam offload */ 4387 mlan_ds_misc_roam_offload roam_offload; 4388 /** misc tsf */ 4389 t_u64 misc_tsf; 4390 /** Custom regulatory domain */ 4391 mlan_ds_custom_reg_domain custom_reg_domain; 4392 /** cwmmode */ 4393 mlan_ds_cw_mode_ctrl cwmode; 4394 /** Tx/Rx per-packet control */ 4395 t_u8 txrx_pkt_ctrl; 4396 mlan_ds_misc_robustcoex_params robustcoexparams; 4397 mlan_ds_host_clock host_clock; 4398 /** boot sleep enable or disable */ 4399 t_u16 boot_sleep; 4400 } param; 4401 } mlan_ds_misc_cfg, *pmlan_ds_misc_cfg; 4402 4403 #endif /* !_MLAN_IOCTL_H_ */ 4404