be2net: Add code to display nic speeds other than 1Gbps/10Gbps
authorAjit Khaparde <ajit.khaparde@emulex.com>
Tue, 19 Apr 2011 12:10:53 +0000 (12:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2011 03:13:09 +0000 (20:13 -0700)
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_ethtool.c

index 22523b92b92a1ca22ad2643c964921a241874ba0..33c2beccaa8e01217e640d52e50059081136245c 100644 (file)
@@ -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;
                        }
                }