summaryrefslogtreecommitdiffstats
path: root/drivers/net/eepro.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-22 10:22:26 +0100
committerDavid S. Miller <davem@davemloft.net>2010-02-23 00:45:52 +0100
commit48e2f183cb1709600012265a2e723f45a350d5fe (patch)
tree608368bda6f159342c307deca3b03998d25434c8 /drivers/net/eepro.c
parente1000: convert to use netdev_for_each_mc_addr (diff)
downloadlinux-48e2f183cb1709600012265a2e723f45a350d5fe.tar.xz
linux-48e2f183cb1709600012265a2e723f45a350d5fe.zip
net: convert multiple drivers to use netdev_for_each_mc_addr, part4
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/eepro.c')
-rw-r--r--drivers/net/eepro.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index 5f73ab22db16..1b05bdf62c3c 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -1287,7 +1287,7 @@ set_multicast_list(struct net_device *dev)
struct eepro_local *lp = netdev_priv(dev);
short ioaddr = dev->base_addr;
unsigned short mode;
- struct dev_mc_list *dmi=dev->mc_list;
+ struct dev_mc_list *dmi;
int mc_count = netdev_mc_count(dev);
if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || mc_count > 63)
@@ -1332,10 +1332,8 @@ set_multicast_list(struct net_device *dev)
outw(0, ioaddr + IO_PORT);
outw(6 * (mc_count + 1), ioaddr + IO_PORT);
- for (i = 0; i < mc_count; i++)
- {
- eaddrs=(unsigned short *)dmi->dmi_addr;
- dmi=dmi->next;
+ netdev_for_each_mc_addr(dmi, dev) {
+ eaddrs = (unsigned short *) dmi->dmi_addr;
outw(*eaddrs++, ioaddr + IO_PORT);
outw(*eaddrs++, ioaddr + IO_PORT);
outw(*eaddrs++, ioaddr + IO_PORT);