summaryrefslogtreecommitdiffstats
path: root/net/dsa/switch.c
diff options
context:
space:
mode:
authorArkadi Sharshevsky2017-08-06 15:15:39 +0200
committerDavid S. Miller2017-08-07 23:48:47 +0200
commit6c2c1dcb185f1e44e1c895781dbaba40195234f9 (patch)
tree36097f71a68236bceeca5d3191f98dd6a932ceb9 /net/dsa/switch.c
parenthamradio: baycom: make hdlcdrv_ops const (diff)
downloadkernel-qcow2-linux-6c2c1dcb185f1e44e1c895781dbaba40195234f9.tar.gz
kernel-qcow2-linux-6c2c1dcb185f1e44e1c895781dbaba40195234f9.tar.xz
kernel-qcow2-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/switch.c')
-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,