9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2014-05-20 10:13:51 +02:00
parent 68376f82e8
commit e5a0223b9e
1 changed files with 1 additions and 1 deletions

View File

@ -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");