mac80211: flush stations before stop beaconing
authorEliad Peller <eliad@wizery.com>
Wed, 18 Jul 2012 12:36:04 +0000 (15:36 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 18 Jul 2012 15:03:51 +0000 (17:03 +0200)
When AP interface is going down, the stations
are flushed (in ieee80211_do_stop()) only after
the beaconing was stopped.

However, drivers might rely on stations being
removed before the beaconing was stopped, in
order to clean up properly.

Fix it by flushing the stations on ap stop.

(we already do the same for other interface
types, e.g. in ieee80211_set_disassoc())

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c

index efbbdc8a2be08154380851f53de968da3b88c5a5..d41974aacf5168597fd559f1c976252f9e36ffd9 100644 (file)
@@ -917,6 +917,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 
        kfree_rcu(old, rcu_head);
 
+       sta_info_flush(sdata->local, sdata);
        ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
 
        return 0;