net: dsa: rtl8366: Properly clear member config
commitacd04a157b33ce93fa4fbcc718ac0327ddd3288c
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 5 Sep 2020 10:32:33 +0000 (5 12:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:03:12 +0000 (26 18:03 +0200)
tree60a7c296a28a37495767bdb4fb4383099c415efe
parent9139f13e01a324f1c3ed72b4f5a8df4fa177fd53
net: dsa: rtl8366: Properly clear member config

[ Upstream commit 4ddcaf1ebb5e4e99240f29d531ee69d4244fe416 ]

When removing a port from a VLAN we are just erasing the
member config for the VLAN, which is wrong: other ports
can be using it.

Just mask off the port and only zero out the rest of the
member config once ports using of the VLAN are removed
from it.

Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/rtl8366.c