mwifiex: remove unsupported code in 11ac
authorBing Zhao <bzhao@marvell.com>
Sat, 8 Feb 2014 00:21:01 +0000 (16:21 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Feb 2014 20:36:11 +0000 (15:36 -0500)
bit12 in fw_cap_info is for testing only.
Remove all related code.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/cfp.c
drivers/net/wireless/mwifiex/fw.h
drivers/net/wireless/mwifiex/ioctl.h
drivers/net/wireless/mwifiex/join.c
drivers/net/wireless/mwifiex/sta_ioctl.c

index 0948ebe8942ee3419c653c48a8bfa5f17f38c8e7..c6606288c61e9807c628626cb6dfa6344e218ff1 100644 (file)
@@ -1416,9 +1416,6 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
 
                if (params->chandef.width > NL80211_CHAN_WIDTH_20_NOHT)
                        config_bands |= BAND_GN;
-
-               if (params->chandef.width > NL80211_CHAN_WIDTH_40)
-                       config_bands |= BAND_GAC;
        } else {
                bss_cfg->band_cfg = BAND_CONFIG_A;
                config_bands = BAND_A;
index dfb068ba2dbd9f83947245e7f11b7f294531f112..2c3226bf86f89302716cd30178d76ba54697d869 100644 (file)
@@ -438,7 +438,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
                        break;
                case BAND_G:
                case BAND_G | BAND_GN:
-               case BAND_G | BAND_GN | BAND_GAC:
                        dev_dbg(adapter->dev, "info: infra band=%d "
                                "supported_rates_g\n", adapter->config_bands);
                        k = mwifiex_copy_rates(rates, k, supported_rates_g,
@@ -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 | 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 | BAND_GAC:
                case BAND_B | BAND_G | BAND_GN:
-               case BAND_B | BAND_G | BAND_GN | BAND_GAC:
                        dev_dbg(adapter->dev, "info: infra band=%d "
                                "supported_rates_bg\n", adapter->config_bands);
                        k = mwifiex_copy_rates(rates, k, supported_rates_bg,
@@ -476,7 +472,6 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
                                               sizeof(supported_rates_a));
                        break;
                case BAND_GN:
-               case BAND_GN | BAND_GAC:
                        dev_dbg(adapter->dev, "info: infra band=%d "
                                "supported_rates_n\n", adapter->config_bands);
                        k = mwifiex_copy_rates(rates, k, supported_rates_n,
index 059bc16adf81b3e8d10948882e574cd2fa0da084..d8014c87d470054ccaf0ab97c0885c55e403d7ed 100644 (file)
@@ -50,21 +50,23 @@ struct tx_packet_hdr {
 #define HOSTCMD_SUPPORTED_RATES         14
 #define N_SUPPORTED_RATES               3
 #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) | \
-                                BIT(12) | BIT(13))
+                                BIT(13))
 #define IS_SUPPORT_MULTI_BANDS(adapter)        \
        (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
- * for 11ac so that bit 11 is for GN, bit 12 for AN, bit 13 for GAC, and bit
- * bit 14 for AAC, in order to be compatible with the band capability
- * defined in the driver after right shift of 8 bits.
+/* bit 13: 11ac BAND_AAC
+ * bit 12: reserved for lab testing, will be reused for BAND_AN
+ * bit 11: 11n  BAND_GN
+ * 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)  \
-           (((((adapter->fw_cap_info & 0x3000) << 1) | \
-              (adapter->fw_cap_info & ~0xF000)) >> 8) & \
+           (((adapter->fw_cap_info & 0x2f00) >> 8) & \
             ALL_802_11_BANDS)
 
 #define HostCmd_WEP_KEY_INDEX_MASK              0x3fff
@@ -226,7 +228,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 
 /* 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_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
index 00a95f4c6a6c1885eabab4652ff4cbe173d2b7ae..48f15906515d7e1ddea3db8fbff62c9f2ddd6740 100644 (file)
@@ -60,8 +60,7 @@ enum {
        BAND_A = 4,
        BAND_GN = 8,
        BAND_AN = 16,
-       BAND_GAC = 32,
-       BAND_AAC = 64,
+       BAND_AAC = 32,
 };
 
 #define MWIFIEX_WPA_PASSHPHRASE_LEN 64
index 4e4686e6ac092b3ce23282c575eadc2b40071eff..d3934c6dbd8a4efa8d827ee07bf040a191583e3d 100644 (file)
@@ -515,8 +515,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv,
 
        if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
            !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);
 
        /* Append vendor specific IE TLV */
@@ -1300,8 +1299,7 @@ int mwifiex_associate(struct mwifiex_private *priv,
 
        if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
            !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);
        else
                mwifiex_set_ba_params(priv);
@@ -1335,8 +1333,7 @@ mwifiex_adhoc_start(struct mwifiex_private *priv,
                priv->curr_bss_params.band);
 
        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);
        else
                mwifiex_set_ba_params(priv);
@@ -1376,8 +1373,7 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv,
 
        if (ISSUPP_11ACENABLED(priv->adapter->fw_cap_info) &&
            !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);
        else
                mwifiex_set_ba_params(priv);
index 0bec94351f3684911cd02469636ea738a7ace774..c3d3ea55d605add5a914bdf3136931ddbbb61b5c 100644 (file)
@@ -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) ==
                                                HostCmd_SCAN_RADIO_TYPE_BG)
-                       config_bands = BAND_B | BAND_G | BAND_GN | BAND_GAC;
+                       config_bands = BAND_B | BAND_G | BAND_GN;
                else
                        config_bands = BAND_A | BAND_AN | BAND_AAC;