@@ -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 */
@@ -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);
}
/******************************************
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(-)