aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/mcs7830.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/mcs7830.c')
-rw-r--r--drivers/net/usb/mcs7830.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
index 34665137f2c3..70978219e98a 100644
--- a/drivers/net/usb/mcs7830.c
+++ b/drivers/net/usb/mcs7830.c
@@ -452,15 +452,13 @@ static void mcs7830_data_set_multicast(struct net_device *net)
452 * for our 8 byte filter buffer 452 * for our 8 byte filter buffer
453 * to avoid allocating memory that 453 * to avoid allocating memory that
454 * is tricky to free later */ 454 * is tricky to free later */
455 struct dev_mc_list *mc_list = net->mc_list; 455 struct dev_mc_list *mc_list;
456 u32 crc_bits; 456 u32 crc_bits;
457 int i;
458 457
459 /* Build the multicast hash filter. */ 458 /* Build the multicast hash filter. */
460 for (i = 0; i < netdev_mc_count(net); i++) { 459 netdev_for_each_mc_addr(mc_list, net) {
461 crc_bits = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; 460 crc_bits = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
462 data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7); 461 data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7);
463 mc_list = mc_list->next;
464 } 462 }
465 } 463 }
466} 464}