aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8327.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-04 08:33:30 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-04 08:33:30 +0000
commita34d8da30683e4b609850c359c1955f1521d734b (patch)
tree6fd717cbc9d1647456d7770743f6e9c448395fba /target/linux/generic/files/drivers/net/phy/ar8327.c
parent5fd0ace7bab1feea2d95a5aed45183f7d5c916a7 (diff)
downloadmaster-187ad058-a34d8da30683e4b609850c359c1955f1521d734b.tar.gz
master-187ad058-a34d8da30683e4b609850c359c1955f1521d734b.tar.bz2
master-187ad058-a34d8da30683e4b609850c359c1955f1521d734b.zip
AR8216: make ARL age time configurable
The default TTL for address resolution table entries is 5 minutes for all members of the AR8216 family. This can cause issues if e.g. Wifi clients roam to another AP and their MAC appears on another switch port suddenly. Then the client may not be reachable until the old ARL entry expires. I would have expected the switch to invalidate old entries if it detects the same MAC on another port. But that's not the case. Therefore make the TTL for ARL entries configurable. The effective TTL will always be a multiple of 7 seconds. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48913 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8327.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8327.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 02fd2e77bf..9c232382b5 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -1275,6 +1275,13 @@ static const struct switch_attr ar8327_sw_attr_globals[] = {
.max = AR8327_NUM_PORTS - 1
},
{
+ .type = SWITCH_TYPE_INT,
+ .name = "arl_age_time",
+ .description = "ARL age time (secs)",
+ .set = ar8xxx_sw_set_arl_age_time,
+ .get = ar8xxx_sw_get_arl_age_time,
+ },
+ {
.type = SWITCH_TYPE_STRING,
.name = "arl_table",
.description = "Get ARL table",
@@ -1377,6 +1384,7 @@ const struct ar8xxx_chip ar8327_chip = {
.reg_port_stats_start = 0x1000,
.reg_port_stats_length = 0x100,
+ .reg_arl_ctrl = AR8327_REG_ARL_CTRL,
.hw_init = ar8327_hw_init,
.cleanup = ar8327_cleanup,
@@ -1411,6 +1419,7 @@ const struct ar8xxx_chip ar8337_chip = {
.reg_port_stats_start = 0x1000,
.reg_port_stats_length = 0x100,
+ .reg_arl_ctrl = AR8327_REG_ARL_CTRL,
.hw_init = ar8327_hw_init,
.cleanup = ar8327_cleanup,