diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2020-03-12 23:08:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-13 01:32:33 +0300 |
commit | 111dcba3c694b4ca7dc8b6abfd575745dd51be3d (patch) | |
tree | 65e37a9bab57c2c0e2cca0c0724f13757d19062a /net/ethtool/privflags.c | |
parent | f265d799596aff80fe19b0b3896a4abe13cdb534 (diff) | |
download | linux-111dcba3c694b4ca7dc8b6abfd575745dd51be3d.tar.xz |
ethtool: add PRIVFLAGS_NTF notification
Send ETHTOOL_MSG_PRIVFLAGS_NTF notification whenever private flags of
a network device are modified using ETHTOOL_MSG_PRIVFLAGS_SET netlink
message or ETHTOOL_SPFLAGS ioctl request.
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/privflags.c')
-rw-r--r-- | net/ethtool/privflags.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ethtool/privflags.c b/net/ethtool/privflags.c index dfa76d552277..e8f03b33db9b 100644 --- a/net/ethtool/privflags.c +++ b/net/ethtool/privflags.c @@ -194,6 +194,9 @@ int ethnl_set_privflags(struct sk_buff *skb, struct genl_info *info) if (ret < 0 || !mod) goto out_free; ret = ops->set_priv_flags(dev, flags); + if (ret < 0) + goto out_free; + ethtool_notify(dev, ETHTOOL_MSG_PRIVFLAGS_NTF, NULL); out_free: kfree(names); |