diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-10-04 20:24:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-04 21:52:49 -0700 |
commit | ca8931948344c485569b04821d1f6bcebccd376b (patch) | |
tree | c24ede5ccead8729da4400bc81a6147fefcfcc77 /drivers/net/dsa/b53 | |
parent | 17c357efe5eceebdc3971a48b3d4d61a03c1178b (diff) | |
download | linux-stable-ca8931948344c485569b04821d1f6bcebccd376b.tar.gz linux-stable-ca8931948344c485569b04821d1f6bcebccd376b.tar.bz2 linux-stable-ca8931948344c485569b04821d1f6bcebccd376b.zip |
net: dsa: b53: Keep CPU port as tagged in all VLANs
Commit c499696e7901 ("net: dsa: b53: Stop using dev->cpu_port
incorrectly") was a bit too trigger happy in removing the CPU port from
the VLAN membership because we rely on DSA to program the CPU port VLAN,
which it does, except it does not bother itself with tagged/untagged and
just usese untagged.
Having the CPU port "follow" the user ports tagged/untagged is not great
and does not allow for properly differentiating, so keep the CPU port
tagged in all VLANs.
Reported-by: Gerhard Wiesinger <lists@wiesinger.com>
Fixes: c499696e7901 ("net: dsa: b53: Stop using dev->cpu_port incorrectly")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53')
-rw-r--r-- | drivers/net/dsa/b53/b53_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index d93c790bfbe8..ad534b90ef21 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1107,7 +1107,7 @@ void b53_vlan_add(struct dsa_switch *ds, int port, b53_get_vlan_entry(dev, vid, vl); vl->members |= BIT(port); - if (untagged) + if (untagged && !dsa_is_cpu_port(ds, port)) vl->untag |= BIT(port); else vl->untag &= ~BIT(port); @@ -1149,7 +1149,7 @@ int b53_vlan_del(struct dsa_switch *ds, int port, pvid = 0; } - if (untagged) + if (untagged && !dsa_is_cpu_port(ds, port)) vl->untag &= ~(BIT(port)); b53_set_vlan_entry(dev, vid, vl); |