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:
parent
68376f82e8
commit
e5a0223b9e
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue