forcedeth: fix checksum flag

Previous thread: net/usb/mcs7830: add set_mac_address by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)

Next thread: net: don't grab a mutex within a timer context in gianfar by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, August 28, 2008 - 1:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=edcfe5...
Commit:     edcfe5f7e307846e578fb88d69fa27051fded0ab
Parent:     1025433147e635af9cd150676a097396cf666ddb
Author:     Ayaz Abdulla <aabdulla@nvidia.com>
AuthorDate: Wed Aug 20 16:34:37 2008 -0700
Committer:  Jeff Garzik <jgarzik@redhat.com>
CommitDate: Wed Aug 27 05:55:04 2008 -0400

    forcedeth: fix checksum flag
    
    Fix the checksum feature advertised in device flags.  The hardware support
    TCP/UDP over IPv4 and TCP/UDP over IPv6 (without IPv6 extension headers).
    However, the kernel feature flags do not distinguish IPv6 with/without
    extension headers.
    
    Therefore, the driver needs to use NETIF_F_IP_CSUM instead of
    NETIF_F_HW_CSUM since the latter includes all IPv6 packets.
    
    A future patch can be created to check for extension headers and perform
    software checksum calculation.
    
    Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
    Cc: Jeff Garzik <jgarzik@pobox.com>
    Cc: Manfred Spraul <manfred@colorfullife.com
    Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
 drivers/net/forcedeth.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 053971e..331b86b 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5522,7 +5522,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
 	if (id->driver_data & DEV_HAS_CHECKSUM) {
 		np->rx_csum = 1;
 		np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
-		dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
+		dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG;
 		dev->features |= NETIF_F_TSO;
 	}
 
@@ -5835,7 +5835,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
 
 ...
Previous thread: net/usb/mcs7830: add set_mac_address by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)

Next thread: net: don't grab a mutex within a timer context in gianfar by Linux Kernel Mailing List on Thursday, August 28, 2008 - 1:00 pm. (1 message)