netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethtool: Do not report link partner advertising flags if set to 0
@ 2009-12-20 19:12 Ben Hutchings
  2009-12-20 20:34 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2009-12-20 19:12 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Kurt Roeckx, 561843, netdev

Only some drivers (and none before kernel version 2.6.31) currently
set these flags.  When the flags are equal to 0 and so we don't know
what the link partner advertised, don't report anything.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 ethtool.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ethtool.c b/ethtool.c
index 10dfc80..298b690 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -948,7 +948,9 @@ static int dump_ecmd(struct ethtool_cmd *ep)
 
 	dump_supported(ep);
 	dump_advertised(ep, "Advertised", ep->advertising);
-	dump_advertised(ep, "Link partner advertised", ep->lp_advertising);
+	if (ep->lp_advertising)
+		dump_advertised(ep, "Link partner advertised",
+				ep->lp_advertising);
 
 	fprintf(stdout, "	Speed: ");
 	speed = ethtool_cmd_speed(ep);
-- 
1.6.5.7



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

* Re: [PATCH] ethtool: Do not report link partner advertising flags if set to 0
  2009-12-20 19:12 [PATCH] ethtool: Do not report link partner advertising flags if set to 0 Ben Hutchings
@ 2009-12-20 20:34 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-12-20 20:34 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: Kurt Roeckx, 561843, netdev

On 12/20/2009 02:12 PM, Ben Hutchings wrote:
> Only some drivers (and none before kernel version 2.6.31) currently
> set these flags.  When the flags are equal to 0 and so we don't know
> what the link partner advertised, don't report anything.
>
> Signed-off-by: Ben Hutchings<ben@decadent.org.uk>
> ---
>   ethtool.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)

applied



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

end of thread, other threads:[~2009-12-20 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20 19:12 [PATCH] ethtool: Do not report link partner advertising flags if set to 0 Ben Hutchings
2009-12-20 20:34 ` Jeff Garzik

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