netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: de4x5: Omit check for multicast bit in netdev_for_each_mc_addr
@ 2011-06-29 12:16 Tobias Klauser
  2011-07-01  6:57 ` David Miller
  2011-07-01  7:37 ` [PATCH net-next v2] " Tobias Klauser
  0 siblings, 2 replies; 6+ messages in thread
From: Tobias Klauser @ 2011-06-29 12:16 UTC (permalink / raw)
  To: David S. Miller, Grant Grundler; +Cc: netdev

There is no need to check for the address being a multicast address in
the netdev_for_each_mc_addr loop, so remove it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/tulip/de4x5.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index efaa1d6..0c3151a 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1954,7 +1954,6 @@ SetMulticastFilter(struct net_device *dev)
     u16 hashcode;
     u32 omr, crc;
     char *pa;
-    unsigned char *addrs;
 
     omr = inl(DE4X5_OMR);
     omr &= ~(OMR_PR | OMR_PM);
@@ -1964,9 +1963,7 @@ SetMulticastFilter(struct net_device *dev)
 	omr |= OMR_PM;                       /* Pass all multicasts */
     } else if (lp->setup_f == HASH_PERF) {   /* Hash Filtering */
 	netdev_for_each_mc_addr(ha, dev) {
-	    addrs = ha->addr;
-	    if ((*addrs & 0x01) == 1) {      /* multicast address? */
-		crc = ether_crc_le(ETH_ALEN, addrs);
+		crc = ether_crc_le(ETH_ALEN, ha->addr);
 		hashcode = crc & HASH_BITS;  /* hashcode is 9 LSb of CRC */
 
 		byte = hashcode >> 3;        /* bit[3-8] -> byte in filter */
@@ -1977,7 +1974,6 @@ SetMulticastFilter(struct net_device *dev)
 		    byte -= 1;
 		}
 		lp->setup_frame[byte] |= bit;
-	    }
 	}
     } else {                                 /* Perfect filtering */
 	netdev_for_each_mc_addr(ha, dev) {
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-01  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 12:16 [PATCH net-next] net: de4x5: Omit check for multicast bit in netdev_for_each_mc_addr Tobias Klauser
2011-07-01  6:57 ` David Miller
2011-07-01  7:25   ` Tobias Klauser
2011-07-01  7:31     ` David Miller
2011-07-01  7:37 ` [PATCH net-next v2] " Tobias Klauser
2011-07-01  8:51   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).