ia64/xen-unstable

changeset 5098:36cd2ccb0e4b

bitkeeper revision 1.1518 (42923748Z36fQ-pX8ugPi-8ioexnOg)

Add ethtools support to turn on/off Tx checksum offloading in
the netfront driver.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
author bren@br260.wolfson.cam.ac.uk
date Mon May 23 20:04:24 2005 +0000 (2005-05-23)
parents a33909b1daaf
children 18001959ba29
files linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Mon May 23 18:52:17 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c	Mon May 23 20:04:24 2005 +0000
     1.3 @@ -40,6 +40,7 @@
     1.4  #include <linux/init.h>
     1.5  #include <linux/bitops.h>
     1.6  #include <linux/proc_fs.h>
     1.7 +#include <linux/ethtool.h>
     1.8  #include <net/sock.h>
     1.9  #include <net/pkt_sched.h>
    1.10  #include <net/arp.h>
    1.11 @@ -928,6 +929,11 @@ vif_connect(struct net_private *np, neti
    1.12      vif_show(np);
    1.13  }
    1.14  
    1.15 +static struct ethtool_ops network_ethtool_ops =
    1.16 +{
    1.17 +    .get_tx_csum = ethtool_op_get_tx_csum,
    1.18 +    .set_tx_csum = ethtool_op_set_tx_csum,
    1.19 +};
    1.20  
    1.21  /** Create a network device.
    1.22   * @param handle device handle
    1.23 @@ -973,6 +979,8 @@ static int create_netdev(int handle, str
    1.24      dev->weight          = 64;
    1.25      dev->features        = NETIF_F_IP_CSUM;
    1.26  
    1.27 +    SET_ETHTOOL_OPS(dev, &network_ethtool_ops);
    1.28 +
    1.29      if ((err = register_netdev(dev)) != 0) {
    1.30          printk(KERN_WARNING "%s> register_netdev err=%d\n", __FUNCTION__, err);
    1.31          goto exit;