Skip to content

Commit

Permalink
be2net: Add code to display nic speeds other than 1Gbps/10Gbps
Browse files Browse the repository at this point in the history
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Apr 20, 2011
1 parent 16a871e commit 4fa9ed0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/benet/be_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 4fa9ed0

Please sign in to comment.