diff mbox series

[net-next,11/13] net: dsa: b53: Let DSA call .port_vlan_filtering only when necessary

Message ID 20190428184554.9968-12-olteanv@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series Improvements to DSA core VLAN manipulation | expand

Commit Message

Vladimir Oltean April 28, 2019, 6:45 p.m. UTC
Since DSA has recently learned to treat better with drivers that set
vlan_filtering_is_global, doing this is no longer required.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Lunn April 29, 2019, 9:57 p.m. UTC | #1
On Sun, Apr 28, 2019 at 09:45:52PM +0300, Vladimir Oltean wrote:
> Since DSA has recently learned to treat better with drivers that set
> vlan_filtering_is_global, doing this is no longer required.
> 
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index a779b9c3ab6e..9fbeb20ba263 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1286,13 +1286,13 @@  int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
 
 	b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid);
 	new_pvid = pvid;
-	if (dev->vlan_filtering_enabled && !vlan_filtering) {
+	if (!vlan_filtering) {
 		/* Filtering is currently enabled, use the default PVID since
 		 * the bridge does not expect tagging anymore
 		 */
 		dev->ports[port].pvid = pvid;
 		new_pvid = b53_default_pvid(dev);
-	} else if (!dev->vlan_filtering_enabled && vlan_filtering) {
+	} else {
 		/* Filtering is currently disabled, restore the previous PVID */
 		new_pvid = dev->ports[port].pvid;
 	}