xref: /linux/drivers/net/wireless/marvell/mwifiex/fw.h (revision 3ee712857958c27f697b33fa520fdc51e7ffea88)
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;
345e6e3a92SBing Zhao };
355e6e3a92SBing Zhao 
365e6e3a92SBing Zhao struct rx_packet_hdr {
375e6e3a92SBing Zhao 	struct ethhdr eth803_hdr;
385e6e3a92SBing Zhao 	struct rfc_1042_hdr rfc1042_hdr;
395e6e3a92SBing Zhao };
405e6e3a92SBing Zhao 
415e6e3a92SBing Zhao struct tx_packet_hdr {
425e6e3a92SBing Zhao 	struct ethhdr eth803_hdr;
435e6e3a92SBing Zhao 	struct rfc_1042_hdr rfc1042_hdr;
445e6e3a92SBing Zhao };
455e6e3a92SBing Zhao 
465e6e3a92SBing Zhao #define B_SUPPORTED_RATES               5
475e6e3a92SBing Zhao #define G_SUPPORTED_RATES               9
485e6e3a92SBing Zhao #define BG_SUPPORTED_RATES              13
495e6e3a92SBing Zhao #define A_SUPPORTED_RATES               9
505e6e3a92SBing Zhao #define HOSTCMD_SUPPORTED_RATES         14
515e6e3a92SBing Zhao #define N_SUPPORTED_RATES               3
52a5f39056SYogesh Ashok Powar #define ALL_802_11_BANDS           (BAND_A | BAND_B | BAND_G | BAND_GN | \
53f25b1431SBing Zhao 				    BAND_AN | BAND_AAC)
545e6e3a92SBing Zhao 
55a5f39056SYogesh Ashok Powar #define FW_MULTI_BANDS_SUPPORT  (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
56f25b1431SBing Zhao 				 BIT(13))
575e6e3a92SBing Zhao #define IS_SUPPORT_MULTI_BANDS(adapter)        \
585e6e3a92SBing Zhao 	(adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
59a5f39056SYogesh Ashok Powar 
60f25b1431SBing Zhao /* bit 13: 11ac BAND_AAC
61f25b1431SBing Zhao  * bit 12: reserved for lab testing, will be reused for BAND_AN
62f25b1431SBing Zhao  * bit 11: 11n  BAND_GN
63f25b1431SBing Zhao  * bit 10: 11a  BAND_A
64f25b1431SBing Zhao  * bit 9: 11g   BAND_G
65f25b1431SBing Zhao  * bit 8: 11b   BAND_B
66f25b1431SBing Zhao  * Map these bits to band capability by right shifting 8 bits.
67a5f39056SYogesh Ashok Powar  */
685e6e3a92SBing Zhao #define GET_FW_DEFAULT_BANDS(adapter)  \
69f25b1431SBing Zhao 	    (((adapter->fw_cap_info & 0x2f00) >> 8) & \
70a5f39056SYogesh Ashok Powar 	     ALL_802_11_BANDS)
715e6e3a92SBing Zhao 
725e6e3a92SBing Zhao #define HostCmd_WEP_KEY_INDEX_MASK              0x3fff
735e6e3a92SBing Zhao 
745e6e3a92SBing Zhao #define KEY_INFO_ENABLED        0x01
755e6e3a92SBing Zhao enum KEY_TYPE_ID {
765e6e3a92SBing Zhao 	KEY_TYPE_ID_WEP = 0,
775e6e3a92SBing Zhao 	KEY_TYPE_ID_TKIP,
785e6e3a92SBing Zhao 	KEY_TYPE_ID_AES,
795e6e3a92SBing Zhao 	KEY_TYPE_ID_WAPI,
80b877f4cfSYing Luo 	KEY_TYPE_ID_AES_CMAC,
815e6e3a92SBing Zhao };
82e57f1734SAvinash Patil 
83e57f1734SAvinash Patil #define WPA_PN_SIZE		8
84e57f1734SAvinash Patil #define KEY_PARAMS_FIXED_LEN	10
85e57f1734SAvinash Patil #define KEY_INDEX_MASK		0xf
864b9fede5SAmitkumar Karwar #define KEY_API_VER_MAJOR_V2	2
87e57f1734SAvinash Patil 
886a35a0acSYogesh Ashok Powar #define KEY_MCAST	BIT(0)
896a35a0acSYogesh Ashok Powar #define KEY_UNICAST	BIT(1)
906a35a0acSYogesh Ashok Powar #define KEY_ENABLED	BIT(2)
91e57f1734SAvinash Patil #define KEY_DEFAULT	BIT(3)
92e57f1734SAvinash Patil #define KEY_TX_KEY	BIT(4)
93e57f1734SAvinash Patil #define KEY_RX_KEY	BIT(5)
94b877f4cfSYing Luo #define KEY_IGTK	BIT(10)
955e6e3a92SBing Zhao 
96e57f1734SAvinash Patil #define WAPI_KEY_LEN			(WLAN_KEY_LEN_SMS4 + PN_LEN + 2)
975e6e3a92SBing Zhao 
985e6e3a92SBing Zhao #define MAX_POLL_TRIES			100
992fd5c6edSchunfan chen #define MAX_FIRMWARE_POLL_TRIES			150
1005e6e3a92SBing Zhao 
101d930faeeSAmitkumar Karwar #define FIRMWARE_READY_SDIO				0xfedc
102d930faeeSAmitkumar Karwar #define FIRMWARE_READY_PCIE				0xfedcba00
1035e6e3a92SBing Zhao 
10446dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_TIMESHARE			0x01
10546dbe247SAmitkumar Karwar #define MWIFIEX_COEX_MODE_SPATIAL			0x82
10646dbe247SAmitkumar Karwar 
1074daffe35SAmitkumar Karwar enum mwifiex_usb_ep {
1084daffe35SAmitkumar Karwar 	MWIFIEX_USB_EP_CMD_EVENT = 1,
1094daffe35SAmitkumar Karwar 	MWIFIEX_USB_EP_DATA = 2,
1102b0f997dSZhaoyang Liu 	MWIFIEX_USB_EP_DATA_CH2 = 3,
1114daffe35SAmitkumar Karwar };
1124daffe35SAmitkumar Karwar 
1135e6e3a92SBing Zhao enum MWIFIEX_802_11_PRIVACY_FILTER {
1145e6e3a92SBing Zhao 	MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
1155e6e3a92SBing Zhao 	MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
1165e6e3a92SBing Zhao };
1175e6e3a92SBing Zhao 
1185e6e3a92SBing Zhao #define CAL_SNR(RSSI, NF)		((s16)((s16)(RSSI)-(s16)(NF)))
1192dbaf751SStone Piao #define CAL_RSSI(SNR, NF)		((s16)((s16)(SNR)+(s16)(NF)))
1205e6e3a92SBing Zhao 
121e76268daSAvinash Patil #define UAP_BSS_PARAMS_I			0
122ede98bfaSAvinash Patil #define UAP_CUSTOM_IE_I				1
123ede98bfaSAvinash Patil #define MWIFIEX_AUTO_IDX_MASK			0xffff
124ede98bfaSAvinash Patil #define MWIFIEX_DELETE_MASK			0x0000
125f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_REQ			0x01
126f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_REQ			0x04
127f31acabeSAvinash Patil #define MGMT_MASK_ASSOC_RESP			0x02
128f31acabeSAvinash Patil #define MGMT_MASK_REASSOC_RESP			0x08
129f31acabeSAvinash Patil #define MGMT_MASK_PROBE_REQ			0x10
130f31acabeSAvinash Patil #define MGMT_MASK_PROBE_RESP			0x20
131f31acabeSAvinash Patil #define MGMT_MASK_BEACON			0x100
132e76268daSAvinash Patil 
13312190c5dSAvinash Patil #define TLV_TYPE_UAP_SSID			0x0000
134a3c2c4f6SAvinash Patil #define TLV_TYPE_UAP_RATES			0x0001
1358a73dd63SAvinash Patil #define TLV_TYPE_PWR_CONSTRAINT			0x0020
13612190c5dSAvinash Patil 
1375e6e3a92SBing Zhao #define PROPRIETARY_TLV_BASE_ID                 0x0100
1385e6e3a92SBing Zhao #define TLV_TYPE_KEY_MATERIAL       (PROPRIETARY_TLV_BASE_ID + 0)
1395e6e3a92SBing Zhao #define TLV_TYPE_CHANLIST           (PROPRIETARY_TLV_BASE_ID + 1)
1405e6e3a92SBing Zhao #define TLV_TYPE_NUMPROBES          (PROPRIETARY_TLV_BASE_ID + 2)
141fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_LOW           (PROPRIETARY_TLV_BASE_ID + 4)
1425e6e3a92SBing Zhao #define TLV_TYPE_PASSTHROUGH        (PROPRIETARY_TLV_BASE_ID + 10)
1435e6e3a92SBing Zhao #define TLV_TYPE_WMMQSTATUS         (PROPRIETARY_TLV_BASE_ID + 16)
1445e6e3a92SBing Zhao #define TLV_TYPE_WILDCARDSSID       (PROPRIETARY_TLV_BASE_ID + 18)
1455e6e3a92SBing Zhao #define TLV_TYPE_TSFTIMESTAMP       (PROPRIETARY_TLV_BASE_ID + 19)
146fa444bf8SAmitkumar Karwar #define TLV_TYPE_RSSI_HIGH          (PROPRIETARY_TLV_BASE_ID + 22)
1470c9b7f22SXinming Hu #define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30)
1485e6e3a92SBing Zhao #define TLV_TYPE_AUTH_TYPE          (PROPRIETARY_TLV_BASE_ID + 31)
14975edd2c6SAvinash Patil #define TLV_TYPE_STA_MAC_ADDR       (PROPRIETARY_TLV_BASE_ID + 32)
15021f58d20SAmitkumar Karwar #define TLV_TYPE_BSSID              (PROPRIETARY_TLV_BASE_ID + 35)
1515e6e3a92SBing Zhao #define TLV_TYPE_CHANNELBANDLIST    (PROPRIETARY_TLV_BASE_ID + 42)
15212190c5dSAvinash Patil #define TLV_TYPE_UAP_BEACON_PERIOD  (PROPRIETARY_TLV_BASE_ID + 44)
15312190c5dSAvinash Patil #define TLV_TYPE_UAP_DTIM_PERIOD    (PROPRIETARY_TLV_BASE_ID + 45)
154605b73afSAvinash Patil #define TLV_TYPE_UAP_BCAST_SSID     (PROPRIETARY_TLV_BASE_ID + 48)
1559b930eaeSAvinash Patil #define TLV_TYPE_UAP_RTS_THRESHOLD  (PROPRIETARY_TLV_BASE_ID + 51)
1568b4509f6SKevin Gan #define TLV_TYPE_UAP_AO_TIMER       (PROPRIETARY_TLV_BASE_ID + 57)
15796893538SAvinash Patil #define TLV_TYPE_UAP_WEP_KEY        (PROPRIETARY_TLV_BASE_ID + 59)
158f752dcd5SAvinash Patil #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
159f752dcd5SAvinash Patil #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
160f752dcd5SAvinash Patil #define TLV_TYPE_UAP_AKMP           (PROPRIETARY_TLV_BASE_ID + 65)
1619b930eaeSAvinash Patil #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
1622b06bdbeSMarc Yang #define TLV_TYPE_RATE_DROP_CONTROL  (PROPRIETARY_TLV_BASE_ID + 82)
1632b06bdbeSMarc Yang #define TLV_TYPE_RATE_SCOPE         (PROPRIETARY_TLV_BASE_ID + 83)
1642b06bdbeSMarc Yang #define TLV_TYPE_POWER_GROUP        (PROPRIETARY_TLV_BASE_ID + 84)
16521f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_RSP       (PROPRIETARY_TLV_BASE_ID + 86)
16621f58d20SAmitkumar Karwar #define TLV_TYPE_BSS_SCAN_INFO      (PROPRIETARY_TLV_BASE_ID + 87)
1670a694d68SAvinash Patil #define TLV_TYPE_CHANRPT_11H_BASIC  (PROPRIETARY_TLV_BASE_ID + 91)
1689b930eaeSAvinash Patil #define TLV_TYPE_UAP_RETRY_LIMIT    (PROPRIETARY_TLV_BASE_ID + 93)
1695e6e3a92SBing Zhao #define TLV_TYPE_WAPI_IE            (PROPRIETARY_TLV_BASE_ID + 94)
17046dbe247SAmitkumar Karwar #define TLV_TYPE_ROBUST_COEX        (PROPRIETARY_TLV_BASE_ID + 96)
171e568634aSAvinash Patil #define TLV_TYPE_UAP_MGMT_FRAME     (PROPRIETARY_TLV_BASE_ID + 104)
17213d7ba78SAvinash Patil #define TLV_TYPE_MGMT_IE            (PROPRIETARY_TLV_BASE_ID + 105)
1732b06bdbeSMarc Yang #define TLV_TYPE_AUTO_DS_PARAM      (PROPRIETARY_TLV_BASE_ID + 113)
1742b06bdbeSMarc Yang #define TLV_TYPE_PS_PARAM           (PROPRIETARY_TLV_BASE_ID + 114)
1758b4509f6SKevin Gan #define TLV_TYPE_UAP_PS_AO_TIMER    (PROPRIETARY_TLV_BASE_ID + 123)
176f752dcd5SAvinash Patil #define TLV_TYPE_PWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 145)
177f752dcd5SAvinash Patil #define TLV_TYPE_GWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 146)
1784e6ee91bSAvinash Patil #define TLV_TYPE_TX_PAUSE           (PROPRIETARY_TLV_BASE_ID + 148)
179562fc5b3SAmitkumar Karwar #define TLV_TYPE_COALESCE_RULE      (PROPRIETARY_TLV_BASE_ID + 154)
180e57f1734SAvinash Patil #define TLV_TYPE_KEY_PARAM_V2       (PROPRIETARY_TLV_BASE_ID + 156)
1810c9b7f22SXinming Hu #define TLV_TYPE_REPEAT_COUNT       (PROPRIETARY_TLV_BASE_ID + 176)
1828d6b538aSAvinash Patil #define TLV_TYPE_MULTI_CHAN_INFO    (PROPRIETARY_TLV_BASE_ID + 183)
1832b0f997dSZhaoyang Liu #define TLV_TYPE_MC_GROUP_INFO      (PROPRIETARY_TLV_BASE_ID + 184)
184d29caf25SAvinash Patil #define TLV_TYPE_TDLS_IDLE_TIMEOUT  (PROPRIETARY_TLV_BASE_ID + 194)
185cb91be87SAvinash Patil #define TLV_TYPE_SCAN_CHANNEL_GAP   (PROPRIETARY_TLV_BASE_ID + 197)
1864b9fede5SAmitkumar Karwar #define TLV_TYPE_API_REV            (PROPRIETARY_TLV_BASE_ID + 199)
187bf354433SAvinash Patil #define TLV_TYPE_CHANNEL_STATS      (PROPRIETARY_TLV_BASE_ID + 198)
188d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_AGGR_WINSIZE  (PROPRIETARY_TLV_BASE_ID + 202)
189d219b7ebSChunfan Chen #define TLV_BTCOEX_WL_SCANTIME      (PROPRIETARY_TLV_BASE_ID + 203)
19040d7412bSAniket Nagarnaik #define TLV_TYPE_BSS_MODE           (PROPRIETARY_TLV_BASE_ID + 206)
1915e6e3a92SBing Zhao 
1925e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
1935e6e3a92SBing Zhao 
1945e6e3a92SBing Zhao #define SSN_MASK         0xfff0
1955e6e3a92SBing Zhao 
1965e6e3a92SBing Zhao #define BA_RESULT_SUCCESS        0x0
1975e6e3a92SBing Zhao #define BA_RESULT_TIMEOUT        0x2
1985e6e3a92SBing Zhao 
1995e6e3a92SBing Zhao #define IS_BASTREAM_SETUP(ptr)  (ptr->ba_status)
2005e6e3a92SBing Zhao 
2015e6e3a92SBing Zhao #define BA_STREAM_NOT_ALLOWED   0xff
2025e6e3a92SBing Zhao 
2035e6e3a92SBing Zhao #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
204931f1584SYogesh Ashok Powar 			priv->adapter->config_bands & BAND_AN) && \
205931f1584SYogesh Ashok Powar 			priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
2065e6e3a92SBing Zhao #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
2075e6e3a92SBing Zhao 			BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
2085e6e3a92SBing Zhao 
2095e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_4K        4096
2105e6e3a92SBing Zhao #define MWIFIEX_TX_DATA_BUF_SIZE_8K        8192
2115e6e3a92SBing Zhao 
2125e6e3a92SBing Zhao #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
213b23bce29SAvinash Patil #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14))
214d5b036c4SAvinash Patil #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15))
21592263a84SZhaoyang Liu #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16))
2166d2bd916SMarc Yang 
21722281256SAvinash Patil #define MWIFIEX_DEF_HT_CAP	(IEEE80211_HT_CAP_DSSSCCK40 | \
21822281256SAvinash Patil 				 (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \
21922281256SAvinash Patil 				 IEEE80211_HT_CAP_SM_PS)
22022281256SAvinash Patil 
221645097ceSAmitkumar Karwar #define MWIFIEX_DEF_11N_TX_BF_CAP	0x09E1E008
222645097ceSAmitkumar Karwar 
22322281256SAvinash Patil #define MWIFIEX_DEF_AMPDU	IEEE80211_HT_AMPDU_PARM_FACTOR
22422281256SAvinash Patil 
225474a41e9SMaithili Hinge #define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC)
226474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC1	0x0100
227474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC12	0x0200
228474a41e9SMaithili Hinge #define MWIFIEX_RX_STBC123	0x0300
229474a41e9SMaithili Hinge 
2306d2bd916SMarc Yang /* dev_cap bitmap
2316d2bd916SMarc Yang  * BIT
2326d2bd916SMarc Yang  * 0-16		reserved
2336d2bd916SMarc Yang  * 17		IEEE80211_HT_CAP_SUP_WIDTH_20_40
2346d2bd916SMarc Yang  * 18-22	reserved
2356d2bd916SMarc Yang  * 23		IEEE80211_HT_CAP_SGI_20
2366d2bd916SMarc Yang  * 24		IEEE80211_HT_CAP_SGI_40
2376d2bd916SMarc Yang  * 25		IEEE80211_HT_CAP_TX_STBC
2386d2bd916SMarc Yang  * 26		IEEE80211_HT_CAP_RX_STBC
2396d2bd916SMarc Yang  * 27-28	reserved
2406d2bd916SMarc Yang  * 29		IEEE80211_HT_CAP_GRN_FLD
2416d2bd916SMarc Yang  * 30-31	reserved
2426d2bd916SMarc Yang  */
2435e6e3a92SBing Zhao #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
2446d2bd916SMarc Yang #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
2456d2bd916SMarc Yang #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
2466d2bd916SMarc Yang #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
2476d2bd916SMarc Yang #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
2486d2bd916SMarc Yang #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
249dd0d83c2SAvinash Patil #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
250dd0d83c2SAvinash Patil #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
251645097ceSAmitkumar Karwar #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30))
252396939f9SAvinash Patil #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2))
2534f3dfdfbSAvinash Patil #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
2546d2bd916SMarc Yang 
255cd27bc3cSAmitkumar Karwar /* httxcfg bitmap
256cd27bc3cSAmitkumar Karwar  * 0		reserved
257cd27bc3cSAmitkumar Karwar  * 1		20/40 Mhz enable(1)/disable(0)
258cd27bc3cSAmitkumar Karwar  * 2-3		reserved
259cd27bc3cSAmitkumar Karwar  * 4		green field enable(1)/disable(0)
260cd27bc3cSAmitkumar Karwar  * 5		short GI in 20 Mhz enable(1)/disable(0)
261cd27bc3cSAmitkumar Karwar  * 6		short GI in 40 Mhz enable(1)/disable(0)
262cd27bc3cSAmitkumar Karwar  * 7-15		reserved
263cd27bc3cSAmitkumar Karwar  */
264cd27bc3cSAmitkumar Karwar #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
265cd27bc3cSAmitkumar Karwar 
266a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 1x1 mode:
267a5333914SAmitkumar Karwar  * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1
268a5333914SAmitkumar Karwar  * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams
269a5333914SAmitkumar Karwar  */
270a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_1X1	0xfffefffe
271a5333914SAmitkumar Karwar 
272a5333914SAmitkumar Karwar /* 11AC Tx and Rx MCS map for 2x2 mode:
273a5333914SAmitkumar Karwar  * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2
274a5333914SAmitkumar Karwar  * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams
275a5333914SAmitkumar Karwar  */
276a5333914SAmitkumar Karwar #define MWIFIEX_11AC_MCS_MAP_2X2	0xfffafffa
277a5333914SAmitkumar Karwar 
2785e6e3a92SBing Zhao #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
2795e6e3a92SBing Zhao #define SETHT_MCS32(x) (x[4] |= 1)
280a5333914SAmitkumar Karwar #define HT_STREAM_1X1	0x11
281e3bea1c8SBing Zhao #define HT_STREAM_2X2	0x22
2825e6e3a92SBing Zhao 
2835e6e3a92SBing Zhao #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
2845e6e3a92SBing Zhao 
2855e6e3a92SBing Zhao #define LLC_SNAP_LEN    8
2865e6e3a92SBing Zhao 
287a5f39056SYogesh Ashok Powar /* HW_SPEC fw_cap_info */
288a5f39056SYogesh Ashok Powar 
289f25b1431SBing Zhao #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13))
290a5f39056SYogesh Ashok Powar 
291a5f39056SYogesh Ashok Powar #define GET_VHTCAP_CHWDSET(vht_cap_info)    ((vht_cap_info >> 2) & 0x3)
292a5f39056SYogesh Ashok Powar #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
293a5f39056SYogesh Ashok Powar #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \
294a5f39056SYogesh Ashok Powar 					      (2 * (nss - 1)))
295a5f39056SYogesh Ashok Powar #define GET_DEVTXMCSMAP(dev_mcs_map)      (dev_mcs_map >> 16)
296a5f39056SYogesh Ashok Powar #define GET_DEVRXMCSMAP(dev_mcs_map)      (dev_mcs_map & 0xFFFF)
297a5f39056SYogesh Ashok Powar 
29879d9a54cSAmitkumar Karwar /* Clear SU Beanformer, MU beanformer, MU beanformee and
29979d9a54cSAmitkumar Karwar  * sounding dimensions bits
30079d9a54cSAmitkumar Karwar  */
30179d9a54cSAmitkumar Karwar #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \
30279d9a54cSAmitkumar Karwar 			(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \
30379d9a54cSAmitkumar Karwar 			 IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \
30479d9a54cSAmitkumar Karwar 			 IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \
30579d9a54cSAmitkumar Karwar 			 IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK)
30679d9a54cSAmitkumar Karwar 
3075e6e3a92SBing Zhao #define MOD_CLASS_HR_DSSS       0x03
3085e6e3a92SBing Zhao #define MOD_CLASS_OFDM          0x07
3095e6e3a92SBing Zhao #define MOD_CLASS_HT            0x08
3105e6e3a92SBing Zhao #define HT_BW_20    0
3115e6e3a92SBing Zhao #define HT_BW_40    1
3125e6e3a92SBing Zhao 
313b887664dSAmitkumar Karwar #define DFS_CHAN_MOVE_TIME      10000
314b887664dSAmitkumar Karwar 
3155e6e3a92SBing Zhao #define HostCmd_CMD_GET_HW_SPEC                       0x0003
3165e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SCAN                       0x0006
3175e6e3a92SBing Zhao #define HostCmd_CMD_802_11_GET_LOG                    0x000b
3185e6e3a92SBing Zhao #define HostCmd_CMD_MAC_MULTICAST_ADR                 0x0010
3195e6e3a92SBing Zhao #define HostCmd_CMD_802_11_EEPROM_ACCESS              0x0059
3205e6e3a92SBing Zhao #define HostCmd_CMD_802_11_ASSOCIATE                  0x0012
3215e6e3a92SBing Zhao #define HostCmd_CMD_802_11_SNMP_MIB                   0x0016
3225e6e3a92SBing Zhao #define HostCmd_CMD_MAC_REG_ACCESS                    0x0019
3235e6e3a92SBing Zhao #define HostCmd_CMD_BBP_REG_ACCESS                    0x001a
3245e6e3a92SBing Zhao #define HostCmd_CMD_RF_REG_ACCESS                     0x001b
3255e6e3a92SBing Zhao #define HostCmd_CMD_PMIC_REG_ACCESS                   0x00ad
326caa8984fSAmitkumar Karwar #define HostCmd_CMD_RF_TX_PWR                         0x001e
3278a279d5bSAmitkumar Karwar #define HostCmd_CMD_RF_ANTENNA                        0x0020
3285e6e3a92SBing Zhao #define HostCmd_CMD_802_11_DEAUTHENTICATE             0x0024
3295e6e3a92SBing Zhao #define HostCmd_CMD_MAC_CONTROL                       0x0028
3305e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_START               0x002b
3315e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_JOIN                0x002c
3325e6e3a92SBing Zhao #define HostCmd_CMD_802_11_AD_HOC_STOP                0x0040
3335e6e3a92SBing Zhao #define HostCmd_CMD_802_11_MAC_ADDRESS                0x004D
3345e6e3a92SBing Zhao #define HostCmd_CMD_802_11D_DOMAIN_INFO               0x005b
3355e6e3a92SBing Zhao #define HostCmd_CMD_802_11_KEY_MATERIAL               0x005e
3360c9b7f22SXinming Hu #define HostCmd_CMD_802_11_BG_SCAN_CONFIG             0x006b
3375e6e3a92SBing Zhao #define HostCmd_CMD_802_11_BG_SCAN_QUERY              0x006c
3385e6e3a92SBing Zhao #define HostCmd_CMD_WMM_GET_STATUS                    0x0071
339fa444bf8SAmitkumar Karwar #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT            0x0075
3405e6e3a92SBing Zhao #define HostCmd_CMD_802_11_TX_RATE_QUERY              0x007f
3415e6e3a92SBing Zhao #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS     0x0083
342c2c6c85fSChin-ran Lo #define HostCmd_CMD_MEM_ACCESS                        0x0086
343388ec385SAmitkumar Karwar #define HostCmd_CMD_CFG_DATA                          0x008f
3445e6e3a92SBing Zhao #define HostCmd_CMD_VERSION_EXT                       0x0097
3457da060c1SAmitkumar Karwar #define HostCmd_CMD_MEF_CFG                           0x009a
3465e6e3a92SBing Zhao #define HostCmd_CMD_RSSI_INFO                         0x00a4
3475e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_INIT                         0x00a9
3485e6e3a92SBing Zhao #define HostCmd_CMD_FUNC_SHUTDOWN                     0x00aa
349ed5cfbe6SAvinash Patil #define HOST_CMD_APCMD_SYS_RESET                      0x00af
35040d07030SAvinash Patil #define HostCmd_CMD_UAP_SYS_CONFIG                    0x00b0
35140d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_START                     0x00b1
35240d07030SAvinash Patil #define HostCmd_CMD_UAP_BSS_STOP                      0x00b2
353b21783e9SXinming Hu #define HOST_CMD_APCMD_STA_LIST                       0x00b3
3540f9e9b8bSAvinash Patil #define HostCmd_CMD_UAP_STA_DEAUTH                    0x00b5
3555e6e3a92SBing Zhao #define HostCmd_CMD_11N_CFG                           0x00cd
3565e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_REQ                     0x00ce
3575e6e3a92SBing Zhao #define HostCmd_CMD_11N_ADDBA_RSP                     0x00cf
3585e6e3a92SBing Zhao #define HostCmd_CMD_11N_DELBA                         0x00d0
3595e6e3a92SBing Zhao #define HostCmd_CMD_RECONFIGURE_TX_BUFF               0x00d9
36085afb186SAvinash Patil #define HostCmd_CMD_CHAN_REPORT_REQUEST               0x00dd
3615e6e3a92SBing Zhao #define HostCmd_CMD_AMSDU_AGGR_CTRL                   0x00df
3625e6e3a92SBing Zhao #define HostCmd_CMD_TXPWR_CFG                         0x00d1
3635e6e3a92SBing Zhao #define HostCmd_CMD_TX_RATE_CFG                       0x00d6
36446dbe247SAmitkumar Karwar #define HostCmd_CMD_ROBUST_COEX                       0x00e0
3655e6e3a92SBing Zhao #define HostCmd_CMD_802_11_PS_MODE_ENH                0x00e4
3665e6e3a92SBing Zhao #define HostCmd_CMD_802_11_HS_CFG_ENH                 0x00e5
367e1a2b7a3SStone Piao #define HostCmd_CMD_P2P_MODE_CFG                      0x00eb
3685e6e3a92SBing Zhao #define HostCmd_CMD_CAU_REG_ACCESS                    0x00ed
3695e6e3a92SBing Zhao #define HostCmd_CMD_SET_BSS_MODE                      0x00f7
370d930faeeSAmitkumar Karwar #define HostCmd_CMD_PCIE_DESC_DETAILS                 0x00fa
37121f58d20SAmitkumar Karwar #define HostCmd_CMD_802_11_SCAN_EXT                   0x0107
372562fc5b3SAmitkumar Karwar #define HostCmd_CMD_COALESCE_CFG                      0x010a
3733cec6870SStone Piao #define HostCmd_CMD_MGMT_FRAME_REG                    0x010c
3747feb4c48SStone Piao #define HostCmd_CMD_REMAIN_ON_CHAN                    0x010d
375f6b1cbe0SGanapathi Bhat #define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG             0x010f
37683c78da9SYogesh Ashok Powar #define HostCmd_CMD_11AC_CFG			      0x0112
3778de00f1bSchunfan chen #define HostCmd_CMD_HS_WAKEUP_REASON                  0x0116
378449b8bbfSXinming Hu #define HostCmd_CMD_TDLS_CONFIG                       0x0100
379d5b036c4SAvinash Patil #define HostCmd_CMD_MC_POLICY                         0x0121
380429d90d2SAvinash Patil #define HostCmd_CMD_TDLS_OPER                         0x0122
38192263a84SZhaoyang Liu #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG               0x0223
3825e6e3a92SBing Zhao 
383f752dcd5SAvinash Patil #define PROTOCOL_NO_SECURITY        0x01
384f752dcd5SAvinash Patil #define PROTOCOL_STATIC_WEP         0x02
385f752dcd5SAvinash Patil #define PROTOCOL_WPA                0x08
386f752dcd5SAvinash Patil #define PROTOCOL_WPA2               0x20
387f752dcd5SAvinash Patil #define PROTOCOL_WPA2_MIXED         0x28
388f752dcd5SAvinash Patil #define PROTOCOL_EAP                0x40
389f752dcd5SAvinash Patil #define KEY_MGMT_NONE               0x04
390f752dcd5SAvinash Patil #define KEY_MGMT_PSK                0x02
391f752dcd5SAvinash Patil #define KEY_MGMT_EAP                0x01
392f752dcd5SAvinash Patil #define CIPHER_TKIP                 0x04
393f752dcd5SAvinash Patil #define CIPHER_AES_CCMP             0x08
394f752dcd5SAvinash Patil #define VALID_CIPHER_BITMAP         0x0c
395f752dcd5SAvinash Patil 
3965e6e3a92SBing Zhao enum ENH_PS_MODES {
3975e6e3a92SBing Zhao 	EN_PS = 1,
3985e6e3a92SBing Zhao 	DIS_PS = 2,
3995e6e3a92SBing Zhao 	EN_AUTO_DS = 3,
4005e6e3a92SBing Zhao 	DIS_AUTO_DS = 4,
4015e6e3a92SBing Zhao 	SLEEP_CONFIRM = 5,
4025e6e3a92SBing Zhao 	GET_PS = 0,
4035e6e3a92SBing Zhao 	EN_AUTO_PS = 0xff,
4045e6e3a92SBing Zhao 	DIS_AUTO_PS = 0xfe,
4055e6e3a92SBing Zhao };
4065e6e3a92SBing Zhao 
407e1a2b7a3SStone Piao enum P2P_MODES {
408e1a2b7a3SStone Piao 	P2P_MODE_DISABLE = 0,
409e1a2b7a3SStone Piao 	P2P_MODE_DEVICE = 1,
410e1a2b7a3SStone Piao 	P2P_MODE_GO = 2,
411e1a2b7a3SStone Piao 	P2P_MODE_CLIENT = 3,
412e1a2b7a3SStone Piao };
413e1a2b7a3SStone Piao 
4145e6e3a92SBing Zhao #define HostCmd_RET_BIT                       0x8000
4155e6e3a92SBing Zhao #define HostCmd_ACT_GEN_GET                   0x0000
4165e6e3a92SBing Zhao #define HostCmd_ACT_GEN_SET                   0x0001
4177feb4c48SStone Piao #define HostCmd_ACT_GEN_REMOVE                0x0004
418fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_SET               0x0002
419fa444bf8SAmitkumar Karwar #define HostCmd_ACT_BITWISE_CLR               0x0003
4205e6e3a92SBing Zhao #define HostCmd_RESULT_OK                     0x0000
4215e6e3a92SBing Zhao 
4225e6e3a92SBing Zhao #define HostCmd_ACT_MAC_RX_ON                 0x0001
4235e6e3a92SBing Zhao #define HostCmd_ACT_MAC_TX_ON                 0x0002
4245e6e3a92SBing Zhao #define HostCmd_ACT_MAC_WEP_ENABLE            0x0008
4255e6e3a92SBing Zhao #define HostCmd_ACT_MAC_ETHERNETII_ENABLE     0x0010
4265e6e3a92SBing Zhao #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE    0x0080
4275e6e3a92SBing Zhao #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE  0x0100
4285e6e3a92SBing Zhao #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON     0x2000
4295e6e3a92SBing Zhao 
4305e6e3a92SBing Zhao #define HostCmd_BSS_MODE_IBSS               0x0002
4315e6e3a92SBing Zhao #define HostCmd_BSS_MODE_ANY                0x0003
4325e6e3a92SBing Zhao 
4335e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_BG          0
4345e6e3a92SBing Zhao #define HostCmd_SCAN_RADIO_TYPE_A           1
4355e6e3a92SBing Zhao 
436cc0b5a64SAmitkumar Karwar #define HS_CFG_CANCEL			0xffffffff
437cc0b5a64SAmitkumar Karwar #define HS_CFG_COND_DEF			0x00000000
438cc0b5a64SAmitkumar Karwar #define HS_CFG_GPIO_DEF			0xff
439915f36d2SBing Zhao #define HS_CFG_GAP_DEF			0xff
4400d7f53e3SAmitkumar Karwar #define HS_CFG_COND_BROADCAST_DATA	0x00000001
4410d7f53e3SAmitkumar Karwar #define HS_CFG_COND_UNICAST_DATA	0x00000002
4420d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MAC_EVENT		0x00000004
4430d7f53e3SAmitkumar Karwar #define HS_CFG_COND_MULTICAST_DATA	0x00000008
4445e6e3a92SBing Zhao 
44512d11109SAvinash Patil #define CONNECT_ERR_AUTH_ERR_STA_FAILURE	0xFFFB
44612d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_TIMEOUT		0xFFFC
44712d11109SAvinash Patil #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED	0xFFFD
44812d11109SAvinash Patil #define CONNECT_ERR_AUTH_MSG_UNHANDLED		0xFFFE
44912d11109SAvinash Patil #define CONNECT_ERR_STA_FAILURE			0xFFFF
45012d11109SAvinash Patil 
4517532c7d0SAmitkumar Karwar 
4525e6e3a92SBing Zhao #define CMD_F_HOSTCMD           (1 << 0)
4535e6e3a92SBing Zhao 
4545e6e3a92SBing Zhao #define HostCmd_CMD_ID_MASK             0x0fff
4555e6e3a92SBing Zhao 
4565e6e3a92SBing Zhao #define HostCmd_SEQ_NUM_MASK            0x00ff
4575e6e3a92SBing Zhao 
4585e6e3a92SBing Zhao #define HostCmd_BSS_NUM_MASK            0x0f00
4595e6e3a92SBing Zhao 
4605e6e3a92SBing Zhao #define HostCmd_BSS_TYPE_MASK           0xf000
4615e6e3a92SBing Zhao 
4628a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_RX              0x0001
4638a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_TX              0x0002
4648a279d5bSAmitkumar Karwar #define HostCmd_ACT_SET_BOTH            0x0003
465*3ee71285SShengzhen Li #define HostCmd_ACT_GET_RX              0x0004
466*3ee71285SShengzhen Li #define HostCmd_ACT_GET_TX              0x0008
467*3ee71285SShengzhen Li #define HostCmd_ACT_GET_BOTH            0x000c
4688a279d5bSAmitkumar Karwar 
4698a279d5bSAmitkumar Karwar #define RF_ANTENNA_AUTO                 0xFFFF
4708a279d5bSAmitkumar Karwar 
4715e6e3a92SBing Zhao #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) {   \
4725e6e3a92SBing Zhao 	(((seq) & 0x00ff) |                             \
4735e6e3a92SBing Zhao 	 (((num) & 0x000f) << 8)) |                     \
4745e6e3a92SBing Zhao 	(((type) & 0x000f) << 12);                  }
4755e6e3a92SBing Zhao 
4765e6e3a92SBing Zhao #define HostCmd_GET_SEQ_NO(seq)       \
4775e6e3a92SBing Zhao 	((seq) & HostCmd_SEQ_NUM_MASK)
4785e6e3a92SBing Zhao 
4795e6e3a92SBing Zhao #define HostCmd_GET_BSS_NO(seq)         \
4805e6e3a92SBing Zhao 	(((seq) & HostCmd_BSS_NUM_MASK) >> 8)
4815e6e3a92SBing Zhao 
4825e6e3a92SBing Zhao #define HostCmd_GET_BSS_TYPE(seq)       \
4835e6e3a92SBing Zhao 	(((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
4845e6e3a92SBing Zhao 
4855e6e3a92SBing Zhao #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL  0x00000001
4865e6e3a92SBing Zhao #define EVENT_LINK_LOST                 0x00000003
4875e6e3a92SBing Zhao #define EVENT_LINK_SENSED               0x00000004
4885e6e3a92SBing Zhao #define EVENT_MIB_CHANGED               0x00000006
4895e6e3a92SBing Zhao #define EVENT_INIT_DONE                 0x00000007
4905e6e3a92SBing Zhao #define EVENT_DEAUTHENTICATED           0x00000008
4915e6e3a92SBing Zhao #define EVENT_DISASSOCIATED             0x00000009
4925e6e3a92SBing Zhao #define EVENT_PS_AWAKE                  0x0000000a
4935e6e3a92SBing Zhao #define EVENT_PS_SLEEP                  0x0000000b
4945e6e3a92SBing Zhao #define EVENT_MIC_ERR_MULTICAST         0x0000000d
4955e6e3a92SBing Zhao #define EVENT_MIC_ERR_UNICAST           0x0000000e
4965e6e3a92SBing Zhao #define EVENT_DEEP_SLEEP_AWAKE          0x00000010
4975e6e3a92SBing Zhao #define EVENT_ADHOC_BCN_LOST            0x00000011
4985e6e3a92SBing Zhao 
4995e6e3a92SBing Zhao #define EVENT_WMM_STATUS_CHANGE         0x00000017
5005e6e3a92SBing Zhao #define EVENT_BG_SCAN_REPORT            0x00000018
5015e6e3a92SBing Zhao #define EVENT_RSSI_LOW                  0x00000019
5025e6e3a92SBing Zhao #define EVENT_SNR_LOW                   0x0000001a
5035e6e3a92SBing Zhao #define EVENT_MAX_FAIL                  0x0000001b
5045e6e3a92SBing Zhao #define EVENT_RSSI_HIGH                 0x0000001c
5055e6e3a92SBing Zhao #define EVENT_SNR_HIGH                  0x0000001d
5065e6e3a92SBing Zhao #define EVENT_IBSS_COALESCED            0x0000001e
5075e6e3a92SBing Zhao #define EVENT_DATA_RSSI_LOW             0x00000024
5085e6e3a92SBing Zhao #define EVENT_DATA_SNR_LOW              0x00000025
5095e6e3a92SBing Zhao #define EVENT_DATA_RSSI_HIGH            0x00000026
5105e6e3a92SBing Zhao #define EVENT_DATA_SNR_HIGH             0x00000027
5115e6e3a92SBing Zhao #define EVENT_LINK_QUALITY              0x00000028
5125e6e3a92SBing Zhao #define EVENT_PORT_RELEASE              0x0000002b
513e568634aSAvinash Patil #define EVENT_UAP_STA_DEAUTH            0x0000002c
514e568634aSAvinash Patil #define EVENT_UAP_STA_ASSOC             0x0000002d
515e568634aSAvinash Patil #define EVENT_UAP_BSS_START             0x0000002e
5165e6e3a92SBing Zhao #define EVENT_PRE_BEACON_LOST           0x00000031
5175e6e3a92SBing Zhao #define EVENT_ADDBA                     0x00000033
5185e6e3a92SBing Zhao #define EVENT_DELBA                     0x00000034
5195e6e3a92SBing Zhao #define EVENT_BA_STREAM_TIEMOUT         0x00000037
5205e6e3a92SBing Zhao #define EVENT_AMSDU_AGGR_CTRL           0x00000042
521e568634aSAvinash Patil #define EVENT_UAP_BSS_IDLE              0x00000043
522e568634aSAvinash Patil #define EVENT_UAP_BSS_ACTIVE            0x00000044
5235e6e3a92SBing Zhao #define EVENT_WEP_ICV_ERR               0x00000046
5245e6e3a92SBing Zhao #define EVENT_HS_ACT_REQ                0x00000047
5255e6e3a92SBing Zhao #define EVENT_BW_CHANGE                 0x00000048
526e568634aSAvinash Patil #define EVENT_UAP_MIC_COUNTERMEASURES   0x0000004c
5275e6e3a92SBing Zhao #define EVENT_HOSTWAKE_STAIE		0x0000004d
5282a7305c8SAmitkumar Karwar #define EVENT_CHANNEL_SWITCH_ANN        0x00000050
52979ff4346SAvinash Patil #define EVENT_TDLS_GENERIC_EVENT        0x00000052
5303b57c1a7SAvinash Patil #define EVENT_RADAR_DETECTED		0x00000053
5310a694d68SAvinash Patil #define EVENT_CHANNEL_REPORT_RDY        0x00000054
5324e6ee91bSAvinash Patil #define EVENT_TX_DATA_PAUSE             0x00000055
53321f58d20SAmitkumar Karwar #define EVENT_EXT_SCAN_REPORT           0x00000058
5340c9b7f22SXinming Hu #define EVENT_BG_SCAN_STOPPED           0x00000065
535eab1c76bSStone Piao #define EVENT_REMAIN_ON_CHAN_EXPIRED    0x0000005f
5368d6b538aSAvinash Patil #define EVENT_MULTI_CHAN_INFO           0x0000006a
537808bbebcSAmitkumar Karwar #define EVENT_TX_STATUS_REPORT		0x00000074
538d219b7ebSChunfan Chen #define EVENT_BT_COEX_WLAN_PARA_CHANGE	0X00000076
5395e6e3a92SBing Zhao 
5405e6e3a92SBing Zhao #define EVENT_ID_MASK                   0xffff
5415e6e3a92SBing Zhao #define BSS_NUM_MASK                    0xf
5425e6e3a92SBing Zhao 
5435e6e3a92SBing Zhao #define EVENT_GET_BSS_NUM(event_cause)          \
5445e6e3a92SBing Zhao 	(((event_cause) >> 16) & BSS_NUM_MASK)
5455e6e3a92SBing Zhao 
5465e6e3a92SBing Zhao #define EVENT_GET_BSS_TYPE(event_cause)         \
5475e6e3a92SBing Zhao 	(((event_cause) >> 24) & 0x00ff)
5485e6e3a92SBing Zhao 
549b0922ffaSXinming Hu #define MWIFIEX_MAX_PATTERN_LEN		40
550afd84de4SAmitkumar Karwar #define MWIFIEX_MAX_OFFSET_LEN		100
5517d7f07d8Schunfan chen #define MWIFIEX_MAX_ND_MATCH_SETS	10
5527d7f07d8Schunfan chen 
5537da060c1SAmitkumar Karwar #define STACK_NBYTES			100
5547da060c1SAmitkumar Karwar #define TYPE_DNUM			1
5557da060c1SAmitkumar Karwar #define TYPE_BYTESEQ			2
5567da060c1SAmitkumar Karwar #define MAX_OPERAND			0x40
5577da060c1SAmitkumar Karwar #define TYPE_EQ				(MAX_OPERAND+1)
5587da060c1SAmitkumar Karwar #define TYPE_EQ_DNUM			(MAX_OPERAND+2)
5597da060c1SAmitkumar Karwar #define TYPE_EQ_BIT			(MAX_OPERAND+3)
5607da060c1SAmitkumar Karwar #define TYPE_AND			(MAX_OPERAND+4)
5617da060c1SAmitkumar Karwar #define TYPE_OR				(MAX_OPERAND+5)
5627da060c1SAmitkumar Karwar #define MEF_MODE_HOST_SLEEP			1
5637da060c1SAmitkumar Karwar #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST	3
564b533be18SMaithili Hinge #define MEF_ACTION_AUTO_ARP                    0x10
5657da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_BROADCAST	BIT(0)
5667da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_UNICAST	BIT(1)
5677da060c1SAmitkumar Karwar #define MWIFIEX_CRITERIA_MULTICAST	BIT(3)
568b533be18SMaithili Hinge #define MWIFIEX_MAX_SUPPORTED_IPADDR              4
5697da060c1SAmitkumar Karwar 
570429d90d2SAvinash Patil #define ACT_TDLS_DELETE            0x00
571429d90d2SAvinash Patil #define ACT_TDLS_CREATE            0x01
572429d90d2SAvinash Patil #define ACT_TDLS_CONFIG            0x02
573f7669877SXinming Hu 
57479ff4346SAvinash Patil #define TDLS_EVENT_LINK_TEAR_DOWN      3
575f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_RESULT  7
576f7669877SXinming Hu #define TDLS_EVENT_START_CHAN_SWITCH   8
577f7669877SXinming Hu #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9
578f7669877SXinming Hu 
579f7669877SXinming Hu #define TDLS_BASE_CHANNEL	       0
580f7669877SXinming Hu #define TDLS_OFF_CHANNEL	       1
581429d90d2SAvinash Patil 
582449b8bbfSXinming Hu #define ACT_TDLS_CS_ENABLE_CONFIG 0x00
583449b8bbfSXinming Hu #define ACT_TDLS_CS_INIT	  0x06
584449b8bbfSXinming Hu #define ACT_TDLS_CS_STOP	  0x07
585449b8bbfSXinming Hu #define ACT_TDLS_CS_PARAMS	  0x08
586449b8bbfSXinming Hu 
587449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_UNIT_TIME	2
588449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_THR_OTHERLINK	10
589449b8bbfSXinming Hu #define MWIFIEX_DEF_THR_DIRECTLINK	0
590449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIME		10
591449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_TIMEOUT		16
592449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_REG_CLASS	12
593449b8bbfSXinming Hu #define MWIFIEX_DEF_CS_PERIODICITY	1
594449b8bbfSXinming Hu 
5958e17ea25SAmitkumar Karwar #define MWIFIEX_FW_V15		   15
5968e17ea25SAmitkumar Karwar 
597cf075eacSAvinash Patil #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1)
598cf075eacSAvinash Patil 
5995e6e3a92SBing Zhao struct mwifiex_ie_types_header {
6005e6e3a92SBing Zhao 	__le16 type;
6015e6e3a92SBing Zhao 	__le16 len;
6025e6e3a92SBing Zhao } __packed;
6035e6e3a92SBing Zhao 
6045e6e3a92SBing Zhao struct mwifiex_ie_types_data {
6055e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
6065e6e3a92SBing Zhao 	u8 data[1];
6075e6e3a92SBing Zhao } __packed;
6085e6e3a92SBing Zhao 
6095e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
6105e6e3a92SBing Zhao #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
611b23bce29SAvinash Patil #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET      0x10
61209869495SAvinash Patil #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET      0x01
613808bbebcSAmitkumar Karwar #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS    0x20
6145e6e3a92SBing Zhao 
6158de00f1bSchunfan chen enum HS_WAKEUP_REASON {
6168de00f1bSchunfan chen 	NO_HSWAKEUP_REASON = 0,
6178de00f1bSchunfan chen 	BCAST_DATA_MATCHED,
6188de00f1bSchunfan chen 	MCAST_DATA_MATCHED,
6198de00f1bSchunfan chen 	UCAST_DATA_MATCHED,
6208de00f1bSchunfan chen 	MASKTABLE_EVENT_MATCHED,
6218de00f1bSchunfan chen 	NON_MASKABLE_EVENT_MATCHED,
6228de00f1bSchunfan chen 	NON_MASKABLE_CONDITION_MATCHED,
6238de00f1bSchunfan chen 	MAGIC_PATTERN_MATCHED,
6248de00f1bSchunfan chen 	CONTROL_FRAME_MATCHED,
6258de00f1bSchunfan chen 	MANAGEMENT_FRAME_MATCHED,
6268fa0a0dcSGanapathi Bhat 	GTK_REKEY_FAILURE,
6278de00f1bSchunfan chen 	RESERVED
6288de00f1bSchunfan chen };
6298de00f1bSchunfan chen 
6305e6e3a92SBing Zhao struct txpd {
6315e6e3a92SBing Zhao 	u8 bss_type;
6325e6e3a92SBing Zhao 	u8 bss_num;
6335e6e3a92SBing Zhao 	__le16 tx_pkt_length;
6345e6e3a92SBing Zhao 	__le16 tx_pkt_offset;
6355e6e3a92SBing Zhao 	__le16 tx_pkt_type;
6365e6e3a92SBing Zhao 	__le32 tx_control;
6375e6e3a92SBing Zhao 	u8 priority;
6385e6e3a92SBing Zhao 	u8 flags;
6395e6e3a92SBing Zhao 	u8 pkt_delay_2ms;
640808bbebcSAmitkumar Karwar 	u8 reserved1[2];
641808bbebcSAmitkumar Karwar 	u8 tx_token_id;
642808bbebcSAmitkumar Karwar 	u8 reserved[2];
6435e6e3a92SBing Zhao } __packed;
6445e6e3a92SBing Zhao 
6455e6e3a92SBing Zhao struct rxpd {
6465e6e3a92SBing Zhao 	u8 bss_type;
6475e6e3a92SBing Zhao 	u8 bss_num;
648ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_length;
649ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_offset;
650ed1ea6f4SAmitkumar Karwar 	__le16 rx_pkt_type;
651ed1ea6f4SAmitkumar Karwar 	__le16 seq_num;
6525e6e3a92SBing Zhao 	u8 priority;
6535e6e3a92SBing Zhao 	u8 rx_rate;
6545e6e3a92SBing Zhao 	s8 snr;
6555e6e3a92SBing Zhao 	s8 nf;
656a5f39056SYogesh Ashok Powar 
657a5f39056SYogesh Ashok Powar 	/* For: Non-802.11 AC cards
658a5f39056SYogesh Ashok Powar 	 *
659a5f39056SYogesh Ashok Powar 	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
6605e6e3a92SBing Zhao 	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
661a5f39056SYogesh Ashok Powar 	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
662a5f39056SYogesh Ashok Powar 	 *
663a5f39056SYogesh Ashok Powar 	 * For: 802.11 AC cards
664a5f39056SYogesh Ashok Powar 	 * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
665a5f39056SYogesh Ashok Powar 	 * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
666a5f39056SYogesh Ashok Powar 	 *						BW80 = 10  BW160 = 11
667a5f39056SYogesh Ashok Powar 	 * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
668a5f39056SYogesh Ashok Powar 	 * [Bit 5] STBC support Enabled = 1
669a5f39056SYogesh Ashok Powar 	 * [Bit 6] LDPC support Enabled = 1
670a5f39056SYogesh Ashok Powar 	 * [Bit 7] Reserved
671a5f39056SYogesh Ashok Powar 	 */
6725e6e3a92SBing Zhao 	u8 ht_info;
6739d31c1c7SAvinash Patil 	u8 reserved[3];
67409869495SAvinash Patil 	u8 flags;
6755e6e3a92SBing Zhao } __packed;
6765e6e3a92SBing Zhao 
677838e4f44SAvinash Patil struct uap_txpd {
678838e4f44SAvinash Patil 	u8 bss_type;
679838e4f44SAvinash Patil 	u8 bss_num;
680838e4f44SAvinash Patil 	__le16 tx_pkt_length;
681838e4f44SAvinash Patil 	__le16 tx_pkt_offset;
682838e4f44SAvinash Patil 	__le16 tx_pkt_type;
683838e4f44SAvinash Patil 	__le32 tx_control;
684838e4f44SAvinash Patil 	u8 priority;
685838e4f44SAvinash Patil 	u8 flags;
686838e4f44SAvinash Patil 	u8 pkt_delay_2ms;
687808bbebcSAmitkumar Karwar 	u8 reserved1[2];
688808bbebcSAmitkumar Karwar 	u8 tx_token_id;
689808bbebcSAmitkumar Karwar 	u8 reserved[2];
690838e4f44SAvinash Patil };
691838e4f44SAvinash Patil 
692838e4f44SAvinash Patil struct uap_rxpd {
693838e4f44SAvinash Patil 	u8 bss_type;
694838e4f44SAvinash Patil 	u8 bss_num;
695838e4f44SAvinash Patil 	__le16 rx_pkt_length;
696838e4f44SAvinash Patil 	__le16 rx_pkt_offset;
697838e4f44SAvinash Patil 	__le16 rx_pkt_type;
698838e4f44SAvinash Patil 	__le16 seq_num;
699838e4f44SAvinash Patil 	u8 priority;
700442f6f9bSXinming Hu 	u8 rx_rate;
701442f6f9bSXinming Hu 	s8 snr;
702442f6f9bSXinming Hu 	s8 nf;
703442f6f9bSXinming Hu 	u8 ht_info;
704442f6f9bSXinming Hu 	u8 reserved[3];
705442f6f9bSXinming Hu 	u8 flags;
706838e4f44SAvinash Patil };
707838e4f44SAvinash Patil 
708bf354433SAvinash Patil struct mwifiex_fw_chan_stats {
709bf354433SAvinash Patil 	u8 chan_num;
710bf354433SAvinash Patil 	u8 bandcfg;
711bf354433SAvinash Patil 	u8 flags;
712bf354433SAvinash Patil 	s8 noise;
713bf354433SAvinash Patil 	__le16 total_bss;
714bf354433SAvinash Patil 	__le16 cca_scan_dur;
715bf354433SAvinash Patil 	__le16 cca_busy_dur;
716bf354433SAvinash Patil } __packed;
717bf354433SAvinash Patil 
7185e6e3a92SBing Zhao enum mwifiex_chan_scan_mode_bitmasks {
7195e6e3a92SBing Zhao 	MWIFIEX_PASSIVE_SCAN = BIT(0),
7205e6e3a92SBing Zhao 	MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
7212375fa2bSchunfan chen 	MWIFIEX_HIDDEN_SSID_REPORT = BIT(4),
7225e6e3a92SBing Zhao };
7235e6e3a92SBing Zhao 
7245e6e3a92SBing Zhao struct mwifiex_chan_scan_param_set {
7255e6e3a92SBing Zhao 	u8 radio_type;
7265e6e3a92SBing Zhao 	u8 chan_number;
7275e6e3a92SBing Zhao 	u8 chan_scan_mode_bitmap;
7285e6e3a92SBing Zhao 	__le16 min_scan_time;
7295e6e3a92SBing Zhao 	__le16 max_scan_time;
7305e6e3a92SBing Zhao } __packed;
7315e6e3a92SBing Zhao 
7325e6e3a92SBing Zhao struct mwifiex_ie_types_chan_list_param_set {
7335e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7345e6e3a92SBing Zhao 	struct mwifiex_chan_scan_param_set chan_scan_param[1];
7355e6e3a92SBing Zhao } __packed;
7365e6e3a92SBing Zhao 
7375e6e3a92SBing Zhao struct chan_band_param_set {
7385e6e3a92SBing Zhao 	u8 radio_type;
7395e6e3a92SBing Zhao 	u8 chan_number;
7405e6e3a92SBing Zhao };
7415e6e3a92SBing Zhao 
7425e6e3a92SBing Zhao struct mwifiex_ie_types_chan_band_list_param_set {
7435e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7445e6e3a92SBing Zhao 	struct chan_band_param_set chan_band_param[1];
7455e6e3a92SBing Zhao } __packed;
7465e6e3a92SBing Zhao 
7475e6e3a92SBing Zhao struct mwifiex_ie_types_rates_param_set {
7485e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7495e6e3a92SBing Zhao 	u8 rates[1];
7505e6e3a92SBing Zhao } __packed;
7515e6e3a92SBing Zhao 
7525e6e3a92SBing Zhao struct mwifiex_ie_types_ssid_param_set {
7535e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7545e6e3a92SBing Zhao 	u8 ssid[1];
7555e6e3a92SBing Zhao } __packed;
7565e6e3a92SBing Zhao 
7575e6e3a92SBing Zhao struct mwifiex_ie_types_num_probes {
7585e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7595e6e3a92SBing Zhao 	__le16 num_probes;
7605e6e3a92SBing Zhao } __packed;
7615e6e3a92SBing Zhao 
7620c9b7f22SXinming Hu struct mwifiex_ie_types_repeat_count {
7630c9b7f22SXinming Hu 	struct mwifiex_ie_types_header header;
7640c9b7f22SXinming Hu 	__le16 repeat_count;
7650c9b7f22SXinming Hu } __packed;
7660c9b7f22SXinming Hu 
767fdcab083SGanapathi Bhat struct mwifiex_ie_types_min_rssi_threshold {
768fdcab083SGanapathi Bhat 	struct mwifiex_ie_types_header header;
769fdcab083SGanapathi Bhat 	__le16 rssi_threshold;
770fdcab083SGanapathi Bhat } __packed;
771fdcab083SGanapathi Bhat 
7720c9b7f22SXinming Hu struct mwifiex_ie_types_bgscan_start_later {
7730c9b7f22SXinming Hu 	struct mwifiex_ie_types_header header;
7740c9b7f22SXinming Hu 	__le16 start_later;
7750c9b7f22SXinming Hu } __packed;
7760c9b7f22SXinming Hu 
777cb91be87SAvinash Patil struct mwifiex_ie_types_scan_chan_gap {
778cb91be87SAvinash Patil 	struct mwifiex_ie_types_header header;
779cb91be87SAvinash Patil 	/* time gap in TUs to be used between two consecutive channels scan */
780cb91be87SAvinash Patil 	__le16 chan_gap;
781cb91be87SAvinash Patil } __packed;
782cb91be87SAvinash Patil 
783bf354433SAvinash Patil struct mwifiex_ietypes_chanstats {
784bf354433SAvinash Patil 	struct mwifiex_ie_types_header header;
785bf354433SAvinash Patil 	struct mwifiex_fw_chan_stats chanstats[0];
786bf354433SAvinash Patil } __packed;
787bf354433SAvinash Patil 
7885e6e3a92SBing Zhao struct mwifiex_ie_types_wildcard_ssid_params {
7895e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7905e6e3a92SBing Zhao 	u8 max_ssid_length;
7915e6e3a92SBing Zhao 	u8 ssid[1];
7925e6e3a92SBing Zhao } __packed;
7935e6e3a92SBing Zhao 
7945e6e3a92SBing Zhao #define TSF_DATA_SIZE            8
7955e6e3a92SBing Zhao struct mwifiex_ie_types_tsf_timestamp {
7965e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
7975e6e3a92SBing Zhao 	u8 tsf_data[1];
7985e6e3a92SBing Zhao } __packed;
7995e6e3a92SBing Zhao 
8005e6e3a92SBing Zhao struct mwifiex_cf_param_set {
8015e6e3a92SBing Zhao 	u8 cfp_cnt;
8025e6e3a92SBing Zhao 	u8 cfp_period;
8034348d085SUjjal Roy 	__le16 cfp_max_duration;
8044348d085SUjjal Roy 	__le16 cfp_duration_remaining;
8055e6e3a92SBing Zhao } __packed;
8065e6e3a92SBing Zhao 
8075e6e3a92SBing Zhao struct mwifiex_ibss_param_set {
8084348d085SUjjal Roy 	__le16 atim_window;
8095e6e3a92SBing Zhao } __packed;
8105e6e3a92SBing Zhao 
8115e6e3a92SBing Zhao struct mwifiex_ie_types_ss_param_set {
8125e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8135e6e3a92SBing Zhao 	union {
8145e6e3a92SBing Zhao 		struct mwifiex_cf_param_set cf_param_set[1];
8155e6e3a92SBing Zhao 		struct mwifiex_ibss_param_set ibss_param_set[1];
8165e6e3a92SBing Zhao 	} cf_ibss;
8175e6e3a92SBing Zhao } __packed;
8185e6e3a92SBing Zhao 
8195e6e3a92SBing Zhao struct mwifiex_fh_param_set {
8204348d085SUjjal Roy 	__le16 dwell_time;
8215e6e3a92SBing Zhao 	u8 hop_set;
8225e6e3a92SBing Zhao 	u8 hop_pattern;
8235e6e3a92SBing Zhao 	u8 hop_index;
8245e6e3a92SBing Zhao } __packed;
8255e6e3a92SBing Zhao 
8265e6e3a92SBing Zhao struct mwifiex_ds_param_set {
8275e6e3a92SBing Zhao 	u8 current_chan;
8285e6e3a92SBing Zhao } __packed;
8295e6e3a92SBing Zhao 
8305e6e3a92SBing Zhao struct mwifiex_ie_types_phy_param_set {
8315e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8325e6e3a92SBing Zhao 	union {
8335e6e3a92SBing Zhao 		struct mwifiex_fh_param_set fh_param_set[1];
8345e6e3a92SBing Zhao 		struct mwifiex_ds_param_set ds_param_set[1];
8355e6e3a92SBing Zhao 	} fh_ds;
8365e6e3a92SBing Zhao } __packed;
8375e6e3a92SBing Zhao 
8385e6e3a92SBing Zhao struct mwifiex_ie_types_auth_type {
8395e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8405e6e3a92SBing Zhao 	__le16 auth_type;
8415e6e3a92SBing Zhao } __packed;
8425e6e3a92SBing Zhao 
8435e6e3a92SBing Zhao struct mwifiex_ie_types_vendor_param_set {
8445e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8455e6e3a92SBing Zhao 	u8 ie[MWIFIEX_MAX_VSIE_LEN];
8465e6e3a92SBing Zhao };
8475e6e3a92SBing Zhao 
84830fa51c8SBing Zhao #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC	60
849d29caf25SAvinash Patil 
850d29caf25SAvinash Patil struct mwifiex_ie_types_tdls_idle_timeout {
851d29caf25SAvinash Patil 	struct mwifiex_ie_types_header header;
852d29caf25SAvinash Patil 	__le16 value;
853d29caf25SAvinash Patil } __packed;
854d29caf25SAvinash Patil 
8555e6e3a92SBing Zhao struct mwifiex_ie_types_rsn_param_set {
8565e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
8575e6e3a92SBing Zhao 	u8 rsn_ie[1];
8585e6e3a92SBing Zhao } __packed;
8595e6e3a92SBing Zhao 
8605e6e3a92SBing Zhao #define KEYPARAMSET_FIXED_LEN 6
8615e6e3a92SBing Zhao 
8625e6e3a92SBing Zhao struct mwifiex_ie_type_key_param_set {
8635e6e3a92SBing Zhao 	__le16 type;
8645e6e3a92SBing Zhao 	__le16 length;
8655e6e3a92SBing Zhao 	__le16 key_type_id;
8665e6e3a92SBing Zhao 	__le16 key_info;
8675e6e3a92SBing Zhao 	__le16 key_len;
8685e6e3a92SBing Zhao 	u8 key[50];
8695e6e3a92SBing Zhao } __packed;
8705e6e3a92SBing Zhao 
871b877f4cfSYing Luo #define IGTK_PN_LEN		8
872b877f4cfSYing Luo 
873b877f4cfSYing Luo struct mwifiex_cmac_param {
874b877f4cfSYing Luo 	u8 ipn[IGTK_PN_LEN];
875b877f4cfSYing Luo 	u8 key[WLAN_KEY_LEN_AES_CMAC];
876b877f4cfSYing Luo } __packed;
877b877f4cfSYing Luo 
878e57f1734SAvinash Patil struct mwifiex_wep_param {
879e57f1734SAvinash Patil 	__le16 key_len;
880e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_WEP104];
881e57f1734SAvinash Patil } __packed;
882e57f1734SAvinash Patil 
883e57f1734SAvinash Patil struct mwifiex_tkip_param {
884e57f1734SAvinash Patil 	u8 pn[WPA_PN_SIZE];
885e57f1734SAvinash Patil 	__le16 key_len;
886e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_TKIP];
887e57f1734SAvinash Patil } __packed;
888e57f1734SAvinash Patil 
889e57f1734SAvinash Patil struct mwifiex_aes_param {
890e57f1734SAvinash Patil 	u8 pn[WPA_PN_SIZE];
891e57f1734SAvinash Patil 	__le16 key_len;
892e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_CCMP];
893e57f1734SAvinash Patil } __packed;
894e57f1734SAvinash Patil 
895e57f1734SAvinash Patil struct mwifiex_wapi_param {
896e57f1734SAvinash Patil 	u8 pn[PN_LEN];
897e57f1734SAvinash Patil 	__le16 key_len;
898e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_SMS4];
899e57f1734SAvinash Patil } __packed;
900e57f1734SAvinash Patil 
901e57f1734SAvinash Patil struct mwifiex_cmac_aes_param {
902e57f1734SAvinash Patil 	u8 ipn[IGTK_PN_LEN];
903e57f1734SAvinash Patil 	__le16 key_len;
904e57f1734SAvinash Patil 	u8 key[WLAN_KEY_LEN_AES_CMAC];
905e57f1734SAvinash Patil } __packed;
906e57f1734SAvinash Patil 
907e57f1734SAvinash Patil struct mwifiex_ie_type_key_param_set_v2 {
908e57f1734SAvinash Patil 	__le16 type;
909e57f1734SAvinash Patil 	__le16 len;
910e57f1734SAvinash Patil 	u8 mac_addr[ETH_ALEN];
911e57f1734SAvinash Patil 	u8 key_idx;
912e57f1734SAvinash Patil 	u8 key_type;
913e57f1734SAvinash Patil 	__le16 key_info;
914e57f1734SAvinash Patil 	union {
915e57f1734SAvinash Patil 		struct mwifiex_wep_param wep;
916e57f1734SAvinash Patil 		struct mwifiex_tkip_param tkip;
917e57f1734SAvinash Patil 		struct mwifiex_aes_param aes;
918e57f1734SAvinash Patil 		struct mwifiex_wapi_param wapi;
919e57f1734SAvinash Patil 		struct mwifiex_cmac_aes_param cmac_aes;
920e57f1734SAvinash Patil 	} key_params;
921e57f1734SAvinash Patil } __packed;
922e57f1734SAvinash Patil 
923e57f1734SAvinash Patil struct host_cmd_ds_802_11_key_material_v2 {
924e57f1734SAvinash Patil 	__le16 action;
925e57f1734SAvinash Patil 	struct mwifiex_ie_type_key_param_set_v2 key_param_set;
926e57f1734SAvinash Patil } __packed;
927e57f1734SAvinash Patil 
9285e6e3a92SBing Zhao struct host_cmd_ds_802_11_key_material {
9295e6e3a92SBing Zhao 	__le16 action;
9305e6e3a92SBing Zhao 	struct mwifiex_ie_type_key_param_set key_param_set;
9315e6e3a92SBing Zhao } __packed;
9325e6e3a92SBing Zhao 
9335e6e3a92SBing Zhao struct host_cmd_ds_gen {
9344348d085SUjjal Roy 	__le16 command;
9354348d085SUjjal Roy 	__le16 size;
9364348d085SUjjal Roy 	__le16 seq_num;
9374348d085SUjjal Roy 	__le16 result;
9385e6e3a92SBing Zhao };
9395e6e3a92SBing Zhao 
9405e6e3a92SBing Zhao #define S_DS_GEN        sizeof(struct host_cmd_ds_gen)
9415e6e3a92SBing Zhao 
9425e6e3a92SBing Zhao enum sleep_resp_ctrl {
9435e6e3a92SBing Zhao 	RESP_NOT_NEEDED = 0,
9445e6e3a92SBing Zhao 	RESP_NEEDED,
9455e6e3a92SBing Zhao };
9465e6e3a92SBing Zhao 
9475e6e3a92SBing Zhao struct mwifiex_ps_param {
9485e6e3a92SBing Zhao 	__le16 null_pkt_interval;
9495e6e3a92SBing Zhao 	__le16 multiple_dtims;
9505e6e3a92SBing Zhao 	__le16 bcn_miss_timeout;
9515e6e3a92SBing Zhao 	__le16 local_listen_interval;
9525e6e3a92SBing Zhao 	__le16 adhoc_wake_period;
9535e6e3a92SBing Zhao 	__le16 mode;
9545e6e3a92SBing Zhao 	__le16 delay_to_ps;
9555e6e3a92SBing Zhao };
9565e6e3a92SBing Zhao 
9575e6e3a92SBing Zhao #define BITMAP_AUTO_DS         0x01
9585e6e3a92SBing Zhao #define BITMAP_STA_PS          0x10
9595e6e3a92SBing Zhao 
9605e6e3a92SBing Zhao struct mwifiex_ie_types_auto_ds_param {
9615e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
9622b06bdbeSMarc Yang 	__le16 deep_sleep_timeout;
9635e6e3a92SBing Zhao } __packed;
9645e6e3a92SBing Zhao 
9655e6e3a92SBing Zhao struct mwifiex_ie_types_ps_param {
9665e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
9675e6e3a92SBing Zhao 	struct mwifiex_ps_param param;
9685e6e3a92SBing Zhao } __packed;
9695e6e3a92SBing Zhao 
9705e6e3a92SBing Zhao struct host_cmd_ds_802_11_ps_mode_enh {
9715e6e3a92SBing Zhao 	__le16 action;
9725e6e3a92SBing Zhao 
9735e6e3a92SBing Zhao 	union {
9745e6e3a92SBing Zhao 		struct mwifiex_ps_param opt_ps;
9755e6e3a92SBing Zhao 		__le16 ps_bitmap;
9765e6e3a92SBing Zhao 	} params;
9775e6e3a92SBing Zhao } __packed;
9785e6e3a92SBing Zhao 
9794b9fede5SAmitkumar Karwar enum API_VER_ID {
9807f445d04SAvinash Patil 	KEY_API_VER_ID = 1,
98189be7cebSAmitkumar Karwar 	FW_API_VER_ID = 2,
9827f445d04SAvinash Patil };
9837f445d04SAvinash Patil 
9844b9fede5SAmitkumar Karwar struct hw_spec_api_rev {
9857f445d04SAvinash Patil 	struct mwifiex_ie_types_header header;
9867f445d04SAvinash Patil 	__le16 api_id;
9877f445d04SAvinash Patil 	u8 major_ver;
9887f445d04SAvinash Patil 	u8 minor_ver;
9897f445d04SAvinash Patil } __packed;
9907f445d04SAvinash Patil 
9915e6e3a92SBing Zhao struct host_cmd_ds_get_hw_spec {
9925e6e3a92SBing Zhao 	__le16 hw_if_version;
9935e6e3a92SBing Zhao 	__le16 version;
9945e6e3a92SBing Zhao 	__le16 reserved;
9955e6e3a92SBing Zhao 	__le16 num_of_mcast_adr;
9965e6e3a92SBing Zhao 	u8 permanent_addr[ETH_ALEN];
9975e6e3a92SBing Zhao 	__le16 region_code;
9985e6e3a92SBing Zhao 	__le16 number_of_antenna;
9995e6e3a92SBing Zhao 	__le32 fw_release_number;
10005e6e3a92SBing Zhao 	__le32 reserved_1;
10015e6e3a92SBing Zhao 	__le32 reserved_2;
10025e6e3a92SBing Zhao 	__le32 reserved_3;
10035e6e3a92SBing Zhao 	__le32 fw_cap_info;
10045e6e3a92SBing Zhao 	__le32 dot_11n_dev_cap;
10055e6e3a92SBing Zhao 	u8 dev_mcs_support;
10065e6e3a92SBing Zhao 	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
1007a5f39056SYogesh Ashok Powar 	__le16 mgmt_buf_count;	/* mgmt IE buffer count */
1008a5f39056SYogesh Ashok Powar 	__le32 reserved_5;
1009a5f39056SYogesh Ashok Powar 	__le32 reserved_6;
1010a5f39056SYogesh Ashok Powar 	__le32 dot_11ac_dev_cap;
1011a5f39056SYogesh Ashok Powar 	__le32 dot_11ac_mcs_support;
10127f445d04SAvinash Patil 	u8 tlvs[0];
10135e6e3a92SBing Zhao } __packed;
10145e6e3a92SBing Zhao 
10155e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info {
10165e6e3a92SBing Zhao 	__le16 action;
10175e6e3a92SBing Zhao 	__le16 ndata;
10185e6e3a92SBing Zhao 	__le16 nbcn;
10195e6e3a92SBing Zhao 	__le16 reserved[9];
10205e6e3a92SBing Zhao 	long long reserved_1;
10215e6e3a92SBing Zhao };
10225e6e3a92SBing Zhao 
10235e6e3a92SBing Zhao struct host_cmd_ds_802_11_rssi_info_rsp {
10245e6e3a92SBing Zhao 	__le16 action;
10255e6e3a92SBing Zhao 	__le16 ndata;
10265e6e3a92SBing Zhao 	__le16 nbcn;
10275e6e3a92SBing Zhao 	__le16 data_rssi_last;
10285e6e3a92SBing Zhao 	__le16 data_nf_last;
10295e6e3a92SBing Zhao 	__le16 data_rssi_avg;
10305e6e3a92SBing Zhao 	__le16 data_nf_avg;
10315e6e3a92SBing Zhao 	__le16 bcn_rssi_last;
10325e6e3a92SBing Zhao 	__le16 bcn_nf_last;
10335e6e3a92SBing Zhao 	__le16 bcn_rssi_avg;
10345e6e3a92SBing Zhao 	__le16 bcn_nf_avg;
10355e6e3a92SBing Zhao 	long long tsf_bcn;
10365e6e3a92SBing Zhao };
10375e6e3a92SBing Zhao 
10385e6e3a92SBing Zhao struct host_cmd_ds_802_11_mac_address {
10395e6e3a92SBing Zhao 	__le16 action;
10405e6e3a92SBing Zhao 	u8 mac_addr[ETH_ALEN];
10415e6e3a92SBing Zhao };
10425e6e3a92SBing Zhao 
10435e6e3a92SBing Zhao struct host_cmd_ds_mac_control {
10445e6e3a92SBing Zhao 	__le16 action;
10455e6e3a92SBing Zhao 	__le16 reserved;
10465e6e3a92SBing Zhao };
10475e6e3a92SBing Zhao 
10485e6e3a92SBing Zhao struct host_cmd_ds_mac_multicast_adr {
10495e6e3a92SBing Zhao 	__le16 action;
10505e6e3a92SBing Zhao 	__le16 num_of_adrs;
10515e6e3a92SBing Zhao 	u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
10525e6e3a92SBing Zhao } __packed;
10535e6e3a92SBing Zhao 
10545e6e3a92SBing Zhao struct host_cmd_ds_802_11_deauthenticate {
10555e6e3a92SBing Zhao 	u8 mac_addr[ETH_ALEN];
10565e6e3a92SBing Zhao 	__le16 reason_code;
10575e6e3a92SBing Zhao } __packed;
10585e6e3a92SBing Zhao 
10595e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate {
10605e6e3a92SBing Zhao 	u8 peer_sta_addr[ETH_ALEN];
10615e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
10625e6e3a92SBing Zhao 	__le16 listen_interval;
10635e6e3a92SBing Zhao 	__le16 beacon_period;
10645e6e3a92SBing Zhao 	u8 dtim_period;
10655e6e3a92SBing Zhao } __packed;
10665e6e3a92SBing Zhao 
10675e6e3a92SBing Zhao struct ieee_types_assoc_rsp {
10685e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
10695e6e3a92SBing Zhao 	__le16 status_code;
10705e6e3a92SBing Zhao 	__le16 a_id;
107144ca509cSNachiket Kukade 	u8 ie_buffer[0];
10725e6e3a92SBing Zhao } __packed;
10735e6e3a92SBing Zhao 
10745e6e3a92SBing Zhao struct host_cmd_ds_802_11_associate_rsp {
10755e6e3a92SBing Zhao 	struct ieee_types_assoc_rsp assoc_rsp;
10765e6e3a92SBing Zhao } __packed;
10775e6e3a92SBing Zhao 
10785e6e3a92SBing Zhao struct ieee_types_cf_param_set {
10795e6e3a92SBing Zhao 	u8 element_id;
10805e6e3a92SBing Zhao 	u8 len;
10815e6e3a92SBing Zhao 	u8 cfp_cnt;
10825e6e3a92SBing Zhao 	u8 cfp_period;
10834348d085SUjjal Roy 	__le16 cfp_max_duration;
10844348d085SUjjal Roy 	__le16 cfp_duration_remaining;
10855e6e3a92SBing Zhao } __packed;
10865e6e3a92SBing Zhao 
10875e6e3a92SBing Zhao struct ieee_types_ibss_param_set {
10885e6e3a92SBing Zhao 	u8 element_id;
10895e6e3a92SBing Zhao 	u8 len;
10905e6e3a92SBing Zhao 	__le16 atim_window;
10915e6e3a92SBing Zhao } __packed;
10925e6e3a92SBing Zhao 
10935e6e3a92SBing Zhao union ieee_types_ss_param_set {
10945e6e3a92SBing Zhao 	struct ieee_types_cf_param_set cf_param_set;
10955e6e3a92SBing Zhao 	struct ieee_types_ibss_param_set ibss_param_set;
10965e6e3a92SBing Zhao } __packed;
10975e6e3a92SBing Zhao 
10985e6e3a92SBing Zhao struct ieee_types_fh_param_set {
10995e6e3a92SBing Zhao 	u8 element_id;
11005e6e3a92SBing Zhao 	u8 len;
11015e6e3a92SBing Zhao 	__le16 dwell_time;
11025e6e3a92SBing Zhao 	u8 hop_set;
11035e6e3a92SBing Zhao 	u8 hop_pattern;
11045e6e3a92SBing Zhao 	u8 hop_index;
11055e6e3a92SBing Zhao } __packed;
11065e6e3a92SBing Zhao 
11075e6e3a92SBing Zhao struct ieee_types_ds_param_set {
11085e6e3a92SBing Zhao 	u8 element_id;
11095e6e3a92SBing Zhao 	u8 len;
11105e6e3a92SBing Zhao 	u8 current_chan;
11115e6e3a92SBing Zhao } __packed;
11125e6e3a92SBing Zhao 
11135e6e3a92SBing Zhao union ieee_types_phy_param_set {
11145e6e3a92SBing Zhao 	struct ieee_types_fh_param_set fh_param_set;
11155e6e3a92SBing Zhao 	struct ieee_types_ds_param_set ds_param_set;
11165e6e3a92SBing Zhao } __packed;
11175e6e3a92SBing Zhao 
1118a5f39056SYogesh Ashok Powar struct ieee_types_oper_mode_ntf {
1119a5f39056SYogesh Ashok Powar 	u8 element_id;
1120a5f39056SYogesh Ashok Powar 	u8 len;
1121a5f39056SYogesh Ashok Powar 	u8 oper_mode;
1122a5f39056SYogesh Ashok Powar } __packed;
1123a5f39056SYogesh Ashok Powar 
11245e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_start {
11255e6e3a92SBing Zhao 	u8 ssid[IEEE80211_MAX_SSID_LEN];
11265e6e3a92SBing Zhao 	u8 bss_mode;
11275e6e3a92SBing Zhao 	__le16 beacon_period;
11285e6e3a92SBing Zhao 	u8 dtim_period;
11295e6e3a92SBing Zhao 	union ieee_types_ss_param_set ss_param_set;
11305e6e3a92SBing Zhao 	union ieee_types_phy_param_set phy_param_set;
11315e6e3a92SBing Zhao 	u16 reserved1;
11325e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
113363af6333SYogesh Ashok Powar 	u8 data_rate[HOSTCMD_SUPPORTED_RATES];
11345e6e3a92SBing Zhao } __packed;
11355e6e3a92SBing Zhao 
1136d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_start_result {
11375e6e3a92SBing Zhao 	u8 pad[3];
11385e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
1139d5556e87SAmitkumar Karwar 	u8 pad2[2];
1140d5556e87SAmitkumar Karwar 	u8 result;
1141d5556e87SAmitkumar Karwar } __packed;
1142d5556e87SAmitkumar Karwar 
1143d5556e87SAmitkumar Karwar struct host_cmd_ds_802_11_ad_hoc_join_result {
1144d5556e87SAmitkumar Karwar 	u8 result;
11455e6e3a92SBing Zhao } __packed;
11465e6e3a92SBing Zhao 
11475e6e3a92SBing Zhao struct adhoc_bss_desc {
11485e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
11495e6e3a92SBing Zhao 	u8 ssid[IEEE80211_MAX_SSID_LEN];
11505e6e3a92SBing Zhao 	u8 bss_mode;
11515e6e3a92SBing Zhao 	__le16 beacon_period;
11525e6e3a92SBing Zhao 	u8 dtim_period;
11535e6e3a92SBing Zhao 	u8 time_stamp[8];
11545e6e3a92SBing Zhao 	u8 local_time[8];
11555e6e3a92SBing Zhao 	union ieee_types_phy_param_set phy_param_set;
11565e6e3a92SBing Zhao 	union ieee_types_ss_param_set ss_param_set;
11575e6e3a92SBing Zhao 	__le16 cap_info_bitmap;
11585e6e3a92SBing Zhao 	u8 data_rates[HOSTCMD_SUPPORTED_RATES];
11595e6e3a92SBing Zhao 
11605e6e3a92SBing Zhao 	/*
11615e6e3a92SBing Zhao 	 *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
11625e6e3a92SBing Zhao 	 *  It is used in the Adhoc join command and will cause a
11635e6e3a92SBing Zhao 	 *  binary layout mismatch with the firmware
11645e6e3a92SBing Zhao 	 */
11655e6e3a92SBing Zhao } __packed;
11665e6e3a92SBing Zhao 
11675e6e3a92SBing Zhao struct host_cmd_ds_802_11_ad_hoc_join {
11685e6e3a92SBing Zhao 	struct adhoc_bss_desc bss_descriptor;
11695e6e3a92SBing Zhao 	u16 reserved1;
11705e6e3a92SBing Zhao 	u16 reserved2;
11715e6e3a92SBing Zhao } __packed;
11725e6e3a92SBing Zhao 
11735e6e3a92SBing Zhao struct host_cmd_ds_802_11_get_log {
11745e6e3a92SBing Zhao 	__le32 mcast_tx_frame;
11755e6e3a92SBing Zhao 	__le32 failed;
11765e6e3a92SBing Zhao 	__le32 retry;
11775e6e3a92SBing Zhao 	__le32 multi_retry;
11785e6e3a92SBing Zhao 	__le32 frame_dup;
11795e6e3a92SBing Zhao 	__le32 rts_success;
11805e6e3a92SBing Zhao 	__le32 rts_failure;
11815e6e3a92SBing Zhao 	__le32 ack_failure;
11825e6e3a92SBing Zhao 	__le32 rx_frag;
11835e6e3a92SBing Zhao 	__le32 mcast_rx_frame;
11845e6e3a92SBing Zhao 	__le32 fcs_error;
11855e6e3a92SBing Zhao 	__le32 tx_frame;
11865e6e3a92SBing Zhao 	__le32 reserved;
11875e6e3a92SBing Zhao 	__le32 wep_icv_err_cnt[4];
1188d35b6392SXinming Hu 	__le32 bcn_rcv_cnt;
1189d35b6392SXinming Hu 	__le32 bcn_miss_cnt;
11905e6e3a92SBing Zhao };
11915e6e3a92SBing Zhao 
1192a5f39056SYogesh Ashok Powar /* Enumeration for rate format */
1193a5f39056SYogesh Ashok Powar enum _mwifiex_rate_format {
1194a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_LG = 0,
1195a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_HT,
1196a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_VHT,
1197a5f39056SYogesh Ashok Powar 	MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
1198a5f39056SYogesh Ashok Powar };
1199a5f39056SYogesh Ashok Powar 
12005e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_query {
12015e6e3a92SBing Zhao 	u8 tx_rate;
1202a5f39056SYogesh Ashok Powar 	/* Tx Rate Info: For 802.11 AC cards
1203a5f39056SYogesh Ashok Powar 	 *
1204a5f39056SYogesh Ashok Powar 	 * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
1205a5f39056SYogesh Ashok Powar 	 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
1206a5f39056SYogesh Ashok Powar 	 * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
1207a5f39056SYogesh Ashok Powar 	 *
1208a5f39056SYogesh Ashok Powar 	 * For non-802.11 AC cards
1209a5f39056SYogesh Ashok Powar 	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
12105e6e3a92SBing Zhao 	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
1211a5f39056SYogesh Ashok Powar 	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
1212a5f39056SYogesh Ashok Powar 	 */
12135e6e3a92SBing Zhao 	u8 ht_info;
12145e6e3a92SBing Zhao } __packed;
12155e6e3a92SBing Zhao 
12164e6ee91bSAvinash Patil struct mwifiex_tx_pause_tlv {
12174e6ee91bSAvinash Patil 	struct mwifiex_ie_types_header header;
12184e6ee91bSAvinash Patil 	u8 peermac[ETH_ALEN];
12194e6ee91bSAvinash Patil 	u8 tx_pause;
12204e6ee91bSAvinash Patil 	u8 pkt_cnt;
12214e6ee91bSAvinash Patil } __packed;
12224e6ee91bSAvinash Patil 
12235e6e3a92SBing Zhao enum Host_Sleep_Action {
12245e6e3a92SBing Zhao 	HS_CONFIGURE = 0x0001,
12255e6e3a92SBing Zhao 	HS_ACTIVATE  = 0x0002,
12265e6e3a92SBing Zhao };
12275e6e3a92SBing Zhao 
12285e6e3a92SBing Zhao struct mwifiex_hs_config_param {
12295e6e3a92SBing Zhao 	__le32 conditions;
12305e6e3a92SBing Zhao 	u8 gpio;
12315e6e3a92SBing Zhao 	u8 gap;
12325e6e3a92SBing Zhao } __packed;
12335e6e3a92SBing Zhao 
12345e6e3a92SBing Zhao struct hs_activate_param {
12354348d085SUjjal Roy 	__le16 resp_ctrl;
12365e6e3a92SBing Zhao } __packed;
12375e6e3a92SBing Zhao 
12385e6e3a92SBing Zhao struct host_cmd_ds_802_11_hs_cfg_enh {
12395e6e3a92SBing Zhao 	__le16 action;
12405e6e3a92SBing Zhao 
12415e6e3a92SBing Zhao 	union {
12425e6e3a92SBing Zhao 		struct mwifiex_hs_config_param hs_config;
12435e6e3a92SBing Zhao 		struct hs_activate_param hs_activate;
12445e6e3a92SBing Zhao 	} params;
12455e6e3a92SBing Zhao } __packed;
12465e6e3a92SBing Zhao 
12475e6e3a92SBing Zhao enum SNMP_MIB_INDEX {
12485e6e3a92SBing Zhao 	OP_RATE_SET_I = 1,
12495e6e3a92SBing Zhao 	DTIM_PERIOD_I = 3,
12505e6e3a92SBing Zhao 	RTS_THRESH_I = 5,
12515e6e3a92SBing Zhao 	SHORT_RETRY_LIM_I = 6,
12525e6e3a92SBing Zhao 	LONG_RETRY_LIM_I = 7,
12535e6e3a92SBing Zhao 	FRAG_THRESH_I = 8,
12545e6e3a92SBing Zhao 	DOT11D_I = 9,
12552a7305c8SAmitkumar Karwar 	DOT11H_I = 10,
12565e6e3a92SBing Zhao };
12575e6e3a92SBing Zhao 
125812d11109SAvinash Patil enum mwifiex_assocmd_failurepoint {
125912d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_SUCCESS = 0,
126012d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_ASSOC,
126112d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_AUTH,
126212d11109SAvinash Patil 	MWIFIEX_ASSOC_CMD_FAILURE_JOIN
126312d11109SAvinash Patil };
126412d11109SAvinash Patil 
12655e6e3a92SBing Zhao #define MAX_SNMP_BUF_SIZE   128
12665e6e3a92SBing Zhao 
12675e6e3a92SBing Zhao struct host_cmd_ds_802_11_snmp_mib {
12685e6e3a92SBing Zhao 	__le16 query_type;
12695e6e3a92SBing Zhao 	__le16 oid;
12705e6e3a92SBing Zhao 	__le16 buf_size;
12715e6e3a92SBing Zhao 	u8 value[1];
12725e6e3a92SBing Zhao } __packed;
12735e6e3a92SBing Zhao 
12745e6e3a92SBing Zhao struct mwifiex_rate_scope {
12755e6e3a92SBing Zhao 	__le16 type;
12765e6e3a92SBing Zhao 	__le16 length;
12775e6e3a92SBing Zhao 	__le16 hr_dsss_rate_bitmap;
12785e6e3a92SBing Zhao 	__le16 ofdm_rate_bitmap;
12795e6e3a92SBing Zhao 	__le16 ht_mcs_rate_bitmap[8];
1280a0b7315aSAmitkumar Karwar 	__le16 vht_mcs_rate_bitmap[8];
12815e6e3a92SBing Zhao } __packed;
12825e6e3a92SBing Zhao 
12835e6e3a92SBing Zhao struct mwifiex_rate_drop_pattern {
12845e6e3a92SBing Zhao 	__le16 type;
12855e6e3a92SBing Zhao 	__le16 length;
12865e6e3a92SBing Zhao 	__le32 rate_drop_mode;
12875e6e3a92SBing Zhao } __packed;
12885e6e3a92SBing Zhao 
12895e6e3a92SBing Zhao struct host_cmd_ds_tx_rate_cfg {
12905e6e3a92SBing Zhao 	__le16 action;
12915e6e3a92SBing Zhao 	__le16 cfg_index;
12925e6e3a92SBing Zhao } __packed;
12935e6e3a92SBing Zhao 
12945e6e3a92SBing Zhao struct mwifiex_power_group {
12955e6e3a92SBing Zhao 	u8 modulation_class;
12965e6e3a92SBing Zhao 	u8 first_rate_code;
12975e6e3a92SBing Zhao 	u8 last_rate_code;
12985e6e3a92SBing Zhao 	s8 power_step;
12995e6e3a92SBing Zhao 	s8 power_min;
13005e6e3a92SBing Zhao 	s8 power_max;
13015e6e3a92SBing Zhao 	u8 ht_bandwidth;
13025e6e3a92SBing Zhao 	u8 reserved;
13035e6e3a92SBing Zhao } __packed;
13045e6e3a92SBing Zhao 
13055e6e3a92SBing Zhao struct mwifiex_types_power_group {
1306930fd35cSAmitkumar Karwar 	__le16 type;
1307930fd35cSAmitkumar Karwar 	__le16 length;
13085e6e3a92SBing Zhao } __packed;
13095e6e3a92SBing Zhao 
13105e6e3a92SBing Zhao struct host_cmd_ds_txpwr_cfg {
13115e6e3a92SBing Zhao 	__le16 action;
13125e6e3a92SBing Zhao 	__le16 cfg_index;
13135e6e3a92SBing Zhao 	__le32 mode;
13145e6e3a92SBing Zhao } __packed;
13155e6e3a92SBing Zhao 
1316caa8984fSAmitkumar Karwar struct host_cmd_ds_rf_tx_pwr {
1317caa8984fSAmitkumar Karwar 	__le16 action;
1318caa8984fSAmitkumar Karwar 	__le16 cur_level;
1319caa8984fSAmitkumar Karwar 	u8 max_power;
1320caa8984fSAmitkumar Karwar 	u8 min_power;
1321caa8984fSAmitkumar Karwar } __packed;
1322caa8984fSAmitkumar Karwar 
13238a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_mimo {
13248a279d5bSAmitkumar Karwar 	__le16 action_tx;
13258a279d5bSAmitkumar Karwar 	__le16 tx_ant_mode;
13268a279d5bSAmitkumar Karwar 	__le16 action_rx;
13278a279d5bSAmitkumar Karwar 	__le16 rx_ant_mode;
13288a279d5bSAmitkumar Karwar };
13298a279d5bSAmitkumar Karwar 
13308a279d5bSAmitkumar Karwar struct host_cmd_ds_rf_ant_siso {
13318a279d5bSAmitkumar Karwar 	__le16 action;
13328a279d5bSAmitkumar Karwar 	__le16 ant_mode;
13338a279d5bSAmitkumar Karwar };
13348a279d5bSAmitkumar Karwar 
1335429d90d2SAvinash Patil struct host_cmd_ds_tdls_oper {
1336429d90d2SAvinash Patil 	__le16 tdls_action;
1337429d90d2SAvinash Patil 	__le16 reason;
1338429d90d2SAvinash Patil 	u8 peer_mac[ETH_ALEN];
1339429d90d2SAvinash Patil } __packed;
1340429d90d2SAvinash Patil 
1341449b8bbfSXinming Hu struct mwifiex_tdls_config {
1342449b8bbfSXinming Hu 	__le16 enable;
1343449b8bbfSXinming Hu };
1344449b8bbfSXinming Hu 
1345449b8bbfSXinming Hu struct mwifiex_tdls_config_cs_params {
1346449b8bbfSXinming Hu 	u8 unit_time;
1347449b8bbfSXinming Hu 	u8 thr_otherlink;
1348449b8bbfSXinming Hu 	u8 thr_directlink;
1349449b8bbfSXinming Hu };
1350449b8bbfSXinming Hu 
1351449b8bbfSXinming Hu struct mwifiex_tdls_init_cs_params {
1352449b8bbfSXinming Hu 	u8 peer_mac[ETH_ALEN];
1353449b8bbfSXinming Hu 	u8 primary_chan;
1354449b8bbfSXinming Hu 	u8 second_chan_offset;
1355449b8bbfSXinming Hu 	u8 band;
1356449b8bbfSXinming Hu 	__le16 switch_time;
1357449b8bbfSXinming Hu 	__le16 switch_timeout;
1358449b8bbfSXinming Hu 	u8 reg_class;
1359449b8bbfSXinming Hu 	u8 periodicity;
1360449b8bbfSXinming Hu } __packed;
1361449b8bbfSXinming Hu 
1362449b8bbfSXinming Hu struct mwifiex_tdls_stop_cs_params {
1363449b8bbfSXinming Hu 	u8 peer_mac[ETH_ALEN];
1364449b8bbfSXinming Hu };
1365449b8bbfSXinming Hu 
1366449b8bbfSXinming Hu struct host_cmd_ds_tdls_config {
1367449b8bbfSXinming Hu 	__le16 tdls_action;
1368449b8bbfSXinming Hu 	u8 tdls_data[1];
1369449b8bbfSXinming Hu } __packed;
1370449b8bbfSXinming Hu 
137185afb186SAvinash Patil struct mwifiex_chan_desc {
137285afb186SAvinash Patil 	__le16 start_freq;
137385afb186SAvinash Patil 	u8 chan_width;
137485afb186SAvinash Patil 	u8 chan_num;
137585afb186SAvinash Patil } __packed;
137685afb186SAvinash Patil 
137785afb186SAvinash Patil struct host_cmd_ds_chan_rpt_req {
137885afb186SAvinash Patil 	struct mwifiex_chan_desc chan_desc;
137985afb186SAvinash Patil 	__le32 msec_dwell_time;
138085afb186SAvinash Patil } __packed;
138185afb186SAvinash Patil 
13820a694d68SAvinash Patil struct host_cmd_ds_chan_rpt_event {
13830a694d68SAvinash Patil 	__le32 result;
13840a694d68SAvinash Patil 	__le64 start_tsf;
13850a694d68SAvinash Patil 	__le32 duration;
13860a694d68SAvinash Patil 	u8 tlvbuf[0];
13870a694d68SAvinash Patil } __packed;
13880a694d68SAvinash Patil 
138992263a84SZhaoyang Liu struct host_cmd_sdio_sp_rx_aggr_cfg {
139092263a84SZhaoyang Liu 	u8 action;
139192263a84SZhaoyang Liu 	u8 enable;
139292263a84SZhaoyang Liu 	__le16 block_size;
139392263a84SZhaoyang Liu } __packed;
139492263a84SZhaoyang Liu 
1395b8b3ececSAmitkumar Karwar struct mwifiex_fixed_bcn_param {
1396b5abcf02SAmitkumar Karwar 	__le64 timestamp;
13977c6fa2a8SAmitkumar Karwar 	__le16 beacon_period;
13987c6fa2a8SAmitkumar Karwar 	__le16 cap_info_bitmap;
13997c6fa2a8SAmitkumar Karwar } __packed;
14007c6fa2a8SAmitkumar Karwar 
140121f58d20SAmitkumar Karwar struct mwifiex_event_scan_result {
140221f58d20SAmitkumar Karwar 	__le16 event_id;
140321f58d20SAmitkumar Karwar 	u8 bss_index;
140421f58d20SAmitkumar Karwar 	u8 bss_type;
140521f58d20SAmitkumar Karwar 	u8 more_event;
140621f58d20SAmitkumar Karwar 	u8 reserved[3];
140721f58d20SAmitkumar Karwar 	__le16 buf_size;
140821f58d20SAmitkumar Karwar 	u8 num_of_set;
140921f58d20SAmitkumar Karwar } __packed;
141021f58d20SAmitkumar Karwar 
1411808bbebcSAmitkumar Karwar struct tx_status_event {
1412808bbebcSAmitkumar Karwar 	u8 packet_type;
1413808bbebcSAmitkumar Karwar 	u8 tx_token_id;
1414808bbebcSAmitkumar Karwar 	u8 status;
1415808bbebcSAmitkumar Karwar } __packed;
1416808bbebcSAmitkumar Karwar 
14175e6e3a92SBing Zhao #define MWIFIEX_USER_SCAN_CHAN_MAX             50
14185e6e3a92SBing Zhao 
14195e6e3a92SBing Zhao #define MWIFIEX_MAX_SSID_LIST_LENGTH         10
14205e6e3a92SBing Zhao 
14215e6e3a92SBing Zhao struct mwifiex_scan_cmd_config {
14225e6e3a92SBing Zhao 	/*
1423a8c48565SBing Zhao 	 *  BSS mode to be sent in the firmware command
14245e6e3a92SBing Zhao 	 */
14255e6e3a92SBing Zhao 	u8 bss_mode;
14265e6e3a92SBing Zhao 
14275e6e3a92SBing Zhao 	/* Specific BSSID used to filter scan results in the firmware */
14285e6e3a92SBing Zhao 	u8 specific_bssid[ETH_ALEN];
14295e6e3a92SBing Zhao 
14305e6e3a92SBing Zhao 	/* Length of TLVs sent in command starting at tlvBuffer */
14315e6e3a92SBing Zhao 	u32 tlv_buf_len;
14325e6e3a92SBing Zhao 
14335e6e3a92SBing Zhao 	/*
14345e6e3a92SBing Zhao 	 *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
14355e6e3a92SBing Zhao 	 *
14365e6e3a92SBing Zhao 	 *  TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
14375e6e3a92SBing Zhao 	 *  WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
14385e6e3a92SBing Zhao 	 */
14395e6e3a92SBing Zhao 	u8 tlv_buf[1];	/* SSID TLV(s) and ChanList TLVs are stored
14405e6e3a92SBing Zhao 				   here */
14415e6e3a92SBing Zhao } __packed;
14425e6e3a92SBing Zhao 
14435e6e3a92SBing Zhao struct mwifiex_user_scan_chan {
14445e6e3a92SBing Zhao 	u8 chan_number;
14455e6e3a92SBing Zhao 	u8 radio_type;
14465e6e3a92SBing Zhao 	u8 scan_type;
14475e6e3a92SBing Zhao 	u8 reserved;
14485e6e3a92SBing Zhao 	u32 scan_time;
14495e6e3a92SBing Zhao } __packed;
14505e6e3a92SBing Zhao 
14515e6e3a92SBing Zhao struct mwifiex_user_scan_cfg {
14525e6e3a92SBing Zhao 	/*
14535e6e3a92SBing Zhao 	 *  BSS mode to be sent in the firmware command
14545e6e3a92SBing Zhao 	 */
14555e6e3a92SBing Zhao 	u8 bss_mode;
14565e6e3a92SBing Zhao 	/* Configure the number of probe requests for active chan scans */
14575e6e3a92SBing Zhao 	u8 num_probes;
14585e6e3a92SBing Zhao 	u8 reserved;
14595e6e3a92SBing Zhao 	/* BSSID filter sent in the firmware command to limit the results */
14605e6e3a92SBing Zhao 	u8 specific_bssid[ETH_ALEN];
1461be0b281eSAmitkumar Karwar 	/* SSID filter list used in the firmware to limit the scan results */
1462be0b281eSAmitkumar Karwar 	struct cfg80211_ssid *ssid_list;
1463be0b281eSAmitkumar Karwar 	u8 num_ssids;
14645e6e3a92SBing Zhao 	/* Variable number (fixed maximum) of channels to scan up */
14655e6e3a92SBing Zhao 	struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
1466cb91be87SAvinash Patil 	u16 scan_chan_gap;
14675e6e3a92SBing Zhao } __packed;
14685e6e3a92SBing Zhao 
14690c9b7f22SXinming Hu #define MWIFIEX_BG_SCAN_CHAN_MAX 38
14700c9b7f22SXinming Hu #define MWIFIEX_BSS_MODE_INFRA 1
14710c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_GET     0x0000
14720c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET     0x0001
14730c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01
14740c9b7f22SXinming Hu /** ssid match */
14750c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_MATCH          0x0001
14760c9b7f22SXinming Hu /** ssid match and RSSI exceeded */
14770c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_SSID_RSSI_MATCH     0x0004
14780c9b7f22SXinming Hu /**wait for all channel scan to complete to report scan result*/
14790c9b7f22SXinming Hu #define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE  0x80000000
14800c9b7f22SXinming Hu 
14810c9b7f22SXinming Hu struct mwifiex_bg_scan_cfg {
14820c9b7f22SXinming Hu 	u16 action;
14830c9b7f22SXinming Hu 	u8 enable;
14840c9b7f22SXinming Hu 	u8 bss_type;
14850c9b7f22SXinming Hu 	u8 chan_per_scan;
14860c9b7f22SXinming Hu 	u32 scan_interval;
14870c9b7f22SXinming Hu 	u32 report_condition;
14880c9b7f22SXinming Hu 	u8 num_probes;
14890c9b7f22SXinming Hu 	u8 rssi_threshold;
14900c9b7f22SXinming Hu 	u8 snr_threshold;
14910c9b7f22SXinming Hu 	u16 repeat_count;
14920c9b7f22SXinming Hu 	u16 start_later;
14930c9b7f22SXinming Hu 	struct cfg80211_match_set *ssid_list;
14940c9b7f22SXinming Hu 	u8 num_ssids;
14950c9b7f22SXinming Hu 	struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX];
14960c9b7f22SXinming Hu 	u16 scan_chan_gap;
14970c9b7f22SXinming Hu } __packed;
14980c9b7f22SXinming Hu 
14995e6e3a92SBing Zhao struct ie_body {
15005e6e3a92SBing Zhao 	u8 grp_key_oui[4];
15015e6e3a92SBing Zhao 	u8 ptk_cnt[2];
15025e6e3a92SBing Zhao 	u8 ptk_body[4];
15035e6e3a92SBing Zhao } __packed;
15045e6e3a92SBing Zhao 
15055e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan {
15065e6e3a92SBing Zhao 	u8 bss_mode;
15075e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
15085e6e3a92SBing Zhao 	u8 tlv_buffer[1];
15095e6e3a92SBing Zhao } __packed;
15105e6e3a92SBing Zhao 
15115e6e3a92SBing Zhao struct host_cmd_ds_802_11_scan_rsp {
15125e6e3a92SBing Zhao 	__le16 bss_descript_size;
15135e6e3a92SBing Zhao 	u8 number_of_sets;
15145e6e3a92SBing Zhao 	u8 bss_desc_and_tlv_buffer[1];
15155e6e3a92SBing Zhao } __packed;
15165e6e3a92SBing Zhao 
151721f58d20SAmitkumar Karwar struct host_cmd_ds_802_11_scan_ext {
151821f58d20SAmitkumar Karwar 	u32   reserved;
151921f58d20SAmitkumar Karwar 	u8    tlv_buffer[1];
152021f58d20SAmitkumar Karwar } __packed;
152121f58d20SAmitkumar Karwar 
152240d7412bSAniket Nagarnaik struct mwifiex_ie_types_bss_mode {
152340d7412bSAniket Nagarnaik 	struct mwifiex_ie_types_header  header;
152440d7412bSAniket Nagarnaik 	u8 bss_mode;
152540d7412bSAniket Nagarnaik } __packed;
152640d7412bSAniket Nagarnaik 
152721f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_rsp {
152821f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
152921f58d20SAmitkumar Karwar 	u8 bssid[ETH_ALEN];
153021f58d20SAmitkumar Karwar 	u8 frame_body[1];
153121f58d20SAmitkumar Karwar } __packed;
153221f58d20SAmitkumar Karwar 
153321f58d20SAmitkumar Karwar struct mwifiex_ie_types_bss_scan_info {
153421f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
153521f58d20SAmitkumar Karwar 	__le16 rssi;
153621f58d20SAmitkumar Karwar 	__le16 anpi;
153721f58d20SAmitkumar Karwar 	u8 cca_busy_fraction;
153821f58d20SAmitkumar Karwar 	u8 radio_type;
153921f58d20SAmitkumar Karwar 	u8 channel;
154021f58d20SAmitkumar Karwar 	u8 reserved;
154121f58d20SAmitkumar Karwar 	__le64 tsf;
154221f58d20SAmitkumar Karwar } __packed;
154321f58d20SAmitkumar Karwar 
15440c9b7f22SXinming Hu struct host_cmd_ds_802_11_bg_scan_config {
15450c9b7f22SXinming Hu 	__le16 action;
15460c9b7f22SXinming Hu 	u8 enable;
15470c9b7f22SXinming Hu 	u8 bss_type;
15480c9b7f22SXinming Hu 	u8 chan_per_scan;
15490c9b7f22SXinming Hu 	u8 reserved;
15500c9b7f22SXinming Hu 	__le16 reserved1;
15510c9b7f22SXinming Hu 	__le32 scan_interval;
15520c9b7f22SXinming Hu 	__le32 reserved2;
15530c9b7f22SXinming Hu 	__le32 report_condition;
15540c9b7f22SXinming Hu 	__le16 reserved3;
15550c9b7f22SXinming Hu 	u8 tlv[0];
15560c9b7f22SXinming Hu } __packed;
15570c9b7f22SXinming Hu 
15585e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query {
15595e6e3a92SBing Zhao 	u8 flush;
15605e6e3a92SBing Zhao } __packed;
15615e6e3a92SBing Zhao 
15625e6e3a92SBing Zhao struct host_cmd_ds_802_11_bg_scan_query_rsp {
15634348d085SUjjal Roy 	__le32 report_condition;
15645e6e3a92SBing Zhao 	struct host_cmd_ds_802_11_scan_rsp scan_resp;
15655e6e3a92SBing Zhao } __packed;
15665e6e3a92SBing Zhao 
15675e6e3a92SBing Zhao struct mwifiex_ietypes_domain_param_set {
15685e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
15695e6e3a92SBing Zhao 	u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
15705e6e3a92SBing Zhao 	struct ieee80211_country_ie_triplet triplet[1];
15715e6e3a92SBing Zhao } __packed;
15725e6e3a92SBing Zhao 
15735e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info {
15745e6e3a92SBing Zhao 	__le16 action;
15755e6e3a92SBing Zhao 	struct mwifiex_ietypes_domain_param_set domain;
15765e6e3a92SBing Zhao } __packed;
15775e6e3a92SBing Zhao 
15785e6e3a92SBing Zhao struct host_cmd_ds_802_11d_domain_info_rsp {
15795e6e3a92SBing Zhao 	__le16 action;
15805e6e3a92SBing Zhao 	struct mwifiex_ietypes_domain_param_set domain;
15815e6e3a92SBing Zhao } __packed;
15825e6e3a92SBing Zhao 
15835e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_req {
15845e6e3a92SBing Zhao 	u8 add_req_result;
15855e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
15865e6e3a92SBing Zhao 	u8 dialog_token;
15875e6e3a92SBing Zhao 	__le16 block_ack_param_set;
15885e6e3a92SBing Zhao 	__le16 block_ack_tmo;
15895e6e3a92SBing Zhao 	__le16 ssn;
15905e6e3a92SBing Zhao } __packed;
15915e6e3a92SBing Zhao 
15925e6e3a92SBing Zhao struct host_cmd_ds_11n_addba_rsp {
15935e6e3a92SBing Zhao 	u8 add_rsp_result;
15945e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
15955e6e3a92SBing Zhao 	u8 dialog_token;
15965e6e3a92SBing Zhao 	__le16 status_code;
15975e6e3a92SBing Zhao 	__le16 block_ack_param_set;
15985e6e3a92SBing Zhao 	__le16 block_ack_tmo;
15995e6e3a92SBing Zhao 	__le16 ssn;
16005e6e3a92SBing Zhao } __packed;
16015e6e3a92SBing Zhao 
16025e6e3a92SBing Zhao struct host_cmd_ds_11n_delba {
16035e6e3a92SBing Zhao 	u8 del_result;
16045e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16055e6e3a92SBing Zhao 	__le16 del_ba_param_set;
16065e6e3a92SBing Zhao 	__le16 reason_code;
16075e6e3a92SBing Zhao 	u8 reserved;
16085e6e3a92SBing Zhao } __packed;
16095e6e3a92SBing Zhao 
16105e6e3a92SBing Zhao struct host_cmd_ds_11n_batimeout {
16115e6e3a92SBing Zhao 	u8 tid;
16125e6e3a92SBing Zhao 	u8 peer_mac_addr[ETH_ALEN];
16135e6e3a92SBing Zhao 	u8 origninator;
16145e6e3a92SBing Zhao } __packed;
16155e6e3a92SBing Zhao 
16165e6e3a92SBing Zhao struct host_cmd_ds_11n_cfg {
16175e6e3a92SBing Zhao 	__le16 action;
16185e6e3a92SBing Zhao 	__le16 ht_tx_cap;
16195e6e3a92SBing Zhao 	__le16 ht_tx_info;
1620a5f39056SYogesh Ashok Powar 	__le16 misc_config;	/* Needed for 802.11AC cards only */
16215e6e3a92SBing Zhao } __packed;
16225e6e3a92SBing Zhao 
16235e6e3a92SBing Zhao struct host_cmd_ds_txbuf_cfg {
16245e6e3a92SBing Zhao 	__le16 action;
16255e6e3a92SBing Zhao 	__le16 buff_size;
16265e6e3a92SBing Zhao 	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
16275e6e3a92SBing Zhao 	__le16 reserved3;
16285e6e3a92SBing Zhao } __packed;
16295e6e3a92SBing Zhao 
16305e6e3a92SBing Zhao struct host_cmd_ds_amsdu_aggr_ctrl {
16315e6e3a92SBing Zhao 	__le16 action;
16325e6e3a92SBing Zhao 	__le16 enable;
16335e6e3a92SBing Zhao 	__le16 curr_buf_size;
16345e6e3a92SBing Zhao } __packed;
16355e6e3a92SBing Zhao 
16360f9e9b8bSAvinash Patil struct host_cmd_ds_sta_deauth {
16370f9e9b8bSAvinash Patil 	u8 mac[ETH_ALEN];
16380f9e9b8bSAvinash Patil 	__le16 reason;
16390f9e9b8bSAvinash Patil } __packed;
16400f9e9b8bSAvinash Patil 
1641b21783e9SXinming Hu struct mwifiex_ie_types_sta_info {
1642b21783e9SXinming Hu 	struct mwifiex_ie_types_header header;
1643b21783e9SXinming Hu 	u8 mac[ETH_ALEN];
1644b21783e9SXinming Hu 	u8 power_mfg_status;
1645b21783e9SXinming Hu 	s8 rssi;
1646b21783e9SXinming Hu };
1647b21783e9SXinming Hu 
1648b21783e9SXinming Hu struct host_cmd_ds_sta_list {
1649b21783e9SXinming Hu 	u16 sta_count;
1650b21783e9SXinming Hu 	u8 tlv[0];
1651b21783e9SXinming Hu } __packed;
1652b21783e9SXinming Hu 
16532a7305c8SAmitkumar Karwar struct mwifiex_ie_types_pwr_capability {
16542a7305c8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
16552a7305c8SAmitkumar Karwar 	s8 min_pwr;
16562a7305c8SAmitkumar Karwar 	s8 max_pwr;
16572a7305c8SAmitkumar Karwar };
16582a7305c8SAmitkumar Karwar 
16592a7305c8SAmitkumar Karwar struct mwifiex_ie_types_local_pwr_constraint {
16602a7305c8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
16612a7305c8SAmitkumar Karwar 	u8 chan;
16622a7305c8SAmitkumar Karwar 	u8 constraint;
16632a7305c8SAmitkumar Karwar };
16642a7305c8SAmitkumar Karwar 
16655e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_param_set {
16665e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
16675e6e3a92SBing Zhao 	u8 wmm_ie[1];
16685e6e3a92SBing Zhao };
16695e6e3a92SBing Zhao 
16705e6e3a92SBing Zhao struct mwifiex_ie_types_wmm_queue_status {
16715e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
16725e6e3a92SBing Zhao 	u8 queue_index;
16735e6e3a92SBing Zhao 	u8 disabled;
16744348d085SUjjal Roy 	__le16 medium_time;
16755e6e3a92SBing Zhao 	u8 flow_required;
16765e6e3a92SBing Zhao 	u8 flow_created;
16775e6e3a92SBing Zhao 	u32 reserved;
16785e6e3a92SBing Zhao };
16795e6e3a92SBing Zhao 
16805e6e3a92SBing Zhao struct ieee_types_vendor_header {
16815e6e3a92SBing Zhao 	u8 element_id;
16825e6e3a92SBing Zhao 	u8 len;
16832e4c14a5SAmitkumar Karwar 	u8 oui[4];	/* 0~2: oui, 3: oui_type */
16845e6e3a92SBing Zhao 	u8 oui_subtype;
16855e6e3a92SBing Zhao 	u8 version;
16865e6e3a92SBing Zhao } __packed;
16875e6e3a92SBing Zhao 
16885e6e3a92SBing Zhao struct ieee_types_wmm_parameter {
16895e6e3a92SBing Zhao 	/*
16905e6e3a92SBing Zhao 	 * WMM Parameter IE - Vendor Specific Header:
16915e6e3a92SBing Zhao 	 *   element_id  [221/0xdd]
16925e6e3a92SBing Zhao 	 *   Len         [24]
16935e6e3a92SBing Zhao 	 *   Oui         [00:50:f2]
16945e6e3a92SBing Zhao 	 *   OuiType     [2]
16955e6e3a92SBing Zhao 	 *   OuiSubType  [1]
16965e6e3a92SBing Zhao 	 *   Version     [1]
16975e6e3a92SBing Zhao 	 */
16985e6e3a92SBing Zhao 	struct ieee_types_vendor_header vend_hdr;
16995e6e3a92SBing Zhao 	u8 qos_info_bitmap;
17005e6e3a92SBing Zhao 	u8 reserved;
170199fec5deSJohannes Berg 	struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
17025e6e3a92SBing Zhao } __packed;
17035e6e3a92SBing Zhao 
17045e6e3a92SBing Zhao struct ieee_types_wmm_info {
17055e6e3a92SBing Zhao 
17065e6e3a92SBing Zhao 	/*
17075e6e3a92SBing Zhao 	 * WMM Info IE - Vendor Specific Header:
17085e6e3a92SBing Zhao 	 *   element_id  [221/0xdd]
17095e6e3a92SBing Zhao 	 *   Len         [7]
17105e6e3a92SBing Zhao 	 *   Oui         [00:50:f2]
17115e6e3a92SBing Zhao 	 *   OuiType     [2]
17125e6e3a92SBing Zhao 	 *   OuiSubType  [0]
17135e6e3a92SBing Zhao 	 *   Version     [1]
17145e6e3a92SBing Zhao 	 */
17155e6e3a92SBing Zhao 	struct ieee_types_vendor_header vend_hdr;
17165e6e3a92SBing Zhao 
17175e6e3a92SBing Zhao 	u8 qos_info_bitmap;
17185e6e3a92SBing Zhao } __packed;
17195e6e3a92SBing Zhao 
17205e6e3a92SBing Zhao struct host_cmd_ds_wmm_get_status {
17215e6e3a92SBing Zhao 	u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
172299fec5deSJohannes Berg 			      IEEE80211_NUM_ACS];
17235e6e3a92SBing Zhao 	u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
17245e6e3a92SBing Zhao } __packed;
17255e6e3a92SBing Zhao 
17265e6e3a92SBing Zhao struct mwifiex_wmm_ac_status {
17275e6e3a92SBing Zhao 	u8 disabled;
17285e6e3a92SBing Zhao 	u8 flow_required;
17295e6e3a92SBing Zhao 	u8 flow_created;
17305e6e3a92SBing Zhao };
17315e6e3a92SBing Zhao 
17325e6e3a92SBing Zhao struct mwifiex_ie_types_htcap {
17335e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
17345e6e3a92SBing Zhao 	struct ieee80211_ht_cap ht_cap;
17355e6e3a92SBing Zhao } __packed;
17365e6e3a92SBing Zhao 
1737a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vhtcap {
1738a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1739a5f39056SYogesh Ashok Powar 	struct ieee80211_vht_cap vht_cap;
1740a5f39056SYogesh Ashok Powar } __packed;
1741a5f39056SYogesh Ashok Powar 
17425f6d5983SAvinash Patil struct mwifiex_ie_types_aid {
17435f6d5983SAvinash Patil 	struct mwifiex_ie_types_header header;
17445f6d5983SAvinash Patil 	__le16 aid;
17455f6d5983SAvinash Patil } __packed;
17465f6d5983SAvinash Patil 
1747a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_oper_mode_ntf {
1748a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1749a5f39056SYogesh Ashok Powar 	u8 oper_mode;
1750a5f39056SYogesh Ashok Powar } __packed;
1751a5f39056SYogesh Ashok Powar 
1752a5f39056SYogesh Ashok Powar /* VHT Operations IE */
1753a5f39056SYogesh Ashok Powar struct mwifiex_ie_types_vht_oper {
1754a5f39056SYogesh Ashok Powar 	struct mwifiex_ie_types_header header;
1755a5f39056SYogesh Ashok Powar 	u8 chan_width;
1756a5f39056SYogesh Ashok Powar 	u8 chan_center_freq_1;
1757a5f39056SYogesh Ashok Powar 	u8 chan_center_freq_2;
1758a5f39056SYogesh Ashok Powar 	/* Basic MCS set map, each 2 bits stands for a NSS */
17594348d085SUjjal Roy 	__le16 basic_mcs_map;
1760a5f39056SYogesh Ashok Powar } __packed;
1761a5f39056SYogesh Ashok Powar 
176254428c57SAvinash Patil struct mwifiex_ie_types_wmmcap {
176354428c57SAvinash Patil 	struct mwifiex_ie_types_header header;
176454428c57SAvinash Patil 	struct mwifiex_types_wmm_info wmm_info;
176554428c57SAvinash Patil } __packed;
176654428c57SAvinash Patil 
17675e6e3a92SBing Zhao struct mwifiex_ie_types_htinfo {
17685e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
1769074d46d1SJohannes Berg 	struct ieee80211_ht_operation ht_oper;
17705e6e3a92SBing Zhao } __packed;
17715e6e3a92SBing Zhao 
17725e6e3a92SBing Zhao struct mwifiex_ie_types_2040bssco {
17735e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
17745e6e3a92SBing Zhao 	u8 bss_co_2040;
17755e6e3a92SBing Zhao } __packed;
17765e6e3a92SBing Zhao 
17775e6e3a92SBing Zhao struct mwifiex_ie_types_extcap {
17785e6e3a92SBing Zhao 	struct mwifiex_ie_types_header header;
177968f95b09SAvinash Patil 	u8 ext_capab[0];
17805e6e3a92SBing Zhao } __packed;
17815e6e3a92SBing Zhao 
1782c2c6c85fSChin-ran Lo struct host_cmd_ds_mem_access {
1783c2c6c85fSChin-ran Lo 	__le16 action;
1784c2c6c85fSChin-ran Lo 	__le16 reserved;
1785c2c6c85fSChin-ran Lo 	__le32 addr;
1786c2c6c85fSChin-ran Lo 	__le32 value;
1787c2c6c85fSChin-ran Lo };
1788c2c6c85fSChin-ran Lo 
17891f4dfd8aSAvinash Patil struct mwifiex_ie_types_qos_info {
17901f4dfd8aSAvinash Patil 	struct mwifiex_ie_types_header header;
17911f4dfd8aSAvinash Patil 	u8 qos_info;
17921f4dfd8aSAvinash Patil } __packed;
17931f4dfd8aSAvinash Patil 
17945e6e3a92SBing Zhao struct host_cmd_ds_mac_reg_access {
17955e6e3a92SBing Zhao 	__le16 action;
17965e6e3a92SBing Zhao 	__le16 offset;
17975e6e3a92SBing Zhao 	__le32 value;
17985e6e3a92SBing Zhao } __packed;
17995e6e3a92SBing Zhao 
18005e6e3a92SBing Zhao struct host_cmd_ds_bbp_reg_access {
18015e6e3a92SBing Zhao 	__le16 action;
18025e6e3a92SBing Zhao 	__le16 offset;
18035e6e3a92SBing Zhao 	u8 value;
18045e6e3a92SBing Zhao 	u8 reserved[3];
18055e6e3a92SBing Zhao } __packed;
18065e6e3a92SBing Zhao 
18075e6e3a92SBing Zhao struct host_cmd_ds_rf_reg_access {
18085e6e3a92SBing Zhao 	__le16 action;
18095e6e3a92SBing Zhao 	__le16 offset;
18105e6e3a92SBing Zhao 	u8 value;
18115e6e3a92SBing Zhao 	u8 reserved[3];
18125e6e3a92SBing Zhao } __packed;
18135e6e3a92SBing Zhao 
18145e6e3a92SBing Zhao struct host_cmd_ds_pmic_reg_access {
18155e6e3a92SBing Zhao 	__le16 action;
18165e6e3a92SBing Zhao 	__le16 offset;
18175e6e3a92SBing Zhao 	u8 value;
18185e6e3a92SBing Zhao 	u8 reserved[3];
18195e6e3a92SBing Zhao } __packed;
18205e6e3a92SBing Zhao 
18215e6e3a92SBing Zhao struct host_cmd_ds_802_11_eeprom_access {
18225e6e3a92SBing Zhao 	__le16 action;
18235e6e3a92SBing Zhao 
18245e6e3a92SBing Zhao 	__le16 offset;
18255e6e3a92SBing Zhao 	__le16 byte_count;
18265e6e3a92SBing Zhao 	u8 value;
18275e6e3a92SBing Zhao } __packed;
18285e6e3a92SBing Zhao 
1829e568634aSAvinash Patil struct mwifiex_assoc_event {
1830e568634aSAvinash Patil 	u8 sta_addr[ETH_ALEN];
1831e568634aSAvinash Patil 	__le16 type;
1832e568634aSAvinash Patil 	__le16 len;
1833e568634aSAvinash Patil 	__le16 frame_control;
1834e568634aSAvinash Patil 	__le16 cap_info;
1835e568634aSAvinash Patil 	__le16 listen_interval;
1836e568634aSAvinash Patil 	u8 data[0];
1837e568634aSAvinash Patil } __packed;
1838e568634aSAvinash Patil 
18394db16a18SAvinash Patil struct host_cmd_ds_sys_config {
18404db16a18SAvinash Patil 	__le16 action;
18414db16a18SAvinash Patil 	u8 tlv[0];
18424db16a18SAvinash Patil };
1843f752dcd5SAvinash Patil 
184483c78da9SYogesh Ashok Powar struct host_cmd_11ac_vht_cfg {
184583c78da9SYogesh Ashok Powar 	__le16 action;
184683c78da9SYogesh Ashok Powar 	u8 band_config;
184783c78da9SYogesh Ashok Powar 	u8 misc_config;
184883c78da9SYogesh Ashok Powar 	__le32 cap_info;
184983c78da9SYogesh Ashok Powar 	__le32 mcs_tx_set;
185083c78da9SYogesh Ashok Powar 	__le32 mcs_rx_set;
185183c78da9SYogesh Ashok Powar } __packed;
185283c78da9SYogesh Ashok Powar 
1853f752dcd5SAvinash Patil struct host_cmd_tlv_akmp {
18546b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1855f752dcd5SAvinash Patil 	__le16 key_mgmt;
1856f752dcd5SAvinash Patil 	__le16 key_mgmt_operation;
1857f752dcd5SAvinash Patil } __packed;
1858f752dcd5SAvinash Patil 
1859f752dcd5SAvinash Patil struct host_cmd_tlv_pwk_cipher {
18606b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1861f752dcd5SAvinash Patil 	__le16 proto;
1862f752dcd5SAvinash Patil 	u8 cipher;
1863f752dcd5SAvinash Patil 	u8 reserved;
1864f752dcd5SAvinash Patil } __packed;
1865f752dcd5SAvinash Patil 
1866f752dcd5SAvinash Patil struct host_cmd_tlv_gwk_cipher {
18676b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1868f752dcd5SAvinash Patil 	u8 cipher;
1869f752dcd5SAvinash Patil 	u8 reserved;
1870f752dcd5SAvinash Patil } __packed;
1871f752dcd5SAvinash Patil 
1872f752dcd5SAvinash Patil struct host_cmd_tlv_passphrase {
18736b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1874f752dcd5SAvinash Patil 	u8 passphrase[0];
1875f752dcd5SAvinash Patil } __packed;
1876f752dcd5SAvinash Patil 
187796893538SAvinash Patil struct host_cmd_tlv_wep_key {
18786b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
187996893538SAvinash Patil 	u8 key_index;
188096893538SAvinash Patil 	u8 is_default;
188196893538SAvinash Patil 	u8 key[1];
188296893538SAvinash Patil };
188396893538SAvinash Patil 
1884f752dcd5SAvinash Patil struct host_cmd_tlv_auth_type {
18856b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1886f752dcd5SAvinash Patil 	u8 auth_type;
1887f752dcd5SAvinash Patil } __packed;
1888f752dcd5SAvinash Patil 
1889f752dcd5SAvinash Patil struct host_cmd_tlv_encrypt_protocol {
18906b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1891f752dcd5SAvinash Patil 	__le16 proto;
1892f752dcd5SAvinash Patil } __packed;
1893f752dcd5SAvinash Patil 
189412190c5dSAvinash Patil struct host_cmd_tlv_ssid {
18956b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
189612190c5dSAvinash Patil 	u8 ssid[0];
189712190c5dSAvinash Patil } __packed;
189812190c5dSAvinash Patil 
1899a3c2c4f6SAvinash Patil struct host_cmd_tlv_rates {
19006b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1901a3c2c4f6SAvinash Patil 	u8 rates[0];
1902a3c2c4f6SAvinash Patil } __packed;
1903a3c2c4f6SAvinash Patil 
190421f58d20SAmitkumar Karwar struct mwifiex_ie_types_bssid_list {
190521f58d20SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
190621f58d20SAmitkumar Karwar 	u8 bssid[ETH_ALEN];
190721f58d20SAmitkumar Karwar } __packed;
190821f58d20SAmitkumar Karwar 
1909605b73afSAvinash Patil struct host_cmd_tlv_bcast_ssid {
19106b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
1911605b73afSAvinash Patil 	u8 bcast_ctl;
1912605b73afSAvinash Patil } __packed;
1913605b73afSAvinash Patil 
191412190c5dSAvinash Patil struct host_cmd_tlv_beacon_period {
19156b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
191612190c5dSAvinash Patil 	__le16 period;
191712190c5dSAvinash Patil } __packed;
191812190c5dSAvinash Patil 
191912190c5dSAvinash Patil struct host_cmd_tlv_dtim_period {
19206b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
192112190c5dSAvinash Patil 	u8 period;
192212190c5dSAvinash Patil } __packed;
19234db16a18SAvinash Patil 
19249b930eaeSAvinash Patil struct host_cmd_tlv_frag_threshold {
19256b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19269b930eaeSAvinash Patil 	__le16 frag_thr;
19279b930eaeSAvinash Patil } __packed;
19289b930eaeSAvinash Patil 
19299b930eaeSAvinash Patil struct host_cmd_tlv_rts_threshold {
19306b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19319b930eaeSAvinash Patil 	__le16 rts_thr;
19329b930eaeSAvinash Patil } __packed;
19339b930eaeSAvinash Patil 
19349b930eaeSAvinash Patil struct host_cmd_tlv_retry_limit {
19356b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19369b930eaeSAvinash Patil 	u8 limit;
19379b930eaeSAvinash Patil } __packed;
19389b930eaeSAvinash Patil 
193975edd2c6SAvinash Patil struct host_cmd_tlv_mac_addr {
19406b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
194175edd2c6SAvinash Patil 	u8 mac_addr[ETH_ALEN];
194275edd2c6SAvinash Patil } __packed;
194375edd2c6SAvinash Patil 
19444db16a18SAvinash Patil struct host_cmd_tlv_channel_band {
19456b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19464db16a18SAvinash Patil 	u8 band_config;
19474db16a18SAvinash Patil 	u8 channel;
19484db16a18SAvinash Patil } __packed;
19494db16a18SAvinash Patil 
19508b4509f6SKevin Gan struct host_cmd_tlv_ageout_timer {
19516b21a69fSAmitkumar Karwar 	struct mwifiex_ie_types_header header;
19528b4509f6SKevin Gan 	__le32 sta_ao_timer;
19538b4509f6SKevin Gan } __packed;
19548b4509f6SKevin Gan 
19558a73dd63SAvinash Patil struct host_cmd_tlv_power_constraint {
19568a73dd63SAvinash Patil 	struct mwifiex_ie_types_header header;
19578a73dd63SAvinash Patil 	u8 constraint;
19588a73dd63SAvinash Patil } __packed;
19598a73dd63SAvinash Patil 
1960d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_scan_time {
1961d219b7ebSChunfan Chen 	struct mwifiex_ie_types_header header;
1962d219b7ebSChunfan Chen 	u8 coex_scan;
1963d219b7ebSChunfan Chen 	u8 reserved;
1964d219b7ebSChunfan Chen 	u16 min_scan_time;
1965d219b7ebSChunfan Chen 	u16 max_scan_time;
1966d219b7ebSChunfan Chen } __packed;
1967d219b7ebSChunfan Chen 
1968d219b7ebSChunfan Chen struct mwifiex_ie_types_btcoex_aggr_win_size {
1969d219b7ebSChunfan Chen 	struct mwifiex_ie_types_header header;
1970d219b7ebSChunfan Chen 	u8 coex_win_size;
1971d219b7ebSChunfan Chen 	u8 tx_win_size;
1972d219b7ebSChunfan Chen 	u8 rx_win_size;
1973d219b7ebSChunfan Chen 	u8 reserved;
1974d219b7ebSChunfan Chen } __packed;
1975d219b7ebSChunfan Chen 
197646dbe247SAmitkumar Karwar struct mwifiex_ie_types_robust_coex {
197746dbe247SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
197846dbe247SAmitkumar Karwar 	__le32 mode;
197946dbe247SAmitkumar Karwar } __packed;
198046dbe247SAmitkumar Karwar 
19815e6e3a92SBing Zhao struct host_cmd_ds_version_ext {
19825e6e3a92SBing Zhao 	u8 version_str_sel;
19835e6e3a92SBing Zhao 	char version_str[128];
19845e6e3a92SBing Zhao } __packed;
19855e6e3a92SBing Zhao 
19863cec6870SStone Piao struct host_cmd_ds_mgmt_frame_reg {
19873cec6870SStone Piao 	__le16 action;
19883cec6870SStone Piao 	__le32 mask;
19893cec6870SStone Piao } __packed;
19903cec6870SStone Piao 
1991e1a2b7a3SStone Piao struct host_cmd_ds_p2p_mode_cfg {
1992e1a2b7a3SStone Piao 	__le16 action;
1993e1a2b7a3SStone Piao 	__le16 mode;
1994e1a2b7a3SStone Piao } __packed;
1995e1a2b7a3SStone Piao 
19967feb4c48SStone Piao struct host_cmd_ds_remain_on_chan {
19977feb4c48SStone Piao 	__le16 action;
19987feb4c48SStone Piao 	u8 status;
19997feb4c48SStone Piao 	u8 reserved;
20007feb4c48SStone Piao 	u8 band_cfg;
20017feb4c48SStone Piao 	u8 channel;
20027feb4c48SStone Piao 	__le32 duration;
20037feb4c48SStone Piao } __packed;
20047feb4c48SStone Piao 
20055e6e3a92SBing Zhao struct host_cmd_ds_802_11_ibss_status {
20065e6e3a92SBing Zhao 	__le16 action;
20075e6e3a92SBing Zhao 	__le16 enable;
20085e6e3a92SBing Zhao 	u8 bssid[ETH_ALEN];
20095e6e3a92SBing Zhao 	__le16 beacon_interval;
20105e6e3a92SBing Zhao 	__le16 atim_window;
20115e6e3a92SBing Zhao 	__le16 use_g_rate_protect;
20125e6e3a92SBing Zhao } __packed;
20135e6e3a92SBing Zhao 
20147da060c1SAmitkumar Karwar struct mwifiex_fw_mef_entry {
20157da060c1SAmitkumar Karwar 	u8 mode;
20167da060c1SAmitkumar Karwar 	u8 action;
20177da060c1SAmitkumar Karwar 	__le16 exprsize;
20187da060c1SAmitkumar Karwar 	u8 expr[0];
20197da060c1SAmitkumar Karwar } __packed;
20207da060c1SAmitkumar Karwar 
20217da060c1SAmitkumar Karwar struct host_cmd_ds_mef_cfg {
20227da060c1SAmitkumar Karwar 	__le32 criteria;
20237da060c1SAmitkumar Karwar 	__le16 num_entries;
20247da060c1SAmitkumar Karwar 	struct mwifiex_fw_mef_entry mef_entry[0];
20257da060c1SAmitkumar Karwar } __packed;
20267da060c1SAmitkumar Karwar 
20275e6e3a92SBing Zhao #define CONNECTION_TYPE_INFRA   0
20285e6e3a92SBing Zhao #define CONNECTION_TYPE_ADHOC   1
20299197ab9eSStone Piao #define CONNECTION_TYPE_AP      2
20305e6e3a92SBing Zhao 
20315e6e3a92SBing Zhao struct host_cmd_ds_set_bss_mode {
20325e6e3a92SBing Zhao 	u8 con_type;
20335e6e3a92SBing Zhao } __packed;
20345e6e3a92SBing Zhao 
2035d930faeeSAmitkumar Karwar struct host_cmd_ds_pcie_details {
2036d930faeeSAmitkumar Karwar 	/* TX buffer descriptor ring address */
2037d930faeeSAmitkumar Karwar 	u32 txbd_addr_lo;
2038d930faeeSAmitkumar Karwar 	u32 txbd_addr_hi;
2039d930faeeSAmitkumar Karwar 	/* TX buffer descriptor ring count */
2040d930faeeSAmitkumar Karwar 	u32 txbd_count;
2041d930faeeSAmitkumar Karwar 
2042d930faeeSAmitkumar Karwar 	/* RX buffer descriptor ring address */
2043d930faeeSAmitkumar Karwar 	u32 rxbd_addr_lo;
2044d930faeeSAmitkumar Karwar 	u32 rxbd_addr_hi;
2045d930faeeSAmitkumar Karwar 	/* RX buffer descriptor ring count */
2046d930faeeSAmitkumar Karwar 	u32 rxbd_count;
2047d930faeeSAmitkumar Karwar 
2048d930faeeSAmitkumar Karwar 	/* Event buffer descriptor ring address */
2049d930faeeSAmitkumar Karwar 	u32 evtbd_addr_lo;
2050d930faeeSAmitkumar Karwar 	u32 evtbd_addr_hi;
2051d930faeeSAmitkumar Karwar 	/* Event buffer descriptor ring count */
2052d930faeeSAmitkumar Karwar 	u32 evtbd_count;
2053d930faeeSAmitkumar Karwar 
2054d930faeeSAmitkumar Karwar 	/* Sleep cookie buffer physical address */
2055d930faeeSAmitkumar Karwar 	u32 sleep_cookie_addr_lo;
2056d930faeeSAmitkumar Karwar 	u32 sleep_cookie_addr_hi;
2057d930faeeSAmitkumar Karwar } __packed;
2058d930faeeSAmitkumar Karwar 
2059fa444bf8SAmitkumar Karwar struct mwifiex_ie_types_rssi_threshold {
2060fa444bf8SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
2061fa444bf8SAmitkumar Karwar 	u8 abs_value;
2062fa444bf8SAmitkumar Karwar 	u8 evt_freq;
2063fa444bf8SAmitkumar Karwar } __packed;
2064fa444bf8SAmitkumar Karwar 
20653b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_LEN		8
20663b57c1a7SAvinash Patil #define MWIFIEX_DFS_REC_HDR_NUM		10
20673b57c1a7SAvinash Patil #define MWIFIEX_BIN_COUNTER_LEN		7
20683b57c1a7SAvinash Patil 
20693b57c1a7SAvinash Patil struct mwifiex_radar_det_event {
20703b57c1a7SAvinash Patil 	__le32 detect_count;
20713b57c1a7SAvinash Patil 	u8 reg_domain;  /*1=fcc, 2=etsi, 3=mic*/
20723b57c1a7SAvinash Patil 	u8 det_type;  /*0=none, 1=pw(chirp), 2=pri(radar)*/
20733b57c1a7SAvinash Patil 	__le16 pw_chirp_type;
20743b57c1a7SAvinash Patil 	u8 pw_chirp_idx;
20753b57c1a7SAvinash Patil 	u8 pw_value;
20763b57c1a7SAvinash Patil 	u8 pri_radar_type;
20773b57c1a7SAvinash Patil 	u8 pri_bincnt;
20783b57c1a7SAvinash Patil 	u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN];
20793b57c1a7SAvinash Patil 	u8 num_dfs_records;
20803b57c1a7SAvinash Patil 	u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN];
20813b57c1a7SAvinash Patil 	__le32 passed;
20823b57c1a7SAvinash Patil } __packed;
20833b57c1a7SAvinash Patil 
20848d6b538aSAvinash Patil struct mwifiex_ie_types_multi_chan_info {
20858d6b538aSAvinash Patil 	struct mwifiex_ie_types_header header;
20868d6b538aSAvinash Patil 	__le16 status;
20878d6b538aSAvinash Patil 	u8 tlv_buffer[0];
20888d6b538aSAvinash Patil } __packed;
20898d6b538aSAvinash Patil 
20902b0f997dSZhaoyang Liu struct mwifiex_ie_types_mc_group_info {
20912b0f997dSZhaoyang Liu 	struct mwifiex_ie_types_header header;
20922b0f997dSZhaoyang Liu 	u8 chan_group_id;
20932b0f997dSZhaoyang Liu 	u8 chan_buf_weight;
20942b0f997dSZhaoyang Liu 	u8 band_config;
20952b0f997dSZhaoyang Liu 	u8 chan_num;
20962b0f997dSZhaoyang Liu 	u32 chan_time;
20972b0f997dSZhaoyang Liu 	u32 reserved;
20982b0f997dSZhaoyang Liu 	union {
20992b0f997dSZhaoyang Liu 		u8 sdio_func_num;
21002b0f997dSZhaoyang Liu 		u8 usb_ep_num;
21012b0f997dSZhaoyang Liu 	} hid_num;
21022b0f997dSZhaoyang Liu 	u8 intf_num;
21032b0f997dSZhaoyang Liu 	u8 bss_type_numlist[0];
21042b0f997dSZhaoyang Liu } __packed;
21052b0f997dSZhaoyang Liu 
21060a694d68SAvinash Patil struct meas_rpt_map {
21070a694d68SAvinash Patil 	u8 rssi:3;
21080a694d68SAvinash Patil 	u8 unmeasured:1;
21090a694d68SAvinash Patil 	u8 radar:1;
21100a694d68SAvinash Patil 	u8 unidentified_sig:1;
21110a694d68SAvinash Patil 	u8 ofdm_preamble:1;
21120a694d68SAvinash Patil 	u8 bss:1;
21130a694d68SAvinash Patil } __packed;
21140a694d68SAvinash Patil 
21150a694d68SAvinash Patil struct mwifiex_ie_types_chan_rpt_data {
21160a694d68SAvinash Patil 	struct mwifiex_ie_types_header header;
21170a694d68SAvinash Patil 	struct meas_rpt_map map;
21180a694d68SAvinash Patil } __packed;
21190a694d68SAvinash Patil 
2120fa444bf8SAmitkumar Karwar struct host_cmd_ds_802_11_subsc_evt {
2121fa444bf8SAmitkumar Karwar 	__le16 action;
2122fa444bf8SAmitkumar Karwar 	__le16 events;
2123fa444bf8SAmitkumar Karwar } __packed;
2124fa444bf8SAmitkumar Karwar 
2125f7669877SXinming Hu struct chan_switch_result {
2126f7669877SXinming Hu 	u8 cur_chan;
2127f7669877SXinming Hu 	u8 status;
2128f7669877SXinming Hu 	u8 reason;
2129f7669877SXinming Hu } __packed;
2130f7669877SXinming Hu 
213179ff4346SAvinash Patil struct mwifiex_tdls_generic_event {
213279ff4346SAvinash Patil 	__le16 type;
213379ff4346SAvinash Patil 	u8 peer_mac[ETH_ALEN];
213479ff4346SAvinash Patil 	union {
2135f7669877SXinming Hu 		struct chan_switch_result switch_result;
2136f7669877SXinming Hu 		u8 cs_stop_reason;
213779ff4346SAvinash Patil 		__le16 reason_code;
213879ff4346SAvinash Patil 		__le16 reserved;
213979ff4346SAvinash Patil 	} u;
214079ff4346SAvinash Patil } __packed;
214179ff4346SAvinash Patil 
2142ede98bfaSAvinash Patil struct mwifiex_ie {
2143ede98bfaSAvinash Patil 	__le16 ie_index;
2144ede98bfaSAvinash Patil 	__le16 mgmt_subtype_mask;
2145ede98bfaSAvinash Patil 	__le16 ie_length;
2146ede98bfaSAvinash Patil 	u8 ie_buffer[IEEE_MAX_IE_SIZE];
2147ede98bfaSAvinash Patil } __packed;
2148ede98bfaSAvinash Patil 
2149ede98bfaSAvinash Patil #define MAX_MGMT_IE_INDEX	16
2150ede98bfaSAvinash Patil struct mwifiex_ie_list {
2151ede98bfaSAvinash Patil 	__le16 type;
2152ede98bfaSAvinash Patil 	__le16 len;
2153ede98bfaSAvinash Patil 	struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
2154ede98bfaSAvinash Patil } __packed;
2155ede98bfaSAvinash Patil 
2156562fc5b3SAmitkumar Karwar struct coalesce_filt_field_param {
2157562fc5b3SAmitkumar Karwar 	u8 operation;
2158562fc5b3SAmitkumar Karwar 	u8 operand_len;
2159562fc5b3SAmitkumar Karwar 	__le16 offset;
2160562fc5b3SAmitkumar Karwar 	u8 operand_byte_stream[4];
2161562fc5b3SAmitkumar Karwar };
2162562fc5b3SAmitkumar Karwar 
2163562fc5b3SAmitkumar Karwar struct coalesce_receive_filt_rule {
2164562fc5b3SAmitkumar Karwar 	struct mwifiex_ie_types_header header;
2165562fc5b3SAmitkumar Karwar 	u8 num_of_fields;
2166562fc5b3SAmitkumar Karwar 	u8 pkt_type;
2167562fc5b3SAmitkumar Karwar 	__le16 max_coalescing_delay;
2168562fc5b3SAmitkumar Karwar 	struct coalesce_filt_field_param params[0];
2169562fc5b3SAmitkumar Karwar } __packed;
2170562fc5b3SAmitkumar Karwar 
2171562fc5b3SAmitkumar Karwar struct host_cmd_ds_coalesce_cfg {
2172562fc5b3SAmitkumar Karwar 	__le16 action;
2173562fc5b3SAmitkumar Karwar 	__le16 num_of_rules;
2174562fc5b3SAmitkumar Karwar 	struct coalesce_receive_filt_rule rule[0];
2175562fc5b3SAmitkumar Karwar } __packed;
2176562fc5b3SAmitkumar Karwar 
2177d5b036c4SAvinash Patil struct host_cmd_ds_multi_chan_policy {
2178d5b036c4SAvinash Patil 	__le16 action;
2179d5b036c4SAvinash Patil 	__le16 policy;
2180d5b036c4SAvinash Patil } __packed;
2181d5b036c4SAvinash Patil 
218246dbe247SAmitkumar Karwar struct host_cmd_ds_robust_coex {
218346dbe247SAmitkumar Karwar 	__le16 action;
218446dbe247SAmitkumar Karwar 	__le16 reserved;
218546dbe247SAmitkumar Karwar } __packed;
218646dbe247SAmitkumar Karwar 
21878de00f1bSchunfan chen struct host_cmd_ds_wakeup_reason {
21888de00f1bSchunfan chen 	u16  wakeup_reason;
21898de00f1bSchunfan chen } __packed;
21908de00f1bSchunfan chen 
2191f6b1cbe0SGanapathi Bhat struct host_cmd_ds_gtk_rekey_params {
2192f6b1cbe0SGanapathi Bhat 	__le16 action;
2193f6b1cbe0SGanapathi Bhat 	u8 kck[NL80211_KCK_LEN];
2194f6b1cbe0SGanapathi Bhat 	u8 kek[NL80211_KEK_LEN];
2195f6b1cbe0SGanapathi Bhat 	__le32 replay_ctr_low;
2196f6b1cbe0SGanapathi Bhat 	__le32 replay_ctr_high;
2197f6b1cbe0SGanapathi Bhat } __packed;
2198f6b1cbe0SGanapathi Bhat 
21995e6e3a92SBing Zhao struct host_cmd_ds_command {
22005e6e3a92SBing Zhao 	__le16 command;
22015e6e3a92SBing Zhao 	__le16 size;
22025e6e3a92SBing Zhao 	__le16 seq_num;
22035e6e3a92SBing Zhao 	__le16 result;
22045e6e3a92SBing Zhao 	union {
22055e6e3a92SBing Zhao 		struct host_cmd_ds_get_hw_spec hw_spec;
22065e6e3a92SBing Zhao 		struct host_cmd_ds_mac_control mac_ctrl;
22075e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_mac_address mac_addr;
22085e6e3a92SBing Zhao 		struct host_cmd_ds_mac_multicast_adr mc_addr;
22095e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_get_log get_log;
22105e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_rssi_info rssi_info;
22115e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
22125e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_snmp_mib smib;
22135e6e3a92SBing Zhao 		struct host_cmd_ds_tx_rate_query tx_rate;
22145e6e3a92SBing Zhao 		struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
22155e6e3a92SBing Zhao 		struct host_cmd_ds_txpwr_cfg txp_cfg;
2216caa8984fSAmitkumar Karwar 		struct host_cmd_ds_rf_tx_pwr txp;
22178a279d5bSAmitkumar Karwar 		struct host_cmd_ds_rf_ant_mimo ant_mimo;
22188a279d5bSAmitkumar Karwar 		struct host_cmd_ds_rf_ant_siso ant_siso;
22195e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
22205e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
22215e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_scan scan;
222221f58d20SAmitkumar Karwar 		struct host_cmd_ds_802_11_scan_ext ext_scan;
22235e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_scan_rsp scan_resp;
22240c9b7f22SXinming Hu 		struct host_cmd_ds_802_11_bg_scan_config bg_scan_config;
22255e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
22265e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
22275e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_associate associate;
22285e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_associate_rsp associate_rsp;
22295e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_deauthenticate deauth;
22305e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
2231d5556e87SAmitkumar Karwar 		struct host_cmd_ds_802_11_ad_hoc_start_result start_result;
2232d5556e87SAmitkumar Karwar 		struct host_cmd_ds_802_11_ad_hoc_join_result join_result;
22335e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
22345e6e3a92SBing Zhao 		struct host_cmd_ds_802_11d_domain_info domain_info;
22355e6e3a92SBing Zhao 		struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
22365e6e3a92SBing Zhao 		struct host_cmd_ds_11n_addba_req add_ba_req;
22375e6e3a92SBing Zhao 		struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
22385e6e3a92SBing Zhao 		struct host_cmd_ds_11n_delba del_ba;
22395e6e3a92SBing Zhao 		struct host_cmd_ds_txbuf_cfg tx_buf;
22405e6e3a92SBing Zhao 		struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
22415e6e3a92SBing Zhao 		struct host_cmd_ds_11n_cfg htcfg;
22425e6e3a92SBing Zhao 		struct host_cmd_ds_wmm_get_status get_wmm_status;
22435e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_key_material key_material;
2244e57f1734SAvinash Patil 		struct host_cmd_ds_802_11_key_material_v2 key_material_v2;
22455e6e3a92SBing Zhao 		struct host_cmd_ds_version_ext verext;
22463cec6870SStone Piao 		struct host_cmd_ds_mgmt_frame_reg reg_mask;
22477feb4c48SStone Piao 		struct host_cmd_ds_remain_on_chan roc_cfg;
2248e1a2b7a3SStone Piao 		struct host_cmd_ds_p2p_mode_cfg mode_cfg;
22495e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
22507da060c1SAmitkumar Karwar 		struct host_cmd_ds_mef_cfg mef_cfg;
2251c2c6c85fSChin-ran Lo 		struct host_cmd_ds_mem_access mem;
22525e6e3a92SBing Zhao 		struct host_cmd_ds_mac_reg_access mac_reg;
22535e6e3a92SBing Zhao 		struct host_cmd_ds_bbp_reg_access bbp_reg;
22545e6e3a92SBing Zhao 		struct host_cmd_ds_rf_reg_access rf_reg;
22555e6e3a92SBing Zhao 		struct host_cmd_ds_pmic_reg_access pmic_reg;
22565e6e3a92SBing Zhao 		struct host_cmd_ds_set_bss_mode bss_mode;
2257d930faeeSAmitkumar Karwar 		struct host_cmd_ds_pcie_details pcie_host_spec;
22585e6e3a92SBing Zhao 		struct host_cmd_ds_802_11_eeprom_access eeprom;
2259fa444bf8SAmitkumar Karwar 		struct host_cmd_ds_802_11_subsc_evt subsc_evt;
22604db16a18SAvinash Patil 		struct host_cmd_ds_sys_config uap_sys_config;
22610f9e9b8bSAvinash Patil 		struct host_cmd_ds_sta_deauth sta_deauth;
2262b21783e9SXinming Hu 		struct host_cmd_ds_sta_list sta_list;
226383c78da9SYogesh Ashok Powar 		struct host_cmd_11ac_vht_cfg vht_cfg;
2264562fc5b3SAmitkumar Karwar 		struct host_cmd_ds_coalesce_cfg coalesce_cfg;
2265449b8bbfSXinming Hu 		struct host_cmd_ds_tdls_config tdls_config;
2266429d90d2SAvinash Patil 		struct host_cmd_ds_tdls_oper tdls_oper;
226785afb186SAvinash Patil 		struct host_cmd_ds_chan_rpt_req chan_rpt_req;
226892263a84SZhaoyang Liu 		struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg;
2269d5b036c4SAvinash Patil 		struct host_cmd_ds_multi_chan_policy mc_policy;
227046dbe247SAmitkumar Karwar 		struct host_cmd_ds_robust_coex coex;
22718de00f1bSchunfan chen 		struct host_cmd_ds_wakeup_reason hs_wakeup_reason;
2272f6b1cbe0SGanapathi Bhat 		struct host_cmd_ds_gtk_rekey_params rekey;
22735e6e3a92SBing Zhao 	} params;
22745e6e3a92SBing Zhao } __packed;
22755e6e3a92SBing Zhao 
22765e6e3a92SBing Zhao struct mwifiex_opt_sleep_confirm {
22775e6e3a92SBing Zhao 	__le16 command;
22785e6e3a92SBing Zhao 	__le16 size;
22795e6e3a92SBing Zhao 	__le16 seq_num;
22805e6e3a92SBing Zhao 	__le16 result;
22815e6e3a92SBing Zhao 	__le16 action;
22822b06bdbeSMarc Yang 	__le16 resp_ctrl;
22835e6e3a92SBing Zhao } __packed;
22845e6e3a92SBing Zhao #endif /* !_MWIFIEX_FW_H_ */
2285