From c200b1c5e63464789241158aa0b915f333b9fd7f Mon Sep 17 00:00:00 2001 From: Carles Cufi Date: Thu, 30 Jul 2020 18:01:18 +0200 Subject: [PATCH] mgmt: Move mcumgr into its own folder In order to be able to add more entries under 'subsys/mgmt', move the current contents of it, which relate exclusively to MCUMgr, to its own folder. Signed-off-by: Carles Cufi --- CODEOWNERS | 4 +- MAINTAINERS.yml | 6 +- drivers/console/uart_mcumgr.c | 2 +- include/mgmt/{ => mcumgr}/buf.h | 0 include/mgmt/{ => mcumgr}/serial.h | 0 include/mgmt/{ => mcumgr}/smp.h | 0 include/mgmt/{ => mcumgr}/smp_bt.h | 0 include/mgmt/{ => mcumgr}/smp_shell.h | 0 include/mgmt/{ => mcumgr}/smp_udp.h | 0 include/shell/shell_uart.h | 2 +- .../mgmt/mcumgr/smp_svr/src/bluetooth.c | 2 +- samples/subsys/mgmt/mcumgr/smp_svr/src/udp.c | 2 +- subsys/CMakeLists.txt | 2 +- subsys/mgmt/CMakeLists.txt | 13 +- subsys/mgmt/Kconfig | 157 +---------------- subsys/mgmt/mcumgr/CMakeLists.txt | 14 ++ subsys/mgmt/mcumgr/Kconfig | 160 ++++++++++++++++++ subsys/mgmt/{ => mcumgr}/Kconfig.mcumgr | 0 subsys/mgmt/{ => mcumgr}/buf.c | 2 +- subsys/mgmt/{ => mcumgr}/serial_util.c | 4 +- subsys/mgmt/{ => mcumgr}/smp.c | 4 +- subsys/mgmt/{ => mcumgr}/smp_bt.c | 6 +- subsys/mgmt/{ => mcumgr}/smp_shell.c | 8 +- subsys/mgmt/{ => mcumgr}/smp_uart.c | 6 +- subsys/mgmt/{ => mcumgr}/smp_udp.c | 6 +- 25 files changed, 206 insertions(+), 194 deletions(-) rename include/mgmt/{ => mcumgr}/buf.h (100%) rename include/mgmt/{ => mcumgr}/serial.h (100%) rename include/mgmt/{ => mcumgr}/smp.h (100%) rename include/mgmt/{ => mcumgr}/smp_bt.h (100%) rename include/mgmt/{ => mcumgr}/smp_shell.h (100%) rename include/mgmt/{ => mcumgr}/smp_udp.h (100%) create mode 100644 subsys/mgmt/mcumgr/CMakeLists.txt create mode 100644 subsys/mgmt/mcumgr/Kconfig rename subsys/mgmt/{ => mcumgr}/Kconfig.mcumgr (100%) rename subsys/mgmt/{ => mcumgr}/buf.c (99%) rename subsys/mgmt/{ => mcumgr}/serial_util.c (99%) rename subsys/mgmt/{ => mcumgr}/smp.c (99%) rename subsys/mgmt/{ => mcumgr}/smp_bt.c (97%) rename subsys/mgmt/{ => mcumgr}/smp_shell.c (97%) rename subsys/mgmt/{ => mcumgr}/smp_uart.c (96%) rename subsys/mgmt/{ => mcumgr}/smp_udp.c (98%) diff --git a/CODEOWNERS b/CODEOWNERS index 1395cee948..146e353457 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -461,8 +461,8 @@ /subsys/fs/nvs/ @Laczen /subsys/logging/ @nordic-krch /subsys/logging/log_backend_net.c @nordic-krch @jukkar -/subsys/mgmt/ @carlescufi @nvlsianpu -/subsys/mgmt/smp_udp.c @aunsbjerg +/subsys/mgmt/mcumgr/ @carlescufi @nvlsianpu +/subsys/mgmt/mcumgr/smp_udp.c @aunsbjerg /subsys/net/buf.c @jukkar @jhedberg @tbursztyka @pfalcon /subsys/net/ip/ @jukkar @tbursztyka @pfalcon /subsys/net/lib/ @jukkar @tbursztyka @pfalcon diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index 4cd1278cfe..dfbd1959b2 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -841,9 +841,9 @@ MCU Manager: maintainers: - de-nordic files: - - subsys/mgmt/ - - include/mgmt/ - - samples/subsys/mgmt/ + - subsys/mgmt/mcumgr/ + - include/mgmt/mcumgr/ + - samples/subsys/mgmt/mcumgr/ labels: - "area: mcumgr" diff --git a/drivers/console/uart_mcumgr.c b/drivers/console/uart_mcumgr.c index 223e20cfba..8a1fca58af 100644 --- a/drivers/console/uart_mcumgr.c +++ b/drivers/console/uart_mcumgr.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include static struct device *uart_mcumgr_dev; diff --git a/include/mgmt/buf.h b/include/mgmt/mcumgr/buf.h similarity index 100% rename from include/mgmt/buf.h rename to include/mgmt/mcumgr/buf.h diff --git a/include/mgmt/serial.h b/include/mgmt/mcumgr/serial.h similarity index 100% rename from include/mgmt/serial.h rename to include/mgmt/mcumgr/serial.h diff --git a/include/mgmt/smp.h b/include/mgmt/mcumgr/smp.h similarity index 100% rename from include/mgmt/smp.h rename to include/mgmt/mcumgr/smp.h diff --git a/include/mgmt/smp_bt.h b/include/mgmt/mcumgr/smp_bt.h similarity index 100% rename from include/mgmt/smp_bt.h rename to include/mgmt/mcumgr/smp_bt.h diff --git a/include/mgmt/smp_shell.h b/include/mgmt/mcumgr/smp_shell.h similarity index 100% rename from include/mgmt/smp_shell.h rename to include/mgmt/mcumgr/smp_shell.h diff --git a/include/mgmt/smp_udp.h b/include/mgmt/mcumgr/smp_udp.h similarity index 100% rename from include/mgmt/smp_udp.h rename to include/mgmt/mcumgr/smp_udp.h diff --git a/include/shell/shell_uart.h b/include/shell/shell_uart.h index 24a38583ee..68a3b0e583 100644 --- a/include/shell/shell_uart.h +++ b/include/shell/shell_uart.h @@ -11,7 +11,7 @@ #include #include #ifdef CONFIG_MCUMGR_SMP_SHELL -#include "mgmt/smp_shell.h" +#include "mgmt/mcumgr/smp_shell.h" #endif #ifdef __cplusplus diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c b/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c index 70dc5b812d..a7cc6bae06 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c +++ b/samples/subsys/mgmt/mcumgr/smp_svr/src/bluetooth.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #define LOG_LEVEL LOG_LEVEL_DBG #include diff --git a/samples/subsys/mgmt/mcumgr/smp_svr/src/udp.c b/samples/subsys/mgmt/mcumgr/smp_svr/src/udp.c index 43fd485cb2..f30cc44e83 100644 --- a/samples/subsys/mgmt/mcumgr/smp_svr/src/udp.c +++ b/samples/subsys/mgmt/mcumgr/smp_svr/src/udp.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include #include #include diff --git a/subsys/CMakeLists.txt b/subsys/CMakeLists.txt index a203f5bd34..4efb319e96 100644 --- a/subsys/CMakeLists.txt +++ b/subsys/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory_ifdef(CONFIG_SHELL shell) add_subdirectory_ifdef(CONFIG_CPLUSPLUS cpp) add_subdirectory_ifdef(CONFIG_DISK_ACCESS disk) add_subdirectory(fs) -add_subdirectory_ifdef(CONFIG_MCUMGR mgmt) +add_subdirectory(mgmt) add_subdirectory_ifdef(CONFIG_MCUBOOT_IMG_MANAGER dfu) add_subdirectory_ifdef(CONFIG_NET_BUF net) add_subdirectory_ifdef(CONFIG_USB usb) diff --git a/subsys/mgmt/CMakeLists.txt b/subsys/mgmt/CMakeLists.txt index 59bc8fec33..7c3a870663 100644 --- a/subsys/mgmt/CMakeLists.txt +++ b/subsys/mgmt/CMakeLists.txt @@ -1,14 +1,3 @@ # SPDX-License-Identifier: Apache-2.0 -zephyr_library() -zephyr_library_sources(buf.c) -zephyr_library_sources(smp.c) -zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_BT smp_bt.c) -zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_SHELL smp_shell.c) -zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_UART smp_uart.c) -zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_UDP smp_udp.c) -zephyr_library_link_libraries(MCUMGR) - -if (CONFIG_MCUMGR_SMP_SHELL OR CONFIG_MCUMGR_SMP_UART) - zephyr_library_sources(serial_util.c) -endif () +add_subdirectory_ifdef(CONFIG_MCUMGR mcumgr) diff --git a/subsys/mgmt/Kconfig b/subsys/mgmt/Kconfig index 9471333476..a3a6192fad 100644 --- a/subsys/mgmt/Kconfig +++ b/subsys/mgmt/Kconfig @@ -1,160 +1,9 @@ -# mcumgr configuration options +# Management configuration options -# Copyright Runtime.io 2018. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -menu "Management" +menu "Management subsystems" -config MCUMGR_SMP_BT - bool "Bluetooth mcumgr SMP transport" - select MCUMGR - select BT - select BT_PERIPHERAL - select BT_GATT_DYNAMIC_DB - help - Enables handling of SMP commands received over Bluetooth. +source "subsys/mgmt/mcumgr/Kconfig" -config MCUMGR_SMP_BT_AUTHEN - bool "Authenticated requirement for Bluetooth mcumgr SMP transport" - depends on MCUMGR_SMP_BT - select BT_SMP - default y - help - Enables encrypted and authenticated connection requirement to - Bluetooth SMP transport. - -config MCUMGR_SMP_SHELL - bool "Shell mcumgr SMP transport" - select MCUMGR - select SHELL - select SHELL_BACKEND_SERIAL - select BASE64 - help - Enables handling of SMP commands received over shell. This allows - the shell to be use for both mcumgr commands and shell commands. - -config MCUMGR_SMP_SHELL_MTU - int "Shell SMP MTU" - default 256 - depends on MCUMGR_SMP_SHELL - help - Maximum size of SMP frames sent and received over shell. This value - must satisfy the following relation: - MCUMGR_SMP_SHELL_MTU <= MCUMGR_BUF_SIZE + 2 - -config MCUMGR_SMP_UART - bool "UART mcumgr SMP transport" - select MCUMGR - select UART_MCUMGR - select BASE64 - help - Enables handling of SMP commands received over UART. This is a - lightweight alternative to MCUMGR_SMP_SHELL. It allows mcumgr - commands to be received over UART without requiring an additional - thread. - -config MCUMGR_SMP_UART_MTU - int "UART SMP MTU" - default 256 - depends on MCUMGR_SMP_UART - help - Maximum size of SMP frames sent and received over UART, in bytes. - This value must satisfy the following relation: - MCUMGR_SMP_UART_MTU <= MCUMGR_BUF_SIZE + 2 - -source "subsys/mgmt/Kconfig.mcumgr" - -config MCUMGR_SMP_UDP - bool "UDP mcumgr SMP transport" - select MCUMGR - select NETWORKING - select NET_UDP - select NET_SOCKETS - select NET_SOCKETS_POSIX_NAMES - help - Enables handling of SMP commands received over UDP. - Will start a thread for listening on the configured UDP port. - -config MCUMGR_SMP_UDP_IPV4 - bool "UDP SMP using IPv4" - depends on MCUMGR_SMP_UDP - depends on NET_IPV4 - default y - help - Enable SMP UDP using IPv4 addressing. - Can be enabled alongside IPv6 addressing. - -config MCUMGR_SMP_UDP_IPV6 - bool "UDP SMP using IPv6" - depends on MCUMGR_SMP_UDP - depends on NET_IPV6 - help - Enable SMP UDP using IPv6 addressing. - Can be enabled alongside IPv4 addressing. - -config MCUMGR_SMP_UDP_PORT - int "UDP SMP port" - depends on MCUMGR_SMP_UDP - default 1337 - help - UDP port that SMP server will listen for SMP commands on. - -config MCUMGR_SMP_UDP_STACK_SIZE - int "UDP SMP stack size" - depends on MCUMGR_SMP_UDP - default 512 - help - Stack size of the SMP UDP listening thread - -config MCUMGR_SMP_UDP_THREAD_PRIO - int "UDP SMP thread priority" - depends on MCUMGR_SMP_UDP - default 0 - help - Scheduling priority of the SMP UDP listening thread. - -config MCUMGR_SMP_UDP_MTU - int "UDP SMP MTU" - depends on MCUMGR_SMP_UDP - default 1500 - help - Maximum size of SMP frames sent and received over UDP, in bytes. - This value must satisfy the following relation: - MCUMGR_SMP_UDP_MTU <= MCUMGR_BUF_SIZE + SMP msg overhead - address size - where address size is determined by IPv4/IPv6 selection. - -if MCUMGR -config MCUMGR_BUF_COUNT - int "Number of mcumgr buffers" - default 2 if MCUMGR_SMP_UDP - default 4 - help - The number of net_bufs to allocate for mcumgr. These buffers are - used for both requests and responses. - -config MCUMGR_BUF_SIZE - int "Size of each mcumgr buffer" - default 2048 if MCUMGR_SMP_UDP - default 384 - help - The size, in bytes, of each mcumgr buffer. This value must satisfy - the following relation: - MCUMGR_BUF_SIZE >= transport-specific-MTU + transport-overhead - -config MCUMGR_BUF_USER_DATA_SIZE - int "Size of mcumgr buffer user data" - default 24 if MCUMGR_SMP_UDP && MCUMGR_SMP_UDP_IPV6 - default 8 if MCUMGR_SMP_UDP && MCUMGR_SMP_UDP_IPV4 - default 4 - help - The size, in bytes, of user data to allocate for each mcumgr buffer. - - Different mcumgr transports impose different requirements for this - setting. A value of 4 is sufficient for UART, shell, and bluetooth. - For UDP, the userdata must be large enough to hold a IPv4/IPv6 address. - - Note that CONFIG_NET_BUF_USER_DATA_SIZE must be at least as big as - MCUMGR_BUF_USER_DATA_SIZE. - -endif # MCUMGR endmenu diff --git a/subsys/mgmt/mcumgr/CMakeLists.txt b/subsys/mgmt/mcumgr/CMakeLists.txt new file mode 100644 index 0000000000..59bc8fec33 --- /dev/null +++ b/subsys/mgmt/mcumgr/CMakeLists.txt @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 + +zephyr_library() +zephyr_library_sources(buf.c) +zephyr_library_sources(smp.c) +zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_BT smp_bt.c) +zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_SHELL smp_shell.c) +zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_UART smp_uart.c) +zephyr_library_sources_ifdef(CONFIG_MCUMGR_SMP_UDP smp_udp.c) +zephyr_library_link_libraries(MCUMGR) + +if (CONFIG_MCUMGR_SMP_SHELL OR CONFIG_MCUMGR_SMP_UART) + zephyr_library_sources(serial_util.c) +endif () diff --git a/subsys/mgmt/mcumgr/Kconfig b/subsys/mgmt/mcumgr/Kconfig new file mode 100644 index 0000000000..f88274a0b3 --- /dev/null +++ b/subsys/mgmt/mcumgr/Kconfig @@ -0,0 +1,160 @@ +# mcumgr configuration options + +# Copyright Runtime.io 2018. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +menu "MCUMgr" + +config MCUMGR_SMP_BT + bool "Bluetooth mcumgr SMP transport" + select MCUMGR + select BT + select BT_PERIPHERAL + select BT_GATT_DYNAMIC_DB + help + Enables handling of SMP commands received over Bluetooth. + +config MCUMGR_SMP_BT_AUTHEN + bool "Authenticated requirement for Bluetooth mcumgr SMP transport" + depends on MCUMGR_SMP_BT + select BT_SMP + default y + help + Enables encrypted and authenticated connection requirement to + Bluetooth SMP transport. + +config MCUMGR_SMP_SHELL + bool "Shell mcumgr SMP transport" + select MCUMGR + select SHELL + select SHELL_BACKEND_SERIAL + select BASE64 + help + Enables handling of SMP commands received over shell. This allows + the shell to be use for both mcumgr commands and shell commands. + +config MCUMGR_SMP_SHELL_MTU + int "Shell SMP MTU" + default 256 + depends on MCUMGR_SMP_SHELL + help + Maximum size of SMP frames sent and received over shell. This value + must satisfy the following relation: + MCUMGR_SMP_SHELL_MTU <= MCUMGR_BUF_SIZE + 2 + +config MCUMGR_SMP_UART + bool "UART mcumgr SMP transport" + select MCUMGR + select UART_MCUMGR + select BASE64 + help + Enables handling of SMP commands received over UART. This is a + lightweight alternative to MCUMGR_SMP_SHELL. It allows mcumgr + commands to be received over UART without requiring an additional + thread. + +config MCUMGR_SMP_UART_MTU + int "UART SMP MTU" + default 256 + depends on MCUMGR_SMP_UART + help + Maximum size of SMP frames sent and received over UART, in bytes. + This value must satisfy the following relation: + MCUMGR_SMP_UART_MTU <= MCUMGR_BUF_SIZE + 2 + +source "subsys/mgmt/mcumgr/Kconfig.mcumgr" + +config MCUMGR_SMP_UDP + bool "UDP mcumgr SMP transport" + select MCUMGR + select NETWORKING + select NET_UDP + select NET_SOCKETS + select NET_SOCKETS_POSIX_NAMES + help + Enables handling of SMP commands received over UDP. + Will start a thread for listening on the configured UDP port. + +config MCUMGR_SMP_UDP_IPV4 + bool "UDP SMP using IPv4" + depends on MCUMGR_SMP_UDP + depends on NET_IPV4 + default y + help + Enable SMP UDP using IPv4 addressing. + Can be enabled alongside IPv6 addressing. + +config MCUMGR_SMP_UDP_IPV6 + bool "UDP SMP using IPv6" + depends on MCUMGR_SMP_UDP + depends on NET_IPV6 + help + Enable SMP UDP using IPv6 addressing. + Can be enabled alongside IPv4 addressing. + +config MCUMGR_SMP_UDP_PORT + int "UDP SMP port" + depends on MCUMGR_SMP_UDP + default 1337 + help + UDP port that SMP server will listen for SMP commands on. + +config MCUMGR_SMP_UDP_STACK_SIZE + int "UDP SMP stack size" + depends on MCUMGR_SMP_UDP + default 512 + help + Stack size of the SMP UDP listening thread + +config MCUMGR_SMP_UDP_THREAD_PRIO + int "UDP SMP thread priority" + depends on MCUMGR_SMP_UDP + default 0 + help + Scheduling priority of the SMP UDP listening thread. + +config MCUMGR_SMP_UDP_MTU + int "UDP SMP MTU" + depends on MCUMGR_SMP_UDP + default 1500 + help + Maximum size of SMP frames sent and received over UDP, in bytes. + This value must satisfy the following relation: + MCUMGR_SMP_UDP_MTU <= MCUMGR_BUF_SIZE + SMP msg overhead - address size + where address size is determined by IPv4/IPv6 selection. + +if MCUMGR +config MCUMGR_BUF_COUNT + int "Number of mcumgr buffers" + default 2 if MCUMGR_SMP_UDP + default 4 + help + The number of net_bufs to allocate for mcumgr. These buffers are + used for both requests and responses. + +config MCUMGR_BUF_SIZE + int "Size of each mcumgr buffer" + default 2048 if MCUMGR_SMP_UDP + default 384 + help + The size, in bytes, of each mcumgr buffer. This value must satisfy + the following relation: + MCUMGR_BUF_SIZE >= transport-specific-MTU + transport-overhead + +config MCUMGR_BUF_USER_DATA_SIZE + int "Size of mcumgr buffer user data" + default 24 if MCUMGR_SMP_UDP && MCUMGR_SMP_UDP_IPV6 + default 8 if MCUMGR_SMP_UDP && MCUMGR_SMP_UDP_IPV4 + default 4 + help + The size, in bytes, of user data to allocate for each mcumgr buffer. + + Different mcumgr transports impose different requirements for this + setting. A value of 4 is sufficient for UART, shell, and bluetooth. + For UDP, the userdata must be large enough to hold a IPv4/IPv6 address. + + Note that CONFIG_NET_BUF_USER_DATA_SIZE must be at least as big as + MCUMGR_BUF_USER_DATA_SIZE. + +endif # MCUMGR +endmenu diff --git a/subsys/mgmt/Kconfig.mcumgr b/subsys/mgmt/mcumgr/Kconfig.mcumgr similarity index 100% rename from subsys/mgmt/Kconfig.mcumgr rename to subsys/mgmt/mcumgr/Kconfig.mcumgr diff --git a/subsys/mgmt/buf.c b/subsys/mgmt/mcumgr/buf.c similarity index 99% rename from subsys/mgmt/buf.c rename to subsys/mgmt/mcumgr/buf.c index d7f0d1d7f3..e615a482c4 100644 --- a/subsys/mgmt/buf.c +++ b/subsys/mgmt/mcumgr/buf.c @@ -7,7 +7,7 @@ #include #include #include "net/buf.h" -#include "mgmt/buf.h" +#include "mgmt/mcumgr/buf.h" #include NET_BUF_POOL_DEFINE(pkt_pool, CONFIG_MCUMGR_BUF_COUNT, CONFIG_MCUMGR_BUF_SIZE, diff --git a/subsys/mgmt/serial_util.c b/subsys/mgmt/mcumgr/serial_util.c similarity index 99% rename from subsys/mgmt/serial_util.c rename to subsys/mgmt/mcumgr/serial_util.c index 23aef5b232..ba3848eee2 100644 --- a/subsys/mgmt/serial_util.c +++ b/subsys/mgmt/mcumgr/serial_util.c @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include static void mcumgr_serial_free_rx_ctxt(struct mcumgr_serial_rx_ctxt *rx_ctxt) { diff --git a/subsys/mgmt/smp.c b/subsys/mgmt/mcumgr/smp.c similarity index 99% rename from subsys/mgmt/smp.c rename to subsys/mgmt/mcumgr/smp.c index 492afe7628..4104426111 100644 --- a/subsys/mgmt/smp.c +++ b/subsys/mgmt/mcumgr/smp.c @@ -7,9 +7,9 @@ #include #include "net/buf.h" #include "mgmt/mgmt.h" -#include "mgmt/buf.h" +#include "mgmt/mcumgr/buf.h" #include "smp/smp.h" -#include "mgmt/smp.h" +#include "mgmt/mcumgr/smp.h" static mgmt_alloc_rsp_fn zephyr_smp_alloc_rsp; static mgmt_trim_front_fn zephyr_smp_trim_front; diff --git a/subsys/mgmt/smp_bt.c b/subsys/mgmt/mcumgr/smp_bt.c similarity index 97% rename from subsys/mgmt/smp_bt.c rename to subsys/mgmt/mcumgr/smp_bt.c index 8cb33e0251..8eb94d19bd 100644 --- a/subsys/mgmt/smp_bt.c +++ b/subsys/mgmt/mcumgr/smp_bt.c @@ -16,10 +16,10 @@ #include #include -#include -#include +#include +#include -#include +#include struct device; diff --git a/subsys/mgmt/smp_shell.c b/subsys/mgmt/mcumgr/smp_shell.c similarity index 97% rename from subsys/mgmt/smp_shell.c rename to subsys/mgmt/mcumgr/smp_shell.c index 3b69368153..487ed026a9 100644 --- a/subsys/mgmt/smp_shell.c +++ b/subsys/mgmt/mcumgr/smp_shell.c @@ -13,10 +13,10 @@ #include #include "net/buf.h" #include "mgmt/mgmt.h" -#include "mgmt/serial.h" -#include "mgmt/buf.h" -#include "mgmt/smp.h" -#include "mgmt/smp_shell.h" +#include "mgmt/mcumgr/serial.h" +#include "mgmt/mcumgr/buf.h" +#include "mgmt/mcumgr/smp.h" +#include "mgmt/mcumgr/smp_shell.h" static struct zephyr_smp_transport smp_shell_transport; diff --git a/subsys/mgmt/smp_uart.c b/subsys/mgmt/mcumgr/smp_uart.c similarity index 96% rename from subsys/mgmt/smp_uart.c rename to subsys/mgmt/mcumgr/smp_uart.c index 2262ccf277..3ddf1e857e 100644 --- a/subsys/mgmt/smp_uart.c +++ b/subsys/mgmt/mcumgr/smp_uart.c @@ -14,9 +14,9 @@ #include "net/buf.h" #include #include "mgmt/mgmt.h" -#include -#include "mgmt/buf.h" -#include "mgmt/smp.h" +#include +#include "mgmt/mcumgr/buf.h" +#include "mgmt/mcumgr/smp.h" struct device; diff --git a/subsys/mgmt/smp_udp.c b/subsys/mgmt/mcumgr/smp_udp.c similarity index 98% rename from subsys/mgmt/smp_udp.c rename to subsys/mgmt/mcumgr/smp_udp.c index f8a40e23fb..744add4ad7 100644 --- a/subsys/mgmt/smp_udp.c +++ b/subsys/mgmt/mcumgr/smp_udp.c @@ -14,9 +14,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #define LOG_LEVEL CONFIG_MCUMGR_LOG_LEVEL #include