summaryrefslogtreecommitdiffstats
path: root/net/ethtool/features.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool/features.c')
-rw-r--r--net/ethtool/features.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ethtool/features.c b/net/ethtool/features.c
index ec196f0fddc9..6b288bfd7678 100644
--- a/net/ethtool/features.c
+++ b/net/ethtool/features.c
@@ -273,7 +273,8 @@ int ethnl_set_features(struct sk_buff *skb, struct genl_info *info)
goto out_rtnl;
}
- dev->wanted_features = ethnl_bitmap_to_features(req_wanted);
+ dev->wanted_features &= ~dev->hw_features;
+ dev->wanted_features |= ethnl_bitmap_to_features(req_wanted) & dev->hw_features;
__netdev_update_features(dev);
ethnl_features_to_bitmap(new_active, dev->features);
mod = !bitmap_equal(old_active, new_active, NETDEV_FEATURE_COUNT);