]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net: NETIF_F_HW_CSUM does not imply FCoE CRC offload
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 22 Oct 2010 04:38:26 +0000 (04:38 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:26:44 +0000 (13:26 -0800)
commit 66c68bcc489fadd4f5e8839e966e3a366e50d1d5 upstream.

NETIF_F_HW_CSUM indicates the ability to update an TCP/IP-style 16-bit
checksum with the checksum of an arbitrary part of the packet data,
whereas the FCoE CRC is something entirely different.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/core/dev.c

index 915d0aeb4616f50d1e7ca0f3204482dc0933a762..d04cd93f22b5cf262f60fc23ec6400c2f58282b9 100644 (file)
@@ -1484,10 +1484,10 @@ EXPORT_SYMBOL(netif_device_attach);
 
 static bool can_checksum_protocol(unsigned long features, __be16 protocol)
 {
-       return ((features & NETIF_F_GEN_CSUM) ||
-               ((features & NETIF_F_IP_CSUM) &&
+       return ((features & NETIF_F_NO_CSUM) ||
+               ((features & NETIF_F_V4_CSUM) &&
                 protocol == htons(ETH_P_IP)) ||
-               ((features & NETIF_F_IPV6_CSUM) &&
+               ((features & NETIF_F_V6_CSUM) &&
                 protocol == htons(ETH_P_IPV6)) ||
                ((features & NETIF_F_FCOE_CRC) &&
                 protocol == htons(ETH_P_FCOE)));