[spinel] only request crash logs on RCP recovery if capable (#10213)

During RCP recovery, the Host does not check if the RCP supports
logging a crash dump. This causes RCP recovery to fail when the RCP is
built with `OPENTHREAD_CONFIG_PLATFORM_LOG_CRASH_DUMP_ENABLE =
0`. This bug was introduced in #10061

This commit will make the Host only request crash logs from the RCP if
the RCP supports it.
This commit is contained in:
Mason Tran
2024-05-09 07:39:19 -07:00
committed by GitHub
parent 74573b5d3f
commit 0b114821d9
+5 -1
View File
@@ -2002,7 +2002,11 @@ void RadioSpinel::RecoverFromRcpFailure(void)
--mRcpFailureCount;
SuccessOrDie(Set(SPINEL_PROP_RCP_LOG_CRASH_DUMP, nullptr));
if (sSupportsLogCrashDump)
{
LogDebg("RCP supports crash dump logging. Requesting crash dump.");
SuccessOrDie(Set(SPINEL_PROP_RCP_LOG_CRASH_DUMP, nullptr));
}
LogNote("RCP recovery is done");