mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
wl12xx: cancel delayed elp work and clear flags when stopping PLT
In some cases a race condition can happen if we don't cancel any pending ELP work before stopping PLT. With this commit we cancel ELP work and clear the wl->flags bitmask. Also clean up the wl elements after powering off. Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
46b0cc9ffc
commit
f6fbeccd3e
1 changed files with 4 additions and 3 deletions
|
@ -1420,17 +1420,18 @@ int wl1271_plt_stop(struct wl1271 *wl)
|
|||
goto out;
|
||||
}
|
||||
|
||||
wl->state = WL1271_STATE_OFF;
|
||||
wl->rx_counter = 0;
|
||||
|
||||
mutex_unlock(&wl->mutex);
|
||||
|
||||
wl1271_flush_deferred_work(wl);
|
||||
cancel_work_sync(&wl->netstack_work);
|
||||
cancel_work_sync(&wl->recovery_work);
|
||||
cancel_delayed_work_sync(&wl->elp_work);
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
wl1271_power_off(wl);
|
||||
wl->flags = 0;
|
||||
wl->state = WL1271_STATE_OFF;
|
||||
wl->rx_counter = 0;
|
||||
mutex_unlock(&wl->mutex);
|
||||
|
||||
out:
|
||||
|
|
Loading…
Reference in a new issue