Use netdev_feature_xxx helpers to replace the logical operation for netdev features.
Signed-off-by: Jian Shen shenjian15@huawei.com --- drivers/net/ethernet/sgi/ioc3-eth.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 062f784..ee72fc5 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -397,7 +397,8 @@ static inline void ioc3_rx(struct net_device *dev) goto next; }
- if (likely(dev->features & NETIF_F_RXCSUM)) + if (likely(netdev_feature_test_bit(NETIF_F_RXCSUM_BIT, + dev->features)) ioc3_tcpudp_checksum(skb, w0 & ERXBUF_IPCKSUM_MASK, len); @@ -926,8 +927,12 @@ static int ioc3eth_probe(struct platform_device *pdev) dev->watchdog_timeo = 5 * HZ; dev->netdev_ops = &ioc3_netdev_ops; dev->ethtool_ops = &ioc3_ethtool_ops; - dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM; - dev->features = NETIF_F_IP_CSUM | NETIF_F_HIGHDMA; + netdev_feature_zero(&dev->hw_features); + netdev_feature_set_bits(NETIF_F_IP_CSUM | NETIF_F_RXCSUM, + &dev->hw_features); + netdev_feature_zero(&dev->features); + netdev_feature_set_bits(NETIF_F_IP_CSUM | NETIF_F_HIGHDMA, + &dev->features);
sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1); sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2);