]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: mt7530: untag VLAN-aware bridge PVID
authorEdward Parker <edward@topnotchit.com>
Thu, 14 May 2026 14:05:12 +0000 (15:05 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 May 2026 10:37:34 +0000 (12:37 +0200)
commit4cb3cd670b2a29e52dd3cfd6463e44121674c9b8
tree6cab26c4fa51184f3ac2dfa7961778346c66425d
parent2c4c76cacc9d5553f4c3342eb332d7123a4c3f14
net: dsa: mt7530: untag VLAN-aware bridge PVID

With bridge VLAN filtering enabled on a port configured as untagged
member of the bridge PVID, ingress untagged frames do not reach the
corresponding bridge VLAN upper interface (br-lan.<vid>). ARP and
similar traffic is visible on the physical port but not delivered
to the VLAN sub-interface.

The MT7530/MT7531 forwards frames to the CPU port with the user
port's PVID tag applied even when the frame ingressed untagged on
the wire, because the CPU port is set to MT7530_VLAN_EG_CONSISTENT
and is a tagged member of the VLAN entry created for the bridge
VLAN. The DSA core then sees a hwaccel-tagged frame whose VID
matches the port's PVID, which the bridge does not treat as the
untagged-on-the-wire frame that the user expects.

Set ds->untag_vlan_aware_bridge_pvid in the mt7530 and mt7531
setup paths so the DSA core strips that hwaccel tag in software
when the parsed VID matches the bridge port's PVID, restoring the
on-the-wire frame as the bridge expects to see it.

Link: https://github.com/openwrt/openwrt/issues/18576
Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530")
Signed-off-by: Edward Parker <edward@topnotchit.com>
[daniel@makrotopia.org: improve commit message]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/85d25ea1b26d3c907f815649f2e0bde6560282a3.1778766629.git.daniel@makrotopia.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c