diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2017-08-06 16:15:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-07 14:48:48 -0700 |
commit | 37b8da1a3c68501c2fba94951f8f59280c7a9752 (patch) | |
tree | b7ab94f7edaa8002438f4b514025a50760fe364a /net/dsa/slave.c | |
parent | c9eb3e0f870105242a15a5e628ed202cf32afe0d (diff) | |
download | blackbird-op-linux-37b8da1a3c68501c2fba94951f8f59280c7a9752.tar.gz blackbird-op-linux-37b8da1a3c68501c2fba94951f8f59280c7a9752.zip |
net: dsa: Move FDB add/del implementation inside DSA
Currently DSA uses switchdev's implementation of FDB add/del ndos. This
patch moves the implementation inside DSA in order to support the legacy
way for static FDB configuration.
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/slave.c')
-rw-r--r-- | net/dsa/slave.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 064f833a0422..84a8694c69d0 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -250,12 +250,6 @@ static int dsa_slave_port_obj_add(struct net_device *dev, */ switch (obj->id) { - 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)->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); break; @@ -279,10 +273,6 @@ static int dsa_slave_port_obj_del(struct net_device *dev, int err; switch (obj->id) { - case SWITCHDEV_OBJ_ID_PORT_FDB: - 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)); break; @@ -985,8 +975,8 @@ static const struct net_device_ops dsa_slave_netdev_ops = { .ndo_change_rx_flags = dsa_slave_change_rx_flags, .ndo_set_rx_mode = dsa_slave_set_rx_mode, .ndo_set_mac_address = dsa_slave_set_mac_address, - .ndo_fdb_add = switchdev_port_fdb_add, - .ndo_fdb_del = switchdev_port_fdb_del, + .ndo_fdb_add = dsa_legacy_fdb_add, + .ndo_fdb_del = dsa_legacy_fdb_del, .ndo_fdb_dump = switchdev_port_fdb_dump, .ndo_do_ioctl = dsa_slave_ioctl, .ndo_get_iflink = dsa_slave_get_iflink, |