On some devices the AR8216's switch registers can't be accessed through the
usual MII registers and they have to use special atheros packets.
This patchset adds this and removes the old ar8216 workaround, which is now
unnecessary.

Patch one adds the support for reading and writing registers, making use of
the already present net device ops we have.

Patch two disables the workaround for those device that use it and set the
appropriate phy masks.

The final patch then removes the workaround alltogether, which should even be
a small performance improvement for devices not having a ar8216 (one less
memory read and branch in the RX/TX paths).

This has been tested on a WR2000RPT (similar to the WNR2000v2).

Jonas Gorski (3):
  generic: ar8216: Add support for register access through packets
  ar71xx: Disable the AR8216 workaround and use the AR8216 driver
  ag71xx: Remove the AR8216 workaround

 target/linux/ar71xx/config-2.6.39                  |    3 +-
 .../ar71xx/files/arch/mips/ar71xx/mach-ap81.c      |    2 +-
 .../ar71xx/files/arch/mips/ar71xx/mach-jwap003.c   |    1 -
 .../ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c |    5 +-
 .../files/arch/mips/ar71xx/mach-mzk-w300nh.c       |    5 +-
 .../ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c   |    2 +-
 .../arch/mips/include/asm/mach-ar71xx/platform.h   |    1 -
 .../linux/ar71xx/files/drivers/net/ag71xx/Kconfig  |    8 -
 .../linux/ar71xx/files/drivers/net/ag71xx/Makefile |    1 -
 .../linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h |   26 ---
 .../files/drivers/net/ag71xx/ag71xx_ar8216.c       |   44 ----
 .../ar71xx/files/drivers/net/ag71xx/ag71xx_main.c  |   27 +--
 .../linux/generic/files/drivers/net/phy/ar8216.c   |  222 +++++++++++++++++---
 .../linux/generic/files/drivers/net/phy/ar8216.h   |   26 +++
 14 files changed, 234 insertions(+), 139 deletions(-)
 delete mode 100644 target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar8216.c

-- 
1.7.2.5

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to