aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wlcore/tx.c
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-07-24 19:18:49 +0300
committerLuciano Coelho <luca@coelho.fi>2012-09-27 12:13:50 +0300
commit4cc533830b7e6b309e8b73196c410951fc2bed91 (patch)
treefe993f5d87bb3e2ed25756ff7c71ced206f6fa98 /drivers/net/wireless/ti/wlcore/tx.c
parentwlcore: consider single fw case (diff)
downloadlinux-dev-4cc533830b7e6b309e8b73196c410951fc2bed91.tar.xz
linux-dev-4cc533830b7e6b309e8b73196c410951fc2bed91.zip
wlcore: Prevent interaction with HW after recovery is queued
When a function requests to recover, it would normally abort and will not send any additional commands to the HW. However, other threads may not be aware of the failure and could try to communicate with the HW after a recovery was queued, but before the recovery work began. Fix this by introducing an intermediate state which is set when recovery is queued, and modify all state checks accordingly. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/tx.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 1a2f31c289c5..4f66e759de37 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -687,7 +687,7 @@ int wlcore_tx_work_locked(struct wl1271 *wl)
int bus_ret = 0;
u8 hlid;
- if (unlikely(wl->state == WL1271_STATE_OFF))
+ if (unlikely(wl->state != WLCORE_STATE_ON))
return 0;
while ((skb = wl1271_skb_dequeue(wl, &hlid))) {