summaryrefslogtreecommitdiffstats
path: root/drivers/net/amd8111e.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/net/amd8111e.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index bb27b27d9672..bdffdfb4c88b 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1387,7 +1387,8 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
}
else
writel( PROM, lp->mmio + CMD2);
- if(dev->flags & IFF_ALLMULTI || dev->mc_count > MAX_FILTER_SIZE){
+ if (dev->flags & IFF_ALLMULTI ||
+ netdev_mc_count(dev) > MAX_FILTER_SIZE) {
/* get all multicast packet */
mc_filter[1] = mc_filter[0] = 0xffffffff;
lp->mc_list = dev->mc_list;
@@ -1395,7 +1396,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF);
return;
}
- if( dev->mc_count == 0 ){
+ if (netdev_mc_empty(dev)) {
/* get only own packets */
mc_filter[1] = mc_filter[0] = 0;
lp->mc_list = NULL;
@@ -1409,7 +1410,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
lp->options |= OPTION_MULTICAST_ENABLE;
lp->mc_list = dev->mc_list;
mc_filter[1] = mc_filter[0] = 0;
- for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count;
+ for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < netdev_mc_count(dev);
i++, mc_ptr = mc_ptr->next) {
bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f;
mc_filter[bit_num >> 5] |= 1 << (bit_num & 31);