Skip to content

Commit

Permalink
[PATCH] libertas: properly end commands on hardware failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Ossman authored and David S. Miller committed Oct 10, 2007
1 parent b6e99dd commit 794760f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 794760f

Please sign in to comment.