162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * NXP Wireless LAN device driver: Firmware specific macros & structures
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright 2011-2020 NXP
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef _MWIFIEX_FW_H_
962306a36Sopenharmony_ci#define _MWIFIEX_FW_H_
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <linux/if_ether.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#define INTF_HEADER_LEN     4
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_cistruct rfc_1042_hdr {
1762306a36Sopenharmony_ci	u8 llc_dsap;
1862306a36Sopenharmony_ci	u8 llc_ssap;
1962306a36Sopenharmony_ci	u8 llc_ctrl;
2062306a36Sopenharmony_ci	u8 snap_oui[3];
2162306a36Sopenharmony_ci	__be16 snap_type;
2262306a36Sopenharmony_ci} __packed;
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_cistruct rx_packet_hdr {
2562306a36Sopenharmony_ci	struct ethhdr eth803_hdr;
2662306a36Sopenharmony_ci	struct rfc_1042_hdr rfc1042_hdr;
2762306a36Sopenharmony_ci} __packed;
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_cistruct tx_packet_hdr {
3062306a36Sopenharmony_ci	struct ethhdr eth803_hdr;
3162306a36Sopenharmony_ci	struct rfc_1042_hdr rfc1042_hdr;
3262306a36Sopenharmony_ci} __packed;
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_cistruct mwifiex_fw_header {
3562306a36Sopenharmony_ci	__le32 dnld_cmd;
3662306a36Sopenharmony_ci	__le32 base_addr;
3762306a36Sopenharmony_ci	__le32 data_length;
3862306a36Sopenharmony_ci	__le32 crc;
3962306a36Sopenharmony_ci} __packed;
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_cistruct mwifiex_fw_data {
4262306a36Sopenharmony_ci	struct mwifiex_fw_header header;
4362306a36Sopenharmony_ci	__le32 seq_num;
4462306a36Sopenharmony_ci	u8 data[];
4562306a36Sopenharmony_ci} __packed;
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_cistruct mwifiex_fw_dump_header {
4862306a36Sopenharmony_ci	__le16          seq_num;
4962306a36Sopenharmony_ci	__le16          reserved;
5062306a36Sopenharmony_ci	__le16          type;
5162306a36Sopenharmony_ci	__le16          len;
5262306a36Sopenharmony_ci} __packed;
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#define FW_DUMP_INFO_ENDED 0x0002
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_1 0x1
5762306a36Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_5 0x5
5862306a36Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_6 0x6
5962306a36Sopenharmony_ci#define MWIFIEX_FW_DNLD_CMD_7 0x7
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#define B_SUPPORTED_RATES               5
6262306a36Sopenharmony_ci#define G_SUPPORTED_RATES               9
6362306a36Sopenharmony_ci#define BG_SUPPORTED_RATES              13
6462306a36Sopenharmony_ci#define A_SUPPORTED_RATES               9
6562306a36Sopenharmony_ci#define HOSTCMD_SUPPORTED_RATES         14
6662306a36Sopenharmony_ci#define N_SUPPORTED_RATES               3
6762306a36Sopenharmony_ci#define ALL_802_11_BANDS           (BAND_A | BAND_B | BAND_G | BAND_GN | \
6862306a36Sopenharmony_ci				    BAND_AN | BAND_AAC)
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci#define FW_MULTI_BANDS_SUPPORT  (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
7162306a36Sopenharmony_ci				 BIT(13))
7262306a36Sopenharmony_ci#define IS_SUPPORT_MULTI_BANDS(adapter)        \
7362306a36Sopenharmony_ci	(adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci/* bit 13: 11ac BAND_AAC
7662306a36Sopenharmony_ci * bit 12: reserved for lab testing, will be reused for BAND_AN
7762306a36Sopenharmony_ci * bit 11: 11n  BAND_GN
7862306a36Sopenharmony_ci * bit 10: 11a  BAND_A
7962306a36Sopenharmony_ci * bit 9: 11g   BAND_G
8062306a36Sopenharmony_ci * bit 8: 11b   BAND_B
8162306a36Sopenharmony_ci * Map these bits to band capability by right shifting 8 bits.
8262306a36Sopenharmony_ci */
8362306a36Sopenharmony_ci#define GET_FW_DEFAULT_BANDS(adapter)  \
8462306a36Sopenharmony_ci	    (((adapter->fw_cap_info & 0x2f00) >> 8) & \
8562306a36Sopenharmony_ci	     ALL_802_11_BANDS)
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ci#define HostCmd_WEP_KEY_INDEX_MASK              0x3fff
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci#define KEY_INFO_ENABLED        0x01
9062306a36Sopenharmony_cienum KEY_TYPE_ID {
9162306a36Sopenharmony_ci	KEY_TYPE_ID_WEP = 0,
9262306a36Sopenharmony_ci	KEY_TYPE_ID_TKIP,
9362306a36Sopenharmony_ci	KEY_TYPE_ID_AES,
9462306a36Sopenharmony_ci	KEY_TYPE_ID_WAPI,
9562306a36Sopenharmony_ci	KEY_TYPE_ID_AES_CMAC,
9662306a36Sopenharmony_ci	KEY_TYPE_ID_AES_CMAC_DEF,
9762306a36Sopenharmony_ci};
9862306a36Sopenharmony_ci
9962306a36Sopenharmony_ci#define WPA_PN_SIZE		8
10062306a36Sopenharmony_ci#define KEY_PARAMS_FIXED_LEN	10
10162306a36Sopenharmony_ci#define KEY_INDEX_MASK		0xf
10262306a36Sopenharmony_ci#define KEY_API_VER_MAJOR_V2	2
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci#define KEY_MCAST	BIT(0)
10562306a36Sopenharmony_ci#define KEY_UNICAST	BIT(1)
10662306a36Sopenharmony_ci#define KEY_ENABLED	BIT(2)
10762306a36Sopenharmony_ci#define KEY_DEFAULT	BIT(3)
10862306a36Sopenharmony_ci#define KEY_TX_KEY	BIT(4)
10962306a36Sopenharmony_ci#define KEY_RX_KEY	BIT(5)
11062306a36Sopenharmony_ci#define KEY_IGTK	BIT(10)
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci#define WAPI_KEY_LEN			(WLAN_KEY_LEN_SMS4 + PN_LEN + 2)
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci#define MAX_POLL_TRIES			100
11562306a36Sopenharmony_ci#define MAX_FIRMWARE_POLL_TRIES			150
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci#define FIRMWARE_READY_SDIO				0xfedc
11862306a36Sopenharmony_ci#define FIRMWARE_READY_PCIE				0xfedcba00
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci#define MWIFIEX_COEX_MODE_TIMESHARE			0x01
12162306a36Sopenharmony_ci#define MWIFIEX_COEX_MODE_SPATIAL			0x82
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_cienum mwifiex_usb_ep {
12462306a36Sopenharmony_ci	MWIFIEX_USB_EP_CMD_EVENT = 1,
12562306a36Sopenharmony_ci	MWIFIEX_USB_EP_DATA = 2,
12662306a36Sopenharmony_ci	MWIFIEX_USB_EP_DATA_CH2 = 3,
12762306a36Sopenharmony_ci};
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_cienum MWIFIEX_802_11_PRIVACY_FILTER {
13062306a36Sopenharmony_ci	MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
13162306a36Sopenharmony_ci	MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
13262306a36Sopenharmony_ci};
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci#define CAL_SNR(RSSI, NF)		((s16)((s16)(RSSI)-(s16)(NF)))
13562306a36Sopenharmony_ci#define CAL_RSSI(SNR, NF)		((s16)((s16)(SNR)+(s16)(NF)))
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci#define UAP_BSS_PARAMS_I			0
13862306a36Sopenharmony_ci#define UAP_CUSTOM_IE_I				1
13962306a36Sopenharmony_ci#define MWIFIEX_AUTO_IDX_MASK			0xffff
14062306a36Sopenharmony_ci#define MWIFIEX_DELETE_MASK			0x0000
14162306a36Sopenharmony_ci#define MGMT_MASK_ASSOC_REQ			0x01
14262306a36Sopenharmony_ci#define MGMT_MASK_REASSOC_REQ			0x04
14362306a36Sopenharmony_ci#define MGMT_MASK_ASSOC_RESP			0x02
14462306a36Sopenharmony_ci#define MGMT_MASK_REASSOC_RESP			0x08
14562306a36Sopenharmony_ci#define MGMT_MASK_PROBE_REQ			0x10
14662306a36Sopenharmony_ci#define MGMT_MASK_PROBE_RESP			0x20
14762306a36Sopenharmony_ci#define MGMT_MASK_BEACON			0x100
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci#define TLV_TYPE_UAP_SSID			0x0000
15062306a36Sopenharmony_ci#define TLV_TYPE_UAP_RATES			0x0001
15162306a36Sopenharmony_ci#define TLV_TYPE_PWR_CONSTRAINT			0x0020
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci#define PROPRIETARY_TLV_BASE_ID                 0x0100
15462306a36Sopenharmony_ci#define TLV_TYPE_KEY_MATERIAL       (PROPRIETARY_TLV_BASE_ID + 0)
15562306a36Sopenharmony_ci#define TLV_TYPE_CHANLIST           (PROPRIETARY_TLV_BASE_ID + 1)
15662306a36Sopenharmony_ci#define TLV_TYPE_NUMPROBES          (PROPRIETARY_TLV_BASE_ID + 2)
15762306a36Sopenharmony_ci#define TLV_TYPE_RSSI_LOW           (PROPRIETARY_TLV_BASE_ID + 4)
15862306a36Sopenharmony_ci#define TLV_TYPE_PASSTHROUGH        (PROPRIETARY_TLV_BASE_ID + 10)
15962306a36Sopenharmony_ci#define TLV_TYPE_WMMQSTATUS         (PROPRIETARY_TLV_BASE_ID + 16)
16062306a36Sopenharmony_ci#define TLV_TYPE_WILDCARDSSID       (PROPRIETARY_TLV_BASE_ID + 18)
16162306a36Sopenharmony_ci#define TLV_TYPE_TSFTIMESTAMP       (PROPRIETARY_TLV_BASE_ID + 19)
16262306a36Sopenharmony_ci#define TLV_TYPE_RSSI_HIGH          (PROPRIETARY_TLV_BASE_ID + 22)
16362306a36Sopenharmony_ci#define TLV_TYPE_BGSCAN_START_LATER (PROPRIETARY_TLV_BASE_ID + 30)
16462306a36Sopenharmony_ci#define TLV_TYPE_AUTH_TYPE          (PROPRIETARY_TLV_BASE_ID + 31)
16562306a36Sopenharmony_ci#define TLV_TYPE_STA_MAC_ADDR       (PROPRIETARY_TLV_BASE_ID + 32)
16662306a36Sopenharmony_ci#define TLV_TYPE_BSSID              (PROPRIETARY_TLV_BASE_ID + 35)
16762306a36Sopenharmony_ci#define TLV_TYPE_CHANNELBANDLIST    (PROPRIETARY_TLV_BASE_ID + 42)
16862306a36Sopenharmony_ci#define TLV_TYPE_UAP_MAC_ADDRESS    (PROPRIETARY_TLV_BASE_ID + 43)
16962306a36Sopenharmony_ci#define TLV_TYPE_UAP_BEACON_PERIOD  (PROPRIETARY_TLV_BASE_ID + 44)
17062306a36Sopenharmony_ci#define TLV_TYPE_UAP_DTIM_PERIOD    (PROPRIETARY_TLV_BASE_ID + 45)
17162306a36Sopenharmony_ci#define TLV_TYPE_UAP_BCAST_SSID     (PROPRIETARY_TLV_BASE_ID + 48)
17262306a36Sopenharmony_ci#define TLV_TYPE_UAP_RTS_THRESHOLD  (PROPRIETARY_TLV_BASE_ID + 51)
17362306a36Sopenharmony_ci#define TLV_TYPE_UAP_AO_TIMER       (PROPRIETARY_TLV_BASE_ID + 57)
17462306a36Sopenharmony_ci#define TLV_TYPE_UAP_WEP_KEY        (PROPRIETARY_TLV_BASE_ID + 59)
17562306a36Sopenharmony_ci#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
17662306a36Sopenharmony_ci#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
17762306a36Sopenharmony_ci#define TLV_TYPE_UAP_AKMP           (PROPRIETARY_TLV_BASE_ID + 65)
17862306a36Sopenharmony_ci#define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
17962306a36Sopenharmony_ci#define TLV_TYPE_RATE_DROP_CONTROL  (PROPRIETARY_TLV_BASE_ID + 82)
18062306a36Sopenharmony_ci#define TLV_TYPE_RATE_SCOPE         (PROPRIETARY_TLV_BASE_ID + 83)
18162306a36Sopenharmony_ci#define TLV_TYPE_POWER_GROUP        (PROPRIETARY_TLV_BASE_ID + 84)
18262306a36Sopenharmony_ci#define TLV_TYPE_BSS_SCAN_RSP       (PROPRIETARY_TLV_BASE_ID + 86)
18362306a36Sopenharmony_ci#define TLV_TYPE_BSS_SCAN_INFO      (PROPRIETARY_TLV_BASE_ID + 87)
18462306a36Sopenharmony_ci#define TLV_TYPE_CHANRPT_11H_BASIC  (PROPRIETARY_TLV_BASE_ID + 91)
18562306a36Sopenharmony_ci#define TLV_TYPE_UAP_RETRY_LIMIT    (PROPRIETARY_TLV_BASE_ID + 93)
18662306a36Sopenharmony_ci#define TLV_TYPE_WAPI_IE            (PROPRIETARY_TLV_BASE_ID + 94)
18762306a36Sopenharmony_ci#define TLV_TYPE_ROBUST_COEX        (PROPRIETARY_TLV_BASE_ID + 96)
18862306a36Sopenharmony_ci#define TLV_TYPE_UAP_MGMT_FRAME     (PROPRIETARY_TLV_BASE_ID + 104)
18962306a36Sopenharmony_ci#define TLV_TYPE_MGMT_IE            (PROPRIETARY_TLV_BASE_ID + 105)
19062306a36Sopenharmony_ci#define TLV_TYPE_AUTO_DS_PARAM      (PROPRIETARY_TLV_BASE_ID + 113)
19162306a36Sopenharmony_ci#define TLV_TYPE_PS_PARAM           (PROPRIETARY_TLV_BASE_ID + 114)
19262306a36Sopenharmony_ci#define TLV_TYPE_UAP_PS_AO_TIMER    (PROPRIETARY_TLV_BASE_ID + 123)
19362306a36Sopenharmony_ci#define TLV_TYPE_PWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 145)
19462306a36Sopenharmony_ci#define TLV_TYPE_GWK_CIPHER         (PROPRIETARY_TLV_BASE_ID + 146)
19562306a36Sopenharmony_ci#define TLV_TYPE_TX_PAUSE           (PROPRIETARY_TLV_BASE_ID + 148)
19662306a36Sopenharmony_ci#define TLV_TYPE_RXBA_SYNC          (PROPRIETARY_TLV_BASE_ID + 153)
19762306a36Sopenharmony_ci#define TLV_TYPE_COALESCE_RULE      (PROPRIETARY_TLV_BASE_ID + 154)
19862306a36Sopenharmony_ci#define TLV_TYPE_KEY_PARAM_V2       (PROPRIETARY_TLV_BASE_ID + 156)
19962306a36Sopenharmony_ci#define TLV_TYPE_REPEAT_COUNT       (PROPRIETARY_TLV_BASE_ID + 176)
20062306a36Sopenharmony_ci#define TLV_TYPE_PS_PARAMS_IN_HS    (PROPRIETARY_TLV_BASE_ID + 181)
20162306a36Sopenharmony_ci#define TLV_TYPE_MULTI_CHAN_INFO    (PROPRIETARY_TLV_BASE_ID + 183)
20262306a36Sopenharmony_ci#define TLV_TYPE_MC_GROUP_INFO      (PROPRIETARY_TLV_BASE_ID + 184)
20362306a36Sopenharmony_ci#define TLV_TYPE_TDLS_IDLE_TIMEOUT  (PROPRIETARY_TLV_BASE_ID + 194)
20462306a36Sopenharmony_ci#define TLV_TYPE_SCAN_CHANNEL_GAP   (PROPRIETARY_TLV_BASE_ID + 197)
20562306a36Sopenharmony_ci#define TLV_TYPE_API_REV            (PROPRIETARY_TLV_BASE_ID + 199)
20662306a36Sopenharmony_ci#define TLV_TYPE_CHANNEL_STATS      (PROPRIETARY_TLV_BASE_ID + 198)
20762306a36Sopenharmony_ci#define TLV_BTCOEX_WL_AGGR_WINSIZE  (PROPRIETARY_TLV_BASE_ID + 202)
20862306a36Sopenharmony_ci#define TLV_BTCOEX_WL_SCANTIME      (PROPRIETARY_TLV_BASE_ID + 203)
20962306a36Sopenharmony_ci#define TLV_TYPE_BSS_MODE           (PROPRIETARY_TLV_BASE_ID + 206)
21062306a36Sopenharmony_ci#define TLV_TYPE_RANDOM_MAC         (PROPRIETARY_TLV_BASE_ID + 236)
21162306a36Sopenharmony_ci#define TLV_TYPE_CHAN_ATTR_CFG      (PROPRIETARY_TLV_BASE_ID + 237)
21262306a36Sopenharmony_ci#define TLV_TYPE_MAX_CONN           (PROPRIETARY_TLV_BASE_ID + 279)
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
21562306a36Sopenharmony_ci
21662306a36Sopenharmony_ci#define SSN_MASK         0xfff0
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci#define BA_RESULT_SUCCESS        0x0
21962306a36Sopenharmony_ci#define BA_RESULT_TIMEOUT        0x2
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ci#define IS_BASTREAM_SETUP(ptr)  (ptr->ba_status)
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci#define BA_STREAM_NOT_ALLOWED   0xff
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ci#define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
22662306a36Sopenharmony_ci			priv->adapter->config_bands & BAND_AN) && \
22762306a36Sopenharmony_ci			priv->curr_bss_params.bss_descriptor.bcn_ht_cap && \
22862306a36Sopenharmony_ci			!priv->curr_bss_params.bss_descriptor.disable_11n)
22962306a36Sopenharmony_ci#define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
23062306a36Sopenharmony_ci			BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
23162306a36Sopenharmony_ci
23262306a36Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_4K        4096
23362306a36Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_8K        8192
23462306a36Sopenharmony_ci#define MWIFIEX_TX_DATA_BUF_SIZE_12K       12288
23562306a36Sopenharmony_ci
23662306a36Sopenharmony_ci#define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
23762306a36Sopenharmony_ci#define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14))
23862306a36Sopenharmony_ci#define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15))
23962306a36Sopenharmony_ci#define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16))
24062306a36Sopenharmony_ci#define ISSUPP_ADHOC_ENABLED(FwCapInfo) (FwCapInfo & BIT(25))
24162306a36Sopenharmony_ci#define ISSUPP_RANDOM_MAC(FwCapInfo) (FwCapInfo & BIT(27))
24262306a36Sopenharmony_ci#define ISSUPP_FIRMWARE_SUPPLICANT(FwCapInfo) (FwCapInfo & BIT(21))
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci#define MWIFIEX_DEF_HT_CAP	(IEEE80211_HT_CAP_DSSSCCK40 | \
24562306a36Sopenharmony_ci				 (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \
24662306a36Sopenharmony_ci				 IEEE80211_HT_CAP_SM_PS)
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_ci#define MWIFIEX_DEF_11N_TX_BF_CAP	0x09E1E008
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci#define MWIFIEX_DEF_AMPDU	IEEE80211_HT_AMPDU_PARM_FACTOR
25162306a36Sopenharmony_ci
25262306a36Sopenharmony_ci/* dev_cap bitmap
25362306a36Sopenharmony_ci * BIT
25462306a36Sopenharmony_ci * 0-16		reserved
25562306a36Sopenharmony_ci * 17		IEEE80211_HT_CAP_SUP_WIDTH_20_40
25662306a36Sopenharmony_ci * 18-22	reserved
25762306a36Sopenharmony_ci * 23		IEEE80211_HT_CAP_SGI_20
25862306a36Sopenharmony_ci * 24		IEEE80211_HT_CAP_SGI_40
25962306a36Sopenharmony_ci * 25		IEEE80211_HT_CAP_TX_STBC
26062306a36Sopenharmony_ci * 26		IEEE80211_HT_CAP_RX_STBC
26162306a36Sopenharmony_ci * 27-28	reserved
26262306a36Sopenharmony_ci * 29		IEEE80211_HT_CAP_GRN_FLD
26362306a36Sopenharmony_ci * 30-31	reserved
26462306a36Sopenharmony_ci */
26562306a36Sopenharmony_ci#define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
26662306a36Sopenharmony_ci#define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
26762306a36Sopenharmony_ci#define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
26862306a36Sopenharmony_ci#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
26962306a36Sopenharmony_ci#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
27062306a36Sopenharmony_ci#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
27162306a36Sopenharmony_ci#define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8))
27262306a36Sopenharmony_ci#define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22))
27362306a36Sopenharmony_ci#define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30))
27462306a36Sopenharmony_ci#define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2))
27562306a36Sopenharmony_ci#define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF)
27662306a36Sopenharmony_ci
27762306a36Sopenharmony_ci/* httxcfg bitmap
27862306a36Sopenharmony_ci * 0		reserved
27962306a36Sopenharmony_ci * 1		20/40 Mhz enable(1)/disable(0)
28062306a36Sopenharmony_ci * 2-3		reserved
28162306a36Sopenharmony_ci * 4		green field enable(1)/disable(0)
28262306a36Sopenharmony_ci * 5		short GI in 20 Mhz enable(1)/disable(0)
28362306a36Sopenharmony_ci * 6		short GI in 40 Mhz enable(1)/disable(0)
28462306a36Sopenharmony_ci * 7-15		reserved
28562306a36Sopenharmony_ci */
28662306a36Sopenharmony_ci#define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ci/* 11AC Tx and Rx MCS map for 1x1 mode:
28962306a36Sopenharmony_ci * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1
29062306a36Sopenharmony_ci * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams
29162306a36Sopenharmony_ci */
29262306a36Sopenharmony_ci#define MWIFIEX_11AC_MCS_MAP_1X1	0xfffefffe
29362306a36Sopenharmony_ci
29462306a36Sopenharmony_ci/* 11AC Tx and Rx MCS map for 2x2 mode:
29562306a36Sopenharmony_ci * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2
29662306a36Sopenharmony_ci * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams
29762306a36Sopenharmony_ci */
29862306a36Sopenharmony_ci#define MWIFIEX_11AC_MCS_MAP_2X2	0xfffafffa
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
30162306a36Sopenharmony_ci#define SETHT_MCS32(x) (x[4] |= 1)
30262306a36Sopenharmony_ci#define HT_STREAM_1X1	0x11
30362306a36Sopenharmony_ci#define HT_STREAM_2X2	0x22
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ci#define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci#define LLC_SNAP_LEN    8
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ci/* HW_SPEC fw_cap_info */
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13))
31262306a36Sopenharmony_ci
31362306a36Sopenharmony_ci#define GET_VHTCAP_CHWDSET(vht_cap_info)    ((vht_cap_info >> 2) & 0x3)
31462306a36Sopenharmony_ci#define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
31562306a36Sopenharmony_ci#define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \
31662306a36Sopenharmony_ci					      (2 * (nss - 1)))
31762306a36Sopenharmony_ci#define GET_DEVTXMCSMAP(dev_mcs_map)      (dev_mcs_map >> 16)
31862306a36Sopenharmony_ci#define GET_DEVRXMCSMAP(dev_mcs_map)      (dev_mcs_map & 0xFFFF)
31962306a36Sopenharmony_ci
32062306a36Sopenharmony_ci/* Clear SU Beanformer, MU beanformer, MU beanformee and
32162306a36Sopenharmony_ci * sounding dimensions bits
32262306a36Sopenharmony_ci */
32362306a36Sopenharmony_ci#define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \
32462306a36Sopenharmony_ci			(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \
32562306a36Sopenharmony_ci			 IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \
32662306a36Sopenharmony_ci			 IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \
32762306a36Sopenharmony_ci			 IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK)
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_ci#define MOD_CLASS_HR_DSSS       0x03
33062306a36Sopenharmony_ci#define MOD_CLASS_OFDM          0x07
33162306a36Sopenharmony_ci#define MOD_CLASS_HT            0x08
33262306a36Sopenharmony_ci#define HT_BW_20    0
33362306a36Sopenharmony_ci#define HT_BW_40    1
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci#define DFS_CHAN_MOVE_TIME      10000
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ci#define HostCmd_CMD_GET_HW_SPEC                       0x0003
33862306a36Sopenharmony_ci#define HostCmd_CMD_802_11_SCAN                       0x0006
33962306a36Sopenharmony_ci#define HostCmd_CMD_802_11_GET_LOG                    0x000b
34062306a36Sopenharmony_ci#define HostCmd_CMD_MAC_MULTICAST_ADR                 0x0010
34162306a36Sopenharmony_ci#define HostCmd_CMD_802_11_EEPROM_ACCESS              0x0059
34262306a36Sopenharmony_ci#define HostCmd_CMD_802_11_ASSOCIATE                  0x0012
34362306a36Sopenharmony_ci#define HostCmd_CMD_802_11_SNMP_MIB                   0x0016
34462306a36Sopenharmony_ci#define HostCmd_CMD_MAC_REG_ACCESS                    0x0019
34562306a36Sopenharmony_ci#define HostCmd_CMD_BBP_REG_ACCESS                    0x001a
34662306a36Sopenharmony_ci#define HostCmd_CMD_RF_REG_ACCESS                     0x001b
34762306a36Sopenharmony_ci#define HostCmd_CMD_PMIC_REG_ACCESS                   0x00ad
34862306a36Sopenharmony_ci#define HostCmd_CMD_RF_TX_PWR                         0x001e
34962306a36Sopenharmony_ci#define HostCmd_CMD_RF_ANTENNA                        0x0020
35062306a36Sopenharmony_ci#define HostCmd_CMD_802_11_DEAUTHENTICATE             0x0024
35162306a36Sopenharmony_ci#define HostCmd_CMD_MAC_CONTROL                       0x0028
35262306a36Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_START               0x002b
35362306a36Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_JOIN                0x002c
35462306a36Sopenharmony_ci#define HostCmd_CMD_802_11_AD_HOC_STOP                0x0040
35562306a36Sopenharmony_ci#define HostCmd_CMD_802_11_MAC_ADDRESS                0x004D
35662306a36Sopenharmony_ci#define HostCmd_CMD_802_11D_DOMAIN_INFO               0x005b
35762306a36Sopenharmony_ci#define HostCmd_CMD_802_11_KEY_MATERIAL               0x005e
35862306a36Sopenharmony_ci#define HostCmd_CMD_802_11_BG_SCAN_CONFIG             0x006b
35962306a36Sopenharmony_ci#define HostCmd_CMD_802_11_BG_SCAN_QUERY              0x006c
36062306a36Sopenharmony_ci#define HostCmd_CMD_WMM_GET_STATUS                    0x0071
36162306a36Sopenharmony_ci#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT            0x0075
36262306a36Sopenharmony_ci#define HostCmd_CMD_802_11_TX_RATE_QUERY              0x007f
36362306a36Sopenharmony_ci#define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS     0x0083
36462306a36Sopenharmony_ci#define HostCmd_CMD_MEM_ACCESS                        0x0086
36562306a36Sopenharmony_ci#define HostCmd_CMD_CFG_DATA                          0x008f
36662306a36Sopenharmony_ci#define HostCmd_CMD_VERSION_EXT                       0x0097
36762306a36Sopenharmony_ci#define HostCmd_CMD_MEF_CFG                           0x009a
36862306a36Sopenharmony_ci#define HostCmd_CMD_RSSI_INFO                         0x00a4
36962306a36Sopenharmony_ci#define HostCmd_CMD_FUNC_INIT                         0x00a9
37062306a36Sopenharmony_ci#define HostCmd_CMD_FUNC_SHUTDOWN                     0x00aa
37162306a36Sopenharmony_ci#define HOST_CMD_APCMD_SYS_RESET                      0x00af
37262306a36Sopenharmony_ci#define HostCmd_CMD_UAP_SYS_CONFIG                    0x00b0
37362306a36Sopenharmony_ci#define HostCmd_CMD_UAP_BSS_START                     0x00b1
37462306a36Sopenharmony_ci#define HostCmd_CMD_UAP_BSS_STOP                      0x00b2
37562306a36Sopenharmony_ci#define HOST_CMD_APCMD_STA_LIST                       0x00b3
37662306a36Sopenharmony_ci#define HostCmd_CMD_UAP_STA_DEAUTH                    0x00b5
37762306a36Sopenharmony_ci#define HostCmd_CMD_11N_CFG                           0x00cd
37862306a36Sopenharmony_ci#define HostCmd_CMD_11N_ADDBA_REQ                     0x00ce
37962306a36Sopenharmony_ci#define HostCmd_CMD_11N_ADDBA_RSP                     0x00cf
38062306a36Sopenharmony_ci#define HostCmd_CMD_11N_DELBA                         0x00d0
38162306a36Sopenharmony_ci#define HostCmd_CMD_RECONFIGURE_TX_BUFF               0x00d9
38262306a36Sopenharmony_ci#define HostCmd_CMD_CHAN_REPORT_REQUEST               0x00dd
38362306a36Sopenharmony_ci#define HostCmd_CMD_AMSDU_AGGR_CTRL                   0x00df
38462306a36Sopenharmony_ci#define HostCmd_CMD_TXPWR_CFG                         0x00d1
38562306a36Sopenharmony_ci#define HostCmd_CMD_TX_RATE_CFG                       0x00d6
38662306a36Sopenharmony_ci#define HostCmd_CMD_ROBUST_COEX                       0x00e0
38762306a36Sopenharmony_ci#define HostCmd_CMD_802_11_PS_MODE_ENH                0x00e4
38862306a36Sopenharmony_ci#define HostCmd_CMD_802_11_HS_CFG_ENH                 0x00e5
38962306a36Sopenharmony_ci#define HostCmd_CMD_P2P_MODE_CFG                      0x00eb
39062306a36Sopenharmony_ci#define HostCmd_CMD_CAU_REG_ACCESS                    0x00ed
39162306a36Sopenharmony_ci#define HostCmd_CMD_SET_BSS_MODE                      0x00f7
39262306a36Sopenharmony_ci#define HostCmd_CMD_PCIE_DESC_DETAILS                 0x00fa
39362306a36Sopenharmony_ci#define HostCmd_CMD_802_11_SCAN_EXT                   0x0107
39462306a36Sopenharmony_ci#define HostCmd_CMD_COALESCE_CFG                      0x010a
39562306a36Sopenharmony_ci#define HostCmd_CMD_MGMT_FRAME_REG                    0x010c
39662306a36Sopenharmony_ci#define HostCmd_CMD_REMAIN_ON_CHAN                    0x010d
39762306a36Sopenharmony_ci#define HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG             0x010f
39862306a36Sopenharmony_ci#define HostCmd_CMD_11AC_CFG			      0x0112
39962306a36Sopenharmony_ci#define HostCmd_CMD_HS_WAKEUP_REASON                  0x0116
40062306a36Sopenharmony_ci#define HostCmd_CMD_TDLS_CONFIG                       0x0100
40162306a36Sopenharmony_ci#define HostCmd_CMD_MC_POLICY                         0x0121
40262306a36Sopenharmony_ci#define HostCmd_CMD_TDLS_OPER                         0x0122
40362306a36Sopenharmony_ci#define HostCmd_CMD_FW_DUMP_EVENT		      0x0125
40462306a36Sopenharmony_ci#define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG               0x0223
40562306a36Sopenharmony_ci#define HostCmd_CMD_STA_CONFIGURE		      0x023f
40662306a36Sopenharmony_ci#define HostCmd_CMD_CHAN_REGION_CFG		      0x0242
40762306a36Sopenharmony_ci#define HostCmd_CMD_PACKET_AGGR_CTRL		      0x0251
40862306a36Sopenharmony_ci
40962306a36Sopenharmony_ci#define PROTOCOL_NO_SECURITY        0x01
41062306a36Sopenharmony_ci#define PROTOCOL_STATIC_WEP         0x02
41162306a36Sopenharmony_ci#define PROTOCOL_WPA                0x08
41262306a36Sopenharmony_ci#define PROTOCOL_WPA2               0x20
41362306a36Sopenharmony_ci#define PROTOCOL_WPA2_MIXED         0x28
41462306a36Sopenharmony_ci#define PROTOCOL_EAP                0x40
41562306a36Sopenharmony_ci#define KEY_MGMT_NONE               0x04
41662306a36Sopenharmony_ci#define KEY_MGMT_PSK                0x02
41762306a36Sopenharmony_ci#define KEY_MGMT_EAP                0x01
41862306a36Sopenharmony_ci#define CIPHER_TKIP                 0x04
41962306a36Sopenharmony_ci#define CIPHER_AES_CCMP             0x08
42062306a36Sopenharmony_ci#define VALID_CIPHER_BITMAP         0x0c
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_cienum ENH_PS_MODES {
42362306a36Sopenharmony_ci	EN_PS = 1,
42462306a36Sopenharmony_ci	DIS_PS = 2,
42562306a36Sopenharmony_ci	EN_AUTO_DS = 3,
42662306a36Sopenharmony_ci	DIS_AUTO_DS = 4,
42762306a36Sopenharmony_ci	SLEEP_CONFIRM = 5,
42862306a36Sopenharmony_ci	GET_PS = 0,
42962306a36Sopenharmony_ci	EN_AUTO_PS = 0xff,
43062306a36Sopenharmony_ci	DIS_AUTO_PS = 0xfe,
43162306a36Sopenharmony_ci};
43262306a36Sopenharmony_ci
43362306a36Sopenharmony_cienum P2P_MODES {
43462306a36Sopenharmony_ci	P2P_MODE_DISABLE = 0,
43562306a36Sopenharmony_ci	P2P_MODE_DEVICE = 1,
43662306a36Sopenharmony_ci	P2P_MODE_GO = 2,
43762306a36Sopenharmony_ci	P2P_MODE_CLIENT = 3,
43862306a36Sopenharmony_ci};
43962306a36Sopenharmony_ci
44062306a36Sopenharmony_cienum mwifiex_channel_flags {
44162306a36Sopenharmony_ci	MWIFIEX_CHANNEL_PASSIVE = BIT(0),
44262306a36Sopenharmony_ci	MWIFIEX_CHANNEL_DFS = BIT(1),
44362306a36Sopenharmony_ci	MWIFIEX_CHANNEL_NOHT40 = BIT(2),
44462306a36Sopenharmony_ci	MWIFIEX_CHANNEL_NOHT80 = BIT(3),
44562306a36Sopenharmony_ci	MWIFIEX_CHANNEL_DISABLED = BIT(7),
44662306a36Sopenharmony_ci};
44762306a36Sopenharmony_ci
44862306a36Sopenharmony_ci#define HostCmd_RET_BIT                       0x8000
44962306a36Sopenharmony_ci#define HostCmd_ACT_GEN_GET                   0x0000
45062306a36Sopenharmony_ci#define HostCmd_ACT_GEN_SET                   0x0001
45162306a36Sopenharmony_ci#define HostCmd_ACT_GEN_REMOVE                0x0004
45262306a36Sopenharmony_ci#define HostCmd_ACT_BITWISE_SET               0x0002
45362306a36Sopenharmony_ci#define HostCmd_ACT_BITWISE_CLR               0x0003
45462306a36Sopenharmony_ci#define HostCmd_RESULT_OK                     0x0000
45562306a36Sopenharmony_ci#define HostCmd_ACT_MAC_RX_ON                 BIT(0)
45662306a36Sopenharmony_ci#define HostCmd_ACT_MAC_TX_ON                 BIT(1)
45762306a36Sopenharmony_ci#define HostCmd_ACT_MAC_WEP_ENABLE            BIT(3)
45862306a36Sopenharmony_ci#define HostCmd_ACT_MAC_ETHERNETII_ENABLE     BIT(4)
45962306a36Sopenharmony_ci#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE    BIT(7)
46062306a36Sopenharmony_ci#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE  BIT(8)
46162306a36Sopenharmony_ci#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON BIT(13)
46262306a36Sopenharmony_ci#define HostCmd_ACT_MAC_DYNAMIC_BW_ENABLE     BIT(16)
46362306a36Sopenharmony_ci
46462306a36Sopenharmony_ci#define HostCmd_BSS_MODE_IBSS               0x0002
46562306a36Sopenharmony_ci#define HostCmd_BSS_MODE_ANY                0x0003
46662306a36Sopenharmony_ci
46762306a36Sopenharmony_ci#define HostCmd_SCAN_RADIO_TYPE_BG          0
46862306a36Sopenharmony_ci#define HostCmd_SCAN_RADIO_TYPE_A           1
46962306a36Sopenharmony_ci
47062306a36Sopenharmony_ci#define HS_CFG_CANCEL			0xffffffff
47162306a36Sopenharmony_ci#define HS_CFG_COND_DEF			0x00000000
47262306a36Sopenharmony_ci#define HS_CFG_GPIO_DEF			0xff
47362306a36Sopenharmony_ci#define HS_CFG_GAP_DEF			0xff
47462306a36Sopenharmony_ci#define HS_CFG_COND_BROADCAST_DATA	0x00000001
47562306a36Sopenharmony_ci#define HS_CFG_COND_UNICAST_DATA	0x00000002
47662306a36Sopenharmony_ci#define HS_CFG_COND_MAC_EVENT		0x00000004
47762306a36Sopenharmony_ci#define HS_CFG_COND_MULTICAST_DATA	0x00000008
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_ci#define CONNECT_ERR_AUTH_ERR_STA_FAILURE	0xFFFB
48062306a36Sopenharmony_ci#define CONNECT_ERR_ASSOC_ERR_TIMEOUT		0xFFFC
48162306a36Sopenharmony_ci#define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED	0xFFFD
48262306a36Sopenharmony_ci#define CONNECT_ERR_AUTH_MSG_UNHANDLED		0xFFFE
48362306a36Sopenharmony_ci#define CONNECT_ERR_STA_FAILURE			0xFFFF
48462306a36Sopenharmony_ci
48562306a36Sopenharmony_ci
48662306a36Sopenharmony_ci#define CMD_F_HOSTCMD           (1 << 0)
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ci#define HostCmd_CMD_ID_MASK             0x0fff
48962306a36Sopenharmony_ci
49062306a36Sopenharmony_ci#define HostCmd_SEQ_NUM_MASK            0x00ff
49162306a36Sopenharmony_ci
49262306a36Sopenharmony_ci#define HostCmd_BSS_NUM_MASK            0x0f00
49362306a36Sopenharmony_ci
49462306a36Sopenharmony_ci#define HostCmd_BSS_TYPE_MASK           0xf000
49562306a36Sopenharmony_ci
49662306a36Sopenharmony_ci#define HostCmd_ACT_SET_RX              0x0001
49762306a36Sopenharmony_ci#define HostCmd_ACT_SET_TX              0x0002
49862306a36Sopenharmony_ci#define HostCmd_ACT_SET_BOTH            0x0003
49962306a36Sopenharmony_ci#define HostCmd_ACT_GET_RX              0x0004
50062306a36Sopenharmony_ci#define HostCmd_ACT_GET_TX              0x0008
50162306a36Sopenharmony_ci#define HostCmd_ACT_GET_BOTH            0x000c
50262306a36Sopenharmony_ci
50362306a36Sopenharmony_ci#define RF_ANTENNA_AUTO                 0xFFFF
50462306a36Sopenharmony_ci
50562306a36Sopenharmony_ci#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) \
50662306a36Sopenharmony_ci	((((seq) & 0x00ff) |                        \
50762306a36Sopenharmony_ci	 (((num) & 0x000f) << 8)) |                 \
50862306a36Sopenharmony_ci	(((type) & 0x000f) << 12))
50962306a36Sopenharmony_ci
51062306a36Sopenharmony_ci#define HostCmd_GET_SEQ_NO(seq)       \
51162306a36Sopenharmony_ci	((seq) & HostCmd_SEQ_NUM_MASK)
51262306a36Sopenharmony_ci
51362306a36Sopenharmony_ci#define HostCmd_GET_BSS_NO(seq)         \
51462306a36Sopenharmony_ci	(((seq) & HostCmd_BSS_NUM_MASK) >> 8)
51562306a36Sopenharmony_ci
51662306a36Sopenharmony_ci#define HostCmd_GET_BSS_TYPE(seq)       \
51762306a36Sopenharmony_ci	(((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
51862306a36Sopenharmony_ci
51962306a36Sopenharmony_ci#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL  0x00000001
52062306a36Sopenharmony_ci#define EVENT_LINK_LOST                 0x00000003
52162306a36Sopenharmony_ci#define EVENT_LINK_SENSED               0x00000004
52262306a36Sopenharmony_ci#define EVENT_MIB_CHANGED               0x00000006
52362306a36Sopenharmony_ci#define EVENT_INIT_DONE                 0x00000007
52462306a36Sopenharmony_ci#define EVENT_DEAUTHENTICATED           0x00000008
52562306a36Sopenharmony_ci#define EVENT_DISASSOCIATED             0x00000009
52662306a36Sopenharmony_ci#define EVENT_PS_AWAKE                  0x0000000a
52762306a36Sopenharmony_ci#define EVENT_PS_SLEEP                  0x0000000b
52862306a36Sopenharmony_ci#define EVENT_MIC_ERR_MULTICAST         0x0000000d
52962306a36Sopenharmony_ci#define EVENT_MIC_ERR_UNICAST           0x0000000e
53062306a36Sopenharmony_ci#define EVENT_DEEP_SLEEP_AWAKE          0x00000010
53162306a36Sopenharmony_ci#define EVENT_ADHOC_BCN_LOST            0x00000011
53262306a36Sopenharmony_ci
53362306a36Sopenharmony_ci#define EVENT_WMM_STATUS_CHANGE         0x00000017
53462306a36Sopenharmony_ci#define EVENT_BG_SCAN_REPORT            0x00000018
53562306a36Sopenharmony_ci#define EVENT_RSSI_LOW                  0x00000019
53662306a36Sopenharmony_ci#define EVENT_SNR_LOW                   0x0000001a
53762306a36Sopenharmony_ci#define EVENT_MAX_FAIL                  0x0000001b
53862306a36Sopenharmony_ci#define EVENT_RSSI_HIGH                 0x0000001c
53962306a36Sopenharmony_ci#define EVENT_SNR_HIGH                  0x0000001d
54062306a36Sopenharmony_ci#define EVENT_IBSS_COALESCED            0x0000001e
54162306a36Sopenharmony_ci#define EVENT_IBSS_STA_CONNECT          0x00000020
54262306a36Sopenharmony_ci#define EVENT_IBSS_STA_DISCONNECT       0x00000021
54362306a36Sopenharmony_ci#define EVENT_DATA_RSSI_LOW             0x00000024
54462306a36Sopenharmony_ci#define EVENT_DATA_SNR_LOW              0x00000025
54562306a36Sopenharmony_ci#define EVENT_DATA_RSSI_HIGH            0x00000026
54662306a36Sopenharmony_ci#define EVENT_DATA_SNR_HIGH             0x00000027
54762306a36Sopenharmony_ci#define EVENT_LINK_QUALITY              0x00000028
54862306a36Sopenharmony_ci#define EVENT_PORT_RELEASE              0x0000002b
54962306a36Sopenharmony_ci#define EVENT_UAP_STA_DEAUTH            0x0000002c
55062306a36Sopenharmony_ci#define EVENT_UAP_STA_ASSOC             0x0000002d
55162306a36Sopenharmony_ci#define EVENT_UAP_BSS_START             0x0000002e
55262306a36Sopenharmony_ci#define EVENT_PRE_BEACON_LOST           0x00000031
55362306a36Sopenharmony_ci#define EVENT_ADDBA                     0x00000033
55462306a36Sopenharmony_ci#define EVENT_DELBA                     0x00000034
55562306a36Sopenharmony_ci#define EVENT_BA_STREAM_TIEMOUT         0x00000037
55662306a36Sopenharmony_ci#define EVENT_AMSDU_AGGR_CTRL           0x00000042
55762306a36Sopenharmony_ci#define EVENT_UAP_BSS_IDLE              0x00000043
55862306a36Sopenharmony_ci#define EVENT_UAP_BSS_ACTIVE            0x00000044
55962306a36Sopenharmony_ci#define EVENT_WEP_ICV_ERR               0x00000046
56062306a36Sopenharmony_ci#define EVENT_HS_ACT_REQ                0x00000047
56162306a36Sopenharmony_ci#define EVENT_BW_CHANGE                 0x00000048
56262306a36Sopenharmony_ci#define EVENT_UAP_MIC_COUNTERMEASURES   0x0000004c
56362306a36Sopenharmony_ci#define EVENT_HOSTWAKE_STAIE		0x0000004d
56462306a36Sopenharmony_ci#define EVENT_CHANNEL_SWITCH_ANN        0x00000050
56562306a36Sopenharmony_ci#define EVENT_TDLS_GENERIC_EVENT        0x00000052
56662306a36Sopenharmony_ci#define EVENT_RADAR_DETECTED		0x00000053
56762306a36Sopenharmony_ci#define EVENT_CHANNEL_REPORT_RDY        0x00000054
56862306a36Sopenharmony_ci#define EVENT_TX_DATA_PAUSE             0x00000055
56962306a36Sopenharmony_ci#define EVENT_EXT_SCAN_REPORT           0x00000058
57062306a36Sopenharmony_ci#define EVENT_RXBA_SYNC                 0x00000059
57162306a36Sopenharmony_ci#define EVENT_UNKNOWN_DEBUG             0x00000063
57262306a36Sopenharmony_ci#define EVENT_BG_SCAN_STOPPED           0x00000065
57362306a36Sopenharmony_ci#define EVENT_REMAIN_ON_CHAN_EXPIRED    0x0000005f
57462306a36Sopenharmony_ci#define EVENT_MULTI_CHAN_INFO           0x0000006a
57562306a36Sopenharmony_ci#define EVENT_FW_DUMP_INFO		0x00000073
57662306a36Sopenharmony_ci#define EVENT_TX_STATUS_REPORT		0x00000074
57762306a36Sopenharmony_ci#define EVENT_BT_COEX_WLAN_PARA_CHANGE	0X00000076
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_ci#define EVENT_ID_MASK                   0xffff
58062306a36Sopenharmony_ci#define BSS_NUM_MASK                    0xf
58162306a36Sopenharmony_ci
58262306a36Sopenharmony_ci#define EVENT_GET_BSS_NUM(event_cause)          \
58362306a36Sopenharmony_ci	(((event_cause) >> 16) & BSS_NUM_MASK)
58462306a36Sopenharmony_ci
58562306a36Sopenharmony_ci#define EVENT_GET_BSS_TYPE(event_cause)         \
58662306a36Sopenharmony_ci	(((event_cause) >> 24) & 0x00ff)
58762306a36Sopenharmony_ci
58862306a36Sopenharmony_ci#define MWIFIEX_MAX_PATTERN_LEN		40
58962306a36Sopenharmony_ci#define MWIFIEX_MAX_OFFSET_LEN		100
59062306a36Sopenharmony_ci#define MWIFIEX_MAX_ND_MATCH_SETS	10
59162306a36Sopenharmony_ci
59262306a36Sopenharmony_ci#define STACK_NBYTES			100
59362306a36Sopenharmony_ci#define TYPE_DNUM			1
59462306a36Sopenharmony_ci#define TYPE_BYTESEQ			2
59562306a36Sopenharmony_ci#define MAX_OPERAND			0x40
59662306a36Sopenharmony_ci#define TYPE_EQ				(MAX_OPERAND+1)
59762306a36Sopenharmony_ci#define TYPE_EQ_DNUM			(MAX_OPERAND+2)
59862306a36Sopenharmony_ci#define TYPE_EQ_BIT			(MAX_OPERAND+3)
59962306a36Sopenharmony_ci#define TYPE_AND			(MAX_OPERAND+4)
60062306a36Sopenharmony_ci#define TYPE_OR				(MAX_OPERAND+5)
60162306a36Sopenharmony_ci#define MEF_MODE_HOST_SLEEP			1
60262306a36Sopenharmony_ci#define MEF_ACTION_ALLOW_AND_WAKEUP_HOST	3
60362306a36Sopenharmony_ci#define MEF_ACTION_AUTO_ARP                    0x10
60462306a36Sopenharmony_ci#define MWIFIEX_CRITERIA_BROADCAST	BIT(0)
60562306a36Sopenharmony_ci#define MWIFIEX_CRITERIA_UNICAST	BIT(1)
60662306a36Sopenharmony_ci#define MWIFIEX_CRITERIA_MULTICAST	BIT(3)
60762306a36Sopenharmony_ci#define MWIFIEX_MAX_SUPPORTED_IPADDR              4
60862306a36Sopenharmony_ci
60962306a36Sopenharmony_ci#define ACT_TDLS_DELETE            0x00
61062306a36Sopenharmony_ci#define ACT_TDLS_CREATE            0x01
61162306a36Sopenharmony_ci#define ACT_TDLS_CONFIG            0x02
61262306a36Sopenharmony_ci
61362306a36Sopenharmony_ci#define TDLS_EVENT_LINK_TEAR_DOWN      3
61462306a36Sopenharmony_ci#define TDLS_EVENT_CHAN_SWITCH_RESULT  7
61562306a36Sopenharmony_ci#define TDLS_EVENT_START_CHAN_SWITCH   8
61662306a36Sopenharmony_ci#define TDLS_EVENT_CHAN_SWITCH_STOPPED 9
61762306a36Sopenharmony_ci
61862306a36Sopenharmony_ci#define TDLS_BASE_CHANNEL	       0
61962306a36Sopenharmony_ci#define TDLS_OFF_CHANNEL	       1
62062306a36Sopenharmony_ci
62162306a36Sopenharmony_ci#define ACT_TDLS_CS_ENABLE_CONFIG 0x00
62262306a36Sopenharmony_ci#define ACT_TDLS_CS_INIT	  0x06
62362306a36Sopenharmony_ci#define ACT_TDLS_CS_STOP	  0x07
62462306a36Sopenharmony_ci#define ACT_TDLS_CS_PARAMS	  0x08
62562306a36Sopenharmony_ci
62662306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_UNIT_TIME	2
62762306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_THR_OTHERLINK	10
62862306a36Sopenharmony_ci#define MWIFIEX_DEF_THR_DIRECTLINK	0
62962306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_TIME		10
63062306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_TIMEOUT		16
63162306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_REG_CLASS	12
63262306a36Sopenharmony_ci#define MWIFIEX_DEF_CS_PERIODICITY	1
63362306a36Sopenharmony_ci
63462306a36Sopenharmony_ci#define MWIFIEX_FW_V15		   15
63562306a36Sopenharmony_ci
63662306a36Sopenharmony_ci#define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1)
63762306a36Sopenharmony_ci
63862306a36Sopenharmony_cistruct mwifiex_ie_types_header {
63962306a36Sopenharmony_ci	__le16 type;
64062306a36Sopenharmony_ci	__le16 len;
64162306a36Sopenharmony_ci} __packed;
64262306a36Sopenharmony_ci
64362306a36Sopenharmony_cistruct mwifiex_ie_types_data {
64462306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
64562306a36Sopenharmony_ci	u8 data[];
64662306a36Sopenharmony_ci} __packed;
64762306a36Sopenharmony_ci
64862306a36Sopenharmony_ci#define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
64962306a36Sopenharmony_ci#define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
65062306a36Sopenharmony_ci#define MWIFIEX_TXPD_FLAGS_TDLS_PACKET      0x10
65162306a36Sopenharmony_ci#define MWIFIEX_RXPD_FLAGS_TDLS_PACKET      0x01
65262306a36Sopenharmony_ci#define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS    0x20
65362306a36Sopenharmony_ci
65462306a36Sopenharmony_cienum HS_WAKEUP_REASON {
65562306a36Sopenharmony_ci	NO_HSWAKEUP_REASON = 0,
65662306a36Sopenharmony_ci	BCAST_DATA_MATCHED,
65762306a36Sopenharmony_ci	MCAST_DATA_MATCHED,
65862306a36Sopenharmony_ci	UCAST_DATA_MATCHED,
65962306a36Sopenharmony_ci	MASKTABLE_EVENT_MATCHED,
66062306a36Sopenharmony_ci	NON_MASKABLE_EVENT_MATCHED,
66162306a36Sopenharmony_ci	NON_MASKABLE_CONDITION_MATCHED,
66262306a36Sopenharmony_ci	MAGIC_PATTERN_MATCHED,
66362306a36Sopenharmony_ci	CONTROL_FRAME_MATCHED,
66462306a36Sopenharmony_ci	MANAGEMENT_FRAME_MATCHED,
66562306a36Sopenharmony_ci	GTK_REKEY_FAILURE,
66662306a36Sopenharmony_ci	RESERVED
66762306a36Sopenharmony_ci};
66862306a36Sopenharmony_ci
66962306a36Sopenharmony_cistruct txpd {
67062306a36Sopenharmony_ci	u8 bss_type;
67162306a36Sopenharmony_ci	u8 bss_num;
67262306a36Sopenharmony_ci	__le16 tx_pkt_length;
67362306a36Sopenharmony_ci	__le16 tx_pkt_offset;
67462306a36Sopenharmony_ci	__le16 tx_pkt_type;
67562306a36Sopenharmony_ci	__le32 tx_control;
67662306a36Sopenharmony_ci	u8 priority;
67762306a36Sopenharmony_ci	u8 flags;
67862306a36Sopenharmony_ci	u8 pkt_delay_2ms;
67962306a36Sopenharmony_ci	u8 reserved1[2];
68062306a36Sopenharmony_ci	u8 tx_token_id;
68162306a36Sopenharmony_ci	u8 reserved[2];
68262306a36Sopenharmony_ci} __packed;
68362306a36Sopenharmony_ci
68462306a36Sopenharmony_cistruct rxpd {
68562306a36Sopenharmony_ci	u8 bss_type;
68662306a36Sopenharmony_ci	u8 bss_num;
68762306a36Sopenharmony_ci	__le16 rx_pkt_length;
68862306a36Sopenharmony_ci	__le16 rx_pkt_offset;
68962306a36Sopenharmony_ci	__le16 rx_pkt_type;
69062306a36Sopenharmony_ci	__le16 seq_num;
69162306a36Sopenharmony_ci	u8 priority;
69262306a36Sopenharmony_ci	u8 rx_rate;
69362306a36Sopenharmony_ci	s8 snr;
69462306a36Sopenharmony_ci	s8 nf;
69562306a36Sopenharmony_ci
69662306a36Sopenharmony_ci	/* For: Non-802.11 AC cards
69762306a36Sopenharmony_ci	 *
69862306a36Sopenharmony_ci	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
69962306a36Sopenharmony_ci	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
70062306a36Sopenharmony_ci	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
70162306a36Sopenharmony_ci	 *
70262306a36Sopenharmony_ci	 * For: 802.11 AC cards
70362306a36Sopenharmony_ci	 * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
70462306a36Sopenharmony_ci	 * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
70562306a36Sopenharmony_ci	 *						BW80 = 10  BW160 = 11
70662306a36Sopenharmony_ci	 * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
70762306a36Sopenharmony_ci	 * [Bit 5] STBC support Enabled = 1
70862306a36Sopenharmony_ci	 * [Bit 6] LDPC support Enabled = 1
70962306a36Sopenharmony_ci	 * [Bit 7] Reserved
71062306a36Sopenharmony_ci	 */
71162306a36Sopenharmony_ci	u8 ht_info;
71262306a36Sopenharmony_ci	u8 reserved[3];
71362306a36Sopenharmony_ci	u8 flags;
71462306a36Sopenharmony_ci} __packed;
71562306a36Sopenharmony_ci
71662306a36Sopenharmony_cistruct uap_txpd {
71762306a36Sopenharmony_ci	u8 bss_type;
71862306a36Sopenharmony_ci	u8 bss_num;
71962306a36Sopenharmony_ci	__le16 tx_pkt_length;
72062306a36Sopenharmony_ci	__le16 tx_pkt_offset;
72162306a36Sopenharmony_ci	__le16 tx_pkt_type;
72262306a36Sopenharmony_ci	__le32 tx_control;
72362306a36Sopenharmony_ci	u8 priority;
72462306a36Sopenharmony_ci	u8 flags;
72562306a36Sopenharmony_ci	u8 pkt_delay_2ms;
72662306a36Sopenharmony_ci	u8 reserved1[2];
72762306a36Sopenharmony_ci	u8 tx_token_id;
72862306a36Sopenharmony_ci	u8 reserved[2];
72962306a36Sopenharmony_ci} __packed;
73062306a36Sopenharmony_ci
73162306a36Sopenharmony_cistruct uap_rxpd {
73262306a36Sopenharmony_ci	u8 bss_type;
73362306a36Sopenharmony_ci	u8 bss_num;
73462306a36Sopenharmony_ci	__le16 rx_pkt_length;
73562306a36Sopenharmony_ci	__le16 rx_pkt_offset;
73662306a36Sopenharmony_ci	__le16 rx_pkt_type;
73762306a36Sopenharmony_ci	__le16 seq_num;
73862306a36Sopenharmony_ci	u8 priority;
73962306a36Sopenharmony_ci	u8 rx_rate;
74062306a36Sopenharmony_ci	s8 snr;
74162306a36Sopenharmony_ci	s8 nf;
74262306a36Sopenharmony_ci	u8 ht_info;
74362306a36Sopenharmony_ci	u8 reserved[3];
74462306a36Sopenharmony_ci	u8 flags;
74562306a36Sopenharmony_ci} __packed;
74662306a36Sopenharmony_ci
74762306a36Sopenharmony_cistruct mwifiex_fw_chan_stats {
74862306a36Sopenharmony_ci	u8 chan_num;
74962306a36Sopenharmony_ci	u8 bandcfg;
75062306a36Sopenharmony_ci	u8 flags;
75162306a36Sopenharmony_ci	s8 noise;
75262306a36Sopenharmony_ci	__le16 total_bss;
75362306a36Sopenharmony_ci	__le16 cca_scan_dur;
75462306a36Sopenharmony_ci	__le16 cca_busy_dur;
75562306a36Sopenharmony_ci} __packed;
75662306a36Sopenharmony_ci
75762306a36Sopenharmony_cienum mwifiex_chan_scan_mode_bitmasks {
75862306a36Sopenharmony_ci	MWIFIEX_PASSIVE_SCAN = BIT(0),
75962306a36Sopenharmony_ci	MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
76062306a36Sopenharmony_ci	MWIFIEX_HIDDEN_SSID_REPORT = BIT(4),
76162306a36Sopenharmony_ci};
76262306a36Sopenharmony_ci
76362306a36Sopenharmony_cistruct mwifiex_chan_scan_param_set {
76462306a36Sopenharmony_ci	u8 radio_type;
76562306a36Sopenharmony_ci	u8 chan_number;
76662306a36Sopenharmony_ci	u8 chan_scan_mode_bitmap;
76762306a36Sopenharmony_ci	__le16 min_scan_time;
76862306a36Sopenharmony_ci	__le16 max_scan_time;
76962306a36Sopenharmony_ci} __packed;
77062306a36Sopenharmony_ci
77162306a36Sopenharmony_cistruct mwifiex_ie_types_chan_list_param_set {
77262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
77362306a36Sopenharmony_ci	struct mwifiex_chan_scan_param_set chan_scan_param[1];
77462306a36Sopenharmony_ci} __packed;
77562306a36Sopenharmony_ci
77662306a36Sopenharmony_cistruct mwifiex_ie_types_rxba_sync {
77762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
77862306a36Sopenharmony_ci	u8 mac[ETH_ALEN];
77962306a36Sopenharmony_ci	u8 tid;
78062306a36Sopenharmony_ci	u8 reserved;
78162306a36Sopenharmony_ci	__le16 seq_num;
78262306a36Sopenharmony_ci	__le16 bitmap_len;
78362306a36Sopenharmony_ci	u8 bitmap[];
78462306a36Sopenharmony_ci} __packed;
78562306a36Sopenharmony_ci
78662306a36Sopenharmony_cistruct chan_band_param_set {
78762306a36Sopenharmony_ci	u8 radio_type;
78862306a36Sopenharmony_ci	u8 chan_number;
78962306a36Sopenharmony_ci};
79062306a36Sopenharmony_ci
79162306a36Sopenharmony_cistruct mwifiex_ie_types_chan_band_list_param_set {
79262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
79362306a36Sopenharmony_ci	struct chan_band_param_set chan_band_param[1];
79462306a36Sopenharmony_ci} __packed;
79562306a36Sopenharmony_ci
79662306a36Sopenharmony_cistruct mwifiex_ie_types_rates_param_set {
79762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
79862306a36Sopenharmony_ci	u8 rates[];
79962306a36Sopenharmony_ci} __packed;
80062306a36Sopenharmony_ci
80162306a36Sopenharmony_cistruct mwifiex_ie_types_ssid_param_set {
80262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
80362306a36Sopenharmony_ci	u8 ssid[];
80462306a36Sopenharmony_ci} __packed;
80562306a36Sopenharmony_ci
80662306a36Sopenharmony_cistruct mwifiex_ie_types_num_probes {
80762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
80862306a36Sopenharmony_ci	__le16 num_probes;
80962306a36Sopenharmony_ci} __packed;
81062306a36Sopenharmony_ci
81162306a36Sopenharmony_cistruct mwifiex_ie_types_repeat_count {
81262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
81362306a36Sopenharmony_ci	__le16 repeat_count;
81462306a36Sopenharmony_ci} __packed;
81562306a36Sopenharmony_ci
81662306a36Sopenharmony_cistruct mwifiex_ie_types_min_rssi_threshold {
81762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
81862306a36Sopenharmony_ci	__le16 rssi_threshold;
81962306a36Sopenharmony_ci} __packed;
82062306a36Sopenharmony_ci
82162306a36Sopenharmony_cistruct mwifiex_ie_types_bgscan_start_later {
82262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
82362306a36Sopenharmony_ci	__le16 start_later;
82462306a36Sopenharmony_ci} __packed;
82562306a36Sopenharmony_ci
82662306a36Sopenharmony_cistruct mwifiex_ie_types_scan_chan_gap {
82762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
82862306a36Sopenharmony_ci	/* time gap in TUs to be used between two consecutive channels scan */
82962306a36Sopenharmony_ci	__le16 chan_gap;
83062306a36Sopenharmony_ci} __packed;
83162306a36Sopenharmony_ci
83262306a36Sopenharmony_cistruct mwifiex_ie_types_random_mac {
83362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
83462306a36Sopenharmony_ci	u8 mac[ETH_ALEN];
83562306a36Sopenharmony_ci} __packed;
83662306a36Sopenharmony_ci
83762306a36Sopenharmony_cistruct mwifiex_ietypes_chanstats {
83862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
83962306a36Sopenharmony_ci	struct mwifiex_fw_chan_stats chanstats[];
84062306a36Sopenharmony_ci} __packed;
84162306a36Sopenharmony_ci
84262306a36Sopenharmony_cistruct mwifiex_ie_types_wildcard_ssid_params {
84362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
84462306a36Sopenharmony_ci	u8 max_ssid_length;
84562306a36Sopenharmony_ci	u8 ssid[1];
84662306a36Sopenharmony_ci} __packed;
84762306a36Sopenharmony_ci
84862306a36Sopenharmony_ci#define TSF_DATA_SIZE            8
84962306a36Sopenharmony_cistruct mwifiex_ie_types_tsf_timestamp {
85062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
85162306a36Sopenharmony_ci	u8 tsf_data[1];
85262306a36Sopenharmony_ci} __packed;
85362306a36Sopenharmony_ci
85462306a36Sopenharmony_cistruct mwifiex_cf_param_set {
85562306a36Sopenharmony_ci	u8 cfp_cnt;
85662306a36Sopenharmony_ci	u8 cfp_period;
85762306a36Sopenharmony_ci	__le16 cfp_max_duration;
85862306a36Sopenharmony_ci	__le16 cfp_duration_remaining;
85962306a36Sopenharmony_ci} __packed;
86062306a36Sopenharmony_ci
86162306a36Sopenharmony_cistruct mwifiex_ibss_param_set {
86262306a36Sopenharmony_ci	__le16 atim_window;
86362306a36Sopenharmony_ci} __packed;
86462306a36Sopenharmony_ci
86562306a36Sopenharmony_cistruct mwifiex_ie_types_ss_param_set {
86662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
86762306a36Sopenharmony_ci	union {
86862306a36Sopenharmony_ci		struct mwifiex_cf_param_set cf_param_set[1];
86962306a36Sopenharmony_ci		struct mwifiex_ibss_param_set ibss_param_set[1];
87062306a36Sopenharmony_ci	} cf_ibss;
87162306a36Sopenharmony_ci} __packed;
87262306a36Sopenharmony_ci
87362306a36Sopenharmony_cistruct mwifiex_fh_param_set {
87462306a36Sopenharmony_ci	__le16 dwell_time;
87562306a36Sopenharmony_ci	u8 hop_set;
87662306a36Sopenharmony_ci	u8 hop_pattern;
87762306a36Sopenharmony_ci	u8 hop_index;
87862306a36Sopenharmony_ci} __packed;
87962306a36Sopenharmony_ci
88062306a36Sopenharmony_cistruct mwifiex_ds_param_set {
88162306a36Sopenharmony_ci	u8 current_chan;
88262306a36Sopenharmony_ci} __packed;
88362306a36Sopenharmony_ci
88462306a36Sopenharmony_cistruct mwifiex_ie_types_phy_param_set {
88562306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
88662306a36Sopenharmony_ci	union {
88762306a36Sopenharmony_ci		struct mwifiex_fh_param_set fh_param_set[1];
88862306a36Sopenharmony_ci		struct mwifiex_ds_param_set ds_param_set[1];
88962306a36Sopenharmony_ci	} fh_ds;
89062306a36Sopenharmony_ci} __packed;
89162306a36Sopenharmony_ci
89262306a36Sopenharmony_cistruct mwifiex_ie_types_auth_type {
89362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
89462306a36Sopenharmony_ci	__le16 auth_type;
89562306a36Sopenharmony_ci} __packed;
89662306a36Sopenharmony_ci
89762306a36Sopenharmony_cistruct mwifiex_ie_types_vendor_param_set {
89862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
89962306a36Sopenharmony_ci	u8 ie[MWIFIEX_MAX_VSIE_LEN];
90062306a36Sopenharmony_ci};
90162306a36Sopenharmony_ci
90262306a36Sopenharmony_ci#define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC	60
90362306a36Sopenharmony_ci
90462306a36Sopenharmony_cistruct mwifiex_ie_types_tdls_idle_timeout {
90562306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
90662306a36Sopenharmony_ci	__le16 value;
90762306a36Sopenharmony_ci} __packed;
90862306a36Sopenharmony_ci
90962306a36Sopenharmony_cistruct mwifiex_ie_types_rsn_param_set {
91062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
91162306a36Sopenharmony_ci	u8 rsn_ie[];
91262306a36Sopenharmony_ci} __packed;
91362306a36Sopenharmony_ci
91462306a36Sopenharmony_ci#define KEYPARAMSET_FIXED_LEN 6
91562306a36Sopenharmony_ci
91662306a36Sopenharmony_cistruct mwifiex_ie_type_key_param_set {
91762306a36Sopenharmony_ci	__le16 type;
91862306a36Sopenharmony_ci	__le16 length;
91962306a36Sopenharmony_ci	__le16 key_type_id;
92062306a36Sopenharmony_ci	__le16 key_info;
92162306a36Sopenharmony_ci	__le16 key_len;
92262306a36Sopenharmony_ci	u8 key[50];
92362306a36Sopenharmony_ci} __packed;
92462306a36Sopenharmony_ci
92562306a36Sopenharmony_ci#define IGTK_PN_LEN		8
92662306a36Sopenharmony_ci
92762306a36Sopenharmony_cistruct mwifiex_cmac_param {
92862306a36Sopenharmony_ci	u8 ipn[IGTK_PN_LEN];
92962306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_AES_CMAC];
93062306a36Sopenharmony_ci} __packed;
93162306a36Sopenharmony_ci
93262306a36Sopenharmony_cistruct mwifiex_wep_param {
93362306a36Sopenharmony_ci	__le16 key_len;
93462306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_WEP104];
93562306a36Sopenharmony_ci} __packed;
93662306a36Sopenharmony_ci
93762306a36Sopenharmony_cistruct mwifiex_tkip_param {
93862306a36Sopenharmony_ci	u8 pn[WPA_PN_SIZE];
93962306a36Sopenharmony_ci	__le16 key_len;
94062306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_TKIP];
94162306a36Sopenharmony_ci} __packed;
94262306a36Sopenharmony_ci
94362306a36Sopenharmony_cistruct mwifiex_aes_param {
94462306a36Sopenharmony_ci	u8 pn[WPA_PN_SIZE];
94562306a36Sopenharmony_ci	__le16 key_len;
94662306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_CCMP_256];
94762306a36Sopenharmony_ci} __packed;
94862306a36Sopenharmony_ci
94962306a36Sopenharmony_cistruct mwifiex_wapi_param {
95062306a36Sopenharmony_ci	u8 pn[PN_LEN];
95162306a36Sopenharmony_ci	__le16 key_len;
95262306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_SMS4];
95362306a36Sopenharmony_ci} __packed;
95462306a36Sopenharmony_ci
95562306a36Sopenharmony_cistruct mwifiex_cmac_aes_param {
95662306a36Sopenharmony_ci	u8 ipn[IGTK_PN_LEN];
95762306a36Sopenharmony_ci	__le16 key_len;
95862306a36Sopenharmony_ci	u8 key[WLAN_KEY_LEN_AES_CMAC];
95962306a36Sopenharmony_ci} __packed;
96062306a36Sopenharmony_ci
96162306a36Sopenharmony_cistruct mwifiex_ie_type_key_param_set_v2 {
96262306a36Sopenharmony_ci	__le16 type;
96362306a36Sopenharmony_ci	__le16 len;
96462306a36Sopenharmony_ci	u8 mac_addr[ETH_ALEN];
96562306a36Sopenharmony_ci	u8 key_idx;
96662306a36Sopenharmony_ci	u8 key_type;
96762306a36Sopenharmony_ci	__le16 key_info;
96862306a36Sopenharmony_ci	union {
96962306a36Sopenharmony_ci		struct mwifiex_wep_param wep;
97062306a36Sopenharmony_ci		struct mwifiex_tkip_param tkip;
97162306a36Sopenharmony_ci		struct mwifiex_aes_param aes;
97262306a36Sopenharmony_ci		struct mwifiex_wapi_param wapi;
97362306a36Sopenharmony_ci		struct mwifiex_cmac_aes_param cmac_aes;
97462306a36Sopenharmony_ci	} key_params;
97562306a36Sopenharmony_ci} __packed;
97662306a36Sopenharmony_ci
97762306a36Sopenharmony_cistruct host_cmd_ds_802_11_key_material_v2 {
97862306a36Sopenharmony_ci	__le16 action;
97962306a36Sopenharmony_ci	struct mwifiex_ie_type_key_param_set_v2 key_param_set;
98062306a36Sopenharmony_ci} __packed;
98162306a36Sopenharmony_ci
98262306a36Sopenharmony_cistruct host_cmd_ds_802_11_key_material {
98362306a36Sopenharmony_ci	__le16 action;
98462306a36Sopenharmony_ci	struct mwifiex_ie_type_key_param_set key_param_set;
98562306a36Sopenharmony_ci} __packed;
98662306a36Sopenharmony_ci
98762306a36Sopenharmony_cistruct host_cmd_ds_802_11_key_material_wep {
98862306a36Sopenharmony_ci	__le16 action;
98962306a36Sopenharmony_ci	struct mwifiex_ie_type_key_param_set key_param_set[NUM_WEP_KEYS];
99062306a36Sopenharmony_ci} __packed;
99162306a36Sopenharmony_ci
99262306a36Sopenharmony_cistruct host_cmd_ds_gen {
99362306a36Sopenharmony_ci	__le16 command;
99462306a36Sopenharmony_ci	__le16 size;
99562306a36Sopenharmony_ci	__le16 seq_num;
99662306a36Sopenharmony_ci	__le16 result;
99762306a36Sopenharmony_ci};
99862306a36Sopenharmony_ci
99962306a36Sopenharmony_ci#define S_DS_GEN        sizeof(struct host_cmd_ds_gen)
100062306a36Sopenharmony_ci
100162306a36Sopenharmony_cienum sleep_resp_ctrl {
100262306a36Sopenharmony_ci	RESP_NOT_NEEDED = 0,
100362306a36Sopenharmony_ci	RESP_NEEDED,
100462306a36Sopenharmony_ci};
100562306a36Sopenharmony_ci
100662306a36Sopenharmony_cistruct mwifiex_ps_param {
100762306a36Sopenharmony_ci	__le16 null_pkt_interval;
100862306a36Sopenharmony_ci	__le16 multiple_dtims;
100962306a36Sopenharmony_ci	__le16 bcn_miss_timeout;
101062306a36Sopenharmony_ci	__le16 local_listen_interval;
101162306a36Sopenharmony_ci	__le16 adhoc_wake_period;
101262306a36Sopenharmony_ci	__le16 mode;
101362306a36Sopenharmony_ci	__le16 delay_to_ps;
101462306a36Sopenharmony_ci} __packed;
101562306a36Sopenharmony_ci
101662306a36Sopenharmony_ci#define HS_DEF_WAKE_INTERVAL          100
101762306a36Sopenharmony_ci#define HS_DEF_INACTIVITY_TIMEOUT      50
101862306a36Sopenharmony_ci
101962306a36Sopenharmony_cistruct mwifiex_ps_param_in_hs {
102062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
102162306a36Sopenharmony_ci	__le32 hs_wake_int;
102262306a36Sopenharmony_ci	__le32 hs_inact_timeout;
102362306a36Sopenharmony_ci} __packed;
102462306a36Sopenharmony_ci
102562306a36Sopenharmony_ci#define BITMAP_AUTO_DS         0x01
102662306a36Sopenharmony_ci#define BITMAP_STA_PS          0x10
102762306a36Sopenharmony_ci
102862306a36Sopenharmony_cistruct mwifiex_ie_types_auto_ds_param {
102962306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
103062306a36Sopenharmony_ci	__le16 deep_sleep_timeout;
103162306a36Sopenharmony_ci} __packed;
103262306a36Sopenharmony_ci
103362306a36Sopenharmony_cistruct mwifiex_ie_types_ps_param {
103462306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
103562306a36Sopenharmony_ci	struct mwifiex_ps_param param;
103662306a36Sopenharmony_ci} __packed;
103762306a36Sopenharmony_ci
103862306a36Sopenharmony_cistruct host_cmd_ds_802_11_ps_mode_enh {
103962306a36Sopenharmony_ci	__le16 action;
104062306a36Sopenharmony_ci
104162306a36Sopenharmony_ci	union {
104262306a36Sopenharmony_ci		struct mwifiex_ps_param opt_ps;
104362306a36Sopenharmony_ci		__le16 ps_bitmap;
104462306a36Sopenharmony_ci	} params;
104562306a36Sopenharmony_ci} __packed;
104662306a36Sopenharmony_ci
104762306a36Sopenharmony_cienum API_VER_ID {
104862306a36Sopenharmony_ci	KEY_API_VER_ID = 1,
104962306a36Sopenharmony_ci	FW_API_VER_ID = 2,
105062306a36Sopenharmony_ci	UAP_FW_API_VER_ID = 3,
105162306a36Sopenharmony_ci	CHANRPT_API_VER_ID = 4,
105262306a36Sopenharmony_ci	FW_HOTFIX_VER_ID = 5,
105362306a36Sopenharmony_ci};
105462306a36Sopenharmony_ci
105562306a36Sopenharmony_cistruct hw_spec_api_rev {
105662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
105762306a36Sopenharmony_ci	__le16 api_id;
105862306a36Sopenharmony_ci	u8 major_ver;
105962306a36Sopenharmony_ci	u8 minor_ver;
106062306a36Sopenharmony_ci} __packed;
106162306a36Sopenharmony_ci
106262306a36Sopenharmony_cistruct host_cmd_ds_get_hw_spec {
106362306a36Sopenharmony_ci	__le16 hw_if_version;
106462306a36Sopenharmony_ci	__le16 version;
106562306a36Sopenharmony_ci	__le16 reserved;
106662306a36Sopenharmony_ci	__le16 num_of_mcast_adr;
106762306a36Sopenharmony_ci	u8 permanent_addr[ETH_ALEN];
106862306a36Sopenharmony_ci	__le16 region_code;
106962306a36Sopenharmony_ci	__le16 number_of_antenna;
107062306a36Sopenharmony_ci	__le32 fw_release_number;
107162306a36Sopenharmony_ci	__le32 reserved_1;
107262306a36Sopenharmony_ci	__le32 reserved_2;
107362306a36Sopenharmony_ci	__le32 reserved_3;
107462306a36Sopenharmony_ci	__le32 fw_cap_info;
107562306a36Sopenharmony_ci	__le32 dot_11n_dev_cap;
107662306a36Sopenharmony_ci	u8 dev_mcs_support;
107762306a36Sopenharmony_ci	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
107862306a36Sopenharmony_ci	__le16 mgmt_buf_count;	/* mgmt IE buffer count */
107962306a36Sopenharmony_ci	__le32 reserved_5;
108062306a36Sopenharmony_ci	__le32 reserved_6;
108162306a36Sopenharmony_ci	__le32 dot_11ac_dev_cap;
108262306a36Sopenharmony_ci	__le32 dot_11ac_mcs_support;
108362306a36Sopenharmony_ci	u8 tlvs[];
108462306a36Sopenharmony_ci} __packed;
108562306a36Sopenharmony_ci
108662306a36Sopenharmony_cistruct host_cmd_ds_802_11_rssi_info {
108762306a36Sopenharmony_ci	__le16 action;
108862306a36Sopenharmony_ci	__le16 ndata;
108962306a36Sopenharmony_ci	__le16 nbcn;
109062306a36Sopenharmony_ci	__le16 reserved[9];
109162306a36Sopenharmony_ci	long long reserved_1;
109262306a36Sopenharmony_ci} __packed;
109362306a36Sopenharmony_ci
109462306a36Sopenharmony_cistruct host_cmd_ds_802_11_rssi_info_rsp {
109562306a36Sopenharmony_ci	__le16 action;
109662306a36Sopenharmony_ci	__le16 ndata;
109762306a36Sopenharmony_ci	__le16 nbcn;
109862306a36Sopenharmony_ci	__le16 data_rssi_last;
109962306a36Sopenharmony_ci	__le16 data_nf_last;
110062306a36Sopenharmony_ci	__le16 data_rssi_avg;
110162306a36Sopenharmony_ci	__le16 data_nf_avg;
110262306a36Sopenharmony_ci	__le16 bcn_rssi_last;
110362306a36Sopenharmony_ci	__le16 bcn_nf_last;
110462306a36Sopenharmony_ci	__le16 bcn_rssi_avg;
110562306a36Sopenharmony_ci	__le16 bcn_nf_avg;
110662306a36Sopenharmony_ci	long long tsf_bcn;
110762306a36Sopenharmony_ci} __packed;
110862306a36Sopenharmony_ci
110962306a36Sopenharmony_cistruct host_cmd_ds_802_11_mac_address {
111062306a36Sopenharmony_ci	__le16 action;
111162306a36Sopenharmony_ci	u8 mac_addr[ETH_ALEN];
111262306a36Sopenharmony_ci} __packed;
111362306a36Sopenharmony_ci
111462306a36Sopenharmony_cistruct host_cmd_ds_mac_control {
111562306a36Sopenharmony_ci	__le32 action;
111662306a36Sopenharmony_ci};
111762306a36Sopenharmony_ci
111862306a36Sopenharmony_cistruct host_cmd_ds_mac_multicast_adr {
111962306a36Sopenharmony_ci	__le16 action;
112062306a36Sopenharmony_ci	__le16 num_of_adrs;
112162306a36Sopenharmony_ci	u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
112262306a36Sopenharmony_ci} __packed;
112362306a36Sopenharmony_ci
112462306a36Sopenharmony_cistruct host_cmd_ds_802_11_deauthenticate {
112562306a36Sopenharmony_ci	u8 mac_addr[ETH_ALEN];
112662306a36Sopenharmony_ci	__le16 reason_code;
112762306a36Sopenharmony_ci} __packed;
112862306a36Sopenharmony_ci
112962306a36Sopenharmony_cistruct host_cmd_ds_802_11_associate {
113062306a36Sopenharmony_ci	u8 peer_sta_addr[ETH_ALEN];
113162306a36Sopenharmony_ci	__le16 cap_info_bitmap;
113262306a36Sopenharmony_ci	__le16 listen_interval;
113362306a36Sopenharmony_ci	__le16 beacon_period;
113462306a36Sopenharmony_ci	u8 dtim_period;
113562306a36Sopenharmony_ci} __packed;
113662306a36Sopenharmony_ci
113762306a36Sopenharmony_cistruct ieee_types_assoc_rsp {
113862306a36Sopenharmony_ci	__le16 cap_info_bitmap;
113962306a36Sopenharmony_ci	__le16 status_code;
114062306a36Sopenharmony_ci	__le16 a_id;
114162306a36Sopenharmony_ci	u8 ie_buffer[];
114262306a36Sopenharmony_ci} __packed;
114362306a36Sopenharmony_ci
114462306a36Sopenharmony_cistruct host_cmd_ds_802_11_associate_rsp {
114562306a36Sopenharmony_ci	struct ieee_types_assoc_rsp assoc_rsp;
114662306a36Sopenharmony_ci} __packed;
114762306a36Sopenharmony_ci
114862306a36Sopenharmony_cistruct ieee_types_cf_param_set {
114962306a36Sopenharmony_ci	u8 element_id;
115062306a36Sopenharmony_ci	u8 len;
115162306a36Sopenharmony_ci	u8 cfp_cnt;
115262306a36Sopenharmony_ci	u8 cfp_period;
115362306a36Sopenharmony_ci	__le16 cfp_max_duration;
115462306a36Sopenharmony_ci	__le16 cfp_duration_remaining;
115562306a36Sopenharmony_ci} __packed;
115662306a36Sopenharmony_ci
115762306a36Sopenharmony_cistruct ieee_types_ibss_param_set {
115862306a36Sopenharmony_ci	u8 element_id;
115962306a36Sopenharmony_ci	u8 len;
116062306a36Sopenharmony_ci	__le16 atim_window;
116162306a36Sopenharmony_ci} __packed;
116262306a36Sopenharmony_ci
116362306a36Sopenharmony_ciunion ieee_types_ss_param_set {
116462306a36Sopenharmony_ci	struct ieee_types_cf_param_set cf_param_set;
116562306a36Sopenharmony_ci	struct ieee_types_ibss_param_set ibss_param_set;
116662306a36Sopenharmony_ci} __packed;
116762306a36Sopenharmony_ci
116862306a36Sopenharmony_cistruct ieee_types_fh_param_set {
116962306a36Sopenharmony_ci	u8 element_id;
117062306a36Sopenharmony_ci	u8 len;
117162306a36Sopenharmony_ci	__le16 dwell_time;
117262306a36Sopenharmony_ci	u8 hop_set;
117362306a36Sopenharmony_ci	u8 hop_pattern;
117462306a36Sopenharmony_ci	u8 hop_index;
117562306a36Sopenharmony_ci} __packed;
117662306a36Sopenharmony_ci
117762306a36Sopenharmony_cistruct ieee_types_ds_param_set {
117862306a36Sopenharmony_ci	u8 element_id;
117962306a36Sopenharmony_ci	u8 len;
118062306a36Sopenharmony_ci	u8 current_chan;
118162306a36Sopenharmony_ci} __packed;
118262306a36Sopenharmony_ci
118362306a36Sopenharmony_ciunion ieee_types_phy_param_set {
118462306a36Sopenharmony_ci	struct ieee_types_fh_param_set fh_param_set;
118562306a36Sopenharmony_ci	struct ieee_types_ds_param_set ds_param_set;
118662306a36Sopenharmony_ci} __packed;
118762306a36Sopenharmony_ci
118862306a36Sopenharmony_cistruct ieee_types_oper_mode_ntf {
118962306a36Sopenharmony_ci	u8 element_id;
119062306a36Sopenharmony_ci	u8 len;
119162306a36Sopenharmony_ci	u8 oper_mode;
119262306a36Sopenharmony_ci} __packed;
119362306a36Sopenharmony_ci
119462306a36Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_start {
119562306a36Sopenharmony_ci	u8 ssid[IEEE80211_MAX_SSID_LEN];
119662306a36Sopenharmony_ci	u8 bss_mode;
119762306a36Sopenharmony_ci	__le16 beacon_period;
119862306a36Sopenharmony_ci	u8 dtim_period;
119962306a36Sopenharmony_ci	union ieee_types_ss_param_set ss_param_set;
120062306a36Sopenharmony_ci	union ieee_types_phy_param_set phy_param_set;
120162306a36Sopenharmony_ci	u16 reserved1;
120262306a36Sopenharmony_ci	__le16 cap_info_bitmap;
120362306a36Sopenharmony_ci	u8 data_rate[HOSTCMD_SUPPORTED_RATES];
120462306a36Sopenharmony_ci} __packed;
120562306a36Sopenharmony_ci
120662306a36Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_start_result {
120762306a36Sopenharmony_ci	u8 pad[3];
120862306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
120962306a36Sopenharmony_ci	u8 pad2[2];
121062306a36Sopenharmony_ci	u8 result;
121162306a36Sopenharmony_ci} __packed;
121262306a36Sopenharmony_ci
121362306a36Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_join_result {
121462306a36Sopenharmony_ci	u8 result;
121562306a36Sopenharmony_ci} __packed;
121662306a36Sopenharmony_ci
121762306a36Sopenharmony_cistruct adhoc_bss_desc {
121862306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
121962306a36Sopenharmony_ci	u8 ssid[IEEE80211_MAX_SSID_LEN];
122062306a36Sopenharmony_ci	u8 bss_mode;
122162306a36Sopenharmony_ci	__le16 beacon_period;
122262306a36Sopenharmony_ci	u8 dtim_period;
122362306a36Sopenharmony_ci	u8 time_stamp[8];
122462306a36Sopenharmony_ci	u8 local_time[8];
122562306a36Sopenharmony_ci	union ieee_types_phy_param_set phy_param_set;
122662306a36Sopenharmony_ci	union ieee_types_ss_param_set ss_param_set;
122762306a36Sopenharmony_ci	__le16 cap_info_bitmap;
122862306a36Sopenharmony_ci	u8 data_rates[HOSTCMD_SUPPORTED_RATES];
122962306a36Sopenharmony_ci
123062306a36Sopenharmony_ci	/*
123162306a36Sopenharmony_ci	 *  DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
123262306a36Sopenharmony_ci	 *  It is used in the Adhoc join command and will cause a
123362306a36Sopenharmony_ci	 *  binary layout mismatch with the firmware
123462306a36Sopenharmony_ci	 */
123562306a36Sopenharmony_ci} __packed;
123662306a36Sopenharmony_ci
123762306a36Sopenharmony_cistruct host_cmd_ds_802_11_ad_hoc_join {
123862306a36Sopenharmony_ci	struct adhoc_bss_desc bss_descriptor;
123962306a36Sopenharmony_ci	u16 reserved1;
124062306a36Sopenharmony_ci	u16 reserved2;
124162306a36Sopenharmony_ci} __packed;
124262306a36Sopenharmony_ci
124362306a36Sopenharmony_cistruct host_cmd_ds_802_11_get_log {
124462306a36Sopenharmony_ci	__le32 mcast_tx_frame;
124562306a36Sopenharmony_ci	__le32 failed;
124662306a36Sopenharmony_ci	__le32 retry;
124762306a36Sopenharmony_ci	__le32 multi_retry;
124862306a36Sopenharmony_ci	__le32 frame_dup;
124962306a36Sopenharmony_ci	__le32 rts_success;
125062306a36Sopenharmony_ci	__le32 rts_failure;
125162306a36Sopenharmony_ci	__le32 ack_failure;
125262306a36Sopenharmony_ci	__le32 rx_frag;
125362306a36Sopenharmony_ci	__le32 mcast_rx_frame;
125462306a36Sopenharmony_ci	__le32 fcs_error;
125562306a36Sopenharmony_ci	__le32 tx_frame;
125662306a36Sopenharmony_ci	__le32 reserved;
125762306a36Sopenharmony_ci	__le32 wep_icv_err_cnt[4];
125862306a36Sopenharmony_ci	__le32 bcn_rcv_cnt;
125962306a36Sopenharmony_ci	__le32 bcn_miss_cnt;
126062306a36Sopenharmony_ci} __packed;
126162306a36Sopenharmony_ci
126262306a36Sopenharmony_ci/* Enumeration for rate format */
126362306a36Sopenharmony_cienum _mwifiex_rate_format {
126462306a36Sopenharmony_ci	MWIFIEX_RATE_FORMAT_LG = 0,
126562306a36Sopenharmony_ci	MWIFIEX_RATE_FORMAT_HT,
126662306a36Sopenharmony_ci	MWIFIEX_RATE_FORMAT_VHT,
126762306a36Sopenharmony_ci	MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
126862306a36Sopenharmony_ci};
126962306a36Sopenharmony_ci
127062306a36Sopenharmony_cistruct host_cmd_ds_tx_rate_query {
127162306a36Sopenharmony_ci	u8 tx_rate;
127262306a36Sopenharmony_ci	/* Tx Rate Info: For 802.11 AC cards
127362306a36Sopenharmony_ci	 *
127462306a36Sopenharmony_ci	 * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
127562306a36Sopenharmony_ci	 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
127662306a36Sopenharmony_ci	 * [Bit 4]   HT/VHT Guard Interval: LGI = 0, SGI = 1
127762306a36Sopenharmony_ci	 *
127862306a36Sopenharmony_ci	 * For non-802.11 AC cards
127962306a36Sopenharmony_ci	 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
128062306a36Sopenharmony_ci	 * [Bit 1]  HT Bandwidth: BW20 = 0, BW40 = 1
128162306a36Sopenharmony_ci	 * [Bit 2]  HT Guard Interval: LGI = 0, SGI = 1
128262306a36Sopenharmony_ci	 */
128362306a36Sopenharmony_ci	u8 ht_info;
128462306a36Sopenharmony_ci} __packed;
128562306a36Sopenharmony_ci
128662306a36Sopenharmony_cistruct mwifiex_tx_pause_tlv {
128762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
128862306a36Sopenharmony_ci	u8 peermac[ETH_ALEN];
128962306a36Sopenharmony_ci	u8 tx_pause;
129062306a36Sopenharmony_ci	u8 pkt_cnt;
129162306a36Sopenharmony_ci} __packed;
129262306a36Sopenharmony_ci
129362306a36Sopenharmony_cienum Host_Sleep_Action {
129462306a36Sopenharmony_ci	HS_CONFIGURE = 0x0001,
129562306a36Sopenharmony_ci	HS_ACTIVATE  = 0x0002,
129662306a36Sopenharmony_ci};
129762306a36Sopenharmony_ci
129862306a36Sopenharmony_cistruct mwifiex_hs_config_param {
129962306a36Sopenharmony_ci	__le32 conditions;
130062306a36Sopenharmony_ci	u8 gpio;
130162306a36Sopenharmony_ci	u8 gap;
130262306a36Sopenharmony_ci} __packed;
130362306a36Sopenharmony_ci
130462306a36Sopenharmony_cistruct hs_activate_param {
130562306a36Sopenharmony_ci	__le16 resp_ctrl;
130662306a36Sopenharmony_ci} __packed;
130762306a36Sopenharmony_ci
130862306a36Sopenharmony_cistruct host_cmd_ds_802_11_hs_cfg_enh {
130962306a36Sopenharmony_ci	__le16 action;
131062306a36Sopenharmony_ci
131162306a36Sopenharmony_ci	union {
131262306a36Sopenharmony_ci		struct mwifiex_hs_config_param hs_config;
131362306a36Sopenharmony_ci		struct hs_activate_param hs_activate;
131462306a36Sopenharmony_ci	} params;
131562306a36Sopenharmony_ci} __packed;
131662306a36Sopenharmony_ci
131762306a36Sopenharmony_cienum SNMP_MIB_INDEX {
131862306a36Sopenharmony_ci	OP_RATE_SET_I = 1,
131962306a36Sopenharmony_ci	DTIM_PERIOD_I = 3,
132062306a36Sopenharmony_ci	RTS_THRESH_I = 5,
132162306a36Sopenharmony_ci	SHORT_RETRY_LIM_I = 6,
132262306a36Sopenharmony_ci	LONG_RETRY_LIM_I = 7,
132362306a36Sopenharmony_ci	FRAG_THRESH_I = 8,
132462306a36Sopenharmony_ci	DOT11D_I = 9,
132562306a36Sopenharmony_ci	DOT11H_I = 10,
132662306a36Sopenharmony_ci};
132762306a36Sopenharmony_ci
132862306a36Sopenharmony_cienum mwifiex_assocmd_failurepoint {
132962306a36Sopenharmony_ci	MWIFIEX_ASSOC_CMD_SUCCESS = 0,
133062306a36Sopenharmony_ci	MWIFIEX_ASSOC_CMD_FAILURE_ASSOC,
133162306a36Sopenharmony_ci	MWIFIEX_ASSOC_CMD_FAILURE_AUTH,
133262306a36Sopenharmony_ci	MWIFIEX_ASSOC_CMD_FAILURE_JOIN
133362306a36Sopenharmony_ci};
133462306a36Sopenharmony_ci
133562306a36Sopenharmony_ci#define MAX_SNMP_BUF_SIZE   128
133662306a36Sopenharmony_ci
133762306a36Sopenharmony_cistruct host_cmd_ds_802_11_snmp_mib {
133862306a36Sopenharmony_ci	__le16 query_type;
133962306a36Sopenharmony_ci	__le16 oid;
134062306a36Sopenharmony_ci	__le16 buf_size;
134162306a36Sopenharmony_ci	u8 value[1];
134262306a36Sopenharmony_ci} __packed;
134362306a36Sopenharmony_ci
134462306a36Sopenharmony_cistruct mwifiex_rate_scope {
134562306a36Sopenharmony_ci	__le16 type;
134662306a36Sopenharmony_ci	__le16 length;
134762306a36Sopenharmony_ci	__le16 hr_dsss_rate_bitmap;
134862306a36Sopenharmony_ci	__le16 ofdm_rate_bitmap;
134962306a36Sopenharmony_ci	__le16 ht_mcs_rate_bitmap[8];
135062306a36Sopenharmony_ci	__le16 vht_mcs_rate_bitmap[8];
135162306a36Sopenharmony_ci} __packed;
135262306a36Sopenharmony_ci
135362306a36Sopenharmony_cistruct mwifiex_rate_drop_pattern {
135462306a36Sopenharmony_ci	__le16 type;
135562306a36Sopenharmony_ci	__le16 length;
135662306a36Sopenharmony_ci	__le32 rate_drop_mode;
135762306a36Sopenharmony_ci} __packed;
135862306a36Sopenharmony_ci
135962306a36Sopenharmony_cistruct host_cmd_ds_tx_rate_cfg {
136062306a36Sopenharmony_ci	__le16 action;
136162306a36Sopenharmony_ci	__le16 cfg_index;
136262306a36Sopenharmony_ci} __packed;
136362306a36Sopenharmony_ci
136462306a36Sopenharmony_cistruct mwifiex_power_group {
136562306a36Sopenharmony_ci	u8 modulation_class;
136662306a36Sopenharmony_ci	u8 first_rate_code;
136762306a36Sopenharmony_ci	u8 last_rate_code;
136862306a36Sopenharmony_ci	s8 power_step;
136962306a36Sopenharmony_ci	s8 power_min;
137062306a36Sopenharmony_ci	s8 power_max;
137162306a36Sopenharmony_ci	u8 ht_bandwidth;
137262306a36Sopenharmony_ci	u8 reserved;
137362306a36Sopenharmony_ci} __packed;
137462306a36Sopenharmony_ci
137562306a36Sopenharmony_cistruct mwifiex_types_power_group {
137662306a36Sopenharmony_ci	__le16 type;
137762306a36Sopenharmony_ci	__le16 length;
137862306a36Sopenharmony_ci} __packed;
137962306a36Sopenharmony_ci
138062306a36Sopenharmony_cistruct host_cmd_ds_txpwr_cfg {
138162306a36Sopenharmony_ci	__le16 action;
138262306a36Sopenharmony_ci	__le16 cfg_index;
138362306a36Sopenharmony_ci	__le32 mode;
138462306a36Sopenharmony_ci} __packed;
138562306a36Sopenharmony_ci
138662306a36Sopenharmony_cistruct host_cmd_ds_rf_tx_pwr {
138762306a36Sopenharmony_ci	__le16 action;
138862306a36Sopenharmony_ci	__le16 cur_level;
138962306a36Sopenharmony_ci	u8 max_power;
139062306a36Sopenharmony_ci	u8 min_power;
139162306a36Sopenharmony_ci} __packed;
139262306a36Sopenharmony_ci
139362306a36Sopenharmony_cistruct host_cmd_ds_rf_ant_mimo {
139462306a36Sopenharmony_ci	__le16 action_tx;
139562306a36Sopenharmony_ci	__le16 tx_ant_mode;
139662306a36Sopenharmony_ci	__le16 action_rx;
139762306a36Sopenharmony_ci	__le16 rx_ant_mode;
139862306a36Sopenharmony_ci} __packed;
139962306a36Sopenharmony_ci
140062306a36Sopenharmony_cistruct host_cmd_ds_rf_ant_siso {
140162306a36Sopenharmony_ci	__le16 action;
140262306a36Sopenharmony_ci	__le16 ant_mode;
140362306a36Sopenharmony_ci} __packed;
140462306a36Sopenharmony_ci
140562306a36Sopenharmony_cistruct host_cmd_ds_tdls_oper {
140662306a36Sopenharmony_ci	__le16 tdls_action;
140762306a36Sopenharmony_ci	__le16 reason;
140862306a36Sopenharmony_ci	u8 peer_mac[ETH_ALEN];
140962306a36Sopenharmony_ci} __packed;
141062306a36Sopenharmony_ci
141162306a36Sopenharmony_cistruct mwifiex_tdls_config {
141262306a36Sopenharmony_ci	__le16 enable;
141362306a36Sopenharmony_ci} __packed;
141462306a36Sopenharmony_ci
141562306a36Sopenharmony_cistruct mwifiex_tdls_config_cs_params {
141662306a36Sopenharmony_ci	u8 unit_time;
141762306a36Sopenharmony_ci	u8 thr_otherlink;
141862306a36Sopenharmony_ci	u8 thr_directlink;
141962306a36Sopenharmony_ci} __packed;
142062306a36Sopenharmony_ci
142162306a36Sopenharmony_cistruct mwifiex_tdls_init_cs_params {
142262306a36Sopenharmony_ci	u8 peer_mac[ETH_ALEN];
142362306a36Sopenharmony_ci	u8 primary_chan;
142462306a36Sopenharmony_ci	u8 second_chan_offset;
142562306a36Sopenharmony_ci	u8 band;
142662306a36Sopenharmony_ci	__le16 switch_time;
142762306a36Sopenharmony_ci	__le16 switch_timeout;
142862306a36Sopenharmony_ci	u8 reg_class;
142962306a36Sopenharmony_ci	u8 periodicity;
143062306a36Sopenharmony_ci} __packed;
143162306a36Sopenharmony_ci
143262306a36Sopenharmony_cistruct mwifiex_tdls_stop_cs_params {
143362306a36Sopenharmony_ci	u8 peer_mac[ETH_ALEN];
143462306a36Sopenharmony_ci} __packed;
143562306a36Sopenharmony_ci
143662306a36Sopenharmony_cistruct host_cmd_ds_tdls_config {
143762306a36Sopenharmony_ci	__le16 tdls_action;
143862306a36Sopenharmony_ci	u8 tdls_data[];
143962306a36Sopenharmony_ci} __packed;
144062306a36Sopenharmony_ci
144162306a36Sopenharmony_cistruct mwifiex_chan_desc {
144262306a36Sopenharmony_ci	__le16 start_freq;
144362306a36Sopenharmony_ci	u8 chan_width;
144462306a36Sopenharmony_ci	u8 chan_num;
144562306a36Sopenharmony_ci} __packed;
144662306a36Sopenharmony_ci
144762306a36Sopenharmony_cistruct host_cmd_ds_chan_rpt_req {
144862306a36Sopenharmony_ci	struct mwifiex_chan_desc chan_desc;
144962306a36Sopenharmony_ci	__le32 msec_dwell_time;
145062306a36Sopenharmony_ci} __packed;
145162306a36Sopenharmony_ci
145262306a36Sopenharmony_cistruct host_cmd_ds_chan_rpt_event {
145362306a36Sopenharmony_ci	__le32 result;
145462306a36Sopenharmony_ci	__le64 start_tsf;
145562306a36Sopenharmony_ci	__le32 duration;
145662306a36Sopenharmony_ci	u8 tlvbuf[];
145762306a36Sopenharmony_ci} __packed;
145862306a36Sopenharmony_ci
145962306a36Sopenharmony_cistruct host_cmd_sdio_sp_rx_aggr_cfg {
146062306a36Sopenharmony_ci	u8 action;
146162306a36Sopenharmony_ci	u8 enable;
146262306a36Sopenharmony_ci	__le16 block_size;
146362306a36Sopenharmony_ci} __packed;
146462306a36Sopenharmony_ci
146562306a36Sopenharmony_cistruct mwifiex_fixed_bcn_param {
146662306a36Sopenharmony_ci	__le64 timestamp;
146762306a36Sopenharmony_ci	__le16 beacon_period;
146862306a36Sopenharmony_ci	__le16 cap_info_bitmap;
146962306a36Sopenharmony_ci} __packed;
147062306a36Sopenharmony_ci
147162306a36Sopenharmony_cistruct mwifiex_event_scan_result {
147262306a36Sopenharmony_ci	__le16 event_id;
147362306a36Sopenharmony_ci	u8 bss_index;
147462306a36Sopenharmony_ci	u8 bss_type;
147562306a36Sopenharmony_ci	u8 more_event;
147662306a36Sopenharmony_ci	u8 reserved[3];
147762306a36Sopenharmony_ci	__le16 buf_size;
147862306a36Sopenharmony_ci	u8 num_of_set;
147962306a36Sopenharmony_ci} __packed;
148062306a36Sopenharmony_ci
148162306a36Sopenharmony_cistruct tx_status_event {
148262306a36Sopenharmony_ci	u8 packet_type;
148362306a36Sopenharmony_ci	u8 tx_token_id;
148462306a36Sopenharmony_ci	u8 status;
148562306a36Sopenharmony_ci} __packed;
148662306a36Sopenharmony_ci
148762306a36Sopenharmony_ci#define MWIFIEX_USER_SCAN_CHAN_MAX             50
148862306a36Sopenharmony_ci
148962306a36Sopenharmony_ci#define MWIFIEX_MAX_SSID_LIST_LENGTH         10
149062306a36Sopenharmony_ci
149162306a36Sopenharmony_cistruct mwifiex_scan_cmd_config {
149262306a36Sopenharmony_ci	/*
149362306a36Sopenharmony_ci	 *  BSS mode to be sent in the firmware command
149462306a36Sopenharmony_ci	 */
149562306a36Sopenharmony_ci	u8 bss_mode;
149662306a36Sopenharmony_ci
149762306a36Sopenharmony_ci	/* Specific BSSID used to filter scan results in the firmware */
149862306a36Sopenharmony_ci	u8 specific_bssid[ETH_ALEN];
149962306a36Sopenharmony_ci
150062306a36Sopenharmony_ci	/* Length of TLVs sent in command starting at tlvBuffer */
150162306a36Sopenharmony_ci	u32 tlv_buf_len;
150262306a36Sopenharmony_ci
150362306a36Sopenharmony_ci	/*
150462306a36Sopenharmony_ci	 *  SSID TLV(s) and ChanList TLVs to be sent in the firmware command
150562306a36Sopenharmony_ci	 *
150662306a36Sopenharmony_ci	 *  TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
150762306a36Sopenharmony_ci	 *  WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
150862306a36Sopenharmony_ci	 */
150962306a36Sopenharmony_ci	u8 tlv_buf[1];	/* SSID TLV(s) and ChanList TLVs are stored
151062306a36Sopenharmony_ci				   here */
151162306a36Sopenharmony_ci} __packed;
151262306a36Sopenharmony_ci
151362306a36Sopenharmony_cistruct mwifiex_user_scan_chan {
151462306a36Sopenharmony_ci	u8 chan_number;
151562306a36Sopenharmony_ci	u8 radio_type;
151662306a36Sopenharmony_ci	u8 scan_type;
151762306a36Sopenharmony_ci	u8 reserved;
151862306a36Sopenharmony_ci	u32 scan_time;
151962306a36Sopenharmony_ci} __packed;
152062306a36Sopenharmony_ci
152162306a36Sopenharmony_cistruct mwifiex_user_scan_cfg {
152262306a36Sopenharmony_ci	/*
152362306a36Sopenharmony_ci	 *  BSS mode to be sent in the firmware command
152462306a36Sopenharmony_ci	 */
152562306a36Sopenharmony_ci	u8 bss_mode;
152662306a36Sopenharmony_ci	/* Configure the number of probe requests for active chan scans */
152762306a36Sopenharmony_ci	u8 num_probes;
152862306a36Sopenharmony_ci	u8 reserved;
152962306a36Sopenharmony_ci	/* BSSID filter sent in the firmware command to limit the results */
153062306a36Sopenharmony_ci	u8 specific_bssid[ETH_ALEN];
153162306a36Sopenharmony_ci	/* SSID filter list used in the firmware to limit the scan results */
153262306a36Sopenharmony_ci	struct cfg80211_ssid *ssid_list;
153362306a36Sopenharmony_ci	u8 num_ssids;
153462306a36Sopenharmony_ci	/* Variable number (fixed maximum) of channels to scan up */
153562306a36Sopenharmony_ci	struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
153662306a36Sopenharmony_ci	u16 scan_chan_gap;
153762306a36Sopenharmony_ci	u8 random_mac[ETH_ALEN];
153862306a36Sopenharmony_ci} __packed;
153962306a36Sopenharmony_ci
154062306a36Sopenharmony_ci#define MWIFIEX_BG_SCAN_CHAN_MAX 38
154162306a36Sopenharmony_ci#define MWIFIEX_BSS_MODE_INFRA 1
154262306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_GET     0x0000
154362306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_SET     0x0001
154462306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_ACT_SET_ALL 0xff01
154562306a36Sopenharmony_ci/** ssid match */
154662306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_SSID_MATCH          0x0001
154762306a36Sopenharmony_ci/** ssid match and RSSI exceeded */
154862306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_SSID_RSSI_MATCH     0x0004
154962306a36Sopenharmony_ci/**wait for all channel scan to complete to report scan result*/
155062306a36Sopenharmony_ci#define MWIFIEX_BGSCAN_WAIT_ALL_CHAN_DONE  0x80000000
155162306a36Sopenharmony_ci
155262306a36Sopenharmony_cistruct mwifiex_bg_scan_cfg {
155362306a36Sopenharmony_ci	u16 action;
155462306a36Sopenharmony_ci	u8 enable;
155562306a36Sopenharmony_ci	u8 bss_type;
155662306a36Sopenharmony_ci	u8 chan_per_scan;
155762306a36Sopenharmony_ci	u32 scan_interval;
155862306a36Sopenharmony_ci	u32 report_condition;
155962306a36Sopenharmony_ci	u8 num_probes;
156062306a36Sopenharmony_ci	u8 rssi_threshold;
156162306a36Sopenharmony_ci	u8 snr_threshold;
156262306a36Sopenharmony_ci	u16 repeat_count;
156362306a36Sopenharmony_ci	u16 start_later;
156462306a36Sopenharmony_ci	struct cfg80211_match_set *ssid_list;
156562306a36Sopenharmony_ci	u8 num_ssids;
156662306a36Sopenharmony_ci	struct mwifiex_user_scan_chan chan_list[MWIFIEX_BG_SCAN_CHAN_MAX];
156762306a36Sopenharmony_ci	u16 scan_chan_gap;
156862306a36Sopenharmony_ci} __packed;
156962306a36Sopenharmony_ci
157062306a36Sopenharmony_cistruct ie_body {
157162306a36Sopenharmony_ci	u8 grp_key_oui[4];
157262306a36Sopenharmony_ci	u8 ptk_cnt[2];
157362306a36Sopenharmony_ci	u8 ptk_body[4];
157462306a36Sopenharmony_ci} __packed;
157562306a36Sopenharmony_ci
157662306a36Sopenharmony_cistruct host_cmd_ds_802_11_scan {
157762306a36Sopenharmony_ci	u8 bss_mode;
157862306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
157962306a36Sopenharmony_ci	u8 tlv_buffer[];
158062306a36Sopenharmony_ci} __packed;
158162306a36Sopenharmony_ci
158262306a36Sopenharmony_cistruct host_cmd_ds_802_11_scan_rsp {
158362306a36Sopenharmony_ci	__le16 bss_descript_size;
158462306a36Sopenharmony_ci	u8 number_of_sets;
158562306a36Sopenharmony_ci	u8 bss_desc_and_tlv_buffer[];
158662306a36Sopenharmony_ci} __packed;
158762306a36Sopenharmony_ci
158862306a36Sopenharmony_cistruct host_cmd_ds_802_11_scan_ext {
158962306a36Sopenharmony_ci	u32   reserved;
159062306a36Sopenharmony_ci	u8    tlv_buffer[1];
159162306a36Sopenharmony_ci} __packed;
159262306a36Sopenharmony_ci
159362306a36Sopenharmony_cistruct mwifiex_ie_types_bss_mode {
159462306a36Sopenharmony_ci	struct mwifiex_ie_types_header  header;
159562306a36Sopenharmony_ci	u8 bss_mode;
159662306a36Sopenharmony_ci} __packed;
159762306a36Sopenharmony_ci
159862306a36Sopenharmony_cistruct mwifiex_ie_types_bss_scan_rsp {
159962306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
160062306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
160162306a36Sopenharmony_ci	u8 frame_body[];
160262306a36Sopenharmony_ci} __packed;
160362306a36Sopenharmony_ci
160462306a36Sopenharmony_cistruct mwifiex_ie_types_bss_scan_info {
160562306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
160662306a36Sopenharmony_ci	__le16 rssi;
160762306a36Sopenharmony_ci	__le16 anpi;
160862306a36Sopenharmony_ci	u8 cca_busy_fraction;
160962306a36Sopenharmony_ci	u8 radio_type;
161062306a36Sopenharmony_ci	u8 channel;
161162306a36Sopenharmony_ci	u8 reserved;
161262306a36Sopenharmony_ci	__le64 tsf;
161362306a36Sopenharmony_ci} __packed;
161462306a36Sopenharmony_ci
161562306a36Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_config {
161662306a36Sopenharmony_ci	__le16 action;
161762306a36Sopenharmony_ci	u8 enable;
161862306a36Sopenharmony_ci	u8 bss_type;
161962306a36Sopenharmony_ci	u8 chan_per_scan;
162062306a36Sopenharmony_ci	u8 reserved;
162162306a36Sopenharmony_ci	__le16 reserved1;
162262306a36Sopenharmony_ci	__le32 scan_interval;
162362306a36Sopenharmony_ci	__le32 reserved2;
162462306a36Sopenharmony_ci	__le32 report_condition;
162562306a36Sopenharmony_ci	__le16 reserved3;
162662306a36Sopenharmony_ci	u8 tlv[];
162762306a36Sopenharmony_ci} __packed;
162862306a36Sopenharmony_ci
162962306a36Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_query {
163062306a36Sopenharmony_ci	u8 flush;
163162306a36Sopenharmony_ci} __packed;
163262306a36Sopenharmony_ci
163362306a36Sopenharmony_cistruct host_cmd_ds_802_11_bg_scan_query_rsp {
163462306a36Sopenharmony_ci	__le32 report_condition;
163562306a36Sopenharmony_ci	struct host_cmd_ds_802_11_scan_rsp scan_resp;
163662306a36Sopenharmony_ci} __packed;
163762306a36Sopenharmony_ci
163862306a36Sopenharmony_cistruct mwifiex_ietypes_domain_param_set {
163962306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
164062306a36Sopenharmony_ci	u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
164162306a36Sopenharmony_ci	struct ieee80211_country_ie_triplet triplet[1];
164262306a36Sopenharmony_ci} __packed;
164362306a36Sopenharmony_ci
164462306a36Sopenharmony_cistruct host_cmd_ds_802_11d_domain_info {
164562306a36Sopenharmony_ci	__le16 action;
164662306a36Sopenharmony_ci	struct mwifiex_ietypes_domain_param_set domain;
164762306a36Sopenharmony_ci} __packed;
164862306a36Sopenharmony_ci
164962306a36Sopenharmony_cistruct host_cmd_ds_802_11d_domain_info_rsp {
165062306a36Sopenharmony_ci	__le16 action;
165162306a36Sopenharmony_ci	struct mwifiex_ietypes_domain_param_set domain;
165262306a36Sopenharmony_ci} __packed;
165362306a36Sopenharmony_ci
165462306a36Sopenharmony_cistruct host_cmd_ds_11n_addba_req {
165562306a36Sopenharmony_ci	u8 add_req_result;
165662306a36Sopenharmony_ci	u8 peer_mac_addr[ETH_ALEN];
165762306a36Sopenharmony_ci	u8 dialog_token;
165862306a36Sopenharmony_ci	__le16 block_ack_param_set;
165962306a36Sopenharmony_ci	__le16 block_ack_tmo;
166062306a36Sopenharmony_ci	__le16 ssn;
166162306a36Sopenharmony_ci} __packed;
166262306a36Sopenharmony_ci
166362306a36Sopenharmony_cistruct host_cmd_ds_11n_addba_rsp {
166462306a36Sopenharmony_ci	u8 add_rsp_result;
166562306a36Sopenharmony_ci	u8 peer_mac_addr[ETH_ALEN];
166662306a36Sopenharmony_ci	u8 dialog_token;
166762306a36Sopenharmony_ci	__le16 status_code;
166862306a36Sopenharmony_ci	__le16 block_ack_param_set;
166962306a36Sopenharmony_ci	__le16 block_ack_tmo;
167062306a36Sopenharmony_ci	__le16 ssn;
167162306a36Sopenharmony_ci} __packed;
167262306a36Sopenharmony_ci
167362306a36Sopenharmony_cistruct host_cmd_ds_11n_delba {
167462306a36Sopenharmony_ci	u8 del_result;
167562306a36Sopenharmony_ci	u8 peer_mac_addr[ETH_ALEN];
167662306a36Sopenharmony_ci	__le16 del_ba_param_set;
167762306a36Sopenharmony_ci	__le16 reason_code;
167862306a36Sopenharmony_ci	u8 reserved;
167962306a36Sopenharmony_ci} __packed;
168062306a36Sopenharmony_ci
168162306a36Sopenharmony_cistruct host_cmd_ds_11n_batimeout {
168262306a36Sopenharmony_ci	u8 tid;
168362306a36Sopenharmony_ci	u8 peer_mac_addr[ETH_ALEN];
168462306a36Sopenharmony_ci	u8 origninator;
168562306a36Sopenharmony_ci} __packed;
168662306a36Sopenharmony_ci
168762306a36Sopenharmony_cistruct host_cmd_ds_11n_cfg {
168862306a36Sopenharmony_ci	__le16 action;
168962306a36Sopenharmony_ci	__le16 ht_tx_cap;
169062306a36Sopenharmony_ci	__le16 ht_tx_info;
169162306a36Sopenharmony_ci	__le16 misc_config;	/* Needed for 802.11AC cards only */
169262306a36Sopenharmony_ci} __packed;
169362306a36Sopenharmony_ci
169462306a36Sopenharmony_cistruct host_cmd_ds_txbuf_cfg {
169562306a36Sopenharmony_ci	__le16 action;
169662306a36Sopenharmony_ci	__le16 buff_size;
169762306a36Sopenharmony_ci	__le16 mp_end_port;	/* SDIO only, reserved for other interfacces */
169862306a36Sopenharmony_ci	__le16 reserved3;
169962306a36Sopenharmony_ci} __packed;
170062306a36Sopenharmony_ci
170162306a36Sopenharmony_cistruct host_cmd_ds_amsdu_aggr_ctrl {
170262306a36Sopenharmony_ci	__le16 action;
170362306a36Sopenharmony_ci	__le16 enable;
170462306a36Sopenharmony_ci	__le16 curr_buf_size;
170562306a36Sopenharmony_ci} __packed;
170662306a36Sopenharmony_ci
170762306a36Sopenharmony_cistruct host_cmd_ds_sta_deauth {
170862306a36Sopenharmony_ci	u8 mac[ETH_ALEN];
170962306a36Sopenharmony_ci	__le16 reason;
171062306a36Sopenharmony_ci} __packed;
171162306a36Sopenharmony_ci
171262306a36Sopenharmony_cistruct mwifiex_ie_types_sta_info {
171362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
171462306a36Sopenharmony_ci	u8 mac[ETH_ALEN];
171562306a36Sopenharmony_ci	u8 power_mfg_status;
171662306a36Sopenharmony_ci	s8 rssi;
171762306a36Sopenharmony_ci};
171862306a36Sopenharmony_ci
171962306a36Sopenharmony_cistruct host_cmd_ds_sta_list {
172062306a36Sopenharmony_ci	__le16 sta_count;
172162306a36Sopenharmony_ci	u8 tlv[];
172262306a36Sopenharmony_ci} __packed;
172362306a36Sopenharmony_ci
172462306a36Sopenharmony_cistruct mwifiex_ie_types_pwr_capability {
172562306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
172662306a36Sopenharmony_ci	s8 min_pwr;
172762306a36Sopenharmony_ci	s8 max_pwr;
172862306a36Sopenharmony_ci};
172962306a36Sopenharmony_ci
173062306a36Sopenharmony_cistruct mwifiex_ie_types_local_pwr_constraint {
173162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
173262306a36Sopenharmony_ci	u8 chan;
173362306a36Sopenharmony_ci	u8 constraint;
173462306a36Sopenharmony_ci};
173562306a36Sopenharmony_ci
173662306a36Sopenharmony_cistruct mwifiex_ie_types_wmm_param_set {
173762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
173862306a36Sopenharmony_ci	u8 wmm_ie[];
173962306a36Sopenharmony_ci} __packed;
174062306a36Sopenharmony_ci
174162306a36Sopenharmony_cistruct mwifiex_ie_types_mgmt_frame {
174262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
174362306a36Sopenharmony_ci	__le16 frame_control;
174462306a36Sopenharmony_ci	u8 frame_contents[];
174562306a36Sopenharmony_ci};
174662306a36Sopenharmony_ci
174762306a36Sopenharmony_cistruct mwifiex_ie_types_wmm_queue_status {
174862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
174962306a36Sopenharmony_ci	u8 queue_index;
175062306a36Sopenharmony_ci	u8 disabled;
175162306a36Sopenharmony_ci	__le16 medium_time;
175262306a36Sopenharmony_ci	u8 flow_required;
175362306a36Sopenharmony_ci	u8 flow_created;
175462306a36Sopenharmony_ci	u32 reserved;
175562306a36Sopenharmony_ci};
175662306a36Sopenharmony_ci
175762306a36Sopenharmony_cistruct ieee_types_vendor_header {
175862306a36Sopenharmony_ci	u8 element_id;
175962306a36Sopenharmony_ci	u8 len;
176062306a36Sopenharmony_ci	struct {
176162306a36Sopenharmony_ci		u8 oui[3];
176262306a36Sopenharmony_ci		u8 oui_type;
176362306a36Sopenharmony_ci	} __packed oui;
176462306a36Sopenharmony_ci} __packed;
176562306a36Sopenharmony_ci
176662306a36Sopenharmony_cistruct ieee_types_wmm_parameter {
176762306a36Sopenharmony_ci	/*
176862306a36Sopenharmony_ci	 * WMM Parameter IE - Vendor Specific Header:
176962306a36Sopenharmony_ci	 *   element_id  [221/0xdd]
177062306a36Sopenharmony_ci	 *   Len         [24]
177162306a36Sopenharmony_ci	 *   Oui         [00:50:f2]
177262306a36Sopenharmony_ci	 *   OuiType     [2]
177362306a36Sopenharmony_ci	 *   OuiSubType  [1]
177462306a36Sopenharmony_ci	 *   Version     [1]
177562306a36Sopenharmony_ci	 */
177662306a36Sopenharmony_ci	struct ieee_types_vendor_header vend_hdr;
177762306a36Sopenharmony_ci	u8 oui_subtype;
177862306a36Sopenharmony_ci	u8 version;
177962306a36Sopenharmony_ci
178062306a36Sopenharmony_ci	u8 qos_info_bitmap;
178162306a36Sopenharmony_ci	u8 reserved;
178262306a36Sopenharmony_ci	struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
178362306a36Sopenharmony_ci} __packed;
178462306a36Sopenharmony_ci
178562306a36Sopenharmony_cistruct ieee_types_wmm_info {
178662306a36Sopenharmony_ci
178762306a36Sopenharmony_ci	/*
178862306a36Sopenharmony_ci	 * WMM Info IE - Vendor Specific Header:
178962306a36Sopenharmony_ci	 *   element_id  [221/0xdd]
179062306a36Sopenharmony_ci	 *   Len         [7]
179162306a36Sopenharmony_ci	 *   Oui         [00:50:f2]
179262306a36Sopenharmony_ci	 *   OuiType     [2]
179362306a36Sopenharmony_ci	 *   OuiSubType  [0]
179462306a36Sopenharmony_ci	 *   Version     [1]
179562306a36Sopenharmony_ci	 */
179662306a36Sopenharmony_ci	struct ieee_types_vendor_header vend_hdr;
179762306a36Sopenharmony_ci	u8 oui_subtype;
179862306a36Sopenharmony_ci	u8 version;
179962306a36Sopenharmony_ci
180062306a36Sopenharmony_ci	u8 qos_info_bitmap;
180162306a36Sopenharmony_ci} __packed;
180262306a36Sopenharmony_ci
180362306a36Sopenharmony_cistruct host_cmd_ds_wmm_get_status {
180462306a36Sopenharmony_ci	u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
180562306a36Sopenharmony_ci			      IEEE80211_NUM_ACS];
180662306a36Sopenharmony_ci	u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
180762306a36Sopenharmony_ci} __packed;
180862306a36Sopenharmony_ci
180962306a36Sopenharmony_cistruct mwifiex_wmm_ac_status {
181062306a36Sopenharmony_ci	u8 disabled;
181162306a36Sopenharmony_ci	u8 flow_required;
181262306a36Sopenharmony_ci	u8 flow_created;
181362306a36Sopenharmony_ci};
181462306a36Sopenharmony_ci
181562306a36Sopenharmony_cistruct mwifiex_ie_types_htcap {
181662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
181762306a36Sopenharmony_ci	struct ieee80211_ht_cap ht_cap;
181862306a36Sopenharmony_ci} __packed;
181962306a36Sopenharmony_ci
182062306a36Sopenharmony_cistruct mwifiex_ie_types_vhtcap {
182162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
182262306a36Sopenharmony_ci	struct ieee80211_vht_cap vht_cap;
182362306a36Sopenharmony_ci} __packed;
182462306a36Sopenharmony_ci
182562306a36Sopenharmony_cistruct mwifiex_ie_types_aid {
182662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
182762306a36Sopenharmony_ci	__le16 aid;
182862306a36Sopenharmony_ci} __packed;
182962306a36Sopenharmony_ci
183062306a36Sopenharmony_cistruct mwifiex_ie_types_oper_mode_ntf {
183162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
183262306a36Sopenharmony_ci	u8 oper_mode;
183362306a36Sopenharmony_ci} __packed;
183462306a36Sopenharmony_ci
183562306a36Sopenharmony_ci/* VHT Operations IE */
183662306a36Sopenharmony_cistruct mwifiex_ie_types_vht_oper {
183762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
183862306a36Sopenharmony_ci	u8 chan_width;
183962306a36Sopenharmony_ci	u8 chan_center_freq_1;
184062306a36Sopenharmony_ci	u8 chan_center_freq_2;
184162306a36Sopenharmony_ci	/* Basic MCS set map, each 2 bits stands for a NSS */
184262306a36Sopenharmony_ci	__le16 basic_mcs_map;
184362306a36Sopenharmony_ci} __packed;
184462306a36Sopenharmony_ci
184562306a36Sopenharmony_cistruct mwifiex_ie_types_wmmcap {
184662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
184762306a36Sopenharmony_ci	struct mwifiex_types_wmm_info wmm_info;
184862306a36Sopenharmony_ci} __packed;
184962306a36Sopenharmony_ci
185062306a36Sopenharmony_cistruct mwifiex_ie_types_htinfo {
185162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
185262306a36Sopenharmony_ci	struct ieee80211_ht_operation ht_oper;
185362306a36Sopenharmony_ci} __packed;
185462306a36Sopenharmony_ci
185562306a36Sopenharmony_cistruct mwifiex_ie_types_2040bssco {
185662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
185762306a36Sopenharmony_ci	u8 bss_co_2040;
185862306a36Sopenharmony_ci} __packed;
185962306a36Sopenharmony_ci
186062306a36Sopenharmony_cistruct mwifiex_ie_types_extcap {
186162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
186262306a36Sopenharmony_ci	u8 ext_capab[];
186362306a36Sopenharmony_ci} __packed;
186462306a36Sopenharmony_ci
186562306a36Sopenharmony_cistruct host_cmd_ds_mem_access {
186662306a36Sopenharmony_ci	__le16 action;
186762306a36Sopenharmony_ci	__le16 reserved;
186862306a36Sopenharmony_ci	__le32 addr;
186962306a36Sopenharmony_ci	__le32 value;
187062306a36Sopenharmony_ci} __packed;
187162306a36Sopenharmony_ci
187262306a36Sopenharmony_cistruct mwifiex_ie_types_qos_info {
187362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
187462306a36Sopenharmony_ci	u8 qos_info;
187562306a36Sopenharmony_ci} __packed;
187662306a36Sopenharmony_ci
187762306a36Sopenharmony_cistruct host_cmd_ds_mac_reg_access {
187862306a36Sopenharmony_ci	__le16 action;
187962306a36Sopenharmony_ci	__le16 offset;
188062306a36Sopenharmony_ci	__le32 value;
188162306a36Sopenharmony_ci} __packed;
188262306a36Sopenharmony_ci
188362306a36Sopenharmony_cistruct host_cmd_ds_bbp_reg_access {
188462306a36Sopenharmony_ci	__le16 action;
188562306a36Sopenharmony_ci	__le16 offset;
188662306a36Sopenharmony_ci	u8 value;
188762306a36Sopenharmony_ci	u8 reserved[3];
188862306a36Sopenharmony_ci} __packed;
188962306a36Sopenharmony_ci
189062306a36Sopenharmony_cistruct host_cmd_ds_rf_reg_access {
189162306a36Sopenharmony_ci	__le16 action;
189262306a36Sopenharmony_ci	__le16 offset;
189362306a36Sopenharmony_ci	u8 value;
189462306a36Sopenharmony_ci	u8 reserved[3];
189562306a36Sopenharmony_ci} __packed;
189662306a36Sopenharmony_ci
189762306a36Sopenharmony_cistruct host_cmd_ds_pmic_reg_access {
189862306a36Sopenharmony_ci	__le16 action;
189962306a36Sopenharmony_ci	__le16 offset;
190062306a36Sopenharmony_ci	u8 value;
190162306a36Sopenharmony_ci	u8 reserved[3];
190262306a36Sopenharmony_ci} __packed;
190362306a36Sopenharmony_ci
190462306a36Sopenharmony_cistruct host_cmd_ds_802_11_eeprom_access {
190562306a36Sopenharmony_ci	__le16 action;
190662306a36Sopenharmony_ci
190762306a36Sopenharmony_ci	__le16 offset;
190862306a36Sopenharmony_ci	__le16 byte_count;
190962306a36Sopenharmony_ci	u8 value;
191062306a36Sopenharmony_ci} __packed;
191162306a36Sopenharmony_ci
191262306a36Sopenharmony_cistruct mwifiex_assoc_event {
191362306a36Sopenharmony_ci	u8 sta_addr[ETH_ALEN];
191462306a36Sopenharmony_ci	__le16 type;
191562306a36Sopenharmony_ci	__le16 len;
191662306a36Sopenharmony_ci	__le16 frame_control;
191762306a36Sopenharmony_ci	__le16 cap_info;
191862306a36Sopenharmony_ci	__le16 listen_interval;
191962306a36Sopenharmony_ci	u8 data[];
192062306a36Sopenharmony_ci} __packed;
192162306a36Sopenharmony_ci
192262306a36Sopenharmony_cistruct host_cmd_ds_sys_config {
192362306a36Sopenharmony_ci	__le16 action;
192462306a36Sopenharmony_ci	u8 tlv[];
192562306a36Sopenharmony_ci};
192662306a36Sopenharmony_ci
192762306a36Sopenharmony_cistruct host_cmd_11ac_vht_cfg {
192862306a36Sopenharmony_ci	__le16 action;
192962306a36Sopenharmony_ci	u8 band_config;
193062306a36Sopenharmony_ci	u8 misc_config;
193162306a36Sopenharmony_ci	__le32 cap_info;
193262306a36Sopenharmony_ci	__le32 mcs_tx_set;
193362306a36Sopenharmony_ci	__le32 mcs_rx_set;
193462306a36Sopenharmony_ci} __packed;
193562306a36Sopenharmony_ci
193662306a36Sopenharmony_cistruct host_cmd_tlv_akmp {
193762306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
193862306a36Sopenharmony_ci	__le16 key_mgmt;
193962306a36Sopenharmony_ci	__le16 key_mgmt_operation;
194062306a36Sopenharmony_ci} __packed;
194162306a36Sopenharmony_ci
194262306a36Sopenharmony_cistruct host_cmd_tlv_pwk_cipher {
194362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
194462306a36Sopenharmony_ci	__le16 proto;
194562306a36Sopenharmony_ci	u8 cipher;
194662306a36Sopenharmony_ci	u8 reserved;
194762306a36Sopenharmony_ci} __packed;
194862306a36Sopenharmony_ci
194962306a36Sopenharmony_cistruct host_cmd_tlv_gwk_cipher {
195062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
195162306a36Sopenharmony_ci	u8 cipher;
195262306a36Sopenharmony_ci	u8 reserved;
195362306a36Sopenharmony_ci} __packed;
195462306a36Sopenharmony_ci
195562306a36Sopenharmony_cistruct host_cmd_tlv_passphrase {
195662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
195762306a36Sopenharmony_ci	u8 passphrase[];
195862306a36Sopenharmony_ci} __packed;
195962306a36Sopenharmony_ci
196062306a36Sopenharmony_cistruct host_cmd_tlv_wep_key {
196162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
196262306a36Sopenharmony_ci	u8 key_index;
196362306a36Sopenharmony_ci	u8 is_default;
196462306a36Sopenharmony_ci	u8 key[];
196562306a36Sopenharmony_ci};
196662306a36Sopenharmony_ci
196762306a36Sopenharmony_cistruct host_cmd_tlv_auth_type {
196862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
196962306a36Sopenharmony_ci	u8 auth_type;
197062306a36Sopenharmony_ci} __packed;
197162306a36Sopenharmony_ci
197262306a36Sopenharmony_cistruct host_cmd_tlv_encrypt_protocol {
197362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
197462306a36Sopenharmony_ci	__le16 proto;
197562306a36Sopenharmony_ci} __packed;
197662306a36Sopenharmony_ci
197762306a36Sopenharmony_cistruct host_cmd_tlv_ssid {
197862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
197962306a36Sopenharmony_ci	u8 ssid[];
198062306a36Sopenharmony_ci} __packed;
198162306a36Sopenharmony_ci
198262306a36Sopenharmony_cistruct host_cmd_tlv_rates {
198362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
198462306a36Sopenharmony_ci	u8 rates[];
198562306a36Sopenharmony_ci} __packed;
198662306a36Sopenharmony_ci
198762306a36Sopenharmony_cistruct mwifiex_ie_types_bssid_list {
198862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
198962306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
199062306a36Sopenharmony_ci} __packed;
199162306a36Sopenharmony_ci
199262306a36Sopenharmony_cistruct host_cmd_tlv_bcast_ssid {
199362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
199462306a36Sopenharmony_ci	u8 bcast_ctl;
199562306a36Sopenharmony_ci} __packed;
199662306a36Sopenharmony_ci
199762306a36Sopenharmony_cistruct host_cmd_tlv_beacon_period {
199862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
199962306a36Sopenharmony_ci	__le16 period;
200062306a36Sopenharmony_ci} __packed;
200162306a36Sopenharmony_ci
200262306a36Sopenharmony_cistruct host_cmd_tlv_dtim_period {
200362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
200462306a36Sopenharmony_ci	u8 period;
200562306a36Sopenharmony_ci} __packed;
200662306a36Sopenharmony_ci
200762306a36Sopenharmony_cistruct host_cmd_tlv_frag_threshold {
200862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
200962306a36Sopenharmony_ci	__le16 frag_thr;
201062306a36Sopenharmony_ci} __packed;
201162306a36Sopenharmony_ci
201262306a36Sopenharmony_cistruct host_cmd_tlv_rts_threshold {
201362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
201462306a36Sopenharmony_ci	__le16 rts_thr;
201562306a36Sopenharmony_ci} __packed;
201662306a36Sopenharmony_ci
201762306a36Sopenharmony_cistruct host_cmd_tlv_retry_limit {
201862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
201962306a36Sopenharmony_ci	u8 limit;
202062306a36Sopenharmony_ci} __packed;
202162306a36Sopenharmony_ci
202262306a36Sopenharmony_cistruct host_cmd_tlv_mac_addr {
202362306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
202462306a36Sopenharmony_ci	u8 mac_addr[ETH_ALEN];
202562306a36Sopenharmony_ci} __packed;
202662306a36Sopenharmony_ci
202762306a36Sopenharmony_cistruct host_cmd_tlv_channel_band {
202862306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
202962306a36Sopenharmony_ci	u8 band_config;
203062306a36Sopenharmony_ci	u8 channel;
203162306a36Sopenharmony_ci} __packed;
203262306a36Sopenharmony_ci
203362306a36Sopenharmony_cistruct host_cmd_tlv_ageout_timer {
203462306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
203562306a36Sopenharmony_ci	__le32 sta_ao_timer;
203662306a36Sopenharmony_ci} __packed;
203762306a36Sopenharmony_ci
203862306a36Sopenharmony_cistruct host_cmd_tlv_power_constraint {
203962306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
204062306a36Sopenharmony_ci	u8 constraint;
204162306a36Sopenharmony_ci} __packed;
204262306a36Sopenharmony_ci
204362306a36Sopenharmony_cistruct mwifiex_ie_types_btcoex_scan_time {
204462306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
204562306a36Sopenharmony_ci	u8 coex_scan;
204662306a36Sopenharmony_ci	u8 reserved;
204762306a36Sopenharmony_ci	__le16 min_scan_time;
204862306a36Sopenharmony_ci	__le16 max_scan_time;
204962306a36Sopenharmony_ci} __packed;
205062306a36Sopenharmony_ci
205162306a36Sopenharmony_cistruct mwifiex_ie_types_btcoex_aggr_win_size {
205262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
205362306a36Sopenharmony_ci	u8 coex_win_size;
205462306a36Sopenharmony_ci	u8 tx_win_size;
205562306a36Sopenharmony_ci	u8 rx_win_size;
205662306a36Sopenharmony_ci	u8 reserved;
205762306a36Sopenharmony_ci} __packed;
205862306a36Sopenharmony_ci
205962306a36Sopenharmony_cistruct mwifiex_ie_types_robust_coex {
206062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
206162306a36Sopenharmony_ci	__le32 mode;
206262306a36Sopenharmony_ci} __packed;
206362306a36Sopenharmony_ci
206462306a36Sopenharmony_ci#define MWIFIEX_VERSION_STR_LENGTH  128
206562306a36Sopenharmony_ci
206662306a36Sopenharmony_cistruct host_cmd_ds_version_ext {
206762306a36Sopenharmony_ci	u8 version_str_sel;
206862306a36Sopenharmony_ci	char version_str[MWIFIEX_VERSION_STR_LENGTH];
206962306a36Sopenharmony_ci} __packed;
207062306a36Sopenharmony_ci
207162306a36Sopenharmony_cistruct host_cmd_ds_mgmt_frame_reg {
207262306a36Sopenharmony_ci	__le16 action;
207362306a36Sopenharmony_ci	__le32 mask;
207462306a36Sopenharmony_ci} __packed;
207562306a36Sopenharmony_ci
207662306a36Sopenharmony_cistruct host_cmd_ds_p2p_mode_cfg {
207762306a36Sopenharmony_ci	__le16 action;
207862306a36Sopenharmony_ci	__le16 mode;
207962306a36Sopenharmony_ci} __packed;
208062306a36Sopenharmony_ci
208162306a36Sopenharmony_cistruct host_cmd_ds_remain_on_chan {
208262306a36Sopenharmony_ci	__le16 action;
208362306a36Sopenharmony_ci	u8 status;
208462306a36Sopenharmony_ci	u8 reserved;
208562306a36Sopenharmony_ci	u8 band_cfg;
208662306a36Sopenharmony_ci	u8 channel;
208762306a36Sopenharmony_ci	__le32 duration;
208862306a36Sopenharmony_ci} __packed;
208962306a36Sopenharmony_ci
209062306a36Sopenharmony_cistruct host_cmd_ds_802_11_ibss_status {
209162306a36Sopenharmony_ci	__le16 action;
209262306a36Sopenharmony_ci	__le16 enable;
209362306a36Sopenharmony_ci	u8 bssid[ETH_ALEN];
209462306a36Sopenharmony_ci	__le16 beacon_interval;
209562306a36Sopenharmony_ci	__le16 atim_window;
209662306a36Sopenharmony_ci	__le16 use_g_rate_protect;
209762306a36Sopenharmony_ci} __packed;
209862306a36Sopenharmony_ci
209962306a36Sopenharmony_cistruct mwifiex_fw_mef_entry {
210062306a36Sopenharmony_ci	u8 mode;
210162306a36Sopenharmony_ci	u8 action;
210262306a36Sopenharmony_ci	__le16 exprsize;
210362306a36Sopenharmony_ci	u8 expr[];
210462306a36Sopenharmony_ci} __packed;
210562306a36Sopenharmony_ci
210662306a36Sopenharmony_cistruct host_cmd_ds_mef_cfg {
210762306a36Sopenharmony_ci	__le32 criteria;
210862306a36Sopenharmony_ci	__le16 num_entries;
210962306a36Sopenharmony_ci	u8 mef_entry_data[];
211062306a36Sopenharmony_ci} __packed;
211162306a36Sopenharmony_ci
211262306a36Sopenharmony_ci#define CONNECTION_TYPE_INFRA   0
211362306a36Sopenharmony_ci#define CONNECTION_TYPE_ADHOC   1
211462306a36Sopenharmony_ci#define CONNECTION_TYPE_AP      2
211562306a36Sopenharmony_ci
211662306a36Sopenharmony_cistruct host_cmd_ds_set_bss_mode {
211762306a36Sopenharmony_ci	u8 con_type;
211862306a36Sopenharmony_ci} __packed;
211962306a36Sopenharmony_ci
212062306a36Sopenharmony_cistruct host_cmd_ds_pcie_details {
212162306a36Sopenharmony_ci	/* TX buffer descriptor ring address */
212262306a36Sopenharmony_ci	__le32 txbd_addr_lo;
212362306a36Sopenharmony_ci	__le32 txbd_addr_hi;
212462306a36Sopenharmony_ci	/* TX buffer descriptor ring count */
212562306a36Sopenharmony_ci	__le32 txbd_count;
212662306a36Sopenharmony_ci
212762306a36Sopenharmony_ci	/* RX buffer descriptor ring address */
212862306a36Sopenharmony_ci	__le32 rxbd_addr_lo;
212962306a36Sopenharmony_ci	__le32 rxbd_addr_hi;
213062306a36Sopenharmony_ci	/* RX buffer descriptor ring count */
213162306a36Sopenharmony_ci	__le32 rxbd_count;
213262306a36Sopenharmony_ci
213362306a36Sopenharmony_ci	/* Event buffer descriptor ring address */
213462306a36Sopenharmony_ci	__le32 evtbd_addr_lo;
213562306a36Sopenharmony_ci	__le32 evtbd_addr_hi;
213662306a36Sopenharmony_ci	/* Event buffer descriptor ring count */
213762306a36Sopenharmony_ci	__le32 evtbd_count;
213862306a36Sopenharmony_ci
213962306a36Sopenharmony_ci	/* Sleep cookie buffer physical address */
214062306a36Sopenharmony_ci	__le32 sleep_cookie_addr_lo;
214162306a36Sopenharmony_ci	__le32 sleep_cookie_addr_hi;
214262306a36Sopenharmony_ci} __packed;
214362306a36Sopenharmony_ci
214462306a36Sopenharmony_cistruct mwifiex_ie_types_rssi_threshold {
214562306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
214662306a36Sopenharmony_ci	u8 abs_value;
214762306a36Sopenharmony_ci	u8 evt_freq;
214862306a36Sopenharmony_ci} __packed;
214962306a36Sopenharmony_ci
215062306a36Sopenharmony_ci#define MWIFIEX_DFS_REC_HDR_LEN		8
215162306a36Sopenharmony_ci#define MWIFIEX_DFS_REC_HDR_NUM		10
215262306a36Sopenharmony_ci#define MWIFIEX_BIN_COUNTER_LEN		7
215362306a36Sopenharmony_ci
215462306a36Sopenharmony_cistruct mwifiex_radar_det_event {
215562306a36Sopenharmony_ci	__le32 detect_count;
215662306a36Sopenharmony_ci	u8 reg_domain;  /*1=fcc, 2=etsi, 3=mic*/
215762306a36Sopenharmony_ci	u8 det_type;  /*0=none, 1=pw(chirp), 2=pri(radar)*/
215862306a36Sopenharmony_ci	__le16 pw_chirp_type;
215962306a36Sopenharmony_ci	u8 pw_chirp_idx;
216062306a36Sopenharmony_ci	u8 pw_value;
216162306a36Sopenharmony_ci	u8 pri_radar_type;
216262306a36Sopenharmony_ci	u8 pri_bincnt;
216362306a36Sopenharmony_ci	u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN];
216462306a36Sopenharmony_ci	u8 num_dfs_records;
216562306a36Sopenharmony_ci	u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN];
216662306a36Sopenharmony_ci	__le32 passed;
216762306a36Sopenharmony_ci} __packed;
216862306a36Sopenharmony_ci
216962306a36Sopenharmony_cistruct mwifiex_ie_types_multi_chan_info {
217062306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
217162306a36Sopenharmony_ci	__le16 status;
217262306a36Sopenharmony_ci	u8 tlv_buffer[];
217362306a36Sopenharmony_ci} __packed;
217462306a36Sopenharmony_ci
217562306a36Sopenharmony_cistruct mwifiex_ie_types_mc_group_info {
217662306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
217762306a36Sopenharmony_ci	u8 chan_group_id;
217862306a36Sopenharmony_ci	u8 chan_buf_weight;
217962306a36Sopenharmony_ci	u8 band_config;
218062306a36Sopenharmony_ci	u8 chan_num;
218162306a36Sopenharmony_ci	__le32 chan_time;
218262306a36Sopenharmony_ci	__le32 reserved;
218362306a36Sopenharmony_ci	union {
218462306a36Sopenharmony_ci		u8 sdio_func_num;
218562306a36Sopenharmony_ci		u8 usb_ep_num;
218662306a36Sopenharmony_ci	} hid_num;
218762306a36Sopenharmony_ci	u8 intf_num;
218862306a36Sopenharmony_ci	u8 bss_type_numlist[];
218962306a36Sopenharmony_ci} __packed;
219062306a36Sopenharmony_ci
219162306a36Sopenharmony_cistruct meas_rpt_map {
219262306a36Sopenharmony_ci	u8 rssi:3;
219362306a36Sopenharmony_ci	u8 unmeasured:1;
219462306a36Sopenharmony_ci	u8 radar:1;
219562306a36Sopenharmony_ci	u8 unidentified_sig:1;
219662306a36Sopenharmony_ci	u8 ofdm_preamble:1;
219762306a36Sopenharmony_ci	u8 bss:1;
219862306a36Sopenharmony_ci} __packed;
219962306a36Sopenharmony_ci
220062306a36Sopenharmony_cistruct mwifiex_ie_types_chan_rpt_data {
220162306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
220262306a36Sopenharmony_ci	struct meas_rpt_map map;
220362306a36Sopenharmony_ci} __packed;
220462306a36Sopenharmony_ci
220562306a36Sopenharmony_cistruct host_cmd_ds_802_11_subsc_evt {
220662306a36Sopenharmony_ci	__le16 action;
220762306a36Sopenharmony_ci	__le16 events;
220862306a36Sopenharmony_ci} __packed;
220962306a36Sopenharmony_ci
221062306a36Sopenharmony_cistruct chan_switch_result {
221162306a36Sopenharmony_ci	u8 cur_chan;
221262306a36Sopenharmony_ci	u8 status;
221362306a36Sopenharmony_ci	u8 reason;
221462306a36Sopenharmony_ci} __packed;
221562306a36Sopenharmony_ci
221662306a36Sopenharmony_cistruct mwifiex_tdls_generic_event {
221762306a36Sopenharmony_ci	__le16 type;
221862306a36Sopenharmony_ci	u8 peer_mac[ETH_ALEN];
221962306a36Sopenharmony_ci	union {
222062306a36Sopenharmony_ci		struct chan_switch_result switch_result;
222162306a36Sopenharmony_ci		u8 cs_stop_reason;
222262306a36Sopenharmony_ci		__le16 reason_code;
222362306a36Sopenharmony_ci		__le16 reserved;
222462306a36Sopenharmony_ci	} u;
222562306a36Sopenharmony_ci} __packed;
222662306a36Sopenharmony_ci
222762306a36Sopenharmony_cistruct mwifiex_ie {
222862306a36Sopenharmony_ci	__le16 ie_index;
222962306a36Sopenharmony_ci	__le16 mgmt_subtype_mask;
223062306a36Sopenharmony_ci	__le16 ie_length;
223162306a36Sopenharmony_ci	u8 ie_buffer[IEEE_MAX_IE_SIZE];
223262306a36Sopenharmony_ci} __packed;
223362306a36Sopenharmony_ci
223462306a36Sopenharmony_ci#define MAX_MGMT_IE_INDEX	16
223562306a36Sopenharmony_cistruct mwifiex_ie_list {
223662306a36Sopenharmony_ci	__le16 type;
223762306a36Sopenharmony_ci	__le16 len;
223862306a36Sopenharmony_ci	struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX];
223962306a36Sopenharmony_ci} __packed;
224062306a36Sopenharmony_ci
224162306a36Sopenharmony_cistruct coalesce_filt_field_param {
224262306a36Sopenharmony_ci	u8 operation;
224362306a36Sopenharmony_ci	u8 operand_len;
224462306a36Sopenharmony_ci	__le16 offset;
224562306a36Sopenharmony_ci	u8 operand_byte_stream[4];
224662306a36Sopenharmony_ci};
224762306a36Sopenharmony_ci
224862306a36Sopenharmony_cistruct coalesce_receive_filt_rule {
224962306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
225062306a36Sopenharmony_ci	u8 num_of_fields;
225162306a36Sopenharmony_ci	u8 pkt_type;
225262306a36Sopenharmony_ci	__le16 max_coalescing_delay;
225362306a36Sopenharmony_ci	struct coalesce_filt_field_param params[];
225462306a36Sopenharmony_ci} __packed;
225562306a36Sopenharmony_ci
225662306a36Sopenharmony_cistruct host_cmd_ds_coalesce_cfg {
225762306a36Sopenharmony_ci	__le16 action;
225862306a36Sopenharmony_ci	__le16 num_of_rules;
225962306a36Sopenharmony_ci	u8 rule_data[];
226062306a36Sopenharmony_ci} __packed;
226162306a36Sopenharmony_ci
226262306a36Sopenharmony_cistruct host_cmd_ds_multi_chan_policy {
226362306a36Sopenharmony_ci	__le16 action;
226462306a36Sopenharmony_ci	__le16 policy;
226562306a36Sopenharmony_ci} __packed;
226662306a36Sopenharmony_ci
226762306a36Sopenharmony_cistruct host_cmd_ds_robust_coex {
226862306a36Sopenharmony_ci	__le16 action;
226962306a36Sopenharmony_ci	__le16 reserved;
227062306a36Sopenharmony_ci} __packed;
227162306a36Sopenharmony_ci
227262306a36Sopenharmony_cistruct host_cmd_ds_wakeup_reason {
227362306a36Sopenharmony_ci	__le16  wakeup_reason;
227462306a36Sopenharmony_ci} __packed;
227562306a36Sopenharmony_ci
227662306a36Sopenharmony_cistruct host_cmd_ds_gtk_rekey_params {
227762306a36Sopenharmony_ci	__le16 action;
227862306a36Sopenharmony_ci	u8 kck[NL80211_KCK_LEN];
227962306a36Sopenharmony_ci	u8 kek[NL80211_KEK_LEN];
228062306a36Sopenharmony_ci	__le32 replay_ctr_low;
228162306a36Sopenharmony_ci	__le32 replay_ctr_high;
228262306a36Sopenharmony_ci} __packed;
228362306a36Sopenharmony_ci
228462306a36Sopenharmony_cistruct host_cmd_ds_chan_region_cfg {
228562306a36Sopenharmony_ci	__le16 action;
228662306a36Sopenharmony_ci} __packed;
228762306a36Sopenharmony_ci
228862306a36Sopenharmony_cistruct host_cmd_ds_pkt_aggr_ctrl {
228962306a36Sopenharmony_ci	__le16 action;
229062306a36Sopenharmony_ci	__le16 enable;
229162306a36Sopenharmony_ci	__le16 tx_aggr_max_size;
229262306a36Sopenharmony_ci	__le16 tx_aggr_max_num;
229362306a36Sopenharmony_ci	__le16 tx_aggr_align;
229462306a36Sopenharmony_ci} __packed;
229562306a36Sopenharmony_ci
229662306a36Sopenharmony_cistruct host_cmd_ds_sta_configure {
229762306a36Sopenharmony_ci	__le16 action;
229862306a36Sopenharmony_ci	u8 tlv_buffer[];
229962306a36Sopenharmony_ci} __packed;
230062306a36Sopenharmony_ci
230162306a36Sopenharmony_cistruct host_cmd_ds_command {
230262306a36Sopenharmony_ci	__le16 command;
230362306a36Sopenharmony_ci	__le16 size;
230462306a36Sopenharmony_ci	__le16 seq_num;
230562306a36Sopenharmony_ci	__le16 result;
230662306a36Sopenharmony_ci	union {
230762306a36Sopenharmony_ci		struct host_cmd_ds_get_hw_spec hw_spec;
230862306a36Sopenharmony_ci		struct host_cmd_ds_mac_control mac_ctrl;
230962306a36Sopenharmony_ci		struct host_cmd_ds_802_11_mac_address mac_addr;
231062306a36Sopenharmony_ci		struct host_cmd_ds_mac_multicast_adr mc_addr;
231162306a36Sopenharmony_ci		struct host_cmd_ds_802_11_get_log get_log;
231262306a36Sopenharmony_ci		struct host_cmd_ds_802_11_rssi_info rssi_info;
231362306a36Sopenharmony_ci		struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
231462306a36Sopenharmony_ci		struct host_cmd_ds_802_11_snmp_mib smib;
231562306a36Sopenharmony_ci		struct host_cmd_ds_tx_rate_query tx_rate;
231662306a36Sopenharmony_ci		struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
231762306a36Sopenharmony_ci		struct host_cmd_ds_txpwr_cfg txp_cfg;
231862306a36Sopenharmony_ci		struct host_cmd_ds_rf_tx_pwr txp;
231962306a36Sopenharmony_ci		struct host_cmd_ds_rf_ant_mimo ant_mimo;
232062306a36Sopenharmony_ci		struct host_cmd_ds_rf_ant_siso ant_siso;
232162306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
232262306a36Sopenharmony_ci		struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
232362306a36Sopenharmony_ci		struct host_cmd_ds_802_11_scan scan;
232462306a36Sopenharmony_ci		struct host_cmd_ds_802_11_scan_ext ext_scan;
232562306a36Sopenharmony_ci		struct host_cmd_ds_802_11_scan_rsp scan_resp;
232662306a36Sopenharmony_ci		struct host_cmd_ds_802_11_bg_scan_config bg_scan_config;
232762306a36Sopenharmony_ci		struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
232862306a36Sopenharmony_ci		struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
232962306a36Sopenharmony_ci		struct host_cmd_ds_802_11_associate associate;
233062306a36Sopenharmony_ci		struct host_cmd_ds_802_11_associate_rsp associate_rsp;
233162306a36Sopenharmony_ci		struct host_cmd_ds_802_11_deauthenticate deauth;
233262306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
233362306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ad_hoc_start_result start_result;
233462306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ad_hoc_join_result join_result;
233562306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
233662306a36Sopenharmony_ci		struct host_cmd_ds_802_11d_domain_info domain_info;
233762306a36Sopenharmony_ci		struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
233862306a36Sopenharmony_ci		struct host_cmd_ds_11n_addba_req add_ba_req;
233962306a36Sopenharmony_ci		struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
234062306a36Sopenharmony_ci		struct host_cmd_ds_11n_delba del_ba;
234162306a36Sopenharmony_ci		struct host_cmd_ds_txbuf_cfg tx_buf;
234262306a36Sopenharmony_ci		struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
234362306a36Sopenharmony_ci		struct host_cmd_ds_11n_cfg htcfg;
234462306a36Sopenharmony_ci		struct host_cmd_ds_wmm_get_status get_wmm_status;
234562306a36Sopenharmony_ci		struct host_cmd_ds_802_11_key_material key_material;
234662306a36Sopenharmony_ci		struct host_cmd_ds_802_11_key_material_v2 key_material_v2;
234762306a36Sopenharmony_ci		struct host_cmd_ds_802_11_key_material_wep key_material_wep;
234862306a36Sopenharmony_ci		struct host_cmd_ds_version_ext verext;
234962306a36Sopenharmony_ci		struct host_cmd_ds_mgmt_frame_reg reg_mask;
235062306a36Sopenharmony_ci		struct host_cmd_ds_remain_on_chan roc_cfg;
235162306a36Sopenharmony_ci		struct host_cmd_ds_p2p_mode_cfg mode_cfg;
235262306a36Sopenharmony_ci		struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
235362306a36Sopenharmony_ci		struct host_cmd_ds_mef_cfg mef_cfg;
235462306a36Sopenharmony_ci		struct host_cmd_ds_mem_access mem;
235562306a36Sopenharmony_ci		struct host_cmd_ds_mac_reg_access mac_reg;
235662306a36Sopenharmony_ci		struct host_cmd_ds_bbp_reg_access bbp_reg;
235762306a36Sopenharmony_ci		struct host_cmd_ds_rf_reg_access rf_reg;
235862306a36Sopenharmony_ci		struct host_cmd_ds_pmic_reg_access pmic_reg;
235962306a36Sopenharmony_ci		struct host_cmd_ds_set_bss_mode bss_mode;
236062306a36Sopenharmony_ci		struct host_cmd_ds_pcie_details pcie_host_spec;
236162306a36Sopenharmony_ci		struct host_cmd_ds_802_11_eeprom_access eeprom;
236262306a36Sopenharmony_ci		struct host_cmd_ds_802_11_subsc_evt subsc_evt;
236362306a36Sopenharmony_ci		struct host_cmd_ds_sys_config uap_sys_config;
236462306a36Sopenharmony_ci		struct host_cmd_ds_sta_deauth sta_deauth;
236562306a36Sopenharmony_ci		struct host_cmd_ds_sta_list sta_list;
236662306a36Sopenharmony_ci		struct host_cmd_11ac_vht_cfg vht_cfg;
236762306a36Sopenharmony_ci		struct host_cmd_ds_coalesce_cfg coalesce_cfg;
236862306a36Sopenharmony_ci		struct host_cmd_ds_tdls_config tdls_config;
236962306a36Sopenharmony_ci		struct host_cmd_ds_tdls_oper tdls_oper;
237062306a36Sopenharmony_ci		struct host_cmd_ds_chan_rpt_req chan_rpt_req;
237162306a36Sopenharmony_ci		struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg;
237262306a36Sopenharmony_ci		struct host_cmd_ds_multi_chan_policy mc_policy;
237362306a36Sopenharmony_ci		struct host_cmd_ds_robust_coex coex;
237462306a36Sopenharmony_ci		struct host_cmd_ds_wakeup_reason hs_wakeup_reason;
237562306a36Sopenharmony_ci		struct host_cmd_ds_gtk_rekey_params rekey;
237662306a36Sopenharmony_ci		struct host_cmd_ds_chan_region_cfg reg_cfg;
237762306a36Sopenharmony_ci		struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl;
237862306a36Sopenharmony_ci		struct host_cmd_ds_sta_configure sta_cfg;
237962306a36Sopenharmony_ci	} params;
238062306a36Sopenharmony_ci} __packed;
238162306a36Sopenharmony_ci
238262306a36Sopenharmony_cistruct mwifiex_opt_sleep_confirm {
238362306a36Sopenharmony_ci	__le16 command;
238462306a36Sopenharmony_ci	__le16 size;
238562306a36Sopenharmony_ci	__le16 seq_num;
238662306a36Sopenharmony_ci	__le16 result;
238762306a36Sopenharmony_ci	__le16 action;
238862306a36Sopenharmony_ci	__le16 resp_ctrl;
238962306a36Sopenharmony_ci} __packed;
239062306a36Sopenharmony_ci
239162306a36Sopenharmony_cistruct hw_spec_max_conn {
239262306a36Sopenharmony_ci	struct mwifiex_ie_types_header header;
239362306a36Sopenharmony_ci	u8 max_p2p_conn;
239462306a36Sopenharmony_ci	u8 max_sta_conn;
239562306a36Sopenharmony_ci} __packed;
239662306a36Sopenharmony_ci
239762306a36Sopenharmony_ci#endif /* !_MWIFIEX_FW_H_ */
2398