e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
authorTobias Klauser <tklauser@distanz.ch>
Tue, 20 May 2014 08:22:55 +0000 (08:22 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 27 May 2014 09:10:44 +0000 (02:10 -0700)
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>
drivers/net/ethernet/intel/e1000/e1000_hw.c

index c1d3fdb296a05e4f1cd86205bce12669e41ceb6b..e9b07ccc0ebaebc0b1b0993625485cae93b0b447 100644 (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++;