diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-17 12:38:33 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-17 12:38:33 +0400 |
commit | 84cc5c0bd3ef8711793cc0af2ecc3fb8e44f4ba0 (patch) | |
tree | 6774218cb21d5ffbe704d6ad6beadc8559aaed1c /drivers/net/ehea/ehea_main.c | |
parent | 57e35381bc13e6f18ac1ec255ca61ba1a5103e13 (diff) | |
parent | aa73aec6c385e2c797ac25cc7ccf0318031de7c8 (diff) | |
download | linux-84cc5c0bd3ef8711793cc0af2ecc3fb8e44f4ba0.tar.xz |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index a333b42111b8..6372610ed240 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -533,8 +533,15 @@ static inline void ehea_fill_skb(struct net_device *dev, int length = cqe->num_bytes_transfered - 4; /*remove CRC */ skb_put(skb, length); - skb->ip_summed = CHECKSUM_UNNECESSARY; skb->protocol = eth_type_trans(skb, dev); + + /* The packet was not an IPV4 packet so a complemented checksum was + calculated. The value is found in the Internet Checksum field. */ + if (cqe->status & EHEA_CQE_BLIND_CKSUM) { + skb->ip_summed = CHECKSUM_COMPLETE; + skb->csum = csum_unfold(~cqe->inet_checksum_value); + } else + skb->ip_summed = CHECKSUM_UNNECESSARY; } static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array, |