diff --git a/modules/openthread/platform/alarm.c b/modules/openthread/platform/alarm.c index 3cbf1d033e3..827477d9712 100644 --- a/modules/openthread/platform/alarm.c +++ b/modules/openthread/platform/alarm.c @@ -5,7 +5,7 @@ */ #define LOG_MODULE_NAME net_openthread_alarm -#define LOG_LEVEL CONFIG_OPENTHREAD_LOG_LEVEL +#define LOG_LEVEL CONFIG_OPENTHREAD_PLATFORM_LOG_LEVEL #include LOG_MODULE_REGISTER(LOG_MODULE_NAME); diff --git a/modules/openthread/platform/ble.c b/modules/openthread/platform/ble.c index a2d6cd29af8..1ccb07c2ec3 100644 --- a/modules/openthread/platform/ble.c +++ b/modules/openthread/platform/ble.c @@ -30,7 +30,7 @@ /* Zephyr Logging */ #define LOG_MODULE_NAME net_openthread_tcat -#define LOG_LEVEL CONFIG_OPENTHREAD_LOG_LEVEL +#define LOG_LEVEL CONFIG_OPENTHREAD_PLATFORM_LOG_LEVEL LOG_MODULE_REGISTER(LOG_MODULE_NAME); @@ -476,7 +476,7 @@ otError otPlatBleEnable(otInstance *aInstance) LOG_WRN("BLE enable failed with error code %d", err); return OT_ERROR_FAILED; } else if (err == -EALREADY) { - err = k_sem_take(&ot_plat_ble_init_semaphore, K_MSEC(500)); + bt_conn_cb_register(&conn_callbacks); return OT_ERROR_NONE; } diff --git a/modules/openthread/platform/messagepool.c b/modules/openthread/platform/messagepool.c index cb9a64674c4..c085aeb9a58 100644 --- a/modules/openthread/platform/messagepool.c +++ b/modules/openthread/platform/messagepool.c @@ -10,7 +10,7 @@ #include #define LOG_MODULE_NAME net_otPlat_messagepool -#define LOG_LEVEL CONFIG_OPENTHREAD_LOG_LEVEL +#define LOG_LEVEL CONFIG_OPENTHREAD_PLATFORM_LOG_LEVEL LOG_MODULE_REGISTER(LOG_MODULE_NAME); diff --git a/modules/openthread/platform/uart.c b/modules/openthread/platform/uart.c index ebf156ded15..31afdac6bac 100644 --- a/modules/openthread/platform/uart.c +++ b/modules/openthread/platform/uart.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#define LOG_LEVEL CONFIG_OPENTHREAD_LOG_LEVEL +#define LOG_LEVEL CONFIG_OPENTHREAD_PLATFORM_LOG_LEVEL #define LOG_MODULE_NAME net_otPlat_uart #include diff --git a/subsys/net/l2/openthread/Kconfig b/subsys/net/l2/openthread/Kconfig index 0f3c83ef763..9ff68a5f0c9 100644 --- a/subsys/net/l2/openthread/Kconfig +++ b/subsys/net/l2/openthread/Kconfig @@ -90,6 +90,18 @@ config OPENTHREAD_LOG_LEVEL default 4 if OPENTHREAD_LOG_LEVEL_INFO default 5 if OPENTHREAD_LOG_LEVEL_DEBG default 0 + help + Log level for OpenThread stack. + +config OPENTHREAD_PLATFORM_LOG_LEVEL + int + default 1 if OPENTHREAD_LOG_LEVEL_CRIT + default 2 if OPENTHREAD_LOG_LEVEL_WARN + default 3 if OPENTHREAD_LOG_LEVEL_NOTE || OPENTHREAD_LOG_LEVEL_INFO + default 4 if OPENTHREAD_LOG_LEVEL_DEBG + default 0 + help + Log level for OpenThread Zephyr platform. menuconfig OPENTHREAD_L2_DEBUG bool "OpenThread L2 log support"