net: dsa: felix: call port mdb operations from ocelot
This adds the mdb hooks in felix and exports the mdb functions from ocelot. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
471beb11c4
commit
209edf95da
@@ -59,6 +59,29 @@ static int felix_fdb_del(struct dsa_switch *ds, int port,
|
||||
return ocelot_fdb_del(ocelot, port, addr, vid);
|
||||
}
|
||||
|
||||
/* This callback needs to be present */
|
||||
static int felix_mdb_prepare(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_mdb *mdb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void felix_mdb_add(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_mdb *mdb)
|
||||
{
|
||||
struct ocelot *ocelot = ds->priv;
|
||||
|
||||
ocelot_port_mdb_add(ocelot, port, mdb);
|
||||
}
|
||||
|
||||
static int felix_mdb_del(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_mdb *mdb)
|
||||
{
|
||||
struct ocelot *ocelot = ds->priv;
|
||||
|
||||
return ocelot_port_mdb_del(ocelot, port, mdb);
|
||||
}
|
||||
|
||||
static void felix_bridge_stp_state_set(struct dsa_switch *ds, int port,
|
||||
u8 state)
|
||||
{
|
||||
@@ -771,6 +794,9 @@ static const struct dsa_switch_ops felix_switch_ops = {
|
||||
.port_fdb_dump = felix_fdb_dump,
|
||||
.port_fdb_add = felix_fdb_add,
|
||||
.port_fdb_del = felix_fdb_del,
|
||||
.port_mdb_prepare = felix_mdb_prepare,
|
||||
.port_mdb_add = felix_mdb_add,
|
||||
.port_mdb_del = felix_mdb_del,
|
||||
.port_bridge_join = felix_bridge_join,
|
||||
.port_bridge_leave = felix_bridge_leave,
|
||||
.port_stp_state_set = felix_bridge_stp_state_set,
|
||||
|
Reference in New Issue
Block a user