]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: dsa: lantiq_gswip: treat VID 0 like the PVID
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 15 Oct 2025 22:34:01 +0000 (23:34 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Oct 2025 00:54:59 +0000 (17:54 -0700)
Documentation/networking/switchdev.rst says that VLAN-aware bridges must
treat packets tagged with VID 0 the same as untagged. It appears from
the documentation that setting the GSWIP_PCE_VCTRL_VID0 flag (which this
driver already had defined) might achieve this.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/b220ac149922839a261b754202c05df5bb253c98.1760566491.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/lantiq/lantiq_gswip.c

index 1ff0932dae3182eadbd09b563db3037372344d9e..25f6b46957a01f7a449a7125d33daf68b7ae6425 100644 (file)
@@ -603,7 +603,7 @@ static int gswip_port_vlan_filtering(struct dsa_switch *ds, int port,
                gswip_switch_mask(priv,
                                  GSWIP_PCE_VCTRL_VSR,
                                  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
-                                 GSWIP_PCE_VCTRL_VEMR,
+                                 GSWIP_PCE_VCTRL_VEMR | GSWIP_PCE_VCTRL_VID0,
                                  GSWIP_PCE_VCTRL(port));
                gswip_switch_mask(priv, GSWIP_PCE_PCTRL_0_TVM, 0,
                                  GSWIP_PCE_PCTRL_0p(port));
@@ -611,7 +611,7 @@ static int gswip_port_vlan_filtering(struct dsa_switch *ds, int port,
                /* Use port based VLAN */
                gswip_switch_mask(priv,
                                  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
-                                 GSWIP_PCE_VCTRL_VEMR,
+                                 GSWIP_PCE_VCTRL_VEMR | GSWIP_PCE_VCTRL_VID0,
                                  GSWIP_PCE_VCTRL_VSR,
                                  GSWIP_PCE_VCTRL(port));
                gswip_switch_mask(priv, 0, GSWIP_PCE_PCTRL_0_TVM,