rtl83xx: dsa: Do nothing when vid 0
authorHarshal Gohel <hg@simonwunderlich.de>
Mon, 27 Nov 2023 16:09:55 +0000 (17:09 +0100)
committerSander Vanheule <sander@svanheule.net>
Tue, 9 Jan 2024 20:18:46 +0000 (21:18 +0100)
Following other dsa drivers, vid 0 is no-op

Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c

index 75f9ceb557ab899b0fd12c7d37be682d0e84ac09..3b5af72dd6a78154e954631708503cdb3a3c72a3 100644 (file)
@@ -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;