Thread (20 messages) flat view 20 messages, 4 authors, 2021-09-14
STALE1788d

Revision v1 of 5 in this series.

Revisions (5)
  1. v1 current
  2. v5 [diff vs current]
  3. v6 [diff vs current]
  4. v7 [diff vs current]
  5. v8 [diff vs current]

[PATCH net-next 4/8] net: dsa: rtl8366rb: Always treat VLAN 0 as untagged

From: Linus Walleij <hidden>
Date: 2021-09-13 15:34:28
Subsystem: networking drivers, networking [dsa], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn, Vladimir Oltean, Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help