summaryrefslogtreecommitdiff
path: root/net/ethtool/common.h
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-12-27 17:56:23 +0300
committerDavid S. Miller <davem@davemloft.net>2019-12-28 03:40:02 +0300
commit3d2b847fb99cf2b28aa046e486636e555bc6ed1c (patch)
tree216f898fac0e7de4b289a93f5f491492254eeb53 /net/ethtool/common.h
parent1b1b1847c8505df2e1dd8804838526bed22a8bd4 (diff)
downloadlinux-3d2b847fb99cf2b28aa046e486636e555bc6ed1c.tar.xz
ethtool: provide link state with LINKSTATE_GET request
Implement LINKSTATE_GET netlink request to get link state information. At the moment, only link up flag as provided by ETHTOOL_GLINK ioctl command is returned. LINKSTATE_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/common.h')
-rw-r--r--net/ethtool/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ethtool/common.h b/net/ethtool/common.h
index c8a237402729..5c5f7dc90cd4 100644
--- a/net/ethtool/common.h
+++ b/net/ethtool/common.h
@@ -3,6 +3,7 @@
#ifndef _ETHTOOL_COMMON_H
#define _ETHTOOL_COMMON_H
+#include <linux/netdevice.h>
#include <linux/ethtool.h>
/* compose link mode index from speed, type and duplex */
@@ -19,6 +20,8 @@ extern const char
phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN];
extern const char link_mode_names[][ETH_GSTRING_LEN];
+int __ethtool_get_link(struct net_device *dev);
+
bool convert_legacy_settings_to_link_ksettings(
struct ethtool_link_ksettings *link_ksettings,
const struct ethtool_cmd *legacy_settings);