@@ -271,10 +271,10 @@ static void wg_setup(struct net_device *dev)
dev->type = ARPHRD_NONE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
dev->priv_flags |= IFF_NO_QUEUE;
- dev->features |= NETIF_F_LLTX;
- dev->features |= WG_NETDEV_FEATURES;
- dev->hw_features |= WG_NETDEV_FEATURES;
- dev->hw_enc_features |= WG_NETDEV_FEATURES;
+ netdev_feature_set_bit(NETIF_F_LLTX_BIT, &dev->features);
+ netdev_feature_set_bits(WG_NETDEV_FEATURES, &dev->features);
+ netdev_feature_set_bits(WG_NETDEV_FEATURES, &dev->hw_features);
+ netdev_feature_set_bits(WG_NETDEV_FEATURES, &dev->hw_enc_features);
dev->mtu = ETH_DATA_LEN - overhead;
dev->max_mtu = round_down(INT_MAX, MESSAGE_PADDING_MULTIPLE) - overhead;
Use netdev_feature_xxx helpers to replace the logical operation for netdev features. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/wireguard/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)