diff options
author | Milan Krstic <milan.krstic@gmail.com> | 2019-01-21 22:26:33 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-01-22 09:05:59 +0100 |
commit | 76a629ee35d6f3b0d428acc2674fa49caddf3745 (patch) | |
tree | 812548c8cdadb4eccb1cf3fe6d68d8b876030408 /target/linux/ath79/files/drivers/net/ethernet/atheros | |
parent | d13e86d4c2d4c1c8970a20cc1f3214b266f57ed0 (diff) | |
download | upstream-76a629ee35d6f3b0d428acc2674fa49caddf3745.tar.gz upstream-76a629ee35d6f3b0d428acc2674fa49caddf3745.tar.bz2 upstream-76a629ee35d6f3b0d428acc2674fa49caddf3745.zip |
ath79: ag71xx: preserve port mirror flags during swconfig apply
The swconfig load operation always triggers 'apply' function which in
this driver currently clears port mirroring flags effectively undoing
port mirroring configuration.
Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
Diffstat (limited to 'target/linux/ath79/files/drivers/net/ethernet/atheros')
-rw-r--r-- | target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c index 173c16a53d..77f7670c2b 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c @@ -742,6 +742,10 @@ static void ar7240sw_setup_port(struct ar7240sw *as, unsigned port, u8 portmask) portmask = ar7240sw_port_mask(as, AR7240_PORT_CPU); } + /* preserve mirror rx&tx flags */ + ctrl |= ar7240sw_reg_read(mii, AR7240_REG_PORT_CTRL(port)) & + (AR7240_PORT_CTRL_MIRROR_RX | AR7240_PORT_CTRL_MIRROR_TX); + /* allow the port to talk to all other ports, but exclude its * own ID to prevent frames from being reflected back to the * port that they came from */ |