summaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-12-07 00:03:33 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-07 20:14:54 +0100
commit2a93c1a3651fb41b580676c849887b68af6da02b (patch)
tree15a29c4aa5f0688f75b335e611b1dfd18ee3bb95 /net/dsa/slave.c
parentbnxt_en: Don't print "Link speed -1 no longer supported" messages. (diff)
downloadlinux-2a93c1a3651fb41b580676c849887b68af6da02b.tar.xz
linux-2a93c1a3651fb41b580676c849887b68af6da02b.zip
net: dsa: Allow compiling out legacy support
Introduce a configuration option: CONFIG_NET_DSA_LEGACY allowing to compile out support for the old platform device and Device Tree binding registration. Support for these configurations is scheduled to be removed in 4.17. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/dsa/slave.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 895db05d8c82..5d6475a6cc5d 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -941,6 +941,26 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.set_rxnfc = dsa_slave_set_rxnfc,
};
+/* legacy way, bypassing the bridge *****************************************/
+int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr, u16 vid,
+ u16 flags)
+{
+ struct dsa_port *dp = dsa_slave_to_port(dev);
+
+ return dsa_port_fdb_add(dp, addr, vid);
+}
+
+int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr, u16 vid)
+{
+ struct dsa_port *dp = dsa_slave_to_port(dev);
+
+ return dsa_port_fdb_del(dp, addr, vid);
+}
+
static const struct net_device_ops dsa_slave_netdev_ops = {
.ndo_open = dsa_slave_open,
.ndo_stop = dsa_slave_close,