[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c63f89ca19269ef6c8bf00a62cacc739164b4441.1760566491.git.daniel@makrotopia.org>
Date: Wed, 15 Oct 2025 23:33:33 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: Hauke Mehrtens <hauke@...ke-m.de>, Andrew Lunn <andrew@...n.ch>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andreas Schirm <andreas.schirm@...mens.com>,
Lukas Stockmann <lukas.stockmann@...mens.com>,
Alexander Sverdlin <alexander.sverdlin@...mens.com>,
Peter Christen <peter.christen@...mens.com>,
Avinash Jayaraman <ajayaraman@...linear.com>,
Bing tao Xu <bxu@...linear.com>, Liang Xu <lxu@...linear.com>,
Juraj Povazanec <jpovazanec@...linear.com>,
"Fanni (Fang-Yi) Chan" <fchan@...linear.com>,
"Benny (Ying-Tsan) Weng" <yweng@...linear.com>,
"Livia M. Rosu" <lrosu@...linear.com>,
John Crispin <john@...ozen.org>
Subject: [PATCH net-next 08/11] net: dsa: lantiq_gswip: remove vlan_aware and
pvid arguments from gswip_vlan_remove()
From: Vladimir Oltean <vladimir.oltean@....com>
"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 <vladimir.oltean@....com>
Signed-off-by: Daniel Golle <daniel@...rotopia.org>
---
drivers/net/dsa/lantiq/lantiq_gswip.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c
index 26e963840f3b..d9a7a004f9eb 100644
--- a/drivers/net/dsa/lantiq/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq/lantiq_gswip.c
@@ -857,7 +857,7 @@ static int gswip_vlan_add(struct gswip_priv *priv, struct net_device *bridge,
static int gswip_vlan_remove(struct gswip_priv *priv,
struct net_device *bridge, int port,
- u16 vid, bool pvid, bool vlan_aware)
+ u16 vid)
{
struct gswip_pce_table_entry vlan_mapping = {0,};
unsigned int max_ports = priv->hw_info->max_ports;
@@ -868,7 +868,7 @@ static int gswip_vlan_remove(struct gswip_priv *priv,
/* Check if there is already a page for this bridge */
for (i = max_ports; i < ARRAY_SIZE(priv->vlans); i++) {
if (priv->vlans[i].bridge == bridge &&
- (!vlan_aware || priv->vlans[i].vid == vid)) {
+ priv->vlans[i].vid == vid) {
idx = i;
break;
}
@@ -941,7 +941,7 @@ static void gswip_port_bridge_leave(struct dsa_switch *ds, int port,
* the VLAN-unaware PVID created for this bridge.
*/
gswip_add_single_port_br(priv, port, true);
- gswip_vlan_remove(priv, br, port, GSWIP_VLAN_UNAWARE_PVID, true, false);
+ gswip_vlan_remove(priv, br, port, GSWIP_VLAN_UNAWARE_PVID);
}
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,
{
struct net_device *bridge = dsa_port_bridge_dev_get(dsa_to_port(ds, port));
struct gswip_priv *priv = ds->priv;
- bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
if (vlan->vid == GSWIP_VLAN_UNAWARE_PVID)
return 0;
@@ -1037,7 +1036,7 @@ static int gswip_port_vlan_del(struct dsa_switch *ds, int port,
if (dsa_is_cpu_port(ds, port))
return 0;
- return gswip_vlan_remove(priv, bridge, port, vlan->vid, pvid, true);
+ return gswip_vlan_remove(priv, bridge, port, vlan->vid);
}
static void gswip_port_fast_age(struct dsa_switch *ds, int port)
--
2.51.0
Powered by blists - more mailing lists