diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-09-21 02:32:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-22 01:24:01 +0300 |
commit | de40fc5d210f2c31f2c25a9b920861276a71b70d (patch) | |
tree | 085a2d7298d060e6eb28c2582a60f41170eceb77 /net/dsa/slave.c | |
parent | 4fa7b718881a5358286903b796968cea80993820 (diff) | |
download | linux-de40fc5d210f2c31f2c25a9b920861276a71b70d.tar.xz |
net: dsa: add port fdb dump
Dumping a DSA port's FDB entries is not specific to a DSA slave, so add
a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and
dsa_port_fdb_del.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 4a98942a6135..02ace7d462c4 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -263,16 +263,11 @@ dsa_slave_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, }; struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_port *dp = p->dp; - struct dsa_switch *ds = dp->ds; int err; - if (!ds->ops->port_fdb_dump) - return -EOPNOTSUPP; - - err = ds->ops->port_fdb_dump(ds, dp->index, - dsa_slave_port_fdb_do_dump, - &dump); + err = dsa_port_fdb_dump(dp, dsa_slave_port_fdb_do_dump, &dump); *idx = dump.idx; + return err; } |