netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
@ 2014-05-16  8:00 Tobias Klauser
  2014-05-16 21:00 ` David Miller
  2014-05-17  5:59 ` Jeff Kirsher
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Klauser @ 2014-05-16  8:00 UTC (permalink / raw)
  To: Jeff Kirsher, e1000-devel, netdev

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(-)

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
  2014-05-16  8:00 [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers Tobias Klauser
@ 2014-05-16 21:00 ` David Miller
  2014-05-17  5:59 ` Jeff Kirsher
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-05-16 21:00 UTC (permalink / raw)
  To: tklauser; +Cc: jeffrey.t.kirsher, e1000-devel, netdev

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
  2014-05-16  8:00 [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers Tobias Klauser
  2014-05-16 21:00 ` David Miller
@ 2014-05-17  5:59 ` Jeff Kirsher
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Kirsher @ 2014-05-17  5:59 UTC (permalink / raw)
  To: Tobias Klauser; +Cc: e1000-devel, netdev

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-17  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16  8:00 [PATCH net-next] e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers Tobias Klauser
2014-05-16 21:00 ` David Miller
2014-05-17  5:59 ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).