diff options
author | sixiao@microsoft.com <sixiao@microsoft.com> | 2016-02-25 15:24:08 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-29 17:08:50 -0500 |
commit | 49eb93892d8dfcf5dc5088e640f486d08572d8bf (patch) | |
tree | ebf8dcecb343fcf13f1020d118c210a1fbd6ebb9 /drivers/net/hyperv/hyperv_net.h | |
parent | c0affa19589bb198c15670af3b6a0d39b1b1755a (diff) |
hv_netvsc: add ethtool support for set and get of settings
This patch allows the user to set and retrieve speed and duplex of the
hv_netvsc device via ethtool.
Example:
$ ethtool eth0
Settings for eth0:
...
Speed: Unknown!
Duplex: Unknown! (255)
...
$ ethtool -s eth0 speed 1000 duplex full
$ ethtool eth0
Settings for eth0:
...
Speed: 1000Mb/s
Duplex: Full
...
This is based on patches by Roopa Prabhu and Nikolay Aleksandrov.
Signed-off-by: Simon Xiao <sixiao@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r-- | drivers/net/hyperv/hyperv_net.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index fcb92c0d0eb9..b4c68783dfc3 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -658,6 +658,10 @@ struct net_device_context { struct netvsc_stats __percpu *tx_stats; struct netvsc_stats __percpu *rx_stats; + + /* Ethtool settings */ + u8 duplex; + u32 speed; }; /* Per netvsc device */ |