mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-15 00:36:45 +00:00
rtl83xx: dsa: Do nothing when vid 0
Following other dsa drivers, vid 0 is no-op Acked-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
This commit is contained in:
parent
e0c0137eed
commit
a376508216
@ -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",
|
pr_debug("%s port %d, vid %d, flags %x\n",
|
||||||
__func__, port, vlan->vid, vlan->flags);
|
__func__, port, vlan->vid, vlan->flags);
|
||||||
|
|
||||||
|
if(!vlan->vid) return 0;
|
||||||
|
|
||||||
if (vlan->vid > 4095) {
|
if (vlan->vid > 4095) {
|
||||||
dev_err(priv->dev, "VLAN out of range: %d", vlan->vid);
|
dev_err(priv->dev, "VLAN out of range: %d", vlan->vid);
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user