@@ -4601,8 +4601,8 @@ iavf_get_netdev_vlan_features(struct iavf_adapter *adapter)
}
#define IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested, allowed, feature_bit) \
- (!(((requested) & (feature_bit)) && \
- !((allowed) & (feature_bit))))
+ (!(netdev_feature_test(feature_bit, requested) && \
+ !netdev_feature_test(feature_bit, allowed)))
/**
* iavf_fix_netdev_vlan_features - fix NETDEV VLAN features based on support
@@ -4620,31 +4620,31 @@ iavf_fix_netdev_vlan_features(struct iavf_adapter *adapter,
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_CTAG_TX))
+ NETIF_F_HW_VLAN_CTAG_TX_BIT))
requested_features &= ~NETIF_F_HW_VLAN_CTAG_TX;
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_CTAG_RX))
+ NETIF_F_HW_VLAN_CTAG_RX_BIT))
requested_features &= ~NETIF_F_HW_VLAN_CTAG_RX;
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_STAG_TX))
+ NETIF_F_HW_VLAN_STAG_TX_BIT))
requested_features &= ~NETIF_F_HW_VLAN_STAG_TX;
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_STAG_RX))
+ NETIF_F_HW_VLAN_STAG_RX_BIT))
requested_features &= ~NETIF_F_HW_VLAN_STAG_RX;
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_CTAG_FILTER))
+ NETIF_F_HW_VLAN_CTAG_FILTER_BIT))
requested_features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
if (!IAVF_NETDEV_VLAN_FEATURE_ALLOWED(requested_features,
allowed_features,
- NETIF_F_HW_VLAN_STAG_FILTER))
+ NETIF_F_HW_VLAN_STAG_FILTER_BIT))
requested_features &= ~NETIF_F_HW_VLAN_STAG_FILTER;
if ((requested_features & netdev_ctag_vlan_offload_features) &&
The macro IAVF_NETDEV_VLAN_FEATURE_ALLOWED use NETIF_F_XXX as parameter directly, change it to use NETIF_F_XXX_BIT, for all the macroes NETIF_F_XXX will be removed later. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ethernet/intel/iavf/iavf_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)