Commit 0141792f authored by DENG Qingfang's avatar DENG Qingfang Committed by David S. Miller

net: dsa: mt7530: fix VLAN setup

Allow DSA to add VLAN entries even if VLAN filtering is disabled, so
enabling it will not block the traffic of existent ports in the bridge
Signed-off-by: default avatarDENG Qingfang <dqfext@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cd2809cc
...@@ -1085,12 +1085,6 @@ mt7530_port_vlan_add(struct dsa_switch *ds, int port, ...@@ -1085,12 +1085,6 @@ mt7530_port_vlan_add(struct dsa_switch *ds, int port,
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
u16 vid; u16 vid;
/* The port is kept as VLAN-unaware if bridge with vlan_filtering not
* being set.
*/
if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
return;
mutex_lock(&priv->reg_mutex); mutex_lock(&priv->reg_mutex);
for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) { for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
...@@ -1116,12 +1110,6 @@ mt7530_port_vlan_del(struct dsa_switch *ds, int port, ...@@ -1116,12 +1110,6 @@ mt7530_port_vlan_del(struct dsa_switch *ds, int port,
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
u16 vid, pvid; u16 vid, pvid;
/* The port is kept as VLAN-unaware if bridge with vlan_filtering not
* being set.
*/
if (!dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))
return 0;
mutex_lock(&priv->reg_mutex); mutex_lock(&priv->reg_mutex);
pvid = priv->ports[port].pvid; pvid = priv->ports[port].pvid;
...@@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds) ...@@ -1235,6 +1223,7 @@ mt7530_setup(struct dsa_switch *ds)
* as two netdev instances. * as two netdev instances.
*/ */
dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent; dn = dsa_to_port(ds, MT7530_CPU_PORT)->master->dev.of_node->parent;
ds->configure_vlan_while_not_filtering = true;
if (priv->id == ID_MT7530) { if (priv->id == ID_MT7530) {
regulator_set_voltage(priv->core_pwr, 1000000, 1000000); regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment