summaryrefslogtreecommitdiff
path: root/net/ethtool/strset.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-01-26 23:11:04 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-27 11:31:35 +0100
commit6a94b8ccf6b77f005ab1b36a878e1d81df0c033e (patch)
treecde0432b113c8bb9465a4e26bad06c6a50db3b80 /net/ethtool/strset.c
parentd2c4b444fd13f4699ab8c4c49062cd2c7516c241 (diff)
ethtool: provide message mask with DEBUG_GET request
Implement DEBUG_GET request to get debugging settings for a device. At the moment, only message mask corresponding to message level as reported by ETHTOOL_GMSGLVL ioctl request is provided. (It is called message level in ioctl interface but almost all drivers interpret it as a bit mask.) As part of the implementation, provide symbolic names for message mask bits as ETH_SS_MSG_CLASSES 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 'net/ethtool/strset.c')
-rw-r--r--net/ethtool/strset.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
index 948d967f1eca..7a45c25355b8 100644
--- a/net/ethtool/strset.c
+++ b/net/ethtool/strset.c
@@ -50,6 +50,11 @@ static const struct strset_info info_template[] = {
.count = __ETHTOOL_LINK_MODE_MASK_NBITS,
.strings = link_mode_names,
},
+ [ETH_SS_MSG_CLASSES] = {
+ .per_dev = false,
+ .count = NETIF_MSG_CLASS_COUNT,
+ .strings = netif_msg_class_names,
+ },
};
struct strset_req_info {