diff options
author | Paul Martin <paul.martin@codethink.co.uk> | 2015-03-30 17:01:01 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 17:22:15 +0200 |
commit | 97b290b5637f473588a297834c10cd750718e980 (patch) | |
tree | d7b9150de72e8eeddfcf5a46c6b288aea1361836 /drivers/staging | |
parent | d2a948d2db68bda8780df636cf6390748953793f (diff) | |
download | linux-stable-97b290b5637f473588a297834c10cd750718e980.tar.gz linux-stable-97b290b5637f473588a297834c10cd750718e980.tar.bz2 linux-stable-97b290b5637f473588a297834c10cd750718e980.zip |
MIPS: Octeon: Fix to IP checksum offloading in Little Endian
When hardware checksum generation is switched on the checksum
generation was only being signalled to the hardware correctly
in Big Endian mode.
Signed-off-by: Paul Martin <paul.martin@codethink.co.uk>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9634/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/octeon/ethernet-tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index a078b903a168..5b9ac1f6d6f0 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -413,7 +413,7 @@ dont_put_skbuff_in_hw: /* Check if we can use the hardware checksumming */ if (USE_HW_TCPUDP_CHECKSUM && (skb->protocol == htons(ETH_P_IP)) && (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) && - ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == 1 << 14)) + ((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == htons(1 << 14))) && ((ip_hdr(skb)->protocol == IPPROTO_TCP) || (ip_hdr(skb)->protocol == IPPROTO_UDP))) { /* Use hardware checksum calc */ |