diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-05-20 11:24:32 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-11 08:47:40 +0200 |
commit | 7eb8f2a59cb98e747f621913596364e2db808e27 (patch) | |
tree | 95ca372a2dbdb357ea5de428bb47dea6e063867d /commands/miitool.c | |
parent | e5a0223b9e6a2661f6ffdb20781aa04f8754984b (diff) | |
download | barebox-7eb8f2a59cb98e747f621913596364e2db808e27.tar.gz barebox-7eb8f2a59cb98e747f621913596364e2db808e27.tar.xz |
mii-tool: Fix gigabit advertise / link partner ability mixup
bmcr2 contains the gigabit advertise bits and lpa2 contains the gigabit
link partner ability bits, not the other way round.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/miitool.c')
-rw-r--r-- | commands/miitool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/miitool.c b/commands/miitool.c index 319ae34cce..b08be9c683 100644 --- a/commands/miitool.c +++ b/commands/miitool.c @@ -209,7 +209,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev, printf("remote fault, "); printf((bmsr & BMSR_LSTATUS) ? "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)); #define LPA_ABILITY_MASK (LPA_10HALF | LPA_10FULL \ | LPA_100HALF | LPA_100FULL \ @@ -217,7 +217,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev, if (lkpar & LPA_ABILITY_MASK) printf("\n link partner:%s", - media_list(lkpar, bmcr2, 0)); + media_list(lkpar, lpa2 >> 2, 0)); printf("\n"); } |