aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshal Gohel <hg@simonwunderlich.de>2023-11-27 17:09:27 +0100
committerSander Vanheule <sander@svanheule.net>2024-01-09 21:15:37 +0100
commite0c0137eed81e365156270d20a3ba73b14e142f1 (patch)
tree352803748ce4b9cf489d44d12716509f3ad597eb
parent3e753c45cd19199ef61aad805b0e29ed261577bd (diff)
rtl83xx: dsa: disable VLAN filtering on CPU port
Before driver code - enabled egress filter for cpu and non-cpu ports - enabled ingress filter for non-cpu ports This patch explicitly enables ingress and egress filtering for non-cpu ports and disables ingress and egress filtering for cpu port. Acked-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
-rw-r--r--target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index 9f608950c0..75f9ceb557 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -1357,10 +1357,15 @@ static int rtl83xx_vlan_filtering(struct dsa_switch *ds, int port,
* 2: Trap packet to CPU port
* The Egress filter used 1 bit per state (0: DISABLED, 1: ENABLED)
*/
- if (port != priv->cpu_port)
+ if (port != priv->cpu_port) {
priv->r->set_vlan_igr_filter(port, IGR_DROP);
+ priv->r->set_vlan_egr_filter(port, EGR_ENABLE);
+ }
+ else {
+ priv->r->set_vlan_igr_filter(port, IGR_TRAP);
+ priv->r->set_vlan_egr_filter(port, EGR_DISABLE);
+ }
- priv->r->set_vlan_egr_filter(port, EGR_ENABLE);
} else {
/* Disable ingress and egress filtering */
if (port != priv->cpu_port)