openthread: return OT_ERROR_BUSY from otPlatRadioSleep during TX - #30802
openthread: return OT_ERROR_BUSY from otPlatRadioSleep during TX#30802edmont wants to merge 1 commit into
Conversation
Align nrf5 radio platform sleep behavior with OpenThread API: reject sleep requests while a Mac-initiated transmission is in progress using OT_ERROR_BUSY instead of OT_ERROR_INVALID_STATE. Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
There was a problem hiding this comment.
Pull request overview
This PR aligns the nRF5 OpenThread radio platform’s otPlatRadioSleep() behavior with the OpenThread API expectation by rejecting sleep requests while a MAC-driven transmission is in progress, returning OT_ERROR_BUSY (instead of OT_ERROR_INVALID_STATE).
Changes:
- Add an early check in
otPlatRadioSleep()to returnOT_ERROR_BUSYwhen the radio state isOT_RADIO_STATE_TRANSMIT. - Preserve existing
OT_ERROR_INVALID_STATEbehavior for other disallowed states.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: ad46909b1a46ecacf8dd1cea11b02e5b222aec6c more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)Outputs:ToolchainVersion: e214c2a47c Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
Align nrf5 radio platform sleep behavior with OpenThread API: reject sleep requests while a Mac-initiated transmission is in progress using OT_ERROR_BUSY instead of OT_ERROR_INVALID_STATE.