Skip to content

Commit 180b072

Browse files
Arkadi Sharshevskydavem330
authored andcommitted
net: dsa: Remove support for MDB dump from DSA's drivers
This is done as a preparation before removing support for MDB dump from DSA core. The MDBs are synced with the bridge and thus there is no need for special dump operation support. Signed-off-by: Arkadi Sharshevsky <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c069fcd commit 180b072

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,14 +1020,6 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
10201020
return ret;
10211021
}
10221022

1023-
static int ksz_port_mdb_dump(struct dsa_switch *ds, int port,
1024-
struct switchdev_obj_port_mdb *mdb,
1025-
switchdev_obj_dump_cb_t *cb)
1026-
{
1027-
/* this is not called by switch layer */
1028-
return 0;
1029-
}
1030-
10311023
static int ksz_port_mirror_add(struct dsa_switch *ds, int port,
10321024
struct dsa_mall_mirror_tc_entry *mirror,
10331025
bool ingress)
@@ -1090,7 +1082,6 @@ static const struct dsa_switch_ops ksz_switch_ops = {
10901082
.port_mdb_prepare = ksz_port_mdb_prepare,
10911083
.port_mdb_add = ksz_port_mdb_add,
10921084
.port_mdb_del = ksz_port_mdb_del,
1093-
.port_mdb_dump = ksz_port_mdb_dump,
10941085
.port_mirror_add = ksz_port_mirror_add,
10951086
.port_mirror_del = ksz_port_mirror_del,
10961087
};

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,15 +1414,6 @@ static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip,
14141414
fdb->ndm_state = NUD_NOARP;
14151415
else
14161416
fdb->ndm_state = NUD_REACHABLE;
1417-
} else if (obj->id == SWITCHDEV_OBJ_ID_PORT_MDB) {
1418-
struct switchdev_obj_port_mdb *mdb;
1419-
1420-
if (!is_multicast_ether_addr(addr.mac))
1421-
continue;
1422-
1423-
mdb = SWITCHDEV_OBJ_PORT_MDB(obj);
1424-
mdb->vid = vid;
1425-
ether_addr_copy(mdb->addr, addr.mac);
14261417
} else {
14271418
return -EOPNOTSUPP;
14281419
}
@@ -3800,20 +3791,6 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port,
38003791
return err;
38013792
}
38023793

3803-
static int mv88e6xxx_port_mdb_dump(struct dsa_switch *ds, int port,
3804-
struct switchdev_obj_port_mdb *mdb,
3805-
switchdev_obj_dump_cb_t *cb)
3806-
{
3807-
struct mv88e6xxx_chip *chip = ds->priv;
3808-
int err;
3809-
3810-
mutex_lock(&chip->reg_lock);
3811-
err = mv88e6xxx_port_db_dump(chip, port, &mdb->obj, cb);
3812-
mutex_unlock(&chip->reg_lock);
3813-
3814-
return err;
3815-
}
3816-
38173794
static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
38183795
.probe = mv88e6xxx_drv_probe,
38193796
.get_tag_protocol = mv88e6xxx_get_tag_protocol,
@@ -3847,7 +3824,6 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
38473824
.port_mdb_prepare = mv88e6xxx_port_mdb_prepare,
38483825
.port_mdb_add = mv88e6xxx_port_mdb_add,
38493826
.port_mdb_del = mv88e6xxx_port_mdb_del,
3850-
.port_mdb_dump = mv88e6xxx_port_mdb_dump,
38513827
.crosschip_bridge_join = mv88e6xxx_crosschip_bridge_join,
38523828
.crosschip_bridge_leave = mv88e6xxx_crosschip_bridge_leave,
38533829
};

0 commit comments

Comments
 (0)