summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorHubert Feurstein <h.feurstein@gmail.com>2019-12-11 10:53:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-12-13 09:26:00 +0100
commitb0c97bc822769ae34d636a0e530b3cdb583d02e3 (patch)
tree9658903f8dd5ec7657bae014a7816a916e0caa48 /commands
parenta80b04a0ec96fcd77eeb106fb8d370d97700d427 (diff)
downloadbarebox-b0c97bc822769ae34d636a0e530b3cdb583d02e3.tar.gz
commands: miitool: handle powerdown-flag
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/miitool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/commands/miitool.c b/commands/miitool.c
index 4ea6fda..a87d567 100644
--- a/commands/miitool.c
+++ b/commands/miitool.c
@@ -140,7 +140,10 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
}
*buf = '\0';
- if (bmcr & BMCR_ANENABLE) {
+
+ if (bmcr & BMCR_PDOWN) {
+ sprintf(buf, "powerdown, ");
+ } else if (bmcr & BMCR_ANENABLE) {
if (bmsr & BMSR_ANEGCOMPLETE) {
if (advert & lkpar) {
sprintf(buf, "%s%s, ", (lkpar & LPA_LPACK) ?
@@ -192,6 +195,8 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev,
printf("loopback, ");
if (bmcr & BMCR_ISOLATE)
printf("isolate, ");
+ if (bmcr & BMCR_PDOWN)
+ printf("powerdown, ");
if (bmcr & BMCR_CTST)
printf("collision test, ");
if (bmcr & BMCR_ANENABLE) {