From f42b2461e9afb37807174f316d7905731a8c6cdd Mon Sep 17 00:00:00 2001 From: Eduardo Montoya Date: Tue, 14 Nov 2023 14:57:02 +0100 Subject: [PATCH] net: openthread: implement `otPlatRadioSetRxOnWhenIdle` OpenThread upmerge to commit `193e77e`. Implement `otPlatRadioSetRxOnWhenIdle` radio platform API. Signed-off-by: Eduardo Montoya --- modules/openthread/platform/radio.c | 17 +++++++++++++++++ west.yml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/openthread/platform/radio.c b/modules/openthread/platform/radio.c index 391ffba395dc56c..9c5de3c9d69f71c 100644 --- a/modules/openthread/platform/radio.c +++ b/modules/openthread/platform/radio.c @@ -890,9 +890,26 @@ otRadioCaps otPlatRadioGetCaps(otInstance *aInstance) caps |= OT_RADIO_CAPS_RECEIVE_TIMING; } + if (radio_caps & IEEE802154_RX_ON_WHEN_IDLE) { + caps |= OT_RADIO_CAPS_RX_ON_WHEN_IDLE; + } + return caps; } +void otPlatRadioSetRxOnWhenIdle(otInstance *aInstance, bool aRxOnWhenIdle) +{ + struct ieee802154_config config = { + .rx_on_when_idle = aRxOnWhenIdle + }; + + ARG_UNUSED(aInstance); + + LOG_DBG("RxOnWhenIdle=%d", aRxOnWhenIdle ? 1 : 0); + + radio_api->configure(radio_dev, IEEE802154_CONFIG_RX_ON_WHEN_IDLE, &config); +} + bool otPlatRadioGetPromiscuous(otInstance *aInstance) { ARG_UNUSED(aInstance); diff --git a/west.yml b/west.yml index 639f5566de01a6d..38e21e175028537 100644 --- a/west.yml +++ b/west.yml @@ -301,7 +301,7 @@ manifest: revision: 214f9fc1539f8e5937c0474cb6ee29b6dcb2d4b8 path: modules/lib/open-amp - name: openthread - revision: 6edb06e4e0472411200ce2a084a783eaf3faffe3 + revision: 193e77e40ec2387d458eaebd1e03902d86f484a5 path: modules/lib/openthread - name: percepio path: modules/debug/percepio