aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 18:20:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 03:17:00 -0400
commit3c3e21e7443bdb948437a6e925fd111e932dc083 (patch)
treef8d2035b81e1aef8c0f26ade67c9756da5109b2d /net/mac80211/util.c
parentc8f994eec2a966a7a5fb6a3be517e3ede6a3cafa (diff)
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/util.c')
-rw-r--r--net/mac80211/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index f9581c6378ae..43465b6e4778 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1461,6 +1461,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1461 /* add interfaces */ 1461 /* add interfaces */
1462 sdata = rtnl_dereference(local->monitor_sdata); 1462 sdata = rtnl_dereference(local->monitor_sdata);
1463 if (sdata) { 1463 if (sdata) {
1464 /* in HW restart it exists already */
1465 WARN_ON(local->resuming);
1464 res = drv_add_interface(local, sdata); 1466 res = drv_add_interface(local, sdata);
1465 if (WARN_ON(res)) { 1467 if (WARN_ON(res)) {
1466 rcu_assign_pointer(local->monitor_sdata, NULL); 1468 rcu_assign_pointer(local->monitor_sdata, NULL);
@@ -1650,6 +1652,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1650 local->in_reconfig = false; 1652 local->in_reconfig = false;
1651 barrier(); 1653 barrier();
1652 1654
1655 if (local->monitors == local->open_count && local->monitors > 0)
1656 ieee80211_add_virtual_monitor(local);
1657
1653 /* 1658 /*
1654 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation 1659 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation
1655 * sessions can be established after a resume. 1660 * sessions can be established after a resume.