aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 0c972e560cf3..4171259590b2 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -1517,18 +1517,18 @@ static void set_rx_mode(struct net_device *dev)
1517 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ 1517 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
1518 memset(mc_filter, 0xff, sizeof(mc_filter)); 1518 memset(mc_filter, 0xff, sizeof(mc_filter));
1519 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAll | AcceptMyPhys; 1519 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAll | AcceptMyPhys;
1520 } else if ((dev->mc_count > multicast_filter_limit) || 1520 } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
1521 (dev->flags & IFF_ALLMULTI)) { 1521 (dev->flags & IFF_ALLMULTI)) {
1522 /* Too many to match, or accept all multicasts. */ 1522 /* Too many to match, or accept all multicasts. */
1523 memset(mc_filter, 0xff, sizeof(mc_filter)); 1523 memset(mc_filter, 0xff, sizeof(mc_filter));
1524 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; 1524 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
1525 } else if (dev->mc_count) { 1525 } else if (!netdev_mc_empty(dev)) {
1526 struct dev_mc_list *mclist; 1526 struct dev_mc_list *mclist;
1527 int bit; 1527 int bit;
1528 int index; 1528 int index;
1529 int crc; 1529 int crc;
1530 memset (mc_filter, 0, sizeof (mc_filter)); 1530 memset (mc_filter, 0, sizeof (mc_filter));
1531 for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; 1531 for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev);
1532 i++, mclist = mclist->next) { 1532 i++, mclist = mclist->next) {
1533 crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr); 1533 crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
1534 for (index=0, bit=0; bit < 6; bit++, crc <<= 1) 1534 for (index=0, bit=0; bit < 6; bit++, crc <<= 1)