aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/fw.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/fw.h')
-rw-r--r--drivers/net/wireless/mwifiex/fw.h127
1 files changed, 119 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index ebe2f6a7984c..25acb0682c56 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -49,13 +49,23 @@ struct tx_packet_hdr {
49#define A_SUPPORTED_RATES 9 49#define A_SUPPORTED_RATES 9
50#define HOSTCMD_SUPPORTED_RATES 14 50#define HOSTCMD_SUPPORTED_RATES 14
51#define N_SUPPORTED_RATES 3 51#define N_SUPPORTED_RATES 3
52#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN) 52#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \
53 BAND_AN | BAND_GAC | BAND_AAC)
53 54
54#define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11)) 55#define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
56 BIT(12) | BIT(13))
55#define IS_SUPPORT_MULTI_BANDS(adapter) \ 57#define IS_SUPPORT_MULTI_BANDS(adapter) \
56 (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) 58 (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
59
60/* shift bit 12 and bit 13 in fw_cap_info from the firmware to bit 13 and 14
61 * for 11ac so that bit 11 is for GN, bit 12 for AN, bit 13 for GAC, and bit
62 * bit 14 for AAC, in order to be compatible with the band capability
63 * defined in the driver after right shift of 8 bits.
64 */
57#define GET_FW_DEFAULT_BANDS(adapter) \ 65#define GET_FW_DEFAULT_BANDS(adapter) \
58 ((adapter->fw_cap_info >> 8) & ALL_802_11_BANDS) 66 (((((adapter->fw_cap_info & 0x3000) << 1) | \
67 (adapter->fw_cap_info & ~0xF000)) >> 8) & \
68 ALL_802_11_BANDS)
59 69
60#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff 70#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
61 71
@@ -216,6 +226,47 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
216 226
217#define LLC_SNAP_LEN 8 227#define LLC_SNAP_LEN 8
218 228
229/* HW_SPEC fw_cap_info */
230
231#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & (BIT(13)|BIT(14)))
232
233#define GET_VHTCAP_MAXMPDULEN(vht_cap_info) (vht_cap_info & 0x3)
234#define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3)
235#define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
236#define SET_VHTNSSMCS(mcs_mapset, nss, value) (mcs_mapset |= (value & 0x3) << \
237 (2 * (nss - 1)))
238#define NO_NSS_SUPPORT 0x3
239
240/* HW_SPEC: HTC-VHT supported */
241#define ISSUPP_11ACVHTHTCVHT(Dot11acDevCap) (Dot11acDevCap & BIT(22))
242/* HW_SPEC: VHT TXOP PS support */
243#define ISSUPP_11ACVHTTXOPPS(Dot11acDevCap) (Dot11acDevCap & BIT(21))
244/* HW_SPEC: MU RX beamformee support */
245#define ISSUPP_11ACMURXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(20))
246/* HW_SPEC: MU TX beamformee support */
247#define ISSUPP_11ACMUTXBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(19))
248/* HW_SPEC: SU Beamformee support */
249#define ISSUPP_11ACSUBEAMFORMEE(Dot11acDevCap) (Dot11acDevCap & BIT(10))
250/* HW_SPEC: SU Beamformer support */
251#define ISSUPP_11ACSUBEAMFORMER(Dot11acDevCap) (Dot11acDevCap & BIT(9))
252/* HW_SPEC: Rx STBC support */
253#define ISSUPP_11ACRXSTBC(Dot11acDevCap) (Dot11acDevCap & BIT(8))
254/* HW_SPEC: Tx STBC support */
255#define ISSUPP_11ACTXSTBC(Dot11acDevCap) (Dot11acDevCap & BIT(7))
256/* HW_SPEC: Short GI support for 160MHz BW */
257#define ISSUPP_11ACSGI160(Dot11acDevCap) (Dot11acDevCap & BIT(6))
258/* HW_SPEC: Short GI support for 80MHz BW */
259#define ISSUPP_11ACSGI80(Dot11acDevCap) (Dot11acDevCap & BIT(5))
260/* HW_SPEC: LDPC coding support */
261#define ISSUPP_11ACLDPC(Dot11acDevCap) (Dot11acDevCap & BIT(4))
262/* HW_SPEC: Channel BW 20/40/80/160/80+80 MHz support */
263#define ISSUPP_11ACBW8080(Dot11acDevCap) (Dot11acDevCap & BIT(3))
264/* HW_SPEC: Channel BW 20/40/80/160 MHz support */
265#define ISSUPP_11ACBW160(Dot11acDevCap) (Dot11acDevCap & BIT(2))
266
267#define GET_DEVTXMCSMAP(dev_mcs_map) (dev_mcs_map >> 16)
268#define GET_DEVRXMCSMAP(dev_mcs_map) (dev_mcs_map & 0xFFFF)
269
219#define MOD_CLASS_HR_DSSS 0x03 270#define MOD_CLASS_HR_DSSS 0x03
220#define MOD_CLASS_OFDM 0x07 271#define MOD_CLASS_OFDM 0x07
221#define MOD_CLASS_HT 0x08 272#define MOD_CLASS_HT 0x08
@@ -455,9 +506,22 @@ struct rxpd {
455 u8 rx_rate; 506 u8 rx_rate;
456 s8 snr; 507 s8 snr;
457 s8 nf; 508 s8 nf;
458 /* Ht Info [Bit 0] RxRate format: LG=0, HT=1 509
510 /* For: Non-802.11 AC cards
511 *
512 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
459 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 513 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
460 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */ 514 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
515 *
516 * For: 802.11 AC cards
517 * [Bit 1] [Bit 0] RxRate format: legacy rate = 00 HT = 01 VHT = 10
518 * [Bit 3] [Bit 2] HT/VHT Bandwidth BW20 = 00 BW40 = 01
519 * BW80 = 10 BW160 = 11
520 * [Bit 4] HT/VHT Guard interval LGI = 0 SGI = 1
521 * [Bit 5] STBC support Enabled = 1
522 * [Bit 6] LDPC support Enabled = 1
523 * [Bit 7] Reserved
524 */
461 u8 ht_info; 525 u8 ht_info;
462 u8 reserved; 526 u8 reserved;
463} __packed; 527} __packed;
@@ -680,7 +744,11 @@ struct host_cmd_ds_get_hw_spec {
680 __le32 dot_11n_dev_cap; 744 __le32 dot_11n_dev_cap;
681 u8 dev_mcs_support; 745 u8 dev_mcs_support;
682 __le16 mp_end_port; /* SDIO only, reserved for other interfacces */ 746 __le16 mp_end_port; /* SDIO only, reserved for other interfacces */
683 __le16 reserved_4; 747 __le16 mgmt_buf_count; /* mgmt IE buffer count */
748 __le32 reserved_5;
749 __le32 reserved_6;
750 __le32 dot_11ac_dev_cap;
751 __le32 dot_11ac_mcs_support;
684} __packed; 752} __packed;
685 753
686struct host_cmd_ds_802_11_rssi_info { 754struct host_cmd_ds_802_11_rssi_info {
@@ -786,6 +854,12 @@ union ieee_types_phy_param_set {
786 struct ieee_types_ds_param_set ds_param_set; 854 struct ieee_types_ds_param_set ds_param_set;
787} __packed; 855} __packed;
788 856
857struct ieee_types_oper_mode_ntf {
858 u8 element_id;
859 u8 len;
860 u8 oper_mode;
861} __packed;
862
789struct host_cmd_ds_802_11_ad_hoc_start { 863struct host_cmd_ds_802_11_ad_hoc_start {
790 u8 ssid[IEEE80211_MAX_SSID_LEN]; 864 u8 ssid[IEEE80211_MAX_SSID_LEN];
791 u8 bss_mode; 865 u8 bss_mode;
@@ -846,11 +920,27 @@ struct host_cmd_ds_802_11_get_log {
846 __le32 wep_icv_err_cnt[4]; 920 __le32 wep_icv_err_cnt[4];
847}; 921};
848 922
923/* Enumeration for rate format */
924enum _mwifiex_rate_format {
925 MWIFIEX_RATE_FORMAT_LG = 0,
926 MWIFIEX_RATE_FORMAT_HT,
927 MWIFIEX_RATE_FORMAT_VHT,
928 MWIFIEX_RATE_FORMAT_AUTO = 0xFF,
929};
930
849struct host_cmd_ds_tx_rate_query { 931struct host_cmd_ds_tx_rate_query {
850 u8 tx_rate; 932 u8 tx_rate;
851 /* Ht Info [Bit 0] RxRate format: LG=0, HT=1 933 /* Tx Rate Info: For 802.11 AC cards
934 *
935 * [Bit 0-1] tx rate formate: LG = 0, HT = 1, VHT = 2
936 * [Bit 2-3] HT/VHT Bandwidth: BW20 = 0, BW40 = 1, BW80 = 2, BW160 = 3
937 * [Bit 4] HT/VHT Guard Interval: LGI = 0, SGI = 1
938 *
939 * For non-802.11 AC cards
940 * Ht Info [Bit 0] RxRate format: LG=0, HT=1
852 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1 941 * [Bit 1] HT Bandwidth: BW20 = 0, BW40 = 1
853 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1 */ 942 * [Bit 2] HT Guard Interval: LGI = 0, SGI = 1
943 */
854 u8 ht_info; 944 u8 ht_info;
855} __packed; 945} __packed;
856 946
@@ -1096,6 +1186,7 @@ struct host_cmd_ds_11n_cfg {
1096 __le16 action; 1186 __le16 action;
1097 __le16 ht_tx_cap; 1187 __le16 ht_tx_cap;
1098 __le16 ht_tx_info; 1188 __le16 ht_tx_info;
1189 __le16 misc_config; /* Needed for 802.11AC cards only */
1099} __packed; 1190} __packed;
1100 1191
1101struct host_cmd_ds_txbuf_cfg { 1192struct host_cmd_ds_txbuf_cfg {
@@ -1183,6 +1274,26 @@ struct mwifiex_ie_types_htcap {
1183 struct ieee80211_ht_cap ht_cap; 1274 struct ieee80211_ht_cap ht_cap;
1184} __packed; 1275} __packed;
1185 1276
1277struct mwifiex_ie_types_vhtcap {
1278 struct mwifiex_ie_types_header header;
1279 struct ieee80211_vht_cap vht_cap;
1280} __packed;
1281
1282struct mwifiex_ie_types_oper_mode_ntf {
1283 struct mwifiex_ie_types_header header;
1284 u8 oper_mode;
1285} __packed;
1286
1287/* VHT Operations IE */
1288struct mwifiex_ie_types_vht_oper {
1289 struct mwifiex_ie_types_header header;
1290 u8 chan_width;
1291 u8 chan_center_freq_1;
1292 u8 chan_center_freq_2;
1293 /* Basic MCS set map, each 2 bits stands for a NSS */
1294 u16 basic_mcs_map;
1295} __packed;
1296
1186struct mwifiex_ie_types_wmmcap { 1297struct mwifiex_ie_types_wmmcap {
1187 struct mwifiex_ie_types_header header; 1298 struct mwifiex_ie_types_header header;
1188 struct mwifiex_types_wmm_info wmm_info; 1299 struct mwifiex_types_wmm_info wmm_info;