18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * NXP Wireless LAN device driver: Firmware specific macros & structures 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright 2011-2020 NXP 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This software file (the "File") is distributed by NXP 78c2ecf20Sopenharmony_ci * under the terms of the GNU General Public License Version 2, June 1991 88c2ecf20Sopenharmony_ci * (the "License"). You may use, redistribute and/or modify this File in 98c2ecf20Sopenharmony_ci * accordance with the terms and conditions of the License, a copy of which 108c2ecf20Sopenharmony_ci * is available by writing to the Free Software Foundation, Inc., 118c2ecf20Sopenharmony_ci * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the 128c2ecf20Sopenharmony_ci * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE 158c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 168c2ecf20Sopenharmony_ci * ARE EXPRESSLY DISCLAIMED. The License provides additional details about 178c2ecf20Sopenharmony_ci * this warranty disclaimer. 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#ifndef _MWIFIEX_FW_H_ 218c2ecf20Sopenharmony_ci#define _MWIFIEX_FW_H_ 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <linux/if_ether.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define INTF_HEADER_LEN 4 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistruct rfc_1042_hdr { 298c2ecf20Sopenharmony_ci u8 llc_dsap; 308c2ecf20Sopenharmony_ci u8 llc_ssap; 318c2ecf20Sopenharmony_ci u8 llc_ctrl; 328c2ecf20Sopenharmony_ci u8 snap_oui[3]; 338c2ecf20Sopenharmony_ci __be16 snap_type; 348c2ecf20Sopenharmony_ci} __packed; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct rx_packet_hdr { 378c2ecf20Sopenharmony_ci struct ethhdr eth803_hdr; 388c2ecf20Sopenharmony_ci struct rfc_1042_hdr rfc1042_hdr; 398c2ecf20Sopenharmony_ci} __packed; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistruct tx_packet_hdr { 428c2ecf20Sopenharmony_ci struct ethhdr eth803_hdr; 438c2ecf20Sopenharmony_ci struct rfc_1042_hdr rfc1042_hdr; 448c2ecf20Sopenharmony_ci} __packed; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistruct mwifiex_fw_header { 478c2ecf20Sopenharmony_ci __le32 dnld_cmd; 488c2ecf20Sopenharmony_ci __le32 base_addr; 498c2ecf20Sopenharmony_ci __le32 data_length; 508c2ecf20Sopenharmony_ci __le32 crc; 518c2ecf20Sopenharmony_ci} __packed; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_cistruct mwifiex_fw_data { 548c2ecf20Sopenharmony_ci struct mwifiex_fw_header header; 558c2ecf20Sopenharmony_ci __le32 seq_num; 568c2ecf20Sopenharmony_ci u8 data[1]; 578c2ecf20Sopenharmony_ci} __packed; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_cistruct mwifiex_fw_dump_header { 608c2ecf20Sopenharmony_ci __le16 seq_num; 618c2ecf20Sopenharmony_ci __le16 reserved; 628c2ecf20Sopenharmony_ci __le16 type; 638c2ecf20Sopenharmony_ci __le16 len; 648c2ecf20Sopenharmony_ci} __packed; 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci#define FW_DUMP_INFO_ENDED 0x0002 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_1 0x1 698c2ecf20Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_5 0x5 708c2ecf20Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_6 0x6 718c2ecf20Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_7 0x7 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define B_SUPPORTED_RATES 5 748c2ecf20Sopenharmony_ci#define G_SUPPORTED_RATES 9 758c2ecf20Sopenharmony_ci#define BG_SUPPORTED_RATES 13 768c2ecf20Sopenharmony_ci#define A_SUPPORTED_RATES 9 778c2ecf20Sopenharmony_ci#define HOSTCMD_SUPPORTED_RATES 14 788c2ecf20Sopenharmony_ci#define N_SUPPORTED_RATES 3 798c2ecf20Sopenharmony_ci#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \ 808c2ecf20Sopenharmony_ci BAND_AN | BAND_AAC) 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \ 838c2ecf20Sopenharmony_ci BIT(13)) 848c2ecf20Sopenharmony_ci#define IS_SUPPORT_MULTI_BANDS(adapter) \ 858c2ecf20Sopenharmony_ci (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci/* bit 13: 11ac BAND_AAC 888c2ecf20Sopenharmony_ci * bit 12: reserved for lab testing, will be reused for BAND_AN 898c2ecf20Sopenharmony_ci * bit 11: 11n BAND_GN 908c2ecf20Sopenharmony_ci * bit 10: 11a BAND_A 918c2ecf20Sopenharmony_ci * bit 9: 11g BAND_G 928c2ecf20Sopenharmony_ci * bit 8: 11b BAND_B 938c2ecf20Sopenharmony_ci * Map these bits to band capability by right shifting 8 bits. 948c2ecf20Sopenharmony_ci */ 958c2ecf20Sopenharmony_ci#define GET_FW_DEFAULT_BANDS(adapter) \ 968c2ecf20Sopenharmony_ci (((adapter->fw_cap_info & 0x2f00) >> 8) & \ 978c2ecf20Sopenharmony_ci ALL_802_11_BANDS) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define KEY_INFO_ENABLED 0x01 1028c2ecf20Sopenharmony_cienum KEY_TYPE_ID { 1038c2ecf20Sopenharmony_ci KEY_TYPE_ID_WEP = 0, 1048c2ecf20Sopenharmony_ci KEY_TYPE_ID_TKIP, 1058c2ecf20Sopenharmony_ci KEY_TYPE_ID_AES, 1068c2ecf20Sopenharmony_ci KEY_TYPE_ID_WAPI, 1078c2ecf20Sopenharmony_ci KEY_TYPE_ID_AES_CMAC, 1088c2ecf20Sopenharmony_ci KEY_TYPE_ID_AES_CMAC_DEF, 1098c2ecf20Sopenharmony_ci}; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#define WPA_PN_SIZE 8 1128c2ecf20Sopenharmony_ci#define KEY_PARAMS_FIXED_LEN 10 1138c2ecf20Sopenharmony_ci#define KEY_INDEX_MASK 0xf 1148c2ecf20Sopenharmony_ci#define KEY_API_VER_MAJOR_V2 2 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci#define KEY_MCAST BIT(0) 1178c2ecf20Sopenharmony_ci#define KEY_UNICAST BIT(1) 1188c2ecf20Sopenharmony_ci#define KEY_ENABLED BIT(2) 1198c2ecf20Sopenharmony_ci#define KEY_DEFAULT BIT(3) 1208c2ecf20Sopenharmony_ci#define KEY_TX_KEY BIT(4) 1218c2ecf20Sopenharmony_ci#define KEY_RX_KEY BIT(5) 1228c2ecf20Sopenharmony_ci#define KEY_IGTK BIT(10) 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci#define WAPI_KEY_LEN (WLAN_KEY_LEN_SMS4 + PN_LEN + 2) 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#define MAX_POLL_TRIES 100 1278c2ecf20Sopenharmony_ci#define MAX_FIRMWARE_POLL_TRIES 150 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci#define FIRMWARE_READY_SDIO 0xfedc 1308c2ecf20Sopenharmony_ci#define FIRMWARE_READY_PCIE 0xfedcba00 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci#define MWIFIEX_COEX_MODE_TIMESHARE 0x01 1338c2ecf20Sopenharmony_ci#define MWIFIEX_COEX_MODE_SPATIAL 0x82 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_cienum mwifiex_usb_ep { 1368c2ecf20Sopenharmony_ci MWIFIEX_USB_EP_CMD_EVENT = 1, 1378c2ecf20Sopenharmony_ci MWIFIEX_USB_EP_DATA = 2, 1388c2ecf20Sopenharmony_ci MWIFIEX_USB_EP_DATA_CH2 = 3, 1398c2ecf20Sopenharmony_ci}; 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_cienum MWIFIEX_802_11_PRIVACY_FILTER { 1428c2ecf20Sopenharmony_ci MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL, 1438c2ecf20Sopenharmony_ci MWIFIEX_802_11_PRIV_FILTER_8021X_WEP 1448c2ecf20Sopenharmony_ci}; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci#define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF))) 1478c2ecf20Sopenharmony_ci#define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF))) 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci#define UAP_BSS_PARAMS_I 0 1508c2ecf20Sopenharmony_ci#define UAP_CUSTOM_IE_I 1 1518c2ecf20Sopenharmony_ci#define MWIFIEX_AUTO_IDX_MASK 0xffff 1528c2ecf20Sopenharmony_ci#define MWIFIEX_DELETE_MASK 0x0000 1538c2ecf20Sopenharmony_ci#define MGMT_MASK_ASSOC_REQ 0x01 1548c2ecf20Sopenharmony_ci#define MGMT_MASK_REASSOC_REQ 0x04 1558c2ecf20Sopenharmony_ci#define MGMT_MASK_ASSOC_RESP 0x02 1568c2ecf20Sopenharmony_ci#define MGMT_MASK_REASSOC_RESP 0x08 1578c2ecf20Sopenharmony_ci#define MGMT_MASK_PROBE_REQ 0x10 1588c2ecf20Sopenharmony_ci#define MGMT_MASK_PROBE_RESP 0x20 1598c2ecf20Sopenharmony_ci#define MGMT_MASK_BEACON 0x100 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_SSID 0x0000 1628c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_RATES 0x0001 1638c2ecf20Sopenharmony_ci#define TLV_TYPE_PWR_CONSTRAINT 0x0020 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci#define PROPRIETARY_TLV_BASE_ID 0x0100 1668c2ecf20Sopenharmony_ci#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) 1678c2ecf20Sopenharmony_ci#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) 1688c2ecf20Sopenharmony_ci#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) 1698c2ecf20Sopenharmony_ci#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) 1708c2ecf20Sopenharmony_ci#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) 1718c2ecf20Sopenharmony_ci#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) 1728c2ecf20Sopenharmony_ci#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) 1738c2ecf20Sopenharmony_ci#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) 1748c2ecf20Sopenharmony_ci#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) 1758c2ecf20Sopenharmony_ci#define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30) 1768c2ecf20Sopenharmony_ci#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) 1778c2ecf20Sopenharmony_ci#define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32) 1788c2ecf20Sopenharmony_ci#define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) 1798c2ecf20Sopenharmony_ci#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) 1808c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 43) 1818c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) 1828c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) 1838c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) 1848c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) 1858c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57) 1868c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) 1878c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) 1888c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) 1898c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) 1908c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) 1918c2ecf20Sopenharmony_ci#define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) 1928c2ecf20Sopenharmony_ci#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) 1938c2ecf20Sopenharmony_ci#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) 1948c2ecf20Sopenharmony_ci#define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) 1958c2ecf20Sopenharmony_ci#define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) 1968c2ecf20Sopenharmony_ci#define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) 1978c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) 1988c2ecf20Sopenharmony_ci#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94) 1998c2ecf20Sopenharmony_ci#define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 96) 2008c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) 2018c2ecf20Sopenharmony_ci#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) 2028c2ecf20Sopenharmony_ci#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) 2038c2ecf20Sopenharmony_ci#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) 2048c2ecf20Sopenharmony_ci#define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) 2058c2ecf20Sopenharmony_ci#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) 2068c2ecf20Sopenharmony_ci#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) 2078c2ecf20Sopenharmony_ci#define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) 2088c2ecf20Sopenharmony_ci#define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 153) 2098c2ecf20Sopenharmony_ci#define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) 2108c2ecf20Sopenharmony_ci#define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) 2118c2ecf20Sopenharmony_ci#define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 176) 2128c2ecf20Sopenharmony_ci#define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 181) 2138c2ecf20Sopenharmony_ci#define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) 2148c2ecf20Sopenharmony_ci#define TLV_TYPE_MC_GROUP_INFO (PROPRIETARY_TLV_BASE_ID + 184) 2158c2ecf20Sopenharmony_ci#define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) 2168c2ecf20Sopenharmony_ci#define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) 2178c2ecf20Sopenharmony_ci#define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199) 2188c2ecf20Sopenharmony_ci#define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) 2198c2ecf20Sopenharmony_ci#define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) 2208c2ecf20Sopenharmony_ci#define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) 2218c2ecf20Sopenharmony_ci#define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206) 2228c2ecf20Sopenharmony_ci#define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 236) 2238c2ecf20Sopenharmony_ci#define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237) 2248c2ecf20Sopenharmony_ci#define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 279) 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci#define SSN_MASK 0xfff0 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci#define BA_RESULT_SUCCESS 0x0 2318c2ecf20Sopenharmony_ci#define BA_RESULT_TIMEOUT 0x2 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci#define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci#define BA_STREAM_NOT_ALLOWED 0xff 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci#define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ 2388c2ecf20Sopenharmony_ci priv->adapter->config_bands & BAND_AN) && \ 2398c2ecf20Sopenharmony_ci priv->curr_bss_params.bss_descriptor.bcn_ht_cap && \ 2408c2ecf20Sopenharmony_ci !priv->curr_bss_params.bss_descriptor.disable_11n) 2418c2ecf20Sopenharmony_ci#define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ 2428c2ecf20Sopenharmony_ci BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) 2438c2ecf20Sopenharmony_ci 2448c2ecf20Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096 2458c2ecf20Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192 2468c2ecf20Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_12K 12288 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ci#define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11)) 2498c2ecf20Sopenharmony_ci#define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14)) 2508c2ecf20Sopenharmony_ci#define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15)) 2518c2ecf20Sopenharmony_ci#define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16)) 2528c2ecf20Sopenharmony_ci#define ISSUPP_ADHOC_ENABLED(FwCapInfo) (FwCapInfo & BIT(25)) 2538c2ecf20Sopenharmony_ci#define ISSUPP_RANDOM_MAC(FwCapInfo) (FwCapInfo & BIT(27)) 2548c2ecf20Sopenharmony_ci#define ISSUPP_FIRMWARE_SUPPLICANT(FwCapInfo) (FwCapInfo & BIT(21)) 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ 2578c2ecf20Sopenharmony_ci (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ 2588c2ecf20Sopenharmony_ci IEEE80211_HT_CAP_SM_PS) 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci/* dev_cap bitmap 2658c2ecf20Sopenharmony_ci * BIT 2668c2ecf20Sopenharmony_ci * 0-16 reserved 2678c2ecf20Sopenharmony_ci * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40 2688c2ecf20Sopenharmony_ci * 18-22 reserved 2698c2ecf20Sopenharmony_ci * 23 IEEE80211_HT_CAP_SGI_20 2708c2ecf20Sopenharmony_ci * 24 IEEE80211_HT_CAP_SGI_40 2718c2ecf20Sopenharmony_ci * 25 IEEE80211_HT_CAP_TX_STBC 2728c2ecf20Sopenharmony_ci * 26 IEEE80211_HT_CAP_RX_STBC 2738c2ecf20Sopenharmony_ci * 27-28 reserved 2748c2ecf20Sopenharmony_ci * 29 IEEE80211_HT_CAP_GRN_FLD 2758c2ecf20Sopenharmony_ci * 30-31 reserved 2768c2ecf20Sopenharmony_ci */ 2778c2ecf20Sopenharmony_ci#define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17)) 2788c2ecf20Sopenharmony_ci#define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23)) 2798c2ecf20Sopenharmony_ci#define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24)) 2808c2ecf20Sopenharmony_ci#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25)) 2818c2ecf20Sopenharmony_ci#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) 2828c2ecf20Sopenharmony_ci#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) 2838c2ecf20Sopenharmony_ci#define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8)) 2848c2ecf20Sopenharmony_ci#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) 2858c2ecf20Sopenharmony_ci#define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) 2868c2ecf20Sopenharmony_ci#define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) 2878c2ecf20Sopenharmony_ci#define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci/* httxcfg bitmap 2908c2ecf20Sopenharmony_ci * 0 reserved 2918c2ecf20Sopenharmony_ci * 1 20/40 Mhz enable(1)/disable(0) 2928c2ecf20Sopenharmony_ci * 2-3 reserved 2938c2ecf20Sopenharmony_ci * 4 green field enable(1)/disable(0) 2948c2ecf20Sopenharmony_ci * 5 short GI in 20 Mhz enable(1)/disable(0) 2958c2ecf20Sopenharmony_ci * 6 short GI in 40 Mhz enable(1)/disable(0) 2968c2ecf20Sopenharmony_ci * 7-15 reserved 2978c2ecf20Sopenharmony_ci */ 2988c2ecf20Sopenharmony_ci#define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci/* 11AC Tx and Rx MCS map for 1x1 mode: 3018c2ecf20Sopenharmony_ci * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 3028c2ecf20Sopenharmony_ci * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams 3038c2ecf20Sopenharmony_ci */ 3048c2ecf20Sopenharmony_ci#define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ci/* 11AC Tx and Rx MCS map for 2x2 mode: 3078c2ecf20Sopenharmony_ci * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2 3088c2ecf20Sopenharmony_ci * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams 3098c2ecf20Sopenharmony_ci */ 3108c2ecf20Sopenharmony_ci#define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) 3138c2ecf20Sopenharmony_ci#define SETHT_MCS32(x) (x[4] |= 1) 3148c2ecf20Sopenharmony_ci#define HT_STREAM_1X1 0x11 3158c2ecf20Sopenharmony_ci#define HT_STREAM_2X2 0x22 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_ci#define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ci#define LLC_SNAP_LEN 8 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci/* HW_SPEC fw_cap_info */ 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ci#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13)) 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci#define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) 3268c2ecf20Sopenharmony_ci#define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) 3278c2ecf20Sopenharmony_ci#define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \ 3288c2ecf20Sopenharmony_ci (2 * (nss - 1))) 3298c2ecf20Sopenharmony_ci#define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16) 3308c2ecf20Sopenharmony_ci#define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF) 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci/* Clear SU Beanformer, MU beanformer, MU beanformee and 3338c2ecf20Sopenharmony_ci * sounding dimensions bits 3348c2ecf20Sopenharmony_ci */ 3358c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \ 3368c2ecf20Sopenharmony_ci (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ 3378c2ecf20Sopenharmony_ci IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ 3388c2ecf20Sopenharmony_ci IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ 3398c2ecf20Sopenharmony_ci IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_ci#define MOD_CLASS_HR_DSSS 0x03 3428c2ecf20Sopenharmony_ci#define MOD_CLASS_OFDM 0x07 3438c2ecf20Sopenharmony_ci#define MOD_CLASS_HT 0x08 3448c2ecf20Sopenharmony_ci#define HT_BW_20 0 3458c2ecf20Sopenharmony_ci#define HT_BW_40 1 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci#define DFS_CHAN_MOVE_TIME 10000 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci#define HostCmd_CMD_GET_HW_SPEC 0x0003 3508c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_SCAN 0x0006 3518c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_GET_LOG 0x000b 3528c2ecf20Sopenharmony_ci#define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 3538c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 3548c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_ASSOCIATE 0x0012 3558c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_SNMP_MIB 0x0016 3568c2ecf20Sopenharmony_ci#define HostCmd_CMD_MAC_REG_ACCESS 0x0019 3578c2ecf20Sopenharmony_ci#define HostCmd_CMD_BBP_REG_ACCESS 0x001a 3588c2ecf20Sopenharmony_ci#define HostCmd_CMD_RF_REG_ACCESS 0x001b 3598c2ecf20Sopenharmony_ci#define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad 3608c2ecf20Sopenharmony_ci#define HostCmd_CMD_RF_TX_PWR 0x001e 3618c2ecf20Sopenharmony_ci#define HostCmd_CMD_RF_ANTENNA 0x0020 3628c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 3638c2ecf20Sopenharmony_ci#define HostCmd_CMD_MAC_CONTROL 0x0028 3648c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_START 0x002b 3658c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c 3668c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 3678c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D 3688c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b 3698c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e 3708c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b 3718c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c 3728c2ecf20Sopenharmony_ci#define HostCmd_CMD_WMM_GET_STATUS 0x0071 3738c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 3748c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f 3758c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 3768c2ecf20Sopenharmony_ci#define HostCmd_CMD_MEM_ACCESS 0x0086 3778c2ecf20Sopenharmony_ci#define HostCmd_CMD_CFG_DATA 0x008f 3788c2ecf20Sopenharmony_ci#define HostCmd_CMD_VERSION_EXT 0x0097 3798c2ecf20Sopenharmony_ci#define HostCmd_CMD_MEF_CFG 0x009a 3808c2ecf20Sopenharmony_ci#define HostCmd_CMD_RSSI_INFO 0x00a4 3818c2ecf20Sopenharmony_ci#define HostCmd_CMD_FUNC_INIT 0x00a9 3828c2ecf20Sopenharmony_ci#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa 3838c2ecf20Sopenharmony_ci#define HOST_CMD_APCMD_SYS_RESET 0x00af 3848c2ecf20Sopenharmony_ci#define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 3858c2ecf20Sopenharmony_ci#define HostCmd_CMD_UAP_BSS_START 0x00b1 3868c2ecf20Sopenharmony_ci#define HostCmd_CMD_UAP_BSS_STOP 0x00b2 3878c2ecf20Sopenharmony_ci#define HOST_CMD_APCMD_STA_LIST 0x00b3 3888c2ecf20Sopenharmony_ci#define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5 3898c2ecf20Sopenharmony_ci#define HostCmd_CMD_11N_CFG 0x00cd 3908c2ecf20Sopenharmony_ci#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce 3918c2ecf20Sopenharmony_ci#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf 3928c2ecf20Sopenharmony_ci#define HostCmd_CMD_11N_DELBA 0x00d0 3938c2ecf20Sopenharmony_ci#define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 3948c2ecf20Sopenharmony_ci#define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd 3958c2ecf20Sopenharmony_ci#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df 3968c2ecf20Sopenharmony_ci#define HostCmd_CMD_TXPWR_CFG 0x00d1 3978c2ecf20Sopenharmony_ci#define HostCmd_CMD_TX_RATE_CFG 0x00d6 3988c2ecf20Sopenharmony_ci#define HostCmd_CMD_ROBUST_COEX 0x00e0 3998c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 4008c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 4018c2ecf20Sopenharmony_ci#define HostCmd_CMD_P2P_MODE_CFG 0x00eb 4028c2ecf20Sopenharmony_ci#define HostCmd_CMD_CAU_REG_ACCESS 0x00ed 4038c2ecf20Sopenharmony_ci#define HostCmd_CMD_SET_BSS_MODE 0x00f7 4048c2ecf20Sopenharmony_ci#define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa 4058c2ecf20Sopenharmony_ci#define HostCmd_CMD_802_11_SCAN_EXT 0x0107 4068c2ecf20Sopenharmony_ci#define HostCmd_CMD_COALESCE_CFG 0x010a 4078c2ecf20Sopenharmony_ci#define HostCmd_CMD_MGMT_FRAME_REG 0x010c 4088c2ecf20Sopenharmony_ci#define HostCmd_CMD_REMAIN_ON_CHAN 0x010d 4098c2ecf20Sopenharmony_ci#define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG 0x010f 4108c2ecf20Sopenharmony_ci#define HostCmd_CMD_11AC_CFG 0x0112 4118c2ecf20Sopenharmony_ci#define HostCmd_CMD_HS_WAKEUP_REASON 0x0116 4128c2ecf20Sopenharmony_ci#define HostCmd_CMD_TDLS_CONFIG 0x0100 4138c2ecf20Sopenharmony_ci#define HostCmd_CMD_MC_POLICY 0x0121 4148c2ecf20Sopenharmony_ci#define HostCmd_CMD_TDLS_OPER 0x0122 4158c2ecf20Sopenharmony_ci#define HostCmd_CMD_FW_DUMP_EVENT 0x0125 4168c2ecf20Sopenharmony_ci#define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 4178c2ecf20Sopenharmony_ci#define HostCmd_CMD_STA_CONFIGURE 0x023f 4188c2ecf20Sopenharmony_ci#define HostCmd_CMD_CHAN_REGION_CFG 0x0242 4198c2ecf20Sopenharmony_ci#define HostCmd_CMD_PACKET_AGGR_CTRL 0x0251 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci#define PROTOCOL_NO_SECURITY 0x01 4228c2ecf20Sopenharmony_ci#define PROTOCOL_STATIC_WEP 0x02 4238c2ecf20Sopenharmony_ci#define PROTOCOL_WPA 0x08 4248c2ecf20Sopenharmony_ci#define PROTOCOL_WPA2 0x20 4258c2ecf20Sopenharmony_ci#define PROTOCOL_WPA2_MIXED 0x28 4268c2ecf20Sopenharmony_ci#define PROTOCOL_EAP 0x40 4278c2ecf20Sopenharmony_ci#define KEY_MGMT_NONE 0x04 4288c2ecf20Sopenharmony_ci#define KEY_MGMT_PSK 0x02 4298c2ecf20Sopenharmony_ci#define KEY_MGMT_EAP 0x01 4308c2ecf20Sopenharmony_ci#define CIPHER_TKIP 0x04 4318c2ecf20Sopenharmony_ci#define CIPHER_AES_CCMP 0x08 4328c2ecf20Sopenharmony_ci#define VALID_CIPHER_BITMAP 0x0c 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_cienum ENH_PS_MODES { 4358c2ecf20Sopenharmony_ci EN_PS = 1, 4368c2ecf20Sopenharmony_ci DIS_PS = 2, 4378c2ecf20Sopenharmony_ci EN_AUTO_DS = 3, 4388c2ecf20Sopenharmony_ci DIS_AUTO_DS = 4, 4398c2ecf20Sopenharmony_ci SLEEP_CONFIRM = 5, 4408c2ecf20Sopenharmony_ci GET_PS = 0, 4418c2ecf20Sopenharmony_ci EN_AUTO_PS = 0xff, 4428c2ecf20Sopenharmony_ci DIS_AUTO_PS = 0xfe, 4438c2ecf20Sopenharmony_ci}; 4448c2ecf20Sopenharmony_ci 4458c2ecf20Sopenharmony_cienum P2P_MODES { 4468c2ecf20Sopenharmony_ci P2P_MODE_DISABLE = 0, 4478c2ecf20Sopenharmony_ci P2P_MODE_DEVICE = 1, 4488c2ecf20Sopenharmony_ci P2P_MODE_GO = 2, 4498c2ecf20Sopenharmony_ci P2P_MODE_CLIENT = 3, 4508c2ecf20Sopenharmony_ci}; 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_cienum mwifiex_channel_flags { 4538c2ecf20Sopenharmony_ci MWIFIEX_CHANNEL_PASSIVE = BIT(0), 4548c2ecf20Sopenharmony_ci MWIFIEX_CHANNEL_DFS = BIT(1), 4558c2ecf20Sopenharmony_ci MWIFIEX_CHANNEL_NOHT40 = BIT(2), 4568c2ecf20Sopenharmony_ci MWIFIEX_CHANNEL_NOHT80 = BIT(3), 4578c2ecf20Sopenharmony_ci MWIFIEX_CHANNEL_DISABLED = BIT(7), 4588c2ecf20Sopenharmony_ci}; 4598c2ecf20Sopenharmony_ci 4608c2ecf20Sopenharmony_ci#define HostCmd_RET_BIT 0x8000 4618c2ecf20Sopenharmony_ci#define HostCmd_ACT_GEN_GET 0x0000 4628c2ecf20Sopenharmony_ci#define HostCmd_ACT_GEN_SET 0x0001 4638c2ecf20Sopenharmony_ci#define HostCmd_ACT_GEN_REMOVE 0x0004 4648c2ecf20Sopenharmony_ci#define HostCmd_ACT_BITWISE_SET 0x0002 4658c2ecf20Sopenharmony_ci#define HostCmd_ACT_BITWISE_CLR 0x0003 4668c2ecf20Sopenharmony_ci#define HostCmd_RESULT_OK 0x0000 4678c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_RX_ON BIT(0) 4688c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_TX_ON BIT(1) 4698c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_WEP_ENABLE BIT(3) 4708c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_ETHERNETII_ENABLE BIT(4) 4718c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE BIT(7) 4728c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE BIT(8) 4738c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13) 4748c2ecf20Sopenharmony_ci#define HostCmd_ACT_MAC_DYNAMIC_BW_ENABLE BIT(16) 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci#define HostCmd_BSS_MODE_IBSS 0x0002 4778c2ecf20Sopenharmony_ci#define HostCmd_BSS_MODE_ANY 0x0003 4788c2ecf20Sopenharmony_ci 4798c2ecf20Sopenharmony_ci#define HostCmd_SCAN_RADIO_TYPE_BG 0 4808c2ecf20Sopenharmony_ci#define HostCmd_SCAN_RADIO_TYPE_A 1 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_ci#define HS_CFG_CANCEL 0xffffffff 4838c2ecf20Sopenharmony_ci#define HS_CFG_COND_DEF 0x00000000 4848c2ecf20Sopenharmony_ci#define HS_CFG_GPIO_DEF 0xff 4858c2ecf20Sopenharmony_ci#define HS_CFG_GAP_DEF 0xff 4868c2ecf20Sopenharmony_ci#define HS_CFG_COND_BROADCAST_DATA 0x00000001 4878c2ecf20Sopenharmony_ci#define HS_CFG_COND_UNICAST_DATA 0x00000002 4888c2ecf20Sopenharmony_ci#define HS_CFG_COND_MAC_EVENT 0x00000004 4898c2ecf20Sopenharmony_ci#define HS_CFG_COND_MULTICAST_DATA 0x00000008 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_ci#define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB 4928c2ecf20Sopenharmony_ci#define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC 4938c2ecf20Sopenharmony_ci#define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD 4948c2ecf20Sopenharmony_ci#define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE 4958c2ecf20Sopenharmony_ci#define CONNECT_ERR_STA_FAILURE 0xFFFF 4968c2ecf20Sopenharmony_ci 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci#define CMD_F_HOSTCMD (1 << 0) 4998c2ecf20Sopenharmony_ci 5008c2ecf20Sopenharmony_ci#define HostCmd_CMD_ID_MASK 0x0fff 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci#define HostCmd_SEQ_NUM_MASK 0x00ff 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ci#define HostCmd_BSS_NUM_MASK 0x0f00 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci#define HostCmd_BSS_TYPE_MASK 0xf000 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_ci#define HostCmd_ACT_SET_RX 0x0001 5098c2ecf20Sopenharmony_ci#define HostCmd_ACT_SET_TX 0x0002 5108c2ecf20Sopenharmony_ci#define HostCmd_ACT_SET_BOTH 0x0003 5118c2ecf20Sopenharmony_ci#define HostCmd_ACT_GET_RX 0x0004 5128c2ecf20Sopenharmony_ci#define HostCmd_ACT_GET_TX 0x0008 5138c2ecf20Sopenharmony_ci#define HostCmd_ACT_GET_BOTH 0x000c 5148c2ecf20Sopenharmony_ci 5158c2ecf20Sopenharmony_ci#define RF_ANTENNA_AUTO 0xFFFF 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \ 5188c2ecf20Sopenharmony_ci ((((seq) & 0x00ff) | \ 5198c2ecf20Sopenharmony_ci (((num) & 0x000f) << 8)) | \ 5208c2ecf20Sopenharmony_ci (((type) & 0x000f) << 12)) 5218c2ecf20Sopenharmony_ci 5228c2ecf20Sopenharmony_ci#define HostCmd_GET_SEQ_NO(seq) \ 5238c2ecf20Sopenharmony_ci ((seq) & HostCmd_SEQ_NUM_MASK) 5248c2ecf20Sopenharmony_ci 5258c2ecf20Sopenharmony_ci#define HostCmd_GET_BSS_NO(seq) \ 5268c2ecf20Sopenharmony_ci (((seq) & HostCmd_BSS_NUM_MASK) >> 8) 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_ci#define HostCmd_GET_BSS_TYPE(seq) \ 5298c2ecf20Sopenharmony_ci (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) 5308c2ecf20Sopenharmony_ci 5318c2ecf20Sopenharmony_ci#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 5328c2ecf20Sopenharmony_ci#define EVENT_LINK_LOST 0x00000003 5338c2ecf20Sopenharmony_ci#define EVENT_LINK_SENSED 0x00000004 5348c2ecf20Sopenharmony_ci#define EVENT_MIB_CHANGED 0x00000006 5358c2ecf20Sopenharmony_ci#define EVENT_INIT_DONE 0x00000007 5368c2ecf20Sopenharmony_ci#define EVENT_DEAUTHENTICATED 0x00000008 5378c2ecf20Sopenharmony_ci#define EVENT_DISASSOCIATED 0x00000009 5388c2ecf20Sopenharmony_ci#define EVENT_PS_AWAKE 0x0000000a 5398c2ecf20Sopenharmony_ci#define EVENT_PS_SLEEP 0x0000000b 5408c2ecf20Sopenharmony_ci#define EVENT_MIC_ERR_MULTICAST 0x0000000d 5418c2ecf20Sopenharmony_ci#define EVENT_MIC_ERR_UNICAST 0x0000000e 5428c2ecf20Sopenharmony_ci#define EVENT_DEEP_SLEEP_AWAKE 0x00000010 5438c2ecf20Sopenharmony_ci#define EVENT_ADHOC_BCN_LOST 0x00000011 5448c2ecf20Sopenharmony_ci 5458c2ecf20Sopenharmony_ci#define EVENT_WMM_STATUS_CHANGE 0x00000017 5468c2ecf20Sopenharmony_ci#define EVENT_BG_SCAN_REPORT 0x00000018 5478c2ecf20Sopenharmony_ci#define EVENT_RSSI_LOW 0x00000019 5488c2ecf20Sopenharmony_ci#define EVENT_SNR_LOW 0x0000001a 5498c2ecf20Sopenharmony_ci#define EVENT_MAX_FAIL 0x0000001b 5508c2ecf20Sopenharmony_ci#define EVENT_RSSI_HIGH 0x0000001c 5518c2ecf20Sopenharmony_ci#define EVENT_SNR_HIGH 0x0000001d 5528c2ecf20Sopenharmony_ci#define EVENT_IBSS_COALESCED 0x0000001e 5538c2ecf20Sopenharmony_ci#define EVENT_IBSS_STA_CONNECT 0x00000020 5548c2ecf20Sopenharmony_ci#define EVENT_IBSS_STA_DISCONNECT 0x00000021 5558c2ecf20Sopenharmony_ci#define EVENT_DATA_RSSI_LOW 0x00000024 5568c2ecf20Sopenharmony_ci#define EVENT_DATA_SNR_LOW 0x00000025 5578c2ecf20Sopenharmony_ci#define EVENT_DATA_RSSI_HIGH 0x00000026 5588c2ecf20Sopenharmony_ci#define EVENT_DATA_SNR_HIGH 0x00000027 5598c2ecf20Sopenharmony_ci#define EVENT_LINK_QUALITY 0x00000028 5608c2ecf20Sopenharmony_ci#define EVENT_PORT_RELEASE 0x0000002b 5618c2ecf20Sopenharmony_ci#define EVENT_UAP_STA_DEAUTH 0x0000002c 5628c2ecf20Sopenharmony_ci#define EVENT_UAP_STA_ASSOC 0x0000002d 5638c2ecf20Sopenharmony_ci#define EVENT_UAP_BSS_START 0x0000002e 5648c2ecf20Sopenharmony_ci#define EVENT_PRE_BEACON_LOST 0x00000031 5658c2ecf20Sopenharmony_ci#define EVENT_ADDBA 0x00000033 5668c2ecf20Sopenharmony_ci#define EVENT_DELBA 0x00000034 5678c2ecf20Sopenharmony_ci#define EVENT_BA_STREAM_TIEMOUT 0x00000037 5688c2ecf20Sopenharmony_ci#define EVENT_AMSDU_AGGR_CTRL 0x00000042 5698c2ecf20Sopenharmony_ci#define EVENT_UAP_BSS_IDLE 0x00000043 5708c2ecf20Sopenharmony_ci#define EVENT_UAP_BSS_ACTIVE 0x00000044 5718c2ecf20Sopenharmony_ci#define EVENT_WEP_ICV_ERR 0x00000046 5728c2ecf20Sopenharmony_ci#define EVENT_HS_ACT_REQ 0x00000047 5738c2ecf20Sopenharmony_ci#define EVENT_BW_CHANGE 0x00000048 5748c2ecf20Sopenharmony_ci#define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c 5758c2ecf20Sopenharmony_ci#define EVENT_HOSTWAKE_STAIE 0x0000004d 5768c2ecf20Sopenharmony_ci#define EVENT_CHANNEL_SWITCH_ANN 0x00000050 5778c2ecf20Sopenharmony_ci#define EVENT_TDLS_GENERIC_EVENT 0x00000052 5788c2ecf20Sopenharmony_ci#define EVENT_RADAR_DETECTED 0x00000053 5798c2ecf20Sopenharmony_ci#define EVENT_CHANNEL_REPORT_RDY 0x00000054 5808c2ecf20Sopenharmony_ci#define EVENT_TX_DATA_PAUSE 0x00000055 5818c2ecf20Sopenharmony_ci#define EVENT_EXT_SCAN_REPORT 0x00000058 5828c2ecf20Sopenharmony_ci#define EVENT_RXBA_SYNC 0x00000059 5838c2ecf20Sopenharmony_ci#define EVENT_UNKNOWN_DEBUG 0x00000063 5848c2ecf20Sopenharmony_ci#define EVENT_BG_SCAN_STOPPED 0x00000065 5858c2ecf20Sopenharmony_ci#define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f 5868c2ecf20Sopenharmony_ci#define EVENT_MULTI_CHAN_INFO 0x0000006a 5878c2ecf20Sopenharmony_ci#define EVENT_FW_DUMP_INFO 0x00000073 5888c2ecf20Sopenharmony_ci#define EVENT_TX_STATUS_REPORT 0x00000074 5898c2ecf20Sopenharmony_ci#define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 5908c2ecf20Sopenharmony_ci 5918c2ecf20Sopenharmony_ci#define EVENT_ID_MASK 0xffff 5928c2ecf20Sopenharmony_ci#define BSS_NUM_MASK 0xf 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ci#define EVENT_GET_BSS_NUM(event_cause) \ 5958c2ecf20Sopenharmony_ci (((event_cause) >> 16) & BSS_NUM_MASK) 5968c2ecf20Sopenharmony_ci 5978c2ecf20Sopenharmony_ci#define EVENT_GET_BSS_TYPE(event_cause) \ 5988c2ecf20Sopenharmony_ci (((event_cause) >> 24) & 0x00ff) 5998c2ecf20Sopenharmony_ci 6008c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_PATTERN_LEN 40 6018c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_OFFSET_LEN 100 6028c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_ND_MATCH_SETS 10 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_ci#define STACK_NBYTES 100 6058c2ecf20Sopenharmony_ci#define TYPE_DNUM 1 6068c2ecf20Sopenharmony_ci#define TYPE_BYTESEQ 2 6078c2ecf20Sopenharmony_ci#define MAX_OPERAND 0x40 6088c2ecf20Sopenharmony_ci#define TYPE_EQ (MAX_OPERAND+1) 6098c2ecf20Sopenharmony_ci#define TYPE_EQ_DNUM (MAX_OPERAND+2) 6108c2ecf20Sopenharmony_ci#define TYPE_EQ_BIT (MAX_OPERAND+3) 6118c2ecf20Sopenharmony_ci#define TYPE_AND (MAX_OPERAND+4) 6128c2ecf20Sopenharmony_ci#define TYPE_OR (MAX_OPERAND+5) 6138c2ecf20Sopenharmony_ci#define MEF_MODE_HOST_SLEEP 1 6148c2ecf20Sopenharmony_ci#define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 6158c2ecf20Sopenharmony_ci#define MEF_ACTION_AUTO_ARP 0x10 6168c2ecf20Sopenharmony_ci#define MWIFIEX_CRITERIA_BROADCAST BIT(0) 6178c2ecf20Sopenharmony_ci#define MWIFIEX_CRITERIA_UNICAST BIT(1) 6188c2ecf20Sopenharmony_ci#define MWIFIEX_CRITERIA_MULTICAST BIT(3) 6198c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_SUPPORTED_IPADDR 4 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci#define ACT_TDLS_DELETE 0x00 6228c2ecf20Sopenharmony_ci#define ACT_TDLS_CREATE 0x01 6238c2ecf20Sopenharmony_ci#define ACT_TDLS_CONFIG 0x02 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci#define TDLS_EVENT_LINK_TEAR_DOWN 3 6268c2ecf20Sopenharmony_ci#define TDLS_EVENT_CHAN_SWITCH_RESULT 7 6278c2ecf20Sopenharmony_ci#define TDLS_EVENT_START_CHAN_SWITCH 8 6288c2ecf20Sopenharmony_ci#define TDLS_EVENT_CHAN_SWITCH_STOPPED 9 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_ci#define TDLS_BASE_CHANNEL 0 6318c2ecf20Sopenharmony_ci#define TDLS_OFF_CHANNEL 1 6328c2ecf20Sopenharmony_ci 6338c2ecf20Sopenharmony_ci#define ACT_TDLS_CS_ENABLE_CONFIG 0x00 6348c2ecf20Sopenharmony_ci#define ACT_TDLS_CS_INIT 0x06 6358c2ecf20Sopenharmony_ci#define ACT_TDLS_CS_STOP 0x07 6368c2ecf20Sopenharmony_ci#define ACT_TDLS_CS_PARAMS 0x08 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_UNIT_TIME 2 6398c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_THR_OTHERLINK 10 6408c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_THR_DIRECTLINK 0 6418c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_TIME 10 6428c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_TIMEOUT 16 6438c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_REG_CLASS 12 6448c2ecf20Sopenharmony_ci#define MWIFIEX_DEF_CS_PERIODICITY 1 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ci#define MWIFIEX_FW_V15 15 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_ci#define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1) 6498c2ecf20Sopenharmony_ci 6508c2ecf20Sopenharmony_cistruct mwifiex_ie_types_header { 6518c2ecf20Sopenharmony_ci __le16 type; 6528c2ecf20Sopenharmony_ci __le16 len; 6538c2ecf20Sopenharmony_ci} __packed; 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_cistruct mwifiex_ie_types_data { 6568c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 6578c2ecf20Sopenharmony_ci u8 data[1]; 6588c2ecf20Sopenharmony_ci} __packed; 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci#define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01 6618c2ecf20Sopenharmony_ci#define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08 6628c2ecf20Sopenharmony_ci#define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10 6638c2ecf20Sopenharmony_ci#define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01 6648c2ecf20Sopenharmony_ci#define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20 6658c2ecf20Sopenharmony_ci 6668c2ecf20Sopenharmony_cienum HS_WAKEUP_REASON { 6678c2ecf20Sopenharmony_ci NO_HSWAKEUP_REASON = 0, 6688c2ecf20Sopenharmony_ci BCAST_DATA_MATCHED, 6698c2ecf20Sopenharmony_ci MCAST_DATA_MATCHED, 6708c2ecf20Sopenharmony_ci UCAST_DATA_MATCHED, 6718c2ecf20Sopenharmony_ci MASKTABLE_EVENT_MATCHED, 6728c2ecf20Sopenharmony_ci NON_MASKABLE_EVENT_MATCHED, 6738c2ecf20Sopenharmony_ci NON_MASKABLE_CONDITION_MATCHED, 6748c2ecf20Sopenharmony_ci MAGIC_PATTERN_MATCHED, 6758c2ecf20Sopenharmony_ci CONTROL_FRAME_MATCHED, 6768c2ecf20Sopenharmony_ci MANAGEMENT_FRAME_MATCHED, 6778c2ecf20Sopenharmony_ci GTK_REKEY_FAILURE, 6788c2ecf20Sopenharmony_ci RESERVED 6798c2ecf20Sopenharmony_ci}; 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_cistruct txpd { 6828c2ecf20Sopenharmony_ci u8 bss_type; 6838c2ecf20Sopenharmony_ci u8 bss_num; 6848c2ecf20Sopenharmony_ci __le16 tx_pkt_length; 6858c2ecf20Sopenharmony_ci __le16 tx_pkt_offset; 6868c2ecf20Sopenharmony_ci __le16 tx_pkt_type; 6878c2ecf20Sopenharmony_ci __le32 tx_control; 6888c2ecf20Sopenharmony_ci u8 priority; 6898c2ecf20Sopenharmony_ci u8 flags; 6908c2ecf20Sopenharmony_ci u8 pkt_delay_2ms; 6918c2ecf20Sopenharmony_ci u8 reserved1[2]; 6928c2ecf20Sopenharmony_ci u8 tx_token_id; 6938c2ecf20Sopenharmony_ci u8 reserved[2]; 6948c2ecf20Sopenharmony_ci} __packed; 6958c2ecf20Sopenharmony_ci 6968c2ecf20Sopenharmony_cistruct rxpd { 6978c2ecf20Sopenharmony_ci u8 bss_type; 6988c2ecf20Sopenharmony_ci u8 bss_num; 6998c2ecf20Sopenharmony_ci __le16 rx_pkt_length; 7008c2ecf20Sopenharmony_ci __le16 rx_pkt_offset; 7018c2ecf20Sopenharmony_ci __le16 rx_pkt_type; 7028c2ecf20Sopenharmony_ci __le16 seq_num; 7038c2ecf20Sopenharmony_ci u8 priority; 7048c2ecf20Sopenharmony_ci u8 rx_rate; 7058c2ecf20Sopenharmony_ci s8 snr; 7068c2ecf20Sopenharmony_ci s8 nf; 7078c2ecf20Sopenharmony_ci 7088c2ecf20Sopenharmony_ci /* For: Non-802.11 AC cards 7098c2ecf20Sopenharmony_ci * 7108c2ecf20Sopenharmony_ci * Ht Info [Bit 0] RxRate format: LG=0, HT=1 7118c2ecf20Sopenharmony_ci * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 7128c2ecf20Sopenharmony_ci * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 7138c2ecf20Sopenharmony_ci * 7148c2ecf20Sopenharmony_ci * For: 802.11 AC cards 7158c2ecf20Sopenharmony_ci * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 7168c2ecf20Sopenharmony_ci * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 7178c2ecf20Sopenharmony_ci * BW80 = 10 BW160 = 11 7188c2ecf20Sopenharmony_ci * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 7198c2ecf20Sopenharmony_ci * [Bit 5] STBC support Enabled = 1 7208c2ecf20Sopenharmony_ci * [Bit 6] LDPC support Enabled = 1 7218c2ecf20Sopenharmony_ci * [Bit 7] Reserved 7228c2ecf20Sopenharmony_ci */ 7238c2ecf20Sopenharmony_ci u8 ht_info; 7248c2ecf20Sopenharmony_ci u8 reserved[3]; 7258c2ecf20Sopenharmony_ci u8 flags; 7268c2ecf20Sopenharmony_ci} __packed; 7278c2ecf20Sopenharmony_ci 7288c2ecf20Sopenharmony_cistruct uap_txpd { 7298c2ecf20Sopenharmony_ci u8 bss_type; 7308c2ecf20Sopenharmony_ci u8 bss_num; 7318c2ecf20Sopenharmony_ci __le16 tx_pkt_length; 7328c2ecf20Sopenharmony_ci __le16 tx_pkt_offset; 7338c2ecf20Sopenharmony_ci __le16 tx_pkt_type; 7348c2ecf20Sopenharmony_ci __le32 tx_control; 7358c2ecf20Sopenharmony_ci u8 priority; 7368c2ecf20Sopenharmony_ci u8 flags; 7378c2ecf20Sopenharmony_ci u8 pkt_delay_2ms; 7388c2ecf20Sopenharmony_ci u8 reserved1[2]; 7398c2ecf20Sopenharmony_ci u8 tx_token_id; 7408c2ecf20Sopenharmony_ci u8 reserved[2]; 7418c2ecf20Sopenharmony_ci} __packed; 7428c2ecf20Sopenharmony_ci 7438c2ecf20Sopenharmony_cistruct uap_rxpd { 7448c2ecf20Sopenharmony_ci u8 bss_type; 7458c2ecf20Sopenharmony_ci u8 bss_num; 7468c2ecf20Sopenharmony_ci __le16 rx_pkt_length; 7478c2ecf20Sopenharmony_ci __le16 rx_pkt_offset; 7488c2ecf20Sopenharmony_ci __le16 rx_pkt_type; 7498c2ecf20Sopenharmony_ci __le16 seq_num; 7508c2ecf20Sopenharmony_ci u8 priority; 7518c2ecf20Sopenharmony_ci u8 rx_rate; 7528c2ecf20Sopenharmony_ci s8 snr; 7538c2ecf20Sopenharmony_ci s8 nf; 7548c2ecf20Sopenharmony_ci u8 ht_info; 7558c2ecf20Sopenharmony_ci u8 reserved[3]; 7568c2ecf20Sopenharmony_ci u8 flags; 7578c2ecf20Sopenharmony_ci} __packed; 7588c2ecf20Sopenharmony_ci 7598c2ecf20Sopenharmony_cistruct mwifiex_fw_chan_stats { 7608c2ecf20Sopenharmony_ci u8 chan_num; 7618c2ecf20Sopenharmony_ci u8 bandcfg; 7628c2ecf20Sopenharmony_ci u8 flags; 7638c2ecf20Sopenharmony_ci s8 noise; 7648c2ecf20Sopenharmony_ci __le16 total_bss; 7658c2ecf20Sopenharmony_ci __le16 cca_scan_dur; 7668c2ecf20Sopenharmony_ci __le16 cca_busy_dur; 7678c2ecf20Sopenharmony_ci} __packed; 7688c2ecf20Sopenharmony_ci 7698c2ecf20Sopenharmony_cienum mwifiex_chan_scan_mode_bitmasks { 7708c2ecf20Sopenharmony_ci MWIFIEX_PASSIVE_SCAN = BIT(0), 7718c2ecf20Sopenharmony_ci MWIFIEX_DISABLE_CHAN_FILT = BIT(1), 7728c2ecf20Sopenharmony_ci MWIFIEX_HIDDEN_SSID_REPORT = BIT(4), 7738c2ecf20Sopenharmony_ci}; 7748c2ecf20Sopenharmony_ci 7758c2ecf20Sopenharmony_cistruct mwifiex_chan_scan_param_set { 7768c2ecf20Sopenharmony_ci u8 radio_type; 7778c2ecf20Sopenharmony_ci u8 chan_number; 7788c2ecf20Sopenharmony_ci u8 chan_scan_mode_bitmap; 7798c2ecf20Sopenharmony_ci __le16 min_scan_time; 7808c2ecf20Sopenharmony_ci __le16 max_scan_time; 7818c2ecf20Sopenharmony_ci} __packed; 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_cistruct mwifiex_ie_types_chan_list_param_set { 7848c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 7858c2ecf20Sopenharmony_ci struct mwifiex_chan_scan_param_set chan_scan_param[1]; 7868c2ecf20Sopenharmony_ci} __packed; 7878c2ecf20Sopenharmony_ci 7888c2ecf20Sopenharmony_cistruct mwifiex_ie_types_rxba_sync { 7898c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 7908c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 7918c2ecf20Sopenharmony_ci u8 tid; 7928c2ecf20Sopenharmony_ci u8 reserved; 7938c2ecf20Sopenharmony_ci __le16 seq_num; 7948c2ecf20Sopenharmony_ci __le16 bitmap_len; 7958c2ecf20Sopenharmony_ci u8 bitmap[1]; 7968c2ecf20Sopenharmony_ci} __packed; 7978c2ecf20Sopenharmony_ci 7988c2ecf20Sopenharmony_cistruct chan_band_param_set { 7998c2ecf20Sopenharmony_ci u8 radio_type; 8008c2ecf20Sopenharmony_ci u8 chan_number; 8018c2ecf20Sopenharmony_ci}; 8028c2ecf20Sopenharmony_ci 8038c2ecf20Sopenharmony_cistruct mwifiex_ie_types_chan_band_list_param_set { 8048c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8058c2ecf20Sopenharmony_ci struct chan_band_param_set chan_band_param[1]; 8068c2ecf20Sopenharmony_ci} __packed; 8078c2ecf20Sopenharmony_ci 8088c2ecf20Sopenharmony_cistruct mwifiex_ie_types_rates_param_set { 8098c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8108c2ecf20Sopenharmony_ci u8 rates[1]; 8118c2ecf20Sopenharmony_ci} __packed; 8128c2ecf20Sopenharmony_ci 8138c2ecf20Sopenharmony_cistruct mwifiex_ie_types_ssid_param_set { 8148c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8158c2ecf20Sopenharmony_ci u8 ssid[1]; 8168c2ecf20Sopenharmony_ci} __packed; 8178c2ecf20Sopenharmony_ci 8188c2ecf20Sopenharmony_cistruct mwifiex_ie_types_num_probes { 8198c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8208c2ecf20Sopenharmony_ci __le16 num_probes; 8218c2ecf20Sopenharmony_ci} __packed; 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_cistruct mwifiex_ie_types_repeat_count { 8248c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8258c2ecf20Sopenharmony_ci __le16 repeat_count; 8268c2ecf20Sopenharmony_ci} __packed; 8278c2ecf20Sopenharmony_ci 8288c2ecf20Sopenharmony_cistruct mwifiex_ie_types_min_rssi_threshold { 8298c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8308c2ecf20Sopenharmony_ci __le16 rssi_threshold; 8318c2ecf20Sopenharmony_ci} __packed; 8328c2ecf20Sopenharmony_ci 8338c2ecf20Sopenharmony_cistruct mwifiex_ie_types_bgscan_start_later { 8348c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8358c2ecf20Sopenharmony_ci __le16 start_later; 8368c2ecf20Sopenharmony_ci} __packed; 8378c2ecf20Sopenharmony_ci 8388c2ecf20Sopenharmony_cistruct mwifiex_ie_types_scan_chan_gap { 8398c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8408c2ecf20Sopenharmony_ci /* time gap in TUs to be used between two consecutive channels scan */ 8418c2ecf20Sopenharmony_ci __le16 chan_gap; 8428c2ecf20Sopenharmony_ci} __packed; 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_cistruct mwifiex_ie_types_random_mac { 8458c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8468c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 8478c2ecf20Sopenharmony_ci} __packed; 8488c2ecf20Sopenharmony_ci 8498c2ecf20Sopenharmony_cistruct mwifiex_ietypes_chanstats { 8508c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8518c2ecf20Sopenharmony_ci struct mwifiex_fw_chan_stats chanstats[]; 8528c2ecf20Sopenharmony_ci} __packed; 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_cistruct mwifiex_ie_types_wildcard_ssid_params { 8558c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8568c2ecf20Sopenharmony_ci u8 max_ssid_length; 8578c2ecf20Sopenharmony_ci u8 ssid[1]; 8588c2ecf20Sopenharmony_ci} __packed; 8598c2ecf20Sopenharmony_ci 8608c2ecf20Sopenharmony_ci#define TSF_DATA_SIZE 8 8618c2ecf20Sopenharmony_cistruct mwifiex_ie_types_tsf_timestamp { 8628c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8638c2ecf20Sopenharmony_ci u8 tsf_data[1]; 8648c2ecf20Sopenharmony_ci} __packed; 8658c2ecf20Sopenharmony_ci 8668c2ecf20Sopenharmony_cistruct mwifiex_cf_param_set { 8678c2ecf20Sopenharmony_ci u8 cfp_cnt; 8688c2ecf20Sopenharmony_ci u8 cfp_period; 8698c2ecf20Sopenharmony_ci __le16 cfp_max_duration; 8708c2ecf20Sopenharmony_ci __le16 cfp_duration_remaining; 8718c2ecf20Sopenharmony_ci} __packed; 8728c2ecf20Sopenharmony_ci 8738c2ecf20Sopenharmony_cistruct mwifiex_ibss_param_set { 8748c2ecf20Sopenharmony_ci __le16 atim_window; 8758c2ecf20Sopenharmony_ci} __packed; 8768c2ecf20Sopenharmony_ci 8778c2ecf20Sopenharmony_cistruct mwifiex_ie_types_ss_param_set { 8788c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8798c2ecf20Sopenharmony_ci union { 8808c2ecf20Sopenharmony_ci struct mwifiex_cf_param_set cf_param_set[1]; 8818c2ecf20Sopenharmony_ci struct mwifiex_ibss_param_set ibss_param_set[1]; 8828c2ecf20Sopenharmony_ci } cf_ibss; 8838c2ecf20Sopenharmony_ci} __packed; 8848c2ecf20Sopenharmony_ci 8858c2ecf20Sopenharmony_cistruct mwifiex_fh_param_set { 8868c2ecf20Sopenharmony_ci __le16 dwell_time; 8878c2ecf20Sopenharmony_ci u8 hop_set; 8888c2ecf20Sopenharmony_ci u8 hop_pattern; 8898c2ecf20Sopenharmony_ci u8 hop_index; 8908c2ecf20Sopenharmony_ci} __packed; 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_cistruct mwifiex_ds_param_set { 8938c2ecf20Sopenharmony_ci u8 current_chan; 8948c2ecf20Sopenharmony_ci} __packed; 8958c2ecf20Sopenharmony_ci 8968c2ecf20Sopenharmony_cistruct mwifiex_ie_types_phy_param_set { 8978c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 8988c2ecf20Sopenharmony_ci union { 8998c2ecf20Sopenharmony_ci struct mwifiex_fh_param_set fh_param_set[1]; 9008c2ecf20Sopenharmony_ci struct mwifiex_ds_param_set ds_param_set[1]; 9018c2ecf20Sopenharmony_ci } fh_ds; 9028c2ecf20Sopenharmony_ci} __packed; 9038c2ecf20Sopenharmony_ci 9048c2ecf20Sopenharmony_cistruct mwifiex_ie_types_auth_type { 9058c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 9068c2ecf20Sopenharmony_ci __le16 auth_type; 9078c2ecf20Sopenharmony_ci} __packed; 9088c2ecf20Sopenharmony_ci 9098c2ecf20Sopenharmony_cistruct mwifiex_ie_types_vendor_param_set { 9108c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 9118c2ecf20Sopenharmony_ci u8 ie[MWIFIEX_MAX_VSIE_LEN]; 9128c2ecf20Sopenharmony_ci}; 9138c2ecf20Sopenharmony_ci 9148c2ecf20Sopenharmony_ci#define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60 9158c2ecf20Sopenharmony_ci 9168c2ecf20Sopenharmony_cistruct mwifiex_ie_types_tdls_idle_timeout { 9178c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 9188c2ecf20Sopenharmony_ci __le16 value; 9198c2ecf20Sopenharmony_ci} __packed; 9208c2ecf20Sopenharmony_ci 9218c2ecf20Sopenharmony_cistruct mwifiex_ie_types_rsn_param_set { 9228c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 9238c2ecf20Sopenharmony_ci u8 rsn_ie[1]; 9248c2ecf20Sopenharmony_ci} __packed; 9258c2ecf20Sopenharmony_ci 9268c2ecf20Sopenharmony_ci#define KEYPARAMSET_FIXED_LEN 6 9278c2ecf20Sopenharmony_ci 9288c2ecf20Sopenharmony_cistruct mwifiex_ie_type_key_param_set { 9298c2ecf20Sopenharmony_ci __le16 type; 9308c2ecf20Sopenharmony_ci __le16 length; 9318c2ecf20Sopenharmony_ci __le16 key_type_id; 9328c2ecf20Sopenharmony_ci __le16 key_info; 9338c2ecf20Sopenharmony_ci __le16 key_len; 9348c2ecf20Sopenharmony_ci u8 key[50]; 9358c2ecf20Sopenharmony_ci} __packed; 9368c2ecf20Sopenharmony_ci 9378c2ecf20Sopenharmony_ci#define IGTK_PN_LEN 8 9388c2ecf20Sopenharmony_ci 9398c2ecf20Sopenharmony_cistruct mwifiex_cmac_param { 9408c2ecf20Sopenharmony_ci u8 ipn[IGTK_PN_LEN]; 9418c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_AES_CMAC]; 9428c2ecf20Sopenharmony_ci} __packed; 9438c2ecf20Sopenharmony_ci 9448c2ecf20Sopenharmony_cistruct mwifiex_wep_param { 9458c2ecf20Sopenharmony_ci __le16 key_len; 9468c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_WEP104]; 9478c2ecf20Sopenharmony_ci} __packed; 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_cistruct mwifiex_tkip_param { 9508c2ecf20Sopenharmony_ci u8 pn[WPA_PN_SIZE]; 9518c2ecf20Sopenharmony_ci __le16 key_len; 9528c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_TKIP]; 9538c2ecf20Sopenharmony_ci} __packed; 9548c2ecf20Sopenharmony_ci 9558c2ecf20Sopenharmony_cistruct mwifiex_aes_param { 9568c2ecf20Sopenharmony_ci u8 pn[WPA_PN_SIZE]; 9578c2ecf20Sopenharmony_ci __le16 key_len; 9588c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_CCMP_256]; 9598c2ecf20Sopenharmony_ci} __packed; 9608c2ecf20Sopenharmony_ci 9618c2ecf20Sopenharmony_cistruct mwifiex_wapi_param { 9628c2ecf20Sopenharmony_ci u8 pn[PN_LEN]; 9638c2ecf20Sopenharmony_ci __le16 key_len; 9648c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_SMS4]; 9658c2ecf20Sopenharmony_ci} __packed; 9668c2ecf20Sopenharmony_ci 9678c2ecf20Sopenharmony_cistruct mwifiex_cmac_aes_param { 9688c2ecf20Sopenharmony_ci u8 ipn[IGTK_PN_LEN]; 9698c2ecf20Sopenharmony_ci __le16 key_len; 9708c2ecf20Sopenharmony_ci u8 key[WLAN_KEY_LEN_AES_CMAC]; 9718c2ecf20Sopenharmony_ci} __packed; 9728c2ecf20Sopenharmony_ci 9738c2ecf20Sopenharmony_cistruct mwifiex_ie_type_key_param_set_v2 { 9748c2ecf20Sopenharmony_ci __le16 type; 9758c2ecf20Sopenharmony_ci __le16 len; 9768c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 9778c2ecf20Sopenharmony_ci u8 key_idx; 9788c2ecf20Sopenharmony_ci u8 key_type; 9798c2ecf20Sopenharmony_ci __le16 key_info; 9808c2ecf20Sopenharmony_ci union { 9818c2ecf20Sopenharmony_ci struct mwifiex_wep_param wep; 9828c2ecf20Sopenharmony_ci struct mwifiex_tkip_param tkip; 9838c2ecf20Sopenharmony_ci struct mwifiex_aes_param aes; 9848c2ecf20Sopenharmony_ci struct mwifiex_wapi_param wapi; 9858c2ecf20Sopenharmony_ci struct mwifiex_cmac_aes_param cmac_aes; 9868c2ecf20Sopenharmony_ci } key_params; 9878c2ecf20Sopenharmony_ci} __packed; 9888c2ecf20Sopenharmony_ci 9898c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_key_material_v2 { 9908c2ecf20Sopenharmony_ci __le16 action; 9918c2ecf20Sopenharmony_ci struct mwifiex_ie_type_key_param_set_v2 key_param_set; 9928c2ecf20Sopenharmony_ci} __packed; 9938c2ecf20Sopenharmony_ci 9948c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_key_material { 9958c2ecf20Sopenharmony_ci __le16 action; 9968c2ecf20Sopenharmony_ci struct mwifiex_ie_type_key_param_set key_param_set; 9978c2ecf20Sopenharmony_ci} __packed; 9988c2ecf20Sopenharmony_ci 9998c2ecf20Sopenharmony_cistruct host_cmd_ds_gen { 10008c2ecf20Sopenharmony_ci __le16 command; 10018c2ecf20Sopenharmony_ci __le16 size; 10028c2ecf20Sopenharmony_ci __le16 seq_num; 10038c2ecf20Sopenharmony_ci __le16 result; 10048c2ecf20Sopenharmony_ci}; 10058c2ecf20Sopenharmony_ci 10068c2ecf20Sopenharmony_ci#define S_DS_GEN sizeof(struct host_cmd_ds_gen) 10078c2ecf20Sopenharmony_ci 10088c2ecf20Sopenharmony_cienum sleep_resp_ctrl { 10098c2ecf20Sopenharmony_ci RESP_NOT_NEEDED = 0, 10108c2ecf20Sopenharmony_ci RESP_NEEDED, 10118c2ecf20Sopenharmony_ci}; 10128c2ecf20Sopenharmony_ci 10138c2ecf20Sopenharmony_cistruct mwifiex_ps_param { 10148c2ecf20Sopenharmony_ci __le16 null_pkt_interval; 10158c2ecf20Sopenharmony_ci __le16 multiple_dtims; 10168c2ecf20Sopenharmony_ci __le16 bcn_miss_timeout; 10178c2ecf20Sopenharmony_ci __le16 local_listen_interval; 10188c2ecf20Sopenharmony_ci __le16 adhoc_wake_period; 10198c2ecf20Sopenharmony_ci __le16 mode; 10208c2ecf20Sopenharmony_ci __le16 delay_to_ps; 10218c2ecf20Sopenharmony_ci} __packed; 10228c2ecf20Sopenharmony_ci 10238c2ecf20Sopenharmony_ci#define HS_DEF_WAKE_INTERVAL 100 10248c2ecf20Sopenharmony_ci#define HS_DEF_INACTIVITY_TIMEOUT 50 10258c2ecf20Sopenharmony_ci 10268c2ecf20Sopenharmony_cistruct mwifiex_ps_param_in_hs { 10278c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 10288c2ecf20Sopenharmony_ci __le32 hs_wake_int; 10298c2ecf20Sopenharmony_ci __le32 hs_inact_timeout; 10308c2ecf20Sopenharmony_ci} __packed; 10318c2ecf20Sopenharmony_ci 10328c2ecf20Sopenharmony_ci#define BITMAP_AUTO_DS 0x01 10338c2ecf20Sopenharmony_ci#define BITMAP_STA_PS 0x10 10348c2ecf20Sopenharmony_ci 10358c2ecf20Sopenharmony_cistruct mwifiex_ie_types_auto_ds_param { 10368c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 10378c2ecf20Sopenharmony_ci __le16 deep_sleep_timeout; 10388c2ecf20Sopenharmony_ci} __packed; 10398c2ecf20Sopenharmony_ci 10408c2ecf20Sopenharmony_cistruct mwifiex_ie_types_ps_param { 10418c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 10428c2ecf20Sopenharmony_ci struct mwifiex_ps_param param; 10438c2ecf20Sopenharmony_ci} __packed; 10448c2ecf20Sopenharmony_ci 10458c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ps_mode_enh { 10468c2ecf20Sopenharmony_ci __le16 action; 10478c2ecf20Sopenharmony_ci 10488c2ecf20Sopenharmony_ci union { 10498c2ecf20Sopenharmony_ci struct mwifiex_ps_param opt_ps; 10508c2ecf20Sopenharmony_ci __le16 ps_bitmap; 10518c2ecf20Sopenharmony_ci } params; 10528c2ecf20Sopenharmony_ci} __packed; 10538c2ecf20Sopenharmony_ci 10548c2ecf20Sopenharmony_cienum API_VER_ID { 10558c2ecf20Sopenharmony_ci KEY_API_VER_ID = 1, 10568c2ecf20Sopenharmony_ci FW_API_VER_ID = 2, 10578c2ecf20Sopenharmony_ci UAP_FW_API_VER_ID = 3, 10588c2ecf20Sopenharmony_ci CHANRPT_API_VER_ID = 4, 10598c2ecf20Sopenharmony_ci}; 10608c2ecf20Sopenharmony_ci 10618c2ecf20Sopenharmony_cistruct hw_spec_api_rev { 10628c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 10638c2ecf20Sopenharmony_ci __le16 api_id; 10648c2ecf20Sopenharmony_ci u8 major_ver; 10658c2ecf20Sopenharmony_ci u8 minor_ver; 10668c2ecf20Sopenharmony_ci} __packed; 10678c2ecf20Sopenharmony_ci 10688c2ecf20Sopenharmony_cistruct host_cmd_ds_get_hw_spec { 10698c2ecf20Sopenharmony_ci __le16 hw_if_version; 10708c2ecf20Sopenharmony_ci __le16 version; 10718c2ecf20Sopenharmony_ci __le16 reserved; 10728c2ecf20Sopenharmony_ci __le16 num_of_mcast_adr; 10738c2ecf20Sopenharmony_ci u8 permanent_addr[ETH_ALEN]; 10748c2ecf20Sopenharmony_ci __le16 region_code; 10758c2ecf20Sopenharmony_ci __le16 number_of_antenna; 10768c2ecf20Sopenharmony_ci __le32 fw_release_number; 10778c2ecf20Sopenharmony_ci __le32 reserved_1; 10788c2ecf20Sopenharmony_ci __le32 reserved_2; 10798c2ecf20Sopenharmony_ci __le32 reserved_3; 10808c2ecf20Sopenharmony_ci __le32 fw_cap_info; 10818c2ecf20Sopenharmony_ci __le32 dot_11n_dev_cap; 10828c2ecf20Sopenharmony_ci u8 dev_mcs_support; 10838c2ecf20Sopenharmony_ci __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ 10848c2ecf20Sopenharmony_ci __le16 mgmt_buf_count; /* mgmt IE buffer count */ 10858c2ecf20Sopenharmony_ci __le32 reserved_5; 10868c2ecf20Sopenharmony_ci __le32 reserved_6; 10878c2ecf20Sopenharmony_ci __le32 dot_11ac_dev_cap; 10888c2ecf20Sopenharmony_ci __le32 dot_11ac_mcs_support; 10898c2ecf20Sopenharmony_ci u8 tlvs[]; 10908c2ecf20Sopenharmony_ci} __packed; 10918c2ecf20Sopenharmony_ci 10928c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_rssi_info { 10938c2ecf20Sopenharmony_ci __le16 action; 10948c2ecf20Sopenharmony_ci __le16 ndata; 10958c2ecf20Sopenharmony_ci __le16 nbcn; 10968c2ecf20Sopenharmony_ci __le16 reserved[9]; 10978c2ecf20Sopenharmony_ci long long reserved_1; 10988c2ecf20Sopenharmony_ci} __packed; 10998c2ecf20Sopenharmony_ci 11008c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_rssi_info_rsp { 11018c2ecf20Sopenharmony_ci __le16 action; 11028c2ecf20Sopenharmony_ci __le16 ndata; 11038c2ecf20Sopenharmony_ci __le16 nbcn; 11048c2ecf20Sopenharmony_ci __le16 data_rssi_last; 11058c2ecf20Sopenharmony_ci __le16 data_nf_last; 11068c2ecf20Sopenharmony_ci __le16 data_rssi_avg; 11078c2ecf20Sopenharmony_ci __le16 data_nf_avg; 11088c2ecf20Sopenharmony_ci __le16 bcn_rssi_last; 11098c2ecf20Sopenharmony_ci __le16 bcn_nf_last; 11108c2ecf20Sopenharmony_ci __le16 bcn_rssi_avg; 11118c2ecf20Sopenharmony_ci __le16 bcn_nf_avg; 11128c2ecf20Sopenharmony_ci long long tsf_bcn; 11138c2ecf20Sopenharmony_ci} __packed; 11148c2ecf20Sopenharmony_ci 11158c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_mac_address { 11168c2ecf20Sopenharmony_ci __le16 action; 11178c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 11188c2ecf20Sopenharmony_ci} __packed; 11198c2ecf20Sopenharmony_ci 11208c2ecf20Sopenharmony_cistruct host_cmd_ds_mac_control { 11218c2ecf20Sopenharmony_ci __le32 action; 11228c2ecf20Sopenharmony_ci}; 11238c2ecf20Sopenharmony_ci 11248c2ecf20Sopenharmony_cistruct host_cmd_ds_mac_multicast_adr { 11258c2ecf20Sopenharmony_ci __le16 action; 11268c2ecf20Sopenharmony_ci __le16 num_of_adrs; 11278c2ecf20Sopenharmony_ci u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; 11288c2ecf20Sopenharmony_ci} __packed; 11298c2ecf20Sopenharmony_ci 11308c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_deauthenticate { 11318c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 11328c2ecf20Sopenharmony_ci __le16 reason_code; 11338c2ecf20Sopenharmony_ci} __packed; 11348c2ecf20Sopenharmony_ci 11358c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_associate { 11368c2ecf20Sopenharmony_ci u8 peer_sta_addr[ETH_ALEN]; 11378c2ecf20Sopenharmony_ci __le16 cap_info_bitmap; 11388c2ecf20Sopenharmony_ci __le16 listen_interval; 11398c2ecf20Sopenharmony_ci __le16 beacon_period; 11408c2ecf20Sopenharmony_ci u8 dtim_period; 11418c2ecf20Sopenharmony_ci} __packed; 11428c2ecf20Sopenharmony_ci 11438c2ecf20Sopenharmony_cistruct ieee_types_assoc_rsp { 11448c2ecf20Sopenharmony_ci __le16 cap_info_bitmap; 11458c2ecf20Sopenharmony_ci __le16 status_code; 11468c2ecf20Sopenharmony_ci __le16 a_id; 11478c2ecf20Sopenharmony_ci u8 ie_buffer[]; 11488c2ecf20Sopenharmony_ci} __packed; 11498c2ecf20Sopenharmony_ci 11508c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_associate_rsp { 11518c2ecf20Sopenharmony_ci struct ieee_types_assoc_rsp assoc_rsp; 11528c2ecf20Sopenharmony_ci} __packed; 11538c2ecf20Sopenharmony_ci 11548c2ecf20Sopenharmony_cistruct ieee_types_cf_param_set { 11558c2ecf20Sopenharmony_ci u8 element_id; 11568c2ecf20Sopenharmony_ci u8 len; 11578c2ecf20Sopenharmony_ci u8 cfp_cnt; 11588c2ecf20Sopenharmony_ci u8 cfp_period; 11598c2ecf20Sopenharmony_ci __le16 cfp_max_duration; 11608c2ecf20Sopenharmony_ci __le16 cfp_duration_remaining; 11618c2ecf20Sopenharmony_ci} __packed; 11628c2ecf20Sopenharmony_ci 11638c2ecf20Sopenharmony_cistruct ieee_types_ibss_param_set { 11648c2ecf20Sopenharmony_ci u8 element_id; 11658c2ecf20Sopenharmony_ci u8 len; 11668c2ecf20Sopenharmony_ci __le16 atim_window; 11678c2ecf20Sopenharmony_ci} __packed; 11688c2ecf20Sopenharmony_ci 11698c2ecf20Sopenharmony_ciunion ieee_types_ss_param_set { 11708c2ecf20Sopenharmony_ci struct ieee_types_cf_param_set cf_param_set; 11718c2ecf20Sopenharmony_ci struct ieee_types_ibss_param_set ibss_param_set; 11728c2ecf20Sopenharmony_ci} __packed; 11738c2ecf20Sopenharmony_ci 11748c2ecf20Sopenharmony_cistruct ieee_types_fh_param_set { 11758c2ecf20Sopenharmony_ci u8 element_id; 11768c2ecf20Sopenharmony_ci u8 len; 11778c2ecf20Sopenharmony_ci __le16 dwell_time; 11788c2ecf20Sopenharmony_ci u8 hop_set; 11798c2ecf20Sopenharmony_ci u8 hop_pattern; 11808c2ecf20Sopenharmony_ci u8 hop_index; 11818c2ecf20Sopenharmony_ci} __packed; 11828c2ecf20Sopenharmony_ci 11838c2ecf20Sopenharmony_cistruct ieee_types_ds_param_set { 11848c2ecf20Sopenharmony_ci u8 element_id; 11858c2ecf20Sopenharmony_ci u8 len; 11868c2ecf20Sopenharmony_ci u8 current_chan; 11878c2ecf20Sopenharmony_ci} __packed; 11888c2ecf20Sopenharmony_ci 11898c2ecf20Sopenharmony_ciunion ieee_types_phy_param_set { 11908c2ecf20Sopenharmony_ci struct ieee_types_fh_param_set fh_param_set; 11918c2ecf20Sopenharmony_ci struct ieee_types_ds_param_set ds_param_set; 11928c2ecf20Sopenharmony_ci} __packed; 11938c2ecf20Sopenharmony_ci 11948c2ecf20Sopenharmony_cistruct ieee_types_oper_mode_ntf { 11958c2ecf20Sopenharmony_ci u8 element_id; 11968c2ecf20Sopenharmony_ci u8 len; 11978c2ecf20Sopenharmony_ci u8 oper_mode; 11988c2ecf20Sopenharmony_ci} __packed; 11998c2ecf20Sopenharmony_ci 12008c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_start { 12018c2ecf20Sopenharmony_ci u8 ssid[IEEE80211_MAX_SSID_LEN]; 12028c2ecf20Sopenharmony_ci u8 bss_mode; 12038c2ecf20Sopenharmony_ci __le16 beacon_period; 12048c2ecf20Sopenharmony_ci u8 dtim_period; 12058c2ecf20Sopenharmony_ci union ieee_types_ss_param_set ss_param_set; 12068c2ecf20Sopenharmony_ci union ieee_types_phy_param_set phy_param_set; 12078c2ecf20Sopenharmony_ci u16 reserved1; 12088c2ecf20Sopenharmony_ci __le16 cap_info_bitmap; 12098c2ecf20Sopenharmony_ci u8 data_rate[HOSTCMD_SUPPORTED_RATES]; 12108c2ecf20Sopenharmony_ci} __packed; 12118c2ecf20Sopenharmony_ci 12128c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_start_result { 12138c2ecf20Sopenharmony_ci u8 pad[3]; 12148c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 12158c2ecf20Sopenharmony_ci u8 pad2[2]; 12168c2ecf20Sopenharmony_ci u8 result; 12178c2ecf20Sopenharmony_ci} __packed; 12188c2ecf20Sopenharmony_ci 12198c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_join_result { 12208c2ecf20Sopenharmony_ci u8 result; 12218c2ecf20Sopenharmony_ci} __packed; 12228c2ecf20Sopenharmony_ci 12238c2ecf20Sopenharmony_cistruct adhoc_bss_desc { 12248c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 12258c2ecf20Sopenharmony_ci u8 ssid[IEEE80211_MAX_SSID_LEN]; 12268c2ecf20Sopenharmony_ci u8 bss_mode; 12278c2ecf20Sopenharmony_ci __le16 beacon_period; 12288c2ecf20Sopenharmony_ci u8 dtim_period; 12298c2ecf20Sopenharmony_ci u8 time_stamp[8]; 12308c2ecf20Sopenharmony_ci u8 local_time[8]; 12318c2ecf20Sopenharmony_ci union ieee_types_phy_param_set phy_param_set; 12328c2ecf20Sopenharmony_ci union ieee_types_ss_param_set ss_param_set; 12338c2ecf20Sopenharmony_ci __le16 cap_info_bitmap; 12348c2ecf20Sopenharmony_ci u8 data_rates[HOSTCMD_SUPPORTED_RATES]; 12358c2ecf20Sopenharmony_ci 12368c2ecf20Sopenharmony_ci /* 12378c2ecf20Sopenharmony_ci * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. 12388c2ecf20Sopenharmony_ci * It is used in the Adhoc join command and will cause a 12398c2ecf20Sopenharmony_ci * binary layout mismatch with the firmware 12408c2ecf20Sopenharmony_ci */ 12418c2ecf20Sopenharmony_ci} __packed; 12428c2ecf20Sopenharmony_ci 12438c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_join { 12448c2ecf20Sopenharmony_ci struct adhoc_bss_desc bss_descriptor; 12458c2ecf20Sopenharmony_ci u16 reserved1; 12468c2ecf20Sopenharmony_ci u16 reserved2; 12478c2ecf20Sopenharmony_ci} __packed; 12488c2ecf20Sopenharmony_ci 12498c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_get_log { 12508c2ecf20Sopenharmony_ci __le32 mcast_tx_frame; 12518c2ecf20Sopenharmony_ci __le32 failed; 12528c2ecf20Sopenharmony_ci __le32 retry; 12538c2ecf20Sopenharmony_ci __le32 multi_retry; 12548c2ecf20Sopenharmony_ci __le32 frame_dup; 12558c2ecf20Sopenharmony_ci __le32 rts_success; 12568c2ecf20Sopenharmony_ci __le32 rts_failure; 12578c2ecf20Sopenharmony_ci __le32 ack_failure; 12588c2ecf20Sopenharmony_ci __le32 rx_frag; 12598c2ecf20Sopenharmony_ci __le32 mcast_rx_frame; 12608c2ecf20Sopenharmony_ci __le32 fcs_error; 12618c2ecf20Sopenharmony_ci __le32 tx_frame; 12628c2ecf20Sopenharmony_ci __le32 reserved; 12638c2ecf20Sopenharmony_ci __le32 wep_icv_err_cnt[4]; 12648c2ecf20Sopenharmony_ci __le32 bcn_rcv_cnt; 12658c2ecf20Sopenharmony_ci __le32 bcn_miss_cnt; 12668c2ecf20Sopenharmony_ci} __packed; 12678c2ecf20Sopenharmony_ci 12688c2ecf20Sopenharmony_ci/* Enumeration for rate format */ 12698c2ecf20Sopenharmony_cienum _mwifiex_rate_format { 12708c2ecf20Sopenharmony_ci MWIFIEX_RATE_FORMAT_LG = 0, 12718c2ecf20Sopenharmony_ci MWIFIEX_RATE_FORMAT_HT, 12728c2ecf20Sopenharmony_ci MWIFIEX_RATE_FORMAT_VHT, 12738c2ecf20Sopenharmony_ci MWIFIEX_RATE_FORMAT_AUTO = 0xFF, 12748c2ecf20Sopenharmony_ci}; 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_cistruct host_cmd_ds_tx_rate_query { 12778c2ecf20Sopenharmony_ci u8 tx_rate; 12788c2ecf20Sopenharmony_ci /* Tx Rate Info: For 802.11 AC cards 12798c2ecf20Sopenharmony_ci * 12808c2ecf20Sopenharmony_ci * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 12818c2ecf20Sopenharmony_ci * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 12828c2ecf20Sopenharmony_ci * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 12838c2ecf20Sopenharmony_ci * 12848c2ecf20Sopenharmony_ci * For non-802.11 AC cards 12858c2ecf20Sopenharmony_ci * Ht Info [Bit 0] RxRate format: LG=0, HT=1 12868c2ecf20Sopenharmony_ci * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 12878c2ecf20Sopenharmony_ci * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 12888c2ecf20Sopenharmony_ci */ 12898c2ecf20Sopenharmony_ci u8 ht_info; 12908c2ecf20Sopenharmony_ci} __packed; 12918c2ecf20Sopenharmony_ci 12928c2ecf20Sopenharmony_cistruct mwifiex_tx_pause_tlv { 12938c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 12948c2ecf20Sopenharmony_ci u8 peermac[ETH_ALEN]; 12958c2ecf20Sopenharmony_ci u8 tx_pause; 12968c2ecf20Sopenharmony_ci u8 pkt_cnt; 12978c2ecf20Sopenharmony_ci} __packed; 12988c2ecf20Sopenharmony_ci 12998c2ecf20Sopenharmony_cienum Host_Sleep_Action { 13008c2ecf20Sopenharmony_ci HS_CONFIGURE = 0x0001, 13018c2ecf20Sopenharmony_ci HS_ACTIVATE = 0x0002, 13028c2ecf20Sopenharmony_ci}; 13038c2ecf20Sopenharmony_ci 13048c2ecf20Sopenharmony_cistruct mwifiex_hs_config_param { 13058c2ecf20Sopenharmony_ci __le32 conditions; 13068c2ecf20Sopenharmony_ci u8 gpio; 13078c2ecf20Sopenharmony_ci u8 gap; 13088c2ecf20Sopenharmony_ci} __packed; 13098c2ecf20Sopenharmony_ci 13108c2ecf20Sopenharmony_cistruct hs_activate_param { 13118c2ecf20Sopenharmony_ci __le16 resp_ctrl; 13128c2ecf20Sopenharmony_ci} __packed; 13138c2ecf20Sopenharmony_ci 13148c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_hs_cfg_enh { 13158c2ecf20Sopenharmony_ci __le16 action; 13168c2ecf20Sopenharmony_ci 13178c2ecf20Sopenharmony_ci union { 13188c2ecf20Sopenharmony_ci struct mwifiex_hs_config_param hs_config; 13198c2ecf20Sopenharmony_ci struct hs_activate_param hs_activate; 13208c2ecf20Sopenharmony_ci } params; 13218c2ecf20Sopenharmony_ci} __packed; 13228c2ecf20Sopenharmony_ci 13238c2ecf20Sopenharmony_cienum SNMP_MIB_INDEX { 13248c2ecf20Sopenharmony_ci OP_RATE_SET_I = 1, 13258c2ecf20Sopenharmony_ci DTIM_PERIOD_I = 3, 13268c2ecf20Sopenharmony_ci RTS_THRESH_I = 5, 13278c2ecf20Sopenharmony_ci SHORT_RETRY_LIM_I = 6, 13288c2ecf20Sopenharmony_ci LONG_RETRY_LIM_I = 7, 13298c2ecf20Sopenharmony_ci FRAG_THRESH_I = 8, 13308c2ecf20Sopenharmony_ci DOT11D_I = 9, 13318c2ecf20Sopenharmony_ci DOT11H_I = 10, 13328c2ecf20Sopenharmony_ci}; 13338c2ecf20Sopenharmony_ci 13348c2ecf20Sopenharmony_cienum mwifiex_assocmd_failurepoint { 13358c2ecf20Sopenharmony_ci MWIFIEX_ASSOC_CMD_SUCCESS = 0, 13368c2ecf20Sopenharmony_ci MWIFIEX_ASSOC_CMD_FAILURE_ASSOC, 13378c2ecf20Sopenharmony_ci MWIFIEX_ASSOC_CMD_FAILURE_AUTH, 13388c2ecf20Sopenharmony_ci MWIFIEX_ASSOC_CMD_FAILURE_JOIN 13398c2ecf20Sopenharmony_ci}; 13408c2ecf20Sopenharmony_ci 13418c2ecf20Sopenharmony_ci#define MAX_SNMP_BUF_SIZE 128 13428c2ecf20Sopenharmony_ci 13438c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_snmp_mib { 13448c2ecf20Sopenharmony_ci __le16 query_type; 13458c2ecf20Sopenharmony_ci __le16 oid; 13468c2ecf20Sopenharmony_ci __le16 buf_size; 13478c2ecf20Sopenharmony_ci u8 value[1]; 13488c2ecf20Sopenharmony_ci} __packed; 13498c2ecf20Sopenharmony_ci 13508c2ecf20Sopenharmony_cistruct mwifiex_rate_scope { 13518c2ecf20Sopenharmony_ci __le16 type; 13528c2ecf20Sopenharmony_ci __le16 length; 13538c2ecf20Sopenharmony_ci __le16 hr_dsss_rate_bitmap; 13548c2ecf20Sopenharmony_ci __le16 ofdm_rate_bitmap; 13558c2ecf20Sopenharmony_ci __le16 ht_mcs_rate_bitmap[8]; 13568c2ecf20Sopenharmony_ci __le16 vht_mcs_rate_bitmap[8]; 13578c2ecf20Sopenharmony_ci} __packed; 13588c2ecf20Sopenharmony_ci 13598c2ecf20Sopenharmony_cistruct mwifiex_rate_drop_pattern { 13608c2ecf20Sopenharmony_ci __le16 type; 13618c2ecf20Sopenharmony_ci __le16 length; 13628c2ecf20Sopenharmony_ci __le32 rate_drop_mode; 13638c2ecf20Sopenharmony_ci} __packed; 13648c2ecf20Sopenharmony_ci 13658c2ecf20Sopenharmony_cistruct host_cmd_ds_tx_rate_cfg { 13668c2ecf20Sopenharmony_ci __le16 action; 13678c2ecf20Sopenharmony_ci __le16 cfg_index; 13688c2ecf20Sopenharmony_ci} __packed; 13698c2ecf20Sopenharmony_ci 13708c2ecf20Sopenharmony_cistruct mwifiex_power_group { 13718c2ecf20Sopenharmony_ci u8 modulation_class; 13728c2ecf20Sopenharmony_ci u8 first_rate_code; 13738c2ecf20Sopenharmony_ci u8 last_rate_code; 13748c2ecf20Sopenharmony_ci s8 power_step; 13758c2ecf20Sopenharmony_ci s8 power_min; 13768c2ecf20Sopenharmony_ci s8 power_max; 13778c2ecf20Sopenharmony_ci u8 ht_bandwidth; 13788c2ecf20Sopenharmony_ci u8 reserved; 13798c2ecf20Sopenharmony_ci} __packed; 13808c2ecf20Sopenharmony_ci 13818c2ecf20Sopenharmony_cistruct mwifiex_types_power_group { 13828c2ecf20Sopenharmony_ci __le16 type; 13838c2ecf20Sopenharmony_ci __le16 length; 13848c2ecf20Sopenharmony_ci} __packed; 13858c2ecf20Sopenharmony_ci 13868c2ecf20Sopenharmony_cistruct host_cmd_ds_txpwr_cfg { 13878c2ecf20Sopenharmony_ci __le16 action; 13888c2ecf20Sopenharmony_ci __le16 cfg_index; 13898c2ecf20Sopenharmony_ci __le32 mode; 13908c2ecf20Sopenharmony_ci} __packed; 13918c2ecf20Sopenharmony_ci 13928c2ecf20Sopenharmony_cistruct host_cmd_ds_rf_tx_pwr { 13938c2ecf20Sopenharmony_ci __le16 action; 13948c2ecf20Sopenharmony_ci __le16 cur_level; 13958c2ecf20Sopenharmony_ci u8 max_power; 13968c2ecf20Sopenharmony_ci u8 min_power; 13978c2ecf20Sopenharmony_ci} __packed; 13988c2ecf20Sopenharmony_ci 13998c2ecf20Sopenharmony_cistruct host_cmd_ds_rf_ant_mimo { 14008c2ecf20Sopenharmony_ci __le16 action_tx; 14018c2ecf20Sopenharmony_ci __le16 tx_ant_mode; 14028c2ecf20Sopenharmony_ci __le16 action_rx; 14038c2ecf20Sopenharmony_ci __le16 rx_ant_mode; 14048c2ecf20Sopenharmony_ci} __packed; 14058c2ecf20Sopenharmony_ci 14068c2ecf20Sopenharmony_cistruct host_cmd_ds_rf_ant_siso { 14078c2ecf20Sopenharmony_ci __le16 action; 14088c2ecf20Sopenharmony_ci __le16 ant_mode; 14098c2ecf20Sopenharmony_ci} __packed; 14108c2ecf20Sopenharmony_ci 14118c2ecf20Sopenharmony_cistruct host_cmd_ds_tdls_oper { 14128c2ecf20Sopenharmony_ci __le16 tdls_action; 14138c2ecf20Sopenharmony_ci __le16 reason; 14148c2ecf20Sopenharmony_ci u8 peer_mac[ETH_ALEN]; 14158c2ecf20Sopenharmony_ci} __packed; 14168c2ecf20Sopenharmony_ci 14178c2ecf20Sopenharmony_cistruct mwifiex_tdls_config { 14188c2ecf20Sopenharmony_ci __le16 enable; 14198c2ecf20Sopenharmony_ci} __packed; 14208c2ecf20Sopenharmony_ci 14218c2ecf20Sopenharmony_cistruct mwifiex_tdls_config_cs_params { 14228c2ecf20Sopenharmony_ci u8 unit_time; 14238c2ecf20Sopenharmony_ci u8 thr_otherlink; 14248c2ecf20Sopenharmony_ci u8 thr_directlink; 14258c2ecf20Sopenharmony_ci} __packed; 14268c2ecf20Sopenharmony_ci 14278c2ecf20Sopenharmony_cistruct mwifiex_tdls_init_cs_params { 14288c2ecf20Sopenharmony_ci u8 peer_mac[ETH_ALEN]; 14298c2ecf20Sopenharmony_ci u8 primary_chan; 14308c2ecf20Sopenharmony_ci u8 second_chan_offset; 14318c2ecf20Sopenharmony_ci u8 band; 14328c2ecf20Sopenharmony_ci __le16 switch_time; 14338c2ecf20Sopenharmony_ci __le16 switch_timeout; 14348c2ecf20Sopenharmony_ci u8 reg_class; 14358c2ecf20Sopenharmony_ci u8 periodicity; 14368c2ecf20Sopenharmony_ci} __packed; 14378c2ecf20Sopenharmony_ci 14388c2ecf20Sopenharmony_cistruct mwifiex_tdls_stop_cs_params { 14398c2ecf20Sopenharmony_ci u8 peer_mac[ETH_ALEN]; 14408c2ecf20Sopenharmony_ci} __packed; 14418c2ecf20Sopenharmony_ci 14428c2ecf20Sopenharmony_cistruct host_cmd_ds_tdls_config { 14438c2ecf20Sopenharmony_ci __le16 tdls_action; 14448c2ecf20Sopenharmony_ci u8 tdls_data[1]; 14458c2ecf20Sopenharmony_ci} __packed; 14468c2ecf20Sopenharmony_ci 14478c2ecf20Sopenharmony_cistruct mwifiex_chan_desc { 14488c2ecf20Sopenharmony_ci __le16 start_freq; 14498c2ecf20Sopenharmony_ci u8 chan_width; 14508c2ecf20Sopenharmony_ci u8 chan_num; 14518c2ecf20Sopenharmony_ci} __packed; 14528c2ecf20Sopenharmony_ci 14538c2ecf20Sopenharmony_cistruct host_cmd_ds_chan_rpt_req { 14548c2ecf20Sopenharmony_ci struct mwifiex_chan_desc chan_desc; 14558c2ecf20Sopenharmony_ci __le32 msec_dwell_time; 14568c2ecf20Sopenharmony_ci} __packed; 14578c2ecf20Sopenharmony_ci 14588c2ecf20Sopenharmony_cistruct host_cmd_ds_chan_rpt_event { 14598c2ecf20Sopenharmony_ci __le32 result; 14608c2ecf20Sopenharmony_ci __le64 start_tsf; 14618c2ecf20Sopenharmony_ci __le32 duration; 14628c2ecf20Sopenharmony_ci u8 tlvbuf[]; 14638c2ecf20Sopenharmony_ci} __packed; 14648c2ecf20Sopenharmony_ci 14658c2ecf20Sopenharmony_cistruct host_cmd_sdio_sp_rx_aggr_cfg { 14668c2ecf20Sopenharmony_ci u8 action; 14678c2ecf20Sopenharmony_ci u8 enable; 14688c2ecf20Sopenharmony_ci __le16 block_size; 14698c2ecf20Sopenharmony_ci} __packed; 14708c2ecf20Sopenharmony_ci 14718c2ecf20Sopenharmony_cistruct mwifiex_fixed_bcn_param { 14728c2ecf20Sopenharmony_ci __le64 timestamp; 14738c2ecf20Sopenharmony_ci __le16 beacon_period; 14748c2ecf20Sopenharmony_ci __le16 cap_info_bitmap; 14758c2ecf20Sopenharmony_ci} __packed; 14768c2ecf20Sopenharmony_ci 14778c2ecf20Sopenharmony_cistruct mwifiex_event_scan_result { 14788c2ecf20Sopenharmony_ci __le16 event_id; 14798c2ecf20Sopenharmony_ci u8 bss_index; 14808c2ecf20Sopenharmony_ci u8 bss_type; 14818c2ecf20Sopenharmony_ci u8 more_event; 14828c2ecf20Sopenharmony_ci u8 reserved[3]; 14838c2ecf20Sopenharmony_ci __le16 buf_size; 14848c2ecf20Sopenharmony_ci u8 num_of_set; 14858c2ecf20Sopenharmony_ci} __packed; 14868c2ecf20Sopenharmony_ci 14878c2ecf20Sopenharmony_cistruct tx_status_event { 14888c2ecf20Sopenharmony_ci u8 packet_type; 14898c2ecf20Sopenharmony_ci u8 tx_token_id; 14908c2ecf20Sopenharmony_ci u8 status; 14918c2ecf20Sopenharmony_ci} __packed; 14928c2ecf20Sopenharmony_ci 14938c2ecf20Sopenharmony_ci#define MWIFIEX_USER_SCAN_CHAN_MAX 50 14948c2ecf20Sopenharmony_ci 14958c2ecf20Sopenharmony_ci#define MWIFIEX_MAX_SSID_LIST_LENGTH 10 14968c2ecf20Sopenharmony_ci 14978c2ecf20Sopenharmony_cistruct mwifiex_scan_cmd_config { 14988c2ecf20Sopenharmony_ci /* 14998c2ecf20Sopenharmony_ci * BSS mode to be sent in the firmware command 15008c2ecf20Sopenharmony_ci */ 15018c2ecf20Sopenharmony_ci u8 bss_mode; 15028c2ecf20Sopenharmony_ci 15038c2ecf20Sopenharmony_ci /* Specific BSSID used to filter scan results in the firmware */ 15048c2ecf20Sopenharmony_ci u8 specific_bssid[ETH_ALEN]; 15058c2ecf20Sopenharmony_ci 15068c2ecf20Sopenharmony_ci /* Length of TLVs sent in command starting at tlvBuffer */ 15078c2ecf20Sopenharmony_ci u32 tlv_buf_len; 15088c2ecf20Sopenharmony_ci 15098c2ecf20Sopenharmony_ci /* 15108c2ecf20Sopenharmony_ci * SSID TLV(s) and ChanList TLVs to be sent in the firmware command 15118c2ecf20Sopenharmony_ci * 15128c2ecf20Sopenharmony_ci * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set 15138c2ecf20Sopenharmony_ci * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set 15148c2ecf20Sopenharmony_ci */ 15158c2ecf20Sopenharmony_ci u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored 15168c2ecf20Sopenharmony_ci here */ 15178c2ecf20Sopenharmony_ci} __packed; 15188c2ecf20Sopenharmony_ci 15198c2ecf20Sopenharmony_cistruct mwifiex_user_scan_chan { 15208c2ecf20Sopenharmony_ci u8 chan_number; 15218c2ecf20Sopenharmony_ci u8 radio_type; 15228c2ecf20Sopenharmony_ci u8 scan_type; 15238c2ecf20Sopenharmony_ci u8 reserved; 15248c2ecf20Sopenharmony_ci u32 scan_time; 15258c2ecf20Sopenharmony_ci} __packed; 15268c2ecf20Sopenharmony_ci 15278c2ecf20Sopenharmony_cistruct mwifiex_user_scan_cfg { 15288c2ecf20Sopenharmony_ci /* 15298c2ecf20Sopenharmony_ci * BSS mode to be sent in the firmware command 15308c2ecf20Sopenharmony_ci */ 15318c2ecf20Sopenharmony_ci u8 bss_mode; 15328c2ecf20Sopenharmony_ci /* Configure the number of probe requests for active chan scans */ 15338c2ecf20Sopenharmony_ci u8 num_probes; 15348c2ecf20Sopenharmony_ci u8 reserved; 15358c2ecf20Sopenharmony_ci /* BSSID filter sent in the firmware command to limit the results */ 15368c2ecf20Sopenharmony_ci u8 specific_bssid[ETH_ALEN]; 15378c2ecf20Sopenharmony_ci /* SSID filter list used in the firmware to limit the scan results */ 15388c2ecf20Sopenharmony_ci struct cfg80211_ssid *ssid_list; 15398c2ecf20Sopenharmony_ci u8 num_ssids; 15408c2ecf20Sopenharmony_ci /* Variable number (fixed maximum) of channels to scan up */ 15418c2ecf20Sopenharmony_ci struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX]; 15428c2ecf20Sopenharmony_ci u16 scan_chan_gap; 15438c2ecf20Sopenharmony_ci u8 random_mac[ETH_ALEN]; 15448c2ecf20Sopenharmony_ci} __packed; 15458c2ecf20Sopenharmony_ci 15468c2ecf20Sopenharmony_ci#define MWIFIEX_BG_SCAN_CHAN_MAX 38 15478c2ecf20Sopenharmony_ci#define MWIFIEX_BSS_MODE_INFRA 1 15488c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_GET 0x0000 15498c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_SET 0x0001 15508c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01 15518c2ecf20Sopenharmony_ci/** ssid match */ 15528c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_SSID_MATCH 0x0001 15538c2ecf20Sopenharmony_ci/** ssid match and RSSI exceeded */ 15548c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_SSID_RSSI_MATCH 0x0004 15558c2ecf20Sopenharmony_ci/**wait for all channel scan to complete to report scan result*/ 15568c2ecf20Sopenharmony_ci#define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE 0x80000000 15578c2ecf20Sopenharmony_ci 15588c2ecf20Sopenharmony_cistruct mwifiex_bg_scan_cfg { 15598c2ecf20Sopenharmony_ci u16 action; 15608c2ecf20Sopenharmony_ci u8 enable; 15618c2ecf20Sopenharmony_ci u8 bss_type; 15628c2ecf20Sopenharmony_ci u8 chan_per_scan; 15638c2ecf20Sopenharmony_ci u32 scan_interval; 15648c2ecf20Sopenharmony_ci u32 report_condition; 15658c2ecf20Sopenharmony_ci u8 num_probes; 15668c2ecf20Sopenharmony_ci u8 rssi_threshold; 15678c2ecf20Sopenharmony_ci u8 snr_threshold; 15688c2ecf20Sopenharmony_ci u16 repeat_count; 15698c2ecf20Sopenharmony_ci u16 start_later; 15708c2ecf20Sopenharmony_ci struct cfg80211_match_set *ssid_list; 15718c2ecf20Sopenharmony_ci u8 num_ssids; 15728c2ecf20Sopenharmony_ci struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX]; 15738c2ecf20Sopenharmony_ci u16 scan_chan_gap; 15748c2ecf20Sopenharmony_ci} __packed; 15758c2ecf20Sopenharmony_ci 15768c2ecf20Sopenharmony_cistruct ie_body { 15778c2ecf20Sopenharmony_ci u8 grp_key_oui[4]; 15788c2ecf20Sopenharmony_ci u8 ptk_cnt[2]; 15798c2ecf20Sopenharmony_ci u8 ptk_body[4]; 15808c2ecf20Sopenharmony_ci} __packed; 15818c2ecf20Sopenharmony_ci 15828c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_scan { 15838c2ecf20Sopenharmony_ci u8 bss_mode; 15848c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 15858c2ecf20Sopenharmony_ci u8 tlv_buffer[1]; 15868c2ecf20Sopenharmony_ci} __packed; 15878c2ecf20Sopenharmony_ci 15888c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_scan_rsp { 15898c2ecf20Sopenharmony_ci __le16 bss_descript_size; 15908c2ecf20Sopenharmony_ci u8 number_of_sets; 15918c2ecf20Sopenharmony_ci u8 bss_desc_and_tlv_buffer[1]; 15928c2ecf20Sopenharmony_ci} __packed; 15938c2ecf20Sopenharmony_ci 15948c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_scan_ext { 15958c2ecf20Sopenharmony_ci u32 reserved; 15968c2ecf20Sopenharmony_ci u8 tlv_buffer[1]; 15978c2ecf20Sopenharmony_ci} __packed; 15988c2ecf20Sopenharmony_ci 15998c2ecf20Sopenharmony_cistruct mwifiex_ie_types_bss_mode { 16008c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 16018c2ecf20Sopenharmony_ci u8 bss_mode; 16028c2ecf20Sopenharmony_ci} __packed; 16038c2ecf20Sopenharmony_ci 16048c2ecf20Sopenharmony_cistruct mwifiex_ie_types_bss_scan_rsp { 16058c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 16068c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 16078c2ecf20Sopenharmony_ci u8 frame_body[1]; 16088c2ecf20Sopenharmony_ci} __packed; 16098c2ecf20Sopenharmony_ci 16108c2ecf20Sopenharmony_cistruct mwifiex_ie_types_bss_scan_info { 16118c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 16128c2ecf20Sopenharmony_ci __le16 rssi; 16138c2ecf20Sopenharmony_ci __le16 anpi; 16148c2ecf20Sopenharmony_ci u8 cca_busy_fraction; 16158c2ecf20Sopenharmony_ci u8 radio_type; 16168c2ecf20Sopenharmony_ci u8 channel; 16178c2ecf20Sopenharmony_ci u8 reserved; 16188c2ecf20Sopenharmony_ci __le64 tsf; 16198c2ecf20Sopenharmony_ci} __packed; 16208c2ecf20Sopenharmony_ci 16218c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_config { 16228c2ecf20Sopenharmony_ci __le16 action; 16238c2ecf20Sopenharmony_ci u8 enable; 16248c2ecf20Sopenharmony_ci u8 bss_type; 16258c2ecf20Sopenharmony_ci u8 chan_per_scan; 16268c2ecf20Sopenharmony_ci u8 reserved; 16278c2ecf20Sopenharmony_ci __le16 reserved1; 16288c2ecf20Sopenharmony_ci __le32 scan_interval; 16298c2ecf20Sopenharmony_ci __le32 reserved2; 16308c2ecf20Sopenharmony_ci __le32 report_condition; 16318c2ecf20Sopenharmony_ci __le16 reserved3; 16328c2ecf20Sopenharmony_ci u8 tlv[]; 16338c2ecf20Sopenharmony_ci} __packed; 16348c2ecf20Sopenharmony_ci 16358c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_query { 16368c2ecf20Sopenharmony_ci u8 flush; 16378c2ecf20Sopenharmony_ci} __packed; 16388c2ecf20Sopenharmony_ci 16398c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_query_rsp { 16408c2ecf20Sopenharmony_ci __le32 report_condition; 16418c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_scan_rsp scan_resp; 16428c2ecf20Sopenharmony_ci} __packed; 16438c2ecf20Sopenharmony_ci 16448c2ecf20Sopenharmony_cistruct mwifiex_ietypes_domain_param_set { 16458c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 16468c2ecf20Sopenharmony_ci u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; 16478c2ecf20Sopenharmony_ci struct ieee80211_country_ie_triplet triplet[1]; 16488c2ecf20Sopenharmony_ci} __packed; 16498c2ecf20Sopenharmony_ci 16508c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11d_domain_info { 16518c2ecf20Sopenharmony_ci __le16 action; 16528c2ecf20Sopenharmony_ci struct mwifiex_ietypes_domain_param_set domain; 16538c2ecf20Sopenharmony_ci} __packed; 16548c2ecf20Sopenharmony_ci 16558c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11d_domain_info_rsp { 16568c2ecf20Sopenharmony_ci __le16 action; 16578c2ecf20Sopenharmony_ci struct mwifiex_ietypes_domain_param_set domain; 16588c2ecf20Sopenharmony_ci} __packed; 16598c2ecf20Sopenharmony_ci 16608c2ecf20Sopenharmony_cistruct host_cmd_ds_11n_addba_req { 16618c2ecf20Sopenharmony_ci u8 add_req_result; 16628c2ecf20Sopenharmony_ci u8 peer_mac_addr[ETH_ALEN]; 16638c2ecf20Sopenharmony_ci u8 dialog_token; 16648c2ecf20Sopenharmony_ci __le16 block_ack_param_set; 16658c2ecf20Sopenharmony_ci __le16 block_ack_tmo; 16668c2ecf20Sopenharmony_ci __le16 ssn; 16678c2ecf20Sopenharmony_ci} __packed; 16688c2ecf20Sopenharmony_ci 16698c2ecf20Sopenharmony_cistruct host_cmd_ds_11n_addba_rsp { 16708c2ecf20Sopenharmony_ci u8 add_rsp_result; 16718c2ecf20Sopenharmony_ci u8 peer_mac_addr[ETH_ALEN]; 16728c2ecf20Sopenharmony_ci u8 dialog_token; 16738c2ecf20Sopenharmony_ci __le16 status_code; 16748c2ecf20Sopenharmony_ci __le16 block_ack_param_set; 16758c2ecf20Sopenharmony_ci __le16 block_ack_tmo; 16768c2ecf20Sopenharmony_ci __le16 ssn; 16778c2ecf20Sopenharmony_ci} __packed; 16788c2ecf20Sopenharmony_ci 16798c2ecf20Sopenharmony_cistruct host_cmd_ds_11n_delba { 16808c2ecf20Sopenharmony_ci u8 del_result; 16818c2ecf20Sopenharmony_ci u8 peer_mac_addr[ETH_ALEN]; 16828c2ecf20Sopenharmony_ci __le16 del_ba_param_set; 16838c2ecf20Sopenharmony_ci __le16 reason_code; 16848c2ecf20Sopenharmony_ci u8 reserved; 16858c2ecf20Sopenharmony_ci} __packed; 16868c2ecf20Sopenharmony_ci 16878c2ecf20Sopenharmony_cistruct host_cmd_ds_11n_batimeout { 16888c2ecf20Sopenharmony_ci u8 tid; 16898c2ecf20Sopenharmony_ci u8 peer_mac_addr[ETH_ALEN]; 16908c2ecf20Sopenharmony_ci u8 origninator; 16918c2ecf20Sopenharmony_ci} __packed; 16928c2ecf20Sopenharmony_ci 16938c2ecf20Sopenharmony_cistruct host_cmd_ds_11n_cfg { 16948c2ecf20Sopenharmony_ci __le16 action; 16958c2ecf20Sopenharmony_ci __le16 ht_tx_cap; 16968c2ecf20Sopenharmony_ci __le16 ht_tx_info; 16978c2ecf20Sopenharmony_ci __le16 misc_config; /* Needed for 802.11AC cards only */ 16988c2ecf20Sopenharmony_ci} __packed; 16998c2ecf20Sopenharmony_ci 17008c2ecf20Sopenharmony_cistruct host_cmd_ds_txbuf_cfg { 17018c2ecf20Sopenharmony_ci __le16 action; 17028c2ecf20Sopenharmony_ci __le16 buff_size; 17038c2ecf20Sopenharmony_ci __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ 17048c2ecf20Sopenharmony_ci __le16 reserved3; 17058c2ecf20Sopenharmony_ci} __packed; 17068c2ecf20Sopenharmony_ci 17078c2ecf20Sopenharmony_cistruct host_cmd_ds_amsdu_aggr_ctrl { 17088c2ecf20Sopenharmony_ci __le16 action; 17098c2ecf20Sopenharmony_ci __le16 enable; 17108c2ecf20Sopenharmony_ci __le16 curr_buf_size; 17118c2ecf20Sopenharmony_ci} __packed; 17128c2ecf20Sopenharmony_ci 17138c2ecf20Sopenharmony_cistruct host_cmd_ds_sta_deauth { 17148c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 17158c2ecf20Sopenharmony_ci __le16 reason; 17168c2ecf20Sopenharmony_ci} __packed; 17178c2ecf20Sopenharmony_ci 17188c2ecf20Sopenharmony_cistruct mwifiex_ie_types_sta_info { 17198c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17208c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 17218c2ecf20Sopenharmony_ci u8 power_mfg_status; 17228c2ecf20Sopenharmony_ci s8 rssi; 17238c2ecf20Sopenharmony_ci}; 17248c2ecf20Sopenharmony_ci 17258c2ecf20Sopenharmony_cistruct host_cmd_ds_sta_list { 17268c2ecf20Sopenharmony_ci __le16 sta_count; 17278c2ecf20Sopenharmony_ci u8 tlv[]; 17288c2ecf20Sopenharmony_ci} __packed; 17298c2ecf20Sopenharmony_ci 17308c2ecf20Sopenharmony_cistruct mwifiex_ie_types_pwr_capability { 17318c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17328c2ecf20Sopenharmony_ci s8 min_pwr; 17338c2ecf20Sopenharmony_ci s8 max_pwr; 17348c2ecf20Sopenharmony_ci}; 17358c2ecf20Sopenharmony_ci 17368c2ecf20Sopenharmony_cistruct mwifiex_ie_types_local_pwr_constraint { 17378c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17388c2ecf20Sopenharmony_ci u8 chan; 17398c2ecf20Sopenharmony_ci u8 constraint; 17408c2ecf20Sopenharmony_ci}; 17418c2ecf20Sopenharmony_ci 17428c2ecf20Sopenharmony_cistruct mwifiex_ie_types_wmm_param_set { 17438c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17448c2ecf20Sopenharmony_ci u8 wmm_ie[1]; 17458c2ecf20Sopenharmony_ci} __packed; 17468c2ecf20Sopenharmony_ci 17478c2ecf20Sopenharmony_cistruct mwifiex_ie_types_mgmt_frame { 17488c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17498c2ecf20Sopenharmony_ci __le16 frame_control; 17508c2ecf20Sopenharmony_ci u8 frame_contents[]; 17518c2ecf20Sopenharmony_ci}; 17528c2ecf20Sopenharmony_ci 17538c2ecf20Sopenharmony_cistruct mwifiex_ie_types_wmm_queue_status { 17548c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 17558c2ecf20Sopenharmony_ci u8 queue_index; 17568c2ecf20Sopenharmony_ci u8 disabled; 17578c2ecf20Sopenharmony_ci __le16 medium_time; 17588c2ecf20Sopenharmony_ci u8 flow_required; 17598c2ecf20Sopenharmony_ci u8 flow_created; 17608c2ecf20Sopenharmony_ci u32 reserved; 17618c2ecf20Sopenharmony_ci}; 17628c2ecf20Sopenharmony_ci 17638c2ecf20Sopenharmony_cistruct ieee_types_vendor_header { 17648c2ecf20Sopenharmony_ci u8 element_id; 17658c2ecf20Sopenharmony_ci u8 len; 17668c2ecf20Sopenharmony_ci struct { 17678c2ecf20Sopenharmony_ci u8 oui[3]; 17688c2ecf20Sopenharmony_ci u8 oui_type; 17698c2ecf20Sopenharmony_ci } __packed oui; 17708c2ecf20Sopenharmony_ci} __packed; 17718c2ecf20Sopenharmony_ci 17728c2ecf20Sopenharmony_cistruct ieee_types_wmm_parameter { 17738c2ecf20Sopenharmony_ci /* 17748c2ecf20Sopenharmony_ci * WMM Parameter IE - Vendor Specific Header: 17758c2ecf20Sopenharmony_ci * element_id [221/0xdd] 17768c2ecf20Sopenharmony_ci * Len [24] 17778c2ecf20Sopenharmony_ci * Oui [00:50:f2] 17788c2ecf20Sopenharmony_ci * OuiType [2] 17798c2ecf20Sopenharmony_ci * OuiSubType [1] 17808c2ecf20Sopenharmony_ci * Version [1] 17818c2ecf20Sopenharmony_ci */ 17828c2ecf20Sopenharmony_ci struct ieee_types_vendor_header vend_hdr; 17838c2ecf20Sopenharmony_ci u8 oui_subtype; 17848c2ecf20Sopenharmony_ci u8 version; 17858c2ecf20Sopenharmony_ci 17868c2ecf20Sopenharmony_ci u8 qos_info_bitmap; 17878c2ecf20Sopenharmony_ci u8 reserved; 17888c2ecf20Sopenharmony_ci struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS]; 17898c2ecf20Sopenharmony_ci} __packed; 17908c2ecf20Sopenharmony_ci 17918c2ecf20Sopenharmony_cistruct ieee_types_wmm_info { 17928c2ecf20Sopenharmony_ci 17938c2ecf20Sopenharmony_ci /* 17948c2ecf20Sopenharmony_ci * WMM Info IE - Vendor Specific Header: 17958c2ecf20Sopenharmony_ci * element_id [221/0xdd] 17968c2ecf20Sopenharmony_ci * Len [7] 17978c2ecf20Sopenharmony_ci * Oui [00:50:f2] 17988c2ecf20Sopenharmony_ci * OuiType [2] 17998c2ecf20Sopenharmony_ci * OuiSubType [0] 18008c2ecf20Sopenharmony_ci * Version [1] 18018c2ecf20Sopenharmony_ci */ 18028c2ecf20Sopenharmony_ci struct ieee_types_vendor_header vend_hdr; 18038c2ecf20Sopenharmony_ci u8 oui_subtype; 18048c2ecf20Sopenharmony_ci u8 version; 18058c2ecf20Sopenharmony_ci 18068c2ecf20Sopenharmony_ci u8 qos_info_bitmap; 18078c2ecf20Sopenharmony_ci} __packed; 18088c2ecf20Sopenharmony_ci 18098c2ecf20Sopenharmony_cistruct host_cmd_ds_wmm_get_status { 18108c2ecf20Sopenharmony_ci u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) * 18118c2ecf20Sopenharmony_ci IEEE80211_NUM_ACS]; 18128c2ecf20Sopenharmony_ci u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2]; 18138c2ecf20Sopenharmony_ci} __packed; 18148c2ecf20Sopenharmony_ci 18158c2ecf20Sopenharmony_cistruct mwifiex_wmm_ac_status { 18168c2ecf20Sopenharmony_ci u8 disabled; 18178c2ecf20Sopenharmony_ci u8 flow_required; 18188c2ecf20Sopenharmony_ci u8 flow_created; 18198c2ecf20Sopenharmony_ci}; 18208c2ecf20Sopenharmony_ci 18218c2ecf20Sopenharmony_cistruct mwifiex_ie_types_htcap { 18228c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18238c2ecf20Sopenharmony_ci struct ieee80211_ht_cap ht_cap; 18248c2ecf20Sopenharmony_ci} __packed; 18258c2ecf20Sopenharmony_ci 18268c2ecf20Sopenharmony_cistruct mwifiex_ie_types_vhtcap { 18278c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18288c2ecf20Sopenharmony_ci struct ieee80211_vht_cap vht_cap; 18298c2ecf20Sopenharmony_ci} __packed; 18308c2ecf20Sopenharmony_ci 18318c2ecf20Sopenharmony_cistruct mwifiex_ie_types_aid { 18328c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18338c2ecf20Sopenharmony_ci __le16 aid; 18348c2ecf20Sopenharmony_ci} __packed; 18358c2ecf20Sopenharmony_ci 18368c2ecf20Sopenharmony_cistruct mwifiex_ie_types_oper_mode_ntf { 18378c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18388c2ecf20Sopenharmony_ci u8 oper_mode; 18398c2ecf20Sopenharmony_ci} __packed; 18408c2ecf20Sopenharmony_ci 18418c2ecf20Sopenharmony_ci/* VHT Operations IE */ 18428c2ecf20Sopenharmony_cistruct mwifiex_ie_types_vht_oper { 18438c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18448c2ecf20Sopenharmony_ci u8 chan_width; 18458c2ecf20Sopenharmony_ci u8 chan_center_freq_1; 18468c2ecf20Sopenharmony_ci u8 chan_center_freq_2; 18478c2ecf20Sopenharmony_ci /* Basic MCS set map, each 2 bits stands for a NSS */ 18488c2ecf20Sopenharmony_ci __le16 basic_mcs_map; 18498c2ecf20Sopenharmony_ci} __packed; 18508c2ecf20Sopenharmony_ci 18518c2ecf20Sopenharmony_cistruct mwifiex_ie_types_wmmcap { 18528c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18538c2ecf20Sopenharmony_ci struct mwifiex_types_wmm_info wmm_info; 18548c2ecf20Sopenharmony_ci} __packed; 18558c2ecf20Sopenharmony_ci 18568c2ecf20Sopenharmony_cistruct mwifiex_ie_types_htinfo { 18578c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18588c2ecf20Sopenharmony_ci struct ieee80211_ht_operation ht_oper; 18598c2ecf20Sopenharmony_ci} __packed; 18608c2ecf20Sopenharmony_ci 18618c2ecf20Sopenharmony_cistruct mwifiex_ie_types_2040bssco { 18628c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18638c2ecf20Sopenharmony_ci u8 bss_co_2040; 18648c2ecf20Sopenharmony_ci} __packed; 18658c2ecf20Sopenharmony_ci 18668c2ecf20Sopenharmony_cistruct mwifiex_ie_types_extcap { 18678c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18688c2ecf20Sopenharmony_ci u8 ext_capab[]; 18698c2ecf20Sopenharmony_ci} __packed; 18708c2ecf20Sopenharmony_ci 18718c2ecf20Sopenharmony_cistruct host_cmd_ds_mem_access { 18728c2ecf20Sopenharmony_ci __le16 action; 18738c2ecf20Sopenharmony_ci __le16 reserved; 18748c2ecf20Sopenharmony_ci __le32 addr; 18758c2ecf20Sopenharmony_ci __le32 value; 18768c2ecf20Sopenharmony_ci} __packed; 18778c2ecf20Sopenharmony_ci 18788c2ecf20Sopenharmony_cistruct mwifiex_ie_types_qos_info { 18798c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 18808c2ecf20Sopenharmony_ci u8 qos_info; 18818c2ecf20Sopenharmony_ci} __packed; 18828c2ecf20Sopenharmony_ci 18838c2ecf20Sopenharmony_cistruct host_cmd_ds_mac_reg_access { 18848c2ecf20Sopenharmony_ci __le16 action; 18858c2ecf20Sopenharmony_ci __le16 offset; 18868c2ecf20Sopenharmony_ci __le32 value; 18878c2ecf20Sopenharmony_ci} __packed; 18888c2ecf20Sopenharmony_ci 18898c2ecf20Sopenharmony_cistruct host_cmd_ds_bbp_reg_access { 18908c2ecf20Sopenharmony_ci __le16 action; 18918c2ecf20Sopenharmony_ci __le16 offset; 18928c2ecf20Sopenharmony_ci u8 value; 18938c2ecf20Sopenharmony_ci u8 reserved[3]; 18948c2ecf20Sopenharmony_ci} __packed; 18958c2ecf20Sopenharmony_ci 18968c2ecf20Sopenharmony_cistruct host_cmd_ds_rf_reg_access { 18978c2ecf20Sopenharmony_ci __le16 action; 18988c2ecf20Sopenharmony_ci __le16 offset; 18998c2ecf20Sopenharmony_ci u8 value; 19008c2ecf20Sopenharmony_ci u8 reserved[3]; 19018c2ecf20Sopenharmony_ci} __packed; 19028c2ecf20Sopenharmony_ci 19038c2ecf20Sopenharmony_cistruct host_cmd_ds_pmic_reg_access { 19048c2ecf20Sopenharmony_ci __le16 action; 19058c2ecf20Sopenharmony_ci __le16 offset; 19068c2ecf20Sopenharmony_ci u8 value; 19078c2ecf20Sopenharmony_ci u8 reserved[3]; 19088c2ecf20Sopenharmony_ci} __packed; 19098c2ecf20Sopenharmony_ci 19108c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_eeprom_access { 19118c2ecf20Sopenharmony_ci __le16 action; 19128c2ecf20Sopenharmony_ci 19138c2ecf20Sopenharmony_ci __le16 offset; 19148c2ecf20Sopenharmony_ci __le16 byte_count; 19158c2ecf20Sopenharmony_ci u8 value; 19168c2ecf20Sopenharmony_ci} __packed; 19178c2ecf20Sopenharmony_ci 19188c2ecf20Sopenharmony_cistruct mwifiex_assoc_event { 19198c2ecf20Sopenharmony_ci u8 sta_addr[ETH_ALEN]; 19208c2ecf20Sopenharmony_ci __le16 type; 19218c2ecf20Sopenharmony_ci __le16 len; 19228c2ecf20Sopenharmony_ci __le16 frame_control; 19238c2ecf20Sopenharmony_ci __le16 cap_info; 19248c2ecf20Sopenharmony_ci __le16 listen_interval; 19258c2ecf20Sopenharmony_ci u8 data[]; 19268c2ecf20Sopenharmony_ci} __packed; 19278c2ecf20Sopenharmony_ci 19288c2ecf20Sopenharmony_cistruct host_cmd_ds_sys_config { 19298c2ecf20Sopenharmony_ci __le16 action; 19308c2ecf20Sopenharmony_ci u8 tlv[]; 19318c2ecf20Sopenharmony_ci}; 19328c2ecf20Sopenharmony_ci 19338c2ecf20Sopenharmony_cistruct host_cmd_11ac_vht_cfg { 19348c2ecf20Sopenharmony_ci __le16 action; 19358c2ecf20Sopenharmony_ci u8 band_config; 19368c2ecf20Sopenharmony_ci u8 misc_config; 19378c2ecf20Sopenharmony_ci __le32 cap_info; 19388c2ecf20Sopenharmony_ci __le32 mcs_tx_set; 19398c2ecf20Sopenharmony_ci __le32 mcs_rx_set; 19408c2ecf20Sopenharmony_ci} __packed; 19418c2ecf20Sopenharmony_ci 19428c2ecf20Sopenharmony_cistruct host_cmd_tlv_akmp { 19438c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19448c2ecf20Sopenharmony_ci __le16 key_mgmt; 19458c2ecf20Sopenharmony_ci __le16 key_mgmt_operation; 19468c2ecf20Sopenharmony_ci} __packed; 19478c2ecf20Sopenharmony_ci 19488c2ecf20Sopenharmony_cistruct host_cmd_tlv_pwk_cipher { 19498c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19508c2ecf20Sopenharmony_ci __le16 proto; 19518c2ecf20Sopenharmony_ci u8 cipher; 19528c2ecf20Sopenharmony_ci u8 reserved; 19538c2ecf20Sopenharmony_ci} __packed; 19548c2ecf20Sopenharmony_ci 19558c2ecf20Sopenharmony_cistruct host_cmd_tlv_gwk_cipher { 19568c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19578c2ecf20Sopenharmony_ci u8 cipher; 19588c2ecf20Sopenharmony_ci u8 reserved; 19598c2ecf20Sopenharmony_ci} __packed; 19608c2ecf20Sopenharmony_ci 19618c2ecf20Sopenharmony_cistruct host_cmd_tlv_passphrase { 19628c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19638c2ecf20Sopenharmony_ci u8 passphrase[]; 19648c2ecf20Sopenharmony_ci} __packed; 19658c2ecf20Sopenharmony_ci 19668c2ecf20Sopenharmony_cistruct host_cmd_tlv_wep_key { 19678c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19688c2ecf20Sopenharmony_ci u8 key_index; 19698c2ecf20Sopenharmony_ci u8 is_default; 19708c2ecf20Sopenharmony_ci u8 key[1]; 19718c2ecf20Sopenharmony_ci}; 19728c2ecf20Sopenharmony_ci 19738c2ecf20Sopenharmony_cistruct host_cmd_tlv_auth_type { 19748c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19758c2ecf20Sopenharmony_ci u8 auth_type; 19768c2ecf20Sopenharmony_ci} __packed; 19778c2ecf20Sopenharmony_ci 19788c2ecf20Sopenharmony_cistruct host_cmd_tlv_encrypt_protocol { 19798c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19808c2ecf20Sopenharmony_ci __le16 proto; 19818c2ecf20Sopenharmony_ci} __packed; 19828c2ecf20Sopenharmony_ci 19838c2ecf20Sopenharmony_cistruct host_cmd_tlv_ssid { 19848c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19858c2ecf20Sopenharmony_ci u8 ssid[]; 19868c2ecf20Sopenharmony_ci} __packed; 19878c2ecf20Sopenharmony_ci 19888c2ecf20Sopenharmony_cistruct host_cmd_tlv_rates { 19898c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19908c2ecf20Sopenharmony_ci u8 rates[]; 19918c2ecf20Sopenharmony_ci} __packed; 19928c2ecf20Sopenharmony_ci 19938c2ecf20Sopenharmony_cistruct mwifiex_ie_types_bssid_list { 19948c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 19958c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 19968c2ecf20Sopenharmony_ci} __packed; 19978c2ecf20Sopenharmony_ci 19988c2ecf20Sopenharmony_cistruct host_cmd_tlv_bcast_ssid { 19998c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20008c2ecf20Sopenharmony_ci u8 bcast_ctl; 20018c2ecf20Sopenharmony_ci} __packed; 20028c2ecf20Sopenharmony_ci 20038c2ecf20Sopenharmony_cistruct host_cmd_tlv_beacon_period { 20048c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20058c2ecf20Sopenharmony_ci __le16 period; 20068c2ecf20Sopenharmony_ci} __packed; 20078c2ecf20Sopenharmony_ci 20088c2ecf20Sopenharmony_cistruct host_cmd_tlv_dtim_period { 20098c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20108c2ecf20Sopenharmony_ci u8 period; 20118c2ecf20Sopenharmony_ci} __packed; 20128c2ecf20Sopenharmony_ci 20138c2ecf20Sopenharmony_cistruct host_cmd_tlv_frag_threshold { 20148c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20158c2ecf20Sopenharmony_ci __le16 frag_thr; 20168c2ecf20Sopenharmony_ci} __packed; 20178c2ecf20Sopenharmony_ci 20188c2ecf20Sopenharmony_cistruct host_cmd_tlv_rts_threshold { 20198c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20208c2ecf20Sopenharmony_ci __le16 rts_thr; 20218c2ecf20Sopenharmony_ci} __packed; 20228c2ecf20Sopenharmony_ci 20238c2ecf20Sopenharmony_cistruct host_cmd_tlv_retry_limit { 20248c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20258c2ecf20Sopenharmony_ci u8 limit; 20268c2ecf20Sopenharmony_ci} __packed; 20278c2ecf20Sopenharmony_ci 20288c2ecf20Sopenharmony_cistruct host_cmd_tlv_mac_addr { 20298c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20308c2ecf20Sopenharmony_ci u8 mac_addr[ETH_ALEN]; 20318c2ecf20Sopenharmony_ci} __packed; 20328c2ecf20Sopenharmony_ci 20338c2ecf20Sopenharmony_cistruct host_cmd_tlv_channel_band { 20348c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20358c2ecf20Sopenharmony_ci u8 band_config; 20368c2ecf20Sopenharmony_ci u8 channel; 20378c2ecf20Sopenharmony_ci} __packed; 20388c2ecf20Sopenharmony_ci 20398c2ecf20Sopenharmony_cistruct host_cmd_tlv_ageout_timer { 20408c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20418c2ecf20Sopenharmony_ci __le32 sta_ao_timer; 20428c2ecf20Sopenharmony_ci} __packed; 20438c2ecf20Sopenharmony_ci 20448c2ecf20Sopenharmony_cistruct host_cmd_tlv_power_constraint { 20458c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20468c2ecf20Sopenharmony_ci u8 constraint; 20478c2ecf20Sopenharmony_ci} __packed; 20488c2ecf20Sopenharmony_ci 20498c2ecf20Sopenharmony_cistruct mwifiex_ie_types_btcoex_scan_time { 20508c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20518c2ecf20Sopenharmony_ci u8 coex_scan; 20528c2ecf20Sopenharmony_ci u8 reserved; 20538c2ecf20Sopenharmony_ci __le16 min_scan_time; 20548c2ecf20Sopenharmony_ci __le16 max_scan_time; 20558c2ecf20Sopenharmony_ci} __packed; 20568c2ecf20Sopenharmony_ci 20578c2ecf20Sopenharmony_cistruct mwifiex_ie_types_btcoex_aggr_win_size { 20588c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20598c2ecf20Sopenharmony_ci u8 coex_win_size; 20608c2ecf20Sopenharmony_ci u8 tx_win_size; 20618c2ecf20Sopenharmony_ci u8 rx_win_size; 20628c2ecf20Sopenharmony_ci u8 reserved; 20638c2ecf20Sopenharmony_ci} __packed; 20648c2ecf20Sopenharmony_ci 20658c2ecf20Sopenharmony_cistruct mwifiex_ie_types_robust_coex { 20668c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 20678c2ecf20Sopenharmony_ci __le32 mode; 20688c2ecf20Sopenharmony_ci} __packed; 20698c2ecf20Sopenharmony_ci 20708c2ecf20Sopenharmony_cistruct host_cmd_ds_version_ext { 20718c2ecf20Sopenharmony_ci u8 version_str_sel; 20728c2ecf20Sopenharmony_ci char version_str[128]; 20738c2ecf20Sopenharmony_ci} __packed; 20748c2ecf20Sopenharmony_ci 20758c2ecf20Sopenharmony_cistruct host_cmd_ds_mgmt_frame_reg { 20768c2ecf20Sopenharmony_ci __le16 action; 20778c2ecf20Sopenharmony_ci __le32 mask; 20788c2ecf20Sopenharmony_ci} __packed; 20798c2ecf20Sopenharmony_ci 20808c2ecf20Sopenharmony_cistruct host_cmd_ds_p2p_mode_cfg { 20818c2ecf20Sopenharmony_ci __le16 action; 20828c2ecf20Sopenharmony_ci __le16 mode; 20838c2ecf20Sopenharmony_ci} __packed; 20848c2ecf20Sopenharmony_ci 20858c2ecf20Sopenharmony_cistruct host_cmd_ds_remain_on_chan { 20868c2ecf20Sopenharmony_ci __le16 action; 20878c2ecf20Sopenharmony_ci u8 status; 20888c2ecf20Sopenharmony_ci u8 reserved; 20898c2ecf20Sopenharmony_ci u8 band_cfg; 20908c2ecf20Sopenharmony_ci u8 channel; 20918c2ecf20Sopenharmony_ci __le32 duration; 20928c2ecf20Sopenharmony_ci} __packed; 20938c2ecf20Sopenharmony_ci 20948c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_ibss_status { 20958c2ecf20Sopenharmony_ci __le16 action; 20968c2ecf20Sopenharmony_ci __le16 enable; 20978c2ecf20Sopenharmony_ci u8 bssid[ETH_ALEN]; 20988c2ecf20Sopenharmony_ci __le16 beacon_interval; 20998c2ecf20Sopenharmony_ci __le16 atim_window; 21008c2ecf20Sopenharmony_ci __le16 use_g_rate_protect; 21018c2ecf20Sopenharmony_ci} __packed; 21028c2ecf20Sopenharmony_ci 21038c2ecf20Sopenharmony_cistruct mwifiex_fw_mef_entry { 21048c2ecf20Sopenharmony_ci u8 mode; 21058c2ecf20Sopenharmony_ci u8 action; 21068c2ecf20Sopenharmony_ci __le16 exprsize; 21078c2ecf20Sopenharmony_ci u8 expr[]; 21088c2ecf20Sopenharmony_ci} __packed; 21098c2ecf20Sopenharmony_ci 21108c2ecf20Sopenharmony_cistruct host_cmd_ds_mef_cfg { 21118c2ecf20Sopenharmony_ci __le32 criteria; 21128c2ecf20Sopenharmony_ci __le16 num_entries; 21138c2ecf20Sopenharmony_ci struct mwifiex_fw_mef_entry mef_entry[]; 21148c2ecf20Sopenharmony_ci} __packed; 21158c2ecf20Sopenharmony_ci 21168c2ecf20Sopenharmony_ci#define CONNECTION_TYPE_INFRA 0 21178c2ecf20Sopenharmony_ci#define CONNECTION_TYPE_ADHOC 1 21188c2ecf20Sopenharmony_ci#define CONNECTION_TYPE_AP 2 21198c2ecf20Sopenharmony_ci 21208c2ecf20Sopenharmony_cistruct host_cmd_ds_set_bss_mode { 21218c2ecf20Sopenharmony_ci u8 con_type; 21228c2ecf20Sopenharmony_ci} __packed; 21238c2ecf20Sopenharmony_ci 21248c2ecf20Sopenharmony_cistruct host_cmd_ds_pcie_details { 21258c2ecf20Sopenharmony_ci /* TX buffer descriptor ring address */ 21268c2ecf20Sopenharmony_ci __le32 txbd_addr_lo; 21278c2ecf20Sopenharmony_ci __le32 txbd_addr_hi; 21288c2ecf20Sopenharmony_ci /* TX buffer descriptor ring count */ 21298c2ecf20Sopenharmony_ci __le32 txbd_count; 21308c2ecf20Sopenharmony_ci 21318c2ecf20Sopenharmony_ci /* RX buffer descriptor ring address */ 21328c2ecf20Sopenharmony_ci __le32 rxbd_addr_lo; 21338c2ecf20Sopenharmony_ci __le32 rxbd_addr_hi; 21348c2ecf20Sopenharmony_ci /* RX buffer descriptor ring count */ 21358c2ecf20Sopenharmony_ci __le32 rxbd_count; 21368c2ecf20Sopenharmony_ci 21378c2ecf20Sopenharmony_ci /* Event buffer descriptor ring address */ 21388c2ecf20Sopenharmony_ci __le32 evtbd_addr_lo; 21398c2ecf20Sopenharmony_ci __le32 evtbd_addr_hi; 21408c2ecf20Sopenharmony_ci /* Event buffer descriptor ring count */ 21418c2ecf20Sopenharmony_ci __le32 evtbd_count; 21428c2ecf20Sopenharmony_ci 21438c2ecf20Sopenharmony_ci /* Sleep cookie buffer physical address */ 21448c2ecf20Sopenharmony_ci __le32 sleep_cookie_addr_lo; 21458c2ecf20Sopenharmony_ci __le32 sleep_cookie_addr_hi; 21468c2ecf20Sopenharmony_ci} __packed; 21478c2ecf20Sopenharmony_ci 21488c2ecf20Sopenharmony_cistruct mwifiex_ie_types_rssi_threshold { 21498c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 21508c2ecf20Sopenharmony_ci u8 abs_value; 21518c2ecf20Sopenharmony_ci u8 evt_freq; 21528c2ecf20Sopenharmony_ci} __packed; 21538c2ecf20Sopenharmony_ci 21548c2ecf20Sopenharmony_ci#define MWIFIEX_DFS_REC_HDR_LEN 8 21558c2ecf20Sopenharmony_ci#define MWIFIEX_DFS_REC_HDR_NUM 10 21568c2ecf20Sopenharmony_ci#define MWIFIEX_BIN_COUNTER_LEN 7 21578c2ecf20Sopenharmony_ci 21588c2ecf20Sopenharmony_cistruct mwifiex_radar_det_event { 21598c2ecf20Sopenharmony_ci __le32 detect_count; 21608c2ecf20Sopenharmony_ci u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ 21618c2ecf20Sopenharmony_ci u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ 21628c2ecf20Sopenharmony_ci __le16 pw_chirp_type; 21638c2ecf20Sopenharmony_ci u8 pw_chirp_idx; 21648c2ecf20Sopenharmony_ci u8 pw_value; 21658c2ecf20Sopenharmony_ci u8 pri_radar_type; 21668c2ecf20Sopenharmony_ci u8 pri_bincnt; 21678c2ecf20Sopenharmony_ci u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN]; 21688c2ecf20Sopenharmony_ci u8 num_dfs_records; 21698c2ecf20Sopenharmony_ci u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN]; 21708c2ecf20Sopenharmony_ci __le32 passed; 21718c2ecf20Sopenharmony_ci} __packed; 21728c2ecf20Sopenharmony_ci 21738c2ecf20Sopenharmony_cistruct mwifiex_ie_types_multi_chan_info { 21748c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 21758c2ecf20Sopenharmony_ci __le16 status; 21768c2ecf20Sopenharmony_ci u8 tlv_buffer[]; 21778c2ecf20Sopenharmony_ci} __packed; 21788c2ecf20Sopenharmony_ci 21798c2ecf20Sopenharmony_cistruct mwifiex_ie_types_mc_group_info { 21808c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 21818c2ecf20Sopenharmony_ci u8 chan_group_id; 21828c2ecf20Sopenharmony_ci u8 chan_buf_weight; 21838c2ecf20Sopenharmony_ci u8 band_config; 21848c2ecf20Sopenharmony_ci u8 chan_num; 21858c2ecf20Sopenharmony_ci __le32 chan_time; 21868c2ecf20Sopenharmony_ci __le32 reserved; 21878c2ecf20Sopenharmony_ci union { 21888c2ecf20Sopenharmony_ci u8 sdio_func_num; 21898c2ecf20Sopenharmony_ci u8 usb_ep_num; 21908c2ecf20Sopenharmony_ci } hid_num; 21918c2ecf20Sopenharmony_ci u8 intf_num; 21928c2ecf20Sopenharmony_ci u8 bss_type_numlist[]; 21938c2ecf20Sopenharmony_ci} __packed; 21948c2ecf20Sopenharmony_ci 21958c2ecf20Sopenharmony_cistruct meas_rpt_map { 21968c2ecf20Sopenharmony_ci u8 rssi:3; 21978c2ecf20Sopenharmony_ci u8 unmeasured:1; 21988c2ecf20Sopenharmony_ci u8 radar:1; 21998c2ecf20Sopenharmony_ci u8 unidentified_sig:1; 22008c2ecf20Sopenharmony_ci u8 ofdm_preamble:1; 22018c2ecf20Sopenharmony_ci u8 bss:1; 22028c2ecf20Sopenharmony_ci} __packed; 22038c2ecf20Sopenharmony_ci 22048c2ecf20Sopenharmony_cistruct mwifiex_ie_types_chan_rpt_data { 22058c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 22068c2ecf20Sopenharmony_ci struct meas_rpt_map map; 22078c2ecf20Sopenharmony_ci} __packed; 22088c2ecf20Sopenharmony_ci 22098c2ecf20Sopenharmony_cistruct host_cmd_ds_802_11_subsc_evt { 22108c2ecf20Sopenharmony_ci __le16 action; 22118c2ecf20Sopenharmony_ci __le16 events; 22128c2ecf20Sopenharmony_ci} __packed; 22138c2ecf20Sopenharmony_ci 22148c2ecf20Sopenharmony_cistruct chan_switch_result { 22158c2ecf20Sopenharmony_ci u8 cur_chan; 22168c2ecf20Sopenharmony_ci u8 status; 22178c2ecf20Sopenharmony_ci u8 reason; 22188c2ecf20Sopenharmony_ci} __packed; 22198c2ecf20Sopenharmony_ci 22208c2ecf20Sopenharmony_cistruct mwifiex_tdls_generic_event { 22218c2ecf20Sopenharmony_ci __le16 type; 22228c2ecf20Sopenharmony_ci u8 peer_mac[ETH_ALEN]; 22238c2ecf20Sopenharmony_ci union { 22248c2ecf20Sopenharmony_ci struct chan_switch_result switch_result; 22258c2ecf20Sopenharmony_ci u8 cs_stop_reason; 22268c2ecf20Sopenharmony_ci __le16 reason_code; 22278c2ecf20Sopenharmony_ci __le16 reserved; 22288c2ecf20Sopenharmony_ci } u; 22298c2ecf20Sopenharmony_ci} __packed; 22308c2ecf20Sopenharmony_ci 22318c2ecf20Sopenharmony_cistruct mwifiex_ie { 22328c2ecf20Sopenharmony_ci __le16 ie_index; 22338c2ecf20Sopenharmony_ci __le16 mgmt_subtype_mask; 22348c2ecf20Sopenharmony_ci __le16 ie_length; 22358c2ecf20Sopenharmony_ci u8 ie_buffer[IEEE_MAX_IE_SIZE]; 22368c2ecf20Sopenharmony_ci} __packed; 22378c2ecf20Sopenharmony_ci 22388c2ecf20Sopenharmony_ci#define MAX_MGMT_IE_INDEX 16 22398c2ecf20Sopenharmony_cistruct mwifiex_ie_list { 22408c2ecf20Sopenharmony_ci __le16 type; 22418c2ecf20Sopenharmony_ci __le16 len; 22428c2ecf20Sopenharmony_ci struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX]; 22438c2ecf20Sopenharmony_ci} __packed; 22448c2ecf20Sopenharmony_ci 22458c2ecf20Sopenharmony_cistruct coalesce_filt_field_param { 22468c2ecf20Sopenharmony_ci u8 operation; 22478c2ecf20Sopenharmony_ci u8 operand_len; 22488c2ecf20Sopenharmony_ci __le16 offset; 22498c2ecf20Sopenharmony_ci u8 operand_byte_stream[4]; 22508c2ecf20Sopenharmony_ci}; 22518c2ecf20Sopenharmony_ci 22528c2ecf20Sopenharmony_cistruct coalesce_receive_filt_rule { 22538c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 22548c2ecf20Sopenharmony_ci u8 num_of_fields; 22558c2ecf20Sopenharmony_ci u8 pkt_type; 22568c2ecf20Sopenharmony_ci __le16 max_coalescing_delay; 22578c2ecf20Sopenharmony_ci struct coalesce_filt_field_param params[]; 22588c2ecf20Sopenharmony_ci} __packed; 22598c2ecf20Sopenharmony_ci 22608c2ecf20Sopenharmony_cistruct host_cmd_ds_coalesce_cfg { 22618c2ecf20Sopenharmony_ci __le16 action; 22628c2ecf20Sopenharmony_ci __le16 num_of_rules; 22638c2ecf20Sopenharmony_ci struct coalesce_receive_filt_rule rule[]; 22648c2ecf20Sopenharmony_ci} __packed; 22658c2ecf20Sopenharmony_ci 22668c2ecf20Sopenharmony_cistruct host_cmd_ds_multi_chan_policy { 22678c2ecf20Sopenharmony_ci __le16 action; 22688c2ecf20Sopenharmony_ci __le16 policy; 22698c2ecf20Sopenharmony_ci} __packed; 22708c2ecf20Sopenharmony_ci 22718c2ecf20Sopenharmony_cistruct host_cmd_ds_robust_coex { 22728c2ecf20Sopenharmony_ci __le16 action; 22738c2ecf20Sopenharmony_ci __le16 reserved; 22748c2ecf20Sopenharmony_ci} __packed; 22758c2ecf20Sopenharmony_ci 22768c2ecf20Sopenharmony_cistruct host_cmd_ds_wakeup_reason { 22778c2ecf20Sopenharmony_ci __le16 wakeup_reason; 22788c2ecf20Sopenharmony_ci} __packed; 22798c2ecf20Sopenharmony_ci 22808c2ecf20Sopenharmony_cistruct host_cmd_ds_gtk_rekey_params { 22818c2ecf20Sopenharmony_ci __le16 action; 22828c2ecf20Sopenharmony_ci u8 kck[NL80211_KCK_LEN]; 22838c2ecf20Sopenharmony_ci u8 kek[NL80211_KEK_LEN]; 22848c2ecf20Sopenharmony_ci __le32 replay_ctr_low; 22858c2ecf20Sopenharmony_ci __le32 replay_ctr_high; 22868c2ecf20Sopenharmony_ci} __packed; 22878c2ecf20Sopenharmony_ci 22888c2ecf20Sopenharmony_cistruct host_cmd_ds_chan_region_cfg { 22898c2ecf20Sopenharmony_ci __le16 action; 22908c2ecf20Sopenharmony_ci} __packed; 22918c2ecf20Sopenharmony_ci 22928c2ecf20Sopenharmony_cistruct host_cmd_ds_pkt_aggr_ctrl { 22938c2ecf20Sopenharmony_ci __le16 action; 22948c2ecf20Sopenharmony_ci __le16 enable; 22958c2ecf20Sopenharmony_ci __le16 tx_aggr_max_size; 22968c2ecf20Sopenharmony_ci __le16 tx_aggr_max_num; 22978c2ecf20Sopenharmony_ci __le16 tx_aggr_align; 22988c2ecf20Sopenharmony_ci} __packed; 22998c2ecf20Sopenharmony_ci 23008c2ecf20Sopenharmony_cistruct host_cmd_ds_sta_configure { 23018c2ecf20Sopenharmony_ci __le16 action; 23028c2ecf20Sopenharmony_ci u8 tlv_buffer[]; 23038c2ecf20Sopenharmony_ci} __packed; 23048c2ecf20Sopenharmony_ci 23058c2ecf20Sopenharmony_cistruct host_cmd_ds_command { 23068c2ecf20Sopenharmony_ci __le16 command; 23078c2ecf20Sopenharmony_ci __le16 size; 23088c2ecf20Sopenharmony_ci __le16 seq_num; 23098c2ecf20Sopenharmony_ci __le16 result; 23108c2ecf20Sopenharmony_ci union { 23118c2ecf20Sopenharmony_ci struct host_cmd_ds_get_hw_spec hw_spec; 23128c2ecf20Sopenharmony_ci struct host_cmd_ds_mac_control mac_ctrl; 23138c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_mac_address mac_addr; 23148c2ecf20Sopenharmony_ci struct host_cmd_ds_mac_multicast_adr mc_addr; 23158c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_get_log get_log; 23168c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_rssi_info rssi_info; 23178c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; 23188c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_snmp_mib smib; 23198c2ecf20Sopenharmony_ci struct host_cmd_ds_tx_rate_query tx_rate; 23208c2ecf20Sopenharmony_ci struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; 23218c2ecf20Sopenharmony_ci struct host_cmd_ds_txpwr_cfg txp_cfg; 23228c2ecf20Sopenharmony_ci struct host_cmd_ds_rf_tx_pwr txp; 23238c2ecf20Sopenharmony_ci struct host_cmd_ds_rf_ant_mimo ant_mimo; 23248c2ecf20Sopenharmony_ci struct host_cmd_ds_rf_ant_siso ant_siso; 23258c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; 23268c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; 23278c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_scan scan; 23288c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_scan_ext ext_scan; 23298c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_scan_rsp scan_resp; 23308c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_bg_scan_config bg_scan_config; 23318c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; 23328c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; 23338c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_associate associate; 23348c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_associate_rsp associate_rsp; 23358c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_deauthenticate deauth; 23368c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ad_hoc_start adhoc_start; 23378c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ad_hoc_start_result start_result; 23388c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ad_hoc_join_result join_result; 23398c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ad_hoc_join adhoc_join; 23408c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11d_domain_info domain_info; 23418c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; 23428c2ecf20Sopenharmony_ci struct host_cmd_ds_11n_addba_req add_ba_req; 23438c2ecf20Sopenharmony_ci struct host_cmd_ds_11n_addba_rsp add_ba_rsp; 23448c2ecf20Sopenharmony_ci struct host_cmd_ds_11n_delba del_ba; 23458c2ecf20Sopenharmony_ci struct host_cmd_ds_txbuf_cfg tx_buf; 23468c2ecf20Sopenharmony_ci struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; 23478c2ecf20Sopenharmony_ci struct host_cmd_ds_11n_cfg htcfg; 23488c2ecf20Sopenharmony_ci struct host_cmd_ds_wmm_get_status get_wmm_status; 23498c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_key_material key_material; 23508c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_key_material_v2 key_material_v2; 23518c2ecf20Sopenharmony_ci struct host_cmd_ds_version_ext verext; 23528c2ecf20Sopenharmony_ci struct host_cmd_ds_mgmt_frame_reg reg_mask; 23538c2ecf20Sopenharmony_ci struct host_cmd_ds_remain_on_chan roc_cfg; 23548c2ecf20Sopenharmony_ci struct host_cmd_ds_p2p_mode_cfg mode_cfg; 23558c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_ibss_status ibss_coalescing; 23568c2ecf20Sopenharmony_ci struct host_cmd_ds_mef_cfg mef_cfg; 23578c2ecf20Sopenharmony_ci struct host_cmd_ds_mem_access mem; 23588c2ecf20Sopenharmony_ci struct host_cmd_ds_mac_reg_access mac_reg; 23598c2ecf20Sopenharmony_ci struct host_cmd_ds_bbp_reg_access bbp_reg; 23608c2ecf20Sopenharmony_ci struct host_cmd_ds_rf_reg_access rf_reg; 23618c2ecf20Sopenharmony_ci struct host_cmd_ds_pmic_reg_access pmic_reg; 23628c2ecf20Sopenharmony_ci struct host_cmd_ds_set_bss_mode bss_mode; 23638c2ecf20Sopenharmony_ci struct host_cmd_ds_pcie_details pcie_host_spec; 23648c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_eeprom_access eeprom; 23658c2ecf20Sopenharmony_ci struct host_cmd_ds_802_11_subsc_evt subsc_evt; 23668c2ecf20Sopenharmony_ci struct host_cmd_ds_sys_config uap_sys_config; 23678c2ecf20Sopenharmony_ci struct host_cmd_ds_sta_deauth sta_deauth; 23688c2ecf20Sopenharmony_ci struct host_cmd_ds_sta_list sta_list; 23698c2ecf20Sopenharmony_ci struct host_cmd_11ac_vht_cfg vht_cfg; 23708c2ecf20Sopenharmony_ci struct host_cmd_ds_coalesce_cfg coalesce_cfg; 23718c2ecf20Sopenharmony_ci struct host_cmd_ds_tdls_config tdls_config; 23728c2ecf20Sopenharmony_ci struct host_cmd_ds_tdls_oper tdls_oper; 23738c2ecf20Sopenharmony_ci struct host_cmd_ds_chan_rpt_req chan_rpt_req; 23748c2ecf20Sopenharmony_ci struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; 23758c2ecf20Sopenharmony_ci struct host_cmd_ds_multi_chan_policy mc_policy; 23768c2ecf20Sopenharmony_ci struct host_cmd_ds_robust_coex coex; 23778c2ecf20Sopenharmony_ci struct host_cmd_ds_wakeup_reason hs_wakeup_reason; 23788c2ecf20Sopenharmony_ci struct host_cmd_ds_gtk_rekey_params rekey; 23798c2ecf20Sopenharmony_ci struct host_cmd_ds_chan_region_cfg reg_cfg; 23808c2ecf20Sopenharmony_ci struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl; 23818c2ecf20Sopenharmony_ci struct host_cmd_ds_sta_configure sta_cfg; 23828c2ecf20Sopenharmony_ci } params; 23838c2ecf20Sopenharmony_ci} __packed; 23848c2ecf20Sopenharmony_ci 23858c2ecf20Sopenharmony_cistruct mwifiex_opt_sleep_confirm { 23868c2ecf20Sopenharmony_ci __le16 command; 23878c2ecf20Sopenharmony_ci __le16 size; 23888c2ecf20Sopenharmony_ci __le16 seq_num; 23898c2ecf20Sopenharmony_ci __le16 result; 23908c2ecf20Sopenharmony_ci __le16 action; 23918c2ecf20Sopenharmony_ci __le16 resp_ctrl; 23928c2ecf20Sopenharmony_ci} __packed; 23938c2ecf20Sopenharmony_ci 23948c2ecf20Sopenharmony_cistruct hw_spec_max_conn { 23958c2ecf20Sopenharmony_ci struct mwifiex_ie_types_header header; 23968c2ecf20Sopenharmony_ci u8 max_p2p_conn; 23978c2ecf20Sopenharmony_ci u8 max_sta_conn; 23988c2ecf20Sopenharmony_ci} __packed; 23998c2ecf20Sopenharmony_ci 24008c2ecf20Sopenharmony_ci#endif /* !_MWIFIEX_FW_H_ */ 2401