[PATCH] libertas: properly end commands on hardware failure

Dan Williams dcbw at redhat.com
Mon Aug 20 13:10:16 EDT 2007


On Sun, 2007-08-05 at 21:14 +0200, Pierre Ossman wrote:
> : 
> Mime-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> 
> Make sure that errors reported by the hardware layer is properly
> handled. Otherwise commands tend to get stuck in limbo.

Applied, thanks!

Dan

> Signed-off-by: Pierre Ossman <drzeus at drzeus.cx>
> 
> diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
> index 98092b9..33dbed0 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;
> 




More information about the libertas-dev mailing list