[PATCH v2.6.26] Fix frame size calculation when hardware VLAN acceleration is on
From: Andy Fleming <hidden>
Date: 2008-03-24 15:53:43
From: Dai Haruki <redacted> 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 <redacted> Signed-off-by: Andy Fleming <redacted> --- drivers/net/gianfar.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 718cf77..0ab4b26 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c@@ -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;
--
1.5.4.23.gef5b9