diff --git a/components/esp_phy/lib b/components/esp_phy/lib index d39766d34e..89f0a98c97 160000 --- a/components/esp_phy/lib +++ b/components/esp_phy/lib @@ -1 +1 @@ -Subproject commit d39766d34edf7bf22dddc91d5f45f2b91576a407 +Subproject commit 89f0a98c976ddd7c56056fcdb57fd252b7b3f938 diff --git a/components/openthread/Kconfig b/components/openthread/Kconfig index ac195606a3..03f154d11c 100644 --- a/components/openthread/Kconfig +++ b/components/openthread/Kconfig @@ -201,6 +201,13 @@ menu "OpenThread" help Select this option to enable link metrics feature + config OPENTHREAD_MACFILTER_ENABLE + bool "Enable mac filter feature" + depends on OPENTHREAD_ENABLED + default n + help + Select this option to enable mac filter feature + config OPENTHREAD_CSL_ENABLE bool "Enable CSL feature" depends on OPENTHREAD_ENABLED diff --git a/components/openthread/port/esp_openthread_radio.c b/components/openthread/port/esp_openthread_radio.c index 80f8020f9f..a8616a7fdf 100644 --- a/components/openthread/port/esp_openthread_radio.c +++ b/components/openthread/port/esp_openthread_radio.c @@ -300,7 +300,9 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame) aFrame->mPsdu[-1] = aFrame->mLength; // lenth locates one byte before the psdu (esp_openthread_radio_tx_psdu); if (otMacFrameIsSecurityEnabled(aFrame) && !aFrame->mInfo.mTxInfo.mIsSecurityProcessed) { - otMacFrameSetFrameCounter(aFrame, s_mac_frame_counter++); + if (!s_transmit_frame.mInfo.mTxInfo.mIsARetx) { + otMacFrameSetFrameCounter(aFrame, s_mac_frame_counter++); + } if (otMacFrameIsKeyIdMode1(aFrame)) { s_transmit_frame.mInfo.mTxInfo.mAesKey = &s_current_key; if (!s_transmit_frame.mInfo.mTxInfo.mIsARetx) { 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 040453a84c..2cb8ede33c 100644 --- a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h @@ -408,6 +408,10 @@ #define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 1 #endif +#if CONFIG_OPENTHREAD_MACFILTER_ENABLE +#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1 +#endif + #if CONFIG_OPENTHREAD_JOINER #define OPENTHREAD_CONFIG_JOINER_ENABLE 1 #endif 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 463934f433..7ecfbca1c1 100644 --- a/components/openthread/private_include/openthread-core-esp32x-mtd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-mtd-config.h @@ -212,6 +212,10 @@ #define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 #endif +#if CONFIG_OPENTHREAD_MACFILTER_ENABLE +#define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 1 +#endif // CONFIG_OPENTHREAD_MACFILTER_ENABLE + #if CONFIG_OPENTHREAD_JOINER #define OPENTHREAD_CONFIG_JOINER_ENABLE 0 #endif