@@ -213,11 +213,13 @@ static void ifb_setup(struct net_device *dev)
ether_setup(dev);
dev->tx_queue_len = TX_Q_LIMIT;
- dev->features |= IFB_FEATURES;
- dev->hw_features |= dev->features;
- dev->hw_enc_features |= dev->features;
- dev->vlan_features |= IFB_FEATURES & ~(NETIF_F_HW_VLAN_CTAG_TX |
- NETIF_F_HW_VLAN_STAG_TX);
+ netdev_feature_set_bits(IFB_FEATURES, &dev->features);
+ netdev_feature_or(&dev->hw_features, dev->hw_features, dev->features);
+ netdev_feature_or(&dev->hw_enc_features, dev->hw_enc_features,
+ dev->features);
+ netdev_feature_set_bits(IFB_FEATURES & ~(NETIF_F_HW_VLAN_CTAG_TX |
+ NETIF_F_HW_VLAN_STAG_TX),
+ &dev->vlan_features);
dev->flags |= IFF_NOARP;
dev->flags &= ~IFF_MULTICAST;
Use netdev_feature_xxx helpers to replace the logical operation for netdev features. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ifb.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)