generic: ar8216: move sleep out of the loop
authorGabor Juhos <juhosg@openwrt.org>
Sat, 9 Feb 2013 13:26:04 +0000 (13:26 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 9 Feb 2013 13:26:04 +0000 (13:26 +0000)
It is enough to sleep once after ANEG is enabled on
all PHYs. This reduces boot time on boards with
AR8316 switch.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35532

target/linux/generic/files/drivers/net/phy/ar8216.c

index e6a460734fe207f16c1e780ebbc986a3845c99e8..4547f7c3b1b460b092f8213a59d6e8c273cede3d 100644 (file)
@@ -833,9 +833,10 @@ ar8316_hw_init(struct ar8216_priv *priv)
                        ADVERTISE_ALL | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
                mdiobus_write(bus, i, MII_CTRL1000, ADVERTISE_1000FULL);
                mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
-               msleep(1000);
        }
 
+       msleep(1000);
+
 out:
        priv->initialized = true;
        return 0;