]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
bnx2x: fix tunneling CSUM calculation
[karo-tx-linux.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_cmn.c
index 3353efe79194c1d9f3c8b7e072543bf1c22fecf3..ee350bde1818cc38c4a20a0db70a466bf158ee2e 100644 (file)
@@ -3543,9 +3543,9 @@ static void bnx2x_update_pbds_gso_enc(struct sk_buff *skb,
        /* outer IP header info */
        if (xmit_type & XMIT_CSUM_V4) {
                struct iphdr *iph = ip_hdr(skb);
-               u16 csum = (__force u16)(~iph->check) -
-                          (__force u16)iph->tot_len -
-                          (__force u16)iph->frag_off;
+               u32 csum = (__force u32)(~iph->check) -
+                          (__force u32)iph->tot_len -
+                          (__force u32)iph->frag_off;
 
                pbd2->fw_ip_csum_wo_len_flags_frag =
                        bswab16(csum_fold((__force __wsum)csum));