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/catc.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/catc.c')
-rw-r--r-- | drivers/net/usb/catc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 2bed6b087d16..602e123b2741 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/string.h> | 38 | #include <linux/string.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/netdevice.h> | 39 | #include <linux/netdevice.h> |
41 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
42 | #include <linux/skbuff.h> | 41 | #include <linux/skbuff.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include <linux/ethtool.h> | 43 | #include <linux/ethtool.h> |
45 | #include <linux/crc32.h> | 44 | #include <linux/crc32.h> |
46 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
46 | #include <linux/gfp.h> | ||
47 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
48 | 48 | ||
49 | #undef DEBUG | 49 | #undef DEBUG |
@@ -436,8 +436,8 @@ static netdev_tx_t catc_start_xmit(struct sk_buff *skb, | |||
436 | clear_bit(TX_RUNNING, &catc->flags); | 436 | clear_bit(TX_RUNNING, &catc->flags); |
437 | } | 437 | } |
438 | 438 | ||
439 | if ((catc->is_f5u011 && catc->tx_ptr) | 439 | if ((catc->is_f5u011 && catc->tx_ptr) || |
440 | || (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2)))) | 440 | (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2)))) |
441 | netif_stop_queue(netdev); | 441 | netif_stop_queue(netdev); |
442 | 442 | ||
443 | spin_unlock_irqrestore(&catc->tx_lock, flags); | 443 | spin_unlock_irqrestore(&catc->tx_lock, flags); |
@@ -632,7 +632,6 @@ static void catc_set_multicast_list(struct net_device *netdev) | |||
632 | struct dev_mc_list *mc; | 632 | struct dev_mc_list *mc; |
633 | u8 broadcast[6]; | 633 | u8 broadcast[6]; |
634 | u8 rx = RxEnable | RxPolarity | RxMultiCast; | 634 | u8 rx = RxEnable | RxPolarity | RxMultiCast; |
635 | int i; | ||
636 | 635 | ||
637 | memset(broadcast, 0xff, 6); | 636 | memset(broadcast, 0xff, 6); |
638 | memset(catc->multicast, 0, 64); | 637 | memset(catc->multicast, 0, 64); |
@@ -648,7 +647,7 @@ static void catc_set_multicast_list(struct net_device *netdev) | |||
648 | if (netdev->flags & IFF_ALLMULTI) { | 647 | if (netdev->flags & IFF_ALLMULTI) { |
649 | memset(catc->multicast, 0xff, 64); | 648 | memset(catc->multicast, 0xff, 64); |
650 | } else { | 649 | } else { |
651 | for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next) { | 650 | netdev_for_each_mc_addr(mc, netdev) { |
652 | u32 crc = ether_crc_le(6, mc->dmi_addr); | 651 | u32 crc = ether_crc_le(6, mc->dmi_addr); |
653 | if (!catc->is_f5u011) { | 652 | if (!catc->is_f5u011) { |
654 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); | 653 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); |
@@ -897,11 +896,9 @@ static int catc_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
897 | f5u011_rxmode(catc, catc->rxmode); | 896 | f5u011_rxmode(catc, catc->rxmode); |
898 | } | 897 | } |
899 | dbg("Init done."); | 898 | dbg("Init done."); |
900 | printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, ", | 899 | printk(KERN_INFO "%s: %s USB Ethernet at usb-%s-%s, %pM.\n", |
901 | netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate", | 900 | netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate", |
902 | usbdev->bus->bus_name, usbdev->devpath); | 901 | usbdev->bus->bus_name, usbdev->devpath, netdev->dev_addr); |
903 | for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]); | ||
904 | printk("%2.2x.\n", netdev->dev_addr[i]); | ||
905 | usb_set_intfdata(intf, catc); | 902 | usb_set_intfdata(intf, catc); |
906 | 903 | ||
907 | SET_NETDEV_DEV(netdev, &intf->dev); | 904 | SET_NETDEV_DEV(netdev, &intf->dev); |