提交 faa89577 编写于 作者: D Dai Haruki 提交者: Jeff Garzik

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: NDai Haruki <dai.haruki@freescale.com>
Signed-off-by: NAndy Fleming <afleming@freescale.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 a3cb96a1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册