summaryrefslogtreecommitdiff
path: root/drivers/net/pcmcia/nmclan_cs.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 08:48:47 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-19 13:15:50 -0800
commit91fea5858418127ad33e0060f726c62be0047eaf (patch)
tree3630384b91fe22565ac4eadc7dddd0d7720bf958 /drivers/net/pcmcia/nmclan_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/nmclan_cs.c')
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index c42a31a97fa3..c717b143f11a 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -1475,8 +1475,7 @@ static void set_multicast_list(struct net_device *dev)
{
mace_private *lp = netdev_priv(dev);
int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */
- int i;
- struct dev_mc_list *dmi = dev->mc_list;
+ struct dev_mc_list *dmi;
#ifdef PCMCIA_DEBUG
{
@@ -1496,9 +1495,8 @@ static void set_multicast_list(struct net_device *dev)
if (num_addrs > 0) {
/* Calculate multicast logical address filter */
memset(lp->multicast_ladrf, 0, MACE_LADRF_LEN);
- for (i = 0; i < netdev_mc_count(dev); i++) {
+ netdev_for_each_mc_addr(dmi, dev) {
memcpy(adr, dmi->dmi_addr, ETHER_ADDR_LEN);
- dmi = dmi->next;
BuildLAF(lp->multicast_ladrf, adr);
}
}