ar71xx: ag71xx: calculate max frame len register value from the MTU
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 20 Dec 2013 11:41:20 +0000 (11:41 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 20 Dec 2013 11:41:20 +0000 (11:41 +0000)
commitca926941e985d258390676f0b8ef9fb89a14fb46
tree46dd4234b9cfe352718c2ce25356f71249a3c2c1
parent8e5bff031ae0b4f12445cb0a0609d4d15cba336d
ar71xx: ag71xx: calculate max frame len register value from the MTU

Set the MAX_FRAME_LEN register to zero in ag71xx_hw_init()
and write the correct value into that from the ag71xx_open()
and ag71xx_fast_reset() functions.

Also recalculate the RX buffer size based on the actual
maximum frame length value to optimize memory allocation.
Additionaly, disallow to change the MTU value while the
interface it running.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39147 3c298f89-4303-0410-b956-a3cf2f4a3e73
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c