Skip to content

Commit

Permalink
phy/ethtool: Add missing SPEED_<foo> strings
Browse files Browse the repository at this point in the history
Add all the currently available SPEED_<foo> strings.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Apr 5, 2017
1 parent 5422e5a commit 1f37b17
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,22 @@ static const char *phy_speed_to_str(int speed)
return "1Gbps";
case SPEED_2500:
return "2.5Gbps";
case SPEED_5000:
return "5Gbps";
case SPEED_10000:
return "10Gbps";
case SPEED_20000:
return "20Gbps";
case SPEED_25000:
return "25Gbps";
case SPEED_40000:
return "40Gbps";
case SPEED_50000:
return "50Gbps";
case SPEED_56000:
return "56Gbps";
case SPEED_100000:
return "100Gbps";
case SPEED_UNKNOWN:
return "Unknown";
default:
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ enum ethtool_link_mode_bit_indices {
*/

/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */
/* Update drivers/net/phy/phy.c:phy_speed_to_str() when adding new values */
#define SPEED_10 10
#define SPEED_100 100
#define SPEED_1000 1000
Expand Down

0 comments on commit 1f37b17

Please sign in to comment.