[spinel] fix error code when waiting rcp response timeout (#9278)

For the RCP waiting response timeout handle logic, the error code of
processing `WaitResponse()` will be checked, if there is no error, the
function `ResetRcp` will return with a log "Software reset RCP
successfully". But the implementation of the `WaitResponse` it will
always return OT_ERROR_NONE even if waiting response timeout.

This commit returns `OT_ERROR_RESPONSE_TIMEOUT` on response timeout.
This commit is contained in:
Zhangwx
2023-07-12 10:06:22 -07:00
committed by GitHub
parent ec93c24007
commit b964db6f11
+1 -1
View File
@@ -1500,7 +1500,7 @@ template <typename InterfaceType> otError RadioSpinel<InterfaceType>::WaitRespon
{
HandleRcpTimeout();
}
ExitNow(mError = OT_ERROR_NONE);
ExitNow(mError = OT_ERROR_RESPONSE_TIMEOUT);
}
} while (mWaitingTid || !mIsReady);