Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0f49157 authored by Tobias Klauser's avatar Tobias Klauser Committed by David S. Miller
Browse files

netdev: tilepro: Use is_unicast_ether_addr helper



Use is_unicast_ether_addr from linux/etherdevice.h instead of custom
macros.

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51e7eed7
Loading
Loading
Loading
Loading
+1 −9
Original line number Original line Diff line number Diff line
@@ -142,14 +142,6 @@
MODULE_AUTHOR("Tilera");
MODULE_AUTHOR("Tilera");
MODULE_LICENSE("GPL");
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.
 * 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.
		 * FIXME: Implement HW multicast filter.
		 */
		 */
		if (!IS_MULTICAST(buf) && !IS_BROADCAST(buf)) {
		if (is_unicast_ether_addr(buf)) {
			/* Filter packets not for our address. */
			/* Filter packets not for our address. */
			const u8 *mine = dev->dev_addr;
			const u8 *mine = dev->dev_addr;
			filter = compare_ether_addr(mine, buf);
			filter = compare_ether_addr(mine, buf);