mirror of
https://github.com/espressif/openthread.git
synced 2026-08-14 14:47:46 +00:00
[spinel] remove mIsCoprocessorReady flag check (#10144)
- 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]>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user