X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=net%2Fethtool%2Ffeatures.c;h=b6cb101d7f19ef5038f6f0e10139b1e5ccfa4af5;hb=2ae2e7cf658df6d62b28f9ae2b35ca4404a3a2f4;hp=a79af8c25a07121baf0e66f30f9161c9cf7cdee6;hpb=53cea04da86144205befe78c2217f86f067c0b18;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/net/ethtool/features.c b/net/ethtool/features.c index a79af8c..b6cb101 100644 --- a/net/ethtool/features.c +++ b/net/ethtool/features.c @@ -234,17 +234,20 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info) dev = req_info.dev; rtnl_lock(); + ret = ethnl_ops_begin(dev); + if (ret < 0) + goto out_rtnl; ethnl_features_to_bitmap(old_active, dev->features); ethnl_features_to_bitmap(old_wanted, dev->wanted_features); ret = ethnl_parse_bitset(req_wanted, req_mask, NETDEV_FEATURE_COUNT, tb[ETHTOOL_A_FEATURES_WANTED], netdev_features_strings, info->extack); if (ret < 0) - goto out_rtnl; + goto out_ops; if (ethnl_bitmap_to_features(req_mask) & ~NETIF_F_ETHTOOL_BITS) { GENL_SET_ERR_MSG(info, "attempt to change non-ethtool features"); ret = -EINVAL; - goto out_rtnl; + goto out_ops; } /* set req_wanted bits not in req_mask from old_wanted */ @@ -281,6 +284,8 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info) if (mod) netdev_features_change(dev); +out_ops: + ethnl_ops_complete(dev); out_rtnl: rtnl_unlock(); ethnl_parse_header_dev_put(&req_info);