Commit d8ce2fc1 authored by Tobias Klauser's avatar Tobias Klauser Committed by David S. Miller

net: ewrk3: Use helpers from linux/etherdevice.h

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2effca33
...@@ -1008,15 +1008,13 @@ static int ewrk3_rx(struct net_device *dev) ...@@ -1008,15 +1008,13 @@ static int ewrk3_rx(struct net_device *dev)
} }
} }
p = skb->data; /* Look at the dest addr */ p = skb->data; /* Look at the dest addr */
if (p[0] & 0x01) { /* Multicast/Broadcast */ if (is_multicast_ether_addr(p)) {
if ((*(s16 *) & p[0] == -1) && (*(s16 *) & p[2] == -1) && (*(s16 *) & p[4] == -1)) { if (is_broadcast_ether_addr(p)) {
lp->pktStats.broadcast++; lp->pktStats.broadcast++;
} else { } else {
lp->pktStats.multicast++; lp->pktStats.multicast++;
} }
} else if ((*(s16 *) & p[0] == *(s16 *) & dev->dev_addr[0]) && } else if (compare_ether_addr(p, dev->dev_addr) == 0) {
(*(s16 *) & p[2] == *(s16 *) & dev->dev_addr[2]) &&
(*(s16 *) & p[4] == *(s16 *) & dev->dev_addr[4])) {
lp->pktStats.unicast++; lp->pktStats.unicast++;
} }
lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */ lp->pktStats.bins[0]++; /* Duplicates stats.rx_packets */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment