]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
gianfar: Fix frame size calculation when hardware VLAN acceleration is on
authorDai Haruki <dai.haruki@freescale.com>
Mon, 24 Mar 2008 15:53:26 +0000 (10:53 -0500)
committerJeff Garzik <jeff@garzik.org>
Wed, 26 Mar 2008 04:44:33 +0000 (00:44 -0400)
In gfar_change_mtu(), the frame size needs to be increased to account
for the extra 4 bytes VLAN adds to the ethernet header.  However,
it was being increased by the length of the whole header (18 bytes),
which is wrong.

Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/gianfar.c

index 718cf77e345ad0b4e288a2750c5f96f21f14f75e..0ab4b26c79a569b933b1e0d31562b7a0b0301640 100644 (file)
@@ -1185,7 +1185,7 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
        int frame_size = new_mtu + ETH_HLEN;
 
        if (priv->vlan_enable)
-               frame_size += VLAN_ETH_HLEN;
+               frame_size += VLAN_HLEN;
 
        if (gfar_uses_fcb(priv))
                frame_size += GMAC_FCB_LEN;