summaryrefslogtreecommitdiff
path: root/src/print_eth_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_eth_info.c')
-rw-r--r--src/print_eth_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_eth_info.c b/src/print_eth_info.c
index f9e63da..81e74a7 100644
--- a/src/print_eth_info.c
+++ b/src/print_eth_info.c
@@ -43,7 +43,7 @@ static int print_eth_speed(char *outwalk, const char *interface) {
ifr.ifr_data = (caddr_t)&ecmd;
(void)strcpy(ifr.ifr_name, interface);
if (ioctl(general_socket, SIOCETHTOOL, &ifr) == 0) {
- ethspeed = (ecmd.speed == USHRT_MAX ? 0 : ecmd.speed);
+ ethspeed = (ecmd.speed == USHRT_MAX ? 0 : ethtool_cmd_speed(&ecmd));
return sprintf(outwalk, "%d Mbit/s", ethspeed);
} else
return sprintf(outwalk, "?");