Message ID | 1400227238-13428-1-git-send-email-tklauser@distanz.ch |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
From: Tobias Klauser <tklauser@distanz.ch> Date: Fri, 16 May 2014 10:00:38 +0200 > 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> I'll let Jeff Kirsher take this via his tree. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 2014-05-16 at 10:00 +0200, Tobias Klauser wrote: > 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> > --- > drivers/net/ethernet/intel/e1000/e1000_hw.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks Tobias, I have added this to my queue.
diff --git a/drivers/net/ethernet/intel/e1000/e1000_hw.c b/drivers/net/ethernet/intel/e1000/e1000_hw.c index c1d3fdb..e9b07cc 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_hw.c +++ b/drivers/net/ethernet/intel/e1000/e1000_hw.c @@ -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++;
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> --- drivers/net/ethernet/intel/e1000/e1000_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)