diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2017-08-06 09:15:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-07 17:48:48 -0400 |
commit | a0b6b8c9fa3c73a523735b8b5f87f59211c70a4e (patch) | |
tree | 7b5ee9959a180cb41d4340ae39acef203419933c /drivers/net/dsa/dsa_loop.c | |
parent | c9e2105e295ebd123f9cded311f3e5678218f3f4 (diff) |
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>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
-rw-r--r-- | drivers/net/dsa/dsa_loop.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c index fdd8f3872102..76d66604a34e 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c | |||
@@ -257,43 +257,6 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port, | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | static int dsa_loop_port_vlan_dump(struct dsa_switch *ds, int port, | ||
261 | struct switchdev_obj_port_vlan *vlan, | ||
262 | switchdev_obj_dump_cb_t *cb) | ||
263 | { | ||
264 | struct dsa_loop_priv *ps = ds->priv; | ||
265 | struct mii_bus *bus = ps->bus; | ||
266 | struct dsa_loop_vlan *vl; | ||
267 | u16 vid, vid_start = 0; | ||
268 | int err = 0; | ||
269 | |||
270 | dev_dbg(ds->dev, "%s\n", __func__); | ||
271 | |||
272 | /* Just do a sleeping operation to make lockdep checks effective */ | ||
273 | mdiobus_read(bus, ps->port_base + port, MII_BMSR); | ||
274 | |||
275 | for (vid = vid_start; vid < DSA_LOOP_VLANS; vid++) { | ||
276 | vl = &ps->vlans[vid]; | ||
277 | |||
278 | if (!(vl->members & BIT(port))) | ||
279 | continue; | ||
280 | |||
281 | vlan->vid_begin = vlan->vid_end = vid; | ||
282 | vlan->flags = 0; | ||
283 | |||
284 | if (vl->untagged & BIT(port)) | ||
285 | vlan->flags |= BRIDGE_VLAN_INFO_UNTAGGED; | ||
286 | if (ps->pvid == vid) | ||
287 | vlan->flags |= BRIDGE_VLAN_INFO_PVID; | ||
288 | |||
289 | err = cb(&vlan->obj); | ||
290 | if (err) | ||
291 | break; | ||
292 | } | ||
293 | |||
294 | return err; | ||
295 | } | ||
296 | |||
297 | static struct dsa_switch_ops dsa_loop_driver = { | 260 | static struct dsa_switch_ops dsa_loop_driver = { |
298 | .get_tag_protocol = dsa_loop_get_protocol, | 261 | .get_tag_protocol = dsa_loop_get_protocol, |
299 | .setup = dsa_loop_setup, | 262 | .setup = dsa_loop_setup, |
@@ -310,7 +273,6 @@ static struct dsa_switch_ops dsa_loop_driver = { | |||
310 | .port_vlan_prepare = dsa_loop_port_vlan_prepare, | 273 | .port_vlan_prepare = dsa_loop_port_vlan_prepare, |
311 | .port_vlan_add = dsa_loop_port_vlan_add, | 274 | .port_vlan_add = dsa_loop_port_vlan_add, |
312 | .port_vlan_del = dsa_loop_port_vlan_del, | 275 | .port_vlan_del = dsa_loop_port_vlan_del, |
313 | .port_vlan_dump = dsa_loop_port_vlan_dump, | ||
314 | }; | 276 | }; |
315 | 277 | ||
316 | static int dsa_loop_drv_probe(struct mdio_device *mdiodev) | 278 | static int dsa_loop_drv_probe(struct mdio_device *mdiodev) |