[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1294852681.4114.6.camel@Joe-Laptop>
Date: Wed, 12 Jan 2011 09:18:01 -0800
From: Joe Perches <joe@...ches.com>
To: Mike Frysinger <vapier.adi@...il.com>
Cc: Tobias Klauser <tklauser@...tanz.ch>,
Michael Hennerich <michael.hennerich@...log.com>,
uclinux-dist-devel@...ckfin.uclinux.org, netdev@...r.kernel.org
Subject: Re: [uclinux-dist-devel] [PATCH net-next-2.6] netdev: bfin_mac:
Use is_multicast_ether_addr helper
On Wed, 2011-01-12 at 11:38 -0500, Mike Frysinger wrote:
> On Wed, Jan 12, 2011 at 04:30, Tobias Klauser wrote:
> > --- a/drivers/net/bfin_mac.c
> > +++ b/drivers/net/bfin_mac.c
> > @@ -1293,7 +1293,7 @@ static void bfin_mac_multicast_hash(struct net_device *dev)
> > addrs = ha->addr;
> >
> > /* skip non-multicast addresses */
> > - if (!(*addrs & 1))
> > + if (!is_multicast_ether_addr(addrs))
> > continue;
>
> looks good to me ...
> Acked-by: Mike Frysinger <vapier@...too.org>
Does a netdev_for_each_mc_addr loop entry really
need to verify that the address is multicast?
Couldn't this just be:
netdev_for_each_mc_addr(ha, dev) {
crc = ether_crc(ETH_ALEN, ha->addr);
crc >>= 26;
if (crc & 0x20)
emac_hashhi |= 1 << (crc & 0x1f);
else
emac_hashlo |= 1 << (crc & 0x1f);
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists