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:
Arkadi Sharshevsky
2017-08-06 16:15:45 +03:00
committed by David S. Miller
parent c9e2105e29
commit a0b6b8c9fa
6 changed files with 0 additions and 183 deletions

View File

@@ -638,46 +638,6 @@ static int ksz_port_vlan_del(struct dsa_switch *ds, int port,
return 0;
}
static int ksz_port_vlan_dump(struct dsa_switch *ds, int port,
struct switchdev_obj_port_vlan *vlan,
switchdev_obj_dump_cb_t *cb)
{
struct ksz_device *dev = ds->priv;
u16 vid;
u16 data;
struct vlan_table *vlan_cache;
int err = 0;
mutex_lock(&dev->vlan_mutex);
/* use dev->vlan_cache due to lack of searching valid vlan entry */
for (vid = vlan->vid_begin; vid < dev->num_vlans; vid++) {
vlan_cache = &dev->vlan_cache[vid];
if (!(vlan_cache->table[0] & VLAN_VALID))
continue;
vlan->vid_begin = vid;
vlan->vid_end = vid;
vlan->flags = 0;
if (vlan_cache->table[2] & BIT(port)) {
if (vlan_cache->table[1] & BIT(port))
vlan->flags |= BRIDGE_VLAN_INFO_UNTAGGED;
ksz_pread16(dev, port, REG_PORT_DEFAULT_VID, &data);
if (vid == (data & 0xFFFFF))
vlan->flags |= BRIDGE_VLAN_INFO_PVID;
err = cb(&vlan->obj);
if (err)
break;
}
}
mutex_unlock(&dev->vlan_mutex);
return err;
}
struct alu_struct {
/* entry 1 */
u8 is_static:1;
@@ -1124,7 +1084,6 @@ static const struct dsa_switch_ops ksz_switch_ops = {
.port_vlan_prepare = ksz_port_vlan_prepare,
.port_vlan_add = ksz_port_vlan_add,
.port_vlan_del = ksz_port_vlan_del,
.port_vlan_dump = ksz_port_vlan_dump,
.port_fdb_dump = ksz_port_fdb_dump,
.port_fdb_add = ksz_port_fdb_add,
.port_fdb_del = ksz_port_fdb_del,