summaryrefslogtreecommitdiff
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2017-08-06 16:15:41 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-08 00:48:48 +0300
commit2acf4e6a890b0228ed19b228063d69666f61ee19 (patch)
tree3064a5835106c22619d00741c3813388abc8e56d /net/dsa/slave.c
parent1b6dd556c3045ca5fa31cc1e98a4a43afa680e1e (diff)
downloadlinux-2acf4e6a890b0228ed19b228063d69666f61ee19.tar.xz
net: dsa: Remove switchdev dependency from DSA switch notifier chain
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index bb7ab26ef768..6a1d4d6d212b 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -253,7 +253,8 @@ static int dsa_slave_port_obj_add(struct net_device *dev,
case SWITCHDEV_OBJ_ID_PORT_FDB:
if (switchdev_trans_ph_prepare(trans))
return 0;
- err = dsa_port_fdb_add(dp, SWITCHDEV_OBJ_PORT_FDB(obj));
+ err = dsa_port_fdb_add(dp, SWITCHDEV_OBJ_PORT_FDB(obj)->addr,
+ SWITCHDEV_OBJ_PORT_FDB(obj)->vid);
break;
case SWITCHDEV_OBJ_ID_PORT_MDB:
err = dsa_port_mdb_add(dp, SWITCHDEV_OBJ_PORT_MDB(obj), trans);
@@ -279,7 +280,8 @@ static int dsa_slave_port_obj_del(struct net_device *dev,
switch (obj->id) {
case SWITCHDEV_OBJ_ID_PORT_FDB:
- err = dsa_port_fdb_del(dp, SWITCHDEV_OBJ_PORT_FDB(obj));
+ err = dsa_port_fdb_del(dp, SWITCHDEV_OBJ_PORT_FDB(obj)->addr,
+ SWITCHDEV_OBJ_PORT_FDB(obj)->vid);
break;
case SWITCHDEV_OBJ_ID_PORT_MDB:
err = dsa_port_mdb_del(dp, SWITCHDEV_OBJ_PORT_MDB(obj));