]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/net/wireless/mwifiex/fw.h
mwifiex: add WPA2 support for AP
[mirror_ubuntu-hirsute-kernel.git] / drivers / net / wireless / mwifiex / fw.h
CommitLineData
5e6e3a92
BZ
1/*
2 * Marvell Wireless LAN device driver: Firmware specific macros & structures
3 *
4 * Copyright (C) 2011, Marvell International Ltd.
5 *
6 * This software file (the "File") is distributed by Marvell International
7 * Ltd. under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
13 *
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
18 */
19
20#ifndef _MWIFIEX_FW_H_
21#define _MWIFIEX_FW_H_
22
23#include <linux/if_ether.h>
24
25
26#define INTF_HEADER_LEN 4
27
28struct rfc_1042_hdr {
29 u8 llc_dsap;
30 u8 llc_ssap;
31 u8 llc_ctrl;
32 u8 snap_oui[3];
33 u16 snap_type;
34};
35
36struct rx_packet_hdr {
37 struct ethhdr eth803_hdr;
38 struct rfc_1042_hdr rfc1042_hdr;
39};
40
41struct tx_packet_hdr {
42 struct ethhdr eth803_hdr;
43 struct rfc_1042_hdr rfc1042_hdr;
44};
45
46#define B_SUPPORTED_RATES 5
47#define G_SUPPORTED_RATES 9
48#define BG_SUPPORTED_RATES 13
49#define A_SUPPORTED_RATES 9
50#define HOSTCMD_SUPPORTED_RATES 14
51#define N_SUPPORTED_RATES 3
52#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN)
53
54#define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11))
55#define IS_SUPPORT_MULTI_BANDS(adapter) \
56 (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
57#define GET_FW_DEFAULT_BANDS(adapter) \
58 ((adapter->fw_cap_info >> 8) & ALL_802_11_BANDS)
59
5e6e3a92
BZ
60#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
61
62#define KEY_INFO_ENABLED 0x01
63enum KEY_TYPE_ID {
64 KEY_TYPE_ID_WEP = 0,
65 KEY_TYPE_ID_TKIP,
66 KEY_TYPE_ID_AES,
67 KEY_TYPE_ID_WAPI,
68};
6a35a0ac
YAP
69#define KEY_MCAST BIT(0)
70#define KEY_UNICAST BIT(1)
71#define KEY_ENABLED BIT(2)
5e6e3a92
BZ
72
73#define WAPI_KEY_LEN 50
74
5e6e3a92
BZ
75#define MAX_POLL_TRIES 100
76
77#define MAX_MULTI_INTERFACE_POLL_TRIES 1000
78
79#define MAX_FIRMWARE_POLL_TRIES 100
80
d930faee
AK
81#define FIRMWARE_READY_SDIO 0xfedc
82#define FIRMWARE_READY_PCIE 0xfedcba00
5e6e3a92 83
4daffe35
AK
84enum mwifiex_usb_ep {
85 MWIFIEX_USB_EP_CMD_EVENT = 1,
86 MWIFIEX_USB_EP_DATA = 2,
87};
88
5e6e3a92
BZ
89enum MWIFIEX_802_11_PRIVACY_FILTER {
90 MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
91 MWIFIEX_802_11_PRIV_FILTER_8021X_WEP
92};
93
5e6e3a92
BZ
94#define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF)))
95
12190c5d
AP
96#define TLV_TYPE_UAP_SSID 0x0000
97
5e6e3a92
BZ
98#define PROPRIETARY_TLV_BASE_ID 0x0100
99#define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0)
100#define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1)
101#define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2)
fa444bf8 102#define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4)
5e6e3a92 103#define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10)
5e6e3a92
BZ
104#define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16)
105#define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18)
106#define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19)
fa444bf8 107#define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22)
5e6e3a92 108#define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31)
75edd2c6 109#define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32)
5e6e3a92 110#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
12190c5d
AP
111#define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44)
112#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
9b930eae 113#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51)
f752dcd5
AP
114#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
115#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
116#define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65)
9b930eae 117#define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70)
2b06bdbe
MY
118#define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82)
119#define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83)
120#define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84)
9b930eae 121#define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93)
5e6e3a92 122#define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94)
e568634a 123#define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104)
13d7ba78 124#define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105)
2b06bdbe
MY
125#define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113)
126#define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114)
f752dcd5
AP
127#define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145)
128#define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146)
5e6e3a92
BZ
129
130#define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048
131
5e6e3a92
BZ
132#define SSN_MASK 0xfff0
133
134#define BA_RESULT_SUCCESS 0x0
5e6e3a92 135#define BA_RESULT_TIMEOUT 0x2
5e6e3a92
BZ
136
137#define IS_BASTREAM_SETUP(ptr) (ptr->ba_status)
138
139#define BA_STREAM_NOT_ALLOWED 0xff
140
141#define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \
931f1584
YAP
142 priv->adapter->config_bands & BAND_AN) && \
143 priv->curr_bss_params.bss_descriptor.bcn_ht_cap)
5e6e3a92
BZ
144#define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\
145 BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS)
146
147#define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096
148#define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192
5e6e3a92 149
5e6e3a92 150#define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11))
6d2bd916
MY
151
152/* dev_cap bitmap
153 * BIT
154 * 0-16 reserved
155 * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40
156 * 18-22 reserved
157 * 23 IEEE80211_HT_CAP_SGI_20
158 * 24 IEEE80211_HT_CAP_SGI_40
159 * 25 IEEE80211_HT_CAP_TX_STBC
160 * 26 IEEE80211_HT_CAP_RX_STBC
161 * 27-28 reserved
162 * 29 IEEE80211_HT_CAP_GRN_FLD
163 * 30-31 reserved
164 */
5e6e3a92 165#define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17))
6d2bd916
MY
166#define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23))
167#define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24))
168#define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25))
169#define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26))
170#define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29))
171
cd27bc3c
AK
172/* httxcfg bitmap
173 * 0 reserved
174 * 1 20/40 Mhz enable(1)/disable(0)
175 * 2-3 reserved
176 * 4 green field enable(1)/disable(0)
177 * 5 short GI in 20 Mhz enable(1)/disable(0)
178 * 6 short GI in 40 Mhz enable(1)/disable(0)
179 * 7-15 reserved
180 */
181#define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6))
182
5e6e3a92 183#define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f)
5e6e3a92 184#define SETHT_MCS32(x) (x[4] |= 1)
e3bea1c8 185#define HT_STREAM_2X2 0x22
6d2bd916 186
5e6e3a92
BZ
187#define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4))
188
189#define LLC_SNAP_LEN 8
190
5e6e3a92
BZ
191#define MOD_CLASS_HR_DSSS 0x03
192#define MOD_CLASS_OFDM 0x07
193#define MOD_CLASS_HT 0x08
194#define HT_BW_20 0
195#define HT_BW_40 1
196
197#define HostCmd_CMD_GET_HW_SPEC 0x0003
198#define HostCmd_CMD_802_11_SCAN 0x0006
199#define HostCmd_CMD_802_11_GET_LOG 0x000b
200#define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010
201#define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059
202#define HostCmd_CMD_802_11_ASSOCIATE 0x0012
203#define HostCmd_CMD_802_11_SNMP_MIB 0x0016
204#define HostCmd_CMD_MAC_REG_ACCESS 0x0019
205#define HostCmd_CMD_BBP_REG_ACCESS 0x001a
206#define HostCmd_CMD_RF_REG_ACCESS 0x001b
207#define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad
208#define HostCmd_CMD_802_11_RF_CHANNEL 0x001d
209#define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024
210#define HostCmd_CMD_MAC_CONTROL 0x0028
211#define HostCmd_CMD_802_11_AD_HOC_START 0x002b
212#define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c
213#define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040
214#define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D
215#define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b
216#define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e
217#define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c
218#define HostCmd_CMD_WMM_GET_STATUS 0x0071
fa444bf8 219#define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075
5e6e3a92
BZ
220#define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f
221#define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083
222#define HostCmd_CMD_VERSION_EXT 0x0097
223#define HostCmd_CMD_RSSI_INFO 0x00a4
224#define HostCmd_CMD_FUNC_INIT 0x00a9
225#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
40d07030
AP
226#define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
227#define HostCmd_CMD_UAP_BSS_START 0x00b1
228#define HostCmd_CMD_UAP_BSS_STOP 0x00b2
5e6e3a92
BZ
229#define HostCmd_CMD_11N_CFG 0x00cd
230#define HostCmd_CMD_11N_ADDBA_REQ 0x00ce
231#define HostCmd_CMD_11N_ADDBA_RSP 0x00cf
232#define HostCmd_CMD_11N_DELBA 0x00d0
233#define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9
234#define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df
235#define HostCmd_CMD_TXPWR_CFG 0x00d1
236#define HostCmd_CMD_TX_RATE_CFG 0x00d6
237#define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4
238#define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5
239#define HostCmd_CMD_CAU_REG_ACCESS 0x00ed
240#define HostCmd_CMD_SET_BSS_MODE 0x00f7
d930faee 241#define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa
5e6e3a92 242
f752dcd5
AP
243#define PROTOCOL_NO_SECURITY 0x01
244#define PROTOCOL_STATIC_WEP 0x02
245#define PROTOCOL_WPA 0x08
246#define PROTOCOL_WPA2 0x20
247#define PROTOCOL_WPA2_MIXED 0x28
248#define PROTOCOL_EAP 0x40
249#define KEY_MGMT_NONE 0x04
250#define KEY_MGMT_PSK 0x02
251#define KEY_MGMT_EAP 0x01
252#define CIPHER_TKIP 0x04
253#define CIPHER_AES_CCMP 0x08
254#define VALID_CIPHER_BITMAP 0x0c
255
5e6e3a92
BZ
256enum ENH_PS_MODES {
257 EN_PS = 1,
258 DIS_PS = 2,
259 EN_AUTO_DS = 3,
260 DIS_AUTO_DS = 4,
261 SLEEP_CONFIRM = 5,
262 GET_PS = 0,
263 EN_AUTO_PS = 0xff,
264 DIS_AUTO_PS = 0xfe,
265};
266
267#define HostCmd_RET_BIT 0x8000
268#define HostCmd_ACT_GEN_GET 0x0000
269#define HostCmd_ACT_GEN_SET 0x0001
fa444bf8
AK
270#define HostCmd_ACT_BITWISE_SET 0x0002
271#define HostCmd_ACT_BITWISE_CLR 0x0003
5e6e3a92 272#define HostCmd_RESULT_OK 0x0000
5e6e3a92
BZ
273
274#define HostCmd_ACT_MAC_RX_ON 0x0001
275#define HostCmd_ACT_MAC_TX_ON 0x0002
276#define HostCmd_ACT_MAC_WEP_ENABLE 0x0008
277#define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010
278#define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080
279#define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100
5e6e3a92
BZ
280#define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000
281
5e6e3a92
BZ
282#define HostCmd_BSS_MODE_IBSS 0x0002
283#define HostCmd_BSS_MODE_ANY 0x0003
284
285#define HostCmd_SCAN_RADIO_TYPE_BG 0
286#define HostCmd_SCAN_RADIO_TYPE_A 1
287
288#define HOST_SLEEP_CFG_CANCEL 0xffffffff
289#define HOST_SLEEP_CFG_COND_DEF 0x0000000f
290#define HOST_SLEEP_CFG_GPIO_DEF 0xff
291#define HOST_SLEEP_CFG_GAP_DEF 0
292
293#define CMD_F_HOSTCMD (1 << 0)
294#define CMD_F_CANCELED (1 << 1)
295
296#define HostCmd_CMD_ID_MASK 0x0fff
297
298#define HostCmd_SEQ_NUM_MASK 0x00ff
299
300#define HostCmd_BSS_NUM_MASK 0x0f00
301
302#define HostCmd_BSS_TYPE_MASK 0xf000
303
304#define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \
305 (((seq) & 0x00ff) | \
306 (((num) & 0x000f) << 8)) | \
307 (((type) & 0x000f) << 12); }
308
309#define HostCmd_GET_SEQ_NO(seq) \
310 ((seq) & HostCmd_SEQ_NUM_MASK)
311
312#define HostCmd_GET_BSS_NO(seq) \
313 (((seq) & HostCmd_BSS_NUM_MASK) >> 8)
314
315#define HostCmd_GET_BSS_TYPE(seq) \
316 (((seq) & HostCmd_BSS_TYPE_MASK) >> 12)
317
318#define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001
319#define EVENT_LINK_LOST 0x00000003
320#define EVENT_LINK_SENSED 0x00000004
321#define EVENT_MIB_CHANGED 0x00000006
322#define EVENT_INIT_DONE 0x00000007
323#define EVENT_DEAUTHENTICATED 0x00000008
324#define EVENT_DISASSOCIATED 0x00000009
325#define EVENT_PS_AWAKE 0x0000000a
326#define EVENT_PS_SLEEP 0x0000000b
327#define EVENT_MIC_ERR_MULTICAST 0x0000000d
328#define EVENT_MIC_ERR_UNICAST 0x0000000e
329#define EVENT_DEEP_SLEEP_AWAKE 0x00000010
330#define EVENT_ADHOC_BCN_LOST 0x00000011
331
332#define EVENT_WMM_STATUS_CHANGE 0x00000017
333#define EVENT_BG_SCAN_REPORT 0x00000018
334#define EVENT_RSSI_LOW 0x00000019
335#define EVENT_SNR_LOW 0x0000001a
336#define EVENT_MAX_FAIL 0x0000001b
337#define EVENT_RSSI_HIGH 0x0000001c
338#define EVENT_SNR_HIGH 0x0000001d
339#define EVENT_IBSS_COALESCED 0x0000001e
340#define EVENT_DATA_RSSI_LOW 0x00000024
341#define EVENT_DATA_SNR_LOW 0x00000025
342#define EVENT_DATA_RSSI_HIGH 0x00000026
343#define EVENT_DATA_SNR_HIGH 0x00000027
344#define EVENT_LINK_QUALITY 0x00000028
345#define EVENT_PORT_RELEASE 0x0000002b
e568634a
AP
346#define EVENT_UAP_STA_DEAUTH 0x0000002c
347#define EVENT_UAP_STA_ASSOC 0x0000002d
348#define EVENT_UAP_BSS_START 0x0000002e
5e6e3a92
BZ
349#define EVENT_PRE_BEACON_LOST 0x00000031
350#define EVENT_ADDBA 0x00000033
351#define EVENT_DELBA 0x00000034
352#define EVENT_BA_STREAM_TIEMOUT 0x00000037
353#define EVENT_AMSDU_AGGR_CTRL 0x00000042
e568634a
AP
354#define EVENT_UAP_BSS_IDLE 0x00000043
355#define EVENT_UAP_BSS_ACTIVE 0x00000044
5e6e3a92
BZ
356#define EVENT_WEP_ICV_ERR 0x00000046
357#define EVENT_HS_ACT_REQ 0x00000047
358#define EVENT_BW_CHANGE 0x00000048
e568634a 359#define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c
5e6e3a92
BZ
360#define EVENT_HOSTWAKE_STAIE 0x0000004d
361
362#define EVENT_ID_MASK 0xffff
363#define BSS_NUM_MASK 0xf
364
365#define EVENT_GET_BSS_NUM(event_cause) \
366 (((event_cause) >> 16) & BSS_NUM_MASK)
367
368#define EVENT_GET_BSS_TYPE(event_cause) \
369 (((event_cause) >> 24) & 0x00ff)
370
5e6e3a92
BZ
371struct mwifiex_ie_types_header {
372 __le16 type;
373 __le16 len;
374} __packed;
375
376struct mwifiex_ie_types_data {
377 struct mwifiex_ie_types_header header;
378 u8 data[1];
379} __packed;
380
381#define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01
382#define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08
383
384struct txpd {
385 u8 bss_type;
386 u8 bss_num;
387 __le16 tx_pkt_length;
388 __le16 tx_pkt_offset;
389 __le16 tx_pkt_type;
390 __le32 tx_control;
391 u8 priority;
392 u8 flags;
393 u8 pkt_delay_2ms;
394 u8 reserved1;
395} __packed;
396
397struct rxpd {
398 u8 bss_type;
399 u8 bss_num;
400 u16 rx_pkt_length;
401 u16 rx_pkt_offset;
402 u16 rx_pkt_type;
403 u16 seq_num;
404 u8 priority;
405 u8 rx_rate;
406 s8 snr;
407 s8 nf;
408 /* Ht Info [Bit 0] RxRate format: LG=0, HT=1
409 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
410 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
411 u8 ht_info;
412 u8 reserved;
413} __packed;
414
415enum mwifiex_chan_scan_mode_bitmasks {
416 MWIFIEX_PASSIVE_SCAN = BIT(0),
417 MWIFIEX_DISABLE_CHAN_FILT = BIT(1),
418};
419
5e6e3a92
BZ
420struct mwifiex_chan_scan_param_set {
421 u8 radio_type;
422 u8 chan_number;
423 u8 chan_scan_mode_bitmap;
424 __le16 min_scan_time;
425 __le16 max_scan_time;
426} __packed;
427
428struct mwifiex_ie_types_chan_list_param_set {
429 struct mwifiex_ie_types_header header;
430 struct mwifiex_chan_scan_param_set chan_scan_param[1];
431} __packed;
432
433struct chan_band_param_set {
434 u8 radio_type;
435 u8 chan_number;
436};
437
438struct mwifiex_ie_types_chan_band_list_param_set {
439 struct mwifiex_ie_types_header header;
440 struct chan_band_param_set chan_band_param[1];
441} __packed;
442
443struct mwifiex_ie_types_rates_param_set {
444 struct mwifiex_ie_types_header header;
445 u8 rates[1];
446} __packed;
447
448struct mwifiex_ie_types_ssid_param_set {
449 struct mwifiex_ie_types_header header;
450 u8 ssid[1];
451} __packed;
452
453struct mwifiex_ie_types_num_probes {
454 struct mwifiex_ie_types_header header;
455 __le16 num_probes;
456} __packed;
457
458struct mwifiex_ie_types_wildcard_ssid_params {
459 struct mwifiex_ie_types_header header;
460 u8 max_ssid_length;
461 u8 ssid[1];
462} __packed;
463
464#define TSF_DATA_SIZE 8
465struct mwifiex_ie_types_tsf_timestamp {
466 struct mwifiex_ie_types_header header;
467 u8 tsf_data[1];
468} __packed;
469
470struct mwifiex_cf_param_set {
471 u8 cfp_cnt;
472 u8 cfp_period;
473 u16 cfp_max_duration;
474 u16 cfp_duration_remaining;
475} __packed;
476
477struct mwifiex_ibss_param_set {
478 u16 atim_window;
479} __packed;
480
481struct mwifiex_ie_types_ss_param_set {
482 struct mwifiex_ie_types_header header;
483 union {
484 struct mwifiex_cf_param_set cf_param_set[1];
485 struct mwifiex_ibss_param_set ibss_param_set[1];
486 } cf_ibss;
487} __packed;
488
489struct mwifiex_fh_param_set {
490 u16 dwell_time;
491 u8 hop_set;
492 u8 hop_pattern;
493 u8 hop_index;
494} __packed;
495
496struct mwifiex_ds_param_set {
497 u8 current_chan;
498} __packed;
499
500struct mwifiex_ie_types_phy_param_set {
501 struct mwifiex_ie_types_header header;
502 union {
503 struct mwifiex_fh_param_set fh_param_set[1];
504 struct mwifiex_ds_param_set ds_param_set[1];
505 } fh_ds;
506} __packed;
507
508struct mwifiex_ie_types_auth_type {
509 struct mwifiex_ie_types_header header;
510 __le16 auth_type;
511} __packed;
512
513struct mwifiex_ie_types_vendor_param_set {
514 struct mwifiex_ie_types_header header;
515 u8 ie[MWIFIEX_MAX_VSIE_LEN];
516};
517
518struct mwifiex_ie_types_rsn_param_set {
519 struct mwifiex_ie_types_header header;
520 u8 rsn_ie[1];
521} __packed;
522
523#define KEYPARAMSET_FIXED_LEN 6
524
525struct mwifiex_ie_type_key_param_set {
526 __le16 type;
527 __le16 length;
528 __le16 key_type_id;
529 __le16 key_info;
530 __le16 key_len;
531 u8 key[50];
532} __packed;
533
534struct host_cmd_ds_802_11_key_material {
535 __le16 action;
536 struct mwifiex_ie_type_key_param_set key_param_set;
537} __packed;
538
539struct host_cmd_ds_gen {
540 u16 command;
541 u16 size;
542 u16 seq_num;
543 u16 result;
544};
545
546#define S_DS_GEN sizeof(struct host_cmd_ds_gen)
547
548enum sleep_resp_ctrl {
549 RESP_NOT_NEEDED = 0,
550 RESP_NEEDED,
551};
552
553struct mwifiex_ps_param {
554 __le16 null_pkt_interval;
555 __le16 multiple_dtims;
556 __le16 bcn_miss_timeout;
557 __le16 local_listen_interval;
558 __le16 adhoc_wake_period;
559 __le16 mode;
560 __le16 delay_to_ps;
561};
562
5e6e3a92
BZ
563#define BITMAP_AUTO_DS 0x01
564#define BITMAP_STA_PS 0x10
5e6e3a92
BZ
565
566struct mwifiex_ie_types_auto_ds_param {
567 struct mwifiex_ie_types_header header;
2b06bdbe 568 __le16 deep_sleep_timeout;
5e6e3a92
BZ
569} __packed;
570
571struct mwifiex_ie_types_ps_param {
572 struct mwifiex_ie_types_header header;
573 struct mwifiex_ps_param param;
574} __packed;
575
576struct host_cmd_ds_802_11_ps_mode_enh {
577 __le16 action;
578
579 union {
580 struct mwifiex_ps_param opt_ps;
5e6e3a92 581 __le16 ps_bitmap;
5e6e3a92
BZ
582 } params;
583} __packed;
584
585struct host_cmd_ds_get_hw_spec {
586 __le16 hw_if_version;
587 __le16 version;
588 __le16 reserved;
589 __le16 num_of_mcast_adr;
590 u8 permanent_addr[ETH_ALEN];
591 __le16 region_code;
592 __le16 number_of_antenna;
593 __le32 fw_release_number;
594 __le32 reserved_1;
595 __le32 reserved_2;
596 __le32 reserved_3;
597 __le32 fw_cap_info;
598 __le32 dot_11n_dev_cap;
599 u8 dev_mcs_support;
600 __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
601 __le16 reserved_4;
602} __packed;
603
604struct host_cmd_ds_802_11_rssi_info {
605 __le16 action;
606 __le16 ndata;
607 __le16 nbcn;
608 __le16 reserved[9];
609 long long reserved_1;
610};
611
612struct host_cmd_ds_802_11_rssi_info_rsp {
613 __le16 action;
614 __le16 ndata;
615 __le16 nbcn;
616 __le16 data_rssi_last;
617 __le16 data_nf_last;
618 __le16 data_rssi_avg;
619 __le16 data_nf_avg;
620 __le16 bcn_rssi_last;
621 __le16 bcn_nf_last;
622 __le16 bcn_rssi_avg;
623 __le16 bcn_nf_avg;
624 long long tsf_bcn;
625};
626
627struct host_cmd_ds_802_11_mac_address {
628 __le16 action;
629 u8 mac_addr[ETH_ALEN];
630};
631
632struct host_cmd_ds_mac_control {
633 __le16 action;
634 __le16 reserved;
635};
636
637struct host_cmd_ds_mac_multicast_adr {
638 __le16 action;
639 __le16 num_of_adrs;
640 u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
641} __packed;
642
643struct host_cmd_ds_802_11_deauthenticate {
644 u8 mac_addr[ETH_ALEN];
645 __le16 reason_code;
646} __packed;
647
648struct host_cmd_ds_802_11_associate {
649 u8 peer_sta_addr[ETH_ALEN];
650 __le16 cap_info_bitmap;
651 __le16 listen_interval;
652 __le16 beacon_period;
653 u8 dtim_period;
654} __packed;
655
656struct ieee_types_assoc_rsp {
657 __le16 cap_info_bitmap;
658 __le16 status_code;
659 __le16 a_id;
660 u8 ie_buffer[1];
661} __packed;
662
663struct host_cmd_ds_802_11_associate_rsp {
664 struct ieee_types_assoc_rsp assoc_rsp;
665} __packed;
666
667struct ieee_types_cf_param_set {
668 u8 element_id;
669 u8 len;
670 u8 cfp_cnt;
671 u8 cfp_period;
672 u16 cfp_max_duration;
673 u16 cfp_duration_remaining;
674} __packed;
675
676struct ieee_types_ibss_param_set {
677 u8 element_id;
678 u8 len;
679 __le16 atim_window;
680} __packed;
681
682union ieee_types_ss_param_set {
683 struct ieee_types_cf_param_set cf_param_set;
684 struct ieee_types_ibss_param_set ibss_param_set;
685} __packed;
686
687struct ieee_types_fh_param_set {
688 u8 element_id;
689 u8 len;
690 __le16 dwell_time;
691 u8 hop_set;
692 u8 hop_pattern;
693 u8 hop_index;
694} __packed;
695
696struct ieee_types_ds_param_set {
697 u8 element_id;
698 u8 len;
699 u8 current_chan;
700} __packed;
701
702union ieee_types_phy_param_set {
703 struct ieee_types_fh_param_set fh_param_set;
704 struct ieee_types_ds_param_set ds_param_set;
705} __packed;
706
707struct host_cmd_ds_802_11_ad_hoc_start {
708 u8 ssid[IEEE80211_MAX_SSID_LEN];
709 u8 bss_mode;
710 __le16 beacon_period;
711 u8 dtim_period;
712 union ieee_types_ss_param_set ss_param_set;
713 union ieee_types_phy_param_set phy_param_set;
714 u16 reserved1;
715 __le16 cap_info_bitmap;
63af6333 716 u8 data_rate[HOSTCMD_SUPPORTED_RATES];
5e6e3a92
BZ
717} __packed;
718
719struct host_cmd_ds_802_11_ad_hoc_result {
720 u8 pad[3];
721 u8 bssid[ETH_ALEN];
722} __packed;
723
724struct adhoc_bss_desc {
725 u8 bssid[ETH_ALEN];
726 u8 ssid[IEEE80211_MAX_SSID_LEN];
727 u8 bss_mode;
728 __le16 beacon_period;
729 u8 dtim_period;
730 u8 time_stamp[8];
731 u8 local_time[8];
732 union ieee_types_phy_param_set phy_param_set;
733 union ieee_types_ss_param_set ss_param_set;
734 __le16 cap_info_bitmap;
735 u8 data_rates[HOSTCMD_SUPPORTED_RATES];
736
737 /*
738 * DO NOT ADD ANY FIELDS TO THIS STRUCTURE.
739 * It is used in the Adhoc join command and will cause a
740 * binary layout mismatch with the firmware
741 */
742} __packed;
743
744struct host_cmd_ds_802_11_ad_hoc_join {
745 struct adhoc_bss_desc bss_descriptor;
746 u16 reserved1;
747 u16 reserved2;
748} __packed;
749
750struct host_cmd_ds_802_11_get_log {
751 __le32 mcast_tx_frame;
752 __le32 failed;
753 __le32 retry;
754 __le32 multi_retry;
755 __le32 frame_dup;
756 __le32 rts_success;
757 __le32 rts_failure;
758 __le32 ack_failure;
759 __le32 rx_frag;
760 __le32 mcast_rx_frame;
761 __le32 fcs_error;
762 __le32 tx_frame;
763 __le32 reserved;
764 __le32 wep_icv_err_cnt[4];
765};
766
767struct host_cmd_ds_tx_rate_query {
768 u8 tx_rate;
769 /* Ht Info [Bit 0] RxRate format: LG=0, HT=1
770 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
771 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */
772 u8 ht_info;
773} __packed;
774
775enum Host_Sleep_Action {
776 HS_CONFIGURE = 0x0001,
777 HS_ACTIVATE = 0x0002,
778};
779
780struct mwifiex_hs_config_param {
781 __le32 conditions;
782 u8 gpio;
783 u8 gap;
784} __packed;
785
786struct hs_activate_param {
787 u16 resp_ctrl;
788} __packed;
789
790struct host_cmd_ds_802_11_hs_cfg_enh {
791 __le16 action;
792
793 union {
794 struct mwifiex_hs_config_param hs_config;
795 struct hs_activate_param hs_activate;
796 } params;
797} __packed;
798
799enum SNMP_MIB_INDEX {
800 OP_RATE_SET_I = 1,
801 DTIM_PERIOD_I = 3,
802 RTS_THRESH_I = 5,
803 SHORT_RETRY_LIM_I = 6,
804 LONG_RETRY_LIM_I = 7,
805 FRAG_THRESH_I = 8,
806 DOT11D_I = 9,
807};
808
809#define MAX_SNMP_BUF_SIZE 128
810
811struct host_cmd_ds_802_11_snmp_mib {
812 __le16 query_type;
813 __le16 oid;
814 __le16 buf_size;
815 u8 value[1];
816} __packed;
817
5e6e3a92
BZ
818struct mwifiex_rate_scope {
819 __le16 type;
820 __le16 length;
821 __le16 hr_dsss_rate_bitmap;
822 __le16 ofdm_rate_bitmap;
823 __le16 ht_mcs_rate_bitmap[8];
824} __packed;
825
826struct mwifiex_rate_drop_pattern {
827 __le16 type;
828 __le16 length;
829 __le32 rate_drop_mode;
830} __packed;
831
832struct host_cmd_ds_tx_rate_cfg {
833 __le16 action;
834 __le16 cfg_index;
835} __packed;
836
837struct mwifiex_power_group {
838 u8 modulation_class;
839 u8 first_rate_code;
840 u8 last_rate_code;
841 s8 power_step;
842 s8 power_min;
843 s8 power_max;
844 u8 ht_bandwidth;
845 u8 reserved;
846} __packed;
847
848struct mwifiex_types_power_group {
849 u16 type;
850 u16 length;
851} __packed;
852
853struct host_cmd_ds_txpwr_cfg {
854 __le16 action;
855 __le16 cfg_index;
856 __le32 mode;
857} __packed;
858
7c6fa2a8
AK
859struct mwifiex_bcn_param {
860 u8 bssid[ETH_ALEN];
861 u8 rssi;
b5abcf02 862 __le64 timestamp;
7c6fa2a8
AK
863 __le16 beacon_period;
864 __le16 cap_info_bitmap;
865} __packed;
866
5e6e3a92
BZ
867#define MWIFIEX_USER_SCAN_CHAN_MAX 50
868
869#define MWIFIEX_MAX_SSID_LIST_LENGTH 10
870
871struct mwifiex_scan_cmd_config {
872 /*
a8c48565 873 * BSS mode to be sent in the firmware command
5e6e3a92
BZ
874 */
875 u8 bss_mode;
876
877 /* Specific BSSID used to filter scan results in the firmware */
878 u8 specific_bssid[ETH_ALEN];
879
880 /* Length of TLVs sent in command starting at tlvBuffer */
881 u32 tlv_buf_len;
882
883 /*
884 * SSID TLV(s) and ChanList TLVs to be sent in the firmware command
885 *
886 * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set
887 * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set
888 */
889 u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored
890 here */
891} __packed;
892
893struct mwifiex_user_scan_chan {
894 u8 chan_number;
895 u8 radio_type;
896 u8 scan_type;
897 u8 reserved;
898 u32 scan_time;
899} __packed;
900
5e6e3a92 901struct mwifiex_user_scan_cfg {
5e6e3a92
BZ
902 /*
903 * BSS mode to be sent in the firmware command
5e6e3a92
BZ
904 */
905 u8 bss_mode;
906 /* Configure the number of probe requests for active chan scans */
907 u8 num_probes;
908 u8 reserved;
909 /* BSSID filter sent in the firmware command to limit the results */
910 u8 specific_bssid[ETH_ALEN];
be0b281e
AK
911 /* SSID filter list used in the firmware to limit the scan results */
912 struct cfg80211_ssid *ssid_list;
913 u8 num_ssids;
5e6e3a92
BZ
914 /* Variable number (fixed maximum) of channels to scan up */
915 struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX];
916} __packed;
917
918struct ie_body {
919 u8 grp_key_oui[4];
920 u8 ptk_cnt[2];
921 u8 ptk_body[4];
922} __packed;
923
924struct host_cmd_ds_802_11_scan {
925 u8 bss_mode;
926 u8 bssid[ETH_ALEN];
927 u8 tlv_buffer[1];
928} __packed;
929
930struct host_cmd_ds_802_11_scan_rsp {
931 __le16 bss_descript_size;
932 u8 number_of_sets;
933 u8 bss_desc_and_tlv_buffer[1];
934} __packed;
935
936struct host_cmd_ds_802_11_bg_scan_query {
937 u8 flush;
938} __packed;
939
940struct host_cmd_ds_802_11_bg_scan_query_rsp {
941 u32 report_condition;
942 struct host_cmd_ds_802_11_scan_rsp scan_resp;
943} __packed;
944
945struct mwifiex_ietypes_domain_param_set {
946 struct mwifiex_ie_types_header header;
947 u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
948 struct ieee80211_country_ie_triplet triplet[1];
949} __packed;
950
951struct host_cmd_ds_802_11d_domain_info {
952 __le16 action;
953 struct mwifiex_ietypes_domain_param_set domain;
954} __packed;
955
956struct host_cmd_ds_802_11d_domain_info_rsp {
957 __le16 action;
958 struct mwifiex_ietypes_domain_param_set domain;
959} __packed;
960
961struct host_cmd_ds_11n_addba_req {
962 u8 add_req_result;
963 u8 peer_mac_addr[ETH_ALEN];
964 u8 dialog_token;
965 __le16 block_ack_param_set;
966 __le16 block_ack_tmo;
967 __le16 ssn;
968} __packed;
969
970struct host_cmd_ds_11n_addba_rsp {
971 u8 add_rsp_result;
972 u8 peer_mac_addr[ETH_ALEN];
973 u8 dialog_token;
974 __le16 status_code;
975 __le16 block_ack_param_set;
976 __le16 block_ack_tmo;
977 __le16 ssn;
978} __packed;
979
980struct host_cmd_ds_11n_delba {
981 u8 del_result;
982 u8 peer_mac_addr[ETH_ALEN];
983 __le16 del_ba_param_set;
984 __le16 reason_code;
985 u8 reserved;
986} __packed;
987
988struct host_cmd_ds_11n_batimeout {
989 u8 tid;
990 u8 peer_mac_addr[ETH_ALEN];
991 u8 origninator;
992} __packed;
993
994struct host_cmd_ds_11n_cfg {
995 __le16 action;
996 __le16 ht_tx_cap;
997 __le16 ht_tx_info;
998} __packed;
999
1000struct host_cmd_ds_txbuf_cfg {
1001 __le16 action;
1002 __le16 buff_size;
1003 __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
1004 __le16 reserved3;
1005} __packed;
1006
1007struct host_cmd_ds_amsdu_aggr_ctrl {
1008 __le16 action;
1009 __le16 enable;
1010 __le16 curr_buf_size;
1011} __packed;
1012
1013struct mwifiex_ie_types_wmm_param_set {
1014 struct mwifiex_ie_types_header header;
1015 u8 wmm_ie[1];
1016};
1017
1018struct mwifiex_ie_types_wmm_queue_status {
1019 struct mwifiex_ie_types_header header;
1020 u8 queue_index;
1021 u8 disabled;
1022 u16 medium_time;
1023 u8 flow_required;
1024 u8 flow_created;
1025 u32 reserved;
1026};
1027
1028struct ieee_types_vendor_header {
1029 u8 element_id;
1030 u8 len;
2e4c14a5 1031 u8 oui[4]; /* 0~2: oui, 3: oui_type */
5e6e3a92
BZ
1032 u8 oui_subtype;
1033 u8 version;
1034} __packed;
1035
1036struct ieee_types_wmm_ac_parameters {
1037 u8 aci_aifsn_bitmap;
1038 u8 ecw_bitmap;
1039 __le16 tx_op_limit;
1040} __packed;
1041
1042struct ieee_types_wmm_parameter {
1043 /*
1044 * WMM Parameter IE - Vendor Specific Header:
1045 * element_id [221/0xdd]
1046 * Len [24]
1047 * Oui [00:50:f2]
1048 * OuiType [2]
1049 * OuiSubType [1]
1050 * Version [1]
1051 */
1052 struct ieee_types_vendor_header vend_hdr;
1053 u8 qos_info_bitmap;
1054 u8 reserved;
99fec5de 1055 struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS];
5e6e3a92
BZ
1056} __packed;
1057
1058struct ieee_types_wmm_info {
1059
1060 /*
1061 * WMM Info IE - Vendor Specific Header:
1062 * element_id [221/0xdd]
1063 * Len [7]
1064 * Oui [00:50:f2]
1065 * OuiType [2]
1066 * OuiSubType [0]
1067 * Version [1]
1068 */
1069 struct ieee_types_vendor_header vend_hdr;
1070
1071 u8 qos_info_bitmap;
1072} __packed;
1073
1074struct host_cmd_ds_wmm_get_status {
1075 u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) *
99fec5de 1076 IEEE80211_NUM_ACS];
5e6e3a92
BZ
1077 u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2];
1078} __packed;
1079
1080struct mwifiex_wmm_ac_status {
1081 u8 disabled;
1082 u8 flow_required;
1083 u8 flow_created;
1084};
1085
1086struct mwifiex_ie_types_htcap {
1087 struct mwifiex_ie_types_header header;
1088 struct ieee80211_ht_cap ht_cap;
1089} __packed;
1090
1091struct mwifiex_ie_types_htinfo {
1092 struct mwifiex_ie_types_header header;
074d46d1 1093 struct ieee80211_ht_operation ht_oper;
5e6e3a92
BZ
1094} __packed;
1095
1096struct mwifiex_ie_types_2040bssco {
1097 struct mwifiex_ie_types_header header;
1098 u8 bss_co_2040;
1099} __packed;
1100
1101struct mwifiex_ie_types_extcap {
1102 struct mwifiex_ie_types_header header;
1103 u8 ext_cap;
1104} __packed;
1105
1106struct host_cmd_ds_mac_reg_access {
1107 __le16 action;
1108 __le16 offset;
1109 __le32 value;
1110} __packed;
1111
1112struct host_cmd_ds_bbp_reg_access {
1113 __le16 action;
1114 __le16 offset;
1115 u8 value;
1116 u8 reserved[3];
1117} __packed;
1118
1119struct host_cmd_ds_rf_reg_access {
1120 __le16 action;
1121 __le16 offset;
1122 u8 value;
1123 u8 reserved[3];
1124} __packed;
1125
1126struct host_cmd_ds_pmic_reg_access {
1127 __le16 action;
1128 __le16 offset;
1129 u8 value;
1130 u8 reserved[3];
1131} __packed;
1132
1133struct host_cmd_ds_802_11_eeprom_access {
1134 __le16 action;
1135
1136 __le16 offset;
1137 __le16 byte_count;
1138 u8 value;
1139} __packed;
1140
75edd2c6
AP
1141struct host_cmd_tlv {
1142 __le16 type;
1143 __le16 len;
1144} __packed;
1145
e568634a
AP
1146struct mwifiex_assoc_event {
1147 u8 sta_addr[ETH_ALEN];
1148 __le16 type;
1149 __le16 len;
1150 __le16 frame_control;
1151 __le16 cap_info;
1152 __le16 listen_interval;
1153 u8 data[0];
1154} __packed;
1155
4db16a18
AP
1156struct host_cmd_ds_sys_config {
1157 __le16 action;
1158 u8 tlv[0];
1159};
f752dcd5
AP
1160
1161struct host_cmd_tlv_akmp {
1162 struct host_cmd_tlv tlv;
1163 __le16 key_mgmt;
1164 __le16 key_mgmt_operation;
1165} __packed;
1166
1167struct host_cmd_tlv_pwk_cipher {
1168 struct host_cmd_tlv tlv;
1169 __le16 proto;
1170 u8 cipher;
1171 u8 reserved;
1172} __packed;
1173
1174struct host_cmd_tlv_gwk_cipher {
1175 struct host_cmd_tlv tlv;
1176 u8 cipher;
1177 u8 reserved;
1178} __packed;
1179
1180struct host_cmd_tlv_passphrase {
1181 struct host_cmd_tlv tlv;
1182 u8 passphrase[0];
1183} __packed;
1184
1185struct host_cmd_tlv_auth_type {
1186 struct host_cmd_tlv tlv;
1187 u8 auth_type;
1188} __packed;
1189
1190struct host_cmd_tlv_encrypt_protocol {
1191 struct host_cmd_tlv tlv;
1192 __le16 proto;
1193} __packed;
1194
12190c5d
AP
1195struct host_cmd_tlv_ssid {
1196 struct host_cmd_tlv tlv;
1197 u8 ssid[0];
1198} __packed;
1199
1200struct host_cmd_tlv_beacon_period {
1201 struct host_cmd_tlv tlv;
1202 __le16 period;
1203} __packed;
1204
1205struct host_cmd_tlv_dtim_period {
1206 struct host_cmd_tlv tlv;
1207 u8 period;
1208} __packed;
4db16a18 1209
9b930eae
AP
1210struct host_cmd_tlv_frag_threshold {
1211 struct host_cmd_tlv tlv;
1212 __le16 frag_thr;
1213} __packed;
1214
1215struct host_cmd_tlv_rts_threshold {
1216 struct host_cmd_tlv tlv;
1217 __le16 rts_thr;
1218} __packed;
1219
1220struct host_cmd_tlv_retry_limit {
1221 struct host_cmd_tlv tlv;
1222 u8 limit;
1223} __packed;
1224
75edd2c6
AP
1225struct host_cmd_tlv_mac_addr {
1226 struct host_cmd_tlv tlv;
1227 u8 mac_addr[ETH_ALEN];
1228} __packed;
1229
4db16a18
AP
1230struct host_cmd_tlv_channel_band {
1231 struct host_cmd_tlv tlv;
1232 u8 band_config;
1233 u8 channel;
1234} __packed;
1235
5e6e3a92
BZ
1236struct host_cmd_ds_802_11_rf_channel {
1237 __le16 action;
1238 __le16 current_channel;
1239 __le16 rf_type;
1240 __le16 reserved;
1241 u8 reserved_1[32];
1242} __packed;
1243
1244struct host_cmd_ds_version_ext {
1245 u8 version_str_sel;
1246 char version_str[128];
1247} __packed;
1248
1249struct host_cmd_ds_802_11_ibss_status {
1250 __le16 action;
1251 __le16 enable;
1252 u8 bssid[ETH_ALEN];
1253 __le16 beacon_interval;
1254 __le16 atim_window;
1255 __le16 use_g_rate_protect;
1256} __packed;
1257
1258#define CONNECTION_TYPE_INFRA 0
1259#define CONNECTION_TYPE_ADHOC 1
1260
1261struct host_cmd_ds_set_bss_mode {
1262 u8 con_type;
1263} __packed;
1264
d930faee
AK
1265struct host_cmd_ds_pcie_details {
1266 /* TX buffer descriptor ring address */
1267 u32 txbd_addr_lo;
1268 u32 txbd_addr_hi;
1269 /* TX buffer descriptor ring count */
1270 u32 txbd_count;
1271
1272 /* RX buffer descriptor ring address */
1273 u32 rxbd_addr_lo;
1274 u32 rxbd_addr_hi;
1275 /* RX buffer descriptor ring count */
1276 u32 rxbd_count;
1277
1278 /* Event buffer descriptor ring address */
1279 u32 evtbd_addr_lo;
1280 u32 evtbd_addr_hi;
1281 /* Event buffer descriptor ring count */
1282 u32 evtbd_count;
1283
1284 /* Sleep cookie buffer physical address */
1285 u32 sleep_cookie_addr_lo;
1286 u32 sleep_cookie_addr_hi;
1287} __packed;
1288
fa444bf8
AK
1289struct mwifiex_ie_types_rssi_threshold {
1290 struct mwifiex_ie_types_header header;
1291 u8 abs_value;
1292 u8 evt_freq;
1293} __packed;
1294
1295struct host_cmd_ds_802_11_subsc_evt {
1296 __le16 action;
1297 __le16 events;
1298} __packed;
1299
5e6e3a92
BZ
1300struct host_cmd_ds_command {
1301 __le16 command;
1302 __le16 size;
1303 __le16 seq_num;
1304 __le16 result;
1305 union {
1306 struct host_cmd_ds_get_hw_spec hw_spec;
1307 struct host_cmd_ds_mac_control mac_ctrl;
1308 struct host_cmd_ds_802_11_mac_address mac_addr;
1309 struct host_cmd_ds_mac_multicast_adr mc_addr;
1310 struct host_cmd_ds_802_11_get_log get_log;
1311 struct host_cmd_ds_802_11_rssi_info rssi_info;
1312 struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp;
1313 struct host_cmd_ds_802_11_snmp_mib smib;
1314 struct host_cmd_ds_802_11_rf_channel rf_channel;
1315 struct host_cmd_ds_tx_rate_query tx_rate;
1316 struct host_cmd_ds_tx_rate_cfg tx_rate_cfg;
1317 struct host_cmd_ds_txpwr_cfg txp_cfg;
1318 struct host_cmd_ds_802_11_ps_mode_enh psmode_enh;
1319 struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg;
1320 struct host_cmd_ds_802_11_scan scan;
1321 struct host_cmd_ds_802_11_scan_rsp scan_resp;
1322 struct host_cmd_ds_802_11_bg_scan_query bg_scan_query;
1323 struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp;
1324 struct host_cmd_ds_802_11_associate associate;
1325 struct host_cmd_ds_802_11_associate_rsp associate_rsp;
1326 struct host_cmd_ds_802_11_deauthenticate deauth;
1327 struct host_cmd_ds_802_11_ad_hoc_start adhoc_start;
1328 struct host_cmd_ds_802_11_ad_hoc_result adhoc_result;
1329 struct host_cmd_ds_802_11_ad_hoc_join adhoc_join;
1330 struct host_cmd_ds_802_11d_domain_info domain_info;
1331 struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp;
1332 struct host_cmd_ds_11n_addba_req add_ba_req;
1333 struct host_cmd_ds_11n_addba_rsp add_ba_rsp;
1334 struct host_cmd_ds_11n_delba del_ba;
1335 struct host_cmd_ds_txbuf_cfg tx_buf;
1336 struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl;
1337 struct host_cmd_ds_11n_cfg htcfg;
1338 struct host_cmd_ds_wmm_get_status get_wmm_status;
1339 struct host_cmd_ds_802_11_key_material key_material;
1340 struct host_cmd_ds_version_ext verext;
1341 struct host_cmd_ds_802_11_ibss_status ibss_coalescing;
1342 struct host_cmd_ds_mac_reg_access mac_reg;
1343 struct host_cmd_ds_bbp_reg_access bbp_reg;
1344 struct host_cmd_ds_rf_reg_access rf_reg;
1345 struct host_cmd_ds_pmic_reg_access pmic_reg;
1346 struct host_cmd_ds_set_bss_mode bss_mode;
d930faee 1347 struct host_cmd_ds_pcie_details pcie_host_spec;
5e6e3a92 1348 struct host_cmd_ds_802_11_eeprom_access eeprom;
fa444bf8 1349 struct host_cmd_ds_802_11_subsc_evt subsc_evt;
4db16a18 1350 struct host_cmd_ds_sys_config uap_sys_config;
5e6e3a92
BZ
1351 } params;
1352} __packed;
1353
1354struct mwifiex_opt_sleep_confirm {
1355 __le16 command;
1356 __le16 size;
1357 __le16 seq_num;
1358 __le16 result;
1359 __le16 action;
2b06bdbe 1360 __le16 resp_ctrl;
5e6e3a92 1361} __packed;
5e6e3a92 1362#endif /* !_MWIFIEX_FW_H_ */