diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2022-05-16 12:30:36 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-05-20 09:03:54 +0000 |
commit | 61144e21038d48b5e30459566f9b71db9cf34b46 (patch) | |
tree | f5ad014490fb5b9528a8ac54d27b35e12bb57276 /src/mm-iface-modem.c | |
parent | 86eabf4316a996b1df64522c933018fcad61f07e (diff) |
iface-modem: remove MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED property
This property is used in the MMIfaceModem to flag whether the SIM hot
swap setup has been performed or not. The flag is now moved to the
iface-specific private context.
The property was also used in AT-based modems, so that implementations
supporting the SIM hot swap via AT URCs could flag the upper layers
whether the enabling of the feature was done correctly or not, and if
so, create and keep the AT ports context open. But this feature only
made sense in AT-based modems, i.e. an MBIM modem that detects SIM hot
swaps via MBIM indications exclusively should not require the AT ports
context open for anything. The check in the MMBroadbandModem object
has therefore been removed, and the logic will be updated so that it
only applies to AT-based modems.
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index d2954cb2..517288e6 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -71,6 +71,9 @@ typedef struct { /* Initialization restart support */ guint restart_initialize_idle_id; + + /* SIM hot swap setup done flag */ + gboolean sim_hot_swap_configured; } Private; static void @@ -5019,19 +5022,19 @@ setup_sim_hot_swap_ready (MMIfaceModem *self, GAsyncResult *res, GTask *task) { + Private *priv; InitializationContext *ctx; g_autoptr(GError) error = NULL; - ctx = g_task_get_task_data (task); + priv = get_private (self); + ctx = g_task_get_task_data (task); MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish (self, res, &error); if (error) mm_obj_warn (self, "SIM hot swap setup failed: %s", error->message); else { mm_obj_dbg (self, "SIM hot swap setup succeeded"); - g_object_set (self, - MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, TRUE, - NULL); + priv->sim_hot_swap_configured = TRUE; } /* Go on to next step */ @@ -5775,12 +5778,10 @@ interface_initialization_step (GTask *task) /* fall-through */ case INITIALIZATION_STEP_SIM_HOT_SWAP: { - gboolean sim_hot_swap_configured = FALSE; + Private *priv; - g_object_get (self, - MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &sim_hot_swap_configured, - NULL); - if (!sim_hot_swap_configured && + priv = get_private (self); + if (!priv->sim_hot_swap_configured && MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap && MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish) { MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap ( @@ -6431,14 +6432,6 @@ iface_modem_init (gpointer g_iface) g_object_interface_install_property (g_iface, - g_param_spec_boolean (MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, - "Sim Hot Swap Configured", - "Whether the sim hot swap support is configured correctly.", - FALSE, - G_PARAM_READWRITE)); - - g_object_interface_install_property - (g_iface, g_param_spec_boolean (MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED, "Periodic signal quality check disabled", "Whether periodic signal quality check is disabled.", |