]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] skge: handle VLAN checksum correctly on yukon rev 0
authorStephen Hemminger <shemminger@osdl.org>
Mon, 28 Nov 2005 19:38:50 +0000 (11:38 -0800)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 1 Dec 2005 07:28:56 +0000 (02:28 -0500)
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>
drivers/net/skge.c

index 596c93b12daad126b18e9ae305bd2c1c8f695687..96ffcc1666bcd310f6de6c92423cbf9f7c460d97 100644 (file)
@@ -2300,14 +2300,12 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        td->dma_hi = map >> 32;
 
        if (skb->ip_summed == CHECKSUM_HW) {
-               const struct iphdr *ip
-                       = (const struct iphdr *) (skb->data + ETH_HLEN);
                int offset = skb->h.raw - skb->data;
 
                /* This seems backwards, but it is what the sk98lin
                 * does.  Looks like hardware is wrong?
                 */
-               if (ip->protocol == IPPROTO_UDP
+               if (skb->h.ipih->protocol == IPPROTO_UDP
                    && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON)
                        control = BMU_TCP_CHECK;
                else