Skip to content

Commit

Permalink
[spinel] remove mIsCoprocessorReady flag check (#10144)
Browse files Browse the repository at this point in the history
- If we check in between SendReset() and WaitResponse(),
  mIsCoprocessorReady may become true before waitResponse() and if
  loop becomes false even successfully reset done.
- mIsCoprocessorReady is already checked before sendReset() to avoid
  resetting in case of Mulipan architecture. There is no need to check
  in between sendReset() and waitResponse().
- Removed mIsCoprocessorReady from if loop check between sendReset()
  and waitResponse().

Signed-off-by: Ashishkumar Vara <[email protected]>
  • Loading branch information
aashu216 authored May 2, 2024
1 parent 3517e6c commit f404a22
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/spinel/spinel_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ void SpinelDriver::ResetCoprocessor(bool aSoftwareReset)

mWaitingKey = SPINEL_PROP_LAST_STATUS;

if (aSoftwareReset && (SendReset(SPINEL_RESET_STACK) == OT_ERROR_NONE) && (!mIsCoprocessorReady) &&
(WaitResponse() == OT_ERROR_NONE))
if (aSoftwareReset && (SendReset(SPINEL_RESET_STACK) == OT_ERROR_NONE) && (WaitResponse() == OT_ERROR_NONE))
{
VerifyOrExit(mIsCoprocessorReady, resetDone = false);
LogCrit("Software reset co-processor successfully");
Expand Down

0 comments on commit f404a22

Please sign in to comment.