From e666bc0ab114f8d37255c5ff82185fbe5ec64c16 Mon Sep 17 00:00:00 2001 From: senthilku Date: Fri, 29 Nov 2024 22:25:58 +0530 Subject: [PATCH] [SL-UP] Updating the firmware upgrade status for SoC (#136) --- src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp index 91fed19522..3829cb1db5 100644 --- a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp +++ b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp @@ -39,7 +39,6 @@ extern "C" { #define RPS_HEADER 1 #define RPS_DATA 2 -#define SL_STATUS_FW_UPDATE_DONE SL_STATUS_SI91X_NO_AP_FOUND uint8_t flag = RPS_HEADER; static chip::OTAImageProcessorImpl gImageProcessor; @@ -185,13 +184,13 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) if (status != SL_STATUS_OK) { - if (status == SL_STATUS_FW_UPDATE_DONE) + if (status == SL_STATUS_SI91X_FW_UPDATE_DONE) { mReset = true; } else { - ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error %ld", status); + ChipLogError(SoftwareUpdate, "ERROR: In HandleFinalize for last chunk sl_si91x_fwup_load() error 0x%lx", status); imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); return; } @@ -302,13 +301,13 @@ void OTAImageProcessorImpl::HandleProcessBlock(intptr_t context) { // If the last chunk of last block-writeBufOffset length is exactly kAlignmentBytes(64) bytes then mReset value // should be set to true in HandleProcessBlock - if (status == SL_STATUS_FW_UPDATE_DONE) + if (status == SL_STATUS_SI91X_FW_UPDATE_DONE) { mReset = true; } else { - ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error %ld", status); + ChipLogError(SoftwareUpdate, "ERROR: In HandleProcessBlock sl_si91x_fwup_load() error 0x%lx", status); imageProcessor->mDownloader->EndDownload(CHIP_ERROR_WRITE_FAILED); return; }