aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorDai Haruki <dai.haruki@freescale.com>2008-03-24 11:53:26 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-26 00:44:33 -0400
commitfaa89577621b4296a8869e75b90a546c951df968 (patch)
treefbb3e05c341cae5f68170f71d144fcf3a8bf923e /drivers/net/gianfar.c
parenta3cb96a13cf74b3e5bb4ecca0c39df1022539059 (diff)
gianfar: Fix frame size calculation when hardware VLAN acceleration is on
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>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 718cf77e345a..0ab4b26c79a5 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)
1185 int frame_size = new_mtu + ETH_HLEN; 1185 int frame_size = new_mtu + ETH_HLEN;
1186 1186
1187 if (priv->vlan_enable) 1187 if (priv->vlan_enable)
1188 frame_size += VLAN_ETH_HLEN; 1188 frame_size += VLAN_HLEN;
1189 1189
1190 if (gfar_uses_fcb(priv)) 1190 if (gfar_uses_fcb(priv))
1191 frame_size += GMAC_FCB_LEN; 1191 frame_size += GMAC_FCB_LEN;