Commit 02edf813 authored by Tony Lindgren's avatar Tony Lindgren Committed by Kalle Valo

wlcore: Make sure PM calls are paired

The call to wl1271_ps_elp_wakeup() in wl12xx_queue_recovery_work() is
unpaired. Let's remove it and add paired calls to wl1271_recovery_work()
instead in preparation for changing things to use runtime PM.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4ec7cece
...@@ -796,8 +796,6 @@ void wl12xx_queue_recovery_work(struct wl1271 *wl) ...@@ -796,8 +796,6 @@ void wl12xx_queue_recovery_work(struct wl1271 *wl)
wl->state = WLCORE_STATE_RESTARTING; wl->state = WLCORE_STATE_RESTARTING;
set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
wl1271_ps_elp_wakeup(wl);
wlcore_disable_interrupts_nosync(wl);
ieee80211_queue_work(wl->hw, &wl->recovery_work); ieee80211_queue_work(wl->hw, &wl->recovery_work);
} }
} }
...@@ -919,12 +917,18 @@ static void wl1271_recovery_work(struct work_struct *work) ...@@ -919,12 +917,18 @@ static void wl1271_recovery_work(struct work_struct *work)
container_of(work, struct wl1271, recovery_work); container_of(work, struct wl1271, recovery_work);
struct wl12xx_vif *wlvif; struct wl12xx_vif *wlvif;
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
int error;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (wl->state == WLCORE_STATE_OFF || wl->plt) if (wl->state == WLCORE_STATE_OFF || wl->plt)
goto out_unlock; goto out_unlock;
error = wl1271_ps_elp_wakeup(wl);
if (error < 0)
wl1271_warning("Enable for recovery failed");
wlcore_disable_interrupts_nosync(wl);
if (!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)) { if (!test_bit(WL1271_FLAG_INTENDED_FW_RECOVERY, &wl->flags)) {
if (wl->conf.fwlog.output == WL12XX_FWLOG_OUTPUT_HOST) if (wl->conf.fwlog.output == WL12XX_FWLOG_OUTPUT_HOST)
wl12xx_read_fwlog_panic(wl); wl12xx_read_fwlog_panic(wl);
...@@ -967,6 +971,8 @@ static void wl1271_recovery_work(struct work_struct *work) ...@@ -967,6 +971,8 @@ static void wl1271_recovery_work(struct work_struct *work)
*/ */
wlcore_wake_queues(wl, WLCORE_QUEUE_STOP_REASON_FW_RESTART); wlcore_wake_queues(wl, WLCORE_QUEUE_STOP_REASON_FW_RESTART);
wl1271_ps_elp_sleep(wl);
out_unlock: out_unlock:
wl->watchdog_recovery = false; wl->watchdog_recovery = false;
clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment