Skip to content

Commit

Permalink
net: ewrk3: Use helpers from linux/etherdevice.h
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Jul 5, 2011
1 parent 2effca3 commit d8ce2fc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/ewrk3.c
Original file line number Diff line number Diff line change
@@ -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 */

0 comments on commit d8ce2fc

Please sign in to comment.