@@ -2199,7 +2199,7 @@ static netdev_features_t xgbe_fix_features(struct net_device *netdev,
}
/* Can't do one without doing the other */
- if ((features & vxlan_base) != vxlan_base) {
+ if (!netdev_features_subset(vxlan_base, features)) {
netdev_notice(netdev,
"forcing both tx and rx udp tunnel support\n");
netdev_features_set(features, vxlan_base);
@@ -9701,8 +9701,7 @@ static netdev_features_t netdev_fix_features(struct net_device *dev,
}
if (netdev_feature_test(NETIF_F_HW_TLS_TX_BIT, features)) {
- bool ip_csum = (features & netdev_ip_csum_features) ==
- netdev_ip_csum_features;
+ bool ip_csum = netdev_features_subset(netdev_ip_csum_features, features);
bool hw_csum = netdev_feature_test(NETIF_F_HW_CSUM_BIT,
features);
Replace the '(f1 & f2) == f2' expressions of features by netdev_features_subset helpers. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- net/core/dev.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)