@@ -2139,20 +2139,22 @@ static int ns83820_init_one(struct pci_dev *pci_dev,
ns83820_getmac(dev, ndev->dev_addr);
/* Yes, we support dumb IP checksum on transmit */
- ndev->features |= NETIF_F_SG;
- ndev->features |= NETIF_F_IP_CSUM;
+ netdev_feature_set_bit(NETIF_F_SG_BIT, &ndev->features);
+ netdev_feature_set_bit(NETIF_F_IP_CSUM_BIT, &ndev->features);
ndev->min_mtu = 0;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
/* We also support hardware vlan acceleration */
- ndev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX;
+ netdev_feature_set_bits(NETIF_F_HW_VLAN_CTAG_TX |
+ NETIF_F_HW_VLAN_CTAG_RX,
+ &ndev->features);
#endif
if (using_dac) {
printk(KERN_INFO "%s: using 64 bit addressing.\n",
ndev->name);
- ndev->features |= NETIF_F_HIGHDMA;
+ netdev_feature_set_bit(NETIF_F_HIGHDMA_BIT, &ndev->features);
}
printk(KERN_INFO "%s: ns83820 v" VERSION ": DP83820 v%u.%u: %pM io=0x%08lx irq=%d f=%s\n",
@@ -2160,7 +2162,8 @@ static int ns83820_init_one(struct pci_dev *pci_dev,
(unsigned)readl(dev->base + SRR) >> 8,
(unsigned)readl(dev->base + SRR) & 0xff,
ndev->dev_addr, addr, pci_dev->irq,
- (ndev->features & NETIF_F_HIGHDMA) ? "h,sg" : "sg"
+ netdev_feature_test_bit(NETIF_F_HIGHDMA_BIT,
+ ndev->features) ? "h,sg" : "sg"
);
#ifdef PHY_CODE_IS_FINISHED
Use netdev_feature_xxx helpers to replace the logical operation for netdev features. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ethernet/natsemi/ns83820.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)