From b964db6f11e59c974d2ccedfde440815d771b1c0 Mon Sep 17 00:00:00 2001 From: Zhangwx Date: Thu, 13 Jul 2023 01:06:22 +0800 Subject: [PATCH] [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. --- src/lib/spinel/radio_spinel_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/spinel/radio_spinel_impl.hpp b/src/lib/spinel/radio_spinel_impl.hpp index 02898e5a7..4d4fa06c5 100644 --- a/src/lib/spinel/radio_spinel_impl.hpp +++ b/src/lib/spinel/radio_spinel_impl.hpp @@ -1500,7 +1500,7 @@ template otError RadioSpinel::WaitRespon { HandleRcpTimeout(); } - ExitNow(mError = OT_ERROR_NONE); + ExitNow(mError = OT_ERROR_RESPONSE_TIMEOUT); } } while (mWaitingTid || !mIsReady);