Commit 98e1d904 authored by Ben Hutchings's avatar Ben Hutchings Committed by Mike Frysinger

mii-tool: fix inverted advertising/link features

On a system with a gigabit NIC attached to a 100mbit switch:
	# mii-tool -v eth0
	capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
	advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
	link partner: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

Clearly the last two fields are swapped, and reading the code supports
this hypothesis.

URL: https://bugs.gentoo.org/393107
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511395Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 0f65cdcb
......@@ -327,9 +327,9 @@ int show_basic_mii(int sock, int phy_id)
printf("remote fault, ");
printf((bmsr & MII_BMSR_LINK_VALID) ? "link ok" : "no link");
printf("\n capabilities:%s", media_list(bmsr >> 6, bmcr2, 0));
printf("\n advertising: %s", media_list(advert, lpa2 >> 2, 0));
printf("\n advertising: %s", media_list(advert, bmcr2, 0));
if (lkpar & MII_AN_ABILITY_MASK)
printf("\n link partner:%s", media_list(lkpar, bmcr2, 0));
printf("\n link partner:%s", media_list(lkpar, lpa2 >> 2, 0));
printf("\n");
}
fflush(stdout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment