summaryrefslogtreecommitdiff
path: root/net/ethtool/channels.c
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2020-03-12 23:08:48 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-13 01:32:33 +0300
commit546379b9a01b6bdb5b267f8e7433944d5364cbf2 (patch)
tree820dab0266e9656c7fdfd4eb7a09aedf2d26c3b1 /net/ethtool/channels.c
parente19c591eafad4d723a2eed385e253eca0506cc25 (diff)
downloadlinux-546379b9a01b6bdb5b267f8e7433944d5364cbf2.tar.xz
ethtool: add CHANNELS_NTF notification
Send ETHTOOL_MSG_CHANNELS_NTF notification whenever channel counts of a network device are modified using ETHTOOL_MSG_CHANNELS_SET netlink message or ETHTOOL_SCHANNELS ioctl request. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/channels.c')
-rw-r--r--net/ethtool/channels.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ethtool/channels.c b/net/ethtool/channels.c
index ee232c11acae..8dc5485333a4 100644
--- a/net/ethtool/channels.c
+++ b/net/ethtool/channels.c
@@ -213,6 +213,9 @@ int ethnl_set_channels(struct sk_buff *skb, struct genl_info *info)
}
ret = dev->ethtool_ops->set_channels(dev, &channels);
+ if (ret < 0)
+ goto out_ops;
+ ethtool_notify(dev, ETHTOOL_MSG_CHANNELS_NTF, NULL);
out_ops:
ethnl_ops_complete(dev);