aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/82596.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/82596.c')
-rw-r--r--drivers/net/82596.c9
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 }