diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-17 15:41:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:45 -0500 |
commit | 8538823f7c692c98e8b7e19cb580faa56e25e89f (patch) | |
tree | 652dc0b18d38b40a8e137d19ef9495e14a0a7bbc /drivers/net/wireless/libertas/cmdresp.c | |
parent | 7003b078c82d141216deecef4de154711a107aab (diff) |
libertas: discard DEFER responses to commands; let the timeout trigger
When the firmware returns 0x0004, it wants us to try again later. We can
achieve that simply by throwing out the response and letting the command
timeout code kick in.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 4d384612afa7..0cd96628293a 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -665,6 +665,16 @@ int lbs_process_rx_command(struct lbs_private *priv) | |||
665 | goto done; | 665 | goto done; |
666 | } | 666 | } |
667 | 667 | ||
668 | if (resp->result == cpu_to_le16(0x0004)) { | ||
669 | /* 0x0004 means -EAGAIN. Drop the response, let it time out | ||
670 | and be resubmitted */ | ||
671 | lbs_pr_info("Firmware returns DEFER to command %x. Will let it time out...\n", | ||
672 | le16_to_cpu(resp->command)); | ||
673 | spin_unlock_irqrestore(&priv->driver_lock, flags); | ||
674 | ret = -1; | ||
675 | goto done; | ||
676 | } | ||
677 | |||
668 | /* Now we got response from FW, cancel the command timer */ | 678 | /* Now we got response from FW, cancel the command timer */ |
669 | del_timer(&priv->command_timer); | 679 | del_timer(&priv->command_timer); |
670 | priv->cmd_timed_out = 0; | 680 | priv->cmd_timed_out = 0; |