diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-iface-modem.c | 77 |
1 files changed, 34 insertions, 43 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 88ea1149..624a4ee4 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -1292,8 +1292,8 @@ peridic_signal_check_step (MMIfaceModem *self) g_assert_not_reached (); case SIGNAL_CHECK_STEP_FIRST: - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_SIGNAL_QUALITY: if (ctx->enabled && ctx->signal_quality_polling_supported && @@ -1302,8 +1302,8 @@ peridic_signal_check_step (MMIfaceModem *self) self, (GAsyncReadyCallback)signal_quality_check_ready, NULL); return; } - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_ACCESS_TECHNOLOGIES: if (ctx->enabled && ctx->access_technology_polling_supported && @@ -1312,8 +1312,8 @@ peridic_signal_check_step (MMIfaceModem *self) self, (GAsyncReadyCallback)access_technologies_check_ready, NULL); return; } - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_LAST: /* Flag as sequence finished */ @@ -3387,9 +3387,8 @@ update_lock_info_context_step (GTask *task) update_lock_info_context_step (task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_LOCK: /* Don't re-ask if already known */ @@ -3401,9 +3400,8 @@ update_lock_info_context_step (GTask *task) task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK: /* If we get that no lock is required, run the after SIM unlock step @@ -3426,9 +3424,8 @@ update_lock_info_context_step (GTask *task) /* If no way to run after SIM unlock step, we're done */ mm_dbg ("SIM is ready, and no need for the after SIM unlock step..."); } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES: /* Load unlock retries if possible */ @@ -3440,9 +3437,8 @@ update_lock_info_context_step (GTask *task) task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_LAST: if (ctx->saved_error) { @@ -3964,8 +3960,8 @@ interface_enabling_step (GTask *task) switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_SET_POWER_STATE: mm_iface_modem_set_power_state (self, @@ -3983,8 +3979,8 @@ interface_enabling_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_FLOW_CONTROL: if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control && @@ -3995,8 +3991,8 @@ interface_enabling_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_SUPPORTED_CHARSETS: if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets && @@ -4007,8 +4003,8 @@ interface_enabling_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_CHARSET: /* Only try to set charsets if we were able to load supported ones */ @@ -4048,8 +4044,8 @@ interface_enabling_step (GTask *task) g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_LAST: /* We are done without errors! */ @@ -4766,8 +4762,8 @@ interface_initialization_step (GTask *task) mm_gdbus_modem_set_ports (ctx->skeleton, mm_common_ports_array_to_variant (port_infos, n_port_infos)); mm_modem_port_info_array_free (port_infos, n_port_infos); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CURRENT_CAPABILITIES: /* Current capabilities may change during runtime, i.e. if new firmware reloaded; but we'll @@ -4783,8 +4779,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_CAPABILITIES: { GArray *supported_capabilities; @@ -4820,9 +4816,8 @@ interface_initialization_step (GTask *task) } g_array_unref (supported_capabilities); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_BEARERS: { MMBearerList *list = NULL; @@ -4863,9 +4858,8 @@ interface_initialization_step (GTask *task) mm_bearer_list_get_max_active (list)); g_object_unref (list); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_MANUFACTURER: /* Manufacturer is meant to be loaded only once during the whole @@ -4880,8 +4874,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_MODEL: /* Model is meant to be loaded only once during the whole @@ -4896,8 +4890,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_REVISION: /* Revision is meant to be loaded only once during the whole @@ -4912,8 +4906,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CARRIER_CONFIG: /* Current carrier config is meant to be loaded only once during the whole @@ -4927,8 +4921,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_HARDWARE_REVISION: /* HardwareRevision is meant to be loaded only once during the whole @@ -4943,8 +4937,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_EQUIPMENT_ID: /* Equipment ID is meant to be loaded only once during the whole @@ -4959,8 +4953,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_DEVICE_ID: /* Device ID is meant to be loaded only once during the whole @@ -4975,8 +4969,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_MODES: if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes != NULL && @@ -5004,8 +4998,8 @@ interface_initialization_step (GTask *task) g_array_unref (supported_modes); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_BANDS: { GArray *supported_bands; @@ -5034,9 +5028,8 @@ interface_initialization_step (GTask *task) } g_array_unref (supported_bands); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_IP_FAMILIES: /* Supported ip_families are meant to be loaded only once during the whole @@ -5051,8 +5044,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_POWER_STATE: /* Initial power state is meant to be loaded only once. Therefore, if we @@ -5070,8 +5063,8 @@ interface_initialization_step (GTask *task) /* We don't know how to load current power state; assume ON */ mm_gdbus_modem_set_power_state (ctx->skeleton, MM_MODEM_POWER_STATE_ON); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SIM_HOT_SWAP: if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap && @@ -5082,8 +5075,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_UNLOCK_REQUIRED: /* Only check unlock required if we were previously not unlocked */ @@ -5094,8 +5087,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SIM: /* If the modem doesn't need any SIM (not implemented by plugin, or not @@ -5126,8 +5119,8 @@ interface_initialization_step (GTask *task) g_object_unref (sim); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SETUP_CARRIER_CONFIG: /* Setup and perform automatic carrier config switching as soon as the @@ -5169,8 +5162,8 @@ interface_initialization_step (GTask *task) g_clear_object (&sim); g_free (carrier_config_mapping); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_OWN_NUMBERS: /* Own numbers is meant to be loaded only once during the whole @@ -5185,8 +5178,8 @@ interface_initialization_step (GTask *task) task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CURRENT_MODES: { MMModemMode allowed = MM_MODEM_MODE_ANY; @@ -5226,9 +5219,8 @@ interface_initialization_step (GTask *task) g_array_unref (supported); } - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_CURRENT_BANDS: { GArray *current; @@ -5257,9 +5249,8 @@ interface_initialization_step (GTask *task) if (current) g_array_unref (current); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_LAST: /* Setup all method handlers */ |