aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2015-10-22 09:34:43 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-22 10:38:45 -0400
commit1a49a2fbf8c15d63a0b5e60d935ec7d5d3d07fd5 (patch)
tree75dc9acfc1527604786d6747bf1ad6def40ad7cc /net/dsa/slave.c
parent2c49471b6695c5bac0d36c30ca07b8c311cd7cc3 (diff)
net: dsa: remove port_fdb_getnext
No driver implements port_fdb_getnext anymore, and port_fdb_dump is preferred anyway, so remove this function from DSA. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index d76e62b8dc9c..481754ee062a 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -378,34 +378,11 @@ static int dsa_slave_port_fdb_dump(struct net_device *dev,
378{ 378{
379 struct dsa_slave_priv *p = netdev_priv(dev); 379 struct dsa_slave_priv *p = netdev_priv(dev);
380 struct dsa_switch *ds = p->parent; 380 struct dsa_switch *ds = p->parent;
381 unsigned char addr[ETH_ALEN] = { 0 };
382 u16 vid = 0;
383 int ret;
384 381
385 if (ds->drv->port_fdb_dump) 382 if (ds->drv->port_fdb_dump)
386 return ds->drv->port_fdb_dump(ds, p->port, fdb, cb); 383 return ds->drv->port_fdb_dump(ds, p->port, fdb, cb);
387 384
388 if (!ds->drv->port_fdb_getnext) 385 return -EOPNOTSUPP;
389 return -EOPNOTSUPP;
390
391 for (;;) {
392 bool is_static;
393
394 ret = ds->drv->port_fdb_getnext(ds, p->port, addr, &vid,
395 &is_static);
396 if (ret < 0)
397 break;
398
399 ether_addr_copy(fdb->addr, addr);
400 fdb->vid = vid;
401 fdb->ndm_state = is_static ? NUD_NOARP : NUD_REACHABLE;
402
403 ret = cb(&fdb->obj);
404 if (ret < 0)
405 break;
406 }
407
408 return ret == -ENOENT ? 0 : ret;
409} 386}
410 387
411static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 388static int dsa_slave_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)