Patchwork [net-next,2/5] be2net: Add code to display nic speeds other than 1Gbps/10Gbps

login
register
mail settings
Submitter Ajit Khaparde
Date April 18, 2011, 10:30 p.m.
Message ID <20110418223004.GA9483@akhaparde-VBox>
Download mbox | patch
Permalink /patch/91877/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Ajit Khaparde - April 18, 2011, 10:30 p.m.
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/benet/be_ethtool.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

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;
 			}
 		}