aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-03-30 19:58:08 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-01 23:23:25 -0400
commit4dd5ffe4fc36128dc86568ddeaeae359e6037762 (patch)
treea1d36b66e8125ce9778ab96fedce028c78654c21
parentc261344d3ce3edac781f9d3c7eabe2e96d8e8fe8 (diff)
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>
-rw-r--r--include/linux/netdevice.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5eeb2cd3631c..0249fe7e3872 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev,
2598 2598
2599static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) 2599static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
2600{ 2600{
2601 if (dev->hw_features & NETIF_F_RXCSUM) 2601 if (dev->features & NETIF_F_RXCSUM)
2602 return !!(dev->features & NETIF_F_RXCSUM); 2602 return 1;
2603 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) 2603 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
2604 return 0; 2604 return 0;
2605 return dev->ethtool_ops->get_rx_csum(dev); 2605 return dev->ethtool_ops->get_rx_csum(dev);