diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 29 | ||||
-rw-r--r-- | net/mac80211/util.c | 37 | ||||
-rw-r--r-- | net/mac80211/wext.c | 1 |
3 files changed, 52 insertions, 15 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) && |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 4f7180b287da..5a77e2c01f49 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -384,6 +384,41 @@ void ieee80211_iterate_active_interfaces( | |||
384 | struct ieee80211_local *local = hw_to_local(hw); | 384 | struct ieee80211_local *local = hw_to_local(hw); |
385 | struct ieee80211_sub_if_data *sdata; | 385 | struct ieee80211_sub_if_data *sdata; |
386 | 386 | ||
387 | rtnl_lock(); | ||
388 | |||
389 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
390 | switch (sdata->vif.type) { | ||
391 | case IEEE80211_IF_TYPE_INVALID: | ||
392 | case IEEE80211_IF_TYPE_MNTR: | ||
393 | case IEEE80211_IF_TYPE_VLAN: | ||
394 | continue; | ||
395 | case IEEE80211_IF_TYPE_AP: | ||
396 | case IEEE80211_IF_TYPE_STA: | ||
397 | case IEEE80211_IF_TYPE_IBSS: | ||
398 | case IEEE80211_IF_TYPE_WDS: | ||
399 | case IEEE80211_IF_TYPE_MESH_POINT: | ||
400 | break; | ||
401 | } | ||
402 | if (sdata->dev == local->mdev) | ||
403 | continue; | ||
404 | if (netif_running(sdata->dev)) | ||
405 | iterator(data, sdata->dev->dev_addr, | ||
406 | &sdata->vif); | ||
407 | } | ||
408 | |||
409 | rtnl_unlock(); | ||
410 | } | ||
411 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | ||
412 | |||
413 | void ieee80211_iterate_active_interfaces_atomic( | ||
414 | struct ieee80211_hw *hw, | ||
415 | void (*iterator)(void *data, u8 *mac, | ||
416 | struct ieee80211_vif *vif), | ||
417 | void *data) | ||
418 | { | ||
419 | struct ieee80211_local *local = hw_to_local(hw); | ||
420 | struct ieee80211_sub_if_data *sdata; | ||
421 | |||
387 | rcu_read_lock(); | 422 | rcu_read_lock(); |
388 | 423 | ||
389 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 424 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
@@ -408,4 +443,4 @@ void ieee80211_iterate_active_interfaces( | |||
408 | 443 | ||
409 | rcu_read_unlock(); | 444 | rcu_read_unlock(); |
410 | } | 445 | } |
411 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 446 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 6a342a9a40cd..c2e2378af082 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -221,7 +221,6 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev, | |||
221 | range->num_frequency = c; | 221 | range->num_frequency = c; |
222 | 222 | ||
223 | IW_EVENT_CAPA_SET_KERNEL(range->event_capa); | 223 | IW_EVENT_CAPA_SET_KERNEL(range->event_capa); |
224 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY); | ||
225 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); | 224 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); |
226 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); | 225 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); |
227 | 226 | ||