diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-19 19:13:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-22 18:45:51 -0500 |
commit | 0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch) | |
tree | df82cf6637248439897153aca2f8fa6216003b61 /drivers/net/82596.c | |
parent | 3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff) |
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) | |||
1550 | return; | 1550 | return; |
1551 | cmd = &lp->mc_cmd; | 1551 | cmd = &lp->mc_cmd; |
1552 | cmd->cmd.command = CmdMulticastList; | 1552 | cmd->cmd.command = CmdMulticastList; |
1553 | cmd->mc_cnt = netdev_mc_count(dev) * 6; | 1553 | cmd->mc_cnt = cnt * ETH_ALEN; |
1554 | cp = cmd->mc_addrs; | 1554 | cp = cmd->mc_addrs; |
1555 | for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) { | 1555 | netdev_for_each_mc_addr(dmi, dev) { |
1556 | memcpy(cp, dmi->dmi_addr, 6); | 1556 | if (!cnt--) |
1557 | break; | ||
1558 | memcpy(cp, dmi->dmi_addr, ETH_ALEN); | ||
1557 | if (i596_debug > 1) | 1559 | if (i596_debug > 1) |
1558 | DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n", | 1560 | DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %pM\n", |
1559 | dev->name, cp)); | 1561 | dev->name, cp)); |
1562 | cp += ETH_ALEN; | ||
1560 | } | 1563 | } |
1561 | i596_add_cmd(dev, &cmd->cmd); | 1564 | i596_add_cmd(dev, &cmd->cmd); |
1562 | } | 1565 | } |