summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2017-08-06 16:15:39 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-07 14:48:47 -0700
commit6c2c1dcb185f1e44e1c895781dbaba40195234f9 (patch)
tree36097f71a68236bceeca5d3191f98dd6a932ceb9 /net/dsa
parent511aeaf46655d595f50e5e9f113836f19a78116b (diff)
downloadlinux-6c2c1dcb185f1e44e1c895781dbaba40195234f9.tar.gz
linux-6c2c1dcb185f1e44e1c895781dbaba40195234f9.tar.bz2
linux-6c2c1dcb185f1e44e1c895781dbaba40195234f9.zip
net: dsa: Change DSA slave FDB API to be switchdev independent
In order to support FDB add/del to be on a notifier chain the slave API need to be changed to be switchdev independent. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Reviewed-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')
-rw-r--r--net/dsa/switch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 97e2e9c8cf3f..a9edfbad3889 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -94,10 +94,11 @@ static int dsa_switch_fdb_add(struct dsa_switch *ds,
if (!ds->ops->port_fdb_prepare || !ds->ops->port_fdb_add)
return -EOPNOTSUPP;
- return ds->ops->port_fdb_prepare(ds, info->port, fdb, trans);
+ return ds->ops->port_fdb_prepare(ds, info->port, fdb->addr,
+ fdb->vid);
}
- ds->ops->port_fdb_add(ds, info->port, fdb, trans);
+ ds->ops->port_fdb_add(ds, info->port, fdb->addr, fdb->vid);
return 0;
}
@@ -114,7 +115,8 @@ static int dsa_switch_fdb_del(struct dsa_switch *ds,
if (!ds->ops->port_fdb_del)
return -EOPNOTSUPP;
- return ds->ops->port_fdb_del(ds, info->port, fdb);
+ return ds->ops->port_fdb_del(ds, info->port, fdb->addr,
+ fdb->vid);
}
static int dsa_switch_mdb_add(struct dsa_switch *ds,