diff options
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 13 | ||||
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.h | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index c62411c9c1..a33d4b31fe 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -2189,7 +2189,7 @@ static void ar8xxx_mib_work_func(struct work_struct *work) { struct ar8xxx_priv *priv; - int err; + int err, i; priv = container_of(work, struct ar8xxx_priv, mib_work.work); @@ -2197,15 +2197,12 @@ ar8xxx_mib_work_func(struct work_struct *work) err = ar8xxx_mib_capture(priv); if (err) - goto next_port; - - ar8xxx_mib_fetch_port_stat(priv, priv->mib_next_port, false); + goto next_attempt; -next_port: - priv->mib_next_port++; - if (priv->mib_next_port >= priv->dev.ports) - priv->mib_next_port = 0; + for (i = 0; i < priv->dev.ports; i++) + ar8xxx_mib_fetch_port_stat(priv, i, false); +next_attempt: mutex_unlock(&priv->mib_lock); schedule_delayed_work(&priv->mib_work, msecs_to_jiffies(AR8XXX_MIB_WORK_DELAY)); diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index 9b39064551..e9e8331786 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -488,7 +488,6 @@ struct ar8xxx_priv { struct mutex mib_lock; struct delayed_work mib_work; - int mib_next_port; u64 *mib_stats; struct list_head list; |