The Kconfig parser seems to get confused by the current if conditions following CMD_NET and displays all network command options directly in the "Command line interface" menu instead of in a "Network commands" submenu.
To help out Kconfig we can simplify the if conditions, so that the definition of CMD_NET is followed immediately by an if/endif block that contains all network command options. We can also remove nested checks for CMD_NET or (NET || NET_LWIP). Fixes: 98ad145db61a ("net: lwip: add DHCP support and dhcp commmand") Signed-off-by: Paul Barker <paul.barker...@bp.renesas.com> --- cmd/Kconfig | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 8dd42571abce..f4c1a084330d 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1834,12 +1834,10 @@ menuconfig CMD_NET bool "Network commands" default y -endif +if CMD_NET if NET -if CMD_NET - config CMD_BOOTP bool "bootp" default y @@ -2080,7 +2078,6 @@ config IPV6_ROUTER_DISCOVERY help Will automatically perform router solicitation on first IPv6 network operation -endif # if CMD_NET config CMD_ETHSW bool "ethsw" @@ -2097,10 +2094,6 @@ config CMD_WOL endif # if NET -if NET || NET_LWIP - -if CMD_NET - config CMD_DHCP bool "dhcp" select PROT_DHCP_LWIP if NET_LWIP @@ -2177,8 +2170,6 @@ config WGET_HTTPS help Enable TLS over http for wget. -endif # if CMD_NET - config CMD_PXE bool "pxe" select PXE_UTILS @@ -2186,7 +2177,9 @@ config CMD_PXE help Boot image via network using PXE protocol -endif # if NET || NET_LWIP +endif # if CMD_NET + +endif # NET || NET_LWIP menu "Misc commands" -- 2.43.0