diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index efe525be27dd..cdb11b3964e2 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -1459,7 +1459,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
1459 | struct cfg80211_ssid req_ssid; | 1459 | struct cfg80211_ssid req_ssid; |
1460 | int ret, auth_type = 0; | 1460 | int ret, auth_type = 0; |
1461 | struct cfg80211_bss *bss = NULL; | 1461 | struct cfg80211_bss *bss = NULL; |
1462 | u8 is_scanning_required = 0, config_bands = 0; | 1462 | u8 is_scanning_required = 0; |
1463 | 1463 | ||
1464 | memset(&req_ssid, 0, sizeof(struct cfg80211_ssid)); | 1464 | memset(&req_ssid, 0, sizeof(struct cfg80211_ssid)); |
1465 | 1465 | ||
@@ -1478,19 +1478,6 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
1478 | /* disconnect before try to associate */ | 1478 | /* disconnect before try to associate */ |
1479 | mwifiex_deauthenticate(priv, NULL); | 1479 | mwifiex_deauthenticate(priv, NULL); |
1480 | 1480 | ||
1481 | if (channel) { | ||
1482 | if (mode == NL80211_IFTYPE_STATION) { | ||
1483 | if (channel->band == IEEE80211_BAND_2GHZ) | ||
1484 | config_bands = BAND_B | BAND_G | BAND_GN; | ||
1485 | else | ||
1486 | config_bands = BAND_A | BAND_AN; | ||
1487 | |||
1488 | if (!((config_bands | priv->adapter->fw_bands) & | ||
1489 | ~priv->adapter->fw_bands)) | ||
1490 | priv->adapter->config_bands = config_bands; | ||
1491 | } | ||
1492 | } | ||
1493 | |||
1494 | /* As this is new association, clear locally stored | 1481 | /* As this is new association, clear locally stored |
1495 | * keys and security related flags */ | 1482 | * keys and security related flags */ |
1496 | priv->sec_info.wpa_enabled = false; | 1483 | priv->sec_info.wpa_enabled = false; |
@@ -1707,7 +1694,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, | |||
1707 | 1694 | ||
1708 | if (cfg80211_get_chandef_type(¶ms->chandef) != | 1695 | if (cfg80211_get_chandef_type(¶ms->chandef) != |
1709 | NL80211_CHAN_NO_HT) | 1696 | NL80211_CHAN_NO_HT) |
1710 | config_bands |= BAND_GN; | 1697 | config_bands |= BAND_G | BAND_GN; |
1711 | } else { | 1698 | } else { |
1712 | if (cfg80211_get_chandef_type(¶ms->chandef) == | 1699 | if (cfg80211_get_chandef_type(¶ms->chandef) == |
1713 | NL80211_CHAN_NO_HT) | 1700 | NL80211_CHAN_NO_HT) |