summaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 23:20:27 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 09:17:00 +0200
commit3c3e21e7443bdb948437a6e925fd111e932dc083 (patch)
treef8d2035b81e1aef8c0f26ade67c9756da5109b2d /net/mac80211/pm.c
parentmac80211: purge remain-on-channel items when suspending (diff)
downloadlinux-3c3e21e7443bdb948437a6e925fd111e932dc083.tar.xz
linux-3c3e21e7443bdb948437a6e925fd111e932dc083.zip
mac80211: destroy virtual monitor interface across suspend
It has to be removed from the driver, but completely destroying it helps handle unplug of a device during suspend since then the channel context handling etc. doesn't have to happen later when it's removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index b98d927dd0f3..d1c021b62fe5 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -21,6 +21,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
ieee80211_roc_purge(local, NULL);
+ ieee80211_del_virtual_monitor(local);
+
if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) {
@@ -103,10 +105,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
drv_remove_interface(local, sdata);
}
- sdata = rtnl_dereference(local->monitor_sdata);
- if (sdata)
- drv_remove_interface(local, sdata);
-
/*
* We disconnected on all interfaces before suspend, all channel
* contexts should be released.