diff options
author | Luciano Coelho <coelho@ti.com> | 2012-01-11 08:42:42 +0100 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-02-15 07:38:28 +0100 |
commit | f6fbeccd3e513c23de9cd8562f2b2e78d4d17912 (patch) | |
tree | c41af20823ef8da406e058328f49f6502a79f9b7 /drivers/net/wireless/wl12xx/main.c | |
parent | wl12xx: Fix potential interrupt storm (diff) | |
download | linux-f6fbeccd3e513c23de9cd8562f2b2e78d4d17912.tar.xz linux-f6fbeccd3e513c23de9cd8562f2b2e78d4d17912.zip |
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>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 3a1636b68cd2..3587afcd6469 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -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: |