aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/axnet_cs.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 03:48:47 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-19 16:15:50 -0500
commit91fea5858418127ad33e0060f726c62be0047eaf (patch)
tree3630384b91fe22565ac4eadc7dddd0d7720bf958 /drivers/net/pcmcia/axnet_cs.c
parent2f1eb65f366b81aa3c22c31e6e8db26168777ec5 (diff)
net/pcmcia: convert to use netdev_for_each_mc_addr
removed fill_multicast_tbl function in smc91c92_cs and do the work inline rewritten set_addresses function in xirc2ps_cs. This was kinda headache. Simulated the original and new functions and they bahave the same. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia/axnet_cs.c')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 2ee57bd52a01..d90e0fcdbce1 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -1625,8 +1625,7 @@ static inline void make_mc_bits(u8 *bits, struct net_device *dev)
1625 struct dev_mc_list *dmi; 1625 struct dev_mc_list *dmi;
1626 u32 crc; 1626 u32 crc;
1627 1627
1628 for (dmi=dev->mc_list; dmi; dmi=dmi->next) { 1628 netdev_for_each_mc_addr(dmi, dev) {
1629
1630 crc = ether_crc(ETH_ALEN, dmi->dmi_addr); 1629 crc = ether_crc(ETH_ALEN, dmi->dmi_addr);
1631 /* 1630 /*
1632 * The 8390 uses the 6 most significant bits of the 1631 * The 8390 uses the 6 most significant bits of the
@@ -1652,7 +1651,7 @@ static void do_set_multicast_list(struct net_device *dev)
1652 1651
1653 if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) { 1652 if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) {
1654 memset(ei_local->mcfilter, 0, 8); 1653 memset(ei_local->mcfilter, 0, 8);
1655 if (dev->mc_list) 1654 if (!netdev_mc_empty(dev))
1656 make_mc_bits(ei_local->mcfilter, dev); 1655 make_mc_bits(ei_local->mcfilter, dev);
1657 } else { 1656 } else {
1658 /* set to accept-all */ 1657 /* set to accept-all */
@@ -1668,7 +1667,7 @@ static void do_set_multicast_list(struct net_device *dev)
1668 1667
1669 if(dev->flags&IFF_PROMISC) 1668 if(dev->flags&IFF_PROMISC)
1670 outb_p(E8390_RXCONFIG | 0x58, e8390_base + EN0_RXCR); 1669 outb_p(E8390_RXCONFIG | 0x58, e8390_base + EN0_RXCR);
1671 else if(dev->flags&IFF_ALLMULTI || dev->mc_list) 1670 else if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev))
1672 outb_p(E8390_RXCONFIG | 0x48, e8390_base + EN0_RXCR); 1671 outb_p(E8390_RXCONFIG | 0x48, e8390_base + EN0_RXCR);
1673 else 1672 else
1674 outb_p(E8390_RXCONFIG | 0x40, e8390_base + EN0_RXCR); 1673 outb_p(E8390_RXCONFIG | 0x40, e8390_base + EN0_RXCR);