mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user