adm5120: fix promiscuous mode handling (patch from #8581)

SVN-Revision: 26673
This commit is contained in:
Felix Fietkau 2011-04-15 00:20:59 +00:00
parent cddc775ee8
commit e6350dee82

View file

@ -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);