aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-20 08:59:45 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-20 08:59:45 -0400
commitd59bf96cdde5b874a57bfd1425faa45da915d0b7 (patch)
tree351a40b72514d620e5bebea2de38c26f23277ffc /net/core/ethtool.c
parent28df955a2ad484d602314b30183ea8496a9aa34a (diff)
parent25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index e6f76106a99b..33ce7ed6afc6 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -30,7 +30,7 @@ u32 ethtool_op_get_link(struct net_device *dev)
30 30
31u32 ethtool_op_get_tx_csum(struct net_device *dev) 31u32 ethtool_op_get_tx_csum(struct net_device *dev)
32{ 32{
33 return (dev->features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM)) != 0; 33 return (dev->features & NETIF_F_ALL_CSUM) != 0;
34} 34}
35 35
36int ethtool_op_set_tx_csum(struct net_device *dev, u32 data) 36int ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
@@ -551,9 +551,7 @@ static int ethtool_set_sg(struct net_device *dev, char __user *useraddr)
551 return -EFAULT; 551 return -EFAULT;
552 552
553 if (edata.data && 553 if (edata.data &&
554 !(dev->features & (NETIF_F_IP_CSUM | 554 !(dev->features & NETIF_F_ALL_CSUM))
555 NETIF_F_NO_CSUM |
556 NETIF_F_HW_CSUM)))
557 return -EINVAL; 555 return -EINVAL;
558 556
559 return __ethtool_set_sg(dev, edata.data); 557 return __ethtool_set_sg(dev, edata.data);
@@ -591,7 +589,7 @@ static int ethtool_set_tso(struct net_device *dev, char __user *useraddr)
591 589
592static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr) 590static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr)
593{ 591{
594 struct ethtool_value edata = { ETHTOOL_GTSO }; 592 struct ethtool_value edata = { ETHTOOL_GUFO };
595 593
596 if (!dev->ethtool_ops->get_ufo) 594 if (!dev->ethtool_ops->get_ufo)
597 return -EOPNOTSUPP; 595 return -EOPNOTSUPP;
@@ -600,6 +598,7 @@ static int ethtool_get_ufo(struct net_device *dev, char __user *useraddr)
600 return -EFAULT; 598 return -EFAULT;
601 return 0; 599 return 0;
602} 600}
601
603static int ethtool_set_ufo(struct net_device *dev, char __user *useraddr) 602static int ethtool_set_ufo(struct net_device *dev, char __user *useraddr)
604{ 603{
605 struct ethtool_value edata; 604 struct ethtool_value edata;