From 9d0c4ce009545327ec4c4ee6decdde06fc114967 Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 13 Mar 2012 17:29:36 +0000 Subject: ar71xx: ag71xx: poll PHY status of all available switch ports git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30924 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx') diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c index 25ee7d4f1..f14b23121 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c @@ -1070,11 +1070,12 @@ err_free: static void link_function(struct work_struct *work) { struct ag71xx *ag = container_of(work, struct ag71xx, link_work.work); + struct ar7240sw *as = ag->phy_priv; unsigned long flags; int i; int status = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < as->swdev.ports; i++) { int link = ar7240sw_phy_read(ag->mii_bus, i, MII_BMSR); if(link & BMSR_LSTATUS) { status = 1; -- cgit v1.2.3