From 9dd6aed05b8859265cd79f1e47e4f844bbe1548b Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 31 Mar 2008 19:22:59 +0200 Subject: [PATCH] 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 Signed-off-by: John W. Linville --- net/mac80211/ieee80211_sta.c | 5 +++-- 1 file 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, sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; + sdata = IEEE80211_DEV_TO_SUB_IF(dev); + /* Remove possible STA entries from other IBSS networks. */ - sta_info_flush(local, NULL); + sta_info_flush(local, sdata); if (local->ops->reset_tsf) { /* Reset own TSF to allow time synchronization work. */ @@ -2267,7 +2269,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, local->hw.conf.beacon_int = bss->beacon_int >= 10 ? bss->beacon_int : 10; - sdata = IEEE80211_DEV_TO_SUB_IF(dev); sdata->drop_unencrypted = bss->capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; -- 2.39.5