phy/ethtool: Add missing SPEED_<foo> strings
authorJoe Perches <joe@perches.com>
Sun, 2 Apr 2017 21:30:06 +0000 (14:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Apr 2017 13:36:06 +0000 (06:36 -0700)
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>
drivers/net/phy/phy.c
include/uapi/linux/ethtool.h

index 867c42154087dabf95795aa2af6b95794c80b857..6811d1ef4ef27518e4c8b67ac98ee0c9044e81dd 100644 (file)
@@ -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:
index 3dc91a46e8b8da0b243a12a168bbf205e5a87916..5f4ea28eabe4bf65dcd7f2a5501cf89a7e1c5760 100644 (file)
@@ -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