Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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++;