[PATCH] libertas: fix oops on module unload

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


On Fri, 2007-08-03 at 20:10 -0400, Marcelo Tosatti wrote:
> Dan,
> 
> Can you please apply this to libertas-2.6 and push it upstream? 

Applied, thanks.

Dan


> ------------
> 
> Resetting the wireless device via EC GPIO causes a USB reconnect event,
> which confuses the USB stack while we're running the ->disconnect
> method.
> 
> Its not necessary to do it in the module exit path since thats done at
> probe time in case firmware init fails.
> 
> Signed-off-by: Marcelo Tosatti <mtosatti at redhat.com>
> 
> 
> diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
> index 80aca9f..73d444f 100644
> --- a/drivers/net/wireless/libertas/if_usb.c
> +++ b/drivers/net/wireless/libertas/if_usb.c
> @@ -1138,7 +1138,8 @@ static void if_usb_exit_module(void)
>  	lbs_deb_enter(LBS_DEB_MAIN);
>  
>  	list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list)
> -		libertas_reset_device((wlan_private *) cardp->priv);
> +		libertas_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
> +			CMD_ACT_HALT, 0, 0, NULL);
>  
>  	/* API unregisters the driver from USB subsystem */
>  	usb_deregister(&if_usb_driver);




More information about the libertas-dev mailing list