Skip to contentSkip to conversation

net: Rework dependencies around NET/NET_LWIP and NETDEVICES

PATCH In review Tom Rini 2 participants 2 messages Mar 20 – Mar 23 Network drivers

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 net: Rework dependencies around NET/NET_LWIP and NETDEVICES

Functionally, both networking stacks require DM_ETH. This is because they both also require some networking devices to be enabled. Express this more correctly by having both NET and NET_LWIP select NETDEVICES. In turn NETDEVICES no longer depends on NET or NET_LWIP as it's not prompted anymore.

---
Cc: Jerome Forissier <[email protected]>

---
 Kconfig             | 4 ++--
 drivers/net/Kconfig | 9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)
Kconfig +2 -2
index b52331d6ff25..01708e80f476 100644
@@ -787,14 +787,14 @@ config NO_NET
 
 config NET
 	bool "Legacy U-Boot networking stack"
-	imply NETDEVICES
+	select NETDEVICES
 	help
 	  Include networking support with U-Boot's internal implementation of
 	  the TCP/IP protocol stack.
 
 config NET_LWIP
 	bool "Use lwIP for networking stack"
-	imply NETDEVICES
+	select NETDEVICES
 	help
 	  Include networking support based on the lwIP (lightweight IP)
 	  TCP/IP stack (https://nongnu.org/lwip). This is a replacement for
drivers/net/Kconfig +6 -3
index 02063ce3aa91..9d4e9f069701 100644
@@ -90,9 +90,10 @@ config DSA_SANDBOX
 	  Ethernet device used as DSA master, to test DSA class code, including
 	  exported DSA API and datapath processing of Ethernet traffic.
 
-menuconfig NETDEVICES
-	bool "Network device support"
-	depends on NET || NET_LWIP
+menu "Network device support"
+
+config NETDEVICES
+	bool
 	select DM_ETH
 	help
 	  You must select Y to enable any network device support
@@ -1106,3 +1107,5 @@ source "drivers/net/pfe_eth/Kconfig"
 source "drivers/net/fsl-mc/Kconfig"
 
 endif # NETDEVICES
+
+endmenu
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tom Rini

Functionally, both networking stacks require DM_ETH. This is because they both also require some networking devices to be enabled. Express this more correctly by having both NET and NET_LWIP select NETDEVICES. In turn NETDEVICES no longer depends on NET or NET_LWIP as it's not prompted anymore.

Quoted 7 lines

---
Cc: Jerome Forissier <[email protected]>

---
 Kconfig             | 4 ++--
 drivers/net/Kconfig | 9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

Thanks,

Signature · 1 line
Jerome
Quoted 45 lines
Kconfig +2 -2
index b52331d6ff25..01708e80f476 100644
@@ -787,14 +787,14 @@ config NO_NET
 
 config NET
 	bool "Legacy U-Boot networking stack"
-	imply NETDEVICES
+	select NETDEVICES
 	help
 	  Include networking support with U-Boot's internal implementation of
 	  the TCP/IP protocol stack.
 
 config NET_LWIP
 	bool "Use lwIP for networking stack"
-	imply NETDEVICES
+	select NETDEVICES
 	help
 	  Include networking support based on the lwIP (lightweight IP)
 	  TCP/IP stack (https://nongnu.org/lwip). This is a replacement for
drivers/net/Kconfig +6 -3
index 02063ce3aa91..9d4e9f069701 100644
@@ -90,9 +90,10 @@ config DSA_SANDBOX
 	  Ethernet device used as DSA master, to test DSA class code, including
 	  exported DSA API and datapath processing of Ethernet traffic.
 
-menuconfig NETDEVICES
-	bool "Network device support"
-	depends on NET || NET_LWIP
+menu "Network device support"
+
+config NETDEVICES
+	bool
 	select DM_ETH
 	help
 	  You must select Y to enable any network device support
@@ -1106,3 +1107,5 @@ source "drivers/net/pfe_eth/Kconfig"
 source "drivers/net/fsl-mc/Kconfig"
 
 endif # NETDEVICES
+
+endmenu