From 8284ea7b113915c08d0fa78490d50b2cd190dad3 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Mon, 19 Aug 2024 15:21:40 +0300 Subject: [PATCH] net: shell: Move bridge shell under net shell All the network related shell activities should be under network shell so moving it to "net bridge ..." command. Add this information to migration guide. Signed-off-by: Jukka Rissanen --- doc/releases/migration-guide-4.0.rst | 4 ++++ subsys/net/l2/ethernet/Kconfig | 2 +- subsys/net/l2/ethernet/bridge_shell.c | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/releases/migration-guide-4.0.rst b/doc/releases/migration-guide-4.0.rst index 5673b3bc038..2ebcbfed599 100644 --- a/doc/releases/migration-guide-4.0.rst +++ b/doc/releases/migration-guide-4.0.rst @@ -174,6 +174,10 @@ Networking :c:func:`coap_get_block2_option` now accepts an additional ``bool *has_more`` parameter, to store the value of the more flag. (:github:`76052`) +* The Ethernet bridge shell is moved under network shell. This is done so that + all the network shell activities can be found under ``net`` shell command. + After this change the bridge shell is used by ``net bridge`` command. + Other Subsystems **************** diff --git a/subsys/net/l2/ethernet/Kconfig b/subsys/net/l2/ethernet/Kconfig index 1b61c251d8d..3df528ee06c 100644 --- a/subsys/net/l2/ethernet/Kconfig +++ b/subsys/net/l2/ethernet/Kconfig @@ -115,7 +115,7 @@ endif # NET_ETHERNET_BRIDGE config NET_ETHERNET_BRIDGE_SHELL bool "Ethernet Bridging management shell" depends on NET_ETHERNET_BRIDGE - select SHELL + select NET_SHELL help Enables shell utility to manage bridge configuration interactively. diff --git a/subsys/net/l2/ethernet/bridge_shell.c b/subsys/net/l2/ethernet/bridge_shell.c index b2ed720cef1..7ac0bd6f0f1 100644 --- a/subsys/net/l2/ethernet/bridge_shell.c +++ b/subsys/net/l2/ethernet/bridge_shell.c @@ -221,7 +221,9 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bridge_commands, SHELL_SUBCMD_SET_END ); -SHELL_CMD_REGISTER(bridge, &bridge_commands, "Ethernet Bridge commands", NULL); +SHELL_SUBCMD_ADD((net), bridge, &bridge_commands, + "Ethernet bridge commands.", + cmd_bridge_show, 1, 1); #if defined(CONFIG_NET_ETHERNET_BRIDGE_DEFAULT) static ETH_BRIDGE_INIT(shell_default_bridge);