netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper
@ 2011-01-12  9:31 Tobias Klauser
  2011-01-12 17:49 ` Chris Metcalf
  0 siblings, 1 reply; 16+ messages in thread
From: Tobias Klauser @ 2011-01-12  9:31 UTC (permalink / raw)
  To: Chris Metcalf, netdev

Use is_multicast_ether_addr from linux/etherdevice.h instead of a custom
macro. Also remove the broadcast address check, as it is considered a
multicast address too.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 drivers/net/tile/tilepro.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/net/tile/tilepro.c b/drivers/net/tile/tilepro.c
index 0e6bac5..8d8b67b 100644
--- a/drivers/net/tile/tilepro.c
+++ b/drivers/net/tile/tilepro.c
@@ -142,14 +142,6 @@
 MODULE_AUTHOR("Tilera");
 MODULE_LICENSE("GPL");
 
-
-#define IS_MULTICAST(mac_addr) \
-	(((u8 *)(mac_addr))[0] & 0x01)
-
-#define IS_BROADCAST(mac_addr) \
-	(((u16 *)(mac_addr))[0] == 0xffff)
-
-
 /*
  * Queue of incoming packets for a specific cpu and device.
  *
@@ -795,7 +787,7 @@ static bool tile_net_poll_aux(struct tile_net_cpu *info, int index)
 		/*
 		 * FIXME: Implement HW multicast filter.
 		 */
-		if (!IS_MULTICAST(buf) && !IS_BROADCAST(buf)) {
+		if (!is_multicast_ether_addr(buf)) {
 			/* Filter packets not for our address. */
 			const u8 *mine = dev->dev_addr;
 			filter = compare_ether_addr(mine, buf);
-- 
1.7.0.4


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

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

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12  9:31 [PATCH net-next-2.6] netdev: tilepro: Use is_multicast_ether_addr helper Tobias Klauser
2011-01-12 17:49 ` Chris Metcalf
2011-01-13  2:45   ` David Miller
2011-01-13  6:58     ` Tobias Klauser
2011-01-13  7:42       ` David Miller
2011-01-13  8:13         ` Tobias Klauser
2011-01-13  8:14         ` [PATCH net-next-2.6] etherdevice.h: Add is_unicast_ether_addr function Tobias Klauser
2011-01-13  8:24           ` Joe Perches
2011-01-13  8:35             ` Tobias Klauser
2011-01-13  8:43               ` Joe Perches
2011-01-13  8:55             ` Eric Dumazet
2011-01-13 16:38               ` Chris Metcalf
2011-01-13 20:35                 ` David Miller
2011-01-14  5:51           ` David Miller
2011-01-13  8:15         ` [PATCH v2 net-next-2.6] netdev: tilepro: Use is_unicast_ether_addr helper Tobias Klauser
2011-01-14  5: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).