summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/ethtool.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index fcd62757704d..248c25c3e820 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1181,8 +1181,11 @@ static int ethtool_set_gro(struct net_device *dev, char __user *useraddr)
return -EFAULT;
if (edata.data) {
- if (!dev->ethtool_ops->get_rx_csum ||
- !dev->ethtool_ops->get_rx_csum(dev))
+ u32 rxcsum = dev->ethtool_ops->get_rx_csum ?
+ dev->ethtool_ops->get_rx_csum(dev) :
+ ethtool_op_get_rx_csum(dev);
+
+ if (!rxcsum)
return -EINVAL;
dev->features |= NETIF_F_GRO;
} else