mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
e9829b9745
commit
ea70ba9806
2 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue