net: dsa: Remove support for vlan dump from DSA's drivers
This is done as a preparation before removing support for vlan dump from DSA core. The vlans 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>
This commit is contained in:

committed by
David S. Miller

parent
c9e2105e29
commit
a0b6b8c9fa
@@ -1011,61 +1011,6 @@ static int mv88e6xxx_vtu_loadpurge(struct mv88e6xxx_chip *chip,
|
||||
return chip->info->ops->vtu_loadpurge(chip, entry);
|
||||
}
|
||||
|
||||
static int mv88e6xxx_port_vlan_dump(struct dsa_switch *ds, int port,
|
||||
struct switchdev_obj_port_vlan *vlan,
|
||||
switchdev_obj_dump_cb_t *cb)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
struct mv88e6xxx_vtu_entry next = {
|
||||
.vid = chip->info->max_vid,
|
||||
};
|
||||
u16 pvid;
|
||||
int err;
|
||||
|
||||
if (!chip->info->max_vid)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&chip->reg_lock);
|
||||
|
||||
err = mv88e6xxx_port_get_pvid(chip, port, &pvid);
|
||||
if (err)
|
||||
goto unlock;
|
||||
|
||||
do {
|
||||
err = mv88e6xxx_vtu_getnext(chip, &next);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
if (!next.valid)
|
||||
break;
|
||||
|
||||
if (next.member[port] ==
|
||||
MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_NON_MEMBER)
|
||||
continue;
|
||||
|
||||
/* reinit and dump this VLAN obj */
|
||||
vlan->vid_begin = next.vid;
|
||||
vlan->vid_end = next.vid;
|
||||
vlan->flags = 0;
|
||||
|
||||
if (next.member[port] ==
|
||||
MV88E6XXX_G1_VTU_DATA_MEMBER_TAG_UNTAGGED)
|
||||
vlan->flags |= BRIDGE_VLAN_INFO_UNTAGGED;
|
||||
|
||||
if (next.vid == pvid)
|
||||
vlan->flags |= BRIDGE_VLAN_INFO_PVID;
|
||||
|
||||
err = cb(&vlan->obj);
|
||||
if (err)
|
||||
break;
|
||||
} while (next.vid < chip->info->max_vid);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&chip->reg_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int mv88e6xxx_atu_new(struct mv88e6xxx_chip *chip, u16 *fid)
|
||||
{
|
||||
DECLARE_BITMAP(fid_bitmap, MV88E6XXX_N_FID);
|
||||
@@ -3896,7 +3841,6 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
|
||||
.port_vlan_prepare = mv88e6xxx_port_vlan_prepare,
|
||||
.port_vlan_add = mv88e6xxx_port_vlan_add,
|
||||
.port_vlan_del = mv88e6xxx_port_vlan_del,
|
||||
.port_vlan_dump = mv88e6xxx_port_vlan_dump,
|
||||
.port_fdb_add = mv88e6xxx_port_fdb_add,
|
||||
.port_fdb_del = mv88e6xxx_port_fdb_del,
|
||||
.port_fdb_dump = mv88e6xxx_port_fdb_dump,
|
||||
|
Reference in New Issue
Block a user