summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-05-11 12:50:14 +0300
committerJakub Kicinski <kuba@kernel.org>2022-05-12 16:38:54 -0700
commit0ddf83cda5a6e1a7148ddef46b1c2e21d5be7515 (patch)
treec5a5b280c85490b5d360f96c94376b72080f2e81 /drivers/net/dsa
parente9b3ba439dcb975474accbae1a37b99f9df59bed (diff)
downloadlinux-0ddf83cda5a6e1a7148ddef46b1c2e21d5be7515.tar.bz2
net: dsa: felix: bring the NPI port indirection for host MDBs to surface
For symmetry with host FDBs where the indirection is now handled outside the ocelot switch lib, do the same for host MDB entries. The only caller of the ocelot switch lib which uses the NPI port is the Felix DSA driver. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa')
-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);
}