diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 21:21:04 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 21:21:04 +0100 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /drivers/net/arm/ixp4xx_eth.c | |
parent | Merge branch 'for-rmk/samsung6' of git://git.fluff.org/bjdooks/linux into dev... (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/amit/virtio-console (diff) | |
download | linux-988addf82e4c03739375279de73929580a2d4a6a.tar.xz linux-988addf82e4c03739375279de73929580a2d4a6a.zip |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'drivers/net/arm/ixp4xx_eth.c')
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index c3dfbdd2cdcf..6e2ae1d06df1 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c @@ -735,22 +735,25 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) static void eth_set_mcast_list(struct net_device *dev) { struct port *port = netdev_priv(dev); - struct dev_mc_list *mclist = dev->mc_list; + struct dev_mc_list *mclist; u8 diffs[ETH_ALEN], *addr; - int cnt = dev->mc_count, i; + int i; - if ((dev->flags & IFF_PROMISC) || !mclist || !cnt) { + if ((dev->flags & IFF_PROMISC) || netdev_mc_empty(dev)) { __raw_writel(DEFAULT_RX_CNTRL0 & ~RX_CNTRL0_ADDR_FLTR_EN, &port->regs->rx_control[0]); return; } memset(diffs, 0, ETH_ALEN); - addr = mclist->dmi_addr; /* first MAC address */ - while (--cnt && (mclist = mclist->next)) + addr = NULL; + netdev_for_each_mc_addr(mclist, dev) { + if (!addr) + addr = mclist->dmi_addr; /* first MAC address */ for (i = 0; i < ETH_ALEN; i++) diffs[i] |= addr[i] ^ mclist->dmi_addr[i]; + } for (i = 0; i < ETH_ALEN; i++) { __raw_writel(addr[i], &port->regs->mcast_addr[i]); |