Skip to content

Commit

Permalink
ar71xx: ag71xx: poll PHY status of all available switch ports
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30924 3c298f89-4303-0410-b956-a3cf2f4a3e73
  • Loading branch information
juhosg committed Mar 13, 2012
1 parent d2b8246 commit 9d0c4ce
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1070,11 +1070,12 @@ static struct ar7240sw *ar7240_probe(struct ag71xx *ag)

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;
Expand Down

0 comments on commit 9d0c4ce

Please sign in to comment.