From cdc53e2ec90b017e5a21e3a8b36536c523367de9 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 22 Apr 2014 08:07:53 +0000 Subject: [PATCH] lantiq: fix maximum ethernet header length The total ethernet frame length should be written to the hardware register LTQ_ETOP_IGPLEN instead of just the value of the MTU. This patch fixes network issues on various Danube boards, especially when VLAN tagging is enabled. Signed-off-by: Matti Laakso SVN-Revision: 40541 --- .../0207-NET-fix-etop-igplen.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 target/linux/lantiq/patches-3.10/0207-NET-fix-etop-igplen.patch diff --git a/target/linux/lantiq/patches-3.10/0207-NET-fix-etop-igplen.patch b/target/linux/lantiq/patches-3.10/0207-NET-fix-etop-igplen.patch new file mode 100644 index 00000000000..59bdcbf33b0 --- /dev/null +++ b/target/linux/lantiq/patches-3.10/0207-NET-fix-etop-igplen.patch @@ -0,0 +1,22 @@ +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -764,8 +765,10 @@ ltq_etop_change_mtu(struct net_device *d + struct ltq_etop_priv *priv = netdev_priv(dev); + unsigned long flags; + ++ int max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN; ++ + spin_lock_irqsave(&priv->lock, flags); +- ltq_etop_w32((ETOP_PLEN_UNDER << 16) | new_mtu, ++ ltq_etop_w32((ETOP_PLEN_UNDER << 16) | max, + LTQ_ETOP_IGPLEN); + spin_unlock_irqrestore(&priv->lock, flags); + } -- 2.30.2