[PATCH] libertas: fixed kernel oops on module/card removal
Luis Carlos Cobo Rus
luisca at cozybit.com
Fri Mar 16 14:56:59 EDT 2007
On 3/16/07, Dan Williams <dcbw at redhat.com> wrote:
> > netif_carrier_off(priv->wlan_dev.netdev);
> > - netif_carrier_off(priv->mesh_dev);
> Why is it correct to remove that? Is the mesh_dev already torn down at
> this point? In any case, we should certainly be calling
> netif_carrier_off() from wherever the mesh device is torn down.
On card/module removal, we clean up at if_usb_disconnect (if_usb.c).
>From that function,
/* card is removed and we can call wlan_remove_card */
lbs_deb_usbd(&cardp->udev->dev, "call remove card\n");
wlan_remove_mesh(priv);
wlan_remove_card(priv);
wlan_remove_mesh calls netif_carrier_off and frees the mesh net_device
structure, so trying to do it again afterwards in wlan_remove_card
resulted in an oops.
--
Luis Carlos Cobo Rus GnuPG ID: 44019B60
cozybit Inc.
More information about the libertas-dev
mailing list