Skip to content

Commit 1c14a4b

Browse files
rerickson1cfriedt
authored andcommitted
modem: hl7800: reconfig IP connection on startup
For low power operation, set the IP connection reconfig flag when receiving a startup report. This will ensure the GPRS connection is reconfigured before any socket operations take place. Signed-off-by: Ryan Erickson <[email protected]>
1 parent ac751b7 commit 1c14a4b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/modem/hl7800.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,9 @@ static int modem_boot_handler(char *reason);
554554
static void mdm_vgpio_work_cb(struct k_work *item);
555555
static void mdm_reset_work_callback(struct k_work *item);
556556
static int write_apn(char *access_point_name);
557+
#ifdef CONFIG_MODEM_HL7800_LOW_POWER_MODE
558+
static void mark_sockets_for_reconfig(void);
559+
#endif
557560

558561
#ifdef CONFIG_MODEM_HL7800_FW_UPDATE
559562
static char *get_fota_state_string(enum mdm_hl7800_fota_state state);
@@ -2049,6 +2052,10 @@ static bool on_cmd_startup_report(struct net_buf **buf, uint16_t len)
20492052
PRINT_AWAKE_MSG;
20502053
ictx.wait_for_KSUP = false;
20512054
ictx.mdm_startup_reporting_on = true;
2055+
ictx.reconfig_IP_connection = true;
2056+
#ifdef CONFIG_MODEM_HL7800_LOW_POWER_MODE
2057+
mark_sockets_for_reconfig();
2058+
#endif
20522059
set_sleep_state(HL7800_SLEEP_STATE_AWAKE);
20532060
k_sem_give(&ictx.mdm_awake);
20542061
}

0 commit comments

Comments
 (0)