aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-05-23 15:40:36 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-05-26 13:14:52 +0000
commit8a70dbe34b9c16844f465427cb6a19665aab3364 (patch)
tree8421fb7ab71c93e6c2d03340a66efc0d2fd82b87 /src/mm-iface-modem.c
parent7156d5ee50edbb3a14ed93865294637aae4c1f9b (diff)
iface-modem: remove the signal quality enforced refresh during sync()
when mm_iface_modem_refresh_signal() is called, we'll restart the signal quality refresh logic already, there is no need to request an enforced start. The enforced start was also modifying ctx->enabled unconditionally, which is really not ok. This logic would be enabled only when we're registered, and that logic is fine, no need to change that.
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r--src/mm-iface-modem.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index e0c84b5b..3c489505 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -1594,27 +1594,12 @@ periodic_signal_check_cb (MMIfaceModem *self)
}
void
-mm_iface_modem_refresh_signal (MMIfaceModem *self,
- gboolean enforce)
+mm_iface_modem_refresh_signal (MMIfaceModem *self)
{
SignalCheckContext *ctx;
ctx = get_signal_check_context (self);
- /*
- * If enforced, poll once explicitly to make sure the signal strength
- * and access technologies are updated.
- *
- * Modems with signal indication support block periodic polling scheduling.
- * With enforce == TRUE, the periodic polling logic can run once as
- * it override once the periodic polling prohibition.
- * When the polling is complete, the periodic polling scheduling
- * is blocked again to avoid that modems with signal indication support
- * are periodic polled for their signal status.
- */
- if (enforce)
- ctx->enabled = TRUE;
-
/* Don't refresh polling if we're not enabled */
if (!ctx->enabled) {
mm_obj_dbg (self, "periodic signal check refresh ignored: checks not enabled");
@@ -1694,7 +1679,7 @@ periodic_signal_check_enable (MMIfaceModem *self)
}
/* And refresh, which will trigger the first check at high frequency */
- mm_iface_modem_refresh_signal (self, FALSE);
+ mm_iface_modem_refresh_signal (self);
}
/*****************************************************************************/
@@ -2368,7 +2353,7 @@ set_current_capabilities_ready (MMIfaceModem *self,
g_dbus_method_invocation_take_error (ctx->invocation, error);
else {
/* Capabilities updated: explicitly refresh signal and access technology */
- mm_iface_modem_refresh_signal (self, FALSE);
+ mm_iface_modem_refresh_signal (self);
mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
}
@@ -2858,7 +2843,7 @@ handle_set_current_bands_ready (MMIfaceModem *self,
g_dbus_method_invocation_take_error (ctx->invocation, error);
else {
/* Bands updated: explicitly refresh signal and access technology */
- mm_iface_modem_refresh_signal (self, FALSE);
+ mm_iface_modem_refresh_signal (self);
mm_gdbus_modem_complete_set_current_bands (ctx->skeleton, ctx->invocation);
}
@@ -3245,7 +3230,7 @@ handle_set_current_modes_ready (MMIfaceModem *self,
g_dbus_method_invocation_take_error (ctx->invocation, error);
else {
/* Modes updated: explicitly refresh signal and access technology */
- mm_iface_modem_refresh_signal (self, FALSE);
+ mm_iface_modem_refresh_signal (self);
mm_gdbus_modem_complete_set_current_modes (ctx->skeleton, ctx->invocation);
}
@@ -4331,9 +4316,9 @@ interface_syncing_step (GTask *task)
case SYNCING_STEP_REFRESH_SIGNAL_STRENGTH:
/*
- * Start a signal strength and access technologies refresh sequence.
+ * Restart the signal strength and access technologies refresh sequence.
*/
- mm_iface_modem_refresh_signal (self, TRUE);
+ mm_iface_modem_refresh_signal (self);
ctx->step++;
/* fall through */