diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-09-19 01:29:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 11:57:40 +0300 |
commit | 26751638ff09ccc874d0346b8aa1d90dde8c0b2e (patch) | |
tree | f0faf493cd6a56d6007e82768934273424fed8ae | |
parent | 11064fef1bb116de47e8de47db3ea794f05bddc8 (diff) | |
download | linux-26751638ff09ccc874d0346b8aa1d90dde8c0b2e.tar.xz |
net: dsa: rtl8366: Skip PVID setting if not requested
[ Upstream commit 3dfe8dde093a07e82fa472c0f8c29a7f6a2006a5 ]
We go to lengths to determine whether the PVID should be set
for this port or not, and then fail to take it into account.
Fix this oversight.
Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/net/dsa/rtl8366.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index b941d45edd64..49c626a33680 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -436,6 +436,9 @@ void rtl8366_vlan_add(struct dsa_switch *ds, int port, "failed to set up VLAN %04x", vid); + if (!pvid) + continue; + ret = rtl8366_set_pvid(smi, port, vid); if (ret) dev_err(smi->dev, |