@@ -239,7 +239,7 @@ int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int port, bool enabled)
for (i = 0; i < ds->num_ports; i++) {
u16 flags;
- if (i == upstream)
+ if (!dsa_is_user_port(ds, i))
continue;
else if (i == port)
/* The RX VID is pvid on this port */
@@ -302,6 +302,8 @@ int dsa_8021q_vid_validate(struct dsa_switch *ds, int port, u16 vid, u16 flags)
return -EPERM;
for (other_port = 0; other_port < ds->num_ports; other_port++) {
+ if (!dsa_is_user_port(ds, other_port))
+ continue;
if (vid == dsa_8021q_rx_vid(ds, other_port)) {
rx_vid_of = other_port;
break;