summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-15 00:20:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-04-15 00:20:59 +0000
commite6350dee8265664ba9c5bb2813cbe0de8f1b841f (patch)
tree02415204773119b8ea5a0da3c252d273f101c358 /target/linux
parentcddc775ee8fef4bbfebc9ed03269629f02df9184 (diff)
downloadmtk-20170518-e6350dee8265664ba9c5bb2813cbe0de8f1b841f.zip
mtk-20170518-e6350dee8265664ba9c5bb2813cbe0de8f1b841f.tar.gz
mtk-20170518-e6350dee8265664ba9c5bb2813cbe0de8f1b841f.tar.bz2
adm5120: fix promiscuous mode handling (patch from #8581)
SVN-Revision: 26673
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/adm5120/files/drivers/net/adm5120sw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/adm5120/files/drivers/net/adm5120sw.c b/target/linux/adm5120/files/drivers/net/adm5120sw.c
index 09cb909..9adbf6c 100644
--- a/target/linux/adm5120/files/drivers/net/adm5120sw.c
+++ b/target/linux/adm5120/files/drivers/net/adm5120sw.c
@@ -962,10 +962,10 @@ static void adm5120_if_set_multicast_list(struct net_device *dev)
/* to the CPU, the Bridge Test Mode has to be activated. */
/* Check if there is any vlan in promisc mode. */
- if (t & (SWITCH_PORTS_NOCPU << CPUP_CONF_DUNP_SHIFT))
- t &= ~CPUP_CONF_BTM; /* Disable Bridge Testing Mode */
- else
+ if (~t & (SWITCH_PORTS_NOCPU << CPUP_CONF_DUNP_SHIFT))
t |= CPUP_CONF_BTM; /* Enable Bridge Testing Mode */
+ else
+ t &= ~CPUP_CONF_BTM; /* Disable Bridge Testing Mode */
sw_write_reg(SWITCH_REG_CPUP_CONF, t);