mac80211: simplify AP interface stop
authorJohannes Berg <johannes.berg@intel.com>
Sat, 23 Feb 2013 00:17:56 +0000 (01:17 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Mar 2013 15:36:01 +0000 (16:36 +0100)
For AP interfaces, there's no need to flush stations
or keys again when the interface is stopped as already
happened when the BSS was stopped on the interface.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c

index 290de4d99697d8b1eccd4f0c798c3c8cc7313ddf..d85282f6440515c808768374c4636fc8463d9038 100644 (file)
@@ -836,14 +836,16 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
                rcu_barrier();
                sta_info_flush_cleanup(sdata);
 
-               skb_queue_purge(&sdata->skb_queue);
-
                /*
                 * Free all remaining keys, there shouldn't be any,
                 * except maybe in WDS mode?
                 */
                ieee80211_free_keys(sdata);
 
+               /* fall through */
+       case NL80211_IFTYPE_AP:
+               skb_queue_purge(&sdata->skb_queue);
+
                drv_remove_interface_debugfs(local, sdata);
 
                if (going_down)