From e3ac850412df91b64aa5f7ccb5e043948a8caef4 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 12 Sep 2008 02:31:40 -0700 Subject: ethtool: Use ethtool_cmd->speed_hi struct ethtool_cmd now has a speed_hi field to support more than 65535 Mb devices, use it. Also, pull in the ethtool-copy.h file without the __KERNEL__ sections. Signed-off-by: Brandon Philips Signed-off-by: Jeff Garzik --- ethtool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ethtool.c') diff --git a/ethtool.c b/ethtool.c index a668b49..768b92c 100644 --- a/ethtool.c +++ b/ethtool.c @@ -805,7 +805,7 @@ static int dump_ecmd(struct ethtool_cmd *ep) dump_advertised(ep); fprintf(stdout, " Speed: "); - switch (ep->speed) { + switch (ethtool_cmd_speed(ep)) { case SPEED_10: fprintf(stdout, "10Mb/s\n"); break; @@ -822,7 +822,7 @@ static int dump_ecmd(struct ethtool_cmd *ep) fprintf(stdout, "10000Mb/s\n"); break; default: - fprintf(stdout, "Unknown! (%i)\n", ep->speed); + fprintf(stdout, "Unknown! (%i)\n", ethtool_cmd_speed(ep)); break; }; @@ -1726,7 +1726,7 @@ static int do_sset(int fd, struct ifreq *ifr) } else { /* Change everything the user specified. */ if (speed_wanted != -1) - ecmd.speed = speed_wanted; + ethtool_cmd_speed_set(&ecmd, speed_wanted); if (duplex_wanted != -1) ecmd.duplex = duplex_wanted; if (port_wanted != -1) -- cgit v1.2.1