aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 956a9f4971cb..d5bc28818883 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1171,7 +1171,9 @@ static int ethtool_set_ufo(struct net_device *dev, char __user *useraddr)
1171 return -EFAULT; 1171 return -EFAULT;
1172 if (edata.data && !(dev->features & NETIF_F_SG)) 1172 if (edata.data && !(dev->features & NETIF_F_SG))
1173 return -EINVAL; 1173 return -EINVAL;
1174 if (edata.data && !(dev->features & NETIF_F_HW_CSUM)) 1174 if (edata.data && !((dev->features & NETIF_F_GEN_CSUM) ||
1175 (dev->features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
1176 == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)))
1175 return -EINVAL; 1177 return -EINVAL;
1176 return dev->ethtool_ops->set_ufo(dev, edata.data); 1178 return dev->ethtool_ops->set_ufo(dev, edata.data);
1177} 1179}