broadband-modem-mbim: assume no lock is required in eSIM without profiles

This commit is contained in:
Aleksander Morgado
2022-05-20 12:32:18 +02:00
parent 1ad5526972
commit eee6e46d4e

View File

@@ -1585,8 +1585,7 @@ unlock_required_subscriber_ready_state_ready (MbimDevice *device,
/* Initialized */ /* Initialized */
if (ready_state == MBIM_SUBSCRIBER_READY_STATE_DEVICE_LOCKED || if (ready_state == MBIM_SUBSCRIBER_READY_STATE_DEVICE_LOCKED ||
ready_state == MBIM_SUBSCRIBER_READY_STATE_INITIALIZED || ready_state == MBIM_SUBSCRIBER_READY_STATE_INITIALIZED) {
ready_state == MBIM_SUBSCRIBER_READY_STATE_NO_ESIM_PROFILE) {
MbimMessage *message; MbimMessage *message;
/* Query which lock is to unlock */ /* Query which lock is to unlock */
@@ -1601,7 +1600,12 @@ unlock_required_subscriber_ready_state_ready (MbimDevice *device,
return; return;
} }
g_assert_not_reached (); /* When initialized but there are not profile set, assume no lock is
* applied. */
mm_obj_dbg (self, "eSIM without profiles: assuming no lock is required");
g_assert (ready_state == MBIM_SUBSCRIBER_READY_STATE_NO_ESIM_PROFILE);
g_task_return_int (task, MM_MODEM_LOCK_NONE);
g_object_unref (task);
} }
static gboolean static gboolean