Commit 2cc04d27 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: dm9601: convert to use mc helpers

Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6d55ad4a
...@@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net) ...@@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net)
if (net->flags & IFF_PROMISC) { if (net->flags & IFF_PROMISC) {
rx_ctl |= 0x02; rx_ctl |= 0x02;
} else if (net->flags & IFF_ALLMULTI || net->mc_count > DM_MAX_MCAST) { } else if (net->flags & IFF_ALLMULTI ||
netdev_mc_count(net) > DM_MAX_MCAST) {
rx_ctl |= 0x04; rx_ctl |= 0x04;
} else if (net->mc_count) { } else if (!netdev_mc_empty(net)) {
struct dev_mc_list *mc_list = net->mc_list; struct dev_mc_list *mc_list;
int i;
for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) { netdev_for_each_mc_addr(mc_list, net) {
u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
hashes[crc >> 3] |= 1 << (crc & 0x7); hashes[crc >> 3] |= 1 << (crc & 0x7);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment