From 408703e8dd724d3f330875c091c25e8cab8fb7d7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 9 Jul 2019 10:33:28 +0300 Subject: [PATCH] Bluetooth: Mesh: Move under subsys/bluetooth/mesh We've already got GATT services in subsys/bluetooth/services so subsys/bluetooth/mesh is a more natural place. Aditionally this aims to fix the Kconfig dependencies to be able to use mesh together with BT_CUSTOM (i.e. a custom, potentially non-HCI, host stack). Signed-off-by: Johan Hedberg --- subsys/bluetooth/CMakeLists.txt | 1 + subsys/bluetooth/Kconfig | 2 ++ subsys/bluetooth/host/CMakeLists.txt | 2 -- subsys/bluetooth/host/Kconfig | 2 -- subsys/bluetooth/{host => }/mesh/CMakeLists.txt | 0 subsys/bluetooth/{host => }/mesh/Kconfig | 0 subsys/bluetooth/{host => }/mesh/TODO | 0 subsys/bluetooth/{host => }/mesh/access.c | 0 subsys/bluetooth/{host => }/mesh/access.h | 0 subsys/bluetooth/{host => }/mesh/adv.c | 2 +- subsys/bluetooth/{host => }/mesh/adv.h | 0 subsys/bluetooth/{host => }/mesh/beacon.c | 0 subsys/bluetooth/{host => }/mesh/beacon.h | 0 subsys/bluetooth/{host => }/mesh/cfg_cli.c | 0 subsys/bluetooth/{host => }/mesh/cfg_srv.c | 2 +- subsys/bluetooth/{host => }/mesh/crypto.c | 0 subsys/bluetooth/{host => }/mesh/crypto.h | 0 subsys/bluetooth/{host => }/mesh/foundation.h | 0 subsys/bluetooth/{host => }/mesh/friend.c | 0 subsys/bluetooth/{host => }/mesh/friend.h | 0 subsys/bluetooth/{host => }/mesh/health_cli.c | 0 subsys/bluetooth/{host => }/mesh/health_srv.c | 0 subsys/bluetooth/{host => }/mesh/lpn.c | 0 subsys/bluetooth/{host => }/mesh/lpn.h | 0 subsys/bluetooth/{host => }/mesh/main.c | 0 subsys/bluetooth/{host => }/mesh/mesh.h | 0 subsys/bluetooth/{host => }/mesh/net.c | 0 subsys/bluetooth/{host => }/mesh/net.h | 0 subsys/bluetooth/{host => }/mesh/prov.c | 4 ++-- subsys/bluetooth/{host => }/mesh/prov.h | 0 subsys/bluetooth/{host => }/mesh/proxy.c | 0 subsys/bluetooth/{host => }/mesh/proxy.h | 0 subsys/bluetooth/{host => }/mesh/settings.c | 0 subsys/bluetooth/{host => }/mesh/settings.h | 0 subsys/bluetooth/{host => }/mesh/shell.c | 0 subsys/bluetooth/{host => }/mesh/test.c | 0 subsys/bluetooth/{host => }/mesh/test.h | 0 subsys/bluetooth/{host => }/mesh/transport.c | 2 +- subsys/bluetooth/{host => }/mesh/transport.h | 0 39 files changed, 8 insertions(+), 9 deletions(-) rename subsys/bluetooth/{host => }/mesh/CMakeLists.txt (100%) rename subsys/bluetooth/{host => }/mesh/Kconfig (100%) rename subsys/bluetooth/{host => }/mesh/TODO (100%) rename subsys/bluetooth/{host => }/mesh/access.c (100%) rename subsys/bluetooth/{host => }/mesh/access.h (100%) rename subsys/bluetooth/{host => }/mesh/adv.c (99%) rename subsys/bluetooth/{host => }/mesh/adv.h (100%) rename subsys/bluetooth/{host => }/mesh/beacon.c (100%) rename subsys/bluetooth/{host => }/mesh/beacon.h (100%) rename subsys/bluetooth/{host => }/mesh/cfg_cli.c (100%) rename subsys/bluetooth/{host => }/mesh/cfg_srv.c (99%) rename subsys/bluetooth/{host => }/mesh/crypto.c (100%) rename subsys/bluetooth/{host => }/mesh/crypto.h (100%) rename subsys/bluetooth/{host => }/mesh/foundation.h (100%) rename subsys/bluetooth/{host => }/mesh/friend.c (100%) rename subsys/bluetooth/{host => }/mesh/friend.h (100%) rename subsys/bluetooth/{host => }/mesh/health_cli.c (100%) rename subsys/bluetooth/{host => }/mesh/health_srv.c (100%) rename subsys/bluetooth/{host => }/mesh/lpn.c (100%) rename subsys/bluetooth/{host => }/mesh/lpn.h (100%) rename subsys/bluetooth/{host => }/mesh/main.c (100%) rename subsys/bluetooth/{host => }/mesh/mesh.h (100%) rename subsys/bluetooth/{host => }/mesh/net.c (100%) rename subsys/bluetooth/{host => }/mesh/net.h (100%) rename subsys/bluetooth/{host => }/mesh/prov.c (99%) rename subsys/bluetooth/{host => }/mesh/prov.h (100%) rename subsys/bluetooth/{host => }/mesh/proxy.c (100%) rename subsys/bluetooth/{host => }/mesh/proxy.h (100%) rename subsys/bluetooth/{host => }/mesh/settings.c (100%) rename subsys/bluetooth/{host => }/mesh/settings.h (100%) rename subsys/bluetooth/{host => }/mesh/shell.c (100%) rename subsys/bluetooth/{host => }/mesh/test.c (100%) rename subsys/bluetooth/{host => }/mesh/test.h (100%) rename subsys/bluetooth/{host => }/mesh/transport.c (99%) rename subsys/bluetooth/{host => }/mesh/transport.h (100%) diff --git a/subsys/bluetooth/CMakeLists.txt b/subsys/bluetooth/CMakeLists.txt index d9ae7823255..b8f01aa01c1 100644 --- a/subsys/bluetooth/CMakeLists.txt +++ b/subsys/bluetooth/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory(common) add_subdirectory_ifdef(CONFIG_BT_HCI host) add_subdirectory_ifdef(CONFIG_BT_SHELL shell) add_subdirectory_ifdef(CONFIG_BT_CONN services) +add_subdirectory_ifdef(CONFIG_BT_MESH mesh) if(CONFIG_BT_CTLR) if(CONFIG_BT_LL_SW OR CONFIG_BT_LL_SW_SPLIT) diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig index 7c43387d299..dd4188c81e8 100644 --- a/subsys/bluetooth/Kconfig +++ b/subsys/bluetooth/Kconfig @@ -145,4 +145,6 @@ source "subsys/bluetooth/shell/Kconfig" endif # BT_HCI +source "subsys/bluetooth/mesh/Kconfig" + endif # BT diff --git a/subsys/bluetooth/host/CMakeLists.txt b/subsys/bluetooth/host/CMakeLists.txt index 9930fc095eb..5edfb9491b8 100644 --- a/subsys/bluetooth/host/CMakeLists.txt +++ b/subsys/bluetooth/host/CMakeLists.txt @@ -55,5 +55,3 @@ if(CONFIG_BT_HCI_HOST) endif() endif() endif() - -add_subdirectory_ifdef(CONFIG_BT_MESH mesh) diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index 9b5884f18a7..3f0b9ceddbd 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -135,8 +135,6 @@ config BT_RX_PRIO if BT_HCI_HOST -source "subsys/bluetooth/host/mesh/Kconfig" - config BT_HOST_CRYPTO # Hidden option that compiles in random number generation and AES # encryption support using TinyCrypt library if this is not provided diff --git a/subsys/bluetooth/host/mesh/CMakeLists.txt b/subsys/bluetooth/mesh/CMakeLists.txt similarity index 100% rename from subsys/bluetooth/host/mesh/CMakeLists.txt rename to subsys/bluetooth/mesh/CMakeLists.txt diff --git a/subsys/bluetooth/host/mesh/Kconfig b/subsys/bluetooth/mesh/Kconfig similarity index 100% rename from subsys/bluetooth/host/mesh/Kconfig rename to subsys/bluetooth/mesh/Kconfig diff --git a/subsys/bluetooth/host/mesh/TODO b/subsys/bluetooth/mesh/TODO similarity index 100% rename from subsys/bluetooth/host/mesh/TODO rename to subsys/bluetooth/mesh/TODO diff --git a/subsys/bluetooth/host/mesh/access.c b/subsys/bluetooth/mesh/access.c similarity index 100% rename from subsys/bluetooth/host/mesh/access.c rename to subsys/bluetooth/mesh/access.c diff --git a/subsys/bluetooth/host/mesh/access.h b/subsys/bluetooth/mesh/access.h similarity index 100% rename from subsys/bluetooth/host/mesh/access.h rename to subsys/bluetooth/mesh/access.h diff --git a/subsys/bluetooth/host/mesh/adv.c b/subsys/bluetooth/mesh/adv.c similarity index 99% rename from subsys/bluetooth/host/mesh/adv.c rename to subsys/bluetooth/mesh/adv.c index 84adbe6b0ad..2b25a1d87b9 100644 --- a/subsys/bluetooth/host/mesh/adv.c +++ b/subsys/bluetooth/mesh/adv.c @@ -21,7 +21,7 @@ #define LOG_MODULE_NAME bt_mesh_adv #include "common/log.h" -#include "../hci_core.h" +#include "host/hci_core.h" #include "adv.h" #include "net.h" diff --git a/subsys/bluetooth/host/mesh/adv.h b/subsys/bluetooth/mesh/adv.h similarity index 100% rename from subsys/bluetooth/host/mesh/adv.h rename to subsys/bluetooth/mesh/adv.h diff --git a/subsys/bluetooth/host/mesh/beacon.c b/subsys/bluetooth/mesh/beacon.c similarity index 100% rename from subsys/bluetooth/host/mesh/beacon.c rename to subsys/bluetooth/mesh/beacon.c diff --git a/subsys/bluetooth/host/mesh/beacon.h b/subsys/bluetooth/mesh/beacon.h similarity index 100% rename from subsys/bluetooth/host/mesh/beacon.h rename to subsys/bluetooth/mesh/beacon.h diff --git a/subsys/bluetooth/host/mesh/cfg_cli.c b/subsys/bluetooth/mesh/cfg_cli.c similarity index 100% rename from subsys/bluetooth/host/mesh/cfg_cli.c rename to subsys/bluetooth/mesh/cfg_cli.c diff --git a/subsys/bluetooth/host/mesh/cfg_srv.c b/subsys/bluetooth/mesh/cfg_srv.c similarity index 99% rename from subsys/bluetooth/host/mesh/cfg_srv.c rename to subsys/bluetooth/mesh/cfg_srv.c index 893e34aa9b8..dd9ed8e5f88 100644 --- a/subsys/bluetooth/host/mesh/cfg_srv.c +++ b/subsys/bluetooth/mesh/cfg_srv.c @@ -22,7 +22,7 @@ #define LOG_MODULE_NAME bt_mesh_cfg_srv #include "common/log.h" -#include "../testing.h" +#include "host/testing.h" #include "mesh.h" #include "adv.h" diff --git a/subsys/bluetooth/host/mesh/crypto.c b/subsys/bluetooth/mesh/crypto.c similarity index 100% rename from subsys/bluetooth/host/mesh/crypto.c rename to subsys/bluetooth/mesh/crypto.c diff --git a/subsys/bluetooth/host/mesh/crypto.h b/subsys/bluetooth/mesh/crypto.h similarity index 100% rename from subsys/bluetooth/host/mesh/crypto.h rename to subsys/bluetooth/mesh/crypto.h diff --git a/subsys/bluetooth/host/mesh/foundation.h b/subsys/bluetooth/mesh/foundation.h similarity index 100% rename from subsys/bluetooth/host/mesh/foundation.h rename to subsys/bluetooth/mesh/foundation.h diff --git a/subsys/bluetooth/host/mesh/friend.c b/subsys/bluetooth/mesh/friend.c similarity index 100% rename from subsys/bluetooth/host/mesh/friend.c rename to subsys/bluetooth/mesh/friend.c diff --git a/subsys/bluetooth/host/mesh/friend.h b/subsys/bluetooth/mesh/friend.h similarity index 100% rename from subsys/bluetooth/host/mesh/friend.h rename to subsys/bluetooth/mesh/friend.h diff --git a/subsys/bluetooth/host/mesh/health_cli.c b/subsys/bluetooth/mesh/health_cli.c similarity index 100% rename from subsys/bluetooth/host/mesh/health_cli.c rename to subsys/bluetooth/mesh/health_cli.c diff --git a/subsys/bluetooth/host/mesh/health_srv.c b/subsys/bluetooth/mesh/health_srv.c similarity index 100% rename from subsys/bluetooth/host/mesh/health_srv.c rename to subsys/bluetooth/mesh/health_srv.c diff --git a/subsys/bluetooth/host/mesh/lpn.c b/subsys/bluetooth/mesh/lpn.c similarity index 100% rename from subsys/bluetooth/host/mesh/lpn.c rename to subsys/bluetooth/mesh/lpn.c diff --git a/subsys/bluetooth/host/mesh/lpn.h b/subsys/bluetooth/mesh/lpn.h similarity index 100% rename from subsys/bluetooth/host/mesh/lpn.h rename to subsys/bluetooth/mesh/lpn.h diff --git a/subsys/bluetooth/host/mesh/main.c b/subsys/bluetooth/mesh/main.c similarity index 100% rename from subsys/bluetooth/host/mesh/main.c rename to subsys/bluetooth/mesh/main.c diff --git a/subsys/bluetooth/host/mesh/mesh.h b/subsys/bluetooth/mesh/mesh.h similarity index 100% rename from subsys/bluetooth/host/mesh/mesh.h rename to subsys/bluetooth/mesh/mesh.h diff --git a/subsys/bluetooth/host/mesh/net.c b/subsys/bluetooth/mesh/net.c similarity index 100% rename from subsys/bluetooth/host/mesh/net.c rename to subsys/bluetooth/mesh/net.c diff --git a/subsys/bluetooth/host/mesh/net.h b/subsys/bluetooth/mesh/net.h similarity index 100% rename from subsys/bluetooth/host/mesh/net.h rename to subsys/bluetooth/mesh/net.h diff --git a/subsys/bluetooth/host/mesh/prov.c b/subsys/bluetooth/mesh/prov.c similarity index 99% rename from subsys/bluetooth/host/mesh/prov.c rename to subsys/bluetooth/mesh/prov.c index db6e7f5e0f8..1816a17d6ea 100644 --- a/subsys/bluetooth/host/mesh/prov.c +++ b/subsys/bluetooth/mesh/prov.c @@ -22,8 +22,8 @@ #define LOG_MODULE_NAME bt_mesh_prov #include "common/log.h" -#include "../ecc.h" -#include "../testing.h" +#include "host/ecc.h" +#include "host/testing.h" #include "crypto.h" #include "adv.h" diff --git a/subsys/bluetooth/host/mesh/prov.h b/subsys/bluetooth/mesh/prov.h similarity index 100% rename from subsys/bluetooth/host/mesh/prov.h rename to subsys/bluetooth/mesh/prov.h diff --git a/subsys/bluetooth/host/mesh/proxy.c b/subsys/bluetooth/mesh/proxy.c similarity index 100% rename from subsys/bluetooth/host/mesh/proxy.c rename to subsys/bluetooth/mesh/proxy.c diff --git a/subsys/bluetooth/host/mesh/proxy.h b/subsys/bluetooth/mesh/proxy.h similarity index 100% rename from subsys/bluetooth/host/mesh/proxy.h rename to subsys/bluetooth/mesh/proxy.h diff --git a/subsys/bluetooth/host/mesh/settings.c b/subsys/bluetooth/mesh/settings.c similarity index 100% rename from subsys/bluetooth/host/mesh/settings.c rename to subsys/bluetooth/mesh/settings.c diff --git a/subsys/bluetooth/host/mesh/settings.h b/subsys/bluetooth/mesh/settings.h similarity index 100% rename from subsys/bluetooth/host/mesh/settings.h rename to subsys/bluetooth/mesh/settings.h diff --git a/subsys/bluetooth/host/mesh/shell.c b/subsys/bluetooth/mesh/shell.c similarity index 100% rename from subsys/bluetooth/host/mesh/shell.c rename to subsys/bluetooth/mesh/shell.c diff --git a/subsys/bluetooth/host/mesh/test.c b/subsys/bluetooth/mesh/test.c similarity index 100% rename from subsys/bluetooth/host/mesh/test.c rename to subsys/bluetooth/mesh/test.c diff --git a/subsys/bluetooth/host/mesh/test.h b/subsys/bluetooth/mesh/test.h similarity index 100% rename from subsys/bluetooth/host/mesh/test.h rename to subsys/bluetooth/mesh/test.h diff --git a/subsys/bluetooth/host/mesh/transport.c b/subsys/bluetooth/mesh/transport.c similarity index 99% rename from subsys/bluetooth/host/mesh/transport.c rename to subsys/bluetooth/mesh/transport.c index 75255222ef0..91f84b99bad 100644 --- a/subsys/bluetooth/host/mesh/transport.c +++ b/subsys/bluetooth/mesh/transport.c @@ -22,7 +22,7 @@ #define LOG_MODULE_NAME bt_mesh_transport #include "common/log.h" -#include "../testing.h" +#include "host/testing.h" #include "crypto.h" #include "adv.h" diff --git a/subsys/bluetooth/host/mesh/transport.h b/subsys/bluetooth/mesh/transport.h similarity index 100% rename from subsys/bluetooth/host/mesh/transport.h rename to subsys/bluetooth/mesh/transport.h