diff options
Diffstat (limited to 'drivers/net/usb/catc.c')
-rw-r--r-- | drivers/net/usb/catc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 5a13660ebd17..96f1ebe0d348 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -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,9 +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; | 650 | netdev_for_each_mc_addr(mc, netdev) { |
652 | mc && i < netdev_mc_count(netdev); | ||
653 | i++, mc = mc->next) { | ||
654 | u32 crc = ether_crc_le(6, mc->dmi_addr); | 651 | u32 crc = ether_crc_le(6, mc->dmi_addr); |
655 | if (!catc->is_f5u011) { | 652 | if (!catc->is_f5u011) { |
656 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); | 653 | catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7); |