aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lib82596.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/lib82596.c')
-rw-r--r--drivers/net/lib82596.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c
index b117f7f8b19..443c39a3732 100644
--- a/drivers/net/lib82596.c
+++ b/drivers/net/lib82596.c
@@ -1094,11 +1094,9 @@ static int __devinit i82596_probe(struct net_device *dev)
1094 return i; 1094 return i;
1095 }; 1095 };
1096 1096
1097 DEB(DEB_PROBE, printk(KERN_INFO "%s: 82596 at %#3lx,", 1097 DEB(DEB_PROBE, printk(KERN_INFO "%s: 82596 at %#3lx, %pM IRQ %d.\n",
1098 dev->name, dev->base_addr)); 1098 dev->name, dev->base_addr, dev->dev_addr,
1099 for (i = 0; i < 6; i++) 1099 dev->irq));
1100 DEB(DEB_PROBE, printk(" %2.2X", dev->dev_addr[i]));
1101 DEB(DEB_PROBE, printk(" IRQ %d.\n", dev->irq));
1102 DEB(DEB_INIT, printk(KERN_INFO 1100 DEB(DEB_INIT, printk(KERN_INFO
1103 "%s: dma at 0x%p (%d bytes), lp->scb at 0x%p\n", 1101 "%s: dma at 0x%p (%d bytes), lp->scb at 0x%p\n",
1104 dev->name, dma, (int)sizeof(struct i596_dma), 1102 dev->name, dma, (int)sizeof(struct i596_dma),
@@ -1382,31 +1380,32 @@ static void set_multicast_list(struct net_device *dev)
1382 } 1380 }
1383 } 1381 }
1384 1382
1385 cnt = dev->mc_count; 1383 cnt = netdev_mc_count(dev);
1386 if (cnt > MAX_MC_CNT) { 1384 if (cnt > MAX_MC_CNT) {
1387 cnt = MAX_MC_CNT; 1385 cnt = MAX_MC_CNT;
1388 printk(KERN_NOTICE "%s: Only %d multicast addresses supported", 1386 printk(KERN_NOTICE "%s: Only %d multicast addresses supported",
1389 dev->name, cnt); 1387 dev->name, cnt);
1390 } 1388 }
1391 1389
1392 if (dev->mc_count > 0) { 1390 if (!netdev_mc_empty(dev)) {
1393 struct dev_mc_list *dmi; 1391 struct dev_mc_list *dmi;
1394 unsigned char *cp; 1392 unsigned char *cp;
1395 struct mc_cmd *cmd; 1393 struct mc_cmd *cmd;
1396 1394
1397 cmd = &dma->mc_cmd; 1395 cmd = &dma->mc_cmd;
1398 cmd->cmd.command = SWAP16(CmdMulticastList); 1396 cmd->cmd.command = SWAP16(CmdMulticastList);
1399 cmd->mc_cnt = SWAP16(dev->mc_count * 6); 1397 cmd->mc_cnt = SWAP16(netdev_mc_count(dev) * 6);
1400 cp = cmd->mc_addrs; 1398 cp = cmd->mc_addrs;
1401 for (dmi = dev->mc_list; 1399 netdev_for_each_mc_addr(dmi, dev) {
1402 cnt && dmi != NULL; 1400 if (!cnt--)
1403 dmi = dmi->next, cnt--, cp += 6) { 1401 break;
1404 memcpy(cp, dmi->dmi_addr, 6); 1402 memcpy(cp, dmi->dmi_addr, 6);
1405 if (i596_debug > 1) 1403 if (i596_debug > 1)
1406 DEB(DEB_MULTI, 1404 DEB(DEB_MULTI,
1407 printk(KERN_DEBUG 1405 printk(KERN_DEBUG
1408 "%s: Adding address %pM\n", 1406 "%s: Adding address %pM\n",
1409 dev->name, cp)); 1407 dev->name, cp));
1408 cp += 6;
1410 } 1409 }
1411 DMA_WBACK_INV(dev, &dma->mc_cmd, sizeof(struct mc_cmd)); 1410 DMA_WBACK_INV(dev, &dma->mc_cmd, sizeof(struct mc_cmd));
1412 i596_add_cmd(dev, &cmd->cmd); 1411 i596_add_cmd(dev, &cmd->cmd);