aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/amd8111e.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/amd8111e.c')
-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)
1387 } 1387 }
1388 else 1388 else
1389 writel( PROM, lp->mmio + CMD2); 1389 writel( PROM, lp->mmio + CMD2);
1390 if(dev->flags & IFF_ALLMULTI || dev->mc_count > MAX_FILTER_SIZE){ 1390 if (dev->flags & IFF_ALLMULTI ||
1391 netdev_mc_count(dev) > MAX_FILTER_SIZE) {
1391 /* get all multicast packet */ 1392 /* get all multicast packet */
1392 mc_filter[1] = mc_filter[0] = 0xffffffff; 1393 mc_filter[1] = mc_filter[0] = 0xffffffff;
1393 lp->mc_list = dev->mc_list; 1394 lp->mc_list = dev->mc_list;
@@ -1395,7 +1396,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
1395 amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); 1396 amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF);
1396 return; 1397 return;
1397 } 1398 }
1398 if( dev->mc_count == 0 ){ 1399 if (netdev_mc_empty(dev)) {
1399 /* get only own packets */ 1400 /* get only own packets */
1400 mc_filter[1] = mc_filter[0] = 0; 1401 mc_filter[1] = mc_filter[0] = 0;
1401 lp->mc_list = NULL; 1402 lp->mc_list = NULL;
@@ -1409,7 +1410,7 @@ static void amd8111e_set_multicast_list(struct net_device *dev)
1409 lp->options |= OPTION_MULTICAST_ENABLE; 1410 lp->options |= OPTION_MULTICAST_ENABLE;
1410 lp->mc_list = dev->mc_list; 1411 lp->mc_list = dev->mc_list;
1411 mc_filter[1] = mc_filter[0] = 0; 1412 mc_filter[1] = mc_filter[0] = 0;
1412 for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count; 1413 for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < netdev_mc_count(dev);
1413 i++, mc_ptr = mc_ptr->next) { 1414 i++, mc_ptr = mc_ptr->next) {
1414 bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f; 1415 bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f;
1415 mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); 1416 mc_filter[bit_num >> 5] |= 1 << (bit_num & 31);