netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2.6.26] Fix frame size calculation when hardware VLAN acceleration is on
@ 2008-03-24 15:53 Andy Fleming
  2008-03-24 15:53 ` [PATCH v2.6.26] Only process completed frames Andy Fleming
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Fleming @ 2008-03-24 15:53 UTC (permalink / raw)
  To: jeff; +Cc: netdev, Dai Haruki, Andy Fleming

From: Dai Haruki <dai.haruki@freescale.com>

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-26  4:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-24 15:53 [PATCH v2.6.26] Fix frame size calculation when hardware VLAN acceleration is on Andy Fleming
2008-03-24 15:53 ` [PATCH v2.6.26] Only process completed frames Andy Fleming
2008-03-24 15:53   ` [PATCH v2.6.26] Fix Rx/Tx HW interrupt coalescing counter reset procedure Andy Fleming
2008-03-24 15:53     ` [PATCH v2.6.26] Fix the data buffer stashing amount Andy Fleming
2008-03-26  4:46       ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).