From 0b3008fca4ba699fc12ea711fae64c3abc1d56cf Mon Sep 17 00:00:00 2001 From: Tan Yan Quan Date: Fri, 20 Mar 2026 10:46:48 +0800 Subject: [PATCH] fix(openthread): add ifndef guards to ftd / mtd config --- .../private_include/openthread-core-esp32x-ftd-config.h | 8 ++++++++ .../private_include/openthread-core-esp32x-mtd-config.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h index 2c9b84e818..82d474aff8 100644 --- a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h @@ -913,7 +913,9 @@ * * Define to 1 if you want to make MAC keys exportable. */ +#ifndef OPENTHREAD_CONFIG_PLATFORM_MAC_KEYS_EXPORTABLE_ENABLE #define OPENTHREAD_CONFIG_PLATFORM_MAC_KEYS_EXPORTABLE_ENABLE 1 +#endif /** * @def OPENTHREAD_CONFIG_CRYPTO_LIB @@ -925,16 +927,22 @@ * - @sa OPENTHREAD_CONFIG_CRYPTO_LIB_PSA * - @sa OPENTHREAD_CONFIG_CRYPTO_LIB_PLATFORM */ +#ifndef OPENTHREAD_CONFIG_CRYPTO_LIB #define OPENTHREAD_CONFIG_CRYPTO_LIB OPENTHREAD_CONFIG_CRYPTO_LIB_PSA +#endif // TODO: Remove when https://github.com/openthread/openthread/pull/12638 is merged +#ifndef OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE #define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE 1 +#endif /** * @def OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE * * Define as 1 to enable the MeshCoP Steering Data public APIs (in `openthread/steering_data.h`). */ +#ifndef OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE #define OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE 1 +#endif #ifndef OPENTHREAD_CONFIG_THREAD_VERSION #define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4 diff --git a/components/openthread/private_include/openthread-core-esp32x-mtd-config.h b/components/openthread/private_include/openthread-core-esp32x-mtd-config.h index e3279f4314..f631a157d5 100644 --- a/components/openthread/private_include/openthread-core-esp32x-mtd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-mtd-config.h @@ -509,7 +509,9 @@ * * Define to 1 if you want to make MAC keys exportable. */ +#ifndef OPENTHREAD_CONFIG_PLATFORM_MAC_KEYS_EXPORTABLE_ENABLE #define OPENTHREAD_CONFIG_PLATFORM_MAC_KEYS_EXPORTABLE_ENABLE 1 +#endif /** * @def OPENTHREAD_CONFIG_CRYPTO_LIB @@ -521,16 +523,22 @@ * - @sa OPENTHREAD_CONFIG_CRYPTO_LIB_PSA * - @sa OPENTHREAD_CONFIG_CRYPTO_LIB_PLATFORM */ +#ifndef OPENTHREAD_CONFIG_CRYPTO_LIB #define OPENTHREAD_CONFIG_CRYPTO_LIB OPENTHREAD_CONFIG_CRYPTO_LIB_PSA +#endif // TODO: Remove when https://github.com/openthread/openthread/pull/12638 is merged +#ifndef OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE #define OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE 1 +#endif /** * @def OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE * * Define as 1 to enable the MeshCoP Steering Data public APIs (in `openthread/steering_data.h`). */ +#ifndef OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE #define OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE 1 +#endif #ifndef OPENTHREAD_CONFIG_THREAD_VERSION #define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_4