diff options
author | Joe Holden <jwh@zorins.co.uk> | 2018-06-27 22:14:33 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-06-28 11:22:25 +0200 |
commit | c1f6a82c21d6fdb30af178f3b5604a202ab1b26c (patch) | |
tree | fceb851bed6c7ca81dae3006d0d96db3c3484198 /system-linux.c | |
parent | a580028dae5b7bebcc14c240fe7dac31cbd89355 (diff) |
system-linux: add autoneg and link-partner output
This adds an array that contains the link modes advertised by the other device and also
indicates whether auto negotiation is true or false.
link-partner may or may not be populated depending on hardware, driver and/or settings.
Signed-off-by: Joe Holden <jwh@zorins.co.uk>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system-linux.c b/system-linux.c index 0127b01..1f7c29b 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1728,6 +1728,10 @@ system_if_dump_info(struct device *dev, struct blob_buf *b) system_add_link_modes(b, ecmd.advertising); blobmsg_close_array(b, c); + c = blobmsg_open_array(b, "link-partner-advertising"); + system_add_link_modes(b, ecmd.lp_advertising); + blobmsg_close_array(b, c); + c = blobmsg_open_array(b, "link-supported"); system_add_link_modes(b, ecmd.supported); blobmsg_close_array(b, c); @@ -1736,6 +1740,8 @@ system_if_dump_info(struct device *dev, struct blob_buf *b) snprintf(s, 8, "%d%c", ethtool_cmd_speed(&ecmd), ecmd.duplex == DUPLEX_HALF ? 'H' : 'F'); blobmsg_add_string_buffer(b); + + blobmsg_add_u8(b, "autoneg", !!ecmd.autoneg); } return 0; |