diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-05-20 10:13:51 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-11 08:47:40 +0200 |
commit | e5a0223b9e6a2661f6ffdb20781aa04f8754984b (patch) | |
tree | 5664551d030f35e0fabb4411ff757ca8a8760e28 /commands/miitool.c | |
parent | 68376f82e8a0b01476498849748a27ea18252298 (diff) | |
download | barebox-e5a0223b9e6a2661f6ffdb20781aa04f8754984b.tar.gz barebox-e5a0223b9e6a2661f6ffdb20781aa04f8754984b.tar.xz |
mii-tool: Fix gigabit link test
media_list tests for gigabit phys like this:
if (mask & BMCR_SPEED1000)
mask does not contain the value of the BMCR register though, so the
test is completely bogus. Test for mask2 instead which is only
nonzero when the phy has gigabit capabilities.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/miitool.c')
-rw-r--r-- | commands/miitool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/miitool.c b/commands/miitool.c index 48c3c4b8cd..319ae34cce 100644 --- a/commands/miitool.c +++ b/commands/miitool.c @@ -66,7 +66,7 @@ static const char *media_list(unsigned mask, unsigned mask2, int best) *buf = '\0'; - if (mask & BMCR_SPEED1000) { + if (mask2) { if (mask2 & ADVERTISE_1000FULL) { strcat(buf, " "); strcat(buf, "1000baseT-FD"); |