aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethtool/netlink.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-01-26 23:11:16 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-27 11:31:36 +0100
commit8d425b19b305a77cb1ba67b84e7c1ca547de032f (patch)
tree720022af29e8c07812541b4253609dabb7c77e10 /net/ethtool/netlink.c
parentethtool: provide WoL settings with WOL_GET request (diff)
downloadlinux-dev-8d425b19b305a77cb1ba67b84e7c1ca547de032f.tar.xz
linux-dev-8d425b19b305a77cb1ba67b84e7c1ca547de032f.zip
ethtool: set wake-on-lan settings with WOL_SET request
Implement WOL_SET netlink request to set wake-on-lan settings. This is equivalent to ETHTOOL_SWOL ioctl request. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/netlink.c')
-rw-r--r--net/ethtool/netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index eeb6d8594e1b..2c375f9095fe 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -688,6 +688,11 @@ static const struct genl_ops ethtool_genl_ops[] = {
.dumpit = ethnl_default_dumpit,
.done = ethnl_default_done,
},
+ {
+ .cmd = ETHTOOL_MSG_WOL_SET,
+ .flags = GENL_UNS_ADMIN_PERM,
+ .doit = ethnl_set_wol,
+ },
};
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {