diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-23 04:19:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 05:07:30 -0500 |
commit | f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (patch) | |
tree | 8a1d9a37bc057440220a5ad23231e0fe974b93f6 /drivers/net/ni52.c | |
parent | 52c793f24054f5dc30d228e37e0e19cc8313f086 (diff) |
net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2
removed some needless checks and also corrected bug in lp486e (dmi was passed
instead of dmi->dmi_addr)
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ni52.c')
-rw-r--r-- | drivers/net/ni52.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index 497c6d514a68..05c29c2cef2a 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -596,7 +596,7 @@ static int init586(struct net_device *dev) | |||
596 | struct iasetup_cmd_struct __iomem *ias_cmd; | 596 | struct iasetup_cmd_struct __iomem *ias_cmd; |
597 | struct tdr_cmd_struct __iomem *tdr_cmd; | 597 | struct tdr_cmd_struct __iomem *tdr_cmd; |
598 | struct mcsetup_cmd_struct __iomem *mc_cmd; | 598 | struct mcsetup_cmd_struct __iomem *mc_cmd; |
599 | struct dev_mc_list *dmi = dev->mc_list; | 599 | struct dev_mc_list *dmi; |
600 | int num_addrs = netdev_mc_count(dev); | 600 | int num_addrs = netdev_mc_count(dev); |
601 | 601 | ||
602 | ptr = p->scb + 1; | 602 | ptr = p->scb + 1; |
@@ -724,9 +724,9 @@ static int init586(struct net_device *dev) | |||
724 | writew(0xffff, &mc_cmd->cmd_link); | 724 | writew(0xffff, &mc_cmd->cmd_link); |
725 | writew(num_addrs * 6, &mc_cmd->mc_cnt); | 725 | writew(num_addrs * 6, &mc_cmd->mc_cnt); |
726 | 726 | ||
727 | for (i = 0; i < num_addrs; i++, dmi = dmi->next) | 727 | i = 0; |
728 | memcpy_toio(mc_cmd->mc_list[i], | 728 | netdev_for_each_mc_addr(dmi, dev) |
729 | dmi->dmi_addr, 6); | 729 | memcpy_toio(mc_cmd->mc_list[i++], dmi->dmi_addr, 6); |
730 | 730 | ||
731 | writew(make16(mc_cmd), &p->scb->cbl_offset); | 731 | writew(make16(mc_cmd), &p->scb->cbl_offset); |
732 | writeb(CUC_START, &p->scb->cmd_cuc); | 732 | writeb(CUC_START, &p->scb->cmd_cuc); |