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/thunderbolt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/thunderbolt.c b/drivers/net/thunderbolt.c index 9a6a8353e192..0fd4cd06fa6b 100644 --- a/drivers/net/thunderbolt.c +++ b/drivers/net/thunderbolt.c @@ -1257,9 +1257,13 @@ static int tbnet_probe(struct tb_service *svc, const struct tb_service_id *id) * we need to announce support for most of the offloading * features here. */
- dev->hw_features = NETIF_F_SG | NETIF_F_ALL_TSO | NETIF_F_GRO |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
- dev->features = dev->hw_features | NETIF_F_HIGHDMA;
netdev_feature_zero(&dev->hw_features);
netdev_feature_set_bits(NETIF_F_SG | NETIF_F_ALL_TSO | NETIF_F_GRO |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM,
&dev->hw_features);
netdev_feature_copy(&dev->features, dev->hw_features);
netdev_feature_set_bit(NETIF_F_HIGHDMA_BIT, &dev->features);
dev->hard_header_len += sizeof(struct thunderbolt_ip_frame_header);
netif_napi_add(dev, &net->napi, tbnet_poll, NAPI_POLL_WEIGHT);