diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7f05820dc629..55659a730dc1 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2863,7 +2863,8 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
2863 | dev->name, print_mac(mac, mgmt->bssid)); | 2863 | dev->name, print_mac(mac, mgmt->bssid)); |
2864 | ieee80211_sta_join_ibss(dev, &sdata->u.sta, bss); | 2864 | ieee80211_sta_join_ibss(dev, &sdata->u.sta, bss); |
2865 | ieee80211_ibss_add_sta(dev, NULL, | 2865 | ieee80211_ibss_add_sta(dev, NULL, |
2866 | mgmt->bssid, mgmt->sa); | 2866 | mgmt->bssid, mgmt->sa, |
2867 | BIT(rx_status->rate_idx)); | ||
2867 | } | 2868 | } |
2868 | } | 2869 | } |
2869 | 2870 | ||
@@ -3583,7 +3584,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3583 | sband = local->hw.wiphy->bands[bss->band]; | 3584 | sband = local->hw.wiphy->bands[bss->band]; |
3584 | 3585 | ||
3585 | if (local->hw.conf.beacon_int == 0) | 3586 | if (local->hw.conf.beacon_int == 0) |
3586 | local->hw.conf.beacon_int = 10000; | 3587 | local->hw.conf.beacon_int = 100; |
3587 | bss->beacon_int = local->hw.conf.beacon_int; | 3588 | bss->beacon_int = local->hw.conf.beacon_int; |
3588 | bss->last_update = jiffies; | 3589 | bss->last_update = jiffies; |
3589 | bss->capability = WLAN_CAPABILITY_IBSS; | 3590 | bss->capability = WLAN_CAPABILITY_IBSS; |
@@ -4307,12 +4308,13 @@ int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len) | |||
4307 | 4308 | ||
4308 | struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, | 4309 | struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, |
4309 | struct sk_buff *skb, u8 *bssid, | 4310 | struct sk_buff *skb, u8 *bssid, |
4310 | u8 *addr) | 4311 | u8 *addr, u64 supp_rates) |
4311 | { | 4312 | { |
4312 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 4313 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
4313 | struct sta_info *sta; | 4314 | struct sta_info *sta; |
4314 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 4315 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
4315 | DECLARE_MAC_BUF(mac); | 4316 | DECLARE_MAC_BUF(mac); |
4317 | int band = local->hw.conf.channel->band; | ||
4316 | 4318 | ||
4317 | /* TODO: Could consider removing the least recently used entry and | 4319 | /* TODO: Could consider removing the least recently used entry and |
4318 | * allow new one to be added. */ | 4320 | * allow new one to be added. */ |
@@ -4324,6 +4326,9 @@ struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, | |||
4324 | return NULL; | 4326 | return NULL; |
4325 | } | 4327 | } |
4326 | 4328 | ||
4329 | if (!ieee80211_bssid_match(bssid, sdata->u.sta.bssid)) | ||
4330 | return NULL; | ||
4331 | |||
4327 | printk(KERN_DEBUG "%s: Adding new IBSS station %s (dev=%s)\n", | 4332 | printk(KERN_DEBUG "%s: Adding new IBSS station %s (dev=%s)\n", |
4328 | wiphy_name(local->hw.wiphy), print_mac(mac, addr), dev->name); | 4333 | wiphy_name(local->hw.wiphy), print_mac(mac, addr), dev->name); |
4329 | 4334 | ||
@@ -4333,8 +4338,10 @@ struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, | |||
4333 | 4338 | ||
4334 | set_sta_flags(sta, WLAN_STA_AUTHORIZED); | 4339 | set_sta_flags(sta, WLAN_STA_AUTHORIZED); |
4335 | 4340 | ||
4336 | sta->supp_rates[local->hw.conf.channel->band] = | 4341 | if (supp_rates) |
4337 | sdata->u.sta.supp_rates_bits[local->hw.conf.channel->band]; | 4342 | sta->supp_rates[band] = supp_rates; |
4343 | else | ||
4344 | sta->supp_rates[band] = sdata->u.sta.supp_rates_bits[band]; | ||
4338 | 4345 | ||
4339 | rate_control_rate_init(sta, local); | 4346 | rate_control_rate_init(sta, local); |
4340 | 4347 | ||