Skip to content

Commit 7ed1965

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: lantiq_gswip: remove vlan_aware and pvid arguments from gswip_vlan_remove()
"bool pvid" is unused since commit "net: dsa: lantiq_gswip: remove legacy configure_vlan_while_not_filtering option". "bool vlan_aware" shouldn't have a role in finding the bridge VLAN. It should be identified by VID regardless of VLAN-aware or VLAN-unaware. The driver sets up VID 0 for the VLAN-unaware PVID. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Daniel Golle <[email protected]> Link: https://patch.msgid.link/c63f89ca19269ef6c8bf00a62cacc739164b4441.1760566491.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 96a91e6 commit 7ed1965

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/net/dsa/lantiq/lantiq_gswip.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ static int gswip_vlan_add(struct gswip_priv *priv, struct net_device *bridge,
857857

858858
static int gswip_vlan_remove(struct gswip_priv *priv,
859859
struct net_device *bridge, int port,
860-
u16 vid, bool pvid, bool vlan_aware)
860+
u16 vid)
861861
{
862862
struct gswip_pce_table_entry vlan_mapping = {0,};
863863
unsigned int max_ports = priv->hw_info->max_ports;
@@ -868,7 +868,7 @@ static int gswip_vlan_remove(struct gswip_priv *priv,
868868
/* Check if there is already a page for this bridge */
869869
for (i = max_ports; i < ARRAY_SIZE(priv->vlans); i++) {
870870
if (priv->vlans[i].bridge == bridge &&
871-
(!vlan_aware || priv->vlans[i].vid == vid)) {
871+
priv->vlans[i].vid == vid) {
872872
idx = i;
873873
break;
874874
}
@@ -941,7 +941,7 @@ static void gswip_port_bridge_leave(struct dsa_switch *ds, int port,
941941
* the VLAN-unaware PVID created for this bridge.
942942
*/
943943
gswip_add_single_port_br(priv, port, true);
944-
gswip_vlan_remove(priv, br, port, GSWIP_VLAN_UNAWARE_PVID, true, false);
944+
gswip_vlan_remove(priv, br, port, GSWIP_VLAN_UNAWARE_PVID);
945945
}
946946

947947
static int gswip_port_vlan_prepare(struct dsa_switch *ds, int port,
@@ -1024,7 +1024,6 @@ static int gswip_port_vlan_del(struct dsa_switch *ds, int port,
10241024
{
10251025
struct net_device *bridge = dsa_port_bridge_dev_get(dsa_to_port(ds, port));
10261026
struct gswip_priv *priv = ds->priv;
1027-
bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
10281027

10291028
if (vlan->vid == GSWIP_VLAN_UNAWARE_PVID)
10301029
return 0;
@@ -1037,7 +1036,7 @@ static int gswip_port_vlan_del(struct dsa_switch *ds, int port,
10371036
if (dsa_is_cpu_port(ds, port))
10381037
return 0;
10391038

1040-
return gswip_vlan_remove(priv, bridge, port, vlan->vid, pvid, true);
1039+
return gswip_vlan_remove(priv, bridge, port, vlan->vid);
10411040
}
10421041

10431042
static void gswip_port_fast_age(struct dsa_switch *ds, int port)

0 commit comments

Comments
 (0)