summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2021-03-15 14:58:12 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-03-15 17:57:12 +0100
commit001a8819f5aff14d06fbb3f61e5151c6d42de57f (patch)
treed28eccb2b17cd04a07fc6e229640de273ad5116d
parent9bf1c99b89fe0bbb67d69d078bf7e7df781e96da (diff)
downloadModemManager-001a8819f5aff14d06fbb3f61e5151c6d42de57f.tar.gz
shared-qmi: rename feature check variables
We want the "extended_lte_band_preference" with the "nas_ssp" prefix, as we're going to add more checks for SSP features. (cherry picked from commit 67b64eb7eeab5c50381014945cfbd73ebc4cbe11)
-rw-r--r--src/mm-shared-qmi.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c
index 9e861cb2e..ebf2886bb 100644
--- a/src/mm-shared-qmi.c
+++ b/src/mm-shared-qmi.c
@@ -70,9 +70,9 @@ typedef struct {
/* Capabilities & modes helpers */
MMModemCapability current_capabilities;
GArray *supported_radio_interfaces;
- Feature feature_nas_technology_preference;
- Feature feature_nas_system_selection_preference;
- Feature feature_extended_lte_band_preference;
+ Feature feature_nas_tp;
+ Feature feature_nas_ssp;
+ Feature feature_nas_ssp_extended_lte_band_preference;
gboolean disable_4g_only_mode;
GArray *supported_bands;
@@ -126,8 +126,8 @@ get_private (MMSharedQmi *self)
if (!priv) {
priv = g_slice_new0 (Private);
- priv->feature_nas_technology_preference = FEATURE_UNKNOWN;
- priv->feature_nas_system_selection_preference = FEATURE_UNKNOWN;
+ priv->feature_nas_tp = FEATURE_UNKNOWN;
+ priv->feature_nas_ssp = FEATURE_UNKNOWN;
priv->config_active_i = -1;
/* Setup parent class' MMIfaceModemLocation */
@@ -461,7 +461,7 @@ mm_shared_qmi_3gpp_register_in_network (MMIfaceModem3gpp *self,
}
priv = get_private (MM_SHARED_QMI (self));
- if (priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED)
+ if (priv->feature_nas_ssp == FEATURE_SUPPORTED)
register_in_network_sssp (task, client, cancellable, mcc, mnc);
else
register_in_network_inr (task, client, cancellable, mcc, mnc);
@@ -673,8 +673,8 @@ set_current_capabilities_step (GTask *task)
switch (ctx->step) {
case SET_CURRENT_CAPABILITIES_STEP_FIRST:
/* Error out early if both unsupported */
- if ((priv->feature_nas_system_selection_preference != FEATURE_SUPPORTED) &&
- (priv->feature_nas_technology_preference != FEATURE_SUPPORTED)) {
+ if ((priv->feature_nas_ssp != FEATURE_SUPPORTED) &&
+ (priv->feature_nas_tp != FEATURE_SUPPORTED)) {
g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
"Setting capabilities is not supported by this device");
g_object_unref (task);
@@ -684,7 +684,7 @@ set_current_capabilities_step (GTask *task)
/* fall-through */
case SET_CURRENT_CAPABILITIES_STEP_NAS_SYSTEM_SELECTION_PREFERENCE:
- if (priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) {
+ if (priv->feature_nas_ssp == FEATURE_SUPPORTED) {
set_current_capabilities_system_selection_preference (task);
return;
}
@@ -692,7 +692,7 @@ set_current_capabilities_step (GTask *task)
/* fall-through */
case SET_CURRENT_CAPABILITIES_STEP_NAS_TECHNOLOGY_PREFERENCE:
- if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED) {
+ if (priv->feature_nas_tp == FEATURE_SUPPORTED) {
set_current_capabilities_technology_preference (task);
return;
}
@@ -732,8 +732,8 @@ mm_shared_qmi_set_current_capabilities (MMIfaceModem *self,
return;
priv = get_private (MM_SHARED_QMI (self));
- g_assert (priv->feature_nas_technology_preference != FEATURE_UNKNOWN);
- g_assert (priv->feature_nas_system_selection_preference != FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_tp != FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_ssp != FEATURE_UNKNOWN);
ctx = g_slice_new0 (SetCurrentCapabilitiesContext);
ctx->client = g_object_ref (client);
@@ -869,18 +869,18 @@ load_current_capabilities_get_technology_preference_ready (QmiClientNas *client,
if (!output) {
mm_obj_dbg (self, "QMI operation failed: %s", error->message);
g_error_free (error);
- priv->feature_nas_technology_preference = FEATURE_UNSUPPORTED;
+ priv->feature_nas_tp = FEATURE_UNSUPPORTED;
} else if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) {
mm_obj_dbg (self, "couldn't get technology preference: %s", error->message);
g_error_free (error);
- priv->feature_nas_technology_preference = FEATURE_SUPPORTED;
+ priv->feature_nas_tp = FEATURE_SUPPORTED;
} else {
qmi_message_nas_get_technology_preference_output_get_active (
output,
&ctx->capabilities_context.nas_tp_mask,
NULL, /* duration */
NULL);
- priv->feature_nas_technology_preference = FEATURE_SUPPORTED;
+ priv->feature_nas_tp = FEATURE_SUPPORTED;
}
if (output)
@@ -909,17 +909,17 @@ load_current_capabilities_get_system_selection_preference_ready (QmiClientNas *c
if (!output) {
mm_obj_dbg (self, "QMI operation failed: %s", error->message);
g_error_free (error);
- priv->feature_nas_system_selection_preference = FEATURE_UNSUPPORTED;
+ priv->feature_nas_ssp = FEATURE_UNSUPPORTED;
} else if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) {
mm_obj_dbg (self, "couldn't get system selection preference: %s", error->message);
g_error_free (error);
- priv->feature_nas_system_selection_preference = FEATURE_SUPPORTED;
+ priv->feature_nas_ssp = FEATURE_SUPPORTED;
} else {
qmi_message_nas_get_system_selection_preference_output_get_mode_preference (
output,
&ctx->capabilities_context.nas_ssp_mode_preference_mask,
NULL);
- priv->feature_nas_system_selection_preference = FEATURE_SUPPORTED;
+ priv->feature_nas_ssp = FEATURE_SUPPORTED;
}
if (output)
@@ -967,8 +967,8 @@ load_current_capabilities_step (GTask *task)
return;
case LOAD_CURRENT_CAPABILITIES_STEP_LAST:
- g_assert (priv->feature_nas_technology_preference != FEATURE_UNKNOWN);
- g_assert (priv->feature_nas_system_selection_preference != FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_tp != FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_ssp != FEATURE_UNKNOWN);
priv->current_capabilities = mm_modem_capability_from_qmi_capabilities_context (&ctx->capabilities_context, self);
g_task_return_int (task, priv->current_capabilities);
g_object_unref (task);
@@ -1018,8 +1018,8 @@ mm_shared_qmi_load_current_capabilities (MMIfaceModem *self,
/* Current capabilities is the first thing run, and will only be run once per modem,
* so we should here check support for the optional features. */
priv = get_private (MM_SHARED_QMI (self));
- g_assert (priv->feature_nas_technology_preference == FEATURE_UNKNOWN);
- g_assert (priv->feature_nas_system_selection_preference == FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_tp == FEATURE_UNKNOWN);
+ g_assert (priv->feature_nas_ssp == FEATURE_UNKNOWN);
ctx = g_slice_new0 (LoadCurrentCapabilitiesContext);
ctx->nas_client = g_object_ref (nas_client);
@@ -1078,7 +1078,7 @@ mm_shared_qmi_load_supported_capabilities (MMIfaceModem *self,
* switching only when switching GSM/UMTS+CDMA/EVDO multimode devices, and only if
* we have support for the commands doing it.
*/
- if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED || priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) {
+ if (priv->feature_nas_tp == FEATURE_SUPPORTED || priv->feature_nas_ssp == FEATURE_SUPPORTED) {
if (mask == (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO)) {
/* Multimode GSM/UMTS+CDMA/EVDO device switched to GSM/UMTS only */
single = MM_MODEM_CAPABILITY_GSM_UMTS;
@@ -1324,12 +1324,12 @@ mm_shared_qmi_set_current_modes (MMIfaceModem *self,
priv = get_private (MM_SHARED_QMI (self));
- if (priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) {
+ if (priv->feature_nas_ssp == FEATURE_SUPPORTED) {
set_current_modes_system_selection_preference (task);
return;
}
- if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED) {
+ if (priv->feature_nas_tp == FEATURE_SUPPORTED) {
set_current_modes_technology_preference (task);
return;
}
@@ -1567,12 +1567,12 @@ mm_shared_qmi_load_current_modes (MMIfaceModem *self,
priv = get_private (MM_SHARED_QMI (self));
- if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) {
+ if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) {
load_current_modes_system_selection_preference (task);
return;
}
- if (priv->feature_nas_technology_preference != FEATURE_UNSUPPORTED) {
+ if (priv->feature_nas_tp != FEATURE_UNSUPPORTED) {
load_current_modes_technology_preference (task);
return;
}
@@ -1623,7 +1623,7 @@ mm_shared_qmi_load_supported_modes (MMIfaceModem *self,
g_array_append_val (all, mode);
/* If SSP and TP are not supported, ignore supported mode management */
- if (priv->feature_nas_system_selection_preference == FEATURE_UNSUPPORTED && priv->feature_nas_technology_preference == FEATURE_UNSUPPORTED) {
+ if (priv->feature_nas_ssp == FEATURE_UNSUPPORTED && priv->feature_nas_tp == FEATURE_UNSUPPORTED) {
g_task_return_pointer (task, all, (GDestroyNotify) g_array_unref);
g_object_unref (task);
return;
@@ -1640,7 +1640,7 @@ mm_shared_qmi_load_supported_modes (MMIfaceModem *self,
if (MODE4 != MM_MODEM_MODE_NONE) \
mode.allowed |= MODE4; \
} \
- if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { \
+ if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { \
if (MODE3 != MM_MODEM_MODE_NONE) { \
if (MODE4 != MM_MODEM_MODE_NONE) { \
mode.preferred = MODE4; \
@@ -1682,7 +1682,7 @@ mm_shared_qmi_load_supported_modes (MMIfaceModem *self,
/* 5G related mode combinations are only supported when NAS SSP is supported,
* as there is no 5G support in NAS TP. */
- if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) {
+ if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) {
ADD_MODE_PREFERENCE (MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE);
ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE);
ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE);
@@ -1851,8 +1851,8 @@ load_bands_get_system_selection_preference_ready (QmiClientNas *client,
NULL))
extended_lte_band_preference_size = G_N_ELEMENTS (extended_lte_band_preference);
- if (G_UNLIKELY (priv->feature_extended_lte_band_preference == FEATURE_UNKNOWN))
- priv->feature_extended_lte_band_preference = extended_lte_band_preference_size ? FEATURE_SUPPORTED : FEATURE_UNSUPPORTED;
+ if (G_UNLIKELY (priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_UNKNOWN))
+ priv->feature_nas_ssp_extended_lte_band_preference = extended_lte_band_preference_size ? FEATURE_SUPPORTED : FEATURE_UNSUPPORTED;
mm_bands = mm_modem_bands_from_qmi_band_preference (band_preference_mask,
lte_band_preference_mask,
@@ -1972,14 +1972,14 @@ mm_shared_qmi_set_current_bands (MMIfaceModem *self,
mm_modem_bands_to_qmi_band_preference (bands_array,
&qmi_bands,
&qmi_lte_bands,
- priv->feature_extended_lte_band_preference == FEATURE_SUPPORTED ? extended_qmi_lte_bands : NULL,
+ priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_SUPPORTED ? extended_qmi_lte_bands : NULL,
G_N_ELEMENTS (extended_qmi_lte_bands),
self);
input = qmi_message_nas_set_system_selection_preference_input_new ();
qmi_message_nas_set_system_selection_preference_input_set_band_preference (input, qmi_bands, NULL);
if (mm_iface_modem_is_3gpp_lte (self)) {
- if (priv->feature_extended_lte_band_preference == FEATURE_SUPPORTED)
+ if (priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_SUPPORTED)
qmi_message_nas_set_system_selection_preference_input_set_extended_lte_band_preference (
input,
extended_qmi_lte_bands[0],