summaryrefslogtreecommitdiff
path: root/net/ethtool/netlink.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-01-27 01:11:07 +0300
committerDavid S. Miller <davem@davemloft.net>2020-01-27 13:31:35 +0300
commite54d04e3afead22d8e7d6edaaac487a1205bac39 (patch)
treea2029b5c1e543e4cad5d2ea420a741a6af3c3843 /net/ethtool/netlink.c
parent6a94b8ccf6b77f005ab1b36a878e1d81df0c033e (diff)
downloadlinux-e54d04e3afead22d8e7d6edaaac487a1205bac39.tar.xz
ethtool: set message mask with DEBUG_SET request
Implement DEBUG_SET netlink request to set debugging settings for a device. At the moment, only message mask corresponding to message level as set by ETHTOOL_SMSGLVL ioctl request can be set. (It is called message level in ioctl interface but almost all drivers interpret it as a bit mask.) 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 '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 bdaf583e392b..bcdc42e0bd14 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -672,6 +672,11 @@ static const struct genl_ops ethtool_genl_ops[] = {
.dumpit = ethnl_default_dumpit,
.done = ethnl_default_done,
},
+ {
+ .cmd = ETHTOOL_MSG_DEBUG_SET,
+ .flags = GENL_UNS_ADMIN_PERM,
+ .doit = ethnl_set_debug,
+ },
};
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {