From: Stanislaw Gruszka Date: Mon, 13 Sep 2010 12:46:42 +0000 (+0200) Subject: mac80211: wait for scan work complete before restarting hw X-Git-Tag: v2.6.37-rc1~147^2~373^2^2~85 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=edeb78a7fa838b7fb9c2043680bd8da7cb5cb0e5;p=~shefty%2Frdma-dev.git mac80211: wait for scan work complete before restarting hw This is needed to avoid warning in ieee80211_restart_hw about hardware scan in progress. Signed-off-by: Stanislaw Gruszka Acked-by: Wey-Yi W Guy Signed-off-by: John W. Linville --- diff --git a/net/mac80211/main.c b/net/mac80211/main.c index a06b6ee63c0..7fb11485697 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -305,6 +305,9 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw) trace_api_restart_hw(local); + /* wait for scan work complete */ + flush_workqueue(local->workqueue); + WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), "%s called with hardware scan in progress\n", __func__);