summaryrefslogtreecommitdiffstats
path: root/net/ethtool/pause.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-03-28 00:01:33 +0100
committerDavid S. Miller <davem@davemloft.net>2020-03-29 22:32:36 -0700
commitbf37faa3867b370a77e9359a27daebdbec604cfd (patch)
tree9bb461802a83833b49da6fe1b775a89f8177771b /net/ethtool/pause.c
parent3ab879933d3cf69f8896dc7ad543eee06fd229ba (diff)
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 <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/pause.c')
-rw-r--r--net/ethtool/pause.c3
1 files changed, 3 insertions, 0 deletions
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, &params);
+ if (ret < 0)
+ goto out_ops;
+ ethtool_notify(dev, ETHTOOL_MSG_PAUSE_NTF, NULL);
out_ops:
ethnl_ops_complete(dev);