Review-by: Jie Wang wangjie125@huawei.com
On 2021/9/22 22:57, Jian Shen wrote:
Use netdev_feature_xxx helpers to replace the logical operation for netdev features.
Signed-off-by: Jian Shen shenjian15@huawei.com
drivers/net/can/dev/dev.c | 3 ++- drivers/net/can/slcan.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/dev/dev.c b/drivers/net/can/dev/dev.c index e3d840b81357..97c61943125e 100644 --- a/drivers/net/can/dev/dev.c +++ b/drivers/net/can/dev/dev.c @@ -233,7 +233,8 @@ void can_setup(struct net_device *dev)
/* New-style flags. */ dev->flags = IFF_NOARP;
- dev->features = NETIF_F_HW_CSUM;
- netdev_feature_zero(&dev->features);
- netdev_feature_set_bit(NETIF_F_HW_CSUM_BIT, &dev->features);
}
/* Allocate and setup space for the CAN network device */ diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index d42ec7d1bc14..8af2cf00a021 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -450,7 +450,8 @@ static void slc_setup(struct net_device *dev)
/* New-style flags. */ dev->flags = IFF_NOARP;
- dev->features = NETIF_F_HW_CSUM;
- netdev_feature_zero(&dev->features);
- netdev_feature_set_bit(NETIF_F_HW_CSUM_BIT, &dev->features);
}
/******************************************