2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00

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: Tobias Klauser <tklauser@distanz.ch>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Tobias Klauser 2014-05-20 08:22:55 +00:00 committed by Jeff Kirsher
parent 18cae6f7bb
commit 9760822b0d

View File

@ -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++;