diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-06-21 17:10:47 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-22 21:54:14 +0200 |
commit | 96caded8d275f67c6000fa219b0c11e7d6bf8e0b (patch) | |
tree | d6122d60034497337d9733ff00967304bca50879 | |
parent | wlcore: access the firmware memory via debugfs (diff) | |
download | linux-96caded8d275f67c6000fa219b0c11e7d6bf8e0b.tar.xz linux-96caded8d275f67c6000fa219b0c11e7d6bf8e0b.zip |
wlcore: cancel suspend when recovery is pending
We wish to postpone suspend if recovery is pending. This will make sure
the FW is in a good state and perform wowlan wakeup.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index b0795aac4bac..0df28d5cb331 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -1661,6 +1661,12 @@ static int wl1271_op_suspend(struct ieee80211_hw *hw, wl1271_debug(DEBUG_MAC80211, "mac80211 suspend wow=%d", !!wow); WARN_ON(!wow); + /* we want to perform the recovery before suspending */ + if (test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) { + wl1271_warning("postponing suspend to perform recovery"); + return -EBUSY; + } + wl1271_tx_flush(wl); mutex_lock(&wl->mutex); |