Skip to content

Commit

Permalink
net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
osctobe authored and davem330 committed Apr 2, 2011
1 parent c261344 commit 4dd5ffe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
if (dev->hw_features & NETIF_F_RXCSUM)
return !!(dev->features & NETIF_F_RXCSUM);
if (dev->features & NETIF_F_RXCSUM)
return 1;
if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum)
return 0;
return dev->ethtool_ops->get_rx_csum(dev);
Expand Down

0 comments on commit 4dd5ffe

Please sign in to comment.