Patchwork ksz884x: fix mtu for VLAN

login
register
mail settings
Submitter Doug Kehn
Date Jan. 11, 2012, 8:21 p.m.
Message ID <1326313306.57525.YahooMailNeo@web39305.mail.mud.yahoo.com>
Download mbox | patch
Permalink /patch/135494/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Doug Kehn - Jan. 11, 2012, 8:21 p.m.
The Ethernet header does not account for the addition of a VLAN header.
Full size Ethernet frames containing VLAN header are not processed
because the frame is larger than the resulting hw mtu.

Signed-off-by: Doug Kehn <rdkehn@yahoo.com>
---
 drivers/net/ethernet/micrel/ksz884x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - Jan. 11, 2012, 8:47 p.m.
From: Doug Kehn <rdkehn@yahoo.com>
Date: Wed, 11 Jan 2012 12:21:46 -0800 (PST)

> The Ethernet header does not account for the addition of a VLAN header.
> Full size Ethernet frames containing VLAN header are not processed
> because the frame is larger than the resulting hw mtu.
> 
> Signed-off-by: Doug Kehn <rdkehn@yahoo.com>

Your email client corrupted your patch making it unusable to us.

Send the patch to yourself, and try to apply the patch you receive.
Only resubmit your patch again here once you are able to do that
successfully.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 6ed09a8..e52cd31 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -746,7 +746,7 @@ 
 #define MAC_ADDR_ORDER(i)        (ETH_ALEN - 1 - (i))
 
 #define MAX_ETHERNET_BODY_SIZE        1500
-#define ETHERNET_HEADER_SIZE        14
+#define ETHERNET_HEADER_SIZE        (14 + VLAN_HLEN)
 
 #define MAX_ETHERNET_PACKET_SIZE    \
     (MAX_ETHERNET_BODY_SIZE + ETHERNET_HEADER_SIZE)