aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 809ec440b8eb..258d6f396186 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -1420,7 +1420,7 @@ set_addresses(struct net_device *dev)
1420 kio_addr_t ioaddr = dev->base_addr; 1420 kio_addr_t ioaddr = dev->base_addr;
1421 local_info_t *lp = netdev_priv(dev); 1421 local_info_t *lp = netdev_priv(dev);
1422 struct dev_mc_list *dmi = dev->mc_list; 1422 struct dev_mc_list *dmi = dev->mc_list;
1423 char *addr; 1423 unsigned char *addr;
1424 int i,j,k,n; 1424 int i,j,k,n;
1425 1425
1426 SelectPage(k=0x50); 1426 SelectPage(k=0x50);
@@ -1429,6 +1429,9 @@ set_addresses(struct net_device *dev)
1429 if (++n > 9) 1429 if (++n > 9)
1430 break; 1430 break;
1431 i = 0; 1431 i = 0;
1432 if (n > 1 && n <= dev->mc_count && dmi) {
1433 dmi = dmi->next;
1434 }
1432 } 1435 }
1433 if (j > 15) { 1436 if (j > 15) {
1434 j = 8; 1437 j = 8;
@@ -1436,10 +1439,9 @@ set_addresses(struct net_device *dev)
1436 SelectPage(k); 1439 SelectPage(k);
1437 } 1440 }
1438 1441
1439 if (n && n <= dev->mc_count && dmi) { 1442 if (n && n <= dev->mc_count && dmi)
1440 addr = dmi->dmi_addr; 1443 addr = dmi->dmi_addr;
1441 dmi = dmi->next; 1444 else
1442 } else
1443 addr = dev->dev_addr; 1445 addr = dev->dev_addr;
1444 1446
1445 if (lp->mohawk) 1447 if (lp->mohawk)
@@ -1465,10 +1467,10 @@ set_multicast_list(struct net_device *dev)
1465 if (dev->flags & IFF_PROMISC) { /* snoop */ 1467 if (dev->flags & IFF_PROMISC) { /* snoop */
1466 PutByte(XIRCREG42_SWC1, 0x06); /* set MPE and PME */ 1468 PutByte(XIRCREG42_SWC1, 0x06); /* set MPE and PME */
1467 } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) { 1469 } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) {
1468 PutByte(XIRCREG42_SWC1, 0x06); /* set MPE */ 1470 PutByte(XIRCREG42_SWC1, 0x02); /* set MPE */
1469 } else if (dev->mc_count) { 1471 } else if (dev->mc_count) {
1470 /* the chip can filter 9 addresses perfectly */ 1472 /* the chip can filter 9 addresses perfectly */
1471 PutByte(XIRCREG42_SWC1, 0x00); 1473 PutByte(XIRCREG42_SWC1, 0x01);
1472 SelectPage(0x40); 1474 SelectPage(0x40);
1473 PutByte(XIRCREG40_CMD0, Offline); 1475 PutByte(XIRCREG40_CMD0, Offline);
1474 set_addresses(dev); 1476 set_addresses(dev);