xref: /linux/drivers/net/wireless/marvell/mwifiex/fw.h (revision efde6648a618025a8fe1bc550d7ba569e44dc2fe)
15e6e3a92SBing Zhao /*
25e6e3a92SBing Zhao  * Marvell Wireless LAN device driver: Firmware specific macros & structures
35e6e3a92SBing Zhao  *
465da33f5SXinming Hu  * Copyright (C) 2011-2014, Marvell International Ltd.
55e6e3a92SBing Zhao  *
65e6e3a92SBing Zhao  * This software file (the "File") is distributed by Marvell International
75e6e3a92SBing Zhao  * Ltd. under the terms of the GNU General Public License Version 2, June 1991
85e6e3a92SBing Zhao  * (the "License").  You may use, redistribute and/or modify this File in
95e6e3a92SBing Zhao  * accordance with the terms and conditions of the License, a copy of which
105e6e3a92SBing Zhao  * is available by writing to the Free Software Foundation, Inc.,
115e6e3a92SBing Zhao  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
125e6e3a92SBing Zhao  * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
135e6e3a92SBing Zhao  *
145e6e3a92SBing Zhao  * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
155e6e3a92SBing Zhao  * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
165e6e3a92SBing Zhao  * ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
175e6e3a92SBing Zhao  * this warranty disclaimer.
185e6e3a92SBing Zhao  */
195e6e3a92SBing Zhao 
205e6e3a92SBing Zhao #ifndef _MWIFIEX_FW_H_
215e6e3a92SBing Zhao #define _MWIFIEX_FW_H_
225e6e3a92SBing Zhao 
235e6e3a92SBing Zhao #include <linux/if_ether.h>
245e6e3a92SBing Zhao 
255e6e3a92SBing Zhao 
265e6e3a92SBing Zhao #define INTF_HEADER_LEN     4
275e6e3a92SBing Zhao 
285e6e3a92SBing Zhao struct rfc_1042_hdr {
295e6e3a92SBing Zhao 	u8 llc_dsap;
305e6e3a92SBing Zhao 	u8 llc_ssap;
315e6e3a92SBing Zhao 	u8 llc_ctrl;
325e6e3a92SBing Zhao 	u8 snap_oui[3];
33a6efc5b7SAmitkumar Karwar 	__be16 snap_type;
345c0b8798SKarthik Ananthapadmanabha } __packed;
355e6e3a92SBing Zhao 
365e6e3a92SBing Zhao struct rx_packet_hdr {
375e6e3a92SBing Zhao 	struct ethhdr eth803_hdr;
385e6e3a92SBing Zhao 	struct rfc_1042_hdr rfc1042_hdr;
395c0b8798SKarthik Ananthapadmanabha } __packed;
405e6e3a92SBing Zhao 
415e6e3a92SBing Zhao struct tx_packet_hdr {
425e6e3a92SBing Zhao 	struct ethhdr eth803_hdr;
435e6e3a92SBing Zhao 	struct rfc_1042_hdr rfc1042_hdr;
445c0b8798SKarthik Ananthapadmanabha } __packed;
455e6e3a92SBing Zhao 
46*efde6648SXinming Hu struct mwifiex_fw_header {
47*efde6648SXinming Hu 	__le32 dnld_cmd;
48*efde6648SXinming Hu 	__le32 base_addr;
49*efde6648SXinming Hu 	__le32 data_length;
50*efde6648SXinming Hu 	__le32 crc;
51*efde6648SXinming Hu } __packed;
52*efde6648SXinming Hu 
53*efde6648SXinming Hu struct mwifiex_fw_data {
54*efde6648SXinming Hu 	struct mwifiex_fw_header header;
55*efde6648SXinming Hu 	__le32 seq_num;
56*efde6648SXinming Hu 	u8 data[1];
57*efde6648SXinming Hu } __packed;
58*efde6648SXinming Hu 
59*efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_1 0x1
60*efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_5 0x5
61*efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_6 0x6
62*efde6648SXinming Hu #define MWIFIEX_FW_DNLD_CMD_7 0x7
63*efde6648SXinming Hu 
645e6e3a92SBing Zhao #define B_SUPPORTED_RATES               5
655e6e3a92SBing Zhao #define G_SUPPORTED_RATES               9
665e6e3a92SBing Zhao #define BG_SUPPORTED_RATES              13
675e6e3a92SBing Zhao #define A_SUPPORTED_RATES               9
685e6e3a92SBing Zhao #define HOSTCMD_SUPPORTED_RATES         14
695e6e3a92SBing Zhao #define N_SUPPORTED_RATES               3
70a5f39056SYogesh Ashok Powar #define ALL_802_11_BANDS           (BAND_A | BAND_B | BAND_G | BAND_GN | \
71f25b1431SBing Zhao 				    BAND_AN | BAND_AAC)
725e6e3a92SBing Zhao 
73a5f39056SYogesh Ashok Powar #define FW_MULTI_BANDS_SUPPORT  (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
74f25b1431SBing Zhao 				 BIT(13))
755e6e3a92SBing Zhao #define IS_SUPPORT_MULTI_BANDS(adapter)        \
765e6e3a92SBing Zhao 	(adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
77a5f39056SYogesh Ashok Powar 
78f25b1431SBing Zhao /* bit 13: 11ac BAND_AAC
79f25b1431SBing Zhao  * bit 12: reserved for lab testing, will be reused for BAND_AN
80f25b1431SBing Zhao  * bit 11: 11n  BAND_GN
81f25b1431SBing Zhao  * bit 10: 11a  BAND_A
82f25b1431SBing Zhao  * bit 9: 11g   BAND_G
83f25b1431SBing Zhao  * bit 8: 11b   BAND_B
84f25b1431SBing Zhao  * Map these bits to band capability by right shifting 8 bits.
85a5f39056SYogesh Ashok Powar  */
865e6e3a92SBing Zhao #define GET_FW_DEFAULT_BANDS(adapter)  \
87f25b1431SBing Zhao 	    (((adapter->fw_cap_info & 0x2f00) >> 8) & \
88a5f39056SYogesh Ashok Powar 	     ALL_802_11_BANDS)
895e6e3a92SBing Zhao 
905e6e3a92SBing Zhao #define HostCmd_WEP_KEY_INDEX_MASK              0x3fff
915e6e3a92SBing Zhao 
925e6e3a92SBing Zhao #define KEY_INFO_ENABLED        0x01
935e6e3a92SBing Zhao enum KEY_TYPE_ID {
945e6e3a92SBing Zhao 	KEY_TYPE_ID_WEP = 0,
955e6e3a92SBing Zhao 	KEY_TYPE_ID_TKIP,
965e6e3a92SBing Zhao 	KEY_TYPE_ID_AES,
975e6e3a92SBing Zhao 	KEY_TYPE_ID_WAPI,
98b877f4cfSYing Luo 	KEY_TYPE_ID_AES_CMAC,
9989951db2SGanapathi Bhat 	KEY_TYPE_ID_AES_CMAC_DEF,
1005e6e3a92SBing Zhao };
101e57f1734SAvinash Patil 
102e57f1734SAvinash Patil #define WPA_PN_SIZE		8
103e57f1734SAvinash Patil #define KEY_PARAMS_FIXED_LEN	10
104e57f1734SAvinash Patil #define KEY_INDEX_MASK		0xf
1054b9fede5SAmitkumar Karwar #define KEY_API_VER_MAJOR_V2	2
106e57f1734SAvinash Patil 
1076a35a0acSYogesh Ashok Powar #define KEY_MCAST	BIT(0)
1086a35a0acSYogesh Ashok Powar #define KEY_UNICAST	BIT(1)
1096a35a0acSYogesh Ashok Powar #define KEY_ENABLED	BIT(2)
110e57f1734SAvinash Patil #define KEY_DEFAULT	BIT(3)
111e57f1734SAvinash Patil #define KEY_TX_KEY	BIT(4)
112e57f1734SAvinash Patil #define KEY_RX_KEY	BIT(5)
113b877f4cfSYing Luo #define KEY_IGTK	BIT(10)
1145e6e3a92SBing Zhao 
115e57f1734SAvinash Patil #define WAPI_KEY_LEN			(WLAN_KEY_LEN_SMS4 + PN_LEN + 2)
1165e6e3a92SBing Zhao 
1175e6e3a92SBing Zhao #define MAX_POLL_TRIES			100
1182fd5c6edSchunfan chen #define MAX_FIRMWARE_POLL_TRIES			150
1195e6e3a92SBing Zhao 
120d930faeeSAmitkumar Karwar #define FIRMWARE_READY_SDIO				0xfedc
121d930faeeSAmitkumar Karwar #define FIRMWARE_READY_PCIE				0xfedcba00
1225e6e3a92SBing Zhao 
12346dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_TIMESHARE			0x01
12446dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_SPATIAL			0x82
12546dbe247SAmitkumar Karwar 
1264daffe35SAmitkumar Karwar enum mwifiex_usb_ep {
1274daffe35SAmitkumar Karwar 	MWIFIEX_USB_EP_CMD_EVENT = 1,
1284daffe35SAmitkumar Karwar 	MWIFIEX_USB_EP_DATA = 2,
1292b0f997dSZhaoyang Liu 	MWIFIEX_USB_EP_DATA_CH2 = 3,
1304daffe35SAmitkumar Karwar };
1314daffe35SAmitkumar Karwar 
1325e6e3a92SBing Zhao enum MWIFIEX_802_11_PRIVACY_FILTER {
1335e6e3a92SBing Zhao 	MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
1345e6e3a92SBing Zhao 	MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
1355e6e3a92SBing Zhao };
1365e6e3a92SBing Zhao 
1375e6e3a92SBing Zhao #define CAL_SNR(RSSI, NF)		((s16)((s16)(RSSI)-(s16)(NF)))
1382dbaf751SStone Piao #define CAL_RSSI(SNR, NF)		((s16)((s16)(SNR)+(s16)(NF)))
1395e6e3a92SBing Zhao 
140e76268daSAvinash Patil #define UAP_BSS_PARAMS_I			0
141ede98bfaSAvinash Patil #define UAP_CUSTOM_IE_I				1
142ede98bfaSAvinash Patil #define MWIFIEX_AUTO_IDX_MASK			0xffff
143ede98bfaSAvinash Patil #define MWIFIEX_DELETE_MASK			0x0000
144f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_REQ			0x01
145f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_REQ			0x04
146f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_RESP			0x02
147f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_RESP			0x08
148f31acabeSAvinash Patil #define MGMT_MASK_PROBE_REQ			0x10
149f31acabeSAvinash Patil #define MGMT_MASK_PROBE_RESP			0x20
150f31acabeSAvinash Patil #define MGMT_MASK_BEACON			0x100
151e76268daSAvinash Patil 
15212190c5dSAvinash Patil #define TLV_TYPE_UAP_SSID			0x0000
153a3c2c4f6SAvinash Patil #define TLV_TYPE_UAP_RATES			0x0001
1548a73dd63SAvinash Patil #define TLV_TYPE_PWR_CONSTRAINT			0x0020
15512190c5dSAvinash Patil 
1565e6e3a92SBing Zhao #define PROPRIETARY_TLV_BASE_ID                 0x0100
1575e6e3a92SBing Zhao #define TLV_TYPE_KEY_MATERIAL       (PROPRIETARY_TLV_BASE_ID + 0)
1585e6e3a92SBing Zhao #define TLV_TYPE_CHANLIST           (PROPRIETARY_TLV_BASE_ID + 1)
1595e6e3a92SBing Zhao #define TLV_TYPE_NUMPROBES          (PROPRIETARY_TLV_BASE_ID + 2)
160fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_LOW           (PROPRIETARY_TLV_BASE_ID + 4)
1615e6e3a92SBing Zhao #define TLV_TYPE_PASSTHROUGH        (PROPRIETARY_TLV_BASE_ID + 10)
1625e6e3a92SBing Zhao #define TLV_TYPE_WMMQSTATUS         (PROPRIETARY_TLV_BASE_ID + 16)
1635e6e3a92SBing Zhao #define TLV_TYPE_WILDCARDSSID       (PROPRIETARY_TLV_BASE_ID + 18)
1645e6e3a92SBing Zhao #define TLV_TYPE_TSFTIMESTAMP       (PROPRIETARY_TLV_BASE_ID + 19)
165fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_HIGH          (PROPRIETARY_TLV_BASE_ID + 22)
1660c9b7f22SXinming Hu #define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30)
1675e6e3a92SBing Zhao #define TLV_TYPE_AUTH_TYPE          (PROPRIETARY_TLV_BASE_ID + 31)
16875edd2c6SAvinash Patil #define TLV_TYPE_STA_MAC_ADDR       (PROPRIETARY_TLV_BASE_ID + 32)
16921f58d20SAmitkumar Karwar #define TLV_TYPE_BSSID              (PROPRIETARY_TLV_BASE_ID + 35)
1705e6e3a92SBing Zhao #define TLV_TYPE_CHANNELBANDLIST    (PROPRIETARY_TLV_BASE_ID + 42)
17112190c5dSAvinash Patil #define TLV_TYPE_UAP_BEACON_PERIOD  (PROPRIETARY_TLV_BASE_ID + 44)
17212190c5dSAvinash Patil #define TLV_TYPE_UAP_DTIM_PERIOD    (PROPRIETARY_TLV_BASE_ID + 45)
173605b73afSAvinash Patil #define TLV_TYPE_UAP_BCAST_SSID     (PROPRIETARY_TLV_BASE_ID + 48)
1749b930eaeSAvinash Patil #define TLV_TYPE_UAP_RTS_THRESHOLD  (PROPRIETARY_TLV_BASE_ID + 51)
1758b4509f6SKevin Gan #define TLV_TYPE_UAP_AO_TIMER       (PROPRIETARY_TLV_BASE_ID + 57)
17696893538SAvinash Patil #define TLV_TYPE_UAP_WEP_KEY        (PROPRIETARY_TLV_BASE_ID + 59)
177f752dcd5SAvinash Patil #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
178f752dcd5SAvinash Patil #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
179f752dcd5SAvinash Patil #define TLV_TYPE_UAP_AKMP           (PROPRIETARY_TLV_BASE_ID + 65)
1809b930eaeSAvinash Patil #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
1812b06bdbeSMarc Yang #define TLV_TYPE_RATE_DROP_CONTROL  (PROPRIETARY_TLV_BASE_ID + 82)
1822b06bdbeSMarc Yang #define TLV_TYPE_RATE_SCOPE         (PROPRIETARY_TLV_BASE_ID + 83)
1832b06bdbeSMarc Yang #define TLV_TYPE_POWER_GROUP        (PROPRIETARY_TLV_BASE_ID + 84)
18421f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_RSP       (PROPRIETARY_TLV_BASE_ID + 86)
18521f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_INFO      (PROPRIETARY_TLV_BASE_ID + 87)
1860a694d68SAvinash Patil #define TLV_TYPE_CHANRPT_11H_BASIC  (PROPRIETARY_TLV_BASE_ID + 91)
1879b930eaeSAvinash Patil #define TLV_TYPE_UAP_RETRY_LIMIT    (PROPRIETARY_TLV_BASE_ID + 93)
1885e6e3a92SBing Zhao #define TLV_TYPE_WAPI_IE            (PROPRIETARY_TLV_BASE_ID + 94)
18946dbe247SAmitkumar Karwar #define TLV_TYPE_ROBUST_COEX        (PROPRIETARY_TLV_BASE_ID + 96)
190e568634aSAvinash Patil #define TLV_TYPE_UAP_MGMT_FRAME     (PROPRIETARY_TLV_BASE_ID + 104)
19113d7ba78SAvinash Patil #define TLV_TYPE_MGMT_IE            (PROPRIETARY_TLV_BASE_ID + 105)
1922b06bdbeSMarc Yang #define TLV_TYPE_AUTO_DS_PARAM      (PROPRIETARY_TLV_BASE_ID + 113)
1932b06bdbeSMarc Yang #define TLV_TYPE_PS_PARAM           (PROPRIETARY_TLV_BASE_ID + 114)
1948b4509f6SKevin Gan #define TLV_TYPE_UAP_PS_AO_TIMER    (PROPRIETARY_TLV_BASE_ID + 123)
195f752dcd5SAvinash Patil #define TLV_TYPE_PWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 145)
196f752dcd5SAvinash Patil #define TLV_TYPE_GWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 146)
1974e6ee91bSAvinash Patil #define TLV_TYPE_TX_PAUSE           (PROPRIETARY_TLV_BASE_ID + 148)
19899ffe72cSXinming Hu #define TLV_TYPE_RXBA_SYNC          (PROPRIETARY_TLV_BASE_ID + 153)
199562fc5b3SAmitkumar Karwar #define TLV_TYPE_COALESCE_RULE      (PROPRIETARY_TLV_BASE_ID + 154)
200e57f1734SAvinash Patil #define TLV_TYPE_KEY_PARAM_V2       (PROPRIETARY_TLV_BASE_ID + 156)
2010c9b7f22SXinming Hu #define TLV_TYPE_REPEAT_COUNT       (PROPRIETARY_TLV_BASE_ID + 176)
2026a7b1910SShengzhen Li #define TLV_TYPE_PS_PARAMS_IN_HS    (PROPRIETARY_TLV_BASE_ID + 181)
2038d6b538aSAvinash Patil #define TLV_TYPE_MULTI_CHAN_INFO    (PROPRIETARY_TLV_BASE_ID + 183)
2042b0f997dSZhaoyang Liu #define TLV_TYPE_MC_GROUP_INFO      (PROPRIETARY_TLV_BASE_ID + 184)
205d29caf25SAvinash Patil #define TLV_TYPE_TDLS_IDLE_TIMEOUT  (PROPRIETARY_TLV_BASE_ID + 194)
206cb91be87SAvinash Patil #define TLV_TYPE_SCAN_CHANNEL_GAP   (PROPRIETARY_TLV_BASE_ID + 197)
2074b9fede5SAmitkumar Karwar #define TLV_TYPE_API_REV            (PROPRIETARY_TLV_BASE_ID + 199)
208bf354433SAvinash Patil #define TLV_TYPE_CHANNEL_STATS      (PROPRIETARY_TLV_BASE_ID + 198)
209d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_AGGR_WINSIZE  (PROPRIETARY_TLV_BASE_ID + 202)
210d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_SCANTIME      (PROPRIETARY_TLV_BASE_ID + 203)
21140d7412bSAniket Nagarnaik #define TLV_TYPE_BSS_MODE           (PROPRIETARY_TLV_BASE_ID + 206)
212c2a8f0ffSGanapathi Bhat #define TLV_TYPE_RANDOM_MAC         (PROPRIETARY_TLV_BASE_ID + 236)
21341960b4dSAmitkumar Karwar #define TLV_TYPE_CHAN_ATTR_CFG      (PROPRIETARY_TLV_BASE_ID + 237)
2145e6e3a92SBing Zhao 
2155e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
2165e6e3a92SBing Zhao 
2175e6e3a92SBing Zhao #define SSN_MASK         0xfff0
2185e6e3a92SBing Zhao 
2195e6e3a92SBing Zhao #define BA_RESULT_SUCCESS        0x0
2205e6e3a92SBing Zhao #define BA_RESULT_TIMEOUT        0x2
2215e6e3a92SBing Zhao 
2225e6e3a92SBing Zhao #define IS_BASTREAM_SETUP(ptr)  (ptr->ba_status)
2235e6e3a92SBing Zhao 
2245e6e3a92SBing Zhao #define BA_STREAM_NOT_ALLOWED   0xff
2255e6e3a92SBing Zhao 
2265e6e3a92SBing Zhao #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
227931f1584SYogesh Ashok Powar 			priv->adapter->config_bands & BAND_AN) && \
228931f1584SYogesh Ashok Powar 			priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
2295e6e3a92SBing Zhao #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
2305e6e3a92SBing Zhao 			BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
2315e6e3a92SBing Zhao 
2325e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_4K        4096
2335e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_8K        8192
234432da7d2SXinming Hu #define MWIFIEX_TX_DATA_BUF_SIZE_12K       12288
2355e6e3a92SBing Zhao 
2365e6e3a92SBing Zhao #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
237b23bce29SAvinash Patil #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14))
238d5b036c4SAvinash Patil #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15))
23992263a84SZhaoyang Liu #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16))
240e267e71eSKarthik D A #define ISSUPP_ADHOC_ENABLED(FwCapInfo) (FwCapInfo & BIT(25))
2416d2bd916SMarc Yang 
24222281256SAvinash Patil #define MWIFIEX_DEF_HT_CAP	(IEEE80211_HT_CAP_DSSSCCK40 | \
24322281256SAvinash Patil 				 (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \
24422281256SAvinash Patil 				 IEEE80211_HT_CAP_SM_PS)
24522281256SAvinash Patil 
246645097ceSAmitkumar Karwar #define MWIFIEX_DEF_11N_TX_BF_CAP	0x09E1E008
247645097ceSAmitkumar Karwar 
24822281256SAvinash Patil #define MWIFIEX_DEF_AMPDU	IEEE80211_HT_AMPDU_PARM_FACTOR
24922281256SAvinash Patil 
250474a41e9SMaithili Hinge #define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC)
251474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC1	0x0100
252474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC12	0x0200
253474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC123	0x0300
254474a41e9SMaithili Hinge 
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
40692263a84SZhaoyang Liu #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG               0x0223
40741960b4dSAmitkumar Karwar #define HostCmd_CMD_CHAN_REGION_CFG		      0x0242
4085e6e3a92SBing Zhao 
409f752dcd5SAvinash Patil #define PROTOCOL_NO_SECURITY        0x01
410f752dcd5SAvinash Patil #define PROTOCOL_STATIC_WEP         0x02
411f752dcd5SAvinash Patil #define PROTOCOL_WPA                0x08
412f752dcd5SAvinash Patil #define PROTOCOL_WPA2               0x20
413f752dcd5SAvinash Patil #define PROTOCOL_WPA2_MIXED         0x28
414f752dcd5SAvinash Patil #define PROTOCOL_EAP                0x40
415f752dcd5SAvinash Patil #define KEY_MGMT_NONE               0x04
416f752dcd5SAvinash Patil #define KEY_MGMT_PSK                0x02
417f752dcd5SAvinash Patil #define KEY_MGMT_EAP                0x01
418f752dcd5SAvinash Patil #define CIPHER_TKIP                 0x04
419f752dcd5SAvinash Patil #define CIPHER_AES_CCMP             0x08
420f752dcd5SAvinash Patil #define VALID_CIPHER_BITMAP         0x0c
421f752dcd5SAvinash Patil 
4225e6e3a92SBing Zhao enum ENH_PS_MODES {
4235e6e3a92SBing Zhao 	EN_PS = 1,
4245e6e3a92SBing Zhao 	DIS_PS = 2,
4255e6e3a92SBing Zhao 	EN_AUTO_DS = 3,
4265e6e3a92SBing Zhao 	DIS_AUTO_DS = 4,
4275e6e3a92SBing Zhao 	SLEEP_CONFIRM = 5,
4285e6e3a92SBing Zhao 	GET_PS = 0,
4295e6e3a92SBing Zhao 	EN_AUTO_PS = 0xff,
4305e6e3a92SBing Zhao 	DIS_AUTO_PS = 0xfe,
4315e6e3a92SBing Zhao };
4325e6e3a92SBing Zhao 
433e1a2b7a3SStone Piao enum P2P_MODES {
434e1a2b7a3SStone Piao 	P2P_MODE_DISABLE = 0,
435e1a2b7a3SStone Piao 	P2P_MODE_DEVICE = 1,
436e1a2b7a3SStone Piao 	P2P_MODE_GO = 2,
437e1a2b7a3SStone Piao 	P2P_MODE_CLIENT = 3,
438e1a2b7a3SStone Piao };
439e1a2b7a3SStone Piao 
44072539799SAmitkumar Karwar enum mwifiex_channel_flags {
44172539799SAmitkumar Karwar 	MWIFIEX_CHANNEL_PASSIVE = BIT(0),
44272539799SAmitkumar Karwar 	MWIFIEX_CHANNEL_DFS = BIT(1),
44372539799SAmitkumar Karwar 	MWIFIEX_CHANNEL_NOHT40 = BIT(2),
44472539799SAmitkumar Karwar 	MWIFIEX_CHANNEL_NOHT80 = BIT(3),
44572539799SAmitkumar Karwar 	MWIFIEX_CHANNEL_DISABLED = BIT(7),
44672539799SAmitkumar Karwar };
44772539799SAmitkumar Karwar 
4485e6e3a92SBing Zhao #define HostCmd_RET_BIT                       0x8000
4495e6e3a92SBing Zhao #define HostCmd_ACT_GEN_GET                   0x0000
4505e6e3a92SBing Zhao #define HostCmd_ACT_GEN_SET                   0x0001
4517feb4c48SStone Piao #define HostCmd_ACT_GEN_REMOVE                0x0004
452fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_SET               0x0002
453fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_CLR               0x0003
4545e6e3a92SBing Zhao #define HostCmd_RESULT_OK                     0x0000
455b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_RX_ON                 BIT(0)
456b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_TX_ON                 BIT(1)
457b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_WEP_ENABLE            BIT(3)
458b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ETHERNETII_ENABLE     BIT(4)
459b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE    BIT(7)
460b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE  BIT(8)
461b82dd3bdSAmitkumar Karwar #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13)
462d7864cf2SAmitkumar Karwar #define HostCmd_ACT_MAC_DYNAMIC_BW_ENABLE     BIT(16)
4635e6e3a92SBing Zhao 
4645e6e3a92SBing Zhao #define HostCmd_BSS_MODE_IBSS               0x0002
4655e6e3a92SBing Zhao #define HostCmd_BSS_MODE_ANY                0x0003
4665e6e3a92SBing Zhao 
4675e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_BG          0
4685e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_A           1
4695e6e3a92SBing Zhao 
470cc0b5a64SAmitkumar Karwar #define HS_CFG_CANCEL			0xffffffff
471cc0b5a64SAmitkumar Karwar #define HS_CFG_COND_DEF			0x00000000
472cc0b5a64SAmitkumar Karwar #define HS_CFG_GPIO_DEF			0xff
473915f36d2SBing Zhao #define HS_CFG_GAP_DEF			0xff
4740d7f53e3SAmitkumar Karwar #define HS_CFG_COND_BROADCAST_DATA	0x00000001
4750d7f53e3SAmitkumar Karwar #define HS_CFG_COND_UNICAST_DATA	0x00000002
4760d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MAC_EVENT		0x00000004
4770d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MULTICAST_DATA	0x00000008
4785e6e3a92SBing Zhao 
47912d11109SAvinash Patil #define CONNECT_ERR_AUTH_ERR_STA_FAILURE	0xFFFB
48012d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_TIMEOUT		0xFFFC
48112d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED	0xFFFD
48212d11109SAvinash Patil #define CONNECT_ERR_AUTH_MSG_UNHANDLED		0xFFFE
48312d11109SAvinash Patil #define CONNECT_ERR_STA_FAILURE			0xFFFF
48412d11109SAvinash Patil 
4857532c7d0SAmitkumar Karwar 
4865e6e3a92SBing Zhao #define CMD_F_HOSTCMD           (1 << 0)
4875e6e3a92SBing Zhao 
4885e6e3a92SBing Zhao #define HostCmd_CMD_ID_MASK             0x0fff
4895e6e3a92SBing Zhao 
4905e6e3a92SBing Zhao #define HostCmd_SEQ_NUM_MASK            0x00ff
4915e6e3a92SBing Zhao 
4925e6e3a92SBing Zhao #define HostCmd_BSS_NUM_MASK            0x0f00
4935e6e3a92SBing Zhao 
4945e6e3a92SBing Zhao #define HostCmd_BSS_TYPE_MASK           0xf000
4955e6e3a92SBing Zhao 
4968a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_RX              0x0001
4978a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_TX              0x0002
4988a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_BOTH            0x0003
4993ee71285SShengzhen Li #define HostCmd_ACT_GET_RX              0x0004
5003ee71285SShengzhen Li #define HostCmd_ACT_GET_TX              0x0008
5013ee71285SShengzhen Li #define HostCmd_ACT_GET_BOTH            0x000c
5028a279d5bSAmitkumar Karwar 
5038a279d5bSAmitkumar Karwar #define RF_ANTENNA_AUTO                 0xFFFF
5048a279d5bSAmitkumar Karwar 
5055e6e3a92SBing Zhao #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) {   \
5065e6e3a92SBing Zhao 	(((seq) & 0x00ff) |                             \
5075e6e3a92SBing Zhao 	 (((num) & 0x000f) << 8)) |                     \
5085e6e3a92SBing Zhao 	(((type) & 0x000f) << 12);                  }
5095e6e3a92SBing Zhao 
5105e6e3a92SBing Zhao #define HostCmd_GET_SEQ_NO(seq)       \
5115e6e3a92SBing Zhao 	((seq) & HostCmd_SEQ_NUM_MASK)
5125e6e3a92SBing Zhao 
5135e6e3a92SBing Zhao #define HostCmd_GET_BSS_NO(seq)         \
5145e6e3a92SBing Zhao 	(((seq) & HostCmd_BSS_NUM_MASK) >> 8)
5155e6e3a92SBing Zhao 
5165e6e3a92SBing Zhao #define HostCmd_GET_BSS_TYPE(seq)       \
5175e6e3a92SBing Zhao 	(((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
5185e6e3a92SBing Zhao 
5195e6e3a92SBing Zhao #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL  0x00000001
5205e6e3a92SBing Zhao #define EVENT_LINK_LOST                 0x00000003
5215e6e3a92SBing Zhao #define EVENT_LINK_SENSED               0x00000004
5225e6e3a92SBing Zhao #define EVENT_MIB_CHANGED               0x00000006
5235e6e3a92SBing Zhao #define EVENT_INIT_DONE                 0x00000007
5245e6e3a92SBing Zhao #define EVENT_DEAUTHENTICATED           0x00000008
5255e6e3a92SBing Zhao #define EVENT_DISASSOCIATED             0x00000009
5265e6e3a92SBing Zhao #define EVENT_PS_AWAKE                  0x0000000a
5275e6e3a92SBing Zhao #define EVENT_PS_SLEEP                  0x0000000b
5285e6e3a92SBing Zhao #define EVENT_MIC_ERR_MULTICAST         0x0000000d
5295e6e3a92SBing Zhao #define EVENT_MIC_ERR_UNICAST           0x0000000e
5305e6e3a92SBing Zhao #define EVENT_DEEP_SLEEP_AWAKE          0x00000010
5315e6e3a92SBing Zhao #define EVENT_ADHOC_BCN_LOST            0x00000011
5325e6e3a92SBing Zhao 
5335e6e3a92SBing Zhao #define EVENT_WMM_STATUS_CHANGE         0x00000017
5345e6e3a92SBing Zhao #define EVENT_BG_SCAN_REPORT            0x00000018
5355e6e3a92SBing Zhao #define EVENT_RSSI_LOW                  0x00000019
5365e6e3a92SBing Zhao #define EVENT_SNR_LOW                   0x0000001a
5375e6e3a92SBing Zhao #define EVENT_MAX_FAIL                  0x0000001b
5385e6e3a92SBing Zhao #define EVENT_RSSI_HIGH                 0x0000001c
5395e6e3a92SBing Zhao #define EVENT_SNR_HIGH                  0x0000001d
5405e6e3a92SBing Zhao #define EVENT_IBSS_COALESCED            0x0000001e
541432da7d2SXinming Hu #define EVENT_IBSS_STA_CONNECT          0x00000020
542432da7d2SXinming Hu #define EVENT_IBSS_STA_DISCONNECT       0x00000021
5435e6e3a92SBing Zhao #define EVENT_DATA_RSSI_LOW             0x00000024
5445e6e3a92SBing Zhao #define EVENT_DATA_SNR_LOW              0x00000025
5455e6e3a92SBing Zhao #define EVENT_DATA_RSSI_HIGH            0x00000026
5465e6e3a92SBing Zhao #define EVENT_DATA_SNR_HIGH             0x00000027
5475e6e3a92SBing Zhao #define EVENT_LINK_QUALITY              0x00000028
5485e6e3a92SBing Zhao #define EVENT_PORT_RELEASE              0x0000002b
549e568634aSAvinash Patil #define EVENT_UAP_STA_DEAUTH            0x0000002c
550e568634aSAvinash Patil #define EVENT_UAP_STA_ASSOC             0x0000002d
551e568634aSAvinash Patil #define EVENT_UAP_BSS_START             0x0000002e
5525e6e3a92SBing Zhao #define EVENT_PRE_BEACON_LOST           0x00000031
5535e6e3a92SBing Zhao #define EVENT_ADDBA                     0x00000033
5545e6e3a92SBing Zhao #define EVENT_DELBA                     0x00000034
5555e6e3a92SBing Zhao #define EVENT_BA_STREAM_TIEMOUT         0x00000037
5565e6e3a92SBing Zhao #define EVENT_AMSDU_AGGR_CTRL           0x00000042
557e568634aSAvinash Patil #define EVENT_UAP_BSS_IDLE              0x00000043
558e568634aSAvinash Patil #define EVENT_UAP_BSS_ACTIVE            0x00000044
5595e6e3a92SBing Zhao #define EVENT_WEP_ICV_ERR               0x00000046
5605e6e3a92SBing Zhao #define EVENT_HS_ACT_REQ                0x00000047
5615e6e3a92SBing Zhao #define EVENT_BW_CHANGE                 0x00000048
562e568634aSAvinash Patil #define EVENT_UAP_MIC_COUNTERMEASURES   0x0000004c
5635e6e3a92SBing Zhao #define EVENT_HOSTWAKE_STAIE		0x0000004d
5642a7305c8SAmitkumar Karwar #define EVENT_CHANNEL_SWITCH_ANN        0x00000050
56579ff4346SAvinash Patil #define EVENT_TDLS_GENERIC_EVENT        0x00000052
5663b57c1a7SAvinash Patil #define EVENT_RADAR_DETECTED		0x00000053
5670a694d68SAvinash Patil #define EVENT_CHANNEL_REPORT_RDY        0x00000054
5684e6ee91bSAvinash Patil #define EVENT_TX_DATA_PAUSE             0x00000055
56921f58d20SAmitkumar Karwar #define EVENT_EXT_SCAN_REPORT           0x00000058
57099ffe72cSXinming Hu #define EVENT_RXBA_SYNC                 0x00000059
5710ed917d0SBrian Norris #define EVENT_UNKNOWN_DEBUG             0x00000063
5720c9b7f22SXinming Hu #define EVENT_BG_SCAN_STOPPED           0x00000065
573eab1c76bSStone Piao #define EVENT_REMAIN_ON_CHAN_EXPIRED    0x0000005f
5748d6b538aSAvinash Patil #define EVENT_MULTI_CHAN_INFO           0x0000006a
575808bbebcSAmitkumar Karwar #define EVENT_TX_STATUS_REPORT		0x00000074
576d219b7ebSChunfan Chen #define EVENT_BT_COEX_WLAN_PARA_CHANGE	0X00000076
5775e6e3a92SBing Zhao 
5785e6e3a92SBing Zhao #define EVENT_ID_MASK                   0xffff
5795e6e3a92SBing Zhao #define BSS_NUM_MASK                    0xf
5805e6e3a92SBing Zhao 
5815e6e3a92SBing Zhao #define EVENT_GET_BSS_NUM(event_cause)          \
5825e6e3a92SBing Zhao 	(((event_cause) >> 16) & BSS_NUM_MASK)
5835e6e3a92SBing Zhao 
5845e6e3a92SBing Zhao #define EVENT_GET_BSS_TYPE(event_cause)         \
5855e6e3a92SBing Zhao 	(((event_cause) >> 24) & 0x00ff)
5865e6e3a92SBing Zhao 
587b0922ffaSXinming Hu #define MWIFIEX_MAX_PATTERN_LEN		40
588afd84de4SAmitkumar Karwar #define MWIFIEX_MAX_OFFSET_LEN		100
5897d7f07d8Schunfan chen #define MWIFIEX_MAX_ND_MATCH_SETS	10
5907d7f07d8Schunfan chen 
5917da060c1SAmitkumar Karwar #define STACK_NBYTES			100
5927da060c1SAmitkumar Karwar #define TYPE_DNUM			1
5937da060c1SAmitkumar Karwar #define TYPE_BYTESEQ			2
5947da060c1SAmitkumar Karwar #define MAX_OPERAND			0x40
5957da060c1SAmitkumar Karwar #define TYPE_EQ				(MAX_OPERAND+1)
5967da060c1SAmitkumar Karwar #define TYPE_EQ_DNUM			(MAX_OPERAND+2)
5977da060c1SAmitkumar Karwar #define TYPE_EQ_BIT			(MAX_OPERAND+3)
5987da060c1SAmitkumar Karwar #define TYPE_AND			(MAX_OPERAND+4)
5997da060c1SAmitkumar Karwar #define TYPE_OR				(MAX_OPERAND+5)
6007da060c1SAmitkumar Karwar #define MEF_MODE_HOST_SLEEP			1
6017da060c1SAmitkumar Karwar #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST	3
602b533be18SMaithili Hinge #define MEF_ACTION_AUTO_ARP                    0x10
6037da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_BROADCAST	BIT(0)
6047da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_UNICAST	BIT(1)
6057da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_MULTICAST	BIT(3)
606b533be18SMaithili Hinge #define MWIFIEX_MAX_SUPPORTED_IPADDR              4
6077da060c1SAmitkumar Karwar 
608429d90d2SAvinash Patil #define ACT_TDLS_DELETE            0x00
609429d90d2SAvinash Patil #define ACT_TDLS_CREATE            0x01
610429d90d2SAvinash Patil #define ACT_TDLS_CONFIG            0x02
611f7669877SXinming Hu 
61279ff4346SAvinash Patil #define TDLS_EVENT_LINK_TEAR_DOWN      3
613f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_RESULT  7
614f7669877SXinming Hu #define TDLS_EVENT_START_CHAN_SWITCH   8
615f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9
616f7669877SXinming Hu 
617f7669877SXinming Hu #define TDLS_BASE_CHANNEL	       0
618f7669877SXinming Hu #define TDLS_OFF_CHANNEL	       1
619429d90d2SAvinash Patil 
620449b8bbfSXinming Hu #define ACT_TDLS_CS_ENABLE_CONFIG 0x00
621449b8bbfSXinming Hu #define ACT_TDLS_CS_INIT	  0x06
622449b8bbfSXinming Hu #define ACT_TDLS_CS_STOP	  0x07
623449b8bbfSXinming Hu #define ACT_TDLS_CS_PARAMS	  0x08
624449b8bbfSXinming Hu 
625449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_UNIT_TIME	2
626449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_THR_OTHERLINK	10
627449b8bbfSXinming Hu #define MWIFIEX_DEF_THR_DIRECTLINK	0
628449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIME		10
629449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIMEOUT		16
630449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_REG_CLASS	12
631449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_PERIODICITY	1
632449b8bbfSXinming Hu 
6338e17ea25SAmitkumar Karwar #define MWIFIEX_FW_V15		   15
6348e17ea25SAmitkumar Karwar 
635cf075eacSAvinash Patil #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1)
636cf075eacSAvinash Patil 
6375e6e3a92SBing Zhao struct mwifiex_ie_types_header {
6385e6e3a92SBing Zhao 	__le16 type;
6395e6e3a92SBing Zhao 	__le16 len;
6405e6e3a92SBing Zhao } __packed;
6415e6e3a92SBing Zhao 
6425e6e3a92SBing Zhao struct mwifiex_ie_types_data {
6435e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
6445e6e3a92SBing Zhao 	u8 data[1];
6455e6e3a92SBing Zhao } __packed;
6465e6e3a92SBing Zhao 
6475e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
6485e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
649b23bce29SAvinash Patil #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET      0x10
65009869495SAvinash Patil #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET      0x01
651808bbebcSAmitkumar Karwar #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS    0x20
6525e6e3a92SBing Zhao 
6538de00f1bSchunfan chen enum HS_WAKEUP_REASON {
6548de00f1bSchunfan chen 	NO_HSWAKEUP_REASON = 0,
6558de00f1bSchunfan chen 	BCAST_DATA_MATCHED,
6568de00f1bSchunfan chen 	MCAST_DATA_MATCHED,
6578de00f1bSchunfan chen 	UCAST_DATA_MATCHED,
6588de00f1bSchunfan chen 	MASKTABLE_EVENT_MATCHED,
6598de00f1bSchunfan chen 	NON_MASKABLE_EVENT_MATCHED,
6608de00f1bSchunfan chen 	NON_MASKABLE_CONDITION_MATCHED,
6618de00f1bSchunfan chen 	MAGIC_PATTERN_MATCHED,
6628de00f1bSchunfan chen 	CONTROL_FRAME_MATCHED,
6638de00f1bSchunfan chen 	MANAGEMENT_FRAME_MATCHED,
6648fa0a0dcSGanapathi Bhat 	GTK_REKEY_FAILURE,
6658de00f1bSchunfan chen 	RESERVED
6668de00f1bSchunfan chen };
6678de00f1bSchunfan chen 
6685e6e3a92SBing Zhao struct txpd {
6695e6e3a92SBing Zhao 	u8 bss_type;
6705e6e3a92SBing Zhao 	u8 bss_num;
6715e6e3a92SBing Zhao 	__le16 tx_pkt_length;
6725e6e3a92SBing Zhao 	__le16 tx_pkt_offset;
6735e6e3a92SBing Zhao 	__le16 tx_pkt_type;
6745e6e3a92SBing Zhao 	__le32 tx_control;
6755e6e3a92SBing Zhao 	u8 priority;
6765e6e3a92SBing Zhao 	u8 flags;
6775e6e3a92SBing Zhao 	u8 pkt_delay_2ms;
678808bbebcSAmitkumar Karwar 	u8 reserved1[2];
679808bbebcSAmitkumar Karwar 	u8 tx_token_id;
680808bbebcSAmitkumar Karwar 	u8 reserved[2];
6815e6e3a92SBing Zhao } __packed;
6825e6e3a92SBing Zhao 
6835e6e3a92SBing Zhao struct rxpd {
6845e6e3a92SBing Zhao 	u8 bss_type;
6855e6e3a92SBing Zhao 	u8 bss_num;
686ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_length;
687ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_offset;
688ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_type;
689ed1ea6f4SAmitkumar Karwar 	__le16 seq_num;
6905e6e3a92SBing Zhao 	u8 priority;
6915e6e3a92SBing Zhao 	u8 rx_rate;
6925e6e3a92SBing Zhao 	s8 snr;
6935e6e3a92SBing Zhao 	s8 nf;
694a5f39056SYogesh Ashok Powar 
695a5f39056SYogesh Ashok Powar 	/* For: Non-802.11 AC cards
696a5f39056SYogesh Ashok Powar 	 *
697a5f39056SYogesh Ashok Powar 	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
6985e6e3a92SBing Zhao 	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
699a5f39056SYogesh Ashok Powar 	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
700a5f39056SYogesh Ashok Powar 	 *
701a5f39056SYogesh Ashok Powar 	 * For: 802.11 AC cards
702a5f39056SYogesh Ashok Powar 	 * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
703a5f39056SYogesh Ashok Powar 	 * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
704a5f39056SYogesh Ashok Powar 	 *						BW80 = 10  BW160 = 11
705a5f39056SYogesh Ashok Powar 	 * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
706a5f39056SYogesh Ashok Powar 	 * [Bit 5] STBC support Enabled = 1
707a5f39056SYogesh Ashok Powar 	 * [Bit 6] LDPC support Enabled = 1
708a5f39056SYogesh Ashok Powar 	 * [Bit 7] Reserved
709a5f39056SYogesh Ashok Powar 	 */
7105e6e3a92SBing Zhao 	u8 ht_info;
7119d31c1c7SAvinash Patil 	u8 reserved[3];
71209869495SAvinash Patil 	u8 flags;
7135e6e3a92SBing Zhao } __packed;
7145e6e3a92SBing Zhao 
715838e4f44SAvinash Patil struct uap_txpd {
716838e4f44SAvinash Patil 	u8 bss_type;
717838e4f44SAvinash Patil 	u8 bss_num;
718838e4f44SAvinash Patil 	__le16 tx_pkt_length;
719838e4f44SAvinash Patil 	__le16 tx_pkt_offset;
720838e4f44SAvinash Patil 	__le16 tx_pkt_type;
721838e4f44SAvinash Patil 	__le32 tx_control;
722838e4f44SAvinash Patil 	u8 priority;
723838e4f44SAvinash Patil 	u8 flags;
724838e4f44SAvinash Patil 	u8 pkt_delay_2ms;
725808bbebcSAmitkumar Karwar 	u8 reserved1[2];
726808bbebcSAmitkumar Karwar 	u8 tx_token_id;
727808bbebcSAmitkumar Karwar 	u8 reserved[2];
7285c0b8798SKarthik Ananthapadmanabha } __packed;
729838e4f44SAvinash Patil 
730838e4f44SAvinash Patil struct uap_rxpd {
731838e4f44SAvinash Patil 	u8 bss_type;
732838e4f44SAvinash Patil 	u8 bss_num;
733838e4f44SAvinash Patil 	__le16 rx_pkt_length;
734838e4f44SAvinash Patil 	__le16 rx_pkt_offset;
735838e4f44SAvinash Patil 	__le16 rx_pkt_type;
736838e4f44SAvinash Patil 	__le16 seq_num;
737838e4f44SAvinash Patil 	u8 priority;
738442f6f9bSXinming Hu 	u8 rx_rate;
739442f6f9bSXinming Hu 	s8 snr;
740442f6f9bSXinming Hu 	s8 nf;
741442f6f9bSXinming Hu 	u8 ht_info;
742442f6f9bSXinming Hu 	u8 reserved[3];
743442f6f9bSXinming Hu 	u8 flags;
7445c0b8798SKarthik Ananthapadmanabha } __packed;
745838e4f44SAvinash Patil 
746bf354433SAvinash Patil struct mwifiex_fw_chan_stats {
747bf354433SAvinash Patil 	u8 chan_num;
748bf354433SAvinash Patil 	u8 bandcfg;
749bf354433SAvinash Patil 	u8 flags;
750bf354433SAvinash Patil 	s8 noise;
751bf354433SAvinash Patil 	__le16 total_bss;
752bf354433SAvinash Patil 	__le16 cca_scan_dur;
753bf354433SAvinash Patil 	__le16 cca_busy_dur;
754bf354433SAvinash Patil } __packed;
755bf354433SAvinash Patil 
7565e6e3a92SBing Zhao enum mwifiex_chan_scan_mode_bitmasks {
7575e6e3a92SBing Zhao 	MWIFIEX_PASSIVE_SCAN = BIT(0),
7585e6e3a92SBing Zhao 	MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
7592375fa2bSchunfan chen 	MWIFIEX_HIDDEN_SSID_REPORT = BIT(4),
7605e6e3a92SBing Zhao };
7615e6e3a92SBing Zhao 
7625e6e3a92SBing Zhao struct mwifiex_chan_scan_param_set {
7635e6e3a92SBing Zhao 	u8 radio_type;
7645e6e3a92SBing Zhao 	u8 chan_number;
7655e6e3a92SBing Zhao 	u8 chan_scan_mode_bitmap;
7665e6e3a92SBing Zhao 	__le16 min_scan_time;
7675e6e3a92SBing Zhao 	__le16 max_scan_time;
7685e6e3a92SBing Zhao } __packed;
7695e6e3a92SBing Zhao 
7705e6e3a92SBing Zhao struct mwifiex_ie_types_chan_list_param_set {
7715e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7725e6e3a92SBing Zhao 	struct mwifiex_chan_scan_param_set chan_scan_param[1];
7735e6e3a92SBing Zhao } __packed;
7745e6e3a92SBing Zhao 
77599ffe72cSXinming Hu struct mwifiex_ie_types_rxba_sync {
77699ffe72cSXinming Hu 	struct mwifiex_ie_types_header header;
77799ffe72cSXinming Hu 	u8 mac[ETH_ALEN];
77899ffe72cSXinming Hu 	u8 tid;
77999ffe72cSXinming Hu 	u8 reserved;
78099ffe72cSXinming Hu 	__le16 seq_num;
78199ffe72cSXinming Hu 	__le16 bitmap_len;
78299ffe72cSXinming Hu 	u8 bitmap[1];
78399ffe72cSXinming Hu } __packed;
78499ffe72cSXinming Hu 
7855e6e3a92SBing Zhao struct chan_band_param_set {
7865e6e3a92SBing Zhao 	u8 radio_type;
7875e6e3a92SBing Zhao 	u8 chan_number;
7885e6e3a92SBing Zhao };
7895e6e3a92SBing Zhao 
7905e6e3a92SBing Zhao struct mwifiex_ie_types_chan_band_list_param_set {
7915e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7925e6e3a92SBing Zhao 	struct chan_band_param_set chan_band_param[1];
7935e6e3a92SBing Zhao } __packed;
7945e6e3a92SBing Zhao 
7955e6e3a92SBing Zhao struct mwifiex_ie_types_rates_param_set {
7965e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7975e6e3a92SBing Zhao 	u8 rates[1];
7985e6e3a92SBing Zhao } __packed;
7995e6e3a92SBing Zhao 
8005e6e3a92SBing Zhao struct mwifiex_ie_types_ssid_param_set {
8015e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8025e6e3a92SBing Zhao 	u8 ssid[1];
8035e6e3a92SBing Zhao } __packed;
8045e6e3a92SBing Zhao 
8055e6e3a92SBing Zhao struct mwifiex_ie_types_num_probes {
8065e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8075e6e3a92SBing Zhao 	__le16 num_probes;
8085e6e3a92SBing Zhao } __packed;
8095e6e3a92SBing Zhao 
8100c9b7f22SXinming Hu struct mwifiex_ie_types_repeat_count {
8110c9b7f22SXinming Hu 	struct mwifiex_ie_types_header header;
8120c9b7f22SXinming Hu 	__le16 repeat_count;
8130c9b7f22SXinming Hu } __packed;
8140c9b7f22SXinming Hu 
815fdcab083SGanapathi Bhat struct mwifiex_ie_types_min_rssi_threshold {
816fdcab083SGanapathi Bhat 	struct mwifiex_ie_types_header header;
817fdcab083SGanapathi Bhat 	__le16 rssi_threshold;
818fdcab083SGanapathi Bhat } __packed;
819fdcab083SGanapathi Bhat 
8200c9b7f22SXinming Hu struct mwifiex_ie_types_bgscan_start_later {
8210c9b7f22SXinming Hu 	struct mwifiex_ie_types_header header;
8220c9b7f22SXinming Hu 	__le16 start_later;
8230c9b7f22SXinming Hu } __packed;
8240c9b7f22SXinming Hu 
825cb91be87SAvinash Patil struct mwifiex_ie_types_scan_chan_gap {
826cb91be87SAvinash Patil 	struct mwifiex_ie_types_header header;
827cb91be87SAvinash Patil 	/* time gap in TUs to be used between two consecutive channels scan */
828cb91be87SAvinash Patil 	__le16 chan_gap;
829cb91be87SAvinash Patil } __packed;
830cb91be87SAvinash Patil 
831c2a8f0ffSGanapathi Bhat struct mwifiex_ie_types_random_mac {
832c2a8f0ffSGanapathi Bhat 	struct mwifiex_ie_types_header header;
833c2a8f0ffSGanapathi Bhat 	u8 mac[ETH_ALEN];
834c2a8f0ffSGanapathi Bhat } __packed;
835c2a8f0ffSGanapathi Bhat 
836bf354433SAvinash Patil struct mwifiex_ietypes_chanstats {
837bf354433SAvinash Patil 	struct mwifiex_ie_types_header header;
838bf354433SAvinash Patil 	struct mwifiex_fw_chan_stats chanstats[0];
839bf354433SAvinash Patil } __packed;
840bf354433SAvinash Patil 
8415e6e3a92SBing Zhao struct mwifiex_ie_types_wildcard_ssid_params {
8425e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8435e6e3a92SBing Zhao 	u8 max_ssid_length;
8445e6e3a92SBing Zhao 	u8 ssid[1];
8455e6e3a92SBing Zhao } __packed;
8465e6e3a92SBing Zhao 
8475e6e3a92SBing Zhao #define TSF_DATA_SIZE            8
8485e6e3a92SBing Zhao struct mwifiex_ie_types_tsf_timestamp {
8495e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8505e6e3a92SBing Zhao 	u8 tsf_data[1];
8515e6e3a92SBing Zhao } __packed;
8525e6e3a92SBing Zhao 
8535e6e3a92SBing Zhao struct mwifiex_cf_param_set {
8545e6e3a92SBing Zhao 	u8 cfp_cnt;
8555e6e3a92SBing Zhao 	u8 cfp_period;
8564348d085SUjjal Roy 	__le16 cfp_max_duration;
8574348d085SUjjal Roy 	__le16 cfp_duration_remaining;
8585e6e3a92SBing Zhao } __packed;
8595e6e3a92SBing Zhao 
8605e6e3a92SBing Zhao struct mwifiex_ibss_param_set {
8614348d085SUjjal Roy 	__le16 atim_window;
8625e6e3a92SBing Zhao } __packed;
8635e6e3a92SBing Zhao 
8645e6e3a92SBing Zhao struct mwifiex_ie_types_ss_param_set {
8655e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8665e6e3a92SBing Zhao 	union {
8675e6e3a92SBing Zhao 		struct mwifiex_cf_param_set cf_param_set[1];
8685e6e3a92SBing Zhao 		struct mwifiex_ibss_param_set ibss_param_set[1];
8695e6e3a92SBing Zhao 	} cf_ibss;
8705e6e3a92SBing Zhao } __packed;
8715e6e3a92SBing Zhao 
8725e6e3a92SBing Zhao struct mwifiex_fh_param_set {
8734348d085SUjjal Roy 	__le16 dwell_time;
8745e6e3a92SBing Zhao 	u8 hop_set;
8755e6e3a92SBing Zhao 	u8 hop_pattern;
8765e6e3a92SBing Zhao 	u8 hop_index;
8775e6e3a92SBing Zhao } __packed;
8785e6e3a92SBing Zhao 
8795e6e3a92SBing Zhao struct mwifiex_ds_param_set {
8805e6e3a92SBing Zhao 	u8 current_chan;
8815e6e3a92SBing Zhao } __packed;
8825e6e3a92SBing Zhao 
8835e6e3a92SBing Zhao struct mwifiex_ie_types_phy_param_set {
8845e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8855e6e3a92SBing Zhao 	union {
8865e6e3a92SBing Zhao 		struct mwifiex_fh_param_set fh_param_set[1];
8875e6e3a92SBing Zhao 		struct mwifiex_ds_param_set ds_param_set[1];
8885e6e3a92SBing Zhao 	} fh_ds;
8895e6e3a92SBing Zhao } __packed;
8905e6e3a92SBing Zhao 
8915e6e3a92SBing Zhao struct mwifiex_ie_types_auth_type {
8925e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8935e6e3a92SBing Zhao 	__le16 auth_type;
8945e6e3a92SBing Zhao } __packed;
8955e6e3a92SBing Zhao 
8965e6e3a92SBing Zhao struct mwifiex_ie_types_vendor_param_set {
8975e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8985e6e3a92SBing Zhao 	u8 ie[MWIFIEX_MAX_VSIE_LEN];
8995e6e3a92SBing Zhao };
9005e6e3a92SBing Zhao 
90130fa51c8SBing Zhao #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC	60
902d29caf25SAvinash Patil 
903d29caf25SAvinash Patil struct mwifiex_ie_types_tdls_idle_timeout {
904d29caf25SAvinash Patil 	struct mwifiex_ie_types_header header;
905d29caf25SAvinash Patil 	__le16 value;
906d29caf25SAvinash Patil } __packed;
907d29caf25SAvinash Patil 
9085e6e3a92SBing Zhao struct mwifiex_ie_types_rsn_param_set {
9095e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
9105e6e3a92SBing Zhao 	u8 rsn_ie[1];
9115e6e3a92SBing Zhao } __packed;
9125e6e3a92SBing Zhao 
9135e6e3a92SBing Zhao #define KEYPARAMSET_FIXED_LEN 6
9145e6e3a92SBing Zhao 
9155e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set {
9165e6e3a92SBing Zhao 	__le16 type;
9175e6e3a92SBing Zhao 	__le16 length;
9185e6e3a92SBing Zhao 	__le16 key_type_id;
9195e6e3a92SBing Zhao 	__le16 key_info;
9205e6e3a92SBing Zhao 	__le16 key_len;
9215e6e3a92SBing Zhao 	u8 key[50];
9225e6e3a92SBing Zhao } __packed;
9235e6e3a92SBing Zhao 
924b877f4cfSYing Luo #define IGTK_PN_LEN		8
925b877f4cfSYing Luo 
926b877f4cfSYing Luo struct mwifiex_cmac_param {
927b877f4cfSYing Luo 	u8 ipn[IGTK_PN_LEN];
928b877f4cfSYing Luo 	u8 key[WLAN_KEY_LEN_AES_CMAC];
929b877f4cfSYing Luo } __packed;
930b877f4cfSYing Luo 
931e57f1734SAvinash Patil struct mwifiex_wep_param {
932e57f1734SAvinash Patil 	__le16 key_len;
933e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_WEP104];
934e57f1734SAvinash Patil } __packed;
935e57f1734SAvinash Patil 
936e57f1734SAvinash Patil struct mwifiex_tkip_param {
937e57f1734SAvinash Patil 	u8 pn[WPA_PN_SIZE];
938e57f1734SAvinash Patil 	__le16 key_len;
939e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_TKIP];
940e57f1734SAvinash Patil } __packed;
941e57f1734SAvinash Patil 
942e57f1734SAvinash Patil struct mwifiex_aes_param {
943e57f1734SAvinash Patil 	u8 pn[WPA_PN_SIZE];
944e57f1734SAvinash Patil 	__le16 key_len;
945e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_CCMP];
946e57f1734SAvinash Patil } __packed;
947e57f1734SAvinash Patil 
948e57f1734SAvinash Patil struct mwifiex_wapi_param {
949e57f1734SAvinash Patil 	u8 pn[PN_LEN];
950e57f1734SAvinash Patil 	__le16 key_len;
951e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_SMS4];
952e57f1734SAvinash Patil } __packed;
953e57f1734SAvinash Patil 
954e57f1734SAvinash Patil struct mwifiex_cmac_aes_param {
955e57f1734SAvinash Patil 	u8 ipn[IGTK_PN_LEN];
956e57f1734SAvinash Patil 	__le16 key_len;
957e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_AES_CMAC];
958e57f1734SAvinash Patil } __packed;
959e57f1734SAvinash Patil 
960e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 {
961e57f1734SAvinash Patil 	__le16 type;
962e57f1734SAvinash Patil 	__le16 len;
963e57f1734SAvinash Patil 	u8 mac_addr[ETH_ALEN];
964e57f1734SAvinash Patil 	u8 key_idx;
965e57f1734SAvinash Patil 	u8 key_type;
966e57f1734SAvinash Patil 	__le16 key_info;
967e57f1734SAvinash Patil 	union {
968e57f1734SAvinash Patil 		struct mwifiex_wep_param wep;
969e57f1734SAvinash Patil 		struct mwifiex_tkip_param tkip;
970e57f1734SAvinash Patil 		struct mwifiex_aes_param aes;
971e57f1734SAvinash Patil 		struct mwifiex_wapi_param wapi;
972e57f1734SAvinash Patil 		struct mwifiex_cmac_aes_param cmac_aes;
973e57f1734SAvinash Patil 	} key_params;
974e57f1734SAvinash Patil } __packed;
975e57f1734SAvinash Patil 
976e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 {
977e57f1734SAvinash Patil 	__le16 action;
978e57f1734SAvinash Patil 	struct mwifiex_ie_type_key_param_set_v2 key_param_set;
979e57f1734SAvinash Patil } __packed;
980e57f1734SAvinash Patil 
9815e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material {
9825e6e3a92SBing Zhao 	__le16 action;
9835e6e3a92SBing Zhao 	struct mwifiex_ie_type_key_param_set key_param_set;
9845e6e3a92SBing Zhao } __packed;
9855e6e3a92SBing Zhao 
9865e6e3a92SBing Zhao struct host_cmd_ds_gen {
9874348d085SUjjal Roy 	__le16 command;
9884348d085SUjjal Roy 	__le16 size;
9894348d085SUjjal Roy 	__le16 seq_num;
9904348d085SUjjal Roy 	__le16 result;
9915e6e3a92SBing Zhao };
9925e6e3a92SBing Zhao 
9935e6e3a92SBing Zhao #define S_DS_GEN        sizeof(struct host_cmd_ds_gen)
9945e6e3a92SBing Zhao 
9955e6e3a92SBing Zhao enum sleep_resp_ctrl {
9965e6e3a92SBing Zhao 	RESP_NOT_NEEDED = 0,
9975e6e3a92SBing Zhao 	RESP_NEEDED,
9985e6e3a92SBing Zhao };
9995e6e3a92SBing Zhao 
10005e6e3a92SBing Zhao struct mwifiex_ps_param {
10015e6e3a92SBing Zhao 	__le16 null_pkt_interval;
10025e6e3a92SBing Zhao 	__le16 multiple_dtims;
10035e6e3a92SBing Zhao 	__le16 bcn_miss_timeout;
10045e6e3a92SBing Zhao 	__le16 local_listen_interval;
10055e6e3a92SBing Zhao 	__le16 adhoc_wake_period;
10065e6e3a92SBing Zhao 	__le16 mode;
10075e6e3a92SBing Zhao 	__le16 delay_to_ps;
10085c0b8798SKarthik Ananthapadmanabha } __packed;
10095e6e3a92SBing Zhao 
10106a7b1910SShengzhen Li #define HS_DEF_WAKE_INTERVAL          100
10116a7b1910SShengzhen Li #define HS_DEF_INACTIVITY_TIMEOUT      50
10126a7b1910SShengzhen Li 
10136a7b1910SShengzhen Li struct mwifiex_ps_param_in_hs {
10146a7b1910SShengzhen Li 	struct mwifiex_ie_types_header header;
10156a7b1910SShengzhen Li 	__le32 hs_wake_int;
10166a7b1910SShengzhen Li 	__le32 hs_inact_timeout;
10175c0b8798SKarthik Ananthapadmanabha } __packed;
10186a7b1910SShengzhen Li 
10195e6e3a92SBing Zhao #define BITMAP_AUTO_DS         0x01
10205e6e3a92SBing Zhao #define BITMAP_STA_PS          0x10
10215e6e3a92SBing Zhao 
10225e6e3a92SBing Zhao struct mwifiex_ie_types_auto_ds_param {
10235e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
10242b06bdbeSMarc Yang 	__le16 deep_sleep_timeout;
10255e6e3a92SBing Zhao } __packed;
10265e6e3a92SBing Zhao 
10275e6e3a92SBing Zhao struct mwifiex_ie_types_ps_param {
10285e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
10295e6e3a92SBing Zhao 	struct mwifiex_ps_param param;
10305e6e3a92SBing Zhao } __packed;
10315e6e3a92SBing Zhao 
10325e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh {
10335e6e3a92SBing Zhao 	__le16 action;
10345e6e3a92SBing Zhao 
10355e6e3a92SBing Zhao 	union {
10365e6e3a92SBing Zhao 		struct mwifiex_ps_param opt_ps;
10375e6e3a92SBing Zhao 		__le16 ps_bitmap;
10385e6e3a92SBing Zhao 	} params;
10395e6e3a92SBing Zhao } __packed;
10405e6e3a92SBing Zhao 
10414b9fede5SAmitkumar Karwar enum API_VER_ID {
10427f445d04SAvinash Patil 	KEY_API_VER_ID = 1,
104389be7cebSAmitkumar Karwar 	FW_API_VER_ID = 2,
10447f445d04SAvinash Patil };
10457f445d04SAvinash Patil 
10464b9fede5SAmitkumar Karwar struct hw_spec_api_rev {
10477f445d04SAvinash Patil 	struct mwifiex_ie_types_header header;
10487f445d04SAvinash Patil 	__le16 api_id;
10497f445d04SAvinash Patil 	u8 major_ver;
10507f445d04SAvinash Patil 	u8 minor_ver;
10517f445d04SAvinash Patil } __packed;
10527f445d04SAvinash Patil 
10535e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec {
10545e6e3a92SBing Zhao 	__le16 hw_if_version;
10555e6e3a92SBing Zhao 	__le16 version;
10565e6e3a92SBing Zhao 	__le16 reserved;
10575e6e3a92SBing Zhao 	__le16 num_of_mcast_adr;
10585e6e3a92SBing Zhao 	u8 permanent_addr[ETH_ALEN];
10595e6e3a92SBing Zhao 	__le16 region_code;
10605e6e3a92SBing Zhao 	__le16 number_of_antenna;
10615e6e3a92SBing Zhao 	__le32 fw_release_number;
10625e6e3a92SBing Zhao 	__le32 reserved_1;
10635e6e3a92SBing Zhao 	__le32 reserved_2;
10645e6e3a92SBing Zhao 	__le32 reserved_3;
10655e6e3a92SBing Zhao 	__le32 fw_cap_info;
10665e6e3a92SBing Zhao 	__le32 dot_11n_dev_cap;
10675e6e3a92SBing Zhao 	u8 dev_mcs_support;
10685e6e3a92SBing Zhao 	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
1069a5f39056SYogesh Ashok Powar 	__le16 mgmt_buf_count;	/* mgmt IE buffer count */
1070a5f39056SYogesh Ashok Powar 	__le32 reserved_5;
1071a5f39056SYogesh Ashok Powar 	__le32 reserved_6;
1072a5f39056SYogesh Ashok Powar 	__le32 dot_11ac_dev_cap;
1073a5f39056SYogesh Ashok Powar 	__le32 dot_11ac_mcs_support;
10747f445d04SAvinash Patil 	u8 tlvs[0];
10755e6e3a92SBing Zhao } __packed;
10765e6e3a92SBing Zhao 
10775e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info {
10785e6e3a92SBing Zhao 	__le16 action;
10795e6e3a92SBing Zhao 	__le16 ndata;
10805e6e3a92SBing Zhao 	__le16 nbcn;
10815e6e3a92SBing Zhao 	__le16 reserved[9];
10825e6e3a92SBing Zhao 	long long reserved_1;
10835c0b8798SKarthik Ananthapadmanabha } __packed;
10845e6e3a92SBing Zhao 
10855e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp {
10865e6e3a92SBing Zhao 	__le16 action;
10875e6e3a92SBing Zhao 	__le16 ndata;
10885e6e3a92SBing Zhao 	__le16 nbcn;
10895e6e3a92SBing Zhao 	__le16 data_rssi_last;
10905e6e3a92SBing Zhao 	__le16 data_nf_last;
10915e6e3a92SBing Zhao 	__le16 data_rssi_avg;
10925e6e3a92SBing Zhao 	__le16 data_nf_avg;
10935e6e3a92SBing Zhao 	__le16 bcn_rssi_last;
10945e6e3a92SBing Zhao 	__le16 bcn_nf_last;
10955e6e3a92SBing Zhao 	__le16 bcn_rssi_avg;
10965e6e3a92SBing Zhao 	__le16 bcn_nf_avg;
10975e6e3a92SBing Zhao 	long long tsf_bcn;
10985c0b8798SKarthik Ananthapadmanabha } __packed;
10995e6e3a92SBing Zhao 
11005e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address {
11015e6e3a92SBing Zhao 	__le16 action;
11025e6e3a92SBing Zhao 	u8 mac_addr[ETH_ALEN];
11035c0b8798SKarthik Ananthapadmanabha } __packed;
11045e6e3a92SBing Zhao 
11055e6e3a92SBing Zhao struct host_cmd_ds_mac_control {
1106b82dd3bdSAmitkumar Karwar 	__le32 action;
11075e6e3a92SBing Zhao };
11085e6e3a92SBing Zhao 
11095e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr {
11105e6e3a92SBing Zhao 	__le16 action;
11115e6e3a92SBing Zhao 	__le16 num_of_adrs;
11125e6e3a92SBing Zhao 	u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
11135e6e3a92SBing Zhao } __packed;
11145e6e3a92SBing Zhao 
11155e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate {
11165e6e3a92SBing Zhao 	u8 mac_addr[ETH_ALEN];
11175e6e3a92SBing Zhao 	__le16 reason_code;
11185e6e3a92SBing Zhao } __packed;
11195e6e3a92SBing Zhao 
11205e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate {
11215e6e3a92SBing Zhao 	u8 peer_sta_addr[ETH_ALEN];
11225e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
11235e6e3a92SBing Zhao 	__le16 listen_interval;
11245e6e3a92SBing Zhao 	__le16 beacon_period;
11255e6e3a92SBing Zhao 	u8 dtim_period;
11265e6e3a92SBing Zhao } __packed;
11275e6e3a92SBing Zhao 
11285e6e3a92SBing Zhao struct ieee_types_assoc_rsp {
11295e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
11305e6e3a92SBing Zhao 	__le16 status_code;
11315e6e3a92SBing Zhao 	__le16 a_id;
113244ca509cSNachiket Kukade 	u8 ie_buffer[0];
11335e6e3a92SBing Zhao } __packed;
11345e6e3a92SBing Zhao 
11355e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp {
11365e6e3a92SBing Zhao 	struct ieee_types_assoc_rsp assoc_rsp;
11375e6e3a92SBing Zhao } __packed;
11385e6e3a92SBing Zhao 
11395e6e3a92SBing Zhao struct ieee_types_cf_param_set {
11405e6e3a92SBing Zhao 	u8 element_id;
11415e6e3a92SBing Zhao 	u8 len;
11425e6e3a92SBing Zhao 	u8 cfp_cnt;
11435e6e3a92SBing Zhao 	u8 cfp_period;
11444348d085SUjjal Roy 	__le16 cfp_max_duration;
11454348d085SUjjal Roy 	__le16 cfp_duration_remaining;
11465e6e3a92SBing Zhao } __packed;
11475e6e3a92SBing Zhao 
11485e6e3a92SBing Zhao struct ieee_types_ibss_param_set {
11495e6e3a92SBing Zhao 	u8 element_id;
11505e6e3a92SBing Zhao 	u8 len;
11515e6e3a92SBing Zhao 	__le16 atim_window;
11525e6e3a92SBing Zhao } __packed;
11535e6e3a92SBing Zhao 
11545e6e3a92SBing Zhao union ieee_types_ss_param_set {
11555e6e3a92SBing Zhao 	struct ieee_types_cf_param_set cf_param_set;
11565e6e3a92SBing Zhao 	struct ieee_types_ibss_param_set ibss_param_set;
11575e6e3a92SBing Zhao } __packed;
11585e6e3a92SBing Zhao 
11595e6e3a92SBing Zhao struct ieee_types_fh_param_set {
11605e6e3a92SBing Zhao 	u8 element_id;
11615e6e3a92SBing Zhao 	u8 len;
11625e6e3a92SBing Zhao 	__le16 dwell_time;
11635e6e3a92SBing Zhao 	u8 hop_set;
11645e6e3a92SBing Zhao 	u8 hop_pattern;
11655e6e3a92SBing Zhao 	u8 hop_index;
11665e6e3a92SBing Zhao } __packed;
11675e6e3a92SBing Zhao 
11685e6e3a92SBing Zhao struct ieee_types_ds_param_set {
11695e6e3a92SBing Zhao 	u8 element_id;
11705e6e3a92SBing Zhao 	u8 len;
11715e6e3a92SBing Zhao 	u8 current_chan;
11725e6e3a92SBing Zhao } __packed;
11735e6e3a92SBing Zhao 
11745e6e3a92SBing Zhao union ieee_types_phy_param_set {
11755e6e3a92SBing Zhao 	struct ieee_types_fh_param_set fh_param_set;
11765e6e3a92SBing Zhao 	struct ieee_types_ds_param_set ds_param_set;
11775e6e3a92SBing Zhao } __packed;
11785e6e3a92SBing Zhao 
1179a5f39056SYogesh Ashok Powar struct ieee_types_oper_mode_ntf {
1180a5f39056SYogesh Ashok Powar 	u8 element_id;
1181a5f39056SYogesh Ashok Powar 	u8 len;
1182a5f39056SYogesh Ashok Powar 	u8 oper_mode;
1183a5f39056SYogesh Ashok Powar } __packed;
1184a5f39056SYogesh Ashok Powar 
11855e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start {
11865e6e3a92SBing Zhao 	u8 ssid[IEEE80211_MAX_SSID_LEN];
11875e6e3a92SBing Zhao 	u8 bss_mode;
11885e6e3a92SBing Zhao 	__le16 beacon_period;
11895e6e3a92SBing Zhao 	u8 dtim_period;
11905e6e3a92SBing Zhao 	union ieee_types_ss_param_set ss_param_set;
11915e6e3a92SBing Zhao 	union ieee_types_phy_param_set phy_param_set;
11925e6e3a92SBing Zhao 	u16 reserved1;
11935e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
119463af6333SYogesh Ashok Powar 	u8 data_rate[HOSTCMD_SUPPORTED_RATES];
11955e6e3a92SBing Zhao } __packed;
11965e6e3a92SBing Zhao 
1197d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result {
11985e6e3a92SBing Zhao 	u8 pad[3];
11995e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
1200d5556e87SAmitkumar Karwar 	u8 pad2[2];
1201d5556e87SAmitkumar Karwar 	u8 result;
1202d5556e87SAmitkumar Karwar } __packed;
1203d5556e87SAmitkumar Karwar 
1204d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result {
1205d5556e87SAmitkumar Karwar 	u8 result;
12065e6e3a92SBing Zhao } __packed;
12075e6e3a92SBing Zhao 
12085e6e3a92SBing Zhao struct adhoc_bss_desc {
12095e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
12105e6e3a92SBing Zhao 	u8 ssid[IEEE80211_MAX_SSID_LEN];
12115e6e3a92SBing Zhao 	u8 bss_mode;
12125e6e3a92SBing Zhao 	__le16 beacon_period;
12135e6e3a92SBing Zhao 	u8 dtim_period;
12145e6e3a92SBing Zhao 	u8 time_stamp[8];
12155e6e3a92SBing Zhao 	u8 local_time[8];
12165e6e3a92SBing Zhao 	union ieee_types_phy_param_set phy_param_set;
12175e6e3a92SBing Zhao 	union ieee_types_ss_param_set ss_param_set;
12185e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
12195e6e3a92SBing Zhao 	u8 data_rates[HOSTCMD_SUPPORTED_RATES];
12205e6e3a92SBing Zhao 
12215e6e3a92SBing Zhao 	/*
12225e6e3a92SBing Zhao 	 *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
12235e6e3a92SBing Zhao 	 *  It is used in the Adhoc join command and will cause a
12245e6e3a92SBing Zhao 	 *  binary layout mismatch with the firmware
12255e6e3a92SBing Zhao 	 */
12265e6e3a92SBing Zhao } __packed;
12275e6e3a92SBing Zhao 
12285e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join {
12295e6e3a92SBing Zhao 	struct adhoc_bss_desc bss_descriptor;
12305e6e3a92SBing Zhao 	u16 reserved1;
12315e6e3a92SBing Zhao 	u16 reserved2;
12325e6e3a92SBing Zhao } __packed;
12335e6e3a92SBing Zhao 
12345e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log {
12355e6e3a92SBing Zhao 	__le32 mcast_tx_frame;
12365e6e3a92SBing Zhao 	__le32 failed;
12375e6e3a92SBing Zhao 	__le32 retry;
12385e6e3a92SBing Zhao 	__le32 multi_retry;
12395e6e3a92SBing Zhao 	__le32 frame_dup;
12405e6e3a92SBing Zhao 	__le32 rts_success;
12415e6e3a92SBing Zhao 	__le32 rts_failure;
12425e6e3a92SBing Zhao 	__le32 ack_failure;
12435e6e3a92SBing Zhao 	__le32 rx_frag;
12445e6e3a92SBing Zhao 	__le32 mcast_rx_frame;
12455e6e3a92SBing Zhao 	__le32 fcs_error;
12465e6e3a92SBing Zhao 	__le32 tx_frame;
12475e6e3a92SBing Zhao 	__le32 reserved;
12485e6e3a92SBing Zhao 	__le32 wep_icv_err_cnt[4];
1249d35b6392SXinming Hu 	__le32 bcn_rcv_cnt;
1250d35b6392SXinming Hu 	__le32 bcn_miss_cnt;
12515c0b8798SKarthik Ananthapadmanabha } __packed;
12525e6e3a92SBing Zhao 
1253a5f39056SYogesh Ashok Powar /* Enumeration for rate format */
1254a5f39056SYogesh Ashok Powar enum _mwifiex_rate_format {
1255a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_LG = 0,
1256a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_HT,
1257a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_VHT,
1258a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
1259a5f39056SYogesh Ashok Powar };
1260a5f39056SYogesh Ashok Powar 
12615e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query {
12625e6e3a92SBing Zhao 	u8 tx_rate;
1263a5f39056SYogesh Ashok Powar 	/* Tx Rate Info: For 802.11 AC cards
1264a5f39056SYogesh Ashok Powar 	 *
1265a5f39056SYogesh Ashok Powar 	 * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
1266a5f39056SYogesh Ashok Powar 	 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
1267a5f39056SYogesh Ashok Powar 	 * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
1268a5f39056SYogesh Ashok Powar 	 *
1269a5f39056SYogesh Ashok Powar 	 * For non-802.11 AC cards
1270a5f39056SYogesh Ashok Powar 	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
12715e6e3a92SBing Zhao 	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
1272a5f39056SYogesh Ashok Powar 	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
1273a5f39056SYogesh Ashok Powar 	 */
12745e6e3a92SBing Zhao 	u8 ht_info;
12755e6e3a92SBing Zhao } __packed;
12765e6e3a92SBing Zhao 
12774e6ee91bSAvinash Patil struct mwifiex_tx_pause_tlv {
12784e6ee91bSAvinash Patil 	struct mwifiex_ie_types_header header;
12794e6ee91bSAvinash Patil 	u8 peermac[ETH_ALEN];
12804e6ee91bSAvinash Patil 	u8 tx_pause;
12814e6ee91bSAvinash Patil 	u8 pkt_cnt;
12824e6ee91bSAvinash Patil } __packed;
12834e6ee91bSAvinash Patil 
12845e6e3a92SBing Zhao enum Host_Sleep_Action {
12855e6e3a92SBing Zhao 	HS_CONFIGURE = 0x0001,
12865e6e3a92SBing Zhao 	HS_ACTIVATE  = 0x0002,
12875e6e3a92SBing Zhao };
12885e6e3a92SBing Zhao 
12895e6e3a92SBing Zhao struct mwifiex_hs_config_param {
12905e6e3a92SBing Zhao 	__le32 conditions;
12915e6e3a92SBing Zhao 	u8 gpio;
12925e6e3a92SBing Zhao 	u8 gap;
12935e6e3a92SBing Zhao } __packed;
12945e6e3a92SBing Zhao 
12955e6e3a92SBing Zhao struct hs_activate_param {
12964348d085SUjjal Roy 	__le16 resp_ctrl;
12975e6e3a92SBing Zhao } __packed;
12985e6e3a92SBing Zhao 
12995e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh {
13005e6e3a92SBing Zhao 	__le16 action;
13015e6e3a92SBing Zhao 
13025e6e3a92SBing Zhao 	union {
13035e6e3a92SBing Zhao 		struct mwifiex_hs_config_param hs_config;
13045e6e3a92SBing Zhao 		struct hs_activate_param hs_activate;
13055e6e3a92SBing Zhao 	} params;
13065e6e3a92SBing Zhao } __packed;
13075e6e3a92SBing Zhao 
13085e6e3a92SBing Zhao enum SNMP_MIB_INDEX {
13095e6e3a92SBing Zhao 	OP_RATE_SET_I = 1,
13105e6e3a92SBing Zhao 	DTIM_PERIOD_I = 3,
13115e6e3a92SBing Zhao 	RTS_THRESH_I = 5,
13125e6e3a92SBing Zhao 	SHORT_RETRY_LIM_I = 6,
13135e6e3a92SBing Zhao 	LONG_RETRY_LIM_I = 7,
13145e6e3a92SBing Zhao 	FRAG_THRESH_I = 8,
13155e6e3a92SBing Zhao 	DOT11D_I = 9,
13162a7305c8SAmitkumar Karwar 	DOT11H_I = 10,
13175e6e3a92SBing Zhao };
13185e6e3a92SBing Zhao 
131912d11109SAvinash Patil enum mwifiex_assocmd_failurepoint {
132012d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_SUCCESS = 0,
132112d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_ASSOC,
132212d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_AUTH,
132312d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_JOIN
132412d11109SAvinash Patil };
132512d11109SAvinash Patil 
13265e6e3a92SBing Zhao #define MAX_SNMP_BUF_SIZE   128
13275e6e3a92SBing Zhao 
13285e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib {
13295e6e3a92SBing Zhao 	__le16 query_type;
13305e6e3a92SBing Zhao 	__le16 oid;
13315e6e3a92SBing Zhao 	__le16 buf_size;
13325e6e3a92SBing Zhao 	u8 value[1];
13335e6e3a92SBing Zhao } __packed;
13345e6e3a92SBing Zhao 
13355e6e3a92SBing Zhao struct mwifiex_rate_scope {
13365e6e3a92SBing Zhao 	__le16 type;
13375e6e3a92SBing Zhao 	__le16 length;
13385e6e3a92SBing Zhao 	__le16 hr_dsss_rate_bitmap;
13395e6e3a92SBing Zhao 	__le16 ofdm_rate_bitmap;
13405e6e3a92SBing Zhao 	__le16 ht_mcs_rate_bitmap[8];
1341a0b7315aSAmitkumar Karwar 	__le16 vht_mcs_rate_bitmap[8];
13425e6e3a92SBing Zhao } __packed;
13435e6e3a92SBing Zhao 
13445e6e3a92SBing Zhao struct mwifiex_rate_drop_pattern {
13455e6e3a92SBing Zhao 	__le16 type;
13465e6e3a92SBing Zhao 	__le16 length;
13475e6e3a92SBing Zhao 	__le32 rate_drop_mode;
13485e6e3a92SBing Zhao } __packed;
13495e6e3a92SBing Zhao 
13505e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg {
13515e6e3a92SBing Zhao 	__le16 action;
13525e6e3a92SBing Zhao 	__le16 cfg_index;
13535e6e3a92SBing Zhao } __packed;
13545e6e3a92SBing Zhao 
13555e6e3a92SBing Zhao struct mwifiex_power_group {
13565e6e3a92SBing Zhao 	u8 modulation_class;
13575e6e3a92SBing Zhao 	u8 first_rate_code;
13585e6e3a92SBing Zhao 	u8 last_rate_code;
13595e6e3a92SBing Zhao 	s8 power_step;
13605e6e3a92SBing Zhao 	s8 power_min;
13615e6e3a92SBing Zhao 	s8 power_max;
13625e6e3a92SBing Zhao 	u8 ht_bandwidth;
13635e6e3a92SBing Zhao 	u8 reserved;
13645e6e3a92SBing Zhao } __packed;
13655e6e3a92SBing Zhao 
13665e6e3a92SBing Zhao struct mwifiex_types_power_group {
1367930fd35cSAmitkumar Karwar 	__le16 type;
1368930fd35cSAmitkumar Karwar 	__le16 length;
13695e6e3a92SBing Zhao } __packed;
13705e6e3a92SBing Zhao 
13715e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg {
13725e6e3a92SBing Zhao 	__le16 action;
13735e6e3a92SBing Zhao 	__le16 cfg_index;
13745e6e3a92SBing Zhao 	__le32 mode;
13755e6e3a92SBing Zhao } __packed;
13765e6e3a92SBing Zhao 
1377caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr {
1378caa8984fSAmitkumar Karwar 	__le16 action;
1379caa8984fSAmitkumar Karwar 	__le16 cur_level;
1380caa8984fSAmitkumar Karwar 	u8 max_power;
1381caa8984fSAmitkumar Karwar 	u8 min_power;
1382caa8984fSAmitkumar Karwar } __packed;
1383caa8984fSAmitkumar Karwar 
13848a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo {
13858a279d5bSAmitkumar Karwar 	__le16 action_tx;
13868a279d5bSAmitkumar Karwar 	__le16 tx_ant_mode;
13878a279d5bSAmitkumar Karwar 	__le16 action_rx;
13888a279d5bSAmitkumar Karwar 	__le16 rx_ant_mode;
13895c0b8798SKarthik Ananthapadmanabha } __packed;
13908a279d5bSAmitkumar Karwar 
13918a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso {
13928a279d5bSAmitkumar Karwar 	__le16 action;
13938a279d5bSAmitkumar Karwar 	__le16 ant_mode;
13945c0b8798SKarthik Ananthapadmanabha } __packed;
13958a279d5bSAmitkumar Karwar 
1396429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper {
1397429d90d2SAvinash Patil 	__le16 tdls_action;
1398429d90d2SAvinash Patil 	__le16 reason;
1399429d90d2SAvinash Patil 	u8 peer_mac[ETH_ALEN];
1400429d90d2SAvinash Patil } __packed;
1401429d90d2SAvinash Patil 
1402449b8bbfSXinming Hu struct mwifiex_tdls_config {
1403449b8bbfSXinming Hu 	__le16 enable;
14045c0b8798SKarthik Ananthapadmanabha } __packed;
1405449b8bbfSXinming Hu 
1406449b8bbfSXinming Hu struct mwifiex_tdls_config_cs_params {
1407449b8bbfSXinming Hu 	u8 unit_time;
1408449b8bbfSXinming Hu 	u8 thr_otherlink;
1409449b8bbfSXinming Hu 	u8 thr_directlink;
14105c0b8798SKarthik Ananthapadmanabha } __packed;
1411449b8bbfSXinming Hu 
1412449b8bbfSXinming Hu struct mwifiex_tdls_init_cs_params {
1413449b8bbfSXinming Hu 	u8 peer_mac[ETH_ALEN];
1414449b8bbfSXinming Hu 	u8 primary_chan;
1415449b8bbfSXinming Hu 	u8 second_chan_offset;
1416449b8bbfSXinming Hu 	u8 band;
1417449b8bbfSXinming Hu 	__le16 switch_time;
1418449b8bbfSXinming Hu 	__le16 switch_timeout;
1419449b8bbfSXinming Hu 	u8 reg_class;
1420449b8bbfSXinming Hu 	u8 periodicity;
1421449b8bbfSXinming Hu } __packed;
1422449b8bbfSXinming Hu 
1423449b8bbfSXinming Hu struct mwifiex_tdls_stop_cs_params {
1424449b8bbfSXinming Hu 	u8 peer_mac[ETH_ALEN];
14255c0b8798SKarthik Ananthapadmanabha } __packed;
1426449b8bbfSXinming Hu 
1427449b8bbfSXinming Hu struct host_cmd_ds_tdls_config {
1428449b8bbfSXinming Hu 	__le16 tdls_action;
1429449b8bbfSXinming Hu 	u8 tdls_data[1];
1430449b8bbfSXinming Hu } __packed;
1431449b8bbfSXinming Hu 
143285afb186SAvinash Patil struct mwifiex_chan_desc {
143385afb186SAvinash Patil 	__le16 start_freq;
143485afb186SAvinash Patil 	u8 chan_width;
143585afb186SAvinash Patil 	u8 chan_num;
143685afb186SAvinash Patil } __packed;
143785afb186SAvinash Patil 
143885afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req {
143985afb186SAvinash Patil 	struct mwifiex_chan_desc chan_desc;
144085afb186SAvinash Patil 	__le32 msec_dwell_time;
144185afb186SAvinash Patil } __packed;
144285afb186SAvinash Patil 
14430a694d68SAvinash Patil struct host_cmd_ds_chan_rpt_event {
14440a694d68SAvinash Patil 	__le32 result;
14450a694d68SAvinash Patil 	__le64 start_tsf;
14460a694d68SAvinash Patil 	__le32 duration;
14470a694d68SAvinash Patil 	u8 tlvbuf[0];
14480a694d68SAvinash Patil } __packed;
14490a694d68SAvinash Patil 
145092263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg {
145192263a84SZhaoyang Liu 	u8 action;
145292263a84SZhaoyang Liu 	u8 enable;
145392263a84SZhaoyang Liu 	__le16 block_size;
145492263a84SZhaoyang Liu } __packed;
145592263a84SZhaoyang Liu 
1456b8b3ececSAmitkumar Karwar struct mwifiex_fixed_bcn_param {
1457b5abcf02SAmitkumar Karwar 	__le64 timestamp;
14587c6fa2a8SAmitkumar Karwar 	__le16 beacon_period;
14597c6fa2a8SAmitkumar Karwar 	__le16 cap_info_bitmap;
14607c6fa2a8SAmitkumar Karwar } __packed;
14617c6fa2a8SAmitkumar Karwar 
146221f58d20SAmitkumar Karwar struct mwifiex_event_scan_result {
146321f58d20SAmitkumar Karwar 	__le16 event_id;
146421f58d20SAmitkumar Karwar 	u8 bss_index;
146521f58d20SAmitkumar Karwar 	u8 bss_type;
146621f58d20SAmitkumar Karwar 	u8 more_event;
146721f58d20SAmitkumar Karwar 	u8 reserved[3];
146821f58d20SAmitkumar Karwar 	__le16 buf_size;
146921f58d20SAmitkumar Karwar 	u8 num_of_set;
147021f58d20SAmitkumar Karwar } __packed;
147121f58d20SAmitkumar Karwar 
1472808bbebcSAmitkumar Karwar struct tx_status_event {
1473808bbebcSAmitkumar Karwar 	u8 packet_type;
1474808bbebcSAmitkumar Karwar 	u8 tx_token_id;
1475808bbebcSAmitkumar Karwar 	u8 status;
1476808bbebcSAmitkumar Karwar } __packed;
1477808bbebcSAmitkumar Karwar 
14785e6e3a92SBing Zhao #define MWIFIEX_USER_SCAN_CHAN_MAX             50
14795e6e3a92SBing Zhao 
14805e6e3a92SBing Zhao #define MWIFIEX_MAX_SSID_LIST_LENGTH         10
14815e6e3a92SBing Zhao 
14825e6e3a92SBing Zhao struct mwifiex_scan_cmd_config {
14835e6e3a92SBing Zhao 	/*
1484a8c48565SBing Zhao 	 *  BSS mode to be sent in the firmware command
14855e6e3a92SBing Zhao 	 */
14865e6e3a92SBing Zhao 	u8 bss_mode;
14875e6e3a92SBing Zhao 
14885e6e3a92SBing Zhao 	/* Specific BSSID used to filter scan results in the firmware */
14895e6e3a92SBing Zhao 	u8 specific_bssid[ETH_ALEN];
14905e6e3a92SBing Zhao 
14915e6e3a92SBing Zhao 	/* Length of TLVs sent in command starting at tlvBuffer */
14925e6e3a92SBing Zhao 	u32 tlv_buf_len;
14935e6e3a92SBing Zhao 
14945e6e3a92SBing Zhao 	/*
14955e6e3a92SBing Zhao 	 *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
14965e6e3a92SBing Zhao 	 *
14975e6e3a92SBing Zhao 	 *  TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
14985e6e3a92SBing Zhao 	 *  WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
14995e6e3a92SBing Zhao 	 */
15005e6e3a92SBing Zhao 	u8 tlv_buf[1];	/* SSID TLV(s) and ChanList TLVs are stored
15015e6e3a92SBing Zhao 				   here */
15025e6e3a92SBing Zhao } __packed;
15035e6e3a92SBing Zhao 
15045e6e3a92SBing Zhao struct mwifiex_user_scan_chan {
15055e6e3a92SBing Zhao 	u8 chan_number;
15065e6e3a92SBing Zhao 	u8 radio_type;
15075e6e3a92SBing Zhao 	u8 scan_type;
15085e6e3a92SBing Zhao 	u8 reserved;
15095e6e3a92SBing Zhao 	u32 scan_time;
15105e6e3a92SBing Zhao } __packed;
15115e6e3a92SBing Zhao 
15125e6e3a92SBing Zhao struct mwifiex_user_scan_cfg {
15135e6e3a92SBing Zhao 	/*
15145e6e3a92SBing Zhao 	 *  BSS mode to be sent in the firmware command
15155e6e3a92SBing Zhao 	 */
15165e6e3a92SBing Zhao 	u8 bss_mode;
15175e6e3a92SBing Zhao 	/* Configure the number of probe requests for active chan scans */
15185e6e3a92SBing Zhao 	u8 num_probes;
15195e6e3a92SBing Zhao 	u8 reserved;
15205e6e3a92SBing Zhao 	/* BSSID filter sent in the firmware command to limit the results */
15215e6e3a92SBing Zhao 	u8 specific_bssid[ETH_ALEN];
1522be0b281eSAmitkumar Karwar 	/* SSID filter list used in the firmware to limit the scan results */
1523be0b281eSAmitkumar Karwar 	struct cfg80211_ssid *ssid_list;
1524be0b281eSAmitkumar Karwar 	u8 num_ssids;
15255e6e3a92SBing Zhao 	/* Variable number (fixed maximum) of channels to scan up */
15265e6e3a92SBing Zhao 	struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
1527cb91be87SAvinash Patil 	u16 scan_chan_gap;
1528c2a8f0ffSGanapathi Bhat 	u8 random_mac[ETH_ALEN];
15295e6e3a92SBing Zhao } __packed;
15305e6e3a92SBing Zhao 
15310c9b7f22SXinming Hu #define MWIFIEX_BG_SCAN_CHAN_MAX 38
15320c9b7f22SXinming Hu #define MWIFIEX_BSS_MODE_INFRA 1
15330c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_GET     0x0000
15340c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET     0x0001
15350c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01
15360c9b7f22SXinming Hu /** ssid match */
15370c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_MATCH          0x0001
15380c9b7f22SXinming Hu /** ssid match and RSSI exceeded */
15390c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_RSSI_MATCH     0x0004
15400c9b7f22SXinming Hu /**wait for all channel scan to complete to report scan result*/
15410c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE  0x80000000
15420c9b7f22SXinming Hu 
15430c9b7f22SXinming Hu struct mwifiex_bg_scan_cfg {
15440c9b7f22SXinming Hu 	u16 action;
15450c9b7f22SXinming Hu 	u8 enable;
15460c9b7f22SXinming Hu 	u8 bss_type;
15470c9b7f22SXinming Hu 	u8 chan_per_scan;
15480c9b7f22SXinming Hu 	u32 scan_interval;
15490c9b7f22SXinming Hu 	u32 report_condition;
15500c9b7f22SXinming Hu 	u8 num_probes;
15510c9b7f22SXinming Hu 	u8 rssi_threshold;
15520c9b7f22SXinming Hu 	u8 snr_threshold;
15530c9b7f22SXinming Hu 	u16 repeat_count;
15540c9b7f22SXinming Hu 	u16 start_later;
15550c9b7f22SXinming Hu 	struct cfg80211_match_set *ssid_list;
15560c9b7f22SXinming Hu 	u8 num_ssids;
15570c9b7f22SXinming Hu 	struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX];
15580c9b7f22SXinming Hu 	u16 scan_chan_gap;
15590c9b7f22SXinming Hu } __packed;
15600c9b7f22SXinming Hu 
15615e6e3a92SBing Zhao struct ie_body {
15625e6e3a92SBing Zhao 	u8 grp_key_oui[4];
15635e6e3a92SBing Zhao 	u8 ptk_cnt[2];
15645e6e3a92SBing Zhao 	u8 ptk_body[4];
15655e6e3a92SBing Zhao } __packed;
15665e6e3a92SBing Zhao 
15675e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan {
15685e6e3a92SBing Zhao 	u8 bss_mode;
15695e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
15705e6e3a92SBing Zhao 	u8 tlv_buffer[1];
15715e6e3a92SBing Zhao } __packed;
15725e6e3a92SBing Zhao 
15735e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp {
15745e6e3a92SBing Zhao 	__le16 bss_descript_size;
15755e6e3a92SBing Zhao 	u8 number_of_sets;
15765e6e3a92SBing Zhao 	u8 bss_desc_and_tlv_buffer[1];
15775e6e3a92SBing Zhao } __packed;
15785e6e3a92SBing Zhao 
157921f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext {
158021f58d20SAmitkumar Karwar 	u32   reserved;
158121f58d20SAmitkumar Karwar 	u8    tlv_buffer[1];
158221f58d20SAmitkumar Karwar } __packed;
158321f58d20SAmitkumar Karwar 
158440d7412bSAniket Nagarnaik struct mwifiex_ie_types_bss_mode {
158540d7412bSAniket Nagarnaik 	struct mwifiex_ie_types_header  header;
158640d7412bSAniket Nagarnaik 	u8 bss_mode;
158740d7412bSAniket Nagarnaik } __packed;
158840d7412bSAniket Nagarnaik 
158921f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_rsp {
159021f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
159121f58d20SAmitkumar Karwar 	u8 bssid[ETH_ALEN];
159221f58d20SAmitkumar Karwar 	u8 frame_body[1];
159321f58d20SAmitkumar Karwar } __packed;
159421f58d20SAmitkumar Karwar 
159521f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_info {
159621f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
159721f58d20SAmitkumar Karwar 	__le16 rssi;
159821f58d20SAmitkumar Karwar 	__le16 anpi;
159921f58d20SAmitkumar Karwar 	u8 cca_busy_fraction;
160021f58d20SAmitkumar Karwar 	u8 radio_type;
160121f58d20SAmitkumar Karwar 	u8 channel;
160221f58d20SAmitkumar Karwar 	u8 reserved;
160321f58d20SAmitkumar Karwar 	__le64 tsf;
160421f58d20SAmitkumar Karwar } __packed;
160521f58d20SAmitkumar Karwar 
16060c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config {
16070c9b7f22SXinming Hu 	__le16 action;
16080c9b7f22SXinming Hu 	u8 enable;
16090c9b7f22SXinming Hu 	u8 bss_type;
16100c9b7f22SXinming Hu 	u8 chan_per_scan;
16110c9b7f22SXinming Hu 	u8 reserved;
16120c9b7f22SXinming Hu 	__le16 reserved1;
16130c9b7f22SXinming Hu 	__le32 scan_interval;
16140c9b7f22SXinming Hu 	__le32 reserved2;
16150c9b7f22SXinming Hu 	__le32 report_condition;
16160c9b7f22SXinming Hu 	__le16 reserved3;
16170c9b7f22SXinming Hu 	u8 tlv[0];
16180c9b7f22SXinming Hu } __packed;
16190c9b7f22SXinming Hu 
16205e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query {
16215e6e3a92SBing Zhao 	u8 flush;
16225e6e3a92SBing Zhao } __packed;
16235e6e3a92SBing Zhao 
16245e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp {
16254348d085SUjjal Roy 	__le32 report_condition;
16265e6e3a92SBing Zhao 	struct host_cmd_ds_802_11_scan_rsp scan_resp;
16275e6e3a92SBing Zhao } __packed;
16285e6e3a92SBing Zhao 
16295e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set {
16305e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
16315e6e3a92SBing Zhao 	u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
16325e6e3a92SBing Zhao 	struct ieee80211_country_ie_triplet triplet[1];
16335e6e3a92SBing Zhao } __packed;
16345e6e3a92SBing Zhao 
16355e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info {
16365e6e3a92SBing Zhao 	__le16 action;
16375e6e3a92SBing Zhao 	struct mwifiex_ietypes_domain_param_set domain;
16385e6e3a92SBing Zhao } __packed;
16395e6e3a92SBing Zhao 
16405e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp {
16415e6e3a92SBing Zhao 	__le16 action;
16425e6e3a92SBing Zhao 	struct mwifiex_ietypes_domain_param_set domain;
16435e6e3a92SBing Zhao } __packed;
16445e6e3a92SBing Zhao 
16455e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req {
16465e6e3a92SBing Zhao 	u8 add_req_result;
16475e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16485e6e3a92SBing Zhao 	u8 dialog_token;
16495e6e3a92SBing Zhao 	__le16 block_ack_param_set;
16505e6e3a92SBing Zhao 	__le16 block_ack_tmo;
16515e6e3a92SBing Zhao 	__le16 ssn;
16525e6e3a92SBing Zhao } __packed;
16535e6e3a92SBing Zhao 
16545e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp {
16555e6e3a92SBing Zhao 	u8 add_rsp_result;
16565e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16575e6e3a92SBing Zhao 	u8 dialog_token;
16585e6e3a92SBing Zhao 	__le16 status_code;
16595e6e3a92SBing Zhao 	__le16 block_ack_param_set;
16605e6e3a92SBing Zhao 	__le16 block_ack_tmo;
16615e6e3a92SBing Zhao 	__le16 ssn;
16625e6e3a92SBing Zhao } __packed;
16635e6e3a92SBing Zhao 
16645e6e3a92SBing Zhao struct host_cmd_ds_11n_delba {
16655e6e3a92SBing Zhao 	u8 del_result;
16665e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16675e6e3a92SBing Zhao 	__le16 del_ba_param_set;
16685e6e3a92SBing Zhao 	__le16 reason_code;
16695e6e3a92SBing Zhao 	u8 reserved;
16705e6e3a92SBing Zhao } __packed;
16715e6e3a92SBing Zhao 
16725e6e3a92SBing Zhao struct host_cmd_ds_11n_batimeout {
16735e6e3a92SBing Zhao 	u8 tid;
16745e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16755e6e3a92SBing Zhao 	u8 origninator;
16765e6e3a92SBing Zhao } __packed;
16775e6e3a92SBing Zhao 
16785e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg {
16795e6e3a92SBing Zhao 	__le16 action;
16805e6e3a92SBing Zhao 	__le16 ht_tx_cap;
16815e6e3a92SBing Zhao 	__le16 ht_tx_info;
1682a5f39056SYogesh Ashok Powar 	__le16 misc_config;	/* Needed for 802.11AC cards only */
16835e6e3a92SBing Zhao } __packed;
16845e6e3a92SBing Zhao 
16855e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg {
16865e6e3a92SBing Zhao 	__le16 action;
16875e6e3a92SBing Zhao 	__le16 buff_size;
16885e6e3a92SBing Zhao 	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
16895e6e3a92SBing Zhao 	__le16 reserved3;
16905e6e3a92SBing Zhao } __packed;
16915e6e3a92SBing Zhao 
16925e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl {
16935e6e3a92SBing Zhao 	__le16 action;
16945e6e3a92SBing Zhao 	__le16 enable;
16955e6e3a92SBing Zhao 	__le16 curr_buf_size;
16965e6e3a92SBing Zhao } __packed;
16975e6e3a92SBing Zhao 
16980f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth {
16990f9e9b8bSAvinash Patil 	u8 mac[ETH_ALEN];
17000f9e9b8bSAvinash Patil 	__le16 reason;
17010f9e9b8bSAvinash Patil } __packed;
17020f9e9b8bSAvinash Patil 
1703b21783e9SXinming Hu struct mwifiex_ie_types_sta_info {
1704b21783e9SXinming Hu 	struct mwifiex_ie_types_header header;
1705b21783e9SXinming Hu 	u8 mac[ETH_ALEN];
1706b21783e9SXinming Hu 	u8 power_mfg_status;
1707b21783e9SXinming Hu 	s8 rssi;
1708b21783e9SXinming Hu };
1709b21783e9SXinming Hu 
1710b21783e9SXinming Hu struct host_cmd_ds_sta_list {
1711902831a7SKarthik D A 	__le16 sta_count;
1712b21783e9SXinming Hu 	u8 tlv[0];
1713b21783e9SXinming Hu } __packed;
1714b21783e9SXinming Hu 
17152a7305c8SAmitkumar Karwar struct mwifiex_ie_types_pwr_capability {
17162a7305c8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
17172a7305c8SAmitkumar Karwar 	s8 min_pwr;
17182a7305c8SAmitkumar Karwar 	s8 max_pwr;
17192a7305c8SAmitkumar Karwar };
17202a7305c8SAmitkumar Karwar 
17212a7305c8SAmitkumar Karwar struct mwifiex_ie_types_local_pwr_constraint {
17222a7305c8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
17232a7305c8SAmitkumar Karwar 	u8 chan;
17242a7305c8SAmitkumar Karwar 	u8 constraint;
17252a7305c8SAmitkumar Karwar };
17262a7305c8SAmitkumar Karwar 
17275e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_param_set {
17285e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
17295e6e3a92SBing Zhao 	u8 wmm_ie[1];
17305c0b8798SKarthik Ananthapadmanabha } __packed;
17315e6e3a92SBing Zhao 
1732432da7d2SXinming Hu struct mwifiex_ie_types_mgmt_frame {
1733432da7d2SXinming Hu 	struct mwifiex_ie_types_header header;
1734432da7d2SXinming Hu 	__le16 frame_control;
1735432da7d2SXinming Hu 	u8 frame_contents[0];
1736432da7d2SXinming Hu };
1737432da7d2SXinming Hu 
17385e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_queue_status {
17395e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
17405e6e3a92SBing Zhao 	u8 queue_index;
17415e6e3a92SBing Zhao 	u8 disabled;
17424348d085SUjjal Roy 	__le16 medium_time;
17435e6e3a92SBing Zhao 	u8 flow_required;
17445e6e3a92SBing Zhao 	u8 flow_created;
17455e6e3a92SBing Zhao 	u32 reserved;
17465e6e3a92SBing Zhao };
17475e6e3a92SBing Zhao 
17485e6e3a92SBing Zhao struct ieee_types_vendor_header {
17495e6e3a92SBing Zhao 	u8 element_id;
17505e6e3a92SBing Zhao 	u8 len;
17512e4c14a5SAmitkumar Karwar 	u8 oui[4];	/* 0~2: oui, 3: oui_type */
17525e6e3a92SBing Zhao 	u8 oui_subtype;
17535e6e3a92SBing Zhao 	u8 version;
17545e6e3a92SBing Zhao } __packed;
17555e6e3a92SBing Zhao 
17565e6e3a92SBing Zhao struct ieee_types_wmm_parameter {
17575e6e3a92SBing Zhao 	/*
17585e6e3a92SBing Zhao 	 * WMM Parameter IE - Vendor Specific Header:
17595e6e3a92SBing Zhao 	 *   element_id  [221/0xdd]
17605e6e3a92SBing Zhao 	 *   Len         [24]
17615e6e3a92SBing Zhao 	 *   Oui         [00:50:f2]
17625e6e3a92SBing Zhao 	 *   OuiType     [2]
17635e6e3a92SBing Zhao 	 *   OuiSubType  [1]
17645e6e3a92SBing Zhao 	 *   Version     [1]
17655e6e3a92SBing Zhao 	 */
17665e6e3a92SBing Zhao 	struct ieee_types_vendor_header vend_hdr;
17675e6e3a92SBing Zhao 	u8 qos_info_bitmap;
17685e6e3a92SBing Zhao 	u8 reserved;
176999fec5deSJohannes Berg 	struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
17705e6e3a92SBing Zhao } __packed;
17715e6e3a92SBing Zhao 
17725e6e3a92SBing Zhao struct ieee_types_wmm_info {
17735e6e3a92SBing Zhao 
17745e6e3a92SBing Zhao 	/*
17755e6e3a92SBing Zhao 	 * WMM Info IE - Vendor Specific Header:
17765e6e3a92SBing Zhao 	 *   element_id  [221/0xdd]
17775e6e3a92SBing Zhao 	 *   Len         [7]
17785e6e3a92SBing Zhao 	 *   Oui         [00:50:f2]
17795e6e3a92SBing Zhao 	 *   OuiType     [2]
17805e6e3a92SBing Zhao 	 *   OuiSubType  [0]
17815e6e3a92SBing Zhao 	 *   Version     [1]
17825e6e3a92SBing Zhao 	 */
17835e6e3a92SBing Zhao 	struct ieee_types_vendor_header vend_hdr;
17845e6e3a92SBing Zhao 
17855e6e3a92SBing Zhao 	u8 qos_info_bitmap;
17865e6e3a92SBing Zhao } __packed;
17875e6e3a92SBing Zhao 
17885e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status {
17895e6e3a92SBing Zhao 	u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
179099fec5deSJohannes Berg 			      IEEE80211_NUM_ACS];
17915e6e3a92SBing Zhao 	u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
17925e6e3a92SBing Zhao } __packed;
17935e6e3a92SBing Zhao 
17945e6e3a92SBing Zhao struct mwifiex_wmm_ac_status {
17955e6e3a92SBing Zhao 	u8 disabled;
17965e6e3a92SBing Zhao 	u8 flow_required;
17975e6e3a92SBing Zhao 	u8 flow_created;
17985e6e3a92SBing Zhao };
17995e6e3a92SBing Zhao 
18005e6e3a92SBing Zhao struct mwifiex_ie_types_htcap {
18015e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
18025e6e3a92SBing Zhao 	struct ieee80211_ht_cap ht_cap;
18035e6e3a92SBing Zhao } __packed;
18045e6e3a92SBing Zhao 
1805a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vhtcap {
1806a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1807a5f39056SYogesh Ashok Powar 	struct ieee80211_vht_cap vht_cap;
1808a5f39056SYogesh Ashok Powar } __packed;
1809a5f39056SYogesh Ashok Powar 
18105f6d5983SAvinash Patil struct mwifiex_ie_types_aid {
18115f6d5983SAvinash Patil 	struct mwifiex_ie_types_header header;
18125f6d5983SAvinash Patil 	__le16 aid;
18135f6d5983SAvinash Patil } __packed;
18145f6d5983SAvinash Patil 
1815a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_oper_mode_ntf {
1816a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1817a5f39056SYogesh Ashok Powar 	u8 oper_mode;
1818a5f39056SYogesh Ashok Powar } __packed;
1819a5f39056SYogesh Ashok Powar 
1820a5f39056SYogesh Ashok Powar /* VHT Operations IE */
1821a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vht_oper {
1822a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1823a5f39056SYogesh Ashok Powar 	u8 chan_width;
1824a5f39056SYogesh Ashok Powar 	u8 chan_center_freq_1;
1825a5f39056SYogesh Ashok Powar 	u8 chan_center_freq_2;
1826a5f39056SYogesh Ashok Powar 	/* Basic MCS set map, each 2 bits stands for a NSS */
18274348d085SUjjal Roy 	__le16 basic_mcs_map;
1828a5f39056SYogesh Ashok Powar } __packed;
1829a5f39056SYogesh Ashok Powar 
183054428c57SAvinash Patil struct mwifiex_ie_types_wmmcap {
183154428c57SAvinash Patil 	struct mwifiex_ie_types_header header;
183254428c57SAvinash Patil 	struct mwifiex_types_wmm_info wmm_info;
183354428c57SAvinash Patil } __packed;
183454428c57SAvinash Patil 
18355e6e3a92SBing Zhao struct mwifiex_ie_types_htinfo {
18365e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
1837074d46d1SJohannes Berg 	struct ieee80211_ht_operation ht_oper;
18385e6e3a92SBing Zhao } __packed;
18395e6e3a92SBing Zhao 
18405e6e3a92SBing Zhao struct mwifiex_ie_types_2040bssco {
18415e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
18425e6e3a92SBing Zhao 	u8 bss_co_2040;
18435e6e3a92SBing Zhao } __packed;
18445e6e3a92SBing Zhao 
18455e6e3a92SBing Zhao struct mwifiex_ie_types_extcap {
18465e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
184768f95b09SAvinash Patil 	u8 ext_capab[0];
18485e6e3a92SBing Zhao } __packed;
18495e6e3a92SBing Zhao 
1850c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access {
1851c2c6c85fSChin-ran Lo 	__le16 action;
1852c2c6c85fSChin-ran Lo 	__le16 reserved;
1853c2c6c85fSChin-ran Lo 	__le32 addr;
1854c2c6c85fSChin-ran Lo 	__le32 value;
18555c0b8798SKarthik Ananthapadmanabha } __packed;
1856c2c6c85fSChin-ran Lo 
18571f4dfd8aSAvinash Patil struct mwifiex_ie_types_qos_info {
18581f4dfd8aSAvinash Patil 	struct mwifiex_ie_types_header header;
18591f4dfd8aSAvinash Patil 	u8 qos_info;
18601f4dfd8aSAvinash Patil } __packed;
18611f4dfd8aSAvinash Patil 
18625e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access {
18635e6e3a92SBing Zhao 	__le16 action;
18645e6e3a92SBing Zhao 	__le16 offset;
18655e6e3a92SBing Zhao 	__le32 value;
18665e6e3a92SBing Zhao } __packed;
18675e6e3a92SBing Zhao 
18685e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access {
18695e6e3a92SBing Zhao 	__le16 action;
18705e6e3a92SBing Zhao 	__le16 offset;
18715e6e3a92SBing Zhao 	u8 value;
18725e6e3a92SBing Zhao 	u8 reserved[3];
18735e6e3a92SBing Zhao } __packed;
18745e6e3a92SBing Zhao 
18755e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access {
18765e6e3a92SBing Zhao 	__le16 action;
18775e6e3a92SBing Zhao 	__le16 offset;
18785e6e3a92SBing Zhao 	u8 value;
18795e6e3a92SBing Zhao 	u8 reserved[3];
18805e6e3a92SBing Zhao } __packed;
18815e6e3a92SBing Zhao 
18825e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access {
18835e6e3a92SBing Zhao 	__le16 action;
18845e6e3a92SBing Zhao 	__le16 offset;
18855e6e3a92SBing Zhao 	u8 value;
18865e6e3a92SBing Zhao 	u8 reserved[3];
18875e6e3a92SBing Zhao } __packed;
18885e6e3a92SBing Zhao 
18895e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access {
18905e6e3a92SBing Zhao 	__le16 action;
18915e6e3a92SBing Zhao 
18925e6e3a92SBing Zhao 	__le16 offset;
18935e6e3a92SBing Zhao 	__le16 byte_count;
18945e6e3a92SBing Zhao 	u8 value;
18955e6e3a92SBing Zhao } __packed;
18965e6e3a92SBing Zhao 
1897e568634aSAvinash Patil struct mwifiex_assoc_event {
1898e568634aSAvinash Patil 	u8 sta_addr[ETH_ALEN];
1899e568634aSAvinash Patil 	__le16 type;
1900e568634aSAvinash Patil 	__le16 len;
1901e568634aSAvinash Patil 	__le16 frame_control;
1902e568634aSAvinash Patil 	__le16 cap_info;
1903e568634aSAvinash Patil 	__le16 listen_interval;
1904e568634aSAvinash Patil 	u8 data[0];
1905e568634aSAvinash Patil } __packed;
1906e568634aSAvinash Patil 
19074db16a18SAvinash Patil struct host_cmd_ds_sys_config {
19084db16a18SAvinash Patil 	__le16 action;
19094db16a18SAvinash Patil 	u8 tlv[0];
19104db16a18SAvinash Patil };
1911f752dcd5SAvinash Patil 
191283c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg {
191383c78da9SYogesh Ashok Powar 	__le16 action;
191483c78da9SYogesh Ashok Powar 	u8 band_config;
191583c78da9SYogesh Ashok Powar 	u8 misc_config;
191683c78da9SYogesh Ashok Powar 	__le32 cap_info;
191783c78da9SYogesh Ashok Powar 	__le32 mcs_tx_set;
191883c78da9SYogesh Ashok Powar 	__le32 mcs_rx_set;
191983c78da9SYogesh Ashok Powar } __packed;
192083c78da9SYogesh Ashok Powar 
1921f752dcd5SAvinash Patil struct host_cmd_tlv_akmp {
19226b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1923f752dcd5SAvinash Patil 	__le16 key_mgmt;
1924f752dcd5SAvinash Patil 	__le16 key_mgmt_operation;
1925f752dcd5SAvinash Patil } __packed;
1926f752dcd5SAvinash Patil 
1927f752dcd5SAvinash Patil struct host_cmd_tlv_pwk_cipher {
19286b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1929f752dcd5SAvinash Patil 	__le16 proto;
1930f752dcd5SAvinash Patil 	u8 cipher;
1931f752dcd5SAvinash Patil 	u8 reserved;
1932f752dcd5SAvinash Patil } __packed;
1933f752dcd5SAvinash Patil 
1934f752dcd5SAvinash Patil struct host_cmd_tlv_gwk_cipher {
19356b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1936f752dcd5SAvinash Patil 	u8 cipher;
1937f752dcd5SAvinash Patil 	u8 reserved;
1938f752dcd5SAvinash Patil } __packed;
1939f752dcd5SAvinash Patil 
1940f752dcd5SAvinash Patil struct host_cmd_tlv_passphrase {
19416b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1942f752dcd5SAvinash Patil 	u8 passphrase[0];
1943f752dcd5SAvinash Patil } __packed;
1944f752dcd5SAvinash Patil 
194596893538SAvinash Patil struct host_cmd_tlv_wep_key {
19466b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
194796893538SAvinash Patil 	u8 key_index;
194896893538SAvinash Patil 	u8 is_default;
194996893538SAvinash Patil 	u8 key[1];
195096893538SAvinash Patil };
195196893538SAvinash Patil 
1952f752dcd5SAvinash Patil struct host_cmd_tlv_auth_type {
19536b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1954f752dcd5SAvinash Patil 	u8 auth_type;
1955f752dcd5SAvinash Patil } __packed;
1956f752dcd5SAvinash Patil 
1957f752dcd5SAvinash Patil struct host_cmd_tlv_encrypt_protocol {
19586b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1959f752dcd5SAvinash Patil 	__le16 proto;
1960f752dcd5SAvinash Patil } __packed;
1961f752dcd5SAvinash Patil 
196212190c5dSAvinash Patil struct host_cmd_tlv_ssid {
19636b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
196412190c5dSAvinash Patil 	u8 ssid[0];
196512190c5dSAvinash Patil } __packed;
196612190c5dSAvinash Patil 
1967a3c2c4f6SAvinash Patil struct host_cmd_tlv_rates {
19686b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1969a3c2c4f6SAvinash Patil 	u8 rates[0];
1970a3c2c4f6SAvinash Patil } __packed;
1971a3c2c4f6SAvinash Patil 
197221f58d20SAmitkumar Karwar struct mwifiex_ie_types_bssid_list {
197321f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
197421f58d20SAmitkumar Karwar 	u8 bssid[ETH_ALEN];
197521f58d20SAmitkumar Karwar } __packed;
197621f58d20SAmitkumar Karwar 
1977605b73afSAvinash Patil struct host_cmd_tlv_bcast_ssid {
19786b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1979605b73afSAvinash Patil 	u8 bcast_ctl;
1980605b73afSAvinash Patil } __packed;
1981605b73afSAvinash Patil 
198212190c5dSAvinash Patil struct host_cmd_tlv_beacon_period {
19836b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
198412190c5dSAvinash Patil 	__le16 period;
198512190c5dSAvinash Patil } __packed;
198612190c5dSAvinash Patil 
198712190c5dSAvinash Patil struct host_cmd_tlv_dtim_period {
19886b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
198912190c5dSAvinash Patil 	u8 period;
199012190c5dSAvinash Patil } __packed;
19914db16a18SAvinash Patil 
19929b930eaeSAvinash Patil struct host_cmd_tlv_frag_threshold {
19936b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19949b930eaeSAvinash Patil 	__le16 frag_thr;
19959b930eaeSAvinash Patil } __packed;
19969b930eaeSAvinash Patil 
19979b930eaeSAvinash Patil struct host_cmd_tlv_rts_threshold {
19986b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19999b930eaeSAvinash Patil 	__le16 rts_thr;
20009b930eaeSAvinash Patil } __packed;
20019b930eaeSAvinash Patil 
20029b930eaeSAvinash Patil struct host_cmd_tlv_retry_limit {
20036b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
20049b930eaeSAvinash Patil 	u8 limit;
20059b930eaeSAvinash Patil } __packed;
20069b930eaeSAvinash Patil 
200775edd2c6SAvinash Patil struct host_cmd_tlv_mac_addr {
20086b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
200975edd2c6SAvinash Patil 	u8 mac_addr[ETH_ALEN];
201075edd2c6SAvinash Patil } __packed;
201175edd2c6SAvinash Patil 
20124db16a18SAvinash Patil struct host_cmd_tlv_channel_band {
20136b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
20144db16a18SAvinash Patil 	u8 band_config;
20154db16a18SAvinash Patil 	u8 channel;
20164db16a18SAvinash Patil } __packed;
20174db16a18SAvinash Patil 
20188b4509f6SKevin Gan struct host_cmd_tlv_ageout_timer {
20196b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
20208b4509f6SKevin Gan 	__le32 sta_ao_timer;
20218b4509f6SKevin Gan } __packed;
20228b4509f6SKevin Gan 
20238a73dd63SAvinash Patil struct host_cmd_tlv_power_constraint {
20248a73dd63SAvinash Patil 	struct mwifiex_ie_types_header header;
20258a73dd63SAvinash Patil 	u8 constraint;
20268a73dd63SAvinash Patil } __packed;
20278a73dd63SAvinash Patil 
2028d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_scan_time {
2029d219b7ebSChunfan Chen 	struct mwifiex_ie_types_header header;
2030d219b7ebSChunfan Chen 	u8 coex_scan;
2031d219b7ebSChunfan Chen 	u8 reserved;
2032c18b104dSPrasun Maiti 	__le16 min_scan_time;
2033c18b104dSPrasun Maiti 	__le16 max_scan_time;
2034d219b7ebSChunfan Chen } __packed;
2035d219b7ebSChunfan Chen 
2036d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_aggr_win_size {
2037d219b7ebSChunfan Chen 	struct mwifiex_ie_types_header header;
2038d219b7ebSChunfan Chen 	u8 coex_win_size;
2039d219b7ebSChunfan Chen 	u8 tx_win_size;
2040d219b7ebSChunfan Chen 	u8 rx_win_size;
2041d219b7ebSChunfan Chen 	u8 reserved;
2042d219b7ebSChunfan Chen } __packed;
2043d219b7ebSChunfan Chen 
204446dbe247SAmitkumar Karwar struct mwifiex_ie_types_robust_coex {
204546dbe247SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
204646dbe247SAmitkumar Karwar 	__le32 mode;
204746dbe247SAmitkumar Karwar } __packed;
204846dbe247SAmitkumar Karwar 
20495e6e3a92SBing Zhao struct host_cmd_ds_version_ext {
20505e6e3a92SBing Zhao 	u8 version_str_sel;
20515e6e3a92SBing Zhao 	char version_str[128];
20525e6e3a92SBing Zhao } __packed;
20535e6e3a92SBing Zhao 
20543cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg {
20553cec6870SStone Piao 	__le16 action;
20563cec6870SStone Piao 	__le32 mask;
20573cec6870SStone Piao } __packed;
20583cec6870SStone Piao 
2059e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg {
2060e1a2b7a3SStone Piao 	__le16 action;
2061e1a2b7a3SStone Piao 	__le16 mode;
2062e1a2b7a3SStone Piao } __packed;
2063e1a2b7a3SStone Piao 
20647feb4c48SStone Piao struct host_cmd_ds_remain_on_chan {
20657feb4c48SStone Piao 	__le16 action;
20667feb4c48SStone Piao 	u8 status;
20677feb4c48SStone Piao 	u8 reserved;
20687feb4c48SStone Piao 	u8 band_cfg;
20697feb4c48SStone Piao 	u8 channel;
20707feb4c48SStone Piao 	__le32 duration;
20717feb4c48SStone Piao } __packed;
20727feb4c48SStone Piao 
20735e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status {
20745e6e3a92SBing Zhao 	__le16 action;
20755e6e3a92SBing Zhao 	__le16 enable;
20765e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
20775e6e3a92SBing Zhao 	__le16 beacon_interval;
20785e6e3a92SBing Zhao 	__le16 atim_window;
20795e6e3a92SBing Zhao 	__le16 use_g_rate_protect;
20805e6e3a92SBing Zhao } __packed;
20815e6e3a92SBing Zhao 
20827da060c1SAmitkumar Karwar struct mwifiex_fw_mef_entry {
20837da060c1SAmitkumar Karwar 	u8 mode;
20847da060c1SAmitkumar Karwar 	u8 action;
20857da060c1SAmitkumar Karwar 	__le16 exprsize;
20867da060c1SAmitkumar Karwar 	u8 expr[0];
20877da060c1SAmitkumar Karwar } __packed;
20887da060c1SAmitkumar Karwar 
20897da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg {
20907da060c1SAmitkumar Karwar 	__le32 criteria;
20917da060c1SAmitkumar Karwar 	__le16 num_entries;
20927da060c1SAmitkumar Karwar 	struct mwifiex_fw_mef_entry mef_entry[0];
20937da060c1SAmitkumar Karwar } __packed;
20947da060c1SAmitkumar Karwar 
20955e6e3a92SBing Zhao #define CONNECTION_TYPE_INFRA   0
20965e6e3a92SBing Zhao #define CONNECTION_TYPE_ADHOC   1
20979197ab9eSStone Piao #define CONNECTION_TYPE_AP      2
20985e6e3a92SBing Zhao 
20995e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode {
21005e6e3a92SBing Zhao 	u8 con_type;
21015e6e3a92SBing Zhao } __packed;
21025e6e3a92SBing Zhao 
2103d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details {
2104d930faeeSAmitkumar Karwar 	/* TX buffer descriptor ring address */
2105902831a7SKarthik D A 	__le32 txbd_addr_lo;
2106902831a7SKarthik D A 	__le32 txbd_addr_hi;
2107d930faeeSAmitkumar Karwar 	/* TX buffer descriptor ring count */
2108902831a7SKarthik D A 	__le32 txbd_count;
2109d930faeeSAmitkumar Karwar 
2110d930faeeSAmitkumar Karwar 	/* RX buffer descriptor ring address */
2111902831a7SKarthik D A 	__le32 rxbd_addr_lo;
2112902831a7SKarthik D A 	__le32 rxbd_addr_hi;
2113d930faeeSAmitkumar Karwar 	/* RX buffer descriptor ring count */
2114902831a7SKarthik D A 	__le32 rxbd_count;
2115d930faeeSAmitkumar Karwar 
2116d930faeeSAmitkumar Karwar 	/* Event buffer descriptor ring address */
2117902831a7SKarthik D A 	__le32 evtbd_addr_lo;
2118902831a7SKarthik D A 	__le32 evtbd_addr_hi;
2119d930faeeSAmitkumar Karwar 	/* Event buffer descriptor ring count */
2120902831a7SKarthik D A 	__le32 evtbd_count;
2121d930faeeSAmitkumar Karwar 
2122d930faeeSAmitkumar Karwar 	/* Sleep cookie buffer physical address */
2123902831a7SKarthik D A 	__le32 sleep_cookie_addr_lo;
2124902831a7SKarthik D A 	__le32 sleep_cookie_addr_hi;
2125d930faeeSAmitkumar Karwar } __packed;
2126d930faeeSAmitkumar Karwar 
2127fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_rssi_threshold {
2128fa444bf8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
2129fa444bf8SAmitkumar Karwar 	u8 abs_value;
2130fa444bf8SAmitkumar Karwar 	u8 evt_freq;
2131fa444bf8SAmitkumar Karwar } __packed;
2132fa444bf8SAmitkumar Karwar 
21333b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_LEN		8
21343b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_NUM		10
21353b57c1a7SAvinash Patil #define MWIFIEX_BIN_COUNTER_LEN		7
21363b57c1a7SAvinash Patil 
21373b57c1a7SAvinash Patil struct mwifiex_radar_det_event {
21383b57c1a7SAvinash Patil 	__le32 detect_count;
21393b57c1a7SAvinash Patil 	u8 reg_domain;  /*1=fcc, 2=etsi, 3=mic*/
21403b57c1a7SAvinash Patil 	u8 det_type;  /*0=none, 1=pw(chirp), 2=pri(radar)*/
21413b57c1a7SAvinash Patil 	__le16 pw_chirp_type;
21423b57c1a7SAvinash Patil 	u8 pw_chirp_idx;
21433b57c1a7SAvinash Patil 	u8 pw_value;
21443b57c1a7SAvinash Patil 	u8 pri_radar_type;
21453b57c1a7SAvinash Patil 	u8 pri_bincnt;
21463b57c1a7SAvinash Patil 	u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN];
21473b57c1a7SAvinash Patil 	u8 num_dfs_records;
21483b57c1a7SAvinash Patil 	u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN];
21493b57c1a7SAvinash Patil 	__le32 passed;
21503b57c1a7SAvinash Patil } __packed;
21513b57c1a7SAvinash Patil 
21528d6b538aSAvinash Patil struct mwifiex_ie_types_multi_chan_info {
21538d6b538aSAvinash Patil 	struct mwifiex_ie_types_header header;
21548d6b538aSAvinash Patil 	__le16 status;
21558d6b538aSAvinash Patil 	u8 tlv_buffer[0];
21568d6b538aSAvinash Patil } __packed;
21578d6b538aSAvinash Patil 
21582b0f997dSZhaoyang Liu struct mwifiex_ie_types_mc_group_info {
21592b0f997dSZhaoyang Liu 	struct mwifiex_ie_types_header header;
21602b0f997dSZhaoyang Liu 	u8 chan_group_id;
21612b0f997dSZhaoyang Liu 	u8 chan_buf_weight;
21622b0f997dSZhaoyang Liu 	u8 band_config;
21632b0f997dSZhaoyang Liu 	u8 chan_num;
2164902831a7SKarthik D A 	__le32 chan_time;
2165902831a7SKarthik D A 	__le32 reserved;
21662b0f997dSZhaoyang Liu 	union {
21672b0f997dSZhaoyang Liu 		u8 sdio_func_num;
21682b0f997dSZhaoyang Liu 		u8 usb_ep_num;
21692b0f997dSZhaoyang Liu 	} hid_num;
21702b0f997dSZhaoyang Liu 	u8 intf_num;
21712b0f997dSZhaoyang Liu 	u8 bss_type_numlist[0];
21722b0f997dSZhaoyang Liu } __packed;
21732b0f997dSZhaoyang Liu 
21740a694d68SAvinash Patil struct meas_rpt_map {
21750a694d68SAvinash Patil 	u8 rssi:3;
21760a694d68SAvinash Patil 	u8 unmeasured:1;
21770a694d68SAvinash Patil 	u8 radar:1;
21780a694d68SAvinash Patil 	u8 unidentified_sig:1;
21790a694d68SAvinash Patil 	u8 ofdm_preamble:1;
21800a694d68SAvinash Patil 	u8 bss:1;
21810a694d68SAvinash Patil } __packed;
21820a694d68SAvinash Patil 
21830a694d68SAvinash Patil struct mwifiex_ie_types_chan_rpt_data {
21840a694d68SAvinash Patil 	struct mwifiex_ie_types_header header;
21850a694d68SAvinash Patil 	struct meas_rpt_map map;
21860a694d68SAvinash Patil } __packed;
21870a694d68SAvinash Patil 
2188fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt {
2189fa444bf8SAmitkumar Karwar 	__le16 action;
2190fa444bf8SAmitkumar Karwar 	__le16 events;
2191fa444bf8SAmitkumar Karwar } __packed;
2192fa444bf8SAmitkumar Karwar 
2193f7669877SXinming Hu struct chan_switch_result {
2194f7669877SXinming Hu 	u8 cur_chan;
2195f7669877SXinming Hu 	u8 status;
2196f7669877SXinming Hu 	u8 reason;
2197f7669877SXinming Hu } __packed;
2198f7669877SXinming Hu 
219979ff4346SAvinash Patil struct mwifiex_tdls_generic_event {
220079ff4346SAvinash Patil 	__le16 type;
220179ff4346SAvinash Patil 	u8 peer_mac[ETH_ALEN];
220279ff4346SAvinash Patil 	union {
2203f7669877SXinming Hu 		struct chan_switch_result switch_result;
2204f7669877SXinming Hu 		u8 cs_stop_reason;
220579ff4346SAvinash Patil 		__le16 reason_code;
220679ff4346SAvinash Patil 		__le16 reserved;
220779ff4346SAvinash Patil 	} u;
220879ff4346SAvinash Patil } __packed;
220979ff4346SAvinash Patil 
2210ede98bfaSAvinash Patil struct mwifiex_ie {
2211ede98bfaSAvinash Patil 	__le16 ie_index;
2212ede98bfaSAvinash Patil 	__le16 mgmt_subtype_mask;
2213ede98bfaSAvinash Patil 	__le16 ie_length;
2214ede98bfaSAvinash Patil 	u8 ie_buffer[IEEE_MAX_IE_SIZE];
2215ede98bfaSAvinash Patil } __packed;
2216ede98bfaSAvinash Patil 
2217ede98bfaSAvinash Patil #define MAX_MGMT_IE_INDEX	16
2218ede98bfaSAvinash Patil struct mwifiex_ie_list {
2219ede98bfaSAvinash Patil 	__le16 type;
2220ede98bfaSAvinash Patil 	__le16 len;
2221ede98bfaSAvinash Patil 	struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
2222ede98bfaSAvinash Patil } __packed;
2223ede98bfaSAvinash Patil 
2224562fc5b3SAmitkumar Karwar struct coalesce_filt_field_param {
2225562fc5b3SAmitkumar Karwar 	u8 operation;
2226562fc5b3SAmitkumar Karwar 	u8 operand_len;
2227562fc5b3SAmitkumar Karwar 	__le16 offset;
2228562fc5b3SAmitkumar Karwar 	u8 operand_byte_stream[4];
2229562fc5b3SAmitkumar Karwar };
2230562fc5b3SAmitkumar Karwar 
2231562fc5b3SAmitkumar Karwar struct coalesce_receive_filt_rule {
2232562fc5b3SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
2233562fc5b3SAmitkumar Karwar 	u8 num_of_fields;
2234562fc5b3SAmitkumar Karwar 	u8 pkt_type;
2235562fc5b3SAmitkumar Karwar 	__le16 max_coalescing_delay;
2236562fc5b3SAmitkumar Karwar 	struct coalesce_filt_field_param params[0];
2237562fc5b3SAmitkumar Karwar } __packed;
2238562fc5b3SAmitkumar Karwar 
2239562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg {
2240562fc5b3SAmitkumar Karwar 	__le16 action;
2241562fc5b3SAmitkumar Karwar 	__le16 num_of_rules;
2242562fc5b3SAmitkumar Karwar 	struct coalesce_receive_filt_rule rule[0];
2243562fc5b3SAmitkumar Karwar } __packed;
2244562fc5b3SAmitkumar Karwar 
2245d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy {
2246d5b036c4SAvinash Patil 	__le16 action;
2247d5b036c4SAvinash Patil 	__le16 policy;
2248d5b036c4SAvinash Patil } __packed;
2249d5b036c4SAvinash Patil 
225046dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex {
225146dbe247SAmitkumar Karwar 	__le16 action;
225246dbe247SAmitkumar Karwar 	__le16 reserved;
225346dbe247SAmitkumar Karwar } __packed;
225446dbe247SAmitkumar Karwar 
22558de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason {
2256902831a7SKarthik D A 	__le16  wakeup_reason;
22578de00f1bSchunfan chen } __packed;
22588de00f1bSchunfan chen 
2259f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params {
2260f6b1cbe0SGanapathi Bhat 	__le16 action;
2261f6b1cbe0SGanapathi Bhat 	u8 kck[NL80211_KCK_LEN];
2262f6b1cbe0SGanapathi Bhat 	u8 kek[NL80211_KEK_LEN];
2263f6b1cbe0SGanapathi Bhat 	__le32 replay_ctr_low;
2264f6b1cbe0SGanapathi Bhat 	__le32 replay_ctr_high;
2265f6b1cbe0SGanapathi Bhat } __packed;
2266f6b1cbe0SGanapathi Bhat 
226741960b4dSAmitkumar Karwar struct host_cmd_ds_chan_region_cfg {
226841960b4dSAmitkumar Karwar 	__le16 action;
226941960b4dSAmitkumar Karwar } __packed;
227041960b4dSAmitkumar Karwar 
22715e6e3a92SBing Zhao struct host_cmd_ds_command {
22725e6e3a92SBing Zhao 	__le16 command;
22735e6e3a92SBing Zhao 	__le16 size;
22745e6e3a92SBing Zhao 	__le16 seq_num;
22755e6e3a92SBing Zhao 	__le16 result;
22765e6e3a92SBing Zhao 	union {
22775e6e3a92SBing Zhao 		struct host_cmd_ds_get_hw_spec hw_spec;
22785e6e3a92SBing Zhao 		struct host_cmd_ds_mac_control mac_ctrl;
22795e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_mac_address mac_addr;
22805e6e3a92SBing Zhao 		struct host_cmd_ds_mac_multicast_adr mc_addr;
22815e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_get_log get_log;
22825e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_rssi_info rssi_info;
22835e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
22845e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_snmp_mib smib;
22855e6e3a92SBing Zhao 		struct host_cmd_ds_tx_rate_query tx_rate;
22865e6e3a92SBing Zhao 		struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
22875e6e3a92SBing Zhao 		struct host_cmd_ds_txpwr_cfg txp_cfg;
2288caa8984fSAmitkumar Karwar 		struct host_cmd_ds_rf_tx_pwr txp;
22898a279d5bSAmitkumar Karwar 		struct host_cmd_ds_rf_ant_mimo ant_mimo;
22908a279d5bSAmitkumar Karwar 		struct host_cmd_ds_rf_ant_siso ant_siso;
22915e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
22925e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
22935e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_scan scan;
229421f58d20SAmitkumar Karwar 		struct host_cmd_ds_802_11_scan_ext ext_scan;
22955e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_scan_rsp scan_resp;
22960c9b7f22SXinming Hu 		struct host_cmd_ds_802_11_bg_scan_config bg_scan_config;
22975e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
22985e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
22995e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_associate associate;
23005e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_associate_rsp associate_rsp;
23015e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_deauthenticate deauth;
23025e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
2303d5556e87SAmitkumar Karwar 		struct host_cmd_ds_802_11_ad_hoc_start_result start_result;
2304d5556e87SAmitkumar Karwar 		struct host_cmd_ds_802_11_ad_hoc_join_result join_result;
23055e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
23065e6e3a92SBing Zhao 		struct host_cmd_ds_802_11d_domain_info domain_info;
23075e6e3a92SBing Zhao 		struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
23085e6e3a92SBing Zhao 		struct host_cmd_ds_11n_addba_req add_ba_req;
23095e6e3a92SBing Zhao 		struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
23105e6e3a92SBing Zhao 		struct host_cmd_ds_11n_delba del_ba;
23115e6e3a92SBing Zhao 		struct host_cmd_ds_txbuf_cfg tx_buf;
23125e6e3a92SBing Zhao 		struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
23135e6e3a92SBing Zhao 		struct host_cmd_ds_11n_cfg htcfg;
23145e6e3a92SBing Zhao 		struct host_cmd_ds_wmm_get_status get_wmm_status;
23155e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_key_material key_material;
2316e57f1734SAvinash Patil 		struct host_cmd_ds_802_11_key_material_v2 key_material_v2;
23175e6e3a92SBing Zhao 		struct host_cmd_ds_version_ext verext;
23183cec6870SStone Piao 		struct host_cmd_ds_mgmt_frame_reg reg_mask;
23197feb4c48SStone Piao 		struct host_cmd_ds_remain_on_chan roc_cfg;
2320e1a2b7a3SStone Piao 		struct host_cmd_ds_p2p_mode_cfg mode_cfg;
23215e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
23227da060c1SAmitkumar Karwar 		struct host_cmd_ds_mef_cfg mef_cfg;
2323c2c6c85fSChin-ran Lo 		struct host_cmd_ds_mem_access mem;
23245e6e3a92SBing Zhao 		struct host_cmd_ds_mac_reg_access mac_reg;
23255e6e3a92SBing Zhao 		struct host_cmd_ds_bbp_reg_access bbp_reg;
23265e6e3a92SBing Zhao 		struct host_cmd_ds_rf_reg_access rf_reg;
23275e6e3a92SBing Zhao 		struct host_cmd_ds_pmic_reg_access pmic_reg;
23285e6e3a92SBing Zhao 		struct host_cmd_ds_set_bss_mode bss_mode;
2329d930faeeSAmitkumar Karwar 		struct host_cmd_ds_pcie_details pcie_host_spec;
23305e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_eeprom_access eeprom;
2331fa444bf8SAmitkumar Karwar 		struct host_cmd_ds_802_11_subsc_evt subsc_evt;
23324db16a18SAvinash Patil 		struct host_cmd_ds_sys_config uap_sys_config;
23330f9e9b8bSAvinash Patil 		struct host_cmd_ds_sta_deauth sta_deauth;
2334b21783e9SXinming Hu 		struct host_cmd_ds_sta_list sta_list;
233583c78da9SYogesh Ashok Powar 		struct host_cmd_11ac_vht_cfg vht_cfg;
2336562fc5b3SAmitkumar Karwar 		struct host_cmd_ds_coalesce_cfg coalesce_cfg;
2337449b8bbfSXinming Hu 		struct host_cmd_ds_tdls_config tdls_config;
2338429d90d2SAvinash Patil 		struct host_cmd_ds_tdls_oper tdls_oper;
233985afb186SAvinash Patil 		struct host_cmd_ds_chan_rpt_req chan_rpt_req;
234092263a84SZhaoyang Liu 		struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg;
2341d5b036c4SAvinash Patil 		struct host_cmd_ds_multi_chan_policy mc_policy;
234246dbe247SAmitkumar Karwar 		struct host_cmd_ds_robust_coex coex;
23438de00f1bSchunfan chen 		struct host_cmd_ds_wakeup_reason hs_wakeup_reason;
2344f6b1cbe0SGanapathi Bhat 		struct host_cmd_ds_gtk_rekey_params rekey;
234541960b4dSAmitkumar Karwar 		struct host_cmd_ds_chan_region_cfg reg_cfg;
23465e6e3a92SBing Zhao 	} params;
23475e6e3a92SBing Zhao } __packed;
23485e6e3a92SBing Zhao 
23495e6e3a92SBing Zhao struct mwifiex_opt_sleep_confirm {
23505e6e3a92SBing Zhao 	__le16 command;
23515e6e3a92SBing Zhao 	__le16 size;
23525e6e3a92SBing Zhao 	__le16 seq_num;
23535e6e3a92SBing Zhao 	__le16 result;
23545e6e3a92SBing Zhao 	__le16 action;
23552b06bdbeSMarc Yang 	__le16 resp_ctrl;
23565e6e3a92SBing Zhao } __packed;
23575e6e3a92SBing Zhao #endif /* !_MWIFIEX_FW_H_ */
2358