Commit | Line | Data |
---|---|---|
5e6e3a92 BZ |
1 | /* |
2 | * Marvell Wireless LAN device driver: Firmware specific macros & structures | |
3 | * | |
65da33f5 | 4 | * Copyright (C) 2011-2014, Marvell International Ltd. |
5e6e3a92 BZ |
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 | ||
28 | struct rfc_1042_hdr { | |
29 | u8 llc_dsap; | |
30 | u8 llc_ssap; | |
31 | u8 llc_ctrl; | |
32 | u8 snap_oui[3]; | |
a6efc5b7 | 33 | __be16 snap_type; |
5e6e3a92 BZ |
34 | }; |
35 | ||
36 | struct rx_packet_hdr { | |
37 | struct ethhdr eth803_hdr; | |
38 | struct rfc_1042_hdr rfc1042_hdr; | |
39 | }; | |
40 | ||
41 | struct 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 | |
a5f39056 | 52 | #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \ |
f25b1431 | 53 | BAND_AN | BAND_AAC) |
5e6e3a92 | 54 | |
a5f39056 | 55 | #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \ |
f25b1431 | 56 | BIT(13)) |
5e6e3a92 BZ |
57 | #define IS_SUPPORT_MULTI_BANDS(adapter) \ |
58 | (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) | |
a5f39056 | 59 | |
f25b1431 BZ |
60 | /* bit 13: 11ac BAND_AAC |
61 | * bit 12: reserved for lab testing, will be reused for BAND_AN | |
62 | * bit 11: 11n BAND_GN | |
63 | * bit 10: 11a BAND_A | |
64 | * bit 9: 11g BAND_G | |
65 | * bit 8: 11b BAND_B | |
66 | * Map these bits to band capability by right shifting 8 bits. | |
a5f39056 | 67 | */ |
5e6e3a92 | 68 | #define GET_FW_DEFAULT_BANDS(adapter) \ |
f25b1431 | 69 | (((adapter->fw_cap_info & 0x2f00) >> 8) & \ |
a5f39056 | 70 | ALL_802_11_BANDS) |
5e6e3a92 | 71 | |
5e6e3a92 BZ |
72 | #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff |
73 | ||
74 | #define KEY_INFO_ENABLED 0x01 | |
75 | enum KEY_TYPE_ID { | |
76 | KEY_TYPE_ID_WEP = 0, | |
77 | KEY_TYPE_ID_TKIP, | |
78 | KEY_TYPE_ID_AES, | |
79 | KEY_TYPE_ID_WAPI, | |
b877f4cf | 80 | KEY_TYPE_ID_AES_CMAC, |
5e6e3a92 | 81 | }; |
e57f1734 AP |
82 | |
83 | #define WPA_PN_SIZE 8 | |
84 | #define KEY_PARAMS_FIXED_LEN 10 | |
85 | #define KEY_INDEX_MASK 0xf | |
4b9fede5 | 86 | #define KEY_API_VER_MAJOR_V2 2 |
e57f1734 | 87 | |
6a35a0ac YAP |
88 | #define KEY_MCAST BIT(0) |
89 | #define KEY_UNICAST BIT(1) | |
90 | #define KEY_ENABLED BIT(2) | |
e57f1734 AP |
91 | #define KEY_DEFAULT BIT(3) |
92 | #define KEY_TX_KEY BIT(4) | |
93 | #define KEY_RX_KEY BIT(5) | |
b877f4cf | 94 | #define KEY_IGTK BIT(10) |
5e6e3a92 | 95 | |
e57f1734 | 96 | #define WAPI_KEY_LEN (WLAN_KEY_LEN_SMS4 + PN_LEN + 2) |
5e6e3a92 | 97 | |
5e6e3a92 | 98 | #define MAX_POLL_TRIES 100 |
5e6e3a92 BZ |
99 | #define MAX_FIRMWARE_POLL_TRIES 100 |
100 | ||
d930faee AK |
101 | #define FIRMWARE_READY_SDIO 0xfedc |
102 | #define FIRMWARE_READY_PCIE 0xfedcba00 | |
5e6e3a92 | 103 | |
46dbe247 AK |
104 | #define MWIFIEX_COEX_MODE_TIMESHARE 0x01 |
105 | #define MWIFIEX_COEX_MODE_SPATIAL 0x82 | |
106 | ||
4daffe35 AK |
107 | enum mwifiex_usb_ep { |
108 | MWIFIEX_USB_EP_CMD_EVENT = 1, | |
109 | MWIFIEX_USB_EP_DATA = 2, | |
2b0f997d | 110 | MWIFIEX_USB_EP_DATA_CH2 = 3, |
4daffe35 AK |
111 | }; |
112 | ||
5e6e3a92 BZ |
113 | enum MWIFIEX_802_11_PRIVACY_FILTER { |
114 | MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL, | |
115 | MWIFIEX_802_11_PRIV_FILTER_8021X_WEP | |
116 | }; | |
117 | ||
5e6e3a92 | 118 | #define CAL_SNR(RSSI, NF) ((s16)((s16)(RSSI)-(s16)(NF))) |
2dbaf751 | 119 | #define CAL_RSSI(SNR, NF) ((s16)((s16)(SNR)+(s16)(NF))) |
5e6e3a92 | 120 | |
e76268da | 121 | #define UAP_BSS_PARAMS_I 0 |
ede98bfa AP |
122 | #define UAP_CUSTOM_IE_I 1 |
123 | #define MWIFIEX_AUTO_IDX_MASK 0xffff | |
124 | #define MWIFIEX_DELETE_MASK 0x0000 | |
f31acabe AP |
125 | #define MGMT_MASK_ASSOC_REQ 0x01 |
126 | #define MGMT_MASK_REASSOC_REQ 0x04 | |
127 | #define MGMT_MASK_ASSOC_RESP 0x02 | |
128 | #define MGMT_MASK_REASSOC_RESP 0x08 | |
129 | #define MGMT_MASK_PROBE_REQ 0x10 | |
130 | #define MGMT_MASK_PROBE_RESP 0x20 | |
131 | #define MGMT_MASK_BEACON 0x100 | |
e76268da | 132 | |
12190c5d | 133 | #define TLV_TYPE_UAP_SSID 0x0000 |
a3c2c4f6 | 134 | #define TLV_TYPE_UAP_RATES 0x0001 |
8a73dd63 | 135 | #define TLV_TYPE_PWR_CONSTRAINT 0x0020 |
12190c5d | 136 | |
5e6e3a92 BZ |
137 | #define PROPRIETARY_TLV_BASE_ID 0x0100 |
138 | #define TLV_TYPE_KEY_MATERIAL (PROPRIETARY_TLV_BASE_ID + 0) | |
139 | #define TLV_TYPE_CHANLIST (PROPRIETARY_TLV_BASE_ID + 1) | |
140 | #define TLV_TYPE_NUMPROBES (PROPRIETARY_TLV_BASE_ID + 2) | |
fa444bf8 | 141 | #define TLV_TYPE_RSSI_LOW (PROPRIETARY_TLV_BASE_ID + 4) |
5e6e3a92 | 142 | #define TLV_TYPE_PASSTHROUGH (PROPRIETARY_TLV_BASE_ID + 10) |
5e6e3a92 BZ |
143 | #define TLV_TYPE_WMMQSTATUS (PROPRIETARY_TLV_BASE_ID + 16) |
144 | #define TLV_TYPE_WILDCARDSSID (PROPRIETARY_TLV_BASE_ID + 18) | |
145 | #define TLV_TYPE_TSFTIMESTAMP (PROPRIETARY_TLV_BASE_ID + 19) | |
fa444bf8 | 146 | #define TLV_TYPE_RSSI_HIGH (PROPRIETARY_TLV_BASE_ID + 22) |
5e6e3a92 | 147 | #define TLV_TYPE_AUTH_TYPE (PROPRIETARY_TLV_BASE_ID + 31) |
75edd2c6 | 148 | #define TLV_TYPE_STA_MAC_ADDR (PROPRIETARY_TLV_BASE_ID + 32) |
21f58d20 | 149 | #define TLV_TYPE_BSSID (PROPRIETARY_TLV_BASE_ID + 35) |
5e6e3a92 | 150 | #define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42) |
12190c5d AP |
151 | #define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44) |
152 | #define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45) | |
605b73af | 153 | #define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48) |
9b930eae | 154 | #define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51) |
8b4509f6 | 155 | #define TLV_TYPE_UAP_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 57) |
96893538 | 156 | #define TLV_TYPE_UAP_WEP_KEY (PROPRIETARY_TLV_BASE_ID + 59) |
f752dcd5 AP |
157 | #define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60) |
158 | #define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64) | |
159 | #define TLV_TYPE_UAP_AKMP (PROPRIETARY_TLV_BASE_ID + 65) | |
9b930eae | 160 | #define TLV_TYPE_UAP_FRAG_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 70) |
2b06bdbe MY |
161 | #define TLV_TYPE_RATE_DROP_CONTROL (PROPRIETARY_TLV_BASE_ID + 82) |
162 | #define TLV_TYPE_RATE_SCOPE (PROPRIETARY_TLV_BASE_ID + 83) | |
163 | #define TLV_TYPE_POWER_GROUP (PROPRIETARY_TLV_BASE_ID + 84) | |
21f58d20 AK |
164 | #define TLV_TYPE_BSS_SCAN_RSP (PROPRIETARY_TLV_BASE_ID + 86) |
165 | #define TLV_TYPE_BSS_SCAN_INFO (PROPRIETARY_TLV_BASE_ID + 87) | |
0a694d68 | 166 | #define TLV_TYPE_CHANRPT_11H_BASIC (PROPRIETARY_TLV_BASE_ID + 91) |
9b930eae | 167 | #define TLV_TYPE_UAP_RETRY_LIMIT (PROPRIETARY_TLV_BASE_ID + 93) |
5e6e3a92 | 168 | #define TLV_TYPE_WAPI_IE (PROPRIETARY_TLV_BASE_ID + 94) |
46dbe247 | 169 | #define TLV_TYPE_ROBUST_COEX (PROPRIETARY_TLV_BASE_ID + 96) |
e568634a | 170 | #define TLV_TYPE_UAP_MGMT_FRAME (PROPRIETARY_TLV_BASE_ID + 104) |
13d7ba78 | 171 | #define TLV_TYPE_MGMT_IE (PROPRIETARY_TLV_BASE_ID + 105) |
2b06bdbe MY |
172 | #define TLV_TYPE_AUTO_DS_PARAM (PROPRIETARY_TLV_BASE_ID + 113) |
173 | #define TLV_TYPE_PS_PARAM (PROPRIETARY_TLV_BASE_ID + 114) | |
8b4509f6 | 174 | #define TLV_TYPE_UAP_PS_AO_TIMER (PROPRIETARY_TLV_BASE_ID + 123) |
f752dcd5 AP |
175 | #define TLV_TYPE_PWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 145) |
176 | #define TLV_TYPE_GWK_CIPHER (PROPRIETARY_TLV_BASE_ID + 146) | |
4e6ee91b | 177 | #define TLV_TYPE_TX_PAUSE (PROPRIETARY_TLV_BASE_ID + 148) |
562fc5b3 | 178 | #define TLV_TYPE_COALESCE_RULE (PROPRIETARY_TLV_BASE_ID + 154) |
e57f1734 | 179 | #define TLV_TYPE_KEY_PARAM_V2 (PROPRIETARY_TLV_BASE_ID + 156) |
8d6b538a | 180 | #define TLV_TYPE_MULTI_CHAN_INFO (PROPRIETARY_TLV_BASE_ID + 183) |
2b0f997d | 181 | #define TLV_TYPE_MC_GROUP_INFO (PROPRIETARY_TLV_BASE_ID + 184) |
d29caf25 | 182 | #define TLV_TYPE_TDLS_IDLE_TIMEOUT (PROPRIETARY_TLV_BASE_ID + 194) |
cb91be87 AP |
183 | #define TLV_TYPE_SCAN_CHANNEL_GAP (PROPRIETARY_TLV_BASE_ID + 197) |
184 | #define TLV_TYPE_API_REV (PROPRIETARY_TLV_BASE_ID + 199) | |
bf354433 | 185 | #define TLV_TYPE_CHANNEL_STATS (PROPRIETARY_TLV_BASE_ID + 198) |
d219b7eb CC |
186 | #define TLV_BTCOEX_WL_AGGR_WINSIZE (PROPRIETARY_TLV_BASE_ID + 202) |
187 | #define TLV_BTCOEX_WL_SCANTIME (PROPRIETARY_TLV_BASE_ID + 203) | |
40d7412b | 188 | #define TLV_TYPE_BSS_MODE (PROPRIETARY_TLV_BASE_ID + 206) |
5e6e3a92 BZ |
189 | |
190 | #define MWIFIEX_TX_DATA_BUF_SIZE_2K 2048 | |
191 | ||
5e6e3a92 BZ |
192 | #define SSN_MASK 0xfff0 |
193 | ||
194 | #define BA_RESULT_SUCCESS 0x0 | |
5e6e3a92 | 195 | #define BA_RESULT_TIMEOUT 0x2 |
5e6e3a92 BZ |
196 | |
197 | #define IS_BASTREAM_SETUP(ptr) (ptr->ba_status) | |
198 | ||
199 | #define BA_STREAM_NOT_ALLOWED 0xff | |
200 | ||
201 | #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ | |
931f1584 YAP |
202 | priv->adapter->config_bands & BAND_AN) && \ |
203 | priv->curr_bss_params.bss_descriptor.bcn_ht_cap) | |
5e6e3a92 BZ |
204 | #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ |
205 | BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) | |
206 | ||
207 | #define MWIFIEX_TX_DATA_BUF_SIZE_4K 4096 | |
208 | #define MWIFIEX_TX_DATA_BUF_SIZE_8K 8192 | |
5e6e3a92 | 209 | |
5e6e3a92 | 210 | #define ISSUPP_11NENABLED(FwCapInfo) (FwCapInfo & BIT(11)) |
b23bce29 | 211 | #define ISSUPP_TDLS_ENABLED(FwCapInfo) (FwCapInfo & BIT(14)) |
d5b036c4 | 212 | #define ISSUPP_DRCS_ENABLED(FwCapInfo) (FwCapInfo & BIT(15)) |
92263a84 | 213 | #define ISSUPP_SDIO_SPA_ENABLED(FwCapInfo) (FwCapInfo & BIT(16)) |
6d2bd916 | 214 | |
22281256 AP |
215 | #define MWIFIEX_DEF_HT_CAP (IEEE80211_HT_CAP_DSSSCCK40 | \ |
216 | (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT) | \ | |
217 | IEEE80211_HT_CAP_SM_PS) | |
218 | ||
645097ce AK |
219 | #define MWIFIEX_DEF_11N_TX_BF_CAP 0x09E1E008 |
220 | ||
22281256 AP |
221 | #define MWIFIEX_DEF_AMPDU IEEE80211_HT_AMPDU_PARM_FACTOR |
222 | ||
474a41e9 MH |
223 | #define GET_RXSTBC(x) (x & IEEE80211_HT_CAP_RX_STBC) |
224 | #define MWIFIEX_RX_STBC1 0x0100 | |
225 | #define MWIFIEX_RX_STBC12 0x0200 | |
226 | #define MWIFIEX_RX_STBC123 0x0300 | |
227 | ||
6d2bd916 MY |
228 | /* dev_cap bitmap |
229 | * BIT | |
230 | * 0-16 reserved | |
231 | * 17 IEEE80211_HT_CAP_SUP_WIDTH_20_40 | |
232 | * 18-22 reserved | |
233 | * 23 IEEE80211_HT_CAP_SGI_20 | |
234 | * 24 IEEE80211_HT_CAP_SGI_40 | |
235 | * 25 IEEE80211_HT_CAP_TX_STBC | |
236 | * 26 IEEE80211_HT_CAP_RX_STBC | |
237 | * 27-28 reserved | |
238 | * 29 IEEE80211_HT_CAP_GRN_FLD | |
239 | * 30-31 reserved | |
240 | */ | |
5e6e3a92 | 241 | #define ISSUPP_CHANWIDTH40(Dot11nDevCap) (Dot11nDevCap & BIT(17)) |
6d2bd916 MY |
242 | #define ISSUPP_SHORTGI20(Dot11nDevCap) (Dot11nDevCap & BIT(23)) |
243 | #define ISSUPP_SHORTGI40(Dot11nDevCap) (Dot11nDevCap & BIT(24)) | |
244 | #define ISSUPP_TXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(25)) | |
245 | #define ISSUPP_RXSTBC(Dot11nDevCap) (Dot11nDevCap & BIT(26)) | |
246 | #define ISSUPP_GREENFIELD(Dot11nDevCap) (Dot11nDevCap & BIT(29)) | |
dd0d83c2 AP |
247 | #define ISENABLED_40MHZ_INTOLERANT(Dot11nDevCap) (Dot11nDevCap & BIT(8)) |
248 | #define ISSUPP_RXLDPC(Dot11nDevCap) (Dot11nDevCap & BIT(22)) | |
645097ce | 249 | #define ISSUPP_BEAMFORMING(Dot11nDevCap) (Dot11nDevCap & BIT(30)) |
396939f9 | 250 | #define ISALLOWED_CHANWIDTH40(ht_param) (ht_param & BIT(2)) |
4f3dfdfb | 251 | #define GETSUPP_TXBASTREAMS(Dot11nDevCap) ((Dot11nDevCap >> 18) & 0xF) |
6d2bd916 | 252 | |
cd27bc3c AK |
253 | /* httxcfg bitmap |
254 | * 0 reserved | |
255 | * 1 20/40 Mhz enable(1)/disable(0) | |
256 | * 2-3 reserved | |
257 | * 4 green field enable(1)/disable(0) | |
258 | * 5 short GI in 20 Mhz enable(1)/disable(0) | |
259 | * 6 short GI in 40 Mhz enable(1)/disable(0) | |
260 | * 7-15 reserved | |
261 | */ | |
262 | #define MWIFIEX_FW_DEF_HTTXCFG (BIT(1) | BIT(4) | BIT(5) | BIT(6)) | |
263 | ||
a5333914 AK |
264 | /* 11AC Tx and Rx MCS map for 1x1 mode: |
265 | * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 | |
266 | * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 7 streams | |
267 | */ | |
268 | #define MWIFIEX_11AC_MCS_MAP_1X1 0xfffefffe | |
269 | ||
270 | /* 11AC Tx and Rx MCS map for 2x2 mode: | |
271 | * IEEE80211_VHT_MCS_SUPPORT_0_9 for stream 1 and 2 | |
272 | * IEEE80211_VHT_MCS_NOT_SUPPORTED for remaining 6 streams | |
273 | */ | |
274 | #define MWIFIEX_11AC_MCS_MAP_2X2 0xfffafffa | |
275 | ||
5e6e3a92 | 276 | #define GET_RXMCSSUPP(DevMCSSupported) (DevMCSSupported & 0x0f) |
5e6e3a92 | 277 | #define SETHT_MCS32(x) (x[4] |= 1) |
a5333914 | 278 | #define HT_STREAM_1X1 0x11 |
e3bea1c8 | 279 | #define HT_STREAM_2X2 0x22 |
6d2bd916 | 280 | |
5e6e3a92 BZ |
281 | #define SET_SECONDARYCHAN(RadioType, SECCHAN) (RadioType |= (SECCHAN << 4)) |
282 | ||
283 | #define LLC_SNAP_LEN 8 | |
284 | ||
a5f39056 YAP |
285 | /* HW_SPEC fw_cap_info */ |
286 | ||
f25b1431 | 287 | #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13)) |
a5f39056 | 288 | |
a5f39056 YAP |
289 | #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) |
290 | #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) | |
291 | #define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \ | |
292 | (2 * (nss - 1))) | |
a5f39056 YAP |
293 | #define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16) |
294 | #define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF) | |
295 | ||
79d9a54c AK |
296 | /* Clear SU Beanformer, MU beanformer, MU beanformee and |
297 | * sounding dimensions bits | |
298 | */ | |
299 | #define MWIFIEX_DEF_11AC_CAP_BF_RESET_MASK \ | |
300 | (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | \ | |
301 | IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE | \ | |
302 | IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | \ | |
303 | IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) | |
304 | ||
5e6e3a92 BZ |
305 | #define MOD_CLASS_HR_DSSS 0x03 |
306 | #define MOD_CLASS_OFDM 0x07 | |
307 | #define MOD_CLASS_HT 0x08 | |
308 | #define HT_BW_20 0 | |
309 | #define HT_BW_40 1 | |
310 | ||
b887664d AK |
311 | #define DFS_CHAN_MOVE_TIME 10000 |
312 | ||
5e6e3a92 BZ |
313 | #define HostCmd_CMD_GET_HW_SPEC 0x0003 |
314 | #define HostCmd_CMD_802_11_SCAN 0x0006 | |
315 | #define HostCmd_CMD_802_11_GET_LOG 0x000b | |
316 | #define HostCmd_CMD_MAC_MULTICAST_ADR 0x0010 | |
317 | #define HostCmd_CMD_802_11_EEPROM_ACCESS 0x0059 | |
318 | #define HostCmd_CMD_802_11_ASSOCIATE 0x0012 | |
319 | #define HostCmd_CMD_802_11_SNMP_MIB 0x0016 | |
320 | #define HostCmd_CMD_MAC_REG_ACCESS 0x0019 | |
321 | #define HostCmd_CMD_BBP_REG_ACCESS 0x001a | |
322 | #define HostCmd_CMD_RF_REG_ACCESS 0x001b | |
323 | #define HostCmd_CMD_PMIC_REG_ACCESS 0x00ad | |
caa8984f | 324 | #define HostCmd_CMD_RF_TX_PWR 0x001e |
8a279d5b | 325 | #define HostCmd_CMD_RF_ANTENNA 0x0020 |
5e6e3a92 BZ |
326 | #define HostCmd_CMD_802_11_DEAUTHENTICATE 0x0024 |
327 | #define HostCmd_CMD_MAC_CONTROL 0x0028 | |
328 | #define HostCmd_CMD_802_11_AD_HOC_START 0x002b | |
329 | #define HostCmd_CMD_802_11_AD_HOC_JOIN 0x002c | |
330 | #define HostCmd_CMD_802_11_AD_HOC_STOP 0x0040 | |
331 | #define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D | |
332 | #define HostCmd_CMD_802_11D_DOMAIN_INFO 0x005b | |
333 | #define HostCmd_CMD_802_11_KEY_MATERIAL 0x005e | |
334 | #define HostCmd_CMD_802_11_BG_SCAN_QUERY 0x006c | |
335 | #define HostCmd_CMD_WMM_GET_STATUS 0x0071 | |
fa444bf8 | 336 | #define HostCmd_CMD_802_11_SUBSCRIBE_EVENT 0x0075 |
5e6e3a92 BZ |
337 | #define HostCmd_CMD_802_11_TX_RATE_QUERY 0x007f |
338 | #define HostCmd_CMD_802_11_IBSS_COALESCING_STATUS 0x0083 | |
c2c6c85f | 339 | #define HostCmd_CMD_MEM_ACCESS 0x0086 |
388ec385 | 340 | #define HostCmd_CMD_CFG_DATA 0x008f |
5e6e3a92 | 341 | #define HostCmd_CMD_VERSION_EXT 0x0097 |
7da060c1 | 342 | #define HostCmd_CMD_MEF_CFG 0x009a |
5e6e3a92 BZ |
343 | #define HostCmd_CMD_RSSI_INFO 0x00a4 |
344 | #define HostCmd_CMD_FUNC_INIT 0x00a9 | |
345 | #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa | |
ed5cfbe6 | 346 | #define HOST_CMD_APCMD_SYS_RESET 0x00af |
40d07030 AP |
347 | #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 |
348 | #define HostCmd_CMD_UAP_BSS_START 0x00b1 | |
349 | #define HostCmd_CMD_UAP_BSS_STOP 0x00b2 | |
b21783e9 | 350 | #define HOST_CMD_APCMD_STA_LIST 0x00b3 |
0f9e9b8b | 351 | #define HostCmd_CMD_UAP_STA_DEAUTH 0x00b5 |
5e6e3a92 BZ |
352 | #define HostCmd_CMD_11N_CFG 0x00cd |
353 | #define HostCmd_CMD_11N_ADDBA_REQ 0x00ce | |
354 | #define HostCmd_CMD_11N_ADDBA_RSP 0x00cf | |
355 | #define HostCmd_CMD_11N_DELBA 0x00d0 | |
356 | #define HostCmd_CMD_RECONFIGURE_TX_BUFF 0x00d9 | |
85afb186 | 357 | #define HostCmd_CMD_CHAN_REPORT_REQUEST 0x00dd |
5e6e3a92 BZ |
358 | #define HostCmd_CMD_AMSDU_AGGR_CTRL 0x00df |
359 | #define HostCmd_CMD_TXPWR_CFG 0x00d1 | |
360 | #define HostCmd_CMD_TX_RATE_CFG 0x00d6 | |
46dbe247 | 361 | #define HostCmd_CMD_ROBUST_COEX 0x00e0 |
5e6e3a92 BZ |
362 | #define HostCmd_CMD_802_11_PS_MODE_ENH 0x00e4 |
363 | #define HostCmd_CMD_802_11_HS_CFG_ENH 0x00e5 | |
e1a2b7a3 | 364 | #define HostCmd_CMD_P2P_MODE_CFG 0x00eb |
5e6e3a92 BZ |
365 | #define HostCmd_CMD_CAU_REG_ACCESS 0x00ed |
366 | #define HostCmd_CMD_SET_BSS_MODE 0x00f7 | |
d930faee | 367 | #define HostCmd_CMD_PCIE_DESC_DETAILS 0x00fa |
21f58d20 | 368 | #define HostCmd_CMD_802_11_SCAN_EXT 0x0107 |
562fc5b3 | 369 | #define HostCmd_CMD_COALESCE_CFG 0x010a |
3cec6870 | 370 | #define HostCmd_CMD_MGMT_FRAME_REG 0x010c |
7feb4c48 | 371 | #define HostCmd_CMD_REMAIN_ON_CHAN 0x010d |
83c78da9 | 372 | #define HostCmd_CMD_11AC_CFG 0x0112 |
449b8bbf | 373 | #define HostCmd_CMD_TDLS_CONFIG 0x0100 |
d5b036c4 | 374 | #define HostCmd_CMD_MC_POLICY 0x0121 |
429d90d2 | 375 | #define HostCmd_CMD_TDLS_OPER 0x0122 |
92263a84 | 376 | #define HostCmd_CMD_SDIO_SP_RX_AGGR_CFG 0x0223 |
5e6e3a92 | 377 | |
f752dcd5 AP |
378 | #define PROTOCOL_NO_SECURITY 0x01 |
379 | #define PROTOCOL_STATIC_WEP 0x02 | |
380 | #define PROTOCOL_WPA 0x08 | |
381 | #define PROTOCOL_WPA2 0x20 | |
382 | #define PROTOCOL_WPA2_MIXED 0x28 | |
383 | #define PROTOCOL_EAP 0x40 | |
384 | #define KEY_MGMT_NONE 0x04 | |
385 | #define KEY_MGMT_PSK 0x02 | |
386 | #define KEY_MGMT_EAP 0x01 | |
387 | #define CIPHER_TKIP 0x04 | |
388 | #define CIPHER_AES_CCMP 0x08 | |
389 | #define VALID_CIPHER_BITMAP 0x0c | |
390 | ||
5e6e3a92 BZ |
391 | enum ENH_PS_MODES { |
392 | EN_PS = 1, | |
393 | DIS_PS = 2, | |
394 | EN_AUTO_DS = 3, | |
395 | DIS_AUTO_DS = 4, | |
396 | SLEEP_CONFIRM = 5, | |
397 | GET_PS = 0, | |
398 | EN_AUTO_PS = 0xff, | |
399 | DIS_AUTO_PS = 0xfe, | |
400 | }; | |
401 | ||
e1a2b7a3 SP |
402 | enum P2P_MODES { |
403 | P2P_MODE_DISABLE = 0, | |
404 | P2P_MODE_DEVICE = 1, | |
405 | P2P_MODE_GO = 2, | |
406 | P2P_MODE_CLIENT = 3, | |
407 | }; | |
408 | ||
5e6e3a92 BZ |
409 | #define HostCmd_RET_BIT 0x8000 |
410 | #define HostCmd_ACT_GEN_GET 0x0000 | |
411 | #define HostCmd_ACT_GEN_SET 0x0001 | |
7feb4c48 | 412 | #define HostCmd_ACT_GEN_REMOVE 0x0004 |
fa444bf8 AK |
413 | #define HostCmd_ACT_BITWISE_SET 0x0002 |
414 | #define HostCmd_ACT_BITWISE_CLR 0x0003 | |
5e6e3a92 | 415 | #define HostCmd_RESULT_OK 0x0000 |
5e6e3a92 BZ |
416 | |
417 | #define HostCmd_ACT_MAC_RX_ON 0x0001 | |
418 | #define HostCmd_ACT_MAC_TX_ON 0x0002 | |
419 | #define HostCmd_ACT_MAC_WEP_ENABLE 0x0008 | |
420 | #define HostCmd_ACT_MAC_ETHERNETII_ENABLE 0x0010 | |
421 | #define HostCmd_ACT_MAC_PROMISCUOUS_ENABLE 0x0080 | |
422 | #define HostCmd_ACT_MAC_ALL_MULTICAST_ENABLE 0x0100 | |
5e6e3a92 BZ |
423 | #define HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON 0x2000 |
424 | ||
5e6e3a92 BZ |
425 | #define HostCmd_BSS_MODE_IBSS 0x0002 |
426 | #define HostCmd_BSS_MODE_ANY 0x0003 | |
427 | ||
428 | #define HostCmd_SCAN_RADIO_TYPE_BG 0 | |
429 | #define HostCmd_SCAN_RADIO_TYPE_A 1 | |
430 | ||
cc0b5a64 AK |
431 | #define HS_CFG_CANCEL 0xffffffff |
432 | #define HS_CFG_COND_DEF 0x00000000 | |
433 | #define HS_CFG_GPIO_DEF 0xff | |
915f36d2 | 434 | #define HS_CFG_GAP_DEF 0xff |
0d7f53e3 AK |
435 | #define HS_CFG_COND_BROADCAST_DATA 0x00000001 |
436 | #define HS_CFG_COND_UNICAST_DATA 0x00000002 | |
437 | #define HS_CFG_COND_MAC_EVENT 0x00000004 | |
438 | #define HS_CFG_COND_MULTICAST_DATA 0x00000008 | |
5e6e3a92 | 439 | |
12d11109 AP |
440 | #define CONNECT_ERR_AUTH_ERR_STA_FAILURE 0xFFFB |
441 | #define CONNECT_ERR_ASSOC_ERR_TIMEOUT 0xFFFC | |
442 | #define CONNECT_ERR_ASSOC_ERR_AUTH_REFUSED 0xFFFD | |
443 | #define CONNECT_ERR_AUTH_MSG_UNHANDLED 0xFFFE | |
444 | #define CONNECT_ERR_STA_FAILURE 0xFFFF | |
445 | ||
7532c7d0 | 446 | |
5e6e3a92 | 447 | #define CMD_F_HOSTCMD (1 << 0) |
5e6e3a92 BZ |
448 | |
449 | #define HostCmd_CMD_ID_MASK 0x0fff | |
450 | ||
451 | #define HostCmd_SEQ_NUM_MASK 0x00ff | |
452 | ||
453 | #define HostCmd_BSS_NUM_MASK 0x0f00 | |
454 | ||
455 | #define HostCmd_BSS_TYPE_MASK 0xf000 | |
456 | ||
8a279d5b AK |
457 | #define HostCmd_ACT_SET_RX 0x0001 |
458 | #define HostCmd_ACT_SET_TX 0x0002 | |
459 | #define HostCmd_ACT_SET_BOTH 0x0003 | |
460 | ||
461 | #define RF_ANTENNA_AUTO 0xFFFF | |
462 | ||
5e6e3a92 BZ |
463 | #define HostCmd_SET_SEQ_NO_BSS_INFO(seq, num, type) { \ |
464 | (((seq) & 0x00ff) | \ | |
465 | (((num) & 0x000f) << 8)) | \ | |
466 | (((type) & 0x000f) << 12); } | |
467 | ||
468 | #define HostCmd_GET_SEQ_NO(seq) \ | |
469 | ((seq) & HostCmd_SEQ_NUM_MASK) | |
470 | ||
471 | #define HostCmd_GET_BSS_NO(seq) \ | |
472 | (((seq) & HostCmd_BSS_NUM_MASK) >> 8) | |
473 | ||
474 | #define HostCmd_GET_BSS_TYPE(seq) \ | |
475 | (((seq) & HostCmd_BSS_TYPE_MASK) >> 12) | |
476 | ||
477 | #define EVENT_DUMMY_HOST_WAKEUP_SIGNAL 0x00000001 | |
478 | #define EVENT_LINK_LOST 0x00000003 | |
479 | #define EVENT_LINK_SENSED 0x00000004 | |
480 | #define EVENT_MIB_CHANGED 0x00000006 | |
481 | #define EVENT_INIT_DONE 0x00000007 | |
482 | #define EVENT_DEAUTHENTICATED 0x00000008 | |
483 | #define EVENT_DISASSOCIATED 0x00000009 | |
484 | #define EVENT_PS_AWAKE 0x0000000a | |
485 | #define EVENT_PS_SLEEP 0x0000000b | |
486 | #define EVENT_MIC_ERR_MULTICAST 0x0000000d | |
487 | #define EVENT_MIC_ERR_UNICAST 0x0000000e | |
488 | #define EVENT_DEEP_SLEEP_AWAKE 0x00000010 | |
489 | #define EVENT_ADHOC_BCN_LOST 0x00000011 | |
490 | ||
491 | #define EVENT_WMM_STATUS_CHANGE 0x00000017 | |
492 | #define EVENT_BG_SCAN_REPORT 0x00000018 | |
493 | #define EVENT_RSSI_LOW 0x00000019 | |
494 | #define EVENT_SNR_LOW 0x0000001a | |
495 | #define EVENT_MAX_FAIL 0x0000001b | |
496 | #define EVENT_RSSI_HIGH 0x0000001c | |
497 | #define EVENT_SNR_HIGH 0x0000001d | |
498 | #define EVENT_IBSS_COALESCED 0x0000001e | |
499 | #define EVENT_DATA_RSSI_LOW 0x00000024 | |
500 | #define EVENT_DATA_SNR_LOW 0x00000025 | |
501 | #define EVENT_DATA_RSSI_HIGH 0x00000026 | |
502 | #define EVENT_DATA_SNR_HIGH 0x00000027 | |
503 | #define EVENT_LINK_QUALITY 0x00000028 | |
504 | #define EVENT_PORT_RELEASE 0x0000002b | |
e568634a AP |
505 | #define EVENT_UAP_STA_DEAUTH 0x0000002c |
506 | #define EVENT_UAP_STA_ASSOC 0x0000002d | |
507 | #define EVENT_UAP_BSS_START 0x0000002e | |
5e6e3a92 BZ |
508 | #define EVENT_PRE_BEACON_LOST 0x00000031 |
509 | #define EVENT_ADDBA 0x00000033 | |
510 | #define EVENT_DELBA 0x00000034 | |
511 | #define EVENT_BA_STREAM_TIEMOUT 0x00000037 | |
512 | #define EVENT_AMSDU_AGGR_CTRL 0x00000042 | |
e568634a AP |
513 | #define EVENT_UAP_BSS_IDLE 0x00000043 |
514 | #define EVENT_UAP_BSS_ACTIVE 0x00000044 | |
5e6e3a92 BZ |
515 | #define EVENT_WEP_ICV_ERR 0x00000046 |
516 | #define EVENT_HS_ACT_REQ 0x00000047 | |
517 | #define EVENT_BW_CHANGE 0x00000048 | |
e568634a | 518 | #define EVENT_UAP_MIC_COUNTERMEASURES 0x0000004c |
5e6e3a92 | 519 | #define EVENT_HOSTWAKE_STAIE 0x0000004d |
2a7305c8 | 520 | #define EVENT_CHANNEL_SWITCH_ANN 0x00000050 |
79ff4346 | 521 | #define EVENT_TDLS_GENERIC_EVENT 0x00000052 |
3b57c1a7 | 522 | #define EVENT_RADAR_DETECTED 0x00000053 |
0a694d68 | 523 | #define EVENT_CHANNEL_REPORT_RDY 0x00000054 |
4e6ee91b | 524 | #define EVENT_TX_DATA_PAUSE 0x00000055 |
21f58d20 | 525 | #define EVENT_EXT_SCAN_REPORT 0x00000058 |
eab1c76b | 526 | #define EVENT_REMAIN_ON_CHAN_EXPIRED 0x0000005f |
8d6b538a | 527 | #define EVENT_MULTI_CHAN_INFO 0x0000006a |
808bbebc | 528 | #define EVENT_TX_STATUS_REPORT 0x00000074 |
d219b7eb | 529 | #define EVENT_BT_COEX_WLAN_PARA_CHANGE 0X00000076 |
5e6e3a92 BZ |
530 | |
531 | #define EVENT_ID_MASK 0xffff | |
532 | #define BSS_NUM_MASK 0xf | |
533 | ||
534 | #define EVENT_GET_BSS_NUM(event_cause) \ | |
535 | (((event_cause) >> 16) & BSS_NUM_MASK) | |
536 | ||
537 | #define EVENT_GET_BSS_TYPE(event_cause) \ | |
538 | (((event_cause) >> 24) & 0x00ff) | |
539 | ||
7da060c1 | 540 | #define MWIFIEX_MAX_PATTERN_LEN 20 |
afd84de4 | 541 | #define MWIFIEX_MAX_OFFSET_LEN 100 |
7da060c1 AK |
542 | #define STACK_NBYTES 100 |
543 | #define TYPE_DNUM 1 | |
544 | #define TYPE_BYTESEQ 2 | |
545 | #define MAX_OPERAND 0x40 | |
546 | #define TYPE_EQ (MAX_OPERAND+1) | |
547 | #define TYPE_EQ_DNUM (MAX_OPERAND+2) | |
548 | #define TYPE_EQ_BIT (MAX_OPERAND+3) | |
549 | #define TYPE_AND (MAX_OPERAND+4) | |
550 | #define TYPE_OR (MAX_OPERAND+5) | |
551 | #define MEF_MODE_HOST_SLEEP 1 | |
552 | #define MEF_ACTION_ALLOW_AND_WAKEUP_HOST 3 | |
b533be18 | 553 | #define MEF_ACTION_AUTO_ARP 0x10 |
7da060c1 AK |
554 | #define MWIFIEX_CRITERIA_BROADCAST BIT(0) |
555 | #define MWIFIEX_CRITERIA_UNICAST BIT(1) | |
556 | #define MWIFIEX_CRITERIA_MULTICAST BIT(3) | |
b533be18 | 557 | #define MWIFIEX_MAX_SUPPORTED_IPADDR 4 |
7da060c1 | 558 | |
429d90d2 AP |
559 | #define ACT_TDLS_DELETE 0x00 |
560 | #define ACT_TDLS_CREATE 0x01 | |
561 | #define ACT_TDLS_CONFIG 0x02 | |
f7669877 XH |
562 | |
563 | #define TDLS_EVENT_LINK_TEAR_DOWN 3 | |
564 | #define TDLS_EVENT_CHAN_SWITCH_RESULT 7 | |
565 | #define TDLS_EVENT_START_CHAN_SWITCH 8 | |
566 | #define TDLS_EVENT_CHAN_SWITCH_STOPPED 9 | |
567 | ||
568 | #define TDLS_BASE_CHANNEL 0 | |
569 | #define TDLS_OFF_CHANNEL 1 | |
429d90d2 | 570 | |
449b8bbf XH |
571 | #define ACT_TDLS_CS_ENABLE_CONFIG 0x00 |
572 | #define ACT_TDLS_CS_INIT 0x06 | |
573 | #define ACT_TDLS_CS_STOP 0x07 | |
574 | #define ACT_TDLS_CS_PARAMS 0x08 | |
575 | ||
576 | #define MWIFIEX_DEF_CS_UNIT_TIME 2 | |
577 | #define MWIFIEX_DEF_CS_THR_OTHERLINK 10 | |
578 | #define MWIFIEX_DEF_THR_DIRECTLINK 0 | |
579 | #define MWIFIEX_DEF_CS_TIME 10 | |
580 | #define MWIFIEX_DEF_CS_TIMEOUT 16 | |
581 | #define MWIFIEX_DEF_CS_REG_CLASS 12 | |
582 | #define MWIFIEX_DEF_CS_PERIODICITY 1 | |
583 | ||
8e17ea25 AK |
584 | #define MWIFIEX_FW_V15 15 |
585 | ||
cf075eac AP |
586 | #define MWIFIEX_MASTER_RADAR_DET_MASK BIT(1) |
587 | ||
5e6e3a92 BZ |
588 | struct mwifiex_ie_types_header { |
589 | __le16 type; | |
590 | __le16 len; | |
591 | } __packed; | |
592 | ||
593 | struct mwifiex_ie_types_data { | |
594 | struct mwifiex_ie_types_header header; | |
595 | u8 data[1]; | |
596 | } __packed; | |
597 | ||
598 | #define MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET 0x01 | |
599 | #define MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET 0x08 | |
b23bce29 | 600 | #define MWIFIEX_TXPD_FLAGS_TDLS_PACKET 0x10 |
09869495 | 601 | #define MWIFIEX_RXPD_FLAGS_TDLS_PACKET 0x01 |
808bbebc | 602 | #define MWIFIEX_TXPD_FLAGS_REQ_TX_STATUS 0x20 |
5e6e3a92 BZ |
603 | |
604 | struct txpd { | |
605 | u8 bss_type; | |
606 | u8 bss_num; | |
607 | __le16 tx_pkt_length; | |
608 | __le16 tx_pkt_offset; | |
609 | __le16 tx_pkt_type; | |
610 | __le32 tx_control; | |
611 | u8 priority; | |
612 | u8 flags; | |
613 | u8 pkt_delay_2ms; | |
808bbebc AK |
614 | u8 reserved1[2]; |
615 | u8 tx_token_id; | |
616 | u8 reserved[2]; | |
5e6e3a92 BZ |
617 | } __packed; |
618 | ||
619 | struct rxpd { | |
620 | u8 bss_type; | |
621 | u8 bss_num; | |
ed1ea6f4 AK |
622 | __le16 rx_pkt_length; |
623 | __le16 rx_pkt_offset; | |
624 | __le16 rx_pkt_type; | |
625 | __le16 seq_num; | |
5e6e3a92 BZ |
626 | u8 priority; |
627 | u8 rx_rate; | |
628 | s8 snr; | |
629 | s8 nf; | |
a5f39056 YAP |
630 | |
631 | /* For: Non-802.11 AC cards | |
632 | * | |
633 | * Ht Info [Bit 0] RxRate format: LG=0, HT=1 | |
5e6e3a92 | 634 | * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 |
a5f39056 YAP |
635 | * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 |
636 | * | |
637 | * For: 802.11 AC cards | |
638 | * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10 | |
639 | * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01 | |
640 | * BW80 = 10 BW160 = 11 | |
641 | * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1 | |
642 | * [Bit 5] STBC support Enabled = 1 | |
643 | * [Bit 6] LDPC support Enabled = 1 | |
644 | * [Bit 7] Reserved | |
645 | */ | |
5e6e3a92 | 646 | u8 ht_info; |
9d31c1c7 | 647 | u8 reserved[3]; |
09869495 | 648 | u8 flags; |
5e6e3a92 BZ |
649 | } __packed; |
650 | ||
838e4f44 AP |
651 | struct uap_txpd { |
652 | u8 bss_type; | |
653 | u8 bss_num; | |
654 | __le16 tx_pkt_length; | |
655 | __le16 tx_pkt_offset; | |
656 | __le16 tx_pkt_type; | |
657 | __le32 tx_control; | |
658 | u8 priority; | |
659 | u8 flags; | |
660 | u8 pkt_delay_2ms; | |
808bbebc AK |
661 | u8 reserved1[2]; |
662 | u8 tx_token_id; | |
663 | u8 reserved[2]; | |
838e4f44 AP |
664 | }; |
665 | ||
666 | struct uap_rxpd { | |
667 | u8 bss_type; | |
668 | u8 bss_num; | |
669 | __le16 rx_pkt_length; | |
670 | __le16 rx_pkt_offset; | |
671 | __le16 rx_pkt_type; | |
672 | __le16 seq_num; | |
673 | u8 priority; | |
442f6f9b XH |
674 | u8 rx_rate; |
675 | s8 snr; | |
676 | s8 nf; | |
677 | u8 ht_info; | |
678 | u8 reserved[3]; | |
679 | u8 flags; | |
838e4f44 AP |
680 | }; |
681 | ||
bf354433 AP |
682 | struct mwifiex_fw_chan_stats { |
683 | u8 chan_num; | |
684 | u8 bandcfg; | |
685 | u8 flags; | |
686 | s8 noise; | |
687 | __le16 total_bss; | |
688 | __le16 cca_scan_dur; | |
689 | __le16 cca_busy_dur; | |
690 | } __packed; | |
691 | ||
5e6e3a92 BZ |
692 | enum mwifiex_chan_scan_mode_bitmasks { |
693 | MWIFIEX_PASSIVE_SCAN = BIT(0), | |
694 | MWIFIEX_DISABLE_CHAN_FILT = BIT(1), | |
2375fa2b | 695 | MWIFIEX_HIDDEN_SSID_REPORT = BIT(4), |
5e6e3a92 BZ |
696 | }; |
697 | ||
5e6e3a92 BZ |
698 | struct mwifiex_chan_scan_param_set { |
699 | u8 radio_type; | |
700 | u8 chan_number; | |
701 | u8 chan_scan_mode_bitmap; | |
702 | __le16 min_scan_time; | |
703 | __le16 max_scan_time; | |
704 | } __packed; | |
705 | ||
706 | struct mwifiex_ie_types_chan_list_param_set { | |
707 | struct mwifiex_ie_types_header header; | |
708 | struct mwifiex_chan_scan_param_set chan_scan_param[1]; | |
709 | } __packed; | |
710 | ||
711 | struct chan_band_param_set { | |
712 | u8 radio_type; | |
713 | u8 chan_number; | |
714 | }; | |
715 | ||
716 | struct mwifiex_ie_types_chan_band_list_param_set { | |
717 | struct mwifiex_ie_types_header header; | |
718 | struct chan_band_param_set chan_band_param[1]; | |
719 | } __packed; | |
720 | ||
721 | struct mwifiex_ie_types_rates_param_set { | |
722 | struct mwifiex_ie_types_header header; | |
723 | u8 rates[1]; | |
724 | } __packed; | |
725 | ||
726 | struct mwifiex_ie_types_ssid_param_set { | |
727 | struct mwifiex_ie_types_header header; | |
728 | u8 ssid[1]; | |
729 | } __packed; | |
730 | ||
731 | struct mwifiex_ie_types_num_probes { | |
732 | struct mwifiex_ie_types_header header; | |
733 | __le16 num_probes; | |
734 | } __packed; | |
735 | ||
cb91be87 AP |
736 | struct mwifiex_ie_types_scan_chan_gap { |
737 | struct mwifiex_ie_types_header header; | |
738 | /* time gap in TUs to be used between two consecutive channels scan */ | |
739 | __le16 chan_gap; | |
740 | } __packed; | |
741 | ||
bf354433 AP |
742 | struct mwifiex_ietypes_chanstats { |
743 | struct mwifiex_ie_types_header header; | |
744 | struct mwifiex_fw_chan_stats chanstats[0]; | |
745 | } __packed; | |
746 | ||
5e6e3a92 BZ |
747 | struct mwifiex_ie_types_wildcard_ssid_params { |
748 | struct mwifiex_ie_types_header header; | |
749 | u8 max_ssid_length; | |
750 | u8 ssid[1]; | |
751 | } __packed; | |
752 | ||
753 | #define TSF_DATA_SIZE 8 | |
754 | struct mwifiex_ie_types_tsf_timestamp { | |
755 | struct mwifiex_ie_types_header header; | |
756 | u8 tsf_data[1]; | |
757 | } __packed; | |
758 | ||
759 | struct mwifiex_cf_param_set { | |
760 | u8 cfp_cnt; | |
761 | u8 cfp_period; | |
4348d085 UR |
762 | __le16 cfp_max_duration; |
763 | __le16 cfp_duration_remaining; | |
5e6e3a92 BZ |
764 | } __packed; |
765 | ||
766 | struct mwifiex_ibss_param_set { | |
4348d085 | 767 | __le16 atim_window; |
5e6e3a92 BZ |
768 | } __packed; |
769 | ||
770 | struct mwifiex_ie_types_ss_param_set { | |
771 | struct mwifiex_ie_types_header header; | |
772 | union { | |
773 | struct mwifiex_cf_param_set cf_param_set[1]; | |
774 | struct mwifiex_ibss_param_set ibss_param_set[1]; | |
775 | } cf_ibss; | |
776 | } __packed; | |
777 | ||
778 | struct mwifiex_fh_param_set { | |
4348d085 | 779 | __le16 dwell_time; |
5e6e3a92 BZ |
780 | u8 hop_set; |
781 | u8 hop_pattern; | |
782 | u8 hop_index; | |
783 | } __packed; | |
784 | ||
785 | struct mwifiex_ds_param_set { | |
786 | u8 current_chan; | |
787 | } __packed; | |
788 | ||
789 | struct mwifiex_ie_types_phy_param_set { | |
790 | struct mwifiex_ie_types_header header; | |
791 | union { | |
792 | struct mwifiex_fh_param_set fh_param_set[1]; | |
793 | struct mwifiex_ds_param_set ds_param_set[1]; | |
794 | } fh_ds; | |
795 | } __packed; | |
796 | ||
797 | struct mwifiex_ie_types_auth_type { | |
798 | struct mwifiex_ie_types_header header; | |
799 | __le16 auth_type; | |
800 | } __packed; | |
801 | ||
802 | struct mwifiex_ie_types_vendor_param_set { | |
803 | struct mwifiex_ie_types_header header; | |
804 | u8 ie[MWIFIEX_MAX_VSIE_LEN]; | |
805 | }; | |
806 | ||
30fa51c8 | 807 | #define MWIFIEX_TDLS_IDLE_TIMEOUT_IN_SEC 60 |
d29caf25 AP |
808 | |
809 | struct mwifiex_ie_types_tdls_idle_timeout { | |
810 | struct mwifiex_ie_types_header header; | |
811 | __le16 value; | |
812 | } __packed; | |
813 | ||
5e6e3a92 BZ |
814 | struct mwifiex_ie_types_rsn_param_set { |
815 | struct mwifiex_ie_types_header header; | |
816 | u8 rsn_ie[1]; | |
817 | } __packed; | |
818 | ||
819 | #define KEYPARAMSET_FIXED_LEN 6 | |
820 | ||
821 | struct mwifiex_ie_type_key_param_set { | |
822 | __le16 type; | |
823 | __le16 length; | |
824 | __le16 key_type_id; | |
825 | __le16 key_info; | |
826 | __le16 key_len; | |
827 | u8 key[50]; | |
828 | } __packed; | |
b877f4cf YL |
829 | |
830 | #define IGTK_PN_LEN 8 | |
831 | ||
832 | struct mwifiex_cmac_param { | |
833 | u8 ipn[IGTK_PN_LEN]; | |
834 | u8 key[WLAN_KEY_LEN_AES_CMAC]; | |
835 | } __packed; | |
5e6e3a92 | 836 | |
e57f1734 AP |
837 | struct mwifiex_wep_param { |
838 | __le16 key_len; | |
839 | u8 key[WLAN_KEY_LEN_WEP104]; | |
840 | } __packed; | |
841 | ||
842 | struct mwifiex_tkip_param { | |
843 | u8 pn[WPA_PN_SIZE]; | |
844 | __le16 key_len; | |
845 | u8 key[WLAN_KEY_LEN_TKIP]; | |
846 | } __packed; | |
847 | ||
848 | struct mwifiex_aes_param { | |
849 | u8 pn[WPA_PN_SIZE]; | |
850 | __le16 key_len; | |
851 | u8 key[WLAN_KEY_LEN_CCMP]; | |
852 | } __packed; | |
853 | ||
854 | struct mwifiex_wapi_param { | |
855 | u8 pn[PN_LEN]; | |
856 | __le16 key_len; | |
857 | u8 key[WLAN_KEY_LEN_SMS4]; | |
858 | } __packed; | |
859 | ||
860 | struct mwifiex_cmac_aes_param { | |
861 | u8 ipn[IGTK_PN_LEN]; | |
862 | __le16 key_len; | |
863 | u8 key[WLAN_KEY_LEN_AES_CMAC]; | |
864 | } __packed; | |
865 | ||
866 | struct mwifiex_ie_type_key_param_set_v2 { | |
867 | __le16 type; | |
868 | __le16 len; | |
869 | u8 mac_addr[ETH_ALEN]; | |
870 | u8 key_idx; | |
871 | u8 key_type; | |
872 | __le16 key_info; | |
873 | union { | |
874 | struct mwifiex_wep_param wep; | |
875 | struct mwifiex_tkip_param tkip; | |
876 | struct mwifiex_aes_param aes; | |
877 | struct mwifiex_wapi_param wapi; | |
878 | struct mwifiex_cmac_aes_param cmac_aes; | |
879 | } key_params; | |
880 | } __packed; | |
881 | ||
882 | struct host_cmd_ds_802_11_key_material_v2 { | |
883 | __le16 action; | |
884 | struct mwifiex_ie_type_key_param_set_v2 key_param_set; | |
885 | } __packed; | |
886 | ||
5e6e3a92 BZ |
887 | struct host_cmd_ds_802_11_key_material { |
888 | __le16 action; | |
889 | struct mwifiex_ie_type_key_param_set key_param_set; | |
890 | } __packed; | |
891 | ||
892 | struct host_cmd_ds_gen { | |
4348d085 UR |
893 | __le16 command; |
894 | __le16 size; | |
895 | __le16 seq_num; | |
896 | __le16 result; | |
5e6e3a92 BZ |
897 | }; |
898 | ||
899 | #define S_DS_GEN sizeof(struct host_cmd_ds_gen) | |
900 | ||
901 | enum sleep_resp_ctrl { | |
902 | RESP_NOT_NEEDED = 0, | |
903 | RESP_NEEDED, | |
904 | }; | |
905 | ||
906 | struct mwifiex_ps_param { | |
907 | __le16 null_pkt_interval; | |
908 | __le16 multiple_dtims; | |
909 | __le16 bcn_miss_timeout; | |
910 | __le16 local_listen_interval; | |
911 | __le16 adhoc_wake_period; | |
912 | __le16 mode; | |
913 | __le16 delay_to_ps; | |
914 | }; | |
915 | ||
5e6e3a92 BZ |
916 | #define BITMAP_AUTO_DS 0x01 |
917 | #define BITMAP_STA_PS 0x10 | |
5e6e3a92 BZ |
918 | |
919 | struct mwifiex_ie_types_auto_ds_param { | |
920 | struct mwifiex_ie_types_header header; | |
2b06bdbe | 921 | __le16 deep_sleep_timeout; |
5e6e3a92 BZ |
922 | } __packed; |
923 | ||
924 | struct mwifiex_ie_types_ps_param { | |
925 | struct mwifiex_ie_types_header header; | |
926 | struct mwifiex_ps_param param; | |
927 | } __packed; | |
928 | ||
929 | struct host_cmd_ds_802_11_ps_mode_enh { | |
930 | __le16 action; | |
931 | ||
932 | union { | |
933 | struct mwifiex_ps_param opt_ps; | |
5e6e3a92 | 934 | __le16 ps_bitmap; |
5e6e3a92 BZ |
935 | } params; |
936 | } __packed; | |
937 | ||
4b9fede5 | 938 | enum API_VER_ID { |
7f445d04 | 939 | KEY_API_VER_ID = 1, |
89be7ceb | 940 | FW_API_VER_ID = 2, |
7f445d04 AP |
941 | }; |
942 | ||
4b9fede5 | 943 | struct hw_spec_api_rev { |
7f445d04 AP |
944 | struct mwifiex_ie_types_header header; |
945 | __le16 api_id; | |
946 | u8 major_ver; | |
947 | u8 minor_ver; | |
948 | } __packed; | |
949 | ||
5e6e3a92 BZ |
950 | struct host_cmd_ds_get_hw_spec { |
951 | __le16 hw_if_version; | |
952 | __le16 version; | |
953 | __le16 reserved; | |
954 | __le16 num_of_mcast_adr; | |
955 | u8 permanent_addr[ETH_ALEN]; | |
956 | __le16 region_code; | |
957 | __le16 number_of_antenna; | |
958 | __le32 fw_release_number; | |
959 | __le32 reserved_1; | |
960 | __le32 reserved_2; | |
961 | __le32 reserved_3; | |
962 | __le32 fw_cap_info; | |
963 | __le32 dot_11n_dev_cap; | |
964 | u8 dev_mcs_support; | |
965 | __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ | |
a5f39056 YAP |
966 | __le16 mgmt_buf_count; /* mgmt IE buffer count */ |
967 | __le32 reserved_5; | |
968 | __le32 reserved_6; | |
969 | __le32 dot_11ac_dev_cap; | |
970 | __le32 dot_11ac_mcs_support; | |
7f445d04 | 971 | u8 tlvs[0]; |
5e6e3a92 BZ |
972 | } __packed; |
973 | ||
974 | struct host_cmd_ds_802_11_rssi_info { | |
975 | __le16 action; | |
976 | __le16 ndata; | |
977 | __le16 nbcn; | |
978 | __le16 reserved[9]; | |
979 | long long reserved_1; | |
980 | }; | |
981 | ||
982 | struct host_cmd_ds_802_11_rssi_info_rsp { | |
983 | __le16 action; | |
984 | __le16 ndata; | |
985 | __le16 nbcn; | |
986 | __le16 data_rssi_last; | |
987 | __le16 data_nf_last; | |
988 | __le16 data_rssi_avg; | |
989 | __le16 data_nf_avg; | |
990 | __le16 bcn_rssi_last; | |
991 | __le16 bcn_nf_last; | |
992 | __le16 bcn_rssi_avg; | |
993 | __le16 bcn_nf_avg; | |
994 | long long tsf_bcn; | |
995 | }; | |
996 | ||
997 | struct host_cmd_ds_802_11_mac_address { | |
998 | __le16 action; | |
999 | u8 mac_addr[ETH_ALEN]; | |
1000 | }; | |
1001 | ||
1002 | struct host_cmd_ds_mac_control { | |
1003 | __le16 action; | |
1004 | __le16 reserved; | |
1005 | }; | |
1006 | ||
1007 | struct host_cmd_ds_mac_multicast_adr { | |
1008 | __le16 action; | |
1009 | __le16 num_of_adrs; | |
1010 | u8 mac_list[MWIFIEX_MAX_MULTICAST_LIST_SIZE][ETH_ALEN]; | |
1011 | } __packed; | |
1012 | ||
1013 | struct host_cmd_ds_802_11_deauthenticate { | |
1014 | u8 mac_addr[ETH_ALEN]; | |
1015 | __le16 reason_code; | |
1016 | } __packed; | |
1017 | ||
1018 | struct host_cmd_ds_802_11_associate { | |
1019 | u8 peer_sta_addr[ETH_ALEN]; | |
1020 | __le16 cap_info_bitmap; | |
1021 | __le16 listen_interval; | |
1022 | __le16 beacon_period; | |
1023 | u8 dtim_period; | |
1024 | } __packed; | |
1025 | ||
1026 | struct ieee_types_assoc_rsp { | |
1027 | __le16 cap_info_bitmap; | |
1028 | __le16 status_code; | |
1029 | __le16 a_id; | |
1030 | u8 ie_buffer[1]; | |
1031 | } __packed; | |
1032 | ||
1033 | struct host_cmd_ds_802_11_associate_rsp { | |
1034 | struct ieee_types_assoc_rsp assoc_rsp; | |
1035 | } __packed; | |
1036 | ||
1037 | struct ieee_types_cf_param_set { | |
1038 | u8 element_id; | |
1039 | u8 len; | |
1040 | u8 cfp_cnt; | |
1041 | u8 cfp_period; | |
4348d085 UR |
1042 | __le16 cfp_max_duration; |
1043 | __le16 cfp_duration_remaining; | |
5e6e3a92 BZ |
1044 | } __packed; |
1045 | ||
1046 | struct ieee_types_ibss_param_set { | |
1047 | u8 element_id; | |
1048 | u8 len; | |
1049 | __le16 atim_window; | |
1050 | } __packed; | |
1051 | ||
1052 | union ieee_types_ss_param_set { | |
1053 | struct ieee_types_cf_param_set cf_param_set; | |
1054 | struct ieee_types_ibss_param_set ibss_param_set; | |
1055 | } __packed; | |
1056 | ||
1057 | struct ieee_types_fh_param_set { | |
1058 | u8 element_id; | |
1059 | u8 len; | |
1060 | __le16 dwell_time; | |
1061 | u8 hop_set; | |
1062 | u8 hop_pattern; | |
1063 | u8 hop_index; | |
1064 | } __packed; | |
1065 | ||
1066 | struct ieee_types_ds_param_set { | |
1067 | u8 element_id; | |
1068 | u8 len; | |
1069 | u8 current_chan; | |
1070 | } __packed; | |
1071 | ||
1072 | union ieee_types_phy_param_set { | |
1073 | struct ieee_types_fh_param_set fh_param_set; | |
1074 | struct ieee_types_ds_param_set ds_param_set; | |
1075 | } __packed; | |
1076 | ||
a5f39056 YAP |
1077 | struct ieee_types_oper_mode_ntf { |
1078 | u8 element_id; | |
1079 | u8 len; | |
1080 | u8 oper_mode; | |
1081 | } __packed; | |
1082 | ||
5e6e3a92 BZ |
1083 | struct host_cmd_ds_802_11_ad_hoc_start { |
1084 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | |
1085 | u8 bss_mode; | |
1086 | __le16 beacon_period; | |
1087 | u8 dtim_period; | |
1088 | union ieee_types_ss_param_set ss_param_set; | |
1089 | union ieee_types_phy_param_set phy_param_set; | |
1090 | u16 reserved1; | |
1091 | __le16 cap_info_bitmap; | |
63af6333 | 1092 | u8 data_rate[HOSTCMD_SUPPORTED_RATES]; |
5e6e3a92 BZ |
1093 | } __packed; |
1094 | ||
1095 | struct host_cmd_ds_802_11_ad_hoc_result { | |
1096 | u8 pad[3]; | |
1097 | u8 bssid[ETH_ALEN]; | |
1098 | } __packed; | |
1099 | ||
1100 | struct adhoc_bss_desc { | |
1101 | u8 bssid[ETH_ALEN]; | |
1102 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | |
1103 | u8 bss_mode; | |
1104 | __le16 beacon_period; | |
1105 | u8 dtim_period; | |
1106 | u8 time_stamp[8]; | |
1107 | u8 local_time[8]; | |
1108 | union ieee_types_phy_param_set phy_param_set; | |
1109 | union ieee_types_ss_param_set ss_param_set; | |
1110 | __le16 cap_info_bitmap; | |
1111 | u8 data_rates[HOSTCMD_SUPPORTED_RATES]; | |
1112 | ||
1113 | /* | |
1114 | * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. | |
1115 | * It is used in the Adhoc join command and will cause a | |
1116 | * binary layout mismatch with the firmware | |
1117 | */ | |
1118 | } __packed; | |
1119 | ||
1120 | struct host_cmd_ds_802_11_ad_hoc_join { | |
1121 | struct adhoc_bss_desc bss_descriptor; | |
1122 | u16 reserved1; | |
1123 | u16 reserved2; | |
1124 | } __packed; | |
1125 | ||
1126 | struct host_cmd_ds_802_11_get_log { | |
1127 | __le32 mcast_tx_frame; | |
1128 | __le32 failed; | |
1129 | __le32 retry; | |
1130 | __le32 multi_retry; | |
1131 | __le32 frame_dup; | |
1132 | __le32 rts_success; | |
1133 | __le32 rts_failure; | |
1134 | __le32 ack_failure; | |
1135 | __le32 rx_frag; | |
1136 | __le32 mcast_rx_frame; | |
1137 | __le32 fcs_error; | |
1138 | __le32 tx_frame; | |
1139 | __le32 reserved; | |
1140 | __le32 wep_icv_err_cnt[4]; | |
d35b6392 XH |
1141 | __le32 bcn_rcv_cnt; |
1142 | __le32 bcn_miss_cnt; | |
5e6e3a92 BZ |
1143 | }; |
1144 | ||
a5f39056 YAP |
1145 | /* Enumeration for rate format */ |
1146 | enum _mwifiex_rate_format { | |
1147 | MWIFIEX_RATE_FORMAT_LG = 0, | |
1148 | MWIFIEX_RATE_FORMAT_HT, | |
1149 | MWIFIEX_RATE_FORMAT_VHT, | |
1150 | MWIFIEX_RATE_FORMAT_AUTO = 0xFF, | |
1151 | }; | |
1152 | ||
5e6e3a92 BZ |
1153 | struct host_cmd_ds_tx_rate_query { |
1154 | u8 tx_rate; | |
a5f39056 YAP |
1155 | /* Tx Rate Info: For 802.11 AC cards |
1156 | * | |
1157 | * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2 | |
1158 | * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3 | |
1159 | * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1 | |
1160 | * | |
1161 | * For non-802.11 AC cards | |
1162 | * Ht Info [Bit 0] RxRate format: LG=0, HT=1 | |
5e6e3a92 | 1163 | * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 |
a5f39056 YAP |
1164 | * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 |
1165 | */ | |
5e6e3a92 BZ |
1166 | u8 ht_info; |
1167 | } __packed; | |
1168 | ||
4e6ee91b AP |
1169 | struct mwifiex_tx_pause_tlv { |
1170 | struct mwifiex_ie_types_header header; | |
1171 | u8 peermac[ETH_ALEN]; | |
1172 | u8 tx_pause; | |
1173 | u8 pkt_cnt; | |
1174 | } __packed; | |
1175 | ||
5e6e3a92 BZ |
1176 | enum Host_Sleep_Action { |
1177 | HS_CONFIGURE = 0x0001, | |
1178 | HS_ACTIVATE = 0x0002, | |
1179 | }; | |
1180 | ||
1181 | struct mwifiex_hs_config_param { | |
1182 | __le32 conditions; | |
1183 | u8 gpio; | |
1184 | u8 gap; | |
1185 | } __packed; | |
1186 | ||
1187 | struct hs_activate_param { | |
4348d085 | 1188 | __le16 resp_ctrl; |
5e6e3a92 BZ |
1189 | } __packed; |
1190 | ||
1191 | struct host_cmd_ds_802_11_hs_cfg_enh { | |
1192 | __le16 action; | |
1193 | ||
1194 | union { | |
1195 | struct mwifiex_hs_config_param hs_config; | |
1196 | struct hs_activate_param hs_activate; | |
1197 | } params; | |
1198 | } __packed; | |
1199 | ||
1200 | enum SNMP_MIB_INDEX { | |
1201 | OP_RATE_SET_I = 1, | |
1202 | DTIM_PERIOD_I = 3, | |
1203 | RTS_THRESH_I = 5, | |
1204 | SHORT_RETRY_LIM_I = 6, | |
1205 | LONG_RETRY_LIM_I = 7, | |
1206 | FRAG_THRESH_I = 8, | |
1207 | DOT11D_I = 9, | |
2a7305c8 | 1208 | DOT11H_I = 10, |
5e6e3a92 BZ |
1209 | }; |
1210 | ||
12d11109 AP |
1211 | enum mwifiex_assocmd_failurepoint { |
1212 | MWIFIEX_ASSOC_CMD_SUCCESS = 0, | |
1213 | MWIFIEX_ASSOC_CMD_FAILURE_ASSOC, | |
1214 | MWIFIEX_ASSOC_CMD_FAILURE_AUTH, | |
1215 | MWIFIEX_ASSOC_CMD_FAILURE_JOIN | |
1216 | }; | |
1217 | ||
5e6e3a92 BZ |
1218 | #define MAX_SNMP_BUF_SIZE 128 |
1219 | ||
1220 | struct host_cmd_ds_802_11_snmp_mib { | |
1221 | __le16 query_type; | |
1222 | __le16 oid; | |
1223 | __le16 buf_size; | |
1224 | u8 value[1]; | |
1225 | } __packed; | |
1226 | ||
5e6e3a92 BZ |
1227 | struct mwifiex_rate_scope { |
1228 | __le16 type; | |
1229 | __le16 length; | |
1230 | __le16 hr_dsss_rate_bitmap; | |
1231 | __le16 ofdm_rate_bitmap; | |
1232 | __le16 ht_mcs_rate_bitmap[8]; | |
a0b7315a | 1233 | __le16 vht_mcs_rate_bitmap[8]; |
5e6e3a92 BZ |
1234 | } __packed; |
1235 | ||
1236 | struct mwifiex_rate_drop_pattern { | |
1237 | __le16 type; | |
1238 | __le16 length; | |
1239 | __le32 rate_drop_mode; | |
1240 | } __packed; | |
1241 | ||
1242 | struct host_cmd_ds_tx_rate_cfg { | |
1243 | __le16 action; | |
1244 | __le16 cfg_index; | |
1245 | } __packed; | |
1246 | ||
1247 | struct mwifiex_power_group { | |
1248 | u8 modulation_class; | |
1249 | u8 first_rate_code; | |
1250 | u8 last_rate_code; | |
1251 | s8 power_step; | |
1252 | s8 power_min; | |
1253 | s8 power_max; | |
1254 | u8 ht_bandwidth; | |
1255 | u8 reserved; | |
1256 | } __packed; | |
1257 | ||
1258 | struct mwifiex_types_power_group { | |
930fd35c AK |
1259 | __le16 type; |
1260 | __le16 length; | |
5e6e3a92 BZ |
1261 | } __packed; |
1262 | ||
1263 | struct host_cmd_ds_txpwr_cfg { | |
1264 | __le16 action; | |
1265 | __le16 cfg_index; | |
1266 | __le32 mode; | |
1267 | } __packed; | |
1268 | ||
caa8984f AK |
1269 | struct host_cmd_ds_rf_tx_pwr { |
1270 | __le16 action; | |
1271 | __le16 cur_level; | |
1272 | u8 max_power; | |
1273 | u8 min_power; | |
1274 | } __packed; | |
1275 | ||
8a279d5b AK |
1276 | struct host_cmd_ds_rf_ant_mimo { |
1277 | __le16 action_tx; | |
1278 | __le16 tx_ant_mode; | |
1279 | __le16 action_rx; | |
1280 | __le16 rx_ant_mode; | |
1281 | }; | |
1282 | ||
1283 | struct host_cmd_ds_rf_ant_siso { | |
1284 | __le16 action; | |
1285 | __le16 ant_mode; | |
1286 | }; | |
1287 | ||
429d90d2 AP |
1288 | struct host_cmd_ds_tdls_oper { |
1289 | __le16 tdls_action; | |
1290 | __le16 reason; | |
1291 | u8 peer_mac[ETH_ALEN]; | |
1292 | } __packed; | |
1293 | ||
449b8bbf XH |
1294 | struct mwifiex_tdls_config { |
1295 | __le16 enable; | |
1296 | }; | |
1297 | ||
1298 | struct mwifiex_tdls_config_cs_params { | |
1299 | u8 unit_time; | |
1300 | u8 thr_otherlink; | |
1301 | u8 thr_directlink; | |
1302 | }; | |
1303 | ||
1304 | struct mwifiex_tdls_init_cs_params { | |
1305 | u8 peer_mac[ETH_ALEN]; | |
1306 | u8 primary_chan; | |
1307 | u8 second_chan_offset; | |
1308 | u8 band; | |
1309 | __le16 switch_time; | |
1310 | __le16 switch_timeout; | |
1311 | u8 reg_class; | |
1312 | u8 periodicity; | |
1313 | } __packed; | |
1314 | ||
1315 | struct mwifiex_tdls_stop_cs_params { | |
1316 | u8 peer_mac[ETH_ALEN]; | |
1317 | }; | |
1318 | ||
1319 | struct host_cmd_ds_tdls_config { | |
1320 | __le16 tdls_action; | |
1321 | u8 tdls_data[1]; | |
1322 | } __packed; | |
1323 | ||
85afb186 AP |
1324 | struct mwifiex_chan_desc { |
1325 | __le16 start_freq; | |
1326 | u8 chan_width; | |
1327 | u8 chan_num; | |
1328 | } __packed; | |
1329 | ||
1330 | struct host_cmd_ds_chan_rpt_req { | |
1331 | struct mwifiex_chan_desc chan_desc; | |
1332 | __le32 msec_dwell_time; | |
1333 | } __packed; | |
1334 | ||
0a694d68 AP |
1335 | struct host_cmd_ds_chan_rpt_event { |
1336 | __le32 result; | |
1337 | __le64 start_tsf; | |
1338 | __le32 duration; | |
1339 | u8 tlvbuf[0]; | |
1340 | } __packed; | |
1341 | ||
92263a84 ZL |
1342 | struct host_cmd_sdio_sp_rx_aggr_cfg { |
1343 | u8 action; | |
1344 | u8 enable; | |
1345 | __le16 block_size; | |
1346 | } __packed; | |
1347 | ||
b8b3ecec | 1348 | struct mwifiex_fixed_bcn_param { |
b5abcf02 | 1349 | __le64 timestamp; |
7c6fa2a8 AK |
1350 | __le16 beacon_period; |
1351 | __le16 cap_info_bitmap; | |
1352 | } __packed; | |
1353 | ||
21f58d20 AK |
1354 | struct mwifiex_event_scan_result { |
1355 | __le16 event_id; | |
1356 | u8 bss_index; | |
1357 | u8 bss_type; | |
1358 | u8 more_event; | |
1359 | u8 reserved[3]; | |
1360 | __le16 buf_size; | |
1361 | u8 num_of_set; | |
1362 | } __packed; | |
1363 | ||
808bbebc AK |
1364 | struct tx_status_event { |
1365 | u8 packet_type; | |
1366 | u8 tx_token_id; | |
1367 | u8 status; | |
1368 | } __packed; | |
1369 | ||
5e6e3a92 BZ |
1370 | #define MWIFIEX_USER_SCAN_CHAN_MAX 50 |
1371 | ||
1372 | #define MWIFIEX_MAX_SSID_LIST_LENGTH 10 | |
1373 | ||
1374 | struct mwifiex_scan_cmd_config { | |
1375 | /* | |
a8c48565 | 1376 | * BSS mode to be sent in the firmware command |
5e6e3a92 BZ |
1377 | */ |
1378 | u8 bss_mode; | |
1379 | ||
1380 | /* Specific BSSID used to filter scan results in the firmware */ | |
1381 | u8 specific_bssid[ETH_ALEN]; | |
1382 | ||
1383 | /* Length of TLVs sent in command starting at tlvBuffer */ | |
1384 | u32 tlv_buf_len; | |
1385 | ||
1386 | /* | |
1387 | * SSID TLV(s) and ChanList TLVs to be sent in the firmware command | |
1388 | * | |
1389 | * TLV_TYPE_CHANLIST, mwifiex_ie_types_chan_list_param_set | |
1390 | * WLAN_EID_SSID, mwifiex_ie_types_ssid_param_set | |
1391 | */ | |
1392 | u8 tlv_buf[1]; /* SSID TLV(s) and ChanList TLVs are stored | |
1393 | here */ | |
1394 | } __packed; | |
1395 | ||
1396 | struct mwifiex_user_scan_chan { | |
1397 | u8 chan_number; | |
1398 | u8 radio_type; | |
1399 | u8 scan_type; | |
1400 | u8 reserved; | |
1401 | u32 scan_time; | |
1402 | } __packed; | |
1403 | ||
5e6e3a92 | 1404 | struct mwifiex_user_scan_cfg { |
5e6e3a92 BZ |
1405 | /* |
1406 | * BSS mode to be sent in the firmware command | |
5e6e3a92 BZ |
1407 | */ |
1408 | u8 bss_mode; | |
1409 | /* Configure the number of probe requests for active chan scans */ | |
1410 | u8 num_probes; | |
1411 | u8 reserved; | |
1412 | /* BSSID filter sent in the firmware command to limit the results */ | |
1413 | u8 specific_bssid[ETH_ALEN]; | |
be0b281e AK |
1414 | /* SSID filter list used in the firmware to limit the scan results */ |
1415 | struct cfg80211_ssid *ssid_list; | |
1416 | u8 num_ssids; | |
5e6e3a92 BZ |
1417 | /* Variable number (fixed maximum) of channels to scan up */ |
1418 | struct mwifiex_user_scan_chan chan_list[MWIFIEX_USER_SCAN_CHAN_MAX]; | |
cb91be87 | 1419 | u16 scan_chan_gap; |
5e6e3a92 BZ |
1420 | } __packed; |
1421 | ||
1422 | struct ie_body { | |
1423 | u8 grp_key_oui[4]; | |
1424 | u8 ptk_cnt[2]; | |
1425 | u8 ptk_body[4]; | |
1426 | } __packed; | |
1427 | ||
1428 | struct host_cmd_ds_802_11_scan { | |
1429 | u8 bss_mode; | |
1430 | u8 bssid[ETH_ALEN]; | |
1431 | u8 tlv_buffer[1]; | |
1432 | } __packed; | |
1433 | ||
1434 | struct host_cmd_ds_802_11_scan_rsp { | |
1435 | __le16 bss_descript_size; | |
1436 | u8 number_of_sets; | |
1437 | u8 bss_desc_and_tlv_buffer[1]; | |
1438 | } __packed; | |
1439 | ||
21f58d20 AK |
1440 | struct host_cmd_ds_802_11_scan_ext { |
1441 | u32 reserved; | |
1442 | u8 tlv_buffer[1]; | |
1443 | } __packed; | |
1444 | ||
40d7412b AN |
1445 | struct mwifiex_ie_types_bss_mode { |
1446 | struct mwifiex_ie_types_header header; | |
1447 | u8 bss_mode; | |
1448 | } __packed; | |
1449 | ||
21f58d20 AK |
1450 | struct mwifiex_ie_types_bss_scan_rsp { |
1451 | struct mwifiex_ie_types_header header; | |
1452 | u8 bssid[ETH_ALEN]; | |
1453 | u8 frame_body[1]; | |
1454 | } __packed; | |
1455 | ||
1456 | struct mwifiex_ie_types_bss_scan_info { | |
1457 | struct mwifiex_ie_types_header header; | |
1458 | __le16 rssi; | |
1459 | __le16 anpi; | |
1460 | u8 cca_busy_fraction; | |
1461 | u8 radio_type; | |
1462 | u8 channel; | |
1463 | u8 reserved; | |
1464 | __le64 tsf; | |
1465 | } __packed; | |
1466 | ||
5e6e3a92 BZ |
1467 | struct host_cmd_ds_802_11_bg_scan_query { |
1468 | u8 flush; | |
1469 | } __packed; | |
1470 | ||
1471 | struct host_cmd_ds_802_11_bg_scan_query_rsp { | |
4348d085 | 1472 | __le32 report_condition; |
5e6e3a92 BZ |
1473 | struct host_cmd_ds_802_11_scan_rsp scan_resp; |
1474 | } __packed; | |
1475 | ||
1476 | struct mwifiex_ietypes_domain_param_set { | |
1477 | struct mwifiex_ie_types_header header; | |
1478 | u8 country_code[IEEE80211_COUNTRY_STRING_LEN]; | |
1479 | struct ieee80211_country_ie_triplet triplet[1]; | |
1480 | } __packed; | |
1481 | ||
1482 | struct host_cmd_ds_802_11d_domain_info { | |
1483 | __le16 action; | |
1484 | struct mwifiex_ietypes_domain_param_set domain; | |
1485 | } __packed; | |
1486 | ||
1487 | struct host_cmd_ds_802_11d_domain_info_rsp { | |
1488 | __le16 action; | |
1489 | struct mwifiex_ietypes_domain_param_set domain; | |
1490 | } __packed; | |
1491 | ||
1492 | struct host_cmd_ds_11n_addba_req { | |
1493 | u8 add_req_result; | |
1494 | u8 peer_mac_addr[ETH_ALEN]; | |
1495 | u8 dialog_token; | |
1496 | __le16 block_ack_param_set; | |
1497 | __le16 block_ack_tmo; | |
1498 | __le16 ssn; | |
1499 | } __packed; | |
1500 | ||
1501 | struct host_cmd_ds_11n_addba_rsp { | |
1502 | u8 add_rsp_result; | |
1503 | u8 peer_mac_addr[ETH_ALEN]; | |
1504 | u8 dialog_token; | |
1505 | __le16 status_code; | |
1506 | __le16 block_ack_param_set; | |
1507 | __le16 block_ack_tmo; | |
1508 | __le16 ssn; | |
1509 | } __packed; | |
1510 | ||
1511 | struct host_cmd_ds_11n_delba { | |
1512 | u8 del_result; | |
1513 | u8 peer_mac_addr[ETH_ALEN]; | |
1514 | __le16 del_ba_param_set; | |
1515 | __le16 reason_code; | |
1516 | u8 reserved; | |
1517 | } __packed; | |
1518 | ||
1519 | struct host_cmd_ds_11n_batimeout { | |
1520 | u8 tid; | |
1521 | u8 peer_mac_addr[ETH_ALEN]; | |
1522 | u8 origninator; | |
1523 | } __packed; | |
1524 | ||
1525 | struct host_cmd_ds_11n_cfg { | |
1526 | __le16 action; | |
1527 | __le16 ht_tx_cap; | |
1528 | __le16 ht_tx_info; | |
a5f39056 | 1529 | __le16 misc_config; /* Needed for 802.11AC cards only */ |
5e6e3a92 BZ |
1530 | } __packed; |
1531 | ||
1532 | struct host_cmd_ds_txbuf_cfg { | |
1533 | __le16 action; | |
1534 | __le16 buff_size; | |
1535 | __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ | |
1536 | __le16 reserved3; | |
1537 | } __packed; | |
1538 | ||
1539 | struct host_cmd_ds_amsdu_aggr_ctrl { | |
1540 | __le16 action; | |
1541 | __le16 enable; | |
1542 | __le16 curr_buf_size; | |
1543 | } __packed; | |
1544 | ||
0f9e9b8b AP |
1545 | struct host_cmd_ds_sta_deauth { |
1546 | u8 mac[ETH_ALEN]; | |
1547 | __le16 reason; | |
1548 | } __packed; | |
1549 | ||
b21783e9 XH |
1550 | struct mwifiex_ie_types_sta_info { |
1551 | struct mwifiex_ie_types_header header; | |
1552 | u8 mac[ETH_ALEN]; | |
1553 | u8 power_mfg_status; | |
1554 | s8 rssi; | |
1555 | }; | |
1556 | ||
1557 | struct host_cmd_ds_sta_list { | |
1558 | u16 sta_count; | |
1559 | u8 tlv[0]; | |
1560 | } __packed; | |
1561 | ||
2a7305c8 AK |
1562 | struct mwifiex_ie_types_pwr_capability { |
1563 | struct mwifiex_ie_types_header header; | |
1564 | s8 min_pwr; | |
1565 | s8 max_pwr; | |
1566 | }; | |
1567 | ||
1568 | struct mwifiex_ie_types_local_pwr_constraint { | |
1569 | struct mwifiex_ie_types_header header; | |
1570 | u8 chan; | |
1571 | u8 constraint; | |
1572 | }; | |
1573 | ||
5e6e3a92 BZ |
1574 | struct mwifiex_ie_types_wmm_param_set { |
1575 | struct mwifiex_ie_types_header header; | |
1576 | u8 wmm_ie[1]; | |
1577 | }; | |
1578 | ||
1579 | struct mwifiex_ie_types_wmm_queue_status { | |
1580 | struct mwifiex_ie_types_header header; | |
1581 | u8 queue_index; | |
1582 | u8 disabled; | |
4348d085 | 1583 | __le16 medium_time; |
5e6e3a92 BZ |
1584 | u8 flow_required; |
1585 | u8 flow_created; | |
1586 | u32 reserved; | |
1587 | }; | |
1588 | ||
1589 | struct ieee_types_vendor_header { | |
1590 | u8 element_id; | |
1591 | u8 len; | |
2e4c14a5 | 1592 | u8 oui[4]; /* 0~2: oui, 3: oui_type */ |
5e6e3a92 BZ |
1593 | u8 oui_subtype; |
1594 | u8 version; | |
1595 | } __packed; | |
1596 | ||
5e6e3a92 BZ |
1597 | struct ieee_types_wmm_parameter { |
1598 | /* | |
1599 | * WMM Parameter IE - Vendor Specific Header: | |
1600 | * element_id [221/0xdd] | |
1601 | * Len [24] | |
1602 | * Oui [00:50:f2] | |
1603 | * OuiType [2] | |
1604 | * OuiSubType [1] | |
1605 | * Version [1] | |
1606 | */ | |
1607 | struct ieee_types_vendor_header vend_hdr; | |
1608 | u8 qos_info_bitmap; | |
1609 | u8 reserved; | |
99fec5de | 1610 | struct ieee_types_wmm_ac_parameters ac_params[IEEE80211_NUM_ACS]; |
5e6e3a92 BZ |
1611 | } __packed; |
1612 | ||
1613 | struct ieee_types_wmm_info { | |
1614 | ||
1615 | /* | |
1616 | * WMM Info IE - Vendor Specific Header: | |
1617 | * element_id [221/0xdd] | |
1618 | * Len [7] | |
1619 | * Oui [00:50:f2] | |
1620 | * OuiType [2] | |
1621 | * OuiSubType [0] | |
1622 | * Version [1] | |
1623 | */ | |
1624 | struct ieee_types_vendor_header vend_hdr; | |
1625 | ||
1626 | u8 qos_info_bitmap; | |
1627 | } __packed; | |
1628 | ||
1629 | struct host_cmd_ds_wmm_get_status { | |
1630 | u8 queue_status_tlv[sizeof(struct mwifiex_ie_types_wmm_queue_status) * | |
99fec5de | 1631 | IEEE80211_NUM_ACS]; |
5e6e3a92 BZ |
1632 | u8 wmm_param_tlv[sizeof(struct ieee_types_wmm_parameter) + 2]; |
1633 | } __packed; | |
1634 | ||
1635 | struct mwifiex_wmm_ac_status { | |
1636 | u8 disabled; | |
1637 | u8 flow_required; | |
1638 | u8 flow_created; | |
1639 | }; | |
1640 | ||
1641 | struct mwifiex_ie_types_htcap { | |
1642 | struct mwifiex_ie_types_header header; | |
1643 | struct ieee80211_ht_cap ht_cap; | |
1644 | } __packed; | |
1645 | ||
a5f39056 YAP |
1646 | struct mwifiex_ie_types_vhtcap { |
1647 | struct mwifiex_ie_types_header header; | |
1648 | struct ieee80211_vht_cap vht_cap; | |
1649 | } __packed; | |
1650 | ||
5f6d5983 AP |
1651 | struct mwifiex_ie_types_aid { |
1652 | struct mwifiex_ie_types_header header; | |
1653 | __le16 aid; | |
1654 | } __packed; | |
1655 | ||
a5f39056 YAP |
1656 | struct mwifiex_ie_types_oper_mode_ntf { |
1657 | struct mwifiex_ie_types_header header; | |
1658 | u8 oper_mode; | |
1659 | } __packed; | |
1660 | ||
1661 | /* VHT Operations IE */ | |
1662 | struct mwifiex_ie_types_vht_oper { | |
1663 | struct mwifiex_ie_types_header header; | |
1664 | u8 chan_width; | |
1665 | u8 chan_center_freq_1; | |
1666 | u8 chan_center_freq_2; | |
1667 | /* Basic MCS set map, each 2 bits stands for a NSS */ | |
4348d085 | 1668 | __le16 basic_mcs_map; |
a5f39056 YAP |
1669 | } __packed; |
1670 | ||
54428c57 AP |
1671 | struct mwifiex_ie_types_wmmcap { |
1672 | struct mwifiex_ie_types_header header; | |
1673 | struct mwifiex_types_wmm_info wmm_info; | |
1674 | } __packed; | |
1675 | ||
5e6e3a92 BZ |
1676 | struct mwifiex_ie_types_htinfo { |
1677 | struct mwifiex_ie_types_header header; | |
074d46d1 | 1678 | struct ieee80211_ht_operation ht_oper; |
5e6e3a92 BZ |
1679 | } __packed; |
1680 | ||
1681 | struct mwifiex_ie_types_2040bssco { | |
1682 | struct mwifiex_ie_types_header header; | |
1683 | u8 bss_co_2040; | |
1684 | } __packed; | |
1685 | ||
1686 | struct mwifiex_ie_types_extcap { | |
1687 | struct mwifiex_ie_types_header header; | |
68f95b09 | 1688 | u8 ext_capab[0]; |
5e6e3a92 BZ |
1689 | } __packed; |
1690 | ||
c2c6c85f CL |
1691 | struct host_cmd_ds_mem_access { |
1692 | __le16 action; | |
1693 | __le16 reserved; | |
1694 | __le32 addr; | |
1695 | __le32 value; | |
1696 | }; | |
1697 | ||
1f4dfd8a AP |
1698 | struct mwifiex_ie_types_qos_info { |
1699 | struct mwifiex_ie_types_header header; | |
1700 | u8 qos_info; | |
1701 | } __packed; | |
1702 | ||
5e6e3a92 BZ |
1703 | struct host_cmd_ds_mac_reg_access { |
1704 | __le16 action; | |
1705 | __le16 offset; | |
1706 | __le32 value; | |
1707 | } __packed; | |
1708 | ||
1709 | struct host_cmd_ds_bbp_reg_access { | |
1710 | __le16 action; | |
1711 | __le16 offset; | |
1712 | u8 value; | |
1713 | u8 reserved[3]; | |
1714 | } __packed; | |
1715 | ||
1716 | struct host_cmd_ds_rf_reg_access { | |
1717 | __le16 action; | |
1718 | __le16 offset; | |
1719 | u8 value; | |
1720 | u8 reserved[3]; | |
1721 | } __packed; | |
1722 | ||
1723 | struct host_cmd_ds_pmic_reg_access { | |
1724 | __le16 action; | |
1725 | __le16 offset; | |
1726 | u8 value; | |
1727 | u8 reserved[3]; | |
1728 | } __packed; | |
1729 | ||
1730 | struct host_cmd_ds_802_11_eeprom_access { | |
1731 | __le16 action; | |
1732 | ||
1733 | __le16 offset; | |
1734 | __le16 byte_count; | |
1735 | u8 value; | |
1736 | } __packed; | |
1737 | ||
e568634a AP |
1738 | struct mwifiex_assoc_event { |
1739 | u8 sta_addr[ETH_ALEN]; | |
1740 | __le16 type; | |
1741 | __le16 len; | |
1742 | __le16 frame_control; | |
1743 | __le16 cap_info; | |
1744 | __le16 listen_interval; | |
1745 | u8 data[0]; | |
1746 | } __packed; | |
1747 | ||
4db16a18 AP |
1748 | struct host_cmd_ds_sys_config { |
1749 | __le16 action; | |
1750 | u8 tlv[0]; | |
1751 | }; | |
f752dcd5 | 1752 | |
83c78da9 YAP |
1753 | struct host_cmd_11ac_vht_cfg { |
1754 | __le16 action; | |
1755 | u8 band_config; | |
1756 | u8 misc_config; | |
1757 | __le32 cap_info; | |
1758 | __le32 mcs_tx_set; | |
1759 | __le32 mcs_rx_set; | |
1760 | } __packed; | |
1761 | ||
f752dcd5 | 1762 | struct host_cmd_tlv_akmp { |
6b21a69f | 1763 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1764 | __le16 key_mgmt; |
1765 | __le16 key_mgmt_operation; | |
1766 | } __packed; | |
1767 | ||
1768 | struct host_cmd_tlv_pwk_cipher { | |
6b21a69f | 1769 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1770 | __le16 proto; |
1771 | u8 cipher; | |
1772 | u8 reserved; | |
1773 | } __packed; | |
1774 | ||
1775 | struct host_cmd_tlv_gwk_cipher { | |
6b21a69f | 1776 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1777 | u8 cipher; |
1778 | u8 reserved; | |
1779 | } __packed; | |
1780 | ||
1781 | struct host_cmd_tlv_passphrase { | |
6b21a69f | 1782 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1783 | u8 passphrase[0]; |
1784 | } __packed; | |
1785 | ||
96893538 | 1786 | struct host_cmd_tlv_wep_key { |
6b21a69f | 1787 | struct mwifiex_ie_types_header header; |
96893538 AP |
1788 | u8 key_index; |
1789 | u8 is_default; | |
1790 | u8 key[1]; | |
1791 | }; | |
1792 | ||
f752dcd5 | 1793 | struct host_cmd_tlv_auth_type { |
6b21a69f | 1794 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1795 | u8 auth_type; |
1796 | } __packed; | |
1797 | ||
1798 | struct host_cmd_tlv_encrypt_protocol { | |
6b21a69f | 1799 | struct mwifiex_ie_types_header header; |
f752dcd5 AP |
1800 | __le16 proto; |
1801 | } __packed; | |
1802 | ||
12190c5d | 1803 | struct host_cmd_tlv_ssid { |
6b21a69f | 1804 | struct mwifiex_ie_types_header header; |
12190c5d AP |
1805 | u8 ssid[0]; |
1806 | } __packed; | |
1807 | ||
a3c2c4f6 | 1808 | struct host_cmd_tlv_rates { |
6b21a69f | 1809 | struct mwifiex_ie_types_header header; |
a3c2c4f6 AP |
1810 | u8 rates[0]; |
1811 | } __packed; | |
1812 | ||
21f58d20 AK |
1813 | struct mwifiex_ie_types_bssid_list { |
1814 | struct mwifiex_ie_types_header header; | |
1815 | u8 bssid[ETH_ALEN]; | |
1816 | } __packed; | |
1817 | ||
605b73af | 1818 | struct host_cmd_tlv_bcast_ssid { |
6b21a69f | 1819 | struct mwifiex_ie_types_header header; |
605b73af AP |
1820 | u8 bcast_ctl; |
1821 | } __packed; | |
1822 | ||
12190c5d | 1823 | struct host_cmd_tlv_beacon_period { |
6b21a69f | 1824 | struct mwifiex_ie_types_header header; |
12190c5d AP |
1825 | __le16 period; |
1826 | } __packed; | |
1827 | ||
1828 | struct host_cmd_tlv_dtim_period { | |
6b21a69f | 1829 | struct mwifiex_ie_types_header header; |
12190c5d AP |
1830 | u8 period; |
1831 | } __packed; | |
4db16a18 | 1832 | |
9b930eae | 1833 | struct host_cmd_tlv_frag_threshold { |
6b21a69f | 1834 | struct mwifiex_ie_types_header header; |
9b930eae AP |
1835 | __le16 frag_thr; |
1836 | } __packed; | |
1837 | ||
1838 | struct host_cmd_tlv_rts_threshold { | |
6b21a69f | 1839 | struct mwifiex_ie_types_header header; |
9b930eae AP |
1840 | __le16 rts_thr; |
1841 | } __packed; | |
1842 | ||
1843 | struct host_cmd_tlv_retry_limit { | |
6b21a69f | 1844 | struct mwifiex_ie_types_header header; |
9b930eae AP |
1845 | u8 limit; |
1846 | } __packed; | |
1847 | ||
75edd2c6 | 1848 | struct host_cmd_tlv_mac_addr { |
6b21a69f | 1849 | struct mwifiex_ie_types_header header; |
75edd2c6 AP |
1850 | u8 mac_addr[ETH_ALEN]; |
1851 | } __packed; | |
1852 | ||
4db16a18 | 1853 | struct host_cmd_tlv_channel_band { |
6b21a69f | 1854 | struct mwifiex_ie_types_header header; |
4db16a18 AP |
1855 | u8 band_config; |
1856 | u8 channel; | |
1857 | } __packed; | |
1858 | ||
8b4509f6 | 1859 | struct host_cmd_tlv_ageout_timer { |
6b21a69f | 1860 | struct mwifiex_ie_types_header header; |
8b4509f6 KG |
1861 | __le32 sta_ao_timer; |
1862 | } __packed; | |
1863 | ||
8a73dd63 AP |
1864 | struct host_cmd_tlv_power_constraint { |
1865 | struct mwifiex_ie_types_header header; | |
1866 | u8 constraint; | |
1867 | } __packed; | |
1868 | ||
d219b7eb CC |
1869 | struct mwifiex_ie_types_btcoex_scan_time { |
1870 | struct mwifiex_ie_types_header header; | |
1871 | u8 coex_scan; | |
1872 | u8 reserved; | |
1873 | u16 min_scan_time; | |
1874 | u16 max_scan_time; | |
1875 | } __packed; | |
1876 | ||
1877 | struct mwifiex_ie_types_btcoex_aggr_win_size { | |
1878 | struct mwifiex_ie_types_header header; | |
1879 | u8 coex_win_size; | |
1880 | u8 tx_win_size; | |
1881 | u8 rx_win_size; | |
1882 | u8 reserved; | |
1883 | } __packed; | |
1884 | ||
46dbe247 AK |
1885 | struct mwifiex_ie_types_robust_coex { |
1886 | struct mwifiex_ie_types_header header; | |
1887 | __le32 mode; | |
1888 | } __packed; | |
1889 | ||
5e6e3a92 BZ |
1890 | struct host_cmd_ds_version_ext { |
1891 | u8 version_str_sel; | |
1892 | char version_str[128]; | |
1893 | } __packed; | |
1894 | ||
3cec6870 SP |
1895 | struct host_cmd_ds_mgmt_frame_reg { |
1896 | __le16 action; | |
1897 | __le32 mask; | |
1898 | } __packed; | |
1899 | ||
e1a2b7a3 SP |
1900 | struct host_cmd_ds_p2p_mode_cfg { |
1901 | __le16 action; | |
1902 | __le16 mode; | |
1903 | } __packed; | |
1904 | ||
7feb4c48 SP |
1905 | struct host_cmd_ds_remain_on_chan { |
1906 | __le16 action; | |
1907 | u8 status; | |
1908 | u8 reserved; | |
1909 | u8 band_cfg; | |
1910 | u8 channel; | |
1911 | __le32 duration; | |
1912 | } __packed; | |
1913 | ||
5e6e3a92 BZ |
1914 | struct host_cmd_ds_802_11_ibss_status { |
1915 | __le16 action; | |
1916 | __le16 enable; | |
1917 | u8 bssid[ETH_ALEN]; | |
1918 | __le16 beacon_interval; | |
1919 | __le16 atim_window; | |
1920 | __le16 use_g_rate_protect; | |
1921 | } __packed; | |
1922 | ||
7da060c1 AK |
1923 | struct mwifiex_fw_mef_entry { |
1924 | u8 mode; | |
1925 | u8 action; | |
1926 | __le16 exprsize; | |
1927 | u8 expr[0]; | |
1928 | } __packed; | |
1929 | ||
1930 | struct host_cmd_ds_mef_cfg { | |
1931 | __le32 criteria; | |
1932 | __le16 num_entries; | |
1933 | struct mwifiex_fw_mef_entry mef_entry[0]; | |
1934 | } __packed; | |
1935 | ||
5e6e3a92 BZ |
1936 | #define CONNECTION_TYPE_INFRA 0 |
1937 | #define CONNECTION_TYPE_ADHOC 1 | |
9197ab9e | 1938 | #define CONNECTION_TYPE_AP 2 |
5e6e3a92 BZ |
1939 | |
1940 | struct host_cmd_ds_set_bss_mode { | |
1941 | u8 con_type; | |
1942 | } __packed; | |
1943 | ||
d930faee AK |
1944 | struct host_cmd_ds_pcie_details { |
1945 | /* TX buffer descriptor ring address */ | |
1946 | u32 txbd_addr_lo; | |
1947 | u32 txbd_addr_hi; | |
1948 | /* TX buffer descriptor ring count */ | |
1949 | u32 txbd_count; | |
1950 | ||
1951 | /* RX buffer descriptor ring address */ | |
1952 | u32 rxbd_addr_lo; | |
1953 | u32 rxbd_addr_hi; | |
1954 | /* RX buffer descriptor ring count */ | |
1955 | u32 rxbd_count; | |
1956 | ||
1957 | /* Event buffer descriptor ring address */ | |
1958 | u32 evtbd_addr_lo; | |
1959 | u32 evtbd_addr_hi; | |
1960 | /* Event buffer descriptor ring count */ | |
1961 | u32 evtbd_count; | |
1962 | ||
1963 | /* Sleep cookie buffer physical address */ | |
1964 | u32 sleep_cookie_addr_lo; | |
1965 | u32 sleep_cookie_addr_hi; | |
1966 | } __packed; | |
1967 | ||
fa444bf8 AK |
1968 | struct mwifiex_ie_types_rssi_threshold { |
1969 | struct mwifiex_ie_types_header header; | |
1970 | u8 abs_value; | |
1971 | u8 evt_freq; | |
1972 | } __packed; | |
1973 | ||
3b57c1a7 AP |
1974 | #define MWIFIEX_DFS_REC_HDR_LEN 8 |
1975 | #define MWIFIEX_DFS_REC_HDR_NUM 10 | |
1976 | #define MWIFIEX_BIN_COUNTER_LEN 7 | |
1977 | ||
1978 | struct mwifiex_radar_det_event { | |
1979 | __le32 detect_count; | |
1980 | u8 reg_domain; /*1=fcc, 2=etsi, 3=mic*/ | |
1981 | u8 det_type; /*0=none, 1=pw(chirp), 2=pri(radar)*/ | |
1982 | __le16 pw_chirp_type; | |
1983 | u8 pw_chirp_idx; | |
1984 | u8 pw_value; | |
1985 | u8 pri_radar_type; | |
1986 | u8 pri_bincnt; | |
1987 | u8 bin_counter[MWIFIEX_BIN_COUNTER_LEN]; | |
1988 | u8 num_dfs_records; | |
1989 | u8 dfs_record_hdr[MWIFIEX_DFS_REC_HDR_NUM][MWIFIEX_DFS_REC_HDR_LEN]; | |
1990 | __le32 passed; | |
1991 | } __packed; | |
1992 | ||
8d6b538a AP |
1993 | struct mwifiex_ie_types_multi_chan_info { |
1994 | struct mwifiex_ie_types_header header; | |
1995 | __le16 status; | |
1996 | u8 tlv_buffer[0]; | |
1997 | } __packed; | |
1998 | ||
2b0f997d ZL |
1999 | struct mwifiex_ie_types_mc_group_info { |
2000 | struct mwifiex_ie_types_header header; | |
2001 | u8 chan_group_id; | |
2002 | u8 chan_buf_weight; | |
2003 | u8 band_config; | |
2004 | u8 chan_num; | |
2005 | u32 chan_time; | |
2006 | u32 reserved; | |
2007 | union { | |
2008 | u8 sdio_func_num; | |
2009 | u8 usb_ep_num; | |
2010 | } hid_num; | |
2011 | u8 intf_num; | |
2012 | u8 bss_type_numlist[0]; | |
2013 | } __packed; | |
2014 | ||
0a694d68 AP |
2015 | struct meas_rpt_map { |
2016 | u8 rssi:3; | |
2017 | u8 unmeasured:1; | |
2018 | u8 radar:1; | |
2019 | u8 unidentified_sig:1; | |
2020 | u8 ofdm_preamble:1; | |
2021 | u8 bss:1; | |
2022 | } __packed; | |
2023 | ||
2024 | struct mwifiex_ie_types_chan_rpt_data { | |
2025 | struct mwifiex_ie_types_header header; | |
2026 | struct meas_rpt_map map; | |
2027 | } __packed; | |
2028 | ||
fa444bf8 AK |
2029 | struct host_cmd_ds_802_11_subsc_evt { |
2030 | __le16 action; | |
2031 | __le16 events; | |
2032 | } __packed; | |
2033 | ||
f7669877 XH |
2034 | struct chan_switch_result { |
2035 | u8 cur_chan; | |
2036 | u8 status; | |
2037 | u8 reason; | |
2038 | } __packed; | |
2039 | ||
79ff4346 AP |
2040 | struct mwifiex_tdls_generic_event { |
2041 | __le16 type; | |
2042 | u8 peer_mac[ETH_ALEN]; | |
2043 | union { | |
f7669877 XH |
2044 | struct chan_switch_result switch_result; |
2045 | u8 cs_stop_reason; | |
79ff4346 AP |
2046 | __le16 reason_code; |
2047 | __le16 reserved; | |
2048 | } u; | |
2049 | } __packed; | |
2050 | ||
ede98bfa AP |
2051 | struct mwifiex_ie { |
2052 | __le16 ie_index; | |
2053 | __le16 mgmt_subtype_mask; | |
2054 | __le16 ie_length; | |
2055 | u8 ie_buffer[IEEE_MAX_IE_SIZE]; | |
2056 | } __packed; | |
2057 | ||
2058 | #define MAX_MGMT_IE_INDEX 16 | |
2059 | struct mwifiex_ie_list { | |
2060 | __le16 type; | |
2061 | __le16 len; | |
2062 | struct mwifiex_ie ie_list[MAX_MGMT_IE_INDEX]; | |
2063 | } __packed; | |
2064 | ||
562fc5b3 AK |
2065 | struct coalesce_filt_field_param { |
2066 | u8 operation; | |
2067 | u8 operand_len; | |
2068 | __le16 offset; | |
2069 | u8 operand_byte_stream[4]; | |
2070 | }; | |
2071 | ||
2072 | struct coalesce_receive_filt_rule { | |
2073 | struct mwifiex_ie_types_header header; | |
2074 | u8 num_of_fields; | |
2075 | u8 pkt_type; | |
2076 | __le16 max_coalescing_delay; | |
2077 | struct coalesce_filt_field_param params[0]; | |
2078 | } __packed; | |
2079 | ||
2080 | struct host_cmd_ds_coalesce_cfg { | |
2081 | __le16 action; | |
2082 | __le16 num_of_rules; | |
2083 | struct coalesce_receive_filt_rule rule[0]; | |
2084 | } __packed; | |
2085 | ||
d5b036c4 AP |
2086 | struct host_cmd_ds_multi_chan_policy { |
2087 | __le16 action; | |
2088 | __le16 policy; | |
2089 | } __packed; | |
2090 | ||
46dbe247 AK |
2091 | struct host_cmd_ds_robust_coex { |
2092 | __le16 action; | |
2093 | __le16 reserved; | |
2094 | } __packed; | |
2095 | ||
5e6e3a92 BZ |
2096 | struct host_cmd_ds_command { |
2097 | __le16 command; | |
2098 | __le16 size; | |
2099 | __le16 seq_num; | |
2100 | __le16 result; | |
2101 | union { | |
2102 | struct host_cmd_ds_get_hw_spec hw_spec; | |
2103 | struct host_cmd_ds_mac_control mac_ctrl; | |
2104 | struct host_cmd_ds_802_11_mac_address mac_addr; | |
2105 | struct host_cmd_ds_mac_multicast_adr mc_addr; | |
2106 | struct host_cmd_ds_802_11_get_log get_log; | |
2107 | struct host_cmd_ds_802_11_rssi_info rssi_info; | |
2108 | struct host_cmd_ds_802_11_rssi_info_rsp rssi_info_rsp; | |
2109 | struct host_cmd_ds_802_11_snmp_mib smib; | |
5e6e3a92 BZ |
2110 | struct host_cmd_ds_tx_rate_query tx_rate; |
2111 | struct host_cmd_ds_tx_rate_cfg tx_rate_cfg; | |
2112 | struct host_cmd_ds_txpwr_cfg txp_cfg; | |
caa8984f | 2113 | struct host_cmd_ds_rf_tx_pwr txp; |
8a279d5b AK |
2114 | struct host_cmd_ds_rf_ant_mimo ant_mimo; |
2115 | struct host_cmd_ds_rf_ant_siso ant_siso; | |
5e6e3a92 BZ |
2116 | struct host_cmd_ds_802_11_ps_mode_enh psmode_enh; |
2117 | struct host_cmd_ds_802_11_hs_cfg_enh opt_hs_cfg; | |
2118 | struct host_cmd_ds_802_11_scan scan; | |
21f58d20 | 2119 | struct host_cmd_ds_802_11_scan_ext ext_scan; |
5e6e3a92 BZ |
2120 | struct host_cmd_ds_802_11_scan_rsp scan_resp; |
2121 | struct host_cmd_ds_802_11_bg_scan_query bg_scan_query; | |
2122 | struct host_cmd_ds_802_11_bg_scan_query_rsp bg_scan_query_resp; | |
2123 | struct host_cmd_ds_802_11_associate associate; | |
2124 | struct host_cmd_ds_802_11_associate_rsp associate_rsp; | |
2125 | struct host_cmd_ds_802_11_deauthenticate deauth; | |
2126 | struct host_cmd_ds_802_11_ad_hoc_start adhoc_start; | |
2127 | struct host_cmd_ds_802_11_ad_hoc_result adhoc_result; | |
2128 | struct host_cmd_ds_802_11_ad_hoc_join adhoc_join; | |
2129 | struct host_cmd_ds_802_11d_domain_info domain_info; | |
2130 | struct host_cmd_ds_802_11d_domain_info_rsp domain_info_resp; | |
2131 | struct host_cmd_ds_11n_addba_req add_ba_req; | |
2132 | struct host_cmd_ds_11n_addba_rsp add_ba_rsp; | |
2133 | struct host_cmd_ds_11n_delba del_ba; | |
2134 | struct host_cmd_ds_txbuf_cfg tx_buf; | |
2135 | struct host_cmd_ds_amsdu_aggr_ctrl amsdu_aggr_ctrl; | |
2136 | struct host_cmd_ds_11n_cfg htcfg; | |
2137 | struct host_cmd_ds_wmm_get_status get_wmm_status; | |
2138 | struct host_cmd_ds_802_11_key_material key_material; | |
e57f1734 | 2139 | struct host_cmd_ds_802_11_key_material_v2 key_material_v2; |
5e6e3a92 | 2140 | struct host_cmd_ds_version_ext verext; |
3cec6870 | 2141 | struct host_cmd_ds_mgmt_frame_reg reg_mask; |
7feb4c48 | 2142 | struct host_cmd_ds_remain_on_chan roc_cfg; |
e1a2b7a3 | 2143 | struct host_cmd_ds_p2p_mode_cfg mode_cfg; |
5e6e3a92 | 2144 | struct host_cmd_ds_802_11_ibss_status ibss_coalescing; |
7da060c1 | 2145 | struct host_cmd_ds_mef_cfg mef_cfg; |
c2c6c85f | 2146 | struct host_cmd_ds_mem_access mem; |
5e6e3a92 BZ |
2147 | struct host_cmd_ds_mac_reg_access mac_reg; |
2148 | struct host_cmd_ds_bbp_reg_access bbp_reg; | |
2149 | struct host_cmd_ds_rf_reg_access rf_reg; | |
2150 | struct host_cmd_ds_pmic_reg_access pmic_reg; | |
2151 | struct host_cmd_ds_set_bss_mode bss_mode; | |
d930faee | 2152 | struct host_cmd_ds_pcie_details pcie_host_spec; |
5e6e3a92 | 2153 | struct host_cmd_ds_802_11_eeprom_access eeprom; |
fa444bf8 | 2154 | struct host_cmd_ds_802_11_subsc_evt subsc_evt; |
4db16a18 | 2155 | struct host_cmd_ds_sys_config uap_sys_config; |
0f9e9b8b | 2156 | struct host_cmd_ds_sta_deauth sta_deauth; |
b21783e9 | 2157 | struct host_cmd_ds_sta_list sta_list; |
83c78da9 | 2158 | struct host_cmd_11ac_vht_cfg vht_cfg; |
562fc5b3 | 2159 | struct host_cmd_ds_coalesce_cfg coalesce_cfg; |
449b8bbf | 2160 | struct host_cmd_ds_tdls_config tdls_config; |
429d90d2 | 2161 | struct host_cmd_ds_tdls_oper tdls_oper; |
85afb186 | 2162 | struct host_cmd_ds_chan_rpt_req chan_rpt_req; |
92263a84 | 2163 | struct host_cmd_sdio_sp_rx_aggr_cfg sdio_rx_aggr_cfg; |
d5b036c4 | 2164 | struct host_cmd_ds_multi_chan_policy mc_policy; |
46dbe247 | 2165 | struct host_cmd_ds_robust_coex coex; |
5e6e3a92 BZ |
2166 | } params; |
2167 | } __packed; | |
2168 | ||
2169 | struct mwifiex_opt_sleep_confirm { | |
2170 | __le16 command; | |
2171 | __le16 size; | |
2172 | __le16 seq_num; | |
2173 | __le16 result; | |
2174 | __le16 action; | |
2b06bdbe | 2175 | __le16 resp_ctrl; |
5e6e3a92 | 2176 | } __packed; |
5e6e3a92 | 2177 | #endif /* !_MWIFIEX_FW_H_ */ |