]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netxen: fix tx csum status
authorSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Mon, 29 Mar 2010 02:43:41 +0000 (02:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2010 20:18:35 +0000 (13:18 -0700)
Kernel default tx csum function (ethtool_op_get_tx_csum) doesn't show
correct csum status. It takes various FLAGS (NETIF_F_ALL_CSUM) in account
to show tx csum status, which driver doesn't set while disabling tx csum.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_ethtool.c

index f8499e56cbee4752b37938aa0f0a948663134bec..aecba787f7c822c17aa735d2698a865235fa5c13 100644 (file)
@@ -703,6 +703,11 @@ netxen_nic_get_ethtool_stats(struct net_device *dev,
        }
 }
 
+static u32 netxen_nic_get_tx_csum(struct net_device *dev)
+{
+       return dev->features & NETIF_F_IP_CSUM;
+}
+
 static u32 netxen_nic_get_rx_csum(struct net_device *dev)
 {
        struct netxen_adapter *adapter = netdev_priv(dev);
@@ -909,6 +914,7 @@ const struct ethtool_ops netxen_nic_ethtool_ops = {
        .set_ringparam = netxen_nic_set_ringparam,
        .get_pauseparam = netxen_nic_get_pauseparam,
        .set_pauseparam = netxen_nic_set_pauseparam,
+       .get_tx_csum = netxen_nic_get_tx_csum,
        .set_tx_csum = ethtool_op_set_tx_csum,
        .set_sg = ethtool_op_set_sg,
        .get_tso = netxen_nic_get_tso,