Thread (28 messages) 28 messages, 3 authors, 2021-12-15

Re: [PATCH net-next v3 5/6] net: lan966x: Add vlan support

flat view

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-12-09 13:59:34
Also in: linux-devicetree, lkml

On Thu, Dec 09, 2021 at 10:46:14AM +0100, Horatiu Vultur wrote:
quoted hunk ↗ jump to hunk
+int lan966x_vlan_port_set_vid(struct lan966x_port *port, u16 vid,
+			      bool pvid, bool untagged)
+{
+	struct lan966x *lan966x = port->lan966x;
+
+	/* Egress vlan classification */
+	if (untagged && port->vid != vid) {
+		if (port->vid) {
+			dev_err(lan966x->dev,
+				"Port already has a native VLAN: %d\n",
+				port->vid);
+			return -EBUSY;
Are you interested in supporting the use case from 0da1a1c48911 ("net:
mscc: ocelot: allow a config where all bridge VLANs are egress-untagged")?
Because it would be good if the driver was structured that way from the
get-go instead of patching it later.
quoted hunk ↗ jump to hunk
+		}
+		port->vid = vid;
+	}
+
+	/* Default ingress vlan classification */
+	if (pvid)
+		port->pvid = vid;
+
+	return 0;
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help