2
0
forked from Ivasoft/openwrt

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
This commit is contained in:
Felix Fietkau
2015-01-18 00:53:59 +00:00
parent bdc0750191
commit 53c0c6054f
5 changed files with 49 additions and 1 deletions

View File

@@ -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",