From 7f59fb32b0960f1e19651379d8e130bd017054bf Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Sat, 28 Mar 2020 00:01:23 +0100 Subject: ethtool: provide pause parameters with PAUSE_GET request Implement PAUSE_GET request to get pause parameters of a network device. These are traditionally available via ETHTOOL_GPAUSEPARAM ioctl request. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller --- net/ethtool/netlink.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'net/ethtool/netlink.c') diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c index 117971e695ca..ca1695de8c9d 100644 --- a/net/ethtool/netlink.c +++ b/net/ethtool/netlink.c @@ -228,6 +228,7 @@ ethnl_default_requests[__ETHTOOL_MSG_USER_CNT] = { [ETHTOOL_MSG_RINGS_GET] = ðnl_rings_request_ops, [ETHTOOL_MSG_CHANNELS_GET] = ðnl_channels_request_ops, [ETHTOOL_MSG_COALESCE_GET] = ðnl_coalesce_request_ops, + [ETHTOOL_MSG_PAUSE_GET] = ðnl_pause_request_ops, }; static struct ethnl_dump_ctx *ethnl_dump_context(struct netlink_callback *cb) @@ -801,6 +802,13 @@ static const struct genl_ops ethtool_genl_ops[] = { .flags = GENL_UNS_ADMIN_PERM, .doit = ethnl_set_coalesce, }, + { + .cmd = ETHTOOL_MSG_PAUSE_GET, + .doit = ethnl_default_doit, + .start = ethnl_default_start, + .dumpit = ethnl_default_dumpit, + .done = ethnl_default_done, + }, }; static const struct genl_multicast_group ethtool_nl_mcgrps[] = { -- cgit v1.2.3