Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dm9601: convert to use mc helpers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiri Pirko and committed by
David S. Miller
2cc04d27 6d55ad4a

+5 -5
+5 -5
drivers/net/usb/dm9601.c
··· 381 381 382 382 if (net->flags & IFF_PROMISC) { 383 383 rx_ctl |= 0x02; 384 - } else if (net->flags & IFF_ALLMULTI || net->mc_count > DM_MAX_MCAST) { 384 + } else if (net->flags & IFF_ALLMULTI || 385 + netdev_mc_count(net) > DM_MAX_MCAST) { 385 386 rx_ctl |= 0x04; 386 - } else if (net->mc_count) { 387 - struct dev_mc_list *mc_list = net->mc_list; 388 - int i; 387 + } else if (!netdev_mc_empty(net)) { 388 + struct dev_mc_list *mc_list; 389 389 390 - for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) { 390 + netdev_for_each_mc_addr(mc_list, net) { 391 391 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; 392 392 hashes[crc >> 3] |= 1 << (crc & 0x7); 393 393 }