aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_usb.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-09 16:12:09 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 16:12:09 -0500
commita3cc2de9138f1ee1581f55927f33f7d72ed6207d (patch)
tree4f0dbdb1b18bf24987485facb5e7800e242d932f /drivers/net/wireless/zd1211rw/zd_usb.c
parente45d9ab4051d99c9f237c96e75c4dd6671661236 (diff)
parent46b8c85e1df091fe2d53ae7d02addb0dc58a9123 (diff)
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_usb.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 75ef55624d7f..aac8a1c5ba08 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -313,6 +313,12 @@ out:
313 313
314static inline void handle_retry_failed_int(struct urb *urb) 314static inline void handle_retry_failed_int(struct urb *urb)
315{ 315{
316 struct zd_usb *usb = urb->context;
317 struct zd_mac *mac = zd_usb_to_mac(usb);
318 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
319
320 ieee->stats.tx_errors++;
321 ieee->ieee_stats.tx_retry_limit_exceeded++;
316 dev_dbg_f(urb_dev(urb), "retry failed interrupt\n"); 322 dev_dbg_f(urb_dev(urb), "retry failed interrupt\n");
317} 323}
318 324
@@ -487,6 +493,9 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer,
487 493
488 if (length < sizeof(struct rx_length_info)) { 494 if (length < sizeof(struct rx_length_info)) {
489 /* It's not a complete packet anyhow. */ 495 /* It's not a complete packet anyhow. */
496 struct ieee80211_device *ieee = zd_mac_to_ieee80211(mac);
497 ieee->stats.rx_errors++;
498 ieee->stats.rx_length_errors++;
490 return; 499 return;
491 } 500 }
492 length_info = (struct rx_length_info *) 501 length_info = (struct rx_length_info *)
@@ -923,6 +932,8 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
923 goto error; 932 goto error;
924 } 933 }
925 934
935 usb_reset_device(interface_to_usbdev(intf));
936
926 netdev = zd_netdev_alloc(intf); 937 netdev = zd_netdev_alloc(intf);
927 if (netdev == NULL) { 938 if (netdev == NULL) {
928 r = -ENOMEM; 939 r = -ENOMEM;
@@ -1024,6 +1035,7 @@ static int __init usb_init(void)
1024 1035
1025 r = usb_register(&driver); 1036 r = usb_register(&driver);
1026 if (r) { 1037 if (r) {
1038 destroy_workqueue(zd_workqueue);
1027 printk(KERN_ERR "%s usb_register() failed. Error number %d\n", 1039 printk(KERN_ERR "%s usb_register() failed. Error number %d\n",
1028 driver.name, r); 1040 driver.name, r);
1029 return r; 1041 return r;