Skip to content

Commit

Permalink
[spinel] fix set rx on when idle for RCP (openthread#9812)
Browse files Browse the repository at this point in the history
In openthread#9554, a new radio capability is introduced: `RX_ON_WHEN_IDLE`. On
the RCP scenario, if recoverd, there will be an error:
```
OPENTHREAD:[W] P-RadioSpinel-: Error processing result: NotImplemented
OPENTHREAD:[W] P-RadioSpinel-: Error waiting response: NotImplemented
```

When set the rx on when idle on Host to RCP, no `Set property handler`
will be found due to the target handler was surround by the macro
`OPENTHREAD_MTD || OPENTHREAD_FTD`. This `rx on when idle` capability
should not only be used for MTD and FTD, but also used for RADIO on a
NCP. This PR fixes it.
  • Loading branch information
zwx1995esp committed Jan 30, 2024
1 parent c73829f commit bdb5807
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ncp/ncp_base_dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ NcpBase::PropertyHandler NcpBase::FindSetPropertyHandler(spinel_prop_key_t aKey)
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_MAC_PROMISCUOUS_MODE),
#if OPENTHREAD_MTD || OPENTHREAD_FTD
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_MAC_DATA_POLL_PERIOD),
#endif
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_MAC_RX_ON_WHEN_IDLE_MODE),
#if OPENTHREAD_MTD || OPENTHREAD_FTD
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_NET_IF_UP),
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_NET_STACK_UP),
OT_NCP_SET_HANDLER_ENTRY(SPINEL_PROP_NET_ROLE),
Expand Down

0 comments on commit bdb5807

Please sign in to comment.