Skip to content

Commit

Permalink
net: de4x5: 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 3e714ad commit 29a40f0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/tulip/de4x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1868,14 +1868,13 @@ de4x5_local_stats(struct net_device *dev, char *buf, int pkt_len)
i = DE4X5_PKT_STAT_SZ;
}
}
if (buf[0] & 0x01) { /* Multicast/Broadcast */
if ((*(s32 *)&buf[0] == -1) && (*(s16 *)&buf[4] == -1)) {
if (is_multicast_ether_addr(buf)) {
if (is_broadcast_ether_addr(buf)) {
lp->pktStats.broadcast++;
} else {
lp->pktStats.multicast++;
}
} else if ((*(s32 *)&buf[0] == *(s32 *)&dev->dev_addr[0]) &&
(*(s16 *)&buf[4] == *(s16 *)&dev->dev_addr[4])) {
} else if (compare_ether_addr(buf, dev->dev_addr) == 0) {
lp->pktStats.unicast++;
}

Expand Down

0 comments on commit 29a40f0

Please sign in to comment.