aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-03-31 13:22:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-01 17:14:09 -0400
commit9dd6aed05b8859265cd79f1e47e4f844bbe1548b (patch)
tree85950042a8fa65ffa8b49e60b3bbd1f6996e9469 /net
parenta2e1d52a32eab53f8ab03c4023310f65aaa054a7 (diff)
mac80211 ibss: flush only stations belonging to current interface
When joining a new IBSS, all old stations are flushed, but currently all stations belonging to all virtual interfaces are flushed, which is wrong. This patch fixes it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_sta.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index f9cf2f187893..baa68575b98a 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -2253,8 +2253,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2253 2253
2254 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2254 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
2255 2255
2256 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
2257
2256 /* Remove possible STA entries from other IBSS networks. */ 2258 /* Remove possible STA entries from other IBSS networks. */
2257 sta_info_flush(local, NULL); 2259 sta_info_flush(local, sdata);
2258 2260
2259 if (local->ops->reset_tsf) { 2261 if (local->ops->reset_tsf) {
2260 /* Reset own TSF to allow time synchronization work. */ 2262 /* Reset own TSF to allow time synchronization work. */
@@ -2267,7 +2269,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2267 2269
2268 local->hw.conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10; 2270 local->hw.conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10;
2269 2271
2270 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
2271 sdata->drop_unencrypted = bss->capability & 2272 sdata->drop_unencrypted = bss->capability &
2272 WLAN_CAPABILITY_PRIVACY ? 1 : 0; 2273 WLAN_CAPABILITY_PRIVACY ? 1 : 0;
2273 2274