[PATCH] net: Make NET imply NETDEVICES

Normally, when NET is enabled, CMD_NET will then be enabled and in turn NETDEVICES will (likely) be enabled via imply. However, if we disable CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES for us. This suggestion (as an imply is) really isn't about the network commands but network itself and is a legacy of how intertwined NET/CMD_NET were historically. Move this over to the NET entry instead where it is a more logical fit.
Reported-by: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com --- This could also be dropping the imply from cmd/Kconfig and instead making drivers/net/Kconfig::NETDEVICES be default y, which is what it practically is today. This would require a more lengthy check however to be sure there's no functional change and I'm not sure it's any better or worse than this approach. --- cmd/Kconfig | 1 - net/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig index 629a90afb7b5..1b4aad5c930b 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1682,7 +1682,6 @@ if NET menuconfig CMD_NET bool "Network commands" default y - imply NETDEVICES
if CMD_NET
diff --git a/net/Kconfig b/net/Kconfig index 4215889127c9..8c80b3a6c671 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -5,6 +5,7 @@ menuconfig NET bool "Networking support" default y + imply NETDEVICES
if NET

On Wed, 8 Nov 2023 at 17:12, Tom Rini trini@konsulko.com wrote:
Normally, when NET is enabled, CMD_NET will then be enabled and in turn NETDEVICES will (likely) be enabled via imply. However, if we disable CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES for us. This suggestion (as an imply is) really isn't about the network commands but network itself and is a legacy of how intertwined NET/CMD_NET were historically. Move this over to the NET entry instead where it is a more logical fit.
Reported-by: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com
This could also be dropping the imply from cmd/Kconfig and instead making drivers/net/Kconfig::NETDEVICES be default y, which is what it practically is today. This would require a more lengthy check however to be sure there's no functional change and I'm not sure it's any better or worse than this approach.
cmd/Kconfig | 1 - net/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org Tested-by: Simon Glass sjg@chromium.org
Thanks!

On Wed, Nov 08, 2023 at 07:12:25PM -0500, Tom Rini wrote:
Normally, when NET is enabled, CMD_NET will then be enabled and in turn NETDEVICES will (likely) be enabled via imply. However, if we disable CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES for us. This suggestion (as an imply is) really isn't about the network commands but network itself and is a legacy of how intertwined NET/CMD_NET were historically. Move this over to the NET entry instead where it is a more logical fit.
Reported-by: Simon Glass sjg@chromium.org Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org Tested-by: Simon Glass sjg@chromium.org
Applied to u-boot/next, thanks!
participants (2)
-
Simon Glass
-
Tom Rini