summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCris Forno <cforno12@linux.vnet.ibm.com>2020-02-28 14:12:04 -0600
committerDavid S. Miller <davem@davemloft.net>2020-02-29 21:48:54 -0800
commit70ae1e127b486704c62d3537d69ca65c446d4d83 (patch)
treed67755170562f069e49caa98a71a17a88c39a135 /include
parent68e2c37690b0da7539cfa2928bf1e4f50d88a1bb (diff)
downloadlinux-stable-70ae1e127b486704c62d3537d69ca65c446d4d83.tar.gz
linux-stable-70ae1e127b486704c62d3537d69ca65c446d4d83.tar.bz2
linux-stable-70ae1e127b486704c62d3537d69ca65c446d4d83.zip
ethtool: Factored out similar ethtool link settings for virtual devices to core
Three virtual devices (ibmveth, virtio_net, and netvsc) all have similar code to set link settings and validate ethtool command. To eliminate duplication of code, it is factored out into core/ethtool.c. Signed-off-by: Cris Forno <cforno12@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ethtool.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 95991e4300bf..23373978cb3c 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -420,4 +420,10 @@ struct ethtool_rx_flow_rule *
ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input);
void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *rule);
+bool ethtool_virtdev_validate_cmd(const struct ethtool_link_ksettings *cmd);
+int ethtool_virtdev_set_link_ksettings(struct net_device *dev,
+ const struct ethtool_link_ksettings *cmd,
+ u32 *dev_speed, u8 *dev_duplex);
+
+
#endif /* _LINUX_ETHTOOL_H */