summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/ocelot/felix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r--drivers/net/dsa/ocelot/felix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 5af4f9b3ee32..f8a587ae9c6b 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -745,6 +745,9 @@ static int felix_mdb_add(struct dsa_switch *ds, int port,
dsa_mdb_present_in_other_db(ds, port, mdb, db))
return 0;
+ if (port == ocelot->npi)
+ port = ocelot->num_phys_ports;
+
return ocelot_port_mdb_add(ocelot, port, mdb, bridge_dev);
}
@@ -762,6 +765,9 @@ static int felix_mdb_del(struct dsa_switch *ds, int port,
dsa_mdb_present_in_other_db(ds, port, mdb, db))
return 0;
+ if (port == ocelot->npi)
+ port = ocelot->num_phys_ports;
+
return ocelot_port_mdb_del(ocelot, port, mdb, bridge_dev);
}