aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-07-15 08:17:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-07-15 08:17:36 +0000
commit507685b8a5d96fddb9259cb9621f28e59b705ab9 (patch)
treea325c46d9818ef34077cd60e8432c09109254b09 /target/linux/generic/files
parent1abbabaceaef3b0bc877548f04ef7805cbd1c600 (diff)
downloadmaster-187ad058-507685b8a5d96fddb9259cb9621f28e59b705ab9.tar.gz
master-187ad058-507685b8a5d96fddb9259cb9621f28e59b705ab9.tar.bz2
master-187ad058-507685b8a5d96fddb9259cb9621f28e59b705ab9.zip
ar8216: adjust ATU flushing in case of link changes
If a link goes down, don't flush the complete ARL table. Only flush the entries for the respective port. Don't touch ARL table if a link goes up. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46381 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index f4c7b8d1e9..9065915f4b 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1882,13 +1882,13 @@ ar8xxx_check_link_states(struct ar8xxx_priv *priv)
priv->link_up[i] = link_new;
changed = true;
+ /* flush ARL entries for this port if it went down*/
+ if (!link_new)
+ priv->chip->atu_flush_port(priv, i);
dev_info(&priv->phy->dev, "Port %d is %s\n",
i, link_new ? "up" : "down");
}
- if (changed)
- priv->chip->atu_flush(priv);
-
mutex_unlock(&priv->reg_mutex);
return changed;
@@ -1900,9 +1900,7 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
struct ar8xxx_priv *priv = phydev->priv;
struct switch_port_link link;
- /* check for link changes and flush ATU
- * if a change was detected
- */
+ /* check for switch port link changes */
if (phydev->state == PHY_CHANGELINK)
ar8xxx_check_link_states(priv);