VLAN 0 shall always be treated as untagged, as per example
from other drivers (I guess from the spec).
Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Mauri Sandberg <redacted>
Cc: Alvin Šipraga <redacted>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Linus Walleij <redacted>
---
ChangeLog v1->v4:
- New patch after noting that other drivers always sets VLAN 0
as untagged.
---
drivers/net/dsa/rtl8366.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c
index 0672dd56c698..fae14c448fe4 100644
--- a/drivers/net/dsa/rtl8366.c
+++ b/drivers/net/dsa/rtl8366.c
@@ -308,6 +308,11 @@ int rtl8366_vlan_add(struct dsa_switch *ds, int port,
return -EINVAL;
}
+ /* Note that VLAN 0 shall always be treated as untagged */
+ if (vlan->vid == 0)
+ untagged = true;
+
+
/* Enable VLAN in the hardware
* FIXME: what's with this 4k business?
* Just rtl8366_enable_vlan() seems inconclusive.
--
2.31.1