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 a03a01e5339e..58c46131126b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9782,8 +9782,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; @@ -9791,15 +9792,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, @@ -9938,7 +9937,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;