diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 23:14:21 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 04:00:35 +0400 |
commit | ee5b1aadfd5cda257337a9b9777114a10c18c31e (patch) | |
tree | c0daca525c44f56ce59ce8f7d9fdf5f0136c3c9a /drivers/staging/rtl8712/usb_intf.c | |
parent | c6dc001f2add6d6609f94246bbec30d81494f5f7 (diff) | |
download | linux-ee5b1aadfd5cda257337a9b9777114a10c18c31e.tar.xz |
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes.
In r8712_generate_ie(), HT check is no longer done.
Removed r8712_add_ht_addt_info().
Changes to defragmentation handling, and queue selection.
Get TSSI command.
Added an Ad-Hoc check to is_desired_network()
r8712_ind_disconnect() now checks for Linked state.
r8712_xmit_bh() now schedules an xmit tasklet.
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/usb_intf.c')
-rw-r--r-- | drivers/staging/rtl8712/usb_intf.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 3bcb669a7ea7..0a2f27431657 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -368,23 +368,25 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, struct _adapter *padapter = NULL; struct dvobj_priv *pdvobjpriv; struct net_device *pnetdev; + struct usb_device *udev; printk(KERN_INFO "r8712u: DriverVersion: %s\n", DRVER); /* In this probe function, O.S. will provide the usb interface pointer * to driver. We have to increase the reference count of the usb device * structure by using the usb_get_dev function. */ - usb_get_dev(interface_to_usbdev(pusb_intf)); + udev = interface_to_usbdev(pusb_intf); + usb_get_dev(udev); pintf = pusb_intf; /* step 1. */ pnetdev = r8712_init_netdev(); if (!pnetdev) goto error; - padapter = (struct _adapter *)netdev_priv(pnetdev); + padapter = netdev_priv(pnetdev); disable_ht_for_spec_devid(pdid, padapter); pdvobjpriv = &padapter->dvobjpriv; pdvobjpriv->padapter = padapter; - padapter->dvobjpriv.pusbdev = interface_to_usbdev(pusb_intf); + padapter->dvobjpriv.pusbdev = udev; usb_set_intfdata(pusb_intf, pnetdev); SET_NETDEV_DEV(pnetdev, &pusb_intf->dev); /* step 2. */ @@ -594,9 +596,10 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, /* step 6. Tell the network stack we exist */ if (register_netdev(pnetdev) != 0) goto error; + spin_lock_init(&padapter->lockRxFF0Filter); return 0; error: - usb_put_dev(interface_to_usbdev(pusb_intf)); + usb_put_dev(udev); usb_set_intfdata(pusb_intf, NULL); if (padapter->dvobj_deinit != NULL) padapter->dvobj_deinit(padapter); @@ -613,6 +616,7 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) struct _adapter *padapter = netdev_priv(pnetdev); struct usb_device *udev = interface_to_usbdev(pusb_intf); + usb_set_intfdata(pusb_intf, NULL); if (padapter) { if (drvpriv.drv_registered == true) padapter->bSurpriseRemoved = true; |