1828c91f7SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 25e6e3a92SBing Zhao /* 3932183aaSGanapathi Bhat * NXP Wireless LAN device driver: Firmware specific macros & structures 45e6e3a92SBing Zhao * 5932183aaSGanapathi Bhat * Copyright 2011-2020 NXP 65e6e3a92SBing Zhao */ 75e6e3a92SBing Zhao 85e6e3a92SBing Zhao #ifndef _MWIFIEX_FW_H_ 95e6e3a92SBing Zhao #define _MWIFIEX_FW_H_ 105e6e3a92SBing Zhao 115e6e3a92SBing Zhao #include <linux/if_ether.h> 125e6e3a92SBing Zhao 135e6e3a92SBing Zhao 145e6e3a92SBing Zhao #define INTF_HEADER_LEN 4 155e6e3a92SBing Zhao 165e6e3a92SBing Zhao struct rfc_1042_hdr { 175e6e3a92SBing Zhao u8 llc_dsap; 185e6e3a92SBing Zhao u8 llc_ssap; 195e6e3a92SBing Zhao u8 llc_ctrl; 205e6e3a92SBing Zhao u8 snap_oui[3]; 21a6efc5b7SAmitkumar Karwar __be16 snap_type; 225c0b8798SKarthik Ananthapadmanabha } __packed; 235e6e3a92SBing Zhao 245e6e3a92SBing Zhao struct rx_packet_hdr { 255e6e3a92SBing Zhao struct ethhdr eth803_hdr; 265e6e3a92SBing Zhao struct rfc_1042_hdr rfc1042_hdr; 275c0b8798SKarthik Ananthapadmanabha } __packed; 285e6e3a92SBing Zhao 295e6e3a92SBing Zhao struct tx_packet_hdr { 305e6e3a92SBing Zhao struct ethhdr eth803_hdr; 315e6e3a92SBing Zhao struct rfc_1042_hdr rfc1042_hdr; 325c0b8798SKarthik Ananthapadmanabha } __packed; 335e6e3a92SBing Zhao 34efde6648SXinming Hu struct mwifiex_fw_header { 35efde6648SXinming Hu __le32 dnld_cmd; 36efde6648SXinming Hu __le32 base_addr; 37efde6648SXinming Hu __le32 data_length; 38efde6648SXinming Hu __le32 crc; 39efde6648SXinming Hu } __packed; 40efde6648SXinming Hu 41efde6648SXinming Hu struct mwifiex_fw_data { 42efde6648SXinming Hu struct mwifiex_fw_header header; 43efde6648SXinming Hu __le32 seq_num; 447fcae8f7SGustavo A. R. Silva u8 data[]; 45efde6648SXinming Hu } __packed; 46efde6648SXinming Hu 47f5ecd02aSXinming Hu struct mwifiex_fw_dump_header { 48f5ecd02aSXinming Hu __le16 seq_num; 49f5ecd02aSXinming Hu __le16 reserved; 50f5ecd02aSXinming Hu __le16 type; 51f5ecd02aSXinming Hu __le16 len; 52f5ecd02aSXinming Hu } __packed; 53f5ecd02aSXinming Hu 54f5ecd02aSXinming Hu #define FW_DUMP_INFO_ENDED 0x0002 55f5ecd02aSXinming Hu 56efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_1 0x1 57efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_5 0x5 58efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_6 0x6 59efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_7 0x7 60efde6648SXinming Hu 615e6e3a92SBing Zhao #define B_SUPPORTED_RATES 5 625e6e3a92SBing Zhao #define G_SUPPORTED_RATES 9 635e6e3a92SBing Zhao #define BG_SUPPORTED_RATES 13 645e6e3a92SBing Zhao #define A_SUPPORTED_RATES 9 655e6e3a92SBing Zhao #define HOSTCMD_SUPPORTED_RATES 14 665e6e3a92SBing Zhao #define N_SUPPORTED_RATES 3 67a5f39056SYogesh Ashok Powar #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \ 68f25b1431SBing Zhao BAND_AN | BAND_AAC) 695e6e3a92SBing Zhao 70a5f39056SYogesh Ashok Powar #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \ 71f25b1431SBing Zhao BIT(13)) 725e6e3a92SBing Zhao #define IS_SUPPORT_MULTI_BANDS(adapter) \ 735e6e3a92SBing Zhao (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) 74a5f39056SYogesh Ashok Powar 75f25b1431SBing Zhao /* bit 13: 11ac BAND_AAC 76f25b1431SBing Zhao * bit 12: reserved for lab testing, will be reused for BAND_AN 77f25b1431SBing Zhao * bit 11: 11n BAND_GN 78f25b1431SBing Zhao * bit 10: 11a BAND_A 79f25b1431SBing Zhao * bit 9: 11g BAND_G 80f25b1431SBing Zhao * bit 8: 11b BAND_B 81f25b1431SBing Zhao * Map these bits to band capability by right shifting 8 bits. 82a5f39056SYogesh Ashok Powar */ 835e6e3a92SBing Zhao #define GET_FW_DEFAULT_BANDS(adapter) \ 84f25b1431SBing Zhao (((adapter->fw_cap_info & 0x2f00) >> 8) & \ 85a5f39056SYogesh Ashok Powar ALL_802_11_BANDS) 865e6e3a92SBing Zhao 875e6e3a92SBing Zhao #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff 885e6e3a92SBing Zhao 895e6e3a92SBing Zhao #define KEY_INFO_ENABLED 0x01 905e6e3a92SBing Zhao enum KEY_TYPE_ID { 915e6e3a92SBing Zhao KEY_TYPE_ID_WEP = 0, 925e6e3a92SBing Zhao KEY_TYPE_ID_TKIP, 935e6e3a92SBing Zhao KEY_TYPE_ID_AES, 945e6e3a92SBing Zhao KEY_TYPE_ID_WAPI, 95b877f4cfSYing Luo KEY_TYPE_ID_AES_CMAC, 9689951db2SGanapathi Bhat KEY_TYPE_ID_AES_CMAC_DEF, 975e6e3a92SBing Zhao }; 98e57f1734SAvinash Patil 99e57f1734SAvinash Patil #define WPA_PN_SIZE 8 100e57f1734SAvinash Patil #define KEY_PARAMS_FIXED_LEN 10 101e57f1734SAvinash Patil #define KEY_INDEX_MASK 0xf 1024b9fede5SAmitkumar Karwar #define KEY_API_VER_MAJOR_V2 2 103e57f1734SAvinash Patil 1046a35a0acSYogesh Ashok Powar #define KEY_MCAST BIT(0) 1056a35a0acSYogesh Ashok Powar #define KEY_UNICAST BIT(1) 1066a35a0acSYogesh Ashok Powar #define KEY_ENABLED BIT(2) 107e57f1734SAvinash Patil #define KEY_DEFAULT BIT(3) 108e57f1734SAvinash Patil #define KEY_TX_KEY BIT(4) 109e57f1734SAvinash Patil #define KEY_RX_KEY BIT(5) 110b877f4cfSYing Luo #define KEY_IGTK BIT(10) 1115e6e3a92SBing Zhao 112e57f1734SAvinash Patil #define WAPI_KEY_LEN (WLAN_KEY_LEN_SMS4 + PN_LEN + 2) 1135e6e3a92SBing Zhao 1145e6e3a92SBing Zhao #define MAX_POLL_TRIES 100 1152fd5c6edSchunfan chen #define MAX_FIRMWARE_POLL_TRIES 150 1165e6e3a92SBing Zhao 117d930faeeSAmitkumar Karwar #define FIRMWARE_READY_SDIO 0xfedc 118d930faeeSAmitkumar Karwar #define FIRMWARE_READY_PCIE 0xfedcba00 1195e6e3a92SBing Zhao 12046dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_TIMESHARE 0x01 12146dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_SPATIAL 0x82 12246dbe247SAmitkumar Karwar 1234daffe35SAmitkumar Karwar enum mwifiex_usb_ep { 1244daffe35SAmitkumar Karwar MWIFIEX_USB_EP_CMD_EVENT = 1, 1254daffe35SAmitkumar Karwar MWIFIEX_USB_EP_DATA = 2, 1262b0f997dSZhaoyang Liu MWIFIEX_USB_EP_DATA_CH2 = 3, 1274daffe35SAmitkumar Karwar }; 1284daffe35SAmitkumar Karwar 1295e6e3a92SBing Zhao enum MWIFIEX_802_11_PRIVACY_FILTER { 1305e6e3a92SBing Zhao MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL, 1315e6e3a92SBing Zhao MWIFIEX_802_11_PRIV_FILTER_8021X_WEP 1325e6e3a92SBing Zhao }; 1335e6e3a92SBing Zhao 1345e6e3a92SBing Zhao #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF))) 1352dbaf751SStone Piao #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF))) 1365e6e3a92SBing Zhao 137e76268daSAvinash Patil #define UAP_BSS_PARAMS_I 0 138ede98bfaSAvinash Patil #define UAP_CUSTOM_IE_I 1 139ede98bfaSAvinash Patil #define MWIFIEX_AUTO_IDX_MASK 0xffff 140ede98bfaSAvinash Patil #define MWIFIEX_DELETE_MASK 0x0000 141f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_REQ 0x01 142f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_REQ 0x04 143f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_RESP 0x02 144f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_RESP 0x08 145f31acabeSAvinash Patil #define MGMT_MASK_PROBE_REQ 0x10 146f31acabeSAvinash Patil #define MGMT_MASK_PROBE_RESP 0x20 147f31acabeSAvinash Patil #define MGMT_MASK_BEACON 0x100 148e76268daSAvinash Patil 14912190c5dSAvinash Patil #define TLV_TYPE_UAP_SSID 0x0000 150a3c2c4f6SAvinash Patil #define TLV_TYPE_UAP_RATES 0x0001 1518a73dd63SAvinash Patil #define TLV_TYPE_PWR_CONSTRAINT 0x0020 15212190c5dSAvinash Patil 1535e6e3a92SBing Zhao #define PROPRIETARY_TLV_BASE_ID 0x0100 1545e6e3a92SBing Zhao #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) 1555e6e3a92SBing Zhao #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) 1565e6e3a92SBing Zhao #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) 157fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) 1585e6e3a92SBing Zhao #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) 1595e6e3a92SBing Zhao #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) 1605e6e3a92SBing Zhao #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) 1615e6e3a92SBing Zhao #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) 162fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) 1630c9b7f22SXinming Hu #define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30) 1645e6e3a92SBing Zhao #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) 16575edd2c6SAvinash Patil #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32) 16621f58d20SAmitkumar Karwar #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) 1675e6e3a92SBing Zhao #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) 168f0dd488eSDavid Lin #define TLV_TYPE_UAP_MAC_ADDRESS (PROPRIETARY_TLV_BASE_ID + 43) 16912190c5dSAvinash Patil #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) 17012190c5dSAvinash Patil #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) 171605b73afSAvinash Patil #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) 1729b930eaeSAvinash Patil #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) 1738b4509f6SKevin Gan #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57) 17496893538SAvinash Patil #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) 175f752dcd5SAvinash Patil #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) 176f752dcd5SAvinash Patil #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) 177f752dcd5SAvinash Patil #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) 1789b930eaeSAvinash Patil #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) 1792b06bdbeSMarc Yang #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) 1802b06bdbeSMarc Yang #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) 1812b06bdbeSMarc Yang #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) 18221f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) 18321f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) 1840a694d68SAvinash Patil #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) 1859b930eaeSAvinash Patil #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) 1865e6e3a92SBing Zhao #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94) 18746dbe247SAmitkumar Karwar #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 96) 188e568634aSAvinash Patil #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) 18913d7ba78SAvinash Patil #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) 1902b06bdbeSMarc Yang #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) 1912b06bdbeSMarc Yang #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) 1928b4509f6SKevin Gan #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) 193f752dcd5SAvinash Patil #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) 194f752dcd5SAvinash Patil #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) 1954e6ee91bSAvinash Patil #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) 19699ffe72cSXinming Hu #define TLV_TYPE_RXBA_SYNC (PROPRIETARY_TLV_BASE_ID + 153) 197562fc5b3SAmitkumar Karwar #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) 198e57f1734SAvinash Patil #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) 1990c9b7f22SXinming Hu #define TLV_TYPE_REPEAT_COUNT (PROPRIETARY_TLV_BASE_ID + 176) 2006a7b1910SShengzhen Li #define TLV_TYPE_PS_PARAMS_IN_HS (PROPRIETARY_TLV_BASE_ID + 181) 2018d6b538aSAvinash Patil #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) 2022b0f997dSZhaoyang Liu #define TLV_TYPE_MC_GROUP_INFO (PROPRIETARY_TLV_BASE_ID + 184) 203d29caf25SAvinash Patil #define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) 204cb91be87SAvinash Patil #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) 2054b9fede5SAmitkumar Karwar #define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199) 206bf354433SAvinash Patil #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) 207d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) 208d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) 20940d7412bSAniket Nagarnaik #define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206) 210c2a8f0ffSGanapathi Bhat #define TLV_TYPE_RANDOM_MAC (PROPRIETARY_TLV_BASE_ID + 236) 21141960b4dSAmitkumar Karwar #define TLV_TYPE_CHAN_ATTR_CFG (PROPRIETARY_TLV_BASE_ID + 237) 212982d7287SPali Rohár #define TLV_TYPE_MAX_CONN (PROPRIETARY_TLV_BASE_ID + 279) 2135e6e3a92SBing Zhao 2145e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 2155e6e3a92SBing Zhao 2165e6e3a92SBing Zhao #define SSN_MASK 0xfff0 2175e6e3a92SBing Zhao 2185e6e3a92SBing Zhao #define BA_RESULT_SUCCESS 0x0 2195e6e3a92SBing Zhao #define BA_RESULT_TIMEOUT 0x2 2205e6e3a92SBing Zhao 2215e6e3a92SBing Zhao #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) 2225e6e3a92SBing Zhao 2235e6e3a92SBing Zhao #define BA_STREAM_NOT_ALLOWED 0xff 2245e6e3a92SBing Zhao 2255e6e3a92SBing Zhao #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ 226931f1584SYogesh Ashok Powar priv->adapter->config_bands & BAND_AN) && \ 227c6c65a84SGanapathi Bhat priv->curr_bss_params.bss_descriptor.bcn_ht_cap && \ 228c6c65a84SGanapathi Bhat !priv->curr_bss_params.bss_descriptor.disable_11n) 2295e6e3a92SBing Zhao #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ 2305e6e3a92SBing Zhao BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) 2315e6e3a92SBing Zhao 2325e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096 2335e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192 234432da7d2SXinming Hu #define MWIFIEX_TX_DATA_BUF_SIZE_12K 12288 2355e6e3a92SBing Zhao 2365e6e3a92SBing Zhao #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11)) 237b23bce29SAvinash Patil #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14)) 238d5b036c4SAvinash Patil #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15)) 23992263a84SZhaoyang Liu #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16)) 240e267e71eSKarthik D A #define ISSUPP_ADHOC_ENABLED(FwCapInfo) (FwCapInfo & BIT(25)) 241073a435dSKarthik Ananthapadmanabha #define ISSUPP_RANDOM_MAC(FwCapInfo) (FwCapInfo & BIT(27)) 242ae30bdaaSGanapathi Bhat #define ISSUPP_FIRMWARE_SUPPLICANT(FwCapInfo) (FwCapInfo & BIT(21)) 2436d2bd916SMarc Yang 24422281256SAvinash Patil #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ 24522281256SAvinash Patil (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ 24622281256SAvinash Patil IEEE80211_HT_CAP_SM_PS) 24722281256SAvinash Patil 248645097ceSAmitkumar Karwar #define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008 249645097ceSAmitkumar Karwar 25022281256SAvinash Patil #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR 25122281256SAvinash Patil 2526d2bd916SMarc Yang /* dev_cap bitmap 2536d2bd916SMarc Yang * BIT 2546d2bd916SMarc Yang * 0-16 reserved 2556d2bd916SMarc Yang * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40 2566d2bd916SMarc Yang * 18-22 reserved 2576d2bd916SMarc Yang * 23 IEEE80211_HT_CAP_SGI_20 2586d2bd916SMarc Yang * 24 IEEE80211_HT_CAP_SGI_40 2596d2bd916SMarc Yang * 25 IEEE80211_HT_CAP_TX_STBC 2606d2bd916SMarc Yang * 26 IEEE80211_HT_CAP_RX_STBC 2616d2bd916SMarc Yang * 27-28 reserved 2626d2bd916SMarc Yang * 29 IEEE80211_HT_CAP_GRN_FLD 2636d2bd916SMarc Yang * 30-31 reserved 2646d2bd916SMarc Yang */ 2655e6e3a92SBing Zhao #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17)) 2666d2bd916SMarc Yang #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23)) 2676d2bd916SMarc Yang #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24)) 2686d2bd916SMarc Yang #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25)) 2696d2bd916SMarc Yang #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) 2706d2bd916SMarc Yang #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) 271dd0d83c2SAvinash Patil #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8)) 272dd0d83c2SAvinash Patil #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) 273645097ceSAmitkumar Karwar #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) 274396939f9SAvinash Patil #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) 2754f3dfdfbSAvinash Patil #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) 2766d2bd916SMarc Yang 277cd27bc3cSAmitkumar Karwar /* httxcfg bitmap 278cd27bc3cSAmitkumar Karwar * 0 reserved 279cd27bc3cSAmitkumar Karwar * 1 20/40 Mhz enable(1)/disable(0) 280cd27bc3cSAmitkumar Karwar * 2-3 reserved 281cd27bc3cSAmitkumar Karwar * 4 green field enable(1)/disable(0) 282cd27bc3cSAmitkumar Karwar * 5 short GI in 20 Mhz enable(1)/disable(0) 283cd27bc3cSAmitkumar Karwar * 6 short GI in 40 Mhz enable(1)/disable(0) 284cd27bc3cSAmitkumar Karwar * 7-15 reserved 285cd27bc3cSAmitkumar Karwar */ 286cd27bc3cSAmitkumar Karwar #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) 287cd27bc3cSAmitkumar Karwar 288a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 1x1 mode: 289a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 290a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams 291a5333914SAmitkumar Karwar */ 292a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe 293a5333914SAmitkumar Karwar 294a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 2x2 mode: 295a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2 296a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams 297a5333914SAmitkumar Karwar */ 298a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa 299a5333914SAmitkumar Karwar 3005e6e3a92SBing Zhao #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) 3015e6e3a92SBing Zhao #define SETHT_MCS32(x) (x[4] |= 1) 302a5333914SAmitkumar Karwar #define HT_STREAM_1X1 0x11 303e3bea1c8SBing Zhao #define HT_STREAM_2X2 0x22 3045e6e3a92SBing Zhao 3055e6e3a92SBing Zhao #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) 3065e6e3a92SBing Zhao 3075e6e3a92SBing Zhao #define LLC_SNAP_LEN 8 3085e6e3a92SBing Zhao 309a5f39056SYogesh Ashok Powar /* HW_SPEC fw_cap_info */ 310a5f39056SYogesh Ashok Powar 311f25b1431SBing Zhao #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13)) 312a5f39056SYogesh Ashok Powar 313a5f39056SYogesh Ashok Powar #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) 314a5f39056SYogesh Ashok Powar #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) 315a5f39056SYogesh Ashok Powar #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \ 316a5f39056SYogesh Ashok Powar (2 * (nss - 1))) 317a5f39056SYogesh Ashok Powar #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16) 318a5f39056SYogesh Ashok Powar #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF) 319a5f39056SYogesh Ashok Powar 32079d9a54cSAmitkumar Karwar /* Clear SU Beanformer, MU beanformer, MU beanformee and 32179d9a54cSAmitkumar Karwar * sounding dimensions bits 32279d9a54cSAmitkumar Karwar */ 32379d9a54cSAmitkumar Karwar #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \ 32479d9a54cSAmitkumar Karwar (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ 32579d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ 32679d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ 32779d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) 32879d9a54cSAmitkumar Karwar 3295e6e3a92SBing Zhao #define MOD_CLASS_HR_DSSS 0x03 3305e6e3a92SBing Zhao #define MOD_CLASS_OFDM 0x07 3315e6e3a92SBing Zhao #define MOD_CLASS_HT 0x08 3325e6e3a92SBing Zhao #define HT_BW_20 0 3335e6e3a92SBing Zhao #define HT_BW_40 1 3345e6e3a92SBing Zhao 335b887664dSAmitkumar Karwar #define DFS_CHAN_MOVE_TIME 10000 336b887664dSAmitkumar Karwar 3375e6e3a92SBing Zhao #define HostCmd_CMD_GET_HW_SPEC 0x0003 3385e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SCAN 0x0006 3395e6e3a92SBing Zhao #define HostCmd_CMD_802_11_GET_LOG 0x000b 3405e6e3a92SBing Zhao #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 3415e6e3a92SBing Zhao #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 3425e6e3a92SBing Zhao #define HostCmd_CMD_802_11_ASSOCIATE 0x0012 3435e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SNMP_MIB 0x0016 3445e6e3a92SBing Zhao #define HostCmd_CMD_MAC_REG_ACCESS 0x0019 3455e6e3a92SBing Zhao #define HostCmd_CMD_BBP_REG_ACCESS 0x001a 3465e6e3a92SBing Zhao #define HostCmd_CMD_RF_REG_ACCESS 0x001b 3475e6e3a92SBing Zhao #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad 348caa8984fSAmitkumar Karwar #define HostCmd_CMD_RF_TX_PWR 0x001e 3498a279d5bSAmitkumar Karwar #define HostCmd_CMD_RF_ANTENNA 0x0020 3505e6e3a92SBing Zhao #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 3515e6e3a92SBing Zhao #define HostCmd_CMD_MAC_CONTROL 0x0028 3525e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_START 0x002b 3535e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c 3545e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 3555e6e3a92SBing Zhao #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D 3565e6e3a92SBing Zhao #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b 3575e6e3a92SBing Zhao #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e 3580c9b7f22SXinming Hu #define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b 3595e6e3a92SBing Zhao #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c 3605e6e3a92SBing Zhao #define HostCmd_CMD_WMM_GET_STATUS 0x0071 361fa444bf8SAmitkumar Karwar #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 3625e6e3a92SBing Zhao #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f 3635e6e3a92SBing Zhao #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 364c2c6c85fSChin-ran Lo #define HostCmd_CMD_MEM_ACCESS 0x0086 365388ec385SAmitkumar Karwar #define HostCmd_CMD_CFG_DATA 0x008f 3665e6e3a92SBing Zhao #define HostCmd_CMD_VERSION_EXT 0x0097 3677da060c1SAmitkumar Karwar #define HostCmd_CMD_MEF_CFG 0x009a 3685e6e3a92SBing Zhao #define HostCmd_CMD_RSSI_INFO 0x00a4 3695e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_INIT 0x00a9 3705e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa 371ed5cfbe6SAvinash Patil #define HOST_CMD_APCMD_SYS_RESET 0x00af 37240d07030SAvinash Patil #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 37340d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_START 0x00b1 37440d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_STOP 0x00b2 375b21783e9SXinming Hu #define HOST_CMD_APCMD_STA_LIST 0x00b3 3760f9e9b8bSAvinash Patil #define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5 3775e6e3a92SBing Zhao #define HostCmd_CMD_11N_CFG 0x00cd 3785e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce 3795e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf 3805e6e3a92SBing Zhao #define HostCmd_CMD_11N_DELBA 0x00d0 3815e6e3a92SBing Zhao #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 38285afb186SAvinash Patil #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd 3835e6e3a92SBing Zhao #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df 3845e6e3a92SBing Zhao #define HostCmd_CMD_TXPWR_CFG 0x00d1 3855e6e3a92SBing Zhao #define HostCmd_CMD_TX_RATE_CFG 0x00d6 38646dbe247SAmitkumar Karwar #define HostCmd_CMD_ROBUST_COEX 0x00e0 3875e6e3a92SBing Zhao #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 3885e6e3a92SBing Zhao #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 389e1a2b7a3SStone Piao #define HostCmd_CMD_P2P_MODE_CFG 0x00eb 3905e6e3a92SBing Zhao #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed 3915e6e3a92SBing Zhao #define HostCmd_CMD_SET_BSS_MODE 0x00f7 392d930faeeSAmitkumar Karwar #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa 39321f58d20SAmitkumar Karwar #define HostCmd_CMD_802_11_SCAN_EXT 0x0107 394562fc5b3SAmitkumar Karwar #define HostCmd_CMD_COALESCE_CFG 0x010a 3953cec6870SStone Piao #define HostCmd_CMD_MGMT_FRAME_REG 0x010c 3967feb4c48SStone Piao #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d 397f6b1cbe0SGanapathi Bhat #define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG 0x010f 39883c78da9SYogesh Ashok Powar #define HostCmd_CMD_11AC_CFG 0x0112 3998de00f1bSchunfan chen #define HostCmd_CMD_HS_WAKEUP_REASON 0x0116 400449b8bbfSXinming Hu #define HostCmd_CMD_TDLS_CONFIG 0x0100 401d5b036c4SAvinash Patil #define HostCmd_CMD_MC_POLICY 0x0121 402429d90d2SAvinash Patil #define HostCmd_CMD_TDLS_OPER 0x0122 40318d60501SXinming Hu #define HostCmd_CMD_FW_DUMP_EVENT 0x0125 40492263a84SZhaoyang Liu #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 40528bf8312SGanapathi Bhat #define HostCmd_CMD_STA_CONFIGURE 0x023f 40641960b4dSAmitkumar Karwar #define HostCmd_CMD_CHAN_REGION_CFG 0x0242 407c5994293SXinming Hu #define HostCmd_CMD_PACKET_AGGR_CTRL 0x0251 4085e6e3a92SBing Zhao 409f752dcd5SAvinash Patil #define PROTOCOL_NO_SECURITY 0x01 410f752dcd5SAvinash Patil #define PROTOCOL_STATIC_WEP 0x02 411f752dcd5SAvinash Patil #define PROTOCOL_WPA 0x08 412f752dcd5SAvinash Patil #define PROTOCOL_WPA2 0x20 413f752dcd5SAvinash Patil #define PROTOCOL_WPA2_MIXED 0x28 414f752dcd5SAvinash Patil #define PROTOCOL_EAP 0x40 415f752dcd5SAvinash Patil #define KEY_MGMT_NONE 0x04 416f752dcd5SAvinash Patil #define KEY_MGMT_PSK 0x02 417f752dcd5SAvinash Patil #define KEY_MGMT_EAP 0x01 418f752dcd5SAvinash Patil #define CIPHER_TKIP 0x04 419f752dcd5SAvinash Patil #define CIPHER_AES_CCMP 0x08 420f752dcd5SAvinash Patil #define VALID_CIPHER_BITMAP 0x0c 421f752dcd5SAvinash Patil 4225e6e3a92SBing Zhao enum ENH_PS_MODES { 4235e6e3a92SBing Zhao EN_PS = 1, 4245e6e3a92SBing Zhao DIS_PS = 2, 4255e6e3a92SBing Zhao EN_AUTO_DS = 3, 4265e6e3a92SBing Zhao DIS_AUTO_DS = 4, 4275e6e3a92SBing Zhao SLEEP_CONFIRM = 5, 4285e6e3a92SBing Zhao GET_PS = 0, 4295e6e3a92SBing Zhao EN_AUTO_PS = 0xff, 4305e6e3a92SBing Zhao DIS_AUTO_PS = 0xfe, 4315e6e3a92SBing Zhao }; 4325e6e3a92SBing Zhao 433e1a2b7a3SStone Piao enum P2P_MODES { 434e1a2b7a3SStone Piao P2P_MODE_DISABLE = 0, 435e1a2b7a3SStone Piao P2P_MODE_DEVICE = 1, 436e1a2b7a3SStone Piao P2P_MODE_GO = 2, 437e1a2b7a3SStone Piao P2P_MODE_CLIENT = 3, 438e1a2b7a3SStone Piao }; 439e1a2b7a3SStone Piao 44072539799SAmitkumar Karwar enum mwifiex_channel_flags { 44172539799SAmitkumar Karwar MWIFIEX_CHANNEL_PASSIVE = BIT(0), 44272539799SAmitkumar Karwar MWIFIEX_CHANNEL_DFS = BIT(1), 44372539799SAmitkumar Karwar MWIFIEX_CHANNEL_NOHT40 = BIT(2), 44472539799SAmitkumar Karwar MWIFIEX_CHANNEL_NOHT80 = BIT(3), 44572539799SAmitkumar Karwar MWIFIEX_CHANNEL_DISABLED = BIT(7), 44672539799SAmitkumar Karwar }; 44772539799SAmitkumar Karwar 4485e6e3a92SBing Zhao #define HostCmd_RET_BIT 0x8000 4495e6e3a92SBing Zhao #define HostCmd_ACT_GEN_GET 0x0000 4505e6e3a92SBing Zhao #define HostCmd_ACT_GEN_SET 0x0001 4517feb4c48SStone Piao #define HostCmd_ACT_GEN_REMOVE 0x0004 452fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_SET 0x0002 453fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_CLR 0x0003 4545e6e3a92SBing Zhao #define HostCmd_RESULT_OK 0x0000 455b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_RX_ON BIT(0) 456b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_TX_ON BIT(1) 457b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_WEP_ENABLE BIT(3) 458b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ETHERNETII_ENABLE BIT(4) 459b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE BIT(7) 460b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE BIT(8) 461b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13) 462d7864cf2SAmitkumar Karwar #define HostCmd_ACT_MAC_DYNAMIC_BW_ENABLE BIT(16) 4635e6e3a92SBing Zhao 4645e6e3a92SBing Zhao #define HostCmd_BSS_MODE_IBSS 0x0002 4655e6e3a92SBing Zhao #define HostCmd_BSS_MODE_ANY 0x0003 4665e6e3a92SBing Zhao 4675e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_BG 0 4685e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_A 1 4695e6e3a92SBing Zhao 470cc0b5a64SAmitkumar Karwar #define HS_CFG_CANCEL 0xffffffff 471cc0b5a64SAmitkumar Karwar #define HS_CFG_COND_DEF 0x00000000 472cc0b5a64SAmitkumar Karwar #define HS_CFG_GPIO_DEF 0xff 473915f36d2SBing Zhao #define HS_CFG_GAP_DEF 0xff 4740d7f53e3SAmitkumar Karwar #define HS_CFG_COND_BROADCAST_DATA 0x00000001 4750d7f53e3SAmitkumar Karwar #define HS_CFG_COND_UNICAST_DATA 0x00000002 4760d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MAC_EVENT 0x00000004 4770d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MULTICAST_DATA 0x00000008 4785e6e3a92SBing Zhao 47912d11109SAvinash Patil #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB 48012d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC 48112d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD 48212d11109SAvinash Patil #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE 48312d11109SAvinash Patil #define CONNECT_ERR_STA_FAILURE 0xFFFF 48412d11109SAvinash Patil 4857532c7d0SAmitkumar Karwar 4865e6e3a92SBing Zhao #define CMD_F_HOSTCMD (1 << 0) 4875e6e3a92SBing Zhao 4885e6e3a92SBing Zhao #define HostCmd_CMD_ID_MASK 0x0fff 4895e6e3a92SBing Zhao 4905e6e3a92SBing Zhao #define HostCmd_SEQ_NUM_MASK 0x00ff 4915e6e3a92SBing Zhao 4925e6e3a92SBing Zhao #define HostCmd_BSS_NUM_MASK 0x0f00 4935e6e3a92SBing Zhao 4945e6e3a92SBing Zhao #define HostCmd_BSS_TYPE_MASK 0xf000 4955e6e3a92SBing Zhao 4968a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_RX 0x0001 4978a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_TX 0x0002 4988a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_BOTH 0x0003 4993ee71285SShengzhen Li #define HostCmd_ACT_GET_RX 0x0004 5003ee71285SShengzhen Li #define HostCmd_ACT_GET_TX 0x0008 5013ee71285SShengzhen Li #define HostCmd_ACT_GET_BOTH 0x000c 5028a279d5bSAmitkumar Karwar 5038a279d5bSAmitkumar Karwar #define RF_ANTENNA_AUTO 0xFFFF 5048a279d5bSAmitkumar Karwar 5056a953dc4SNathan Chancellor #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \ 5066a953dc4SNathan Chancellor ((((seq) & 0x00ff) | \ 5075e6e3a92SBing Zhao (((num) & 0x000f) << 8)) | \ 5086a953dc4SNathan Chancellor (((type) & 0x000f) << 12)) 5095e6e3a92SBing Zhao 5105e6e3a92SBing Zhao #define HostCmd_GET_SEQ_NO(seq) \ 5115e6e3a92SBing Zhao ((seq) & HostCmd_SEQ_NUM_MASK) 5125e6e3a92SBing Zhao 5135e6e3a92SBing Zhao #define HostCmd_GET_BSS_NO(seq) \ 5145e6e3a92SBing Zhao (((seq) & HostCmd_BSS_NUM_MASK) >> 8) 5155e6e3a92SBing Zhao 5165e6e3a92SBing Zhao #define HostCmd_GET_BSS_TYPE(seq) \ 5175e6e3a92SBing Zhao (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) 5185e6e3a92SBing Zhao 5195e6e3a92SBing Zhao #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 5205e6e3a92SBing Zhao #define EVENT_LINK_LOST 0x00000003 5215e6e3a92SBing Zhao #define EVENT_LINK_SENSED 0x00000004 5225e6e3a92SBing Zhao #define EVENT_MIB_CHANGED 0x00000006 5235e6e3a92SBing Zhao #define EVENT_INIT_DONE 0x00000007 5245e6e3a92SBing Zhao #define EVENT_DEAUTHENTICATED 0x00000008 5255e6e3a92SBing Zhao #define EVENT_DISASSOCIATED 0x00000009 5265e6e3a92SBing Zhao #define EVENT_PS_AWAKE 0x0000000a 5275e6e3a92SBing Zhao #define EVENT_PS_SLEEP 0x0000000b 5285e6e3a92SBing Zhao #define EVENT_MIC_ERR_MULTICAST 0x0000000d 5295e6e3a92SBing Zhao #define EVENT_MIC_ERR_UNICAST 0x0000000e 5305e6e3a92SBing Zhao #define EVENT_DEEP_SLEEP_AWAKE 0x00000010 5315e6e3a92SBing Zhao #define EVENT_ADHOC_BCN_LOST 0x00000011 5325e6e3a92SBing Zhao 5335e6e3a92SBing Zhao #define EVENT_WMM_STATUS_CHANGE 0x00000017 5345e6e3a92SBing Zhao #define EVENT_BG_SCAN_REPORT 0x00000018 5355e6e3a92SBing Zhao #define EVENT_RSSI_LOW 0x00000019 5365e6e3a92SBing Zhao #define EVENT_SNR_LOW 0x0000001a 5375e6e3a92SBing Zhao #define EVENT_MAX_FAIL 0x0000001b 5385e6e3a92SBing Zhao #define EVENT_RSSI_HIGH 0x0000001c 5395e6e3a92SBing Zhao #define EVENT_SNR_HIGH 0x0000001d 5405e6e3a92SBing Zhao #define EVENT_IBSS_COALESCED 0x0000001e 541432da7d2SXinming Hu #define EVENT_IBSS_STA_CONNECT 0x00000020 542432da7d2SXinming Hu #define EVENT_IBSS_STA_DISCONNECT 0x00000021 5435e6e3a92SBing Zhao #define EVENT_DATA_RSSI_LOW 0x00000024 5445e6e3a92SBing Zhao #define EVENT_DATA_SNR_LOW 0x00000025 5455e6e3a92SBing Zhao #define EVENT_DATA_RSSI_HIGH 0x00000026 5465e6e3a92SBing Zhao #define EVENT_DATA_SNR_HIGH 0x00000027 5475e6e3a92SBing Zhao #define EVENT_LINK_QUALITY 0x00000028 5485e6e3a92SBing Zhao #define EVENT_PORT_RELEASE 0x0000002b 549e568634aSAvinash Patil #define EVENT_UAP_STA_DEAUTH 0x0000002c 550e568634aSAvinash Patil #define EVENT_UAP_STA_ASSOC 0x0000002d 551e568634aSAvinash Patil #define EVENT_UAP_BSS_START 0x0000002e 5525e6e3a92SBing Zhao #define EVENT_PRE_BEACON_LOST 0x00000031 5535e6e3a92SBing Zhao #define EVENT_ADDBA 0x00000033 5545e6e3a92SBing Zhao #define EVENT_DELBA 0x00000034 5555e6e3a92SBing Zhao #define EVENT_BA_STREAM_TIEMOUT 0x00000037 5565e6e3a92SBing Zhao #define EVENT_AMSDU_AGGR_CTRL 0x00000042 557e568634aSAvinash Patil #define EVENT_UAP_BSS_IDLE 0x00000043 558e568634aSAvinash Patil #define EVENT_UAP_BSS_ACTIVE 0x00000044 5595e6e3a92SBing Zhao #define EVENT_WEP_ICV_ERR 0x00000046 5605e6e3a92SBing Zhao #define EVENT_HS_ACT_REQ 0x00000047 5615e6e3a92SBing Zhao #define EVENT_BW_CHANGE 0x00000048 562e568634aSAvinash Patil #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c 5635e6e3a92SBing Zhao #define EVENT_HOSTWAKE_STAIE 0x0000004d 5642a7305c8SAmitkumar Karwar #define EVENT_CHANNEL_SWITCH_ANN 0x00000050 56579ff4346SAvinash Patil #define EVENT_TDLS_GENERIC_EVENT 0x00000052 5663b57c1a7SAvinash Patil #define EVENT_RADAR_DETECTED 0x00000053 5670a694d68SAvinash Patil #define EVENT_CHANNEL_REPORT_RDY 0x00000054 5684e6ee91bSAvinash Patil #define EVENT_TX_DATA_PAUSE 0x00000055 56921f58d20SAmitkumar Karwar #define EVENT_EXT_SCAN_REPORT 0x00000058 57099ffe72cSXinming Hu #define EVENT_RXBA_SYNC 0x00000059 5710ed917d0SBrian Norris #define EVENT_UNKNOWN_DEBUG 0x00000063 5720c9b7f22SXinming Hu #define EVENT_BG_SCAN_STOPPED 0x00000065 573eab1c76bSStone Piao #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f 5748d6b538aSAvinash Patil #define EVENT_MULTI_CHAN_INFO 0x0000006a 575f5ecd02aSXinming Hu #define EVENT_FW_DUMP_INFO 0x00000073 576808bbebcSAmitkumar Karwar #define EVENT_TX_STATUS_REPORT 0x00000074 577d219b7ebSChunfan Chen #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 5785e6e3a92SBing Zhao 5795e6e3a92SBing Zhao #define EVENT_ID_MASK 0xffff 5805e6e3a92SBing Zhao #define BSS_NUM_MASK 0xf 5815e6e3a92SBing Zhao 5825e6e3a92SBing Zhao #define EVENT_GET_BSS_NUM(event_cause) \ 5835e6e3a92SBing Zhao (((event_cause) >> 16) & BSS_NUM_MASK) 5845e6e3a92SBing Zhao 5855e6e3a92SBing Zhao #define EVENT_GET_BSS_TYPE(event_cause) \ 5865e6e3a92SBing Zhao (((event_cause) >> 24) & 0x00ff) 5875e6e3a92SBing Zhao 588b0922ffaSXinming Hu #define MWIFIEX_MAX_PATTERN_LEN 40 589afd84de4SAmitkumar Karwar #define MWIFIEX_MAX_OFFSET_LEN 100 5907d7f07d8Schunfan chen #define MWIFIEX_MAX_ND_MATCH_SETS 10 5917d7f07d8Schunfan chen 5927da060c1SAmitkumar Karwar #define STACK_NBYTES 100 5937da060c1SAmitkumar Karwar #define TYPE_DNUM 1 5947da060c1SAmitkumar Karwar #define TYPE_BYTESEQ 2 5957da060c1SAmitkumar Karwar #define MAX_OPERAND 0x40 5967da060c1SAmitkumar Karwar #define TYPE_EQ (MAX_OPERAND+1) 5977da060c1SAmitkumar Karwar #define TYPE_EQ_DNUM (MAX_OPERAND+2) 5987da060c1SAmitkumar Karwar #define TYPE_EQ_BIT (MAX_OPERAND+3) 5997da060c1SAmitkumar Karwar #define TYPE_AND (MAX_OPERAND+4) 6007da060c1SAmitkumar Karwar #define TYPE_OR (MAX_OPERAND+5) 6017da060c1SAmitkumar Karwar #define MEF_MODE_HOST_SLEEP 1 6027da060c1SAmitkumar Karwar #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 603b533be18SMaithili Hinge #define MEF_ACTION_AUTO_ARP 0x10 6047da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_BROADCAST BIT(0) 6057da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_UNICAST BIT(1) 6067da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_MULTICAST BIT(3) 607b533be18SMaithili Hinge #define MWIFIEX_MAX_SUPPORTED_IPADDR 4 6087da060c1SAmitkumar Karwar 609429d90d2SAvinash Patil #define ACT_TDLS_DELETE 0x00 610429d90d2SAvinash Patil #define ACT_TDLS_CREATE 0x01 611429d90d2SAvinash Patil #define ACT_TDLS_CONFIG 0x02 612f7669877SXinming Hu 61379ff4346SAvinash Patil #define TDLS_EVENT_LINK_TEAR_DOWN 3 614f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_RESULT 7 615f7669877SXinming Hu #define TDLS_EVENT_START_CHAN_SWITCH 8 616f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9 617f7669877SXinming Hu 618f7669877SXinming Hu #define TDLS_BASE_CHANNEL 0 619f7669877SXinming Hu #define TDLS_OFF_CHANNEL 1 620429d90d2SAvinash Patil 621449b8bbfSXinming Hu #define ACT_TDLS_CS_ENABLE_CONFIG 0x00 622449b8bbfSXinming Hu #define ACT_TDLS_CS_INIT 0x06 623449b8bbfSXinming Hu #define ACT_TDLS_CS_STOP 0x07 624449b8bbfSXinming Hu #define ACT_TDLS_CS_PARAMS 0x08 625449b8bbfSXinming Hu 626449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_UNIT_TIME 2 627449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_THR_OTHERLINK 10 628449b8bbfSXinming Hu #define MWIFIEX_DEF_THR_DIRECTLINK 0 629449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIME 10 630449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIMEOUT 16 631449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_REG_CLASS 12 632449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_PERIODICITY 1 633449b8bbfSXinming Hu 6348e17ea25SAmitkumar Karwar #define MWIFIEX_FW_V15 15 6358e17ea25SAmitkumar Karwar 636cf075eacSAvinash Patil #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1) 637cf075eacSAvinash Patil 6385e6e3a92SBing Zhao struct mwifiex_ie_types_header { 6395e6e3a92SBing Zhao __le16 type; 6405e6e3a92SBing Zhao __le16 len; 6415e6e3a92SBing Zhao } __packed; 6425e6e3a92SBing Zhao 6435e6e3a92SBing Zhao struct mwifiex_ie_types_data { 6445e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 6457fcae8f7SGustavo A. R. Silva u8 data[]; 6465e6e3a92SBing Zhao } __packed; 6475e6e3a92SBing Zhao 6485e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01 6495e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08 650b23bce29SAvinash Patil #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10 65109869495SAvinash Patil #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01 652808bbebcSAmitkumar Karwar #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20 6535e6e3a92SBing Zhao 6548de00f1bSchunfan chen enum HS_WAKEUP_REASON { 6558de00f1bSchunfan chen NO_HSWAKEUP_REASON = 0, 6568de00f1bSchunfan chen BCAST_DATA_MATCHED, 6578de00f1bSchunfan chen MCAST_DATA_MATCHED, 6588de00f1bSchunfan chen UCAST_DATA_MATCHED, 6598de00f1bSchunfan chen MASKTABLE_EVENT_MATCHED, 6608de00f1bSchunfan chen NON_MASKABLE_EVENT_MATCHED, 6618de00f1bSchunfan chen NON_MASKABLE_CONDITION_MATCHED, 6628de00f1bSchunfan chen MAGIC_PATTERN_MATCHED, 6638de00f1bSchunfan chen CONTROL_FRAME_MATCHED, 6648de00f1bSchunfan chen MANAGEMENT_FRAME_MATCHED, 6658fa0a0dcSGanapathi Bhat GTK_REKEY_FAILURE, 6668de00f1bSchunfan chen RESERVED 6678de00f1bSchunfan chen }; 6688de00f1bSchunfan chen 6695e6e3a92SBing Zhao struct txpd { 6705e6e3a92SBing Zhao u8 bss_type; 6715e6e3a92SBing Zhao u8 bss_num; 6725e6e3a92SBing Zhao __le16 tx_pkt_length; 6735e6e3a92SBing Zhao __le16 tx_pkt_offset; 6745e6e3a92SBing Zhao __le16 tx_pkt_type; 6755e6e3a92SBing Zhao __le32 tx_control; 6765e6e3a92SBing Zhao u8 priority; 6775e6e3a92SBing Zhao u8 flags; 6785e6e3a92SBing Zhao u8 pkt_delay_2ms; 679808bbebcSAmitkumar Karwar u8 reserved1[2]; 680808bbebcSAmitkumar Karwar u8 tx_token_id; 681808bbebcSAmitkumar Karwar u8 reserved[2]; 6825e6e3a92SBing Zhao } __packed; 6835e6e3a92SBing Zhao 6845e6e3a92SBing Zhao struct rxpd { 6855e6e3a92SBing Zhao u8 bss_type; 6865e6e3a92SBing Zhao u8 bss_num; 687ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_length; 688ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_offset; 689ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_type; 690ed1ea6f4SAmitkumar Karwar __le16 seq_num; 6915e6e3a92SBing Zhao u8 priority; 6925e6e3a92SBing Zhao u8 rx_rate; 6935e6e3a92SBing Zhao s8 snr; 6945e6e3a92SBing Zhao s8 nf; 695a5f39056SYogesh Ashok Powar 696a5f39056SYogesh Ashok Powar /* For: Non-802.11 AC cards 697a5f39056SYogesh Ashok Powar * 698a5f39056SYogesh Ashok Powar * Ht Info [Bit 0] RxRate format: LG=0, HT=1 6995e6e3a92SBing Zhao * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 700a5f39056SYogesh Ashok Powar * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 701a5f39056SYogesh Ashok Powar * 702a5f39056SYogesh Ashok Powar * For: 802.11 AC cards 703a5f39056SYogesh Ashok Powar * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 704a5f39056SYogesh Ashok Powar * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 705a5f39056SYogesh Ashok Powar * BW80 = 10 BW160 = 11 706a5f39056SYogesh Ashok Powar * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 707a5f39056SYogesh Ashok Powar * [Bit 5] STBC support Enabled = 1 708a5f39056SYogesh Ashok Powar * [Bit 6] LDPC support Enabled = 1 709a5f39056SYogesh Ashok Powar * [Bit 7] Reserved 710a5f39056SYogesh Ashok Powar */ 7115e6e3a92SBing Zhao u8 ht_info; 7129d31c1c7SAvinash Patil u8 reserved[3]; 71309869495SAvinash Patil u8 flags; 7145e6e3a92SBing Zhao } __packed; 7155e6e3a92SBing Zhao 716838e4f44SAvinash Patil struct uap_txpd { 717838e4f44SAvinash Patil u8 bss_type; 718838e4f44SAvinash Patil u8 bss_num; 719838e4f44SAvinash Patil __le16 tx_pkt_length; 720838e4f44SAvinash Patil __le16 tx_pkt_offset; 721838e4f44SAvinash Patil __le16 tx_pkt_type; 722838e4f44SAvinash Patil __le32 tx_control; 723838e4f44SAvinash Patil u8 priority; 724838e4f44SAvinash Patil u8 flags; 725838e4f44SAvinash Patil u8 pkt_delay_2ms; 726808bbebcSAmitkumar Karwar u8 reserved1[2]; 727808bbebcSAmitkumar Karwar u8 tx_token_id; 728808bbebcSAmitkumar Karwar u8 reserved[2]; 7295c0b8798SKarthik Ananthapadmanabha } __packed; 730838e4f44SAvinash Patil 731838e4f44SAvinash Patil struct uap_rxpd { 732838e4f44SAvinash Patil u8 bss_type; 733838e4f44SAvinash Patil u8 bss_num; 734838e4f44SAvinash Patil __le16 rx_pkt_length; 735838e4f44SAvinash Patil __le16 rx_pkt_offset; 736838e4f44SAvinash Patil __le16 rx_pkt_type; 737838e4f44SAvinash Patil __le16 seq_num; 738838e4f44SAvinash Patil u8 priority; 739442f6f9bSXinming Hu u8 rx_rate; 740442f6f9bSXinming Hu s8 snr; 741442f6f9bSXinming Hu s8 nf; 742442f6f9bSXinming Hu u8 ht_info; 743442f6f9bSXinming Hu u8 reserved[3]; 744442f6f9bSXinming Hu u8 flags; 7455c0b8798SKarthik Ananthapadmanabha } __packed; 746838e4f44SAvinash Patil 747bf354433SAvinash Patil struct mwifiex_fw_chan_stats { 748bf354433SAvinash Patil u8 chan_num; 749bf354433SAvinash Patil u8 bandcfg; 750bf354433SAvinash Patil u8 flags; 751bf354433SAvinash Patil s8 noise; 752bf354433SAvinash Patil __le16 total_bss; 753bf354433SAvinash Patil __le16 cca_scan_dur; 754bf354433SAvinash Patil __le16 cca_busy_dur; 755bf354433SAvinash Patil } __packed; 756bf354433SAvinash Patil 7575e6e3a92SBing Zhao enum mwifiex_chan_scan_mode_bitmasks { 7585e6e3a92SBing Zhao MWIFIEX_PASSIVE_SCAN = BIT(0), 7595e6e3a92SBing Zhao MWIFIEX_DISABLE_CHAN_FILT = BIT(1), 7602375fa2bSchunfan chen MWIFIEX_HIDDEN_SSID_REPORT = BIT(4), 7615e6e3a92SBing Zhao }; 7625e6e3a92SBing Zhao 7635e6e3a92SBing Zhao struct mwifiex_chan_scan_param_set { 7645e6e3a92SBing Zhao u8 radio_type; 7655e6e3a92SBing Zhao u8 chan_number; 7665e6e3a92SBing Zhao u8 chan_scan_mode_bitmap; 7675e6e3a92SBing Zhao __le16 min_scan_time; 7685e6e3a92SBing Zhao __le16 max_scan_time; 7695e6e3a92SBing Zhao } __packed; 7705e6e3a92SBing Zhao 7715e6e3a92SBing Zhao struct mwifiex_ie_types_chan_list_param_set { 7725e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 77314ddc470SKees Cook struct mwifiex_chan_scan_param_set chan_scan_param[]; 7745e6e3a92SBing Zhao } __packed; 7755e6e3a92SBing Zhao 77699ffe72cSXinming Hu struct mwifiex_ie_types_rxba_sync { 77799ffe72cSXinming Hu struct mwifiex_ie_types_header header; 77899ffe72cSXinming Hu u8 mac[ETH_ALEN]; 77999ffe72cSXinming Hu u8 tid; 78099ffe72cSXinming Hu u8 reserved; 78199ffe72cSXinming Hu __le16 seq_num; 78299ffe72cSXinming Hu __le16 bitmap_len; 783c7847241SGustavo A. R. Silva u8 bitmap[]; 78499ffe72cSXinming Hu } __packed; 78599ffe72cSXinming Hu 7865e6e3a92SBing Zhao struct chan_band_param_set { 7875e6e3a92SBing Zhao u8 radio_type; 7885e6e3a92SBing Zhao u8 chan_number; 7895e6e3a92SBing Zhao }; 7905e6e3a92SBing Zhao 7915e6e3a92SBing Zhao struct mwifiex_ie_types_chan_band_list_param_set { 7925e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 7935e6e3a92SBing Zhao struct chan_band_param_set chan_band_param[1]; 7945e6e3a92SBing Zhao } __packed; 7955e6e3a92SBing Zhao 7965e6e3a92SBing Zhao struct mwifiex_ie_types_rates_param_set { 7975e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 798235fd607SGustavo A. R. Silva u8 rates[]; 7995e6e3a92SBing Zhao } __packed; 8005e6e3a92SBing Zhao 8015e6e3a92SBing Zhao struct mwifiex_ie_types_ssid_param_set { 8025e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8037fcae8f7SGustavo A. R. Silva u8 ssid[]; 8045e6e3a92SBing Zhao } __packed; 8055e6e3a92SBing Zhao 8065e6e3a92SBing Zhao struct mwifiex_ie_types_num_probes { 8075e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8085e6e3a92SBing Zhao __le16 num_probes; 8095e6e3a92SBing Zhao } __packed; 8105e6e3a92SBing Zhao 8110c9b7f22SXinming Hu struct mwifiex_ie_types_repeat_count { 8120c9b7f22SXinming Hu struct mwifiex_ie_types_header header; 8130c9b7f22SXinming Hu __le16 repeat_count; 8140c9b7f22SXinming Hu } __packed; 8150c9b7f22SXinming Hu 816fdcab083SGanapathi Bhat struct mwifiex_ie_types_min_rssi_threshold { 817fdcab083SGanapathi Bhat struct mwifiex_ie_types_header header; 818fdcab083SGanapathi Bhat __le16 rssi_threshold; 819fdcab083SGanapathi Bhat } __packed; 820fdcab083SGanapathi Bhat 8210c9b7f22SXinming Hu struct mwifiex_ie_types_bgscan_start_later { 8220c9b7f22SXinming Hu struct mwifiex_ie_types_header header; 8230c9b7f22SXinming Hu __le16 start_later; 8240c9b7f22SXinming Hu } __packed; 8250c9b7f22SXinming Hu 826cb91be87SAvinash Patil struct mwifiex_ie_types_scan_chan_gap { 827cb91be87SAvinash Patil struct mwifiex_ie_types_header header; 828cb91be87SAvinash Patil /* time gap in TUs to be used between two consecutive channels scan */ 829cb91be87SAvinash Patil __le16 chan_gap; 830cb91be87SAvinash Patil } __packed; 831cb91be87SAvinash Patil 832c2a8f0ffSGanapathi Bhat struct mwifiex_ie_types_random_mac { 833c2a8f0ffSGanapathi Bhat struct mwifiex_ie_types_header header; 834c2a8f0ffSGanapathi Bhat u8 mac[ETH_ALEN]; 835c2a8f0ffSGanapathi Bhat } __packed; 836c2a8f0ffSGanapathi Bhat 837bf354433SAvinash Patil struct mwifiex_ietypes_chanstats { 838bf354433SAvinash Patil struct mwifiex_ie_types_header header; 8392a6be797SGustavo A. R. Silva struct mwifiex_fw_chan_stats chanstats[]; 840bf354433SAvinash Patil } __packed; 841bf354433SAvinash Patil 8425e6e3a92SBing Zhao struct mwifiex_ie_types_wildcard_ssid_params { 8435e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8445e6e3a92SBing Zhao u8 max_ssid_length; 8455e6e3a92SBing Zhao u8 ssid[1]; 8465e6e3a92SBing Zhao } __packed; 8475e6e3a92SBing Zhao 8485e6e3a92SBing Zhao #define TSF_DATA_SIZE 8 8495e6e3a92SBing Zhao struct mwifiex_ie_types_tsf_timestamp { 8505e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8515e6e3a92SBing Zhao u8 tsf_data[1]; 8525e6e3a92SBing Zhao } __packed; 8535e6e3a92SBing Zhao 8545e6e3a92SBing Zhao struct mwifiex_cf_param_set { 8555e6e3a92SBing Zhao u8 cfp_cnt; 8565e6e3a92SBing Zhao u8 cfp_period; 8574348d085SUjjal Roy __le16 cfp_max_duration; 8584348d085SUjjal Roy __le16 cfp_duration_remaining; 8595e6e3a92SBing Zhao } __packed; 8605e6e3a92SBing Zhao 8615e6e3a92SBing Zhao struct mwifiex_ibss_param_set { 8624348d085SUjjal Roy __le16 atim_window; 8635e6e3a92SBing Zhao } __packed; 8645e6e3a92SBing Zhao 8655e6e3a92SBing Zhao struct mwifiex_ie_types_ss_param_set { 8665e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8675e6e3a92SBing Zhao union { 8685e6e3a92SBing Zhao struct mwifiex_cf_param_set cf_param_set[1]; 8695e6e3a92SBing Zhao struct mwifiex_ibss_param_set ibss_param_set[1]; 8705e6e3a92SBing Zhao } cf_ibss; 8715e6e3a92SBing Zhao } __packed; 8725e6e3a92SBing Zhao 8735e6e3a92SBing Zhao struct mwifiex_fh_param_set { 8744348d085SUjjal Roy __le16 dwell_time; 8755e6e3a92SBing Zhao u8 hop_set; 8765e6e3a92SBing Zhao u8 hop_pattern; 8775e6e3a92SBing Zhao u8 hop_index; 8785e6e3a92SBing Zhao } __packed; 8795e6e3a92SBing Zhao 8805e6e3a92SBing Zhao struct mwifiex_ds_param_set { 8815e6e3a92SBing Zhao u8 current_chan; 8825e6e3a92SBing Zhao } __packed; 8835e6e3a92SBing Zhao 8845e6e3a92SBing Zhao struct mwifiex_ie_types_phy_param_set { 8855e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8865e6e3a92SBing Zhao union { 8875e6e3a92SBing Zhao struct mwifiex_fh_param_set fh_param_set[1]; 8885e6e3a92SBing Zhao struct mwifiex_ds_param_set ds_param_set[1]; 8895e6e3a92SBing Zhao } fh_ds; 8905e6e3a92SBing Zhao } __packed; 8915e6e3a92SBing Zhao 8925e6e3a92SBing Zhao struct mwifiex_ie_types_auth_type { 8935e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8945e6e3a92SBing Zhao __le16 auth_type; 8955e6e3a92SBing Zhao } __packed; 8965e6e3a92SBing Zhao 8975e6e3a92SBing Zhao struct mwifiex_ie_types_vendor_param_set { 8985e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8995e6e3a92SBing Zhao u8 ie[MWIFIEX_MAX_VSIE_LEN]; 9005e6e3a92SBing Zhao }; 9015e6e3a92SBing Zhao 90230fa51c8SBing Zhao #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60 903d29caf25SAvinash Patil 904d29caf25SAvinash Patil struct mwifiex_ie_types_tdls_idle_timeout { 905d29caf25SAvinash Patil struct mwifiex_ie_types_header header; 906d29caf25SAvinash Patil __le16 value; 907d29caf25SAvinash Patil } __packed; 908d29caf25SAvinash Patil 9095e6e3a92SBing Zhao struct mwifiex_ie_types_rsn_param_set { 9105e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9117fcae8f7SGustavo A. R. Silva u8 rsn_ie[]; 9125e6e3a92SBing Zhao } __packed; 9135e6e3a92SBing Zhao 9145e6e3a92SBing Zhao #define KEYPARAMSET_FIXED_LEN 6 9155e6e3a92SBing Zhao 9165e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set { 9175e6e3a92SBing Zhao __le16 type; 9185e6e3a92SBing Zhao __le16 length; 9195e6e3a92SBing Zhao __le16 key_type_id; 9205e6e3a92SBing Zhao __le16 key_info; 9215e6e3a92SBing Zhao __le16 key_len; 9225e6e3a92SBing Zhao u8 key[50]; 9235e6e3a92SBing Zhao } __packed; 9245e6e3a92SBing Zhao 925b877f4cfSYing Luo #define IGTK_PN_LEN 8 926b877f4cfSYing Luo 927b877f4cfSYing Luo struct mwifiex_cmac_param { 928b877f4cfSYing Luo u8 ipn[IGTK_PN_LEN]; 929b877f4cfSYing Luo u8 key[WLAN_KEY_LEN_AES_CMAC]; 930b877f4cfSYing Luo } __packed; 931b877f4cfSYing Luo 932e57f1734SAvinash Patil struct mwifiex_wep_param { 933e57f1734SAvinash Patil __le16 key_len; 934e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_WEP104]; 935e57f1734SAvinash Patil } __packed; 936e57f1734SAvinash Patil 937e57f1734SAvinash Patil struct mwifiex_tkip_param { 938e57f1734SAvinash Patil u8 pn[WPA_PN_SIZE]; 939e57f1734SAvinash Patil __le16 key_len; 940e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_TKIP]; 941e57f1734SAvinash Patil } __packed; 942e57f1734SAvinash Patil 943e57f1734SAvinash Patil struct mwifiex_aes_param { 944e57f1734SAvinash Patil u8 pn[WPA_PN_SIZE]; 945e57f1734SAvinash Patil __le16 key_len; 9464afc850eSMaximilian Luz u8 key[WLAN_KEY_LEN_CCMP_256]; 947e57f1734SAvinash Patil } __packed; 948e57f1734SAvinash Patil 949e57f1734SAvinash Patil struct mwifiex_wapi_param { 950e57f1734SAvinash Patil u8 pn[PN_LEN]; 951e57f1734SAvinash Patil __le16 key_len; 952e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_SMS4]; 953e57f1734SAvinash Patil } __packed; 954e57f1734SAvinash Patil 955e57f1734SAvinash Patil struct mwifiex_cmac_aes_param { 956e57f1734SAvinash Patil u8 ipn[IGTK_PN_LEN]; 957e57f1734SAvinash Patil __le16 key_len; 958e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_AES_CMAC]; 959e57f1734SAvinash Patil } __packed; 960e57f1734SAvinash Patil 961e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 { 962e57f1734SAvinash Patil __le16 type; 963e57f1734SAvinash Patil __le16 len; 964e57f1734SAvinash Patil u8 mac_addr[ETH_ALEN]; 965e57f1734SAvinash Patil u8 key_idx; 966e57f1734SAvinash Patil u8 key_type; 967e57f1734SAvinash Patil __le16 key_info; 968e57f1734SAvinash Patil union { 969e57f1734SAvinash Patil struct mwifiex_wep_param wep; 970e57f1734SAvinash Patil struct mwifiex_tkip_param tkip; 971e57f1734SAvinash Patil struct mwifiex_aes_param aes; 972e57f1734SAvinash Patil struct mwifiex_wapi_param wapi; 973e57f1734SAvinash Patil struct mwifiex_cmac_aes_param cmac_aes; 974e57f1734SAvinash Patil } key_params; 975e57f1734SAvinash Patil } __packed; 976e57f1734SAvinash Patil 977e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 { 978e57f1734SAvinash Patil __le16 action; 979e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 key_param_set; 980e57f1734SAvinash Patil } __packed; 981e57f1734SAvinash Patil 9825e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material { 9835e6e3a92SBing Zhao __le16 action; 9845e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set key_param_set; 9855e6e3a92SBing Zhao } __packed; 9865e6e3a92SBing Zhao 98759c668d7SKees Cook struct host_cmd_ds_802_11_key_material_wep { 98859c668d7SKees Cook __le16 action; 98959c668d7SKees Cook struct mwifiex_ie_type_key_param_set key_param_set[NUM_WEP_KEYS]; 99059c668d7SKees Cook } __packed; 99159c668d7SKees Cook 9925e6e3a92SBing Zhao struct host_cmd_ds_gen { 9934348d085SUjjal Roy __le16 command; 9944348d085SUjjal Roy __le16 size; 9954348d085SUjjal Roy __le16 seq_num; 9964348d085SUjjal Roy __le16 result; 9975e6e3a92SBing Zhao }; 9985e6e3a92SBing Zhao 9995e6e3a92SBing Zhao #define S_DS_GEN sizeof(struct host_cmd_ds_gen) 10005e6e3a92SBing Zhao 10015e6e3a92SBing Zhao enum sleep_resp_ctrl { 10025e6e3a92SBing Zhao RESP_NOT_NEEDED = 0, 10035e6e3a92SBing Zhao RESP_NEEDED, 10045e6e3a92SBing Zhao }; 10055e6e3a92SBing Zhao 10065e6e3a92SBing Zhao struct mwifiex_ps_param { 10075e6e3a92SBing Zhao __le16 null_pkt_interval; 10085e6e3a92SBing Zhao __le16 multiple_dtims; 10095e6e3a92SBing Zhao __le16 bcn_miss_timeout; 10105e6e3a92SBing Zhao __le16 local_listen_interval; 10115e6e3a92SBing Zhao __le16 adhoc_wake_period; 10125e6e3a92SBing Zhao __le16 mode; 10135e6e3a92SBing Zhao __le16 delay_to_ps; 10145c0b8798SKarthik Ananthapadmanabha } __packed; 10155e6e3a92SBing Zhao 10166a7b1910SShengzhen Li #define HS_DEF_WAKE_INTERVAL 100 10176a7b1910SShengzhen Li #define HS_DEF_INACTIVITY_TIMEOUT 50 10186a7b1910SShengzhen Li 10196a7b1910SShengzhen Li struct mwifiex_ps_param_in_hs { 10206a7b1910SShengzhen Li struct mwifiex_ie_types_header header; 10216a7b1910SShengzhen Li __le32 hs_wake_int; 10226a7b1910SShengzhen Li __le32 hs_inact_timeout; 10235c0b8798SKarthik Ananthapadmanabha } __packed; 10246a7b1910SShengzhen Li 10255e6e3a92SBing Zhao #define BITMAP_AUTO_DS 0x01 10265e6e3a92SBing Zhao #define BITMAP_STA_PS 0x10 10275e6e3a92SBing Zhao 10285e6e3a92SBing Zhao struct mwifiex_ie_types_auto_ds_param { 10295e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 10302b06bdbeSMarc Yang __le16 deep_sleep_timeout; 10315e6e3a92SBing Zhao } __packed; 10325e6e3a92SBing Zhao 10335e6e3a92SBing Zhao struct mwifiex_ie_types_ps_param { 10345e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 10355e6e3a92SBing Zhao struct mwifiex_ps_param param; 10365e6e3a92SBing Zhao } __packed; 10375e6e3a92SBing Zhao 10385e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh { 10395e6e3a92SBing Zhao __le16 action; 10405e6e3a92SBing Zhao 10415e6e3a92SBing Zhao union { 10425e6e3a92SBing Zhao struct mwifiex_ps_param opt_ps; 10435e6e3a92SBing Zhao __le16 ps_bitmap; 10445e6e3a92SBing Zhao } params; 10455e6e3a92SBing Zhao } __packed; 10465e6e3a92SBing Zhao 10474b9fede5SAmitkumar Karwar enum API_VER_ID { 10487f445d04SAvinash Patil KEY_API_VER_ID = 1, 104989be7cebSAmitkumar Karwar FW_API_VER_ID = 2, 105086cffb2cSPali Rohár UAP_FW_API_VER_ID = 3, 105186cffb2cSPali Rohár CHANRPT_API_VER_ID = 4, 10527715d795SLukas Wunner FW_HOTFIX_VER_ID = 5, 10537f445d04SAvinash Patil }; 10547f445d04SAvinash Patil 10554b9fede5SAmitkumar Karwar struct hw_spec_api_rev { 10567f445d04SAvinash Patil struct mwifiex_ie_types_header header; 10577f445d04SAvinash Patil __le16 api_id; 10587f445d04SAvinash Patil u8 major_ver; 10597f445d04SAvinash Patil u8 minor_ver; 10607f445d04SAvinash Patil } __packed; 10617f445d04SAvinash Patil 10625e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec { 10635e6e3a92SBing Zhao __le16 hw_if_version; 10645e6e3a92SBing Zhao __le16 version; 10655e6e3a92SBing Zhao __le16 reserved; 10665e6e3a92SBing Zhao __le16 num_of_mcast_adr; 10675e6e3a92SBing Zhao u8 permanent_addr[ETH_ALEN]; 10685e6e3a92SBing Zhao __le16 region_code; 10695e6e3a92SBing Zhao __le16 number_of_antenna; 10705e6e3a92SBing Zhao __le32 fw_release_number; 10715e6e3a92SBing Zhao __le32 reserved_1; 10725e6e3a92SBing Zhao __le32 reserved_2; 10735e6e3a92SBing Zhao __le32 reserved_3; 10745e6e3a92SBing Zhao __le32 fw_cap_info; 10755e6e3a92SBing Zhao __le32 dot_11n_dev_cap; 10765e6e3a92SBing Zhao u8 dev_mcs_support; 10775e6e3a92SBing Zhao __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ 1078a5f39056SYogesh Ashok Powar __le16 mgmt_buf_count; /* mgmt IE buffer count */ 1079a5f39056SYogesh Ashok Powar __le32 reserved_5; 1080a5f39056SYogesh Ashok Powar __le32 reserved_6; 1081a5f39056SYogesh Ashok Powar __le32 dot_11ac_dev_cap; 1082a5f39056SYogesh Ashok Powar __le32 dot_11ac_mcs_support; 10832a6be797SGustavo A. R. Silva u8 tlvs[]; 10845e6e3a92SBing Zhao } __packed; 10855e6e3a92SBing Zhao 10865e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info { 10875e6e3a92SBing Zhao __le16 action; 10885e6e3a92SBing Zhao __le16 ndata; 10895e6e3a92SBing Zhao __le16 nbcn; 10905e6e3a92SBing Zhao __le16 reserved[9]; 10915e6e3a92SBing Zhao long long reserved_1; 10925c0b8798SKarthik Ananthapadmanabha } __packed; 10935e6e3a92SBing Zhao 10945e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp { 10955e6e3a92SBing Zhao __le16 action; 10965e6e3a92SBing Zhao __le16 ndata; 10975e6e3a92SBing Zhao __le16 nbcn; 10985e6e3a92SBing Zhao __le16 data_rssi_last; 10995e6e3a92SBing Zhao __le16 data_nf_last; 11005e6e3a92SBing Zhao __le16 data_rssi_avg; 11015e6e3a92SBing Zhao __le16 data_nf_avg; 11025e6e3a92SBing Zhao __le16 bcn_rssi_last; 11035e6e3a92SBing Zhao __le16 bcn_nf_last; 11045e6e3a92SBing Zhao __le16 bcn_rssi_avg; 11055e6e3a92SBing Zhao __le16 bcn_nf_avg; 11065e6e3a92SBing Zhao long long tsf_bcn; 11075c0b8798SKarthik Ananthapadmanabha } __packed; 11085e6e3a92SBing Zhao 11095e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address { 11105e6e3a92SBing Zhao __le16 action; 11115e6e3a92SBing Zhao u8 mac_addr[ETH_ALEN]; 11125c0b8798SKarthik Ananthapadmanabha } __packed; 11135e6e3a92SBing Zhao 11145e6e3a92SBing Zhao struct host_cmd_ds_mac_control { 1115b82dd3bdSAmitkumar Karwar __le32 action; 11165e6e3a92SBing Zhao }; 11175e6e3a92SBing Zhao 11185e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr { 11195e6e3a92SBing Zhao __le16 action; 11205e6e3a92SBing Zhao __le16 num_of_adrs; 11215e6e3a92SBing Zhao u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; 11225e6e3a92SBing Zhao } __packed; 11235e6e3a92SBing Zhao 11245e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate { 11255e6e3a92SBing Zhao u8 mac_addr[ETH_ALEN]; 11265e6e3a92SBing Zhao __le16 reason_code; 11275e6e3a92SBing Zhao } __packed; 11285e6e3a92SBing Zhao 11295e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate { 11305e6e3a92SBing Zhao u8 peer_sta_addr[ETH_ALEN]; 11315e6e3a92SBing Zhao __le16 cap_info_bitmap; 11325e6e3a92SBing Zhao __le16 listen_interval; 11335e6e3a92SBing Zhao __le16 beacon_period; 11345e6e3a92SBing Zhao u8 dtim_period; 11355e6e3a92SBing Zhao } __packed; 11365e6e3a92SBing Zhao 11375e6e3a92SBing Zhao struct ieee_types_assoc_rsp { 11385e6e3a92SBing Zhao __le16 cap_info_bitmap; 11395e6e3a92SBing Zhao __le16 status_code; 11405e6e3a92SBing Zhao __le16 a_id; 11412a6be797SGustavo A. R. Silva u8 ie_buffer[]; 11425e6e3a92SBing Zhao } __packed; 11435e6e3a92SBing Zhao 11445e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp { 11455e6e3a92SBing Zhao struct ieee_types_assoc_rsp assoc_rsp; 11465e6e3a92SBing Zhao } __packed; 11475e6e3a92SBing Zhao 11485e6e3a92SBing Zhao struct ieee_types_cf_param_set { 11495e6e3a92SBing Zhao u8 element_id; 11505e6e3a92SBing Zhao u8 len; 11515e6e3a92SBing Zhao u8 cfp_cnt; 11525e6e3a92SBing Zhao u8 cfp_period; 11534348d085SUjjal Roy __le16 cfp_max_duration; 11544348d085SUjjal Roy __le16 cfp_duration_remaining; 11555e6e3a92SBing Zhao } __packed; 11565e6e3a92SBing Zhao 11575e6e3a92SBing Zhao struct ieee_types_ibss_param_set { 11585e6e3a92SBing Zhao u8 element_id; 11595e6e3a92SBing Zhao u8 len; 11605e6e3a92SBing Zhao __le16 atim_window; 11615e6e3a92SBing Zhao } __packed; 11625e6e3a92SBing Zhao 11635e6e3a92SBing Zhao union ieee_types_ss_param_set { 11645e6e3a92SBing Zhao struct ieee_types_cf_param_set cf_param_set; 11655e6e3a92SBing Zhao struct ieee_types_ibss_param_set ibss_param_set; 11665e6e3a92SBing Zhao } __packed; 11675e6e3a92SBing Zhao 11685e6e3a92SBing Zhao struct ieee_types_fh_param_set { 11695e6e3a92SBing Zhao u8 element_id; 11705e6e3a92SBing Zhao u8 len; 11715e6e3a92SBing Zhao __le16 dwell_time; 11725e6e3a92SBing Zhao u8 hop_set; 11735e6e3a92SBing Zhao u8 hop_pattern; 11745e6e3a92SBing Zhao u8 hop_index; 11755e6e3a92SBing Zhao } __packed; 11765e6e3a92SBing Zhao 11775e6e3a92SBing Zhao struct ieee_types_ds_param_set { 11785e6e3a92SBing Zhao u8 element_id; 11795e6e3a92SBing Zhao u8 len; 11805e6e3a92SBing Zhao u8 current_chan; 11815e6e3a92SBing Zhao } __packed; 11825e6e3a92SBing Zhao 11835e6e3a92SBing Zhao union ieee_types_phy_param_set { 11845e6e3a92SBing Zhao struct ieee_types_fh_param_set fh_param_set; 11855e6e3a92SBing Zhao struct ieee_types_ds_param_set ds_param_set; 11865e6e3a92SBing Zhao } __packed; 11875e6e3a92SBing Zhao 1188a5f39056SYogesh Ashok Powar struct ieee_types_oper_mode_ntf { 1189a5f39056SYogesh Ashok Powar u8 element_id; 1190a5f39056SYogesh Ashok Powar u8 len; 1191a5f39056SYogesh Ashok Powar u8 oper_mode; 1192a5f39056SYogesh Ashok Powar } __packed; 1193a5f39056SYogesh Ashok Powar 11945e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start { 11955e6e3a92SBing Zhao u8 ssid[IEEE80211_MAX_SSID_LEN]; 11965e6e3a92SBing Zhao u8 bss_mode; 11975e6e3a92SBing Zhao __le16 beacon_period; 11985e6e3a92SBing Zhao u8 dtim_period; 11995e6e3a92SBing Zhao union ieee_types_ss_param_set ss_param_set; 12005e6e3a92SBing Zhao union ieee_types_phy_param_set phy_param_set; 12015e6e3a92SBing Zhao u16 reserved1; 12025e6e3a92SBing Zhao __le16 cap_info_bitmap; 120363af6333SYogesh Ashok Powar u8 data_rate[HOSTCMD_SUPPORTED_RATES]; 12045e6e3a92SBing Zhao } __packed; 12055e6e3a92SBing Zhao 1206d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result { 12075e6e3a92SBing Zhao u8 pad[3]; 12085e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 1209d5556e87SAmitkumar Karwar u8 pad2[2]; 1210d5556e87SAmitkumar Karwar u8 result; 1211d5556e87SAmitkumar Karwar } __packed; 1212d5556e87SAmitkumar Karwar 1213d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result { 1214d5556e87SAmitkumar Karwar u8 result; 12155e6e3a92SBing Zhao } __packed; 12165e6e3a92SBing Zhao 12175e6e3a92SBing Zhao struct adhoc_bss_desc { 12185e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 12195e6e3a92SBing Zhao u8 ssid[IEEE80211_MAX_SSID_LEN]; 12205e6e3a92SBing Zhao u8 bss_mode; 12215e6e3a92SBing Zhao __le16 beacon_period; 12225e6e3a92SBing Zhao u8 dtim_period; 12235e6e3a92SBing Zhao u8 time_stamp[8]; 12245e6e3a92SBing Zhao u8 local_time[8]; 12255e6e3a92SBing Zhao union ieee_types_phy_param_set phy_param_set; 12265e6e3a92SBing Zhao union ieee_types_ss_param_set ss_param_set; 12275e6e3a92SBing Zhao __le16 cap_info_bitmap; 12285e6e3a92SBing Zhao u8 data_rates[HOSTCMD_SUPPORTED_RATES]; 12295e6e3a92SBing Zhao 12305e6e3a92SBing Zhao /* 12315e6e3a92SBing Zhao * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. 12325e6e3a92SBing Zhao * It is used in the Adhoc join command and will cause a 12335e6e3a92SBing Zhao * binary layout mismatch with the firmware 12345e6e3a92SBing Zhao */ 12355e6e3a92SBing Zhao } __packed; 12365e6e3a92SBing Zhao 12375e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join { 12385e6e3a92SBing Zhao struct adhoc_bss_desc bss_descriptor; 12395e6e3a92SBing Zhao u16 reserved1; 12405e6e3a92SBing Zhao u16 reserved2; 12415e6e3a92SBing Zhao } __packed; 12425e6e3a92SBing Zhao 12435e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log { 12445e6e3a92SBing Zhao __le32 mcast_tx_frame; 12455e6e3a92SBing Zhao __le32 failed; 12465e6e3a92SBing Zhao __le32 retry; 12475e6e3a92SBing Zhao __le32 multi_retry; 12485e6e3a92SBing Zhao __le32 frame_dup; 12495e6e3a92SBing Zhao __le32 rts_success; 12505e6e3a92SBing Zhao __le32 rts_failure; 12515e6e3a92SBing Zhao __le32 ack_failure; 12525e6e3a92SBing Zhao __le32 rx_frag; 12535e6e3a92SBing Zhao __le32 mcast_rx_frame; 12545e6e3a92SBing Zhao __le32 fcs_error; 12555e6e3a92SBing Zhao __le32 tx_frame; 12565e6e3a92SBing Zhao __le32 reserved; 12575e6e3a92SBing Zhao __le32 wep_icv_err_cnt[4]; 1258d35b6392SXinming Hu __le32 bcn_rcv_cnt; 1259d35b6392SXinming Hu __le32 bcn_miss_cnt; 12605c0b8798SKarthik Ananthapadmanabha } __packed; 12615e6e3a92SBing Zhao 1262a5f39056SYogesh Ashok Powar /* Enumeration for rate format */ 1263a5f39056SYogesh Ashok Powar enum _mwifiex_rate_format { 1264a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_LG = 0, 1265a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_HT, 1266a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_VHT, 1267a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_AUTO = 0xFF, 1268a5f39056SYogesh Ashok Powar }; 1269a5f39056SYogesh Ashok Powar 12705e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query { 12715e6e3a92SBing Zhao u8 tx_rate; 1272a5f39056SYogesh Ashok Powar /* Tx Rate Info: For 802.11 AC cards 1273a5f39056SYogesh Ashok Powar * 1274a5f39056SYogesh Ashok Powar * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 1275a5f39056SYogesh Ashok Powar * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 1276a5f39056SYogesh Ashok Powar * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 1277a5f39056SYogesh Ashok Powar * 1278a5f39056SYogesh Ashok Powar * For non-802.11 AC cards 1279a5f39056SYogesh Ashok Powar * Ht Info [Bit 0] RxRate format: LG=0, HT=1 12805e6e3a92SBing Zhao * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 1281a5f39056SYogesh Ashok Powar * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 1282a5f39056SYogesh Ashok Powar */ 12835e6e3a92SBing Zhao u8 ht_info; 12845e6e3a92SBing Zhao } __packed; 12855e6e3a92SBing Zhao 12864e6ee91bSAvinash Patil struct mwifiex_tx_pause_tlv { 12874e6ee91bSAvinash Patil struct mwifiex_ie_types_header header; 12884e6ee91bSAvinash Patil u8 peermac[ETH_ALEN]; 12894e6ee91bSAvinash Patil u8 tx_pause; 12904e6ee91bSAvinash Patil u8 pkt_cnt; 12914e6ee91bSAvinash Patil } __packed; 12924e6ee91bSAvinash Patil 12935e6e3a92SBing Zhao enum Host_Sleep_Action { 12945e6e3a92SBing Zhao HS_CONFIGURE = 0x0001, 12955e6e3a92SBing Zhao HS_ACTIVATE = 0x0002, 12965e6e3a92SBing Zhao }; 12975e6e3a92SBing Zhao 12985e6e3a92SBing Zhao struct mwifiex_hs_config_param { 12995e6e3a92SBing Zhao __le32 conditions; 13005e6e3a92SBing Zhao u8 gpio; 13015e6e3a92SBing Zhao u8 gap; 13025e6e3a92SBing Zhao } __packed; 13035e6e3a92SBing Zhao 13045e6e3a92SBing Zhao struct hs_activate_param { 13054348d085SUjjal Roy __le16 resp_ctrl; 13065e6e3a92SBing Zhao } __packed; 13075e6e3a92SBing Zhao 13085e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh { 13095e6e3a92SBing Zhao __le16 action; 13105e6e3a92SBing Zhao 13115e6e3a92SBing Zhao union { 13125e6e3a92SBing Zhao struct mwifiex_hs_config_param hs_config; 13135e6e3a92SBing Zhao struct hs_activate_param hs_activate; 13145e6e3a92SBing Zhao } params; 13155e6e3a92SBing Zhao } __packed; 13165e6e3a92SBing Zhao 13175e6e3a92SBing Zhao enum SNMP_MIB_INDEX { 13185e6e3a92SBing Zhao OP_RATE_SET_I = 1, 13195e6e3a92SBing Zhao DTIM_PERIOD_I = 3, 13205e6e3a92SBing Zhao RTS_THRESH_I = 5, 13215e6e3a92SBing Zhao SHORT_RETRY_LIM_I = 6, 13225e6e3a92SBing Zhao LONG_RETRY_LIM_I = 7, 13235e6e3a92SBing Zhao FRAG_THRESH_I = 8, 13245e6e3a92SBing Zhao DOT11D_I = 9, 13252a7305c8SAmitkumar Karwar DOT11H_I = 10, 13265e6e3a92SBing Zhao }; 13275e6e3a92SBing Zhao 132812d11109SAvinash Patil enum mwifiex_assocmd_failurepoint { 132912d11109SAvinash Patil MWIFIEX_ASSOC_CMD_SUCCESS = 0, 133012d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_ASSOC, 133112d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_AUTH, 133212d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_JOIN 133312d11109SAvinash Patil }; 133412d11109SAvinash Patil 13355e6e3a92SBing Zhao #define MAX_SNMP_BUF_SIZE 128 13365e6e3a92SBing Zhao 13375e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib { 13385e6e3a92SBing Zhao __le16 query_type; 13395e6e3a92SBing Zhao __le16 oid; 13405e6e3a92SBing Zhao __le16 buf_size; 13415e6e3a92SBing Zhao u8 value[1]; 13425e6e3a92SBing Zhao } __packed; 13435e6e3a92SBing Zhao 13445e6e3a92SBing Zhao struct mwifiex_rate_scope { 13455e6e3a92SBing Zhao __le16 type; 13465e6e3a92SBing Zhao __le16 length; 13475e6e3a92SBing Zhao __le16 hr_dsss_rate_bitmap; 13485e6e3a92SBing Zhao __le16 ofdm_rate_bitmap; 13495e6e3a92SBing Zhao __le16 ht_mcs_rate_bitmap[8]; 1350a0b7315aSAmitkumar Karwar __le16 vht_mcs_rate_bitmap[8]; 13515e6e3a92SBing Zhao } __packed; 13525e6e3a92SBing Zhao 13535e6e3a92SBing Zhao struct mwifiex_rate_drop_pattern { 13545e6e3a92SBing Zhao __le16 type; 13555e6e3a92SBing Zhao __le16 length; 13565e6e3a92SBing Zhao __le32 rate_drop_mode; 13575e6e3a92SBing Zhao } __packed; 13585e6e3a92SBing Zhao 13595e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg { 13605e6e3a92SBing Zhao __le16 action; 13615e6e3a92SBing Zhao __le16 cfg_index; 13625e6e3a92SBing Zhao } __packed; 13635e6e3a92SBing Zhao 13645e6e3a92SBing Zhao struct mwifiex_power_group { 13655e6e3a92SBing Zhao u8 modulation_class; 13665e6e3a92SBing Zhao u8 first_rate_code; 13675e6e3a92SBing Zhao u8 last_rate_code; 13685e6e3a92SBing Zhao s8 power_step; 13695e6e3a92SBing Zhao s8 power_min; 13705e6e3a92SBing Zhao s8 power_max; 13715e6e3a92SBing Zhao u8 ht_bandwidth; 13725e6e3a92SBing Zhao u8 reserved; 13735e6e3a92SBing Zhao } __packed; 13745e6e3a92SBing Zhao 13755e6e3a92SBing Zhao struct mwifiex_types_power_group { 1376930fd35cSAmitkumar Karwar __le16 type; 1377930fd35cSAmitkumar Karwar __le16 length; 13785e6e3a92SBing Zhao } __packed; 13795e6e3a92SBing Zhao 13805e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg { 13815e6e3a92SBing Zhao __le16 action; 13825e6e3a92SBing Zhao __le16 cfg_index; 13835e6e3a92SBing Zhao __le32 mode; 13845e6e3a92SBing Zhao } __packed; 13855e6e3a92SBing Zhao 1386caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr { 1387caa8984fSAmitkumar Karwar __le16 action; 1388caa8984fSAmitkumar Karwar __le16 cur_level; 1389caa8984fSAmitkumar Karwar u8 max_power; 1390caa8984fSAmitkumar Karwar u8 min_power; 1391caa8984fSAmitkumar Karwar } __packed; 1392caa8984fSAmitkumar Karwar 13938a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo { 13948a279d5bSAmitkumar Karwar __le16 action_tx; 13958a279d5bSAmitkumar Karwar __le16 tx_ant_mode; 13968a279d5bSAmitkumar Karwar __le16 action_rx; 13978a279d5bSAmitkumar Karwar __le16 rx_ant_mode; 13985c0b8798SKarthik Ananthapadmanabha } __packed; 13998a279d5bSAmitkumar Karwar 14008a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso { 14018a279d5bSAmitkumar Karwar __le16 action; 14028a279d5bSAmitkumar Karwar __le16 ant_mode; 14035c0b8798SKarthik Ananthapadmanabha } __packed; 14048a279d5bSAmitkumar Karwar 1405429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper { 1406429d90d2SAvinash Patil __le16 tdls_action; 1407429d90d2SAvinash Patil __le16 reason; 1408429d90d2SAvinash Patil u8 peer_mac[ETH_ALEN]; 1409429d90d2SAvinash Patil } __packed; 1410429d90d2SAvinash Patil 1411449b8bbfSXinming Hu struct mwifiex_tdls_config { 1412449b8bbfSXinming Hu __le16 enable; 14135c0b8798SKarthik Ananthapadmanabha } __packed; 1414449b8bbfSXinming Hu 1415449b8bbfSXinming Hu struct mwifiex_tdls_config_cs_params { 1416449b8bbfSXinming Hu u8 unit_time; 1417449b8bbfSXinming Hu u8 thr_otherlink; 1418449b8bbfSXinming Hu u8 thr_directlink; 14195c0b8798SKarthik Ananthapadmanabha } __packed; 1420449b8bbfSXinming Hu 1421449b8bbfSXinming Hu struct mwifiex_tdls_init_cs_params { 1422449b8bbfSXinming Hu u8 peer_mac[ETH_ALEN]; 1423449b8bbfSXinming Hu u8 primary_chan; 1424449b8bbfSXinming Hu u8 second_chan_offset; 1425449b8bbfSXinming Hu u8 band; 1426449b8bbfSXinming Hu __le16 switch_time; 1427449b8bbfSXinming Hu __le16 switch_timeout; 1428449b8bbfSXinming Hu u8 reg_class; 1429449b8bbfSXinming Hu u8 periodicity; 1430449b8bbfSXinming Hu } __packed; 1431449b8bbfSXinming Hu 1432449b8bbfSXinming Hu struct mwifiex_tdls_stop_cs_params { 1433449b8bbfSXinming Hu u8 peer_mac[ETH_ALEN]; 14345c0b8798SKarthik Ananthapadmanabha } __packed; 1435449b8bbfSXinming Hu 1436449b8bbfSXinming Hu struct host_cmd_ds_tdls_config { 1437449b8bbfSXinming Hu __le16 tdls_action; 14387fcae8f7SGustavo A. R. Silva u8 tdls_data[]; 1439449b8bbfSXinming Hu } __packed; 1440449b8bbfSXinming Hu 144185afb186SAvinash Patil struct mwifiex_chan_desc { 144285afb186SAvinash Patil __le16 start_freq; 144385afb186SAvinash Patil u8 chan_width; 144485afb186SAvinash Patil u8 chan_num; 144585afb186SAvinash Patil } __packed; 144685afb186SAvinash Patil 144785afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req { 144885afb186SAvinash Patil struct mwifiex_chan_desc chan_desc; 144985afb186SAvinash Patil __le32 msec_dwell_time; 145085afb186SAvinash Patil } __packed; 145185afb186SAvinash Patil 14520a694d68SAvinash Patil struct host_cmd_ds_chan_rpt_event { 14530a694d68SAvinash Patil __le32 result; 14540a694d68SAvinash Patil __le64 start_tsf; 14550a694d68SAvinash Patil __le32 duration; 14562a6be797SGustavo A. R. Silva u8 tlvbuf[]; 14570a694d68SAvinash Patil } __packed; 14580a694d68SAvinash Patil 145992263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg { 146092263a84SZhaoyang Liu u8 action; 146192263a84SZhaoyang Liu u8 enable; 146292263a84SZhaoyang Liu __le16 block_size; 146392263a84SZhaoyang Liu } __packed; 146492263a84SZhaoyang Liu 1465b8b3ececSAmitkumar Karwar struct mwifiex_fixed_bcn_param { 1466b5abcf02SAmitkumar Karwar __le64 timestamp; 14677c6fa2a8SAmitkumar Karwar __le16 beacon_period; 14687c6fa2a8SAmitkumar Karwar __le16 cap_info_bitmap; 14697c6fa2a8SAmitkumar Karwar } __packed; 14707c6fa2a8SAmitkumar Karwar 147121f58d20SAmitkumar Karwar struct mwifiex_event_scan_result { 147221f58d20SAmitkumar Karwar __le16 event_id; 147321f58d20SAmitkumar Karwar u8 bss_index; 147421f58d20SAmitkumar Karwar u8 bss_type; 147521f58d20SAmitkumar Karwar u8 more_event; 147621f58d20SAmitkumar Karwar u8 reserved[3]; 147721f58d20SAmitkumar Karwar __le16 buf_size; 147821f58d20SAmitkumar Karwar u8 num_of_set; 147921f58d20SAmitkumar Karwar } __packed; 148021f58d20SAmitkumar Karwar 1481808bbebcSAmitkumar Karwar struct tx_status_event { 1482808bbebcSAmitkumar Karwar u8 packet_type; 1483808bbebcSAmitkumar Karwar u8 tx_token_id; 1484808bbebcSAmitkumar Karwar u8 status; 1485808bbebcSAmitkumar Karwar } __packed; 1486808bbebcSAmitkumar Karwar 14875e6e3a92SBing Zhao #define MWIFIEX_USER_SCAN_CHAN_MAX 50 14885e6e3a92SBing Zhao 14895e6e3a92SBing Zhao #define MWIFIEX_MAX_SSID_LIST_LENGTH 10 14905e6e3a92SBing Zhao 14915e6e3a92SBing Zhao struct mwifiex_scan_cmd_config { 14925e6e3a92SBing Zhao /* 1493a8c48565SBing Zhao * BSS mode to be sent in the firmware command 14945e6e3a92SBing Zhao */ 14955e6e3a92SBing Zhao u8 bss_mode; 14965e6e3a92SBing Zhao 14975e6e3a92SBing Zhao /* Specific BSSID used to filter scan results in the firmware */ 14985e6e3a92SBing Zhao u8 specific_bssid[ETH_ALEN]; 14995e6e3a92SBing Zhao 15005e6e3a92SBing Zhao /* Length of TLVs sent in command starting at tlvBuffer */ 15015e6e3a92SBing Zhao u32 tlv_buf_len; 15025e6e3a92SBing Zhao 15035e6e3a92SBing Zhao /* 15045e6e3a92SBing Zhao * SSID TLV(s) and ChanList TLVs to be sent in the firmware command 15055e6e3a92SBing Zhao * 15065e6e3a92SBing Zhao * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set 15075e6e3a92SBing Zhao * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set 15085e6e3a92SBing Zhao */ 15095e6e3a92SBing Zhao u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored 15105e6e3a92SBing Zhao here */ 15115e6e3a92SBing Zhao } __packed; 15125e6e3a92SBing Zhao 15135e6e3a92SBing Zhao struct mwifiex_user_scan_chan { 15145e6e3a92SBing Zhao u8 chan_number; 15155e6e3a92SBing Zhao u8 radio_type; 15165e6e3a92SBing Zhao u8 scan_type; 15175e6e3a92SBing Zhao u8 reserved; 15185e6e3a92SBing Zhao u32 scan_time; 15195e6e3a92SBing Zhao } __packed; 15205e6e3a92SBing Zhao 15215e6e3a92SBing Zhao struct mwifiex_user_scan_cfg { 15225e6e3a92SBing Zhao /* 15235e6e3a92SBing Zhao * BSS mode to be sent in the firmware command 15245e6e3a92SBing Zhao */ 15255e6e3a92SBing Zhao u8 bss_mode; 15265e6e3a92SBing Zhao /* Configure the number of probe requests for active chan scans */ 15275e6e3a92SBing Zhao u8 num_probes; 15285e6e3a92SBing Zhao u8 reserved; 15295e6e3a92SBing Zhao /* BSSID filter sent in the firmware command to limit the results */ 15305e6e3a92SBing Zhao u8 specific_bssid[ETH_ALEN]; 1531be0b281eSAmitkumar Karwar /* SSID filter list used in the firmware to limit the scan results */ 1532be0b281eSAmitkumar Karwar struct cfg80211_ssid *ssid_list; 1533be0b281eSAmitkumar Karwar u8 num_ssids; 15345e6e3a92SBing Zhao /* Variable number (fixed maximum) of channels to scan up */ 15355e6e3a92SBing Zhao struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX]; 1536cb91be87SAvinash Patil u16 scan_chan_gap; 1537c2a8f0ffSGanapathi Bhat u8 random_mac[ETH_ALEN]; 15385e6e3a92SBing Zhao } __packed; 15395e6e3a92SBing Zhao 15400c9b7f22SXinming Hu #define MWIFIEX_BG_SCAN_CHAN_MAX 38 15410c9b7f22SXinming Hu #define MWIFIEX_BSS_MODE_INFRA 1 15420c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_GET 0x0000 15430c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET 0x0001 15440c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01 15450c9b7f22SXinming Hu /** ssid match */ 15460c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_MATCH 0x0001 15470c9b7f22SXinming Hu /** ssid match and RSSI exceeded */ 15480c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_RSSI_MATCH 0x0004 15490c9b7f22SXinming Hu /**wait for all channel scan to complete to report scan result*/ 15500c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE 0x80000000 15510c9b7f22SXinming Hu 15520c9b7f22SXinming Hu struct mwifiex_bg_scan_cfg { 15530c9b7f22SXinming Hu u16 action; 15540c9b7f22SXinming Hu u8 enable; 15550c9b7f22SXinming Hu u8 bss_type; 15560c9b7f22SXinming Hu u8 chan_per_scan; 15570c9b7f22SXinming Hu u32 scan_interval; 15580c9b7f22SXinming Hu u32 report_condition; 15590c9b7f22SXinming Hu u8 num_probes; 15600c9b7f22SXinming Hu u8 rssi_threshold; 15610c9b7f22SXinming Hu u8 snr_threshold; 15620c9b7f22SXinming Hu u16 repeat_count; 15630c9b7f22SXinming Hu u16 start_later; 15640c9b7f22SXinming Hu struct cfg80211_match_set *ssid_list; 15650c9b7f22SXinming Hu u8 num_ssids; 15660c9b7f22SXinming Hu struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX]; 15670c9b7f22SXinming Hu u16 scan_chan_gap; 15680c9b7f22SXinming Hu } __packed; 15690c9b7f22SXinming Hu 15705e6e3a92SBing Zhao struct ie_body { 15715e6e3a92SBing Zhao u8 grp_key_oui[4]; 15725e6e3a92SBing Zhao u8 ptk_cnt[2]; 15735e6e3a92SBing Zhao u8 ptk_body[4]; 15745e6e3a92SBing Zhao } __packed; 15755e6e3a92SBing Zhao 15765e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan { 15775e6e3a92SBing Zhao u8 bss_mode; 15785e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 15797fcae8f7SGustavo A. R. Silva u8 tlv_buffer[]; 15805e6e3a92SBing Zhao } __packed; 15815e6e3a92SBing Zhao 15825e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp { 15835e6e3a92SBing Zhao __le16 bss_descript_size; 15845e6e3a92SBing Zhao u8 number_of_sets; 15857fcae8f7SGustavo A. R. Silva u8 bss_desc_and_tlv_buffer[]; 15865e6e3a92SBing Zhao } __packed; 15875e6e3a92SBing Zhao 158821f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext { 158921f58d20SAmitkumar Karwar u32 reserved; 159021f58d20SAmitkumar Karwar u8 tlv_buffer[1]; 159121f58d20SAmitkumar Karwar } __packed; 159221f58d20SAmitkumar Karwar 159340d7412bSAniket Nagarnaik struct mwifiex_ie_types_bss_mode { 159440d7412bSAniket Nagarnaik struct mwifiex_ie_types_header header; 159540d7412bSAniket Nagarnaik u8 bss_mode; 159640d7412bSAniket Nagarnaik } __packed; 159740d7412bSAniket Nagarnaik 159821f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_rsp { 159921f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 160021f58d20SAmitkumar Karwar u8 bssid[ETH_ALEN]; 16017fcae8f7SGustavo A. R. Silva u8 frame_body[]; 160221f58d20SAmitkumar Karwar } __packed; 160321f58d20SAmitkumar Karwar 160421f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_info { 160521f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 160621f58d20SAmitkumar Karwar __le16 rssi; 160721f58d20SAmitkumar Karwar __le16 anpi; 160821f58d20SAmitkumar Karwar u8 cca_busy_fraction; 160921f58d20SAmitkumar Karwar u8 radio_type; 161021f58d20SAmitkumar Karwar u8 channel; 161121f58d20SAmitkumar Karwar u8 reserved; 161221f58d20SAmitkumar Karwar __le64 tsf; 161321f58d20SAmitkumar Karwar } __packed; 161421f58d20SAmitkumar Karwar 16150c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config { 16160c9b7f22SXinming Hu __le16 action; 16170c9b7f22SXinming Hu u8 enable; 16180c9b7f22SXinming Hu u8 bss_type; 16190c9b7f22SXinming Hu u8 chan_per_scan; 16200c9b7f22SXinming Hu u8 reserved; 16210c9b7f22SXinming Hu __le16 reserved1; 16220c9b7f22SXinming Hu __le32 scan_interval; 16230c9b7f22SXinming Hu __le32 reserved2; 16240c9b7f22SXinming Hu __le32 report_condition; 16250c9b7f22SXinming Hu __le16 reserved3; 16262a6be797SGustavo A. R. Silva u8 tlv[]; 16270c9b7f22SXinming Hu } __packed; 16280c9b7f22SXinming Hu 16295e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query { 16305e6e3a92SBing Zhao u8 flush; 16315e6e3a92SBing Zhao } __packed; 16325e6e3a92SBing Zhao 16335e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp { 16344348d085SUjjal Roy __le32 report_condition; 16355e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp scan_resp; 16365e6e3a92SBing Zhao } __packed; 16375e6e3a92SBing Zhao 16385e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set { 16395e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 16405e6e3a92SBing Zhao u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; 16415e6e3a92SBing Zhao struct ieee80211_country_ie_triplet triplet[1]; 16425e6e3a92SBing Zhao } __packed; 16435e6e3a92SBing Zhao 16445e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info { 16455e6e3a92SBing Zhao __le16 action; 16465e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set domain; 16475e6e3a92SBing Zhao } __packed; 16485e6e3a92SBing Zhao 16495e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp { 16505e6e3a92SBing Zhao __le16 action; 16515e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set domain; 16525e6e3a92SBing Zhao } __packed; 16535e6e3a92SBing Zhao 16545e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req { 16555e6e3a92SBing Zhao u8 add_req_result; 16565e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 16575e6e3a92SBing Zhao u8 dialog_token; 16585e6e3a92SBing Zhao __le16 block_ack_param_set; 16595e6e3a92SBing Zhao __le16 block_ack_tmo; 16605e6e3a92SBing Zhao __le16 ssn; 16615e6e3a92SBing Zhao } __packed; 16625e6e3a92SBing Zhao 16635e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp { 16645e6e3a92SBing Zhao u8 add_rsp_result; 16655e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 16665e6e3a92SBing Zhao u8 dialog_token; 16675e6e3a92SBing Zhao __le16 status_code; 16685e6e3a92SBing Zhao __le16 block_ack_param_set; 16695e6e3a92SBing Zhao __le16 block_ack_tmo; 16705e6e3a92SBing Zhao __le16 ssn; 16715e6e3a92SBing Zhao } __packed; 16725e6e3a92SBing Zhao 16735e6e3a92SBing Zhao struct host_cmd_ds_11n_delba { 16745e6e3a92SBing Zhao u8 del_result; 16755e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 16765e6e3a92SBing Zhao __le16 del_ba_param_set; 16775e6e3a92SBing Zhao __le16 reason_code; 16785e6e3a92SBing Zhao u8 reserved; 16795e6e3a92SBing Zhao } __packed; 16805e6e3a92SBing Zhao 16815e6e3a92SBing Zhao struct host_cmd_ds_11n_batimeout { 16825e6e3a92SBing Zhao u8 tid; 16835e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 16845e6e3a92SBing Zhao u8 origninator; 16855e6e3a92SBing Zhao } __packed; 16865e6e3a92SBing Zhao 16875e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg { 16885e6e3a92SBing Zhao __le16 action; 16895e6e3a92SBing Zhao __le16 ht_tx_cap; 16905e6e3a92SBing Zhao __le16 ht_tx_info; 1691a5f39056SYogesh Ashok Powar __le16 misc_config; /* Needed for 802.11AC cards only */ 16925e6e3a92SBing Zhao } __packed; 16935e6e3a92SBing Zhao 16945e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg { 16955e6e3a92SBing Zhao __le16 action; 16965e6e3a92SBing Zhao __le16 buff_size; 16975e6e3a92SBing Zhao __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ 16985e6e3a92SBing Zhao __le16 reserved3; 16995e6e3a92SBing Zhao } __packed; 17005e6e3a92SBing Zhao 17015e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl { 17025e6e3a92SBing Zhao __le16 action; 17035e6e3a92SBing Zhao __le16 enable; 17045e6e3a92SBing Zhao __le16 curr_buf_size; 17055e6e3a92SBing Zhao } __packed; 17065e6e3a92SBing Zhao 17070f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth { 17080f9e9b8bSAvinash Patil u8 mac[ETH_ALEN]; 17090f9e9b8bSAvinash Patil __le16 reason; 17100f9e9b8bSAvinash Patil } __packed; 17110f9e9b8bSAvinash Patil 1712b21783e9SXinming Hu struct mwifiex_ie_types_sta_info { 1713b21783e9SXinming Hu struct mwifiex_ie_types_header header; 1714b21783e9SXinming Hu u8 mac[ETH_ALEN]; 1715b21783e9SXinming Hu u8 power_mfg_status; 1716b21783e9SXinming Hu s8 rssi; 1717b21783e9SXinming Hu }; 1718b21783e9SXinming Hu 1719b21783e9SXinming Hu struct host_cmd_ds_sta_list { 1720902831a7SKarthik D A __le16 sta_count; 17212a6be797SGustavo A. R. Silva u8 tlv[]; 1722b21783e9SXinming Hu } __packed; 1723b21783e9SXinming Hu 17242a7305c8SAmitkumar Karwar struct mwifiex_ie_types_pwr_capability { 17252a7305c8SAmitkumar Karwar struct mwifiex_ie_types_header header; 17262a7305c8SAmitkumar Karwar s8 min_pwr; 17272a7305c8SAmitkumar Karwar s8 max_pwr; 17282a7305c8SAmitkumar Karwar }; 17292a7305c8SAmitkumar Karwar 17302a7305c8SAmitkumar Karwar struct mwifiex_ie_types_local_pwr_constraint { 17312a7305c8SAmitkumar Karwar struct mwifiex_ie_types_header header; 17322a7305c8SAmitkumar Karwar u8 chan; 17332a7305c8SAmitkumar Karwar u8 constraint; 17342a7305c8SAmitkumar Karwar }; 17352a7305c8SAmitkumar Karwar 17365e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_param_set { 17375e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 17387fcae8f7SGustavo A. R. Silva u8 wmm_ie[]; 17395c0b8798SKarthik Ananthapadmanabha } __packed; 17405e6e3a92SBing Zhao 1741432da7d2SXinming Hu struct mwifiex_ie_types_mgmt_frame { 1742432da7d2SXinming Hu struct mwifiex_ie_types_header header; 1743432da7d2SXinming Hu __le16 frame_control; 17442a6be797SGustavo A. R. Silva u8 frame_contents[]; 1745432da7d2SXinming Hu }; 1746432da7d2SXinming Hu 17475e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_queue_status { 17485e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 17495e6e3a92SBing Zhao u8 queue_index; 17505e6e3a92SBing Zhao u8 disabled; 17514348d085SUjjal Roy __le16 medium_time; 17525e6e3a92SBing Zhao u8 flow_required; 17535e6e3a92SBing Zhao u8 flow_created; 17545e6e3a92SBing Zhao u32 reserved; 17555e6e3a92SBing Zhao }; 17565e6e3a92SBing Zhao 17575e6e3a92SBing Zhao struct ieee_types_vendor_header { 17585e6e3a92SBing Zhao u8 element_id; 17595e6e3a92SBing Zhao u8 len; 176063d7ef36SBrian Norris struct { 176163d7ef36SBrian Norris u8 oui[3]; 176263d7ef36SBrian Norris u8 oui_type; 176363d7ef36SBrian Norris } __packed oui; 17645e6e3a92SBing Zhao } __packed; 17655e6e3a92SBing Zhao 17665e6e3a92SBing Zhao struct ieee_types_wmm_parameter { 17675e6e3a92SBing Zhao /* 17685e6e3a92SBing Zhao * WMM Parameter IE - Vendor Specific Header: 17695e6e3a92SBing Zhao * element_id [221/0xdd] 17705e6e3a92SBing Zhao * Len [24] 17715e6e3a92SBing Zhao * Oui [00:50:f2] 17725e6e3a92SBing Zhao * OuiType [2] 17735e6e3a92SBing Zhao * OuiSubType [1] 17745e6e3a92SBing Zhao * Version [1] 17755e6e3a92SBing Zhao */ 17765e6e3a92SBing Zhao struct ieee_types_vendor_header vend_hdr; 177763d7ef36SBrian Norris u8 oui_subtype; 177863d7ef36SBrian Norris u8 version; 177963d7ef36SBrian Norris 17805e6e3a92SBing Zhao u8 qos_info_bitmap; 17815e6e3a92SBing Zhao u8 reserved; 178299fec5deSJohannes Berg struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS]; 17835e6e3a92SBing Zhao } __packed; 17845e6e3a92SBing Zhao 17855e6e3a92SBing Zhao struct ieee_types_wmm_info { 17865e6e3a92SBing Zhao 17875e6e3a92SBing Zhao /* 17885e6e3a92SBing Zhao * WMM Info IE - Vendor Specific Header: 17895e6e3a92SBing Zhao * element_id [221/0xdd] 17905e6e3a92SBing Zhao * Len [7] 17915e6e3a92SBing Zhao * Oui [00:50:f2] 17925e6e3a92SBing Zhao * OuiType [2] 17935e6e3a92SBing Zhao * OuiSubType [0] 17945e6e3a92SBing Zhao * Version [1] 17955e6e3a92SBing Zhao */ 17965e6e3a92SBing Zhao struct ieee_types_vendor_header vend_hdr; 179763d7ef36SBrian Norris u8 oui_subtype; 179863d7ef36SBrian Norris u8 version; 17995e6e3a92SBing Zhao 18005e6e3a92SBing Zhao u8 qos_info_bitmap; 18015e6e3a92SBing Zhao } __packed; 18025e6e3a92SBing Zhao 18035e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status { 18045e6e3a92SBing Zhao u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) * 180599fec5deSJohannes Berg IEEE80211_NUM_ACS]; 18065e6e3a92SBing Zhao u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2]; 18075e6e3a92SBing Zhao } __packed; 18085e6e3a92SBing Zhao 18095e6e3a92SBing Zhao struct mwifiex_wmm_ac_status { 18105e6e3a92SBing Zhao u8 disabled; 18115e6e3a92SBing Zhao u8 flow_required; 18125e6e3a92SBing Zhao u8 flow_created; 18135e6e3a92SBing Zhao }; 18145e6e3a92SBing Zhao 18155e6e3a92SBing Zhao struct mwifiex_ie_types_htcap { 18165e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 18175e6e3a92SBing Zhao struct ieee80211_ht_cap ht_cap; 18185e6e3a92SBing Zhao } __packed; 18195e6e3a92SBing Zhao 1820a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vhtcap { 1821a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1822a5f39056SYogesh Ashok Powar struct ieee80211_vht_cap vht_cap; 1823a5f39056SYogesh Ashok Powar } __packed; 1824a5f39056SYogesh Ashok Powar 18255f6d5983SAvinash Patil struct mwifiex_ie_types_aid { 18265f6d5983SAvinash Patil struct mwifiex_ie_types_header header; 18275f6d5983SAvinash Patil __le16 aid; 18285f6d5983SAvinash Patil } __packed; 18295f6d5983SAvinash Patil 1830a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_oper_mode_ntf { 1831a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1832a5f39056SYogesh Ashok Powar u8 oper_mode; 1833a5f39056SYogesh Ashok Powar } __packed; 1834a5f39056SYogesh Ashok Powar 1835a5f39056SYogesh Ashok Powar /* VHT Operations IE */ 1836a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vht_oper { 1837a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1838a5f39056SYogesh Ashok Powar u8 chan_width; 1839a5f39056SYogesh Ashok Powar u8 chan_center_freq_1; 1840a5f39056SYogesh Ashok Powar u8 chan_center_freq_2; 1841a5f39056SYogesh Ashok Powar /* Basic MCS set map, each 2 bits stands for a NSS */ 18424348d085SUjjal Roy __le16 basic_mcs_map; 1843a5f39056SYogesh Ashok Powar } __packed; 1844a5f39056SYogesh Ashok Powar 184554428c57SAvinash Patil struct mwifiex_ie_types_wmmcap { 184654428c57SAvinash Patil struct mwifiex_ie_types_header header; 184754428c57SAvinash Patil struct mwifiex_types_wmm_info wmm_info; 184854428c57SAvinash Patil } __packed; 184954428c57SAvinash Patil 18505e6e3a92SBing Zhao struct mwifiex_ie_types_htinfo { 18515e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 1852074d46d1SJohannes Berg struct ieee80211_ht_operation ht_oper; 18535e6e3a92SBing Zhao } __packed; 18545e6e3a92SBing Zhao 18555e6e3a92SBing Zhao struct mwifiex_ie_types_2040bssco { 18565e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 18575e6e3a92SBing Zhao u8 bss_co_2040; 18585e6e3a92SBing Zhao } __packed; 18595e6e3a92SBing Zhao 18605e6e3a92SBing Zhao struct mwifiex_ie_types_extcap { 18615e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 18622a6be797SGustavo A. R. Silva u8 ext_capab[]; 18635e6e3a92SBing Zhao } __packed; 18645e6e3a92SBing Zhao 1865c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access { 1866c2c6c85fSChin-ran Lo __le16 action; 1867c2c6c85fSChin-ran Lo __le16 reserved; 1868c2c6c85fSChin-ran Lo __le32 addr; 1869c2c6c85fSChin-ran Lo __le32 value; 18705c0b8798SKarthik Ananthapadmanabha } __packed; 1871c2c6c85fSChin-ran Lo 18721f4dfd8aSAvinash Patil struct mwifiex_ie_types_qos_info { 18731f4dfd8aSAvinash Patil struct mwifiex_ie_types_header header; 18741f4dfd8aSAvinash Patil u8 qos_info; 18751f4dfd8aSAvinash Patil } __packed; 18761f4dfd8aSAvinash Patil 18775e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access { 18785e6e3a92SBing Zhao __le16 action; 18795e6e3a92SBing Zhao __le16 offset; 18805e6e3a92SBing Zhao __le32 value; 18815e6e3a92SBing Zhao } __packed; 18825e6e3a92SBing Zhao 18835e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access { 18845e6e3a92SBing Zhao __le16 action; 18855e6e3a92SBing Zhao __le16 offset; 18865e6e3a92SBing Zhao u8 value; 18875e6e3a92SBing Zhao u8 reserved[3]; 18885e6e3a92SBing Zhao } __packed; 18895e6e3a92SBing Zhao 18905e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access { 18915e6e3a92SBing Zhao __le16 action; 18925e6e3a92SBing Zhao __le16 offset; 18935e6e3a92SBing Zhao u8 value; 18945e6e3a92SBing Zhao u8 reserved[3]; 18955e6e3a92SBing Zhao } __packed; 18965e6e3a92SBing Zhao 18975e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access { 18985e6e3a92SBing Zhao __le16 action; 18995e6e3a92SBing Zhao __le16 offset; 19005e6e3a92SBing Zhao u8 value; 19015e6e3a92SBing Zhao u8 reserved[3]; 19025e6e3a92SBing Zhao } __packed; 19035e6e3a92SBing Zhao 19045e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access { 19055e6e3a92SBing Zhao __le16 action; 19065e6e3a92SBing Zhao 19075e6e3a92SBing Zhao __le16 offset; 19085e6e3a92SBing Zhao __le16 byte_count; 19095e6e3a92SBing Zhao u8 value; 19105e6e3a92SBing Zhao } __packed; 19115e6e3a92SBing Zhao 1912e568634aSAvinash Patil struct mwifiex_assoc_event { 1913e568634aSAvinash Patil u8 sta_addr[ETH_ALEN]; 1914e568634aSAvinash Patil __le16 type; 1915e568634aSAvinash Patil __le16 len; 1916e568634aSAvinash Patil __le16 frame_control; 1917e568634aSAvinash Patil __le16 cap_info; 1918e568634aSAvinash Patil __le16 listen_interval; 19192a6be797SGustavo A. R. Silva u8 data[]; 1920e568634aSAvinash Patil } __packed; 1921e568634aSAvinash Patil 19224db16a18SAvinash Patil struct host_cmd_ds_sys_config { 19234db16a18SAvinash Patil __le16 action; 19242a6be797SGustavo A. R. Silva u8 tlv[]; 19254db16a18SAvinash Patil }; 1926f752dcd5SAvinash Patil 192783c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg { 192883c78da9SYogesh Ashok Powar __le16 action; 192983c78da9SYogesh Ashok Powar u8 band_config; 193083c78da9SYogesh Ashok Powar u8 misc_config; 193183c78da9SYogesh Ashok Powar __le32 cap_info; 193283c78da9SYogesh Ashok Powar __le32 mcs_tx_set; 193383c78da9SYogesh Ashok Powar __le32 mcs_rx_set; 193483c78da9SYogesh Ashok Powar } __packed; 193583c78da9SYogesh Ashok Powar 1936f752dcd5SAvinash Patil struct host_cmd_tlv_akmp { 19376b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1938f752dcd5SAvinash Patil __le16 key_mgmt; 1939f752dcd5SAvinash Patil __le16 key_mgmt_operation; 1940f752dcd5SAvinash Patil } __packed; 1941f752dcd5SAvinash Patil 1942f752dcd5SAvinash Patil struct host_cmd_tlv_pwk_cipher { 19436b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1944f752dcd5SAvinash Patil __le16 proto; 1945f752dcd5SAvinash Patil u8 cipher; 1946f752dcd5SAvinash Patil u8 reserved; 1947f752dcd5SAvinash Patil } __packed; 1948f752dcd5SAvinash Patil 1949f752dcd5SAvinash Patil struct host_cmd_tlv_gwk_cipher { 19506b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1951f752dcd5SAvinash Patil u8 cipher; 1952f752dcd5SAvinash Patil u8 reserved; 1953f752dcd5SAvinash Patil } __packed; 1954f752dcd5SAvinash Patil 1955f752dcd5SAvinash Patil struct host_cmd_tlv_passphrase { 19566b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 19572a6be797SGustavo A. R. Silva u8 passphrase[]; 1958f752dcd5SAvinash Patil } __packed; 1959f752dcd5SAvinash Patil 196096893538SAvinash Patil struct host_cmd_tlv_wep_key { 19616b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 196296893538SAvinash Patil u8 key_index; 196396893538SAvinash Patil u8 is_default; 19647fcae8f7SGustavo A. R. Silva u8 key[]; 196596893538SAvinash Patil }; 196696893538SAvinash Patil 1967f752dcd5SAvinash Patil struct host_cmd_tlv_auth_type { 19686b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1969f752dcd5SAvinash Patil u8 auth_type; 1970f752dcd5SAvinash Patil } __packed; 1971f752dcd5SAvinash Patil 1972f752dcd5SAvinash Patil struct host_cmd_tlv_encrypt_protocol { 19736b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1974f752dcd5SAvinash Patil __le16 proto; 1975f752dcd5SAvinash Patil } __packed; 1976f752dcd5SAvinash Patil 197712190c5dSAvinash Patil struct host_cmd_tlv_ssid { 19786b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 19792a6be797SGustavo A. R. Silva u8 ssid[]; 198012190c5dSAvinash Patil } __packed; 198112190c5dSAvinash Patil 1982a3c2c4f6SAvinash Patil struct host_cmd_tlv_rates { 19836b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 19842a6be797SGustavo A. R. Silva u8 rates[]; 1985a3c2c4f6SAvinash Patil } __packed; 1986a3c2c4f6SAvinash Patil 198721f58d20SAmitkumar Karwar struct mwifiex_ie_types_bssid_list { 198821f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 198921f58d20SAmitkumar Karwar u8 bssid[ETH_ALEN]; 199021f58d20SAmitkumar Karwar } __packed; 199121f58d20SAmitkumar Karwar 1992605b73afSAvinash Patil struct host_cmd_tlv_bcast_ssid { 19936b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1994605b73afSAvinash Patil u8 bcast_ctl; 1995605b73afSAvinash Patil } __packed; 1996605b73afSAvinash Patil 199712190c5dSAvinash Patil struct host_cmd_tlv_beacon_period { 19986b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 199912190c5dSAvinash Patil __le16 period; 200012190c5dSAvinash Patil } __packed; 200112190c5dSAvinash Patil 200212190c5dSAvinash Patil struct host_cmd_tlv_dtim_period { 20036b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 200412190c5dSAvinash Patil u8 period; 200512190c5dSAvinash Patil } __packed; 20064db16a18SAvinash Patil 20079b930eaeSAvinash Patil struct host_cmd_tlv_frag_threshold { 20086b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20099b930eaeSAvinash Patil __le16 frag_thr; 20109b930eaeSAvinash Patil } __packed; 20119b930eaeSAvinash Patil 20129b930eaeSAvinash Patil struct host_cmd_tlv_rts_threshold { 20136b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20149b930eaeSAvinash Patil __le16 rts_thr; 20159b930eaeSAvinash Patil } __packed; 20169b930eaeSAvinash Patil 20179b930eaeSAvinash Patil struct host_cmd_tlv_retry_limit { 20186b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20199b930eaeSAvinash Patil u8 limit; 20209b930eaeSAvinash Patil } __packed; 20219b930eaeSAvinash Patil 202275edd2c6SAvinash Patil struct host_cmd_tlv_mac_addr { 20236b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 202475edd2c6SAvinash Patil u8 mac_addr[ETH_ALEN]; 202575edd2c6SAvinash Patil } __packed; 202675edd2c6SAvinash Patil 20274db16a18SAvinash Patil struct host_cmd_tlv_channel_band { 20286b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20294db16a18SAvinash Patil u8 band_config; 20304db16a18SAvinash Patil u8 channel; 20314db16a18SAvinash Patil } __packed; 20324db16a18SAvinash Patil 20338b4509f6SKevin Gan struct host_cmd_tlv_ageout_timer { 20346b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20358b4509f6SKevin Gan __le32 sta_ao_timer; 20368b4509f6SKevin Gan } __packed; 20378b4509f6SKevin Gan 20388a73dd63SAvinash Patil struct host_cmd_tlv_power_constraint { 20398a73dd63SAvinash Patil struct mwifiex_ie_types_header header; 20408a73dd63SAvinash Patil u8 constraint; 20418a73dd63SAvinash Patil } __packed; 20428a73dd63SAvinash Patil 2043d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_scan_time { 2044d219b7ebSChunfan Chen struct mwifiex_ie_types_header header; 2045d219b7ebSChunfan Chen u8 coex_scan; 2046d219b7ebSChunfan Chen u8 reserved; 2047c18b104dSPrasun Maiti __le16 min_scan_time; 2048c18b104dSPrasun Maiti __le16 max_scan_time; 2049d219b7ebSChunfan Chen } __packed; 2050d219b7ebSChunfan Chen 2051d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_aggr_win_size { 2052d219b7ebSChunfan Chen struct mwifiex_ie_types_header header; 2053d219b7ebSChunfan Chen u8 coex_win_size; 2054d219b7ebSChunfan Chen u8 tx_win_size; 2055d219b7ebSChunfan Chen u8 rx_win_size; 2056d219b7ebSChunfan Chen u8 reserved; 2057d219b7ebSChunfan Chen } __packed; 2058d219b7ebSChunfan Chen 205946dbe247SAmitkumar Karwar struct mwifiex_ie_types_robust_coex { 206046dbe247SAmitkumar Karwar struct mwifiex_ie_types_header header; 206146dbe247SAmitkumar Karwar __le32 mode; 206246dbe247SAmitkumar Karwar } __packed; 206346dbe247SAmitkumar Karwar 20642d1d7091SJonas Dreßler #define MWIFIEX_VERSION_STR_LENGTH 128 20652d1d7091SJonas Dreßler 20665e6e3a92SBing Zhao struct host_cmd_ds_version_ext { 20675e6e3a92SBing Zhao u8 version_str_sel; 20682d1d7091SJonas Dreßler char version_str[MWIFIEX_VERSION_STR_LENGTH]; 20695e6e3a92SBing Zhao } __packed; 20705e6e3a92SBing Zhao 20713cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg { 20723cec6870SStone Piao __le16 action; 20733cec6870SStone Piao __le32 mask; 20743cec6870SStone Piao } __packed; 20753cec6870SStone Piao 2076e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg { 2077e1a2b7a3SStone Piao __le16 action; 2078e1a2b7a3SStone Piao __le16 mode; 2079e1a2b7a3SStone Piao } __packed; 2080e1a2b7a3SStone Piao 20817feb4c48SStone Piao struct host_cmd_ds_remain_on_chan { 20827feb4c48SStone Piao __le16 action; 20837feb4c48SStone Piao u8 status; 20847feb4c48SStone Piao u8 reserved; 20857feb4c48SStone Piao u8 band_cfg; 20867feb4c48SStone Piao u8 channel; 20877feb4c48SStone Piao __le32 duration; 20887feb4c48SStone Piao } __packed; 20897feb4c48SStone Piao 20905e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status { 20915e6e3a92SBing Zhao __le16 action; 20925e6e3a92SBing Zhao __le16 enable; 20935e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 20945e6e3a92SBing Zhao __le16 beacon_interval; 20955e6e3a92SBing Zhao __le16 atim_window; 20965e6e3a92SBing Zhao __le16 use_g_rate_protect; 20975e6e3a92SBing Zhao } __packed; 20985e6e3a92SBing Zhao 20997da060c1SAmitkumar Karwar struct mwifiex_fw_mef_entry { 21007da060c1SAmitkumar Karwar u8 mode; 21017da060c1SAmitkumar Karwar u8 action; 21027da060c1SAmitkumar Karwar __le16 exprsize; 21032a6be797SGustavo A. R. Silva u8 expr[]; 21047da060c1SAmitkumar Karwar } __packed; 21057da060c1SAmitkumar Karwar 21067da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg { 21077da060c1SAmitkumar Karwar __le32 criteria; 21087da060c1SAmitkumar Karwar __le16 num_entries; 21094cf4cf6eSJohannes Berg u8 mef_entry_data[]; 21107da060c1SAmitkumar Karwar } __packed; 21117da060c1SAmitkumar Karwar 21125e6e3a92SBing Zhao #define CONNECTION_TYPE_INFRA 0 21135e6e3a92SBing Zhao #define CONNECTION_TYPE_ADHOC 1 21149197ab9eSStone Piao #define CONNECTION_TYPE_AP 2 21155e6e3a92SBing Zhao 21165e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode { 21175e6e3a92SBing Zhao u8 con_type; 21185e6e3a92SBing Zhao } __packed; 21195e6e3a92SBing Zhao 2120d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details { 2121d930faeeSAmitkumar Karwar /* TX buffer descriptor ring address */ 2122902831a7SKarthik D A __le32 txbd_addr_lo; 2123902831a7SKarthik D A __le32 txbd_addr_hi; 2124d930faeeSAmitkumar Karwar /* TX buffer descriptor ring count */ 2125902831a7SKarthik D A __le32 txbd_count; 2126d930faeeSAmitkumar Karwar 2127d930faeeSAmitkumar Karwar /* RX buffer descriptor ring address */ 2128902831a7SKarthik D A __le32 rxbd_addr_lo; 2129902831a7SKarthik D A __le32 rxbd_addr_hi; 2130d930faeeSAmitkumar Karwar /* RX buffer descriptor ring count */ 2131902831a7SKarthik D A __le32 rxbd_count; 2132d930faeeSAmitkumar Karwar 2133d930faeeSAmitkumar Karwar /* Event buffer descriptor ring address */ 2134902831a7SKarthik D A __le32 evtbd_addr_lo; 2135902831a7SKarthik D A __le32 evtbd_addr_hi; 2136d930faeeSAmitkumar Karwar /* Event buffer descriptor ring count */ 2137902831a7SKarthik D A __le32 evtbd_count; 2138d930faeeSAmitkumar Karwar 2139d930faeeSAmitkumar Karwar /* Sleep cookie buffer physical address */ 2140902831a7SKarthik D A __le32 sleep_cookie_addr_lo; 2141902831a7SKarthik D A __le32 sleep_cookie_addr_hi; 2142d930faeeSAmitkumar Karwar } __packed; 2143d930faeeSAmitkumar Karwar 2144fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_rssi_threshold { 2145fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_header header; 2146fa444bf8SAmitkumar Karwar u8 abs_value; 2147fa444bf8SAmitkumar Karwar u8 evt_freq; 2148fa444bf8SAmitkumar Karwar } __packed; 2149fa444bf8SAmitkumar Karwar 21503b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_LEN 8 21513b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_NUM 10 21523b57c1a7SAvinash Patil #define MWIFIEX_BIN_COUNTER_LEN 7 21533b57c1a7SAvinash Patil 21543b57c1a7SAvinash Patil struct mwifiex_radar_det_event { 21553b57c1a7SAvinash Patil __le32 detect_count; 21563b57c1a7SAvinash Patil u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ 21573b57c1a7SAvinash Patil u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ 21583b57c1a7SAvinash Patil __le16 pw_chirp_type; 21593b57c1a7SAvinash Patil u8 pw_chirp_idx; 21603b57c1a7SAvinash Patil u8 pw_value; 21613b57c1a7SAvinash Patil u8 pri_radar_type; 21623b57c1a7SAvinash Patil u8 pri_bincnt; 21633b57c1a7SAvinash Patil u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN]; 21643b57c1a7SAvinash Patil u8 num_dfs_records; 21653b57c1a7SAvinash Patil u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN]; 21663b57c1a7SAvinash Patil __le32 passed; 21673b57c1a7SAvinash Patil } __packed; 21683b57c1a7SAvinash Patil 21698d6b538aSAvinash Patil struct mwifiex_ie_types_multi_chan_info { 21708d6b538aSAvinash Patil struct mwifiex_ie_types_header header; 21718d6b538aSAvinash Patil __le16 status; 21722a6be797SGustavo A. R. Silva u8 tlv_buffer[]; 21738d6b538aSAvinash Patil } __packed; 21748d6b538aSAvinash Patil 21752b0f997dSZhaoyang Liu struct mwifiex_ie_types_mc_group_info { 21762b0f997dSZhaoyang Liu struct mwifiex_ie_types_header header; 21772b0f997dSZhaoyang Liu u8 chan_group_id; 21782b0f997dSZhaoyang Liu u8 chan_buf_weight; 21792b0f997dSZhaoyang Liu u8 band_config; 21802b0f997dSZhaoyang Liu u8 chan_num; 2181902831a7SKarthik D A __le32 chan_time; 2182902831a7SKarthik D A __le32 reserved; 21832b0f997dSZhaoyang Liu union { 21842b0f997dSZhaoyang Liu u8 sdio_func_num; 21852b0f997dSZhaoyang Liu u8 usb_ep_num; 21862b0f997dSZhaoyang Liu } hid_num; 21872b0f997dSZhaoyang Liu u8 intf_num; 21882a6be797SGustavo A. R. Silva u8 bss_type_numlist[]; 21892b0f997dSZhaoyang Liu } __packed; 21902b0f997dSZhaoyang Liu 21910a694d68SAvinash Patil struct meas_rpt_map { 21920a694d68SAvinash Patil u8 rssi:3; 21930a694d68SAvinash Patil u8 unmeasured:1; 21940a694d68SAvinash Patil u8 radar:1; 21950a694d68SAvinash Patil u8 unidentified_sig:1; 21960a694d68SAvinash Patil u8 ofdm_preamble:1; 21970a694d68SAvinash Patil u8 bss:1; 21980a694d68SAvinash Patil } __packed; 21990a694d68SAvinash Patil 22000a694d68SAvinash Patil struct mwifiex_ie_types_chan_rpt_data { 22010a694d68SAvinash Patil struct mwifiex_ie_types_header header; 22020a694d68SAvinash Patil struct meas_rpt_map map; 22030a694d68SAvinash Patil } __packed; 22040a694d68SAvinash Patil 2205fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt { 2206fa444bf8SAmitkumar Karwar __le16 action; 2207fa444bf8SAmitkumar Karwar __le16 events; 2208fa444bf8SAmitkumar Karwar } __packed; 2209fa444bf8SAmitkumar Karwar 2210f7669877SXinming Hu struct chan_switch_result { 2211f7669877SXinming Hu u8 cur_chan; 2212f7669877SXinming Hu u8 status; 2213f7669877SXinming Hu u8 reason; 2214f7669877SXinming Hu } __packed; 2215f7669877SXinming Hu 221679ff4346SAvinash Patil struct mwifiex_tdls_generic_event { 221779ff4346SAvinash Patil __le16 type; 221879ff4346SAvinash Patil u8 peer_mac[ETH_ALEN]; 221979ff4346SAvinash Patil union { 2220f7669877SXinming Hu struct chan_switch_result switch_result; 2221f7669877SXinming Hu u8 cs_stop_reason; 222279ff4346SAvinash Patil __le16 reason_code; 222379ff4346SAvinash Patil __le16 reserved; 222479ff4346SAvinash Patil } u; 222579ff4346SAvinash Patil } __packed; 222679ff4346SAvinash Patil 2227ede98bfaSAvinash Patil struct mwifiex_ie { 2228ede98bfaSAvinash Patil __le16 ie_index; 2229ede98bfaSAvinash Patil __le16 mgmt_subtype_mask; 2230ede98bfaSAvinash Patil __le16 ie_length; 2231ede98bfaSAvinash Patil u8 ie_buffer[IEEE_MAX_IE_SIZE]; 2232ede98bfaSAvinash Patil } __packed; 2233ede98bfaSAvinash Patil 2234ede98bfaSAvinash Patil #define MAX_MGMT_IE_INDEX 16 2235ede98bfaSAvinash Patil struct mwifiex_ie_list { 2236ede98bfaSAvinash Patil __le16 type; 2237ede98bfaSAvinash Patil __le16 len; 2238ede98bfaSAvinash Patil struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX]; 2239ede98bfaSAvinash Patil } __packed; 2240ede98bfaSAvinash Patil 2241562fc5b3SAmitkumar Karwar struct coalesce_filt_field_param { 2242562fc5b3SAmitkumar Karwar u8 operation; 2243562fc5b3SAmitkumar Karwar u8 operand_len; 2244562fc5b3SAmitkumar Karwar __le16 offset; 2245562fc5b3SAmitkumar Karwar u8 operand_byte_stream[4]; 2246562fc5b3SAmitkumar Karwar }; 2247562fc5b3SAmitkumar Karwar 2248562fc5b3SAmitkumar Karwar struct coalesce_receive_filt_rule { 2249562fc5b3SAmitkumar Karwar struct mwifiex_ie_types_header header; 2250562fc5b3SAmitkumar Karwar u8 num_of_fields; 2251562fc5b3SAmitkumar Karwar u8 pkt_type; 2252562fc5b3SAmitkumar Karwar __le16 max_coalescing_delay; 22532a6be797SGustavo A. R. Silva struct coalesce_filt_field_param params[]; 2254562fc5b3SAmitkumar Karwar } __packed; 2255562fc5b3SAmitkumar Karwar 2256562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg { 2257562fc5b3SAmitkumar Karwar __le16 action; 2258562fc5b3SAmitkumar Karwar __le16 num_of_rules; 22594cf4cf6eSJohannes Berg u8 rule_data[]; 2260562fc5b3SAmitkumar Karwar } __packed; 2261562fc5b3SAmitkumar Karwar 2262d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy { 2263d5b036c4SAvinash Patil __le16 action; 2264d5b036c4SAvinash Patil __le16 policy; 2265d5b036c4SAvinash Patil } __packed; 2266d5b036c4SAvinash Patil 226746dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex { 226846dbe247SAmitkumar Karwar __le16 action; 226946dbe247SAmitkumar Karwar __le16 reserved; 227046dbe247SAmitkumar Karwar } __packed; 227146dbe247SAmitkumar Karwar 22728de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason { 2273902831a7SKarthik D A __le16 wakeup_reason; 22748de00f1bSchunfan chen } __packed; 22758de00f1bSchunfan chen 2276f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params { 2277f6b1cbe0SGanapathi Bhat __le16 action; 2278f6b1cbe0SGanapathi Bhat u8 kck[NL80211_KCK_LEN]; 2279f6b1cbe0SGanapathi Bhat u8 kek[NL80211_KEK_LEN]; 2280f6b1cbe0SGanapathi Bhat __le32 replay_ctr_low; 2281f6b1cbe0SGanapathi Bhat __le32 replay_ctr_high; 2282f6b1cbe0SGanapathi Bhat } __packed; 2283f6b1cbe0SGanapathi Bhat 228441960b4dSAmitkumar Karwar struct host_cmd_ds_chan_region_cfg { 228541960b4dSAmitkumar Karwar __le16 action; 228641960b4dSAmitkumar Karwar } __packed; 228741960b4dSAmitkumar Karwar 2288c5994293SXinming Hu struct host_cmd_ds_pkt_aggr_ctrl { 2289c5994293SXinming Hu __le16 action; 2290c5994293SXinming Hu __le16 enable; 2291c5994293SXinming Hu __le16 tx_aggr_max_size; 2292c5994293SXinming Hu __le16 tx_aggr_max_num; 2293c5994293SXinming Hu __le16 tx_aggr_align; 2294c5994293SXinming Hu } __packed; 2295c5994293SXinming Hu 229628bf8312SGanapathi Bhat struct host_cmd_ds_sta_configure { 229728bf8312SGanapathi Bhat __le16 action; 22982a6be797SGustavo A. R. Silva u8 tlv_buffer[]; 229928bf8312SGanapathi Bhat } __packed; 230028bf8312SGanapathi Bhat 23015e6e3a92SBing Zhao struct host_cmd_ds_command { 23025e6e3a92SBing Zhao __le16 command; 23035e6e3a92SBing Zhao __le16 size; 23045e6e3a92SBing Zhao __le16 seq_num; 23055e6e3a92SBing Zhao __le16 result; 23065e6e3a92SBing Zhao union { 23075e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec hw_spec; 23085e6e3a92SBing Zhao struct host_cmd_ds_mac_control mac_ctrl; 23095e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address mac_addr; 23105e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr mc_addr; 23115e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log get_log; 23125e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info rssi_info; 23135e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; 23145e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib smib; 23155e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query tx_rate; 23165e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; 23175e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg txp_cfg; 2318caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr txp; 23198a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo ant_mimo; 23208a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso ant_siso; 23215e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; 23225e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; 23235e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan scan; 232421f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext ext_scan; 23255e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp scan_resp; 23260c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config bg_scan_config; 23275e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; 23285e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; 23295e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate associate; 23305e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp associate_rsp; 23315e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate deauth; 23325e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start adhoc_start; 2333d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result start_result; 2334d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result join_result; 23355e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join adhoc_join; 23365e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info domain_info; 23375e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; 23385e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req add_ba_req; 23395e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp add_ba_rsp; 23405e6e3a92SBing Zhao struct host_cmd_ds_11n_delba del_ba; 23415e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg tx_buf; 23425e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; 23435e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg htcfg; 23445e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status get_wmm_status; 23455e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material key_material; 2346e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 key_material_v2; 234759c668d7SKees Cook struct host_cmd_ds_802_11_key_material_wep key_material_wep; 23485e6e3a92SBing Zhao struct host_cmd_ds_version_ext verext; 23493cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg reg_mask; 23507feb4c48SStone Piao struct host_cmd_ds_remain_on_chan roc_cfg; 2351e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg mode_cfg; 23525e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status ibss_coalescing; 23537da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg mef_cfg; 2354c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access mem; 23555e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access mac_reg; 23565e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access bbp_reg; 23575e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access rf_reg; 23585e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access pmic_reg; 23595e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode bss_mode; 2360d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details pcie_host_spec; 23615e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access eeprom; 2362fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt subsc_evt; 23634db16a18SAvinash Patil struct host_cmd_ds_sys_config uap_sys_config; 23640f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth sta_deauth; 2365b21783e9SXinming Hu struct host_cmd_ds_sta_list sta_list; 236683c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg vht_cfg; 2367562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg coalesce_cfg; 2368449b8bbfSXinming Hu struct host_cmd_ds_tdls_config tdls_config; 2369429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper tdls_oper; 237085afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req chan_rpt_req; 237192263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; 2372d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy mc_policy; 237346dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex coex; 23748de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason hs_wakeup_reason; 2375f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params rekey; 237641960b4dSAmitkumar Karwar struct host_cmd_ds_chan_region_cfg reg_cfg; 2377c5994293SXinming Hu struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl; 237828bf8312SGanapathi Bhat struct host_cmd_ds_sta_configure sta_cfg; 23795e6e3a92SBing Zhao } params; 23805e6e3a92SBing Zhao } __packed; 23815e6e3a92SBing Zhao 23825e6e3a92SBing Zhao struct mwifiex_opt_sleep_confirm { 23835e6e3a92SBing Zhao __le16 command; 23845e6e3a92SBing Zhao __le16 size; 23855e6e3a92SBing Zhao __le16 seq_num; 23865e6e3a92SBing Zhao __le16 result; 23875e6e3a92SBing Zhao __le16 action; 23882b06bdbeSMarc Yang __le16 resp_ctrl; 23895e6e3a92SBing Zhao } __packed; 2390982d7287SPali Rohár 2391982d7287SPali Rohár struct hw_spec_max_conn { 2392982d7287SPali Rohár struct mwifiex_ie_types_header header; 2393982d7287SPali Rohár u8 max_p2p_conn; 2394982d7287SPali Rohár u8 max_sta_conn; 2395982d7287SPali Rohár } __packed; 2396982d7287SPali Rohár 23975e6e3a92SBing Zhao #endif /* !_MWIFIEX_FW_H_ */ 2398