From: Richard Cochran Date: Tue, 1 Jun 2010 07:16:53 +0000 (-0700) Subject: ixp4xx: Support the all multicast flag on the NPE devices. X-Git-Tag: v2.6.36-rc1~571^2~708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=95e3bb7aff59d3b6c73d55d1a386ee53b8363fb5;p=platform%2Fupstream%2Fkernel-adaptation-pc.git ixp4xx: Support the all multicast flag on the NPE devices. This patch adds support for the IFF_ALLMULTI flag. Previously only the IFF_PROMISC flag was supported. Signed-off-by: Richard Cochran Acked-By: Krzysztof Halasa Signed-off-by: David S. Miller --- diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 24df032..ee2f842 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c @@ -738,6 +738,17 @@ static void eth_set_mcast_list(struct net_device *dev) struct netdev_hw_addr *ha; u8 diffs[ETH_ALEN], *addr; int i; + static const u8 allmulti[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }; + + if (dev->flags & IFF_ALLMULTI) { + for (i = 0; i < ETH_ALEN; i++) { + __raw_writel(allmulti[i], &port->regs->mcast_addr[i]); + __raw_writel(allmulti[i], &port->regs->mcast_mask[i]); + } + __raw_writel(DEFAULT_RX_CNTRL0 | RX_CNTRL0_ADDR_FLTR_EN, + &port->regs->rx_control[0]); + return; + } if ((dev->flags & IFF_PROMISC) || netdev_mc_empty(dev)) { __raw_writel(DEFAULT_RX_CNTRL0 & ~RX_CNTRL0_ADDR_FLTR_EN,