summaryrefslogtreecommitdiffstats
path: root/drivers/net/ewrk3.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2011-07-04 01:56:22 +0200
committerDavid S. Miller <davem@davemloft.net>2011-07-05 05:27:29 +0200
commitd8ce2fc1adc38fb8c71bbf44b87a982bbee5cda0 (patch)
tree8c5a9e55ae240823d5e2b6c62e66a6480d590818 /drivers/net/ewrk3.c
parentnet: depca: Use helpers from linux/etherdevice.h (diff)
downloadlinux-d8ce2fc1adc38fb8c71bbf44b87a982bbee5cda0.tar.xz
linux-d8ce2fc1adc38fb8c71bbf44b87a982bbee5cda0.zip
net: ewrk3: Use helpers from linux/etherdevice.h
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ewrk3.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c
index b5f6173130f4..d1e229f9e540 100644
--- a/drivers/net/ewrk3.c
+++ b/drivers/net/ewrk3.c
@@ -1008,15 +1008,13 @@ static int ewrk3_rx(struct net_device *dev)
}
}
p = skb->data; /* Look at the dest addr */
- if (p[0] & 0x01) { /* Multicast/Broadcast */
- if ((*(s16 *) & p[0] == -1) && (*(s16 *) & p[2] == -1) && (*(s16 *) & p[4] == -1)) {
+ if (is_multicast_ether_addr(p)) {
+ if (is_broadcast_ether_addr(p)) {
lp->pktStats.broadcast++;
} else {
lp->pktStats.multicast++;
}
- } else if ((*(s16 *) & p[0] == *(s16 *) & dev->dev_addr[0]) &&
- (*(s16 *) & p[2] == *(s16 *) & dev->dev_addr[2]) &&
- (*(s16 *) & p[4] == *(s16 *) & dev->dev_addr[4])) {
+ } else if (compare_ether_addr(p, dev->dev_addr) == 0) {
lp->pktStats.unicast++;
}
lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */