summaryrefslogtreecommitdiffstats
path: root/drivers/net/r6040.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-10-21 08:43:05 -0700
committerDavid S. Miller <davem@davemloft.net>2010-10-21 08:43:05 -0700
commit2198a10b501fd4443430cb17e065a9e859cc58c9 (patch)
tree87f3781d293da0f8f8f61615905eb7bf62b7c128 /drivers/net/r6040.c
parent9941fb62762253774cc6177d0b9172ece5133fe1 (diff)
parentdb5a753bf198ef7a50e17d2ff358adf37efe8648 (diff)
downloadlinux-stable-2198a10b501fd4443430cb17e065a9e859cc58c9.tar.gz
linux-stable-2198a10b501fd4443430cb17e065a9e859cc58c9.tar.bz2
linux-stable-2198a10b501fd4443430cb17e065a9e859cc58c9.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/core/dev.c
Diffstat (limited to 'drivers/net/r6040.c')
-rw-r--r--drivers/net/r6040.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 68a84198eb05..0b014c894686 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -908,16 +908,18 @@ static void r6040_multicast_list(struct net_device *dev)
/* Multicast Address 1~4 case */
i = 0;
netdev_for_each_mc_addr(ha, dev) {
- if (i < MCAST_MAX) {
- adrp = (u16 *) ha->addr;
- iowrite16(adrp[0], ioaddr + MID_1L + 8 * i);
- iowrite16(adrp[1], ioaddr + MID_1M + 8 * i);
- iowrite16(adrp[2], ioaddr + MID_1H + 8 * i);
- } else {
- iowrite16(0xffff, ioaddr + MID_1L + 8 * i);
- iowrite16(0xffff, ioaddr + MID_1M + 8 * i);
- iowrite16(0xffff, ioaddr + MID_1H + 8 * i);
- }
+ if (i >= MCAST_MAX)
+ break;
+ adrp = (u16 *) ha->addr;
+ iowrite16(adrp[0], ioaddr + MID_1L + 8 * i);
+ iowrite16(adrp[1], ioaddr + MID_1M + 8 * i);
+ iowrite16(adrp[2], ioaddr + MID_1H + 8 * i);
+ i++;
+ }
+ while (i < MCAST_MAX) {
+ iowrite16(0xffff, ioaddr + MID_1L + 8 * i);
+ iowrite16(0xffff, ioaddr + MID_1M + 8 * i);
+ iowrite16(0xffff, ioaddr + MID_1H + 8 * i);
i++;
}
}