[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210929155334.12454-78-shenjian15@huawei.com>
Date: Wed, 29 Sep 2021 23:52:04 +0800
From: Jian Shen <shenjian15@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <andrew@...n.ch>,
<hkallweit1@...il.com>
CC: <netdev@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: [RFCv2 net-next 077/167] net: can: use netdev feature helpers
Use netdev_feature_xxx helpers to replace the logical operation
for netdev features.
Signed-off-by: Jian Shen <shenjian15@...wei.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);
}
/******************************************
--
2.33.0
Powered by blists - more mailing lists