Patchwork [v2] ksz884x: fix mtu for VLAN

login
register
mail settings
Submitter Doug Kehn
Date Jan. 11, 2012, 11:12 p.m.
Message ID <20120111231243.GA14836@dkehn-Latitude-D830>
Download mbox | patch
Permalink /patch/135531/
State Accepted
Delegated to: David Miller
Headers show

Comments

Doug Kehn - Jan. 11, 2012, 11:12 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. 13, 2012, 4:06 a.m.
From: Doug Kehn <rdkehn@yahoo.com>
Date: Wed, 11 Jan 2012 17:12:43 -0600

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

Applied.
--
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)