Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211504
b: refs/heads/master
c: 71085ce
h: refs/heads/master
v: v3
  • Loading branch information
Breno Leitao authored and David S. Miller committed Oct 13, 2010
1 parent 740d925 commit d60b26b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6fcc040f02d281c7e9563127358a77ce2bbfe284
refs/heads/master: 71085ce8285dc5f3011694f6ba7259201135c6d6
9 changes: 8 additions & 1 deletion trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ehea/ehea_qmr.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ struct ehea_rwqe {
#define EHEA_CQE_TYPE_RQ 0x60
#define EHEA_CQE_STAT_ERR_MASK 0x700F
#define EHEA_CQE_STAT_FAT_ERR_MASK 0xF
#define EHEA_CQE_BLIND_CKSUM 0x8000
#define EHEA_CQE_STAT_ERR_TCP 0x4000
#define EHEA_CQE_STAT_ERR_IP 0x2000
#define EHEA_CQE_STAT_ERR_CRC 0x1000
Expand Down

0 comments on commit d60b26b

Please sign in to comment.