From ae0ff8881886a49df72f02255d5bf7dd4202888a Mon Sep 17 00:00:00 2001 From: zwx Date: Thu, 9 Jul 2026 20:22:03 +0800 Subject: [PATCH] fix(openthread): fix otPlatRadioEnableSrcMatch() ignoring aEnable=false --- components/openthread/src/port/esp_openthread_radio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/openthread/src/port/esp_openthread_radio.c b/components/openthread/src/port/esp_openthread_radio.c index 13b8a1fccd2..fa25a6311e3 100644 --- a/components/openthread/src/port/esp_openthread_radio.c +++ b/components/openthread/src/port/esp_openthread_radio.c @@ -403,11 +403,15 @@ bool otPlatRadioGetPromiscuous(otInstance *aInstance) void otPlatRadioEnableSrcMatch(otInstance *aInstance, bool aEnable) { + if (aEnable) { #if OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 - esp_ieee802154_set_pending_mode(ESP_IEEE802154_AUTO_PENDING_ENHANCED); + esp_ieee802154_set_pending_mode(ESP_IEEE802154_AUTO_PENDING_ENHANCED); #else - esp_ieee802154_set_pending_mode(ESP_IEEE802154_AUTO_PENDING_ENABLE); + esp_ieee802154_set_pending_mode(ESP_IEEE802154_AUTO_PENDING_ENABLE); #endif // OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2 + } else { + esp_ieee802154_set_pending_mode(ESP_IEEE802154_AUTO_PENDING_DISABLE); + } } otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, uint16_t aShortAddress)