net: dsa: b53: Fix valid setting for MDB entries
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 21 Apr 2020 03:26:52 +0000 (20:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:10 +0000 (16:33 +0200)
commit1fae6eb0fc91d3ecb539e03f9e4dcd1c53ada553
tree900210b3d33f0b6f9367d2f42d2ea8aacb4f29a3
parent2537dc9e2c0333838929a775fcdd6ca143738cc0
net: dsa: b53: Fix valid setting for MDB entries

[ Upstream commit eab167f4851a19c514469dfa81147f77e17b5b20 ]

When support for the MDB entries was added, the valid bit was correctly
changed to be assigned depending on the remaining port bitmask, that is,
if there were no more ports added to the entry's port bitmask, the entry
now becomes invalid. There was another assignment a few lines below that
would override this which would invalidate entries even when there were
still multiple ports left in the MDB entry.

Fixes: 5d65b64a3d97 ("net: dsa: b53: Add support for MDB")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/b53/b53_common.c