Commit 9760822b authored by Tobias Klauser's avatar Tobias Klauser Committed by Jeff Kirsher

e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers

Use the is_broadcast_ether_addr/is_multicast_ether_addr helper functions
from linux/etherdevice.h instead of open coding them.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 18cae6f7
......@@ -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++;
......
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