[spinel] fix set rx on when idle for RCP (#9812)

In #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.
This commit is contained in:
Zhangwx
2024-01-30 11:09:17 -08:00
committed by GitHub
parent c73829fdbf
commit bdb580763b
+2
View File
@@ -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),