Skip to contentSkip to conversation

mac80211: flush workqueue a second time in suspend()

PATCH New Bob Copeland 1 participant 1 message Jan 24, 2009 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: flush workqueue a second time in suspend()

Drivers can theoretically queue more work in one of their callbacks from mac80211 suspend, so let's flush it once more to be on the safe side, just before calling ->stop().

---
 net/mac80211/pm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
net/mac80211/pm.c +3 -0
index 6d17ed7..44525f5 100644
@@ -44,6 +44,9 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
 		}
 	}
 
+	/* flush again, in case driver queued work */
+	flush_workqueue(local->hw.workqueue);
+
 	/* stop hardware */
 	if (local->open_count) {
 		ieee80211_led_radio(local, false);
Signature · 4 lines
1.6.0.6

-- 
Bob Copeland %% www.bobcopeland.com