aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d30c11337b04..adbc1c804dd3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -721,7 +721,17 @@ static void ieee80211_send_assoc(struct net_device *dev,
721 capab |= WLAN_CAPABILITY_PRIVACY; 721 capab |= WLAN_CAPABILITY_PRIVACY;
722 if (bss->wmm_ie) 722 if (bss->wmm_ie)
723 wmm = 1; 723 wmm = 1;
724
725 /* get all rates supported by the device and the AP as
726 * some APs don't like getting a superset of their rates
727 * in the association request (e.g. D-Link DAP 1353 in
728 * b-only mode) */
729 rates_len = ieee80211_compatible_rates(bss, sband, &rates);
730
724 ieee80211_rx_bss_put(dev, bss); 731 ieee80211_rx_bss_put(dev, bss);
732 } else {
733 rates = ~0;
734 rates_len = sband->n_bitrates;
725 } 735 }
726 736
727 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); 737 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
@@ -752,10 +762,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
752 *pos++ = ifsta->ssid_len; 762 *pos++ = ifsta->ssid_len;
753 memcpy(pos, ifsta->ssid, ifsta->ssid_len); 763 memcpy(pos, ifsta->ssid, ifsta->ssid_len);
754 764
755 /* all supported rates should be added here but some APs 765 /* add all rates which were marked to be used above */
756 * (e.g. D-Link DAP 1353 in b-only mode) don't like that
757 * Therefore only add rates the AP supports */
758 rates_len = ieee80211_compatible_rates(bss, sband, &rates);
759 supp_rates_len = rates_len; 766 supp_rates_len = rates_len;
760 if (supp_rates_len > 8) 767 if (supp_rates_len > 8)
761 supp_rates_len = 8; 768 supp_rates_len = 8;
@@ -3476,21 +3483,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
3476 struct ieee80211_sta_bss *bss, *selected = NULL; 3483 struct ieee80211_sta_bss *bss, *selected = NULL;
3477 int top_rssi = 0, freq; 3484 int top_rssi = 0, freq;
3478 3485
3479 if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
3480 IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) {
3481 ifsta->state = IEEE80211_AUTHENTICATE;
3482 ieee80211_sta_reset_auth(dev, ifsta);
3483 return 0;
3484 }
3485
3486 spin_lock_bh(&local->sta_bss_lock); 3486 spin_lock_bh(&local->sta_bss_lock);
3487 freq = local->oper_channel->center_freq; 3487 freq = local->oper_channel->center_freq;
3488 list_for_each_entry(bss, &local->sta_bss_list, list) { 3488 list_for_each_entry(bss, &local->sta_bss_list, list) {
3489 if (!(bss->capability & WLAN_CAPABILITY_ESS)) 3489 if (!(bss->capability & WLAN_CAPABILITY_ESS))
3490 continue; 3490 continue;
3491 3491
3492 if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ 3492 if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
3493 !!sdata->default_key) 3493 IEEE80211_STA_AUTO_BSSID_SEL |
3494 IEEE80211_STA_AUTO_CHANNEL_SEL)) &&
3495 (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^
3496 !!sdata->default_key))
3494 continue; 3497 continue;
3495 3498
3496 if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && 3499 if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) &&