summaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-03-13 11:43:36 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-03-27 20:12:52 -0400
commit25420604c8967ff24f087dd7b9cd4b278567d39a (patch)
treeb5a1c0edcca74cf64abce8bd6699774c0c387838 /net/mac80211/pm.c
parentb5bde374f0f61f5d97114d400ade8fc96bf6f10d (diff)
downloadop-kernel-dev-25420604c8967ff24f087dd7b9cd4b278567d39a.zip
op-kernel-dev-25420604c8967ff24f087dd7b9cd4b278567d39a.tar.gz
mac80211: stop queues across suspend/resume
Even though userland probably cannot submit packets, there might still be some coming, and that's no good when the driver doesn't expect them. Stop the queues across suspend/resume. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 44525f5..c923ceb 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -11,6 +11,9 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
struct ieee80211_if_init_conf conf;
struct sta_info *sta;
+ ieee80211_stop_queues_by_reason(hw,
+ IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+
flush_workqueue(local->hw.workqueue);
/* disable keys */
@@ -113,5 +116,8 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
ieee80211_configure_filter(local);
netif_addr_unlock_bh(local->mdev);
+ ieee80211_wake_queues_by_reason(hw,
+ IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+
return 0;
}
OpenPOWER on IntegriCloud