Skip to content

Commit

Permalink
e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
Browse files Browse the repository at this point in the history
Use the is_broadcast_ether_addr/is_multicast_ether_addr helper functions
from linux/etherdevice.h instead of open coding them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Tobias Klauser authored and Jeff Kirsher committed May 27, 2014
1 parent 18cae6f commit 9760822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/e1000/e1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4877,10 +4877,10 @@ void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats,
* since the test for a multicast frame will test positive on
* a broadcast frame.
*/
if ((mac_addr[0] == (u8) 0xff) && (mac_addr[1] == (u8) 0xff))
if (is_broadcast_ether_addr(mac_addr))
/* Broadcast packet */
stats->bprc++;
else if (*mac_addr & 0x01)
else if (is_multicast_ether_addr(mac_addr))
/* Multicast packet */
stats->mprc++;

Expand Down

0 comments on commit 9760822

Please sign in to comment.