Skip to content

Commit

Permalink
gianfar: Fix frame size calculation when hardware VLAN acceleration i…
Browse files Browse the repository at this point in the history
…s 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>
  • Loading branch information
Dai Haruki authored and Jeff Garzik committed Mar 26, 2008
1 parent a3cb96a commit faa8957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit faa8957

Please sign in to comment.