Commit 0ddf83cd authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski
Browse files

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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e9b3ba43
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
}

+0 −6
Original line number Diff line number Diff line
@@ -2339,9 +2339,6 @@ int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
	struct ocelot_pgid *pgid;
	u16 vid = mdb->vid;

	if (port == ocelot->npi)
		port = ocelot->num_phys_ports;

	if (!vid)
		vid = ocelot_vlan_unaware_pvid(ocelot, bridge);

@@ -2399,9 +2396,6 @@ int ocelot_port_mdb_del(struct ocelot *ocelot, int port,
	struct ocelot_pgid *pgid;
	u16 vid = mdb->vid;

	if (port == ocelot->npi)
		port = ocelot->num_phys_ports;

	if (!vid)
		vid = ocelot_vlan_unaware_pvid(ocelot, bridge);