aboutsummaryrefslogtreecommitdiffstats
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)
1181 return -EFAULT; 1181 return -EFAULT;
1182 1182
1183 if (edata.data) { 1183 if (edata.data) {
1184 if (!dev->ethtool_ops->get_rx_csum || 1184 u32 rxcsum = dev->ethtool_ops->get_rx_csum ?
1185 !dev->ethtool_ops->get_rx_csum(dev)) 1185 dev->ethtool_ops->get_rx_csum(dev) :
1186 ethtool_op_get_rx_csum(dev);
1187
1188 if (!rxcsum)
1186 return -EINVAL; 1189 return -EINVAL;
1187 dev->features |= NETIF_F_GRO; 1190 dev->features |= NETIF_F_GRO;
1188 } else 1191 } else