From a376508216440178184fb3ab71faf87eea637109 Mon Sep 17 00:00:00 2001 From: Harshal Gohel Date: Mon, 27 Nov 2023 17:09:55 +0100 Subject: [PATCH] rtl83xx: dsa: Do nothing when vid 0 Following other dsa drivers, vid 0 is no-op Acked-by: Simon Wunderlich Signed-off-by: Harshal Gohel --- target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 2 ++ 1 file changed, 2 insertions(+) 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 75f9ceb557ab..3b5af72dd6a7 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 @@ -1430,6 +1430,8 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port, pr_debug("%s port %d, vid %d, flags %x\n", __func__, port, vlan->vid, vlan->flags); + if(!vlan->vid) return 0; + if (vlan->vid > 4095) { dev_err(priv->dev, "VLAN out of range: %d", vlan->vid); return -ENOTSUPP; -- 2.30.2