From: Ajit Khaparde <ajit.khaparde@emulex.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH net-next 2/5] be2net: Add code to display nic speeds other than 1Gbps/10Gbps
Date: Tue, 19 Apr 2011 17:10:53 -0500 [thread overview]
Message-ID: <20110419221053.GA3606@akhaparde-VBox> (raw)
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
drivers/net/benet/be_ethtool.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c
index 22523b9..33c2bec 100644
--- a/drivers/net/benet/be_ethtool.c
+++ b/drivers/net/benet/be_ethtool.c
@@ -384,12 +384,21 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
ecmd->speed = link_speed*10;
} else {
switch (mac_speed) {
+ case PHY_LINK_SPEED_10MBPS:
+ ecmd->speed = SPEED_10;
+ break;
+ case PHY_LINK_SPEED_100MBPS:
+ ecmd->speed = SPEED_100;
+ break;
case PHY_LINK_SPEED_1GBPS:
ecmd->speed = SPEED_1000;
break;
case PHY_LINK_SPEED_10GBPS:
ecmd->speed = SPEED_10000;
break;
+ case PHY_LINK_SPEED_ZERO:
+ ecmd->speed = 0;
+ break;
}
}
--
1.7.1
next reply other threads:[~2011-04-19 22:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 22:10 Ajit Khaparde [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-04-18 22:30 [PATCH net-next 2/5] be2net: Add code to display nic speeds other than 1Gbps/10Gbps Ajit Khaparde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110419221053.GA3606@akhaparde-VBox \
--to=ajit.khaparde@emulex.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).