These patches enhance the ar8216 driver with support for the ar8316 switch chip. Most changes are taken from the S16 driver in the TP-Link TLWR741ND sources, the AVM Fritz!Box 7390 sources, or directly read out values of the RouterStation Pro.
The behaviour for ar8216 should be unaffected, but lacking a device with it I couldn't verify it. I made following changes: * Guarded any register accesses with a mutex to prevent a race condition on changing switch settings and flushing the ARL table. * Added a phy_id field with the Atheros phy id 1 to make sure that it only tries to access Atheros chips. * Added switch initialization for the RouterBoard 450G/750G and the Fritz!Box 7390. Only the first one is tested. * Enabled Jumbo frames for the switch. * Fixed a potential (small) memory leak in _config_init. Known issues: * PHY4 is hard coded as WAN port for the ar8316. * The mutex guards are probably too broad. This will be reduced by a later patch. * The full 4k entries VLAN table isn't usable. Currently it is limited to 128 entries. Setting it higher than ~2600 entries makes the ar8216_priv struct bigger than 8kB, surpassing the stack size and braking config_probe, the full 4k entries makes it bigger than 12kB and therefore bigger than kmalloc's max value. * Jumbo frames are always enabled on ar8316, but the cpu can't receive them since the ag71xx driver has no jumbo frame support. Best Regards, Jonas Gorski Jonas Gorski (2): Add support for the ar8316 switch. ar71xx: Add the ar8316 driver to rs pro/rb-450g. .../base-files/etc/defconfig/rb-450g/network | 27 +++ .../etc/defconfig/routerstation-pro/network | 11 + target/linux/ar71xx/config-2.6.32 | 1 + target/linux/ar71xx/config-2.6.33 | 1 + target/linux/ar71xx/config-2.6.34 | 1 + .../ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c | 1 + .../ar71xx/files/arch/mips/ar71xx/mach-ubnt.c | 1 + .../generic-2.6/files/drivers/net/phy/ar8216.c | 233 ++++++++++++++++---- .../generic-2.6/files/drivers/net/phy/ar8216.h | 22 ++ 9 files changed, 259 insertions(+), 39 deletions(-) create mode 100644 target/linux/ar71xx/base-files/etc/defconfig/rb-450g/network _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel