diff options
Diffstat (limited to 'drivers/net/eepro.c')
-rw-r--r-- | drivers/net/eepro.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index 94c59498cdb6..488bc13cc7e6 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -1288,8 +1288,9 @@ set_multicast_list(struct net_device *dev) | |||
1288 | short ioaddr = dev->base_addr; | 1288 | short ioaddr = dev->base_addr; |
1289 | unsigned short mode; | 1289 | unsigned short mode; |
1290 | struct dev_mc_list *dmi=dev->mc_list; | 1290 | struct dev_mc_list *dmi=dev->mc_list; |
1291 | int mc_count = mc_count; | ||
1291 | 1292 | ||
1292 | if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || dev->mc_count > 63) | 1293 | if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || mc_count > 63) |
1293 | { | 1294 | { |
1294 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ | 1295 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ |
1295 | mode = inb(ioaddr + REG2); | 1296 | mode = inb(ioaddr + REG2); |
@@ -1299,7 +1300,7 @@ set_multicast_list(struct net_device *dev) | |||
1299 | eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */ | 1300 | eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */ |
1300 | } | 1301 | } |
1301 | 1302 | ||
1302 | else if (dev->mc_count==0 ) | 1303 | else if (mc_count == 0) |
1303 | { | 1304 | { |
1304 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ | 1305 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ |
1305 | mode = inb(ioaddr + REG2); | 1306 | mode = inb(ioaddr + REG2); |
@@ -1329,9 +1330,9 @@ set_multicast_list(struct net_device *dev) | |||
1329 | outw(MC_SETUP, ioaddr + IO_PORT); | 1330 | outw(MC_SETUP, ioaddr + IO_PORT); |
1330 | outw(0, ioaddr + IO_PORT); | 1331 | outw(0, ioaddr + IO_PORT); |
1331 | outw(0, ioaddr + IO_PORT); | 1332 | outw(0, ioaddr + IO_PORT); |
1332 | outw(6*(dev->mc_count + 1), ioaddr + IO_PORT); | 1333 | outw(6 * (mc_count + 1), ioaddr + IO_PORT); |
1333 | 1334 | ||
1334 | for (i = 0; i < dev->mc_count; i++) | 1335 | for (i = 0; i < mc_count; i++) |
1335 | { | 1336 | { |
1336 | eaddrs=(unsigned short *)dmi->dmi_addr; | 1337 | eaddrs=(unsigned short *)dmi->dmi_addr; |
1337 | dmi=dmi->next; | 1338 | dmi=dmi->next; |
@@ -1348,7 +1349,7 @@ set_multicast_list(struct net_device *dev) | |||
1348 | outb(MC_SETUP, ioaddr); | 1349 | outb(MC_SETUP, ioaddr); |
1349 | 1350 | ||
1350 | /* Update the transmit queue */ | 1351 | /* Update the transmit queue */ |
1351 | i = lp->tx_end + XMT_HEADER + 6*(dev->mc_count + 1); | 1352 | i = lp->tx_end + XMT_HEADER + 6 * (mc_count + 1); |
1352 | 1353 | ||
1353 | if (lp->tx_start != lp->tx_end) | 1354 | if (lp->tx_start != lp->tx_end) |
1354 | { | 1355 | { |
@@ -1380,8 +1381,8 @@ set_multicast_list(struct net_device *dev) | |||
1380 | break; | 1381 | break; |
1381 | } else if ((i & 0x0f) == 0x03) { /* MC-Done */ | 1382 | } else if ((i & 0x0f) == 0x03) { /* MC-Done */ |
1382 | printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n", | 1383 | printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n", |
1383 | dev->name, dev->mc_count, | 1384 | dev->name, mc_count, |
1384 | dev->mc_count > 1 ? "es":""); | 1385 | mc_count > 1 ? "es":""); |
1385 | break; | 1386 | break; |
1386 | } | 1387 | } |
1387 | } | 1388 | } |