
For the origin type for netdev_features_t would be changed to be unsigned long * from u64, so changes the prototype of netdev_sync_upper_features for adaption. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- net/core/dev.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index ee5bf8620316..08437ec23861 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9772,8 +9772,9 @@ static void net_set_todo(struct net_device *dev) dev_net(dev)->dev_unreg_count++; } -static netdev_features_t netdev_sync_upper_features(struct net_device *lower, - struct net_device *upper, netdev_features_t features) +static void netdev_sync_upper_features(struct net_device *lower, + struct net_device *upper, + netdev_features_t *features) { netdev_features_t upper_disables = NETIF_F_UPPER_DISABLES; netdev_features_t feature; @@ -9781,15 +9782,13 @@ static netdev_features_t netdev_sync_upper_features(struct net_device *lower, for_each_netdev_feature(upper_disables, feature_bit) { feature = __NETIF_F_BIT(feature_bit); - if (!(upper->wanted_features & feature) - && (features & feature)) { + if (!(upper->wanted_features & feature) && + (*features & feature)) { netdev_dbg(lower, "Dropping feature %pNF, upper dev %s has it off.\n", &feature, upper->name); - features &= ~feature; + *features &= ~feature; } } - - return features; } static void netdev_sync_lower_features(struct net_device *upper, @@ -9928,7 +9927,7 @@ int __netdev_update_features(struct net_device *dev) /* some features can't be enabled if they're off on an upper device */ netdev_for_each_upper_dev_rcu(dev, upper, iter) - features = netdev_sync_upper_features(dev, upper, features); + netdev_sync_upper_features(dev, upper, &features); if (dev->features == features) goto sync_lower; -- 2.33.0