summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorPierre Ossman <drzeus-list@drzeus.cx>2007-08-20 18:24:42 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 01:50:36 +0200
commit794760f750655d987499d7a5034519afc84af63b (patch)
treeb648f2dc26d5fec53deb2849248062b5105dcc32 /drivers/net/wireless/libertas
parent[PATCH] libertas: send reset command directly instead of calling libertas_res... (diff)
downloadlinux-794760f750655d987499d7a5034519afc84af63b.tar.xz
linux-794760f750655d987499d7a5034519afc84af63b.zip
[PATCH] libertas: properly end commands on hardware failure
Make sure that errors reported by the hardware layer is properly handled. Otherwise commands tend to get stuck in limbo. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 98092b995352..33dbed09fc72 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1009,7 +1009,9 @@ static int DownloadcommandToStation(wlan_private * priv,
if (ret != 0) {
lbs_deb_host("DNLD_CMD: hw_host_to_card failed\n");
spin_lock_irqsave(&adapter->driver_lock, flags);
+ adapter->cur_cmd_retcode = ret;
__libertas_cleanup_and_insert_cmd(priv, adapter->cur_cmd);
+ adapter->nr_cmd_pending--;
adapter->cur_cmd = NULL;
spin_unlock_irqrestore(&adapter->driver_lock, flags);
goto done;