modem: hl7800: power off should generate events

When powering off the modem, appropriate state events
should be triggered.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
Ryan Erickson 2024-01-16 12:12:24 -06:00 committed by Benjamin Cabé
parent de83072776
commit 962179286f

View file

@ -5664,6 +5664,9 @@ static void mdm_power_off_work_callback(struct k_work *item)
net_if_carrier_off(iface_ctx.iface);
}
LOG_INF("Modem powered off");
set_sleep_state(HL7800_SLEEP_UNINITIALIZED);
set_network_state(HL7800_NOT_REGISTERED);
set_startup_state(HL7800_STARTUP_STATE_UNKNOWN);
hl7800_unlock();
}