
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/wireguard/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c index 551ddaaaf540..9c58f5208909 100644 --- a/drivers/net/wireguard/device.c +++ b/drivers/net/wireguard/device.c @@ -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;