diff options
author | Michael Chan <mchan@broadcom.com> | 2007-05-03 00:27:10 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-11 16:46:08 -0400 |
commit | 029cce110c4e5297bbe3f946868e32820e842856 (patch) | |
tree | 384cdc60abe9e43a392055a7862ba26eafa8b7c3 /ethtool.c | |
parent | 06759c2e613e608038836d0ab7f21eb07570d355 (diff) | |
download | ethtool-029cce110c4e5297bbe3f946868e32820e842856.tar.gz |
ethtool: Add 2.5G support
Add 2.5G Serdes support to ethtool user program and ethtool.8 man
page. The missing pause bits are also added to keep ethtool-copy.h
in sync with the kernel's version.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'ethtool.c')
-rw-r--r-- | ethtool.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -98,7 +98,7 @@ static struct option { char *opthelp; } args[] = { { "-s", "--change", MODE_SSET, "Change generic options", - " [ speed 10|100|1000|10000 ]\n" + " [ speed 10|100|1000|2500|10000 ]\n" " [ duplex half|full ]\n" " [ port tp|aui|bnc|mii|fibre ]\n" " [ autoneg on|off ]\n" @@ -521,6 +521,8 @@ static void parse_cmdline(int argc, char **argp) speed_wanted = SPEED_100; else if (!strcmp(argp[i], "1000")) speed_wanted = SPEED_1000; + else if (!strcmp(argp[i], "2500")) + speed_wanted = SPEED_2500; else if (!strcmp(argp[1], "10000")) speed_wanted = SPEED_10000; else @@ -649,6 +651,9 @@ static void parse_cmdline(int argc, char **argp) else if (speed_wanted == SPEED_1000 && duplex_wanted == DUPLEX_FULL) advertising_wanted = ADVERTISED_1000baseT_Full; + else if (speed_wanted == SPEED_2500 && + duplex_wanted == DUPLEX_FULL) + advertising_wanted = ADVERTISED_2500baseX_Full; else if (speed_wanted == SPEED_10000 && duplex_wanted == DUPLEX_FULL) advertising_wanted = ADVERTISED_10000baseT_Full; @@ -712,6 +717,13 @@ static void dump_supported(struct ethtool_cmd *ep) if (mask & SUPPORTED_1000baseT_Full) { did1++; fprintf(stdout, "1000baseT/Full "); } + if (did1 && (mask & SUPPORTED_2500baseX_Full)) { + fprintf(stdout, "\n"); + fprintf(stdout, " "); + } + if (mask & SUPPORTED_2500baseX_Full) { + did1++; fprintf(stdout, "2500baseX/Full "); + } fprintf(stdout, "\n"); fprintf(stdout, " Supports auto-negotiation: "); @@ -754,6 +766,13 @@ static void dump_advertised(struct ethtool_cmd *ep) if (mask & ADVERTISED_1000baseT_Full) { did1++; fprintf(stdout, "1000baseT/Full "); } + if (did1 && (mask & ADVERTISED_2500baseX_Full)) { + fprintf(stdout, "\n"); + fprintf(stdout, " "); + } + if (mask & ADVERTISED_2500baseX_Full) { + did1++; fprintf(stdout, "2500baseX/Full "); + } if (did1 && (mask & ADVERTISED_10000baseT_Full)) { fprintf(stdout, "\n"); fprintf(stdout, " "); @@ -788,6 +807,9 @@ static int dump_ecmd(struct ethtool_cmd *ep) case SPEED_1000: fprintf(stdout, "1000Mb/s\n"); break; + case SPEED_2500: + fprintf(stdout, "2500Mb/s\n"); + break; case SPEED_10000: fprintf(stdout, "10000Mb/s\n"); break; @@ -1712,6 +1734,7 @@ static int do_sset(int fd, struct ifreq *ifr) ADVERTISED_100baseT_Full | ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | + ADVERTISED_2500baseX_Full | ADVERTISED_10000baseT_Full); else ecmd.advertising = advertising_wanted; |