From 5cf2a548bcbd3da3e79adb0b64ef96dbb9988d78 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Fri, 27 Dec 2019 15:55:58 +0100 Subject: ethtool: add default notification handler The ethtool netlink notifications have the same format as related GET replies so that if generic GET handling framework is used to process GET requests, its callbacks and instance of struct get_request_ops can be also used to compose corresponding notification message. Provide function ethnl_std_notify() to be used as notification handler in ethnl_notify_handlers table. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- net/ethtool/netlink.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/ethtool/netlink.h') diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h index bbe5fe60a023..5d56d7779a06 100644 --- a/net/ethtool/netlink.h +++ b/net/ethtool/netlink.h @@ -300,7 +300,9 @@ static inline void ethnl_ops_complete(struct net_device *dev) * unified infrastructure. When used, a pointer to an instance of this * structure is to be added to ðnl_default_requests array and generic * handlers ethnl_default_doit(), ethnl_default_dumpit(), - * ethnl_default_start() and ethnl_default_done() used in @ethtool_genl_ops. + * ethnl_default_start() and ethnl_default_done() used in @ethtool_genl_ops; + * ethnl_default_notify() can be used in @ethnl_notify_handlers to send + * notifications of the corresponding type. */ struct ethnl_request_ops { u8 request_cmd; -- cgit v1.2.3