summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.h
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-03-04 08:33:30 +0000
committerJohn Crispin <john@openwrt.org>2016-03-04 08:33:30 +0000
commitd3776bdfc98cee205b74b5775bb0e96ced7193f7 (patch)
tree1f4aa00329c7eab1c53d197082f7fc10e4d8dbe8 /target/linux/generic/files/drivers/net/phy/ar8216.h
parent4eaa7500892fdb3469fd096229b1a8839d175552 (diff)
downloadmaster-31e0f0ae-d3776bdfc98cee205b74b5775bb0e96ced7193f7.tar.gz
master-31e0f0ae-d3776bdfc98cee205b74b5775bb0e96ced7193f7.tar.bz2
master-31e0f0ae-d3776bdfc98cee205b74b5775bb0e96ced7193f7.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> SVN-Revision: 48913
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/ar8216.h')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 14fe928fe0..fb961ff04c 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -33,6 +33,9 @@
#define AR8X16_PROBE_RETRIES 10
#define AR8X16_MAX_PORTS 8
+#define AR8XXX_REG_ARL_CTRL_AGE_TIME_SECS 7
+#define AR8XXX_DEFAULT_ARL_AGE_TIME 300
+
/* Atheros specific MII registers */
#define MII_ATH_MMD_ADDR 0x0d
#define MII_ATH_MMD_DATA 0x0e
@@ -384,6 +387,8 @@ struct ar8xxx_chip {
unsigned reg_port_stats_start;
unsigned reg_port_stats_length;
+ unsigned reg_arl_ctrl;
+
int (*hw_init)(struct ar8xxx_priv *priv);
void (*cleanup)(struct ar8xxx_priv *priv);
@@ -449,6 +454,7 @@ struct ar8xxx_priv {
u8 vlan_table[AR8X16_MAX_VLANS];
u8 vlan_tagged;
u16 pvid[AR8X16_MAX_PORTS];
+ int arl_age_time;
/* mirroring */
bool mirror_rx;
@@ -539,6 +545,14 @@ ar8xxx_sw_get_port_mib(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val);
int
+ar8xxx_sw_get_arl_age_time(struct switch_dev *dev,
+ const struct switch_attr *attr,
+ struct switch_val *val);
+int
+ar8xxx_sw_set_arl_age_time(struct switch_dev *dev,
+ const struct switch_attr *attr,
+ struct switch_val *val);
+int
ar8xxx_sw_get_arl_table(struct switch_dev *dev,
const struct switch_attr *attr,
struct switch_val *val);