diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-10-22 04:38:26 +0000 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-04-17 16:15:42 -0400 |
commit | c7cbd0f7e7e282a97ac91d7466a0cd579199ddcd (patch) | |
tree | 4019ad27d5bb375e09585cdbfd3094a29b609765 /net | |
parent | cdae69720bf88450fabc93f1e2ded4a8e53b8dd4 (diff) | |
download | linux-stable-c7cbd0f7e7e282a97ac91d7466a0cd579199ddcd.tar.gz linux-stable-c7cbd0f7e7e282a97ac91d7466a0cd579199ddcd.tar.bz2 linux-stable-c7cbd0f7e7e282a97ac91d7466a0cd579199ddcd.zip |
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: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 740e71ff7c30..f66417739448 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1610,10 +1610,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))); |