diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-11-28 14:38:50 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 02:28:56 -0500 |
commit | 1096e87174f925bb817a41386ee70573b2a7d6ff (patch) | |
tree | e095794ba061aa573bbd975a035e20abcaa857c8 /drivers/net | |
parent | c08ad1e304061dbd6ef7545d8f2db530b43c0fbd (diff) |
[PATCH] skge: handle VLAN checksum correctly on yukon rev 0
If using UDP over VLAN, with the skge driver there is a possibility
of generating an incorrect checksum. This is a unlikely occurrence
because it is only an issue on Yukon revision 0, and that revision
doesn't seem to exist on any current hardware (probably early prototype).
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/skge.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 596c93b12daa..96ffcc1666bc 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2300,14 +2300,12 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) | |||
2300 | td->dma_hi = map >> 32; | 2300 | td->dma_hi = map >> 32; |
2301 | 2301 | ||
2302 | if (skb->ip_summed == CHECKSUM_HW) { | 2302 | if (skb->ip_summed == CHECKSUM_HW) { |
2303 | const struct iphdr *ip | ||
2304 | = (const struct iphdr *) (skb->data + ETH_HLEN); | ||
2305 | int offset = skb->h.raw - skb->data; | 2303 | int offset = skb->h.raw - skb->data; |
2306 | 2304 | ||
2307 | /* This seems backwards, but it is what the sk98lin | 2305 | /* This seems backwards, but it is what the sk98lin |
2308 | * does. Looks like hardware is wrong? | 2306 | * does. Looks like hardware is wrong? |
2309 | */ | 2307 | */ |
2310 | if (ip->protocol == IPPROTO_UDP | 2308 | if (skb->h.ipih->protocol == IPPROTO_UDP |
2311 | && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON) | 2309 | && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON) |
2312 | control = BMU_TCP_CHECK; | 2310 | control = BMU_TCP_CHECK; |
2313 | else | 2311 | else |