diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2015-10-22 15:34:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-22 16:38:35 +0200 |
commit | ea70ba980666cffacb57d90d867b2c7952d90700 (patch) | |
tree | 0d830a198b504eb3e23a02d0d6da78a415da930e /net/dsa/slave.c | |
parent | Merge tag 'mac80211-next-for-davem-2015-10-21' of git://git.kernel.org/pub/sc... (diff) | |
download | linux-ea70ba980666cffacb57d90d867b2c7952d90700.tar.xz linux-ea70ba980666cffacb57d90d867b2c7952d90700.zip |
net: dsa: add port_fdb_dump function
Not all switch chips support a Get Next operation to iterate on its FDB.
So add a more simple port_fdb_dump function for them.
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index b0b8da0f5af8..d76e62b8dc9c 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -382,6 +382,9 @@ static int dsa_slave_port_fdb_dump(struct net_device *dev, u16 vid = 0; int ret; + if (ds->drv->port_fdb_dump) + return ds->drv->port_fdb_dump(ds, p->port, fdb, cb); + if (!ds->drv->port_fdb_getnext) return -EOPNOTSUPP; |