diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:13:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 12:13:00 -0700 |
commit | f063a0c0c995d010960efcc1b2ed14b99674f25c (patch) | |
tree | 106e30acd1a58b3cf9f3c15abe1de83f1919e03b /drivers/staging/rtl8192u/r8192U_core.c | |
parent | 3c3762957818dc902222733a8184f23102e24472 (diff) | |
parent | 5af634789c93b97cfb314a102436716be8fbc577 (diff) | |
download | op-kernel-dev-f063a0c0c995d010960efcc1b2ed14b99674f25c.zip op-kernel-dev-f063a0c0c995d010960efcc1b2ed14b99674f25c.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits)
Staging: brcm80211: fix usage of roundup in structures
Staging: bcm: fix up network device reference counting
Staging: keucr: fix up US_ macro change
staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames.
staging: brcm80211: Remove unnecessary header files.
staging: brcm80211: Remove unnecessary includes from bcmutils.c
staging: brcm80211: Removed unnecessary pktsetprio() function.
Staging: brcm80211: remove typedefs.h
Staging: brcm80211: remove uintptr typedef usage
Staging: hv: remove struct vmbus_channel_interface
Staging: hv: remove Open from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_open directly
Staging: hv: netvsc: call vmbus_open directly
Staging: hv: channel: export vmbus_open to modules
Staging: hv: remove Close from struct vmbus_channel_interface
Staging: hv: netvsc: call vmbus_close directly
Staging: hv: storvsc: call vmbus_close directly
Staging: hv: channel: export vmbus_close to modules
Staging: hv: remove SendPacket from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Fix up conflicts in
drivers/staging/cx25821/cx25821-audio-upstream.c
drivers/staging/cx25821/cx25821-audio.h
due to warring whitespace cleanups (neither of which were all that great)
Diffstat (limited to 'drivers/staging/rtl8192u/r8192U_core.c')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 1ff7850..494f180 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1534,7 +1534,7 @@ static void rtl8192_tx_isr(struct urb *tx_urb) * 1. check whether there's tx irq available, for it's a completion return * function, it should contain enough tx irq; * 2. check pakcet type; - * 3. intialize sendlist, check whether the to-be send packet no greater than 1 + * 3. initialize sendlist, check whether the to-be send packet no greater than 1 * 4. aggregation the packets, and fill firmware info and tx desc to it, etc. * 5. check whehter the packet could be sent, otherwise just insert to wait head * */ @@ -5793,10 +5793,12 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf, struct net_device *dev = NULL; struct r8192_priv *priv= NULL; struct usb_device *udev = interface_to_usbdev(intf); + int ret; RT_TRACE(COMP_INIT, "Oops: i'm coming\n"); dev = alloc_ieee80211(sizeof(struct r8192_priv)); - + if (dev == NULL) + return -ENOMEM; usb_set_intfdata(intf, dev); SET_NETDEV_DEV(dev, &intf->dev); @@ -5826,12 +5828,16 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf, RT_TRACE(COMP_INIT, "Driver probe completed1\n"); if(rtl8192_init(dev)!=0){ RT_TRACE(COMP_ERR, "Initialization failed"); + ret = -ENODEV; goto fail; } netif_carrier_off(dev); netif_stop_queue(dev); - register_netdev(dev); + ret = register_netdev(dev); + if (ret) + goto fail2; + RT_TRACE(COMP_INIT, "dev name=======> %s\n",dev->name); rtl8192_proc_init_one(dev); @@ -5839,13 +5845,20 @@ static int __devinit rtl8192_usb_probe(struct usb_interface *intf, RT_TRACE(COMP_INIT, "Driver probe completed\n"); return 0; - +fail2: + rtl8192_down(dev); + if (priv->pFirmware) { + kfree(priv->pFirmware); + priv->pFirmware = NULL; + } + rtl8192_usb_deleteendpoints(dev); + destroy_workqueue(priv->priv_wq); + mdelay(10); fail: free_ieee80211(dev); RT_TRACE(COMP_ERR, "wlan driver load failed\n"); - return -ENODEV; - + return ret; } //detach all the work and timer structure declared or inititialize in r8192U_init function. |