aboutsummaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-10-22 04:38:26 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-21 12:43:49 -0700
commit57a14e526c888cf99015f52320ffab89d8f2eda6 (patch)
treef52f02e48304ad281ff16681c689607584f8fd9a /net/core/dev.c
parent5572adc7b7f7694b2ea4abcc87eb81a6bb64656e (diff)
net: NETIF_F_HW_CSUM does not imply FCoE CRC offload
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 7eb7c1d88e7..6d1eefc258a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1590,10 +1590,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)));