1
0
Fork 0

net: dm9601: convert to use mc helpers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Jiri Pirko 2010-02-05 02:51:24 +00:00 committed by David S. Miller
parent 6d55ad4a53
commit 2cc04d27c4
1 changed files with 5 additions and 5 deletions

View File

@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net)
if (net->flags & IFF_PROMISC) {
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;
} else if (net->mc_count) {
struct dev_mc_list *mc_list = net->mc_list;
int i;
} else if (!netdev_mc_empty(net)) {
struct dev_mc_list *mc_list;
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;
hashes[crc >> 3] |= 1 << (crc & 0x7);
}