aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-12-20 11:41:23 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-12-20 11:41:23 +0000
commitaa7f693d306c842fb0165b31b7687bde1b98ff14 (patch)
tree53dc2a98e8b0197bd9c1881621344da9f0ccede3
parent397e584bfb4b01b1bbc6d2f8cba4d82a8ddf4657 (diff)
downloadmaster-187ad058-aa7f693d306c842fb0165b31b7687bde1b98ff14.tar.gz
master-187ad058-aa7f693d306c842fb0165b31b7687bde1b98ff14.tar.bz2
master-187ad058-aa7f693d306c842fb0165b31b7687bde1b98ff14.zip
ar71xx: allow to use large ethernet frames on AR934x SoCs
The hardware supports large ethernet frames. Override the maximum frame length and packet lenght mask in the platform data to allow to use large MTU on the ethernet interfaces. Limit the feature to AR934x SoCs for now. It should work on some other SoCs as well, but those has not been tested yet. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39149 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index 8b54d0c817..da67478fe6 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
#include <linux/clk.h>
+#include <linux/sizes.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>
@@ -958,6 +959,9 @@ void __init ath79_register_eth(unsigned int id)
pdata->has_gbit = 1;
pdata->is_ar724x = 1;
+ pdata->max_frame_len = SZ_16K - 1;
+ pdata->desc_pktlen_mask = SZ_16K - 1;
+
if (!pdata->fifo_cfg1)
pdata->fifo_cfg1 = 0x0010ffff;
if (!pdata->fifo_cfg2)