Use netdev_feature_xxx helpers to replace the logical operation for netdev features.
Signed-off-by: Jian Shen shenjian15@huawei.com --- drivers/net/macvtap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 694e2f5..2162080 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -74,7 +74,7 @@ static void macvtap_update_features(struct tap_dev *tap, struct macvtap_dev *vlantap = container_of(tap, struct macvtap_dev, tap); struct macvlan_dev *vlan = &vlantap->vlan;
- vlan->set_features = features; + netdev_feature_copy(&vlan->set_features, features); netdev_update_features(vlan->dev); }
@@ -90,7 +90,8 @@ static int macvtap_newlink(struct net *src_net, struct net_device *dev, /* Since macvlan supports all offloads by default, make * tap support all offloads also. */ - vlantap->tap.tap_features = TUN_OFFLOADS; + netdev_feature_zero(&vlantap->tap.tap_features); + netdev_feature_set_bits(TUN_OFFLOADS, &vlantap->tap.tap_features);
/* Register callbacks for rx/tx drops accounting and updating * net_device features