diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2020-01-26 23:11:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-27 11:31:36 +0100 |
commit | 8d425b19b305a77cb1ba67b84e7c1ca547de032f (patch) | |
tree | 720022af29e8c07812541b4253609dabb7c77e10 /net/ethtool/netlink.c | |
parent | 51ea22b04ea0c210f9ce87b8a600965dbe476bc2 (diff) | |
download | linux-8d425b19b305a77cb1ba67b84e7c1ca547de032f.tar.gz linux-8d425b19b305a77cb1ba67b84e7c1ca547de032f.tar.bz2 linux-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.c | 5 |
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[] = { |