diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-07-20 14:39:42 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-07-20 14:39:42 +0000 |
commit | 366b622fda009152bf05b834e9fef17941a30598 (patch) | |
tree | a6298450cc2f2c27c38a36a5968500844b8de6c9 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c | |
parent | 5ce15fed68696dab20cf65c9b31076e9b1cc26d6 (diff) | |
download | master-187ad058-366b622fda009152bf05b834e9fef17941a30598.tar.gz master-187ad058-366b622fda009152bf05b834e9fef17941a30598.tar.bz2 master-187ad058-366b622fda009152bf05b834e9fef17941a30598.zip |
ar71xx: configure address aging on ar7240
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27704 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c index d84cc81aec..fe3232be56 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c @@ -57,7 +57,13 @@ #define AR7240_VTUDATA_MEMBER BITS(0, 10) #define AR7240_VTUDATA_VALID BIT(11) +#define AR7240_REG_ATU 0x50 +#define AR7240_ATU_FLUSH_ALL 0x1 + #define AR7240_REG_AT_CTRL 0x5c +#define AR7240_AT_CTRL_AGE_TIME BITS(0, 15) +#define AR7240_AT_CTRL_AGE_EN BIT(17) +#define AR7240_AT_CTRL_LEARN_CHANGE BIT(18) #define AR7240_AT_CTRL_ARP_EN BIT(20) #define AR7240_REG_TAG_PRIORITY 0x70 @@ -446,8 +452,12 @@ static void ar7240sw_setup(struct ar7240sw *as) /* Setup TAG priority mapping */ ar7240sw_reg_write(mii, AR7240_REG_TAG_PRIORITY, 0xfa50); - /* Enable ARP frame acknowledge */ - ar7240sw_reg_set(mii, AR7240_REG_AT_CTRL, AR7240_AT_CTRL_ARP_EN); + /* Enable ARP frame acknowledge, aging, MAC replacing */ + ar7240sw_reg_write(mii, AR7240_REG_AT_CTRL, + 0x2b /* 5 min age time */ | + AR7240_AT_CTRL_AGE_EN | + AR7240_AT_CTRL_ARP_EN | + AR7240_AT_CTRL_LEARN_CHANGE); /* Enable Broadcast frames transmitted to the CPU */ ar7240sw_reg_set(mii, AR7240_REG_FLOOD_MASK, |