aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atp.c')
-rw-r--r--drivers/net/atp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index 2f8261c9614a..a841feb5df20 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -861,7 +861,7 @@ static void set_rx_mode_8002(struct net_device *dev)
861 struct net_local *lp = netdev_priv(dev); 861 struct net_local *lp = netdev_priv(dev);
862 long ioaddr = dev->base_addr; 862 long ioaddr = dev->base_addr;
863 863
864 if (dev->mc_count > 0 || (dev->flags & (IFF_ALLMULTI|IFF_PROMISC))) 864 if (!netdev_mc_empty(dev) || (dev->flags & (IFF_ALLMULTI|IFF_PROMISC)))
865 lp->addr_mode = CMR2h_PROMISC; 865 lp->addr_mode = CMR2h_PROMISC;
866 else 866 else
867 lp->addr_mode = CMR2h_Normal; 867 lp->addr_mode = CMR2h_Normal;
@@ -877,7 +877,8 @@ static void set_rx_mode_8012(struct net_device *dev)
877 877
878 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ 878 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
879 new_mode = CMR2h_PROMISC; 879 new_mode = CMR2h_PROMISC;
880 } else if ((dev->mc_count > 1000) || (dev->flags & IFF_ALLMULTI)) { 880 } else if ((netdev_mc_count(dev) > 1000) ||
881 (dev->flags & IFF_ALLMULTI)) {
881 /* Too many to filter perfectly -- accept all multicasts. */ 882 /* Too many to filter perfectly -- accept all multicasts. */
882 memset(mc_filter, 0xff, sizeof(mc_filter)); 883 memset(mc_filter, 0xff, sizeof(mc_filter));
883 new_mode = CMR2h_Normal; 884 new_mode = CMR2h_Normal;
@@ -885,7 +886,7 @@ static void set_rx_mode_8012(struct net_device *dev)
885 struct dev_mc_list *mclist; 886 struct dev_mc_list *mclist;
886 887
887 memset(mc_filter, 0, sizeof(mc_filter)); 888 memset(mc_filter, 0, sizeof(mc_filter));
888 for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; 889 for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev);
889 i++, mclist = mclist->next) 890 i++, mclist = mclist->next)
890 { 891 {
891 int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; 892 int filterbit = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f;