From 53c0c6054f5bed0cd38b3d4e0ee41b06955ed429 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 18 Jan 2015 00:53:59 +0000 Subject: ar8216: add 802.3az EEE info to swconfig get_link attribute AR8327/AR8337 allow to read the result of EEE autonegotiation. If EEE is autonegotiated between the link partners, display this as part of the swconfig get_link attribute. eee100: 100MBit EEE supported by both link partners eee1000: 1GBit EEE supported by both link partners Signed-off-by: Heiner Kallweit SVN-Revision: 44022 --- target/linux/generic/files/drivers/net/phy/swconfig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'target/linux/generic/files/drivers/net/phy/swconfig.c') diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 4f2df4cf8a..b0ba90d16f 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -167,12 +167,14 @@ swconfig_get_link(struct switch_dev *dev, const struct switch_attr *attr, if (link.link) len = snprintf(dev->buf, sizeof(dev->buf), - "port:%d link:up speed:%s %s-duplex %s%s%s", + "port:%d link:up speed:%s %s-duplex %s%s%s%s%s", val->port_vlan, swconfig_speed_str(link.speed), link.duplex ? "full" : "half", link.tx_flow ? "txflow " : "", link.rx_flow ? "rxflow " : "", + link.eee & ADVERTISED_100baseT_Full ? "eee100 " : "", + link.eee & ADVERTISED_1000baseT_Full ? "eee1000 " : "", link.aneg ? "auto" : ""); else len = snprintf(dev->buf, sizeof(dev->buf), "port:%d link:down", -- cgit v1.2.3