
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 311d856..45c7d48 100644 --- a/drivers/net/can/dev/dev.c +++ b/drivers/net/can/dev/dev.c @@ -232,7 +232,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 d42ec7d..8af2cf0 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); } /****************************************** -- 2.8.1