diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-26 02:26:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-26 02:26:10 -0400 |
commit | 43154d08d6bb5c69aa0d0e3448fb348b4cd84e91 (patch) | |
tree | 176edb26aad2d33e8be36530b66b19d0603c4b1d /net/mac80211/mlme.c | |
parent | 03194379a77b02df3404ec4848a50c6784e9a8a5 (diff) | |
parent | 289c79a4bd350e8a25065102563ad1a183d1b402 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/cpmac.c
net/mac80211/mlme.c
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7877d3b3f4cb..3f7f92a2f227 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; |
@@ -3434,21 +3441,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3434 | struct ieee80211_sta_bss *bss, *selected = NULL; | 3441 | struct ieee80211_sta_bss *bss, *selected = NULL; |
3435 | int top_rssi = 0, freq; | 3442 | int top_rssi = 0, freq; |
3436 | 3443 | ||
3437 | if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | | ||
3438 | IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { | ||
3439 | ifsta->state = IEEE80211_AUTHENTICATE; | ||
3440 | ieee80211_sta_reset_auth(dev, ifsta); | ||
3441 | return 0; | ||
3442 | } | ||
3443 | |||
3444 | spin_lock_bh(&local->sta_bss_lock); | 3444 | spin_lock_bh(&local->sta_bss_lock); |
3445 | freq = local->oper_channel->center_freq; | 3445 | freq = local->oper_channel->center_freq; |
3446 | list_for_each_entry(bss, &local->sta_bss_list, list) { | 3446 | list_for_each_entry(bss, &local->sta_bss_list, list) { |
3447 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) | 3447 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) |
3448 | continue; | 3448 | continue; |
3449 | 3449 | ||
3450 | if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | 3450 | if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | |
3451 | !!sdata->default_key) | 3451 | IEEE80211_STA_AUTO_BSSID_SEL | |
3452 | IEEE80211_STA_AUTO_CHANNEL_SEL)) && | ||
3453 | (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | ||
3454 | !!sdata->default_key)) | ||
3452 | continue; | 3455 | continue; |
3453 | 3456 | ||
3454 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && | 3457 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && |