|
@@ -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);
|