diff options
author | John Crispin <blogic@openwrt.org> | 2014-04-22 08:07:53 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-04-22 08:07:53 +0000 |
commit | 3e124898855e6bc148b9075c00ba1b9f17bd6835 (patch) | |
tree | 941510081a3cde494fe148093c948741642dead8 /target/linux/lantiq | |
parent | 5718a8575170ded435f49e5050460555cf6b0bc2 (diff) | |
download | upstream-3e124898855e6bc148b9075c00ba1b9f17bd6835.tar.gz upstream-3e124898855e6bc148b9075c00ba1b9f17bd6835.tar.bz2 upstream-3e124898855e6bc148b9075c00ba1b9f17bd6835.zip |
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 <malaakso at elisanet.fi>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40541 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq')
-rw-r--r-- | target/linux/lantiq/patches-3.10/0207-NET-fix-etop-igplen.patch | 22 |
1 files changed, 22 insertions, 0 deletions
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 0000000000..59bdcbf33b --- /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 <linux/mm.h> + #include <linux/platform_device.h> + #include <linux/ethtool.h> ++#include <linux/if_vlan.h> + #include <linux/init.h> + #include <linux/delay.h> + #include <linux/io.h> +@@ -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); + } |