diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-05-25 11:49:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:37 -0400 |
commit | 78523daa86cf0b02c4d2f73b962c04ad565e9140 (patch) | |
tree | 2be493edecfc3f225979ba33edaddf36a1f6bccb /drivers/net/wireless/libertas/if_usb.c | |
parent | a46c64108b06ec68337e62e7c2d4b3e8aed74b82 (diff) | |
download | lwn-78523daa86cf0b02c4d2f73b962c04ad565e9140.tar.gz lwn-78523daa86cf0b02c4d2f73b962c04ad565e9140.zip |
[PATCH] libertas: single out mesh code
This patches adds the two functions wlan_add_mesh() and wlan_remove_mesh(),
which are responsible for the mshX interface. In a CF driver with a non-
mesh-aware firmware you can omit the calls to this functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_usb.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 208d25700040..c1a662b065b0 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -99,7 +99,7 @@ static int if_usb_probe(struct usb_interface *intf, struct usb_device *udev; struct usb_host_interface *iface_desc; struct usb_endpoint_descriptor *endpoint; - wlan_private *pwlanpriv; + wlan_private *priv; struct usb_card_rec *usb_cardp; int i; @@ -187,7 +187,9 @@ static int if_usb_probe(struct usb_interface *intf, * about keeping pwlanpriv around since it will be set on our * usb device data in -> add() -> libertas_sbi_register_dev(). */ - if (!(pwlanpriv = wlan_add_card(usb_cardp))) + if (!(priv = wlan_add_card(usb_cardp))) + goto dealloc; + if (wlan_add_mesh(priv)) goto dealloc; usb_get_dev(udev); @@ -228,6 +230,7 @@ static void if_usb_disconnect(struct usb_interface *intf) /* 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(cardp); /* Unlink and free urb */ |