aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/ethtool.h
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-01-26 23:11:13 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-27 11:31:36 +0100
commit51ea22b04ea0c210f9ce87b8a600965dbe476bc2 (patch)
tree278820e9b0c6c519e55f852145bd33125f45f26d /include/uapi/linux/ethtool.h
parentethtool: add DEBUG_NTF notification (diff)
downloadwireguard-linux-51ea22b04ea0c210f9ce87b8a600965dbe476bc2.tar.xz
wireguard-linux-51ea22b04ea0c210f9ce87b8a600965dbe476bc2.zip
ethtool: provide WoL settings with WOL_GET request
Implement WOL_GET request to get wake-on-lan settings for a device, traditionally available via ETHTOOL_GWOL ioctl request. As part of the implementation, provide symbolic names for wake-on-line modes as ETH_SS_WOL_MODES string set. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r--include/uapi/linux/ethtool.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 456fb2aa0fad..4295ebfa2f91 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -595,6 +595,7 @@ struct ethtool_pauseparam {
* @ETH_SS_PHY_TUNABLES: PHY tunable names
* @ETH_SS_LINK_MODES: link mode names
* @ETH_SS_MSG_CLASSES: debug message class names
+ * @ETH_SS_WOL_MODES: wake-on-lan modes
*/
enum ethtool_stringset {
ETH_SS_TEST = 0,
@@ -608,6 +609,7 @@ enum ethtool_stringset {
ETH_SS_PHY_TUNABLES,
ETH_SS_LINK_MODES,
ETH_SS_MSG_CLASSES,
+ ETH_SS_WOL_MODES,
/* add new constants above here */
ETH_SS_COUNT
@@ -1695,6 +1697,8 @@ static inline int ethtool_validate_duplex(__u8 duplex)
#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
#define WAKE_FILTER (1 << 7)
+#define WOL_MODE_COUNT 8
+
/* L2-L4 network traffic flow types */
#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */