diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2017-08-06 09:15:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-07 17:48:48 -0400 |
commit | 180b072eb0c8529d0fd460fd192fc6b4db6c3df9 (patch) | |
tree | ee43686a0a8df8e6122993ca3cd2bccb66e038d3 /drivers | |
parent | c069fcd82c571953b8aaf68769afe9ccb1aa7a9f (diff) |
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 <arkadis@mellanox.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.c | 9 | ||||
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 24 |
2 files changed, 0 insertions, 33 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index a53ce59e0442..4de9d90a4bb3 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c | |||
@@ -1020,14 +1020,6 @@ exit: | |||
1020 | return ret; | 1020 | return ret; |
1021 | } | 1021 | } |
1022 | 1022 | ||
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 | |||
1031 | static int ksz_port_mirror_add(struct dsa_switch *ds, int port, | 1023 | static int ksz_port_mirror_add(struct dsa_switch *ds, int port, |
1032 | struct dsa_mall_mirror_tc_entry *mirror, | 1024 | struct dsa_mall_mirror_tc_entry *mirror, |
1033 | bool ingress) | 1025 | bool ingress) |
@@ -1090,7 +1082,6 @@ static const struct dsa_switch_ops ksz_switch_ops = { | |||
1090 | .port_mdb_prepare = ksz_port_mdb_prepare, | 1082 | .port_mdb_prepare = ksz_port_mdb_prepare, |
1091 | .port_mdb_add = ksz_port_mdb_add, | 1083 | .port_mdb_add = ksz_port_mdb_add, |
1092 | .port_mdb_del = ksz_port_mdb_del, | 1084 | .port_mdb_del = ksz_port_mdb_del, |
1093 | .port_mdb_dump = ksz_port_mdb_dump, | ||
1094 | .port_mirror_add = ksz_port_mirror_add, | 1085 | .port_mirror_add = ksz_port_mirror_add, |
1095 | .port_mirror_del = ksz_port_mirror_del, | 1086 | .port_mirror_del = ksz_port_mirror_del, |
1096 | }; | 1087 | }; |
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 5bb1138818ef..1f5c202b974d 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c | |||
@@ -1414,15 +1414,6 @@ static int mv88e6xxx_port_db_dump_fid(struct mv88e6xxx_chip *chip, | |||
1414 | fdb->ndm_state = NUD_NOARP; | 1414 | fdb->ndm_state = NUD_NOARP; |
1415 | else | 1415 | else |
1416 | fdb->ndm_state = NUD_REACHABLE; | 1416 | 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); | ||
1426 | } else { | 1417 | } else { |
1427 | return -EOPNOTSUPP; | 1418 | return -EOPNOTSUPP; |
1428 | } | 1419 | } |
@@ -3800,20 +3791,6 @@ static int mv88e6xxx_port_mdb_del(struct dsa_switch *ds, int port, | |||
3800 | return err; | 3791 | return err; |
3801 | } | 3792 | } |
3802 | 3793 | ||
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 | |||
3817 | static const struct dsa_switch_ops mv88e6xxx_switch_ops = { | 3794 | static const struct dsa_switch_ops mv88e6xxx_switch_ops = { |
3818 | .probe = mv88e6xxx_drv_probe, | 3795 | .probe = mv88e6xxx_drv_probe, |
3819 | .get_tag_protocol = mv88e6xxx_get_tag_protocol, | 3796 | .get_tag_protocol = mv88e6xxx_get_tag_protocol, |
@@ -3847,7 +3824,6 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = { | |||
3847 | .port_mdb_prepare = mv88e6xxx_port_mdb_prepare, | 3824 | .port_mdb_prepare = mv88e6xxx_port_mdb_prepare, |
3848 | .port_mdb_add = mv88e6xxx_port_mdb_add, | 3825 | .port_mdb_add = mv88e6xxx_port_mdb_add, |
3849 | .port_mdb_del = mv88e6xxx_port_mdb_del, | 3826 | .port_mdb_del = mv88e6xxx_port_mdb_del, |
3850 | .port_mdb_dump = mv88e6xxx_port_mdb_dump, | ||
3851 | .crosschip_bridge_join = mv88e6xxx_crosschip_bridge_join, | 3827 | .crosschip_bridge_join = mv88e6xxx_crosschip_bridge_join, |
3852 | .crosschip_bridge_leave = mv88e6xxx_crosschip_bridge_leave, | 3828 | .crosschip_bridge_leave = mv88e6xxx_crosschip_bridge_leave, |
3853 | }; | 3829 | }; |