Skip to content

Commit

Permalink
net: dsa: rtl8366: Skip PVID setting if not requested
Browse files Browse the repository at this point in the history
[ Upstream commit 3dfe8dd ]

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: d865295 ("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>
  • Loading branch information
linusw authored and gregkh committed Oct 29, 2020
1 parent dfa4a0f commit fba1d6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/rtl8366.c
Expand Up @@ -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,
Expand Down

0 comments on commit fba1d6e

Please sign in to comment.