Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82675
b: refs/heads/master
c: bfaffe8
h: refs/heads/master
i:
  82673: c0f6972
  82671: 87e2b4e
v: v3
  • Loading branch information
Ayaz Abdulla authored and David S. Miller committed Feb 3, 2008
1 parent 04cddd3 commit 1c32f94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 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: 0a62677b26ccb31cd81fc55d14d27d8cd3560d7d
refs/heads/master: bfaffe8fae0273b57f2146d1759cbd25d07c81e9
24 changes: 7 additions & 17 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,9 @@ union ring_type {
#define NV_RX_AVAIL (1<<31)

#define NV_RX2_CHECKSUMMASK (0x1C000000)
#define NV_RX2_CHECKSUMOK1 (0x10000000)
#define NV_RX2_CHECKSUMOK2 (0x14000000)
#define NV_RX2_CHECKSUMOK3 (0x18000000)
#define NV_RX2_CHECKSUM_IP (0x10000000)
#define NV_RX2_CHECKSUM_IP_TCP (0x14000000)
#define NV_RX2_CHECKSUM_IP_UDP (0x18000000)
#define NV_RX2_DESCRIPTORVALID (1<<29)
#define NV_RX2_SUBSTRACT1 (1<<25)
#define NV_RX2_ERROR1 (1<<18)
Expand Down Expand Up @@ -2375,14 +2375,9 @@ static int nv_rx_process(struct net_device *dev, int limit)
goto next_pkt;
}
}
if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK2)/*ip and tcp */ {
if (((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_TCP) || /*ip and tcp */
((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_UDP)) /*ip and udp */
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else {
if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK1 ||
(flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK3) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
}
} else {
dev_kfree_skb(skb);
goto next_pkt;
Expand Down Expand Up @@ -2474,14 +2469,9 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit)
}
}

if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK2)/*ip and tcp */ {
if (((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_TCP) || /*ip and tcp */
((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUM_IP_UDP)) /*ip and udp */
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else {
if ((flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK1 ||
(flags & NV_RX2_CHECKSUMMASK) == NV_RX2_CHECKSUMOK3) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
}

/* got a valid packet - forward it to the network core */
skb_put(skb, len);
Expand Down

0 comments on commit 1c32f94

Please sign in to comment.