ar71xx: configure address aging on ar7240

SVN-Revision: 27704
owl
Felix Fietkau 2011-07-20 14:39:42 +00:00
parent fefc79f3cb
commit ca473833c4
1 changed files with 12 additions and 2 deletions

View File

@ -57,7 +57,13 @@
#define AR7240_VTUDATA_MEMBER BITS(0, 10) #define AR7240_VTUDATA_MEMBER BITS(0, 10)
#define AR7240_VTUDATA_VALID BIT(11) #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_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_AT_CTRL_ARP_EN BIT(20)
#define AR7240_REG_TAG_PRIORITY 0x70 #define AR7240_REG_TAG_PRIORITY 0x70
@ -446,8 +452,12 @@ static void ar7240sw_setup(struct ar7240sw *as)
/* Setup TAG priority mapping */ /* Setup TAG priority mapping */
ar7240sw_reg_write(mii, AR7240_REG_TAG_PRIORITY, 0xfa50); ar7240sw_reg_write(mii, AR7240_REG_TAG_PRIORITY, 0xfa50);
/* Enable ARP frame acknowledge */ /* Enable ARP frame acknowledge, aging, MAC replacing */
ar7240sw_reg_set(mii, AR7240_REG_AT_CTRL, AR7240_AT_CTRL_ARP_EN); 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 */ /* Enable Broadcast frames transmitted to the CPU */
ar7240sw_reg_set(mii, AR7240_REG_FLOOD_MASK, ar7240sw_reg_set(mii, AR7240_REG_FLOOD_MASK,