diff options
Diffstat (limited to 'link.c')
-rw-r--r-- | link.c | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -99,18 +99,9 @@ u32 ethtool_bitrate(const char *ifname) goto out; } - switch (ecmd.speed) { - case SPEED_10: - case SPEED_100: - case SPEED_1000: - case SPEED_2500: - case SPEED_10000: - bitrate = ecmd.speed; - break; - default: + bitrate = ethtool_cmd_speed(&ecmd); + if (bitrate == SPEED_UNKNOWN) bitrate = 0; - break; - }; out: close(sock); |