diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-01-18 00:53:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-01-18 00:53:59 +0000 |
commit | 53c0c6054f5bed0cd38b3d4e0ee41b06955ed429 (patch) | |
tree | 55dc84caf56e242496bec3d58a8d7a0d7660ab36 /target/linux/generic/files/drivers/net/phy/swconfig.c | |
parent | bdc0750191660af3ecefbc52327978af1cd93407 (diff) | |
download | mtk-20170518-53c0c6054f5bed0cd38b3d4e0ee41b06955ed429.zip mtk-20170518-53c0c6054f5bed0cd38b3d4e0ee41b06955ed429.tar.gz mtk-20170518-53c0c6054f5bed0cd38b3d4e0ee41b06955ed429.tar.bz2 |
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 <hkallweit1@gmail.com>
SVN-Revision: 44022
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/swconfig.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/swconfig.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 4f2df4c..b0ba90d 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", |