]> err.no Git - linux-2.6/blobdiff - net/core/ethtool.c
Merge git://git.infradead.org/hdrcleanup-2.6
[linux-2.6] / net / core / ethtool.c
index 0350586e91956d230483d82d417938c39cf90805..33ce7ed6afc651206443200ed1d705c73bf01b08 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/module.h>
 #include <linux/types.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/ethtool.h>
 #include <linux/netdevice.h>
@@ -29,7 +30,7 @@ u32 ethtool_op_get_link(struct net_device *dev)
 
 u32 ethtool_op_get_tx_csum(struct net_device *dev)
 {
-       return (dev->features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM)) != 0;
+       return (dev->features & NETIF_F_ALL_CSUM) != 0;
 }
 
 int ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
@@ -550,9 +551,7 @@ static int ethtool_set_sg(struct net_device *dev, char __user *useraddr)
                return -EFAULT;
 
        if (edata.data && 
-           !(dev->features & (NETIF_F_IP_CSUM |
-                              NETIF_F_NO_CSUM |
-                              NETIF_F_HW_CSUM)))
+           !(dev->features & NETIF_F_ALL_CSUM))
                return -EINVAL;
 
        return __ethtool_set_sg(dev, edata.data);
@@ -590,7 +589,7 @@ static int ethtool_set_tso(struct net_device *dev, char __user *useraddr)
 
 static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr)
 {
-       struct ethtool_value edata = { ETHTOOL_GTSO };
+       struct ethtool_value edata = { ETHTOOL_GUFO };
 
        if (!dev->ethtool_ops->get_ufo)
                return -EOPNOTSUPP;
@@ -599,6 +598,7 @@ static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr)
                 return -EFAULT;
        return 0;
 }
+
 static int ethtool_set_ufo(struct net_device *dev, char __user *useraddr)
 {
        struct ethtool_value edata;