aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem.c
diff options
context:
space:
mode:
authorPrakash Pabba <quic_ppabba@quicinc.com>2022-06-02 14:30:28 +0530
committerAleksander Morgado <aleksander@aleksander.es>2022-07-16 22:22:59 +0200
commit5c0db3743209b78d8c7b7558e337e6df25951bae (patch)
tree5d487207e3e57f4f3c3e7600fda8f3e9800f6e89 /src/mm-iface-modem.c
parent115692dd9184805dc9aa04d09eaa270e1e6e795a (diff)
mm-iface-modem,mm-broadband-modem,mm-shared-qmi: support SIM IMSI switch
It is possible that SIM IMSI might change in roaming conditions for a sim. Register for UIM refresh indication always and reprobe if ICCID or IMSI changes for QMI modem.
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r--src/mm-iface-modem.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 69c1872b..8a38a283 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -11,6 +11,7 @@
* GNU General Public License for more details:
*
* Copyright (C) 2011 Google, Inc.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc.
*/
#include <ModemManager.h>
@@ -157,6 +158,7 @@ void
mm_iface_modem_check_for_sim_swap (MMIfaceModem *self,
guint slot_index,
const gchar *iccid,
+ const gchar *imsi,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -185,7 +187,7 @@ mm_iface_modem_check_for_sim_swap (MMIfaceModem *self,
primary_slot = mm_gdbus_modem_get_primary_sim_slot (MM_GDBUS_MODEM (skeleton));
g_object_unref (skeleton);
- /* Check that it's really the primary slot whose iccid has changed */
+ /* Check that it's really the primary slot whose iccid or imsi has changed */
if (primary_slot && primary_slot != slot_index) {
mm_obj_dbg (self, "checking for SIM swap ignored: status changed in slot %u, but primary is %u", slot_index, primary_slot);
g_task_return_boolean (task, TRUE);
@@ -200,6 +202,7 @@ mm_iface_modem_check_for_sim_swap (MMIfaceModem *self,
MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap (
self,
iccid,
+ imsi,
(GAsyncReadyCallback)explicit_check_for_sim_swap_ready,
task);
return;
@@ -4407,6 +4410,7 @@ interface_enabling_step (GTask *task)
MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap (
self,
NULL,
+ NULL,
(GAsyncReadyCallback)check_for_sim_swap_ready,
task);
return;
@@ -4603,6 +4607,7 @@ interface_syncing_step (GTask *task)
self,
0,
NULL,
+ NULL,
(GAsyncReadyCallback)sync_detect_sim_swap_ready,
task);
return;