Commit 4dd5ffe4 authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller

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: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c261344d
...@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev, ...@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev,
static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
{ {
if (dev->hw_features & NETIF_F_RXCSUM) if (dev->features & NETIF_F_RXCSUM)
return !!(dev->features & NETIF_F_RXCSUM); return 1;
if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
return 0; return 0;
return dev->ethtool_ops->get_rx_csum(dev); return dev->ethtool_ops->get_rx_csum(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment