diff options
author | David Decotigny <decot@googlers.com> | 2016-02-24 10:58:10 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-25 22:06:47 -0500 |
commit | 7cad1bac96d381d953b47695f6602b4e2480aa5d (patch) | |
tree | 6b3d4d53607da7a6b75b1c638006286fc97c27fb /net/core | |
parent | 702b26a24d3d012b9286efb3efbf2b81b23271f5 (diff) | |
download | op-kernel-dev-7cad1bac96d381d953b47695f6602b4e2480aa5d.zip op-kernel-dev-7cad1bac96d381d953b47695f6602b4e2480aa5d.tar.gz |
net: core: use __ethtool_get_ksettings
Signed-off-by: David Decotigny <decot@googlers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net-sysfs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 4ae17c3..2b3f76f 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -198,9 +198,10 @@ static ssize_t speed_show(struct device *dev, return restart_syscall(); if (netif_running(netdev)) { - struct ethtool_cmd cmd; - if (!__ethtool_get_settings(netdev, &cmd)) - ret = sprintf(buf, fmt_dec, ethtool_cmd_speed(&cmd)); + struct ethtool_link_ksettings cmd; + + if (!__ethtool_get_link_ksettings(netdev, &cmd)) + ret = sprintf(buf, fmt_dec, cmd.base.speed); } rtnl_unlock(); return ret; @@ -217,10 +218,12 @@ static ssize_t duplex_show(struct device *dev, return restart_syscall(); if (netif_running(netdev)) { - struct ethtool_cmd cmd; - if (!__ethtool_get_settings(netdev, &cmd)) { + struct ethtool_link_ksettings cmd; + + if (!__ethtool_get_link_ksettings(netdev, &cmd)) { const char *duplex; - switch (cmd.duplex) { + + switch (cmd.base.duplex) { case DUPLEX_HALF: duplex = "half"; break; |