Commit f25b1431 authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

mwifiex: remove unsupported code in 11ac

bit12 in fw_cap_info is for testing only.
Remove all related code.
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 406d702b
...@@ -1416,9 +1416,6 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, ...@@ -1416,9 +1416,6 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
if (params->chandef.width > NL80211_CHAN_WIDTH_20_NOHT) if (params->chandef.width > NL80211_CHAN_WIDTH_20_NOHT)
config_bands |= BAND_GN; config_bands |= BAND_GN;
if (params->chandef.width > NL80211_CHAN_WIDTH_40)
config_bands |= BAND_GAC;
} else { } else {
bss_cfg->band_cfg = BAND_CONFIG_A; bss_cfg->band_cfg = BAND_CONFIG_A;
config_bands = BAND_A; config_bands = BAND_A;
......
...@@ -438,7 +438,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates) ...@@ -438,7 +438,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
break; break;
case BAND_G: case BAND_G:
case BAND_G | BAND_GN: case BAND_G | BAND_GN:
case BAND_G | BAND_GN | BAND_GAC:
dev_dbg(adapter->dev, "info: infra band=%d " dev_dbg(adapter->dev, "info: infra band=%d "
"supported_rates_g\n", adapter->config_bands); "supported_rates_g\n", adapter->config_bands);
k = mwifiex_copy_rates(rates, k, supported_rates_g, k = mwifiex_copy_rates(rates, k, supported_rates_g,
...@@ -449,10 +448,7 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates) ...@@ -449,10 +448,7 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
case BAND_A | BAND_B: case BAND_A | BAND_B:
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN: case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN:
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC: case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN | BAND_AAC:
case BAND_A | BAND_B | BAND_G | BAND_GN | BAND_AN |
BAND_AAC | BAND_GAC:
case BAND_B | BAND_G | BAND_GN: case BAND_B | BAND_G | BAND_GN:
case BAND_B | BAND_G | BAND_GN | BAND_GAC:
dev_dbg(adapter->dev, "info: infra band=%d " dev_dbg(adapter->dev, "info: infra band=%d "
"supported_rates_bg\n", adapter->config_bands); "supported_rates_bg\n", adapter->config_bands);
k = mwifiex_copy_rates(rates, k, supported_rates_bg, k = mwifiex_copy_rates(rates, k, supported_rates_bg,
...@@ -476,7 +472,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates) ...@@ -476,7 +472,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
sizeof(supported_rates_a)); sizeof(supported_rates_a));
break; break;
case BAND_GN: case BAND_GN:
case BAND_GN | BAND_GAC:
dev_dbg(adapter->dev, "info: infra band=%d " dev_dbg(adapter->dev, "info: infra band=%d "
"supported_rates_n\n", adapter->config_bands); "supported_rates_n\n", adapter->config_bands);
k = mwifiex_copy_rates(rates, k, supported_rates_n, k = mwifiex_copy_rates(rates, k, supported_rates_n,
......
...@@ -50,21 +50,23 @@ struct tx_packet_hdr { ...@@ -50,21 +50,23 @@ struct tx_packet_hdr {
#define HOSTCMD_SUPPORTED_RATES 14 #define HOSTCMD_SUPPORTED_RATES 14
#define N_SUPPORTED_RATES 3 #define N_SUPPORTED_RATES 3
#define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \ #define ALL_802_11_BANDS (BAND_A | BAND_B | BAND_G | BAND_GN | \
BAND_AN | BAND_GAC | BAND_AAC) BAND_AN | BAND_AAC)
#define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \ #define FW_MULTI_BANDS_SUPPORT (BIT(8) | BIT(9) | BIT(10) | BIT(11) | \
BIT(12) | BIT(13)) BIT(13))
#define IS_SUPPORT_MULTI_BANDS(adapter) \ #define IS_SUPPORT_MULTI_BANDS(adapter) \
(adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT) (adapter->fw_cap_info & FW_MULTI_BANDS_SUPPORT)
/* shift bit 12 and bit 13 in fw_cap_info from the firmware to bit 13 and 14 /* bit 13: 11ac BAND_AAC
* for 11ac so that bit 11 is for GN, bit 12 for AN, bit 13 for GAC, and bit * bit 12: reserved for lab testing, will be reused for BAND_AN
* bit 14 for AAC, in order to be compatible with the band capability * bit 11: 11n BAND_GN
* defined in the driver after right shift of 8 bits. * bit 10: 11a BAND_A
* bit 9: 11g BAND_G
* bit 8: 11b BAND_B
* Map these bits to band capability by right shifting 8 bits.
*/ */
#define GET_FW_DEFAULT_BANDS(adapter) \ #define GET_FW_DEFAULT_BANDS(adapter) \
(((((adapter->fw_cap_info & 0x3000) << 1) | \ (((adapter->fw_cap_info & 0x2f00) >> 8) & \
(adapter->fw_cap_info & ~0xF000)) >> 8) & \
ALL_802_11_BANDS) ALL_802_11_BANDS)
#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff #define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
...@@ -226,7 +228,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { ...@@ -226,7 +228,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
/* HW_SPEC fw_cap_info */ /* HW_SPEC fw_cap_info */
#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & (BIT(12)|BIT(13))) #define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & BIT(13))
#define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3) #define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3)
#define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3) #define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
......
...@@ -60,8 +60,7 @@ enum { ...@@ -60,8 +60,7 @@ enum {
BAND_A = 4, BAND_A = 4,
BAND_GN = 8, BAND_GN = 8,
BAND_AN = 16, BAND_AN = 16,
BAND_GAC = 32, BAND_AAC = 32,
BAND_AAC = 64,
}; };
#define MWIFIEX_WPA_PASSHPHRASE_LEN 64 #define MWIFIEX_WPA_PASSHPHRASE_LEN 64
......
...@@ -515,8 +515,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, ...@@ -515,8 +515,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) && if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
!bss_desc->disable_11n && !bss_desc->disable_11ac && !bss_desc->disable_11n && !bss_desc->disable_11ac &&
(priv->adapter->config_bands & BAND_GAC || priv->adapter->config_bands & BAND_AAC)
priv->adapter->config_bands & BAND_AAC))
mwifiex_cmd_append_11ac_tlv(priv, bss_desc, &pos); mwifiex_cmd_append_11ac_tlv(priv, bss_desc, &pos);
/* Append vendor specific IE TLV */ /* Append vendor specific IE TLV */
...@@ -1300,8 +1299,7 @@ int mwifiex_associate(struct mwifiex_private *priv, ...@@ -1300,8 +1299,7 @@ int mwifiex_associate(struct mwifiex_private *priv,
if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) && if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
!bss_desc->disable_11n && !bss_desc->disable_11ac && !bss_desc->disable_11n && !bss_desc->disable_11ac &&
(priv->adapter->config_bands & BAND_GAC || priv->adapter->config_bands & BAND_AAC)
priv->adapter->config_bands & BAND_AAC))
mwifiex_set_11ac_ba_params(priv); mwifiex_set_11ac_ba_params(priv);
else else
mwifiex_set_ba_params(priv); mwifiex_set_ba_params(priv);
...@@ -1335,8 +1333,7 @@ mwifiex_adhoc_start(struct mwifiex_private *priv, ...@@ -1335,8 +1333,7 @@ mwifiex_adhoc_start(struct mwifiex_private *priv,
priv->curr_bss_params.band); priv->curr_bss_params.band);
if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) && if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
(priv->adapter->config_bands & BAND_GAC || priv->adapter->config_bands & BAND_AAC)
priv->adapter->config_bands & BAND_AAC))
mwifiex_set_11ac_ba_params(priv); mwifiex_set_11ac_ba_params(priv);
else else
mwifiex_set_ba_params(priv); mwifiex_set_ba_params(priv);
...@@ -1376,8 +1373,7 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv, ...@@ -1376,8 +1373,7 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv,
if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) && if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
!bss_desc->disable_11n && !bss_desc->disable_11ac && !bss_desc->disable_11n && !bss_desc->disable_11ac &&
(priv->adapter->config_bands & BAND_GAC || priv->adapter->config_bands & BAND_AAC)
priv->adapter->config_bands & BAND_AAC))
mwifiex_set_11ac_ba_params(priv); mwifiex_set_11ac_ba_params(priv);
else else
mwifiex_set_ba_params(priv); mwifiex_set_ba_params(priv);
......
...@@ -290,7 +290,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, ...@@ -290,7 +290,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
if (mwifiex_band_to_radio_type(bss_desc->bss_band) == if (mwifiex_band_to_radio_type(bss_desc->bss_band) ==
HostCmd_SCAN_RADIO_TYPE_BG) HostCmd_SCAN_RADIO_TYPE_BG)
config_bands = BAND_B | BAND_G | BAND_GN | BAND_GAC; config_bands = BAND_B | BAND_G | BAND_GN;
else else
config_bands = BAND_A | BAND_AN | BAND_AAC; config_bands = BAND_A | BAND_AN | BAND_AAC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment