net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM

dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
changeable and driver is converted to hw_features and friends. Fix this.

(dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Michał Mirosław and committed by David S. Miller 4dd5ffe4 c261344d

+2 -2
+2 -2
include/linux/netdevice.h
··· 2598 2599 static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) 2600 { 2601 - if (dev->hw_features & NETIF_F_RXCSUM) 2602 - return !!(dev->features & NETIF_F_RXCSUM); 2603 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) 2604 return 0; 2605 return dev->ethtool_ops->get_rx_csum(dev);
··· 2598 2599 static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) 2600 { 2601 + if (dev->features & NETIF_F_RXCSUM) 2602 + return 1; 2603 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) 2604 return 0; 2605 return dev->ethtool_ops->get_rx_csum(dev);