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) 21336995892SDavid Lin #define TLV_TYPE_HOST_MLME (PROPRIETARY_TLV_BASE_ID + 307) 2149588469dSDavid Lin #define TLV_TYPE_UAP_STA_FLAGS (PROPRIETARY_TLV_BASE_ID + 313) 21536995892SDavid Lin #define TLV_TYPE_SAE_PWE_MODE (PROPRIETARY_TLV_BASE_ID + 339) 2165e6e3a92SBing Zhao 2175e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 2185e6e3a92SBing Zhao 2195e6e3a92SBing Zhao #define SSN_MASK 0xfff0 2205e6e3a92SBing Zhao 2215e6e3a92SBing Zhao #define BA_RESULT_SUCCESS 0x0 2225e6e3a92SBing Zhao #define BA_RESULT_TIMEOUT 0x2 2235e6e3a92SBing Zhao 2245e6e3a92SBing Zhao #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) 2255e6e3a92SBing Zhao 2265e6e3a92SBing Zhao #define BA_STREAM_NOT_ALLOWED 0xff 2275e6e3a92SBing Zhao 2285e6e3a92SBing Zhao #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ 229931f1584SYogesh Ashok Powar priv->adapter->config_bands & BAND_AN) && \ 230c6c65a84SGanapathi Bhat priv->curr_bss_params.bss_descriptor.bcn_ht_cap && \ 231c6c65a84SGanapathi Bhat !priv->curr_bss_params.bss_descriptor.disable_11n) 2325e6e3a92SBing Zhao #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ 2335e6e3a92SBing Zhao BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) 2345e6e3a92SBing Zhao 2355e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096 2365e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192 237432da7d2SXinming Hu #define MWIFIEX_TX_DATA_BUF_SIZE_12K 12288 2385e6e3a92SBing Zhao 2395e6e3a92SBing Zhao #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11)) 240b23bce29SAvinash Patil #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14)) 241d5b036c4SAvinash Patil #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15)) 24292263a84SZhaoyang Liu #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16)) 243e267e71eSKarthik D A #define ISSUPP_ADHOC_ENABLED(FwCapInfo) (FwCapInfo & BIT(25)) 244073a435dSKarthik Ananthapadmanabha #define ISSUPP_RANDOM_MAC(FwCapInfo) (FwCapInfo & BIT(27)) 245ae30bdaaSGanapathi Bhat #define ISSUPP_FIRMWARE_SUPPLICANT(FwCapInfo) (FwCapInfo & BIT(21)) 2466d2bd916SMarc Yang 24722281256SAvinash Patil #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ 24822281256SAvinash Patil (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ 24922281256SAvinash Patil IEEE80211_HT_CAP_SM_PS) 25022281256SAvinash Patil 251645097ceSAmitkumar Karwar #define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008 252645097ceSAmitkumar Karwar 25322281256SAvinash Patil #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR 25422281256SAvinash Patil 2556d2bd916SMarc Yang /* dev_cap bitmap 2566d2bd916SMarc Yang * BIT 2576d2bd916SMarc Yang * 0-16 reserved 2586d2bd916SMarc Yang * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40 2596d2bd916SMarc Yang * 18-22 reserved 2606d2bd916SMarc Yang * 23 IEEE80211_HT_CAP_SGI_20 2616d2bd916SMarc Yang * 24 IEEE80211_HT_CAP_SGI_40 2626d2bd916SMarc Yang * 25 IEEE80211_HT_CAP_TX_STBC 2636d2bd916SMarc Yang * 26 IEEE80211_HT_CAP_RX_STBC 2646d2bd916SMarc Yang * 27-28 reserved 2656d2bd916SMarc Yang * 29 IEEE80211_HT_CAP_GRN_FLD 2666d2bd916SMarc Yang * 30-31 reserved 2676d2bd916SMarc Yang */ 2685e6e3a92SBing Zhao #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17)) 2696d2bd916SMarc Yang #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23)) 2706d2bd916SMarc Yang #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24)) 2716d2bd916SMarc Yang #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25)) 2726d2bd916SMarc Yang #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) 2736d2bd916SMarc Yang #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) 274dd0d83c2SAvinash Patil #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8)) 275dd0d83c2SAvinash Patil #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) 276645097ceSAmitkumar Karwar #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) 277396939f9SAvinash Patil #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) 2784f3dfdfbSAvinash Patil #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) 2796d2bd916SMarc Yang 280cd27bc3cSAmitkumar Karwar /* httxcfg bitmap 281cd27bc3cSAmitkumar Karwar * 0 reserved 282cd27bc3cSAmitkumar Karwar * 1 20/40 Mhz enable(1)/disable(0) 283cd27bc3cSAmitkumar Karwar * 2-3 reserved 284cd27bc3cSAmitkumar Karwar * 4 green field enable(1)/disable(0) 285cd27bc3cSAmitkumar Karwar * 5 short GI in 20 Mhz enable(1)/disable(0) 286cd27bc3cSAmitkumar Karwar * 6 short GI in 40 Mhz enable(1)/disable(0) 287cd27bc3cSAmitkumar Karwar * 7-15 reserved 288cd27bc3cSAmitkumar Karwar */ 289cd27bc3cSAmitkumar Karwar #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) 290cd27bc3cSAmitkumar Karwar 291a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 1x1 mode: 292a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 293a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams 294a5333914SAmitkumar Karwar */ 295a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe 296a5333914SAmitkumar Karwar 297a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 2x2 mode: 298a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2 299a5333914SAmitkumar Karwar * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams 300a5333914SAmitkumar Karwar */ 301a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa 302a5333914SAmitkumar Karwar 3035e6e3a92SBing Zhao #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) 3045e6e3a92SBing Zhao #define SETHT_MCS32(x) (x[4] |= 1) 305a5333914SAmitkumar Karwar #define HT_STREAM_1X1 0x11 306e3bea1c8SBing Zhao #define HT_STREAM_2X2 0x22 3075e6e3a92SBing Zhao 3085e6e3a92SBing Zhao #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) 3095e6e3a92SBing Zhao 3105e6e3a92SBing Zhao #define LLC_SNAP_LEN 8 3115e6e3a92SBing Zhao 312a5f39056SYogesh Ashok Powar /* HW_SPEC fw_cap_info */ 313a5f39056SYogesh Ashok Powar 314f25b1431SBing Zhao #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13)) 315a5f39056SYogesh Ashok Powar 316a5f39056SYogesh Ashok Powar #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) 317a5f39056SYogesh Ashok Powar #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) 318a5f39056SYogesh Ashok Powar #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \ 319a5f39056SYogesh Ashok Powar (2 * (nss - 1))) 320a5f39056SYogesh Ashok Powar #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16) 321a5f39056SYogesh Ashok Powar #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF) 322a5f39056SYogesh Ashok Powar 32379d9a54cSAmitkumar Karwar /* Clear SU Beanformer, MU beanformer, MU beanformee and 32479d9a54cSAmitkumar Karwar * sounding dimensions bits 32579d9a54cSAmitkumar Karwar */ 32679d9a54cSAmitkumar Karwar #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \ 32779d9a54cSAmitkumar Karwar (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ 32879d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ 32979d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ 33079d9a54cSAmitkumar Karwar IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) 33179d9a54cSAmitkumar Karwar 3325e6e3a92SBing Zhao #define MOD_CLASS_HR_DSSS 0x03 3335e6e3a92SBing Zhao #define MOD_CLASS_OFDM 0x07 3345e6e3a92SBing Zhao #define MOD_CLASS_HT 0x08 3355e6e3a92SBing Zhao #define HT_BW_20 0 3365e6e3a92SBing Zhao #define HT_BW_40 1 3375e6e3a92SBing Zhao 338b887664dSAmitkumar Karwar #define DFS_CHAN_MOVE_TIME 10000 339b887664dSAmitkumar Karwar 3405e6e3a92SBing Zhao #define HostCmd_CMD_GET_HW_SPEC 0x0003 3415e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SCAN 0x0006 3425e6e3a92SBing Zhao #define HostCmd_CMD_802_11_GET_LOG 0x000b 3435e6e3a92SBing Zhao #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 3445e6e3a92SBing Zhao #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 3455e6e3a92SBing Zhao #define HostCmd_CMD_802_11_ASSOCIATE 0x0012 3465e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SNMP_MIB 0x0016 3475e6e3a92SBing Zhao #define HostCmd_CMD_MAC_REG_ACCESS 0x0019 3485e6e3a92SBing Zhao #define HostCmd_CMD_BBP_REG_ACCESS 0x001a 3495e6e3a92SBing Zhao #define HostCmd_CMD_RF_REG_ACCESS 0x001b 3505e6e3a92SBing Zhao #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad 351caa8984fSAmitkumar Karwar #define HostCmd_CMD_RF_TX_PWR 0x001e 3528a279d5bSAmitkumar Karwar #define HostCmd_CMD_RF_ANTENNA 0x0020 3535e6e3a92SBing Zhao #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 3545e6e3a92SBing Zhao #define HostCmd_CMD_MAC_CONTROL 0x0028 3555e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_START 0x002b 3565e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c 3575e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 3585e6e3a92SBing Zhao #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D 3595e6e3a92SBing Zhao #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b 3605e6e3a92SBing Zhao #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e 3610c9b7f22SXinming Hu #define HostCmd_CMD_802_11_BG_SCAN_CONFIG 0x006b 3625e6e3a92SBing Zhao #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c 3635e6e3a92SBing Zhao #define HostCmd_CMD_WMM_GET_STATUS 0x0071 364fa444bf8SAmitkumar Karwar #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 3655e6e3a92SBing Zhao #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f 3665e6e3a92SBing Zhao #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 367c2c6c85fSChin-ran Lo #define HostCmd_CMD_MEM_ACCESS 0x0086 368388ec385SAmitkumar Karwar #define HostCmd_CMD_CFG_DATA 0x008f 3695e6e3a92SBing Zhao #define HostCmd_CMD_VERSION_EXT 0x0097 3707da060c1SAmitkumar Karwar #define HostCmd_CMD_MEF_CFG 0x009a 3715e6e3a92SBing Zhao #define HostCmd_CMD_RSSI_INFO 0x00a4 3725e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_INIT 0x00a9 3735e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa 374ed5cfbe6SAvinash Patil #define HOST_CMD_APCMD_SYS_RESET 0x00af 37540d07030SAvinash Patil #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 37640d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_START 0x00b1 37740d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_STOP 0x00b2 378b21783e9SXinming Hu #define HOST_CMD_APCMD_STA_LIST 0x00b3 3790f9e9b8bSAvinash Patil #define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5 3805e6e3a92SBing Zhao #define HostCmd_CMD_11N_CFG 0x00cd 3815e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce 3825e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf 3835e6e3a92SBing Zhao #define HostCmd_CMD_11N_DELBA 0x00d0 3845e6e3a92SBing Zhao #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 38585afb186SAvinash Patil #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd 3865e6e3a92SBing Zhao #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df 3875e6e3a92SBing Zhao #define HostCmd_CMD_TXPWR_CFG 0x00d1 3885e6e3a92SBing Zhao #define HostCmd_CMD_TX_RATE_CFG 0x00d6 38946dbe247SAmitkumar Karwar #define HostCmd_CMD_ROBUST_COEX 0x00e0 3905e6e3a92SBing Zhao #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 3915e6e3a92SBing Zhao #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 392e1a2b7a3SStone Piao #define HostCmd_CMD_P2P_MODE_CFG 0x00eb 3935e6e3a92SBing Zhao #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed 3945e6e3a92SBing Zhao #define HostCmd_CMD_SET_BSS_MODE 0x00f7 395d930faeeSAmitkumar Karwar #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa 39621f58d20SAmitkumar Karwar #define HostCmd_CMD_802_11_SCAN_EXT 0x0107 397562fc5b3SAmitkumar Karwar #define HostCmd_CMD_COALESCE_CFG 0x010a 3983cec6870SStone Piao #define HostCmd_CMD_MGMT_FRAME_REG 0x010c 3997feb4c48SStone Piao #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d 400f6b1cbe0SGanapathi Bhat #define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG 0x010f 40183c78da9SYogesh Ashok Powar #define HostCmd_CMD_11AC_CFG 0x0112 4028de00f1bSchunfan chen #define HostCmd_CMD_HS_WAKEUP_REASON 0x0116 403449b8bbfSXinming Hu #define HostCmd_CMD_TDLS_CONFIG 0x0100 404d5b036c4SAvinash Patil #define HostCmd_CMD_MC_POLICY 0x0121 405429d90d2SAvinash Patil #define HostCmd_CMD_TDLS_OPER 0x0122 40618d60501SXinming Hu #define HostCmd_CMD_FW_DUMP_EVENT 0x0125 40792263a84SZhaoyang Liu #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 40828bf8312SGanapathi Bhat #define HostCmd_CMD_STA_CONFIGURE 0x023f 40941960b4dSAmitkumar Karwar #define HostCmd_CMD_CHAN_REGION_CFG 0x0242 410c5994293SXinming Hu #define HostCmd_CMD_PACKET_AGGR_CTRL 0x0251 4119588469dSDavid Lin #define HostCmd_CMD_ADD_NEW_STATION 0x025f 4125e6e3a92SBing Zhao 413f752dcd5SAvinash Patil #define PROTOCOL_NO_SECURITY 0x01 414f752dcd5SAvinash Patil #define PROTOCOL_STATIC_WEP 0x02 415f752dcd5SAvinash Patil #define PROTOCOL_WPA 0x08 416f752dcd5SAvinash Patil #define PROTOCOL_WPA2 0x20 417f752dcd5SAvinash Patil #define PROTOCOL_WPA2_MIXED 0x28 418f752dcd5SAvinash Patil #define PROTOCOL_EAP 0x40 419f752dcd5SAvinash Patil #define KEY_MGMT_NONE 0x04 420f752dcd5SAvinash Patil #define KEY_MGMT_PSK 0x02 421f752dcd5SAvinash Patil #define KEY_MGMT_EAP 0x01 422ca0107c3SSascha Hauer #define KEY_MGMT_PSK_SHA256 0x100 4239588469dSDavid Lin #define KEY_MGMT_SAE 0x400 424f752dcd5SAvinash Patil #define CIPHER_TKIP 0x04 425f752dcd5SAvinash Patil #define CIPHER_AES_CCMP 0x08 426f752dcd5SAvinash Patil #define VALID_CIPHER_BITMAP 0x0c 427f752dcd5SAvinash Patil 4285e6e3a92SBing Zhao enum ENH_PS_MODES { 4295e6e3a92SBing Zhao EN_PS = 1, 4305e6e3a92SBing Zhao DIS_PS = 2, 4315e6e3a92SBing Zhao EN_AUTO_DS = 3, 4325e6e3a92SBing Zhao DIS_AUTO_DS = 4, 4335e6e3a92SBing Zhao SLEEP_CONFIRM = 5, 4345e6e3a92SBing Zhao GET_PS = 0, 4355e6e3a92SBing Zhao EN_AUTO_PS = 0xff, 4365e6e3a92SBing Zhao DIS_AUTO_PS = 0xfe, 4375e6e3a92SBing Zhao }; 4385e6e3a92SBing Zhao 439e1a2b7a3SStone Piao enum P2P_MODES { 440e1a2b7a3SStone Piao P2P_MODE_DISABLE = 0, 441e1a2b7a3SStone Piao P2P_MODE_DEVICE = 1, 442e1a2b7a3SStone Piao P2P_MODE_GO = 2, 443e1a2b7a3SStone Piao P2P_MODE_CLIENT = 3, 444e1a2b7a3SStone Piao }; 445e1a2b7a3SStone Piao 44672539799SAmitkumar Karwar enum mwifiex_channel_flags { 44772539799SAmitkumar Karwar MWIFIEX_CHANNEL_PASSIVE = BIT(0), 44872539799SAmitkumar Karwar MWIFIEX_CHANNEL_DFS = BIT(1), 44972539799SAmitkumar Karwar MWIFIEX_CHANNEL_NOHT40 = BIT(2), 45072539799SAmitkumar Karwar MWIFIEX_CHANNEL_NOHT80 = BIT(3), 45172539799SAmitkumar Karwar MWIFIEX_CHANNEL_DISABLED = BIT(7), 45272539799SAmitkumar Karwar }; 45372539799SAmitkumar Karwar 4545e6e3a92SBing Zhao #define HostCmd_RET_BIT 0x8000 4555e6e3a92SBing Zhao #define HostCmd_ACT_GEN_GET 0x0000 4565e6e3a92SBing Zhao #define HostCmd_ACT_GEN_SET 0x0001 4579868c4ceSJeff Chen #define HOST_CMD_ACT_GEN_SET 0x0001 4589868c4ceSJeff Chen /* Add this non-CamelCase-style macro to comply with checkpatch requirements. 4599868c4ceSJeff Chen * This macro will eventually replace all existing CamelCase-style macros in 4609868c4ceSJeff Chen * the future for consistency. 4619868c4ceSJeff Chen */ 4627feb4c48SStone Piao #define HostCmd_ACT_GEN_REMOVE 0x0004 463fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_SET 0x0002 464fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_CLR 0x0003 4655e6e3a92SBing Zhao #define HostCmd_RESULT_OK 0x0000 466b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_RX_ON BIT(0) 467b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_TX_ON BIT(1) 468b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_WEP_ENABLE BIT(3) 469b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ETHERNETII_ENABLE BIT(4) 470b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE BIT(7) 471b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE BIT(8) 472b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13) 473d7864cf2SAmitkumar Karwar #define HostCmd_ACT_MAC_DYNAMIC_BW_ENABLE BIT(16) 4745e6e3a92SBing Zhao 4755e6e3a92SBing Zhao #define HostCmd_BSS_MODE_IBSS 0x0002 4765e6e3a92SBing Zhao #define HostCmd_BSS_MODE_ANY 0x0003 4775e6e3a92SBing Zhao 4785e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_BG 0 4795e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_A 1 4805e6e3a92SBing Zhao 481cc0b5a64SAmitkumar Karwar #define HS_CFG_CANCEL 0xffffffff 482cc0b5a64SAmitkumar Karwar #define HS_CFG_COND_DEF 0x00000000 483cc0b5a64SAmitkumar Karwar #define HS_CFG_GPIO_DEF 0xff 484915f36d2SBing Zhao #define HS_CFG_GAP_DEF 0xff 4850d7f53e3SAmitkumar Karwar #define HS_CFG_COND_BROADCAST_DATA 0x00000001 4860d7f53e3SAmitkumar Karwar #define HS_CFG_COND_UNICAST_DATA 0x00000002 4870d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MAC_EVENT 0x00000004 4880d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MULTICAST_DATA 0x00000008 4895e6e3a92SBing Zhao 49012d11109SAvinash Patil #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB 49112d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC 49212d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD 49312d11109SAvinash Patil #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE 49412d11109SAvinash Patil #define CONNECT_ERR_STA_FAILURE 0xFFFF 49512d11109SAvinash Patil 4967532c7d0SAmitkumar Karwar 4975e6e3a92SBing Zhao #define CMD_F_HOSTCMD (1 << 0) 4985e6e3a92SBing Zhao 4995e6e3a92SBing Zhao #define HostCmd_CMD_ID_MASK 0x0fff 5005e6e3a92SBing Zhao 5015e6e3a92SBing Zhao #define HostCmd_SEQ_NUM_MASK 0x00ff 5025e6e3a92SBing Zhao 5035e6e3a92SBing Zhao #define HostCmd_BSS_NUM_MASK 0x0f00 5045e6e3a92SBing Zhao 5055e6e3a92SBing Zhao #define HostCmd_BSS_TYPE_MASK 0xf000 5065e6e3a92SBing Zhao 5078a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_RX 0x0001 5088a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_TX 0x0002 5098a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_BOTH 0x0003 5103ee71285SShengzhen Li #define HostCmd_ACT_GET_RX 0x0004 5113ee71285SShengzhen Li #define HostCmd_ACT_GET_TX 0x0008 5123ee71285SShengzhen Li #define HostCmd_ACT_GET_BOTH 0x000c 5138a279d5bSAmitkumar Karwar 5149588469dSDavid Lin #define HostCmd_ACT_REMOVE_STA 0x0 5159588469dSDavid Lin #define HostCmd_ACT_ADD_STA 0x1 5169588469dSDavid Lin 5178a279d5bSAmitkumar Karwar #define RF_ANTENNA_AUTO 0xFFFF 5188a279d5bSAmitkumar Karwar 5196a953dc4SNathan Chancellor #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \ 5206a953dc4SNathan Chancellor ((((seq) & 0x00ff) | \ 5215e6e3a92SBing Zhao (((num) & 0x000f) << 8)) | \ 5226a953dc4SNathan Chancellor (((type) & 0x000f) << 12)) 5235e6e3a92SBing Zhao 5245e6e3a92SBing Zhao #define HostCmd_GET_SEQ_NO(seq) \ 5255e6e3a92SBing Zhao ((seq) & HostCmd_SEQ_NUM_MASK) 5265e6e3a92SBing Zhao 5275e6e3a92SBing Zhao #define HostCmd_GET_BSS_NO(seq) \ 5285e6e3a92SBing Zhao (((seq) & HostCmd_BSS_NUM_MASK) >> 8) 5295e6e3a92SBing Zhao 5305e6e3a92SBing Zhao #define HostCmd_GET_BSS_TYPE(seq) \ 5315e6e3a92SBing Zhao (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) 5325e6e3a92SBing Zhao 5335e6e3a92SBing Zhao #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 5345e6e3a92SBing Zhao #define EVENT_LINK_LOST 0x00000003 5355e6e3a92SBing Zhao #define EVENT_LINK_SENSED 0x00000004 5365e6e3a92SBing Zhao #define EVENT_MIB_CHANGED 0x00000006 5375e6e3a92SBing Zhao #define EVENT_INIT_DONE 0x00000007 5385e6e3a92SBing Zhao #define EVENT_DEAUTHENTICATED 0x00000008 5395e6e3a92SBing Zhao #define EVENT_DISASSOCIATED 0x00000009 5405e6e3a92SBing Zhao #define EVENT_PS_AWAKE 0x0000000a 5415e6e3a92SBing Zhao #define EVENT_PS_SLEEP 0x0000000b 5425e6e3a92SBing Zhao #define EVENT_MIC_ERR_MULTICAST 0x0000000d 5435e6e3a92SBing Zhao #define EVENT_MIC_ERR_UNICAST 0x0000000e 5445e6e3a92SBing Zhao #define EVENT_DEEP_SLEEP_AWAKE 0x00000010 5455e6e3a92SBing Zhao #define EVENT_ADHOC_BCN_LOST 0x00000011 5465e6e3a92SBing Zhao 5475e6e3a92SBing Zhao #define EVENT_WMM_STATUS_CHANGE 0x00000017 5485e6e3a92SBing Zhao #define EVENT_BG_SCAN_REPORT 0x00000018 5495e6e3a92SBing Zhao #define EVENT_RSSI_LOW 0x00000019 5505e6e3a92SBing Zhao #define EVENT_SNR_LOW 0x0000001a 5515e6e3a92SBing Zhao #define EVENT_MAX_FAIL 0x0000001b 5525e6e3a92SBing Zhao #define EVENT_RSSI_HIGH 0x0000001c 5535e6e3a92SBing Zhao #define EVENT_SNR_HIGH 0x0000001d 5545e6e3a92SBing Zhao #define EVENT_IBSS_COALESCED 0x0000001e 555432da7d2SXinming Hu #define EVENT_IBSS_STA_CONNECT 0x00000020 556432da7d2SXinming Hu #define EVENT_IBSS_STA_DISCONNECT 0x00000021 5575e6e3a92SBing Zhao #define EVENT_DATA_RSSI_LOW 0x00000024 5585e6e3a92SBing Zhao #define EVENT_DATA_SNR_LOW 0x00000025 5595e6e3a92SBing Zhao #define EVENT_DATA_RSSI_HIGH 0x00000026 5605e6e3a92SBing Zhao #define EVENT_DATA_SNR_HIGH 0x00000027 5615e6e3a92SBing Zhao #define EVENT_LINK_QUALITY 0x00000028 5625e6e3a92SBing Zhao #define EVENT_PORT_RELEASE 0x0000002b 563e568634aSAvinash Patil #define EVENT_UAP_STA_DEAUTH 0x0000002c 564e568634aSAvinash Patil #define EVENT_UAP_STA_ASSOC 0x0000002d 565e568634aSAvinash Patil #define EVENT_UAP_BSS_START 0x0000002e 5665e6e3a92SBing Zhao #define EVENT_PRE_BEACON_LOST 0x00000031 5675e6e3a92SBing Zhao #define EVENT_ADDBA 0x00000033 5685e6e3a92SBing Zhao #define EVENT_DELBA 0x00000034 5695e6e3a92SBing Zhao #define EVENT_BA_STREAM_TIEMOUT 0x00000037 5705e6e3a92SBing Zhao #define EVENT_AMSDU_AGGR_CTRL 0x00000042 571e568634aSAvinash Patil #define EVENT_UAP_BSS_IDLE 0x00000043 572e568634aSAvinash Patil #define EVENT_UAP_BSS_ACTIVE 0x00000044 5735e6e3a92SBing Zhao #define EVENT_WEP_ICV_ERR 0x00000046 5745e6e3a92SBing Zhao #define EVENT_HS_ACT_REQ 0x00000047 5755e6e3a92SBing Zhao #define EVENT_BW_CHANGE 0x00000048 576e568634aSAvinash Patil #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c 5775e6e3a92SBing Zhao #define EVENT_HOSTWAKE_STAIE 0x0000004d 5782a7305c8SAmitkumar Karwar #define EVENT_CHANNEL_SWITCH_ANN 0x00000050 57979ff4346SAvinash Patil #define EVENT_TDLS_GENERIC_EVENT 0x00000052 5803b57c1a7SAvinash Patil #define EVENT_RADAR_DETECTED 0x00000053 5810a694d68SAvinash Patil #define EVENT_CHANNEL_REPORT_RDY 0x00000054 5824e6ee91bSAvinash Patil #define EVENT_TX_DATA_PAUSE 0x00000055 58321f58d20SAmitkumar Karwar #define EVENT_EXT_SCAN_REPORT 0x00000058 58499ffe72cSXinming Hu #define EVENT_RXBA_SYNC 0x00000059 5850ed917d0SBrian Norris #define EVENT_UNKNOWN_DEBUG 0x00000063 5860c9b7f22SXinming Hu #define EVENT_BG_SCAN_STOPPED 0x00000065 587eab1c76bSStone Piao #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f 5888d6b538aSAvinash Patil #define EVENT_MULTI_CHAN_INFO 0x0000006a 589f5ecd02aSXinming Hu #define EVENT_FW_DUMP_INFO 0x00000073 590808bbebcSAmitkumar Karwar #define EVENT_TX_STATUS_REPORT 0x00000074 591d219b7ebSChunfan Chen #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 5925e6e3a92SBing Zhao 5935e6e3a92SBing Zhao #define EVENT_ID_MASK 0xffff 5945e6e3a92SBing Zhao #define BSS_NUM_MASK 0xf 5955e6e3a92SBing Zhao 5965e6e3a92SBing Zhao #define EVENT_GET_BSS_NUM(event_cause) \ 5975e6e3a92SBing Zhao (((event_cause) >> 16) & BSS_NUM_MASK) 5985e6e3a92SBing Zhao 5995e6e3a92SBing Zhao #define EVENT_GET_BSS_TYPE(event_cause) \ 6005e6e3a92SBing Zhao (((event_cause) >> 24) & 0x00ff) 6015e6e3a92SBing Zhao 602b0922ffaSXinming Hu #define MWIFIEX_MAX_PATTERN_LEN 40 603afd84de4SAmitkumar Karwar #define MWIFIEX_MAX_OFFSET_LEN 100 6047d7f07d8Schunfan chen #define MWIFIEX_MAX_ND_MATCH_SETS 10 6057d7f07d8Schunfan chen 6067da060c1SAmitkumar Karwar #define STACK_NBYTES 100 6077da060c1SAmitkumar Karwar #define TYPE_DNUM 1 6087da060c1SAmitkumar Karwar #define TYPE_BYTESEQ 2 6097da060c1SAmitkumar Karwar #define MAX_OPERAND 0x40 6107da060c1SAmitkumar Karwar #define TYPE_EQ (MAX_OPERAND+1) 6117da060c1SAmitkumar Karwar #define TYPE_EQ_DNUM (MAX_OPERAND+2) 6127da060c1SAmitkumar Karwar #define TYPE_EQ_BIT (MAX_OPERAND+3) 6137da060c1SAmitkumar Karwar #define TYPE_AND (MAX_OPERAND+4) 6147da060c1SAmitkumar Karwar #define TYPE_OR (MAX_OPERAND+5) 6157da060c1SAmitkumar Karwar #define MEF_MODE_HOST_SLEEP 1 6167da060c1SAmitkumar Karwar #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 617b533be18SMaithili Hinge #define MEF_ACTION_AUTO_ARP 0x10 6187da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_BROADCAST BIT(0) 6197da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_UNICAST BIT(1) 6207da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_MULTICAST BIT(3) 621b533be18SMaithili Hinge #define MWIFIEX_MAX_SUPPORTED_IPADDR 4 6227da060c1SAmitkumar Karwar 623429d90d2SAvinash Patil #define ACT_TDLS_DELETE 0x00 624429d90d2SAvinash Patil #define ACT_TDLS_CREATE 0x01 625429d90d2SAvinash Patil #define ACT_TDLS_CONFIG 0x02 626f7669877SXinming Hu 62779ff4346SAvinash Patil #define TDLS_EVENT_LINK_TEAR_DOWN 3 628f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_RESULT 7 629f7669877SXinming Hu #define TDLS_EVENT_START_CHAN_SWITCH 8 630f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9 631f7669877SXinming Hu 632f7669877SXinming Hu #define TDLS_BASE_CHANNEL 0 633f7669877SXinming Hu #define TDLS_OFF_CHANNEL 1 634429d90d2SAvinash Patil 635449b8bbfSXinming Hu #define ACT_TDLS_CS_ENABLE_CONFIG 0x00 636449b8bbfSXinming Hu #define ACT_TDLS_CS_INIT 0x06 637449b8bbfSXinming Hu #define ACT_TDLS_CS_STOP 0x07 638449b8bbfSXinming Hu #define ACT_TDLS_CS_PARAMS 0x08 639449b8bbfSXinming Hu 640449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_UNIT_TIME 2 641449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_THR_OTHERLINK 10 642449b8bbfSXinming Hu #define MWIFIEX_DEF_THR_DIRECTLINK 0 643449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIME 10 644449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIMEOUT 16 645449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_REG_CLASS 12 646449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_PERIODICITY 1 647449b8bbfSXinming Hu 6488e17ea25SAmitkumar Karwar #define MWIFIEX_FW_V15 15 6498e17ea25SAmitkumar Karwar 650cf075eacSAvinash Patil #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1) 651cf075eacSAvinash Patil 6525e6e3a92SBing Zhao struct mwifiex_ie_types_header { 6535e6e3a92SBing Zhao __le16 type; 6545e6e3a92SBing Zhao __le16 len; 6555e6e3a92SBing Zhao } __packed; 6565e6e3a92SBing Zhao 6575e6e3a92SBing Zhao struct mwifiex_ie_types_data { 6585e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 6597fcae8f7SGustavo A. R. Silva u8 data[]; 6605e6e3a92SBing Zhao } __packed; 6615e6e3a92SBing Zhao 6625e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01 6635e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08 664b23bce29SAvinash Patil #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10 66509869495SAvinash Patil #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01 666808bbebcSAmitkumar Karwar #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20 6675e6e3a92SBing Zhao 6688de00f1bSchunfan chen enum HS_WAKEUP_REASON { 6698de00f1bSchunfan chen NO_HSWAKEUP_REASON = 0, 6708de00f1bSchunfan chen BCAST_DATA_MATCHED, 6718de00f1bSchunfan chen MCAST_DATA_MATCHED, 6728de00f1bSchunfan chen UCAST_DATA_MATCHED, 6738de00f1bSchunfan chen MASKTABLE_EVENT_MATCHED, 6748de00f1bSchunfan chen NON_MASKABLE_EVENT_MATCHED, 6758de00f1bSchunfan chen NON_MASKABLE_CONDITION_MATCHED, 6768de00f1bSchunfan chen MAGIC_PATTERN_MATCHED, 6778de00f1bSchunfan chen CONTROL_FRAME_MATCHED, 6788de00f1bSchunfan chen MANAGEMENT_FRAME_MATCHED, 6798fa0a0dcSGanapathi Bhat GTK_REKEY_FAILURE, 6808de00f1bSchunfan chen RESERVED 6818de00f1bSchunfan chen }; 6828de00f1bSchunfan chen 6835e6e3a92SBing Zhao struct txpd { 6845e6e3a92SBing Zhao u8 bss_type; 6855e6e3a92SBing Zhao u8 bss_num; 6865e6e3a92SBing Zhao __le16 tx_pkt_length; 6875e6e3a92SBing Zhao __le16 tx_pkt_offset; 6885e6e3a92SBing Zhao __le16 tx_pkt_type; 6895e6e3a92SBing Zhao __le32 tx_control; 6905e6e3a92SBing Zhao u8 priority; 6915e6e3a92SBing Zhao u8 flags; 6925e6e3a92SBing Zhao u8 pkt_delay_2ms; 693808bbebcSAmitkumar Karwar u8 reserved1[2]; 694808bbebcSAmitkumar Karwar u8 tx_token_id; 695808bbebcSAmitkumar Karwar u8 reserved[2]; 6965e6e3a92SBing Zhao } __packed; 6975e6e3a92SBing Zhao 6985e6e3a92SBing Zhao struct rxpd { 6995e6e3a92SBing Zhao u8 bss_type; 7005e6e3a92SBing Zhao u8 bss_num; 701ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_length; 702ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_offset; 703ed1ea6f4SAmitkumar Karwar __le16 rx_pkt_type; 704ed1ea6f4SAmitkumar Karwar __le16 seq_num; 7055e6e3a92SBing Zhao u8 priority; 7065e6e3a92SBing Zhao u8 rx_rate; 7075e6e3a92SBing Zhao s8 snr; 7085e6e3a92SBing Zhao s8 nf; 709a5f39056SYogesh Ashok Powar 710a5f39056SYogesh Ashok Powar /* For: Non-802.11 AC cards 711a5f39056SYogesh Ashok Powar * 712a5f39056SYogesh Ashok Powar * Ht Info [Bit 0] RxRate format: LG=0, HT=1 7135e6e3a92SBing Zhao * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 714a5f39056SYogesh Ashok Powar * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 715a5f39056SYogesh Ashok Powar * 716a5f39056SYogesh Ashok Powar * For: 802.11 AC cards 717a5f39056SYogesh Ashok Powar * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 718a5f39056SYogesh Ashok Powar * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 719a5f39056SYogesh Ashok Powar * BW80 = 10 BW160 = 11 720a5f39056SYogesh Ashok Powar * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 721a5f39056SYogesh Ashok Powar * [Bit 5] STBC support Enabled = 1 722a5f39056SYogesh Ashok Powar * [Bit 6] LDPC support Enabled = 1 723a5f39056SYogesh Ashok Powar * [Bit 7] Reserved 724a5f39056SYogesh Ashok Powar */ 7255e6e3a92SBing Zhao u8 ht_info; 7269d31c1c7SAvinash Patil u8 reserved[3]; 72709869495SAvinash Patil u8 flags; 7285e6e3a92SBing Zhao } __packed; 7295e6e3a92SBing Zhao 730838e4f44SAvinash Patil struct uap_txpd { 731838e4f44SAvinash Patil u8 bss_type; 732838e4f44SAvinash Patil u8 bss_num; 733838e4f44SAvinash Patil __le16 tx_pkt_length; 734838e4f44SAvinash Patil __le16 tx_pkt_offset; 735838e4f44SAvinash Patil __le16 tx_pkt_type; 736838e4f44SAvinash Patil __le32 tx_control; 737838e4f44SAvinash Patil u8 priority; 738838e4f44SAvinash Patil u8 flags; 739838e4f44SAvinash Patil u8 pkt_delay_2ms; 740808bbebcSAmitkumar Karwar u8 reserved1[2]; 741808bbebcSAmitkumar Karwar u8 tx_token_id; 742808bbebcSAmitkumar Karwar u8 reserved[2]; 7435c0b8798SKarthik Ananthapadmanabha } __packed; 744838e4f44SAvinash Patil 745838e4f44SAvinash Patil struct uap_rxpd { 746838e4f44SAvinash Patil u8 bss_type; 747838e4f44SAvinash Patil u8 bss_num; 748838e4f44SAvinash Patil __le16 rx_pkt_length; 749838e4f44SAvinash Patil __le16 rx_pkt_offset; 750838e4f44SAvinash Patil __le16 rx_pkt_type; 751838e4f44SAvinash Patil __le16 seq_num; 752838e4f44SAvinash Patil u8 priority; 753442f6f9bSXinming Hu u8 rx_rate; 754442f6f9bSXinming Hu s8 snr; 755442f6f9bSXinming Hu s8 nf; 756442f6f9bSXinming Hu u8 ht_info; 757442f6f9bSXinming Hu u8 reserved[3]; 758442f6f9bSXinming Hu u8 flags; 7595c0b8798SKarthik Ananthapadmanabha } __packed; 760838e4f44SAvinash Patil 76136995892SDavid Lin struct mwifiex_auth { 76236995892SDavid Lin __le16 auth_alg; 76336995892SDavid Lin __le16 auth_transaction; 76436995892SDavid Lin __le16 status_code; 76536995892SDavid Lin /* possibly followed by Challenge text */ 76636995892SDavid Lin u8 variable[]; 76736995892SDavid Lin } __packed; 76836995892SDavid Lin 76936995892SDavid Lin struct mwifiex_ieee80211_mgmt { 77036995892SDavid Lin __le16 frame_control; 77136995892SDavid Lin __le16 duration; 77236995892SDavid Lin u8 da[ETH_ALEN]; 77336995892SDavid Lin u8 sa[ETH_ALEN]; 77436995892SDavid Lin u8 bssid[ETH_ALEN]; 77536995892SDavid Lin __le16 seq_ctrl; 77636995892SDavid Lin u8 addr4[ETH_ALEN]; 77736995892SDavid Lin struct mwifiex_auth auth; 77836995892SDavid Lin } __packed; 77936995892SDavid Lin 780bf354433SAvinash Patil struct mwifiex_fw_chan_stats { 781bf354433SAvinash Patil u8 chan_num; 782bf354433SAvinash Patil u8 bandcfg; 783bf354433SAvinash Patil u8 flags; 784bf354433SAvinash Patil s8 noise; 785bf354433SAvinash Patil __le16 total_bss; 786bf354433SAvinash Patil __le16 cca_scan_dur; 787bf354433SAvinash Patil __le16 cca_busy_dur; 788bf354433SAvinash Patil } __packed; 789bf354433SAvinash Patil 7905e6e3a92SBing Zhao enum mwifiex_chan_scan_mode_bitmasks { 7915e6e3a92SBing Zhao MWIFIEX_PASSIVE_SCAN = BIT(0), 7925e6e3a92SBing Zhao MWIFIEX_DISABLE_CHAN_FILT = BIT(1), 7932375fa2bSchunfan chen MWIFIEX_HIDDEN_SSID_REPORT = BIT(4), 7945e6e3a92SBing Zhao }; 7955e6e3a92SBing Zhao 7965e6e3a92SBing Zhao struct mwifiex_chan_scan_param_set { 7975e6e3a92SBing Zhao u8 radio_type; 7985e6e3a92SBing Zhao u8 chan_number; 7995e6e3a92SBing Zhao u8 chan_scan_mode_bitmap; 8005e6e3a92SBing Zhao __le16 min_scan_time; 8015e6e3a92SBing Zhao __le16 max_scan_time; 8025e6e3a92SBing Zhao } __packed; 8035e6e3a92SBing Zhao 8045e6e3a92SBing Zhao struct mwifiex_ie_types_chan_list_param_set { 8055e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 80614ddc470SKees Cook struct mwifiex_chan_scan_param_set chan_scan_param[]; 8075e6e3a92SBing Zhao } __packed; 8085e6e3a92SBing Zhao 80999ffe72cSXinming Hu struct mwifiex_ie_types_rxba_sync { 81099ffe72cSXinming Hu struct mwifiex_ie_types_header header; 81199ffe72cSXinming Hu u8 mac[ETH_ALEN]; 81299ffe72cSXinming Hu u8 tid; 81399ffe72cSXinming Hu u8 reserved; 81499ffe72cSXinming Hu __le16 seq_num; 81599ffe72cSXinming Hu __le16 bitmap_len; 816c7847241SGustavo A. R. Silva u8 bitmap[]; 81799ffe72cSXinming Hu } __packed; 81899ffe72cSXinming Hu 8195e6e3a92SBing Zhao struct chan_band_param_set { 8205e6e3a92SBing Zhao u8 radio_type; 8215e6e3a92SBing Zhao u8 chan_number; 8225e6e3a92SBing Zhao }; 8235e6e3a92SBing Zhao 8245e6e3a92SBing Zhao struct mwifiex_ie_types_chan_band_list_param_set { 8255e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8265e6e3a92SBing Zhao struct chan_band_param_set chan_band_param[1]; 8275e6e3a92SBing Zhao } __packed; 8285e6e3a92SBing Zhao 8295e6e3a92SBing Zhao struct mwifiex_ie_types_rates_param_set { 8305e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 831235fd607SGustavo A. R. Silva u8 rates[]; 8325e6e3a92SBing Zhao } __packed; 8335e6e3a92SBing Zhao 8345e6e3a92SBing Zhao struct mwifiex_ie_types_ssid_param_set { 8355e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8367fcae8f7SGustavo A. R. Silva u8 ssid[]; 8375e6e3a92SBing Zhao } __packed; 8385e6e3a92SBing Zhao 83936995892SDavid Lin struct mwifiex_ie_types_host_mlme { 84036995892SDavid Lin struct mwifiex_ie_types_header header; 84136995892SDavid Lin u8 host_mlme; 84236995892SDavid Lin } __packed; 84336995892SDavid Lin 8445e6e3a92SBing Zhao struct mwifiex_ie_types_num_probes { 8455e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8465e6e3a92SBing Zhao __le16 num_probes; 8475e6e3a92SBing Zhao } __packed; 8485e6e3a92SBing Zhao 8490c9b7f22SXinming Hu struct mwifiex_ie_types_repeat_count { 8500c9b7f22SXinming Hu struct mwifiex_ie_types_header header; 8510c9b7f22SXinming Hu __le16 repeat_count; 8520c9b7f22SXinming Hu } __packed; 8530c9b7f22SXinming Hu 854fdcab083SGanapathi Bhat struct mwifiex_ie_types_min_rssi_threshold { 855fdcab083SGanapathi Bhat struct mwifiex_ie_types_header header; 856fdcab083SGanapathi Bhat __le16 rssi_threshold; 857fdcab083SGanapathi Bhat } __packed; 858fdcab083SGanapathi Bhat 8590c9b7f22SXinming Hu struct mwifiex_ie_types_bgscan_start_later { 8600c9b7f22SXinming Hu struct mwifiex_ie_types_header header; 8610c9b7f22SXinming Hu __le16 start_later; 8620c9b7f22SXinming Hu } __packed; 8630c9b7f22SXinming Hu 864cb91be87SAvinash Patil struct mwifiex_ie_types_scan_chan_gap { 865cb91be87SAvinash Patil struct mwifiex_ie_types_header header; 866cb91be87SAvinash Patil /* time gap in TUs to be used between two consecutive channels scan */ 867cb91be87SAvinash Patil __le16 chan_gap; 868cb91be87SAvinash Patil } __packed; 869cb91be87SAvinash Patil 870c2a8f0ffSGanapathi Bhat struct mwifiex_ie_types_random_mac { 871c2a8f0ffSGanapathi Bhat struct mwifiex_ie_types_header header; 872c2a8f0ffSGanapathi Bhat u8 mac[ETH_ALEN]; 873c2a8f0ffSGanapathi Bhat } __packed; 874c2a8f0ffSGanapathi Bhat 875bf354433SAvinash Patil struct mwifiex_ietypes_chanstats { 876bf354433SAvinash Patil struct mwifiex_ie_types_header header; 8772a6be797SGustavo A. R. Silva struct mwifiex_fw_chan_stats chanstats[]; 878bf354433SAvinash Patil } __packed; 879bf354433SAvinash Patil 8805e6e3a92SBing Zhao struct mwifiex_ie_types_wildcard_ssid_params { 8815e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8825e6e3a92SBing Zhao u8 max_ssid_length; 883d241a139SAlper Nebi Yasak u8 ssid[]; 8845e6e3a92SBing Zhao } __packed; 8855e6e3a92SBing Zhao 8865e6e3a92SBing Zhao #define TSF_DATA_SIZE 8 8875e6e3a92SBing Zhao struct mwifiex_ie_types_tsf_timestamp { 8885e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 8895e6e3a92SBing Zhao u8 tsf_data[1]; 8905e6e3a92SBing Zhao } __packed; 8915e6e3a92SBing Zhao 8925e6e3a92SBing Zhao struct mwifiex_cf_param_set { 8935e6e3a92SBing Zhao u8 cfp_cnt; 8945e6e3a92SBing Zhao u8 cfp_period; 8954348d085SUjjal Roy __le16 cfp_max_duration; 8964348d085SUjjal Roy __le16 cfp_duration_remaining; 8975e6e3a92SBing Zhao } __packed; 8985e6e3a92SBing Zhao 8995e6e3a92SBing Zhao struct mwifiex_ibss_param_set { 9004348d085SUjjal Roy __le16 atim_window; 9015e6e3a92SBing Zhao } __packed; 9025e6e3a92SBing Zhao 9035e6e3a92SBing Zhao struct mwifiex_ie_types_ss_param_set { 9045e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9055e6e3a92SBing Zhao union { 9065e6e3a92SBing Zhao struct mwifiex_cf_param_set cf_param_set[1]; 9075e6e3a92SBing Zhao struct mwifiex_ibss_param_set ibss_param_set[1]; 9085e6e3a92SBing Zhao } cf_ibss; 9095e6e3a92SBing Zhao } __packed; 9105e6e3a92SBing Zhao 9115e6e3a92SBing Zhao struct mwifiex_fh_param_set { 9124348d085SUjjal Roy __le16 dwell_time; 9135e6e3a92SBing Zhao u8 hop_set; 9145e6e3a92SBing Zhao u8 hop_pattern; 9155e6e3a92SBing Zhao u8 hop_index; 9165e6e3a92SBing Zhao } __packed; 9175e6e3a92SBing Zhao 9185e6e3a92SBing Zhao struct mwifiex_ds_param_set { 9195e6e3a92SBing Zhao u8 current_chan; 9205e6e3a92SBing Zhao } __packed; 9215e6e3a92SBing Zhao 9225e6e3a92SBing Zhao struct mwifiex_ie_types_phy_param_set { 9235e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9245e6e3a92SBing Zhao union { 9255e6e3a92SBing Zhao struct mwifiex_fh_param_set fh_param_set[1]; 9265e6e3a92SBing Zhao struct mwifiex_ds_param_set ds_param_set[1]; 9275e6e3a92SBing Zhao } fh_ds; 9285e6e3a92SBing Zhao } __packed; 9295e6e3a92SBing Zhao 9305e6e3a92SBing Zhao struct mwifiex_ie_types_auth_type { 9315e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9325e6e3a92SBing Zhao __le16 auth_type; 9335e6e3a92SBing Zhao } __packed; 9345e6e3a92SBing Zhao 9355e6e3a92SBing Zhao struct mwifiex_ie_types_vendor_param_set { 9365e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9375e6e3a92SBing Zhao u8 ie[MWIFIEX_MAX_VSIE_LEN]; 9385e6e3a92SBing Zhao }; 9395e6e3a92SBing Zhao 94030fa51c8SBing Zhao #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60 941d29caf25SAvinash Patil 942d29caf25SAvinash Patil struct mwifiex_ie_types_tdls_idle_timeout { 943d29caf25SAvinash Patil struct mwifiex_ie_types_header header; 944d29caf25SAvinash Patil __le16 value; 945d29caf25SAvinash Patil } __packed; 946d29caf25SAvinash Patil 94736995892SDavid Lin #define MWIFIEX_AUTHTYPE_SAE 6 94836995892SDavid Lin 94936995892SDavid Lin struct mwifiex_ie_types_sae_pwe_mode { 95036995892SDavid Lin struct mwifiex_ie_types_header header; 95136995892SDavid Lin u8 pwe[]; 95236995892SDavid Lin } __packed; 95336995892SDavid Lin 9545e6e3a92SBing Zhao struct mwifiex_ie_types_rsn_param_set { 9555e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 9567fcae8f7SGustavo A. R. Silva u8 rsn_ie[]; 9575e6e3a92SBing Zhao } __packed; 9585e6e3a92SBing Zhao 9595e6e3a92SBing Zhao #define KEYPARAMSET_FIXED_LEN 6 9605e6e3a92SBing Zhao 9615e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set { 9625e6e3a92SBing Zhao __le16 type; 9635e6e3a92SBing Zhao __le16 length; 9645e6e3a92SBing Zhao __le16 key_type_id; 9655e6e3a92SBing Zhao __le16 key_info; 9665e6e3a92SBing Zhao __le16 key_len; 9675e6e3a92SBing Zhao u8 key[50]; 9685e6e3a92SBing Zhao } __packed; 9695e6e3a92SBing Zhao 970b877f4cfSYing Luo #define IGTK_PN_LEN 8 971b877f4cfSYing Luo 972b877f4cfSYing Luo struct mwifiex_cmac_param { 973b877f4cfSYing Luo u8 ipn[IGTK_PN_LEN]; 974b877f4cfSYing Luo u8 key[WLAN_KEY_LEN_AES_CMAC]; 975b877f4cfSYing Luo } __packed; 976b877f4cfSYing Luo 977e57f1734SAvinash Patil struct mwifiex_wep_param { 978e57f1734SAvinash Patil __le16 key_len; 979e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_WEP104]; 980e57f1734SAvinash Patil } __packed; 981e57f1734SAvinash Patil 982e57f1734SAvinash Patil struct mwifiex_tkip_param { 983e57f1734SAvinash Patil u8 pn[WPA_PN_SIZE]; 984e57f1734SAvinash Patil __le16 key_len; 985e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_TKIP]; 986e57f1734SAvinash Patil } __packed; 987e57f1734SAvinash Patil 988e57f1734SAvinash Patil struct mwifiex_aes_param { 989e57f1734SAvinash Patil u8 pn[WPA_PN_SIZE]; 990e57f1734SAvinash Patil __le16 key_len; 9914afc850eSMaximilian Luz u8 key[WLAN_KEY_LEN_CCMP_256]; 992e57f1734SAvinash Patil } __packed; 993e57f1734SAvinash Patil 994e57f1734SAvinash Patil struct mwifiex_wapi_param { 995e57f1734SAvinash Patil u8 pn[PN_LEN]; 996e57f1734SAvinash Patil __le16 key_len; 997e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_SMS4]; 998e57f1734SAvinash Patil } __packed; 999e57f1734SAvinash Patil 1000e57f1734SAvinash Patil struct mwifiex_cmac_aes_param { 1001e57f1734SAvinash Patil u8 ipn[IGTK_PN_LEN]; 1002e57f1734SAvinash Patil __le16 key_len; 1003e57f1734SAvinash Patil u8 key[WLAN_KEY_LEN_AES_CMAC]; 1004e57f1734SAvinash Patil } __packed; 1005e57f1734SAvinash Patil 1006e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 { 1007e57f1734SAvinash Patil __le16 type; 1008e57f1734SAvinash Patil __le16 len; 1009e57f1734SAvinash Patil u8 mac_addr[ETH_ALEN]; 1010e57f1734SAvinash Patil u8 key_idx; 1011e57f1734SAvinash Patil u8 key_type; 1012e57f1734SAvinash Patil __le16 key_info; 1013e57f1734SAvinash Patil union { 1014e57f1734SAvinash Patil struct mwifiex_wep_param wep; 1015e57f1734SAvinash Patil struct mwifiex_tkip_param tkip; 1016e57f1734SAvinash Patil struct mwifiex_aes_param aes; 1017e57f1734SAvinash Patil struct mwifiex_wapi_param wapi; 1018e57f1734SAvinash Patil struct mwifiex_cmac_aes_param cmac_aes; 1019e57f1734SAvinash Patil } key_params; 1020e57f1734SAvinash Patil } __packed; 1021e57f1734SAvinash Patil 1022e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 { 1023e57f1734SAvinash Patil __le16 action; 1024e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 key_param_set; 1025e57f1734SAvinash Patil } __packed; 1026e57f1734SAvinash Patil 10275e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material { 10285e6e3a92SBing Zhao __le16 action; 10295e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set key_param_set; 10305e6e3a92SBing Zhao } __packed; 10315e6e3a92SBing Zhao 103259c668d7SKees Cook struct host_cmd_ds_802_11_key_material_wep { 103359c668d7SKees Cook __le16 action; 103459c668d7SKees Cook struct mwifiex_ie_type_key_param_set key_param_set[NUM_WEP_KEYS]; 103559c668d7SKees Cook } __packed; 103659c668d7SKees Cook 10375e6e3a92SBing Zhao struct host_cmd_ds_gen { 10384348d085SUjjal Roy __le16 command; 10394348d085SUjjal Roy __le16 size; 10404348d085SUjjal Roy __le16 seq_num; 10414348d085SUjjal Roy __le16 result; 10425e6e3a92SBing Zhao }; 10435e6e3a92SBing Zhao 10445e6e3a92SBing Zhao #define S_DS_GEN sizeof(struct host_cmd_ds_gen) 10455e6e3a92SBing Zhao 10465e6e3a92SBing Zhao enum sleep_resp_ctrl { 10475e6e3a92SBing Zhao RESP_NOT_NEEDED = 0, 10485e6e3a92SBing Zhao RESP_NEEDED, 10495e6e3a92SBing Zhao }; 10505e6e3a92SBing Zhao 10515e6e3a92SBing Zhao struct mwifiex_ps_param { 10525e6e3a92SBing Zhao __le16 null_pkt_interval; 10535e6e3a92SBing Zhao __le16 multiple_dtims; 10545e6e3a92SBing Zhao __le16 bcn_miss_timeout; 10555e6e3a92SBing Zhao __le16 local_listen_interval; 10565e6e3a92SBing Zhao __le16 adhoc_wake_period; 10575e6e3a92SBing Zhao __le16 mode; 10585e6e3a92SBing Zhao __le16 delay_to_ps; 10595c0b8798SKarthik Ananthapadmanabha } __packed; 10605e6e3a92SBing Zhao 10616a7b1910SShengzhen Li #define HS_DEF_WAKE_INTERVAL 100 10626a7b1910SShengzhen Li #define HS_DEF_INACTIVITY_TIMEOUT 50 10636a7b1910SShengzhen Li 10646a7b1910SShengzhen Li struct mwifiex_ps_param_in_hs { 10656a7b1910SShengzhen Li struct mwifiex_ie_types_header header; 10666a7b1910SShengzhen Li __le32 hs_wake_int; 10676a7b1910SShengzhen Li __le32 hs_inact_timeout; 10685c0b8798SKarthik Ananthapadmanabha } __packed; 10696a7b1910SShengzhen Li 10705e6e3a92SBing Zhao #define BITMAP_AUTO_DS 0x01 10715e6e3a92SBing Zhao #define BITMAP_STA_PS 0x10 10725e6e3a92SBing Zhao 10735e6e3a92SBing Zhao struct mwifiex_ie_types_auto_ds_param { 10745e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 10752b06bdbeSMarc Yang __le16 deep_sleep_timeout; 10765e6e3a92SBing Zhao } __packed; 10775e6e3a92SBing Zhao 10785e6e3a92SBing Zhao struct mwifiex_ie_types_ps_param { 10795e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 10805e6e3a92SBing Zhao struct mwifiex_ps_param param; 10815e6e3a92SBing Zhao } __packed; 10825e6e3a92SBing Zhao 10835e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh { 10845e6e3a92SBing Zhao __le16 action; 10855e6e3a92SBing Zhao 10865e6e3a92SBing Zhao union { 10875e6e3a92SBing Zhao struct mwifiex_ps_param opt_ps; 10885e6e3a92SBing Zhao __le16 ps_bitmap; 10895e6e3a92SBing Zhao } params; 10905e6e3a92SBing Zhao } __packed; 10915e6e3a92SBing Zhao 10924b9fede5SAmitkumar Karwar enum API_VER_ID { 10937f445d04SAvinash Patil KEY_API_VER_ID = 1, 109489be7cebSAmitkumar Karwar FW_API_VER_ID = 2, 109586cffb2cSPali Rohár UAP_FW_API_VER_ID = 3, 109686cffb2cSPali Rohár CHANRPT_API_VER_ID = 4, 10977715d795SLukas Wunner FW_HOTFIX_VER_ID = 5, 10987f445d04SAvinash Patil }; 10997f445d04SAvinash Patil 11004b9fede5SAmitkumar Karwar struct hw_spec_api_rev { 11017f445d04SAvinash Patil struct mwifiex_ie_types_header header; 11027f445d04SAvinash Patil __le16 api_id; 11037f445d04SAvinash Patil u8 major_ver; 11047f445d04SAvinash Patil u8 minor_ver; 11057f445d04SAvinash Patil } __packed; 11067f445d04SAvinash Patil 11075e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec { 11085e6e3a92SBing Zhao __le16 hw_if_version; 11095e6e3a92SBing Zhao __le16 version; 11105e6e3a92SBing Zhao __le16 reserved; 11115e6e3a92SBing Zhao __le16 num_of_mcast_adr; 11125e6e3a92SBing Zhao u8 permanent_addr[ETH_ALEN]; 11135e6e3a92SBing Zhao __le16 region_code; 11145e6e3a92SBing Zhao __le16 number_of_antenna; 11155e6e3a92SBing Zhao __le32 fw_release_number; 11165e6e3a92SBing Zhao __le32 reserved_1; 11175e6e3a92SBing Zhao __le32 reserved_2; 11185e6e3a92SBing Zhao __le32 reserved_3; 11195e6e3a92SBing Zhao __le32 fw_cap_info; 11205e6e3a92SBing Zhao __le32 dot_11n_dev_cap; 11215e6e3a92SBing Zhao u8 dev_mcs_support; 1122*41469ff9SBjorn Helgaas __le16 mp_end_port; /* SDIO only, reserved for other interfaces */ 1123a5f39056SYogesh Ashok Powar __le16 mgmt_buf_count; /* mgmt IE buffer count */ 1124a5f39056SYogesh Ashok Powar __le32 reserved_5; 1125a5f39056SYogesh Ashok Powar __le32 reserved_6; 1126a5f39056SYogesh Ashok Powar __le32 dot_11ac_dev_cap; 1127a5f39056SYogesh Ashok Powar __le32 dot_11ac_mcs_support; 11282a6be797SGustavo A. R. Silva u8 tlvs[]; 11295e6e3a92SBing Zhao } __packed; 11305e6e3a92SBing Zhao 11315e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info { 11325e6e3a92SBing Zhao __le16 action; 11335e6e3a92SBing Zhao __le16 ndata; 11345e6e3a92SBing Zhao __le16 nbcn; 11355e6e3a92SBing Zhao __le16 reserved[9]; 11365e6e3a92SBing Zhao long long reserved_1; 11375c0b8798SKarthik Ananthapadmanabha } __packed; 11385e6e3a92SBing Zhao 11395e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp { 11405e6e3a92SBing Zhao __le16 action; 11415e6e3a92SBing Zhao __le16 ndata; 11425e6e3a92SBing Zhao __le16 nbcn; 11435e6e3a92SBing Zhao __le16 data_rssi_last; 11445e6e3a92SBing Zhao __le16 data_nf_last; 11455e6e3a92SBing Zhao __le16 data_rssi_avg; 11465e6e3a92SBing Zhao __le16 data_nf_avg; 11475e6e3a92SBing Zhao __le16 bcn_rssi_last; 11485e6e3a92SBing Zhao __le16 bcn_nf_last; 11495e6e3a92SBing Zhao __le16 bcn_rssi_avg; 11505e6e3a92SBing Zhao __le16 bcn_nf_avg; 11515e6e3a92SBing Zhao long long tsf_bcn; 11525c0b8798SKarthik Ananthapadmanabha } __packed; 11535e6e3a92SBing Zhao 11545e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address { 11555e6e3a92SBing Zhao __le16 action; 11565e6e3a92SBing Zhao u8 mac_addr[ETH_ALEN]; 11575c0b8798SKarthik Ananthapadmanabha } __packed; 11585e6e3a92SBing Zhao 11595e6e3a92SBing Zhao struct host_cmd_ds_mac_control { 1160b82dd3bdSAmitkumar Karwar __le32 action; 11615e6e3a92SBing Zhao }; 11625e6e3a92SBing Zhao 11635e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr { 11645e6e3a92SBing Zhao __le16 action; 11655e6e3a92SBing Zhao __le16 num_of_adrs; 11665e6e3a92SBing Zhao u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; 11675e6e3a92SBing Zhao } __packed; 11685e6e3a92SBing Zhao 11695e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate { 11705e6e3a92SBing Zhao u8 mac_addr[ETH_ALEN]; 11715e6e3a92SBing Zhao __le16 reason_code; 11725e6e3a92SBing Zhao } __packed; 11735e6e3a92SBing Zhao 11745e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate { 11755e6e3a92SBing Zhao u8 peer_sta_addr[ETH_ALEN]; 11765e6e3a92SBing Zhao __le16 cap_info_bitmap; 11775e6e3a92SBing Zhao __le16 listen_interval; 11785e6e3a92SBing Zhao __le16 beacon_period; 11795e6e3a92SBing Zhao u8 dtim_period; 11805e6e3a92SBing Zhao } __packed; 11815e6e3a92SBing Zhao 11825e6e3a92SBing Zhao struct ieee_types_assoc_rsp { 11835e6e3a92SBing Zhao __le16 cap_info_bitmap; 11845e6e3a92SBing Zhao __le16 status_code; 11855e6e3a92SBing Zhao __le16 a_id; 11862a6be797SGustavo A. R. Silva u8 ie_buffer[]; 11875e6e3a92SBing Zhao } __packed; 11885e6e3a92SBing Zhao 11895e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp { 11905e6e3a92SBing Zhao struct ieee_types_assoc_rsp assoc_rsp; 11915e6e3a92SBing Zhao } __packed; 11925e6e3a92SBing Zhao 11935e6e3a92SBing Zhao struct ieee_types_cf_param_set { 11945e6e3a92SBing Zhao u8 element_id; 11955e6e3a92SBing Zhao u8 len; 11965e6e3a92SBing Zhao u8 cfp_cnt; 11975e6e3a92SBing Zhao u8 cfp_period; 11984348d085SUjjal Roy __le16 cfp_max_duration; 11994348d085SUjjal Roy __le16 cfp_duration_remaining; 12005e6e3a92SBing Zhao } __packed; 12015e6e3a92SBing Zhao 12025e6e3a92SBing Zhao struct ieee_types_ibss_param_set { 12035e6e3a92SBing Zhao u8 element_id; 12045e6e3a92SBing Zhao u8 len; 12055e6e3a92SBing Zhao __le16 atim_window; 12065e6e3a92SBing Zhao } __packed; 12075e6e3a92SBing Zhao 12085e6e3a92SBing Zhao union ieee_types_ss_param_set { 12095e6e3a92SBing Zhao struct ieee_types_cf_param_set cf_param_set; 12105e6e3a92SBing Zhao struct ieee_types_ibss_param_set ibss_param_set; 12115e6e3a92SBing Zhao } __packed; 12125e6e3a92SBing Zhao 12135e6e3a92SBing Zhao struct ieee_types_fh_param_set { 12145e6e3a92SBing Zhao u8 element_id; 12155e6e3a92SBing Zhao u8 len; 12165e6e3a92SBing Zhao __le16 dwell_time; 12175e6e3a92SBing Zhao u8 hop_set; 12185e6e3a92SBing Zhao u8 hop_pattern; 12195e6e3a92SBing Zhao u8 hop_index; 12205e6e3a92SBing Zhao } __packed; 12215e6e3a92SBing Zhao 12225e6e3a92SBing Zhao struct ieee_types_ds_param_set { 12235e6e3a92SBing Zhao u8 element_id; 12245e6e3a92SBing Zhao u8 len; 12255e6e3a92SBing Zhao u8 current_chan; 12265e6e3a92SBing Zhao } __packed; 12275e6e3a92SBing Zhao 12285e6e3a92SBing Zhao union ieee_types_phy_param_set { 12295e6e3a92SBing Zhao struct ieee_types_fh_param_set fh_param_set; 12305e6e3a92SBing Zhao struct ieee_types_ds_param_set ds_param_set; 12315e6e3a92SBing Zhao } __packed; 12325e6e3a92SBing Zhao 1233a5f39056SYogesh Ashok Powar struct ieee_types_oper_mode_ntf { 1234a5f39056SYogesh Ashok Powar u8 element_id; 1235a5f39056SYogesh Ashok Powar u8 len; 1236a5f39056SYogesh Ashok Powar u8 oper_mode; 1237a5f39056SYogesh Ashok Powar } __packed; 1238a5f39056SYogesh Ashok Powar 12395e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start { 12405e6e3a92SBing Zhao u8 ssid[IEEE80211_MAX_SSID_LEN]; 12415e6e3a92SBing Zhao u8 bss_mode; 12425e6e3a92SBing Zhao __le16 beacon_period; 12435e6e3a92SBing Zhao u8 dtim_period; 12445e6e3a92SBing Zhao union ieee_types_ss_param_set ss_param_set; 12455e6e3a92SBing Zhao union ieee_types_phy_param_set phy_param_set; 12465e6e3a92SBing Zhao u16 reserved1; 12475e6e3a92SBing Zhao __le16 cap_info_bitmap; 124863af6333SYogesh Ashok Powar u8 data_rate[HOSTCMD_SUPPORTED_RATES]; 12495e6e3a92SBing Zhao } __packed; 12505e6e3a92SBing Zhao 1251d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result { 12525e6e3a92SBing Zhao u8 pad[3]; 12535e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 1254d5556e87SAmitkumar Karwar u8 pad2[2]; 1255d5556e87SAmitkumar Karwar u8 result; 1256d5556e87SAmitkumar Karwar } __packed; 1257d5556e87SAmitkumar Karwar 1258d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result { 1259d5556e87SAmitkumar Karwar u8 result; 12605e6e3a92SBing Zhao } __packed; 12615e6e3a92SBing Zhao 12625e6e3a92SBing Zhao struct adhoc_bss_desc { 12635e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 12645e6e3a92SBing Zhao u8 ssid[IEEE80211_MAX_SSID_LEN]; 12655e6e3a92SBing Zhao u8 bss_mode; 12665e6e3a92SBing Zhao __le16 beacon_period; 12675e6e3a92SBing Zhao u8 dtim_period; 12685e6e3a92SBing Zhao u8 time_stamp[8]; 12695e6e3a92SBing Zhao u8 local_time[8]; 12705e6e3a92SBing Zhao union ieee_types_phy_param_set phy_param_set; 12715e6e3a92SBing Zhao union ieee_types_ss_param_set ss_param_set; 12725e6e3a92SBing Zhao __le16 cap_info_bitmap; 12735e6e3a92SBing Zhao u8 data_rates[HOSTCMD_SUPPORTED_RATES]; 12745e6e3a92SBing Zhao 12755e6e3a92SBing Zhao /* 12765e6e3a92SBing Zhao * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. 12775e6e3a92SBing Zhao * It is used in the Adhoc join command and will cause a 12785e6e3a92SBing Zhao * binary layout mismatch with the firmware 12795e6e3a92SBing Zhao */ 12805e6e3a92SBing Zhao } __packed; 12815e6e3a92SBing Zhao 12825e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join { 12835e6e3a92SBing Zhao struct adhoc_bss_desc bss_descriptor; 12845e6e3a92SBing Zhao u16 reserved1; 12855e6e3a92SBing Zhao u16 reserved2; 12865e6e3a92SBing Zhao } __packed; 12875e6e3a92SBing Zhao 12885e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log { 12895e6e3a92SBing Zhao __le32 mcast_tx_frame; 12905e6e3a92SBing Zhao __le32 failed; 12915e6e3a92SBing Zhao __le32 retry; 12925e6e3a92SBing Zhao __le32 multi_retry; 12935e6e3a92SBing Zhao __le32 frame_dup; 12945e6e3a92SBing Zhao __le32 rts_success; 12955e6e3a92SBing Zhao __le32 rts_failure; 12965e6e3a92SBing Zhao __le32 ack_failure; 12975e6e3a92SBing Zhao __le32 rx_frag; 12985e6e3a92SBing Zhao __le32 mcast_rx_frame; 12995e6e3a92SBing Zhao __le32 fcs_error; 13005e6e3a92SBing Zhao __le32 tx_frame; 13015e6e3a92SBing Zhao __le32 reserved; 13025e6e3a92SBing Zhao __le32 wep_icv_err_cnt[4]; 1303d35b6392SXinming Hu __le32 bcn_rcv_cnt; 1304d35b6392SXinming Hu __le32 bcn_miss_cnt; 13055c0b8798SKarthik Ananthapadmanabha } __packed; 13065e6e3a92SBing Zhao 1307a5f39056SYogesh Ashok Powar /* Enumeration for rate format */ 1308a5f39056SYogesh Ashok Powar enum _mwifiex_rate_format { 1309a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_LG = 0, 1310a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_HT, 1311a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_VHT, 1312a5f39056SYogesh Ashok Powar MWIFIEX_RATE_FORMAT_AUTO = 0xFF, 1313a5f39056SYogesh Ashok Powar }; 1314a5f39056SYogesh Ashok Powar 13155e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query { 13165e6e3a92SBing Zhao u8 tx_rate; 1317a5f39056SYogesh Ashok Powar /* Tx Rate Info: For 802.11 AC cards 1318a5f39056SYogesh Ashok Powar * 1319a5f39056SYogesh Ashok Powar * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 1320a5f39056SYogesh Ashok Powar * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 1321a5f39056SYogesh Ashok Powar * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 1322a5f39056SYogesh Ashok Powar * 1323a5f39056SYogesh Ashok Powar * For non-802.11 AC cards 1324a5f39056SYogesh Ashok Powar * Ht Info [Bit 0] RxRate format: LG=0, HT=1 13255e6e3a92SBing Zhao * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 1326a5f39056SYogesh Ashok Powar * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 1327a5f39056SYogesh Ashok Powar */ 13285e6e3a92SBing Zhao u8 ht_info; 13295e6e3a92SBing Zhao } __packed; 13305e6e3a92SBing Zhao 13314e6ee91bSAvinash Patil struct mwifiex_tx_pause_tlv { 13324e6ee91bSAvinash Patil struct mwifiex_ie_types_header header; 13334e6ee91bSAvinash Patil u8 peermac[ETH_ALEN]; 13344e6ee91bSAvinash Patil u8 tx_pause; 13354e6ee91bSAvinash Patil u8 pkt_cnt; 13364e6ee91bSAvinash Patil } __packed; 13374e6ee91bSAvinash Patil 13385e6e3a92SBing Zhao enum Host_Sleep_Action { 13395e6e3a92SBing Zhao HS_CONFIGURE = 0x0001, 13405e6e3a92SBing Zhao HS_ACTIVATE = 0x0002, 13415e6e3a92SBing Zhao }; 13425e6e3a92SBing Zhao 13435e6e3a92SBing Zhao struct mwifiex_hs_config_param { 13445e6e3a92SBing Zhao __le32 conditions; 13455e6e3a92SBing Zhao u8 gpio; 13465e6e3a92SBing Zhao u8 gap; 13475e6e3a92SBing Zhao } __packed; 13485e6e3a92SBing Zhao 13495e6e3a92SBing Zhao struct hs_activate_param { 13504348d085SUjjal Roy __le16 resp_ctrl; 13515e6e3a92SBing Zhao } __packed; 13525e6e3a92SBing Zhao 13535e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh { 13545e6e3a92SBing Zhao __le16 action; 13555e6e3a92SBing Zhao 13565e6e3a92SBing Zhao union { 13575e6e3a92SBing Zhao struct mwifiex_hs_config_param hs_config; 13585e6e3a92SBing Zhao struct hs_activate_param hs_activate; 13595e6e3a92SBing Zhao } params; 13605e6e3a92SBing Zhao } __packed; 13615e6e3a92SBing Zhao 13625e6e3a92SBing Zhao enum SNMP_MIB_INDEX { 13635e6e3a92SBing Zhao OP_RATE_SET_I = 1, 13645e6e3a92SBing Zhao DTIM_PERIOD_I = 3, 13655e6e3a92SBing Zhao RTS_THRESH_I = 5, 13665e6e3a92SBing Zhao SHORT_RETRY_LIM_I = 6, 13675e6e3a92SBing Zhao LONG_RETRY_LIM_I = 7, 13685e6e3a92SBing Zhao FRAG_THRESH_I = 8, 13695e6e3a92SBing Zhao DOT11D_I = 9, 13702a7305c8SAmitkumar Karwar DOT11H_I = 10, 13715e6e3a92SBing Zhao }; 13725e6e3a92SBing Zhao 137312d11109SAvinash Patil enum mwifiex_assocmd_failurepoint { 137412d11109SAvinash Patil MWIFIEX_ASSOC_CMD_SUCCESS = 0, 137512d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_ASSOC, 137612d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_AUTH, 137712d11109SAvinash Patil MWIFIEX_ASSOC_CMD_FAILURE_JOIN 137812d11109SAvinash Patil }; 137912d11109SAvinash Patil 13805e6e3a92SBing Zhao #define MAX_SNMP_BUF_SIZE 128 13815e6e3a92SBing Zhao 13825e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib { 13835e6e3a92SBing Zhao __le16 query_type; 13845e6e3a92SBing Zhao __le16 oid; 13855e6e3a92SBing Zhao __le16 buf_size; 13865e6e3a92SBing Zhao u8 value[1]; 13875e6e3a92SBing Zhao } __packed; 13885e6e3a92SBing Zhao 13895e6e3a92SBing Zhao struct mwifiex_rate_scope { 13905e6e3a92SBing Zhao __le16 type; 13915e6e3a92SBing Zhao __le16 length; 13925e6e3a92SBing Zhao __le16 hr_dsss_rate_bitmap; 13935e6e3a92SBing Zhao __le16 ofdm_rate_bitmap; 13945e6e3a92SBing Zhao __le16 ht_mcs_rate_bitmap[8]; 1395a0b7315aSAmitkumar Karwar __le16 vht_mcs_rate_bitmap[8]; 13965e6e3a92SBing Zhao } __packed; 13975e6e3a92SBing Zhao 13985e6e3a92SBing Zhao struct mwifiex_rate_drop_pattern { 13995e6e3a92SBing Zhao __le16 type; 14005e6e3a92SBing Zhao __le16 length; 14015e6e3a92SBing Zhao __le32 rate_drop_mode; 14025e6e3a92SBing Zhao } __packed; 14035e6e3a92SBing Zhao 14045e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg { 14055e6e3a92SBing Zhao __le16 action; 14065e6e3a92SBing Zhao __le16 cfg_index; 14075e6e3a92SBing Zhao } __packed; 14085e6e3a92SBing Zhao 14095e6e3a92SBing Zhao struct mwifiex_power_group { 14105e6e3a92SBing Zhao u8 modulation_class; 14115e6e3a92SBing Zhao u8 first_rate_code; 14125e6e3a92SBing Zhao u8 last_rate_code; 14135e6e3a92SBing Zhao s8 power_step; 14145e6e3a92SBing Zhao s8 power_min; 14155e6e3a92SBing Zhao s8 power_max; 14165e6e3a92SBing Zhao u8 ht_bandwidth; 14175e6e3a92SBing Zhao u8 reserved; 14185e6e3a92SBing Zhao } __packed; 14195e6e3a92SBing Zhao 14205e6e3a92SBing Zhao struct mwifiex_types_power_group { 1421930fd35cSAmitkumar Karwar __le16 type; 1422930fd35cSAmitkumar Karwar __le16 length; 14235e6e3a92SBing Zhao } __packed; 14245e6e3a92SBing Zhao 14255e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg { 14265e6e3a92SBing Zhao __le16 action; 14275e6e3a92SBing Zhao __le16 cfg_index; 14285e6e3a92SBing Zhao __le32 mode; 14295e6e3a92SBing Zhao } __packed; 14305e6e3a92SBing Zhao 1431caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr { 1432caa8984fSAmitkumar Karwar __le16 action; 1433caa8984fSAmitkumar Karwar __le16 cur_level; 1434caa8984fSAmitkumar Karwar u8 max_power; 1435caa8984fSAmitkumar Karwar u8 min_power; 1436caa8984fSAmitkumar Karwar } __packed; 1437caa8984fSAmitkumar Karwar 14388a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo { 14398a279d5bSAmitkumar Karwar __le16 action_tx; 14408a279d5bSAmitkumar Karwar __le16 tx_ant_mode; 14418a279d5bSAmitkumar Karwar __le16 action_rx; 14428a279d5bSAmitkumar Karwar __le16 rx_ant_mode; 14435c0b8798SKarthik Ananthapadmanabha } __packed; 14448a279d5bSAmitkumar Karwar 14458a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso { 14468a279d5bSAmitkumar Karwar __le16 action; 14478a279d5bSAmitkumar Karwar __le16 ant_mode; 14485c0b8798SKarthik Ananthapadmanabha } __packed; 14498a279d5bSAmitkumar Karwar 1450429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper { 1451429d90d2SAvinash Patil __le16 tdls_action; 1452429d90d2SAvinash Patil __le16 reason; 1453429d90d2SAvinash Patil u8 peer_mac[ETH_ALEN]; 1454429d90d2SAvinash Patil } __packed; 1455429d90d2SAvinash Patil 1456449b8bbfSXinming Hu struct mwifiex_tdls_config { 1457449b8bbfSXinming Hu __le16 enable; 14585c0b8798SKarthik Ananthapadmanabha } __packed; 1459449b8bbfSXinming Hu 1460449b8bbfSXinming Hu struct mwifiex_tdls_config_cs_params { 1461449b8bbfSXinming Hu u8 unit_time; 1462449b8bbfSXinming Hu u8 thr_otherlink; 1463449b8bbfSXinming Hu u8 thr_directlink; 14645c0b8798SKarthik Ananthapadmanabha } __packed; 1465449b8bbfSXinming Hu 1466449b8bbfSXinming Hu struct mwifiex_tdls_init_cs_params { 1467449b8bbfSXinming Hu u8 peer_mac[ETH_ALEN]; 1468449b8bbfSXinming Hu u8 primary_chan; 1469449b8bbfSXinming Hu u8 second_chan_offset; 1470449b8bbfSXinming Hu u8 band; 1471449b8bbfSXinming Hu __le16 switch_time; 1472449b8bbfSXinming Hu __le16 switch_timeout; 1473449b8bbfSXinming Hu u8 reg_class; 1474449b8bbfSXinming Hu u8 periodicity; 1475449b8bbfSXinming Hu } __packed; 1476449b8bbfSXinming Hu 1477449b8bbfSXinming Hu struct mwifiex_tdls_stop_cs_params { 1478449b8bbfSXinming Hu u8 peer_mac[ETH_ALEN]; 14795c0b8798SKarthik Ananthapadmanabha } __packed; 1480449b8bbfSXinming Hu 1481449b8bbfSXinming Hu struct host_cmd_ds_tdls_config { 1482449b8bbfSXinming Hu __le16 tdls_action; 14837fcae8f7SGustavo A. R. Silva u8 tdls_data[]; 1484449b8bbfSXinming Hu } __packed; 1485449b8bbfSXinming Hu 148685afb186SAvinash Patil struct mwifiex_chan_desc { 148785afb186SAvinash Patil __le16 start_freq; 148885afb186SAvinash Patil u8 chan_width; 148985afb186SAvinash Patil u8 chan_num; 149085afb186SAvinash Patil } __packed; 149185afb186SAvinash Patil 149285afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req { 149385afb186SAvinash Patil struct mwifiex_chan_desc chan_desc; 149485afb186SAvinash Patil __le32 msec_dwell_time; 149585afb186SAvinash Patil } __packed; 149685afb186SAvinash Patil 14970a694d68SAvinash Patil struct host_cmd_ds_chan_rpt_event { 14980a694d68SAvinash Patil __le32 result; 14990a694d68SAvinash Patil __le64 start_tsf; 15000a694d68SAvinash Patil __le32 duration; 15012a6be797SGustavo A. R. Silva u8 tlvbuf[]; 15020a694d68SAvinash Patil } __packed; 15030a694d68SAvinash Patil 150492263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg { 150592263a84SZhaoyang Liu u8 action; 150692263a84SZhaoyang Liu u8 enable; 150792263a84SZhaoyang Liu __le16 block_size; 150892263a84SZhaoyang Liu } __packed; 150992263a84SZhaoyang Liu 1510b8b3ececSAmitkumar Karwar struct mwifiex_fixed_bcn_param { 1511b5abcf02SAmitkumar Karwar __le64 timestamp; 15127c6fa2a8SAmitkumar Karwar __le16 beacon_period; 15137c6fa2a8SAmitkumar Karwar __le16 cap_info_bitmap; 15147c6fa2a8SAmitkumar Karwar } __packed; 15157c6fa2a8SAmitkumar Karwar 151621f58d20SAmitkumar Karwar struct mwifiex_event_scan_result { 151721f58d20SAmitkumar Karwar __le16 event_id; 151821f58d20SAmitkumar Karwar u8 bss_index; 151921f58d20SAmitkumar Karwar u8 bss_type; 152021f58d20SAmitkumar Karwar u8 more_event; 152121f58d20SAmitkumar Karwar u8 reserved[3]; 152221f58d20SAmitkumar Karwar __le16 buf_size; 152321f58d20SAmitkumar Karwar u8 num_of_set; 152421f58d20SAmitkumar Karwar } __packed; 152521f58d20SAmitkumar Karwar 1526808bbebcSAmitkumar Karwar struct tx_status_event { 1527808bbebcSAmitkumar Karwar u8 packet_type; 1528808bbebcSAmitkumar Karwar u8 tx_token_id; 1529808bbebcSAmitkumar Karwar u8 status; 1530808bbebcSAmitkumar Karwar } __packed; 1531808bbebcSAmitkumar Karwar 15325e6e3a92SBing Zhao #define MWIFIEX_USER_SCAN_CHAN_MAX 50 15335e6e3a92SBing Zhao 15345e6e3a92SBing Zhao #define MWIFIEX_MAX_SSID_LIST_LENGTH 10 15355e6e3a92SBing Zhao 15365e6e3a92SBing Zhao struct mwifiex_scan_cmd_config { 15375e6e3a92SBing Zhao /* 1538a8c48565SBing Zhao * BSS mode to be sent in the firmware command 15395e6e3a92SBing Zhao */ 15405e6e3a92SBing Zhao u8 bss_mode; 15415e6e3a92SBing Zhao 15425e6e3a92SBing Zhao /* Specific BSSID used to filter scan results in the firmware */ 15435e6e3a92SBing Zhao u8 specific_bssid[ETH_ALEN]; 15445e6e3a92SBing Zhao 15455e6e3a92SBing Zhao /* Length of TLVs sent in command starting at tlvBuffer */ 15465e6e3a92SBing Zhao u32 tlv_buf_len; 15475e6e3a92SBing Zhao 15485e6e3a92SBing Zhao /* 15495e6e3a92SBing Zhao * SSID TLV(s) and ChanList TLVs to be sent in the firmware command 15505e6e3a92SBing Zhao * 15515e6e3a92SBing Zhao * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set 15525e6e3a92SBing Zhao * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set 15535e6e3a92SBing Zhao */ 15545e6e3a92SBing Zhao u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored 15555e6e3a92SBing Zhao here */ 15565e6e3a92SBing Zhao } __packed; 15575e6e3a92SBing Zhao 15585e6e3a92SBing Zhao struct mwifiex_user_scan_chan { 15595e6e3a92SBing Zhao u8 chan_number; 15605e6e3a92SBing Zhao u8 radio_type; 15615e6e3a92SBing Zhao u8 scan_type; 15625e6e3a92SBing Zhao u8 reserved; 15635e6e3a92SBing Zhao u32 scan_time; 15645e6e3a92SBing Zhao } __packed; 15655e6e3a92SBing Zhao 15665e6e3a92SBing Zhao struct mwifiex_user_scan_cfg { 15675e6e3a92SBing Zhao /* 15685e6e3a92SBing Zhao * BSS mode to be sent in the firmware command 15695e6e3a92SBing Zhao */ 15705e6e3a92SBing Zhao u8 bss_mode; 15715e6e3a92SBing Zhao /* Configure the number of probe requests for active chan scans */ 15725e6e3a92SBing Zhao u8 num_probes; 15735e6e3a92SBing Zhao u8 reserved; 15745e6e3a92SBing Zhao /* BSSID filter sent in the firmware command to limit the results */ 15755e6e3a92SBing Zhao u8 specific_bssid[ETH_ALEN]; 1576be0b281eSAmitkumar Karwar /* SSID filter list used in the firmware to limit the scan results */ 1577be0b281eSAmitkumar Karwar struct cfg80211_ssid *ssid_list; 1578be0b281eSAmitkumar Karwar u8 num_ssids; 15795e6e3a92SBing Zhao /* Variable number (fixed maximum) of channels to scan up */ 15805e6e3a92SBing Zhao struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX]; 1581cb91be87SAvinash Patil u16 scan_chan_gap; 1582c2a8f0ffSGanapathi Bhat u8 random_mac[ETH_ALEN]; 15835e6e3a92SBing Zhao } __packed; 15845e6e3a92SBing Zhao 15850c9b7f22SXinming Hu #define MWIFIEX_BG_SCAN_CHAN_MAX 38 15860c9b7f22SXinming Hu #define MWIFIEX_BSS_MODE_INFRA 1 15870c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_GET 0x0000 15880c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET 0x0001 15890c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01 15900c9b7f22SXinming Hu /** ssid match */ 15910c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_MATCH 0x0001 15920c9b7f22SXinming Hu /** ssid match and RSSI exceeded */ 15930c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_RSSI_MATCH 0x0004 15940c9b7f22SXinming Hu /**wait for all channel scan to complete to report scan result*/ 15950c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE 0x80000000 15960c9b7f22SXinming Hu 15970c9b7f22SXinming Hu struct mwifiex_bg_scan_cfg { 15980c9b7f22SXinming Hu u16 action; 15990c9b7f22SXinming Hu u8 enable; 16000c9b7f22SXinming Hu u8 bss_type; 16010c9b7f22SXinming Hu u8 chan_per_scan; 16020c9b7f22SXinming Hu u32 scan_interval; 16030c9b7f22SXinming Hu u32 report_condition; 16040c9b7f22SXinming Hu u8 num_probes; 16050c9b7f22SXinming Hu u8 rssi_threshold; 16060c9b7f22SXinming Hu u8 snr_threshold; 16070c9b7f22SXinming Hu u16 repeat_count; 16080c9b7f22SXinming Hu u16 start_later; 16090c9b7f22SXinming Hu struct cfg80211_match_set *ssid_list; 16100c9b7f22SXinming Hu u8 num_ssids; 16110c9b7f22SXinming Hu struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX]; 16120c9b7f22SXinming Hu u16 scan_chan_gap; 16130c9b7f22SXinming Hu } __packed; 16140c9b7f22SXinming Hu 16155e6e3a92SBing Zhao struct ie_body { 16165e6e3a92SBing Zhao u8 grp_key_oui[4]; 16175e6e3a92SBing Zhao u8 ptk_cnt[2]; 16185e6e3a92SBing Zhao u8 ptk_body[4]; 16195e6e3a92SBing Zhao } __packed; 16205e6e3a92SBing Zhao 16215e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan { 16225e6e3a92SBing Zhao u8 bss_mode; 16235e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 16247fcae8f7SGustavo A. R. Silva u8 tlv_buffer[]; 16255e6e3a92SBing Zhao } __packed; 16265e6e3a92SBing Zhao 16275e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp { 16285e6e3a92SBing Zhao __le16 bss_descript_size; 16295e6e3a92SBing Zhao u8 number_of_sets; 16307fcae8f7SGustavo A. R. Silva u8 bss_desc_and_tlv_buffer[]; 16315e6e3a92SBing Zhao } __packed; 16325e6e3a92SBing Zhao 163321f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext { 163421f58d20SAmitkumar Karwar u32 reserved; 1635498365e5SGustavo A. R. Silva u8 tlv_buffer[]; 163621f58d20SAmitkumar Karwar } __packed; 163721f58d20SAmitkumar Karwar 163840d7412bSAniket Nagarnaik struct mwifiex_ie_types_bss_mode { 163940d7412bSAniket Nagarnaik struct mwifiex_ie_types_header header; 164040d7412bSAniket Nagarnaik u8 bss_mode; 164140d7412bSAniket Nagarnaik } __packed; 164240d7412bSAniket Nagarnaik 164321f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_rsp { 164421f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 164521f58d20SAmitkumar Karwar u8 bssid[ETH_ALEN]; 16467fcae8f7SGustavo A. R. Silva u8 frame_body[]; 164721f58d20SAmitkumar Karwar } __packed; 164821f58d20SAmitkumar Karwar 164921f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_info { 165021f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 165121f58d20SAmitkumar Karwar __le16 rssi; 165221f58d20SAmitkumar Karwar __le16 anpi; 165321f58d20SAmitkumar Karwar u8 cca_busy_fraction; 165421f58d20SAmitkumar Karwar u8 radio_type; 165521f58d20SAmitkumar Karwar u8 channel; 165621f58d20SAmitkumar Karwar u8 reserved; 165721f58d20SAmitkumar Karwar __le64 tsf; 165821f58d20SAmitkumar Karwar } __packed; 165921f58d20SAmitkumar Karwar 16600c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config { 16610c9b7f22SXinming Hu __le16 action; 16620c9b7f22SXinming Hu u8 enable; 16630c9b7f22SXinming Hu u8 bss_type; 16640c9b7f22SXinming Hu u8 chan_per_scan; 16650c9b7f22SXinming Hu u8 reserved; 16660c9b7f22SXinming Hu __le16 reserved1; 16670c9b7f22SXinming Hu __le32 scan_interval; 16680c9b7f22SXinming Hu __le32 reserved2; 16690c9b7f22SXinming Hu __le32 report_condition; 16700c9b7f22SXinming Hu __le16 reserved3; 16712a6be797SGustavo A. R. Silva u8 tlv[]; 16720c9b7f22SXinming Hu } __packed; 16730c9b7f22SXinming Hu 16745e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query { 16755e6e3a92SBing Zhao u8 flush; 16765e6e3a92SBing Zhao } __packed; 16775e6e3a92SBing Zhao 16785e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp { 16794348d085SUjjal Roy __le32 report_condition; 16805e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp scan_resp; 16815e6e3a92SBing Zhao } __packed; 16825e6e3a92SBing Zhao 16835e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set { 16845e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 16855e6e3a92SBing Zhao u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; 16865e6e3a92SBing Zhao struct ieee80211_country_ie_triplet triplet[1]; 16875e6e3a92SBing Zhao } __packed; 16885e6e3a92SBing Zhao 16895e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info { 16905e6e3a92SBing Zhao __le16 action; 16915e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set domain; 16925e6e3a92SBing Zhao } __packed; 16935e6e3a92SBing Zhao 16945e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp { 16955e6e3a92SBing Zhao __le16 action; 16965e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set domain; 16975e6e3a92SBing Zhao } __packed; 16985e6e3a92SBing Zhao 16995e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req { 17005e6e3a92SBing Zhao u8 add_req_result; 17015e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 17025e6e3a92SBing Zhao u8 dialog_token; 17035e6e3a92SBing Zhao __le16 block_ack_param_set; 17045e6e3a92SBing Zhao __le16 block_ack_tmo; 17055e6e3a92SBing Zhao __le16 ssn; 17065e6e3a92SBing Zhao } __packed; 17075e6e3a92SBing Zhao 17085e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp { 17095e6e3a92SBing Zhao u8 add_rsp_result; 17105e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 17115e6e3a92SBing Zhao u8 dialog_token; 17125e6e3a92SBing Zhao __le16 status_code; 17135e6e3a92SBing Zhao __le16 block_ack_param_set; 17145e6e3a92SBing Zhao __le16 block_ack_tmo; 17155e6e3a92SBing Zhao __le16 ssn; 17165e6e3a92SBing Zhao } __packed; 17175e6e3a92SBing Zhao 17185e6e3a92SBing Zhao struct host_cmd_ds_11n_delba { 17195e6e3a92SBing Zhao u8 del_result; 17205e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 17215e6e3a92SBing Zhao __le16 del_ba_param_set; 17225e6e3a92SBing Zhao __le16 reason_code; 17235e6e3a92SBing Zhao u8 reserved; 17245e6e3a92SBing Zhao } __packed; 17255e6e3a92SBing Zhao 17265e6e3a92SBing Zhao struct host_cmd_ds_11n_batimeout { 17275e6e3a92SBing Zhao u8 tid; 17285e6e3a92SBing Zhao u8 peer_mac_addr[ETH_ALEN]; 17295e6e3a92SBing Zhao u8 origninator; 17305e6e3a92SBing Zhao } __packed; 17315e6e3a92SBing Zhao 17325e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg { 17335e6e3a92SBing Zhao __le16 action; 17345e6e3a92SBing Zhao __le16 ht_tx_cap; 17355e6e3a92SBing Zhao __le16 ht_tx_info; 1736a5f39056SYogesh Ashok Powar __le16 misc_config; /* Needed for 802.11AC cards only */ 17375e6e3a92SBing Zhao } __packed; 17385e6e3a92SBing Zhao 17395e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg { 17405e6e3a92SBing Zhao __le16 action; 17415e6e3a92SBing Zhao __le16 buff_size; 1742*41469ff9SBjorn Helgaas __le16 mp_end_port; /* SDIO only, reserved for other interfaces */ 17435e6e3a92SBing Zhao __le16 reserved3; 17445e6e3a92SBing Zhao } __packed; 17455e6e3a92SBing Zhao 17465e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl { 17475e6e3a92SBing Zhao __le16 action; 17485e6e3a92SBing Zhao __le16 enable; 17495e6e3a92SBing Zhao __le16 curr_buf_size; 17505e6e3a92SBing Zhao } __packed; 17515e6e3a92SBing Zhao 17520f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth { 17530f9e9b8bSAvinash Patil u8 mac[ETH_ALEN]; 17540f9e9b8bSAvinash Patil __le16 reason; 17550f9e9b8bSAvinash Patil } __packed; 17560f9e9b8bSAvinash Patil 1757b21783e9SXinming Hu struct mwifiex_ie_types_sta_info { 1758b21783e9SXinming Hu struct mwifiex_ie_types_header header; 1759b21783e9SXinming Hu u8 mac[ETH_ALEN]; 1760b21783e9SXinming Hu u8 power_mfg_status; 1761b21783e9SXinming Hu s8 rssi; 1762b21783e9SXinming Hu }; 1763b21783e9SXinming Hu 1764b21783e9SXinming Hu struct host_cmd_ds_sta_list { 1765902831a7SKarthik D A __le16 sta_count; 17662a6be797SGustavo A. R. Silva u8 tlv[]; 1767b21783e9SXinming Hu } __packed; 1768b21783e9SXinming Hu 17692a7305c8SAmitkumar Karwar struct mwifiex_ie_types_pwr_capability { 17702a7305c8SAmitkumar Karwar struct mwifiex_ie_types_header header; 17712a7305c8SAmitkumar Karwar s8 min_pwr; 17722a7305c8SAmitkumar Karwar s8 max_pwr; 17732a7305c8SAmitkumar Karwar }; 17742a7305c8SAmitkumar Karwar 17752a7305c8SAmitkumar Karwar struct mwifiex_ie_types_local_pwr_constraint { 17762a7305c8SAmitkumar Karwar struct mwifiex_ie_types_header header; 17772a7305c8SAmitkumar Karwar u8 chan; 17782a7305c8SAmitkumar Karwar u8 constraint; 17792a7305c8SAmitkumar Karwar }; 17802a7305c8SAmitkumar Karwar 17815e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_param_set { 17825e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 17837fcae8f7SGustavo A. R. Silva u8 wmm_ie[]; 17845c0b8798SKarthik Ananthapadmanabha } __packed; 17855e6e3a92SBing Zhao 1786432da7d2SXinming Hu struct mwifiex_ie_types_mgmt_frame { 1787432da7d2SXinming Hu struct mwifiex_ie_types_header header; 1788432da7d2SXinming Hu __le16 frame_control; 17892a6be797SGustavo A. R. Silva u8 frame_contents[]; 1790432da7d2SXinming Hu }; 1791432da7d2SXinming Hu 17925e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_queue_status { 17935e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 17945e6e3a92SBing Zhao u8 queue_index; 17955e6e3a92SBing Zhao u8 disabled; 17964348d085SUjjal Roy __le16 medium_time; 17975e6e3a92SBing Zhao u8 flow_required; 17985e6e3a92SBing Zhao u8 flow_created; 17995e6e3a92SBing Zhao u32 reserved; 18005e6e3a92SBing Zhao }; 18015e6e3a92SBing Zhao 18025e6e3a92SBing Zhao struct ieee_types_vendor_header { 18035e6e3a92SBing Zhao u8 element_id; 18045e6e3a92SBing Zhao u8 len; 180563d7ef36SBrian Norris struct { 180663d7ef36SBrian Norris u8 oui[3]; 180763d7ef36SBrian Norris u8 oui_type; 180863d7ef36SBrian Norris } __packed oui; 18095e6e3a92SBing Zhao } __packed; 18105e6e3a92SBing Zhao 18115e6e3a92SBing Zhao struct ieee_types_wmm_parameter { 18125e6e3a92SBing Zhao /* 18135e6e3a92SBing Zhao * WMM Parameter IE - Vendor Specific Header: 18145e6e3a92SBing Zhao * element_id [221/0xdd] 18155e6e3a92SBing Zhao * Len [24] 18165e6e3a92SBing Zhao * Oui [00:50:f2] 18175e6e3a92SBing Zhao * OuiType [2] 18185e6e3a92SBing Zhao * OuiSubType [1] 18195e6e3a92SBing Zhao * Version [1] 18205e6e3a92SBing Zhao */ 18215e6e3a92SBing Zhao struct ieee_types_vendor_header vend_hdr; 182263d7ef36SBrian Norris u8 oui_subtype; 182363d7ef36SBrian Norris u8 version; 182463d7ef36SBrian Norris 18255e6e3a92SBing Zhao u8 qos_info_bitmap; 18265e6e3a92SBing Zhao u8 reserved; 182799fec5deSJohannes Berg struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS]; 18285e6e3a92SBing Zhao } __packed; 18295e6e3a92SBing Zhao 18305e6e3a92SBing Zhao struct ieee_types_wmm_info { 18315e6e3a92SBing Zhao 18325e6e3a92SBing Zhao /* 18335e6e3a92SBing Zhao * WMM Info IE - Vendor Specific Header: 18345e6e3a92SBing Zhao * element_id [221/0xdd] 18355e6e3a92SBing Zhao * Len [7] 18365e6e3a92SBing Zhao * Oui [00:50:f2] 18375e6e3a92SBing Zhao * OuiType [2] 18385e6e3a92SBing Zhao * OuiSubType [0] 18395e6e3a92SBing Zhao * Version [1] 18405e6e3a92SBing Zhao */ 18415e6e3a92SBing Zhao struct ieee_types_vendor_header vend_hdr; 184263d7ef36SBrian Norris u8 oui_subtype; 184363d7ef36SBrian Norris u8 version; 18445e6e3a92SBing Zhao 18455e6e3a92SBing Zhao u8 qos_info_bitmap; 18465e6e3a92SBing Zhao } __packed; 18475e6e3a92SBing Zhao 18485e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status { 18495e6e3a92SBing Zhao u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) * 185099fec5deSJohannes Berg IEEE80211_NUM_ACS]; 18515e6e3a92SBing Zhao u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2]; 18525e6e3a92SBing Zhao } __packed; 18535e6e3a92SBing Zhao 18545e6e3a92SBing Zhao struct mwifiex_wmm_ac_status { 18555e6e3a92SBing Zhao u8 disabled; 18565e6e3a92SBing Zhao u8 flow_required; 18575e6e3a92SBing Zhao u8 flow_created; 18585e6e3a92SBing Zhao }; 18595e6e3a92SBing Zhao 18605e6e3a92SBing Zhao struct mwifiex_ie_types_htcap { 18615e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 18625e6e3a92SBing Zhao struct ieee80211_ht_cap ht_cap; 18635e6e3a92SBing Zhao } __packed; 18645e6e3a92SBing Zhao 1865a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vhtcap { 1866a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1867a5f39056SYogesh Ashok Powar struct ieee80211_vht_cap vht_cap; 1868a5f39056SYogesh Ashok Powar } __packed; 1869a5f39056SYogesh Ashok Powar 18705f6d5983SAvinash Patil struct mwifiex_ie_types_aid { 18715f6d5983SAvinash Patil struct mwifiex_ie_types_header header; 18725f6d5983SAvinash Patil __le16 aid; 18735f6d5983SAvinash Patil } __packed; 18745f6d5983SAvinash Patil 1875a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_oper_mode_ntf { 1876a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1877a5f39056SYogesh Ashok Powar u8 oper_mode; 1878a5f39056SYogesh Ashok Powar } __packed; 1879a5f39056SYogesh Ashok Powar 1880a5f39056SYogesh Ashok Powar /* VHT Operations IE */ 1881a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vht_oper { 1882a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_header header; 1883a5f39056SYogesh Ashok Powar u8 chan_width; 1884a5f39056SYogesh Ashok Powar u8 chan_center_freq_1; 1885a5f39056SYogesh Ashok Powar u8 chan_center_freq_2; 1886a5f39056SYogesh Ashok Powar /* Basic MCS set map, each 2 bits stands for a NSS */ 18874348d085SUjjal Roy __le16 basic_mcs_map; 1888a5f39056SYogesh Ashok Powar } __packed; 1889a5f39056SYogesh Ashok Powar 189054428c57SAvinash Patil struct mwifiex_ie_types_wmmcap { 189154428c57SAvinash Patil struct mwifiex_ie_types_header header; 189254428c57SAvinash Patil struct mwifiex_types_wmm_info wmm_info; 189354428c57SAvinash Patil } __packed; 189454428c57SAvinash Patil 18955e6e3a92SBing Zhao struct mwifiex_ie_types_htinfo { 18965e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 1897074d46d1SJohannes Berg struct ieee80211_ht_operation ht_oper; 18985e6e3a92SBing Zhao } __packed; 18995e6e3a92SBing Zhao 19005e6e3a92SBing Zhao struct mwifiex_ie_types_2040bssco { 19015e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 19025e6e3a92SBing Zhao u8 bss_co_2040; 19035e6e3a92SBing Zhao } __packed; 19045e6e3a92SBing Zhao 19055e6e3a92SBing Zhao struct mwifiex_ie_types_extcap { 19065e6e3a92SBing Zhao struct mwifiex_ie_types_header header; 19072a6be797SGustavo A. R. Silva u8 ext_capab[]; 19085e6e3a92SBing Zhao } __packed; 19095e6e3a92SBing Zhao 1910c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access { 1911c2c6c85fSChin-ran Lo __le16 action; 1912c2c6c85fSChin-ran Lo __le16 reserved; 1913c2c6c85fSChin-ran Lo __le32 addr; 1914c2c6c85fSChin-ran Lo __le32 value; 19155c0b8798SKarthik Ananthapadmanabha } __packed; 1916c2c6c85fSChin-ran Lo 19171f4dfd8aSAvinash Patil struct mwifiex_ie_types_qos_info { 19181f4dfd8aSAvinash Patil struct mwifiex_ie_types_header header; 19191f4dfd8aSAvinash Patil u8 qos_info; 19201f4dfd8aSAvinash Patil } __packed; 19211f4dfd8aSAvinash Patil 19225e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access { 19235e6e3a92SBing Zhao __le16 action; 19245e6e3a92SBing Zhao __le16 offset; 19255e6e3a92SBing Zhao __le32 value; 19265e6e3a92SBing Zhao } __packed; 19275e6e3a92SBing Zhao 19285e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access { 19295e6e3a92SBing Zhao __le16 action; 19305e6e3a92SBing Zhao __le16 offset; 19315e6e3a92SBing Zhao u8 value; 19325e6e3a92SBing Zhao u8 reserved[3]; 19335e6e3a92SBing Zhao } __packed; 19345e6e3a92SBing Zhao 19355e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access { 19365e6e3a92SBing Zhao __le16 action; 19375e6e3a92SBing Zhao __le16 offset; 19385e6e3a92SBing Zhao u8 value; 19395e6e3a92SBing Zhao u8 reserved[3]; 19405e6e3a92SBing Zhao } __packed; 19415e6e3a92SBing Zhao 19425e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access { 19435e6e3a92SBing Zhao __le16 action; 19445e6e3a92SBing Zhao __le16 offset; 19455e6e3a92SBing Zhao u8 value; 19465e6e3a92SBing Zhao u8 reserved[3]; 19475e6e3a92SBing Zhao } __packed; 19485e6e3a92SBing Zhao 19495e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access { 19505e6e3a92SBing Zhao __le16 action; 19515e6e3a92SBing Zhao 19525e6e3a92SBing Zhao __le16 offset; 19535e6e3a92SBing Zhao __le16 byte_count; 19545e6e3a92SBing Zhao u8 value; 19555e6e3a92SBing Zhao } __packed; 19565e6e3a92SBing Zhao 1957e568634aSAvinash Patil struct mwifiex_assoc_event { 1958e568634aSAvinash Patil u8 sta_addr[ETH_ALEN]; 1959e568634aSAvinash Patil __le16 type; 1960e568634aSAvinash Patil __le16 len; 1961e568634aSAvinash Patil __le16 frame_control; 1962e568634aSAvinash Patil __le16 cap_info; 1963e568634aSAvinash Patil __le16 listen_interval; 19642a6be797SGustavo A. R. Silva u8 data[]; 1965e568634aSAvinash Patil } __packed; 1966e568634aSAvinash Patil 19674db16a18SAvinash Patil struct host_cmd_ds_sys_config { 19684db16a18SAvinash Patil __le16 action; 19692a6be797SGustavo A. R. Silva u8 tlv[]; 19704db16a18SAvinash Patil }; 1971f752dcd5SAvinash Patil 197283c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg { 197383c78da9SYogesh Ashok Powar __le16 action; 197483c78da9SYogesh Ashok Powar u8 band_config; 197583c78da9SYogesh Ashok Powar u8 misc_config; 197683c78da9SYogesh Ashok Powar __le32 cap_info; 197783c78da9SYogesh Ashok Powar __le32 mcs_tx_set; 197883c78da9SYogesh Ashok Powar __le32 mcs_rx_set; 197983c78da9SYogesh Ashok Powar } __packed; 198083c78da9SYogesh Ashok Powar 1981f752dcd5SAvinash Patil struct host_cmd_tlv_akmp { 19826b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1983f752dcd5SAvinash Patil __le16 key_mgmt; 1984f752dcd5SAvinash Patil __le16 key_mgmt_operation; 1985f752dcd5SAvinash Patil } __packed; 1986f752dcd5SAvinash Patil 1987f752dcd5SAvinash Patil struct host_cmd_tlv_pwk_cipher { 19886b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1989f752dcd5SAvinash Patil __le16 proto; 1990f752dcd5SAvinash Patil u8 cipher; 1991f752dcd5SAvinash Patil u8 reserved; 1992f752dcd5SAvinash Patil } __packed; 1993f752dcd5SAvinash Patil 1994f752dcd5SAvinash Patil struct host_cmd_tlv_gwk_cipher { 19956b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 1996f752dcd5SAvinash Patil u8 cipher; 1997f752dcd5SAvinash Patil u8 reserved; 1998f752dcd5SAvinash Patil } __packed; 1999f752dcd5SAvinash Patil 2000f752dcd5SAvinash Patil struct host_cmd_tlv_passphrase { 20016b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20022a6be797SGustavo A. R. Silva u8 passphrase[]; 2003f752dcd5SAvinash Patil } __packed; 2004f752dcd5SAvinash Patil 200596893538SAvinash Patil struct host_cmd_tlv_wep_key { 20066b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 200796893538SAvinash Patil u8 key_index; 200896893538SAvinash Patil u8 is_default; 20097fcae8f7SGustavo A. R. Silva u8 key[]; 201096893538SAvinash Patil }; 201196893538SAvinash Patil 2012f752dcd5SAvinash Patil struct host_cmd_tlv_auth_type { 20136b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 2014f752dcd5SAvinash Patil u8 auth_type; 2015f752dcd5SAvinash Patil } __packed; 2016f752dcd5SAvinash Patil 2017f752dcd5SAvinash Patil struct host_cmd_tlv_encrypt_protocol { 20186b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 2019f752dcd5SAvinash Patil __le16 proto; 2020f752dcd5SAvinash Patil } __packed; 2021f752dcd5SAvinash Patil 202212190c5dSAvinash Patil struct host_cmd_tlv_ssid { 20236b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20242a6be797SGustavo A. R. Silva u8 ssid[]; 202512190c5dSAvinash Patil } __packed; 202612190c5dSAvinash Patil 2027a3c2c4f6SAvinash Patil struct host_cmd_tlv_rates { 20286b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20292a6be797SGustavo A. R. Silva u8 rates[]; 2030a3c2c4f6SAvinash Patil } __packed; 2031a3c2c4f6SAvinash Patil 203221f58d20SAmitkumar Karwar struct mwifiex_ie_types_bssid_list { 203321f58d20SAmitkumar Karwar struct mwifiex_ie_types_header header; 203421f58d20SAmitkumar Karwar u8 bssid[ETH_ALEN]; 203521f58d20SAmitkumar Karwar } __packed; 203621f58d20SAmitkumar Karwar 2037605b73afSAvinash Patil struct host_cmd_tlv_bcast_ssid { 20386b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 2039605b73afSAvinash Patil u8 bcast_ctl; 2040605b73afSAvinash Patil } __packed; 2041605b73afSAvinash Patil 204212190c5dSAvinash Patil struct host_cmd_tlv_beacon_period { 20436b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 204412190c5dSAvinash Patil __le16 period; 204512190c5dSAvinash Patil } __packed; 204612190c5dSAvinash Patil 204712190c5dSAvinash Patil struct host_cmd_tlv_dtim_period { 20486b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 204912190c5dSAvinash Patil u8 period; 205012190c5dSAvinash Patil } __packed; 20514db16a18SAvinash Patil 20529b930eaeSAvinash Patil struct host_cmd_tlv_frag_threshold { 20536b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20549b930eaeSAvinash Patil __le16 frag_thr; 20559b930eaeSAvinash Patil } __packed; 20569b930eaeSAvinash Patil 20579b930eaeSAvinash Patil struct host_cmd_tlv_rts_threshold { 20586b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20599b930eaeSAvinash Patil __le16 rts_thr; 20609b930eaeSAvinash Patil } __packed; 20619b930eaeSAvinash Patil 20629b930eaeSAvinash Patil struct host_cmd_tlv_retry_limit { 20636b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20649b930eaeSAvinash Patil u8 limit; 20659b930eaeSAvinash Patil } __packed; 20669b930eaeSAvinash Patil 206775edd2c6SAvinash Patil struct host_cmd_tlv_mac_addr { 20686b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 206975edd2c6SAvinash Patil u8 mac_addr[ETH_ALEN]; 207075edd2c6SAvinash Patil } __packed; 207175edd2c6SAvinash Patil 20724db16a18SAvinash Patil struct host_cmd_tlv_channel_band { 20736b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20744db16a18SAvinash Patil u8 band_config; 20754db16a18SAvinash Patil u8 channel; 20764db16a18SAvinash Patil } __packed; 20774db16a18SAvinash Patil 20788b4509f6SKevin Gan struct host_cmd_tlv_ageout_timer { 20796b21a69fSAmitkumar Karwar struct mwifiex_ie_types_header header; 20808b4509f6SKevin Gan __le32 sta_ao_timer; 20818b4509f6SKevin Gan } __packed; 20828b4509f6SKevin Gan 20838a73dd63SAvinash Patil struct host_cmd_tlv_power_constraint { 20848a73dd63SAvinash Patil struct mwifiex_ie_types_header header; 20858a73dd63SAvinash Patil u8 constraint; 20868a73dd63SAvinash Patil } __packed; 20878a73dd63SAvinash Patil 2088d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_scan_time { 2089d219b7ebSChunfan Chen struct mwifiex_ie_types_header header; 2090d219b7ebSChunfan Chen u8 coex_scan; 2091d219b7ebSChunfan Chen u8 reserved; 2092c18b104dSPrasun Maiti __le16 min_scan_time; 2093c18b104dSPrasun Maiti __le16 max_scan_time; 2094d219b7ebSChunfan Chen } __packed; 2095d219b7ebSChunfan Chen 2096d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_aggr_win_size { 2097d219b7ebSChunfan Chen struct mwifiex_ie_types_header header; 2098d219b7ebSChunfan Chen u8 coex_win_size; 2099d219b7ebSChunfan Chen u8 tx_win_size; 2100d219b7ebSChunfan Chen u8 rx_win_size; 2101d219b7ebSChunfan Chen u8 reserved; 2102d219b7ebSChunfan Chen } __packed; 2103d219b7ebSChunfan Chen 210446dbe247SAmitkumar Karwar struct mwifiex_ie_types_robust_coex { 210546dbe247SAmitkumar Karwar struct mwifiex_ie_types_header header; 210646dbe247SAmitkumar Karwar __le32 mode; 210746dbe247SAmitkumar Karwar } __packed; 210846dbe247SAmitkumar Karwar 21092d1d7091SJonas Dreßler #define MWIFIEX_VERSION_STR_LENGTH 128 21102d1d7091SJonas Dreßler 21115e6e3a92SBing Zhao struct host_cmd_ds_version_ext { 21125e6e3a92SBing Zhao u8 version_str_sel; 21132d1d7091SJonas Dreßler char version_str[MWIFIEX_VERSION_STR_LENGTH]; 21145e6e3a92SBing Zhao } __packed; 21155e6e3a92SBing Zhao 21163cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg { 21173cec6870SStone Piao __le16 action; 21183cec6870SStone Piao __le32 mask; 21193cec6870SStone Piao } __packed; 21203cec6870SStone Piao 2121e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg { 2122e1a2b7a3SStone Piao __le16 action; 2123e1a2b7a3SStone Piao __le16 mode; 2124e1a2b7a3SStone Piao } __packed; 2125e1a2b7a3SStone Piao 21267feb4c48SStone Piao struct host_cmd_ds_remain_on_chan { 21277feb4c48SStone Piao __le16 action; 21287feb4c48SStone Piao u8 status; 21297feb4c48SStone Piao u8 reserved; 21307feb4c48SStone Piao u8 band_cfg; 21317feb4c48SStone Piao u8 channel; 21327feb4c48SStone Piao __le32 duration; 21337feb4c48SStone Piao } __packed; 21347feb4c48SStone Piao 21355e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status { 21365e6e3a92SBing Zhao __le16 action; 21375e6e3a92SBing Zhao __le16 enable; 21385e6e3a92SBing Zhao u8 bssid[ETH_ALEN]; 21395e6e3a92SBing Zhao __le16 beacon_interval; 21405e6e3a92SBing Zhao __le16 atim_window; 21415e6e3a92SBing Zhao __le16 use_g_rate_protect; 21425e6e3a92SBing Zhao } __packed; 21435e6e3a92SBing Zhao 21447da060c1SAmitkumar Karwar struct mwifiex_fw_mef_entry { 21457da060c1SAmitkumar Karwar u8 mode; 21467da060c1SAmitkumar Karwar u8 action; 21477da060c1SAmitkumar Karwar __le16 exprsize; 21482a6be797SGustavo A. R. Silva u8 expr[]; 21497da060c1SAmitkumar Karwar } __packed; 21507da060c1SAmitkumar Karwar 21517da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg { 21527da060c1SAmitkumar Karwar __le32 criteria; 21537da060c1SAmitkumar Karwar __le16 num_entries; 21544cf4cf6eSJohannes Berg u8 mef_entry_data[]; 21557da060c1SAmitkumar Karwar } __packed; 21567da060c1SAmitkumar Karwar 21575e6e3a92SBing Zhao #define CONNECTION_TYPE_INFRA 0 21585e6e3a92SBing Zhao #define CONNECTION_TYPE_ADHOC 1 21599197ab9eSStone Piao #define CONNECTION_TYPE_AP 2 21605e6e3a92SBing Zhao 21615e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode { 21625e6e3a92SBing Zhao u8 con_type; 21635e6e3a92SBing Zhao } __packed; 21645e6e3a92SBing Zhao 2165d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details { 2166d930faeeSAmitkumar Karwar /* TX buffer descriptor ring address */ 2167902831a7SKarthik D A __le32 txbd_addr_lo; 2168902831a7SKarthik D A __le32 txbd_addr_hi; 2169d930faeeSAmitkumar Karwar /* TX buffer descriptor ring count */ 2170902831a7SKarthik D A __le32 txbd_count; 2171d930faeeSAmitkumar Karwar 2172d930faeeSAmitkumar Karwar /* RX buffer descriptor ring address */ 2173902831a7SKarthik D A __le32 rxbd_addr_lo; 2174902831a7SKarthik D A __le32 rxbd_addr_hi; 2175d930faeeSAmitkumar Karwar /* RX buffer descriptor ring count */ 2176902831a7SKarthik D A __le32 rxbd_count; 2177d930faeeSAmitkumar Karwar 2178d930faeeSAmitkumar Karwar /* Event buffer descriptor ring address */ 2179902831a7SKarthik D A __le32 evtbd_addr_lo; 2180902831a7SKarthik D A __le32 evtbd_addr_hi; 2181d930faeeSAmitkumar Karwar /* Event buffer descriptor ring count */ 2182902831a7SKarthik D A __le32 evtbd_count; 2183d930faeeSAmitkumar Karwar 2184d930faeeSAmitkumar Karwar /* Sleep cookie buffer physical address */ 2185902831a7SKarthik D A __le32 sleep_cookie_addr_lo; 2186902831a7SKarthik D A __le32 sleep_cookie_addr_hi; 2187d930faeeSAmitkumar Karwar } __packed; 2188d930faeeSAmitkumar Karwar 2189fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_rssi_threshold { 2190fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_header header; 2191fa444bf8SAmitkumar Karwar u8 abs_value; 2192fa444bf8SAmitkumar Karwar u8 evt_freq; 2193fa444bf8SAmitkumar Karwar } __packed; 2194fa444bf8SAmitkumar Karwar 21953b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_LEN 8 21963b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_NUM 10 21973b57c1a7SAvinash Patil #define MWIFIEX_BIN_COUNTER_LEN 7 21983b57c1a7SAvinash Patil 21993b57c1a7SAvinash Patil struct mwifiex_radar_det_event { 22003b57c1a7SAvinash Patil __le32 detect_count; 22013b57c1a7SAvinash Patil u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ 22023b57c1a7SAvinash Patil u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ 22033b57c1a7SAvinash Patil __le16 pw_chirp_type; 22043b57c1a7SAvinash Patil u8 pw_chirp_idx; 22053b57c1a7SAvinash Patil u8 pw_value; 22063b57c1a7SAvinash Patil u8 pri_radar_type; 22073b57c1a7SAvinash Patil u8 pri_bincnt; 22083b57c1a7SAvinash Patil u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN]; 22093b57c1a7SAvinash Patil u8 num_dfs_records; 22103b57c1a7SAvinash Patil u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN]; 22113b57c1a7SAvinash Patil __le32 passed; 22123b57c1a7SAvinash Patil } __packed; 22133b57c1a7SAvinash Patil 22148d6b538aSAvinash Patil struct mwifiex_ie_types_multi_chan_info { 22158d6b538aSAvinash Patil struct mwifiex_ie_types_header header; 22168d6b538aSAvinash Patil __le16 status; 22172a6be797SGustavo A. R. Silva u8 tlv_buffer[]; 22188d6b538aSAvinash Patil } __packed; 22198d6b538aSAvinash Patil 22202b0f997dSZhaoyang Liu struct mwifiex_ie_types_mc_group_info { 22212b0f997dSZhaoyang Liu struct mwifiex_ie_types_header header; 22222b0f997dSZhaoyang Liu u8 chan_group_id; 22232b0f997dSZhaoyang Liu u8 chan_buf_weight; 22242b0f997dSZhaoyang Liu u8 band_config; 22252b0f997dSZhaoyang Liu u8 chan_num; 2226902831a7SKarthik D A __le32 chan_time; 2227902831a7SKarthik D A __le32 reserved; 22282b0f997dSZhaoyang Liu union { 22292b0f997dSZhaoyang Liu u8 sdio_func_num; 22302b0f997dSZhaoyang Liu u8 usb_ep_num; 22312b0f997dSZhaoyang Liu } hid_num; 22322b0f997dSZhaoyang Liu u8 intf_num; 22332a6be797SGustavo A. R. Silva u8 bss_type_numlist[]; 22342b0f997dSZhaoyang Liu } __packed; 22352b0f997dSZhaoyang Liu 22360a694d68SAvinash Patil struct meas_rpt_map { 22370a694d68SAvinash Patil u8 rssi:3; 22380a694d68SAvinash Patil u8 unmeasured:1; 22390a694d68SAvinash Patil u8 radar:1; 22400a694d68SAvinash Patil u8 unidentified_sig:1; 22410a694d68SAvinash Patil u8 ofdm_preamble:1; 22420a694d68SAvinash Patil u8 bss:1; 22430a694d68SAvinash Patil } __packed; 22440a694d68SAvinash Patil 22450a694d68SAvinash Patil struct mwifiex_ie_types_chan_rpt_data { 22460a694d68SAvinash Patil struct mwifiex_ie_types_header header; 22470a694d68SAvinash Patil struct meas_rpt_map map; 22480a694d68SAvinash Patil } __packed; 22490a694d68SAvinash Patil 2250fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt { 2251fa444bf8SAmitkumar Karwar __le16 action; 2252fa444bf8SAmitkumar Karwar __le16 events; 2253fa444bf8SAmitkumar Karwar } __packed; 2254fa444bf8SAmitkumar Karwar 2255f7669877SXinming Hu struct chan_switch_result { 2256f7669877SXinming Hu u8 cur_chan; 2257f7669877SXinming Hu u8 status; 2258f7669877SXinming Hu u8 reason; 2259f7669877SXinming Hu } __packed; 2260f7669877SXinming Hu 226179ff4346SAvinash Patil struct mwifiex_tdls_generic_event { 226279ff4346SAvinash Patil __le16 type; 226379ff4346SAvinash Patil u8 peer_mac[ETH_ALEN]; 226479ff4346SAvinash Patil union { 2265f7669877SXinming Hu struct chan_switch_result switch_result; 2266f7669877SXinming Hu u8 cs_stop_reason; 226779ff4346SAvinash Patil __le16 reason_code; 226879ff4346SAvinash Patil __le16 reserved; 226979ff4346SAvinash Patil } u; 227079ff4346SAvinash Patil } __packed; 227179ff4346SAvinash Patil 2272ede98bfaSAvinash Patil struct mwifiex_ie { 2273ede98bfaSAvinash Patil __le16 ie_index; 2274ede98bfaSAvinash Patil __le16 mgmt_subtype_mask; 2275ede98bfaSAvinash Patil __le16 ie_length; 2276ede98bfaSAvinash Patil u8 ie_buffer[IEEE_MAX_IE_SIZE]; 2277ede98bfaSAvinash Patil } __packed; 2278ede98bfaSAvinash Patil 2279ede98bfaSAvinash Patil #define MAX_MGMT_IE_INDEX 16 2280ede98bfaSAvinash Patil struct mwifiex_ie_list { 2281ede98bfaSAvinash Patil __le16 type; 2282ede98bfaSAvinash Patil __le16 len; 2283ede98bfaSAvinash Patil struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX]; 2284ede98bfaSAvinash Patil } __packed; 2285ede98bfaSAvinash Patil 2286562fc5b3SAmitkumar Karwar struct coalesce_filt_field_param { 2287562fc5b3SAmitkumar Karwar u8 operation; 2288562fc5b3SAmitkumar Karwar u8 operand_len; 2289562fc5b3SAmitkumar Karwar __le16 offset; 2290562fc5b3SAmitkumar Karwar u8 operand_byte_stream[4]; 2291562fc5b3SAmitkumar Karwar }; 2292562fc5b3SAmitkumar Karwar 2293562fc5b3SAmitkumar Karwar struct coalesce_receive_filt_rule { 2294562fc5b3SAmitkumar Karwar struct mwifiex_ie_types_header header; 2295562fc5b3SAmitkumar Karwar u8 num_of_fields; 2296562fc5b3SAmitkumar Karwar u8 pkt_type; 2297562fc5b3SAmitkumar Karwar __le16 max_coalescing_delay; 22982a6be797SGustavo A. R. Silva struct coalesce_filt_field_param params[]; 2299562fc5b3SAmitkumar Karwar } __packed; 2300562fc5b3SAmitkumar Karwar 2301562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg { 2302562fc5b3SAmitkumar Karwar __le16 action; 2303562fc5b3SAmitkumar Karwar __le16 num_of_rules; 23044cf4cf6eSJohannes Berg u8 rule_data[]; 2305562fc5b3SAmitkumar Karwar } __packed; 2306562fc5b3SAmitkumar Karwar 2307d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy { 2308d5b036c4SAvinash Patil __le16 action; 2309d5b036c4SAvinash Patil __le16 policy; 2310d5b036c4SAvinash Patil } __packed; 2311d5b036c4SAvinash Patil 231246dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex { 231346dbe247SAmitkumar Karwar __le16 action; 231446dbe247SAmitkumar Karwar __le16 reserved; 231546dbe247SAmitkumar Karwar } __packed; 231646dbe247SAmitkumar Karwar 23178de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason { 2318902831a7SKarthik D A __le16 wakeup_reason; 23198de00f1bSchunfan chen } __packed; 23208de00f1bSchunfan chen 2321f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params { 2322f6b1cbe0SGanapathi Bhat __le16 action; 2323f6b1cbe0SGanapathi Bhat u8 kck[NL80211_KCK_LEN]; 2324f6b1cbe0SGanapathi Bhat u8 kek[NL80211_KEK_LEN]; 2325f6b1cbe0SGanapathi Bhat __le32 replay_ctr_low; 2326f6b1cbe0SGanapathi Bhat __le32 replay_ctr_high; 2327f6b1cbe0SGanapathi Bhat } __packed; 2328f6b1cbe0SGanapathi Bhat 232941960b4dSAmitkumar Karwar struct host_cmd_ds_chan_region_cfg { 233041960b4dSAmitkumar Karwar __le16 action; 233141960b4dSAmitkumar Karwar } __packed; 233241960b4dSAmitkumar Karwar 2333c5994293SXinming Hu struct host_cmd_ds_pkt_aggr_ctrl { 2334c5994293SXinming Hu __le16 action; 2335c5994293SXinming Hu __le16 enable; 2336c5994293SXinming Hu __le16 tx_aggr_max_size; 2337c5994293SXinming Hu __le16 tx_aggr_max_num; 2338c5994293SXinming Hu __le16 tx_aggr_align; 2339c5994293SXinming Hu } __packed; 2340c5994293SXinming Hu 234128bf8312SGanapathi Bhat struct host_cmd_ds_sta_configure { 234228bf8312SGanapathi Bhat __le16 action; 23432a6be797SGustavo A. R. Silva u8 tlv_buffer[]; 234428bf8312SGanapathi Bhat } __packed; 234528bf8312SGanapathi Bhat 23469588469dSDavid Lin struct mwifiex_ie_types_sta_flag { 23479588469dSDavid Lin struct mwifiex_ie_types_header header; 23489588469dSDavid Lin __le32 sta_flags; 23499588469dSDavid Lin } __packed; 23509588469dSDavid Lin 23519588469dSDavid Lin struct host_cmd_ds_add_station { 23529588469dSDavid Lin __le16 action; 23539588469dSDavid Lin __le16 aid; 23549588469dSDavid Lin u8 peer_mac[ETH_ALEN]; 23559588469dSDavid Lin __le32 listen_interval; 23569588469dSDavid Lin __le16 cap_info; 23579588469dSDavid Lin u8 tlv[]; 23589588469dSDavid Lin } __packed; 23599588469dSDavid Lin 23609868c4ceSJeff Chen #define MWIFIEX_CFG_TYPE_CAL 0x2 23619868c4ceSJeff Chen 23629868c4ceSJeff Chen struct host_cmd_ds_802_11_cfg_data { 23639868c4ceSJeff Chen __le16 action; 23649868c4ceSJeff Chen __le16 type; 23659868c4ceSJeff Chen __le16 data_len; 23669868c4ceSJeff Chen } __packed; 23679868c4ceSJeff Chen 23685e6e3a92SBing Zhao struct host_cmd_ds_command { 23695e6e3a92SBing Zhao __le16 command; 23705e6e3a92SBing Zhao __le16 size; 23715e6e3a92SBing Zhao __le16 seq_num; 23725e6e3a92SBing Zhao __le16 result; 23735e6e3a92SBing Zhao union { 23745e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec hw_spec; 23755e6e3a92SBing Zhao struct host_cmd_ds_mac_control mac_ctrl; 23765e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address mac_addr; 23775e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr mc_addr; 23785e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log get_log; 23795e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info rssi_info; 23805e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; 23815e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib smib; 23825e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query tx_rate; 23835e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; 23845e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg txp_cfg; 2385caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr txp; 23868a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo ant_mimo; 23878a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso ant_siso; 23885e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; 23895e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; 23905e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan scan; 239121f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext ext_scan; 23925e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp scan_resp; 23930c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config bg_scan_config; 23945e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; 23955e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; 23965e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate associate; 23975e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp associate_rsp; 23985e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate deauth; 23995e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start adhoc_start; 2400d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result start_result; 2401d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result join_result; 24025e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join adhoc_join; 24035e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info domain_info; 24045e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; 24055e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req add_ba_req; 24065e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp add_ba_rsp; 24075e6e3a92SBing Zhao struct host_cmd_ds_11n_delba del_ba; 24085e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg tx_buf; 24095e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; 24105e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg htcfg; 24115e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status get_wmm_status; 24125e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material key_material; 2413e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 key_material_v2; 241459c668d7SKees Cook struct host_cmd_ds_802_11_key_material_wep key_material_wep; 24155e6e3a92SBing Zhao struct host_cmd_ds_version_ext verext; 24163cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg reg_mask; 24177feb4c48SStone Piao struct host_cmd_ds_remain_on_chan roc_cfg; 2418e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg mode_cfg; 24195e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status ibss_coalescing; 24207da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg mef_cfg; 2421c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access mem; 24225e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access mac_reg; 24235e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access bbp_reg; 24245e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access rf_reg; 24255e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access pmic_reg; 24265e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode bss_mode; 2427d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details pcie_host_spec; 24285e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access eeprom; 2429fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt subsc_evt; 24304db16a18SAvinash Patil struct host_cmd_ds_sys_config uap_sys_config; 24310f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth sta_deauth; 2432b21783e9SXinming Hu struct host_cmd_ds_sta_list sta_list; 243383c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg vht_cfg; 2434562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg coalesce_cfg; 2435449b8bbfSXinming Hu struct host_cmd_ds_tdls_config tdls_config; 2436429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper tdls_oper; 243785afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req chan_rpt_req; 243892263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; 2439d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy mc_policy; 244046dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex coex; 24418de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason hs_wakeup_reason; 2442f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params rekey; 244341960b4dSAmitkumar Karwar struct host_cmd_ds_chan_region_cfg reg_cfg; 2444c5994293SXinming Hu struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl; 244528bf8312SGanapathi Bhat struct host_cmd_ds_sta_configure sta_cfg; 24469588469dSDavid Lin struct host_cmd_ds_add_station sta_info; 24479868c4ceSJeff Chen struct host_cmd_ds_802_11_cfg_data cfg_data; 24485e6e3a92SBing Zhao } params; 24495e6e3a92SBing Zhao } __packed; 24505e6e3a92SBing Zhao 24515e6e3a92SBing Zhao struct mwifiex_opt_sleep_confirm { 24525e6e3a92SBing Zhao __le16 command; 24535e6e3a92SBing Zhao __le16 size; 24545e6e3a92SBing Zhao __le16 seq_num; 24555e6e3a92SBing Zhao __le16 result; 24565e6e3a92SBing Zhao __le16 action; 24572b06bdbeSMarc Yang __le16 resp_ctrl; 24585e6e3a92SBing Zhao } __packed; 2459982d7287SPali Rohár 2460982d7287SPali Rohár struct hw_spec_max_conn { 2461982d7287SPali Rohár struct mwifiex_ie_types_header header; 2462982d7287SPali Rohár u8 max_p2p_conn; 2463982d7287SPali Rohár u8 max_sta_conn; 2464982d7287SPali Rohár } __packed; 2465982d7287SPali Rohár 24665e6e3a92SBing Zhao #endif /* !_MWIFIEX_FW_H_ */ 2467