summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-02-06 11:07:45 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-11 04:35:48 -0800
commit84e4db766fc6bb4d48f272ec2f5d3c30240c2e09 (patch)
treee5b66b45e354d0a26ce6c0a9ce0ab74ff86b046d
parentfddb5a50801af7808be42ae73deb81e2675439be (diff)
downloadlinux-rpi-84e4db766fc6bb4d48f272ec2f5d3c30240c2e09.tar.gz
linux-rpi-84e4db766fc6bb4d48f272ec2f5d3c30240c2e09.tar.bz2
linux-rpi-84e4db766fc6bb4d48f272ec2f5d3c30240c2e09.zip
net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()
[ Upstream commit df373702bc0f8f2d83980ea441e71639fc1efcf8 ] b53_configure_vlan() is called by the bcm_sf2 driver upon setup and indirectly through resume as well. During the initial setup, we are guaranteed that dev->vlan_enabled is false, so there is no change in behavior, however during suspend, we may have enabled VLANs before, so we do want to restore that setting. Fixes: dad8d7c6452b ("net: dsa: b53: Properly account for VLAN filtering") Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") 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>
-rw-r--r--drivers/net/dsa/b53/b53_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index a7132c1593c3..7ed667b304d1 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -680,7 +680,7 @@ int b53_configure_vlan(struct dsa_switch *ds)
b53_do_vlan_op(dev, VTA_CMD_CLEAR);
}
- b53_enable_vlan(dev, false, ds->vlan_filtering);
+ b53_enable_vlan(dev, dev->vlan_enabled, ds->vlan_filtering);
b53_for_each_port(dev, i)
b53_write16(dev, B53_VLAN_PAGE,