Skip to content

Commit

Permalink
[spinel] fix error code when waiting rcp response timeout (#9278)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zwx1995esp committed Jul 12, 2023
1 parent ec93c24 commit b964db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/spinel/radio_spinel_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b964db6

Please sign in to comment.