[log] add log to record the RCP restoration state (#7743)

This commit is contained in:
Zhanglong Xia
2022-06-02 13:58:36 -07:00
committed by GitHub
parent 9bb09e74e2
commit e83ecab395
+3 -9
View File
@@ -1671,18 +1671,11 @@ otError RadioSpinel<InterfaceType, ProcessContextType>::WaitResponse(void)
do
{
uint64_t now;
uint64_t remain;
now = otPlatTimeGet();
if (end <= now)
{
HandleRcpTimeout();
ExitNow(mError = OT_ERROR_NONE);
}
remain = end - now;
if (mSpinelInterface.WaitForFrame(remain) != OT_ERROR_NONE)
if ((end <= now) || (mSpinelInterface.WaitForFrame(end - now) != OT_ERROR_NONE))
{
otLogWarnPlat("Wait for response timeout");
HandleRcpTimeout();
ExitNow(mError = OT_ERROR_NONE);
}
@@ -2309,6 +2302,7 @@ void RadioSpinel<InterfaceType, ProcessContextType>::RecoverFromRcpFailure(void)
}
--mRcpFailureCount;
otLogNotePlat("RCP recovery is done");
exit:
return;