From bf37faa3867b370a77e9359a27daebdbec604cfd Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Sat, 28 Mar 2020 00:01:33 +0100 Subject: ethtool: add PAUSE_NTF notification Send ETHTOOL_MSG_PAUSE_NTF notification whenever pause parameters of a network device are modified using ETHTOOL_MSG_PAUSE_SET netlink message or ETHTOOL_SPAUSEPARAM ioctl request. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller --- net/ethtool/pause.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/ethtool/pause.c') diff --git a/net/ethtool/pause.c b/net/ethtool/pause.c index c307b91fdfba..7aea35d1e8a5 100644 --- a/net/ethtool/pause.c +++ b/net/ethtool/pause.c @@ -131,6 +131,9 @@ int ethnl_set_pause(struct sk_buff *skb, struct genl_info *info) goto out_ops; ret = dev->ethtool_ops->set_pauseparam(dev, ¶ms); + if (ret < 0) + goto out_ops; + ethtool_notify(dev, ETHTOOL_MSG_PAUSE_NTF, NULL); out_ops: ethnl_ops_complete(dev); -- cgit 1.4.1