diff mbox series

[v3,net-next,11/24] net: dsa: mt7530: Let DSA handle the unsetting of vlan_filtering

Message ID 20190413012822.30931-12-olteanv@gmail.com
State Changes Requested
Delegated to: David Miller
Headers show
Series NXP SJA1105 DSA driver | expand

Commit Message

Vladimir Oltean April 13, 2019, 1:28 a.m. UTC
The driver, recognizing that the .port_vlan_filtering callback was never
coming after the port left its parent bridge, decided to take that duty
in its own hands. DSA now takes care of this condition, so fix that.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
Changes in v3:
Patch is new.

 drivers/net/dsa/mt7530.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Lunn April 13, 2019, 3:12 p.m. UTC | #1
On Sat, Apr 13, 2019 at 04:28:09AM +0300, Vladimir Oltean wrote:
> The driver, recognizing that the .port_vlan_filtering callback was never
> coming after the port left its parent bridge, decided to take that duty
> in its own hands. DSA now takes care of this condition, so fix that.
> 
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>

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

    Andrew
Florian Fainelli April 16, 2019, 11:59 p.m. UTC | #2
On 12/04/2019 18:28, Vladimir Oltean wrote:
> The driver, recognizing that the .port_vlan_filtering callback was never
> coming after the port left its parent bridge, decided to take that duty
> in its own hands. DSA now takes care of this condition, so fix that.
> 
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 8bb0837792b1..2279362450fc 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -908,8 +908,6 @@  mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
 			   PCR_MATRIX(BIT(MT7530_CPU_PORT)));
 	priv->ports[port].pm = PCR_MATRIX(BIT(MT7530_CPU_PORT));
 
-	mt7530_port_set_vlan_unaware(ds, port);
-
 	mutex_unlock(&priv->reg_mutex);
 }
 
@@ -1019,6 +1017,8 @@  mt7530_port_vlan_filtering(struct dsa_switch *ds, int port,
 		 */
 		mt7530_port_set_vlan_aware(ds, port);
 		mt7530_port_set_vlan_aware(ds, MT7530_CPU_PORT);
+	} else {
+		mt7530_port_set_vlan_unaware(ds, port);
 	}
 
 	return 0;