diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/usb/kaweth.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/usb/kaweth.c')
-rw-r--r-- | drivers/net/usb/kaweth.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index e391ef969c28..c4c334d9770f 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -145,6 +145,7 @@ static struct usb_device_id usb_klsi_table[] = { | |||
145 | { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */ | 145 | { USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */ |
146 | { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */ | 146 | { USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */ |
147 | { USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */ | 147 | { USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */ |
148 | { USB_DEVICE(0x07c9, 0xb010) }, /* Allied Telesyn AT-USB10 USB Ethernet Adapter */ | ||
148 | { USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */ | 149 | { USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */ |
149 | { USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */ | 150 | { USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */ |
150 | { USB_DEVICE(0x085a, 0x0008) }, /* PortGear Ethernet Adapter */ | 151 | { USB_DEVICE(0x085a, 0x0008) }, /* PortGear Ethernet Adapter */ |
@@ -471,16 +472,7 @@ static int kaweth_reset(struct kaweth_device *kaweth) | |||
471 | int result; | 472 | int result; |
472 | 473 | ||
473 | dbg("kaweth_reset(%p)", kaweth); | 474 | dbg("kaweth_reset(%p)", kaweth); |
474 | result = kaweth_control(kaweth, | 475 | result = usb_reset_configuration(kaweth->dev); |
475 | usb_sndctrlpipe(kaweth->dev, 0), | ||
476 | USB_REQ_SET_CONFIGURATION, | ||
477 | 0, | ||
478 | kaweth->dev->config[0].desc.bConfigurationValue, | ||
479 | 0, | ||
480 | NULL, | ||
481 | 0, | ||
482 | KAWETH_CONTROL_TIMEOUT); | ||
483 | |||
484 | mdelay(10); | 476 | mdelay(10); |
485 | 477 | ||
486 | dbg("kaweth_reset() returns %d.",result); | 478 | dbg("kaweth_reset() returns %d.",result); |
@@ -725,7 +717,7 @@ static int kaweth_open(struct net_device *net) | |||
725 | return 0; | 717 | return 0; |
726 | 718 | ||
727 | err_out: | 719 | err_out: |
728 | usb_autopm_enable(kaweth->intf); | 720 | usb_autopm_put_interface(kaweth->intf); |
729 | return -EIO; | 721 | return -EIO; |
730 | } | 722 | } |
731 | 723 | ||
@@ -762,7 +754,7 @@ static int kaweth_close(struct net_device *net) | |||
762 | 754 | ||
763 | kaweth->status &= ~KAWETH_STATUS_CLOSING; | 755 | kaweth->status &= ~KAWETH_STATUS_CLOSING; |
764 | 756 | ||
765 | usb_autopm_enable(kaweth->intf); | 757 | usb_autopm_put_interface(kaweth->intf); |
766 | 758 | ||
767 | return 0; | 759 | return 0; |
768 | } | 760 | } |
@@ -890,7 +882,7 @@ static void kaweth_set_rx_mode(struct net_device *net) | |||
890 | if (net->flags & IFF_PROMISC) { | 882 | if (net->flags & IFF_PROMISC) { |
891 | packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS; | 883 | packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS; |
892 | } | 884 | } |
893 | else if ((net->mc_count) || (net->flags & IFF_ALLMULTI)) { | 885 | else if (!netdev_mc_empty(net) || (net->flags & IFF_ALLMULTI)) { |
894 | packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST; | 886 | packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST; |
895 | } | 887 | } |
896 | 888 | ||