[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171113135756.3250298-1-arnd@arndb.de>
Date: Mon, 13 Nov 2017 14:57:32 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>
Cc: Arnd Bergmann <arnd@...db.de>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] net: dsa: add CONFIG_BRIDGE dependency
br_vlan_enabled() may be provided by a loadable module, which
causes a build error when called from a built-in function:
net/dsa/port.o: In function `dsa_port_vlan_add':
port.c:(.text+0x4a7): undefined reference to `br_vlan_enabled'
net/dsa/port.o: In function `dsa_port_vlan_del':
port.c:(.text+0x529): undefined reference to `br_vlan_enabled'
This adds a Kconfig dependency to enforce NET_DSA to not be
built-in when BRIDGE is a module and BRIDGE_VLAN_FILTERING is
enabled. We can still build NET_DSA as built-in when the
bridge code is completely disabled, or built-in, or a module
without vlan filtering support.
Fixes: 2ea7a679ca2a ("net: dsa: Don't add vlans when vlan filtering is disabled")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
net/dsa/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index cc5f8f971689..15926d94d796 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -7,6 +7,7 @@ config HAVE_NET_DSA
config NET_DSA
tristate "Distributed Switch Architecture"
depends on HAVE_NET_DSA && MAY_USE_DEVLINK
+ depends on BRIDGE || !BRIDGE_VLAN_FILTERING
select NET_SWITCHDEV
select PHYLIB
---help---
--
2.9.0
Powered by blists - more mailing lists