diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-04-18 14:15:23 +0300 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-05-02 10:31:03 +0300 |
commit | f482b76202f4ac0f62a77b0e55ac1a1cfe480e2b (patch) | |
tree | 66e05222e0298a33097d6a75fd3970f86024fac7 /drivers/net/wireless/wl12xx/cmd.c | |
parent | 521a4a23261354885c01bf75b42150629004ed83 (diff) | |
download | op-kernel-dev-f482b76202f4ac0f62a77b0e55ac1a1cfe480e2b.zip op-kernel-dev-f482b76202f4ac0f62a77b0e55ac1a1cfe480e2b.tar.gz |
wl12xx: schedule recovery on command timeout
We use a long timeout (2 seconds) when sending commands to the FW.
When a command times out, it means the FW is stuck, and we should
commence recovery.
This should make recovery times shorter as we'll recover on the first
timeout indication.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index a9ffdd8..d8596ae 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c @@ -76,7 +76,7 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len, if (time_after(jiffies, timeout)) { wl1271_error("command complete timeout"); ret = -ETIMEDOUT; - goto out; + goto fail; } poll_count++; @@ -96,14 +96,17 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len, status = le16_to_cpu(cmd->status); if (status != CMD_STATUS_SUCCESS) { wl1271_error("command execute failure %d", status); - ieee80211_queue_work(wl->hw, &wl->recovery_work); ret = -EIO; + goto fail; } wl1271_write32(wl, ACX_REG_INTERRUPT_ACK, WL1271_ACX_INTR_CMD_COMPLETE); + return 0; -out: +fail: + WARN_ON(1); + ieee80211_queue_work(wl->hw, &wl->recovery_work); return ret; } |