diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-20 03:13:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-23 02:45:51 +0300 |
commit | 0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch) | |
tree | df82cf6637248439897153aca2f8fa6216003b61 /drivers/net/82596.c | |
parent | 3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff) | |
download | linux-0ddf477b8a9b02412a6cabd51c486998811c7dd1.tar.xz |
net: convert multiple drivers to use netdev_for_each_mc_addr, part3
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/82596.c')
-rw-r--r-- | drivers/net/82596.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 638ce3b29854..f94d17d78bb0 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c @@ -1550,13 +1550,16 @@ static void set_multicast_list(struct net_device *dev) return; cmd = &lp->mc_cmd; cmd->cmd.command = CmdMulticastList; - cmd->mc_cnt = netdev_mc_count(dev) * 6; + cmd->mc_cnt = cnt * ETH_ALEN; cp = cmd->mc_addrs; - for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) { - memcpy(cp, dmi->dmi_addr, 6); + netdev_for_each_mc_addr(dmi, dev) { + if (!cnt--) + break; + memcpy(cp, dmi->dmi_addr, ETH_ALEN); if (i596_debug > 1) DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n", dev->name, cp)); + cp += ETH_ALEN; } i596_add_cmd(dev, &cmd->cmd); } |