drivers: modem: hl7800: Fix generation of FOTA complete event

FOTA complete event is now generated and can be used by application.

Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
This commit is contained in:
Andrew Hedin 2021-08-12 09:03:44 -05:00 committed by Anas Nashif
commit 6fb6533a48

View file

@ -3669,7 +3669,11 @@ static void modem_reset(void)
set_network_state(HL7800_NOT_REGISTERED);
set_startup_state(HL7800_STARTUP_STATE_UNKNOWN);
#ifdef CONFIG_MODEM_HL7800_FW_UPDATE
set_fota_state(HL7800_FOTA_IDLE);
if (ictx.fw_update_state == HL7800_FOTA_REBOOT_AND_RECONFIGURE) {
set_fota_state(HL7800_FOTA_COMPLETE);
} else {
set_fota_state(HL7800_FOTA_IDLE);
}
#endif
k_sem_reset(&ictx.mdm_awake);
}
@ -4111,12 +4115,6 @@ int32_t mdm_hl7800_reset(void)
ret = modem_reset_and_configure();
#ifdef CONFIG_MODEM_HL7800_FW_UPDATE
if (ictx.fw_update_state == HL7800_FOTA_REBOOT_AND_RECONFIGURE) {
set_fota_state(HL7800_FOTA_COMPLETE);
}
#endif
hl7800_unlock();
return ret;