aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-08-04 11:12:59 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-08-04 14:21:39 +0200
commitbcf5f2bc8b1e5ed2f2ef5fed083f80ea6f05a996 (patch)
tree54dc812e5340bf1d68e4116b6402610769db8e1a
parent3004e99fcb0ea396b25c31aacaac0b377996f689 (diff)
broadband-modem-mbim: also report as available not fully ready SIMs
If a SIM card is not fully ready or in a failed state in the non-active slot, we should still report them as available.
-rwxr-xr-xsrc/mm-broadband-modem-mbim.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c
index 21f61ed8..4336556d 100755
--- a/src/mm-broadband-modem-mbim.c
+++ b/src/mm-broadband-modem-mbim.c
@@ -3716,9 +3716,13 @@ update_sim_from_slot_status (MMBroadbandModemMbim *self,
mm_obj_dbg (self, "Updating sim at slot %d", slot_index + 1);
+ /* Not fully ready (NOT_READY) or unusable (ERROR) SIM cards should also be
+ * reported as being available in the non-active slot. */
if (slot_status == MBIM_UICC_SLOT_STATE_ACTIVE ||
slot_status == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM ||
- slot_status == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM_NO_PROFILES) {
+ slot_status == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM_NO_PROFILES ||
+ slot_status == MBIM_UICC_SLOT_STATE_NOT_READY ||
+ slot_status == MBIM_UICC_SLOT_STATE_ERROR) {
sim = mm_sim_mbim_new_initialized (MM_BASE_MODEM (self),
slot_index,
FALSE,
@@ -6312,9 +6316,13 @@ query_slot_information_status_ready (MbimDevice *device,
if ((slot_index + 1) == ctx->active_slot_index)
sim_active = TRUE;
+ /* Not fully ready (NOT_READY) or unusable (ERROR) SIM cards should also be
+ * reported as being available. */
if (slot_state == MBIM_UICC_SLOT_STATE_ACTIVE ||
slot_state == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM ||
- slot_state == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM_NO_PROFILES) {
+ slot_state == MBIM_UICC_SLOT_STATE_ACTIVE_ESIM_NO_PROFILES ||
+ slot_state == MBIM_UICC_SLOT_STATE_NOT_READY ||
+ slot_state == MBIM_UICC_SLOT_STATE_ERROR) {
sim = mm_sim_mbim_new_initialized (MM_BASE_MODEM (self),
slot_index,
sim_active,